CMS 3D CMS Logo

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