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 
34  ECalSD(G4String, const DDCompactView &, const SensitiveDetectorCatalog &,
35  edm::ParameterSet const & p, const SimTrackManager*);
36  ~ECalSD() override;
37  double getEnergyDeposit(G4Step*) override;
38  virtual uint16_t getRadiationLength(G4Step *);
39  virtual uint16_t getLayerIDForTimeSim(G4Step *);
40  uint32_t setDetUnitId(G4Step*) override;
42  int getTrackID(G4Track*) override;
43  uint16_t getDepth(G4Step*) override;
44 
45 private:
46  void initMap(G4String, const DDCompactView &);
47  double curve_LY(G4Step*);
48  double crystalLength(G4LogicalVolume*);
49  double crystalDepth(G4LogicalVolume*, const G4ThreeVector&);
50  void getBaseNumber(const G4Step*);
51  double getBirkL3(G4Step*);
52  std::vector<double> getDDDArray(const std::string&,
53  const DDsvalues_type&);
54  std::vector<std::string> getStringArray(const std::string&,
55  const DDsvalues_type&);
56  bool isEB;
57  bool isEE;
62  double slopeLY, scaleRL;
64  std::map<G4LogicalVolume*,double> xtalLMap;
65  std::vector<G4LogicalVolume*> useDepth1, useDepth2, noWeight;
69 #ifdef plotDebug
70  TH2F *g2L_[4];
71 #endif
72 };
73 
74 #endif // ECalSD_h
bool useBirkL3
Definition: ECalSD.h:60
std::vector< std::string > getStringArray(const std::string &, const DDsvalues_type &)
Definition: ECalSD.cc:599
double birkSlope
Definition: ECalSD.h:61
double slopeLY
Definition: ECalSD.h:62
std::vector< G4LogicalVolume * > useDepth1
Definition: ECalSD.h:65
Definition: CaloSD.h:42
void getBaseNumber(const G4Step *)
Definition: ECalSD.cc:534
double birk1
Definition: ECalSD.h:61
uint16_t getDepth(G4Step *) override
Definition: ECalSD.cc:267
bool useWeight
Definition: ECalSD.h:59
type of data representation of DDCompactView
Definition: DDCompactView.h:90
bool storeLayerTimeSim
Definition: ECalSD.h:59
std::vector< G4LogicalVolume * > noWeight
Definition: ECalSD.h:65
bool storeRL
Definition: ECalSD.h:59
std::vector< G4LogicalVolume * > useDepth2
Definition: ECalSD.h:65
~ECalSD() override
Definition: ECalSD.cc:169
std::string depth1Name
Definition: ECalSD.h:63
EcalBaseNumber theBaseNumber
Definition: ECalSD.h:66
bool storeTrack
Definition: ECalSD.h:59
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:62
double crystalLength(G4LogicalVolume *)
Definition: ECalSD.cc:517
virtual uint16_t getLayerIDForTimeSim(G4Step *)
Definition: ECalSD.cc:330
void initMap(G4String, const DDCompactView &)
Definition: ECalSD.cc:366
double curve_LY(G4Step *)
Definition: ECalSD.cc:485
std::string depth2Name
Definition: ECalSD.h:63
Definition: ECalSD.h:30
bool ageingWithSlopeLY
Definition: ECalSD.h:68
bool useBirk
Definition: ECalSD.h:60
bool isEE
Definition: ECalSD.h:57
int getTrackID(G4Track *) override
Definition: ECalSD.cc:246
double crystalDepth(G4LogicalVolume *, const G4ThreeVector &)
Definition: ECalSD.cc:524
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
Definition: ECalSD.cc:580
virtual uint16_t getRadiationLength(G4Step *)
Definition: ECalSD.cc:288
uint32_t setDetUnitId(G4Step *) override
Definition: ECalSD.cc:347
double getBirkL3(G4Step *)
Definition: ECalSD.cc:554
double getEnergyDeposit(G4Step *) override
Definition: ECalSD.cc:173
ECalSD(G4String, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &p, const SimTrackManager *)
Definition: ECalSD.cc:41
bool isEB
Definition: ECalSD.h:56
double birk2
Definition: ECalSD.h:61
EcalNumberingScheme * numberingScheme
Definition: ECalSD.h:58
EnergyResolutionVsLumi ageing
Definition: ECalSD.h:67
std::map< G4LogicalVolume *, double > xtalLMap
Definition: ECalSD.h:64
void setNumberingScheme(EcalNumberingScheme *)
Definition: ECalSD.cc:356
double birkCut
Definition: ECalSD.h:61
std::string crystalMat
Definition: ECalSD.h:63
double birk3
Definition: ECalSD.h:61