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 #include "G4String.hh"
20 #ifdef plotDebug
21 #include <TH2F.h>
22 #endif
23 #include <string>
24 #include <map>
25 
26 class EcalBaseNumber;
27 class G4LogicalVolume;
29 
30 class ECalSD : public CaloSD {
31 public:
32  ECalSD(const std::string &,
33  const edm::EventSetup &,
35  edm::ParameterSet const &p,
36  const SimTrackManager *);
37  ~ECalSD() override;
38  uint32_t setDetUnitId(const G4Step *) override;
40 
41 protected:
42  double getEnergyDeposit(const G4Step *) override;
43  int getTrackID(const G4Track *) override;
44  uint16_t getDepth(const G4Step *) 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 
55  // initialised before run
61  double slopeLY, scaleRL;
63  std::map<const G4LogicalVolume *, double> xtalLMap;
64  std::vector<const G4LogicalVolume *> useDepth1, useDepth2, noWeight;
68 
69  // run time cache
70  G4ThreeVector currentLocalPoint;
71  double crystalLength;
72  double crystalDepth;
73  uint16_t depth;
74 #ifdef plotDebug
75  TH2F *g2L_[4];
76 #endif
77 };
78 
79 #endif // ECalSD_h
SimTrackManager
Definition: SimTrackManager.h:35
EnergyResolutionVsLumi
Definition: EnergyResolutionVsLumi.h:18
ECalSD::currentLocalPoint
G4ThreeVector currentLocalPoint
Definition: ECalSD.h:70
MessageLogger.h
ECalSD::scaleRL
double scaleRL
Definition: ECalSD.h:61
ECalSD::numberingScheme_
EcalNumberingScheme * numberingScheme_
Definition: ECalSD.h:57
EcalSimulationParameters
Definition: EcalSimulationParameters.h:6
ECalSD::depth2Name
std::string depth2Name
Definition: ECalSD.h:62
ECalSD::storeLayerTimeSim
bool storeLayerTimeSim
Definition: ECalSD.h:58
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ECalSD::crystalMat
std::string crystalMat
Definition: ECalSD.h:62
ECalSD::~ECalSD
~ECalSD() override
Definition: ECalSD.cc:165
ECalSD::getRadiationLength
uint16_t getRadiationLength(const G4StepPoint *hitPoint, const G4LogicalVolume *lv)
Definition: ECalSD.cc:251
ECalSD::useBirkL3
bool useBirkL3
Definition: ECalSD.h:59
EnergyResolutionVsLumi.h
ECalSD::storeTrack
bool storeTrack
Definition: ECalSD.h:58
EcalBaseNumber
Definition: EcalBaseNumber.h:12
ECalSD::birk2
double birk2
Definition: ECalSD.h:60
ECalSD::curve_LY
double curve_LY(const G4LogicalVolume *)
Definition: ECalSD.cc:392
ECalSD::depth
uint16_t depth
Definition: ECalSD.h:73
ECalSD::useDepth2
std::vector< const G4LogicalVolume * > useDepth2
Definition: ECalSD.h:64
EcalNumberingScheme
Definition: EcalNumberingScheme.h:14
ECalSD::noWeight
std::vector< const G4LogicalVolume * > noWeight
Definition: ECalSD.h:64
ECalSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: ECalSD.cc:281
ECalSD::ECalSD
ECalSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, const SimTrackManager *)
Definition: ECalSD.cc:38
ECalSD::ecalSimParameters_
const EcalSimulationParameters * ecalSimParameters_
Definition: ECalSD.h:56
EcalNumberingScheme.h
ECalSD::setNumberingScheme
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:290
ECalSD::ageingWithSlopeLY
bool ageingWithSlopeLY
Definition: ECalSD.h:67
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
ECalSD
Definition: ECalSD.h:30
ECalSD::birk3
double birk3
Definition: ECalSD.h:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ECalSD::getTrackID
int getTrackID(const G4Track *) override
Definition: ECalSD.cc:214
edm::ParameterSet
Definition: ParameterSet.h:36
CaloSD.h
ECalSD::initMap
void initMap()
Definition: ECalSD.cc:299
ECalSD::getBaseNumber
void getBaseNumber(const G4Step *)
Definition: ECalSD.cc:413
ECalSD::depth1Name
std::string depth1Name
Definition: ECalSD.h:62
ECalSD::theBaseNumber
EcalBaseNumber theBaseNumber
Definition: ECalSD.h:65
EcalSimulationParameters.h
edm::EventSetup
Definition: EventSetup.h:57
ECalSD::crystalDepth
double crystalDepth
Definition: ECalSD.h:72
ECalSD::ageing
EnergyResolutionVsLumi ageing
Definition: ECalSD.h:66
ECalSD::getEnergyDeposit
double getEnergyDeposit(const G4Step *) override
Definition: ECalSD.cc:167
ECalSD::useWeight
bool useWeight
Definition: ECalSD.h:58
ECalSD::birkCut
double birkCut
Definition: ECalSD.h:60
DetId.h
ECalSD::getDepth
uint16_t getDepth(const G4Step *) override
Definition: ECalSD.cc:225
ECalSD::crystalLength
double crystalLength
Definition: ECalSD.h:71
ECalSD::useDepth1
std::vector< const G4LogicalVolume * > useDepth1
Definition: ECalSD.h:64
ECalSD::useBirk
bool useBirk
Definition: ECalSD.h:59
ECalSD::birkSlope
double birkSlope
Definition: ECalSD.h:60
ECalSD::storeRL
bool storeRL
Definition: ECalSD.h:58
ECalSD::slopeLY
double slopeLY
Definition: ECalSD.h:61
ECalSD::getBirkL3
double getBirkL3(const G4Step *)
Definition: ECalSD.cc:431
ECalSD::birk1
double birk1
Definition: ECalSD.h:60
ECalSD::getLayerIDForTimeSim
uint16_t getLayerIDForTimeSim()
Definition: ECalSD.cc:276
CaloSD
Definition: CaloSD.h:38
ECalSD::xtalLMap
std::map< const G4LogicalVolume *, double > xtalLMap
Definition: ECalSD.h:63