Go to the documentation of this file.00001 #ifndef EMShower_H
00002 #define EMShower_H
00003
00004 #include "FastSimulation/Particle/interface/RawParticle.h"
00005
00006
00007 #include "FastSimulation/ShowerDevelopment/interface/EMECALShowerParametrization.h"
00008 #include "FastSimulation/ShowerDevelopment/interface/RadialInterval.h"
00009 #include "CLHEP/GenericFunctions/IncompleteGamma.hh"
00010 #include "DataFormats/Math/interface/Vector3D.h"
00011
00012 #include <vector>
00013
00019 class EcalHitMaker;
00020 class PreshowerHitMaker;
00021 class HcalHitMaker;
00022 class GammaDistributionGenerator;
00023 class RandomEngine;
00024 class GammaFunctionGenerator;
00025
00026 class DQMStore;
00027
00028 class EMShower
00029 {
00030
00031 typedef math::XYZVector XYZPoint;
00032
00033 typedef std::pair<XYZPoint,double> Spot;
00034 typedef std::pair<unsigned int, double> Step;
00035 typedef std::vector<Step> Steps;
00036 typedef Steps::const_iterator step_iterator;
00037
00038 public:
00039
00040 EMShower(const RandomEngine* engine,
00041 GammaFunctionGenerator* gamma,
00042 EMECALShowerParametrization* const myParam,
00043 std::vector<const RawParticle*>* const myPart,
00044 DQMStore * const dbeIn = NULL,
00045 EcalHitMaker * const myGrid=NULL,
00046 PreshowerHitMaker * const myPreshower=NULL,
00047 bool bFixedLength = false);
00048
00049 virtual ~EMShower(){;}
00050
00052 void prepareSteps();
00053
00055 void compute();
00056
00058
00059
00061 inline double getMaximumOfShower() const {return globalMaximum;}
00062
00064 void setGrid(EcalHitMaker * const myGrid) { theGrid=myGrid;}
00065
00067 void setPreshower(PreshowerHitMaker * const myPresh ) ;
00068
00070 void setHcal(HcalHitMaker * const myHcal);
00071
00072 private:
00073
00074
00075 double gam(double x, double a) const;
00076
00077
00078 double deposit(double t, double a, double b, double dt);
00079
00080
00081 double deposit(double a, double b, double t);
00082
00083
00084 void setIntervals(unsigned icomp,RadialInterval& rad);
00085
00086
00087 EMECALShowerParametrization* const theParam;
00088
00089
00090 const ECALProperties* theECAL;
00091 const HCALProperties* theHCAL;
00092 const PreshowerLayer1Properties* theLayer1;
00093 const PreshowerLayer2Properties* theLayer2;
00094
00095
00096 std::vector<const RawParticle*>* const thePart;
00097 unsigned int nPart;
00098
00099
00100 std::vector<double> theNumberOfSpots;
00101 std::vector<double> Etot;
00102 std::vector<double> E;
00103 std::vector<double> photos;
00104 std::vector<double> T;
00105 std::vector<double> a;
00106 std::vector<double> b;
00107 std::vector<double> Ti;
00108 std::vector<double> TSpot;
00109 std::vector<double> aSpot;
00110 std::vector<double> bSpot;
00111
00112
00113
00114
00115 std::vector<double> maximumOfShower;
00116 std::vector<std::vector<double> >depositedEnergy;
00117 std::vector<double> meanDepth;
00118 double innerDepth, outerDepth;
00119
00120 double globalMaximum;
00121
00122 double totalEnergy;
00123
00124
00125 Steps steps;
00126 unsigned nSteps;
00127 bool stepsCalculated;
00128
00129
00130 EcalHitMaker * theGrid;
00131
00132
00133 PreshowerHitMaker * thePreshower;
00134
00135
00136 HcalHitMaker * theHcalHitMaker;
00137
00138
00139 bool hasPreshower;
00140
00141
00142
00143 DQMStore * dbe;
00144
00145 Genfun::IncompleteGamma myIncompleteGamma;
00146
00147
00148 const RandomEngine* random;
00149
00150
00151 GammaFunctionGenerator * myGammaGenerator;
00152
00153 bool bFixedLength_;
00154
00155 };
00156
00157 #endif