63 const std::string& pandoraLabel,
64 const std::string& trackLabel =
"",
65 const std::string& showerLabel =
"");
119 const std::string& label,
130 template <
class T,
class U>
132 const std::string& label,
179 const unsigned int depth)
const;
198 const unsigned int depth)
const;
209 const unsigned int depth)
const;
228 const unsigned int depth)
const;
239 const unsigned int depth)
const;
250 const unsigned int depth)
const;
257 void PrintRule(
const unsigned int depth)
const;
265 void PrintTitle(
const std::string& name,
const unsigned int depth)
const;
275 void PrintProperty(
const std::string& name,
const T&
value,
const unsigned int depth)
const;
326 std::cout << std::string(80,
'=') << std::endl;
327 std::cout <<
"run : " << evt.
run() << std::endl;
328 std::cout <<
"subRun : " << evt.
subRun() << std::endl;
329 std::cout <<
"event : " << evt.
event() << std::endl;
330 std::cout << std::endl;
337 std::cout << std::string(80,
'-') << std::endl;
338 std::cout <<
"Collection sizes" << std::endl;
339 std::cout << std::string(80,
'-') << std::endl;
351 std::cout << std::endl;
353 std::cout << std::string(80,
'-') << std::endl;
354 std::cout <<
"Association sizes" << std::endl;
355 std::cout << std::string(80,
'-') << std::endl;
366 std::cout <<
"PFParticle -> SpacePoint : " 409 std::cout << std::endl;
437 pfParticleMap[particle->
Self()] = particle;
446 const unsigned int depth)
const 465 for (
const auto& metadatum : metadata) {
466 const auto& propertiesMap(metadatum->GetPropertiesMap());
467 this->
PrintProperty(
"# Properties", propertiesMap.size(), depth + 2);
469 for (
const auto& propertiesMapEntry : propertiesMap)
470 this->
PrintProperty(propertiesMapEntry.first, propertiesMapEntry.second, depth + 4);
480 for (
const auto& slice :
slices)
491 for (
const auto&
cluster : clusters)
499 this->
PrintProperty(
"# SpacePoints", spacePoints.size(), depth);
502 for (
const auto& spacePoint : spacePoints)
513 for (
const auto&
vertex : vertices)
524 for (
const auto&
track : tracks)
535 for (
const auto&
shower : showers)
544 for (
auto& daughterId : particle->
Daughters()) {
545 const auto daughterIter(pfParticleMap.find(daughterId));
547 if (daughterIter == pfParticleMap.end())
549 <<
"Couldn't find daughter of PFParticle in the PFParticle map";
551 const auto& daughter(daughterIter->second);
552 this->
PrintParticle(daughter, pfParticleMap, data, depth + 4);
559 const unsigned int depth)
const 573 const unsigned int depth)
const 595 const unsigned int depth)
const 618 const unsigned int depth)
const 623 const auto& position(spacePoint->
XYZ());
643 const unsigned int depth)
const 648 const auto& position(vertex->
position());
658 const unsigned int depth)
const 681 const unsigned int depth)
const 696 for (
const auto& pcAxis : pcAxes) {
700 this->
PrintProperty(
"# Hits used", pcAxis->getNumHitsUsed(), depth + 6);
720 const unsigned int nDashes(std::max(0, 120 - static_cast<int>(depth)));
722 std::cout << std::string(depth,
' ') << std::string(nDashes,
'-') << std::endl;
729 std::cout << std::string(depth,
' ') << name << std::endl;
737 const unsigned int depth)
const 740 const unsigned int separation(std::max(0, 32 - static_cast<int>(depth)));
742 std::cout << std::string(depth,
' ') << std::setw(separation) <<
std::left << (
"- " + name)
743 << value << std::endl;
750 const std::string& pandoraLabel,
751 const std::string& trackLabel,
752 const std::string& showerLabel)
753 : m_pPFParticleToMetadataAssociation(nullptr)
754 , m_pPFParticleToClusterAssociation(nullptr)
755 , m_pPFParticleToSpacePointAssociation(nullptr)
756 , m_pPFParticleToVertexAssociation(nullptr)
757 , m_pPFParticleToTrackAssociation(nullptr)
758 , m_pPFParticleToShowerAssociation(nullptr)
759 , m_pPFParticleToSliceAssociation(nullptr)
760 , m_pClusterToHitAssociation(nullptr)
761 , m_pSpacePointToHitAssociation(nullptr)
762 , m_pTrackToHitAssociation(nullptr)
763 , m_pShowerToHitAssociation(nullptr)
764 , m_pSliceToHitAssociation(nullptr)
765 , m_pShowerToPCAxisAssociation(nullptr)
827 const std::string& label,
830 if (label.empty())
return;
837 template <
class T,
class U>
839 const std::string& label,
843 if (label.empty())
return;
847 <<
"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.
SubRunNumber_t subRun() const
const TVector3 & ShowerStart() 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.
Declaration of signal hit object.
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.
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.
Provides recob::Track data product.
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.
const Double32_t * XYZ() const
EventNumber_t event() const
Association< recob::Track > * m_pPFParticleToTrackAssociation
The PFParticle to track association.
Collection< recob::Vertex > m_vertexCollection
The Vertex handle.
Declaration of cluster object.
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.
void PrintTitle(const std::string &name, const unsigned int depth) const
Print a title line.
void analyze(art::Event const &evt) override
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
geo::View_t View() const
Returns the view for this cluster.
float PeakTime() const
Time of the signal peak, in tick units.
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Utility object to perform functions of association.
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.
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.
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.
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.
Collection< recob::Track > m_trackCollection
The Track handle.