#include <ParticleInventoryService.h>
Classes | |
struct | ParticleInventoryServiceConfig |
Public Types | |
using | provider_type = ParticleInventory |
Public Member Functions | |
const provider_type * | provider () const |
ParticleInventoryService (const ParticleInventoryServiceConfig &config, art::ActivityRegistry ®) | |
ParticleInventoryService (fhicl::ParameterSet const &pset, art::ActivityRegistry ®) | |
const sim::ParticleList & | ParticleList () const |
void | Rebuild (const art::Event &evt) |
void | SetEveIdCalculator (sim::EveIdCalculator *ec) |
const simb::MCParticle * | TrackIdToParticle_P (int id) const |
simb::MCParticle | TrackIdToParticle (int const id) const |
const simb::MCParticle * | TrackIdToMotherParticle_P (int id) const |
simb::MCParticle | TrackIdToMotherParticle (int const id) const |
const art::Ptr< simb::MCTruth > & | TrackIdToMCTruth_P (int id) const |
simb::MCTruth | TrackIdToMCTruth (int const id) const |
int | TrackIdToEveTrackId (int tid) const |
const art::Ptr< simb::MCTruth > & | ParticleToMCTruth_P (const simb::MCParticle *p) const |
simb::MCTruth | ParticleToMCTruth (const simb::MCParticle *p) const |
const std::vector< art::Ptr < simb::MCTruth > > & | MCTruthVector_Ps () const |
std::vector< const simb::MCParticle * > | MCTruthToParticles_Ps (art::Ptr< simb::MCTruth > const &mct) const |
std::set< int > | GetSetOfTrackIds () const |
std::set< int > | GetSetOfEveIds () const |
Private Member Functions | |
void | priv_PrepEvent (const art::Event &evt, art::ScheduleContext) |
void | priv_PrepParticleList (const art::Event &evt) |
void | priv_PrepMCTruthList (const art::Event &evt) |
void | priv_PrepTrackIdToMCTruthIndex (const art::Event &evt) |
bool | priv_CanRun (const art::Event &evt) const |
bool | priv_ParticleListReady () |
bool | priv_MCTruthListReady () |
bool | priv_TrackIdToMCTruthReady () |
Private Member Functions inherited from cheat::ParticleInventory | |
ParticleInventory (const ParticleInventoryConfig &config) | |
ParticleInventory (const fhicl::ParameterSet &pSet) | |
ParticleInventory (ParticleInventory const &)=delete | |
template<typename Evt > | |
void | PrepEvent (const Evt &evt) |
Function to set up the ParticleInventory state for an event. This is a function to tell the ParticleInventory to prepare itself to work with a particular event. More... | |
bool | ParticleListReady () const |
A simple check to determine if the ParticleList has already been prepared for this event or not. More... | |
bool | MCTruthListReady () const |
A simple check to determine if the MCTruthList has already been prepared and cached or not. More... | |
bool | TrackIdToMCTruthReady () const |
A simple check to determine if the TrackIdToMCTruth map has been prepared or not. More... | |
template<typename Evt > | |
void | PrepParticleList (const Evt &evt) const |
A function to load the ParticleList and cache it This function will find the particle list and load it for later use. Ideally this would would be used for a "lazy" loading of the backtracker, but this does not work in the current setup of art. More... | |
template<typename Evt > | |
void | PrepTrackIdToMCTruthIndex (const Evt &evt) const |
A function to prepare and cache a map of TrackIds and MCTruth object indicies from fMCTruthList. More... | |
template<typename Evt > | |
void | PrepMCTruthList (const Evt &evt) const |
A function to load and cache the MCTruthList of the event. More... | |
template<typename Evt > | |
void | PrepMCTruthListAndTrackIdToMCTruthIndex (const Evt &evt) const |
A function to make both PrepTrackIdToMCTruthIndex and PrepMCTruthList run when both are needed. More... | |
template<typename Evt > | |
bool | CanRun (const Evt &evt) const |
A short function to check if use of the backtracker is appropriate or not based on the type of input file. This function simply checks to see if the file loaded is real data, or MC Simulation, as backtracking on real data makes no sense. If one does try to backtrack real data, this will throw and exception. More... | |
const sim::ParticleList & | ParticleList () const |
void | SetEveIdCalculator (sim::EveIdCalculator *ec) |
const std::vector< art::Ptr < simb::MCTruth > > & | MCTruthList () const |
const std::map< int, int > & | TrackIdToMCTruthIndex () const |
void | ClearEvent () |
const simb::MCParticle * | TrackIdToParticle_P (int const &id) const |
simb::MCParticle | TrackIdToParticle (int const &id) const |
const simb::MCParticle * | TrackIdToMotherParticle_P (int const &id) const |
simb::MCParticle | TrackIdToMotherParticle (int const &id) const |
const art::Ptr< simb::MCTruth > & | TrackIdToMCTruth_P (int const &id) const |
simb::MCTruth | TrackIdToMCTruth (int const &id) const |
int | TrackIdToEveTrackId (const int &tid) const |
const art::Ptr< simb::MCTruth > & | ParticleToMCTruth_P (const simb::MCParticle *p) const |
simb::MCTruth | ParticleToMCTruth (const simb::MCParticle *p) const |
const std::vector< art::Ptr < simb::MCTruth > > & | MCTruthVector_Ps () const |
std::vector< const simb::MCParticle * > | MCTruthToParticles_Ps (art::Ptr< simb::MCTruth > const &mct) const |
std::set< int > | GetSetOfTrackIds () const |
std::set< int > | GetSetOfEveIds () const |
Definition at line 42 of file ParticleInventoryService.h.
Definition at line 53 of file ParticleInventoryService.h.
cheat::ParticleInventoryService::ParticleInventoryService | ( | const ParticleInventoryServiceConfig & | config, |
art::ActivityRegistry & | reg | ||
) |
Definition at line 39 of file ParticleInventoryService.cc.
cheat::ParticleInventoryService::ParticleInventoryService | ( | fhicl::ParameterSet const & | pset, |
art::ActivityRegistry & | reg | ||
) |
Definition at line 48 of file ParticleInventoryService.cc.
std::set< int > cheat::ParticleInventoryService::GetSetOfEveIds | ( | ) | const |
Definition at line 173 of file ParticleInventoryService.cc.
std::set< int > cheat::ParticleInventoryService::GetSetOfTrackIds | ( | ) | const |
Definition at line 167 of file ParticleInventoryService.cc.
std::vector< const simb::MCParticle * > cheat::ParticleInventoryService::MCTruthToParticles_Ps | ( | art::Ptr< simb::MCTruth > const & | mct | ) | const |
Definition at line 159 of file ParticleInventoryService.cc.
const std::vector< art::Ptr< simb::MCTruth > > & cheat::ParticleInventoryService::MCTruthVector_Ps | ( | ) | const |
Definition at line 118 of file ParticleInventoryService.cc.
const sim::ParticleList & cheat::ParticleInventoryService::ParticleList | ( | ) | const |
Definition at line 112 of file ParticleInventoryService.cc.
|
inline |
Definition at line 84 of file ParticleInventoryService.h.
const art::Ptr< simb::MCTruth > & cheat::ParticleInventoryService::ParticleToMCTruth_P | ( | const simb::MCParticle * | p | ) | const |
Definition at line 152 of file ParticleInventoryService.cc.
|
private |
Definition at line 72 of file ParticleInventoryService.cc.
|
inlineprivate |
Definition at line 105 of file ParticleInventoryService.h.
|
inlineprivate |
Definition at line 104 of file ParticleInventoryService.h.
|
private |
Definition at line 61 of file ParticleInventoryService.cc.
|
private |
Definition at line 96 of file ParticleInventoryService.cc.
|
private |
Definition at line 77 of file ParticleInventoryService.cc.
|
private |
Definition at line 87 of file ParticleInventoryService.cc.
|
inlineprivate |
Definition at line 106 of file ParticleInventoryService.h.
|
inline |
Definition at line 54 of file ParticleInventoryService.h.
void cheat::ParticleInventoryService::Rebuild | ( | const art::Event & | evt | ) |
Definition at line 56 of file ParticleInventoryService.cc.
|
inline |
Definition at line 66 of file ParticleInventoryService.h.
int cheat::ParticleInventoryService::TrackIdToEveTrackId | ( | int | tid | ) | const |
Definition at line 147 of file ParticleInventoryService.cc.
|
inline |
Definition at line 78 of file ParticleInventoryService.h.
const art::Ptr< simb::MCTruth > & cheat::ParticleInventoryService::TrackIdToMCTruth_P | ( | int | id | ) | const |
Definition at line 140 of file ParticleInventoryService.cc.
|
inline |
Definition at line 74 of file ParticleInventoryService.h.
const simb::MCParticle * cheat::ParticleInventoryService::TrackIdToMotherParticle_P | ( | int | id | ) | const |
Definition at line 133 of file ParticleInventoryService.cc.
|
inline |
Definition at line 70 of file ParticleInventoryService.h.
const simb::MCParticle * cheat::ParticleInventoryService::TrackIdToParticle_P | ( | int | id | ) | const |
Definition at line 126 of file ParticleInventoryService.cc.