LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "BackTracker.h"
Classes | |
struct | fhiclConfig |
Public Member Functions | |
BackTracker (const fhiclConfig &config, const cheat::ParticleInventory *partInv, const geo::GeometryCore *geom) | |
BackTracker (const fhicl::ParameterSet &pSet, const cheat::ParticleInventory *partInv, const geo::GeometryCore *geom) | |
BackTracker (BackTracker const &)=delete | |
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 |
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::SimChannel > | FindSimChannelPtr (raw::ChannelID_t channel) const |
Returns the cached sim::SimChannel on the specified channel . More... | |
art::Ptr< sim::SimChannel > | FindSimChannel (raw::ChannelID_t channel) const |
Returns the cached sim::SimChannel on the specified channel . More... | |
std::vector< sim::TrackIDE > | ChannelToTrackIDEs (detinfo::DetectorClocksData const &clockData, raw::ChannelID_t channel, const double hit_start_time, const double hit_end_time) const |
std::vector< sim::TrackIDE > | HitToTrackIDEs (detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const |
std::vector< sim::TrackIDE > | HitToTrackIDEs (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::TrackIDE > | HitToEveTrackIDEs (detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const |
std::vector< sim::TrackIDE > | HitToEveTrackIDEs (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::IDE > | HitToAvgSimIDEs (detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const |
std::vector< sim::IDE > | HitToAvgSimIDEs (detinfo::DetectorClocksData const &clockData, art::Ptr< recob::Hit > const &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 |
Private Attributes | |
const cheat::ParticleInventory * | fPartInv |
const geo::GeometryCore * | fGeom |
const art::InputTag | fG4ModuleLabel |
const art::InputTag | fSimChannelModuleLabel |
const art::InputTag | fHitLabel |
const double | fMinHitEnergyFraction |
const bool | fOverrideRealData |
const double | fHitTimeRMS |
std::vector< art::Ptr< sim::SimChannel > > | fSimChannels |
Definition at line 39 of file BackTracker.h.
cheat::BackTracker::BackTracker | ( | const fhiclConfig & | config, |
const cheat::ParticleInventory * | partInv, | ||
const geo::GeometryCore * | geom | ||
) |
Definition at line 25 of file BackTracker.cc.
cheat::BackTracker::BackTracker | ( | const fhicl::ParameterSet & | pSet, |
const cheat::ParticleInventory * | partInv, | ||
const geo::GeometryCore * | geom | ||
) |
Definition at line 39 of file BackTracker.cc.
|
delete |
|
inline |
Definition at line 92 of file BackTracker.h.
References tca::evt.
Referenced by cheat::BackTrackerService::priv_CanRun().
std::vector< sim::TrackIDE > cheat::BackTracker::ChannelToTrackIDEs | ( | detinfo::DetectorClocksData const & | clockData, |
raw::ChannelID_t | channel, | ||
const double | hit_start_time, | ||
const double | hit_end_time | ||
) | const |
Definition at line 127 of file BackTracker.cc.
References e, energy, sim::TrackIDE::energy, sim::TrackIDE::energyFrac, FindSimChannelPtr(), sim::NoParticleId, sim::TrackIDE::numElectrons, detinfo::DetectorClocksData::TPCTick2TDC(), sim::TrackIDE::trackID, and sim::SimChannel::TrackIDsAndEnergies().
Referenced by cheat::BackTrackerService::ChannelToTrackIDEs(), GetSetOfTrackIds(), HitToTrackIDEs(), TrackIdsToHits_Ps(), and TrackIdToHits_Ps().
void cheat::BackTracker::ClearEvent | ( | ) |
Definition at line 54 of file BackTracker.cc.
References fSimChannels.
Referenced by cheat::BackTrackerService::priv_PrepEvent().
art::Ptr< sim::SimChannel > cheat::BackTracker::FindSimChannel | ( | raw::ChannelID_t | channel | ) | const |
Returns the cached sim::SimChannel
on the specified channel
.
channel | ID of the TPC channel to find |
sim::SimChannel
cet::exception | (category: "BackTracker" ) if no sim::SimChannel for the requested channel found |
Definition at line 119 of file BackTracker.cc.
References FindSimChannelPtr().
Referenced by cheat::BackTrackerService::FindSimChannel(), HitToAvgSimIDEs(), and HitToSimIDEs_Ps().
art::Ptr< sim::SimChannel > cheat::BackTracker::FindSimChannelPtr | ( | raw::ChannelID_t | channel | ) | const |
Returns the cached sim::SimChannel
on the specified channel
.
channel | ID of the TPC channel to find |
sim::SimChannel
, or an null pointer if none Definition at line 105 of file BackTracker.cc.
References fSimChannels.
Referenced by ChannelToTrackIDEs(), and FindSimChannel().
|
inline |
Definition at line 228 of file BackTracker.h.
References hits(), and lar::dump::vector().
Referenced by cheat::BackTrackerService::GetSetOfEveIds().
std::set< int > cheat::BackTracker::GetSetOfEveIds | ( | detinfo::DetectorClocksData const & | clockData, |
std::vector< art::Ptr< recob::Hit >> const & | hits | ||
) | const |
Definition at line 543 of file BackTracker.cc.
References hits(), and HitToEveTrackIDEs().
|
inline |
Definition at line 227 of file BackTracker.h.
Referenced by cheat::BackTrackerService::GetSetOfTrackIds().
std::set< int > cheat::BackTracker::GetSetOfTrackIds | ( | detinfo::DetectorClocksData const & | clockData, |
std::vector< art::Ptr< recob::Hit >> const & | hits | ||
) | const |
Definition at line 526 of file BackTracker.cc.
References ChannelToTrackIDEs(), util::end(), fHitTimeRMS, and hits().
double cheat::BackTracker::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 490 of file BackTracker.cc.
References fMinHitEnergyFraction, hits(), HitToTrackIDEs(), and geo::k3D.
Referenced by cheat::BackTrackerService::HitChargeCollectionEfficiency().
double cheat::BackTracker::HitChargeCollectionPurity | ( | detinfo::DetectorClocksData const & | clockData, |
std::set< int > const & | trackIds, | ||
std::vector< art::Ptr< recob::Hit >> const & | hits | ||
) | const |
Definition at line 432 of file BackTracker.cc.
References hits(), and HitToTrackIDEs().
Referenced by cheat::BackTrackerService::HitChargeCollectionPurity().
double cheat::BackTracker::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 452 of file BackTracker.cc.
References fMinHitEnergyFraction, hits(), HitToTrackIDEs(), and geo::k3D.
Referenced by cheat::BackTrackerService::HitCollectionEfficiency().
double cheat::BackTracker::HitCollectionPurity | ( | detinfo::DetectorClocksData const & | clockData, |
std::set< int > const & | trackIds, | ||
std::vector< art::Ptr< recob::Hit >> const & | hits | ||
) | const |
Definition at line 413 of file BackTracker.cc.
References hits(), and HitToTrackIDEs().
Referenced by cheat::BackTrackerService::HitCollectionPurity().
std::vector< sim::IDE > cheat::BackTracker::HitToAvgSimIDEs | ( | detinfo::DetectorClocksData const & | clockData, |
recob::Hit const & | hit | ||
) | const |
Definition at line 304 of file BackTracker.cc.
References recob::Hit::Channel(), fHitTimeRMS, FindSimChannel(), recob::Hit::PeakTimeMinusRMS(), recob::Hit::PeakTimePlusRMS(), and detinfo::DetectorClocksData::TPCTick2TDC().
Referenced by cheat::BackTrackerService::HitToAvgSimIDEs().
|
inline |
Definition at line 183 of file BackTracker.h.
std::vector< sim::TrackIDE > cheat::BackTracker::HitToEveTrackIDEs | ( | detinfo::DetectorClocksData const & | clockData, |
recob::Hit const & | hit | ||
) | const |
Definition at line 196 of file BackTracker.cc.
References sim::TrackIDE::energy, sim::TrackIDE::energyFrac, fPartInv, HitToTrackIDEs(), sim::TrackIDE::numElectrons, sim::TrackIDE::trackID, and cheat::ParticleInventory::TrackIdToEveTrackId().
Referenced by GetSetOfEveIds(), and cheat::BackTrackerService::HitToEveTrackIDEs().
|
inline |
Definition at line 163 of file BackTracker.h.
References lar::dump::vector().
std::vector< const sim::IDE * > cheat::BackTracker::HitToSimIDEs_Ps | ( | detinfo::DetectorClocksData const & | clockData, |
recob::Hit const & | hit | ||
) | const |
Definition at line 318 of file BackTracker.cc.
References recob::Hit::Channel(), fHitTimeRMS, FindSimChannel(), recob::Hit::PeakTimeMinusRMS(), recob::Hit::PeakTimePlusRMS(), and detinfo::DetectorClocksData::TPCTick2TDC().
Referenced by cheat::BackTrackerService::HitToSimIDEs_Ps(), and HitToXYZ().
|
inline |
Definition at line 191 of file BackTracker.h.
std::vector< sim::TrackIDE > cheat::BackTracker::HitToTrackIDEs | ( | detinfo::DetectorClocksData const & | clockData, |
recob::Hit const & | hit | ||
) | const |
Definition at line 174 of file BackTracker.cc.
References recob::Hit::Channel(), ChannelToTrackIDEs(), util::end(), fHitTimeRMS, recob::Hit::PeakTimeMinusRMS(), and recob::Hit::PeakTimePlusRMS().
Referenced by HitChargeCollectionEfficiency(), HitChargeCollectionPurity(), HitCollectionEfficiency(), HitCollectionPurity(), HitToEveTrackIDEs(), cheat::BackTrackerService::HitToTrackIDEs(), and HitToTrackIds().
|
inline |
Definition at line 150 of file BackTracker.h.
std::vector< int > cheat::BackTracker::HitToTrackIds | ( | detinfo::DetectorClocksData const & | clockData, |
recob::Hit const & | hit | ||
) | const |
Definition at line 184 of file BackTracker.cc.
References HitToTrackIDEs().
Referenced by cheat::BackTrackerService::HitToTrackIds().
std::vector< double > cheat::BackTracker::HitToXYZ | ( | detinfo::DetectorClocksData const & | clockData, |
const recob::Hit & | hit | ||
) | const |
Definition at line 405 of file BackTracker.cc.
References HitToSimIDEs_Ps(), and SimIDEsToXYZ().
Referenced by cheat::BackTrackerService::HitToXYZ(), and SpacePointHitsToWeightedXYZ().
|
inline |
Definition at line 202 of file BackTracker.h.
References hits(), and lar::dump::vector().
void cheat::BackTracker::PrepEvent | ( | const Evt & | evt | ) |
void cheat::BackTracker::PrepSimChannels | ( | const Evt & | evt | ) |
Referenced by cheat::BackTrackerService::priv_PrepSimChannels().
|
inline |
Definition at line 113 of file BackTracker.h.
Referenced by cheat::BackTrackerService::SimChannels().
|
inline |
Definition at line 111 of file BackTracker.h.
std::vector< double > cheat::BackTracker::SimIDEsToXYZ | ( | std::vector< sim::IDE > const & | ides | ) | const |
Definition at line 374 of file BackTracker.cc.
Referenced by HitToXYZ(), cheat::BackTrackerService::SimIDEsToXYZ(), and SimIDEsToXYZ().
std::vector< double > cheat::BackTracker::SimIDEsToXYZ | ( | std::vector< const sim::IDE * > const & | ide_Ps | ) | const |
Definition at line 395 of file BackTracker.cc.
References SimIDEsToXYZ().
std::vector< double > cheat::BackTracker::SpacePointHitsToWeightedXYZ | ( | detinfo::DetectorClocksData const & | clockData, |
std::vector< art::Ptr< recob::Hit >> const & | hits | ||
) | const |
Definition at line 558 of file BackTracker.cc.
References geo::CryostatID::Cryostat, fGeom, hits(), HitToXYZ(), recob::Hit::Integral(), geo::GeometryCore::Ncryostats(), geo::GeometryCore::Nplanes(), geo::GeometryCore::NTPC(), geo::PlaneID::Plane, geo::GeometryCore::PositionToTPCID(), geo::TPCID::TPC, and recob::Hit::WireID().
Referenced by cheat::BackTrackerService::SpacePointHitsToWeightedXYZ().
std::vector<art::Ptr<recob::Hit> > cheat::BackTracker::SpacePointToHits_Ps | ( | art::Ptr< recob::SpacePoint > const & | spt, |
const Evt & | evt | ||
) | const |
Referenced by cheat::BackTrackerService::SpacePointToHits_Ps().
std::vector<double> cheat::BackTracker::SpacePointToXYZ | ( | detinfo::DetectorClocksData const & | clockData, |
art::Ptr< recob::SpacePoint > const & | spt, | ||
const Evt & | evt | ||
) | const |
Referenced by cheat::BackTrackerService::SpacePointToXYZ().
std::vector< std::vector< art::Ptr< recob::Hit > > > cheat::BackTracker::TrackIdsToHits_Ps | ( | detinfo::DetectorClocksData const & | clockData, |
std::vector< int > const & | tkIds, | ||
std::vector< art::Ptr< recob::Hit >> const & | hitsIn | ||
) | const |
Definition at line 259 of file BackTracker.cc.
References recob::Hit::Channel(), ChannelToTrackIDEs(), fHitTimeRMS, fMinHitEnergyFraction, recob::Hit::PeakTimeMinusRMS(), and recob::Hit::PeakTimePlusRMS().
Referenced by cheat::BackTrackerService::TrackIdsToHits_Ps().
std::vector< art::Ptr< recob::Hit > > cheat::BackTracker::TrackIdToHits_Ps | ( | detinfo::DetectorClocksData const & | clockData, |
int | tkId, | ||
std::vector< art::Ptr< recob::Hit >> const & | hitsIn | ||
) | const |
Definition at line 230 of file BackTracker.cc.
References recob::Hit::Channel(), ChannelToTrackIDEs(), fHitTimeRMS, fMinHitEnergyFraction, recob::Hit::PeakTimeMinusRMS(), and recob::Hit::PeakTimePlusRMS().
Referenced by cheat::BackTrackerService::TrackIdToHits_Ps().
std::vector< const sim::IDE * > cheat::BackTracker::TrackIdToSimIDEs_Ps | ( | int const & | id | ) | const |
Definition at line 61 of file BackTracker.cc.
References util::abs(), fSimChannels, and sc.
Referenced by cheat::BackTrackerService::TrackIdToSimIDEs_Ps().
std::vector< const sim::IDE * > cheat::BackTracker::TrackIdToSimIDEs_Ps | ( | int const & | id, |
const geo::View_t | view | ||
) | const |
Definition at line 84 of file BackTracker.cc.
References util::abs(), fGeom, fSimChannels, sc, sim::IDE::trackID, and geo::GeometryCore::View().
|
private |
Definition at line 242 of file BackTracker.h.
|
private |
Definition at line 241 of file BackTracker.h.
Referenced by SpacePointHitsToWeightedXYZ(), and TrackIdToSimIDEs_Ps().
|
private |
Definition at line 244 of file BackTracker.h.
|
private |
Definition at line 247 of file BackTracker.h.
Referenced by GetSetOfTrackIds(), HitToAvgSimIDEs(), HitToSimIDEs_Ps(), HitToTrackIDEs(), TrackIdsToHits_Ps(), and TrackIdToHits_Ps().
|
private |
Definition at line 245 of file BackTracker.h.
Referenced by HitChargeCollectionEfficiency(), HitCollectionEfficiency(), TrackIdsToHits_Ps(), and TrackIdToHits_Ps().
|
private |
Definition at line 246 of file BackTracker.h.
|
private |
Definition at line 240 of file BackTracker.h.
Referenced by HitToEveTrackIDEs().
|
private |
Definition at line 243 of file BackTracker.h.
|
mutableprivate |
Definition at line 249 of file BackTracker.h.
Referenced by ClearEvent(), FindSimChannelPtr(), and TrackIdToSimIDEs_Ps().