16 #include "CLHEP/Units/SystemOfUnits.h"
21 const IInterface*
p) :
23 m_trigDecisionTool(
"Trig::TrigDecisionTool/TrigDecisionTool"),
27 declareInterface<DerivationFramework::ISkimmingTool>(
this);
72 if(m_trigDecisionTool.retrieve(DisableTool{!m_reqTrigger}).isFailure()) {
73 ATH_MSG_FATAL(
"Failed to retrieve tool: " << m_trigDecisionTool);
74 return StatusCode::FAILURE;
78 return StatusCode::SUCCESS;
84 ATH_MSG_INFO(
"Processed " << m_ntot <<
" events, " << m_npass <<
" events passed filter ");
85 return StatusCode::SUCCESS;
92 bool acceptEvent(
true);
96 bool isTriggerFired(m_triggers.empty());
97 for(
unsigned int i(0);
i<m_triggers.size();
i++) {
98 if(m_trigDecisionTool->isPassed(m_triggers.at(
i))) {
99 isTriggerFired =
true;
105 std::vector<TLorentzVector> goodAllJets;
106 std::vector<TLorentzVector> goodCentralJets;
112 for(; jet_itr != jet_end; ++jet_itr) {
113 TLorentzVector jetP4 = getCalibedJets( (*jet_itr) );
114 if(this->checkAllJetQuality(jetP4)) { goodAllJets.push_back(jetP4); }
115 if(this->checkCentralJetQuality(jetP4)) { goodCentralJets.push_back(jetP4); }
120 for(
unsigned int jet_i = 0; jet_i<goodAllJets.size(); jet_i++) {
121 const TLorentzVector& iP4 = goodAllJets.at(jet_i);
123 for(
unsigned int jet_k=jet_i+1; jet_k<goodAllJets.size(); jet_k++) {
124 const TLorentzVector& kP4 = goodAllJets.at(jet_k);
126 const TLorentzVector jjP4 = iP4 + kP4;
127 const double jjM = jjP4.M();
129 if (maxM<jjM) {maxM=jjM;}
138 for (
const auto* ph : *phots){
139 if(abs(ph->eta())<m_centralPhEtaCut)
140 if(ph->pt()>maxPhPt) maxPhPt = ph->pt();
146 const bool passNAllJet = (goodAllJets.size()>=m_nAllJets);
147 const bool passNCentralJet = (goodCentralJets.size()>=m_nCentralJets);
148 const bool passMjjCut = (maxM>m_vbfMjjCut);
149 const bool passPhPtCut = (maxPhPt>m_phPtCut);
151 if (m_reqNAllJets) {
if (not passNAllJet) {acceptEvent=
false;} }
152 if (m_reqNCentralJets) {
if (not passNCentralJet) {acceptEvent=
false;} }
154 if (m_reqTrigger) {
if (not isTriggerFired) {acceptEvent=
false;} }
156 if(m_reqVbfMjj and not m_reqPh) {
if (not passMjjCut) {acceptEvent=
false;} }
157 if(m_reqPh and not m_reqVbfMjj) {
if (not passPhPtCut) {acceptEvent=
false;} }
158 if(m_reqPh and m_reqVbfMjj) {
if (not (passMjjCut or passPhPtCut) ) {acceptEvent=
false;} }
160 if (acceptEvent) {m_npass++;}
163 printf(
"dbg> L%3d : event accepted [%s] "
164 "(NJets=%2d [%6s], NCentralJets=%2d [%6s] Mjj=%10.1f [%6s], Trigger [%6s]) \n",
166 acceptEvent?
"Y" :
"N",
167 (
int)goodAllJets.size(), passNAllJet ?
"PASSED" :
"FAILED",
168 (
int)goodCentralJets.size(), passNCentralJet ?
"PASSED" :
"FAILED",
169 maxM, passMjjCut ?
"PASSED" :
"FAILED",
170 isTriggerFired ?
"PASSED" :
"FAILED"
179 if(
jet.Pt()<m_allJetPtCut)
return false;
180 if(fabs(
jet.Eta())>m_allJetEtaCut)
return false;
187 if(
jet.Pt()<m_centralJetPtCut)
return false;
188 if(fabs(
jet.Eta())>m_centralJetEtaCut)
return false;
204 const float&
pt =ptAcc(*
jet);
205 const float& eta=etaAcc(*
jet);
206 const float& phi=phiAcc(*
jet);
207 const float&
m =mAcc(*
jet);
209 rc.SetPtEtaPhiM(
pt, eta, phi,
m);