CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/SimTracker/SiStripDigitizer/interface/SiLinearChargeDivider.h

Go to the documentation of this file.
00001 #ifndef Tracker_SiLinearChargeDivider_H
00002 #define Tracker_SiLinearChargeDivider_H
00003 
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005 
00006 #include "SimTracker/SiStripDigitizer/interface/SiChargeDivider.h"
00007 #include "SimTracker/Common/interface/SiG4UniversalFluctuation.h"
00008 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00009 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
00010 #include "Geometry/CommonTopologies/interface/StripTopology.h"
00011 
00012 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00013 
00014 namespace CLHEP{
00015   class HepRandomEngine;
00016 }
00017 
00025 class SiLinearChargeDivider : public SiChargeDivider{
00026  public:
00027 
00028   // constructor
00029   SiLinearChargeDivider(const edm::ParameterSet& conf, CLHEP::HepRandomEngine&);
00030 
00031   // destructor
00032   virtual ~SiLinearChargeDivider();
00033 
00034   // main method: divide the charge (from the PSimHit) into several energy deposits in the bulk
00035   SiChargeDivider::ionization_type divide(const PSimHit*, const LocalVector&, double, const StripGeomDetUnit& det);
00036 
00037   // set the ParticleDataTable (used to fluctuate the charge properly)
00038   void setParticleDataTable(const ParticleDataTable * pdt) { theParticleDataTable = pdt; }
00039   
00040  private:
00041   // configuration
00042   edm::ParameterSet conf_;
00043   // configuration data
00044   bool   peakMode;
00045   bool   fluctuateCharge;
00046   int    chargedivisionsPerStrip;
00047   double deltaCut ;
00048   double cosmicShift;
00049   const ParticleDataTable * theParticleDataTable;
00050   // Geant4 engine used by fluctuateEloss()
00051   SiG4UniversalFluctuation* fluctuate; 
00052   // random generator
00053   CLHEP::HepRandomEngine& rndEngine;
00054   // utility: drifts the charge to the surface to estimate the number of relevant strips
00055   inline float driftXPos(const Local3DPoint& pos, const LocalVector& drift, double thickness) { 
00056     return pos.x()+(thickness/2.-pos.z())*drift.x()/drift.z();
00057   }
00058   // fluctuate the Eloss
00059   void fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegmentation, float elossVector[]);
00060   // time response (from the pulse shape)
00061   inline float TimeResponse( const PSimHit* hit, const StripGeomDetUnit& det) {
00062     return (peakMode ? PeakShape(hit,det) : DeconvolutionShape(hit,det));
00063   } 
00064   // pulse shape in peak mode
00065   float PeakShape(const PSimHit*, const StripGeomDetUnit& det);
00066   // pulse shape in deconvolution mode
00067   float DeconvolutionShape( const PSimHit*, const StripGeomDetUnit& det);
00068   // data table for pulse shape in peak mode
00069   static float peakValues[921];
00070   // data table for pulse shape in deconvolution mode
00071   static float decoValues[651];
00072 
00073 };
00074 
00075 #endif