7 #ifndef LAR_PANDORA_HELPER_H 8 #define LAR_PANDORA_HELPER_H 18 namespace anab {
class CosmicTag;
class T0;}
19 namespace pandora {
class ParticleFlowObject;
class Vertex;
typedef std::vector<int>
IntVector;}
20 namespace recob {
class Cluster;
class Hit;
class PFParticle;
class Seed;
class Shower;
class Slice;
class SpacePoint;
class Track;
class Vertex;
class Wire;}
22 namespace sim {
class SimChannel;
struct TrackIDE;}
23 namespace simb {
class MCParticle;
class MCTruth;}
30 typedef std::set< art::Ptr<recob::Hit> >
HitList;
33 typedef std::vector< art::Ptr<recob::Hit> >
HitVector;
47 typedef std::vector< art::Ptr<anab::T0> >
T0Vector;
48 typedef std::vector< art::Ptr<larpandoraobj::PFParticleMetadata> >
MetadataVector;
50 typedef std::unordered_set< art::Ptr<recob::Hit> >
HitSet;
60 typedef std::map< art::Ptr<recob::Track>, HitVector >
TracksToHits;
80 typedef std::map< int, art::Ptr<recob::Cluster> >
ClusterMap;
82 typedef std::map< int, art::Ptr<recob::Hit> >
HitMap;
101 kIgnoreDaughters = 0,
113 static void CollectWires(
const art::Event &
evt,
const std::string &label, WireVector &wireVector);
122 static void CollectHits(
const art::Event &
evt,
const std::string &label, HitVector &hitVector);
131 static void CollectPFParticles(
const art::Event &
evt,
const std::string &label, PFParticleVector &particleVector);
141 static void CollectSpacePoints(
const art::Event &
evt,
const std::string &label, SpacePointVector &spacePointVector,
142 SpacePointsToHits &spacePointsToHits);
153 static void CollectSpacePoints(
const art::Event &
evt,
const std::string &label, SpacePointVector &spacePointVector,
154 SpacePointsToHits &spacePointsToHits, HitsToSpacePoints &hitsToSpacePoints);
164 static void CollectClusters(
const art::Event &
evt,
const std::string &label, ClusterVector &clusterVector,
165 ClustersToHits &clustersToHits);
175 static void CollectPFParticles(
const art::Event &
evt,
const std::string &label, PFParticleVector &particleVector,
176 PFParticlesToSpacePoints &particlesToSpacePoints);
186 static void CollectPFParticles(
const art::Event &
evt,
const std::string &label, PFParticleVector &particleVector,
187 PFParticlesToClusters &particlesToClusters);
197 static void CollectPFParticleMetadata(
const art::Event &
evt,
const std::string &label, PFParticleVector &particleVector,
198 PFParticlesToMetadata &particlesToMetadata);
208 static void CollectShowers(
const art::Event &
evt,
const std::string &label, ShowerVector &showerVector,
209 PFParticlesToShowers &particlesToShowers);
219 static void CollectShowers(
const art::Event &
evt,
const std::string &label, ShowerVector &showerVector,
220 ShowersToHits &showersToHits);
230 static void CollectTracks(
const art::Event &
evt,
const std::string &label, TrackVector &trackVector,
231 PFParticlesToTracks &particlesToTracks);
241 static void CollectTracks(
const art::Event &
evt,
const std::string &label, TrackVector &trackVector,
242 TracksToHits &tracksToHits);
252 static void CollectSeeds(
const art::Event &
evt,
const std::string &label, SeedVector &seedVector,
253 PFParticlesToSeeds &particlesToSeeds);
263 static void CollectSeeds(
const art::Event &
evt,
const std::string &label, SeedVector &seedVector,
264 SeedsToHits &seedsToHits);
274 static void CollectVertices(
const art::Event &
evt,
const std::string &label, VertexVector &vertexVector,
275 PFParticlesToVertices &particlesToVertices);
287 static void BuildPFParticleHitMaps(
const PFParticleVector &particleVector,
const PFParticlesToSpacePoints &particlesToSpacePoints,
288 const SpacePointsToHits &spacePointsToHits, PFParticlesToHits &particlesToHits, HitsToPFParticles &hitsToParticles,
301 static void BuildPFParticleHitMaps(
const PFParticleVector &particleVector,
const PFParticlesToClusters &particlesToClusters,
302 const ClustersToHits &clustersToHits, PFParticlesToHits &particlesToHits, HitsToPFParticles &hitsToParticles,
316 static void BuildPFParticleHitMaps(
const art::Event &
evt,
const std::string &label_pfpart,
const std::string &label_mid,
317 PFParticlesToHits &particlesToHits, HitsToPFParticles &hitsToParticles,
const DaughterMode daughterMode = kUseDaughters,
318 const bool useClusters =
true);
330 static void BuildPFParticleHitMaps(
const art::Event &
evt,
const std::string &label,
331 PFParticlesToHits &particlesToHits, HitsToPFParticles &hitsToParticles,
const DaughterMode daughterMode = kUseDaughters,
332 const bool useClusters =
true);
342 static void CollectCosmicTags(
const art::Event &
evt,
const std::string &label, CosmicTagVector &cosmicTagVector,
343 TracksToCosmicTags &tracksToCosmicTags);
353 static void CollectT0s(
const art::Event &
evt,
const std::string &label, T0Vector &t0Vector,
354 PFParticlesToT0s &particlesToT0s);
363 static void CollectSimChannels(
const art::Event &
evt,
const std::string &label, SimChannelVector &simChannelVector);
372 static void CollectMCParticles(
const art::Event &
evt,
const std::string &label, MCParticleVector &particleVector);
382 static void CollectGeneratorMCParticles(
const art::Event &
evt,
const std::string &label, RawMCParticleVector &particleVector);
392 static void CollectMCParticles(
const art::Event &
evt,
const std::string &label, MCTruthToMCParticles &truthToParticles,
393 MCParticlesToMCTruth &particlesToTruth);
402 static void BuildMCParticleHitMaps(
const HitVector &hitVector,
const SimChannelVector &simChannelVector, HitsToTrackIDEs &hitsToTrackIDEs);
413 static void BuildMCParticleHitMaps(
const HitsToTrackIDEs &hitsToTrackIDEs,
const MCTruthToMCParticles &truthToParticles,
414 MCParticlesToHits &particlesToHits, HitsToMCParticles &hitsToParticles,
const DaughterMode daughterMode = kUseDaughters);
426 static void BuildMCParticleHitMaps(
const art::Event &
evt,
const std::string &label,
const HitVector &hitVector,
427 MCParticlesToHits &particlesToHits, HitsToMCParticles &hitsToParticles,
const DaughterMode daughterMode = kUseDaughters);
437 static void BuildMCParticleHitMaps(
const art::Event &
evt,
const std::string &hitLabel,
const std::string &backtrackLabel,
438 HitsToTrackIDEs &hitsToTrackIDEs);
451 static void BuildMCParticleHitMaps(
const art::Event &
evt,
const std::string &truthLabel,
const std::string &hitLabel,
452 const std::string &backtrackLabel, MCParticlesToHits &particlesToHits, HitsToMCParticles &hitsToParticles,
464 template <
typename T>
474 static void SelectNeutrinoPFParticles(
const PFParticleVector &inputParticles, PFParticleVector &outputParticles);
482 static void SelectFinalStatePFParticles(
const PFParticleVector &inputParticles, PFParticleVector &outputParticles);
490 static void BuildMCParticleMap(
const MCParticleVector &particleVector, MCParticleMap &particleMap);
498 static void BuildPFParticleMap(
const PFParticleVector &particleVector, PFParticleMap &particleMap);
619 #endif // LAR_PANDORA_HELPER_H std::vector< sim::TrackIDE > TrackIDEVector
std::map< art::Ptr< recob::Hit >, TrackIDEVector > HitsToTrackIDEs
std::vector< art::Ptr< recob::Seed > > SeedVector
std::map< art::Ptr< simb::MCTruth >, HitVector > MCTruthToHits
std::map< int, art::Ptr< sim::SimChannel > > SimChannelMap
std::map< art::Ptr< recob::SpacePoint >, art::Ptr< recob::Hit > > SpacePointsToHits
std::map< art::Ptr< recob::Hit >, art::Ptr< recob::PFParticle > > HitsToPFParticles
SlicingAlgorithm::Slice Slice
std::map< art::Ptr< simb::MCTruth >, art::Ptr< recob::PFParticle > > MCTruthToPFParticles
Reconstruction base classes.
std::map< art::Ptr< recob::PFParticle >, ClusterVector > PFParticlesToClusters
std::map< int, art::Ptr< recob::Cluster > > ClusterMap
std::map< art::Ptr< recob::Shower >, HitVector > ShowersToHits
std::vector< art::Ptr< recob::PFParticle > > PFParticleVector
std::map< art::Ptr< simb::MCTruth >, MCParticleVector > MCTruthToMCParticles
std::map< int, art::Ptr< simb::MCParticle > > MCParticleMap
std::map< art::Ptr< simb::MCParticle >, art::Ptr< recob::PFParticle > > MCParticlesToPFParticles
std::map< art::Ptr< recob::Track >, HitVector > TracksToHits
std::vector< int > IntVector
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > > PFParticlesToMetadata
std::map< art::Ptr< recob::PFParticle >, SeedVector > PFParticlesToSeeds
std::map< art::Ptr< simb::MCParticle >, art::Ptr< simb::MCTruth > > MCParticlesToMCTruth
std::map< const pandora::ParticleFlowObject *, size_t > ThreeDParticleMap
std::vector< art::Ptr< recob::Track > > TrackVector
std::vector< art::Ptr< sim::SimChannel > > SimChannelVector
std::unordered_set< art::Ptr< recob::Hit > > HitSet
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::map< int, art::Ptr< recob::PFParticle > > PFParticleMap
std::map< const pandora::Vertex *, unsigned int > ThreeDVertexMap
std::vector< art::Ptr< simb::MCTruth > > MCTruthVector
Metadata associated to PFParticles.
std::map< int, HitVector > HitArray
std::map< art::Ptr< recob::PFParticle >, T0Vector > PFParticlesToT0s
std::map< art::Ptr< recob::Hit >, art::Ptr< recob::SpacePoint > > HitsToSpacePoints
std::map< int, art::Ptr< recob::SpacePoint > > SpacePointMap
std::map< art::Ptr< recob::Cluster >, HitVector > ClustersToHits
std::vector< art::Ptr< recob::Wire > > WireVector
std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > MetadataVector
std::map< art::Ptr< recob::PFParticle >, VertexVector > PFParticlesToVertices
std::vector< art::Ptr< anab::T0 > > T0Vector
std::map< art::Ptr< recob::PFParticle >, ShowerVector > PFParticlesToShowers
std::vector< art::Ptr< recob::Shower > > ShowerVector
std::vector< art::Ptr< recob::SpacePoint > > SpacePointVector
std::vector< art::Ptr< recob::Hit > > HitVector
std::map< art::Ptr< recob::PFParticle >, TrackVector > PFParticlesToTracks
std::map< art::Ptr< recob::PFParticle >, HitVector > PFParticlesToHits
DaughterMode
DaughterMode enumeration.
std::vector< art::Ptr< recob::Cluster > > ClusterVector
std::map< art::Ptr< recob::Seed >, art::Ptr< recob::Hit > > SeedsToHits
std::vector< simb::MCParticle > RawMCParticleVector
std::map< art::Ptr< recob::Track >, CosmicTagVector > TracksToCosmicTags
std::map< art::Ptr< simb::MCParticle >, HitVector > MCParticlesToHits
std::vector< art::Ptr< anab::CosmicTag > > CosmicTagVector
object containing MC truth information necessary for making RawDigits and doing back tracking ...
std::map< art::Ptr< recob::PFParticle >, SpacePointVector > PFParticlesToSpacePoints
std::set< art::Ptr< recob::Hit > > HitList
std::map< int, art::Ptr< recob::Hit > > HitMap
std::map< art::Ptr< recob::Hit >, art::Ptr< simb::MCParticle > > HitsToMCParticles
std::map< art::Ptr< recob::Hit >, art::Ptr< simb::MCTruth > > HitsToMCTruth
std::vector< art::Ptr< recob::Vertex > > VertexVector