All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Functions | Variables
icarus Namespace Reference

Cluster finding and building. More...

Namespaces

 calo
 
 crt
 
 details
 
 geo
 
 ns
 
 opdet
 
 simfilter
 
 testing
 Namespace including ICARUS-specific testing.
 
 TPCGeoUtil
 
 trigger
 
 waveform_operations
 Functions to manipulate waveform sample values.
 

Classes

class  PMTsorterStandard
 Sorter sorting PMT to follow the same order as TPC (standard). More...
 
class  GeoObjectSorterPMTasTPC
 Geometry sorter having PMT channels follow the same order as TPC. More...
 
class  ICARUSChannelMapAlg
 Channel mapping for ICARUS detector with split wires. More...
 
class  IntegerRanges
 A sequence of contiguous ranges of integral numbers. More...
 
class  WeakCurrentType
 Represents a type of weak current. More...
 
class  AnalysisTreeDataStruct
 
class  AnalysisTree
 Creates a simple ROOT tree with tracking and calorimetry information. More...
 
class  ICARUSPurityDQM
 
struct  CathodeDesc_t
 Simple description for the cathode. More...
 
struct  CathodeCrossing_t
 Information about the cathode crossing of a path. More...
 
class  CRTT0Matching
 
class  CRTT0MatchingAna
 
class  CRTTPCMatchingAna
 
class  CRTTzeroProducer
 
struct  matchCand
 
class  CRTT0MatchAlg
 
class  FlashResAna
 
class  PhotBackground
 
class  DaqDecoderICARUSPMT
 Produces raw::OpDetWaveform from V1730 artDAQ data fragments. More...
 
struct  dumpChannel
 
struct  TriggerConfiguration
 
class  KeyValuesData
 Collection of items with key/values structure. More...
 
class  PMTconfigurationExtractorBase
 
class  PMTconfigurationExtractor
 Class to extract PMT readout board configuration. More...
 
class  TriggerConfigurationExtractorBase
 
class  TriggerConfigurationExtractor
 Class to extract PMT readout board configuration. More...
 
class  PMTconfigurationExtraction
 Writes PMT configuration from FHiCL into a data product. More...
 
class  TriggerConfigurationExtraction
 Writes trigger configuration from FHiCL into a data product. More...
 
class  IcarusGeometryHelper
 Implementation of geo::ExptGeoHelperInterface for ICARUS. More...
 
class  ICARUSsplitInductionChannelMapSetupTool
 Interface for a tool creating the standard ICARUS channel mapper. More...
 
struct  SimEnergyDepositSummary
 Data structure containing summary information about deposited energy. More...
 
struct  ParsingToolkit
 Utilities for text parsing. More...
 
struct  WaveformRMS
 Class containing a waveform baseline RMS value. More...
 
class  PMTcoordinates
 
class  PMTStartCalibTime
 
class  PMTWaveformBaselines
 Extracts the baseline of PMT waveforms. More...
 
class  PMTWaveformBaselinesFromChannelData
 Extracts a baseline from PMT waveforms. More...
 
class  PMTWaveformBaselinesFromReadoutConfiguration
 Extracts PMT baseline settings from PMT readout configuration. More...
 
class  TrigInfo
 
struct  WaveformBaseline
 Class containing a waveform baseline value. More...
 

Functions

void SortAuxDetsStandard (std::vector< geo::AuxDetGeo > &adgeo)
 Sorts ICARUS CRT modules in standard configuration. More...
 
void SortAuxDetSensitiveStandard (std::vector< geo::AuxDetSensitiveGeo > &adsgeo)
 Sorts ICARUS CRT submodules in standard configuration. More...
 
template<bool CheckGrowing = true, typename Coll >
IntegerRanges< typename
Coll::value_type, CheckGrowing > 
makeIntegerRanges (Coll const &coll)
 
template<typename T , bool CheckGrowing>
std::ostream & operator<< (std::ostream &out, IntegerRanges< T, CheckGrowing > const &ranges)
 
template<typename T , bool CheckGrowing>
std::ostream & operator<< (std::ostream &out, typename IntegerRanges< T, CheckGrowing >::Range_t const &r)
 
CathodeDesc_t findTPCcathode (geo::Point_t const &point, geo::GeometryCore const &geom)
 Returns cathode information for cryostat at the specified point. More...
 
double distance (geo::Point_t const &point, CathodeDesc_t const &cathode)
 Returns the distance of a point from the cathode. More...
 
geo::Point_t findCathodeCenter (geo::CryostatGeo const &cryo)
 Returns the center of the cathode in the specified cryostat. More...
 
template<typename Iter >
CathodeCrossing_t detectCrossing (Iter begin, Iter end, CathodeDesc_t const &cathode)
 Returns the crossing point of a trajectory on the cathode. More...
 
void vmanip (std::vector< double > v, double *ave, double *rms)
 
void set_def (sbn::crt::CRTTzero tz)
 
matchCand makeNULLmc ()
 
daq::details::BoardSetup_t convert (DaqDecoderICARUSPMT::BoardSetupConfig const &config)
 Special function fhicl::TableAs uses to convert BoardSetupConfig. More...
 
std::ostream & operator<< (std::ostream &out, dumpChannel const &d)
 
std::ostream & operator<< (std::ostream &out, DaqDecoderICARUSPMT::SplitTimestamp_t const &time)
 
std::ostream & operator<< (std::ostream &out, icarus::TriggerConfiguration const &config)
 Prints the configuration into a stream with default verbosity. More...
 
std::ostream & operator<< (std::ostream &out, KeyValuesData const &data)
 
std::ostream & operator<< (std::ostream &out, KeyValuesData::Item const &data)
 
sbn::PMTconfiguration extractPMTreadoutConfiguration (std::string const &srcFileName, icarus::PMTconfigurationExtractor extractor)
 
sbn::PMTconfiguration extractPMTreadoutConfiguration (TFile &srcFile, icarus::PMTconfigurationExtractor extractor)
 
template<typename Principal >
sbn::PMTconfiguration extractPMTreadoutConfiguration (Principal const &data, icarus::PMTconfigurationExtractor extractor)
 
icarus::TriggerConfiguration extractTriggerReadoutConfiguration (std::string const &srcFileName, icarus::TriggerConfigurationExtractor extractor)
 
icarus::TriggerConfiguration extractTriggerReadoutConfiguration (TFile &srcFile, icarus::TriggerConfigurationExtractor extractor)
 
template<typename Principal >
icarus::TriggerConfiguration extractTriggerReadoutConfiguration (Principal const &data, icarus::TriggerConfigurationExtractor extractor)
 
std::ostream & operator<< (std::ostream &out, icarus::WaveformRMS const &baseline)
 Prints the value of the RMS into a stream. More...
 
opdet::SharedWaveformBaseline::Params_t convert (icarus::PMTWaveformBaselinesFromChannelData::Config::AlgoConfig const &config)
 
std::ostream & operator<< (std::ostream &out, icarus::WaveformBaseline const &baseline)
 Prints the value of the baseline into a stream. More...
 

Variables

constexpr WeakCurrentType NeutralCurrentType { WeakCurrentType::NC }
 Constant value for a weak neutral current type. More...
 
constexpr WeakCurrentType ChargedCurrentType { WeakCurrentType::CC }
 Constant value for a weak charged current type. More...
 
constexpr WeakCurrentType AnyWeakCurrentType { WeakCurrentType::any }
 Constant value for any weak current type. More...
 

Detailed Description

Cluster finding and building.

Class: CRTT0Matching Module Type: producer File: CRTT0Matching_module.cc

Author: Thomas Brooks E-mail address: tbroo.nosp@m.ks@f.nosp@m.nal.g.nosp@m.ov

Modified from CRTT0Matching by Thomas Warburton.

Function Documentation

Definition at line 412 of file PMTWaveformBaselinesFromChannelData_module.cc.

413  {
414  return {
415  0U // nSample (to be changed run by run)
416  , config.AcceptedSampleRangeRMS() // nRMS
417  , config.ExcessSampleLimit() // nExcessSamples
418  };
419  } // convert(icarus::PMTWaveformBaselinesFromChannelData::Config::AlgoConfig)
daq::details::BoardSetup_t icarus::convert ( DaqDecoderICARUSPMT::BoardSetupConfig const &  config)

Special function fhicl::TableAs uses to convert BoardSetupConfig.

Definition at line 1179 of file DaqDecoderICARUSPMT_module.cc.

1180  {
1181 
1183  config.Name() // name
1184  , config.FragmentID()
1185  .value_or(daq::details::BoardSetup_t::NoFragmentID) // fragmentID
1186  , config.TriggerDelay() // triggerDelay
1187  , config.TTTresetDelay() // TTTresetDelay
1188  };
1189 
1190  // set the special configuration for the board channels that have one;
1191  // the others will stay with the default one (which implies that a channel
1192  // is saved in the standard data product, and only if it has a channel ID
1193  // entry from the database)
1194  for (
1195  DaqDecoderICARUSPMT::BoardSetupConfig::ChannelSetupConfig const& chConfig
1196  : config.SpecialChannels().value_or(
1197  std::vector<DaqDecoderICARUSPMT::BoardSetupConfig::ChannelSetupConfig>{}
1198  )
1199  ) {
1200  try {
1201  bs.channelSettings.at(chConfig.ChannelIndex()) = {
1202  chConfig.Channel() // channelID
1203  , chConfig.Skip() // forcedSkip
1204  , chConfig.OnlyOnGlobalTrigger() // onGlobalOnly
1205  , chConfig.MinSpan() // minSpan
1206  , chConfig.InstanceName() // category
1207  };
1208  }
1209  catch (std::out_of_range const&) {
1210  throw art::Exception(art::errors::Configuration)
1211  << "Configuration requested for invalid channel index "
1212  << chConfig.ChannelIndex() << " of the board '"
1213  << config.Name() << "'\n";
1214  }
1215  } // for
1216 
1217  return bs;
1218  } // convert(BoardSetupConfig)
static constexpr unsigned int NoFragmentID
Special value to mark the absence of fragment ID information.
Information of the setup of a V1730 readout board.
nanoseconds TTTresetDelay
Delay from TTT reset issue to enact.
template<typename Iter >
CathodeCrossing_t icarus::detectCrossing ( Iter  begin,
Iter  end,
CathodeDesc_t const &  cathode 
)

Returns the crossing point of a trajectory on the cathode.

Template Parameters
Itertype of iterator to a point in space
Parameters
beginiterator to the first point of the trajectory
enditerator past the last point of the trajectory
cathodedescription of the cathode plane
Returns
the crossing information

This algorithm intersects a path on a infinite plane in 3D space, and returns the intersection point.

The path is a sequence of segments. For simple trajectories, there is only one crossing, and then the returned point lies on both the path and the plane (it is, indeed, the path/cathode intersection point). For trajectories which cross the plane multiple times, the details of the part of the trajectory between the first and the last crossing are ignored and the two chunks of end paths that lie entirely on one side of the cathode are joint by a segment, shortcutting the details of the path in between.

The function also returns the length of the paths at the two sides of the cathode. Again, in case of multiple crossings, the details of the crossing are ignored and a single segment is used to connect the two sides, and the two lengths reflect that approximation. If no intersection point is found, the two partial lengths are both 0.

double icarus::distance ( geo::Point_t const &  point,
CathodeDesc_t const &  cathode 
)

Returns the distance of a point from the cathode.

Definition at line 35 of file CathodeCrossingUtils.cxx.

36  { return (point - cathode.center).Dot(cathode.normal); }
sbn::PMTconfiguration icarus::extractPMTreadoutConfiguration ( std::string const &  srcFileName,
icarus::PMTconfigurationExtractor  extractor 
)

Definition at line 219 of file PMTconfigurationExtractor.cxx.

220 {
221  //
222  // TFile::Open() call is needed to support non-local URL
223  // (e.g. XRootD URL are not supported by TFile constructor).
224  //
226  std::unique_ptr<TFile>{ TFile::Open(srcFileName.c_str(), "READ") }
227  ),
228  std::move(extractor)
229  );
230 } // icarus::extractPMTreadoutConfiguration(string)
sbn::PMTconfiguration extractPMTreadoutConfiguration(std::string const &srcFileName, icarus::PMTconfigurationExtractor extractor)
sbn::PMTconfiguration icarus::extractPMTreadoutConfiguration ( TFile &  srcFile,
icarus::PMTconfigurationExtractor  extractor 
)

Definition at line 235 of file PMTconfigurationExtractor.cxx.

236 {
237 
239  (util::readConfigurationFromArtFile(srcFile), std::move(extractor));
240 
241 } // icarus::extractPMTreadoutConfiguration(TFile)
std::map< fhicl::ParameterSetID, fhicl::ParameterSet > readConfigurationFromArtFile(TFile &file)
Reads and returns the art configuration stored in sourceDir.
sbn::PMTconfiguration extractPMTreadoutConfigurationImpl(ConfigMap const &configMap, icarus::PMTconfigurationExtractor extractor)
template<typename Principal >
sbn::PMTconfiguration icarus::extractPMTreadoutConfiguration ( Principal const &  data,
icarus::PMTconfigurationExtractor  extractor 
)

Definition at line 494 of file PMTconfigurationExtractor.h.

495 {
496 
498  (util::readConfigurationFromArtPrincipal(principal), std::move(extractor));
499 
500 } // icarus::extractPMTreadoutConfiguration(Principal)
std::map< std::string, fhicl::ParameterSet > readConfigurationFromArtPrincipal(Principal const &principal)
Reads and returns the complete art configuration in the principal.
sbn::PMTconfiguration extractPMTreadoutConfigurationImpl(ConfigMap const &configMap, icarus::PMTconfigurationExtractor extractor)
icarus::TriggerConfiguration icarus::extractTriggerReadoutConfiguration ( std::string const &  srcFileName,
icarus::TriggerConfigurationExtractor  extractor 
)

Definition at line 343 of file TriggerConfigurationExtractor.cxx.

344 {
345  //
346  // TFile::Open() call is needed to support non-local URL
347  // (e.g. XRootD URL are not supported by TFile constructor).
348  //
350  std::unique_ptr<TFile>{ TFile::Open(srcFileName.c_str(), "READ") }
351  ),
352  std::move(extractor)
353  );
354 } // icarus::extractTriggerReadoutConfiguration(string)
icarus::TriggerConfiguration extractTriggerReadoutConfiguration(std::string const &srcFileName, icarus::TriggerConfigurationExtractor extractor)
icarus::TriggerConfiguration icarus::extractTriggerReadoutConfiguration ( TFile &  srcFile,
icarus::TriggerConfigurationExtractor  extractor 
)

Definition at line 359 of file TriggerConfigurationExtractor.cxx.

360 {
361 
363  (util::readConfigurationFromArtFile(srcFile), std::move(extractor));
364 
365 } // icarus::extractTriggerReadoutConfiguration(TFile)
std::map< fhicl::ParameterSetID, fhicl::ParameterSet > readConfigurationFromArtFile(TFile &file)
Reads and returns the art configuration stored in sourceDir.
icarus::TriggerConfiguration extractTriggerReadoutConfigurationImpl(ConfigMap const &configMap, icarus::TriggerConfigurationExtractor extractor)
template<typename Principal >
icarus::TriggerConfiguration icarus::extractTriggerReadoutConfiguration ( Principal const &  data,
icarus::TriggerConfigurationExtractor  extractor 
)

Definition at line 466 of file TriggerConfigurationExtractor.h.

467 {
468 
470  (util::readConfigurationFromArtPrincipal(principal), std::move(extractor));
471 
472 } // icarus::extracatTriggerReadoutConfiguration(Principal)
icarus::TriggerConfiguration extractTriggerReadoutConfigurationImpl(ConfigMap const &configMap, icarus::TriggerConfigurationExtractor extractor)
std::map< std::string, fhicl::ParameterSet > readConfigurationFromArtPrincipal(Principal const &principal)
Reads and returns the complete art configuration in the principal.
geo::Point_t icarus::findCathodeCenter ( geo::CryostatGeo const &  cryo)

Returns the center of the cathode in the specified cryostat.

Definition at line 40 of file CathodeCrossingUtils.cxx.

40  {
41 
42  // cathode position: assumes one cathode plane shared by all TPC
44 
45  for (geo::TPCGeo const& TPC: cryo.IterateTPCs())
46  cathodePos.add(TPC.GetCathodeCenter<geo::Point_t>());
47 
48  return cathodePos.middlePoint();
49 
50 } // icarus::findCathodeCenter()
Helper class to compute the middle point in a point set.
Geometry information for a single TPC.
Definition: TPCGeo.h:38
BEGIN_PROLOG TPC
void add(Point const &p)
Accumulates a point.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
icarus::CathodeDesc_t icarus::findTPCcathode ( geo::Point_t const &  point,
geo::GeometryCore const &  geom 
)

Returns cathode information for cryostat at the specified point.

The normal to the cathode is always the same as the normal of the first TPC in the cryostat containing point. This ensures consistency within the cryostat.

Definition at line 21 of file CathodeCrossingUtils.cxx.

22 {
23  geo::CryostatGeo const* pCryo = geom.PositionToCryostatPtr(point);
24  if (!pCryo) return {}; // all invalid, goodbye
25 
26  return {
27  findCathodeCenter(*pCryo) // center
28  , -(pCryo->TPC(0).DriftDir<geo::Vector_t>()) // normal
29  };
30 
31 } // icarus::findTPCcathode()
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:164
Vector DriftDir() const
Returns the direction of the drift (vector pointing toward the planes).
Definition: TPCGeo.h:773
Geometry information for a single cryostat.
Definition: CryostatGeo.h:43
geo::Point_t findCathodeCenter(geo::CryostatGeo const &cryo)
Returns the center of the cathode in the specified cryostat.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc&#39;th TPC in the cryostat.
Definition: CryostatGeo.cxx:93
template<bool CheckGrowing = true, typename Coll >
IntegerRanges<typename Coll::value_type, CheckGrowing> icarus::makeIntegerRanges ( Coll const &  coll)
matchCand icarus::makeNULLmc ( )

Definition at line 41 of file icaruscode/icaruscode/CRT/CRTUtils/CRTT0MatchAlg.cc.

41  {
43  matchCand null;
44  null.thishit = hit;
45  null.t0 = -99999;
46  null.dca = -99999;
47  null.extrapLen = -99999;
48  return null;
49  }
process_name hit
Definition: cheaterreco.fcl:51
std::ostream & icarus::operator<< ( std::ostream &  out,
icarus::WaveformRMS const &  baseline 
)

Prints the value of the RMS into a stream.

Definition at line 18 of file WaveformRMS.cxx.

19  { out << RMS.RMS(); return out; }
std::ostream & icarus::operator<< ( std::ostream &  out,
icarus::WaveformBaseline const &  baseline 
)

Prints the value of the baseline into a stream.

Definition at line 18 of file WaveformBaseline.cxx.

19  { out << baseline.baseline(); return out; }
BEGIN_PROLOG baseline
std::ostream & icarus::operator<< ( std::ostream &  out,
icarus::TriggerConfiguration const &  config 
)
inline

Prints the configuration into a stream with default verbosity.

Definition at line 339 of file TriggerConfiguration.h.

340  { config.dump(out); return out; }
std::ostream & icarus::operator<< ( std::ostream &  out,
KeyValuesData const &  data 
)

Definition at line 102 of file KeyValuesData.cxx.

103 {
104  out << data.size() << " items";
105  if (!data.empty()) {
106  out << ':';
107  for (auto const& item: data.items()) out << "\n " << item;
108  } // if has data
109  return out << "\n";
110 } // icarus::operator<< (KeyValuesData)
template<typename T , bool CheckGrowing>
std::ostream & icarus::operator<< ( std::ostream &  out,
IntegerRanges< T, CheckGrowing > const &  ranges 
)

Definition at line 443 of file IntegerRanges.h.

444  { r.dump(out); return out; }
esac echo uname r
template<typename T , bool CheckGrowing>
std::ostream & icarus::operator<< ( std::ostream &  out,
typename IntegerRanges< T, CheckGrowing >::Range_t const &  r 
)

Definition at line 436 of file IntegerRanges.h.

437  { r.dump(out); return out; }
esac echo uname r
std::ostream & icarus::operator<< ( std::ostream &  out,
KeyValuesData::Item const &  data 
)

Definition at line 90 of file KeyValuesData.cxx.

91 {
92  out << "'" << item.key() << "' (" << item.nValues() << ")";
93  if (!item.values().empty()) {
94  out << ':';
95  for (auto const& value: item.values()) out << " '" << value << '\'';
96  }
97  return out;
98 } // icarus::operator<< (KeyValuesData::Item)
temporary value
std::ostream& icarus::operator<< ( std::ostream &  out,
dumpChannel const &  d 
)

Definition at line 1226 of file DaqDecoderICARUSPMT_module.cc.

1226  {
1227  return out << (d.wf.channelSetup->category.empty()? std::dec: std::hex)
1228  << d.wf.waveform.ChannelNumber() << std::dec;
1229  }
std::ostream& icarus::operator<< ( std::ostream &  out,
DaqDecoderICARUSPMT::SplitTimestamp_t const &  time 
)

Definition at line 1259 of file DaqDecoderICARUSPMT_module.cc.

1260  {
1261  out << time.split.seconds << '.'
1262  << std::setfill('0') << std::setw(9) << time.split.nanoseconds;
1263  return out;
1264  } // operator<< (std::ostream&, PMTDecoder::SplitTimestamp_t)
void icarus::set_def ( sbn::crt::CRTTzero  tz)
void icarus::SortAuxDetSensitiveStandard ( std::vector< geo::AuxDetSensitiveGeo > &  adsgeo)

Sorts ICARUS CRT submodules in standard configuration.

Definition at line 108 of file AuxDetSorting.cxx.

109 {
110  std::sort(adsgeo.begin(), adsgeo.end(), AuxDetSensitiveStandardSortingRule);
111 }
void icarus::SortAuxDetsStandard ( std::vector< geo::AuxDetGeo > &  adgeo)

Sorts ICARUS CRT modules in standard configuration.

Definition at line 101 of file AuxDetSorting.cxx.

101  {
102  std::sort(adgeo.begin(), adgeo.end(), AuxDetStandardSortingRule);
103 }
void icarus::vmanip ( std::vector< double >  v,
double *  ave,
double *  rms 
)

Variable Documentation

constexpr WeakCurrentType icarus::AnyWeakCurrentType { WeakCurrentType::any }

Constant value for any weak current type.

Definition at line 156 of file WeakCurrentType.h.

constexpr WeakCurrentType icarus::ChargedCurrentType { WeakCurrentType::CC }

Constant value for a weak charged current type.

Definition at line 153 of file WeakCurrentType.h.

constexpr WeakCurrentType icarus::NeutralCurrentType { WeakCurrentType::NC }

Constant value for a weak neutral current type.

Definition at line 150 of file WeakCurrentType.h.