7 #ifndef LAR_PANDORA_HELPER_H 8 #define LAR_PANDORA_HELPER_H 18 #include <unordered_set> 26 class ParticleFlowObject;
43 class PFParticleMetadata;
57 typedef std::set<art::Ptr<recob::Hit>>
HitList;
60 typedef std::vector<art::Ptr<recob::Hit>>
HitVector;
74 typedef std::vector<art::Ptr<anab::T0>>
T0Vector;
75 typedef std::vector<art::Ptr<larpandoraobj::PFParticleMetadata>>
MetadataVector;
77 typedef std::unordered_set<art::Ptr<recob::Hit>>
HitSet;
110 typedef std::map<int, art::Ptr<recob::Hit>>
HitMap;
127 kIgnoreDaughters = 0,
140 const std::string& label,
141 WireVector& wireVector);
150 static void CollectHits(
const art::Event&
evt,
const std::string& label, HitVector& hitVector);
160 const std::string& label,
161 PFParticleVector& particleVector);
172 const std::string& label,
173 SpacePointVector& spacePointVector,
174 SpacePointsToHits& spacePointsToHits);
186 const std::string& label,
187 SpacePointVector& spacePointVector,
188 SpacePointsToHits& spacePointsToHits,
189 HitsToSpacePoints& hitsToSpacePoints);
200 const std::string& label,
201 ClusterVector& clusterVector,
202 ClustersToHits& clustersToHits);
213 const std::string& label,
214 PFParticleVector& particleVector,
215 PFParticlesToSpacePoints& particlesToSpacePoints);
226 const std::string& label,
227 PFParticleVector& particleVector,
228 PFParticlesToClusters& particlesToClusters);
239 const std::string& label,
240 PFParticleVector& particleVector,
241 PFParticlesToMetadata& particlesToMetadata);
252 const std::string& label,
253 ShowerVector& showerVector,
254 PFParticlesToShowers& particlesToShowers);
265 const std::string& label,
266 ShowerVector& showerVector,
267 ShowersToHits& showersToHits);
278 const std::string& label,
279 TrackVector& trackVector,
280 PFParticlesToTracks& particlesToTracks);
291 const std::string& label,
292 TrackVector& trackVector,
293 TracksToHits& tracksToHits);
304 const std::string& label,
305 SeedVector& seedVector,
306 PFParticlesToSeeds& particlesToSeeds);
317 const std::string& label,
318 SeedVector& seedVector,
319 SeedsToHits& seedsToHits);
330 const std::string& label,
331 VertexVector& vertexVector,
332 PFParticlesToVertices& particlesToVertices);
344 static void BuildPFParticleHitMaps(
const PFParticleVector& particleVector,
345 const PFParticlesToSpacePoints& particlesToSpacePoints,
346 const SpacePointsToHits& spacePointsToHits,
347 PFParticlesToHits& particlesToHits,
348 HitsToPFParticles& hitsToParticles,
361 static void BuildPFParticleHitMaps(
const PFParticleVector& particleVector,
362 const PFParticlesToClusters& particlesToClusters,
363 const ClustersToHits& clustersToHits,
364 PFParticlesToHits& particlesToHits,
365 HitsToPFParticles& hitsToParticles,
380 const std::string& label_pfpart,
381 const std::string& label_mid,
382 PFParticlesToHits& particlesToHits,
383 HitsToPFParticles& hitsToParticles,
385 const bool useClusters =
true);
398 const std::string& label,
399 PFParticlesToHits& particlesToHits,
400 HitsToPFParticles& hitsToParticles,
402 const bool useClusters =
true);
413 const std::string& label,
414 CosmicTagVector& cosmicTagVector,
415 TracksToCosmicTags& tracksToCosmicTags);
426 const std::string& label,
428 PFParticlesToT0s& particlesToT0s);
439 const std::string& label,
440 SimChannelVector& simChannelVector,
441 bool& areSimChannelsValid);
451 const std::string& label,
452 MCParticleVector& particleVector);
462 static void CollectGeneratorMCParticles(
const art::Event&
evt,
463 const std::string& label,
464 RawMCParticleVector& particleVector);
475 const std::string& label,
476 MCTruthToMCParticles& truthToParticles,
477 MCParticlesToMCTruth& particlesToTruth);
488 const HitVector& hitVector,
489 const SimChannelVector& simChannelVector,
490 HitsToTrackIDEs& hitsToTrackIDEs);
501 static void BuildMCParticleHitMaps(
const HitsToTrackIDEs& hitsToTrackIDEs,
502 const MCTruthToMCParticles& truthToParticles,
503 MCParticlesToHits& particlesToHits,
504 HitsToMCParticles& hitsToParticles,
518 const std::string& label,
519 const HitVector& hitVector,
520 MCParticlesToHits& particlesToHits,
521 HitsToMCParticles& hitsToParticles,
533 const std::string& hitLabel,
534 const std::string& backtrackLabel,
535 HitsToTrackIDEs& hitsToTrackIDEs);
549 const std::string& truthLabel,
550 const std::string& hitLabel,
551 const std::string& backtrackLabel,
552 MCParticlesToHits& particlesToHits,
553 HitsToMCParticles& hitsToParticles,
565 template <
typename T>
567 const std::string& label,
569 HitVector& associatedHits,
578 static void SelectNeutrinoPFParticles(
const PFParticleVector& inputParticles,
579 PFParticleVector& outputParticles);
587 static void SelectFinalStatePFParticles(
const PFParticleVector& inputParticles,
588 PFParticleVector& outputParticles);
596 static void BuildMCParticleMap(
const MCParticleVector& particleVector,
597 MCParticleMap& particleMap);
605 static void BuildPFParticleMap(
const PFParticleVector& particleVector,
606 PFParticleMap& particleMap);
617 const PFParticleMap& particleMap,
629 const PFParticleMap& particleMap,
641 const MCParticleMap& particleMap,
653 const MCParticleMap& particleMap,
673 static int GetGeneration(
const PFParticleMap& particleMap,
684 static int GetParentNeutrino(
const PFParticleMap& particleMap,
695 static bool IsFinalState(
const PFParticleMap& particleMap,
742 const pandora::ParticleFlowObject*
const pPfo);
747 #endif // LAR_PANDORA_HELPER_H std::vector< art::Ptr< simb::MCTruth > > MCTruthVector
std::map< art::Ptr< recob::Hit >, art::Ptr< simb::MCParticle > > HitsToMCParticles
std::map< int, art::Ptr< sim::SimChannel > > SimChannelMap
Reconstruction base classes.
std::unordered_set< art::Ptr< recob::Hit > > HitSet
std::map< art::Ptr< recob::PFParticle >, ClusterVector > PFParticlesToClusters
std::map< int, HitVector > HitArray
std::map< art::Ptr< simb::MCTruth >, HitVector > MCTruthToHits
std::map< art::Ptr< simb::MCParticle >, art::Ptr< simb::MCTruth > > MCParticlesToMCTruth
std::map< art::Ptr< simb::MCParticle >, art::Ptr< recob::PFParticle > > MCParticlesToPFParticles
std::vector< art::Ptr< recob::Shower > > ShowerVector
std::vector< int > IntVector
std::vector< art::Ptr< anab::CosmicTag > > CosmicTagVector
std::map< art::Ptr< recob::PFParticle >, TrackVector > PFParticlesToTracks
std::map< art::Ptr< recob::PFParticle >, VertexVector > PFParticlesToVertices
std::map< int, art::Ptr< recob::Hit > > HitMap
std::map< int, art::Ptr< recob::PFParticle > > PFParticleMap
std::map< art::Ptr< recob::Track >, CosmicTagVector > TracksToCosmicTags
std::map< int, art::Ptr< simb::MCParticle > > MCParticleMap
std::map< art::Ptr< recob::Hit >, TrackIDEVector > HitsToTrackIDEs
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< art::Ptr< recob::Seed > > SeedVector
std::map< art::Ptr< recob::PFParticle >, MetadataVector > PFParticlesToMetadata
std::map< art::Ptr< recob::PFParticle >, T0Vector > PFParticlesToT0s
std::map< art::Ptr< recob::Hit >, art::Ptr< simb::MCTruth > > HitsToMCTruth
std::map< int, art::Ptr< recob::Cluster > > ClusterMap
std::map< art::Ptr< recob::PFParticle >, ShowerVector > PFParticlesToShowers
std::vector< simb::MCParticle > RawMCParticleVector
Metadata associated to PFParticles.
std::map< art::Ptr< simb::MCParticle >, HitVector > MCParticlesToHits
std::map< art::Ptr< recob::PFParticle >, SeedVector > PFParticlesToSeeds
std::vector< art::Ptr< recob::PFParticle > > PFParticleVector
std::map< art::Ptr< recob::Cluster >, HitVector > ClustersToHits
std::map< art::Ptr< recob::Shower >, HitVector > ShowersToHits
std::map< art::Ptr< simb::MCTruth >, MCParticleVector > MCTruthToMCParticles
std::map< art::Ptr< simb::MCTruth >, art::Ptr< recob::PFParticle > > MCTruthToPFParticles
std::vector< art::Ptr< recob::SpacePoint > > SpacePointVector
std::map< art::Ptr< recob::PFParticle >, HitVector > PFParticlesToHits
std::map< art::Ptr< recob::Hit >, art::Ptr< recob::SpacePoint > > HitsToSpacePoints
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
std::vector< sim::TrackIDE > TrackIDEVector
std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > MetadataVector
std::vector< art::Ptr< recob::Track > > TrackVector
std::map< art::Ptr< recob::PFParticle >, SpacePointVector > PFParticlesToSpacePoints
std::map< art::Ptr< recob::Track >, HitVector > TracksToHits
std::map< int, art::Ptr< recob::SpacePoint > > SpacePointMap
DaughterMode
DaughterMode enumeration.
std::map< const pandora::ParticleFlowObject *, size_t > ThreeDParticleMap
std::vector< art::Ptr< recob::Hit > > HitVector
std::vector< art::Ptr< sim::SimChannel > > SimChannelVector
std::vector< art::Ptr< recob::Wire > > WireVector
std::map< art::Ptr< recob::Hit >, art::Ptr< recob::PFParticle > > HitsToPFParticles
object containing MC truth information necessary for making RawDigits and doing back tracking ...
std::vector< art::Ptr< recob::Vertex > > VertexVector
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
std::vector< art::Ptr< recob::Cluster > > ClusterVector
std::vector< art::Ptr< anab::T0 > > T0Vector
std::map< art::Ptr< recob::Seed >, art::Ptr< recob::Hit > > SeedsToHits
std::map< const pandora::Vertex *, unsigned int > ThreeDVertexMap
std::set< art::Ptr< recob::Hit > > HitList
std::map< art::Ptr< recob::SpacePoint >, art::Ptr< recob::Hit > > SpacePointsToHits