CMS 3D CMS Logo

DreamSD.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_DreamSD_h
2 #define SimG4CMS_DreamSD_h
3 
5 
7 
8 #include "G4String.hh"
9 #include "G4PhysicsOrderedFreeVector.hh"
10 
11 #include <map>
12 
13 const int MAXPHOTONS = 500; // Maximum number of photons we can store
14 
15 class G4LogicalVolume;
16 
17 class TTree;
18 
19 class DreamSD : public CaloSD {
20 
21 public:
22 
24  edm::ParameterSet const &, const SimTrackManager*);
25  ~DreamSD() override {}
26  bool ProcessHits(G4Step * step,G4TouchableHistory * tHistory) override;
27  uint32_t setDetUnitId(const G4Step*) override;
28 
29 protected:
30 
31  G4bool getStepInfo(G4Step* aStep) override;
32  void initRun() override;
33 
34 private:
35 
36  typedef std::pair<double,double> Doubles;
37  typedef std::map<G4LogicalVolume*,Doubles> DimensionMap;
38 
39  void initMap(const std::string&, const DDCompactView &);
40  double curve_LY(const G4Step*, int);
41  const double crystalLength(G4LogicalVolume*) const;
42  const double crystalWidth(G4LogicalVolume*) const;
43 
45  double cherenkovDeposit_(const G4Step* aStep );
47  double getAverageNumberOfPhotons_(const double charge,
48  const double beta,
49  const G4Material* aMaterial,
50  const G4MaterialPropertyVector* rIndex );
52  double getPhotonEnergyDeposit_( const G4ParticleMomentum& p,
53  const G4ThreeVector& x,
54  const G4Step* aStep );
56  bool setPbWO2MaterialProperties_(G4Material* aMaterial );
57 
59  double birk1, birk2, birk3;
60  double slopeLY;
61  DimensionMap xtalLMap; // Store length and width
62 
63  int side;
64 
66  std::unique_ptr<G4PhysicsOrderedFreeVector> chAngleIntegrals_;
67  G4MaterialPropertiesTable* materialPropertiesTable;
68  // Histogramming
69  TTree* ntuple_;
70  int nphotons_;
73 
74 };
75 
76 #endif // DreamSD_h
const double beta
bool readBothSide_
Definition: DreamSD.h:58
double getPhotonEnergyDeposit_(const G4ParticleMomentum &p, const G4ThreeVector &x, const G4Step *aStep)
Returns energy deposit for a given photon.
Definition: DreamSD.cc:561
std::pair< double, double > Doubles
Definition: DreamSD.h:36
Definition: CaloSD.h:42
float y_[MAXPHOTONS]
Definition: DreamSD.h:72
uint32_t setDetUnitId(const G4Step *) override
Definition: DreamSD.cc:187
double birk1
Definition: DreamSD.h:59
bool setPbWO2MaterialProperties_(G4Material *aMaterial)
Sets material properties at run-time...
Definition: DreamSD.cc:499
double birk3
Definition: DreamSD.h:59
void initRun() override
Definition: DreamSD.cc:167
float px_[MAXPHOTONS]
Definition: DreamSD.h:71
type of data representation of DDCompactView
Definition: DDCompactView.h:90
TTree * ntuple_
Definition: DreamSD.h:69
std::map< G4LogicalVolume *, Doubles > DimensionMap
Definition: DreamSD.h:37
float z_[MAXPHOTONS]
Definition: DreamSD.h:72
double cherenkovDeposit_(const G4Step *aStep)
Returns the total energy due to Cherenkov radiation.
Definition: DreamSD.cc:295
int nphotons_
Definition: DreamSD.h:70
float pz_[MAXPHOTONS]
Definition: DreamSD.h:71
int side
Definition: DreamSD.h:63
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:427
~DreamSD() override
Definition: DreamSD.h:25
double birk2
Definition: DreamSD.h:59
const int MAXPHOTONS
Definition: DreamSD.h:13
G4MaterialPropertiesTable * materialPropertiesTable
Definition: DreamSD.h:67
double curve_LY(const G4Step *, int)
Definition: DreamSD.cc:241
const double crystalWidth(G4LogicalVolume *) const
Definition: DreamSD.cc:282
DimensionMap xtalLMap
Definition: DreamSD.h:61
float x_[MAXPHOTONS]
Definition: DreamSD.h:72
std::unique_ptr< G4PhysicsOrderedFreeVector > chAngleIntegrals_
Table of Cherenkov angle integrals vs photon momentum.
Definition: DreamSD.h:66
bool doCherenkov_
Definition: DreamSD.h:58
double slopeLY
Definition: DreamSD.h:60
DreamSD(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: DreamSD.cc:29
float py_[MAXPHOTONS]
Definition: DreamSD.h:71
bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory) override
Definition: DreamSD.cc:79
step
const double crystalLength(G4LogicalVolume *) const
Definition: DreamSD.cc:272
void initMap(const std::string &, const DDCompactView &)
Definition: DreamSD.cc:196
bool useBirk
Definition: DreamSD.h:58
G4bool getStepInfo(G4Step *aStep) override
Definition: DreamSD.cc:101