CMS 3D CMS Logo

MaterialEffectsSimulator.h
Go to the documentation of this file.
1 #ifndef MATERIALEFFECTSSIMULATOR_H
2 #define MATERIALEFFECTSSIMULATOR_H
3 
5 
7 
8 #include <vector>
9 
11 
26 public:
27  typedef std::vector<RawParticle>::const_iterator RHEP_const_iter;
28 
29  // Constructor : default values are for Silicon
30  MaterialEffectsSimulator(double A = 28.0855, double Z = 14.0000, double density = 2.329, double radLen = 9.360);
31 
32  virtual ~MaterialEffectsSimulator();
33 
36 
38  inline double theA() const { return A; }
40  inline double theZ() const { return Z; }
42  inline double rho() const { return density; }
44  inline double radLenIncm() const { return radLen; }
46  inline double excitE() const { return 12.5E-9 * theZ(); }
48  inline double eMass() const { return 0.000510998902; }
49 
51  void updateState(ParticlePropagator& myTrack, double radlen, RandomEngineAndDistribution const*);
52 
54  inline RHEP_const_iter beginDaughters() const { return _theUpdatedState.begin(); }
55 
57  inline RHEP_const_iter endDaughters() const { return _theUpdatedState.end(); }
58 
60  inline unsigned nDaughters() const { return _theUpdatedState.size(); }
61 
63  inline void setNormalVector(const GlobalVector& normal) { theNormalVector = normal; }
64 
66  XYZVector orthogonal(const XYZVector&) const;
67 
70 
72  virtual void save(){};
73 
74 private:
77 
79  inline double radiationLength() const { return radLengths; }
80 
81 protected:
82  std::vector<RawParticle> _theUpdatedState;
83 
84  double radLengths;
85 
86  // Material properties
87  double A;
88  double Z;
89  double density;
90  double radLen;
91 
93 
95 };
96 
97 #endif
Vector3DBase
Definition: Vector3DBase.h:8
MaterialEffectsSimulator::rho
double rho() const
Density in g/cm3.
Definition: MaterialEffectsSimulator.h:42
MaterialEffectsSimulator::RHEP_const_iter
std::vector< RawParticle >::const_iterator RHEP_const_iter
Definition: MaterialEffectsSimulator.h:27
MaterialEffectsSimulator::_theUpdatedState
std::vector< RawParticle > _theUpdatedState
Definition: MaterialEffectsSimulator.h:82
MaterialEffectsSimulator::theNormalVector
GlobalVector theNormalVector
Definition: MaterialEffectsSimulator.h:92
XYZVector
math::XYZVector XYZVector
Definition: RawParticle.h:26
MaterialEffectsSimulator::theZ
double theZ() const
Z.
Definition: MaterialEffectsSimulator.h:40
MaterialEffectsSimulator::theClosestChargedDaughterId
int theClosestChargedDaughterId
Definition: MaterialEffectsSimulator.h:94
MaterialEffectsSimulator::compute
virtual void compute(ParticlePropagator &Particle, RandomEngineAndDistribution const *)=0
Overloaded in all material effects updtators.
MaterialEffectsSimulator::~MaterialEffectsSimulator
virtual ~MaterialEffectsSimulator()
Definition: MaterialEffectsSimulator.cc:14
MaterialEffectsSimulator::updateState
void updateState(ParticlePropagator &myTrack, double radlen, RandomEngineAndDistribution const *)
Compute the material effect (calls the sub class)
Definition: MaterialEffectsSimulator.cc:19
MaterialEffectsSimulator::orthogonal
XYZVector orthogonal(const XYZVector &) const
A vector orthogonal to another one (because it's not in XYZTLorentzVector)
Definition: MaterialEffectsSimulator.cc:30
MaterialEffectsSimulator::Z
double Z
Definition: MaterialEffectsSimulator.h:88
MaterialEffectsSimulator::setNormalVector
void setNormalVector(const GlobalVector &normal)
Sets the vector normal to the surface traversed.
Definition: MaterialEffectsSimulator.h:63
MaterialEffectsSimulator::MaterialEffectsSimulator
MaterialEffectsSimulator(double A=28.0855, double Z=14.0000, double density=2.329, double radLen=9.360)
Definition: MaterialEffectsSimulator.cc:9
MaterialEffectsSimulator
Definition: MaterialEffectsSimulator.h:25
ParticlePropagator.h
MaterialEffectsSimulator::radLengths
double radLengths
Definition: MaterialEffectsSimulator.h:84
MaterialEffectsSimulator::excitE
double excitE() const
Mean excitation energy (in GeV)
Definition: MaterialEffectsSimulator.h:46
MaterialEffectsSimulator::closestDaughterId
int closestDaughterId()
The id of the closest charged daughter (filled for nuclear interactions only)
Definition: MaterialEffectsSimulator.h:69
MaterialEffectsSimulator::theA
double theA() const
A.
Definition: MaterialEffectsSimulator.h:38
MaterialEffectsSimulator::density
double density
Definition: MaterialEffectsSimulator.h:89
A
ParticlePropagator
Definition: ParticlePropagator.h:28
MaterialEffectsSimulator::save
virtual void save()
Used by NuclearInteractionSimulator to save last sampled event.
Definition: MaterialEffectsSimulator.h:72
MaterialEffectsSimulator::eMass
double eMass() const
Electron mass in GeV/c2.
Definition: MaterialEffectsSimulator.h:48
MaterialEffectsSimulator::radLen
double radLen
Definition: MaterialEffectsSimulator.h:90
MaterialEffectsSimulator::nDaughters
unsigned nDaughters() const
Returns the number of daughters.
Definition: MaterialEffectsSimulator.h:60
GlobalVector.h
MaterialEffectsSimulator::radiationLength
double radiationLength() const
Returns the fraction of radiation lengths traversed.
Definition: MaterialEffectsSimulator.h:79
Particle
Definition: Particle.py:1
MaterialEffectsSimulator::endDaughters
RHEP_const_iter endDaughters() const
Returns const iterator to the end of the daughters list.
Definition: MaterialEffectsSimulator.h:57
MaterialEffectsSimulator::beginDaughters
RHEP_const_iter beginDaughters() const
Returns const iterator to the beginning of the daughters list.
Definition: MaterialEffectsSimulator.h:54
MaterialEffectsSimulator::A
double A
Definition: MaterialEffectsSimulator.h:87
MaterialEffectsSimulator::radLenIncm
double radLenIncm() const
One radiation length in cm.
Definition: MaterialEffectsSimulator.h:44
RandomEngineAndDistribution
Definition: RandomEngineAndDistribution.h:18