File indexing completed on 2025-05-23 23:48:32
0001 #ifndef HDShower_H
0002 #define HDShower_H
0003
0004
0005 #include "FastSimulation/ShowerDevelopment/interface/HDShowerParametrization.h"
0006
0007 #include "DataFormats/Math/interface/Vector3D.h"
0008
0009 #include <vector>
0010
0011
0012
0013
0014
0015
0016
0017
0018 class EcalHitMaker;
0019 class HcalHitMaker;
0020 class RandomEngineAndDistribution;
0021
0022 class HDShower {
0023 public:
0024 typedef math::XYZVector XYZPoint;
0025
0026 typedef std::pair<XYZPoint, double> Spot;
0027 typedef std::pair<unsigned int, double> Step;
0028 typedef std::vector<Step> Steps;
0029 typedef Steps::const_iterator step_iterator;
0030
0031 HDShower(const RandomEngineAndDistribution* engine,
0032 HDShowerParametrization* myParam,
0033 EcalHitMaker* myGrid,
0034 HcalHitMaker* myHcalHitMaker,
0035 int onECAL,
0036 double epart,
0037 double pmip);
0038
0039 int getmip() { return mip; }
0040
0041 virtual ~HDShower() { ; }
0042
0043
0044 bool compute();
0045
0046 private:
0047
0048
0049 void init(const RandomEngineAndDistribution* engine,
0050 HDShowerParametrization* myParam,
0051 EcalHitMaker* myGrid,
0052 HcalHitMaker* myHcalHitMaker,
0053 int onECAL,
0054 double epart,
0055 double pmip);
0056
0057 double gam(double x, double a) const { return pow(x, a - 1.) * exp(-x); }
0058
0059
0060
0061
0062 double transProb(double factor, double R, double r) {
0063 double fsq = factor * factor;
0064 return ((fsq + 1.) / fsq) * r * r / (r * r + R * R);
0065 }
0066
0067 void makeSteps(int nsteps);
0068
0069 int indexFinder(double x, const std::vector<double>& Fhist);
0070
0071
0072 HDShowerParametrization* theParam;
0073
0074
0075 const ECALProperties* theECALproperties;
0076 const HCALProperties* theHCALproperties;
0077
0078
0079 double theR1, theR2, theR3;
0080 double alpEM, betEM, alpHD, betHD, part, tgamEM, tgamHD;
0081
0082
0083 double lambdaEM, lambdaHD, x0EM, x0HD;
0084 double depthStart;
0085 double aloge;
0086
0087 std::vector<int> detector, nspots;
0088 std::vector<double> eStep, rlamStep;
0089 std::vector<double> x0curr, x0depth;
0090 std::vector<double> lamstep, lamcurr, lamdepth, lamtotal;
0091
0092 int infinity;
0093
0094
0095 EcalHitMaker* theGrid;
0096
0097
0098 HcalHitMaker* theHcalHitMaker;
0099
0100
0101 int onEcal;
0102
0103
0104 int mip;
0105
0106
0107 double e;
0108
0109
0110 int lossesOpt;
0111
0112 int nDepthSteps;
0113
0114 int nTRsteps;
0115
0116 double transParam;
0117
0118 double transFactor;
0119
0120 double eSpotSize;
0121
0122 double depthStep;
0123
0124 double criticalEnergy;
0125
0126 double maxTRfactor;
0127
0128 double balanceEH;
0129
0130 double hcalDepthFactor;
0131
0132
0133 const RandomEngineAndDistribution* random;
0134
0135
0136 double depthECAL, depthGAP, depthGAPx0, depthHCAL, depthToHCAL;
0137 };
0138
0139 #endif