37 {
38
40
41
42
43
44 struct missingEt {
46 missingEt(double mpx_in, double mpy_in, double sumet_in) :
47 mpx(mpx_in),
48 mpy(mpy_in),
49 sumet(sumet_in),
52 {}
54 mpx(mpx_in),
55 mpy(mpy_in),
56 sumet(sumet_in),
59 {}
60
61 double mpx;
62 double mpy;
63 double sumet;
66 };
67
68
69
70 enum SystApplied {
72 MET_SOFTTRK_SCALEUP ,
73 MET_SOFTTRK_SCALEDOWN ,
74 MET_SOFTTRK_RESOPARA ,
75 MET_SOFTTRK_RESOPERP ,
76 MET_SOFTTRK_RESOCORR ,
77 MET_SOFTCALO_SCALEUP ,
78 MET_SOFTCALO_SCALEDOWN,
79 MET_SOFTCALO_RESOPARA ,
80 MET_SOFTCALO_RESOPERP ,
81 MET_SOFTCALO_RESOCORR ,
82 MET_JETTRK_SCALEUP ,
83 MET_JETTRK_SCALEDOWN
84 };
85
89 {
90
92
93
94 FRIEND_TEST( METSystTest, TestDefaultHistosFilled );
95 FRIEND_TEST( METSystTest, TestJetTrkHistosFilled );
96 FRIEND_TEST( METSystTest, TestAddAffectingSystematic );
97 FRIEND_TEST( METSystTest, TestProjectST );
98 FRIEND_TEST( METSystTest, TestProjectST2 );
99
100 public:
101
102
103 METSystematicsTool(const std::string& name);
104
105
106
107
111
112
114
115
116
118 const xAOD::MissingETAssociationHelper& helper) const;
120 const xAOD::MissingETAssociationHelper& helper) const;
121
122
123
124
125
131
133
134 private:
135
136
137 METSystematicsTool();
138
139
140 SystApplied m_appliedSystEnum{
NONE};
141
142
143 CP::CorrectionCode internalSoftTermApplyCorrection(
xAOD::MissingET& softMet,
146 ) const;
147 CP::CorrectionCode calcJetTrackMETWithSyst(
xAOD::MissingET& jettrkmet,
const xAOD::MissingETAssociationHelper& helper)
const;
148 CP::CorrectionCode calcJetTrackMETWithSyst(
xAOD::MissingET& jettrkmet,
const xAOD::MissingETAssociationHelper& helper,
const xAOD::Jet* jet)
const;
149 CP::CorrectionCode getCorrectedJetTrackMET(
xAOD::MissingET& jettrkmet,
const xAOD::MissingETAssociationHelper& helper)
const;
151
152
153 Gaudi::Property<std::string> m_configPrefix{this, "ConfigPrefix", "METUtilities/R22_PreRecs", ""};
154 Gaudi::Property<std::string> m_configSoftTrkFile{this, "ConfigSoftTrkFile", "TrackSoftTerms-pflow_Dec24.config", ""};
155 Gaudi::Property<std::string> m_configJetTrkFile{this, "ConfigJetTrkFile", "", ""};
156 Gaudi::Property<std::string> m_configSoftCaloFile{this, "ConfigSoftCaloFile", "", ""};
157 Gaudi::Property<bool> m_useDevArea{this, "UseDevArea", false, ""};
158
159 std::unique_ptr<TH3D> m_trk_shiftpara_pthard_njet_mu{};
160 std::unique_ptr<TH3D> m_trk_resopara_pthard_njet_mu{};
161 std::unique_ptr<TH3D> m_trk_resoperp_pthard_njet_mu{};
162 std::unique_ptr<TH3D> m_calo_shiftpara_pthard_njet_mu{};
163 std::unique_ptr<TH3D> m_calo_resopara_pthard_njet_mu{};
164 std::unique_ptr<TH3D> m_calo_resoperp_pthard_njet_mu{};
165 std::unique_ptr<TH2D> m_jet_systRpt_pt_eta{};
166
167 mutable boost::thread_specific_ptr<TRandom3> m_rand_tls;
168
169
170 int m_units{-1};
171
172 int getNPV() const;
174
175
176
177 SG::ReadHandleKey<xAOD::VertexContainer> m_VertexContKey{this, "VertexContainer", "PrimaryVertices", ""};
178 SG::ReadHandleKey<xAOD::MissingETContainer> m_TruthContKey{this, "TruthContainer", "MET_Truth", ""};
179 SG::ReadHandleKey<xAOD::EventInfo> m_EventInfoKey{this, "EventInfo", "EventInfo", ""};
180
182 StatusCode extractHistoPath(std::string & histfile, std::string & systpath, std::string & configdir, std::string & suffix,
met::SystType const & type);
183
185 missingEt variedSoftTerm (missingEt const & softTerms, missingEt const & ptHard, double varPara, double varPerp) const;
186 missingEt projectST (missingEt const & softTerms, missingEt const & ptHard) const;
187
188
189
190 };
191
192}
ElementLink implementation for ROOT usage.
std::tuple< WrapType< TYPES >... > Types
A simple tuple of multiple types.
::StatusCode StatusCode
StatusCode definition for legacy code.
uint64_t bitmask_t
Type for status word bit mask.
TRandom3 * getTLSRandomGen()
Jet_v1 Jet
Definition of the current "jet version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
MissingET_v1 MissingET
Version control by type defintion.
MissingETContainer_v1 MissingETContainer