CMS 3D CMS Logo

DreamSD.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_DreamSD_h
2 #define SimG4CMS_DreamSD_h
3 
6 
7 #include "G4PhysicsOrderedFreeVector.hh"
8 
9 #include <map>
10 
11 const int MAXPHOTONS = 500; // Maximum number of photons we can store
12 
13 class G4LogicalVolume;
14 
15 class DreamSD : public CaloSD {
16 public:
17  DreamSD(const std::string &,
18  const edm::EventSetup &,
20  edm::ParameterSet const &,
21  const SimTrackManager *);
22  ~DreamSD() override {}
23 
24  uint32_t setDetUnitId(const G4Step *) override;
25 
26 protected:
27  double getEnergyDeposit(const G4Step *) override;
28  void initRun() override;
29 
30 private:
31  typedef std::pair<double, double> Doubles;
32  typedef std::map<G4LogicalVolume *, Doubles> DimensionMap;
33 
34  void initMap(const std::string &, const edm::EventSetup &);
35  void fillMap(const std::string &, double, double);
36  double curve_LY(const G4Step *, int);
37  double crystalLength(G4LogicalVolume *) const;
38  double crystalWidth(G4LogicalVolume *) const;
39 
41  double cherenkovDeposit_(const G4Step *aStep);
43  double getAverageNumberOfPhotons_(const double charge,
44  const double beta,
45  const G4Material *aMaterial,
46  const G4MaterialPropertyVector *rIndex);
48  double getPhotonEnergyDeposit_(const G4ParticleMomentum &p, const G4ThreeVector &x, const G4Step *aStep);
50  bool setPbWO2MaterialProperties_(G4Material *aMaterial);
51 
52  static constexpr double k_ScaleFromDDDToG4 = 1.0;
53  static constexpr double k_ScaleFromDD4HepToG4 = 10.0;
54 
56  double birk1_, birk2_, birk3_;
57  double slopeLY_;
58  DimensionMap xtalLMap_; // Store length and width
59 
60  int side_;
61 
63  std::unique_ptr<G4PhysicsOrderedFreeVector> chAngleIntegrals_;
64  G4MaterialPropertiesTable *materialPropertiesTable_;
65 
66  int nphotons_;
67 };
68 
69 #endif // DreamSD_h
DreamSD::chAngleIntegrals_
std::unique_ptr< G4PhysicsOrderedFreeVector > chAngleIntegrals_
Table of Cherenkov angle integrals vs photon momentum.
Definition: DreamSD.h:63
DreamSD::readBothSide_
bool readBothSide_
Definition: DreamSD.h:55
SimTrackManager
Definition: SimTrackManager.h:35
DreamSD::Doubles
std::pair< double, double > Doubles
Definition: DreamSD.h:31
MessageLogger.h
DreamSD::DimensionMap
std::map< G4LogicalVolume *, Doubles > DimensionMap
Definition: DreamSD.h:32
DreamSD::fillMap
void fillMap(const std::string &, double, double)
Definition: DreamSD.cc:176
zMuMuMuonUserData.beta
beta
Definition: zMuMuMuonUserData.py:10
DreamSD::k_ScaleFromDDDToG4
static constexpr double k_ScaleFromDDDToG4
Definition: DreamSD.h:52
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
DreamSD::initRun
void initRun() override
Definition: DreamSD.cc:86
DreamSD::cherenkovDeposit_
double cherenkovDeposit_(const G4Step *aStep)
Returns the total energy due to Cherenkov radiation.
Definition: DreamSD.cc:241
DreamSD
Definition: DreamSD.h:15
DreamSD::dd4hep_
bool dd4hep_
Definition: DreamSD.h:55
DreamSD::getPhotonEnergyDeposit_
double getPhotonEnergyDeposit_(const G4ParticleMomentum &p, const G4ThreeVector &x, const G4Step *aStep)
Returns energy deposit for a given photon.
Definition: DreamSD.cc:503
DDAxes::x
DreamSD::crystalWidth
double crystalWidth(G4LogicalVolume *) const
Definition: DreamSD.cc:230
DreamSD::doCherenkov_
bool doCherenkov_
Definition: DreamSD.h:55
DreamSD::materialPropertiesTable_
G4MaterialPropertiesTable * materialPropertiesTable_
Definition: DreamSD.h:64
DreamSD::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: DreamSD.cc:103
DreamSD::initMap
void initMap(const std::string &, const edm::EventSetup &)
Definition: DreamSD.cc:117
DreamSD::useBirk_
bool useBirk_
Definition: DreamSD.h:55
DreamSD::getAverageNumberOfPhotons_
double getAverageNumberOfPhotons_(const double charge, const double beta, const G4Material *aMaterial, const G4MaterialPropertyVector *rIndex)
Returns average number of photons created by track.
Definition: DreamSD.cc:357
DreamSD::xtalLMap_
DimensionMap xtalLMap_
Definition: DreamSD.h:58
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DreamSD::setPbWO2MaterialProperties_
bool setPbWO2MaterialProperties_(G4Material *aMaterial)
Sets material properties at run-time...
Definition: DreamSD.cc:422
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
DreamSD::birk1_
double birk1_
Definition: DreamSD.h:56
edm::ParameterSet
Definition: ParameterSet.h:47
CaloSD.h
DreamSD::~DreamSD
~DreamSD() override
Definition: DreamSD.h:22
edm::EventSetup
Definition: EventSetup.h:57
DreamSD::birk2_
double birk2_
Definition: DreamSD.h:56
DreamSD::k_ScaleFromDD4HepToG4
static constexpr double k_ScaleFromDD4HepToG4
Definition: DreamSD.h:53
MAXPHOTONS
const int MAXPHOTONS
Definition: DreamSD.h:11
DreamSD::crystalLength
double crystalLength(G4LogicalVolume *) const
Definition: DreamSD.cc:221
DreamSD::nphotons_
int nphotons_
Definition: DreamSD.h:66
DreamSD::getEnergyDeposit
double getEnergyDeposit(const G4Step *) override
Definition: DreamSD.cc:66
DreamSD::curve_LY
double curve_LY(const G4Step *, int)
Definition: DreamSD.cc:194
DreamSD::side_
int side_
Definition: DreamSD.h:60
DreamSD::DreamSD
DreamSD(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: DreamSD.cc:37
DreamSD::slopeLY_
double slopeLY_
Definition: DreamSD.h:57
CaloSD
Definition: CaloSD.h:38
DreamSD::birk3_
double birk3_
Definition: DreamSD.h:56