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