CMS 3D CMS Logo

ECalSD.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_ECalSD_h
2 #define SimG4CMS_ECalSD_h
3 // File: ECalSD.h
5 // Description: Stores hits of Electromagnetic calorimeters in appropriate
6 // container
7 // Use in your sensitive detector builder:
8 // ECalSD* ecalSD = new ECalSD(SDname, new CaloNumberingScheme());
10 //#define plotDebug
11 
18 
19 #ifdef plotDebug
20 #include <TH2F.h>
21 #endif
22 #include <string>
23 #include <map>
24 
25 class EcalBaseNumber;
26 class G4LogicalVolume;
28 
29 class ECalSD : public CaloSD {
30 public:
31  ECalSD(const std::string &,
32  const edm::EventSetup &,
34  edm::ParameterSet const &p,
35  const SimTrackManager *);
36  ~ECalSD() override;
37  uint32_t setDetUnitId(const G4Step *) override;
39 
40 protected:
41  double getEnergyDeposit(const G4Step *) override;
42  int getTrackID(const G4Track *) override;
43  uint16_t getDepth(const G4Step *) override;
44  double EnergyCorrected(const G4Step &, const G4Track *) override;
45 
46 private:
47  void initMap();
48  uint16_t getRadiationLength(const G4StepPoint *hitPoint, const G4LogicalVolume *lv);
49  uint16_t getLayerIDForTimeSim();
50  double curve_LY(const G4LogicalVolume *);
51 
52  void getBaseNumber(const G4Step *);
53  double getBirkL3(const G4Step *);
54  bool isXtal(const G4LogicalVolume *);
55 
56  // initialised before run
62  double slopeLY, scaleRL;
64  std::map<const G4LogicalVolume *, double> xtalLMap;
65  std::vector<const G4LogicalVolume *> useDepth1, useDepth2, noWeight;
69 
70  // run time cache
71  G4ThreeVector currentLocalPoint;
72  double crystalLength;
73  double crystalDepth;
74  uint16_t depth;
75 #ifdef plotDebug
76  TH2F *g2L_[4];
77 #endif
78 };
79 
80 #endif // ECalSD_h
SimTrackManager
Definition: SimTrackManager.h:35
EnergyResolutionVsLumi
Definition: EnergyResolutionVsLumi.h:18
ECalSD::currentLocalPoint
G4ThreeVector currentLocalPoint
Definition: ECalSD.h:71
MessageLogger.h
ECalSD::scaleRL
double scaleRL
Definition: ECalSD.h:62
ECalSD::numberingScheme_
EcalNumberingScheme * numberingScheme_
Definition: ECalSD.h:58
EcalSimulationParameters
Definition: EcalSimulationParameters.h:6
ECalSD::depth2Name
std::string depth2Name
Definition: ECalSD.h:63
ECalSD::storeLayerTimeSim
bool storeLayerTimeSim
Definition: ECalSD.h:59
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ECalSD::crystalMat
std::string crystalMat
Definition: ECalSD.h:63
ECalSD::~ECalSD
~ECalSD() override
Definition: ECalSD.cc:184
ECalSD::getRadiationLength
uint16_t getRadiationLength(const G4StepPoint *hitPoint, const G4LogicalVolume *lv)
Definition: ECalSD.cc:293
ECalSD::useBirkL3
bool useBirkL3
Definition: ECalSD.h:60
EnergyResolutionVsLumi.h
ECalSD::storeTrack
bool storeTrack
Definition: ECalSD.h:59
EcalBaseNumber
Definition: EcalBaseNumber.h:12
ECalSD::isXtal
bool isXtal(const G4LogicalVolume *)
Definition: ECalSD.cc:506
ECalSD::birk2
double birk2
Definition: ECalSD.h:61
ECalSD::curve_LY
double curve_LY(const G4LogicalVolume *)
Definition: ECalSD.cc:435
ECalSD::depth
uint16_t depth
Definition: ECalSD.h:74
ECalSD::useDepth2
std::vector< const G4LogicalVolume * > useDepth2
Definition: ECalSD.h:65
EcalNumberingScheme
Definition: EcalNumberingScheme.h:14
ECalSD::noWeight
std::vector< const G4LogicalVolume * > noWeight
Definition: ECalSD.h:65
ECalSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: ECalSD.cc:324
ECalSD::ECalSD
ECalSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, const SimTrackManager *)
Definition: ECalSD.cc:42
ECalSD::EnergyCorrected
double EnergyCorrected(const G4Step &, const G4Track *) override
Definition: ECalSD.cc:235
ECalSD::ecalSimParameters_
const EcalSimulationParameters * ecalSimParameters_
Definition: ECalSD.h:57
EcalNumberingScheme.h
ECalSD::setNumberingScheme
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:333
ECalSD::ageingWithSlopeLY
bool ageingWithSlopeLY
Definition: ECalSD.h:68
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
ECalSD
Definition: ECalSD.h:29
ECalSD::birk3
double birk3
Definition: ECalSD.h:61
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ECalSD::getTrackID
int getTrackID(const G4Track *) override
Definition: ECalSD.cc:250
edm::ParameterSet
Definition: ParameterSet.h:47
CaloSD.h
ECalSD::initMap
void initMap()
Definition: ECalSD.cc:342
ECalSD::getBaseNumber
void getBaseNumber(const G4Step *)
Definition: ECalSD.cc:461
ECalSD::depth1Name
std::string depth1Name
Definition: ECalSD.h:63
ECalSD::theBaseNumber
EcalBaseNumber theBaseNumber
Definition: ECalSD.h:66
EcalSimulationParameters.h
edm::EventSetup
Definition: EventSetup.h:57
ECalSD::crystalDepth
double crystalDepth
Definition: ECalSD.h:73
ECalSD::ageing
EnergyResolutionVsLumi ageing
Definition: ECalSD.h:67
ECalSD::getEnergyDeposit
double getEnergyDeposit(const G4Step *) override
Definition: ECalSD.cc:186
ECalSD::useWeight
bool useWeight
Definition: ECalSD.h:59
ECalSD::birkCut
double birkCut
Definition: ECalSD.h:61
DetId.h
ECalSD::getDepth
uint16_t getDepth(const G4Step *) override
Definition: ECalSD.cc:261
ECalSD::crystalLength
double crystalLength
Definition: ECalSD.h:72
ECalSD::useDepth1
std::vector< const G4LogicalVolume * > useDepth1
Definition: ECalSD.h:65
ECalSD::useBirk
bool useBirk
Definition: ECalSD.h:60
ECalSD::birkSlope
double birkSlope
Definition: ECalSD.h:61
ECalSD::storeRL
bool storeRL
Definition: ECalSD.h:59
ECalSD::slopeLY
double slopeLY
Definition: ECalSD.h:62
ECalSD::getBirkL3
double getBirkL3(const G4Step *)
Definition: ECalSD.cc:480
ECalSD::birk1
double birk1
Definition: ECalSD.h:61
ECalSD::getLayerIDForTimeSim
uint16_t getLayerIDForTimeSim()
Definition: ECalSD.cc:319
CaloSD
Definition: CaloSD.h:38
ECalSD::xtalLMap
std::map< const G4LogicalVolume *, double > xtalLMap
Definition: ECalSD.h:64