1 #ifndef COLLIMATORPHYSICS_HH
2 #define COLLIMATORPHYSICS_HH
18 #include <gsl/gsl_rng.h>
28 template <
class T,
unsigned Dim>
35 typedef struct __align__(16) {
84 bool enableRutherford);
88 const std::pair<Vector_t, double> &boundingSphere,
89 size_t numParticlesInSimulation = 0);
91 virtual const std::string
getType()
const;
106 bool includeFluctuations =
true)
const;
122 const std::pair<Vector_t, double> &boundingSphere);
126 const std::pair<Vector_t, double> &boundingSphere,
127 size_t numParticlesInSimulation);
130 const std::pair<Vector_t, double> &boundingSphere,
131 size_t numParticlesInSimulation);
133 const std::pair<Vector_t, double> &boundingSphere);
137 void clearCollimatorDKS();
140 void deleteParticleFromLocalVectorDKS();
204 std::vector<PART_DKS> dksParts_m;
206 static const int numpar_m;
245 return "CollimatorPhysics";
248 #endif //COLLIMATORPHYSICS_HH
std::unique_ptr< InsideTester > hitTester_m
CollimatorPhysics(const std::string &name, ElementBase *element, std::string &mat, bool enableRutherford)
IpplTimings::TimerRef DegraderDestroyTimer_m
Interface for basic beam line object.
void applyRotation(Vector_t &P, Vector_t &R, double xplane, double thetacou)
void computeCoulombScattering(Vector_t &R, Vector_t &P, double dt)
std::vector< PART > locParts_m
IpplTimings::TimerRef DegraderApplyTimer_m
void apply(PartBunchBase< double, 3 > *bunch, const std::pair< Vector_t, double > &boundingSphere, size_t numParticlesInSimulation=0)
virtual const std::string getType() const
void deleteParticleFromLocalVector()
std::unique_ptr< LossDataSink > lossDs_m
bool stillAlive(PartBunchBase< double, 3 > *bunch)
unsigned int stoppedPartStat_m
IpplTimings::TimerRef DegraderLoopTimer_m
void setTimeStepForLeavingParticles()
unsigned int rediffusedStat_m
std::string collshapeStr_m
size_t getParticlesInMat()
unsigned int bunchToMatStat_m
void applyRandomRotation(Vector_t &P, double theta0)
void configureMaterialParameters()
The material of the collimator.
unsigned int totalPartsInMat_m
ElementBase::ElementType collshape_m
void calcStat(double Eng)
Timing::TimerRef TimerRef
unsigned int getNumEntered()
void applyNonDKS(PartBunchBase< double, 3 > *bunch, const std::pair< Vector_t, double > &boundingSphere, size_t numParticlesInSimulation)
void computeInteraction()
void addBackToBunch(PartBunchBase< double, 3 > *bunch)
void copyFromBunch(PartBunchBase< double, 3 > *bunch, const std::pair< Vector_t, double > &boundingSphere)
virtual bool computeEnergyLoss(Vector_t &P, const double deltat, bool includeFluctuations=true) const