CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/SimMuon/CSCDigitizer/src/CSCDriftSim.h

Go to the documentation of this file.
00001 #ifndef MU_END_DRIFT_SIM_H
00002 #define MU_END_DRIFT_SIM_H
00003 
00020 #include <vector>
00021 class CSCLayer;
00022 class CSCDetectorHit;
00023 class PSimHit;
00024 class MagneticField;
00025 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00026 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
00027 #include "CLHEP/Random/RandFlat.h"
00028 #include "CLHEP/Random/RandGaussQ.h"
00029 
00030 class CSCDriftSim
00031 {
00032 public:
00033   CSCDriftSim();
00034 
00035   ~CSCDriftSim();
00036 
00040   CSCDetectorHit getWireHit(const Local3DPoint & ionClusterPosition,
00041                               const CSCLayer *, int wire, const PSimHit & simHit);
00042 
00043   void setMagneticField(const MagneticField * field) {theMagneticField = field;}
00044 
00045   void setRandomEngine(CLHEP::HepRandomEngine& engine);
00046 
00047 private:
00048   // helper functions
00049   double avgPathLengthLowB();
00050   double pathSigmaLowB();
00051   double avgDriftTimeLowB();
00052   double driftTimeSigmaLowB();
00053   double avgPathLengthHighB();
00054   double pathSigmaHighB();
00055   double avgDriftTimeHighB();
00056   double driftTimeSigmaHighB();
00057   double avgDrift() const;
00058   double driftSigma() const;
00059   double avalancheCharge();
00060   double gasGain(const CSCDetId & id) const;
00061 
00062   // local magnetic field
00063   float bz;
00064   // distances from wire
00065   double ycell, zcell;
00066   // dN/dE for the avalanche sim.
00067   std::vector<double> dNdEIntegral;
00068   const double STEP_SIZE;
00069 
00070   const double ELECTRON_DIFFUSION_COEFF;
00071 
00072   const MagneticField * theMagneticField;
00073 
00074   CLHEP::RandGaussQ * theRandGaussQ;
00075   CLHEP::RandFlat *   theRandFlat;
00076 };
00077 
00078 #endif