CMS 3D CMS Logo

HDShower.h
Go to the documentation of this file.
1 #ifndef HDShower_H
2 #define HDShower_H
3 
4 //FastSimulation Headers
6 
8 
9 #include <vector>
10 
18 class EcalHitMaker;
19 class HcalHitMaker;
21 
22 class HDShower {
23 public:
25 
26  typedef std::pair<XYZPoint, double> Spot;
27  typedef std::pair<unsigned int, double> Step;
28  typedef std::vector<Step> Steps;
29  typedef Steps::const_iterator step_iterator;
30 
32  HDShowerParametrization* myParam,
33  EcalHitMaker* myGrid,
34  HcalHitMaker* myHcalHitMaker,
35  int onECAL,
36  double epart,
37  double pmip);
38 
39  int getmip() { return mip; }
40 
41  virtual ~HDShower() { ; }
42 
44  bool compute();
45 
46 private:
47  // The longitudinal development ersatzt.
48  double gam(double x, double a) const { return pow(x, a - 1.) * exp(-x); }
49 
50  // Transverse integrated probability function (for 4R max size)
51  // integral of the transverse ansatz f(r) = 2rR/(r**2 + R**2)**2 ->
52  // 1/R - R/(R**2+r**2) | at limits 4R - 0
53  double transProb(double factor, double R, double r) {
54  double fsq = factor * factor;
55  return ((fsq + 1.) / fsq) * r * r / (r * r + R * R);
56  }
57  // Compute longE[i] and transR[i] for all nsteps
58  void makeSteps(int nsteps);
59 
60  int indexFinder(double x, const std::vector<double>& Fhist);
61 
62  // The parametrization
64 
65  // The Calorimeter properties
68 
69  // Basic parameters of the simulation
70  double theR1, theR2, theR3;
72 
73  // The basic quantities for the shower development.
75  double depthStart;
76  double aloge;
77 
78  std::vector<int> detector, nspots;
79  std::vector<double> eStep, rlamStep;
80  std::vector<double> x0curr, x0depth;
81  std::vector<double> lamstep, lamcurr, lamdepth, lamtotal;
82 
83  int infinity; // big number of cycles if exit is on a special condition
84 
85  // The crystal grid
87 
88  // The HCAL
90 
91  // OnECAL flag as an input parameter ...
92  int onEcal;
93 
94  // MIP in ECAL map flag
95  int mip;
96 
97  // Input energy to distribute
98  double e;
99 
100  // HCAL losses option (0-off, 1-on)
102  // Number of longitudinal steps in HCAL
104  // Number of bins in the transverse probability histogram
105  int nTRsteps;
106  // Transverse size tuning factor
107  double transParam;
108  // Transverse normalization : 1 for HB/HE, 0.5 for HF (narrow showers)
109  double transFactor;
110  // HCAL energy spot size
111  double eSpotSize;
112  // Longitudinal step size (lambda units)
113  double depthStep;
114  // Energy threshold (one depth step -> nDepthSteps);
116  // Transverse size cut (in character transverse size units)
117  double maxTRfactor;
118  // Balance between ECAL and HCAL "visible" energy (default = 1.)
119  double balanceEH;
120  // Regulator of HCAL depth of the shower (to adjust/shrink it to CMS depth)
122 
123  // Famos Random Engine
125 
126  //calorimeter depths
128 };
129 
130 #endif
HDShower(const RandomEngineAndDistribution *engine, HDShowerParametrization *myParam, EcalHitMaker *myGrid, HcalHitMaker *myHcalHitMaker, int onECAL, double epart, double pmip)
Definition: HDShower.cc:21
double depthStart
Definition: HDShower.h:75
EcalHitMaker * theGrid
Definition: HDShower.h:86
double balanceEH
Definition: HDShower.h:119
double eSpotSize
Definition: HDShower.h:111
double betEM
Definition: HDShower.h:71
double maxTRfactor
Definition: HDShower.h:117
double criticalEnergy
Definition: HDShower.h:115
const ECALProperties * theECALproperties
Definition: HDShower.h:66
Steps::const_iterator step_iterator
Definition: HDShower.h:29
double depthGAP
Definition: HDShower.h:127
std::vector< double > lamstep
Definition: HDShower.h:81
std::pair< XYZPoint, double > Spot
Definition: HDShower.h:26
int nTRsteps
Definition: HDShower.h:105
double x0EM
Definition: HDShower.h:74
bool compute()
Compute the shower longitudinal and lateral development.
Definition: HDShower.cc:453
double theR3
Definition: HDShower.h:70
std::vector< double > x0curr
Definition: HDShower.h:80
std::pair< unsigned int, double > Step
Definition: HDShower.h:27
double betHD
Definition: HDShower.h:71
double theR1
Definition: HDShower.h:70
double theR2
Definition: HDShower.h:70
std::vector< double > lamdepth
Definition: HDShower.h:81
std::vector< double > lamcurr
Definition: HDShower.h:81
double hcalDepthFactor
Definition: HDShower.h:121
double lambdaHD
Definition: HDShower.h:74
int getmip()
Definition: HDShower.h:39
double gam(double x, double a) const
Definition: HDShower.h:48
int onEcal
Definition: HDShower.h:92
virtual ~HDShower()
Definition: HDShower.h:41
double transProb(double factor, double R, double r)
Definition: HDShower.h:53
double depthECAL
Definition: HDShower.h:127
std::vector< double > x0depth
Definition: HDShower.h:80
HDShowerParametrization * theParam
Definition: HDShower.h:63
int infinity
Definition: HDShower.h:83
int mip
Definition: HDShower.h:95
int nDepthSteps
Definition: HDShower.h:103
double depthGAPx0
Definition: HDShower.h:127
double depthHCAL
Definition: HDShower.h:127
double aloge
Definition: HDShower.h:76
std::vector< Step > Steps
Definition: HDShower.h:28
double tgamHD
Definition: HDShower.h:71
double alpEM
Definition: HDShower.h:71
math::XYZVector XYZPoint
Definition: HDShower.h:24
double transParam
Definition: HDShower.h:107
std::vector< int > nspots
Definition: HDShower.h:78
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
double alpHD
Definition: HDShower.h:71
double depthStep
Definition: HDShower.h:113
HcalHitMaker * theHcalHitMaker
Definition: HDShower.h:89
std::vector< int > detector
Definition: HDShower.h:78
double transFactor
Definition: HDShower.h:109
std::vector< double > lamtotal
Definition: HDShower.h:81
int lossesOpt
Definition: HDShower.h:101
double part
Definition: HDShower.h:71
double e
Definition: HDShower.h:98
const RandomEngineAndDistribution * random
Definition: HDShower.h:124
double a
Definition: hdecay.h:119
double depthToHCAL
Definition: HDShower.h:127
const HCALProperties * theHCALproperties
Definition: HDShower.h:67
std::vector< double > eStep
Definition: HDShower.h:79
int indexFinder(double x, const std::vector< double > &Fhist)
Definition: HDShower.cc:601
double lambdaEM
Definition: HDShower.h:74
std::vector< double > rlamStep
Definition: HDShower.h:79
void makeSteps(int nsteps)
Definition: HDShower.cc:355
double tgamEM
Definition: HDShower.h:71
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
double x0HD
Definition: HDShower.h:74