CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MaterialEffectsSimulator.h
Go to the documentation of this file.
1 #ifndef MATERIALEFFECTSSIMULATOR_H
2 #define MATERIALEFFECTSSIMULATOR_H
3 
5 
7 
8 #include <vector>
9 
24 {
25  public:
26 
27  typedef std::vector<RawParticle>::const_iterator RHEP_const_iter;
28 
29  // Constructor : default values are for Silicon
31  double A = 28.0855,
32  double Z = 14.0000,
33  double density = 2.329,
34  double radLen = 9.360);
35 
36  virtual ~MaterialEffectsSimulator();
37 
40 
42  inline double theA() const { return A; }
44  inline double theZ() const { return Z; }
46  inline double rho() const { return density; }
48  inline double radLenIncm() const { return radLen; }
50  inline double excitE() const { return 12.5E-9*theZ(); }
52  inline double eMass() const { return 0.000510998902; }
53 
54 
56  void updateState(ParticlePropagator& myTrack, double radlen);
57 
59  inline RHEP_const_iter beginDaughters() const {return _theUpdatedState.begin();}
60 
62  inline RHEP_const_iter endDaughters() const {return _theUpdatedState.end();}
63 
65  inline unsigned nDaughters() const {return _theUpdatedState.size();}
66 
68  inline void setNormalVector(const GlobalVector& normal) { theNormalVector = normal; }
69 
71  XYZVector orthogonal(const XYZVector&) const;
72 
75 
76  private:
77 
79  virtual void compute(ParticlePropagator& Particle ) = 0;
80 
82  inline double radiationLength() const {return radLengths;}
83 
84 
85  protected:
86 
87  std::vector<RawParticle> _theUpdatedState;
88 
89  double radLengths;
90 
91  // Material properties
92  double A;
93  double Z;
94  double density;
95  double radLen;
96 
98 
100 
102 
103 };
104 
105 #endif
RHEP_const_iter beginDaughters() const
Returns const iterator to the beginning of the daughters list.
unsigned nDaughters() const
Returns the number of daughters.
int closestDaughterId()
The id of the closest charged daughter (filled for nuclear interactions only)
void setNormalVector(const GlobalVector &normal)
Sets the vector normal to the surface traversed.
virtual void compute(ParticlePropagator &Particle)=0
Overloaded in all material effects updtators.
XYZVector orthogonal(const XYZVector &) const
A vector orthogonal to another one (because it&#39;s not in XYZTLorentzVector)
double rho() const
Density in g/cm3.
double radiationLength() const
Returns the fraction of radiation lengths traversed.
math::XYZVector XYZVector
std::vector< RawParticle >::const_iterator RHEP_const_iter
RHEP_const_iter endDaughters() const
Returns const iterator to the end of the daughters list.
double eMass() const
Electron mass in GeV/c2.
void updateState(ParticlePropagator &myTrack, double radlen)
Compute the material effect (calls the sub class)
double excitE() const
Mean excitation energy (in GeV)
MaterialEffectsSimulator(const RandomEngine *engine, double A=28.0855, double Z=14.0000, double density=2.329, double radLen=9.360)
std::vector< RawParticle > _theUpdatedState
double radLenIncm() const
One radiation length in cm.