All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
icarus::trigger::GeometryChannelSplitter Class Reference

Combines cryostat triggers via OR. Glorified Max(). More...

Inheritance diagram for icarus::trigger::GeometryChannelSplitter:
icarus::ns::util::mfLoggingClass

Public Member Functions

 GeometryChannelSplitter (geo::GeometryCore const &geom, std::string const &logCategory="GeometryChannelSplitter")
 
template<typename GateObj >
std::vector< std::vector
< GateObj > > 
byCryostat (std::vector< GateObj > &&gates) const
 Splits the gates by cryostat. More...
 

Static Private Member Functions

static std::vector
< geo::CryostatID
makeChannelCryostatMap (geo::GeometryCore const &geom)
 Creates a map like fChannelCryostat from the geometry information. More...
 

Private Attributes

unsigned int const fNCryostats
 Number of cryostats in the detector. More...
 
std::vector< geo::CryostatID >
const 
fChannelCryostat
 Map: optical channel ID -> number of the cryostat with that channel. More...
 

Additional Inherited Members

- Protected Member Functions inherited from icarus::ns::util::mfLoggingClass
 mfLoggingClass (std::string const &logCategory)
 Constructor: initializes with the specified log category. More...
 
std::string logCategory () const
 Returns the logging category string for this object. More...
 
mfLoggingClass const & loggingClass () const
 Returns this object (as a logging class object). More...
 
mf::LogError mfLogError (std::string const &file={}, int const lineNumber=0) const
 Returns a mf::LogError() stream for logging. More...
 
mf::LogWarning mfLogWarning (std::string const &file={}, int const lineNumber=0) const
 Returns a mf::LogWarning() stream for logging. More...
 
mf::LogProblem mfLogProblem (std::string const &file={}, int const lineNumber=0) const
 Returns a mf::LogProblem() stream for logging. More...
 
mf::LogInfo mfLogInfo (std::string const &file={}, int const lineNumber=0) const
 Returns a mf::LogInfo() stream for logging. More...
 
mf::LogVerbatim mfLogVerbatim (std::string const &file={}, int const lineNumber=0) const
 Returns a mf::LogVerbatim() stream for logging. More...
 
mf::LogDebug mfLogDebug (std::string const &file={}, int const lineNumber=0) const
 Returns a mf::LogDebug() stream for logging. More...
 
mf::LogTrace mfLogTrace (std::string const &file={}, int const lineNumber=0) const
 Returns a mf::LogTrace() stream for logging. More...
 

Detailed Description

Combines cryostat triggers via OR. Glorified Max().

Definition at line 142 of file MajorityTriggerSimulation_module.cc.

Constructor & Destructor Documentation

icarus::trigger::GeometryChannelSplitter::GeometryChannelSplitter ( geo::GeometryCore const &  geom,
std::string const &  logCategory = "GeometryChannelSplitter" 
)

Definition at line 174 of file MajorityTriggerSimulation_module.cc.

179  , fNCryostats(geom.Ncryostats())
181 {}
Helper for logging classes.
std::vector< geo::CryostatID > const fChannelCryostat
Map: optical channel ID -&gt; number of the cryostat with that channel.
unsigned int const fNCryostats
Number of cryostats in the detector.
static std::vector< geo::CryostatID > makeChannelCryostatMap(geo::GeometryCore const &geom)
Creates a map like fChannelCryostat from the geometry information.
std::string logCategory() const
Returns the logging category string for this object.

Member Function Documentation

template<typename GateObj >
std::vector< std::vector< GateObj > > icarus::trigger::GeometryChannelSplitter::byCryostat ( std::vector< GateObj > &&  gates) const

Splits the gates by cryostat.

Definition at line 188 of file MajorityTriggerSimulation_module.cc.

189 {
190  std::vector<std::vector<GateObj>> gatesPerCryostat{ fNCryostats };
191 
192  for (auto& gate: gates) {
193  gatesPerCryostat[fChannelCryostat.at(gate.channels().front()).Cryostat]
194  .push_back(std::move(gate));
195  } // for gates
196 
197  return gatesPerCryostat;
198 } // icarus::trigger::GeometryChannelSplitter::byCryostat()
std::vector< geo::CryostatID > const fChannelCryostat
Map: optical channel ID -&gt; number of the cryostat with that channel.
unsigned int const fNCryostats
Number of cryostats in the detector.
auto icarus::trigger::GeometryChannelSplitter::makeChannelCryostatMap ( geo::GeometryCore const &  geom)
staticprivate

Creates a map like fChannelCryostat from the geometry information.

Definition at line 203 of file MajorityTriggerSimulation_module.cc.

204 {
205 
206  auto const nOpChannels = geom.NOpChannels();
207 
208  std::vector<geo::CryostatID> channelCryostatMap(nOpChannels);
209 
210  for (auto const opChannel: util::counter(nOpChannels)) {
211  if (!geom.IsValidOpChannel(opChannel)) continue;
212  channelCryostatMap.at(opChannel)
213  = geom.OpDetGeoFromOpChannel(opChannel).ID();
214  } // for all channels
215 
216  return channelCryostatMap;
217 
218 } // icarus::trigger::GeometryChannelSplitter::makeChannelCryostatMap()
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
Definition: counter.h:285

Member Data Documentation

std::vector<geo::CryostatID> const icarus::trigger::GeometryChannelSplitter::fChannelCryostat
private

Map: optical channel ID -> number of the cryostat with that channel.

Definition at line 163 of file MajorityTriggerSimulation_module.cc.

unsigned int const icarus::trigger::GeometryChannelSplitter::fNCryostats
private

Number of cryostats in the detector.

Definition at line 160 of file MajorityTriggerSimulation_module.cc.


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