Prints the content of all the ParticleFlow particles on screen. More...
Classes | |
struct | Config |
Public Types | |
using | Parameters = art::EDAnalyzer::Table< Config > |
Public Types inherited from art::EDAnalyzer | |
using | WorkerType = WorkerT< EDAnalyzer > |
using | ModuleType = EDAnalyzer |
Public Member Functions | |
DumpPFParticles (Parameters const &config) | |
Default constructor. More... | |
virtual void | analyze (const art::Event &evt) override |
Does the printing. More... | |
Public Member Functions inherited from art::EDAnalyzer | |
EDAnalyzer (fhicl::ParameterSet const &pset) | |
template<typename Config > | |
EDAnalyzer (Table< Config > const &config) | |
std::string | workerType () const |
Public Member Functions inherited from art::detail::Analyzer | |
virtual | ~Analyzer () noexcept |
Analyzer (fhicl::ParameterSet const &pset) | |
template<typename Config > | |
Analyzer (Table< Config > const &config) | |
void | doBeginJob (SharedResources const &resources) |
void | doEndJob () |
void | doRespondToOpenInputFile (FileBlock const &fb) |
void | doRespondToCloseInputFile (FileBlock const &fb) |
void | doRespondToOpenOutputFiles (FileBlock const &fb) |
void | doRespondToCloseOutputFiles (FileBlock const &fb) |
bool | doBeginRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doEndRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed) |
Public Member Functions inherited from art::Observer | |
~Observer () noexcept | |
Observer (Observer const &)=delete | |
Observer (Observer &&)=delete | |
Observer & | operator= (Observer const &)=delete |
Observer & | operator= (Observer &&)=delete |
void | registerProducts (ProductDescriptions &, ModuleDescription const &) |
void | fillDescriptions (ModuleDescription const &) |
fhicl::ParameterSetID | selectorConfig () const |
Public Member Functions inherited from art::ModuleBase | |
virtual | ~ModuleBase () noexcept |
ModuleBase () | |
ModuleDescription const & | moduleDescription () const |
void | setModuleDescription (ModuleDescription const &) |
std::array< std::vector< ProductInfo >, NumBranchTypes > const & | getConsumables () const |
void | sortConsumables (std::string const ¤t_process_name) |
template<typename T , BranchType BT> | |
ViewToken< T > | consumesView (InputTag const &tag) |
template<typename T , BranchType BT> | |
ViewToken< T > | mayConsumeView (InputTag const &tag) |
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... | |
Additional Inherited Members | |
Protected Member Functions inherited from art::Observer | |
std::string const & | processName () const |
bool | wantAllEvents () const noexcept |
bool | wantEvent (ScheduleID id, Event const &e) const |
Handle< TriggerResults > | getTriggerResults (Event const &e) const |
Observer (fhicl::ParameterSet const &config) | |
Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config) | |
Protected Member Functions inherited from art::ModuleBase | |
ConsumesCollector & | consumesCollector () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | consumes (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | consumesView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | consumesMany () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | mayConsume (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | mayConsumeView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | mayConsumeMany () |
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.
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.