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 
23  DreamSD(G4String, const DDCompactView &, const SensitiveDetectorCatalog &,
24  edm::ParameterSet const &, const SimTrackManager*);
25  virtual ~DreamSD() {}
26  virtual bool ProcessHits(G4Step * step,G4TouchableHistory * tHistory);
27  virtual uint32_t setDetUnitId(G4Step*);
28 
29 protected:
30 
31  virtual G4bool getStepInfo(G4Step* aStep);
32  virtual void initRun();
33 
34 private:
35 
36  typedef std::pair<double,double> Doubles;
37  typedef std::map<G4LogicalVolume*,Doubles> DimensionMap;
38 
39  void initMap(G4String, const DDCompactView &);
40  double curve_LY(G4Step*, int);
41  const double crystalLength(G4LogicalVolume*) const;
42  const double crystalWidth(G4LogicalVolume*) const;
43 
45  double cherenkovDeposit_( G4Step* aStep );
47  double getAverageNumberOfPhotons_(const double charge,
48  const double beta,
49  const G4Material* aMaterial,
50  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::auto_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
virtual G4bool getStepInfo(G4Step *aStep)
Definition: DreamSD.cc:99
double getPhotonEnergyDeposit_(const G4ParticleMomentum &p, const G4ThreeVector &x, const G4Step *aStep)
Returns energy deposit for a given photon.
Definition: DreamSD.cc:560
std::pair< double, double > Doubles
Definition: DreamSD.h:36
Definition: CaloSD.h:42
virtual bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory)
Definition: DreamSD.cc:77
float y_[MAXPHOTONS]
Definition: DreamSD.h:72
double getAverageNumberOfPhotons_(const double charge, const double beta, const G4Material *aMaterial, G4MaterialPropertyVector *rIndex)
Returns average number of photons created by track.
Definition: DreamSD.cc:425
double birk1
Definition: DreamSD.h:59
bool setPbWO2MaterialProperties_(G4Material *aMaterial)
Sets material properties at run-time...
Definition: DreamSD.cc:497
std::auto_ptr< G4PhysicsOrderedFreeVector > chAngleIntegrals_
Table of Cherenkov angle integrals vs photon momentum.
Definition: DreamSD.h:66
double birk3
Definition: DreamSD.h:59
virtual uint32_t setDetUnitId(G4Step *)
Definition: DreamSD.cc:185
float px_[MAXPHOTONS]
Definition: DreamSD.h:71
type of data representation of DDCompactView
Definition: DDCompactView.h:90
DreamSD(G4String, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: DreamSD.cc:29
TTree * ntuple_
Definition: DreamSD.h:69
virtual void initRun()
Definition: DreamSD.cc:165
std::map< G4LogicalVolume *, Doubles > DimensionMap
Definition: DreamSD.h:37
float z_[MAXPHOTONS]
Definition: DreamSD.h:72
int nphotons_
Definition: DreamSD.h:70
float pz_[MAXPHOTONS]
Definition: DreamSD.h:71
int side
Definition: DreamSD.h:63
double birk2
Definition: DreamSD.h:59
const int MAXPHOTONS
Definition: DreamSD.h:13
G4MaterialPropertiesTable * materialPropertiesTable
Definition: DreamSD.h:67
const double crystalWidth(G4LogicalVolume *) const
Definition: DreamSD.cc:280
double cherenkovDeposit_(G4Step *aStep)
Returns the total energy due to Cherenkov radiation.
Definition: DreamSD.cc:293
DimensionMap xtalLMap
Definition: DreamSD.h:61
float x_[MAXPHOTONS]
Definition: DreamSD.h:72
bool doCherenkov_
Definition: DreamSD.h:58
double slopeLY
Definition: DreamSD.h:60
float py_[MAXPHOTONS]
Definition: DreamSD.h:71
virtual ~DreamSD()
Definition: DreamSD.h:25
step
const double crystalLength(G4LogicalVolume *) const
Definition: DreamSD.cc:270
void initMap(G4String, const DDCompactView &)
Definition: DreamSD.cc:194
double curve_LY(G4Step *, int)
Definition: DreamSD.cc:239
bool useBirk
Definition: DreamSD.h:58