AuxDetSimChannel.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file AuxDetSimChannel.h
3 ///
4 /// \brief object containing MC truth information necessary for making RawDigits
5 /// and doing back tracking
6 ///
7 /// \author miceli@fnal.gov
8 ////////////////////////////////////////////////////////////////////////
9 
10 #ifndef SDP_AUXDETSIMCHANNEL_H
11 #define SDP_AUXDETSIMCHANNEL_H
12 
13 // C/C++ standard libraries
14 #include <stdint.h> // C header (need to be compatible with Reflex)
15 #include <vector>
16 
17 namespace gar {
18  namespace sdp {
19 
20  /**
21  * @brief MC truth information to make RawDigits and do back tracking
22  *
23  * This structure describes the true position of momentum of a MC particle
24  * entering and exiting a scintillator cell (channel) of an auxiliary
25  * scintillator detector.
26  */
27  class AuxDetIDE {
28 
29  public:
30  AuxDetIDE();
31 
32  //constructor for IDEs applying G4 offset...
33  AuxDetIDE(AuxDetIDE const&, int);
34 
35  int trackID; ///< Geant4 supplied track ID
36  float energyDeposited; ///< total energy deposited for this track ID and time
37  float entryX; ///< Entry position X of particle
38  float entryY; ///< Entry position Y of particle
39  float entryZ; ///< Entry position Z of particle
40  float entryT; ///< Entry time of particle
41  float exitX; ///< Exit position X of particle
42  float exitY; ///< Exit position Y of particle
43  float exitZ; ///< Exit position Z of particle
44  float exitT; ///< Exit time of particle
45  float exitMomentumX; ///< Exit X-Momentum of particle
46  float exitMomentumY; ///< Exit Y-Momentum of particle
47  float exitMomentumZ; ///< Exit Z-Momentum of particle
48 
49 #ifndef __GCCXML__
50  bool operator< (const AuxDetIDE& other) const;
51  bool operator== (const AuxDetIDE& other) const;
52 
53 #endif
54  }; // class AuxDetIDE
55 
56  /**
57  * @brief Collection of particles crossing one auxiliary detector cell
58  *
59  * This structure collects information (as sdp::AuxDetIDE) from all the MC
60  * particles crossing a single auxiliary detector cell (channel).
61  */
63 
64  public:
65 
66  /// Default constructor (invalid, empty data)
68 
69  private:
70  uint32_t fAuxDetID; ///< geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec
71  uint32_t fAuxDetSensitiveID; ///< integer used to retrieve AuxDetSensitiveGeo object
72  std::vector<sdp::AuxDetIDE> fAuxDetIDEs; ///< one sdp::AuxDetIDE for each G4 track id
73 
74 #ifndef __GCCXML__
75  public:
76 
77  AuxDetSimChannel(uint32_t inputAuxDetID,
78  uint32_t inputAuxDetSensitiveID);
79 
80  /// Constructor: copies from the specified IDE vector
81  AuxDetSimChannel(uint32_t inputAuxDetID,
82  const std::vector<sdp::AuxDetIDE>& inputAuxDetIDEs,
83  uint32_t inputAuxDetSensitiveID=0);
84 
85  /// Constructor: moves data from the specified IDE vector
86  AuxDetSimChannel(uint32_t inputAuxDetID,
87  std::vector<sdp::AuxDetIDE>&& inputAuxDetIDEs,
88  uint32_t inputAuxDetSensitiveID=0);
89 
90  std::pair<int,int> MergeAuxDetSimChannel(const AuxDetSimChannel&,
91  int);
92 
93  ///@name Getters
94  ///@{
95  uint32_t AuxDetID() const;
96  uint32_t AuxDetSensitiveID() const;
97 
98  bool operator< (const AuxDetSimChannel& other) const;
99  bool operator== (const AuxDetSimChannel& other) const;
100 
101  std::vector<sdp::AuxDetIDE> const& AuxDetIDEs() const;
102  ///@}
103 
104 #endif
105 
106  }; // class AuxDetSimChannel
107 
108  } // namespace sim
109 } // gar
110 
111 #ifndef __GCCXML__
112 
113 inline bool gar::sdp::AuxDetIDE::operator< (const AuxDetIDE& other) const { return trackID < other.trackID; }
114 inline bool gar::sdp::AuxDetIDE::operator== (const AuxDetIDE& other) const { return other.trackID == trackID; }
115 inline uint32_t gar::sdp::AuxDetSimChannel::AuxDetID() const { return fAuxDetID; }
116 inline uint32_t gar::sdp::AuxDetSimChannel::AuxDetSensitiveID() const { return fAuxDetSensitiveID; }
117 inline std::vector<gar::sdp::AuxDetIDE> const& gar::sdp::AuxDetSimChannel::AuxDetIDEs() const { return fAuxDetIDEs; }
118 #endif
119 
120 #endif // SDP_AUXDETSIMCHANNEL_H
121 
122 ////////////////////////////////////////////////////////////////////////
std::vector< sdp::AuxDetIDE > const & AuxDetIDEs() const
float entryZ
Entry position Z of particle.
bool operator==(const AuxDetIDE &other) const
float exitT
Exit time of particle.
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
float exitMomentumX
Exit X-Momentum of particle.
float entryT
Entry time of particle.
float entryY
Entry position Y of particle.
float exitY
Exit position Y of particle.
std::vector< sdp::AuxDetIDE > fAuxDetIDEs
one sdp::AuxDetIDE for each G4 track id
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec
float entryX
Entry position X of particle.
uint32_t AuxDetSensitiveID() const
float exitMomentumZ
Exit Z-Momentum of particle.
General GArSoft Utilities.
float exitMomentumY
Exit Y-Momentum of particle.
float exitX
Exit position X of particle.
MC truth information to make RawDigits and do back tracking.
float energyDeposited
total energy deposited for this track ID and time
bool operator<(const AuxDetIDE &other) const
float exitZ
Exit position Z of particle.
Collection of particles crossing one auxiliary detector cell.
int trackID
Geant4 supplied track ID.