LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
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 #include "TVector3.h"
27 #include "Geant4/G4ThreeVector.hh"
29 
30 
31 
32 #ifndef OPPARAMACTION_H
33 #define OPPARAMACTION_H
34 
35 namespace larg4
36 {
37 
38 
39 
40  //---------------------------------------------------
41  // Abstract base class
42  //---------------------------------------------------
43 
45  {
46  public:
47  OpParamAction();
48  virtual ~OpParamAction();
49  virtual double GetAttenuationFraction(G4ThreeVector PhotonDirection, G4ThreeVector PhotonPosition);
50 
51  private:
52 
53  };
54 
55 
56  //---------------------------------------------------
57  // TransparentPlaneAction class
58  //---------------------------------------------------
59 
61  {
62  public:
65  double GetAttenuationFraction(G4ThreeVector /*PhotonDirection*/, G4ThreeVector /*PhotonPosition*/) {return 1;}
66 
67  private:
68 
69  };
70 
71 
72  //---------------------------------------------------
73  // SimpleWireplaneAction class
74  //---------------------------------------------------
75 
77  {
78  public:
79  SimpleWireplaneAction(TVector3 WireDirection, TVector3 PlaneNormal, double WirePitch, double WireDiameter) ;
80  SimpleWireplaneAction(std::vector<std::vector<double> >, int);
82 
83  double GetAttenuationFraction(G4ThreeVector PhotonDirection, G4ThreeVector PhotonPosition);
84 
85  private:
86  G4ThreeVector fWireDirection;
87  G4ThreeVector fPlaneNormal;
88  double fDPRatio;
89  };
90 
91 
92  //---------------------------------------------------
93  // OverlaidWireplanesAction class
94  //---------------------------------------------------
95 
97  {
98  public:
99  OverlaidWireplanesAction(std::vector<std::vector<double> >, int);
101 
102  double GetAttenuationFraction(G4ThreeVector PhotonDirection, G4ThreeVector PhotonPosition);
103 
104  private:
105 
106  G4ThreeVector fPlaneNormal;
107  std::vector<G4ThreeVector> fWireDirections;
108  std::vector<double> fDPRatios;
109  };
110 
111 
112 }
113 
114 #endif
Geant4 interface.
std::vector< double > fDPRatios
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
std::vector< G4ThreeVector > fWireDirections
virtual double GetAttenuationFraction(G4ThreeVector PhotonDirection, G4ThreeVector PhotonPosition)
double GetAttenuationFraction(G4ThreeVector, G4ThreeVector)
Definition: OpParamAction.h:65