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