OpParamAction.h
Go to the documentation of this file.
1 // OpParamAction.h - Ben Jones, MIT 2013
2 //
3 // This header file defines various optically parameterized volume actions.
4 //
5 // These objects are attached to OpParamSD objects in the OpDetReadoutGeometry class.
6 // When a photon steps into a volume with such a sensitive detector object attached,
7 // the GetAttenuationFraction method of one of the classes in this file
8 // is called to provide a survival probability for this photon based on its
9 // position and momentum
10 //
11 // In this way, generically opaque surfaces with different position and
12 // directionally dependent attenuation coefficients can be easily implemented
13 // into LArSoft and attached to physical volumes in the detector geometry
14 // by adding new implementations of the OpParamAction class.
15 //
16 // Two simple examples are provided:
17 //
18 // - SimpleWireplaneAction represents the angular tranission coefficient of
19 // a single wireplane in 3D
20 //
21 // - OverlaidWireplaneAction represents the angular transmission coefficient
22 // of multiple overlaid wireplanes in 3D. This is the implementation used
23 // to model the optical transmission of wireplanes in MicroBooNE.
24 //
25 
26 #ifndef OPPARAMACTION_H
27 #define OPPARAMACTION_H
28 
29 #include "TVector3.h"
30 #include "Geant4/G4ThreeVector.hh"
31 
32 #include <vector>
33 
34 namespace larg4
35 {
36 
37 
38 
39  //---------------------------------------------------
40  // Abstract base class
41  //---------------------------------------------------
42 
44  {
45  public:
46  OpParamAction();
47  virtual ~OpParamAction();
48  virtual double GetAttenuationFraction(G4ThreeVector PhotonDirection, G4ThreeVector PhotonPosition);
49 
50  private:
51 
52  };
53 
54 
55  //---------------------------------------------------
56  // TransparentPlaneAction class
57  //---------------------------------------------------
58 
60  {
61  public:
64  double GetAttenuationFraction(G4ThreeVector /*PhotonDirection*/, G4ThreeVector /*PhotonPosition*/) {return 1;}
65 
66  private:
67 
68  };
69 
70 
71  //---------------------------------------------------
72  // SimpleWireplaneAction class
73  //---------------------------------------------------
74 
76  {
77  public:
78  SimpleWireplaneAction(TVector3 WireDirection, TVector3 PlaneNormal, double WirePitch, double WireDiameter) ;
79  SimpleWireplaneAction(std::vector<std::vector<double> >, int);
81 
82  double GetAttenuationFraction(G4ThreeVector PhotonDirection, G4ThreeVector PhotonPosition);
83 
84  private:
85  G4ThreeVector fWireDirection;
86  G4ThreeVector fPlaneNormal;
87  double fDPRatio;
88  };
89 
90 
91  //---------------------------------------------------
92  // OverlaidWireplanesAction class
93  //---------------------------------------------------
94 
96  {
97  public:
98  OverlaidWireplanesAction(std::vector<std::vector<double> >, int);
100 
101  double GetAttenuationFraction(G4ThreeVector PhotonDirection, G4ThreeVector PhotonPosition);
102 
103  private:
104 
105  G4ThreeVector fPlaneNormal;
106  std::vector<G4ThreeVector> fWireDirections;
107  std::vector<double> fDPRatios;
108  };
109 
110 
111 }
112 
113 #endif
struct vector vector
Geant4 interface.
std::vector< double > fDPRatios
std::vector< G4ThreeVector > fWireDirections
virtual double GetAttenuationFraction(G4ThreeVector PhotonDirection, G4ThreeVector PhotonPosition)
double GetAttenuationFraction(G4ThreeVector, G4ThreeVector)
Definition: OpParamAction.h:64