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.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TrackEfficiencyProcessor.h
Go to the documentation of this file.
1#ifndef __TRACK_EFFICIENCYPROCESSOR_H__
2#define __TRACK_EFFICIENCYPROCESSOR_H__
3
4
5//HPSTR
6#include "HpsEvent.h"
7#include "Collections.h"
8#include "EventHeader.h"
9#include "Vertex.h"
10#include "CalCluster.h"
11#include "Track.h"
12#include "TrackerHit.h"
13#include "Particle.h"
14#include "Processor.h"
15#include "BaseSelector.h"
16#include "TrackEfficHistos.h"
17#include "ThreeProngHistos.h"
18#include "FlatTupleMaker.h"
19//#include "AnaHelpers.h"
20
21
22//ROOT
23#include "TFile.h"
24#include "TTree.h"
25#include "TBranch.h"
26#include "TVector3.h"
27
28//C++
29#include <memory>
30
32
33public:
34 TrackEfficiencyProcessor(const std::string& name, Process& process);
36 virtual bool process(IEvent* ievent);
37
38 virtual void initialize(TTree* tree);
39
40 virtual void finalize();
41
42 virtual void configure(const ParameterSet& parameters);
43
44private:
45
46 std::shared_ptr<BaseSelector> cluSelector;
47 std::shared_ptr<BaseSelector> trkSelector;
48 std::vector<std::string> regionSelections_;
49 std::vector<std::string> threeProngSelections_;
50
51 std::string selectionCfg_;
52 std::string trkSelCfg_;
53 std::string cluSelCfg_;
54
55
56 TBranch* bfspart_{nullptr};
57 TBranch* bclus_{nullptr};
58 TBranch* btrks_{nullptr};
59 TBranch* bevth_{nullptr};
60
61 std::vector<CalCluster*> * clus_{};
62 std::vector<Particle*> * fspart_{};
63 std::vector<Track*> * trks_{};
64 EventHeader* evth_{nullptr};
65
66 std::string anaName_{"trkEffAna"};
67 std::string cluColl_{"ECalClusters"};
68 std::string fspartColl_{"FinalStateParticles"};
69 std::string trkColl_{"GBLTracks"};
70 TTree* tree_{nullptr};
71
72 std::shared_ptr<TrackEfficHistos> _trkeff_histos;
73
74 std::map<std::string, std::shared_ptr<BaseSelector> > _reg_trkeff_selectors;
75 std::map<std::string, std::shared_ptr<TrackEfficHistos> > _reg_trkeff_histos;
76 std::vector<std::string> _regions;
77
78 std::map<std::string, std::shared_ptr<BaseSelector> > _reg_three_prong_trkeff_selectors;
79 std::map<std::string, std::shared_ptr<ThreeProngHistos> > _reg_three_prong_trkeff_histos;
80 std::vector<std::string> _three_prong_regions;
81
82
83 typedef std::map<std::string,std::shared_ptr<TrackEfficHistos> >::iterator reg_it;
84 typedef std::map<std::string,std::shared_ptr<ThreeProngHistos> >::iterator three_prong_reg_it;
85
86 std::string histoCfg_{""};
87 std::string thrProngCfg_{""};
88 std::string cluHistoCfg_{""};
89 double timeOffset_{-999};
90 //In GeV. Default is 2016 value;
91 double beamE_{2.3};
92 int isData{0};
93 std::shared_ptr<AnaHelpers> _ah;
94 /*
95 struct TridentCand{
96 std::pair<CalCluster*,Track*> ele;
97 std::pair<CalCluster*,Track*> pos;
98 };
99 */
104
110
111 //Debug level
112 int debug_{0};
113};
114
115#endif
Class used to encapsulate event information.
Class used to encapsulate information about a particle.
Base classes for all user event processing components to extend.
Class used to encapsulate track information.
Class used to encapsulate tracker hit information.
Class used to encapsulate Vertex information.
Definition IEvent.h:7
description
Base class for all event processing components.
Definition Processor.h:34
virtual bool process()
Process the histograms and generate analysis output.
Definition Processor.h:95
std::shared_ptr< TrackEfficHistos > _trkeff_histos
virtual void configure(const ParameterSet &parameters)
Callback for the Processor to configure itself from the given set of parameters.
std::map< std::string, std::shared_ptr< TrackEfficHistos > >::iterator reg_it
virtual void finalize()
Callback for the Processor to take any necessary action when the processing of events finishes,...
std::vector< std::string > regionSelections_
virtual void initialize(TTree *tree)
Callback for the Processor to take any necessary action when the processing of events starts,...
std::vector< Track * > * trks_
std::vector< CalCluster * > * clus_
std::map< std::string, std::shared_ptr< TrackEfficHistos > > _reg_trkeff_histos
std::vector< std::string > threeProngSelections_
std::map< std::string, std::shared_ptr< BaseSelector > > _reg_three_prong_trkeff_selectors
std::vector< std::string > _three_prong_regions
std::map< std::string, std::shared_ptr< ThreeProngHistos > >::iterator three_prong_reg_it
std::map< std::string, std::shared_ptr< ThreeProngHistos > > _reg_three_prong_trkeff_histos
std::shared_ptr< AnaHelpers > _ah
std::map< std::string, std::shared_ptr< BaseSelector > > _reg_trkeff_selectors
std::shared_ptr< BaseSelector > cluSelector
std::shared_ptr< BaseSelector > trkSelector
std::vector< Particle * > * fspart_
std::vector< std::string > _regions