File indexing completed on 2024-04-06 12:11:19
0001 #ifndef HFShower_H
0002 #define HFShower_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 HFShower {
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 HFShower(const RandomEngineAndDistribution* engine,
0032 HDShowerParametrization* myParam,
0033 EcalHitMaker* myGrid,
0034 HcalHitMaker* myHcalHitMaker,
0035 int onECAL,
0036 double epart);
0037
0038 virtual ~HFShower() { ; }
0039
0040
0041 bool compute();
0042
0043 private:
0044
0045 double gam(double x, double a) const { return pow(x, a - 1.) * exp(-x); }
0046
0047
0048
0049
0050 double transProb(double factor, double R, double r) {
0051 double fsq = factor * factor;
0052 return ((fsq + 1.) / fsq) * r * r / (r * r + R * R);
0053 }
0054
0055 void makeSteps(int nsteps);
0056
0057 int indexFinder(double x, const std::vector<double>& Fhist);
0058
0059
0060 HDShowerParametrization* theParam;
0061
0062
0063 const ECALProperties* theECALproperties;
0064 const HCALProperties* theHCALproperties;
0065
0066
0067 double theR1, theR2, theR3;
0068 double alpEM, betEM, alpHD, betHD, part, tgamEM, tgamHD;
0069
0070
0071 double lambdaEM, lambdaHD, x0EM, x0HD;
0072 double depthStart;
0073 double aloge;
0074
0075 std::vector<int> detector, nspots;
0076 std::vector<double> eStep, rlamStep;
0077 std::vector<double> x0curr, x0depth;
0078 std::vector<double> lamstep, lamcurr, lamdepth, lamtotal;
0079
0080 int infinity;
0081
0082
0083 EcalHitMaker* theGrid;
0084
0085
0086 HcalHitMaker* theHcalHitMaker;
0087
0088
0089 int onEcal;
0090
0091
0092 double e;
0093
0094
0095 int lossesOpt;
0096
0097 int nDepthSteps;
0098
0099 int nTRsteps;
0100
0101 double transParam;
0102
0103 double transFactor;
0104
0105 double eSpotSize;
0106
0107 double depthStep;
0108
0109 double criticalEnergy;
0110
0111 double maxTRfactor;
0112
0113 double balanceEH;
0114
0115 double hcalDepthFactor;
0116
0117
0118 const RandomEngineAndDistribution* random;
0119 };
0120
0121 #endif