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