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 
20 
21 #ifdef plotDebug
22 #include <TH2F.h>
23 #endif
24 #include <string>
25 #include <map>
26 
27 class EcalBaseNumber;
28 class G4LogicalVolume;
30 
31 class ECalSD : public CaloSD {
32 public:
33  ECalSD(const std::string &,
36  edm::ParameterSet const &p,
37  const SimTrackManager *);
38  ~ECalSD() override;
39  uint32_t setDetUnitId(const G4Step *) override;
41 
42 protected:
43  double getEnergyDeposit(const G4Step *) override;
44  int getTrackID(const G4Track *) override;
45  uint16_t getDepth(const G4Step *) override;
46  double EnergyCorrected(const G4Step &, const G4Track *) override;
47 
48 private:
49  void initMap();
50  uint16_t getRadiationLength(const G4StepPoint *hitPoint, const G4LogicalVolume *lv);
51  uint16_t getLayerIDForTimeSim();
52  double curve_LY(const G4LogicalVolume *);
53 
54  void getBaseNumber(const G4Step *);
55  double getBirkL3(const G4Step *);
56  bool isXtal(const G4LogicalVolume *);
57 
58  // initialised before run
64  double slopeLY, scaleRL;
66  std::map<const G4LogicalVolume *, double> xtalLMap;
67  std::vector<const G4LogicalVolume *> useDepth1, useDepth2, noWeight;
71 
72  // run time cache
73  G4ThreeVector currentLocalPoint;
74  double crystalLength;
75  double crystalDepth;
76  uint16_t depth;
77 #ifdef plotDebug
78  TH2F *g2L_[4];
79 #endif
80 };
81 
82 #endif // ECalSD_h
SimTrackManager
Definition: SimTrackManager.h:35
EnergyResolutionVsLumi
Definition: EnergyResolutionVsLumi.h:18
ECalSD::currentLocalPoint
G4ThreeVector currentLocalPoint
Definition: ECalSD.h:73
MessageLogger.h
ECalSD::scaleRL
double scaleRL
Definition: ECalSD.h:64
ECalSD::numberingScheme_
EcalNumberingScheme * numberingScheme_
Definition: ECalSD.h:60
EcalSimulationParameters
Definition: EcalSimulationParameters.h:6
ECalSD::depth2Name
std::string depth2Name
Definition: ECalSD.h:65
ECalSD::storeLayerTimeSim
bool storeLayerTimeSim
Definition: ECalSD.h:61
ECalSD::crystalMat
std::string crystalMat
Definition: ECalSD.h:65
ECalSD::~ECalSD
~ECalSD() override
Definition: ECalSD.cc:178
ECalSD::getRadiationLength
uint16_t getRadiationLength(const G4StepPoint *hitPoint, const G4LogicalVolume *lv)
Definition: ECalSD.cc:287
ECalSD::useBirkL3
bool useBirkL3
Definition: ECalSD.h:62
EnergyResolutionVsLumi.h
ECalSD::storeTrack
bool storeTrack
Definition: ECalSD.h:61
EcalBaseNumber
Definition: EcalBaseNumber.h:12
ECalSD::isXtal
bool isXtal(const G4LogicalVolume *)
Definition: ECalSD.cc:500
ECalSD::birk2
double birk2
Definition: ECalSD.h:63
ECalSD::curve_LY
double curve_LY(const G4LogicalVolume *)
Definition: ECalSD.cc:429
ECalSD::depth
uint16_t depth
Definition: ECalSD.h:76
ECalSD::useDepth2
std::vector< const G4LogicalVolume * > useDepth2
Definition: ECalSD.h:67
EcalNumberingScheme
Definition: EcalNumberingScheme.h:14
ECalSD::noWeight
std::vector< const G4LogicalVolume * > noWeight
Definition: ECalSD.h:67
ECalSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: ECalSD.cc:318
ECalSD::EnergyCorrected
double EnergyCorrected(const G4Step &, const G4Track *) override
Definition: ECalSD.cc:229
ECalSD::ecalSimParameters_
const EcalSimulationParameters * ecalSimParameters_
Definition: ECalSD.h:59
EcalNumberingScheme.h
ECalSD::setNumberingScheme
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:327
ECalSD::ageingWithSlopeLY
bool ageingWithSlopeLY
Definition: ECalSD.h:70
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
ECalSD
Definition: ECalSD.h:31
ECalSD::birk3
double birk3
Definition: ECalSD.h:63
ECalSD::getTrackID
int getTrackID(const G4Track *) override
Definition: ECalSD.cc:244
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CaloSD.h
ECalSD::initMap
void initMap()
Definition: ECalSD.cc:336
ECalSD::getBaseNumber
void getBaseNumber(const G4Step *)
Definition: ECalSD.cc:455
ECalSD::depth1Name
std::string depth1Name
Definition: ECalSD.h:65
ECalSD::theBaseNumber
EcalBaseNumber theBaseNumber
Definition: ECalSD.h:68
EcalSimulationParameters.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ECalSD::crystalDepth
double crystalDepth
Definition: ECalSD.h:75
ECalSD::ageing
EnergyResolutionVsLumi ageing
Definition: ECalSD.h:69
ECalSD::getEnergyDeposit
double getEnergyDeposit(const G4Step *) override
Definition: ECalSD.cc:180
ECalSD::useWeight
bool useWeight
Definition: ECalSD.h:61
ECalSD::birkCut
double birkCut
Definition: ECalSD.h:63
DetId.h
Frameworkfwd.h
ECalSD::getDepth
uint16_t getDepth(const G4Step *) override
Definition: ECalSD.cc:255
ECalSD::crystalLength
double crystalLength
Definition: ECalSD.h:74
ParameterSetfwd.h
ECalSD::useDepth1
std::vector< const G4LogicalVolume * > useDepth1
Definition: ECalSD.h:67
ECalSD::useBirk
bool useBirk
Definition: ECalSD.h:62
ECalSD::birkSlope
double birkSlope
Definition: ECalSD.h:63
ECalSD::storeRL
bool storeRL
Definition: ECalSD.h:61
ECalSD::slopeLY
double slopeLY
Definition: ECalSD.h:64
ECalSD::getBirkL3
double getBirkL3(const G4Step *)
Definition: ECalSD.cc:474
ECalSD::birk1
double birk1
Definition: ECalSD.h:63
ECalSD::ECalSD
ECalSD(const std::string &, const EcalSimulationParameters *, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, const SimTrackManager *)
Definition: ECalSD.cc:41
ECalSD::getLayerIDForTimeSim
uint16_t getLayerIDForTimeSim()
Definition: ECalSD.cc:313
CaloSD
Definition: CaloSD.h:39
ECalSD::xtalLMap
std::map< const G4LogicalVolume *, double > xtalLMap
Definition: ECalSD.h:66