Go to the documentation of this file.00001 #ifndef SimG4CMS_ECalSD_h
00002 #define SimG4CMS_ECalSD_h
00003
00004
00005
00006
00007
00008
00010
00011 #include "SimG4CMS/Calo/interface/CaloSD.h"
00012 #include "SimG4CMS/Calo/interface/EnergyResolutionVsLumi.h"
00013 #include "Geometry/EcalCommonData/interface/EcalNumberingScheme.h"
00014 #include "DetectorDescription/Core/interface/DDsvalues.h"
00015 #include "DataFormats/DetId/interface/DetId.h"
00016 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00017
00018 #include "G4String.hh"
00019 #include <string>
00020 #include <map>
00021
00022 class EcalBaseNumber;
00023 class G4LogicalVolume;
00024 class EnergyResolutionVsLumi;
00025
00026 class ECalSD : public CaloSD {
00027
00028 public:
00029
00030 ECalSD(G4String, const DDCompactView &, SensitiveDetectorCatalog &,
00031 edm::ParameterSet const & p, const SimTrackManager*);
00032 virtual ~ECalSD();
00033 virtual double getEnergyDeposit(G4Step*);
00034 virtual uint16_t getRadiationLength(G4Step *);
00035 virtual uint32_t setDetUnitId(G4Step*);
00036 void setNumberingScheme(EcalNumberingScheme*);
00037 virtual int getTrackID(G4Track*);
00038 virtual uint16_t getDepth(G4Step*);
00039
00040 private:
00041
00042 void initMap(G4String, const DDCompactView &);
00043 double curve_LY(G4Step*);
00044 double crystalLength(G4LogicalVolume*);
00045 void getBaseNumber(const G4Step*);
00046 double getBirkL3(G4Step*);
00047 std::vector<double> getDDDArray(const std::string&,
00048 const DDsvalues_type&);
00049 std::vector<std::string> getStringArray(const std::string&,
00050 const DDsvalues_type&);
00051
00052 EcalNumberingScheme * numberingScheme;
00053 bool useWeight, storeTrack, storeRL;
00054 bool useBirk, useBirkL3;
00055 double birk1, birk2, birk3, birkSlope, birkCut;
00056 double slopeLY;
00057 std::string crystalMat, depth1Name, depth2Name;
00058 std::map<G4LogicalVolume*,double> xtalLMap;
00059 std::vector<G4LogicalVolume*> useDepth1, useDepth2, noWeight;
00060 EcalBaseNumber theBaseNumber;
00061 EnergyResolutionVsLumi ageing;
00062 bool ageingWithSlopeLY;
00063 };
00064
00065 #endif // ECalSD_h