LArSoft  v10_04_05
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...
 
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 167 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.

167  : art::EDAnalyzer(pset)
168  {
169  m_cosmicLabel = pset.get<std::string>("CosmicTagModule", "cosmictagger");
170  m_particleLabel = pset.get<std::string>("PFParticleModule", "pandora");
171  m_trackfitLabel = pset.get<std::string>("TrackFitModule", "trackfit");
172  m_hitfinderLabel = pset.get<std::string>("HitFinderModule", "gaushit");
173  m_geantModuleLabel = pset.get<std::string>("GeantModule", "largeant");
174 
175  m_useDaughterPFParticles = pset.get<bool>("UseDaughterPFParticles", true);
176  m_useDaughterMCParticles = pset.get<bool>("UseDaughterMCParticles", true);
177 
178  m_cosmicContainmentCut = pset.get<double>("CosmicContainmentCut", 5.0);
179  }

Member Function Documentation

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

Definition at line 257 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().

258  {
259  std::cout << " *** PFParticleCosmicAna::analyze(...) *** " << std::endl;
260 
261  //
262  // Note: I've made this is MicroBooNE-only module
263  //
264 
265  m_run = evt.run();
266  m_event = evt.id().event();
267 
268  std::cout << " Run: " << m_run << std::endl;
269  std::cout << " Event: " << m_event << std::endl;
270 
271  // Collect True Particles
272  // ======================
273  HitVector hitVector;
274  MCTruthToMCParticles truthToParticles;
275  MCParticlesToMCTruth particlesToTruth;
276  MCParticlesToHits trueParticlesToHits;
277  HitsToMCParticles trueHitsToParticles;
278 
281  evt, m_geantModuleLabel, truthToParticles, particlesToTruth);
284  hitVector,
285  trueParticlesToHits,
286  trueHitsToParticles,
290 
291  // Collect Reco Particles
292  // ======================
293  PFParticleVector recoParticleVector;
294  PFParticlesToHits recoParticlesToHits;
295  HitsToPFParticles recoHitsToParticles;
296 
297  LArPandoraHelper::CollectPFParticles(evt, m_particleLabel, recoParticleVector);
301  recoParticlesToHits,
302  recoHitsToParticles,
306 
307  std::cout << " PFParticles: " << recoParticleVector.size() << std::endl;
308 
309  // Collect Reco Tracks
310  // ===================
311  TrackVector recoTrackVector;
312  PFParticlesToTracks recoParticlesToTracks;
313  LArPandoraHelper::CollectTracks(evt, m_trackfitLabel, recoTrackVector, recoParticlesToTracks);
314 
315  // Collect Cosmic Tags
316  // =====================
317  CosmicTagVector recoCosmicTagVector;
318  TracksToCosmicTags recoTracksToCosmicTags;
320  evt, m_cosmicLabel, recoCosmicTagVector, recoTracksToCosmicTags);
321 
322  // Analyse Reconstructed Particles
323  // ===============================
324  this->FillRecoTree(recoParticlesToHits, recoParticlesToTracks, recoTracksToCosmicTags);
325 
326  // Analyse True Hits
327  // =================
328  this->FillTrueTree(hitVector,
329  trueHitsToParticles,
330  recoHitsToParticles,
331  particlesToTruth,
332  recoParticlesToTracks,
333  recoTracksToCosmicTags);
334  }
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 183 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.

184  {
185  mf::LogDebug("LArPandora") << " *** PFParticleCosmicAna::beginJob() *** " << std::endl;
186 
187  //
189 
190  m_pRecoTree = tfs->make<TTree>("recoTree", "LAr Cosmic Reco Tree");
191  m_pRecoTree->Branch("run", &m_run, "run/I");
192  m_pRecoTree->Branch("event", &m_event, "event/I");
193  m_pRecoTree->Branch("index", &m_index, "index/I");
194  m_pRecoTree->Branch("self", &m_self, "self/I");
195  m_pRecoTree->Branch("pdgCode", &m_pdgCode, "pdgCode/I");
196  m_pRecoTree->Branch("isTrackLike", &m_isTrackLike, "isTrackLike/I");
197  m_pRecoTree->Branch("isPrimary", &m_isPrimary, "isPrimary/I");
198  m_pRecoTree->Branch("cosmicScore", &m_cosmicScore, "cosmicScore/F");
199  m_pRecoTree->Branch("trackVtxX", &m_trackVtxX, "trackVtxX/F");
200  m_pRecoTree->Branch("trackVtxY", &m_trackVtxY, "trackVtxY/F");
201  m_pRecoTree->Branch("trackVtxZ", &m_trackVtxZ, "trackVtxZ/F");
202  m_pRecoTree->Branch("trackEndX", &m_trackEndX, "trackEndX/F");
203  m_pRecoTree->Branch("trackEndY", &m_trackEndY, "trackEndY/F");
204  m_pRecoTree->Branch("trackEndZ", &m_trackEndZ, "trackEndZ/F");
205  m_pRecoTree->Branch("trackVtxDirX", &m_trackVtxDirX, "trackVtxDirX/F");
206  m_pRecoTree->Branch("trackVtxDirY", &m_trackVtxDirY, "trackVtxDirY/F");
207  m_pRecoTree->Branch("trackVtxDirZ", &m_trackVtxDirZ, "trackVtxDirZ/F");
208  m_pRecoTree->Branch("trackEndDirX", &m_trackEndDirX, "trackEndDirX/F");
209  m_pRecoTree->Branch("trackEndDirY", &m_trackEndDirY, "trackEndDirY/F");
210  m_pRecoTree->Branch("trackEndDirZ", &m_trackEndDirZ, "trackEndDirZ/F");
211  m_pRecoTree->Branch("trackLength", &m_trackLength, "trackLength/F");
212  m_pRecoTree->Branch("trackWidthX", &m_trackWidthX, "trackWidthX/F");
213  m_pRecoTree->Branch("trackWidthY", &m_trackWidthY, "trackWidthY/F");
214  m_pRecoTree->Branch("trackWidthZ", &m_trackWidthZ, "trackWidthZ/F");
215  m_pRecoTree->Branch("trackVtxDeltaYZ", &m_trackVtxDeltaYZ, "trackVtxDeltaYZ/F");
216  m_pRecoTree->Branch("trackEndDeltaYZ", &m_trackEndDeltaYZ, "trackEndDeltaYZ/F");
217  m_pRecoTree->Branch("trackVtxContained", &m_trackVtxContained, "trackVtxContained/I");
218  m_pRecoTree->Branch("trackEndContained", &m_trackEndContained, "trackEndContained/I");
219  m_pRecoTree->Branch("nTracks", &m_nTracks, "nTracks/I");
220  m_pRecoTree->Branch("nHits", &m_nHits, "nHits/I");
221 
222  m_pTrueTree = tfs->make<TTree>("trueTree", "LAr Cosmic True Tree");
223  m_pTrueTree->Branch("run", &m_run, "run/I");
224  m_pTrueTree->Branch("event", &m_event, "event/I");
225  m_pTrueTree->Branch("nHits", &m_nHits, "nHits/I");
226  m_pTrueTree->Branch("nNeutrinoHits", &m_nNeutrinoHits, "nNeutrinoHits/I");
227  m_pTrueTree->Branch(
228  "nNeutrinoHitsFullyTagged", &m_nNeutrinoHitsFullyTagged, "nNeutrinoHitsFullyTagged/I");
229  m_pTrueTree->Branch(
230  "nNeutrinoHitsSemiTagged", &m_nNeutrinoHitsSemiTagged, "nNeutrinoHitsSemiTagged/I");
231  m_pTrueTree->Branch(
232  "nNeutrinoHitsNotTagged", &m_nNeutrinoHitsNotTagged, "nNeutrinoHitsNotTagged/I");
233  m_pTrueTree->Branch("nNeutrinoHitsNotReconstructed",
235  "nNeutrinoHitsNotReconstructed/I");
236  m_pTrueTree->Branch(
237  "nNeutrinoHitsReconstructed", &m_nNeutrinoHitsReconstructed, "nNeutrinoHitsReconstructed/I");
238  m_pTrueTree->Branch("nCosmicHits", &m_nCosmicHits, "nCosmicHits/I");
239  m_pTrueTree->Branch(
240  "nCosmicHitsFullyTagged", &m_nCosmicHitsFullyTagged, "nCosmicHitsFullyTagged/I");
241  m_pTrueTree->Branch(
242  "nCosmicHitsSemiTagged", &m_nCosmicHitsSemiTagged, "nCosmicHitsSemiTagged/I");
243  m_pTrueTree->Branch("nCosmicHitsNotTagged", &m_nCosmicHitsNotTagged, "nCosmicHitsNotTagged/I");
244  m_pTrueTree->Branch("nCosmicHitsNotReconstructed",
246  "nCosmicHitsNotReconstructed/I");
247  m_pTrueTree->Branch(
248  "nCosmicHitsReconstructed", &m_nCosmicHitsReconstructed, "nCosmicHitsReconstructed/I");
249  }
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 253 of file PFParticleCosmicAna_module.cc.

253 {}
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 338 of file PFParticleCosmicAna_module.cc.

References 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().

341  {
342  // Set up Geometry Service
343  // =======================
344  auto const& tpc = art::ServiceHandle<geo::Geometry const>()->TPC({0, 0});
345 
346  const double xmin(0.0);
347  const double xmax(2.0 * tpc.HalfWidth());
348  const double ymin(-tpc.HalfHeight());
349  const double ymax(+tpc.HalfHeight());
350  const double zmin(0.0);
351  const double zmax(tpc.Length());
352  const double xyzCut(m_cosmicContainmentCut);
353 
354  m_index = 0;
355 
356  m_self = 0;
357  m_pdgCode = 0;
358  m_isTrackLike = 0;
359  m_isPrimary = 0;
360  m_cosmicScore = 0.f;
361 
362  m_trackVtxX = 0.f;
363  m_trackVtxY = 0.f;
364  m_trackVtxZ = 0.f;
365  m_trackEndX = 0.f;
366  m_trackEndY = 0.f;
367  m_trackEndZ = 0.f;
368  m_trackVtxDirX = 0.f;
369  m_trackVtxDirY = 0.f;
370  m_trackVtxDirZ = 0.f;
371  m_trackEndDirX = 0.f;
372  m_trackEndDirY = 0.f;
373  m_trackEndDirZ = 0.f;
374  m_trackLength = 0.f;
375  m_trackWidthX = 0.f;
376  m_trackWidthY = 0.f;
377  m_trackWidthZ = 0.f;
378  m_trackVtxDeltaYZ = 0.f;
379  m_trackEndDeltaYZ = 0.f;
380 
383 
384  m_nTracks = 0;
385  m_nHits = 0;
386 
387  // Loop over Reco Particles
388  // ========================
389  for (PFParticlesToHits::const_iterator iter1 = recoParticlesToHits.begin(),
390  iterEnd1 = recoParticlesToHits.end();
391  iter1 != iterEnd1;
392  ++iter1) {
393  const art::Ptr<recob::PFParticle> recoParticle = iter1->first;
394 
395  const HitVector& hitVector = iter1->second;
396  if (hitVector.empty()) continue;
397 
398  PFParticlesToTracks::const_iterator iter2 = recoParticlesToTracks.find(recoParticle);
399  if (recoParticlesToTracks.end() == iter2) continue;
400 
401  const TrackVector& trackVector = iter2->second;
402  if (trackVector.empty()) continue;
403 
404  m_nHits = hitVector.size();
405  m_nTracks = trackVector.size();
406 
407  m_self = recoParticle->Self();
408  m_pdgCode = recoParticle->PdgCode();
409  m_isPrimary = recoParticle->IsPrimary();
411  m_cosmicScore =
412  this->GetCosmicScore(recoParticle, recoParticlesToTracks, recoTracksToCosmicTags);
413 
414  m_trackVtxX = 0.f;
415  m_trackVtxY = 0.f;
416  m_trackVtxZ = 0.f;
417  m_trackEndX = 0.f;
418  m_trackEndY = 0.f;
419  m_trackEndZ = 0.f;
420  m_trackVtxDirX = 0.f;
421  m_trackVtxDirY = 0.f;
422  m_trackVtxDirZ = 0.f;
423  m_trackEndDirX = 0.f;
424  m_trackEndDirY = 0.f;
425  m_trackEndDirZ = 0.f;
426  m_trackLength = 0.f;
427  m_trackWidthX = 0.f;
428  m_trackWidthY = 0.f;
429  m_trackWidthZ = 0.f;
430  m_trackVtxDeltaYZ = 0.f;
431  m_trackEndDeltaYZ = 0.f;
432 
435 
436  for (TrackVector::const_iterator iter3 = trackVector.begin(), iterEnd3 = trackVector.end();
437  iter3 != iterEnd3;
438  ++iter3) {
439  const art::Ptr<recob::Track> track = *iter3;
440  const float trackLength(track->Length());
441 
442  if (trackLength < m_trackLength) continue;
443 
444  m_trackLength = trackLength;
445 
446  const auto& trackVtxPosition = track->Vertex();
447  const auto& trackVtxDirection = track->VertexDirection();
448  const auto& trackEndPosition = track->End();
449  const auto& trackEndDirection = track->EndDirection();
450 
451  m_trackVtxX = trackVtxPosition.x();
452  m_trackVtxY = trackVtxPosition.y();
453  m_trackVtxZ = trackVtxPosition.z();
454  m_trackVtxDirX = trackVtxDirection.x();
455  m_trackVtxDirY = trackVtxDirection.y();
456  m_trackVtxDirZ = trackVtxDirection.z();
457  m_trackEndX = trackEndPosition.x();
458  m_trackEndY = trackEndPosition.y();
459  m_trackEndZ = trackEndPosition.z();
460  m_trackEndDirX = trackEndDirection.x();
461  m_trackEndDirY = trackEndDirection.y();
462  m_trackEndDirZ = trackEndDirection.z();
463 
464  m_trackWidthX = std::fabs(m_trackEndX - m_trackVtxX);
465  m_trackWidthY = std::fabs(m_trackEndY - m_trackVtxY);
466  m_trackWidthZ = std::fabs(m_trackEndZ - m_trackVtxZ);
467 
469  std::min((ymax - m_trackVtxY), std::min((m_trackVtxZ - zmin), (zmax - m_trackVtxZ)));
471  std::min((m_trackEndY - ymin), std::min((m_trackEndZ - zmin), (zmax - m_trackEndZ)));
472 
473  m_trackVtxContained = ((m_trackVtxX > xmin + xyzCut && m_trackVtxX < xmax - xyzCut) &&
474  (m_trackVtxY > ymin + xyzCut && m_trackVtxY < ymax - xyzCut) &&
475  (m_trackVtxZ > zmin + xyzCut && m_trackVtxZ < zmax - xyzCut));
476  m_trackEndContained = ((m_trackEndX > xmin + xyzCut && m_trackEndX < xmax - xyzCut) &&
477  (m_trackEndY > ymin + xyzCut && m_trackEndY < ymax - xyzCut) &&
478  (m_trackEndZ > zmin + xyzCut && m_trackEndZ < zmax - xyzCut));
479  }
480 
481  std::cout << " PFParticle: [" << m_index << "] nHits=" << m_nHits
482  << ", nTracks=" << m_nTracks << ", cosmicScore=" << m_cosmicScore << std::endl;
483 
484  m_pRecoTree->Fill();
485  ++m_index;
486  }
487  }
size_t Self() const
Returns the index of this particle.
Definition: PFParticle.h:88
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
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
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 491 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().

497  {
498  m_nHits = 0;
499 
500  m_nNeutrinoHits = 0;
506 
507  m_nCosmicHits = 0;
513 
514  for (HitVector::const_iterator iter2 = hitVector.begin(), iterEnd2 = hitVector.end();
515  iter2 != iterEnd2;
516  ++iter2) {
517  const art::Ptr<recob::Hit> hit = *iter2;
518 
519  HitsToMCParticles::const_iterator iter3 = trueHitsToParticles.find(hit);
520  if (trueHitsToParticles.end() == iter3) continue;
521 
522  const art::Ptr<simb::MCParticle> trueParticle = iter3->second;
523 
524  MCParticlesToMCTruth::const_iterator iter4 = particlesToTruth.find(trueParticle);
525  if (particlesToTruth.end() == iter4)
526  throw cet::exception("LArPandora") << " PFParticleCosmicAna::analyze --- Found a true "
527  "particle without any ancestry information ";
528 
529  const art::Ptr<simb::MCTruth> truth = iter4->second;
530 
531  float cosmicScore(-0.2);
532 
533  HitsToPFParticles::const_iterator iter5 = recoHitsToParticles.find(hit);
534  if (recoHitsToParticles.end() != iter5) {
535  const art::Ptr<recob::PFParticle> particle = iter5->second;
536  cosmicScore = this->GetCosmicScore(particle, particlesToTracks, tracksToCosmicTags);
537  }
538 
539  ++m_nHits;
540 
541  if (truth->NeutrinoSet()) {
542  ++m_nNeutrinoHits;
543 
544  if (cosmicScore >= 0)
546  else
548 
549  if (cosmicScore > 0.51)
551  else if (cosmicScore > 0.39)
553  else
555  }
556  else {
557  ++m_nCosmicHits;
558 
559  if (cosmicScore >= 0)
561  else
563 
564  if (cosmicScore > 0.51)
566  else if (cosmicScore > 0.39)
568  else
570  }
571  }
572 
573  m_pTrueTree->Fill();
574  }
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 578 of file PFParticleCosmicAna_module.cc.

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

Referenced by FillRecoTree(), and FillTrueTree().

581  {
582  float cosmicScore(0.f);
583 
584  // Get cosmic tags associated with this particle
585  PFParticlesToTracks::const_iterator iter2 = recoParticlesToTracks.find(particle);
586  if (recoParticlesToTracks.end() != iter2) {
587  for (TrackVector::const_iterator iter3 = iter2->second.begin(),
588  iterEnd3 = iter2->second.end();
589  iter3 != iterEnd3;
590  ++iter3) {
591  const art::Ptr<recob::Track> track = *iter3;
592 
593  TracksToCosmicTags::const_iterator iter4 = recoTracksToCosmicTags.find(track);
594  if (recoTracksToCosmicTags.end() != iter4) {
595  for (CosmicTagVector::const_iterator iter5 = iter4->second.begin(),
596  iterEnd5 = iter4->second.end();
597  iter5 != iterEnd5;
598  ++iter5) {
599  const art::Ptr<anab::CosmicTag> cosmicTag = *iter5;
600  if (cosmicTag->CosmicScore() > cosmicScore) cosmicScore = cosmicTag->CosmicScore();
601  }
602  }
603  }
604  }
605 
606  return cosmicScore;
607  }
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)
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 137 of file PFParticleCosmicAna_module.cc.

Referenced by FillRecoTree(), and PFParticleCosmicAna().

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

Definition at line 131 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and PFParticleCosmicAna().

float lar_pandora::PFParticleCosmicAna::m_cosmicScore
private

Definition at line 88 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_event
private

Definition at line 81 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and beginJob().

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

Definition at line 132 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and PFParticleCosmicAna().

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

Definition at line 128 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and PFParticleCosmicAna().

int lar_pandora::PFParticleCosmicAna::m_index
private

Definition at line 82 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_isPrimary
private

Definition at line 87 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_isTrackLike
private

Definition at line 86 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHits
private

Definition at line 121 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsFullyTagged
private

Definition at line 122 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsNotReconstructed
private

Definition at line 125 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsNotTagged
private

Definition at line 124 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsReconstructed
private

Definition at line 126 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nCosmicHitsSemiTagged
private

Definition at line 123 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nHits
private

Definition at line 90 of file PFParticleCosmicAna_module.cc.

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

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHits
private

Definition at line 114 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsFullyTagged
private

Definition at line 115 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsNotReconstructed
private

Definition at line 118 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsNotTagged
private

Definition at line 117 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsReconstructed
private

Definition at line 119 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nNeutrinoHitsSemiTagged
private

Definition at line 116 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_nTracks
private

Definition at line 89 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

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

Definition at line 130 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and PFParticleCosmicAna().

int lar_pandora::PFParticleCosmicAna::m_pdgCode
private

Definition at line 85 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

TTree* lar_pandora::PFParticleCosmicAna::m_pRecoTree
private

Definition at line 77 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

TTree* lar_pandora::PFParticleCosmicAna::m_pTrueTree
private

Definition at line 78 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillTrueTree().

int lar_pandora::PFParticleCosmicAna::m_run
private

Definition at line 80 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and beginJob().

int lar_pandora::PFParticleCosmicAna::m_self
private

Definition at line 84 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_trackEndContained
private

Definition at line 112 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndDeltaYZ
private

Definition at line 109 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndDirX
private

Definition at line 101 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndDirY
private

Definition at line 102 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndDirZ
private

Definition at line 103 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndX
private

Definition at line 95 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndY
private

Definition at line 96 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackEndZ
private

Definition at line 97 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

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

Definition at line 129 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and PFParticleCosmicAna().

float lar_pandora::PFParticleCosmicAna::m_trackLength
private

Definition at line 104 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

int lar_pandora::PFParticleCosmicAna::m_trackVtxContained
private

Definition at line 111 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxDeltaYZ
private

Definition at line 108 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxDirX
private

Definition at line 98 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxDirY
private

Definition at line 99 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxDirZ
private

Definition at line 100 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxX
private

Definition at line 92 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxY
private

Definition at line 93 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackVtxZ
private

Definition at line 94 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackWidthX
private

Definition at line 105 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackWidthY
private

Definition at line 106 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

float lar_pandora::PFParticleCosmicAna::m_trackWidthZ
private

Definition at line 107 of file PFParticleCosmicAna_module.cc.

Referenced by beginJob(), and FillRecoTree().

bool lar_pandora::PFParticleCosmicAna::m_useDaughterMCParticles
private

Definition at line 135 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and PFParticleCosmicAna().

bool lar_pandora::PFParticleCosmicAna::m_useDaughterPFParticles
private

Definition at line 134 of file PFParticleCosmicAna_module.cc.

Referenced by analyze(), and PFParticleCosmicAna().


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