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.h
Go to the documentation of this file.
1#ifndef __VERTEX_PROCESSOR_H__
2#define __VERTEX_PROCESSOR_H__
3
4//-----------------//
5// C++ StdLib //
6//-----------------//
7#include <iostream>
8#include <string>
9#include <vector>
10
11//----------//
12// LCIO //
13//----------//
14#include <EVENT/LCCollection.h>
15#include <EVENT/TrackerHit.h>
16#include <IMPL/LCGenericObjectImpl.h>
17#include <EVENT/ReconstructedParticle.h>
18#include <IMPL/LCGenericObjectImpl.h>
19#include <UTIL/LCRelationNavigator.h>
20#include <IMPL/MCParticleImpl.h>
21#include <IMPL/SimTrackerHitImpl.h>
22#include <EVENT/MCParticle.h>
23#include <EVENT/SimTrackerHit.h>
24
25#include <map>
26#include <set>
27
28//-----------//
29// hpstr //
30//-----------//
31#include "Processor.h"
32#include "Vertex.h"
33#include "Particle.h"
34#include "Event.h"
35#include "TrackerHit.h"
36#include "RawSvtHit.h"
37
38// Forward declarations
39class TTree;
40
45class VertexProcessor : public Processor {
46
47 public:
55 VertexProcessor(const std::string& name, Process& process);
56
59
65 virtual void configure(const ParameterSet& parameters);
66
73 virtual void initialize(TTree* tree);
74
80 virtual bool process(IEvent* ievent);
81
86 virtual void finalize();
87
88 private:
89
131
139 void closeTruthLink(Track* track, const std::map<int, int>& mcp_pdg, bool have_mcp);
140
142 void reportTruthLinkClosure() const;
143
145
147 std::vector<TrackerHit*> hits_{};
148 std::string trkhitCollRoot_{"fspOnTrackHits"};
149 std::vector<RawSvtHit*> rawhits_{};
150 std::string rawhitCollRoot_{"fspOnTrackRawHits"};
151 std::vector<Vertex*> vtxs_{};
152 std::vector<Particle*> parts_{};
153 std::string vtxCollLcio_{"UnconstrainedV0Vertices"};
154 std::string vtxCollRoot_{"UnconstrainedV0Vertices"};
155 std::string partCollRoot_{"ParticlesOnVertices"};
156 std::string kinkRelCollLcio_{"GBLKinkDataRelations"};
157 std::string trkRelCollLcio_{"TrackDataRelations"};
158 std::string hitFitsCollLcio_{"SVTFittedRawTrackerHits"};
159 std::string mcPartRelLcio_{"RotatedHelicalTrackMCRelations"};
160 std::string mcPartCollLcio_{"MCParticle"};
161 std::string rawHitCollLcio_{"SVTRawTrackerHits"};
162 std::string trackStateLocation_{""};
163
165
166 double bfield_{-1.};
167
169
170 int debug_{0};
171
172}; // VertexProcessor
173
174#endif // __VERTEX_PROCESSOR_H__
Class defining methods used to access event information and data collections.
Class used to encapsulate information about a particle.
Base classes for all user event processing components to extend.
Class used to encapsulate raw svt hit information.
Class used to encapsulate tracker hit information.
Class used to encapsulate Vertex information.
Definition IEvent.h:7
description
Processor(const std::string &name, Process &process)
Class constructor.
Definition Processor.cxx:10
virtual bool process()
Process the histograms and generate analysis output.
Definition Processor.h:95
Definition Track.h:32
void closeTruthLink(Track *track, const std::map< int, int > &mcp_pdg, bool have_mcp)
Tally the closure counters for one converted track.
std::string mcPartRelLcio_
virtual bool process(IEvent *ievent)
Process the event and put new data products into it.
std::string rawHitCollLcio_
event-level raw hits, for the closure control
std::string partCollRoot_
description
std::string trkRelCollLcio_
description
std::string trackStateLocation_
select track state for tracks DEFAULT AtIP
int debug_
Debug Level.
std::string trkhitCollRoot_
double bfield_
magnetic field
int useTrackerHits_
Load hit collections, otherwise get from getSubdetectorHitNumbers.
virtual void configure(const ParameterSet &parameters)
Callback for the Processor to configure itself from the given set of parameters.
virtual void finalize()
Callback for the Processor to take any necessary action when the processing of events finishes.
virtual void initialize(TTree *tree)
Callback for the Processor to take any necessary action when the processing of events starts.
std::string hitFitsCollLcio_
std::vector< RawSvtHit * > rawhits_
std::vector< Vertex * > vtxs_
description
std::vector< TrackerHit * > hits_
std::string mcPartCollLcio_
collection the stored MCParticle ids come from
std::vector< Particle * > parts_
description
std::string vtxCollRoot_
description
int truthClosure_
Run the truth-link closure test and print a summary in finalize().
void reportTruthLinkClosure() const
Print the closure summary. Called from finalize().
std::string kinkRelCollLcio_
description
std::string vtxCollLcio_
description
TruthLinkClosure closure_
std::string rawhitCollRoot_
VertexProcessor(const std::string &name, Process &process)
Class constructor.
Closure test of the truth-link chain, off by default.
long n_raw
raw hits reached through those tracker hits
long n_raw_event
raw hits in rawHitCollLcio_, whole event
long n_stored_entries
entries actually on Track::getMcpHits()
long n_trk_no_entry
tracks with an empty mcp-hit list
long n_simhits_null_mcp
... whose getMCParticle() was null
long n_simhits
SimTrackerHits reached.
long n_expected_entries
addMcpHit() calls the LCIO walk should produce
long n_trk_dangling
tracks whose plurality id is not in the MCParticle coll
long n_simhits_dangling
... whose MCParticle id is absent from mcPartCollLcio_
long n_raw_event_with_rel
... having >=1 relation
long n_events_with_mcp
events where mcPartCollLcio_ was present
long n_trk_not_electron
tracks whose plurality id resolves to |PDG| != 11
long n_trackerhits
tracker (cluster/3D) hits on those tracks
long n_raw_with_rel
... having >=1 relation
long n_trk_plurality_differs
strip-level and layer-unique plurality disagree
long n_events_with_rel
events where mcPartRelLcio_ was present
long n_trk_electron
tracks that resolve to an e+-