#include <ParticleInventoryService.h>
Classes | |
struct | ParticleInventoryServiceConfig |
Public Types | |
using | provider_type = ParticleInventory |
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 33 of file ParticleInventoryService.h.
Definition at line 44 of file ParticleInventoryService.h.
cheat::ParticleInventoryService::ParticleInventoryService | ( | const ParticleInventoryServiceConfig & | config, |
art::ActivityRegistry & | reg | ||
) |
Definition at line 41 of file ParticleInventoryService_service.cc.
cheat::ParticleInventoryService::ParticleInventoryService | ( | fhicl::ParameterSet const & | pset, |
art::ActivityRegistry & | reg | ||
) |
std::set< int > cheat::ParticleInventoryService::GetSetOfEveIds | ( | ) | const |
Definition at line 175 of file ParticleInventoryService_service.cc.
std::set< int > cheat::ParticleInventoryService::GetSetOfTrackIds | ( | ) | const |
Definition at line 169 of file ParticleInventoryService_service.cc.
std::vector< const simb::MCParticle * > cheat::ParticleInventoryService::MCTruthToParticles_Ps | ( | art::Ptr< simb::MCTruth > const & | mct | ) | const |
Definition at line 161 of file ParticleInventoryService_service.cc.
const std::vector< art::Ptr< simb::MCTruth > > & cheat::ParticleInventoryService::MCTruthVector_Ps | ( | ) | const |
Definition at line 120 of file ParticleInventoryService_service.cc.
const sim::ParticleList & cheat::ParticleInventoryService::ParticleList | ( | ) | const |
Definition at line 114 of file ParticleInventoryService_service.cc.
|
inline |
Definition at line 75 of file ParticleInventoryService.h.
const art::Ptr< simb::MCTruth > & cheat::ParticleInventoryService::ParticleToMCTruth_P | ( | const simb::MCParticle * | p | ) | const |
Definition at line 154 of file ParticleInventoryService_service.cc.
|
private |
Definition at line 74 of file ParticleInventoryService_service.cc.
|
inlineprivate |
Definition at line 96 of file ParticleInventoryService.h.
|
inlineprivate |
Definition at line 95 of file ParticleInventoryService.h.
|
private |
Definition at line 63 of file ParticleInventoryService_service.cc.
|
private |
Definition at line 98 of file ParticleInventoryService_service.cc.
|
private |
Definition at line 79 of file ParticleInventoryService_service.cc.
|
private |
Definition at line 89 of file ParticleInventoryService_service.cc.
|
inlineprivate |
Definition at line 97 of file ParticleInventoryService.h.
|
inline |
Definition at line 45 of file ParticleInventoryService.h.
void cheat::ParticleInventoryService::Rebuild | ( | const art::Event & | evt | ) |
Definition at line 58 of file ParticleInventoryService_service.cc.
|
inline |
Definition at line 57 of file ParticleInventoryService.h.
int cheat::ParticleInventoryService::TrackIdToEveTrackId | ( | int | tid | ) | const |
Definition at line 149 of file ParticleInventoryService_service.cc.
|
inline |
Definition at line 69 of file ParticleInventoryService.h.
const art::Ptr< simb::MCTruth > & cheat::ParticleInventoryService::TrackIdToMCTruth_P | ( | int | id | ) | const |
Definition at line 142 of file ParticleInventoryService_service.cc.
|
inline |
Definition at line 65 of file ParticleInventoryService.h.
const simb::MCParticle * cheat::ParticleInventoryService::TrackIdToMotherParticle_P | ( | int | id | ) | const |
Definition at line 135 of file ParticleInventoryService_service.cc.
|
inline |
Definition at line 61 of file ParticleInventoryService.h.
const simb::MCParticle * cheat::ParticleInventoryService::TrackIdToParticle_P | ( | int | id | ) | const |
Definition at line 128 of file ParticleInventoryService_service.cc.