Public Member Functions | Private Attributes | List of all members
gar::sdp::AuxDetSimChannel Class Reference

Collection of particles crossing one auxiliary detector cell. More...

#include <AuxDetSimChannel.h>

Public Member Functions

 AuxDetSimChannel ()
 Default constructor (invalid, empty data) More...
 
 AuxDetSimChannel (uint32_t inputAuxDetID, uint32_t inputAuxDetSensitiveID)
 
 AuxDetSimChannel (uint32_t inputAuxDetID, const std::vector< sdp::AuxDetIDE > &inputAuxDetIDEs, uint32_t inputAuxDetSensitiveID=0)
 Constructor: copies from the specified IDE vector. More...
 
 AuxDetSimChannel (uint32_t inputAuxDetID, std::vector< sdp::AuxDetIDE > &&inputAuxDetIDEs, uint32_t inputAuxDetSensitiveID=0)
 Constructor: moves data from the specified IDE vector. More...
 
std::pair< int, int > MergeAuxDetSimChannel (const AuxDetSimChannel &, int)
 
Getters
uint32_t AuxDetID () const
 
uint32_t AuxDetSensitiveID () const
 
bool operator< (const AuxDetSimChannel &other) const
 
bool operator== (const AuxDetSimChannel &other) const
 
std::vector< sdp::AuxDetIDE > const & AuxDetIDEs () const
 

Private Attributes

uint32_t fAuxDetID
 geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec More...
 
uint32_t fAuxDetSensitiveID
 integer used to retrieve AuxDetSensitiveGeo object More...
 
std::vector< sdp::AuxDetIDEfAuxDetIDEs
 one sdp::AuxDetIDE for each G4 track id More...
 

Detailed Description

Collection of particles crossing one auxiliary detector cell.

This structure collects information (as sdp::AuxDetIDE) from all the MC particles crossing a single auxiliary detector cell (channel).

Definition at line 62 of file AuxDetSimChannel.h.

Constructor & Destructor Documentation

gar::sdp::AuxDetSimChannel::AuxDetSimChannel ( )

Default constructor (invalid, empty data)

Definition at line 57 of file AuxDetSimChannel.cxx.

60  {
61  }
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec
static int max(int a, int b)
gar::sdp::AuxDetSimChannel::AuxDetSimChannel ( uint32_t  inputAuxDetID,
uint32_t  inputAuxDetSensitiveID 
)

Definition at line 64 of file AuxDetSimChannel.cxx.

66  : fAuxDetID(inputAuxDetID)
67  , fAuxDetSensitiveID(inputAuxDetSensitiveID)
68  {}
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec
gar::sdp::AuxDetSimChannel::AuxDetSimChannel ( uint32_t  inputAuxDetID,
const std::vector< sdp::AuxDetIDE > &  inputAuxDetIDEs,
uint32_t  inputAuxDetSensitiveID = 0 
)

Constructor: copies from the specified IDE vector.

gar::sdp::AuxDetSimChannel::AuxDetSimChannel ( uint32_t  inputAuxDetID,
std::vector< sdp::AuxDetIDE > &&  inputAuxDetIDEs,
uint32_t  inputAuxDetSensitiveID = 0 
)

Constructor: moves data from the specified IDE vector.

Definition at line 80 of file AuxDetSimChannel.cxx.

83  : fAuxDetID(inputAuxDetID)
84  , fAuxDetSensitiveID(inputAuxDetSensitiveID)
85  , fAuxDetIDEs(inputAuxDetIDEs)
86  {}
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
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

Member Function Documentation

uint32_t gar::sdp::AuxDetSimChannel::AuxDetID ( ) const
inline

Definition at line 115 of file AuxDetSimChannel.h.

115 { return fAuxDetID; }
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec
std::vector< gar::sdp::AuxDetIDE > const & gar::sdp::AuxDetSimChannel::AuxDetIDEs ( ) const
inline

Definition at line 117 of file AuxDetSimChannel.h.

117 { return fAuxDetIDEs; }
std::vector< sdp::AuxDetIDE > fAuxDetIDEs
one sdp::AuxDetIDE for each G4 track id
uint32_t gar::sdp::AuxDetSimChannel::AuxDetSensitiveID ( ) const
inline

Definition at line 116 of file AuxDetSimChannel.h.

116 { return fAuxDetSensitiveID; }
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
std::pair< int, int > gar::sdp::AuxDetSimChannel::MergeAuxDetSimChannel ( const AuxDetSimChannel chan,
int  offset 
)

Definition at line 89 of file AuxDetSimChannel.cxx.

91  {
92  if(this->fAuxDetID != chan.AuxDetID() &&
93  this->fAuxDetSensitiveID != chan.AuxDetSensitiveID())
94  throw std::runtime_error("ERROR AuxDetSimChannel Merge: Trying to merge different channels!");
95 
96  std::pair<int,int> range_trackID(std::numeric_limits<int>::max(),
98 
99  for(auto const& ide : AuxDetIDEs()){
100  this->fAuxDetIDEs.emplace_back(ide,offset);
101 
102  if( ide.trackID+offset < range_trackID.first ) range_trackID.first = ide.trackID+offset;
103  if( ide.trackID+offset > range_trackID.second ) range_trackID.second = ide.trackID+offset;
104  }
105 
106  return range_trackID;
107  }
std::vector< sdp::AuxDetIDE > const & AuxDetIDEs() const
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
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
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
bool gar::sdp::AuxDetSimChannel::operator< ( const AuxDetSimChannel other) const

Definition at line 110 of file AuxDetSimChannel.cxx.

111  {
112  if(fAuxDetID < other.AuxDetID() ) return true;
113 
114  return fAuxDetSensitiveID < other.AuxDetSensitiveID();
115  }
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec
bool gar::sdp::AuxDetSimChannel::operator== ( const AuxDetSimChannel other) const

Definition at line 118 of file AuxDetSimChannel.cxx.

119  {
120  return (fAuxDetID == other.AuxDetID() && fAuxDetSensitiveID == other.AuxDetSensitiveID());
121  }
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec

Member Data Documentation

uint32_t gar::sdp::AuxDetSimChannel::fAuxDetID
private

geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec

Definition at line 70 of file AuxDetSimChannel.h.

std::vector<sdp::AuxDetIDE> gar::sdp::AuxDetSimChannel::fAuxDetIDEs
private

one sdp::AuxDetIDE for each G4 track id

Definition at line 72 of file AuxDetSimChannel.h.

uint32_t gar::sdp::AuxDetSimChannel::fAuxDetSensitiveID
private

integer used to retrieve AuxDetSensitiveGeo object

Definition at line 71 of file AuxDetSimChannel.h.


The documentation for this class was generated from the following files: