Public Member Functions | Private Attributes | List of all members
lar_pandora::PFParticleAnalysis Class Reference

PFParticleAnalysis class. More...

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

Public Member Functions

 PFParticleAnalysis (fhicl::ParameterSet const &pset)
 Constructor. More...
 
virtual ~PFParticleAnalysis ()
 Destructor. More...
 
void beginJob ()
 
void endJob ()
 
void analyze (const art::Event &evt)
 
void reconfigure (fhicl::ParameterSet const &pset)
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
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)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
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)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Attributes

TTree * m_pRecoTree
 
int m_run
 
int m_event
 
int m_index
 
int m_self
 
int m_pdgcode
 
int m_primary
 
int m_parent
 
int m_daughters
 
int m_generation
 
int m_neutrino
 
int m_finalstate
 
int m_vertex
 
int m_track
 
int m_trackid
 
int m_shower
 
int m_showerid
 
int m_clusters
 
int m_spacepoints
 
int m_hits
 
int m_trajectorypoints
 
int m_trackhits
 
int m_showerhits
 
double m_pfovtxx
 
double m_pfovtxy
 
double m_pfovtxz
 
double m_trkvtxx
 
double m_trkvtxy
 
double m_trkvtxz
 
double m_trkvtxdirx
 
double m_trkvtxdiry
 
double m_trkvtxdirz
 
double m_trkendx
 
double m_trkendy
 
double m_trkendz
 
double m_trkenddirx
 
double m_trkenddiry
 
double m_trkenddirz
 
double m_trklength
 
double m_trkstraightlength
 
double m_shwvtxx
 
double m_shwvtxy
 
double m_shwvtxz
 
double m_shwvtxdirx
 
double m_shwvtxdiry
 
double m_shwvtxdirz
 
double m_shwlength
 
double m_shwopenangle
 
double m_shwbestplane
 
double m_t0
 
std::string m_particleLabel
 
std::string m_trackLabel
 
std::string m_showerLabel
 
bool m_printDebug
 switch for print statements (TODO: use message service!) More...
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
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 ()
 

Detailed Description

PFParticleAnalysis class.

Definition at line 25 of file PFParticleAnalysis_module.cc.

Constructor & Destructor Documentation

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

Constructor.

Parameters
pset

Definition at line 139 of file PFParticleAnalysis_module.cc.

139  : art::EDAnalyzer(pset)
140 {
141  this->reconfigure(pset);
142 }
void reconfigure(fhicl::ParameterSet const &pset)
lar_pandora::PFParticleAnalysis::~PFParticleAnalysis ( )
virtual

Destructor.

Definition at line 146 of file PFParticleAnalysis_module.cc.

147 {
148 }

Member Function Documentation

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

Definition at line 229 of file PFParticleAnalysis_module.cc.

230 {
231  if (m_printDebug)
232  std::cout << " *** PFParticleAnalysis::analyze(...) *** " << std::endl;
233 
234  m_run = evt.run();
235  m_event = evt.id().event();
236  m_index = 0;
237 
238  m_self = 0;
239  m_pdgcode = 0;
240  m_primary = 0;
241  m_parent = 0;
242  m_daughters = 0;
243  m_generation = 0;
244  m_neutrino = 0;
245  m_finalstate = 0;
246  m_vertex = 0;
247  m_track = 0;
248  m_trackid = -999;
249  m_shower = 0;
250  m_showerid = -999;
251 
252  m_clusters = 0;
253  m_spacepoints = 0;
254  m_hits = 0;
255  m_trajectorypoints = 0;
256  m_trackhits = 0;
257  m_showerhits = 0;
258 
259  m_pfovtxx = 0.0;
260  m_pfovtxy = 0.0;
261  m_pfovtxz = 0.0;
262 
263  m_trkvtxx = 0.0;
264  m_trkvtxy = 0.0;
265  m_trkvtxz = 0.0;
266  m_trkvtxdirx = 0.0;
267  m_trkvtxdiry = 0.0;
268  m_trkvtxdirz = 0.0;
269  m_trkendx = 0.0;
270  m_trkendy = 0.0;
271  m_trkendz = 0.0;
272  m_trkenddirx = 0.0;
273  m_trkenddiry = 0.0;
274  m_trkenddirz = 0.0;
275  m_trklength = 0.0;
276  m_trkstraightlength = 0.0;
277 
278  m_shwvtxx = 0.0;
279  m_shwvtxy = 0.0;
280  m_shwvtxz = 0.0;
281  m_shwvtxdirx = 0.0;
282  m_shwvtxdiry = 0.0;
283  m_shwvtxdirz = 0.0;
284  m_shwlength = 0.0;
285  m_shwopenangle = 0.0;
286  m_shwbestplane = 0.0;
287 
288  m_t0 = 0;
289 
290  if (m_printDebug)
291  {
292  std::cout << " Run: " << m_run << std::endl;
293  std::cout << " Event: " << m_event << std::endl;
294  }
295 
296  // Get the reconstructed PFParticles
297  // =================================
298  PFParticleVector particleVector;
299  PFParticleVector particles1, particles2;
300  PFParticlesToClusters particlesToClusters;
301  PFParticlesToSpacePoints particlesToSpacePoints;
302  PFParticlesToHits particlesToHits;
303  HitsToPFParticles hitsToParticles;
304 
306  LArPandoraHelper::CollectPFParticles(evt, m_particleLabel, particles1, particlesToClusters);
307  LArPandoraHelper::CollectPFParticles(evt, m_particleLabel, particles2, particlesToSpacePoints);
308  LArPandoraHelper::BuildPFParticleHitMaps(evt, m_particleLabel, particlesToHits, hitsToParticles);
309 
310  if (m_printDebug)
311  std::cout << " PFParticles: " << particleVector.size() << std::endl;
312 
313  if (particleVector.empty())
314  {
315  m_pRecoTree->Fill();
316  return;
317  }
318 
319  // Get the reconstructed vertices
320  // ==============================
321  VertexVector vertexVector;
322  PFParticlesToVertices particlesToVertices;
323  LArPandoraHelper::CollectVertices(evt, m_particleLabel, vertexVector, particlesToVertices);
324 
325  // Get the reconstructed tracks
326  // ============================
327  TrackVector trackVector, trackVector2;
328  PFParticlesToTracks particlesToTracks;
329  TracksToHits tracksToHits;
330  LArPandoraHelper::CollectTracks(evt, m_trackLabel, trackVector, particlesToTracks);
331  LArPandoraHelper::CollectTracks(evt, m_trackLabel, trackVector2, tracksToHits);
332 
333  // Get the reconstructed showers
334  // ============================
335  ShowerVector showerVector, showerVector2;
336  PFParticlesToShowers particlesToShowers;
337  ShowersToHits showersToHits;
338  LArPandoraHelper::CollectShowers(evt, m_showerLabel, showerVector, particlesToShowers);
339  LArPandoraHelper::CollectShowers(evt, m_showerLabel, showerVector2, showersToHits);
340 
341  // Get the reconstructed T0 objects
342  // ================================
343  T0Vector t0Vector;
344  PFParticlesToT0s particlesToT0s;
345  LArPandoraHelper::CollectT0s(evt, m_particleLabel, t0Vector, particlesToT0s);
346 
347  // Build an indexed map of the PFParticles
348  // =======================================
349  PFParticleMap particleMap;
350  LArPandoraHelper::BuildPFParticleMap(particleVector, particleMap);
351 
352  // Write PFParticle properties to ROOT file
353  // ========================================
354  for (unsigned int n = 0; n < particleVector.size(); ++n)
355  {
356  const art::Ptr<recob::PFParticle> particle = particleVector.at(n);
357 
358  m_index = n;
359  m_self = particle->Self();
360  m_pdgcode = particle->PdgCode();
361  m_primary = particle->IsPrimary();
362  m_parent = (particle->IsPrimary() ? -1 : particle->Parent());
363  m_daughters = particle->NumDaughters();
364  m_generation = LArPandoraHelper::GetGeneration(particleMap, particle);
365  m_neutrino = LArPandoraHelper::GetParentNeutrino(particleMap, particle);
366  m_finalstate = LArPandoraHelper::IsFinalState(particleMap, particle);
367  m_vertex = 0;
368  m_track = 0;
369  m_trackid = -999;
370  m_shower = 0;
371  m_showerid = -999;
372 
373  m_clusters = 0;
374  m_spacepoints = 0;
375  m_hits = 0;
376  m_trajectorypoints = 0;
377  m_trackhits = 0;
378  m_showerhits = 0;
379 
380  m_pfovtxx = 0.0;
381  m_pfovtxy = 0.0;
382  m_pfovtxz = 0.0;
383 
384  m_trkvtxx = 0.0;
385  m_trkvtxy = 0.0;
386  m_trkvtxz = 0.0;
387  m_trkvtxdirx = 0.0;
388  m_trkvtxdiry = 0.0;
389  m_trkvtxdirz = 0.0;
390  m_trkendx = 0.0;
391  m_trkendy = 0.0;
392  m_trkendz = 0.0;
393  m_trkenddirx = 0.0;
394  m_trkenddiry = 0.0;
395  m_trkenddirz = 0.0;
396  m_trklength = 0.0;
397  m_trkstraightlength = 0.0;
398 
399  m_shwvtxx = 0.0;
400  m_shwvtxy = 0.0;
401  m_shwvtxz = 0.0;
402  m_shwvtxdirx = 0.0;
403  m_shwvtxdiry = 0.0;
404  m_shwvtxdirz = 0.0;
405  m_shwlength = 0.0;
406  m_shwopenangle = 0.0;
407  m_shwbestplane = 0.0;
408 
409  m_t0 = 0.0;
410 
411  // Particles <-> Clusters
412  PFParticlesToClusters::const_iterator cIter = particlesToClusters.find(particle);
413  if (particlesToClusters.end() != cIter)
414  m_clusters = cIter->second.size();
415 
416  // Particles <-> SpacePoints
417  PFParticlesToSpacePoints::const_iterator pIter = particlesToSpacePoints.find(particle);
418  if (particlesToSpacePoints.end() != pIter)
419  m_spacepoints = pIter->second.size();
420 
421  // Particles <-> Hits
422  PFParticlesToHits::const_iterator hIter = particlesToHits.find(particle);
423  if (particlesToHits.end() != hIter)
424  m_hits = hIter->second.size();
425 
426  // Particles <-> Vertices
427  PFParticlesToVertices::const_iterator vIter = particlesToVertices.find(particle);
428  if (particlesToVertices.end() != vIter)
429  {
430  const VertexVector &vertexVector = vIter->second;
431  if (!vertexVector.empty())
432  {
433  if (vertexVector.size() !=1 && m_printDebug)
434  std::cout << " Warning: Found particle with more than one associated vertex " << std::endl;
435 
436  const art::Ptr<recob::Vertex> vertex = *(vertexVector.begin());
437  double xyz[3] = {0.0, 0.0, 0.0} ;
438  vertex->XYZ(xyz);
439 
440  m_vertex = 1;
441  m_pfovtxx = xyz[0];
442  m_pfovtxy = xyz[1];
443  m_pfovtxz = xyz[2];
444  }
445  }
446 
447  // Particles <-> T0s
448  PFParticlesToT0s::const_iterator t0Iter = particlesToT0s.find(particle);
449  if (particlesToT0s.end() != t0Iter)
450  {
451  const T0Vector &t0Vector = t0Iter->second;
452  if (!t0Vector.empty())
453  {
454  if (t0Vector.size() !=1 && m_printDebug)
455  std::cout << " Warning: Found particle with more than one associated T0 " << std::endl;
456 
457  const art::Ptr<anab::T0> t0 = *(t0Vector.begin());
458  m_t0 = t0->Time();
459  }
460  }
461 
462  // Particles <-> Tracks <-> Hits, T0s
463  PFParticlesToTracks::const_iterator trkIter = particlesToTracks.find(particle);
464  if (particlesToTracks.end() != trkIter)
465  {
466  const TrackVector &trackVector = trkIter->second;
467  if (!trackVector.empty())
468  {
469  if (trackVector.size() !=1 && m_printDebug)
470  std::cout << " Warning: Found particle with more than one associated track " << std::endl;
471 
472  const art::Ptr<recob::Track> track = *(trackVector.begin());
473  const auto &trackVtxPosition = track->Vertex();
474  const auto &trackVtxDirection = track->VertexDirection();
475  const auto &trackEndPosition = track->End();
476  const auto &trackEndDirection = track->EndDirection();
477 
478  m_track = 1;
479  m_trackid = track->ID();
481  m_trkvtxx = trackVtxPosition.x();
482  m_trkvtxy = trackVtxPosition.y();
483  m_trkvtxz = trackVtxPosition.z();
484  m_trkvtxdirx = trackVtxDirection.x();
485  m_trkvtxdiry = trackVtxDirection.y();
486  m_trkvtxdirz = trackVtxDirection.z();
487  m_trkendx = trackEndPosition.x();
488  m_trkendy = trackEndPosition.y();
489  m_trkendz = trackEndPosition.z();
490  m_trkenddirx = trackEndDirection.x();
491  m_trkenddiry = trackEndDirection.y();
492  m_trkenddirz = trackEndDirection.z();
493  m_trklength = track->Length();
494  m_trkstraightlength = (trackEndPosition - trackVtxPosition).R();
495 
496  TracksToHits::const_iterator trkIter2 = tracksToHits.find(track);
497  if (tracksToHits.end() != trkIter2)
498  m_trackhits = trkIter2->second.size();
499  }
500  }
501 
502  // Particles <-> Showers <-> Hits
503  PFParticlesToShowers::const_iterator shwIter = particlesToShowers.find(particle);
504  if (particlesToShowers.end() != shwIter)
505  {
506  const ShowerVector &showerVector = shwIter->second;
507  if (!showerVector.empty())
508  {
509  if (showerVector.size() !=1 && m_printDebug)
510  std::cout << " Warning: Found particle with more than one associated shower " << std::endl;
511 
512  const art::Ptr<recob::Shower> shower = *(showerVector.begin());
513  const TVector3 &showerVtxPosition = shower->ShowerStart();
514  const TVector3 &showerVtxDirection = shower->Direction();
515 
516  m_shower = 1;
517  m_showerid = shower->ID();
518 
519  m_shwvtxx = showerVtxPosition.x();
520  m_shwvtxy = showerVtxPosition.y();
521  m_shwvtxz = showerVtxPosition.z();
522  m_shwvtxdirx = showerVtxDirection.x();
523  m_shwvtxdiry = showerVtxDirection.y();
524  m_shwvtxdirz = showerVtxDirection.z();
525 
526  m_shwlength = shower->Length();
527  m_shwopenangle = shower->OpenAngle();
528  m_shwbestplane = shower->best_plane();
529 
530  ShowersToHits::const_iterator shwIter2 = showersToHits.find(shower);
531  if (showersToHits.end() != shwIter2)
532  m_showerhits = shwIter2->second.size();
533  }
534  }
535 
536  if (m_printDebug)
537  std::cout << " PFParticle [" << n << "] Primary=" << m_primary << " FinalState=" << m_finalstate
538  << " Pdg=" << m_pdgcode << " NuPdg=" << m_neutrino
539  << " (Self=" << m_self << ", Parent=" << m_parent << ")"
540  << " (Vertex=" << m_vertex << ", Track=" << m_track << ", Shower=" << m_shower
541  << ", Clusters=" << m_clusters << ", SpacePoints=" << m_spacepoints << ", Hits=" << m_hits << ") " << std::endl;
542 
543  m_pRecoTree->Fill();
544  }
545 }
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.
int best_plane() const
Definition: Shower.h:200
code to link reconstructed objects back to the MC truth information
void XYZ(double *xyz) const
Legacy method to access vertex position, preserved to avoid breaking code. Please try to use Vertex::...
Definition: Vertex.cxx:36
const TVector3 & ShowerStart() const
Definition: Shower.h:192
bool m_printDebug
switch for print statements (TODO: use message service!)
static void BuildPFParticleMap(const PFParticleVector &particleVector, PFParticleMap &particleMap)
Build particle maps for reconstructed particles.
int NumDaughters() const
Returns the number of daughter particles flowing from this one.
Definition: PFParticle.h:89
static int GetParentNeutrino(const PFParticleMap &particleMap, const art::Ptr< recob::PFParticle > daughterParticle)
Return the parent neutrino PDG code (or zero for cosmics) for a given reconstructed particle...
size_t Self() const
Returns the index of this particle.
Definition: PFParticle.h:92
std::map< art::Ptr< recob::PFParticle >, ClusterVector > PFParticlesToClusters
double Length() const
Definition: Shower.h:201
const double & Time() const
Definition: T0.h:44
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
Definition: Track.h:102
Vector_t VertexDirection() const
Definition: Track.h:132
int PdgCode() const
Return the type of particle as a PDG ID.
Definition: PFParticle.h:83
std::vector< art::Ptr< recob::Shower > > ShowerVector
intermediate_table::const_iterator const_iterator
std::map< art::Ptr< recob::PFParticle >, TrackVector > PFParticlesToTracks
std::map< art::Ptr< recob::PFParticle >, VertexVector > PFParticlesToVertices
std::map< int, art::Ptr< recob::PFParticle > > PFParticleMap
std::map< art::Ptr< recob::PFParticle >, T0Vector > PFParticlesToT0s
double Length(size_t p=0) const
Access to various track properties.
Definition: Track.h:167
std::map< art::Ptr< recob::PFParticle >, ShowerVector > PFParticlesToShowers
std::vector< art::Ptr< recob::PFParticle > > PFParticleVector
size_t Parent() const
Definition: PFParticle.h:96
std::map< art::Ptr< recob::Shower >, HitVector > ShowersToHits
std::void_t< T > n
static void CollectShowers(const art::Event &evt, const std::string &label, ShowerVector &showerVector, PFParticlesToShowers &particlesToShowers)
Collect the reconstructed PFParticles and associated Showers from the ART event record.
double OpenAngle() const
Definition: Shower.h:202
std::map< art::Ptr< recob::PFParticle >, HitVector > PFParticlesToHits
Point_t const & Vertex() const
Definition: Track.h:124
static void CollectVertices(const art::Event &evt, const std::string &label, VertexVector &vertexVector, PFParticlesToVertices &particlesToVertices)
Collect the reconstructed PFParticles and associated Vertices from the ART event record.
bool IsPrimary() const
Returns whether the particle is the root of the flow.
Definition: PFParticle.h:86
const TVector3 & Direction() const
Definition: Shower.h:189
std::vector< art::Ptr< recob::Track > > TrackVector
RunNumber_t run() const
Definition: DataViewImpl.cc:71
std::map< art::Ptr< recob::PFParticle >, SpacePointVector > PFParticlesToSpacePoints
std::map< art::Ptr< recob::Track >, HitVector > TracksToHits
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.
int ID() const
Definition: Track.h:198
std::map< art::Ptr< recob::Hit >, art::Ptr< recob::PFParticle > > HitsToPFParticles
Vector_t EndDirection() const
Definition: Track.h:133
std::vector< art::Ptr< recob::Vertex > > VertexVector
EventNumber_t event() const
Definition: EventID.h:116
Point_t const & End() const
Definition: Track.h:125
static int GetGeneration(const PFParticleMap &particleMap, const art::Ptr< recob::PFParticle > daughterParticle)
Return the generation of this particle (first generation if primary)
std::vector< art::Ptr< anab::T0 > > T0Vector
static void CollectT0s(const art::Event &evt, const std::string &label, T0Vector &t0Vector, PFParticlesToT0s &particlesToT0s)
Collect a vector of T0s from the ART event record.
int ID() const
Definition: Shower.h:187
EventID id() const
Definition: Event.cc:34
static bool IsFinalState(const PFParticleMap &particleMap, const art::Ptr< recob::PFParticle > daughterParticle)
Determine whether a particle has been reconstructed as a final-state particle.
QTextStream & endl(QTextStream &s)
vertex reconstruction
void lar_pandora::PFParticleAnalysis::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 162 of file PFParticleAnalysis_module.cc.

163 {
164  mf::LogDebug("LArPandora") << " *** PFParticleAnalysis::beginJob() *** " << std::endl;
165 
166  //
168 
169  m_pRecoTree = tfs->make<TTree>("pandora", "LAr PFParticles");
170  m_pRecoTree->Branch("run", &m_run, "run/I");
171  m_pRecoTree->Branch("event", &m_event, "event/I");
172  m_pRecoTree->Branch("index", &m_index, "index/I");
173  m_pRecoTree->Branch("self", &m_self, "self/I");
174  m_pRecoTree->Branch("pdgcode", &m_pdgcode, "pdgcode/I");
175  m_pRecoTree->Branch("primary", &m_primary, "primary/I");
176  m_pRecoTree->Branch("parent", &m_parent, "parent/I");
177  m_pRecoTree->Branch("daughters", &m_daughters, "daughters/I");
178  m_pRecoTree->Branch("generation", &m_generation, "generation/I");
179  m_pRecoTree->Branch("neutrino", &m_neutrino, "neutrino/I");
180  m_pRecoTree->Branch("finalstate", &m_finalstate, "finalstate/I");
181  m_pRecoTree->Branch("vertex", &m_vertex, "vertex/I");
182  m_pRecoTree->Branch("track", &m_track, "track/I");
183  m_pRecoTree->Branch("trackid", &m_trackid, "trackid/I");
184  m_pRecoTree->Branch("shower", &m_shower, "shower/I");
185  m_pRecoTree->Branch("showerid", &m_showerid, "showerid/I");
186  m_pRecoTree->Branch("clusters", &m_clusters, "clusters/I");
187  m_pRecoTree->Branch("spacepoints", &m_spacepoints, "spacepoints/I");
188  m_pRecoTree->Branch("hits", &m_hits, "hits/I");
189  m_pRecoTree->Branch("trackhits", &m_trackhits, "trackhits/I");
190  m_pRecoTree->Branch("trajectorypoints", &m_trajectorypoints, "trajectorypoints/I");
191  m_pRecoTree->Branch("showerhits", &m_showerhits, "showerhits/I");
192  m_pRecoTree->Branch("pfovtxx", &m_pfovtxx, "pfovtxx/D");
193  m_pRecoTree->Branch("pfovtxy", &m_pfovtxy, "pfovtxy/D");
194  m_pRecoTree->Branch("pfovtxz", &m_pfovtxz, "pfovtxz/D");
195  m_pRecoTree->Branch("trkvtxx", &m_trkvtxx, "trkvtxx/D");
196  m_pRecoTree->Branch("trkvtxy", &m_trkvtxy, "trkvtxy/D");
197  m_pRecoTree->Branch("trkvtxz", &m_trkvtxz, "trkvtxz/D");
198  m_pRecoTree->Branch("trkvtxdirx", &m_trkvtxdirx, "trkvtxdirx/D");
199  m_pRecoTree->Branch("trkvtxdiry", &m_trkvtxdiry, "trkvtxdiry/D");
200  m_pRecoTree->Branch("trkvtxdirz", &m_trkvtxdirz, "trkvtxdirz/D");
201  m_pRecoTree->Branch("trkendx", &m_trkendx, "trkendx/D");
202  m_pRecoTree->Branch("trkendy", &m_trkendy, "trkendy/D");
203  m_pRecoTree->Branch("trkendz", &m_trkendz, "trkendz/D");
204  m_pRecoTree->Branch("trkenddirx", &m_trkenddirx, "trkenddirx/D");
205  m_pRecoTree->Branch("trkenddiry", &m_trkenddiry, "trkenddiry/D");
206  m_pRecoTree->Branch("trkenddirz", &m_trkenddirz, "trkenddirz/D");
207  m_pRecoTree->Branch("trklength", &m_trklength, "trklength/D");
208  m_pRecoTree->Branch("trkstraightlength", &m_trkstraightlength, "trkstraightlength/D");
209  m_pRecoTree->Branch("shwvtxx", &m_shwvtxx, "shwvtxx/D");
210  m_pRecoTree->Branch("shwvtxy", &m_shwvtxy, "shwvtxy/D");
211  m_pRecoTree->Branch("shwvtxz", &m_shwvtxz, "shwvtxz/D");
212  m_pRecoTree->Branch("shwvtxdirx", &m_shwvtxdirx, "shwvtxdirx/D");
213  m_pRecoTree->Branch("shwvtxdiry", &m_shwvtxdiry, "shwvtxdiry/D");
214  m_pRecoTree->Branch("shwvtxdirz", &m_shwvtxdirz, "shwvtxdirz/D");
215  m_pRecoTree->Branch("shwlength", &m_shwlength, "shwlength/D");
216  m_pRecoTree->Branch("shwopenangle", &m_shwopenangle, "shwopenangle/D");
217  m_pRecoTree->Branch("shwbestplane", &m_shwbestplane, "shwbestplane/D");
218  m_pRecoTree->Branch("t0", &m_t0, "t0/D");
219 }
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
QTextStream & endl(QTextStream &s)
void lar_pandora::PFParticleAnalysis::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 223 of file PFParticleAnalysis_module.cc.

224 {
225 }
void lar_pandora::PFParticleAnalysis::reconfigure ( fhicl::ParameterSet const &  pset)

Definition at line 152 of file PFParticleAnalysis_module.cc.

153 {
154  m_particleLabel = pset.get<std::string>("PFParticleModule","pandora");
155  m_trackLabel = pset.get<std::string>("TrackModule","pandora");
156  m_showerLabel = pset.get<std::string>("ShowerModule","pandora");
157  m_printDebug = pset.get<bool>("PrintDebug",false);
158 }
bool m_printDebug
switch for print statements (TODO: use message service!)
std::string string
Definition: nybbler.cc:12

Member Data Documentation

int lar_pandora::PFParticleAnalysis::m_clusters
private

Definition at line 67 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_daughters
private

Definition at line 57 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_event
private

Definition at line 50 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_finalstate
private

Definition at line 60 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_generation
private

Definition at line 58 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_hits
private

Definition at line 69 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_index
private

Definition at line 51 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_neutrino
private

Definition at line 59 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_parent
private

Definition at line 56 of file PFParticleAnalysis_module.cc.

std::string lar_pandora::PFParticleAnalysis::m_particleLabel
private

Definition at line 105 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_pdgcode
private

Definition at line 54 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_pfovtxx
private

Definition at line 74 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_pfovtxy
private

Definition at line 75 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_pfovtxz
private

Definition at line 76 of file PFParticleAnalysis_module.cc.

TTree* lar_pandora::PFParticleAnalysis::m_pRecoTree
private

Definition at line 47 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_primary
private

Definition at line 55 of file PFParticleAnalysis_module.cc.

bool lar_pandora::PFParticleAnalysis::m_printDebug
private

switch for print statements (TODO: use message service!)

Definition at line 108 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_run
private

Definition at line 49 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_self
private

Definition at line 53 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_shower
private

Definition at line 64 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_showerhits
private

Definition at line 72 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_showerid
private

Definition at line 65 of file PFParticleAnalysis_module.cc.

std::string lar_pandora::PFParticleAnalysis::m_showerLabel
private

Definition at line 107 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_shwbestplane
private

Definition at line 101 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_shwlength
private

Definition at line 99 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_shwopenangle
private

Definition at line 100 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_shwvtxdirx
private

Definition at line 96 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_shwvtxdiry
private

Definition at line 97 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_shwvtxdirz
private

Definition at line 98 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_shwvtxx
private

Definition at line 93 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_shwvtxy
private

Definition at line 94 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_shwvtxz
private

Definition at line 95 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_spacepoints
private

Definition at line 68 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_t0
private

Definition at line 103 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_track
private

Definition at line 62 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_trackhits
private

Definition at line 71 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_trackid
private

Definition at line 63 of file PFParticleAnalysis_module.cc.

std::string lar_pandora::PFParticleAnalysis::m_trackLabel
private

Definition at line 106 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_trajectorypoints
private

Definition at line 70 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkenddirx
private

Definition at line 87 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkenddiry
private

Definition at line 88 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkenddirz
private

Definition at line 89 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkendx
private

Definition at line 84 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkendy
private

Definition at line 85 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkendz
private

Definition at line 86 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trklength
private

Definition at line 90 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkstraightlength
private

Definition at line 91 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkvtxdirx
private

Definition at line 81 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkvtxdiry
private

Definition at line 82 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkvtxdirz
private

Definition at line 83 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkvtxx
private

Definition at line 78 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkvtxy
private

Definition at line 79 of file PFParticleAnalysis_module.cc.

double lar_pandora::PFParticleAnalysis::m_trkvtxz
private

Definition at line 80 of file PFParticleAnalysis_module.cc.

int lar_pandora::PFParticleAnalysis::m_vertex
private

Definition at line 61 of file PFParticleAnalysis_module.cc.


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