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
EMShower::nPart
unsigned int nPart
Definition: EMShower.h:90
EMShower::T
std::vector< double > T
Definition: EMShower.h:97
EMShower::a
std::vector< double > a
Definition: EMShower.h:98
EMShower::Etot
std::vector< double > Etot
Definition: EMShower.h:94
EMShower::theLayer1
const PreshowerLayer1Properties * theLayer1
Definition: EMShower.h:85
EMShower::globalMaximum
double globalMaximum
Definition: EMShower.h:113
EMShower::theGrid
EcalHitMaker * theGrid
Definition: EMShower.h:123
EMShower::photos
std::vector< double > photos
Definition: EMShower.h:96
EMShower::theECAL
const ECALProperties * theECAL
Definition: EMShower.h:83
PreshowerLayer2Properties
Definition: PreshowerLayer2Properties.h:19
CustomPhysics_cfi.gamma
gamma
Definition: CustomPhysics_cfi.py:17
EMShower::XYZPoint
math::XYZVector XYZPoint
Definition: EMShower.h:27
EMShower::aSpot
std::vector< double > aSpot
Definition: EMShower.h:102
EMShower::E
std::vector< double > E
Definition: EMShower.h:95
DDAxes::x
EMShower::thePreshower
PreshowerHitMaker * thePreshower
Definition: EMShower.h:126
EMShower::thePart
std::vector< const RawParticle * > *const thePart
Definition: EMShower.h:89
EMShower::bFixedLength_
bool bFixedLength_
Definition: EMShower.h:144
GammaFunctionGenerator
Definition: GammaFunctionGenerator.h:21
EMShower::totalEnergy
double totalEnergy
Definition: EMShower.h:115
EMShower::setHcal
void setHcal(HcalHitMaker *const myHcal)
set the HCAL address
Definition: EMShower.cc:661
EMShower::nSteps
unsigned nSteps
Definition: EMShower.h:119
EMShower::setIntervals
void setIntervals(unsigned icomp, RadialInterval &rad)
Definition: EMShower.cc:643
EMShower::~EMShower
virtual ~EMShower()
Definition: EMShower.h:43
EMShower::prepareSteps
void prepareSteps()
Computes the steps before the real compute.
Definition: EMShower.cc:121
EMShower::theHCAL
const HCALProperties * theHCAL
Definition: EMShower.h:84
dt
float dt
Definition: AMPTWrapper.h:136
EMShower
Definition: EMShower.h:26
ECALProperties
Definition: ECALProperties.h:15
EMShower::innerDepth
double innerDepth
Definition: EMShower.h:111
EMShower::step_iterator
Steps::const_iterator step_iterator
Definition: EMShower.h:32
EMShower::compute
void compute()
Compute the shower longitudinal and lateral development.
Definition: EMShower.cc:263
EMShower::setGrid
void setGrid(EcalHitMaker *const myGrid)
set the grid address
Definition: EMShower.h:58
EMShower::meanDepth
std::vector< double > meanDepth
Definition: EMShower.h:110
RadialInterval
Definition: RadialInterval.h:12
EMShower::theLayer2
const PreshowerLayer2Properties * theLayer2
Definition: EMShower.h:86
EMShower::gam
double gam(double x, double a) const
Definition: EMShower.cc:597
EMShower::depositedEnergy
std::vector< std::vector< double > > depositedEnergy
Definition: EMShower.h:109
EMShower::random
const RandomEngineAndDistribution * random
Definition: EMShower.h:139
EMECALShowerParametrization.h
PreshowerHitMaker
Definition: PreshowerHitMaker.h:11
EMShower::myIncompleteGamma
Genfun::IncompleteGamma myIncompleteGamma
Definition: EMShower.h:136
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
EMShower::TSpot
std::vector< double > TSpot
Definition: EMShower.h:101
PreshowerLayer1Properties
Definition: PreshowerLayer1Properties.h:19
EMShower::setPreshower
void setPreshower(PreshowerHitMaker *const myPresh)
set the preshower address
Definition: EMShower.cc:654
HcalHitMaker
Definition: HcalHitMaker.h:16
EMShower::bSpot
std::vector< double > bSpot
Definition: EMShower.h:103
EMShower::outerDepth
double outerDepth
Definition: EMShower.h:111
EMShower::theHcalHitMaker
HcalHitMaker * theHcalHitMaker
Definition: EMShower.h:129
EMShower::b
std::vector< double > b
Definition: EMShower.h:99
EMECALShowerParametrization
Definition: EMECALShowerParametrization.h:19
Calorimetry_cff.bFixedLength
bFixedLength
Definition: Calorimetry_cff.py:23
EMShower::Ti
std::vector< double > Ti
Definition: EMShower.h:100
EMShower::EMShower
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
HCALProperties
Definition: HCALProperties.h:21
EMShower::myGammaGenerator
GammaFunctionGenerator * myGammaGenerator
Definition: EMShower.h:142
EMShower::getMaximumOfShower
double getMaximumOfShower() const
get the depth of the centre of gravity of the shower(s)
Definition: EMShower.h:55
EMShower::deposit
double deposit(double t, double a, double b, double dt)
Definition: EMShower.cc:632
RawParticle.h
EcalHitMaker
Definition: EcalHitMaker.h:24
EMShower::stepsCalculated
bool stepsCalculated
Definition: EMShower.h:120
RadialInterval.h
EMShower::hasPreshower
bool hasPreshower
Definition: EMShower.h:132
EMShower::Steps
std::vector< Step > Steps
Definition: EMShower.h:31
EMShower::theNumberOfSpots
std::vector< double > theNumberOfSpots
Definition: EMShower.h:93
EMShower::steps
Steps steps
Definition: EMShower.h:118
EMShower::Spot
std::pair< XYZPoint, double > Spot
Definition: EMShower.h:29
EMShower::maximumOfShower
std::vector< double > maximumOfShower
Definition: EMShower.h:108
Vector3D.h
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
EMShower::theParam
EMECALShowerParametrization *const theParam
Definition: EMShower.h:80
EMShower::Step
std::pair< unsigned int, double > Step
Definition: EMShower.h:30
RandomEngineAndDistribution
Definition: RandomEngineAndDistribution.h:18