LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "BackTracker.h"
Classes | |
struct | fhiclConfig |
Public Member Functions | |
BackTracker (const fhiclConfig &config, const cheat::ParticleInventory *partInv, const geo::GeometryCore *geom, const detinfo::DetectorClocks *detClock) | |
BackTracker (const fhicl::ParameterSet &pSet, const cheat::ParticleInventory *partInv, const geo::GeometryCore *geom, const detinfo::DetectorClocks *detClock) | |
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 > | |
const std::vector< art::Ptr< recob::Hit > > | SpacePointToHits_Ps (art::Ptr< recob::SpacePoint > const &spt, const Evt &evt) const |
template<typename Evt > | |
const std::vector< double > | SpacePointToXYZ (art::Ptr< recob::SpacePoint > const &spt, const Evt &evt) const |
void | ClearEvent () |
bool | SimChannelsReady () const |
const std::vector< art::Ptr< sim::SimChannel > > & | SimChannels () const |
const std::vector< const sim::IDE * > | TrackIdToSimIDEs_Ps (int const &id) const |
const std::vector< const sim::IDE * > | TrackIdToSimIDEs_Ps (int const &id, const geo::View_t view) const |
art::Ptr< sim::SimChannel > | FindSimChannel (raw::ChannelID_t channel) const |
const std::vector< sim::TrackIDE > | ChannelToTrackIDEs (raw::ChannelID_t channel, const double hit_start_time, const double hit_end_time) const |
const std::vector< sim::TrackIDE > | HitToTrackIDEs (recob::Hit const &hit) const |
const std::vector< sim::TrackIDE > | HitToTrackIDEs (art::Ptr< recob::Hit > const &hit) const |
const std::vector< int > | HitToTrackIds (recob::Hit const &hit) const |
const std::vector< sim::TrackIDE > | HitToEveTrackIDEs (recob::Hit const &hit) const |
const std::vector< sim::TrackIDE > | HitToEveTrackIDEs (art::Ptr< recob::Hit > const &hit) const |
std::vector< art::Ptr< recob::Hit > > | TrackIdToHits_Ps (const int &tkId, std::vector< art::Ptr< recob::Hit > > const &hitsIn) const |
std::vector< std::vector< art::Ptr< recob::Hit > > > | TrackIdsToHits_Ps (std::vector< int > const &tkIds, std::vector< art::Ptr< recob::Hit > > const &hitsIn) const |
const std::vector< sim::IDE > | HitToAvgSimIDEs (recob::Hit const &hit) const |
const std::vector< sim::IDE > | HitToAvgSimIDEs (art::Ptr< recob::Hit > hit) const |
const std::vector< const sim::IDE * > | HitToSimIDEs_Ps (recob::Hit const &hit) const |
const std::vector< const sim::IDE * > | HitToSimIDEs_Ps (art::Ptr< recob::Hit > const &hit) const |
const std::vector< double > | SimIDEsToXYZ (std::vector< sim::IDE > const &ides) const |
const std::vector< double > | SimIDEsToXYZ (std::vector< const sim::IDE * > const &ide_Ps) const |
const std::vector< double > | HitToXYZ (const recob::Hit &hit) const |
const std::vector< double > | HitToXYZ (art::Ptr< recob::Hit > const &hit) const |
const double | HitCollectionPurity (std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit > > const &hits) const |
const double | HitChargeCollectionPurity (std::set< int > const &trackIds, std::vector< art::Ptr< recob::Hit > > const &hits) const |
const double | HitCollectionEfficiency (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 |
const double | HitChargeCollectionEfficiency (std::set< int > trackIds, std::vector< art::Ptr< recob::Hit > > const &hits, std::vector< art::Ptr< recob::Hit > > const &allhits, geo::View_t const &view) const |
const std::set< int > | GetSetOfTrackIds () const |
const std::set< int > | GetSetOfEveIds () const |
const std::set< int > | GetSetOfTrackIds (std::vector< art::Ptr< recob::Hit > > const &hits) const |
const std::set< int > | GetSetOfEveIds (std::vector< art::Ptr< recob::Hit > > const &hits) const |
const std::vector< double > | SpacePointHitsToWeightedXYZ (std::vector< art::Ptr< recob::Hit >> const &hits) const |
Private Attributes | |
const cheat::ParticleInventory * | fPartInv |
const geo::GeometryCore * | fGeom |
const detinfo::DetectorClocks * | fDetClocks |
const art::InputTag | fG4ModuleLabel |
const art::InputTag | fHitLabel |
const double | fMinHitEnergyFraction |
std::vector< art::Ptr< sim::SimChannel > > | fSimChannels |
Definition at line 38 of file BackTracker.h.
cheat::BackTracker::BackTracker | ( | const fhiclConfig & | config, |
const cheat::ParticleInventory * | partInv, | ||
const geo::GeometryCore * | geom, | ||
const detinfo::DetectorClocks * | detClock | ||
) |
Definition at line 29 of file BackTracker.cc.
cheat::BackTracker::BackTracker | ( | const fhicl::ParameterSet & | pSet, |
const cheat::ParticleInventory * | partInv, | ||
const geo::GeometryCore * | geom, | ||
const detinfo::DetectorClocks * | detClock | ||
) |
Definition at line 40 of file BackTracker.cc.
|
delete |
|
inline |
Definition at line 71 of file BackTracker.h.
References ClearEvent(), SpacePointToHits_Ps(), and SpacePointToXYZ().
Referenced by cheat::BackTrackerService::priv_CanRun().
const std::vector< sim::TrackIDE > cheat::BackTracker::ChannelToTrackIDEs | ( | raw::ChannelID_t | channel, |
const double | hit_start_time, | ||
const double | hit_end_time | ||
) | const |
Definition at line 112 of file BackTracker.cc.
References e, energy, sim::TrackIDE::energy, sim::TrackIDE::energyFrac, fDetClocks, FindSimChannel(), sim::NoParticleId, detinfo::DetectorClocks::TPCTick2TDC(), sim::TrackIDE::trackID, and sim::SimChannel::TrackIDsAndEnergies().
Referenced by cheat::BackTrackerService::ChannelToTrackIDEs(), GetSetOfTrackIds(), HitToTrackIDEs(), SimChannels(), TrackIdsToHits_Ps(), and TrackIdToHits_Ps().
void cheat::BackTracker::ClearEvent | ( | ) |
Definition at line 51 of file BackTracker.cc.
References fSimChannels.
Referenced by CanRun(), and cheat::BackTrackerService::priv_PrepEvent().
art::Ptr< sim::SimChannel > cheat::BackTracker::FindSimChannel | ( | raw::ChannelID_t | channel | ) | const |
Definition at line 99 of file BackTracker.cc.
References fSimChannels.
Referenced by ChannelToTrackIDEs(), cheat::BackTrackerService::FindSimChannel(), HitToAvgSimIDEs(), HitToSimIDEs_Ps(), and SimChannels().
|
inline |
Definition at line 148 of file BackTracker.h.
References fPartInv, cheat::ParticleInventory::GetSetOfEveIds(), GetSetOfTrackIds(), hits(), SpacePointHitsToWeightedXYZ(), and lar::dump::vector().
Referenced by cheat::BackTrackerService::GetSetOfEveIds().
const std::set< int > cheat::BackTracker::GetSetOfEveIds | ( | std::vector< art::Ptr< recob::Hit > > const & | hits | ) | const |
Definition at line 485 of file BackTracker.cc.
References hits(), and HitToEveTrackIDEs().
|
inline |
Definition at line 147 of file BackTracker.h.
References fPartInv, and cheat::ParticleInventory::GetSetOfTrackIds().
Referenced by GetSetOfEveIds(), and cheat::BackTrackerService::GetSetOfTrackIds().
const std::set< int > cheat::BackTracker::GetSetOfTrackIds | ( | std::vector< art::Ptr< recob::Hit > > const & | hits | ) | const |
Definition at line 471 of file BackTracker.cc.
References ChannelToTrackIDEs(), evd::details::end(), and hits().
const double cheat::BackTracker::HitChargeCollectionEfficiency | ( | std::set< int > | 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 438 of file BackTracker.cc.
References fMinHitEnergyFraction, hits(), HitToTrackIDEs(), and geo::k3D.
Referenced by cheat::BackTrackerService::HitChargeCollectionEfficiency(), and HitToXYZ().
const double cheat::BackTracker::HitChargeCollectionPurity | ( | std::set< int > const & | trackIds, |
std::vector< art::Ptr< recob::Hit > > const & | hits | ||
) | const |
Definition at line 389 of file BackTracker.cc.
References hits(), and HitToTrackIDEs().
Referenced by cheat::BackTrackerService::HitChargeCollectionPurity(), and HitToXYZ().
const double cheat::BackTracker::HitCollectionEfficiency | ( | 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 406 of file BackTracker.cc.
References fMinHitEnergyFraction, hits(), HitToTrackIDEs(), and geo::k3D.
Referenced by cheat::BackTrackerService::HitCollectionEfficiency(), and HitToXYZ().
const double cheat::BackTracker::HitCollectionPurity | ( | std::set< int > const & | trackIds, |
std::vector< art::Ptr< recob::Hit > > const & | hits | ||
) | const |
Definition at line 373 of file BackTracker.cc.
References hits(), and HitToTrackIDEs().
Referenced by cheat::BackTrackerService::HitCollectionPurity(), and HitToXYZ().
const std::vector< sim::IDE > cheat::BackTracker::HitToAvgSimIDEs | ( | recob::Hit const & | hit | ) | const |
Definition at line 263 of file BackTracker.cc.
References recob::Hit::Channel(), fDetClocks, FindSimChannel(), recob::Hit::PeakTimeMinusRMS(), recob::Hit::PeakTimePlusRMS(), and detinfo::DetectorClocks::TPCTick2TDC().
Referenced by cheat::BackTrackerService::HitToAvgSimIDEs(), and HitToEveTrackIDEs().
|
inline |
Definition at line 123 of file BackTracker.h.
References HitToAvgSimIDEs(), and HitToSimIDEs_Ps().
Referenced by HitToAvgSimIDEs().
const std::vector< sim::TrackIDE > cheat::BackTracker::HitToEveTrackIDEs | ( | recob::Hit const & | hit | ) | const |
Definition at line 181 of file BackTracker.cc.
References sim::TrackIDE::energy, sim::TrackIDE::energyFrac, fPartInv, HitToTrackIDEs(), sim::TrackIDE::trackID, and cheat::ParticleInventory::TrackIdToEveTrackId().
Referenced by GetSetOfEveIds(), cheat::BackTrackerService::HitToEveTrackIDEs(), and HitToTrackIDEs().
|
inline |
Definition at line 110 of file BackTracker.h.
References HitToAvgSimIDEs(), HitToEveTrackIDEs(), TrackIdsToHits_Ps(), TrackIdToHits_Ps(), and lar::dump::vector().
Referenced by HitToEveTrackIDEs().
const std::vector< const sim::IDE * > cheat::BackTracker::HitToSimIDEs_Ps | ( | recob::Hit const & | hit | ) | const |
Definition at line 275 of file BackTracker.cc.
References recob::Hit::Channel(), fDetClocks, FindSimChannel(), recob::Hit::PeakTimeMinusRMS(), recob::Hit::PeakTimePlusRMS(), and detinfo::DetectorClocks::TPCTick2TDC().
Referenced by HitToAvgSimIDEs(), cheat::BackTrackerService::HitToSimIDEs_Ps(), and HitToXYZ().
|
inline |
Definition at line 126 of file BackTracker.h.
References HitToSimIDEs_Ps(), HitToXYZ(), and SimIDEsToXYZ().
Referenced by HitToSimIDEs_Ps().
const std::vector< sim::TrackIDE > cheat::BackTracker::HitToTrackIDEs | ( | recob::Hit const & | hit | ) | const |
Definition at line 161 of file BackTracker.cc.
References recob::Hit::Channel(), ChannelToTrackIDEs(), evd::details::end(), recob::Hit::PeakTimeMinusRMS(), and recob::Hit::PeakTimePlusRMS().
Referenced by HitChargeCollectionEfficiency(), HitChargeCollectionPurity(), HitCollectionEfficiency(), HitCollectionPurity(), HitToEveTrackIDEs(), cheat::BackTrackerService::HitToTrackIDEs(), HitToTrackIds(), and SimChannels().
|
inline |
Definition at line 104 of file BackTracker.h.
References HitToEveTrackIDEs(), HitToTrackIDEs(), and HitToTrackIds().
Referenced by HitToTrackIDEs().
const std::vector< int > cheat::BackTracker::HitToTrackIds | ( | recob::Hit const & | hit | ) | const |
Definition at line 171 of file BackTracker.cc.
References HitToTrackIDEs().
Referenced by HitToTrackIDEs(), and cheat::BackTrackerService::HitToTrackIds().
const std::vector< double > cheat::BackTracker::HitToXYZ | ( | const recob::Hit & | hit | ) | const |
Definition at line 367 of file BackTracker.cc.
References HitToSimIDEs_Ps(), and SimIDEsToXYZ().
Referenced by HitToSimIDEs_Ps(), cheat::BackTrackerService::HitToXYZ(), and SpacePointHitsToWeightedXYZ().
|
inline |
Definition at line 135 of file BackTracker.h.
References HitChargeCollectionEfficiency(), HitChargeCollectionPurity(), HitCollectionEfficiency(), HitCollectionPurity(), hits(), HitToXYZ(), and lar::dump::vector().
Referenced by HitToXYZ().
void cheat::BackTracker::PrepEvent | ( | const Evt & | evt | ) |
void cheat::BackTracker::PrepSimChannels | ( | const Evt & | evt | ) |
Referenced by cheat::BackTrackerService::priv_PrepSimChannels().
|
inline |
Definition at line 89 of file BackTracker.h.
References ChannelToTrackIDEs(), FindSimChannel(), fSimChannels, HitToTrackIDEs(), and TrackIdToSimIDEs_Ps().
Referenced by cheat::BackTrackerService::SimChannels().
|
inline |
Definition at line 86 of file BackTracker.h.
References fSimChannels.
Referenced by cheat::BackTrackerService::priv_SimChannelsReady().
const std::vector< double > cheat::BackTracker::SimIDEsToXYZ | ( | std::vector< sim::IDE > const & | ides | ) | const |
Definition at line 338 of file BackTracker.cc.
Referenced by HitToSimIDEs_Ps(), HitToXYZ(), cheat::BackTrackerService::SimIDEsToXYZ(), and SimIDEsToXYZ().
const std::vector< double > cheat::BackTracker::SimIDEsToXYZ | ( | std::vector< const sim::IDE * > const & | ide_Ps | ) | const |
Definition at line 359 of file BackTracker.cc.
References SimIDEsToXYZ().
const std::vector< double > cheat::BackTracker::SpacePointHitsToWeightedXYZ | ( | std::vector< art::Ptr< recob::Hit >> const & | hits | ) | const |
Definition at line 496 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::PositionToTPC(), geo::TPCID::TPC, and recob::Hit::WireID().
Referenced by GetSetOfEveIds(), and cheat::BackTrackerService::SpacePointHitsToWeightedXYZ().
const std::vector< art::Ptr< recob::Hit > > cheat::BackTracker::SpacePointToHits_Ps | ( | art::Ptr< recob::SpacePoint > const & | spt, |
const Evt & | evt | ||
) | const |
Referenced by CanRun(), and cheat::BackTrackerService::SpacePointToHits_Ps().
const std::vector< double > cheat::BackTracker::SpacePointToXYZ | ( | art::Ptr< recob::SpacePoint > const & | spt, |
const Evt & | evt | ||
) | const |
Referenced by CanRun(), and cheat::BackTrackerService::SpacePointToXYZ().
std::vector< std::vector< art::Ptr< recob::Hit > > > cheat::BackTracker::TrackIdsToHits_Ps | ( | std::vector< int > const & | tkIds, |
std::vector< art::Ptr< recob::Hit > > const & | hitsIn | ||
) | const |
Definition at line 225 of file BackTracker.cc.
References recob::Hit::Channel(), ChannelToTrackIDEs(), fMinHitEnergyFraction, recob::Hit::PeakTimeMinusRMS(), and recob::Hit::PeakTimePlusRMS().
Referenced by HitToEveTrackIDEs(), and cheat::BackTrackerService::TrackIdsToHits_Ps().
std::vector< art::Ptr< recob::Hit > > cheat::BackTracker::TrackIdToHits_Ps | ( | const int & | tkId, |
std::vector< art::Ptr< recob::Hit > > const & | hitsIn | ||
) | const |
Definition at line 202 of file BackTracker.cc.
References recob::Hit::Channel(), ChannelToTrackIDEs(), fMinHitEnergyFraction, recob::Hit::PeakTimeMinusRMS(), and recob::Hit::PeakTimePlusRMS().
Referenced by HitToEveTrackIDEs(), and cheat::BackTrackerService::TrackIdToHits_Ps().
const std::vector< const sim::IDE * > cheat::BackTracker::TrackIdToSimIDEs_Ps | ( | int const & | id | ) | const |
Definition at line 57 of file BackTracker.cc.
References fSimChannels.
Referenced by SimChannels(), and cheat::BackTrackerService::TrackIdToSimIDEs_Ps().
const std::vector< const sim::IDE * > cheat::BackTracker::TrackIdToSimIDEs_Ps | ( | int const & | id, |
const geo::View_t | view | ||
) | const |
Definition at line 78 of file BackTracker.cc.
References fGeom, fSimChannels, sim::IDE::trackID, and geo::GeometryCore::View().
|
private |
Definition at line 158 of file BackTracker.h.
Referenced by ChannelToTrackIDEs(), HitToAvgSimIDEs(), and HitToSimIDEs_Ps().
|
private |
Definition at line 159 of file BackTracker.h.
|
private |
Definition at line 157 of file BackTracker.h.
Referenced by SpacePointHitsToWeightedXYZ(), and TrackIdToSimIDEs_Ps().
|
private |
Definition at line 160 of file BackTracker.h.
|
private |
Definition at line 161 of file BackTracker.h.
Referenced by HitChargeCollectionEfficiency(), HitCollectionEfficiency(), TrackIdsToHits_Ps(), and TrackIdToHits_Ps().
|
private |
Definition at line 156 of file BackTracker.h.
Referenced by GetSetOfEveIds(), GetSetOfTrackIds(), and HitToEveTrackIDEs().
|
mutableprivate |
Definition at line 164 of file BackTracker.h.
Referenced by ClearEvent(), FindSimChannel(), SimChannels(), SimChannelsReady(), and TrackIdToSimIDEs_Ps().