bool TopPairMuPlusJetsReferenceSelection2011::isGoodJet(const JetPointer jet) const {
	bool passesPtAndEta = jet->pt() > 20 && fabs(jet->eta()) < 2.4;
	bool passesJetID(false);
	JetAlgorithm::value algo = jet->getUsedAlgorithm();
	if (algo == JetAlgorithm::CA08PF || algo == JetAlgorithm::PF2PAT) { //PFJet
		bool passNOD = jet->NOD() > 1;
		bool passNHF = jet->NHF() < 0.99;
		bool passNEF = jet->NEF() < 0.99;
		bool passCHF = jet->CEF() < 0.99;
		bool passNCH = true;
		bool passCEF = true;
		if (fabs(jet->eta()) < 2.4) {
			passCHF = jet->CHF() > 0;
			passNCH = jet->NCH() > 0;
		}
		passesJetID = passNOD && passCEF && passNHF && passNEF && passCHF && passNCH;
		;
	} else { //assume CaloJet
		bool passesEMF = jet->emf() > 0.01;
		bool passesN90Hits = jet->n90Hits() > 1;
		bool passesFHPD = jet->fHPD() < 0.98;
		passesJetID = passesEMF && passesN90Hits && passesFHPD;
	}
	return passesPtAndEta && passesJetID;

}
Пример #2
0
bool TopPairEMuReferenceSelection::isGoodJet(const JetPointer jet) const {

	/**
	 * This function tests the jet ID and eta (and pt) range for jet
	 * The cut of 20 GeV is actually obsolete since we only store jets above that threshold.
	 * However, the jet id is only valid for jets above it.
	 */

	bool passesPtAndEta = jet->pt() > 20 && fabs(jet->eta()) < 2.5;
	bool passesJetID(false);
	JetAlgorithm::value algo = jet->getUsedAlgorithm();
	if (algo == JetAlgorithm::CA08PF || algo == JetAlgorithm::PF2PAT) { //PFJet
		bool passNOD = jet->NOD() > 1;
		bool passNHF = jet->NHF() < 0.99;
		bool passNEF = jet->NEF() < 0.99;
		bool passCHF = true;
		bool passNCH = true;
		bool passCEF = true;
		if (fabs(jet->eta()) < 2.4) {
			passCEF = jet->CEF() < 0.99;
			passCHF = jet->CHF() > 0;
			passNCH = jet->NCH() > 0;
		}
		passesJetID = passNOD && passCEF && passNHF && passNEF && passCHF && passNCH;

	} else { //assume CaloJet
		bool passesEMF = jet->emf() > 0.01;
		bool passesN90Hits = jet->n90Hits() > 1;
		bool passesFHPD = jet->fHPD() < 0.98;
		passesJetID = passesEMF && passesN90Hits && passesFHPD;
	}
	return passesPtAndEta && passesJetID;

}
extern void printJet(const JetPointer jet) {
	printParticle(jet);
	cout << "Jet Information" << endl;
	cout << setw(30) << "JECUnc" << endl;
	cout << setw(30) << jet->JECUnc() << endl;
	cout << setw(30) << "ptRaw" << setw(30) << "pxRaw" << setw(30) << "pyRaw" << setw(30) << "pzRaw" << endl;
	cout << setw(30) << sqrt(jet->PxRaw() * jet->PxRaw() + jet->PyRaw() * jet->PyRaw()) << setw(30) << jet->PxRaw()
			<< setw(30) << jet->PyRaw() << setw(30) << jet->PzRaw() << endl;
	cout << setw(30) << "L1OffJEC" << setw(30) << "L2L3ResJEC" << setw(30) << "L2RelJEC" << setw(30) << "L3AbsJEC" << endl;
	cout << setw(30) << jet->L1OffJEC() << setw(30) << jet->L2L3ResJEC() << setw(30) << jet->L2RelJEC() << setw(30) << jet->L3AbsJEC()  << endl;;

	cout << setw(30) << "emf" << setw(30) << "n90Hits" << setw(30) << "fHPD" << setw(30) << "B tag(SSV)" << endl;
	cout << setw(30) << jet->emf() << setw(30) << jet->n90Hits() << setw(30) << jet->fHPD() << setw(30)
			<< jet->isBJet(BtagAlgorithm::CombinedSecondaryVertexV2, BtagAlgorithm::MEDIUM) << endl << endl;
	if (jet->getUsedAlgorithm() == JetAlgorithm::CA08PF || jet->getUsedAlgorithm() == JetAlgorithm::PF2PAT) {
		printPFJetExtra(jet);
	}
}