Public Member Functions | Public Attributes | List of all members
gar::rosim::edepIDE Struct Reference

#include <TPCReadoutSimAlg.h>

Public Member Functions

 edepIDE ()
 
 edepIDE (float numE, unsigned int chan, unsigned short tdc, size_t edepIdx, float edepWeight)
 
bool operator< (edepIDE const &b) const
 
bool operator== (edepIDE const &b) const
 
bool operator!= (edepIDE const &b) const
 
void operator+= (edepIDE const &b)
 

Public Attributes

float NumElect
 
unsigned int Channel
 
unsigned short TDC
 
std::unordered_set< size_t > edepLocs
 
std::deque< float > edepWeights
 

Detailed Description

Definition at line 29 of file TPCReadoutSimAlg.h.

Constructor & Destructor Documentation

gar::rosim::edepIDE::edepIDE ( )
gar::rosim::edepIDE::edepIDE ( float  numE,
unsigned int  chan,
unsigned short  tdc,
size_t  edepIdx,
float  edepWeight 
)
inline

Definition at line 32 of file TPCReadoutSimAlg.h.

37  : NumElect(numE)
38  , Channel (chan)
39  , TDC (tdc)
40  {
41  edepLocs.insert(edepIdx);
42  edepWeights.push_front(edepWeight);
43  }
std::deque< float > edepWeights
std::unordered_set< size_t > edepLocs

Member Function Documentation

bool gar::rosim::edepIDE::operator!= ( edepIDE const &  b) const
inline

Definition at line 66 of file TPCReadoutSimAlg.h.

67  {
68  return !(*this == b);
69  }
static bool * b
Definition: config.cpp:1043
void gar::rosim::edepIDE::operator+= ( edepIDE const &  b)
inline

Definition at line 72 of file TPCReadoutSimAlg.h.

73  {
74  if(Channel != b.Channel ||
75  TDC != b.TDC ){
76  MF_LOG_WARNING("IonizationReadout")
77  << "Attempting to add edepIDE with different "
78  << "Channels: "
79  << Channel
80  << " / "
81  << b.Channel
82  << " or TDCs: "
83  << TDC
84  << " / "
85  << b.TDC
86  << " bail";
87  return;
88  }
89 
90  NumElect += b.NumElect;
91 
92  for(auto const e : b.edepLocs)
93  edepLocs.insert(e);
94  for(auto const w : b.edepWeights)
95  edepWeights.push_front(w);
96 
97  return;
98  }
std::deque< float > edepWeights
const double e
std::unordered_set< size_t > edepLocs
static bool * b
Definition: config.cpp:1043
#define MF_LOG_WARNING(category)
bool gar::rosim::edepIDE::operator< ( edepIDE const &  b) const
inline

Definition at line 46 of file TPCReadoutSimAlg.h.

47  {
48  if(Channel < b.Channel) return true;
49  else if(Channel == b.Channel){
50  if(TDC < b.TDC) return true;
51  }
52 
53  return false;
54  }
static bool * b
Definition: config.cpp:1043
bool gar::rosim::edepIDE::operator== ( edepIDE const &  b) const
inline

Definition at line 57 of file TPCReadoutSimAlg.h.

58  {
59  if(Channel == b.Channel &&
60  TDC == b.TDC ) return true;
61 
62  return false;
63  }
static bool * b
Definition: config.cpp:1043

Member Data Documentation

unsigned int gar::rosim::edepIDE::Channel

Definition at line 101 of file TPCReadoutSimAlg.h.

std::unordered_set<size_t> gar::rosim::edepIDE::edepLocs

Definition at line 103 of file TPCReadoutSimAlg.h.

std::deque<float> gar::rosim::edepIDE::edepWeights

Definition at line 104 of file TPCReadoutSimAlg.h.

float gar::rosim::edepIDE::NumElect

Definition at line 100 of file TPCReadoutSimAlg.h.

unsigned short gar::rosim::edepIDE::TDC

Definition at line 102 of file TPCReadoutSimAlg.h.


The documentation for this struct was generated from the following file: