const JetCollection TopPairMuPlusJetsReferenceSelection2011::cleanedJets(const EventPtr event) const { const JetCollection jets(event->Jets()); JetCollection cleanedJets; if (!hasExactlyOneIsolatedLepton(event)) //if no signal lepton is found, can't clean jets, return them all! return jets; const LeptonPointer lepton(signalLepton(event)); for (unsigned int index = 0; index < jets.size(); ++index) { const JetPointer jet(jets.at(index)); if (!jet->isWithinDeltaR(0.3, lepton)) cleanedJets.push_back(jet); } return cleanedJets; }
bool HLTriggerQCDAnalyser::passesTriggerAnalysisSelection(const EventPtr event) const { const ElectronCollection electrons(event->Electrons()); const JetCollection jets(event->Jets()); if (electrons.size() == 0 || jets.size() < 3) return false; unsigned int nElectrons(0); for (unsigned int index = 0; index < electrons.size(); ++index) { const ElectronPointer electron(electrons.at(index)); if (fabs(electron->eta()) < 2.5 && electron->pt() > 20) ++nElectrons; //if more than 2 electrons passing the selection of > 20GeV, reject event } const ElectronPointer mostEnergeticElectron(electrons.front()); //clean jets against electron JetCollection cleanedJets; for (unsigned int index = 0; index < jets.size(); ++index) { const JetPointer jet(jets.at(index)); if (!jet->isWithinDeltaR(0.3, mostEnergeticElectron)) cleanedJets.push_back(jet); } unsigned int nCleanedJetsAbove30GeV(0), nCleanedJetsAbove45GeV(0); for (unsigned int index = 0; index < cleanedJets.size(); ++index) { const JetPointer jet(cleanedJets.at(index)); if (jet->pt() > 45.) ++nCleanedJetsAbove45GeV; if (jet->pt() > 30.) ++nCleanedJetsAbove30GeV; } return nElectrons == 1 && (nCleanedJetsAbove45GeV >= 3 || (nCleanedJetsAbove45GeV >= 2 && nCleanedJetsAbove30GeV >= 3 && event->runnumber() >= 194270)); }