LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
sim::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< sim::AuxDetIDE > &inputAuxDetIDEs, uint32_t inputAuxDetSensitiveID=0)
 Constructor: copies from the specified IDE vector. More...
 
 AuxDetSimChannel (uint32_t inputAuxDetID, std::vector< sim::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< sim::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< sim::AuxDetIDEfAuxDetIDEs
 one sim::AuxDetIDE for each G4 track id More...
 

Detailed Description

Collection of particles crossing one auxiliary detector cell.

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

Definition at line 63 of file AuxDetSimChannel.h.

Constructor & Destructor Documentation

sim::AuxDetSimChannel::AuxDetSimChannel ( )

Default constructor (invalid, empty data)

Definition at line 59 of file AuxDetSimChannel.cxx.

62  {
63  }
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
Int_t max
Definition: plot.C:27
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec
sim::AuxDetSimChannel::AuxDetSimChannel ( uint32_t  inputAuxDetID,
uint32_t  inputAuxDetSensitiveID 
)

Definition at line 66 of file AuxDetSimChannel.cxx.

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

Constructor: copies from the specified IDE vector.

Definition at line 73 of file AuxDetSimChannel.cxx.

76  : fAuxDetID(inputAuxDetID)
77  , fAuxDetSensitiveID(inputAuxDetSensitiveID)
78  , fAuxDetIDEs(inputAuxDetIDEs)
79  {}
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
std::vector< sim::AuxDetIDE > fAuxDetIDEs
one sim::AuxDetIDE for each G4 track id
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec
sim::AuxDetSimChannel::AuxDetSimChannel ( uint32_t  inputAuxDetID,
std::vector< sim::AuxDetIDE > &&  inputAuxDetIDEs,
uint32_t  inputAuxDetSensitiveID = 0 
)

Constructor: moves data from the specified IDE vector.

Definition at line 82 of file AuxDetSimChannel.cxx.

85  : fAuxDetID(inputAuxDetID)
86  , fAuxDetSensitiveID(inputAuxDetSensitiveID)
87  , fAuxDetIDEs(inputAuxDetIDEs)
88  {}
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
std::vector< sim::AuxDetIDE > fAuxDetIDEs
one sim::AuxDetIDE for each G4 track id
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec

Member Function Documentation

uint32_t sim::AuxDetSimChannel::AuxDetID ( ) const
inline

Definition at line 112 of file AuxDetSimChannel.h.

Referenced by MergeAuxDetSimChannel(), operator<(), and operator==().

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

Definition at line 114 of file AuxDetSimChannel.h.

Referenced by MergeAuxDetSimChannel().

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

Definition at line 113 of file AuxDetSimChannel.h.

Referenced by MergeAuxDetSimChannel(), operator<(), and operator==().

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

Definition at line 91 of file AuxDetSimChannel.cxx.

References AuxDetID(), AuxDetIDEs(), AuxDetSensitiveID(), fAuxDetID, fAuxDetIDEs, fAuxDetSensitiveID, max, and min.

93  {
94  if(this->fAuxDetID != chan.AuxDetID() && this->fAuxDetSensitiveID != chan.AuxDetSensitiveID())
95  throw std::runtime_error("ERROR AuxDetSimChannel Merge: Trying to merge different channels!");
96 
97  std::pair<int,int> range_trackID(std::numeric_limits<int>::max(),
99 
100  for(auto const& ide : AuxDetIDEs()){
101  this->fAuxDetIDEs.emplace_back(ide,offset);
102 
103  if( ide.trackID+offset < range_trackID.first )
104  range_trackID.first = ide.trackID+offset;
105  if( ide.trackID+offset > range_trackID.second )
106  range_trackID.second = ide.trackID+offset;
107  }
108 
109  return range_trackID;
110  }
uint32_t fAuxDetSensitiveID
integer used to retrieve AuxDetSensitiveGeo object
std::vector< sim::AuxDetIDE > fAuxDetIDEs
one sim::AuxDetIDE for each G4 track id
Int_t max
Definition: plot.C:27
uint32_t fAuxDetID
geo->AuxDet(auxDetID), integer used to retrieve AuxDetGeo objec
std::vector< sim::AuxDetIDE > const & AuxDetIDEs() const
Int_t min
Definition: plot.C:26
bool sim::AuxDetSimChannel::operator< ( const AuxDetSimChannel other) const

Definition at line 113 of file AuxDetSimChannel.cxx.

References AuxDetID(), AuxDetSensitiveID(), fAuxDetID, and fAuxDetSensitiveID.

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

Definition at line 121 of file AuxDetSimChannel.cxx.

References AuxDetID(), AuxDetSensitiveID(), fAuxDetID, and fAuxDetSensitiveID.

122  {
123  return (fAuxDetID == other.AuxDetID() && fAuxDetSensitiveID == other.AuxDetSensitiveID());
124  }
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 sim::AuxDetSimChannel::fAuxDetID
private

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

Definition at line 70 of file AuxDetSimChannel.h.

Referenced by MergeAuxDetSimChannel(), operator<(), and operator==().

std::vector<sim::AuxDetIDE> sim::AuxDetSimChannel::fAuxDetIDEs
private

one sim::AuxDetIDE for each G4 track id

Definition at line 72 of file AuxDetSimChannel.h.

Referenced by MergeAuxDetSimChannel().

uint32_t sim::AuxDetSimChannel::fAuxDetSensitiveID
private

integer used to retrieve AuxDetSensitiveGeo object

Definition at line 71 of file AuxDetSimChannel.h.

Referenced by MergeAuxDetSimChannel(), operator<(), and operator==().


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