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
TrackingAnaProcessor.h
Go to the documentation of this file.
1#ifndef __TRACKING_ANAPROCESSOR_H__
2#define __TRACKING_ANAPROCESSOR_H__
3
4//-----------------//
5// C++ StdLib //
6//-----------------//
7#include <iostream>
8#include <string>
9
10//----------//
11// ROOT //
12//----------//
13#include "TClonesArray.h"
14#include "TH1D.h"
15#include "TH2D.h"
16
17//-----------//
18// hpstr //
19//-----------//
20#include "Processor.h"
21#include "BaseSelector.h"
22#include "Track.h"
23#include "Event.h"
24#include "CalCluster.h"
25#include "EventHeader.h"
26#include "TrackHistos.h"
27#include "TrackSmearingTool.h"
28
29// Forward declarations
30class TTree;
31
37
38 public:
46 TrackingAnaProcessor(const std::string& name, Process& process);
47
50
56 virtual void configure(const ParameterSet& parameters);
57
63 virtual bool process(IEvent* ievent);
64
71 virtual void initialize(TTree* tree);
72
77 virtual void finalize();
78
79 private:
80
82 std::vector<Track*>* tracks_{};
83 TBranch* btracks_{nullptr};
84
86 TBranch* bevth_{nullptr};
87
89 TBranch* becal_{nullptr};
90
91 // Event Header
92 EventHeader* evth_{nullptr};
93 std::vector<CalCluster*>* ecal_{};
94
95 std::string trkCollName_;
96 std::string ecalCollName_{"RecoEcalClusters"};
97
98 // Track Selector configuration
99 std::string selectionCfg_;
100 std::shared_ptr<BaseSelector> trkSelector_;
101 std::vector<std::string> regionSelections_;
102 std::map<std::string, std::shared_ptr<BaseSelector>> reg_selectors_;
103 std::map<std::string, std::shared_ptr<TrackHistos>> reg_histos_;
104 typedef std::map<std::string, std::shared_ptr<TrackHistos>>::iterator reg_it;
105
106 // Containers to hold histogrammer info
107 std::string histCfgFilename_;
111
112 std::vector<std::string> regions_;
113
114 bool doTruth_{false};
115 int isData_{1};
116 int debug_{0};
117 int seed_{0};
118 float time_offset_{0};
119
120 //Momentum smearing closure test
121 std::shared_ptr<TrackSmearingTool> smearingTool_;
122 std::shared_ptr<TrackSmearingTool> smearingToolRel_;
123 std::string pSmearingFile_{""};
128
133
134}; // TrackingAnaProcessor
135
136#endif // __TRACKING_ANAPROCESSOR_
Class used to encapsulate event information.
Class defining methods used to access event information and data collections.
Base classes for all user event processing components to extend.
Class used to encapsulate track 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
description
Definition TrackHistos.h:17
Insert description here. more details.
std::shared_ptr< TrackSmearingTool > smearingTool_
time offset
std::string ecalCollName_
Cluster Collection name.
std::string trkCollName_
Track Collection name.
std::string truthHistCfgFilename_
description
std::shared_ptr< TrackSmearingTool > smearingToolRel_
virtual void configure(const ParameterSet &parameters)
Configure the Ana Processor.
virtual void finalize()
Callback for the Processor to take any necessary action when the processing of events finishes.
std::map< std::string, std::shared_ptr< TrackHistos > > reg_histos_
description
std::vector< std::string > regionSelections_
track selections
virtual void initialize(TTree *tree)
Callback for the Processor to take any necessary action when the processing of events starts.
std::map< std::string, std::shared_ptr< TrackHistos > >::iterator reg_it
description
std::vector< CalCluster * > * ecal_
std::string histCfgFilename_
description
TrackHistos * trkHistos_
description
std::map< std::string, std::shared_ptr< BaseSelector > > reg_selectors_
description
TBranch * btracks_
description
TrackHistos * truthHistos_
description
std::vector< Track * > * tracks_
std::vector< std::string > regions_
std::shared_ptr< BaseSelector > trkSelector_
description