CMS 3D CMS Logo

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