CrpGainService.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: CrpGainService
3 // Plugin Type: service (art v3_02_06)
4 // File: CrpGainService.h
5 //
6 // Generated at Thu Nov 7 16:24:55 2019 by Vyacheslav Galymov using cetskelgen
7 // from cetlib version v3_07_02.
8 //
9 // This services calculates charge amplification factors for charge readout
10 // planes (CRPs) of dual-phase LArTPC
11 // - LEM gain is calculated based on 2D coordinate of the
12 // projected (drifted) charge.
13 // - LEM borders and dead areas can be taken into account
14 //
15 //
16 ////////////////////////////////////////////////////////////////////////
17 
18 #ifndef CrpGainService_h
19 #define CrpGainService_h
20 
21 #include <vector>
22 #include <string>
23 
26 
27 namespace fhicl {
28  class ParameterSet;
29 }
30 
31 namespace art {
32  class ActivityRegistry;
33 }
34 
35 namespace geo {
36  class Geometry;
37 }
38 
39 namespace sim {
40  class SimChannel;
41 }
42 
43 namespace util {
44  class CrpGainService;
45 }
46 
47 class FloatArrayTool;
48 
49 
50 namespace util
51 {
52 
53 //
55 public:
56  using FloatArrayPtr = const FloatArrayTool*;
57 
59  // The compiler-generated destructor is fine for non-base
60  // classes without bare pointers or other resource use.
61 
62  // get charge collected on a view after amplification in CRP
63  double viewCharge( const sim::SimChannel* psc, unsigned itck ) const;
64 
65  // calculate the gain based on position information
66  double crpGain( geo::Point_t const &pos ) const;
67 
68  // default value of the effective gain
69  double crpDefaultGain() const { return m_CrpDefGain; }
70 
71 private:
72  // methods
73  bool checkGeoConfig() const;
74  int getLemId( unsigned crp, int chx, int chy ) const;
75  double getCrpGain( unsigned crp, int chx, int chy ) const;
76  double getLemTransparency( int chx, int chy ) const;
77  double getLemGain( int lemid ) const;
78 
79  void dumpLemEffMap(int nlems) const;
80 
81  //
83 
84  // default value of CRP gain effective gain
85  double m_CrpDefGain;
87 
88  //
89  unsigned int m_CrpNLem;
90  unsigned int m_CrpNLemPerSide;
91 
92  //
93  unsigned int m_LemViewChans;
94  unsigned int m_LemTotChans;
95 
96  // LEM transparency tool
99 
100  // dummy for now ...
101  std::vector<float> m_lemgainmap;
102 
103  // detector geometry
105 };
106 
107 }
109 #endif /* CrpGainService_h */
Namespace for general, non-LArSoft-specific utilities.
Energy deposited on a readout channel by simulated tracks.
Definition: SimChannel.h:140
std::string string
Definition: nybbler.cc:12
unsigned int m_CrpNLemPerSide
art framework interface to geometry description
unsigned int m_LemTotChans
double crpDefaultGain() const
#define DECLARE_ART_SERVICE(svc, scope)
The geometry of one entire detector, as served by art.
Definition: Geometry.h:196
static constexpr double ps
Definition: Units.h:99
unsigned int m_LemViewChans
Code to link reconstructed objects back to the MC truth information.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
const geo::Geometry * m_geo
std::string m_LemEffTool
FloatArrayPtr m_plemeff
LArSoft geometry interface.
Definition: ChannelGeo.h:16
std::vector< float > m_lemgainmap
unsigned int m_CrpNLem