Prints the content of all the ParticleFlow particles on screen. More...
Classes | |
struct | Config |
Public Types | |
using | Parameters = art::EDAnalyzer::Table< Config > |
Public Member Functions | |
DumpPFParticles (Parameters const &config) | |
Default constructor. More... | |
virtual void | analyze (const art::Event &evt) override |
Does the printing. More... | |
Private Member Functions | |
void | MakePFParticleGraph (art::Event const &event, art::ValidHandle< std::vector< recob::PFParticle >> const &handle) const |
Static Private Member Functions | |
static std::string | DotFileName (art::EventID const &evtID, art::Provenance const &prodInfo) |
Private Attributes | |
art::InputTag | fInputTag |
input tag of the PFParticle product More... | |
std::string | fOutputCategory |
category for LogInfo output More... | |
bool | fPrintHexFloats |
whether to print floats in base 16 More... | |
unsigned int | fMaxDepth |
maximum generation to print (0: only primaries) More... | |
bool | fMakeEventGraphs |
whether to create one DOT file per event More... | |
Prints the content of all the ParticleFlow particles on screen.
This analyser prints the content of all the ParticleFlow particles into the LogInfo/LogVerbatim stream.
"DumpPFParticles"
): the category used for the output (useful for filtering)false
): print all the floating point numbers in base 16false
): creates a DOT file for each event, with a graph of PFParticle relations; each file is named as: ProcessName_ModuleLabel_InstanceName_Run::_Subrun::_Event::_particles.dot
, where the the input label elements refer to the data product being plotted.When MakeParticleGraphs configuration option is activated, a file is created for each event, that contains the particle flow tree in GraphViz format. The GraphViz dot
command can be used to render it into a PDF, SVG, EPS or one of the many supported bitmap formats. The typical command to use is:
dot -Tpdf -oPMTrk.pdf PMTrk.dot
A bash
command to convert all files into a OutputFormat
format:
OutputFormat='pdf' for DotFile in *.dot ; do OutputFile="${DotFile%.dot}.${OutputFormat}" [[ "$OutputFile" -ot "$DotFile" ]] || continue # up to date already echo "${DotFile} => ${OutputFile} ..." dot -T"$OutputFormat" -o"$OutputFile" "$DotFile" || break done
which will also skip files already converted.
The output shows one cell ("node") per particle. The format of the node follows these prescriptions:
#
)The relations between particles in the flow are represented by connecting lines ("edges"). Connection information is redundant: the parent particle should have the daughter in the daughter list, and the daughter should have the parent particle referenced as such. Since the connection is usually from two sources, there are usually two arrow heads, each one close to the particle that provides information on that connection; all arrow heads point from parent to daughter.
If you are trying to interpret an existing diagram, the following list is more direct to the point. Nodes: represent particles (see above for the label content)
Connecting lines ("edges"):
Definition at line 131 of file DumpPFParticles_module.cc.
using recob::DumpPFParticles::Parameters = art::EDAnalyzer::Table<Config> |
Definition at line 168 of file DumpPFParticles_module.cc.
|
explicit |
Default constructor.
Definition at line 1118 of file DumpPFParticles_module.cc.
|
overridevirtual |
Does the printing.
Definition at line 1174 of file DumpPFParticles_module.cc.
|
staticprivate |
Definition at line 1135 of file DumpPFParticles_module.cc.
|
private |
Definition at line 1148 of file DumpPFParticles_module.cc.
|
private |
input tag of the PFParticle product
Definition at line 178 of file DumpPFParticles_module.cc.
|
private |
whether to create one DOT file per event
Definition at line 182 of file DumpPFParticles_module.cc.
|
private |
maximum generation to print (0: only primaries)
Definition at line 181 of file DumpPFParticles_module.cc.
|
private |
category for LogInfo output
Definition at line 179 of file DumpPFParticles_module.cc.
|
private |
whether to print floats in base 16
Definition at line 180 of file DumpPFParticles_module.cc.