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 "Geometry/EcalCommonData/interface/EcalNumberingScheme.h"
00013 #include "DetectorDescription/Core/interface/DDsvalues.h"
00014
00015 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00016
00017 #include "G4String.hh"
00018 #include <string>
00019 #include <map>
00020
00021 class EcalBaseNumber;
00022 class G4LogicalVolume;
00023
00024 class ECalSD : public CaloSD {
00025
00026 public:
00027
00028 ECalSD(G4String, const DDCompactView &, SensitiveDetectorCatalog &,
00029 edm::ParameterSet const &, const SimTrackManager*);
00030 virtual ~ECalSD();
00031 virtual double getEnergyDeposit(G4Step*);
00032 virtual uint16_t getRadiationLength(G4Step *);
00033 virtual uint32_t setDetUnitId(G4Step*);
00034 void setNumberingScheme(EcalNumberingScheme*);
00035 virtual int getTrackID(G4Track*);
00036 virtual uint16_t getDepth(G4Step*);
00037
00038 private:
00039
00040 void initMap(G4String, const DDCompactView &);
00041 double curve_LY(G4Step*);
00042 double crystalLength(G4LogicalVolume*);
00043 void getBaseNumber(const G4Step*);
00044 double getBirkL3(G4Step*);
00045 std::vector<double> getDDDArray(const std::string&,
00046 const DDsvalues_type&);
00047 std::vector<std::string> getStringArray(const std::string&,
00048 const DDsvalues_type&);
00049
00050 EcalNumberingScheme * numberingScheme;
00051 bool useWeight, storeTrack, storeRL;
00052 bool useBirk, useBirkL3;
00053 double birk1, birk2, birk3, birkSlope, birkCut;
00054 double slopeLY;
00055 std::string crystalMat, depth1Name, depth2Name;
00056 std::map<G4LogicalVolume*,double> xtalLMap;
00057 std::vector<G4LogicalVolume*> useDepth1, useDepth2, noWeight;
00058 EcalBaseNumber theBaseNumber;
00059 };
00060
00061 #endif // ECalSD_h