/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/physics/include/RAT/BNLOpWLS.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/physics/include/RAT/BNLOpWLS.hh Source File
Ratpac-two
BNLOpWLS.hh
1 
13 #ifndef __BNLOpWLS__
14 #define __BNLOpWLS__
15 
16 #include <G4OpticalPhoton.hh>
17 #include <G4PhysicsOrderedFreeVector.hh>
18 #include <G4Step.hh>
19 #include <G4VDiscreteProcess.hh>
20 #include <globals.hh>
21 #include <templates.hh>
22 #include <vector>
23 
24 class G4VWLSTimeGeneratorProfile;
25 class G4PhysicsTable;
26 class BNLOpWLSData;
27 // FIXME
28 // class TBranch;
29 
30 class BNLOpWLS : public G4VDiscreteProcess {
31  public:
32  BNLOpWLS(const G4String &processName = "OpWLS", G4ProcessType type = fOptical);
33  virtual ~BNLOpWLS();
34 
35  private:
36  BNLOpWLS(const BNLOpWLS &right);
37  BNLOpWLS &operator=(const BNLOpWLS &right);
38 
39  public:
40  // Argument is the energy of the exciting photon
41  G4double GetEmEnergy(G4double);
42 
43  // Arguments: File name, Tree name containing Ex/Em data, Branch names for
44  // excitation wavelength and emission intensity. Bins are assumed to be nm.
45  //
46  // Currently, the data are stored in the ExEmData vector, with the exciting
47  // wavelength for event i stored in ExEmData.at(i).at(0).at(0), the emitting
48  // wavelengths stored in ExEmData.at(i).at(1).at(:), and the normalized
49  // stored at ExEmData.at(i).at(2).at(:).
50  // These data are read into memory to speed things up.
51  void SetExEmData(std::string fname);
52 
53  // This is where the QY will be sampled. The argument
54  // is the exciting wavelength energy.
55  G4int SampleQY(G4double);
56 
57  // Returns true -> 'is applicable' only for an optical photon.
58  G4bool IsApplicable(const G4ParticleDefinition &aParticleType);
59 
60  // Build table at a right time
61  void BuildPhysicsTable(const G4ParticleDefinition &aParticleType);
62 
63  // Returns the absorption length for bulk absorption of optical
64  // photons in media with a specified attenuation length.
65  G4double GetMeanFreePath(const G4Track &aTrack, G4double, G4ForceCondition *);
66 
67  // This is the method implementing bulk absorption of optical
68  // photons.
69  G4VParticleChange *PostStepDoIt(const G4Track &aTrack, const G4Step &aStep);
70 
71  // Returns the address of the WLS integral table.
72  G4PhysicsTable *GetIntegralTable() const;
73 
74  // Selects the time profile generator
75  void UseTimeProfile(const G4String name);
76 
77  private:
78  // Is the WLS integral table
79  void BuildThePhysicsTable();
80 
81  // This is essentially a duplicate of BuildThePhysicsTable, but rather than
82  // get the CDF for the "WLSCOMPONENT" variable, it gets it for "QUANTUMYIELD"
83  void BuildTheQYTable();
84 
85  BNLOpWLSData *wlsData;
86 
87  protected:
88  G4VWLSTimeGeneratorProfile *WLSTimeGeneratorProfile;
89  G4PhysicsTable *theIntegralTable;
90  G4PhysicsTable *theQYTable;
91 };
92 
93 // Inline methods
94 
95 inline G4bool BNLOpWLS::IsApplicable(const G4ParticleDefinition &aParticleType) {
96  return (&aParticleType == G4OpticalPhoton::OpticalPhoton());
97 }
98 
99 inline G4PhysicsTable *BNLOpWLS::GetIntegralTable() const { return theIntegralTable; }
100 
101 #endif // __BNLOpWLS__
Definition: BNLOpWLSData.hh:20
Definition: BNLOpWLS.hh:30