forked from UCATLAS/xAODAnaHelpers
/
METConstructor.h
139 lines (102 loc) · 3.44 KB
/
METConstructor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#ifndef xAODAnaHelpers_METConstructor_H
#define xAODAnaHelpers_METConstructor_H
#include <xAODAnaHelpers/Algorithm.h>
// Infrastructure include(s):
#include "xAODRootAccess/Init.h"
#include "xAODRootAccess/TEvent.h"
#include "xAODRootAccess/TStore.h"
#include "PATInterfaces/SystematicRegistry.h"
//look at https://twiki.cern.ch/twiki/bin/view/AtlasComputing/SoftwareTutorialxAODAnalysisInROOT
using std::string;
namespace met {
class METMaker;
class METSystematicsTool;
}
namespace TauAnalysisTools { class TauSelectionTool; }
class METConstructor : public xAH::Algorithm
{
// put your configuration variables here as public variables.
// that way they can be set directly from CINT and python.
public:
// configuration variables
TString m_referenceMETContainer;
TString m_mapName;
TString m_coreName;
TString m_outputContainer;
TString m_inputJets;
TString m_inputElectrons;
TString m_inputPhotons;
TString m_inputTaus;
TString m_inputMuons;
std::string m_inputAlgoJets; // name of vector<string> of syst retrieved from TStore
std::string m_inputAlgoSystMuons; // name of vector<string> of syst retrieved from TStore
std::string m_inputAlgoSystEle; // name of vector<string> of syst retrieved from TStore
std::string m_inputAlgoPhotons; // name of vector<string> of syst retrieved from TStore
bool m_doElectronCuts;
bool m_doPhotonCuts;
bool m_doTauCuts;
bool m_doMuonCuts;
bool m_doMuonEloss;
bool m_doIsolMuonEloss;
bool m_doJVTCut;
bool m_useCaloJetTerm;
bool m_useTrackJetTerm;
bool m_runNominal;
bool m_isMC; //add bool
float m_systVal;
std::string m_systName;
std::string m_SoftTermSystConfigFile;
/** @rst
Name of jet systematics vector from :cpp:class:`~JetCalibrator`.
@endrst
*/
std::string m_jetSystematics;
/** @rst
Name of electron systematics vector from :cpp:class:`~ElectronCalibrator`.
@endrst
*/
std::string m_eleSystematics;
/** @rst
Name of muon systematics vector from :cpp:class:`~MuonCalibrator`.
@endrst
*/
std::string m_muonSystematics;
/** @rst
Name of photon systematics vector from :cpp:class:`~PhotonCalibrator`.
@endrst
*/
std::string m_phoSystematics;
private:
xAOD::TEvent *m_event; //!
xAOD::TStore *m_store; //!
// tools
met::METMaker* m_metmaker; //!
met::METSystematicsTool* metSystTool; //!
TauAnalysisTools::TauSelectionTool* m_tauSelTool; //!
TString coreMetKey;
std::vector<CP::SystematicSet> sysList; //!
int m_numEvent; //!
// variables that don't get filled at submission time should be
// protected from being send from the submission node to the worker
// node (done by the //!)
public:
// Tree *myTree; //!
// TH1 *myHist; //!
// this is a standard constructor
METConstructor (std::string className = "METConstructor");
// these are the functions inherited from Algorithm
virtual EL::StatusCode setupJob (EL::Job& job);
virtual EL::StatusCode fileExecute ();
virtual EL::StatusCode histInitialize ();
virtual EL::StatusCode changeInput (bool firstFile);
virtual EL::StatusCode initialize ();
virtual EL::StatusCode execute ();
virtual EL::StatusCode postExecute();
virtual EL::StatusCode finalize();
virtual EL::StatusCode histFinalize();
/// @cond
// this is needed to distribute the algorithm to the workers
ClassDef(METConstructor, 1);
/// @endcond
};
#endif