Go to the documentation of this file.00001 #ifndef HDShower_H
00002 #define HDShower_H
00003
00004
00005 #include "FastSimulation/ShowerDevelopment/interface/HDShowerParametrization.h"
00006
00007 #include "DataFormats/Math/interface/Vector3D.h"
00008
00009 #include <vector>
00010
00018 class EcalHitMaker;
00019 class HcalHitMaker;
00020 class RandomEngine;
00021 class DQMStore;
00022
00023 class HDShower
00024 {
00025
00026 public:
00027
00028 typedef math::XYZVector XYZPoint;
00029
00030 typedef std::pair<XYZPoint,double> Spot;
00031 typedef std::pair<unsigned int, double> Step;
00032 typedef std::vector<Step> Steps;
00033 typedef Steps::const_iterator step_iterator;
00034
00035 HDShower(const RandomEngine* engine,
00036 HDShowerParametrization* myParam,
00037 EcalHitMaker* myGrid,
00038 HcalHitMaker* myHcalHitMaker,
00039 int onECAL,
00040 double epart,
00041 DQMStore * const dbeIn);
00042
00043 int getmip() {return mip;}
00044
00045 virtual ~HDShower() {;}
00046
00048 bool compute();
00049
00050 private:
00051
00052
00053 double gam(double x, double a) const { return pow(x,a-1.)*exp(-x); }
00054
00055
00056
00057
00058 double transProb(double factor, double R, double r) {
00059 double fsq = factor * factor;
00060 return ((fsq + 1.)/fsq) * r * r / (r*r + R*R) ;
00061 }
00062
00063 void makeSteps(int nsteps);
00064
00065 int indexFinder(double x, const std::vector<double> & Fhist);
00066
00067
00068 HDShowerParametrization* theParam;
00069
00070
00071 const ECALProperties* theECALproperties;
00072 const HCALProperties* theHCALproperties;
00073
00074
00075 double theR1, theR2, theR3;
00076 double alpEM, betEM, alpHD, betHD, part, tgamEM, tgamHD;
00077
00078
00079 double lambdaEM, lambdaHD, x0EM, x0HD;
00080 double depthStart;
00081 double aloge;
00082
00083 std::vector<int> detector, nspots;
00084 std::vector<double> eStep, rlamStep;
00085 std::vector<double> x0curr, x0depth;
00086 std::vector<double> lamstep, lamcurr, lamdepth, lamtotal;
00087
00088 int infinity;
00089
00090
00091 EcalHitMaker * theGrid;
00092
00093
00094 HcalHitMaker * theHcalHitMaker;
00095
00096
00097 int onEcal;
00098
00099
00100 int mip;
00101
00102
00103 double e;
00104
00105
00106 int lossesOpt;
00107
00108 int nDepthSteps;
00109
00110 int nTRsteps;
00111
00112 double transParam;
00113
00114 double transFactor;
00115
00116 double eSpotSize;
00117
00118 double depthStep;
00119
00120 double criticalEnergy;
00121
00122 double maxTRfactor;
00123
00124 double balanceEH;
00125
00126 double hcalDepthFactor;
00127
00128
00129 const RandomEngine* random;
00130
00131
00132 DQMStore * dbe;
00133
00134
00135 double depthECAL, depthGAP, depthGAPx0, depthHCAL, depthToHCAL;
00136 };
00137
00138 #endif