CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &, 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  const double getAverageNumberOfPhotons_(const double charge,
48  const double beta,
49  const G4Material* aMaterial,
50  const G4MaterialPropertyVector* rIndex ) const;
52  const double getPhotonEnergyDeposit_( const G4ParticleMomentum& p, const G4ThreeVector& x,
53  const G4Step* aStep );
55  bool setPbWO2MaterialProperties_( G4Material* aMaterial );
56 
58  double birk1, birk2, birk3;
59  double slopeLY;
60  DimensionMap xtalLMap; // Store length and width
61 
62  int side;
63 
65  std::auto_ptr<G4PhysicsOrderedFreeVector> chAngleIntegrals_;
66  G4MaterialPropertiesTable* materialPropertiesTable;
67  // Histogramming
68  TTree* ntuple_;
69  int nphotons_;
72 
73 };
74 
75 #endif // DreamSD_h
const double beta
bool readBothSide_
Definition: DreamSD.h:57
virtual G4bool getStepInfo(G4Step *aStep)
Definition: DreamSD.cc:96
std::pair< double, double > Doubles
Definition: DreamSD.h:36
Definition: CaloSD.h:42
list step
Definition: launcher.py:15
virtual bool ProcessHits(G4Step *step, G4TouchableHistory *tHistory)
Definition: DreamSD.cc:74
float y_[MAXPHOTONS]
Definition: DreamSD.h:71
double birk1
Definition: DreamSD.h:58
bool setPbWO2MaterialProperties_(G4Material *aMaterial)
Sets material properties at run-time...
Definition: DreamSD.cc:494
std::auto_ptr< G4PhysicsOrderedFreeVector > chAngleIntegrals_
Table of Cherenkov angle integrals vs photon momentum.
Definition: DreamSD.h:65
double birk3
Definition: DreamSD.h:58
virtual uint32_t setDetUnitId(G4Step *)
Definition: DreamSD.cc:182
float px_[MAXPHOTONS]
Definition: DreamSD.h:70
type of data representation of DDCompactView
Definition: DDCompactView.h:81
TTree * ntuple_
Definition: DreamSD.h:68
double charge(const std::vector< uint8_t > &Ampls)
virtual void initRun()
Definition: DreamSD.cc:162
std::map< G4LogicalVolume *, Doubles > DimensionMap
Definition: DreamSD.h:37
const double getAverageNumberOfPhotons_(const double charge, const double beta, const G4Material *aMaterial, const G4MaterialPropertyVector *rIndex) const
Returns average number of photons created by track.
Definition: DreamSD.cc:422
float z_[MAXPHOTONS]
Definition: DreamSD.h:71
int nphotons_
Definition: DreamSD.h:69
float pz_[MAXPHOTONS]
Definition: DreamSD.h:70
int side
Definition: DreamSD.h:62
DreamSD(G4String, const DDCompactView &, SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: DreamSD.cc:26
double birk2
Definition: DreamSD.h:58
const int MAXPHOTONS
Definition: DreamSD.h:13
G4MaterialPropertiesTable * materialPropertiesTable
Definition: DreamSD.h:66
const double getPhotonEnergyDeposit_(const G4ParticleMomentum &p, const G4ThreeVector &x, const G4Step *aStep)
Returns energy deposit for a given photon.
Definition: DreamSD.cc:557
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:60
float x_[MAXPHOTONS]
Definition: DreamSD.h:71
bool doCherenkov_
Definition: DreamSD.h:57
double slopeLY
Definition: DreamSD.h:59
float py_[MAXPHOTONS]
Definition: DreamSD.h:70
virtual ~DreamSD()
Definition: DreamSD.h:25
Definition: DDAxes.h:10
const double crystalLength(G4LogicalVolume *) const
Definition: DreamSD.cc:270
void initMap(G4String, const DDCompactView &)
Definition: DreamSD.cc:191
double curve_LY(G4Step *, int)
Definition: DreamSD.cc:239
bool useBirk
Definition: DreamSD.h:57