6 #include "GaudiKernel/PhysicalConstants.h"
16 return (
t1->pt() >
t2->pt());
55 ATH_MSG_INFO(
"*** 1st and 2nd jets in opposite eta region (Nj>=2) ***");
74 return StatusCode::FAILURE;
83 return StatusCode::FAILURE;
87 return StatusCode::SUCCESS;
100 ATH_MSG_ERROR(
"No TruthParticle collection with name " <<
"TruthGen" <<
" found in StoreGate!");
101 return StatusCode::FAILURE;
105 std::vector<const xAOD::TruthParticle *> MCTruthPhotonList;
106 std::vector<const xAOD::TruthParticle *> MCTruthElectronList;
107 std::vector<CLHEP::HepLorentzVector> MCTruthTauList;
109 unsigned int nPart = xTruthParticleContainer->
size();
110 for (
unsigned int iPart = 0; iPart < nPart; ++iPart) {
116 MCTruthPhotonList.push_back(pitr);
123 MCTruthElectronList.push_back(pitr);
131 for (
size_t thisChild_id = 0; thisChild_id < tau->decayVtx()->nOutgoingParticles(); thisChild_id++)
134 if (child->prodVtx() != tau->decayVtx())
136 if (std::abs(child->pdgId()) == 12)
138 if (std::abs(child->pdgId()) == 14)
140 if (std::abs(child->pdgId()) == 15)
147 CLHEP::HepLorentzVector tauvis = CLHEP::HepLorentzVector(tau->px() - nutau.px(),
148 tau->py() - nutau.py(),
149 tau->pz() - nutau.pz(),
150 tau->e() - nutau.e());
151 if (tauvis.vect().perp() >=
m_LGMinPt && std::abs(tauvis.vect().pseudoRapidity()) <=
m_LGMaxEta)
153 MCTruthTauList.push_back(tauvis);
162 std::vector<const xAOD::Jet *> jetList;
167 jetList.push_back(*it_truth);
173 removePseudoJets(jetList, MCTruthPhotonList, MCTruthElectronList, MCTruthTauList);
180 flagNJets =
int(jetList.size()) >=
m_NJets ? 1 : 0;
187 if (jetList.size() >= 1)
202 if (jetList.size() >= 2)
217 if (jetList.size() >= 2)
221 if (
j1->eta() *
j2->eta() < 0.)
231 if (jetList.size() >= 2)
234 int okMassJJ =
m_MassJJ >= 0. ? 0 : 1;
235 for (
unsigned i = 0;
i < jetList.size() - 1; ++
i)
237 for (
unsigned j =
i + 1; j < jetList.size(); ++j)
239 double dEta = std::abs(jetList[
i]->
eta() - jetList[j]->
eta());
240 double Mjj = (jetList[
i]->p4() + jetList[j]->p4()).M();
244 if (okMassJJ == 0 && Mjj >
m_MassJJ)
246 if (okDeltaEtaJJ && okMassJJ)
269 setFilterPassed(flagNJets != 0 && flag1stJet != 0 && flag2ndJet != 0 && flagSign != 0 && flagJJ != 0);
270 return StatusCode::SUCCESS;
275 CLHEP::HepLorentzVector nu(0, 0, 0, 0);
277 if ((std::abs(
part->pdgId()) == 12) || (std::abs(
part->pdgId()) == 14) || (std::abs(
part->pdgId()) == 16))
279 nu.setPx(
part->px());
280 nu.setPy(
part->py());
281 nu.setPz(
part->pz());
286 if (!
part->decayVtx())
289 for (
size_t thisChild_id = 0; thisChild_id <
part->decayVtx()->nOutgoingParticles(); thisChild_id++)
291 auto daughterparticle =
part->decayVtx()->outgoingParticle(thisChild_id);
300 for (
unsigned i = 0;
i <
list.size(); ++
i)
304 double dphi =
jet->phi() -
list[
i]->phi();
305 double deta =
jet->eta() -
list[
i]->eta();
314 double dr = std::sqrt(deta * deta + dphi * dphi);
315 double ratio_pt = std::abs((
jet->pt() -
list[
i]->pt()) /
list[
i]->pt());
326 for (
unsigned i = 0;
i <
list.size(); ++
i)
330 double dphi =
jet->phi() -
list[
i].phi();
331 double deta =
jet->eta() -
list[
i].vect().pseudoRapidity();
340 double dr = std::sqrt(deta * deta + dphi * dphi);
341 double ratio_pt = std::abs((
jet->pt() -
list[
i].vect().perp()) /
list[
i].vect().perp());
350 std::vector<const xAOD::TruthParticle *> &MCTruthPhotonList,
351 std::vector<const xAOD::TruthParticle *> &MCTruthElectronList,
352 std::vector<CLHEP::HepLorentzVector> &MCTruthTauList)
354 std::vector<const xAOD::Jet *> orgJetList = jetList;
356 for (
unsigned i = 0;
i < orgJetList.size(); ++
i)
363 jetList.push_back(
jet);