bool TopPairEMuReferenceSelection::isGoodPhoton(const PhotonPointer photon, const EventPtr event) const { bool passesEtAndEta = photon->et() > 25 && fabs(photon->eta()) < 1.4442 && !photon->isInCrack(); bool passesSafeElectronVeto = photon->ConversionSafeElectronVeto(); bool passesHOverE = photon->SingleTowerHoE() < 0.05; // same for EE and EB // bool passesShowerShape = false; // bool passesPFChargedIso = false; bool passesPFNeutralIso = false; bool passesPFPhotonIso = false; bool passesphoSCChIso = false; // bool passesphoSCNuIso = false; // bool passesphoSCPhIso = false; if (photon->isInBarrelRegion()) { // passesShowerShape = photon->sigmaIEtaIEta() < 0.012; // passesPFChargedIso = photon->RhoCorrectedPFChargedHadronIso(event->rho()) < 2.6; passesPFNeutralIso = photon->RhoCorrectedPFNeutralHadronIso(event->rho()) < 7.5 + 0.04 * photon->pt(); //3.5 passesPFPhotonIso = photon->RhoCorrectedPFPhotonIso(event->rho()) < 5 + 0.005 * photon->pt(); //1.3 passesphoSCChIso = photon->RhoCorrectedSCChIso(event->rho()) < 5; // passesphoSCNuIso = photon->RhoCorrectedSCNuIso(event->rho()) < 3.5 + 0.04 * photon->pt(); // passesphoSCPhIso = photon->RhoCorrectedSCPhIso(event->rho()) < 1.3 + 0.005 * photon->pt(); } else if (photon->isInEndCapRegion()) { // passesShowerShape = photon->sigmaIEtaIEta() < 0.034; // passesPFChargedIso = photon->RhoCorrectedPFChargedHadronIso(event->rho()) < 2.3; passesPFNeutralIso = photon->RhoCorrectedPFNeutralHadronIso(event->rho()) < 2.9 + 0.04 * photon->pt(); passesPFPhotonIso = photon->RhoCorrectedPFPhotonIso(event->rho()) < 1.5 + 0.005 * photon->pt(); passesphoSCChIso = photon->RhoCorrectedSCChIso(event->rho()) < 2.3; // passesphoSCNuIso = photon->RhoCorrectedSCNuIso(event->rho()) < 2.9 + 0.04 * photon->pt(); // passesphoSCPhIso = photon->RhoCorrectedSCPhIso(event->rho()) < 1.5 + 0.005 * photon->pt(); } const ElectronCollection electrons(goodElectrons(event)); const MuonCollection muons(goodMuons(event)); const JetCollection jets(event->Jets());; bool passesDeltaRgammaMuons = false; for (unsigned int index = 0; index < muons.size(); ++index) { const MuonPointer muon(muons.at(index)); passesDeltaRgammaMuons = photon->deltaR(muon) > 0.3; if(photon->deltaR(muon) < 0.3) break; } bool passesDeltaRgammaElectrons = false; for (unsigned int index = 0; index < electrons.size(); ++index) { const ElectronPointer electron(electrons.at(index)); passesDeltaRgammaElectrons = photon->deltaR(electron) > 0.3; if(photon->deltaR(electron) < 0.3) break; } bool passesDeltaRgammaJets = false; for (unsigned int index = 0; index < jets.size(); ++index) { const JetPointer jet(jets.at(index)); passesDeltaRgammaJets = photon->deltaR(jet) > 0.3; } bool passesDeltaRjetsElectrons = false; for (unsigned int index = 0; index < electrons.size(); ++index) { const ElectronPointer electron(electrons.at(index)); for(unsigned int jindex = 0; jindex<jets.size(); ++jindex){ const JetPointer jet(jets[jindex]); passesDeltaRjetsElectrons = electron->deltaR(jet) > 0.3; } } bool passesDeltaRjetsMuons = false; for (unsigned int index = 0; index < muons.size(); ++index) { const MuonPointer muon(muons.at(index)); for(unsigned int jindex = 0; jindex<jets.size(); ++jindex){ const JetPointer jet(jets[jindex]); passesDeltaRjetsMuons = muon->deltaR(jet) > 0.3; } } return passesEtAndEta && passesSafeElectronVeto && passesHOverE /*&& passesShowerShape*/ && passesPFNeutralIso && passesPFPhotonIso && passesphoSCChIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRgammaJets && passesDeltaRjetsMuons && passesDeltaRjetsElectrons; }
void PhotonAnalyser::analyse(const EventPtr event){ histMan_->setCurrentHistogramFolder(histogramFolder_ + "/AllPhotons"); //const ElectronCollection electrons = topEERefSelection_->goodElectrons(event); //const MuonCollection muons = topMuMuRefSelection_->goodMuons(event); weight_ = event->weight() * prescale_ * scale_; const JetCollection jets = event->Jets(); const ElectronCollection electrons = event->Electrons(); const PhotonCollection photons = event->Photons(); const MuonCollection muons = event->Muons(); histMan_->H1D_BJetBinned("Number_Of_Photons")->Fill(photons.size(), weight_); for (unsigned int index = 0; index < photons.size(); ++index) { const PhotonPointer photon(photons.at(index)); histMan_->H1D_BJetBinned("Photon_Pt")->Fill(photon->pt(), weight_); histMan_->H1D_BJetBinned("Photon_Eta")->Fill(photon->eta(), weight_); histMan_->H1D_BJetBinned("Photon_AbsEta")->Fill(fabs(photon->eta()), weight_); histMan_->H1D_BJetBinned("Photon_Phi")->Fill(photon->phi(), weight_); histMan_->H1D_BJetBinned("Photon_ET")->Fill(photon->et(), weight_); if (photon->isInEndCapRegion()){ histMan_->H1D_BJetBinned("Photon_sigma_ietaieta_endcap")->Fill(photon->sigmaIEtaIEta(), weight_); histMan_->H1D_BJetBinned("Photon_PFChargedHadronIso_endcap")->Fill(photon->PFChargedHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_PFNeutralHadronIso_endcap")->Fill(photon->PFNeutralHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_PFPhotonIso_endcap")->Fill(photon->PFPhotonIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFChargedHadronIso_endcap")->Fill(photon->RhoCorrectedPFChargedHadronIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFNeutralHadronIso_endcap")->Fill(photon->RhoCorrectedPFNeutralHadronIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFPhotonIso_endcap")->Fill(photon->RhoCorrectedPFPhotonIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_SCChIso_endcap")->Fill(photon->phoSCChIso(), weight_); histMan_->H1D_BJetBinned("Photon_SCNuIso_endcap")->Fill(photon->phoSCNuIso(), weight_); histMan_->H1D_BJetBinned("Photon_SCPhIso_endcap")->Fill(photon->phoSCPhIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCChIso_endcap")->Fill(photon->RhoCorrectedSCChIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCNuIso_endcap")->Fill(photon->RhoCorrectedSCNuIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCPhIso_endcap")->Fill(photon->RhoCorrectedSCPhIso(event->rho()), weight_); histMan_->H2D_BJetBinned("RhoCorrectedSCFRChIso_v._Sigma_ietaieta_endcap")->Fill(photon->RhoCorrectedSCChIso(event->rho()), photon->sigmaIEtaIEta(), weight_); } else if (photon->isInBarrelRegion()) { histMan_->H1D_BJetBinned("Photon_sigma_ietaieta_barrel")->Fill(photon->sigmaIEtaIEta(), weight_); histMan_->H1D_BJetBinned("Photon_PFChargedHadronIso_barrel")->Fill(photon->PFChargedHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_PFNeutralHadronIso_barrel")->Fill(photon->PFNeutralHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_PFPhotonIso_barrel")->Fill(photon->PFPhotonIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFChargedHadronIso_barrel")->Fill(photon->RhoCorrectedPFChargedHadronIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFNeutralHadronIso_barrel")->Fill(photon->RhoCorrectedPFNeutralHadronIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFPhotonIso_barrel")->Fill(photon->RhoCorrectedPFPhotonIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_SCChIso_barrel")->Fill(photon->phoSCChIso(), weight_); histMan_->H1D_BJetBinned("Photon_SCNuIso_barrel")->Fill(photon->phoSCNuIso(), weight_); histMan_->H1D_BJetBinned("Photon_SCPhIso_barrel")->Fill(photon->phoSCPhIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCChIso_barrel")->Fill(photon->RhoCorrectedSCChIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCNuIso_barrel")->Fill(photon->RhoCorrectedSCNuIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCPhIso_barrel")->Fill(photon->RhoCorrectedSCPhIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RandConeChIso_barrel")->Fill(photon->phoRandConeChIso(), weight_); histMan_->H1D_BJetBinned("Photon_RandConeNuIso_barrel")->Fill(photon->phoRandConeNuIso(), weight_); histMan_->H1D_BJetBinned("Photon_RandConePhIso_barrel")->Fill(photon->phoRandConePhIso(), weight_); histMan_->H2D_BJetBinned("RhoCorrectedSCFRChIso_v._Sigma_ietaieta_barrel")->Fill(photon->RhoCorrectedSCChIso(event->rho()), photon->sigmaIEtaIEta(), weight_); } histMan_->H1D_BJetBinned("Photon_HadOverEM")->Fill(photon->HadOverEm(), weight_); histMan_->H1D_BJetBinned("Photon_EcalIso")->Fill(photon->ecalIsolation(), weight_); histMan_->H1D_BJetBinned("Photon_HcalIso")->Fill(photon->hcalIsolation(), weight_); histMan_->H1D_BJetBinned("Photon_HcalIso2012")->Fill(photon->hcalIsolation2012(), weight_); histMan_->H1D_BJetBinned("Photon_TrckIso")->Fill(photon->trackerIsolation(), weight_); histMan_->H1D_BJetBinned("Photon_SCeta")->Fill(photon->superClusterEta(), weight_); histMan_->H1D_BJetBinned("Photon_SCphi")->Fill(photon->superClusterPhi(), weight_); histMan_->H1D_BJetBinned("Photon_SCenergy")->Fill(photon->superClusterEnergy(), weight_); histMan_->H1D_BJetBinned("Photon_SCSeedEnergy")->Fill(photon->superClusterSeedEnergy(), weight_); histMan_->H1D_BJetBinned("Photon_E3x3")->Fill(photon->Ecal3x3Cluster(), weight_); histMan_->H1D_BJetBinned("Photon_E5x5")->Fill(photon->Ecal5x5Cluster(), weight_); histMan_->H1D_BJetBinned("Photon_TrkVeto")->Fill(photon->TrackVeto(), weight_); histMan_->H1D_BJetBinned("Photon_ConvSEVeto")->Fill(photon->ConversionSafeElectronVeto(), weight_); histMan_->H1D_BJetBinned("Photon_HtowoE")->Fill(photon->SingleTowerHoE(), weight_); histMan_->H1D_BJetBinned("Photon_PFChargedHadronIso")->Fill(photon->PFChargedHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_PFNeutralHadronIso")->Fill(photon->PFNeutralHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_PFPhotonIso")->Fill(photon->PFPhotonIso(), weight_); histMan_->H1D_BJetBinned("Photon_SCChIso")->Fill(photon->phoSCChIso(), weight_); histMan_->H1D_BJetBinned("Photon_SCNuIso")->Fill(photon->phoSCNuIso(), weight_); histMan_->H1D_BJetBinned("Photon_SCPhIso")->Fill(photon->phoSCPhIso(), weight_); histMan_->H1D_BJetBinned("Photon_RandConeChIso")->Fill(photon->phoRandConeChIso(), weight_); histMan_->H1D_BJetBinned("Photon_RandConeNuIso")->Fill(photon->phoRandConeNuIso(), weight_); histMan_->H1D_BJetBinned("Photon_RandConePhIso")->Fill(photon->phoRandConePhIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCChIso")->Fill(photon->RhoCorrectedSCChIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCNuIso")->Fill(photon->RhoCorrectedSCNuIso(event->rho()), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCPhIso")->Fill(photon->RhoCorrectedSCPhIso(event->rho()), weight_); histMan_->H2D_BJetBinned("RhoCorrectedSCFRChIso_v._Sigma_ietaieta")->Fill(photon->RhoCorrectedSCChIso(event->rho()), photon->sigmaIEtaIEta(), weight_); for (unsigned int index = 0; index < jets.size(); ++index) { const JetPointer jet(jets.at(index)); histMan_->H1D_BJetBinned("Photon_deltaR_jets")->Fill(photon->deltaR(jet), weight_); } for (unsigned int index = 0; index < electrons.size(); ++index) { const ElectronPointer electron(electrons.at(index)); histMan_->H1D_BJetBinned("Photon_deltaR_electrons")->Fill(photon->deltaR(electron), weight_); } for (unsigned int index = 0; index < muons.size(); ++index) { const MuonPointer muon(muons.at(index)); histMan_->H1D_BJetBinned("Photon_deltaR_muons")->Fill(photon->deltaR(muon), weight_); } } }
bool TopPairEMuReferenceSelection::isNminusOnePhoton(const PhotonPointer photon, const EventPtr event, TString cut) const { const ElectronCollection electrons(goodElectrons(event)); const MuonCollection muons(goodMuons(event)); const JetCollection jets(event->Jets()); bool passesEtAndEta = photon->et() > 25 && fabs(photon->eta()) < 2.5 && !photon->isInCrack(); bool passesSafeElectronVeto = photon->ConversionSafeElectronVeto(); bool passesHOverE = photon->SingleTowerHoE() < 0.05; // same for EE and EB bool passesShowerShape = false; // bool passesPFChargedIso = false; bool passesPFNeutralIso = false; bool passesPFPhotonIso = false; bool passesphoSCChIso = false; bool backgroundShape = false; if (photon->isInBarrelRegion()) { passesShowerShape = photon->sigmaIEtaIEta() < 0.012; // passesPFChargedIso = photon->RhoCorrectedPFChargedHadronIso(event->rho()) < 2.6; passesPFNeutralIso = photon->RhoCorrectedPFNeutralHadronIso(event->rho()) < 3.5 + 0.04 * photon->pt(); passesPFPhotonIso = photon->RhoCorrectedPFPhotonIso(event->rho()) < 1.3 + 0.005 * photon->pt(); passesphoSCChIso = photon->RhoCorrectedSCChIso(event->rho()) < 20; backgroundShape = photon->sigmaIEtaIEta() > 0.012 && photon->sigmaIEtaIEta() < 0.029; } else if (photon->isInEndCapRegion()) { passesShowerShape = photon->sigmaIEtaIEta() < 0.034; // passesPFChargedIso = photon->RhoCorrectedPFChargedHadronIso(event->rho()) < 2.3; passesPFNeutralIso = photon->RhoCorrectedPFNeutralHadronIso(event->rho()) < 2.9 + 0.04 * photon->pt(); passesPFPhotonIso = photon->RhoCorrectedPFPhotonIso(event->rho()) < 1.5 + 0.005 * photon->pt(); passesphoSCChIso = photon->RhoCorrectedSCChIso(event->rho()) < 20; backgroundShape = photon->sigmaIEtaIEta() > 0.012 && photon->sigmaIEtaIEta() < 0.029; } bool passesDeltaRgammaMuons = false; for (unsigned int index = 0; index < muons.size(); ++index) { const MuonPointer muon(muons.at(index)); passesDeltaRgammaMuons = photon->deltaR(muon) > 0.5; if(photon->deltaR(muon) < 0.5) break; } bool passesDeltaRgammaElectrons = false; for (unsigned int index = 0; index < electrons.size(); ++index) { const ElectronPointer electron(electrons.at(index)); passesDeltaRgammaElectrons = photon->deltaR(electron) > 0.7; if(photon->deltaR(electron) < 0.7) break; } bool passesDeltaRgammaJets = false; for (unsigned int index = 0; index < jets.size(); ++index) { const JetPointer jet(jets.at(index)); passesDeltaRgammaJets = photon->deltaR(jet) > 0.7; } bool passesDeltaRjetsElectrons = false; for (unsigned int index = 0; index < electrons.size(); ++index) { const ElectronPointer electron(electrons.at(index)); for(unsigned int jindex = 0; jindex<jets.size(); ++jindex){ const JetPointer jet(jets[jindex]); passesDeltaRjetsElectrons = electron->deltaR(jet) > 0.5; } } bool passesDeltaRjetsMuons = false; for (unsigned int index = 0; index < muons.size(); ++index) { const MuonPointer muon(muons.at(index)); for(unsigned int jindex = 0; jindex<jets.size(); ++jindex){ const JetPointer jet(jets[jindex]); passesDeltaRjetsMuons = muon->deltaR(jet) > 0.5; } } if(cut == "passesEtAndEta") return passesSafeElectronVeto && passesHOverE && passesShowerShape && passesPFNeutralIso && passesPFPhotonIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRgammaJets && passesDeltaRjetsMuons && passesDeltaRjetsElectrons && passesphoSCChIso; else if(cut == "passesHOverE") return passesEtAndEta && passesSafeElectronVeto && passesShowerShape && passesPFNeutralIso && passesPFPhotonIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRgammaJets && passesDeltaRjetsMuons && passesDeltaRjetsElectrons && passesphoSCChIso; else if(cut == "passesShowerShape") return passesEtAndEta && passesSafeElectronVeto && passesHOverE && passesPFNeutralIso && passesPFPhotonIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRgammaJets && passesDeltaRjetsMuons && passesDeltaRjetsElectrons && passesphoSCChIso; else if(cut == "passesPFNeutralIso") return passesEtAndEta && passesSafeElectronVeto && passesHOverE && passesShowerShape && passesPFPhotonIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRgammaJets && passesDeltaRjetsMuons && passesDeltaRjetsElectrons && passesphoSCChIso; else if(cut == "passesPFPhotonIso") return passesEtAndEta && passesSafeElectronVeto && passesHOverE && passesShowerShape && passesPFNeutralIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRgammaJets && passesDeltaRjetsMuons && passesDeltaRjetsElectrons && passesphoSCChIso; else if(cut == "passesphoSCChIso") return passesEtAndEta && passesSafeElectronVeto && passesHOverE && backgroundShape && passesPFNeutralIso && passesPFPhotonIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRgammaJets && passesDeltaRjetsMuons && passesDeltaRjetsElectrons; else if(cut == "passesDeltaRgammaMuons" && cut == "passesDeltaRgammaElectrons") return passesEtAndEta && passesSafeElectronVeto && passesHOverE && passesShowerShape && passesPFNeutralIso && passesPFPhotonIso && passesDeltaRgammaJets && passesDeltaRjetsMuons && passesDeltaRjetsElectrons && passesphoSCChIso; else if(cut == "passesDeltaRjetsElectrons" && cut == "passesDeltaRjetsMuons") return passesEtAndEta && passesSafeElectronVeto && passesHOverE && passesShowerShape && passesPFNeutralIso && passesPFPhotonIso && passesDeltaRgammaJets && passesDeltaRgammaMuons && passesDeltaRgammaElectrons && passesphoSCChIso; else if(cut == "passesDeltaRgammaJets") return passesEtAndEta && passesSafeElectronVeto && passesHOverE && passesShowerShape && passesPFNeutralIso && passesPFPhotonIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRjetsMuons && passesDeltaRjetsElectrons && passesphoSCChIso; else if(cut == "backgroundShape") return passesEtAndEta && passesSafeElectronVeto && passesHOverE && passesPFNeutralIso && passesPFPhotonIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRjetsMuons && passesDeltaRjetsElectrons && passesphoSCChIso && passesDeltaRgammaJets && backgroundShape; else return passesEtAndEta && passesSafeElectronVeto && passesHOverE && passesShowerShape && passesPFNeutralIso && passesPFPhotonIso && passesDeltaRgammaElectrons && passesDeltaRgammaMuons && passesDeltaRgammaJets && passesDeltaRjetsMuons && passesDeltaRjetsElectrons && passesphoSCChIso; }
void PhotonAnalyser::analyse_NminusOnePhotons(const EventPtr event, PhotonCollection nMinusOnePhotons, JetCollection jets, ElectronCollection electrons, MuonCollection muons, TString cut){ string folder = histogramFolder_ + "/NminusOnePhotons"; histMan_->setCurrentHistogramFolder(folder); //const ElectronCollection electrons = topMuMuRefSelection_->goodElectrons(event); //const MuonCollection muons = topMuMuRefSelection_->goodMuons(event); weight_ = event->weight() * prescale_ * scale_; // const JetCollection jets = event->Jets(); // const ElectronCollection electrons = event->Electrons(); // const MuonCollection muons = event->Muons(); // need to change to rhgo corrected? for (unsigned int index = 0; index < nMinusOnePhotons.size(); ++index) { const PhotonPointer photon(nMinusOnePhotons.at(index)); if(cut =="passesEtAndEta"){ histMan_->H1D_BJetBinned("Photon_Pt")->Fill(photon->pt(), weight_); histMan_->H1D_BJetBinned("Photon_Eta")->Fill(photon->eta(), weight_); histMan_->H1D_BJetBinned("Photon_AbsEta")->Fill(fabs(photon->eta()), weight_); histMan_->H1D_BJetBinned("Photon_ET")->Fill(photon->et(), weight_); } if(cut =="passesHOverE"){ histMan_->H1D_BJetBinned("Photon_HadOverEM")->Fill(photon->HadOverEm(), weight_); histMan_->H1D_BJetBinned("Photon_HtowoE")->Fill(photon->SingleTowerHoE(), weight_); } if (photon->isInEndCapRegion() && cut =="passesShowerShape"){ histMan_->H1D_BJetBinned("Photon_sigma_ietaieta")->Fill(photon->sigmaIEtaIEta(), weight_); histMan_->H1D_BJetBinned("Photon_sigma_ietaieta_endcap")->Fill(photon->sigmaIEtaIEta(), weight_); } if (photon->isInBarrelRegion() && cut =="passesShowerShape"){ histMan_->H1D_BJetBinned("Photon_sigma_ietaieta")->Fill(photon->sigmaIEtaIEta(), weight_); histMan_->H1D_BJetBinned("Photon_sigma_ietaieta_barrel")->Fill(photon->sigmaIEtaIEta(), weight_); } if (photon->isInEndCapRegion()){ histMan_->H1D_BJetBinned("Photon_PFChargedHadronIso_endcap")->Fill(photon->PFChargedHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFChargedHadronIso_endcap")->Fill(photon->RhoCorrectedPFChargedHadronIso(event->rho()), weight_); } if (photon->isInBarrelRegion()){ histMan_->H1D_BJetBinned("Photon_PFChargedHadronIso_barrel")->Fill(photon->PFChargedHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFChargedHadronIso_barrel")->Fill(photon->RhoCorrectedPFChargedHadronIso(event->rho()), weight_); } if (photon->isInEndCapRegion() && cut =="passesPFNeutralIso"){ histMan_->H1D_BJetBinned("Photon_PFNeutralHadronIso_endcap")->Fill(photon->PFNeutralHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFNeutralHadronIso_endcap")->Fill(photon->RhoCorrectedPFNeutralHadronIso(event->rho()), weight_); } if (photon->isInBarrelRegion() && cut =="passesPFNeutralIso"){ histMan_->H1D_BJetBinned("Photon_PFNeutralHadronIso_barrel")->Fill(photon->PFNeutralHadronIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFNeutralHadronIso_barrel")->Fill(photon->RhoCorrectedPFNeutralHadronIso(event->rho()), weight_); } if (photon->isInEndCapRegion() && cut =="passesPFPhotonIso"){ histMan_->H1D_BJetBinned("Photon_PFPhotonIso_endcap")->Fill(photon->PFPhotonIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFPhotonIso_endcap")->Fill(photon->RhoCorrectedPFPhotonIso(event->rho()), weight_); } if (photon->isInBarrelRegion() && cut =="passesPFPhotonIso"){ histMan_->H1D_BJetBinned("Photon_PFPhotonIso_barrel")->Fill(photon->PFPhotonIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedPFPhotonIso_barrel")->Fill(photon->RhoCorrectedPFPhotonIso(event->rho()), weight_); } if (photon->isInEndCapRegion() && cut =="passesphoSCChIso"){ histMan_->H1D_BJetBinned("Photon_SCChIso_endcap")->Fill(photon->phoSCChIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCChIso_endcap")->Fill(photon->RhoCorrectedSCChIso(event->rho()), weight_); } if (photon->isInBarrelRegion() && cut =="passesSCChIso"){ histMan_->H1D_BJetBinned("Photon_SCChIso_barrel")->Fill(photon->phoSCChIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCChIso_barrel")->Fill(photon->RhoCorrectedSCChIso(event->rho()), weight_); } if (photon->isInEndCapRegion() && cut =="passesphoSCNuIso"){ histMan_->H1D_BJetBinned("Photon_SCNuIso_endcap")->Fill(photon->phoSCNuIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCNuIso_endcap")->Fill(photon->RhoCorrectedSCNuIso(event->rho()), weight_); } if (photon->isInBarrelRegion() && cut =="passesSCNuIso"){ histMan_->H1D_BJetBinned("Photon_SCNuIso_barrel")->Fill(photon->phoSCNuIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCNuIso_barrel")->Fill(photon->RhoCorrectedSCNuIso(event->rho()), weight_); } if (photon->isInEndCapRegion() && cut =="passesphoSCPhIso"){ histMan_->H1D_BJetBinned("Photon_SCPhIso_endcap")->Fill(photon->phoSCPhIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCPhIso_endcap")->Fill(photon->RhoCorrectedSCPhIso(event->rho()), weight_); } if (photon->isInBarrelRegion() && cut =="passesSCPhIso"){ histMan_->H1D_BJetBinned("Photon_SCPhIso_barrel")->Fill(photon->phoSCPhIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCPhIso_barrel")->Fill(photon->RhoCorrectedSCPhIso(event->rho()), weight_); } if (cut =="passesphoSCChIso"){ histMan_->H1D_BJetBinned("Photon_SCChIso")->Fill(photon->phoSCChIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCChIso")->Fill(photon->RhoCorrectedSCChIso(event->rho()), weight_); } if (cut =="passesphoSCNuIso"){ histMan_->H1D_BJetBinned("Photon_SCNuIso")->Fill(photon->phoSCNuIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCNuIso")->Fill(photon->RhoCorrectedSCNuIso(event->rho()), weight_); } if (cut =="passesphoSCPhIso"){ histMan_->H1D_BJetBinned("Photon_SCPhIso")->Fill(photon->phoSCPhIso(), weight_); histMan_->H1D_BJetBinned("Photon_RhoCorrectedSCPhIso")->Fill(photon->RhoCorrectedSCPhIso(event->rho()), weight_); } if(cut =="passesDeltaRgammaMuons"){ for (unsigned int index = 0; index < muons.size(); ++index) { const MuonPointer muon(muons.at(index)); histMan_->H1D_BJetBinned("Photon_deltaR_muons")->Fill(photon->deltaR(muon), weight_); } } if(cut =="passesDeltaRgammaElectrons"){ for (unsigned int index = 0; index < electrons.size(); ++index) { const ElectronPointer electron(electrons.at(index)); histMan_->H1D_BJetBinned("Photon_deltaR_electrons")->Fill(photon->deltaR(electron), weight_); } } if(cut == "backgroundShape" && photon->isInBarrelRegion()){ histMan_->H1D_BJetBinned("Photon_sigma_ietaieta_barrel_background")->Fill(photon->sigmaIEtaIEta(), weight_); } if(cut == "backgroundShape" && photon->isInEndCapRegion()){ histMan_->H1D_BJetBinned("Photon_sigma_ietaieta_endcap_background")->Fill(photon->sigmaIEtaIEta(), weight_); } } }