CMS 3D CMS Logo

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