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