test
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
32 
33  // destructor
34  virtual ~SiLinearChargeDivider();
35 
36  // main method: divide the charge (from the PSimHit) into several energy deposits in the bulk
37  SiChargeDivider::ionization_type divide(const PSimHit*, const LocalVector&, double, const StripGeomDetUnit& det, CLHEP::HepRandomEngine*);
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 
52  // Geant4 engine used by fluctuateEloss()
53  std::unique_ptr<SiG4UniversalFluctuation> fluctuate;
54  // utility: drifts the charge to the surface to estimate the number of relevant strips
55  inline float driftXPos(const Local3DPoint& pos, const LocalVector& drift, double thickness) {
56  return pos.x()+(thickness/2.-pos.z())*drift.x()/drift.z();
57  }
58  // fluctuate the Eloss
59  void fluctuateEloss(double const particleMass, float momentum, float eloss, float length, int NumberOfSegmentation, float elossVector[], CLHEP::HepRandomEngine*);
60  // time response (from the pulse shape)
61  inline float TimeResponse( const PSimHit* hit, const StripGeomDetUnit& det) {
62  return (peakMode ? PeakShape(hit,det) : DeconvolutionShape(hit,det));
63  }
64  // pulse shape in peak mode
65  float PeakShape(const PSimHit*, const StripGeomDetUnit& det);
66  // pulse shape in deconvolution mode
67  float DeconvolutionShape( const PSimHit*, const StripGeomDetUnit& det);
68  // data table for pulse shape in peak mode
69  static float const peakValues[921];
70  // data table for pulse shape in deconvolution mode
71  static float const decoValues[651];
72 
73 };
74 
75 #endif
const ParticleDataTable * theParticleDataTable
HepPDT::ParticleDataTable ParticleDataTable
float PeakShape(const PSimHit *, const StripGeomDetUnit &det)
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
Definition: ShallowTools.cc:38
void setParticleDataTable(const ParticleDataTable *pdt)
float TimeResponse(const PSimHit *hit, const StripGeomDetUnit &det)
SiLinearChargeDivider(const edm::ParameterSet &conf)
float driftXPos(const Local3DPoint &pos, const LocalVector &drift, double thickness)
void fluctuateEloss(double const particleMass, float momentum, float eloss, float length, int NumberOfSegmentation, float elossVector[], CLHEP::HepRandomEngine *)
static float const decoValues[651]
T z() const
Definition: PV3DBase.h:64
float DeconvolutionShape(const PSimHit *, const StripGeomDetUnit &det)
std::vector< EnergyDepositUnit > ionization_type
std::unique_ptr< SiG4UniversalFluctuation > fluctuate
static float const peakValues[921]
SiChargeDivider::ionization_type divide(const PSimHit *, const LocalVector &, double, const StripGeomDetUnit &det, CLHEP::HepRandomEngine *)
T x() const
Definition: PV3DBase.h:62