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