119 template <
class T,
class U>
230 void PrintRule(
const unsigned int depth)
const;
314 std::cout <<
"Collection sizes" <<
std::endl;
329 std::cout <<
"Association sizes" <<
std::endl;
401 pfParticleMap[particle->
Self()] = particle;
429 for (
const auto &metadatum :
metadata)
431 const auto &propertiesMap(metadatum->GetPropertiesMap());
432 this->
PrintProperty(
"# Properties", propertiesMap.size(), depth + 2);
434 for (
const auto &propertiesMapEntry : propertiesMap)
435 this->
PrintProperty(propertiesMapEntry.first, propertiesMapEntry.second, depth + 4);
447 for (
const auto &slice :
slices)
461 for (
const auto &
cluster : clusters)
470 this->
PrintProperty(
"# SpacePoints", spacePoints.size(), depth);
474 for (
const auto &spacePoint : spacePoints)
487 for (
const auto &
vertex : vertices)
500 for (
const auto &track :
tracks)
522 for (
auto &daughterId : particle->
Daughters())
524 const auto daughterIter(pfParticleMap.find(daughterId));
526 if (daughterIter == pfParticleMap.end())
527 throw cet::exception(
"LArPandoraEventDump") <<
"Couldn't find daughter of PFParticle in the PFParticle map";
529 const auto &daughter(daughterIter->second);
530 this->
PrintParticle(daughter, pfParticleMap, data, depth + 4);
564 for (
const auto &
hit : hits)
587 for (
const auto &
hit : hits)
613 for (
const auto &
hit : hits)
649 for (
const auto &
hit : hits)
671 for (
const auto &pcAxis : pcAxes)
676 this->
PrintProperty(
"# Hits used", pcAxis->getNumHitsUsed(), depth + 6);
690 for (
const auto &
hit : hits)
698 const unsigned int nDashes(
std::max(0, 120 - static_cast<int>(depth)));
717 const unsigned int separation(
std::max(0, 32 - static_cast<int>(depth)));
727 m_pPFParticleToMetadataAssociation(nullptr),
728 m_pPFParticleToClusterAssociation(nullptr),
729 m_pPFParticleToSpacePointAssociation(nullptr),
730 m_pPFParticleToVertexAssociation(nullptr),
731 m_pPFParticleToTrackAssociation(nullptr),
732 m_pPFParticleToShowerAssociation(nullptr),
733 m_pPFParticleToSliceAssociation(nullptr),
734 m_pClusterToHitAssociation(nullptr),
735 m_pSpacePointToHitAssociation(nullptr),
736 m_pTrackToHitAssociation(nullptr),
737 m_pShowerToHitAssociation(nullptr),
738 m_pSliceToHitAssociation(nullptr),
739 m_pShowerToPCAxisAssociation(nullptr)
804 template <
class T,
class U>
811 throw cet::exception(
"LArPandoraEventDump") <<
"Association supplied type has already been loaded!";
void BuildPFParticleMap(const PandoraData &data, PFParticleMap &pfParticleMap) const
Build the map from PFParticle ID to PFParticle from the input data.
Association< recob::Slice > * m_pPFParticleToSliceAssociation
The PFParticle to slice association.
void PrintRule(const unsigned int depth) const
Print a horizontal line.
const std::vector< size_t > & Daughters() const
Returns the collection of daughter particles.
const TVector3 & ShowerStart() const
EventNumber_t event() const
std::string m_trackLabel
The track producer label.
int NumDaughters() const
Returns the number of daughter particles flowing from this one.
Association< recob::Hit > * m_pClusterToHitAssociation
The Cluster to hit association.
Collection< recob::Cluster > m_clusterCollection
The Cluster handle.
size_t Self() const
Returns the index of this particle.
void PrintEventMetadata(const art::Event &evt) const
Print the metadata about the event.
float RMS() const
RMS of the hit shape, in tick units.
LArPandoraEventDump(fhicl::ParameterSet const &pset)
Association< recob::PCAxis > * m_pShowerToPCAxisAssociation
The Shower to PCAxis association.
Collection< recob::SpacePoint > m_spacePointCollection
The SpacePoint handle.
Association< recob::Hit > * m_pSliceToHitAssociation
The Slice to hit association.
void PrintShower(const art::Ptr< recob::Shower > &shower, const PandoraData &data, const unsigned int depth) const
Print a given Shower.
void PrintVertex(const art::Ptr< recob::Vertex > &vertex, const unsigned int depth) const
Print a given Vertex.
size_t NumberTrajectoryPoints() const
Various functions related to the presence and the number of (valid) points.
LArPandoraEventDump & operator=(LArPandoraEventDump const &)=delete
int PdgCode() const
Return the type of particle as a PDG ID.
geo::View_t View() const
View for the plane of the hit.
void PrintParticle(const art::Ptr< recob::PFParticle > &particle, const PFParticleMap &pfParticleMap, const PandoraData &data, const unsigned int depth) const
Print a given PFParticle.
Cluster finding and building.
EDAnalyzer(fhicl::ParameterSet const &pset)
void PrintHit(const art::Ptr< recob::Hit > &hit, const unsigned int depth) const
Print a given Hit.
std::map< int, art::Ptr< recob::PFParticle > > PFParticleMap
void PrintEventSummary(const PandoraData &data) const
Print a summary of the event similar to the standard event dump.
Association< recob::Shower > * m_pPFParticleToShowerAssociation
The PFParticle to shower association.
void LoadAssociation(const art::Event &evt, const std::string &label, const Collection< T > &collection, Association< U > *&pAssociation)
Load an association from the event.
art::FindManyP< T > Association
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Association< recob::Cluster > * m_pPFParticleToClusterAssociation
The PFParticle to cluster association.
double Length(size_t p=0) const
Access to various track properties.
#define DEFINE_ART_MODULE(klass)
Collection< recob::PCAxis > m_pcAxisCollection
The PCAxis handle.
std::string m_showerLabel
The shower producer label.
void PrintTrack(const art::Ptr< recob::Track > &track, const PandoraData &data, const unsigned int depth) const
Print a given Track.
key_type key() const noexcept
T get(std::string const &key) const
~PandoraData()
Default destructor.
Collection< recob::Slice > m_sliceCollection
The Slice handle.
SubRunNumber_t subRun() const
void PrintSpacePoint(const art::Ptr< recob::SpacePoint > &spacePoint, const PandoraData &data, const unsigned int depth) const
Print a given SpacePoint.
bool IsPrimary() const
Returns whether the particle is the root of the flow.
Association< recob::Track > * m_pPFParticleToTrackAssociation
The PFParticle to track association.
static int max(int a, int b)
Collection< recob::Vertex > m_vertexCollection
The Vertex handle.
std::string m_pandoraLabel
The label of the Pandora pattern recognition producer.
Association< larpandoraobj::PFParticleMetadata > * m_pPFParticleToMetadataAssociation
The PFParticle to metadata association.
Collection< recob::Shower > m_showerCollection
The Shower handle.
std::vector< TCSlice > slices
Detector simulation of raw signals on wires.
Q_EXPORT QTSManip setw(int w)
void PrintTitle(const std::string &name, const unsigned int depth) const
Print a title line.
void analyze(art::Event const &evt) override
geo::View_t View() const
Returns the view for this cluster.
float PeakTime() const
Time of the signal peak, in tick units.
Declaration of signal hit object.
Association< recob::SpacePoint > * m_pPFParticleToSpacePointAssociation
The PFParticle to space point association.
ID_t ID() const
Identifier of this cluster.
int ID() const
Return vertex id.
void PrintSlice(const art::Ptr< recob::Slice > &slice, const PandoraData &data, const unsigned int depth) const
Print a given Slice.
Association< recob::Hit > * m_pSpacePointToHitAssociation
The SpacePoint to hit association.
Association< recob::Hit > * m_pShowerToHitAssociation
The Shower to hit association.
Provides recob::Track data product.
std::string m_verbosityLevel
The level of verbosity to use.
void LoadCollection(const art::Event &evt, const std::string &label, Collection< T > &collection)
Load a collection from the event.
const Double32_t * XYZ() const
void PrintCluster(const art::Ptr< recob::Cluster > &cluster, const PandoraData &data, const unsigned int depth) const
Print a given Cluster.
Collection< recob::PFParticle > m_pfParticleCollection
The PFParticle handle.
PandoraData(const art::Event &evt, const std::string &pandoraLabel, const std::string &trackLabel="", const std::string &showerLabel="")
Default constructor.
Collection< larpandoraobj::PFParticleMetadata > m_pfParticleMetadataCollection
The PFParticleMetadata handle.
void PrintPFParticleHierarchy(const PandoraData &data) const
Print the full PFParticle Hierarchy.
auto const & get(AssnsNode< L, R, D > const &r)
Association< recob::Vertex > * m_pPFParticleToVertexAssociation
The PFParticle to vertex association.
void PrintProperty(const std::string &name, const T &value, const unsigned int depth) const
Print a given property with the correct amount of whitespace.
Class holding the handle for all of the data types from Pandora.
helper function for LArPandoraInterface producer module
raw::ChannelID_t Channel() const
ID of the readout channel the hit was extracted from.
const Point_t & position() const
Return vertex 3D position.
cet::coded_exception< error, detail::translate > exception
Association< recob::Hit > * m_pTrackToHitAssociation
The Track to hit association.
QTextStream & endl(QTextStream &s)
Collection< recob::Track > m_trackCollection
The Track handle.