483 edm::LogWarning(
"TauValidationMiniAOD") <<
" Tau collection not found while running TauValidationMiniAOD.cc ";
496 std::cerr <<
"ERROR: Reference collection not found while running TauValidationMiniAOD.cc \n " << std::endl;
504 edm::LogWarning(
"TauValidationMiniAOD") <<
" PV collection not found while running TauValidationMiniAOD.cc ";
506 std::vector<const reco::GenParticle *> GenTaus;
509 for (refCandidateCollection::const_iterator RefJet = ReferenceCollection->begin();
510 RefJet != ReferenceCollection->end();
513 int matchedTauIndex = -99;
514 float gendRmin = 0.15;
515 int genmatchedTauIndex = -99;
518 for (
unsigned iTau = 0; iTau <
taus->size(); iTau++) {
521 float dR =
deltaR2(
tau->eta(),
tau->phi(), RefJet->eta(), RefJet->phi());
524 matchedTauIndex = iTau;
531 ptMap.find(
"")->second->Fill(matchedTau->pt());
532 etaMap.find(
"")->second->Fill(matchedTau->eta());
533 phiMap.find(
"")->second->Fill(matchedTau->phi());
534 massMap.find(
"")->second->Fill(matchedTau->mass());
535 puMap.find(
"")->second->Fill(pvHandle->size());
536 decayModeMap.find(
"pftau")->second->Fill(matchedTau->decayMode());
539 if (matchedTau->isTauIDAvailable(
"decayModeFindingNewDMs"))
541 if (matchedTau->isTauIDAvailable(
"byDeepTau2018v2p5VSeraw"))
543 if (matchedTau->isTauIDAvailable(
"byDeepTau2018v2p5VSjetraw"))
545 if (matchedTau->isTauIDAvailable(
"byDeepTau2018v2p5VSmuraw"))
549 if (matchedTau->decayMode() == 0) {
550 mtau_dm0Map.find(
"")->second->Fill(matchedTau->mass());
551 pTOverProng_dm0Map.find(
"")->second->Fill(matchedTau->pt(), matchedTau->ptLeadChargedCand());
552 }
else if (matchedTau->decayMode() == 1 || matchedTau->decayMode() == 2) {
555 }
else if (matchedTau->decayMode() == 5) {
556 mtau_dm5Map.find(
"")->second->Fill(matchedTau->mass());
557 pTOverProng_dm5Map.find(
"")->second->Fill(matchedTau->pt(), matchedTau->ptLeadChargedCand());
558 }
else if (matchedTau->decayMode() == 6) {
559 mtau_dm6Map.find(
"")->second->Fill(matchedTau->mass());
560 pTOverProng_dm6Map.find(
"")->second->Fill(matchedTau->pt(), matchedTau->ptLeadChargedCand());
561 }
else if (matchedTau->decayMode() == 10) {
562 mtau_dm10Map.find(
"")->second->Fill(matchedTau->mass());
563 pTOverProng_dm10Map.find(
"")->second->Fill(matchedTau->pt(), matchedTau->ptLeadChargedCand());
564 }
else if (matchedTau->decayMode() == 11) {
565 mtau_dm11Map.find(
"")->second->Fill(matchedTau->mass());
566 pTOverProng_dm11Map.find(
"")->second->Fill(matchedTau->pt(), matchedTau->ptLeadChargedCand());
574 unsigned genindex = 0;
576 if (
abs(genParticle.pdgId()) == 15) {
577 float gendR =
deltaR2(matchedTau->eta(), matchedTau->phi(), genParticle.eta(), genParticle.phi());
578 if (gendR < gendRmin) {
580 genmatchedTauIndex = genindex;
583 genindex = genindex + 1;
586 if (gendRmin < 0.15) {
590 for (
unsigned idtr = 0; idtr < gentau.numberOfDaughters(); idtr++) {
593 int dtrstatus = dtr->
status();
594 if (dtrpdgID == 12 || dtrpdgID == 14 || dtrpdgID == 16)
596 if (dtrpdgID == 111 || dtrpdgID == 311)
598 else if (dtrpdgID == 211 || dtrpdgID == 321)
600 else if (dtrpdgID == 15 && dtrstatus == 2 ) {
604 if (dtr2pdgID == 12 || dtr2pdgID == 14 || dtr2pdgID == 16)
606 if (dtr2pdgID == 111 || dtr2pdgID == 311)
608 else if (dtr2pdgID == 211 || dtr2pdgID == 321)
615 dmMigrationMap.find(
"")->second->Fill(genTau_dm, matchedTau->decayMode());
621 string currentDiscriminator = it.getParameter<
string>(
"discriminator");
622 double selectionCut = it.getParameter<
double>(
"selectionCut");
624 if (matchedTau->tauID(currentDiscriminator) >=
selectionCut)
634 if (matchedTau->tauID(
"byTightDeepTau2018v2p5VSjet") >= 0.5) {
642 if (matchedTau->tauID(
"byMediumDeepTau2018v2p5VSjet") >= 0.5) {
650 if (matchedTau->tauID(
"byLooseDeepTau2018v2p5VSjet") >= 0.5) {
662 if (matchedTau->tauID(
"byTightDeepTau2018v2p5VSe") >= 0.5) {
670 if (matchedTau->tauID(
"byMediumDeepTau2018v2p5VSe") >= 0.5) {
678 if (matchedTau->tauID(
"byLooseDeepTau2018v2p5VSe") >= 0.5) {
690 if (matchedTau->tauID(
"byTightDeepTau2018v2p5VSmu") >= 0.5) {
698 if (matchedTau->tauID(
"byMediumDeepTau2018v2p5VSmu") >= 0.5) {
706 if (matchedTau->tauID(
"byLooseDeepTau2018v2p5VSmu") >= 0.5) {
std::map< std::string, MonitorElement * > massLoosevsJetMap
std::map< std::string, MonitorElement * > puLoosevsMuoMap
std::map< std::string, MonitorElement * > massMediumvsEleMap
std::map< std::string, MonitorElement * > phiTightvsMuoMap
std::map< std::string, MonitorElement * > massTightvsMuoMap
std::map< std::string, MonitorElement * > decayModeMap
std::map< std::string, MonitorElement * > puTightvsEleMap
std::map< std::string, MonitorElement * > ptTightvsJetMap
std::map< std::string, MonitorElement * > puMediumvsEleMap
std::map< std::string, MonitorElement * > massTightvsEleMap
edm::EDGetTokenT< std::vector< reco::Vertex > > primaryVertexCollectionToken_
std::string extensionName_
std::map< std::string, MonitorElement * > etaMediumvsJetMap
std::map< std::string, MonitorElement * > massLoosevsMuoMap
std::map< std::string, MonitorElement * > ntau_vs_dmMap
std::map< std::string, MonitorElement * > puTightvsMuoMap
std::map< std::string, MonitorElement * > mtau_dm11Map
tuple isPV
JSON lumifiles checks.
std::map< std::string, MonitorElement * > phiTightvsJetMap
std::map< std::string, MonitorElement * > etaMap
std::map< std::string, MonitorElement * > ptMediumvsJetMap
size_t numberOfDaughters() const override
number of daughters
std::map< std::string, MonitorElement * > etaTightvsMuoMap
int status() const final
status word
std::map< std::string, MonitorElement * > decayModeFindingMap
std::map< std::string, MonitorElement * > puLoosevsEleMap
std::map< std::string, MonitorElement * > phiTightvsEleMap
std::map< std::string, MonitorElement * > pTOverProng_dm1p2Map
int pdgId() const final
PDG identifier.
std::map< std::string, MonitorElement * > ptMediumvsMuoMap
std::map< std::string, MonitorElement * > pTOverProng_dm11Map
std::map< std::string, MonitorElement * > massTightvsJetMap
std::map< std::string, MonitorElement * > ptLoosevsMuoMap
std::map< std::string, MonitorElement * > puMediumvsMuoMap
std::map< std::string, MonitorElement * > puMap
std::map< std::string, MonitorElement * > phiMap
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< std::vector< pat::Tau > > tauCollection_
std::map< std::string, MonitorElement * > massMediumvsJetMap
std::map< std::string, MonitorElement * > etaTightvsJetMap
std::map< std::string, MonitorElement * > summaryMap
edm::EDGetTokenT< std::vector< reco::GenParticle > > prunedGenToken_
std::map< std::string, MonitorElement * > mtau_dm5Map
std::map< std::string, MonitorElement * > pTOverProng_dm10Map
std::map< std::string, MonitorElement * > phiLoosevsJetMap
std::map< std::string, MonitorElement * > ptLoosevsJetMap
std::map< std::string, MonitorElement * > etaLoosevsJetMap
std::map< std::string, MonitorElement * > massMediumvsMuoMap
std::map< std::string, MonitorElement * > puLoosevsJetMap
std::map< std::string, MonitorElement * > mtau_dm6Map
std::map< std::string, MonitorElement * > ptLoosevsEleMap
std::map< std::string, MonitorElement * > byDeepTau2018v2p5VSmurawMap
std::map< std::string, MonitorElement * > ptMediumvsEleMap
std::map< std::string, MonitorElement * > puTightvsJetMap
std::map< std::string, MonitorElement * > pTOverProng_dm0Map
int findDecayMode(int Nc, int Np)
std::vector< edm::ParameterSet > discriminators_
std::map< std::string, MonitorElement * > massLoosevsEleMap
std::map< std::string, MonitorElement * > etaLoosevsEleMap
std::map< std::string, MonitorElement * > phiLoosevsEleMap
std::map< std::string, MonitorElement * > etaMediumvsEleMap
std::map< std::string, MonitorElement * > ptTightvsEleMap
std::map< std::string, MonitorElement * > phiLoosevsMuoMap
std::map< std::string, MonitorElement * > dmMigrationMap
std::map< std::string, MonitorElement * > etaLoosevsMuoMap
std::map< std::string, MonitorElement * > phiMediumvsEleMap
std::map< std::string, MonitorElement * > pTOverProng_dm6Map
edm::EDGetTokenT< edm::View< reco::Candidate > > refCollectionInputTagToken_
std::map< std::string, MonitorElement * > mtau_dm0Map
std::map< std::string, MonitorElement * > puMediumvsJetMap
std::map< std::string, MonitorElement * > mtau_dm1p2Map
std::map< std::string, MonitorElement * > byDeepTau2018v2p5VSjetrawMap
std::map< std::string, MonitorElement * > massMap
Log< level::Warning, false > LogWarning
std::map< std::string, MonitorElement * > ptTightvsMuoMap
std::map< std::string, MonitorElement * > mtau_dm10Map
std::map< std::string, MonitorElement * > pTOverProng_dm5Map
std::map< std::string, MonitorElement * > etaTightvsEleMap
std::map< std::string, MonitorElement * > ptMap
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
std::map< std::string, MonitorElement * > phiMediumvsMuoMap
std::map< std::string, MonitorElement * > byDeepTau2018v2p5VSerawMap
bool isTau(const Candidate &part)
std::map< std::string, MonitorElement * > etaMediumvsMuoMap
std::map< std::string, MonitorElement * > phiMediumvsJetMap