LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_pandora::PFParticleCosmicAna Class Reference

PFParticleCosmicAna class. More...

Inheritance diagram for lar_pandora::PFParticleCosmicAna:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Types

using ModuleType = EDAnalyzer
 

Public Member Functions

 PFParticleCosmicAna (fhicl::ParameterSet const &pset)
 Constructor. More...
 
virtual ~PFParticleCosmicAna ()
 Destructor. More...
 
void beginJob ()
 
void endJob ()
 
void analyze (const art::Event &evt)
 
void reconfigure (fhicl::ParameterSet const &pset)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
std::unique_ptr< Worker > makeWorker (WorkerParams const &wp)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Protected Member Functions

std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResults > getTriggerResults (Event const &e) const
 
ConsumesCollector & consumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Private Member Functions

void FillRecoTree (const PFParticlesToHits &recoParticlesToHits, const PFParticlesToTracks &recoParticlesToTracks, const TracksToCosmicTags &recoTracksToCosmicTags)
 Fill event-level variables using input maps between reconstructed objects. More...
 
void FillTrueTree (const HitVector &hitVector, const HitsToMCParticles &trueHitsToParticles, const HitsToPFParticles &recoHitsToParticles, const MCParticlesToMCTruth &particlesToTruth, const PFParticlesToTracks &particlesToTracks, const TracksToCosmicTags &tracksToCosmicTags)
 Fill track-level variables using input maps between reconstructed objects. More...
 
float GetCosmicScore (const art::Ptr< recob::PFParticle > particle, const PFParticlesToTracks &recoParticlesToTracks, const TracksToCosmicTags &recoTracksToCosmicTags) const
 Get cosmic score for a PFParticle using track-level information. More...
 

Private Attributes

TTree * m_pRecoTree
 
TTree * m_pTrueTree
 
int m_run
 
int m_event
 
int m_index
 
int m_self
 
int m_pdgCode
 
int m_isTrackLike
 
int m_isPrimary
 
float m_cosmicScore
 
int m_nTracks
 
int m_nHits
 
float m_trackVtxX
 
float m_trackVtxY
 
float m_trackVtxZ
 
float m_trackEndX
 
float m_trackEndY
 
float m_trackEndZ
 
float m_trackVtxDirX
 
float m_trackVtxDirY
 
float m_trackVtxDirZ
 
float m_trackEndDirX
 
float m_trackEndDirY
 
float m_trackEndDirZ
 
float m_trackLength
 
float m_trackWidthX
 
float m_trackWidthY
 
float m_trackWidthZ
 
float m_trackVtxDeltaYZ
 
float m_trackEndDeltaYZ
 
int m_trackVtxContained
 
int m_trackEndContained
 
int m_nNeutrinoHits
 
int m_nNeutrinoHitsFullyTagged
 
int m_nNeutrinoHitsSemiTagged
 
int m_nNeutrinoHitsNotTagged
 
int m_nNeutrinoHitsNotReconstructed
 
int m_nNeutrinoHitsReconstructed
 
int m_nCosmicHits
 
int m_nCosmicHitsFullyTagged
 
int m_nCosmicHitsSemiTagged
 
int m_nCosmicHitsNotTagged
 
int m_nCosmicHitsNotReconstructed
 
int m_nCosmicHitsReconstructed
 
std::string m_hitfinderLabel
 
std::string m_trackfitLabel
 
std::string m_particleLabel
 
std::string m_cosmicLabel
 
std::string m_geantModuleLabel
 
bool m_useDaughterPFParticles
 
bool m_useDaughterMCParticles
 
double m_cosmicContainmentCut
 

Detailed Description

PFParticleCosmicAna class.

Definition at line 23 of file PFParticleCosmicAna_module.cc.

Member Typedef Documentation

Definition at line 22 of file EDAnalyzer.h.

Constructor & Destructor Documentation

lar_pandora::PFParticleCosmicAna::PFParticleCosmicAna ( fhicl::ParameterSet const &  pset)

Constructor.

Parameters
pset

Definition at line 172 of file PFParticleCosmicAna_module.cc.

References reconfigure().

172  : art::EDAnalyzer(pset)
173  {
174  this->reconfigure(pset);
175  }
void reconfigure(fhicl::ParameterSet const &pset)
lar_pandora::PFParticleCosmicAna::~PFParticleCosmicAna ( )
virtual

Destructor.

Definition at line 179 of file PFParticleCosmicAna_module.cc.

179 {}

Member Function Documentation

void lar_pandora::PFParticleCosmicAna::analyze ( const art::Event evt)

Definition at line 273 of file PFParticleCosmicAna_module.cc.

References lar_pandora::LArPandoraHelper::BuildMCParticleHitMaps(), lar_pandora::LArPandoraHelper::BuildPFParticleHitMaps(), lar_pandora::LArPandoraHelper::CollectCosmicTags(), lar_pandora::LArPandoraHelper::CollectHits(), lar_pandora::LArPandoraHelper::CollectMCParticles(), lar_pandora::LArPandoraHelper::CollectPFParticles(), lar_pandora::LArPandoraHelper::CollectTracks(), art::EventID::event(), FillRecoTree(), FillTrueTree(), art::Event::id(), lar_pandora::LArPandoraHelper::kAddDaughters, lar_pandora::LArPandoraHelper::kIgnoreDaughters, m_cosmicLabel, m_event, m_geantModuleLabel, m_hitfinderLabel, m_particleLabel, m_run, m_trackfitLabel, m_useDaughterMCParticles, m_useDaughterPFParticles, and art::Event::run().

274  {
275  std::cout << " *** PFParticleCosmicAna::analyze(...) *** " << std::endl;
276 
277  //
278  // Note: I've made this is MicroBooNE-only module
279  //
280 
281  m_run = evt.run();
282  m_event = evt.id().event();
283 
284  std::cout << " Run: " << m_run << std::endl;
285  std::cout << " Event: " << m_event << std::endl;
286 
287  // Collect True Particles
288  // ======================
289  HitVector hitVector;
290  MCTruthToMCParticles truthToParticles;
291  MCParticlesToMCTruth particlesToTruth;
292  MCParticlesToHits trueParticlesToHits;
293  HitsToMCParticles trueHitsToParticles;
294 
297  evt, m_geantModuleLabel, truthToParticles, particlesToTruth);
300  hitVector,
301  trueParticlesToHits,
302  trueHitsToParticles,
306 
307  // Collect Reco Particles
308  // ======================
309  PFParticleVector recoParticleVector;
310  PFParticlesToHits recoParticlesToHits;
311  HitsToPFParticles recoHitsToParticles;
312 
313  LArPandoraHelper::CollectPFParticles(evt, m_particleLabel, recoParticleVector);
317  recoParticlesToHits,
318  recoHitsToParticles,
322 
323  std::cout << " PFParticles: " << recoParticleVector.size() << std::endl;
324 
325  // Collect Reco Tracks
326  // ===================
327  TrackVector recoTrackVector;
328  PFParticlesToTracks recoParticlesToTracks;
329  LArPandoraHelper::CollectTracks(evt, m_trackfitLabel, recoTrackVector, recoParticlesToTracks);
330 
331  // Collect Cosmic Tags
332  // =====================
333  CosmicTagVector recoCosmicTagVector;
334  TracksToCosmicTags recoTracksToCosmicTags;
336  evt, m_cosmicLabel, recoCosmicTagVector, recoTracksToCosmicTags);
337 
338  // Analyse Reconstructed Particles
339  // ===============================
340  this->FillRecoTree(recoParticlesToHits, recoParticlesToTracks, recoTracksToCosmicTags);
341 
342  // Analyse True Hits
343  // =================
344  this->FillTrueTree(hitVector,
345  trueHitsToParticles,
346  recoHitsToParticles,
347  particlesToTruth,
348  recoParticlesToTracks,
349  recoTracksToCosmicTags);
350  }
static void BuildPFParticleHitMaps(const PFParticleVector &particleVector, const PFParticlesToSpacePoints &particlesToSpacePoints, const SpacePointsToHits &spacePointsToHits, PFParticlesToHits &particlesToHits, HitsToPFParticles &hitsToParticles, const DaughterMode daughterMode=kUseDaughters)
Build mapping between PFParticles and Hits using PFParticle/SpacePoint/Hit maps.
std::map< art::Ptr< recob::Hit >, art::Ptr< simb::MCParticle > > HitsToMCParticles
void FillTrueTree(const HitVector &hitVector, const HitsToMCParticles &trueHitsToParticles, const HitsToPFParticles &recoHitsToParticles, const MCParticlesToMCTruth &particlesToTruth, const PFParticlesToTracks &particlesToTracks, const TracksToCosmicTags &tracksToCosmicTags)
Fill track-level variables using input maps between reconstructed objects.
std::map< art::Ptr< simb::MCParticle >, art::Ptr< simb::MCTruth > > MCParticlesToMCTruth
std::vector< art::Ptr< anab::CosmicTag > > CosmicTagVector
std::map< art::Ptr< recob::PFParticle >, TrackVector > PFParticlesToTracks
std::map< art::Ptr< recob::Track >, CosmicTagVector > TracksToCosmicTags
std::map< art::Ptr< simb::MCParticle >, HitVector > MCParticlesToHits
std::vector< art::Ptr< recob::PFParticle > > PFParticleVector
std::map< art::Ptr< simb::MCTruth >, MCParticleVector > MCTruthToMCParticles
std::map< art::Ptr< recob::PFParticle >, HitVector > PFParticlesToHits
std::vector< art::Ptr< recob::Track > > TrackVector
static void CollectTracks(const art::Event &evt, const std::string &label, TrackVector &trackVector, PFParticlesToTracks &particlesToTracks)
Collect the reconstructed PFParticles and associated Tracks from the ART event record.
static void CollectPFParticles(const art::Event &evt, const std::string &label, PFParticleVector &particleVector)
Collect the reconstructed PFParticles from the ART event record.
void FillRecoTree(const PFParticlesToHits &recoParticlesToHits, const PFParticlesToTracks &recoParticlesToTracks, const TracksToCosmicTags &recoTracksToCosmicTags)
Fill event-level variables using input maps between reconstructed objects.
static void CollectHits(const art::Event &evt, const std::string &label, HitVector &hitVector)
Collect the reconstructed Hits from the ART event record.
std::vector< art::Ptr< recob::Hit > > HitVector
std::map< art::Ptr< recob::Hit >, art::Ptr< recob::PFParticle > > HitsToPFParticles
EventNumber_t event() const
Definition: EventID.h:116
RunNumber_t run() const
Definition: Event.cc:29
static void BuildMCParticleHitMaps(const art::Event &evt, const HitVector &hitVector, const SimChannelVector &simChannelVector, HitsToTrackIDEs &hitsToTrackIDEs)
Collect the links from reconstructed hits to their true energy deposits.
static void CollectMCParticles(const art::Event &evt, const std::string &label, MCParticleVector &particleVector)
Collect a vector of MCParticle objects from the ART event record.
EventID id() const
Definition: Event.cc:23
static void CollectCosmicTags(const art::Event &evt, const std::string &label, CosmicTagVector &cosmicTagVector, TracksToCosmicTags &tracksToCosmicTags)
Collect a vector of cosmic tags from the ART event record.
void lar_pandora::PFParticleCosmicAna::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 199 of file PFParticleCosmicAna_module.cc.

References m_cosmicScore, m_event, m_index, m_isPrimary, m_isTrackLike, m_nCosmicHits, m_nCosmicHitsFullyTagged, m_nCosmicHitsNotReconstructed, m_nCosmicHitsNotTagged, m_nCosmicHitsReconstructed, m_nCosmicHitsSemiTagged, m_nHits, m_nNeutrinoHits, m_nNeutrinoHitsFullyTagged, m_nNeutrinoHitsNotReconstructed, m_nNeutrinoHitsNotTagged, m_nNeutrinoHitsReconstructed, m_nNeutrinoHitsSemiTagged, m_nTracks, m_pdgCode, m_pRecoTree, m_pTrueTree, m_run, m_self, m_trackEndContained, m_trackEndDeltaYZ, m_trackEndDirX, m_trackEndDirY, m_trackEndDirZ, m_trackEndX, m_trackEndY, m_trackEndZ, m_trackLength, m_trackVtxContained, m_trackVtxDeltaYZ, m_trackVtxDirX, m_trackVtxDirY, m_trackVtxDirZ, m_trackVtxX, m_trackVtxY, m_trackVtxZ, m_trackWidthX, m_trackWidthY, and m_trackWidthZ.

200  {
201  mf::LogDebug("LArPandora") << " *** PFParticleCosmicAna::beginJob() *** " << std::endl;
202 
203  //
205 
206  m_pRecoTree = tfs->make<TTree>("recoTree", "LAr Cosmic Reco Tree");
207  m_pRecoTree->Branch("run", &m_run, "run/I");
208  m_pRecoTree->Branch("event", &m_event, "event/I");
209  m_pRecoTree->Branch("index", &m_index, "index/I");
210  m_pRecoTree->Branch("self", &m_self, "self/I");
211  m_pRecoTree->Branch("pdgCode", &m_pdgCode, "pdgCode/I");
212  m_pRecoTree->Branch("isTrackLike", &m_isTrackLike, "isTrackLike/I");
213  m_pRecoTree->Branch("isPrimary", &m_isPrimary, "isPrimary/I");
214  m_pRecoTree->Branch("cosmicScore", &m_cosmicScore, "cosmicScore/F");
215  m_pRecoTree->Branch("trackVtxX", &m_trackVtxX, "trackVtxX/F");
216  m_pRecoTree->Branch("trackVtxY", &m_trackVtxY, "trackVtxY/F");
217  m_pRecoTree->Branch("trackVtxZ", &m_trackVtxZ, "trackVtxZ/F");
218  m_pRecoTree->Branch("trackEndX", &m_trackEndX, "trackEndX/F");
219  m_pRecoTree->Branch("trackEndY", &m_trackEndY, "trackEndY/F");
220  m_pRecoTree->Branch("trackEndZ", &m_trackEndZ, "trackEndZ/F");
221  m_pRecoTree->Branch("trackVtxDirX", &m_trackVtxDirX, "trackVtxDirX/F");
222  m_pRecoTree->Branch("trackVtxDirY", &m_trackVtxDirY, "trackVtxDirY/F");
223  m_pRecoTree->Branch("trackVtxDirZ", &m_trackVtxDirZ, "trackVtxDirZ/F");
224  m_pRecoTree->Branch("trackEndDirX", &m_trackEndDirX, "trackEndDirX/F");
225  m_pRecoTree->Branch("trackEndDirY", &m_trackEndDirY, "trackEndDirY/F");
226  m_pRecoTree->Branch("trackEndDirZ", &m_trackEndDirZ, "trackEndDirZ/F");
227  m_pRecoTree->Branch("trackLength", &m_trackLength, "trackLength/F");
228  m_pRecoTree->Branch("trackWidthX", &m_trackWidthX, "trackWidthX/F");
229  m_pRecoTree->Branch("trackWidthY", &m_trackWidthY, "trackWidthY/F");
230  m_pRecoTree->Branch("trackWidthZ", &m_trackWidthZ, "trackWidthZ/F");
231  m_pRecoTree->Branch("trackVtxDeltaYZ", &m_trackVtxDeltaYZ, "trackVtxDeltaYZ/F");
232  m_pRecoTree->Branch("trackEndDeltaYZ", &m_trackEndDeltaYZ, "trackEndDeltaYZ/F");
233  m_pRecoTree->Branch("trackVtxContained", &m_trackVtxContained, "trackVtxContained/I");
234  m_pRecoTree->Branch("trackEndContained", &m_trackEndContained, "trackEndContained/I");
235  m_pRecoTree->Branch("nTracks", &m_nTracks, "nTracks/I");
236  m_pRecoTree->Branch("nHits", &m_nHits, "nHits/I");
237 
238  m_pTrueTree = tfs->make<TTree>("trueTree", "LAr Cosmic True Tree");
239  m_pTrueTree->Branch("run", &m_run, "run/I");
240  m_pTrueTree->Branch("event", &m_event, "event/I");
241  m_pTrueTree->Branch("nHits", &m_nHits, "nHits/I");
242  m_pTrueTree->Branch("nNeutrinoHits", &m_nNeutrinoHits, "nNeutrinoHits/I");
243  m_pTrueTree->Branch(
244  "nNeutrinoHitsFullyTagged", &m_nNeutrinoHitsFullyTagged, "nNeutrinoHitsFullyTagged/I");
245  m_pTrueTree->Branch(
246  "nNeutrinoHitsSemiTagged", &m_nNeutrinoHitsSemiTagged, "nNeutrinoHitsSemiTagged/I");
247  m_pTrueTree->Branch(
248  "nNeutrinoHitsNotTagged", &m_nNeutrinoHitsNotTagged, "nNeutrinoHitsNotTagged/I");
249  m_pTrueTree->Branch("nNeutrinoHitsNotReconstructed",
251  "nNeutrinoHitsNotReconstructed/I");
252  m_pTrueTree->Branch(
253  "nNeutrinoHitsReconstructed", &m_nNeutrinoHitsReconstructed, "nNeutrinoHitsReconstructed/I");
254  m_pTrueTree->Branch("nCosmicHits", &m_nCosmicHits, "nCosmicHits/I");
255  m_pTrueTree->Branch(
256  "nCosmicHitsFullyTagged", &m_nCosmicHitsFullyTagged, "nCosmicHitsFullyTagged/I");
257  m_pTrueTree->Branch(
258  "nCosmicHitsSemiTagged", &m_nCosmicHitsSemiTagged, "nCosmicHitsSemiTagged/I");
259  m_pTrueTree->Branch("nCosmicHitsNotTagged", &m_nCosmicHitsNotTagged, "nCosmicHitsNotTagged/I");
260  m_pTrueTree->Branch("nCosmicHitsNotReconstructed",
262  "nCosmicHitsNotReconstructed/I");
263  m_pTrueTree->Branch(
264  "nCosmicHitsReconstructed", &m_nCosmicHitsReconstructed, "nCosmicHitsReconstructed/I");
265  }
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 61 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumes().

62  {
63  return collector_.consumes<T, BT>(tag);
64  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ProductToken< T > consumes(InputTag const &)
ConsumesCollector & art::ModuleBase::consumesCollector ( )
protectedinherited

Definition at line 57 of file ModuleBase.cc.

References art::ModuleBase::collector_.

58  {
59  return collector_;
60  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 75 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesMany().

76  {
77  collector_.consumesMany<T, BT>();
78  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 68 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesView().

69  {
70  return collector_.consumesView<T, BT>(tag);
71  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > consumesView(InputTag const &)
void art::detail::Analyzer::doBeginJob ( SharedResources const &  resources)
inherited

Definition at line 25 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

26  {
27  setupQueues(resources);
28  ProcessingFrame const frame{ScheduleID{}};
29  beginJobWithFrame(frame);
30  }
virtual void beginJobWithFrame(ProcessingFrame const &)=0
virtual void setupQueues(SharedResources const &)=0
bool art::detail::Analyzer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 68 of file Analyzer.cc.

References art::ModuleContext::scheduleID().

Referenced by art::detail::Analyzer::Analyzer().

69  {
70  ProcessingFrame const frame{mc.scheduleID()};
71  beginRunWithFrame(std::as_const(rp).makeRun(mc), frame);
72  return true;
73  }
virtual void beginRunWithFrame(Run const &, ProcessingFrame const &)=0
bool art::detail::Analyzer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 84 of file Analyzer.cc.

References art::ModuleContext::scheduleID().

Referenced by art::detail::Analyzer::Analyzer().

85  {
86  ProcessingFrame const frame{mc.scheduleID()};
87  beginSubRunWithFrame(std::as_const(srp).makeSubRun(mc), frame);
88  return true;
89  }
virtual void beginSubRunWithFrame(SubRun const &, ProcessingFrame const &)=0
void art::detail::Analyzer::doEndJob ( )
inherited

Definition at line 33 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

34  {
35  ProcessingFrame const frame{ScheduleID{}};
36  endJobWithFrame(frame);
37  }
virtual void endJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Analyzer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 76 of file Analyzer.cc.

References art::ModuleContext::scheduleID().

Referenced by art::detail::Analyzer::Analyzer().

77  {
78  ProcessingFrame const frame{mc.scheduleID()};
79  endRunWithFrame(std::as_const(rp).makeRun(mc), frame);
80  return true;
81  }
virtual void endRunWithFrame(Run const &, ProcessingFrame const &)=0
bool art::detail::Analyzer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 92 of file Analyzer.cc.

References art::ModuleContext::scheduleID().

Referenced by art::detail::Analyzer::Analyzer().

93  {
94  ProcessingFrame const frame{mc.scheduleID()};
95  endSubRunWithFrame(std::as_const(srp).makeSubRun(mc), frame);
96  return true;
97  }
virtual void endSubRunWithFrame(SubRun const &, ProcessingFrame const &)=0
bool art::detail::Analyzer::doEvent ( EventPrincipal ep,
ModuleContext const &  mc,
std::atomic< std::size_t > &  counts_run,
std::atomic< std::size_t > &  counts_passed,
std::atomic< std::size_t > &  counts_failed 
)
inherited

Definition at line 100 of file Analyzer.cc.

References e, and art::ModuleContext::scheduleID().

Referenced by art::detail::Analyzer::Analyzer().

105  {
106  auto const e = std::as_const(ep).makeEvent(mc);
107  if (wantEvent(mc.scheduleID(), e)) {
108  ++counts_run;
109  ProcessingFrame const frame{mc.scheduleID()};
110  analyzeWithFrame(e, frame);
111  ++counts_passed;
112  }
113  return true;
114  }
bool wantEvent(ScheduleID id, Event const &e) const
Definition: Observer.cc:63
Float_t e
Definition: plot.C:35
virtual void analyzeWithFrame(Event const &, ProcessingFrame const &)=0
void art::detail::Analyzer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited

Definition at line 47 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

48  {
49  ProcessingFrame const frame{ScheduleID{}};
51  }
TFile fb("Li6.root")
virtual void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
void art::detail::Analyzer::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 61 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

62  {
63  ProcessingFrame const frame{ScheduleID{}};
65  }
virtual void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Analyzer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited

Definition at line 40 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

41  {
42  ProcessingFrame const frame{ScheduleID{}};
44  }
TFile fb("Li6.root")
virtual void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
void art::detail::Analyzer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 54 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

55  {
56  ProcessingFrame const frame{ScheduleID{}};
58  }
virtual void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void lar_pandora::PFParticleCosmicAna::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 269 of file PFParticleCosmicAna_module.cc.

269 {}
void lar_pandora::PFParticleCosmicAna::FillRecoTree ( const PFParticlesToHits recoParticlesToHits,
const PFParticlesToTracks recoParticlesToTracks,
const TracksToCosmicTags recoTracksToCosmicTags 
)
private

Fill event-level variables using input maps between reconstructed objects.

Parameters
recoParticlesToHitsmapping from particles to hits
recoParticlesToTracksmapping from particles to tracks
recoTracksToCosmicTagsmapping from tracks to cosmic tags

Definition at line 354 of file PFParticleCosmicAna_module.cc.

References geo::GeometryCore::DetHalfHeight(), geo::GeometryCore::DetHalfWidth(), geo::GeometryCore::DetLength(), recob::Track::End(), recob::Track::EndDirection(), GetCosmicScore(), recob::PFParticle::IsPrimary(), lar_pandora::LArPandoraHelper::IsTrack(), recob::Track::Length(), m_cosmicContainmentCut, m_cosmicScore, m_index, m_isPrimary, m_isTrackLike, m_nHits, m_nTracks, m_pdgCode, m_pRecoTree, m_self, m_trackEndContained, m_trackEndDeltaYZ, m_trackEndDirX, m_trackEndDirY, m_trackEndDirZ, m_trackEndX, m_trackEndY, m_trackEndZ, m_trackLength, m_trackVtxContained, m_trackVtxDeltaYZ, m_trackVtxDirX, m_trackVtxDirY, m_trackVtxDirZ, m_trackVtxX, m_trackVtxY, m_trackVtxZ, m_trackWidthX, m_trackWidthY, m_trackWidthZ, recob::PFParticle::PdgCode(), recob::PFParticle::Self(), track, recob::Track::Vertex(), and recob::Track::VertexDirection().

Referenced by analyze().

357  {
358  // Set up Geometry Service
359  // =======================
361 
362  const double xmin(0.0);
363  const double xmax(2.0 * theGeometry->DetHalfWidth());
364  const double ymin(-theGeometry->DetHalfHeight());
365  const double ymax(+theGeometry->DetHalfHeight());
366  const double zmin(0.0);
367  const double zmax(theGeometry->DetLength());
368  const double xyzCut(m_cosmicContainmentCut);
369 
370  m_index = 0;
371 
372  m_self = 0;
373  m_pdgCode = 0;
374  m_isTrackLike = 0;
375  m_isPrimary = 0;
376  m_cosmicScore = 0.f;
377 
378  m_trackVtxX = 0.f;
379  m_trackVtxY = 0.f;
380  m_trackVtxZ = 0.f;
381  m_trackEndX = 0.f;
382  m_trackEndY = 0.f;
383  m_trackEndZ = 0.f;
384  m_trackVtxDirX = 0.f;
385  m_trackVtxDirY = 0.f;
386  m_trackVtxDirZ = 0.f;
387  m_trackEndDirX = 0.f;
388  m_trackEndDirY = 0.f;
389  m_trackEndDirZ = 0.f;
390  m_trackLength = 0.f;
391  m_trackWidthX = 0.f;
392  m_trackWidthY = 0.f;
393  m_trackWidthZ = 0.f;
394  m_trackVtxDeltaYZ = 0.f;
395  m_trackEndDeltaYZ = 0.f;
396 
399 
400  m_nTracks = 0;
401  m_nHits = 0;
402 
403  // Loop over Reco Particles
404  // ========================
405  for (PFParticlesToHits::const_iterator iter1 = recoParticlesToHits.begin(),
406  iterEnd1 = recoParticlesToHits.end();
407  iter1 != iterEnd1;
408  ++iter1) {
409  const art::Ptr<recob::PFParticle> recoParticle = iter1->first;
410 
411  const HitVector& hitVector = iter1->second;
412  if (hitVector.empty()) continue;
413 
414  PFParticlesToTracks::const_iterator iter2 = recoParticlesToTracks.find(recoParticle);
415  if (recoParticlesToTracks.end() == iter2) continue;
416 
417  const TrackVector& trackVector = iter2->second;
418  if (trackVector.empty()) continue;
419 
420  m_nHits = hitVector.size();
421  m_nTracks = trackVector.size();
422 
423  m_self = recoParticle->Self();
424  m_pdgCode = recoParticle->PdgCode();
425  m_isPrimary = recoParticle->IsPrimary();
427  m_cosmicScore =
428  this->GetCosmicScore(recoParticle, recoParticlesToTracks, recoTracksToCosmicTags);
429 
430  m_trackVtxX = 0.f;
431  m_trackVtxY = 0.f;
432  m_trackVtxZ = 0.f;
433  m_trackEndX = 0.f;
434  m_trackEndY = 0.f;
435  m_trackEndZ = 0.f;
436  m_trackVtxDirX = 0.f;
437  m_trackVtxDirY = 0.f;
438  m_trackVtxDirZ = 0.f;
439  m_trackEndDirX = 0.f;
440  m_trackEndDirY = 0.f;
441  m_trackEndDirZ = 0.f;
442  m_trackLength = 0.f;
443  m_trackWidthX = 0.f;
444  m_trackWidthY = 0.f;
445  m_trackWidthZ = 0.f;
446  m_trackVtxDeltaYZ = 0.f;
447  m_trackEndDeltaYZ = 0.f;
448 
451 
452  for (TrackVector::const_iterator iter3 = trackVector.begin(), iterEnd3 = trackVector.end();
453  iter3 != iterEnd3;
454  ++iter3) {
455  const art::Ptr<recob::Track> track = *iter3;
456  const float trackLength(track->Length());
457 
458  if (trackLength < m_trackLength) continue;
459 
460  m_trackLength = trackLength;
461 
462  const auto& trackVtxPosition = track->Vertex();
463  const auto& trackVtxDirection = track->VertexDirection();
464  const auto& trackEndPosition = track->End();
465  const auto& trackEndDirection = track->EndDirection();
466 
467  m_trackVtxX = trackVtxPosition.x();
468  m_trackVtxY = trackVtxPosition.y();
469  m_trackVtxZ = trackVtxPosition.z();
470  m_trackVtxDirX = trackVtxDirection.x();
471  m_trackVtxDirY = trackVtxDirection.y();
472  m_trackVtxDirZ = trackVtxDirection.z();
473  m_trackEndX = trackEndPosition.x();
474  m_trackEndY = trackEndPosition.y();
475  m_trackEndZ = trackEndPosition.z();
476  m_trackEndDirX = trackEndDirection.x();
477  m_trackEndDirY = trackEndDirection.y();
478  m_trackEndDirZ = trackEndDirection.z();
479 
480  m_trackWidthX = std::fabs(m_trackEndX - m_trackVtxX);
481  m_trackWidthY = std::fabs(m_trackEndY - m_trackVtxY);
482  m_trackWidthZ = std::fabs(m_trackEndZ - m_trackVtxZ);
483 
485  std::min((ymax - m_trackVtxY), std::min((m_trackVtxZ - zmin), (zmax - m_trackVtxZ)));
487  std::min((m_trackEndY - ymin), std::min((m_trackEndZ - zmin), (zmax - m_trackEndZ)));
488 
489  m_trackVtxContained = ((m_trackVtxX > xmin + xyzCut && m_trackVtxX < xmax - xyzCut) &&
490  (m_trackVtxY > ymin + xyzCut && m_trackVtxY < ymax - xyzCut) &&
491  (m_trackVtxZ > zmin + xyzCut && m_trackVtxZ < zmax - xyzCut));
492  m_trackEndContained = ((m_trackEndX > xmin + xyzCut && m_trackEndX < xmax - xyzCut) &&
493  (m_trackEndY > ymin + xyzCut && m_trackEndY < ymax - xyzCut) &&
494  (m_trackEndZ > zmin + xyzCut && m_trackEndZ < zmax - xyzCut));
495  }
496 
497  std::cout << " PFParticle: [" << m_index << "] nHits=" << m_nHits
498  << ", nTracks=" << m_nTracks << ", cosmicScore=" << m_cosmicScore << std::endl;
499 
500  m_pRecoTree->Fill();
501  ++m_index;
502  }
503  }
size_t Self() const
Returns the index of this particle.
Definition: PFParticle.h:88
Length_t DetHalfWidth(TPCID const &tpcid=tpc_zero) const
Returns the half width of the active volume of the specified TPC.
Vector_t VertexDirection() const
Access to track direction at different points.
Definition: Track.h:166
int PdgCode() const
Return the type of particle as a PDG ID.
Definition: PFParticle.h:79
intermediate_table::const_iterator const_iterator
Length_t DetLength(TPCID const &tpcid=tpc_zero) const
Returns the length of the active volume of the specified TPC.
double Length(size_t p=0) const
Access to various track properties.
Definition: Track.h:207
Point_t const & Vertex() const
Access to track position at different points.
Definition: Track.h:158
bool IsPrimary() const
Returns whether the particle is the root of the flow.
Definition: PFParticle.h:82
std::vector< art::Ptr< recob::Track > > TrackVector
std::vector< art::Ptr< recob::Hit > > HitVector
float GetCosmicScore(const art::Ptr< recob::PFParticle > particle, const PFParticlesToTracks &recoParticlesToTracks, const TracksToCosmicTags &recoTracksToCosmicTags) const
Get cosmic score for a PFParticle using track-level information.
Vector_t EndDirection() const
Access to track direction at different points.
Definition: Track.h:167
static bool IsTrack(const art::Ptr< recob::PFParticle > particle)
Determine whether a particle has been reconstructed as track-like.
Point_t const & End() const
Access to track position at different points.
Definition: Track.h:159
Length_t DetHalfHeight(TPCID const &tpcid=tpc_zero) const
Returns the half height of the active volume of the specified TPC.
Float_t track
Definition: plot.C:35
void lar_pandora::PFParticleCosmicAna::FillTrueTree ( const HitVector hitVector,
const HitsToMCParticles trueHitsToParticles,
const HitsToPFParticles recoHitsToParticles,
const MCParticlesToMCTruth particlesToTruth,
const PFParticlesToTracks particlesToTracks,
const TracksToCosmicTags tracksToCosmicTags 
)
private

Fill track-level variables using input maps between reconstructed objects.

Parameters
hitVectorinput vector of reconstructed hits
trueHitsToParticlesmapping between true hits and particles
recoHitsToParticlesmapping between reconstructed hits and particles
particlesToTruthmapping between MC particles and MC truth
particlesToTracksmapping between reconstructed particles and tracks
tracksToCosmicTagsmapping between reconstructed tracks and cosmic tags

Definition at line 507 of file PFParticleCosmicAna_module.cc.

References GetCosmicScore(), m_nCosmicHits, m_nCosmicHitsFullyTagged, m_nCosmicHitsNotReconstructed, m_nCosmicHitsNotTagged, m_nCosmicHitsReconstructed, m_nCosmicHitsSemiTagged, m_nHits, m_nNeutrinoHits, m_nNeutrinoHitsFullyTagged, m_nNeutrinoHitsNotReconstructed, m_nNeutrinoHitsNotTagged, m_nNeutrinoHitsReconstructed, m_nNeutrinoHitsSemiTagged, m_pTrueTree, and simb::MCTruth::NeutrinoSet().

Referenced by analyze().

513  {
514  m_nHits = 0;
515 
516  m_nNeutrinoHits = 0;
522 
523  m_nCosmicHits = 0;
529 
530  for (HitVector::const_iterator iter2 = hitVector.begin(), iterEnd2 = hitVector.end();
531  iter2 != iterEnd2;
532  ++iter2) {
533  const art::Ptr<recob::Hit> hit = *iter2;
534 
535  HitsToMCParticles::const_iterator iter3 = trueHitsToParticles.find(hit);
536  if (trueHitsToParticles.end() == iter3) continue;
537 
538  const art::Ptr<simb::MCParticle> trueParticle = iter3->second;
539 
540  MCParticlesToMCTruth::const_iterator iter4 = particlesToTruth.find(trueParticle);
541  if (particlesToTruth.end() == iter4)
542  throw cet::exception("LArPandora") << " PFParticleCosmicAna::analyze --- Found a true "
543  "particle without any ancestry information ";
544 
545  const art::Ptr<simb::MCTruth> truth = iter4->second;
546 
547  float cosmicScore(-0.2);
548 
549  HitsToPFParticles::const_iterator iter5 = recoHitsToParticles.find(hit);
550  if (recoHitsToParticles.end() != iter5) {
551  const art::Ptr<recob::PFParticle> particle = iter5->second;
552  cosmicScore = this->GetCosmicScore(particle, particlesToTracks, tracksToCosmicTags);
553  }
554 
555  ++m_nHits;
556 
557  if (truth->NeutrinoSet()) {
558  ++m_nNeutrinoHits;
559 
560  if (cosmicScore >= 0)
562  else
564 
565  if (cosmicScore > 0.51)
567  else if (cosmicScore > 0.39)
569  else
571  }
572  else {
573  ++m_nCosmicHits;
574 
575  if (cosmicScore >= 0)
577  else
579 
580  if (cosmicScore > 0.51)
582  else if (cosmicScore > 0.39)
584  else
586  }
587  }
588 
589  m_pTrueTree->Fill();
590  }
intermediate_table::const_iterator const_iterator
Detector simulation of raw signals on wires.
float GetCosmicScore(const art::Ptr< recob::PFParticle > particle, const PFParticlesToTracks &recoParticlesToTracks, const TracksToCosmicTags &recoTracksToCosmicTags) const
Get cosmic score for a PFParticle using track-level information.
bool NeutrinoSet() const
Definition: MCTruth.h:78
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
std::array< std::vector< ProductInfo >, NumBranchTypes > const & art::ModuleBase::getConsumables ( ) const
inherited

Definition at line 43 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().

44  {
45  return collector_.getConsumables();
46  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables() const
float lar_pandora::PFParticleCosmicAna::GetCosmicScore ( const art::Ptr< recob::PFParticle particle,
const PFParticlesToTracks recoParticlesToTracks,
const TracksToCosmicTags recoTracksToCosmicTags 
) const
private

Get cosmic score for a PFParticle using track-level information.

Parameters
particleinput reconstructed particle
recoParticlesToTracksmapping between reconstructed particles and tracks
recoTracksToCosmicTagsmapping between reconstructed tracks and cosmic tags

Definition at line 594 of file PFParticleCosmicAna_module.cc.

References anab::CosmicTag::CosmicScore(), f, and track.

Referenced by FillRecoTree(), and FillTrueTree().

597  {
598  float cosmicScore(0.f);
599 
600  // Get cosmic tags associated with this particle
601  PFParticlesToTracks::const_iterator iter2 = recoParticlesToTracks.find(particle);
602  if (recoParticlesToTracks.end() != iter2) {
603  for (TrackVector::const_iterator iter3 = iter2->second.begin(),
604  iterEnd3 = iter2->second.end();
605  iter3 != iterEnd3;
606  ++iter3) {
607  const art::Ptr<recob::Track> track = *iter3;
608 
609  TracksToCosmicTags::const_iterator iter4 = recoTracksToCosmicTags.find(track);
610  if (recoTracksToCosmicTags.end() != iter4) {
611  for (CosmicTagVector::const_iterator iter5 = iter4->second.begin(),
612  iterEnd5 = iter4->second.end();
613  iter5 != iterEnd5;
614  ++iter5) {
615  const art::Ptr<anab::CosmicTag> cosmicTag = *iter5;
616  if (cosmicTag->CosmicScore() > cosmicScore) cosmicScore = cosmicTag->CosmicScore();
617  }
618  }
619  }
620  }
621 
622  return cosmicScore;
623  }
intermediate_table::const_iterator const_iterator
float & CosmicScore()
Definition: CosmicTag.h:54
TFile f
Definition: plotHisto.C:6
Float_t track
Definition: plot.C:35
Handle< TriggerResults > art::Observer::getTriggerResults ( Event const &  e) const
protectedinherited

Definition at line 75 of file Observer.cc.

References art::ProductRetriever::get(), and art::Observer::selectors_.

Referenced by art::OutputModule::doWriteEvent(), and art::Observer::wantAllEvents().

76  {
77  if (selectors_) {
78  return selectors_->getOneTriggerResults(e);
79  }
80 
81  // The following applies for cases where no SelectEvents entries
82  // exist.
83  Handle<TriggerResults> h;
84  if (e.get(empty_process_name, h)) {
85  return h;
86  }
87  return Handle<TriggerResults>{};
88  }
Float_t e
Definition: plot.C:35
std::optional< detail::ProcessAndEventSelectors > selectors_
Definition: Observer.h:79
std::unique_ptr< Worker > art::ModuleBase::makeWorker ( WorkerParams const &  wp)
inherited

Definition at line 37 of file ModuleBase.cc.

References art::ModuleBase::doMakeWorker(), and art::NumBranchTypes.

38  {
39  return doMakeWorker(wp);
40  }
virtual std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp)=0
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 82 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsume().

83  {
84  return collector_.mayConsume<T, BT>(tag);
85  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 96 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeMany().

97  {
98  collector_.mayConsumeMany<T, BT>();
99  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 89 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeView().

90  {
91  return collector_.mayConsumeView<T, BT>(tag);
92  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > mayConsumeView(InputTag const &)
ModuleDescription const & art::ModuleBase::moduleDescription ( ) const
inherited

Definition at line 13 of file ModuleBase.cc.

References art::errors::LogicError.

Referenced by art::OutputModule::doRespondToOpenInputFile(), art::OutputModule::doWriteEvent(), art::Modifier::fillProductDescriptions(), art::OutputModule::makePlugins_(), art::OutputWorker::OutputWorker(), reco::shower::LArPandoraModularShowerCreation::produce(), art::Modifier::registerProducts(), and art::OutputModule::registerProducts().

14  {
15  if (md_.has_value()) {
16  return *md_;
17  }
18 
20  "There was an error while calling moduleDescription().\n"}
21  << "The moduleDescription() base-class member function cannot be called\n"
22  "during module construction. To determine which module is "
23  "responsible\n"
24  "for calling it, find the '<module type>:<module "
25  "label>@Construction'\n"
26  "tag in the message prefix above. Please contact artists@fnal.gov\n"
27  "for guidance.\n";
28  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
string const & art::Observer::processName ( ) const
protectedinherited

Definition at line 57 of file Observer.cc.

References art::Observer::process_name_.

Referenced by art::FileDumperOutput::printPrincipal().

58  {
59  return process_name_;
60  }
std::string process_name_
Definition: Observer.h:76
void lar_pandora::PFParticleCosmicAna::reconfigure ( fhicl::ParameterSet const &  pset)

Definition at line 183 of file PFParticleCosmicAna_module.cc.

References fhicl::ParameterSet::get(), m_cosmicContainmentCut, m_cosmicLabel, m_geantModuleLabel, m_hitfinderLabel, m_particleLabel, m_trackfitLabel, m_useDaughterMCParticles, and m_useDaughterPFParticles.

Referenced by PFParticleCosmicAna().

184  {
185  m_cosmicLabel = pset.get<std::string>("CosmicTagModule", "cosmictagger");
186  m_particleLabel = pset.get<std::string>("PFParticleModule", "pandora");
187  m_trackfitLabel = pset.get<std::string>("TrackFitModule", "trackfit");
188  m_hitfinderLabel = pset.get<std::string>("HitFinderModule", "gaushit");
189  m_geantModuleLabel = pset.get<std::string>("GeantModule", "largeant");
190 
191  m_useDaughterPFParticles = pset.get<bool>("UseDaughterPFParticles", true);
192  m_useDaughterMCParticles = pset.get<bool>("UseDaughterMCParticles", true);
193 
194  m_cosmicContainmentCut = pset.get<double>("CosmicContainmentCut", 5.0);
195  }
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  md)
inherited

Definition at line 31 of file ModuleBase.cc.

References art::ModuleBase::md_.

32  {
33  md_ = md;
34  }
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited

Definition at line 49 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().

50  {
51  // Now that we know we have seen all the consumes declarations,
52  // sort the results for fast lookup later.
53  collector_.sortConsumables(current_process_name);
54  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
void sortConsumables(std::string const &current_process_name)
bool art::Observer::wantAllEvents ( ) const
inlineprotectednoexceptinherited

Definition at line 31 of file Observer.h.

References e, art::Observer::getTriggerResults(), art::Observer::wantAllEvents_, and art::Observer::wantEvent().

32  {
33  return wantAllEvents_;
34  }
bool wantAllEvents_
Definition: Observer.h:75
bool art::Observer::wantEvent ( ScheduleID  id,
Event const &  e 
) const
protectedinherited

Definition at line 63 of file Observer.cc.

References art::Observer::rejectors_, art::Observer::selectors_, and art::Observer::wantAllEvents_.

Referenced by art::OutputModule::doEvent(), art::OutputModule::doWriteEvent(), and art::Observer::wantAllEvents().

64  {
65  if (wantAllEvents_) {
66  return true;
67  }
68  bool const select_event = selectors_ ? selectors_->matchEvent(id, e) : true;
69  bool const reject_event =
70  rejectors_ ? rejectors_->matchEvent(id, e) : false;
71  return select_event and not reject_event;
72  }
bool wantAllEvents_
Definition: Observer.h:75
std::optional< detail::ProcessAndEventSelectors > rejectors_
Definition: Observer.h:80
Float_t e
Definition: plot.C:35
std::optional< detail::ProcessAndEventSelectors > selectors_
Definition: Observer.h:79

Member Data Documentation

double lar_pandora::PFParticleCosmicAna::m_cosmicContainmentCut
private

Definition at line 142 of file PFParticleCosmicAna_module.cc.

Referenced by FillRecoTree(), and reconfigure().

std::string lar_pandora::PFParticleCosmicAna::m_cosmicLabel
private

Definition at line 136 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and reconfigure().

float lar_pandora::PFParticleCosmicAna::m_cosmicScore
private

Definition at line 93 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_event
private

Definition at line 86 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and beginJob().

std::string lar_pandora::PFParticleCosmicAna::m_geantModuleLabel
private

Definition at line 137 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and reconfigure().

std::string lar_pandora::PFParticleCosmicAna::m_hitfinderLabel
private

Definition at line 133 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and reconfigure().

int lar_pandora::PFParticleCosmicAna::m_index
private

Definition at line 87 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_isPrimary
private

Definition at line 92 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_isTrackLike
private

Definition at line 91 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHits
private

Definition at line 126 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsFullyTagged
private

Definition at line 127 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsNotReconstructed
private

Definition at line 130 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsNotTagged
private

Definition at line 129 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsReconstructed
private

Definition at line 131 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsSemiTagged
private

Definition at line 128 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nHits
private

Definition at line 95 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), FillRecoTree(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHits
private

Definition at line 119 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsFullyTagged
private

Definition at line 120 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsNotReconstructed
private

Definition at line 123 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsNotTagged
private

Definition at line 122 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsReconstructed
private

Definition at line 124 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsSemiTagged
private

Definition at line 121 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nTracks
private

Definition at line 94 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

std::string lar_pandora::PFParticleCosmicAna::m_particleLabel
private

Definition at line 135 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and reconfigure().

int lar_pandora::PFParticleCosmicAna::m_pdgCode
private

Definition at line 90 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

TTree* lar_pandora::PFParticleCosmicAna::m_pRecoTree
private

Definition at line 82 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

TTree* lar_pandora::PFParticleCosmicAna::m_pTrueTree
private

Definition at line 83 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_run
private

Definition at line 85 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and beginJob().

int lar_pandora::PFParticleCosmicAna::m_self
private

Definition at line 89 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_trackEndContained
private

Definition at line 117 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndDeltaYZ
private

Definition at line 114 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndDirX
private

Definition at line 106 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndDirY
private

Definition at line 107 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndDirZ
private

Definition at line 108 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndX
private

Definition at line 100 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndY
private

Definition at line 101 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndZ
private

Definition at line 102 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

std::string lar_pandora::PFParticleCosmicAna::m_trackfitLabel
private

Definition at line 134 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and reconfigure().

float lar_pandora::PFParticleCosmicAna::m_trackLength
private

Definition at line 109 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_trackVtxContained
private

Definition at line 116 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxDeltaYZ
private

Definition at line 113 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxDirX
private

Definition at line 103 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxDirY
private

Definition at line 104 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxDirZ
private

Definition at line 105 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxX
private

Definition at line 97 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxY
private

Definition at line 98 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxZ
private

Definition at line 99 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackWidthX
private

Definition at line 110 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackWidthY
private

Definition at line 111 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackWidthZ
private

Definition at line 112 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

bool lar_pandora::PFParticleCosmicAna::m_useDaughterMCParticles
private

Definition at line 140 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and reconfigure().

bool lar_pandora::PFParticleCosmicAna::m_useDaughterPFParticles
private

Definition at line 139 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and reconfigure().


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