|
hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
|
Insert description here. more details. More...
#include <VertexProcessor.h>
Classes | |
| struct | TruthLinkClosure |
| Closure test of the truth-link chain, off by default. More... | |
Public Member Functions | |
| VertexProcessor (const std::string &name, Process &process) | |
| Class constructor. | |
| ~VertexProcessor () | |
| virtual void | configure (const ParameterSet ¶meters) |
| Callback for the Processor to configure itself from the given set of parameters. | |
| virtual void | initialize (TTree *tree) |
| Callback for the Processor to take any necessary action when the processing of events starts. | |
| virtual bool | process (IEvent *ievent) |
| Process the event and put new data products into it. | |
| virtual void | finalize () |
| Callback for the Processor to take any necessary action when the processing of events finishes. | |
| Public Member Functions inherited from Processor | |
| Processor (const std::string &name, Process &process) | |
| Class constructor. | |
| virtual | ~Processor () |
| virtual void | initialize (std::string inFilename, std::string outFilename) |
| Callback for the Processor to take any necessary action when the processing of events starts, such as initializing files. | |
| virtual void | setFile (TFile *outFile) |
| Set output TFile for AnaProcessors. | |
| virtual bool | process () |
| Process the histograms and generate analysis output. | |
Private Member Functions | |
| void | closeTruthLink (Track *track, const std::map< int, int > &mcp_pdg, bool have_mcp) |
| Tally the closure counters for one converted track. | |
| void | reportTruthLinkClosure () const |
| Print the closure summary. Called from finalize(). | |
Private Attributes | |
| TruthLinkClosure | closure_ {} |
| std::vector< TrackerHit * > | hits_ {} |
| std::string | trkhitCollRoot_ {"fspOnTrackHits"} |
| std::vector< RawSvtHit * > | rawhits_ {} |
| std::string | rawhitCollRoot_ {"fspOnTrackRawHits"} |
| std::vector< Vertex * > | vtxs_ {} |
| description | |
| std::vector< Particle * > | parts_ {} |
| description | |
| std::string | vtxCollLcio_ {"UnconstrainedV0Vertices"} |
| description | |
| std::string | vtxCollRoot_ {"UnconstrainedV0Vertices"} |
| description | |
| std::string | partCollRoot_ {"ParticlesOnVertices"} |
| description | |
| std::string | kinkRelCollLcio_ {"GBLKinkDataRelations"} |
| description | |
| std::string | trkRelCollLcio_ {"TrackDataRelations"} |
| description | |
| std::string | hitFitsCollLcio_ {"SVTFittedRawTrackerHits"} |
| std::string | mcPartRelLcio_ {"RotatedHelicalTrackMCRelations"} |
| std::string | mcPartCollLcio_ {"MCParticle"} |
| collection the stored MCParticle ids come from | |
| std::string | rawHitCollLcio_ {"SVTRawTrackerHits"} |
| event-level raw hits, for the closure control | |
| std::string | trackStateLocation_ {""} |
| select track state for tracks DEFAULT AtIP | |
| int | truthClosure_ {0} |
| Run the truth-link closure test and print a summary in finalize(). | |
| double | bfield_ {-1.} |
| magnetic field | |
| int | useTrackerHits_ {1} |
| Load hit collections, otherwise get from getSubdetectorHitNumbers. | |
| int | debug_ {0} |
| Debug Level. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Processor | |
| static void | declare (const std::string &classname, ProcessorMaker *) |
| Internal function which is part of the ProcessorFactory machinery. | |
| Protected Attributes inherited from Processor | |
| Process & | process_ |
| TFile * | outF_ {nullptr} |
| std::string | name_ |
Insert description here. more details.
Definition at line 45 of file VertexProcessor.h.
| VertexProcessor | ( | const std::string & | name, |
| Process & | process ) |
Class constructor.
| name | Name for this instance of the class. |
| process | The Process class associated with Processor, provided by the processing framework. |
Definition at line 14 of file VertexProcessor.cxx.
| ~VertexProcessor | ( | ) |
Destructor
Definition at line 16 of file VertexProcessor.cxx.
|
private |
Tally the closure counters for one converted track.
| track | the hpstr Track that addMcpHit() was just called on |
| mcp_pdg | id -> PDG for every particle in mcPartCollLcio_ |
| have_mcp | whether mcPartCollLcio_ was present this event |
Reproduce the plurality exactly as PreselectAndCategorize2021.cxx:1104-1117 does – over entries, so a wide cluster contributes once per strip and the layer half of the pair is ignored. Recompute it a second time over unique (layer, id) pairs to measure how often that weighting changes the answer.
The classification the downstream code cannot make for itself: utils::getTruthPDG returns 0 both when the id resolves to nothing and when it resolves to a non-e+-, and hasTruthMatch collapses both into "no truth link" – the same value a track with no relations at all gets.
Definition at line 315 of file VertexProcessor.cxx.
|
virtual |
Callback for the Processor to configure itself from the given set of parameters.
| parameters | ParameterSet for configuration. |
Reimplemented from Processor.
Definition at line 18 of file VertexProcessor.cxx.
|
virtual |
Callback for the Processor to take any necessary action when the processing of events finishes.
Implements Processor.
Definition at line 431 of file VertexProcessor.cxx.
|
virtual |
Callback for the Processor to take any necessary action when the processing of events starts.
| tree |
Implements Processor.
Definition at line 42 of file VertexProcessor.cxx.
|
virtual |
Process the event and put new data products into it.
| ievent | The Event to process. |
Closure test bookkeeping. The map is the ground truth for "does this id mean anything downstream": MCParticleProcessor stores exactly these ids (MCParticleProcessor.cxx:99 also uses lc_particle->id()), so an id that is absent here is one PreselectAndCategorize2021 can never resolve.
Event-level control: what fraction of ALL raw hits carry a relation. Without it the on-track number has nothing to be compared against – under pulser overlay most raw hits are data and are expected to have no relation at all.
A null MCParticle used to be printed and then dereferenced on the next line. Skip it instead, and count it – a SimTrackerHit whose particle did not survive into the output is one of the ways the truth link goes missing.
Close on the copy that is actually written out, not on the local Track: Particle::setTrack assigns by value, so this is the object PreselectAndCategorize2021 will read back from the tuple.
Implements Processor.
Definition at line 51 of file VertexProcessor.cxx.
|
private |
Print the closure summary. Called from finalize().
Definition at line 372 of file VertexProcessor.cxx.
|
private |
magnetic field
Definition at line 166 of file VertexProcessor.h.
|
private |
Definition at line 144 of file VertexProcessor.h.
|
private |
Debug Level.
Definition at line 170 of file VertexProcessor.h.
|
private |
Definition at line 158 of file VertexProcessor.h.
|
private |
Containers to hold all TrackerHit objects.
Definition at line 147 of file VertexProcessor.h.
|
private |
description
Definition at line 156 of file VertexProcessor.h.
|
private |
collection the stored MCParticle ids come from
Definition at line 160 of file VertexProcessor.h.
|
private |
Definition at line 159 of file VertexProcessor.h.
|
private |
description
Definition at line 155 of file VertexProcessor.h.
|
private |
description
Definition at line 152 of file VertexProcessor.h.
|
private |
event-level raw hits, for the closure control
Definition at line 161 of file VertexProcessor.h.
|
private |
Definition at line 150 of file VertexProcessor.h.
|
private |
Definition at line 149 of file VertexProcessor.h.
|
private |
select track state for tracks DEFAULT AtIP
Definition at line 162 of file VertexProcessor.h.
|
private |
Definition at line 148 of file VertexProcessor.h.
|
private |
description
Definition at line 157 of file VertexProcessor.h.
|
private |
Run the truth-link closure test and print a summary in finalize().
Definition at line 164 of file VertexProcessor.h.
|
private |
Load hit collections, otherwise get from getSubdetectorHitNumbers.
Definition at line 168 of file VertexProcessor.h.
|
private |
description
Definition at line 153 of file VertexProcessor.h.
|
private |
description
Definition at line 154 of file VertexProcessor.h.
|
private |
description
Definition at line 151 of file VertexProcessor.h.