CMS 3D CMS Logo

EMShower.h
Go to the documentation of this file.
1 #ifndef EMShower_H
2 #define EMShower_H
3 
5 
6 //Famos Headers
9 #include "CLHEP/GenericFunctions/IncompleteGamma.hh"
11 
12 #include <vector>
13 
19 class EcalHitMaker;
20 class PreshowerHitMaker;
21 class HcalHitMaker;
22 class GammaDistributionGenerator;
25 
26 class EMShower {
28 
29  typedef std::pair<XYZPoint, double> Spot;
30  typedef std::pair<unsigned int, double> Step;
31  typedef std::vector<Step> Steps;
32  typedef Steps::const_iterator step_iterator;
33 
34 public:
37  EMECALShowerParametrization* const myParam,
38  std::vector<const RawParticle*>* const myPart,
39  EcalHitMaker* const myGrid = nullptr,
40  PreshowerHitMaker* const myPreshower = nullptr,
41  bool bFixedLength = false);
42 
43  virtual ~EMShower() { ; }
44 
46  void prepareSteps();
47 
49  void compute();
50 
52  // inline double getMeanDepth() const {return globalMeanDepth;};
53 
55  inline double getMaximumOfShower() const { return globalMaximum; }
56 
58  void setGrid(EcalHitMaker* const myGrid) { theGrid = myGrid; }
59 
61  void setPreshower(PreshowerHitMaker* const myPresh);
62 
64  void setHcal(HcalHitMaker* const myHcal);
65 
66 private:
67  // The longitudinal development ersatzt.
68  double gam(double x, double a) const;
69 
70  // Energy deposited in the layer t-dt-> t, in units of E0 (initial energy)
71  double deposit(double t, double a, double b, double dt);
72 
73  // Energy deposited between 0 and t, in units of E0 (initial energy)
74  double deposit(double a, double b, double t);
75 
76  // Set the intervals for the radial development
77  void setIntervals(unsigned icomp, RadialInterval& rad);
78 
79  // The parametrization
81 
82  // The Calorimeter properties
87 
88  // The incident particle(s)
89  std::vector<const RawParticle*>* const thePart;
90  unsigned int nPart;
91 
92  // The basic quantities for the shower development.
93  std::vector<double> theNumberOfSpots;
94  std::vector<double> Etot;
95  std::vector<double> E;
96  std::vector<double> photos;
97  std::vector<double> T;
98  std::vector<double> a;
99  std::vector<double> b;
100  std::vector<double> Ti;
101  std::vector<double> TSpot;
102  std::vector<double> aSpot;
103  std::vector<double> bSpot;
104 
105  // F.B : Use the maximum of the shower rather the center of gravity
106  // std::vector<double> meanDepth;
107  // double globalMeanDepth;
108  std::vector<double> maximumOfShower;
109  std::vector<std::vector<double> > depositedEnergy;
110  std::vector<double> meanDepth;
112 
114 
115  double totalEnergy;
116 
117  // The steps for the longitudinal development
119  unsigned nSteps;
121 
122  // The crystal grid
124 
125  // The preshower
127 
128  // The HCAL hitmaker
130 
131  // Is there a preshower ?
133  // Histos
134 
135  // Histos* myHistos;
136  Genfun::IncompleteGamma myIncompleteGamma;
137 
138  // Random engine
140 
141  // integer gamma function generator
143 
145 };
146 
147 #endif
float dt
Definition: AMPTWrapper.h:136
std::vector< const RawParticle * > *const thePart
Definition: EMShower.h:89
std::vector< double > theNumberOfSpots
Definition: EMShower.h:93
std::vector< Step > Steps
Definition: EMShower.h:31
void prepareSteps()
Computes the steps before the real compute.
Definition: EMShower.cc:121
std::vector< double > maximumOfShower
Definition: EMShower.h:108
std::vector< double > aSpot
Definition: EMShower.h:102
std::pair< XYZPoint, double > Spot
Definition: EMShower.h:29
EMShower(RandomEngineAndDistribution const *engine, GammaFunctionGenerator *gamma, EMECALShowerParametrization *const myParam, std::vector< const RawParticle *> *const myPart, EcalHitMaker *const myGrid=nullptr, PreshowerHitMaker *const myPreshower=nullptr, bool bFixedLength=false)
Definition: EMShower.cc:16
double deposit(double t, double a, double b, double dt)
Definition: EMShower.cc:634
const RandomEngineAndDistribution * random
Definition: EMShower.h:139
const HCALProperties * theHCAL
Definition: EMShower.h:84
void setPreshower(PreshowerHitMaker *const myPresh)
set the preshower address
Definition: EMShower.cc:656
Steps::const_iterator step_iterator
Definition: EMShower.h:32
const ECALProperties * theECAL
Definition: EMShower.h:83
void setIntervals(unsigned icomp, RadialInterval &rad)
Definition: EMShower.cc:645
void compute()
Compute the shower longitudinal and lateral development.
Definition: EMShower.cc:263
std::vector< double > Etot
Definition: EMShower.h:94
bool stepsCalculated
Definition: EMShower.h:120
PreshowerHitMaker * thePreshower
Definition: EMShower.h:126
std::vector< std::vector< double > > depositedEnergy
Definition: EMShower.h:109
Steps steps
Definition: EMShower.h:118
double innerDepth
Definition: EMShower.h:111
HcalHitMaker * theHcalHitMaker
Definition: EMShower.h:129
unsigned int nPart
Definition: EMShower.h:90
double gam(double x, double a) const
Definition: EMShower.cc:599
std::vector< double > meanDepth
Definition: EMShower.h:110
bool bFixedLength_
Definition: EMShower.h:144
std::vector< double > photos
Definition: EMShower.h:96
bool hasPreshower
Definition: EMShower.h:132
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
std::vector< double > T
Definition: EMShower.h:97
double globalMaximum
Definition: EMShower.h:113
const PreshowerLayer2Properties * theLayer2
Definition: EMShower.h:86
const PreshowerLayer1Properties * theLayer1
Definition: EMShower.h:85
std::vector< double > a
Definition: EMShower.h:98
double outerDepth
Definition: EMShower.h:111
double getMaximumOfShower() const
get the depth of the centre of gravity of the shower(s)
Definition: EMShower.h:55
EMECALShowerParametrization *const theParam
Definition: EMShower.h:80
EcalHitMaker * theGrid
Definition: EMShower.h:123
GammaFunctionGenerator * myGammaGenerator
Definition: EMShower.h:142
virtual ~EMShower()
Definition: EMShower.h:43
std::vector< double > Ti
Definition: EMShower.h:100
std::vector< double > TSpot
Definition: EMShower.h:101
unsigned nSteps
Definition: EMShower.h:119
Genfun::IncompleteGamma myIncompleteGamma
Definition: EMShower.h:136
std::vector< double > b
Definition: EMShower.h:99
double totalEnergy
Definition: EMShower.h:115
std::vector< double > E
Definition: EMShower.h:95
math::XYZVector XYZPoint
Definition: EMShower.h:27
std::pair< unsigned int, double > Step
Definition: EMShower.h:30
void setHcal(HcalHitMaker *const myHcal)
set the HCAL address
Definition: EMShower.cc:663
void setGrid(EcalHitMaker *const myGrid)
set the grid address
Definition: EMShower.h:58
std::vector< double > bSpot
Definition: EMShower.h:103