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.
Loading...
Searching...
No Matches
VertexProcessor Class Reference

Insert description here. more details. More...

#include <VertexProcessor.h>

Inheritance diagram for VertexProcessor:
Processor

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 &parameters)
 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_

Detailed Description

Insert description here. more details.

Definition at line 45 of file VertexProcessor.h.

Constructor & Destructor Documentation

◆ VertexProcessor()

VertexProcessor ( const std::string & name,
Process & process )

Class constructor.

Parameters
nameName for this instance of the class.
processThe 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.

Member Function Documentation

◆ closeTruthLink()

void closeTruthLink ( Track * track,
const std::map< int, int > & mcp_pdg,
bool have_mcp )
private

Tally the closure counters for one converted track.

Parameters
trackthe hpstr Track that addMcpHit() was just called on
mcp_pdgid -> PDG for every particle in mcPartCollLcio_
have_mcpwhether 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.

◆ configure()

void configure ( const ParameterSet & parameters)
virtual

Callback for the Processor to configure itself from the given set of parameters.

Parameters
parametersParameterSet for configuration.

Reimplemented from Processor.

Definition at line 18 of file VertexProcessor.cxx.

◆ finalize()

void finalize ( )
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.

◆ initialize()

void initialize ( TTree * tree)
virtual

Callback for the Processor to take any necessary action when the processing of events starts.

Parameters
tree

Implements Processor.

Definition at line 42 of file VertexProcessor.cxx.

◆ process()

bool process ( IEvent * ievent)
virtual

Process the event and put new data products into it.

Parameters
ieventThe 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.

◆ reportTruthLinkClosure()

void reportTruthLinkClosure ( ) const
private

Print the closure summary. Called from finalize().

Definition at line 372 of file VertexProcessor.cxx.

Member Data Documentation

◆ bfield_

double bfield_ {-1.}
private

magnetic field

Definition at line 166 of file VertexProcessor.h.

◆ closure_

TruthLinkClosure closure_ {}
private

Definition at line 144 of file VertexProcessor.h.

◆ debug_

int debug_ {0}
private

Debug Level.

Definition at line 170 of file VertexProcessor.h.

◆ hitFitsCollLcio_

std::string hitFitsCollLcio_ {"SVTFittedRawTrackerHits"}
private

Definition at line 158 of file VertexProcessor.h.

◆ hits_

std::vector<TrackerHit*> hits_ {}
private

Containers to hold all TrackerHit objects.

Definition at line 147 of file VertexProcessor.h.

◆ kinkRelCollLcio_

std::string kinkRelCollLcio_ {"GBLKinkDataRelations"}
private

description

Definition at line 156 of file VertexProcessor.h.

◆ mcPartCollLcio_

std::string mcPartCollLcio_ {"MCParticle"}
private

collection the stored MCParticle ids come from

Definition at line 160 of file VertexProcessor.h.

◆ mcPartRelLcio_

std::string mcPartRelLcio_ {"RotatedHelicalTrackMCRelations"}
private

Definition at line 159 of file VertexProcessor.h.

◆ partCollRoot_

std::string partCollRoot_ {"ParticlesOnVertices"}
private

description

Definition at line 155 of file VertexProcessor.h.

◆ parts_

std::vector<Particle*> parts_ {}
private

description

Definition at line 152 of file VertexProcessor.h.

◆ rawHitCollLcio_

std::string rawHitCollLcio_ {"SVTRawTrackerHits"}
private

event-level raw hits, for the closure control

Definition at line 161 of file VertexProcessor.h.

◆ rawhitCollRoot_

std::string rawhitCollRoot_ {"fspOnTrackRawHits"}
private

Definition at line 150 of file VertexProcessor.h.

◆ rawhits_

std::vector<RawSvtHit*> rawhits_ {}
private

Definition at line 149 of file VertexProcessor.h.

◆ trackStateLocation_

std::string trackStateLocation_ {""}
private

select track state for tracks DEFAULT AtIP

Definition at line 162 of file VertexProcessor.h.

◆ trkhitCollRoot_

std::string trkhitCollRoot_ {"fspOnTrackHits"}
private

Definition at line 148 of file VertexProcessor.h.

◆ trkRelCollLcio_

std::string trkRelCollLcio_ {"TrackDataRelations"}
private

description

Definition at line 157 of file VertexProcessor.h.

◆ truthClosure_

int truthClosure_ {0}
private

Run the truth-link closure test and print a summary in finalize().

Definition at line 164 of file VertexProcessor.h.

◆ useTrackerHits_

int useTrackerHits_ {1}
private

Load hit collections, otherwise get from getSubdetectorHitNumbers.

Definition at line 168 of file VertexProcessor.h.

◆ vtxCollLcio_

std::string vtxCollLcio_ {"UnconstrainedV0Vertices"}
private

description

Definition at line 153 of file VertexProcessor.h.

◆ vtxCollRoot_

std::string vtxCollRoot_ {"UnconstrainedV0Vertices"}
private

description

Definition at line 154 of file VertexProcessor.h.

◆ vtxs_

std::vector<Vertex*> vtxs_ {}
private

description

Definition at line 151 of file VertexProcessor.h.


The documentation for this class was generated from the following files: