CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FastSimulation/MaterialEffects/interface/MaterialEffectsSimulator.h

Go to the documentation of this file.
00001 #ifndef MATERIALEFFECTSSIMULATOR_H
00002 #define MATERIALEFFECTSSIMULATOR_H
00003 
00004 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00005 
00006 #include "FastSimulation/ParticlePropagator/interface/ParticlePropagator.h"
00007 
00008 #include <vector>
00009 
00023 class MaterialEffectsSimulator
00024 {
00025  public:
00026 
00027   typedef std::vector<RawParticle>::const_iterator RHEP_const_iter;
00028 
00029   // Constructor : default values are for Silicon
00030   MaterialEffectsSimulator(const RandomEngine* engine,
00031                            double A = 28.0855,
00032                            double Z = 14.0000,
00033                            double density = 2.329,
00034                            double radLen = 9.360);
00035 
00036   virtual ~MaterialEffectsSimulator();
00037 
00040 
00042   inline double theA() const { return A; }
00044   inline double theZ() const { return Z; }
00046   inline double rho() const { return density; }
00048   inline double radLenIncm() const { return radLen; }
00050   inline double excitE() const { return 12.5E-9*theZ(); }
00052   inline double eMass() const { return 0.000510998902; }
00053 
00054 
00056   void updateState(ParticlePropagator& myTrack, double radlen);
00057   
00059   inline RHEP_const_iter beginDaughters() const {return _theUpdatedState.begin();}
00060 
00062   inline RHEP_const_iter endDaughters() const {return _theUpdatedState.end();}
00063 
00065   inline unsigned nDaughters() const {return _theUpdatedState.size();}
00066 
00068   inline void setNormalVector(const GlobalVector& normal) { theNormalVector = normal; }
00069   
00071   XYZVector orthogonal(const XYZVector&) const; 
00072 
00074   inline int closestDaughterId() { return theClosestChargedDaughterId; } 
00075 
00076  private:
00077 
00079   virtual void compute(ParticlePropagator& Particle ) = 0;
00080 
00082   inline double radiationLength() const {return radLengths;}
00083 
00084 
00085  protected:
00086 
00087   std::vector<RawParticle> _theUpdatedState;
00088 
00089   double radLengths;
00090 
00091   // Material properties
00092   double A;
00093   double Z;
00094   double density;
00095   double radLen;
00096 
00097   GlobalVector theNormalVector;
00098 
00099   const RandomEngine* random;
00100 
00101   int theClosestChargedDaughterId;
00102 
00103 };
00104 
00105 #endif