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
TridentAnaProcessor.h
Go to the documentation of this file.
1#ifndef __TRIDENT_ANAPROCESSOR_H__
2#define __TRIDENT_ANAPROCESSOR_H__
3
4
5//HPSTR
6#include "HpsEvent.h"
7#include "Collections.h"
8#include "EventHeader.h"
9#include "Vertex.h"
10#include "Track.h"
11#include "TrackerHit.h"
12#include "Particle.h"
13#include "Processor.h"
14#include "BaseSelector.h"
15#include "TrackHistos.h"
16#include "FlatTupleMaker.h"
17#include "AnaHelpers.h"
18
19
20//ROOT
21#include "TFile.h"
22#include "TTree.h"
23#include "TBranch.h"
24#include "TVector3.h"
25
26//C++
27#include <memory>
28
30
31public:
32 TridentAnaProcessor(const std::string& name, Process& process);
34 virtual bool process(IEvent* ievent);
35
36 virtual void initialize(TTree* tree);
37
38 virtual void finalize();
39
40 virtual void configure(const ParameterSet& parameters);
41
42private:
43
44 std::shared_ptr<BaseSelector> vtxSelector;
45 std::shared_ptr<BaseSelector> trkSelector;
46 std::vector<std::string> regionSelections_;
47
48 std::string selectionCfg_;
49 std::string trkSelCfg_;
50
51
52 TBranch* bfspart_{nullptr};
53 TBranch* bvtxs_{nullptr};
54 TBranch* btrks_{nullptr};
55 TBranch* bevth_{nullptr};
56
57 std::vector<Vertex*> * vtxs_{};
58 std::vector<Particle*> * fspart_{};
59 std::vector<Track*> * trks_{};
60 EventHeader* evth_{nullptr};
61
62 std::string anaName_{"vtxAna"};
63 std::string vtxColl_{"Vertices"};
64 std::string fspartColl_{"FinalStateParticles"};
65 std::string trkColl_{"GBLTracks"};
66 TTree* tree_{nullptr};
67
68 std::shared_ptr<TrackHistos> _vtx_histos;
69
70 //Duplicate.. We can make a single class.. ?
71 std::map<std::string, std::shared_ptr<BaseSelector> > _reg_vtx_selectors;
72 std::map<std::string, std::shared_ptr<TrackHistos> > _reg_vtx_histos;
73 std::map<std::string, std::shared_ptr<FlatTupleMaker> > _reg_tuples;
74
75 std::vector<std::string> _regions;
76
77
78 typedef std::map<std::string,std::shared_ptr<TrackHistos> >::iterator reg_it;
79
80 std::string histoCfg_{""};
81 double timeOffset_{-999};
82 //In GeV. Default is 2016 value;
83 double beamE_{2.3};
84 int isData{0};
85 std::shared_ptr<AnaHelpers> _ah;
86
87
88
89 //Debug level
90 int debug_{0};
91};
92
93#endif
Helper class for hipster analysis.
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
virtual void initialize(TTree *tree)
Callback for the Processor to take any necessary action when the processing of events starts,...
TridentAnaProcessor(const std::string &name, Process &process)
std::vector< std::string > regionSelections_
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_vtx_histos
virtual void configure(const ParameterSet &parameters)
Callback for the Processor to configure itself from the given set of parameters.
std::vector< Track * > * trks_
std::map< std::string, std::shared_ptr< BaseSelector > > _reg_vtx_selectors
std::map< std::string, std::shared_ptr< TrackHistos > >::iterator reg_it
std::shared_ptr< BaseSelector > vtxSelector
std::shared_ptr< TrackHistos > _vtx_histos
virtual bool process(IEvent *ievent)
Process the event and put new data products into it.
std::map< std::string, std::shared_ptr< FlatTupleMaker > > _reg_tuples
std::shared_ptr< AnaHelpers > _ah
std::shared_ptr< BaseSelector > trkSelector
std::vector< Particle * > * fspart_
std::vector< Vertex * > * vtxs_
std::vector< std::string > _regions