Commit 16115d09 authored by Christof Metzger-Kraus's avatar Christof Metzger-Kraus
Browse files

Matter hasn't anything to with mating...

parent abdb021b
KX1IPHYS: ParticleMaterInteraction, TYPE="Collimator",MATERIAL="Copper";
KX1IPHYS: ParticleMatterInteraction, TYPE="Collimator",MATERIAL="Copper";
KX2IPHYS: ParticleMaterInteraction, TYPE="Collimator",MATERIAL="Graphite";
KX2IPHYS: ParticleMatterInteraction, TYPE="Collimator",MATERIAL="Graphite";
KX0I: ECollimator, L=0.09, ELEMEDGE=0.01, APERTURE={0.003,0.003},OUTFN="KX0I.h5",
PARTICLEMATERINTERACTION='KX1IPHYS';
......
......@@ -46,7 +46,7 @@
#include "ValueDefinitions/RealVariable.h"
#include "Utilities/Timer.h"
#include "Utilities/OpalException.h"
#include "Solvers/ParticleMaterInteractionHandler.hh"
#include "Solvers/ParticleMatterInteractionHandler.hh"
#include "Structure/BoundaryGeometry.h"
#include "Structure/LossDataSink.h"
......@@ -744,15 +744,15 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen
Inform msg("ParallelTTracker ", *gmsg);
IndexMap::value_t::const_iterator it = elements.begin();
const IndexMap::value_t::const_iterator end = elements.end();
std::set<IndexMap::value_t::value_type> elementsWithParticleMaterInteraction;
std::set<ParticleMaterInteractionHandler*> particleMaterInteractionHandlers;
std::set<IndexMap::value_t::value_type> elementsWithParticleMatterInteraction;
std::set<ParticleMatterInteractionHandler*> particleMaterInteractionHandlers;
std::pair<double, double> currentRange(0.0, 0.0);
while (elements.size() > 0) {
auto it = elements.begin();
if ((*it)->hasParticleMaterInteraction()) {
elementsWithParticleMaterInteraction.insert(*it);
particleMaterInteractionHandlers.insert((*it)->getParticleMaterInteraction());
if ((*it)->hasParticleMatterInteraction()) {
elementsWithParticleMatterInteraction.insert(*it);
particleMaterInteractionHandlers.insert((*it)->getParticleMatterInteraction());
std::pair<double, double> range = oth.getRange(*it, pathLength_m);
currentRange.first = std::min(currentRange.first, range.first);
......@@ -765,10 +765,10 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen
elements.erase(it);
}
if (elementsWithParticleMaterInteraction.size() > 0) {
std::set<ParticleMaterInteractionHandler*> oldSPHandlers;
std::vector<ParticleMaterInteractionHandler*> leftBehindSPHandlers, newSPHandlers;
for (auto it: activeParticleMaterInteractionHandlers_m) {
if (elementsWithParticleMatterInteraction.size() > 0) {
std::set<ParticleMatterInteractionHandler*> oldSPHandlers;
std::vector<ParticleMatterInteractionHandler*> leftBehindSPHandlers, newSPHandlers;
for (auto it: activeParticleMatterInteractionHandlers_m) {
oldSPHandlers.insert(it);
}
......@@ -781,19 +781,19 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen
for (auto it: leftBehindSPHandlers) {
if (!it->stillActive()) {
activeParticleMaterInteractionHandlers_m.erase(it);
activeParticleMatterInteractionHandlers_m.erase(it);
}
}
newSPHandlers.resize(std::max(oldSPHandlers.size(),
elementsWithParticleMaterInteraction.size()));
elementsWithParticleMatterInteraction.size()));
last = std::set_difference(particleMaterInteractionHandlers.begin(), particleMaterInteractionHandlers.end(),
oldSPHandlers.begin(), oldSPHandlers.end(),
newSPHandlers.begin());
newSPHandlers.resize(last - newSPHandlers.begin());
for (auto it: newSPHandlers) {
activeParticleMaterInteractionHandlers_m.insert(it);
activeParticleMatterInteractionHandlers_m.insert(it);
}
if(!particleMaterStatus_m) {
......@@ -806,9 +806,9 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen
do {
///all particles in material if max per node is 2 and other degraders have 0 particles
//check if more than one degrader has particles
ParticleMaterInteractionHandler* onlyDegraderWithParticles = NULL;
ParticleMatterInteractionHandler* onlyDegraderWithParticles = NULL;
int degradersWithParticlesCount = 0;
for (auto it: activeParticleMaterInteractionHandlers_m) {
for (auto it: activeParticleMatterInteractionHandlers_m) {
it->setFlagAllParticlesIn(false);
if (it->getParticlesInMat() > 0) {
onlyDegraderWithParticles = it;
......@@ -830,7 +830,7 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen
auto boundingSphere = itsBunch_m->getLocalBoundingSphere();
unsigned redifusedParticles = 0;
for (auto it: activeParticleMaterInteractionHandlers_m) {
for (auto it: activeParticleMatterInteractionHandlers_m) {
ElementBase* element = it->getElement();
CoordinateSystemTrafo refToLocalCSTrafo = (element->getMisalignment() *
(element->getCSTrafoGlobal2Local() * referenceToLabCSTrafo_m));
......@@ -889,7 +889,7 @@ void ParallelTTracker::computeParticleMatterInteraction(IndexMap::value_t elemen
} while (itsBunch_m->getTotalNum() == 0);
if (activeParticleMaterInteractionHandlers_m.size() == 0) {
if (activeParticleMatterInteractionHandlers_m.size() == 0) {
msg << level2 << "============== END PARTICLE MATER INTERACTION CALCULATION =============" << endl;
particleMaterStatus_m = false;
}
......
......@@ -64,7 +64,7 @@
#include <queue>
class BorisPusher;
class ParticleMaterInteractionHandler;
class ParticleMatterInteractionHandler;
class ParallelTTracker: public Tracker {
......@@ -244,7 +244,7 @@ private:
CoordinateSystemTrafo referenceToLabCSTrafo_m;
std::set<ParticleMaterInteractionHandler*> activeParticleMaterInteractionHandlers_m;
std::set<ParticleMatterInteractionHandler*> activeParticleMatterInteractionHandlers_m;
bool particleMaterStatus_m;
unsigned long totalParticlesInSimulation_m;
......@@ -298,7 +298,7 @@ private:
void computeWakefield(IndexMap::value_t &elements);
void computeParticleMatterInteraction(IndexMap::value_t elements, OrbitThreader &oth);
void computeSpaceChargeFields(unsigned long long step);
void prepareOpalBeamlineSections();
// void prepareOpalBeamlineSections();
void dumpStats(long long step, bool psDump, bool statDump);
void setOptionalVariables();
bool hasEndOfLineReached();
......
......@@ -25,7 +25,9 @@
#include "Fields/Fieldmap.h"
#include "Structure/LossDataSink.h"
#include "Utilities/Options.h"
#include "Solvers/ParticleMaterInteractionHandler.hh"
#include "Solvers/ParticleMatterInteractionHandler.hh"
#include "Utilities/Util.h"
#include <memory>
extern Inform *gmsg;
......@@ -148,12 +150,14 @@ Collimator::Collimator(const std::string &name):
pitch_m(0.0),
losses_m(0),
lossDs_m(nullptr),
parmatint_m(NULL)
parmatint_m(NULL),
isWarping_m(true),
warpCurve_m(NULL)
{}
Collimator::~Collimator() {
if(online_m)
if (online_m)
goOffline();
}
......@@ -170,8 +174,8 @@ inline bool Collimator::isInColl(Vector_t R, Vector_t P, double recpgamma) {
*/
const double z = R(2) + P(2) * recpgamma;
if((z > 0.0) && (z <= getElementLength())) {
if(isAPepperPot_m) {
if ((z > 0.0) && (z <= getElementLength())) {
if (isAPepperPot_m) {
/**
------------
......@@ -190,24 +194,24 @@ inline bool Collimator::isInColl(Vector_t R, Vector_t P, double recpgamma) {
particles they are not lost.
*/
const double h = pitch_m;
const double h = pitch_m;
const double xL = - 0.5 * h * (nHolesX_m - 1);
const double yL = - 0.5 * h * (nHolesY_m - 1);
bool alive = false;
for(unsigned int m = 0; (m < nHolesX_m && (!alive)); m++) {
for(unsigned int n = 0; (n < nHolesY_m && (!alive)); n++) {
double x_m = xL + (m * h);
double y_m = yL + (n * h);
for (unsigned int m = 0; (m < nHolesX_m && (!alive)); m++) {
for (unsigned int n = 0; (n < nHolesY_m && (!alive)); n++) {
double x_m = xL + (m * h);
double y_m = yL + (n * h);
/** are we in a) ? */
double rr = std::pow((R(0) - x_m) / rHole_m, 2) + std::pow((R(1) - y_m) / rHole_m, 2);
alive = (rr < 1.0);
}
}
return !alive;
} else if(isASlit_m || isARColl_m) {
} else if (isASlit_m || isARColl_m) {
return (std::abs(R(0)) >= getXsize() || std::abs(R(1)) >= getYsize());
} else if(isAWire_m) {
} else if (isAWire_m) {
ERRORMSG("Not yet implemented");
} else {
// case of an elliptic collimator
......@@ -221,10 +225,10 @@ bool Collimator::apply(const size_t &i, const double &t, Vector_t &E, Vector_t &
const Vector_t &R = RefPartBunch_m->R[i];
const Vector_t &P = RefPartBunch_m->P[i];
const double &dt = RefPartBunch_m->dt[i];
const double recpgamma = Physics::c * dt / sqrt(1.0 + dot(P, P));
const double recpgamma = Physics::c * dt / sqrt(1.0 + dot(P, P));
bool pdead = isInColl(R, P, recpgamma);
if(pdead) {
if (pdead) {
if (lossDs_m) {
double frac = -R(2) / P(2) * recpgamma;
lossDs_m->addParticle(R, P,
......@@ -239,7 +243,7 @@ bool Collimator::apply(const size_t &i, const double &t, Vector_t &E, Vector_t &
bool Collimator::applyToReferenceParticle(const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B) {
const double dt = RefPartBunch_m->getdT();
const double recpgamma = Physics::c * dt / sqrt(1.0 + dot(P, P));
const double recpgamma = Physics::c * dt / sqrt(1.0 + dot(P, P));
return isInColl(R, P, recpgamma);
}
......@@ -249,9 +253,9 @@ bool Collimator::checkCollimator(Vector_t r, Vector_t rmin, Vector_t rmax) {
double r_end = sqrt(xend_m * xend_m + yend_m * yend_m);
double r1 = sqrt(rmax(0) * rmax(0) + rmax(1) * rmax(1));
bool isDead = false;
if(rmax(2) >= zstart_m && rmin(2) <= zend_m) {
if( r1 > r_start - 10.0 && r1 < r_end + 10.0 ){
if(r(2) < zend_m && r(2) > zstart_m ) {
if (rmax(2) >= zstart_m && rmin(2) <= zend_m) {
if ( r1 > r_start - 10.0 && r1 < r_end + 10.0 ){
if (r(2) < zend_m && r(2) > zstart_m ) {
int pflag = checkPoint(r(0), r(1));
isDead = (pflag != 0);
}
......@@ -276,16 +280,16 @@ bool Collimator::checkCollimator(PartBunch &bunch, const int turnnumber, const d
boundingSphere.first = 0.5 * (rmax + rmin);
boundingSphere.second = euclidian_norm(rmax - boundingSphere.first);
if(rmax(2) >= zstart_m && rmin(2) <= zend_m) {
// if( r1 > r_start - 10.0 && r1 < r_end + 10.0 ){
if( r1 > r_start - 100.0 && r1 < r_end + 100.0 ){
if (rmax(2) >= zstart_m && rmin(2) <= zend_m) {
// if ( r1 > r_start - 10.0 && r1 < r_end + 10.0 ){
if ( r1 > r_start - 100.0 && r1 < r_end + 100.0 ){
size_t tempnum = bunch.getLocalNum();
int pflag = 0;
for(unsigned int i = 0; i < tempnum; ++i) {
if(bunch.PType[i] == ParticleType::REGULAR && bunch.R[i](2) < zend_m && bunch.R[i](2) > zstart_m ) {
for (unsigned int i = 0; i < tempnum; ++i) {
if (bunch.PType[i] == ParticleType::REGULAR && bunch.R[i](2) < zend_m && bunch.R[i](2) > zstart_m ) {
pflag = checkPoint(bunch.R[i](0), bunch.R[i](1));
/// bunch.Bin[i] != -1 makes sure the partcile is not stored in more than one collimator
if ((pflag != 0) && (bunch.Bin[i] != -1)) {
if ((pflag != 0) && (bunch.Bin[i] != -1)) {
if (!parmatint_m)
lossDs_m->addParticle(bunch.R[i], bunch.P[i], bunch.ID[i]);
bunch.Bin[i] = -1;
......@@ -306,7 +310,7 @@ void Collimator::initialise(PartBunch *bunch, double &startField, double &endFie
RefPartBunch_m = bunch;
endField = startField + getElementLength();
parmatint_m = getParticleMaterInteraction();
parmatint_m = getParticleMatterInteraction();
// if (!parmatint_m) {
if (filename_m == std::string(""))
......@@ -321,7 +325,7 @@ void Collimator::initialise(PartBunch *bunch, double &startField, double &endFie
void Collimator::initialise(PartBunch *bunch) {
RefPartBunch_m = bunch;
parmatint_m = getParticleMaterInteraction();
parmatint_m = getParticleMatterInteraction();
// if (!parmatint_m) {
if (filename_m == std::string(""))
......@@ -335,7 +339,7 @@ void Collimator::initialise(PartBunch *bunch) {
void Collimator::finalise()
{
if(online_m)
if (online_m)
goOffline();
*gmsg << "* Finalize probe" << endl;
}
......@@ -355,11 +359,11 @@ void Collimator::goOnline(const double &) {
}
void Collimator::print() {
if(RefPartBunch_m == NULL) {
if(!informed_m) {
if (RefPartBunch_m == NULL) {
if (!informed_m) {
std::string errormsg = Fieldmap::typeset_msg("BUNCH SIZE NOT SET", "warning");
ERRORMSG(errormsg << endl);
if(Ippl::myNode() == 0) {
if (Ippl::myNode() == 0) {
ofstream omsg("errormsg.txt", ios_base::app);
omsg << errormsg << endl;
omsg.close();
......@@ -370,20 +374,20 @@ void Collimator::print() {
}
*gmsg << level3;
if(isAPepperPot_m)
if (isAPepperPot_m)
*gmsg << "* Pepperpot x= " << a_m << " y= " << b_m << " r= " << rHole_m
<< " nx= " << nHolesX_m << " ny= " << nHolesY_m << " pitch= " << pitch_m << endl;
else if(isASlit_m)
else if (isASlit_m)
*gmsg << "* Slit x= " << getXsize() << " Slit y= " << getYsize()
<< " fn= " << filename_m << endl;
else if(isARColl_m)
else if (isARColl_m)
*gmsg << "* RCollimator a= " << getXsize() << " b= " << getYsize()
<< " fn= " << filename_m
<< " ny= " << nHolesY_m << " pitch= " << pitch_m << endl;
else if(isACColl_m)
else if (isACColl_m)
*gmsg << "* CCollimator angle start " << xstart_m << " (Deg) angle end " << ystart_m << " (Deg) "
<< "R start " << xend_m << " (mm) R rend " << yend_m << " (mm)" << endl;
else if(isAWire_m)
else if (isAWire_m)
*gmsg << "* Wire x= " << x0_m << " y= " << y0_m << endl;
else
*gmsg << "* ECollimator a= " << getXsize() << " b= " << b_m << " fn= " << filename_m
......@@ -422,15 +426,15 @@ ElementBase::ElementType Collimator::getType() const {
}
string Collimator::getCollimatorShape() {
if(isAPepperPot_m)
if (isAPepperPot_m)
return "PeperPot";
else if(isASlit_m)
else if (isASlit_m)
return "Slit";
else if(isARColl_m)
else if (isARColl_m)
return "RCollimator";
else if(isACColl_m)
else if (isACColl_m)
return "CCollimator";
else if(isAWire_m)
else if (isAWire_m)
return "Wire";
else
return "ECollimator";
......@@ -454,7 +458,7 @@ void Collimator::setGeom() {
geom_m[1].y = ystart_m - halfdist / coeff2;
geom_m[2].x = xend_m + halfdist * coeff1;
geom_m[2].y = yend_m - halfdist / coeff2;
geom_m[2].y = yend_m - halfdist / coeff2;
geom_m[3].x = xend_m - halfdist * coeff1;
geom_m[3].y = yend_m + halfdist / coeff2;
......@@ -471,14 +475,14 @@ void Collimator::setGeom() {
int Collimator::checkPoint(const double &x, const double &y) {
int cn = 0;
int cn = 0;
for(int i = 0; i < 4; i++) {
if(((geom_m[i].y <= y) && (geom_m[i+1].y > y))
|| ((geom_m[i].y > y) && (geom_m[i+1].y <= y))) {
for (int i = 0; i < 4; i++) {
if (((geom_m[i].y <= y) && (geom_m[i+1].y > y))
|| ((geom_m[i].y > y) && (geom_m[i+1].y <= y))) {
float vt = (float)(y - geom_m[i].y) / (geom_m[i+1].y - geom_m[i].y);
if(x < geom_m[i].x + vt * (geom_m[i+1].x - geom_m[i].x))
if (x < geom_m[i].x + vt * (geom_m[i+1].x - geom_m[i].x))
++cn;
}
}
......
......@@ -199,7 +199,7 @@ private:
std::unique_ptr<LossDataSink> lossDs_m;
ParticleMaterInteractionHandler *parmatint_m;
ParticleMatterInteractionHandler *parmatint_m;
};
......
......@@ -29,7 +29,7 @@
#include "Structure/BoundaryGeometry.h" // OPAL file
#include "Solvers/WakeFunction.hh"
#include "Solvers/ParticleMaterInteractionHandler.hh"
#include "Solvers/ParticleMatterInteractionHandler.hh"
using namespace std;
......@@ -334,7 +334,7 @@ void ElementBase::setBoundaryGeometry(BoundaryGeometry *geo) {
bgeometry_m = geo;//->clone(getName() + std::string("_wake")); }
}
void ElementBase::setParticleMaterInteraction(ParticleMaterInteractionHandler *parmatint) {
void ElementBase::setParticleMatterInteraction(ParticleMatterInteractionHandler *parmatint) {
parmatint_m = parmatint;
}
......
......@@ -53,7 +53,7 @@ enum ElemType {
class WakeFunction;
class ParticleMaterInteractionHandler;
class ParticleMatterInteractionHandler;
class BoundaryGeometry;
// Class ElementBase
......@@ -407,11 +407,11 @@ public:
virtual bool hasWake() const;
virtual void setParticleMaterInteraction(ParticleMaterInteractionHandler *spys);
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys);
virtual ParticleMaterInteractionHandler *getParticleMaterInteraction() const;
virtual ParticleMatterInteractionHandler *getParticleMatterInteraction() const;
virtual bool hasParticleMaterInteraction() const;
virtual bool hasParticleMatterInteraction() const;
/// returns element type as enumeration needed in the envelope tracker
ElemType getElType() const;
......@@ -476,7 +476,7 @@ private:
BoundaryGeometry *bgeometry_m;
ParticleMaterInteractionHandler *parmatint_m;
ParticleMatterInteractionHandler *parmatint_m;
ElemType elType_m;
......@@ -565,11 +565,11 @@ bool ElementBase::hasBoundaryGeometry() const
{ return bgeometry_m != NULL; }
inline
ParticleMaterInteractionHandler *ElementBase::getParticleMaterInteraction() const
ParticleMatterInteractionHandler *ElementBase::getParticleMatterInteraction() const
{ return parmatint_m; }
inline
bool ElementBase::hasParticleMaterInteraction() const
bool ElementBase::hasParticleMatterInteraction() const
{ return parmatint_m != NULL; }
inline
......
......@@ -15,7 +15,7 @@ set (HDRS
GreenWakeFunction.hh
CollimatorPhysics.hh
CSRWakeFunction.hh
ParticleMaterInteractionHandler.hh
ParticleMatterInteractionHandler.hh
WakeFunction.hh
CSRIGFWakeFunction.hh
)
......
......@@ -41,7 +41,7 @@ const int CollimatorPhysics::numpar = 13;
#endif
CollimatorPhysics::CollimatorPhysics(const std::string &name, ElementBase *element, std::string &material):
ParticleMaterInteractionHandler(name, element),
ParticleMatterInteractionHandler(name, element),
allParticlesIn_m(false),
T_m(0.0),
dT_m(0.0),
......
......@@ -9,7 +9,7 @@
// $Author: Bi, Yang, Stachel, Adelmann$
//-------------------------------------------------------------------------
#include <vector>
#include "Solvers/ParticleMaterInteractionHandler.hh"
#include "Solvers/ParticleMatterInteractionHandler.hh"
#include "Algorithms/Vektor.h"
#include "AbsBeamline/Component.h"
#include "AbsBeamline/Collimator.h"
......@@ -66,7 +66,7 @@ typedef struct {
#endif
class CollimatorPhysics: public ParticleMaterInteractionHandler {
class CollimatorPhysics: public ParticleMatterInteractionHandler {
public:
CollimatorPhysics(const std::string &name, ElementBase *element, std::string &mat);
~CollimatorPhysics();
......
......@@ -8,10 +8,10 @@ class ElementBase;
class PartBunch;
class Inform;
class ParticleMaterInteractionHandler {
class ParticleMatterInteractionHandler {
public:
ParticleMaterInteractionHandler(std::string name, ElementBase *elref);
virtual ~ParticleMaterInteractionHandler() { };
ParticleMatterInteractionHandler(std::string name, ElementBase *elref);
virtual ~ParticleMatterInteractionHandler() { };
virtual void apply(PartBunch &bunch,
const std::pair<Vector_t, double> &boundingSphere,
size_t numParticlesInSimulation = 0) = 0;
......@@ -37,29 +37,29 @@ private:
};
inline
ParticleMaterInteractionHandler::ParticleMaterInteractionHandler(std::string name, ElementBase *elref):
ParticleMatterInteractionHandler::ParticleMatterInteractionHandler(std::string name, ElementBase *elref):
element_ref_m(elref),
allParticleInMat_m(false),
name_m(name)
{}
inline
void ParticleMaterInteractionHandler::updateElement(ElementBase *newref) {
void ParticleMatterInteractionHandler::updateElement(ElementBase *newref) {
element_ref_m = newref;
}
inline
ElementBase* ParticleMaterInteractionHandler::getElement() {
ElementBase* ParticleMatterInteractionHandler::getElement() {
return element_ref_m;
}
inline
void ParticleMaterInteractionHandler::setFlagAllParticlesIn(bool p) {
void ParticleMatterInteractionHandler::setFlagAllParticlesIn(bool p) {
allParticleInMat_m = p;
}
inline
bool ParticleMaterInteractionHandler::getFlagAllParticlesIn() const {
bool ParticleMatterInteractionHandler::getFlagAllParticlesIn() const {
return allParticleInMat_m;
}
#endif // PARTICLEMATERINTERACTION_HH
\ No newline at end of file
......@@ -96,7 +96,7 @@ unsigned long OpalBeamline::getFieldAt(const Vector_t &position,
// if(section.hasWake()) {
// rtv |= BEAMLINE_WAKE;
// }
// if(section.hasParticleMaterInteraction()) {
// if(section.hasParticleMatterInteraction()) {
// rtv |= BEAMLINE_PARTICLEMATERINTERACTION;
// }
......
......@@ -28,7 +28,7 @@
class Tracker;
class PartBunch;
class ParticleMaterInteractionHandler;
class ParticleMatterInteractionHandler;
class BoundaryGeometry;
class WakeFunction;
class Bend;
......@@ -97,7 +97,7 @@ public:
WakeFunction *getWakeFunction(const unsigned int &);
std::shared_ptr<const ElementBase> getWakeFunctionOwner(const unsigned int &);
ParticleMaterInteractionHandler *getParticleMaterInteractionHandler(const unsigned int &);
ParticleMatterInteractionHandler *getParticleMatterInteractionHandler(const unsigned int &);
BoundaryGeometry *getBoundaryGeometry(const unsigned int &);
......@@ -164,9 +164,9 @@ private:
// return NULL;
// }
// inline ParticleMaterInteractionHandler *OpalBeamline::getParticleMaterInteractionHandler(const unsigned int &index) {
// inline ParticleMatterInteractionHandler *OpalBeamline::getParticleMatterInteractionHandler(const unsigned int &index) {
// if(index < sections_m.size()) {
// return sections_m[index].getParticleMaterInteractionHandler();
// return sections_m[index].getParticleMatterInteractionHandler();
// }
// return 0;
// }
......@@ -187,18 +187,6 @@ void OpalBeamline::visit(const T &element, BeamlineVisitor &, PartBunch *bunch)
template<> inline
void OpalBeamline::visit<Source>(const Source &element, BeamlineVisitor &, PartBunch *bunch) {
// Inform msg("OPAL ");
// double startField = 0.0;
// double endField = 0.0;
// std::shared_ptr<Source> elptr(static_cast<Source*>(element.clone()->removeWrappers()));
// if(!elptr->hasAttribute("ELEMEDGE")) {
// startField = elptr->getElementPosition();
// }
// elptr->initialise(bunch, startField, endField);
// elptr->setBeamline(this);
// elements_m.push_back(ClassicField(elptr, startField, endField));
containsSource_m = true;
}
......
......@@ -19,7 +19,7 @@
#include "Elements/OpalCCollimator.h"
#include "Attributes/Attributes.h"
#include "BeamlineCore/CollimatorRep.h"
#include "Structure/ParticleMaterInteraction.h"