CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/SimTracker/SiStripDigitizer/interface/SiHitDigitizer.h

Go to the documentation of this file.
00001 #ifndef _TRACKER_SiHitDigitizer_H_
00002 #define _TRACKER_SiHitDigitizer_H_
00003  
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005 
00006 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
00007 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00008 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00009 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00010 #include "SimTracker/SiStripDigitizer/interface/SiChargeCollectionDrifter.h"
00011 #include "SimTracker/SiStripDigitizer/interface/SiChargeDivider.h"
00012 #include "SimTracker/SiStripDigitizer/interface/SiInduceChargeOnStrips.h"
00013 #include "SimTracker/SiStripDigitizer/interface/SiPileUpSignals.h"
00014 
00015 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00016 
00017 #include <map>
00018 
00019 namespace CLHEP {
00020   class HepRandomEngine;
00021 }
00022 
00023 class SiStripDetType;
00027 class SiHitDigitizer {
00028  public:
00029 
00030   SiHitDigitizer(const edm::ParameterSet& conf,CLHEP::HepRandomEngine&);
00031 
00032   ~SiHitDigitizer();
00033 
00034   void setChargeDivider(SiChargeDivider* cd) {
00035     if (theSiChargeDivider) delete theSiChargeDivider;
00036     theSiChargeDivider = cd;
00037   }
00038 
00039   void setChargeCollectionDrifter(SiChargeCollectionDrifter* cd) {
00040     if (theSiChargeCollectionDrifter) delete theSiChargeCollectionDrifter;
00041     theSiChargeCollectionDrifter = cd;
00042   }
00043 
00044   void setInduceChargeOnStrips(SiInduceChargeOnStrips* cd) {
00045     if (theSiInduceChargeOnStrips) delete theSiInduceChargeOnStrips;
00046     theSiInduceChargeOnStrips = cd;
00047   }
00048   
00049   void setParticleDataTable(const ParticleDataTable * pdt) { 
00050     theSiChargeDivider->setParticleDataTable(pdt); 
00051   }
00052 
00053   void processHit(const PSimHit*, const StripGeomDetUnit&, GlobalVector,float,
00054                   std::vector<double>&, size_t&, size_t&);
00055   
00056  private:
00057   SiChargeDivider* theSiChargeDivider;
00058   SiChargeCollectionDrifter* theSiChargeCollectionDrifter;
00059   SiInduceChargeOnStrips* theSiInduceChargeOnStrips;
00060   edm::ParameterSet conf_;
00061   CLHEP::HepRandomEngine& rndEngine;
00062   double depletionVoltage;
00063   double appliedVoltage;
00064   double chargeMobility;
00065   double temperature;
00066   bool noDiffusion;
00067   double chargeDistributionRMS;
00068   double gevperelectron;
00069   typedef GloballyPositioned<double> Frame;
00070   
00071   LocalVector DriftDirection(const StripGeomDetUnit* _detp, GlobalVector _bfield, float langle) {
00072     LocalVector Bfield=Frame(_detp->surface().position(),_detp->surface().rotation()).toLocal(_bfield);
00073     return LocalVector(-langle * Bfield.y(),langle * Bfield.x(),1.);
00074   }
00075 
00076 };
00077 
00078 #endif