CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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;
23 class RandomEngine;
25 
26 class EMShower
27 {
28 
30 
31  typedef std::pair<XYZPoint,double> Spot;
32  typedef std::pair<unsigned int, double> Step;
33  typedef std::vector<Step> Steps;
34  typedef Steps::const_iterator step_iterator;
35 
36  public:
37 
38  EMShower(const RandomEngine* engine,
40  EMECALShowerParametrization* const myParam,
41  std::vector<const RawParticle*>* const myPart,
42  EcalHitMaker * const myGrid=NULL,
43  PreshowerHitMaker * const myPreshower=NULL);
44 
45  virtual ~EMShower(){;}
46 
48  void prepareSteps();
49 
51  void compute();
52 
54  // inline double getMeanDepth() const {return globalMeanDepth;};
55 
57  inline double getMaximumOfShower() const {return globalMaximum;}
58 
60  void setGrid(EcalHitMaker * const myGrid) { theGrid=myGrid;}
61 
63  void setPreshower(PreshowerHitMaker * const myPresh ) ;
64 
66  void setHcal(HcalHitMaker * const myHcal);
67 
68  private:
69 
70  // The longitudinal development ersatzt.
71  double gam(double x, double a) const;
72 
73  // Energy deposited in the layer t-dt-> t, in units of E0 (initial energy)
74  double deposit(double t, double a, double b, double dt);
75 
76  // Energy deposited between 0 and t, in units of E0 (initial energy)
77  double deposit(double a, double b, double t);
78 
79  // Set the intervals for the radial development
80  void setIntervals(unsigned icomp,RadialInterval& rad);
81 
82  // The parametrization
84 
85  // The Calorimeter properties
90 
91  // The incident particle(s)
92  std::vector<const RawParticle*>* const thePart;
93  unsigned int nPart;
94 
95  // The basic quantities for the shower development.
96  std::vector<double> theNumberOfSpots;
97  std::vector<double> Etot;
98  std::vector<double> E;
99  std::vector<double> photos;
100  std::vector<double> T;
101  std::vector<double> a;
102  std::vector<double> b;
103  std::vector<double> Ti;
104  std::vector<double> TSpot;
105  std::vector<double> aSpot;
106  std::vector<double> bSpot;
107 
108  // F.B : Use the maximum of the shower rather the center of gravity
109  // std::vector<double> meanDepth;
110  // double globalMeanDepth;
111  std::vector<double> maximumOfShower;
112  std::vector<std::vector<double> >depositedEnergy;
113  std::vector<double> meanDepth;
115 
117 
118  double totalEnergy;
119 
120  // The steps for the longitudinal development
122  unsigned nSteps;
124 
125  // The crystal grid
127 
128  // The preshower
130 
131  // The HCAL hitmaker
133 
134  // Is there a preshower ?
136  // Histos
137  // Histos* myHistos;
138 
139  Genfun::IncompleteGamma myIncompleteGamma;
140 
141  // Random engine
143 
144  // integer gamma function generator
146 
147 
148 
149 };
150 
151 #endif
float dt
Definition: AMPTWrapper.h:126
std::vector< const RawParticle * > *const thePart
Definition: EMShower.h:92
std::vector< double > theNumberOfSpots
Definition: EMShower.h:96
EMShower(const RandomEngine *engine, GammaFunctionGenerator *gamma, EMECALShowerParametrization *const myParam, std::vector< const RawParticle * > *const myPart, EcalHitMaker *const myGrid=NULL, PreshowerHitMaker *const myPreshower=NULL)
Definition: EMShower.cc:17
std::vector< Step > Steps
Definition: EMShower.h:33
void prepareSteps()
Computes the steps before the real compute.
Definition: EMShower.cc:123
std::vector< double > maximumOfShower
Definition: EMShower.h:111
std::vector< double > aSpot
Definition: EMShower.h:105
double deposit(double t, double a, double b, double dt)
Definition: EMShower.cc:607
double gam(double x, double a) const
Definition: EMShower.cc:571
const HCALProperties * theHCAL
Definition: EMShower.h:87
void setPreshower(PreshowerHitMaker *const myPresh)
set the preshower address
Definition: EMShower.cc:632
Steps::const_iterator step_iterator
Definition: EMShower.h:34
#define NULL
Definition: scimark2.h:8
const ECALProperties * theECAL
Definition: EMShower.h:86
void setIntervals(unsigned icomp, RadialInterval &rad)
Definition: EMShower.cc:619
void compute()
Compute the shower longitudinal and lateral development.
Definition: EMShower.cc:244
std::vector< double > Etot
Definition: EMShower.h:97
bool stepsCalculated
Definition: EMShower.h:123
PreshowerHitMaker * thePreshower
Definition: EMShower.h:129
std::vector< std::vector< double > > depositedEnergy
Definition: EMShower.h:112
Steps steps
Definition: EMShower.h:121
double innerDepth
Definition: EMShower.h:114
std::pair< XYZPoint, double > Spot
Definition: EMShower.h:31
HcalHitMaker * theHcalHitMaker
Definition: EMShower.h:132
unsigned int nPart
Definition: EMShower.h:93
std::vector< double > meanDepth
Definition: EMShower.h:113
std::vector< double > photos
Definition: EMShower.h:99
bool hasPreshower
Definition: EMShower.h:135
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
std::vector< double > T
Definition: EMShower.h:100
double globalMaximum
Definition: EMShower.h:116
const PreshowerLayer2Properties * theLayer2
Definition: EMShower.h:89
const PreshowerLayer1Properties * theLayer1
Definition: EMShower.h:88
std::vector< double > a
Definition: EMShower.h:101
double outerDepth
Definition: EMShower.h:114
EMECALShowerParametrization *const theParam
Definition: EMShower.h:83
EcalHitMaker * theGrid
Definition: EMShower.h:126
GammaFunctionGenerator * myGammaGenerator
Definition: EMShower.h:145
virtual ~EMShower()
Definition: EMShower.h:45
std::vector< double > Ti
Definition: EMShower.h:103
std::vector< double > TSpot
Definition: EMShower.h:104
Definition: DDAxes.h:10
unsigned nSteps
Definition: EMShower.h:122
Genfun::IncompleteGamma myIncompleteGamma
Definition: EMShower.h:139
std::vector< double > b
Definition: EMShower.h:102
double totalEnergy
Definition: EMShower.h:118
std::vector< double > E
Definition: EMShower.h:98
const RandomEngine * random
Definition: EMShower.h:142
math::XYZVector XYZPoint
Definition: EMShower.h:29
std::pair< unsigned int, double > Step
Definition: EMShower.h:32
void setHcal(HcalHitMaker *const myHcal)
set the HCAL address
Definition: EMShower.cc:642
void setGrid(EcalHitMaker *const myGrid)
set the grid address
Definition: EMShower.h:60
std::vector< double > bSpot
Definition: EMShower.h:106
double getMaximumOfShower() const
get the depth of the centre of gravity of the shower(s)
Definition: EMShower.h:57