LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
cheat::BackTrackerService Class Reference

#include "BackTrackerService.h"

Inheritance diagram for cheat::BackTrackerService:
cheat::BackTracker

Classes

struct  fhiclConfig
 

Public Types

using provider_type = BackTracker
 

Public Member Functions

const provider_typeprovider () const
 
 BackTrackerService (const fhicl::ParameterSet &pSet, art::ActivityRegistry &reg)
 
 BackTrackerService (const fhiclConfig &config, art::ActivityRegistry &reg)
 
void Rebuild (const art::Event &evt)
 
const std::vector< art::Ptr< sim::SimChannel > > & SimChannels () const
 
std::vector< const sim::IDE * > TrackIdToSimIDEs_Ps (int const &id) const
 
std::vector< const sim::IDE * > TrackIdToSimIDEs_Ps (int const &id, const geo::View_t view) const
 
art::Ptr< sim::SimChannelFindSimChannel (raw::ChannelID_t channel) const
 
std::vector< sim::TrackIDEChannelToTrackIDEs (detinfo::DetectorClocksData const &clockData, raw::ChannelID_t channel, const double hit_start_time, const double hit_end_time) const
 
std::vector< sim::TrackIDEHitToTrackIDEs (detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
 
std::vector< sim::TrackIDEHitToTrackIDEs (detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
 
std::vector< int > HitToTrackIds (detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
 
std::vector< sim::TrackIDEHitToEveTrackIDEs (detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
 
std::vector< sim::TrackIDEHitToEveTrackIDEs (detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
 
std::vector< art::Ptr< recob::Hit > > TrackIdToHits_Ps (detinfo::DetectorClocksData const &clockData, int tkId, std::vector< art::Ptr< recob::Hit >> const &hitsIn) const
 
std::vector< std::vector< art::Ptr< recob::Hit > > > TrackIdsToHits_Ps (detinfo::DetectorClocksData const &clockData, std::vector< int > const &tkIds, std::vector< art::Ptr< recob::Hit >> const &hitsIn) const
 
std::vector< sim::IDEHitToAvgSimIDEs (detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
 
std::vector< sim::IDEHitToAvgSimIDEs (detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > hit) const
 
std::vector< const sim::IDE * > HitToSimIDEs_Ps (detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
 
std::vector< const sim::IDE * > HitToSimIDEs_Ps (detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
 
std::vector< double > SimIDEsToXYZ (std::vector< sim::IDE > const &ides) const
 
std::vector< double > SimIDEsToXYZ (std::vector< const sim::IDE * > const &ide_Ps) const
 
std::vector< double > HitToXYZ (detinfo::DetectorClocksData const &clockData, const recob::Hit &hit) const
 
std::vector< double > HitToXYZ (detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
 
double HitCollectionPurity (detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits) const
 
double HitChargeCollectionPurity (detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits) const
 
double HitCollectionEfficiency (detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits, std::vector< art::Ptr< recob::Hit >> const &allhits, geo::View_t const &view) const
 
double HitChargeCollectionEfficiency (detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits, std::vector< art::Ptr< recob::Hit >> const &allhits, geo::View_t const &view) const
 
std::set< int > GetSetOfTrackIds () const
 
std::set< int > GetSetOfEveIds () const
 
std::set< int > GetSetOfTrackIds (detinfo::DetectorClocksData const &clockData, std::vector< art::Ptr< recob::Hit >> const &hits) const
 
std::set< int > GetSetOfEveIds (detinfo::DetectorClocksData const &clockData, std::vector< art::Ptr< recob::Hit >> const &hits) const
 
std::vector< double > SpacePointHitsToWeightedXYZ (detinfo::DetectorClocksData const &clockData, std::vector< art::Ptr< recob::Hit >> const &hits) const
 
std::vector< art::Ptr< recob::Hit > > SpacePointToHits_Ps (art::Ptr< recob::SpacePoint > const &spt) const
 
std::vector< double > SpacePointToXYZ (detinfo::DetectorClocksData const &clockData, art::Ptr< recob::SpacePoint > const &spt) const
 

Private Member Functions

void priv_PrepEvent (const art::Event &evt, art::ScheduleContext)
 
void priv_PrepSimChannels (const art::Event &evt)
 
void priv_PrepFailed ()
 
bool priv_CanRun (const art::Event &evt)
 
bool priv_SimChannelsReady ()
 
template<typename Evt >
void PrepEvent (const Evt &evt)
 
template<typename Evt >
void PrepSimChannels (const Evt &evt)
 
template<typename Evt >
bool CanRun (const Evt &evt)
 
template<typename Evt >
std::vector< art::Ptr< recob::Hit > > SpacePointToHits_Ps (art::Ptr< recob::SpacePoint > const &spt, const Evt &evt) const
 
template<typename Evt >
std::vector< double > SpacePointToXYZ (detinfo::DetectorClocksData const &clockData, art::Ptr< recob::SpacePoint > const &spt, const Evt &evt) const
 
void ClearEvent ()
 
bool SimChannelsReady () const
 
art::Ptr< sim::SimChannelFindSimChannelPtr (raw::ChannelID_t channel) const
 Returns the cached sim::SimChannel on the specified channel. More...
 
std::vector< sim::IDEHitToAvgSimIDEs (detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &hit) const
 

Private Attributes

const art::EventfEvt = nullptr
 

Detailed Description

Definition at line 45 of file BackTrackerService.h.

Member Typedef Documentation

Constructor & Destructor Documentation

cheat::BackTrackerService::BackTrackerService ( const fhicl::ParameterSet pSet,
art::ActivityRegistry reg 
)

Definition at line 26 of file BackTrackerService.cc.

References priv_PrepEvent(), and art::ActivityRegistry::sPreProcessEvent.

28  : BackTracker(pSet.get<fhicl::ParameterSet>("BackTracker"),
29  lar::providerFrom<cheat::ParticleInventoryService>(),
30  lar::providerFrom<geo::Geometry>())
31  {
33  }
BackTracker(const fhiclConfig &config, const cheat::ParticleInventory *partInv, const geo::GeometryCore *geom)
Definition: BackTracker.cc:25
T get(std::string const &key) const
Definition: ParameterSet.h:314
void priv_PrepEvent(const art::Event &evt, art::ScheduleContext)
GlobalSignal< detail::SignalResponseType::FIFO, void(Event const &, ScheduleContext)> sPreProcessEvent
cheat::BackTrackerService::BackTrackerService ( const fhiclConfig config,
art::ActivityRegistry reg 
)

Definition at line 36 of file BackTrackerService.cc.

References priv_PrepEvent(), and art::ActivityRegistry::sPreProcessEvent.

37  : BackTracker(config.BackTrackerTable(),
38  lar::providerFrom<cheat::ParticleInventoryService>(),
39  lar::providerFrom<geo::Geometry>())
40  {
41  // This line is only to be included until art/LArSoft discussion about lazy
42  // rebuild can be completed.
44  }
BackTracker(const fhiclConfig &config, const cheat::ParticleInventory *partInv, const geo::GeometryCore *geom)
Definition: BackTracker.cc:25
void priv_PrepEvent(const art::Event &evt, art::ScheduleContext)
GlobalSignal< detail::SignalResponseType::FIFO, void(Event const &, ScheduleContext)> sPreProcessEvent

Member Function Documentation

template<typename Evt >
bool cheat::BackTracker::CanRun ( const Evt &  evt)
inlineinherited

Definition at line 92 of file BackTracker.h.

References tca::evt.

Referenced by priv_CanRun().

93  {
94  return !evt.isRealData() || fOverrideRealData;
95  }
const bool fOverrideRealData
Definition: BackTracker.h:246
TCEvent evt
Definition: DataStructs.cxx:8
std::vector< sim::TrackIDE > cheat::BackTrackerService::ChannelToTrackIDEs ( detinfo::DetectorClocksData const &  clockData,
raw::ChannelID_t  channel,
const double  hit_start_time,
const double  hit_end_time 
) const

Definition at line 151 of file BackTrackerService.cc.

References cheat::BackTracker::ChannelToTrackIDEs().

Referenced by tca::GetOrigin().

156  {
157  // Removed until Lazy Rebuild works
158  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
159  return BackTracker::ChannelToTrackIDEs(clockData, channel, hit_start_time, hit_end_time);
160  }
std::vector< sim::TrackIDE > ChannelToTrackIDEs(detinfo::DetectorClocksData const &clockData, raw::ChannelID_t channel, const double hit_start_time, const double hit_end_time) const
Definition: BackTracker.cc:127
void cheat::BackTracker::ClearEvent ( )
inherited

Definition at line 54 of file BackTracker.cc.

References cheat::BackTracker::fSimChannels.

Referenced by priv_PrepEvent().

55  {
56  fSimChannels.clear();
57  // fAllHitList.clear();
58  }
std::vector< art::Ptr< sim::SimChannel > > fSimChannels
Definition: BackTracker.h:249
art::Ptr< sim::SimChannel > cheat::BackTrackerService::FindSimChannel ( raw::ChannelID_t  channel) const

Definition at line 143 of file BackTrackerService.cc.

References cheat::BackTracker::FindSimChannel().

144  {
145  // Removed until Lazy Rebuild works
146  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
147  return BackTracker::FindSimChannel(channel);
148  }
art::Ptr< sim::SimChannel > FindSimChannel(raw::ChannelID_t channel) const
Returns the cached sim::SimChannel on the specified channel.
Definition: BackTracker.cc:119
art::Ptr< sim::SimChannel > cheat::BackTracker::FindSimChannelPtr ( raw::ChannelID_t  channel) const
inherited

Returns the cached sim::SimChannel on the specified channel.

Parameters
channelID of the TPC channel to find
Returns
art pointer to sim::SimChannel, or an null pointer if none
See also
FindSimChannel()

Definition at line 105 of file BackTracker.cc.

References cheat::BackTracker::fSimChannels.

Referenced by cheat::BackTracker::ChannelToTrackIDEs(), and cheat::BackTracker::FindSimChannel().

106  {
107  auto ilb = std::lower_bound(fSimChannels.begin(),
108  fSimChannels.end(),
109  channel,
110  [](art::Ptr<sim::SimChannel> const& a, raw::ChannelID_t channel) {
111  return (a->Channel() < channel);
112  });
113  return ((ilb != fSimChannels.end()) && ((*ilb)->Channel() == channel)) ?
114  *ilb :
116  }
std::vector< art::Ptr< sim::SimChannel > > fSimChannels
Definition: BackTracker.h:249
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
std::set< int > cheat::BackTrackerService::GetSetOfEveIds ( ) const

Definition at line 374 of file BackTrackerService.cc.

References cheat::BackTracker::GetSetOfEveIds().

375  {
376  // Removed until Lazy Rebuild works
377  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
379  }
std::set< int > GetSetOfEveIds() const
Definition: BackTracker.h:228
std::set< int > cheat::BackTrackerService::GetSetOfEveIds ( detinfo::DetectorClocksData const &  clockData,
std::vector< art::Ptr< recob::Hit >> const &  hits 
) const

Definition at line 392 of file BackTrackerService.cc.

References cheat::BackTracker::GetSetOfEveIds(), and hits().

395  {
396  // Removed until Lazy Rebuild works
397  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
398  return BackTracker::GetSetOfEveIds(clockData, hits);
399  }
std::set< int > GetSetOfEveIds() const
Definition: BackTracker.h:228
std::set< int > cheat::BackTrackerService::GetSetOfTrackIds ( ) const

Definition at line 366 of file BackTrackerService.cc.

References cheat::BackTracker::GetSetOfTrackIds().

Referenced by cheat::RecoCheckAna::CheckReco(), and cheat::RecoCheckAna::FillResults().

367  {
368  // Removed until Lazy Rebuild works
369  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
371  }
std::set< int > GetSetOfTrackIds() const
Definition: BackTracker.h:227
std::set< int > cheat::BackTrackerService::GetSetOfTrackIds ( detinfo::DetectorClocksData const &  clockData,
std::vector< art::Ptr< recob::Hit >> const &  hits 
) const

Definition at line 382 of file BackTrackerService.cc.

References cheat::BackTracker::GetSetOfTrackIds(), and hits().

385  {
386  // Removed until Lazy Rebuild works
387  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
388  return BackTracker::GetSetOfTrackIds(clockData, hits);
389  }
std::set< int > GetSetOfTrackIds() const
Definition: BackTracker.h:227
double cheat::BackTrackerService::HitChargeCollectionEfficiency ( detinfo::DetectorClocksData const &  clockData,
std::set< int > const &  trackIds,
std::vector< art::Ptr< recob::Hit >> const &  hits,
std::vector< art::Ptr< recob::Hit >> const &  allhits,
geo::View_t const &  view 
) const

Definition at line 353 of file BackTrackerService.cc.

References cheat::BackTracker::HitChargeCollectionEfficiency(), and hits().

359  {
360  //Removed until Lazy Rebuild works
361  //if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
362  return BackTracker::HitChargeCollectionEfficiency(clockData, trackIds, hits, allhits, view);
363  }
double HitChargeCollectionEfficiency(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits, std::vector< art::Ptr< recob::Hit >> const &allhits, geo::View_t const &view) const
Definition: BackTracker.cc:490
double cheat::BackTrackerService::HitChargeCollectionPurity ( detinfo::DetectorClocksData const &  clockData,
std::set< int > const &  trackIds,
std::vector< art::Ptr< recob::Hit >> const &  hits 
) const

Definition at line 329 of file BackTrackerService.cc.

References cheat::BackTracker::HitChargeCollectionPurity(), and hits().

333  {
334  // Removed until Lazy Rebuild works
335  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
336  return BackTracker::HitChargeCollectionPurity(clockData, trackIds, hits);
337  }
double HitChargeCollectionPurity(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits) const
Definition: BackTracker.cc:432
double cheat::BackTrackerService::HitCollectionEfficiency ( detinfo::DetectorClocksData const &  clockData,
std::set< int > const &  trackIds,
std::vector< art::Ptr< recob::Hit >> const &  hits,
std::vector< art::Ptr< recob::Hit >> const &  allhits,
geo::View_t const &  view 
) const

Definition at line 340 of file BackTrackerService.cc.

References cheat::BackTracker::HitCollectionEfficiency(), and hits().

Referenced by cheat::CheckBackTracking::analyze(), trkf::TrackAna::analyze(), cheat::RecoCheckAna::CheckReco(), cheat::RecoCheckAna::CheckRecoEvents(), and cheat::RecoCheckAna::CheckRecoVertices().

346  {
347  // Removed until Lazy Rebuild works
348  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
349  return BackTracker::HitCollectionEfficiency(clockData, trackIds, hits, allhits, view);
350  }
double HitCollectionEfficiency(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits, std::vector< art::Ptr< recob::Hit >> const &allhits, geo::View_t const &view) const
Definition: BackTracker.cc:452
double cheat::BackTrackerService::HitCollectionPurity ( detinfo::DetectorClocksData const &  clockData,
std::set< int > const &  trackIds,
std::vector< art::Ptr< recob::Hit >> const &  hits 
) const

Definition at line 318 of file BackTrackerService.cc.

References cheat::BackTracker::HitCollectionPurity(), and hits().

Referenced by cheat::CheckBackTracking::analyze(), trkf::TrackAna::analyze(), cheat::RecoCheckAna::CheckReco(), cheat::RecoCheckAna::CheckRecoEvents(), and cheat::RecoCheckAna::CheckRecoVertices().

322  {
323  // Removed until Lazy Rebuild works
324  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
325  return BackTracker::HitCollectionPurity(clockData, trackIds, hits);
326  }
double HitCollectionPurity(detinfo::DetectorClocksData const &clockData, std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit >> const &hits) const
Definition: BackTracker.cc:413
std::vector< sim::IDE > cheat::BackTrackerService::HitToAvgSimIDEs ( detinfo::DetectorClocksData const &  clockData,
recob::Hit const &  hit 
) const

Definition at line 243 of file BackTrackerService.cc.

References cheat::BackTracker::HitToAvgSimIDEs().

Referenced by trkf::SpacePointAlg::makeSpacePoints().

246  {
247  // Removed until Lazy Rebuild works
248  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
249  return BackTracker::HitToAvgSimIDEs(clockData, hit);
250  }
Detector simulation of raw signals on wires.
std::vector< sim::IDE > HitToAvgSimIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Definition: BackTracker.cc:304
std::vector< sim::IDE > cheat::BackTrackerService::HitToAvgSimIDEs ( detinfo::DetectorClocksData const &  clockData,
art::Ptr< recob::Hit hit 
) const

Definition at line 253 of file BackTrackerService.cc.

References cheat::BackTracker::HitToAvgSimIDEs().

256  {
257  // Removed until Lazy Rebuild works
258  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
259  return BackTracker::HitToAvgSimIDEs(clockData, hit);
260  }
std::vector< sim::IDE > HitToAvgSimIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Definition: BackTracker.cc:304
std::vector<sim::IDE> cheat::BackTracker::HitToAvgSimIDEs ( detinfo::DetectorClocksData const &  clockData,
art::Ptr< recob::Hit > const &  hit 
) const
inlineinherited

Definition at line 183 of file BackTracker.h.

185  {
186  return this->HitToAvgSimIDEs(clockData, *hit);
187  }
std::vector< sim::IDE > HitToAvgSimIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Definition: BackTracker.cc:304
std::vector< sim::TrackIDE > cheat::BackTrackerService::HitToEveTrackIDEs ( detinfo::DetectorClocksData const &  clockData,
recob::Hit const &  hit 
) const

Definition at line 192 of file BackTrackerService.cc.

References cheat::BackTracker::HitToEveTrackIDEs().

Referenced by cheat::CheckBackTracking::analyze(), cluster::DBclusterAna::analyze(), DUNE::NeutrinoShowerEff::checkCNNtrkshw(), cluster::ClusterCheater::produce(), shower::TCShowerTemplateMaker::showerProfileTrue(), shower::TCShowerAnalysis::truthMatcher(), and DUNE::NeutrinoShowerEff::truthMatcher().

195  {
196  // Removed until Lazy Rebuild works
197  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
198  return BackTracker::HitToEveTrackIDEs(clockData, hit);
199  }
std::vector< sim::TrackIDE > HitToEveTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Definition: BackTracker.cc:196
Detector simulation of raw signals on wires.
std::vector< sim::TrackIDE > cheat::BackTrackerService::HitToEveTrackIDEs ( detinfo::DetectorClocksData const &  clockData,
art::Ptr< recob::Hit > const &  hit 
) const

Definition at line 202 of file BackTrackerService.cc.

References cheat::BackTracker::HitToEveTrackIDEs().

205  {
206  // Removed until Lazy Rebuild works
207  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
208  return BackTracker::HitToEveTrackIDEs(clockData, hit);
209  }
std::vector< sim::TrackIDE > HitToEveTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Definition: BackTracker.cc:196
std::vector< const sim::IDE * > cheat::BackTrackerService::HitToSimIDEs_Ps ( detinfo::DetectorClocksData const &  clockData,
recob::Hit const &  hit 
) const

Definition at line 263 of file BackTrackerService.cc.

References cheat::BackTracker::HitToSimIDEs_Ps().

Referenced by hit::DisambigCheater::InitHitToWids().

266  {
267  //Removed until Lazy Rebuild works
268  //if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
269  return BackTracker::HitToSimIDEs_Ps(clockData, hit);
270  }
Detector simulation of raw signals on wires.
std::vector< const sim::IDE * > HitToSimIDEs_Ps(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Definition: BackTracker.cc:318
std::vector< const sim::IDE * > cheat::BackTrackerService::HitToSimIDEs_Ps ( detinfo::DetectorClocksData const &  clockData,
art::Ptr< recob::Hit > const &  hit 
) const

Definition at line 273 of file BackTrackerService.cc.

References cheat::BackTracker::HitToSimIDEs_Ps().

276  {
277  //Removed until Lazy Rebuild works
278  //if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
279  return BackTracker::HitToSimIDEs_Ps(clockData, hit);
280  }
std::vector< const sim::IDE * > HitToSimIDEs_Ps(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Definition: BackTracker.cc:318
std::vector< sim::TrackIDE > cheat::BackTrackerService::HitToTrackIDEs ( detinfo::DetectorClocksData const &  clockData,
recob::Hit const &  hit 
) const
std::vector< sim::TrackIDE > cheat::BackTrackerService::HitToTrackIDEs ( detinfo::DetectorClocksData const &  clockData,
art::Ptr< recob::Hit > const &  hit 
) const

Definition at line 173 of file BackTrackerService.cc.

References cheat::BackTracker::HitToTrackIDEs().

176  {
177  // Removed until Lazy Rebuild works
178  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
179  return BackTracker::HitToTrackIDEs(clockData, hit);
180  }
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Definition: BackTracker.cc:174
std::vector< int > cheat::BackTrackerService::HitToTrackIds ( detinfo::DetectorClocksData const &  clockData,
recob::Hit const &  hit 
) const

Definition at line 183 of file BackTrackerService.cc.

References cheat::BackTracker::HitToTrackIds().

185  {
186  // Removed until Lazy Rebuild works
187  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
188  return BackTracker::HitToTrackIds(clockData, hit);
189  }
Detector simulation of raw signals on wires.
std::vector< int > HitToTrackIds(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
Definition: BackTracker.cc:184
std::vector< double > cheat::BackTrackerService::HitToXYZ ( detinfo::DetectorClocksData const &  clockData,
const recob::Hit hit 
) const

Definition at line 300 of file BackTrackerService.cc.

References cheat::BackTracker::HitToXYZ().

Referenced by cheat::CheckBackTracking::analyze(), hit::MagDriftAna::analyze(), hit::GausHitFinderAna::analyze(), hit::HitFinderAna::analyze(), trkf::SpacePointAna::analyze(), HitToXYZ(), shwf::ShowerCheater::produce(), trkf::TrackCheater::produce(), apa::DisambigAlg::RunDisambig(), apa::DisambigAlg::TrivialDisambig(), and reco3d::PlotSpacePoints::TrueSpacePoints().

302  {
303  // Removed until Lazy Rebuild works
304  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
305  return BackTracker::HitToXYZ(clockData, hit);
306  }
std::vector< double > HitToXYZ(detinfo::DetectorClocksData const &clockData, const recob::Hit &hit) const
Definition: BackTracker.cc:405
std::vector< double > cheat::BackTrackerService::HitToXYZ ( detinfo::DetectorClocksData const &  clockData,
art::Ptr< recob::Hit > const &  hit 
) const

Definition at line 309 of file BackTrackerService.cc.

References HitToXYZ().

311  {
312  // Removed until Lazy Rebuild works
313  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
314  return HitToXYZ(clockData, *hit);
315  }
std::vector< double > HitToXYZ(detinfo::DetectorClocksData const &clockData, const recob::Hit &hit) const
template<typename Evt >
void cheat::BackTracker::PrepEvent ( const Evt &  evt)
inherited
template<typename Evt >
void cheat::BackTracker::PrepSimChannels ( const Evt &  evt)
inherited

Referenced by priv_PrepSimChannels().

bool cheat::BackTrackerService::priv_CanRun ( const art::Event evt)
private

Definition at line 71 of file BackTrackerService.cc.

References cheat::BackTracker::CanRun().

Referenced by priv_PrepEvent(), and priv_PrepSimChannels().

72  {
73  return BackTracker::CanRun(evt);
74  }
bool CanRun(const Evt &evt)
Definition: BackTracker.h:92
void cheat::BackTrackerService::priv_PrepEvent ( const art::Event evt,
art::ScheduleContext   
)
private

Definition at line 60 of file BackTrackerService.cc.

References cheat::BackTracker::ClearEvent(), tca::evt, fEvt, priv_CanRun(), and priv_PrepSimChannels().

Referenced by BackTrackerService(), and Rebuild().

61  {
62  fEvt = &evt;
64  if (!this->priv_CanRun(evt)) { return; }
65  this->priv_PrepSimChannels(evt);
66  fEvt = nullptr; // don't save the pointer because it will be useless after this
67  // anyways. I want to make sure calls at the wrong time crash.
68  }
void priv_PrepSimChannels(const art::Event &evt)
bool priv_CanRun(const art::Event &evt)
TCEvent evt
Definition: DataStructs.cxx:8
void cheat::BackTrackerService::priv_PrepFailed ( )
private

Definition at line 77 of file BackTrackerService.cc.

Referenced by priv_PrepSimChannels().

78  {
79  throw cet::exception("BackTrackerService")
80  << "The called Prep Function failed. This is most likely due "
81  << "to a BackTracker function being used on a file that is real data.";
82  }
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void cheat::BackTrackerService::priv_PrepSimChannels ( const art::Event evt)
private

Definition at line 85 of file BackTrackerService.cc.

References cheat::BackTracker::PrepSimChannels(), priv_CanRun(), priv_PrepFailed(), and priv_SimChannelsReady().

Referenced by priv_PrepEvent().

86  {
87  if (!this->priv_CanRun(evt)) { this->priv_PrepFailed(); }
88  if (this->priv_SimChannelsReady()) { return; }
89  try {
91  }
92  catch (...) {
93  mf::LogWarning("BackTrackerService")
94  << "Rebuild failed to get the SimChannels. This is expected when running on a generation "
95  "or simulation step.";
96  }
97  }
void PrepSimChannels(const Evt &evt)
bool priv_CanRun(const art::Event &evt)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
bool cheat::BackTrackerService::priv_SimChannelsReady ( )
inlineprivate

Definition at line 163 of file BackTrackerService.h.

References DECLARE_ART_SERVICE.

Referenced by priv_PrepSimChannels().

163 { return BackTracker::SimChannelsReady(); }
bool SimChannelsReady() const
Definition: BackTracker.h:111
const provider_type* cheat::BackTrackerService::provider ( ) const
inline

Definition at line 54 of file BackTrackerService.h.

References tca::evt, hits(), and lar::dump::vector().

54 { return static_cast<provider_type const*>(this); }
void cheat::BackTrackerService::Rebuild ( const art::Event evt)

Event Rebuild Implimentation////////// This section contains the implimentation /// of all Prep templates from the service /// provider. ///

Definition at line 54 of file BackTrackerService.cc.

References art::ScheduleContext::invalid(), and priv_PrepEvent().

Referenced by cheat::BackTrackerLoader::produce().

55  {
57  }
void priv_PrepEvent(const art::Event &evt, art::ScheduleContext)
static ScheduleContext invalid()
const std::vector< art::Ptr< sim::SimChannel > > & cheat::BackTrackerService::SimChannels ( ) const

Definition at line 118 of file BackTrackerService.cc.

References cheat::BackTracker::SimChannels().

119  {
120  // Removed until Lazy Rebuild works
121  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
122  return BackTracker::SimChannels();
123  }
const std::vector< art::Ptr< sim::SimChannel > > & SimChannels() const
Definition: BackTracker.h:113
bool cheat::BackTracker::SimChannelsReady ( ) const
inlineinherited

Definition at line 111 of file BackTracker.h.

111 { return !fSimChannels.empty(); }
std::vector< art::Ptr< sim::SimChannel > > fSimChannels
Definition: BackTracker.h:249
std::vector< double > cheat::BackTrackerService::SimIDEsToXYZ ( std::vector< sim::IDE > const &  ides) const

Definition at line 283 of file BackTrackerService.cc.

References cheat::BackTracker::SimIDEsToXYZ().

Referenced by hit::DisambigCheater::InitHitToWids(), and trkf::SpacePointAlg::makeSpacePoints().

284  {
285  // Removed until Lazy Rebuild works
286  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
287  return BackTracker::SimIDEsToXYZ(ides);
288  }
std::vector< double > SimIDEsToXYZ(std::vector< sim::IDE > const &ides) const
Definition: BackTracker.cc:374
std::vector< double > cheat::BackTrackerService::SimIDEsToXYZ ( std::vector< const sim::IDE * > const &  ide_Ps) const

Definition at line 291 of file BackTrackerService.cc.

References cheat::BackTracker::SimIDEsToXYZ().

293  {
294  // Removed until Lazy Rebuild works
295  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
296  return BackTracker::SimIDEsToXYZ(ide_Ps);
297  }
std::vector< double > SimIDEsToXYZ(std::vector< sim::IDE > const &ides) const
Definition: BackTracker.cc:374
std::vector< double > cheat::BackTrackerService::SpacePointHitsToWeightedXYZ ( detinfo::DetectorClocksData const &  clockData,
std::vector< art::Ptr< recob::Hit >> const &  hits 
) const

Definition at line 402 of file BackTrackerService.cc.

References hits(), and cheat::BackTracker::SpacePointHitsToWeightedXYZ().

Referenced by trkf::SpacePointAna::analyze().

405  {
406  // if( !this->priv_CanRun(*fEvt)) { this->priv_PrepFailed(); }
407  return BackTracker::SpacePointHitsToWeightedXYZ(clockData, hits);
408  }
std::vector< double > SpacePointHitsToWeightedXYZ(detinfo::DetectorClocksData const &clockData, std::vector< art::Ptr< recob::Hit >> const &hits) const
Definition: BackTracker.cc:558
template<typename Evt >
std::vector<art::Ptr<recob::Hit> > cheat::BackTracker::SpacePointToHits_Ps ( art::Ptr< recob::SpacePoint > const &  spt,
const Evt &  evt 
) const
inherited

Referenced by SpacePointToHits_Ps().

std::vector< art::Ptr< recob::Hit > > cheat::BackTrackerService::SpacePointToHits_Ps ( art::Ptr< recob::SpacePoint > const &  spt) const

Definition at line 411 of file BackTrackerService.cc.

References fEvt, and cheat::BackTracker::SpacePointToHits_Ps().

413  {
414  // Note, this function is goofy in that it doesn't use the hits prepared by
415  // the module. That should likely be changed to make things more uniform.
416  // if( !this->priv_CanRun(*fEvt)) { this->priv_PrepFailed(); }
417  if (!fEvt) {
418  throw cet::exception("BackTrackerService")
419  << "This function is not yet implimented pending the implimentation of "
420  "backtracker lazy loading.";
421  }
423  }
std::vector< art::Ptr< recob::Hit > > SpacePointToHits_Ps(art::Ptr< recob::SpacePoint > const &spt, const Evt &evt) const
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
template<typename Evt >
std::vector<double> cheat::BackTracker::SpacePointToXYZ ( detinfo::DetectorClocksData const &  clockData,
art::Ptr< recob::SpacePoint > const &  spt,
const Evt &  evt 
) const
inherited

Referenced by SpacePointToXYZ().

std::vector< double > cheat::BackTrackerService::SpacePointToXYZ ( detinfo::DetectorClocksData const &  clockData,
art::Ptr< recob::SpacePoint > const &  spt 
) const

Definition at line 426 of file BackTrackerService.cc.

References fEvt, and cheat::BackTracker::SpacePointToXYZ().

429  {
430  // if( !this->priv_CanRun(*fEvt)) { this->priv_PrepFailed(); }
431  if (!fEvt) {
432  throw cet::exception("BackTrackerService")
433  << "This function is not yet implimented pending the implimentation of "
434  "backtracker lazy loading.";
435  }
436  return BackTracker::SpacePointToXYZ(clockData, spt, *fEvt);
437  }
std::vector< double > SpacePointToXYZ(detinfo::DetectorClocksData const &clockData, art::Ptr< recob::SpacePoint > const &spt, const Evt &evt) const
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
std::vector< std::vector< art::Ptr< recob::Hit > > > cheat::BackTrackerService::TrackIdsToHits_Ps ( detinfo::DetectorClocksData const &  clockData,
std::vector< int > const &  tkIds,
std::vector< art::Ptr< recob::Hit >> const &  hitsIn 
) const

Definition at line 232 of file BackTrackerService.cc.

References cheat::BackTracker::TrackIdsToHits_Ps().

Referenced by pfpf::PFPAna::analyze(), and cluster::ClusterAna::analyze().

236  {
237  // Removed until Lazy Rebuild works
238  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
239  return BackTracker::TrackIdsToHits_Ps(clockData, tkIds, hitsIn);
240  }
std::vector< std::vector< art::Ptr< recob::Hit > > > TrackIdsToHits_Ps(detinfo::DetectorClocksData const &clockData, std::vector< int > const &tkIds, std::vector< art::Ptr< recob::Hit >> const &hitsIn) const
Definition: BackTracker.cc:259
std::vector< art::Ptr< recob::Hit > > cheat::BackTrackerService::TrackIdToHits_Ps ( detinfo::DetectorClocksData const &  clockData,
int  tkId,
std::vector< art::Ptr< recob::Hit >> const &  hitsIn 
) const

Definition at line 212 of file BackTrackerService.cc.

References cheat::BackTracker::TrackIdToHits_Ps().

216  {
217  // Removed until Lazy Rebuild works
218  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
219  return BackTracker::TrackIdToHits_Ps(clockData, tkId, hitsIn);
220  }
std::vector< art::Ptr< recob::Hit > > TrackIdToHits_Ps(detinfo::DetectorClocksData const &clockData, int tkId, std::vector< art::Ptr< recob::Hit >> const &hitsIn) const
Definition: BackTracker.cc:230
std::vector< const sim::IDE * > cheat::BackTrackerService::TrackIdToSimIDEs_Ps ( int const &  id) const

Definition at line 126 of file BackTrackerService.cc.

References cheat::BackTracker::TrackIdToSimIDEs_Ps().

Referenced by cheat::RecoCheckAna::FillResults(), lcvn::AssignLabels::GetNeutralDaughterHitsRecursive(), and lcvn::AssignLabels::GetTopology().

127  {
128  // Removed until Lazy Rebuild works
129  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
131  }
std::vector< const sim::IDE * > TrackIdToSimIDEs_Ps(int const &id) const
Definition: BackTracker.cc:61
std::vector< const sim::IDE * > cheat::BackTrackerService::TrackIdToSimIDEs_Ps ( int const &  id,
const geo::View_t  view 
) const

Definition at line 134 of file BackTrackerService.cc.

References cheat::BackTracker::TrackIdToSimIDEs_Ps().

136  {
137  // Removed until Lazy Rebuild works
138  // if(!this->priv_SimChannelsReady()){this->priv_PrepSimChannels();}
139  return BackTracker::TrackIdToSimIDEs_Ps(id, view);
140  }
std::vector< const sim::IDE * > TrackIdToSimIDEs_Ps(int const &id) const
Definition: BackTracker.cc:61

Member Data Documentation

const art::Event* cheat::BackTrackerService::fEvt = nullptr
private

Definition at line 153 of file BackTrackerService.h.

Referenced by priv_PrepEvent(), SpacePointToHits_Ps(), and SpacePointToXYZ().


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