81 std::cout << std::endl << std::endl;
82 std::cout << std::string(80,
'-') <<
"\r- ";
83 std::cout <<
"Event " << std::endl;
84 std::cout << evt.
id() << std::endl;
86 std::cout << std::string(80,
'-') << std::endl;
124 std::cout <<
"N PFParticles : " << pfParticleHandle->size() << std::endl;
125 std::cout <<
"N SpacePoints : " << spacePointHandle->size() << std::endl;
126 std::cout <<
"N Clusters : " << clusterHandle->size() << std::endl;
127 std::cout <<
"N Vertices : " << vertexHandle->size() << std::endl;
128 std::cout <<
"N Metadata : " << metadataHandle->size() << std::endl;
129 std::cout <<
"N Tracks : " << trackHandle->size() << std::endl;
130 std::cout <<
"N Showers : " << showerHandle->size() << std::endl;
131 std::cout <<
"N PCAxes : " << pcAxisHandle->size() << std::endl;
132 std::cout << std::string(80,
'-') << std::endl;
135 std::map< size_t, art::Ptr< recob::PFParticle > > pfParticleIdMap;
136 for (
unsigned int i = 0; i < pfParticleHandle->size(); ++i)
139 pfParticleIdMap[part->
Self()] =
part;
143 for (
auto it = pfParticleIdMap.begin(); it != pfParticleIdMap.end(); ++it)
149 this->
PrintParticle(part, pfParticleIdMap, pfPartToSpacePointAssoc, pfPartToClusterAssoc, pfPartToVertexAssoc,
150 pfPartToMetadataAssoc, pfPartToTrackAssoc, pfPartToShowerAssoc, pfPartToPCAxisAssoc, 0);
154 std::cout << std::string(80,
'-') << std::endl;
171 const std::string
indent(std::string(depth,
' '));
172 const std::string rule(indent + std::string(2 * w,
'-'));
175 std::cout << std::endl << rule << std::endl;
176 std::cout << indent <<
"PFParticle" << std::endl;
177 std::cout << rule << std::endl;
178 std::cout << indent << std::setw(w) <<
std::left <<
"- Key" << part.
key() << std::endl;
179 std::cout << indent << std::setw(w) <<
std::left <<
"- Id" << part->
Self() << std::endl;
183 std::cout << indent << std::setw(w) <<
std::left <<
"- Primary" << std::endl;
187 std::cout << indent << std::setw(w) <<
std::left <<
"- Parent" << part->
Parent() << std::endl;
190 std::cout << indent << std::setw(w) <<
"- PDG" << part->
PdgCode() << std::endl;
191 std::cout << rule << std::endl;
194 const std::vector< art::Ptr< recob::SpacePoint > > &spacePoints = pfPartToSpacePointAssoc.at( part.
key() );
195 const std::vector< art::Ptr< recob::Cluster > > &clusters = pfPartToClusterAssoc.at( part.
key() );
196 const std::vector< art::Ptr< recob::Vertex > > &vertices = pfPartToVertexAssoc.at( part.
key() );
197 const std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > &metadata = pfPartToMetadataAssoc.at( part.
key() );
198 const std::vector< art::Ptr< recob::Track > > &tracks = pfPartToTrackAssoc.at( part.
key() );
199 const std::vector< art::Ptr< recob::Shower > > &showers = pfPartToShowerAssoc.at( part.
key() );
200 const std::vector< art::Ptr< recob::PCAxis > > &pcAxes = pfPartToPCAxisAssoc.at( part.
key() );
203 std::cout << indent << std::setw(w) <<
std::left <<
"- # SpacePoint" << spacePoints.size() << std::endl;
204 std::cout << indent << std::setw(w) <<
std::left <<
"- # Cluster" << clusters.size() << std::endl;
205 std::cout << indent << std::setw(w) <<
std::left <<
"- # Vertex" << vertices.size() << std::endl;
206 std::cout << indent << std::setw(w) <<
std::left <<
"- # Track" << tracks.size() << std::endl;
207 std::cout << indent << std::setw(w) <<
std::left <<
"- # Shower" << showers.size() << std::endl;
208 std::cout << indent << std::setw(w) <<
std::left <<
"- # PCAxis" << pcAxes.size() << std::endl;
209 std::cout << indent << std::setw(w) <<
std::left <<
"- # Metadata" << metadata.size() << std::endl;
211 for (
unsigned int metadataId = 0; metadataId < metadata.size(); ++metadataId)
213 for (
const auto &propertiesMapEntry : metadata.at(metadataId)->GetPropertiesMap())
214 std::cout << indent << std::setw(w) <<
std::left <<
"-- Property " << propertiesMapEntry.first <<
", value " << propertiesMapEntry.second << std::endl;
217 std::cout << rule << std::endl;
218 std::cout << indent << std::setw(w) <<
std::left <<
"- # Daughters" << part->
NumDaughters() << std::endl;
219 std::cout << rule << std::endl;
221 for (
auto &daughterId : part->
Daughters())
224 this->
PrintParticle(daughter, pfParticleIdMap, pfPartToSpacePointAssoc, pfPartToClusterAssoc, pfPartToVertexAssoc,
225 pfPartToMetadataAssoc, pfPartToTrackAssoc, pfPartToShowerAssoc, pfPartToPCAxisAssoc, depth + 4);
const std::vector< size_t > & Daughters() const
Returns the collection of daughter particles.
int NumDaughters() const
Returns the number of daughter particles flowing from this one.
size_t Self() const
Returns the index of this particle.
LArPandoraEventDump(fhicl::ParameterSet const &pset)
Declaration of signal hit object.
void PrintParticle(const art::Ptr< recob::PFParticle > &part, const std::map< size_t, art::Ptr< recob::PFParticle > > &pfParticleIdMap, const art::FindManyP< recob::SpacePoint > &pfPartToSpacePointAssoc, const art::FindManyP< recob::Cluster > &pfPartToClusterAssoc, const art::FindManyP< recob::Vertex > &pfPartToVertexAssoc, const art::FindManyP< larpandoraobj::PFParticleMetadata > &pfPartToMetadataAssoc, const art::FindManyP< recob::Track > &pfPartToTrackAssoc, const art::FindManyP< recob::Shower > &pfPartToShowerAssoc, const art::FindManyP< recob::PCAxis > &pfPartToPCAxisAssoc, const int depth)
LArPandoraEventDump & operator=(LArPandoraEventDump const &)=delete
int PdgCode() const
Return the type of particle as a PDG ID.
Metadata associated with a pandora produced PFParticle.
#define DEFINE_ART_MODULE(klass)
std::string indent(std::size_t const i)
bool IsPrimary() const
Returns whether the particle is the root of the flow.
std::string m_ShowerLabel
EDAnalyzer(Table< Config > const &config)
Declaration of cluster object.
Provides recob::Track data product.
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)
Utility object to perform functions of association.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
std::string m_PandoraLabel