File indexing completed on 2024-04-06 12:11:19
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 double gam(double x, double a) const { return pow(x, a - 1.) * exp(-x); }
0049
0050
0051
0052
0053 double transProb(double factor, double R, double r) {
0054 double fsq = factor * factor;
0055 return ((fsq + 1.) / fsq) * r * r / (r * r + R * R);
0056 }
0057
0058 void makeSteps(int nsteps);
0059
0060 int indexFinder(double x, const std::vector<double>& Fhist);
0061
0062
0063 HDShowerParametrization* theParam;
0064
0065
0066 const ECALProperties* theECALproperties;
0067 const HCALProperties* theHCALproperties;
0068
0069
0070 double theR1, theR2, theR3;
0071 double alpEM, betEM, alpHD, betHD, part, tgamEM, tgamHD;
0072
0073
0074 double lambdaEM, lambdaHD, x0EM, x0HD;
0075 double depthStart;
0076 double aloge;
0077
0078 std::vector<int> detector, nspots;
0079 std::vector<double> eStep, rlamStep;
0080 std::vector<double> x0curr, x0depth;
0081 std::vector<double> lamstep, lamcurr, lamdepth, lamtotal;
0082
0083 int infinity;
0084
0085
0086 EcalHitMaker* theGrid;
0087
0088
0089 HcalHitMaker* theHcalHitMaker;
0090
0091
0092 int onEcal;
0093
0094
0095 int mip;
0096
0097
0098 double e;
0099
0100
0101 int lossesOpt;
0102
0103 int nDepthSteps;
0104
0105 int nTRsteps;
0106
0107 double transParam;
0108
0109 double transFactor;
0110
0111 double eSpotSize;
0112
0113 double depthStep;
0114
0115 double criticalEnergy;
0116
0117 double maxTRfactor;
0118
0119 double balanceEH;
0120
0121 double hcalDepthFactor;
0122
0123
0124 const RandomEngineAndDistribution* random;
0125
0126
0127 double depthECAL, depthGAP, depthGAPx0, depthHCAL, depthToHCAL;
0128 };
0129
0130 #endif