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