CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiLinearChargeDivider.h
Go to the documentation of this file.
1 #ifndef Tracker_SiLinearChargeDivider_H
2 #define Tracker_SiLinearChargeDivider_H
3 
4 #include <memory>
5 
7 
8 #include "SiChargeDivider.h"
13 
15 
16 namespace CLHEP{
17  class HepRandomEngine;
18 }
19 
28  public:
29 
30  // constructor
31  SiLinearChargeDivider(const edm::ParameterSet& conf, CLHEP::HepRandomEngine&);
32 
33  // destructor
34  virtual ~SiLinearChargeDivider();
35 
36  // main method: divide the charge (from the PSimHit) into several energy deposits in the bulk
38 
39  // set the ParticleDataTable (used to fluctuate the charge properly)
41 
42  private:
43  // configuration data
44  const bool peakMode;
45  const bool fluctuateCharge;
47  const double deltaCut ;
48  const double cosmicShift;
49 
51  // random generator
52  CLHEP::HepRandomEngine& rndEngine;
53  // Geant4 engine used by fluctuateEloss()
54  std::unique_ptr<SiG4UniversalFluctuation> fluctuate;
55  // utility: drifts the charge to the surface to estimate the number of relevant strips
56  inline float driftXPos(const Local3DPoint& pos, const LocalVector& drift, double thickness) {
57  return pos.x()+(thickness/2.-pos.z())*drift.x()/drift.z();
58  }
59  // fluctuate the Eloss
60  void fluctuateEloss(double const particleMass, float momentum, float eloss, float length, int NumberOfSegmentation, float elossVector[]);
61  // time response (from the pulse shape)
62  inline float TimeResponse( const PSimHit* hit, const StripGeomDetUnit& det) {
63  return (peakMode ? PeakShape(hit,det) : DeconvolutionShape(hit,det));
64  }
65  // pulse shape in peak mode
66  float PeakShape(const PSimHit*, const StripGeomDetUnit& det);
67  // pulse shape in deconvolution mode
68  float DeconvolutionShape( const PSimHit*, const StripGeomDetUnit& det);
69  // data table for pulse shape in peak mode
70  static float const peakValues[921];
71  // data table for pulse shape in deconvolution mode
72  static float const decoValues[651];
73 
74 };
75 
76 #endif
const ParticleDataTable * theParticleDataTable
HepPDT::ParticleDataTable ParticleDataTable
CLHEP::HepRandomEngine & rndEngine
float PeakShape(const PSimHit *, const StripGeomDetUnit &det)
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
Definition: ShallowTools.cc:39
void setParticleDataTable(const ParticleDataTable *pdt)
float TimeResponse(const PSimHit *hit, const StripGeomDetUnit &det)
float driftXPos(const Local3DPoint &pos, const LocalVector &drift, double thickness)
SiChargeDivider::ionization_type divide(const PSimHit *, const LocalVector &, double, const StripGeomDetUnit &det)
static float const decoValues[651]
void fluctuateEloss(double const particleMass, float momentum, float eloss, float length, int NumberOfSegmentation, float elossVector[])
SiLinearChargeDivider(const edm::ParameterSet &conf, CLHEP::HepRandomEngine &)
T z() const
Definition: PV3DBase.h:64
float DeconvolutionShape(const PSimHit *, const StripGeomDetUnit &det)
std::vector< EnergyDepositUnit > ionization_type
tuple conf
Definition: dbtoconf.py:185
std::unique_ptr< SiG4UniversalFluctuation > fluctuate
static float const peakValues[921]
T x() const
Definition: PV3DBase.h:62