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

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/geo/include/RAT/PMTInfoParser.hh Source File
Ratpac-two
PMTInfoParser.hh
1 #ifndef __RAT_PMTInfoParser__
2 #define __RAT_PMTInfoParser__
3 
4 #include <G4RotationMatrix.hh>
5 #include <RAT/DB.hh>
6 #include <RAT/PMTConstruction.hh>
7 #include <vector>
8 
9 namespace RAT {
10 
11 // Helper class which reads the attributes stored in a PMTINFO
13  public:
14  PMTInfoParser(DBLinkPtr table, const std::string &mother_name);
15  ~PMTInfoParser(){};
16 
17  // Returns total number of PMTs described by the PMTINFO table
18  int GetPMTCount() const { return fPos.size(); };
19 
20  // Returns a vector of PMT positions in the global coordinate system
21  const std::vector<G4ThreeVector> &GetPMTLocations() const { return fPos; };
22 
23  // Returns the offset between local and global coordinates
24  // e.g. local = global - offset
25  G4ThreeVector GetLocalOffset() { return fLocalOffset; }
26  static G4ThreeVector ComputeLocalOffset(const std::string &);
27 
28  // Returns the direction vector of the front face of the PMTs
29  const std::vector<G4ThreeVector> &GetPMTDirections() const { return fDir; };
30 
31  // Returns the rotation matrix required to orient PMT of index i
32  // in a G4PVPlacement. By GEANT4 convention, this is a passive rotation.
33  // Use the invert() method to convert it to an active rotation if you
34  // want to apply it to a vector.
35  G4RotationMatrix GetPMTRotation(int i) const;
36 
37  const std::vector<double> &GetEfficiencyCorrections() { return fEfficiencyCorrection; }
38  const std::vector<double> &GetPMTNoiseRates() { return fNoiseRate; }
39  const std::vector<double> &GetPMTAfterPulseFraction() { return fAfterPulseFraction; }
40  const std::vector<int> &GetTypes() { return fType; }
41  const std::vector<int> &GetChannelNumbers() { return fChannelNumber; }
42 
43  protected:
44  G4ThreeVector fLocalOffset;
45  std::vector<G4ThreeVector> fPos;
46  std::vector<G4ThreeVector> fDir;
47  std::vector<int> fChannelNumber;
48  std::vector<int> fType;
49  std::vector<double> fEfficiencyCorrection;
50  std::vector<double> fNoiseRate;
51  std::vector<double> fAfterPulseFraction;
52 };
53 } // namespace RAT
54 #endif
Definition: PMTInfoParser.hh:12
Definition: CCCrossSecMessenger.hh:29