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 
32 public:
33 
35  edm::ParameterSet const & p, const SimTrackManager*);
36  ~ECalSD() override;
37  double getEnergyDeposit(G4Step*) override;
38  virtual uint16_t getRadiationLength(const G4Step *);
39  virtual uint16_t getLayerIDForTimeSim(const G4Step *);
40  uint32_t setDetUnitId(const G4Step*) override;
42 
43 protected:
44 
45  int getTrackID(const G4Track*) override;
46  uint16_t getDepth(const G4Step*) override;
47 
48 private:
49 
50  void initMap(const G4String&, const DDCompactView &);
51  double curve_LY(const G4Step*);
52  double crystalLength(const G4LogicalVolume*);
53  double crystalDepth(const G4LogicalVolume*, const G4ThreeVector&);
54  void getBaseNumber(const G4Step*);
55  double getBirkL3(const G4Step*);
56  std::vector<double> getDDDArray(const std::string&,
57  const DDsvalues_type&);
58  std::vector<std::string> getStringArray(const std::string&,
59  const DDsvalues_type&);
60 
61  bool isEB;
62  bool isEE;
67  double slopeLY, scaleRL;
69  std::map<const G4LogicalVolume*,double> xtalLMap;
70  std::vector<const G4LogicalVolume*> useDepth1, useDepth2, noWeight;
74 #ifdef plotDebug
75  TH2F *g2L_[4];
76 #endif
77 };
78 
79 #endif // ECalSD_h
bool useBirkL3
Definition: ECalSD.h:65
double curve_LY(const G4Step *)
Definition: ECalSD.cc:485
std::vector< std::string > getStringArray(const std::string &, const DDsvalues_type &)
Definition: ECalSD.cc:597
double birkSlope
Definition: ECalSD.h:66
double slopeLY
Definition: ECalSD.h:67
virtual uint16_t getRadiationLength(const G4Step *)
Definition: ECalSD.cc:289
Definition: CaloSD.h:42
std::vector< const G4LogicalVolume * > noWeight
Definition: ECalSD.h:70
void getBaseNumber(const G4Step *)
Definition: ECalSD.cc:533
double birk1
Definition: ECalSD.h:66
std::vector< const G4LogicalVolume * > useDepth2
Definition: ECalSD.h:70
bool useWeight
Definition: ECalSD.h:64
type of data representation of DDCompactView
Definition: DDCompactView.h:90
bool storeLayerTimeSim
Definition: ECalSD.h:64
bool storeRL
Definition: ECalSD.h:64
~ECalSD() override
Definition: ECalSD.cc:169
double getBirkL3(const G4Step *)
Definition: ECalSD.cc:552
int getTrackID(const G4Track *) override
Definition: ECalSD.cc:246
std::string depth1Name
Definition: ECalSD.h:68
EcalBaseNumber theBaseNumber
Definition: ECalSD.h:71
bool storeTrack
Definition: ECalSD.h:64
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:20
double scaleRL
Definition: ECalSD.h:67
double crystalLength(const G4LogicalVolume *)
Definition: ECalSD.cc:516
std::string depth2Name
Definition: ECalSD.h:68
Definition: ECalSD.h:30
void initMap(const G4String &, const DDCompactView &)
Definition: ECalSD.cc:366
bool ageingWithSlopeLY
Definition: ECalSD.h:73
bool useBirk
Definition: ECalSD.h:65
bool isEE
Definition: ECalSD.h:62
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: ECalSD.cc:578
std::map< const G4LogicalVolume *, double > xtalLMap
Definition: ECalSD.h:69
double getEnergyDeposit(G4Step *) override
Definition: ECalSD.cc:173
bool isEB
Definition: ECalSD.h:61
double crystalDepth(const G4LogicalVolume *, const G4ThreeVector &)
Definition: ECalSD.cc:523
double birk2
Definition: ECalSD.h:66
std::vector< const G4LogicalVolume * > useDepth1
Definition: ECalSD.h:70
ECalSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, const SimTrackManager *)
Definition: ECalSD.cc:41
EcalNumberingScheme * numberingScheme
Definition: ECalSD.h:63
EnergyResolutionVsLumi ageing
Definition: ECalSD.h:72
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:357
uint32_t setDetUnitId(const G4Step *) override
Definition: ECalSD.cc:348
double birkCut
Definition: ECalSD.h:66
std::string crystalMat
Definition: ECalSD.h:68
double birk3
Definition: ECalSD.h:66
uint16_t getDepth(const G4Step *) override
Definition: ECalSD.cc:267
virtual uint16_t getLayerIDForTimeSim(const G4Step *)
Definition: ECalSD.cc:331