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
TrackHitAnaProcessor.h
Go to the documentation of this file.
1#ifndef __TRACKHIT_ANAPROCESSOR_H__
2#define __TRACKHIT_ANAPROCESSOR_H__
3
4//-----------------//
5// C++ StdLib //
6//-----------------//
7#include <iostream>
8#include <string>
9#include <vector>
10
11//----------//
12// ROOT //
13//----------//
14#include "TClonesArray.h"
15#include "TRefArray.h"
16
17//-----------//
18// hpstr //
19//-----------//
20#include "Processor.h"
21#include "BaseSelector.h"
22#include "Track.h"
23#include "TrackerHit.h"
24#include "Event.h"
25#include "TrackHistos.h"
26#include "AnaHelpers.h"
27
28// Forward declarations
29class TTree;
30
36
37 public:
45 TrackHitAnaProcessor(const std::string& name, Process& process);
46
49
55 virtual void configure(const ParameterSet& parameters);
56
62 virtual bool process(IEvent* ievent);
63
70 virtual void initialize(TTree* tree);
71
76 virtual void finalize();
77
78 private:
80 std::vector<Track*>* tracks_{};
81 TBranch* btracks_{nullptr};
82
83 std::string trkCollName_;
84
85 // Track Selector configuration
86 std::string selectionCfg_;
87 std::shared_ptr<BaseSelector> trkSelector_;
88 std::vector<std::string> regionSelections_;
89
90 std::map<std::string, std::shared_ptr<BaseSelector>> reg_selectors_;
91
92 std::map<std::string, std::shared_ptr<TrackHistos>> reg_histos_;
93 typedef std::map<std::string, std::shared_ptr<TrackHistos>>::iterator reg_it;
94
95 std::vector<std::string> regions_;
96
97 // Containers to hold histogrammer info
98 std::string histCfgFilename_;
102 bool doTruth_{false};
103 int debug_{0};
104
105}; // TrackHitAnaProcessor
106
107#endif // __TRACKHIT_ANAPROCESSOR_
Helper class for hipster analysis.
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.
Class used to encapsulate tracker hit 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::string trkCollName_
Track Collection name.
std::string truthHistCfgFilename_
description
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_
description
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::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_
description
std::shared_ptr< BaseSelector > trkSelector_
description