1128 using namespace edm;
1133 LogInfo(
"ZToMuMuGammaAnalyzer") <<
"ZToMuMuGammaAnalyzer Analyzing event number: " << e.
id() <<
" Global Counter "
1137 bool validTriggerEvent =
true;
1141 if (!triggerEventHandle.isValid()) {
1142 edm::LogInfo(
"PhotonAnalyzer") <<
"Error! Can't get the product: triggerEvent_token_" << endl;
1143 validTriggerEvent =
false;
1145 if (validTriggerEvent)
1146 triggerEvent = *(triggerEventHandle.product());
1153 if (!photonHandle.isValid()) {
1154 edm::LogInfo(
"ZToMuMuGammaAnalyzer") <<
"Error! Can't get the product: photon_token_" << endl;
1162 if (!pfCandidateHandle.isValid()) {
1163 edm::LogError(
"PhotonValidator") <<
"Error! Can't get the product pfCandidates " << std::endl;
1168 if (
fName_ ==
"zmumugammaGedValidation") {
1171 if (!phoToParticleBasedIsoMapHandle.isValid()) {
1172 edm::LogInfo(
"PhotonValidator") <<
"Error! Can't get the product: valueMap photons to particle based iso "
1175 phoToParticleBasedIsoMap = *(phoToParticleBasedIsoMapHandle.product());
1179 bool validMuons =
true;
1183 if (!muonHandle.isValid()) {
1184 edm::LogInfo(
"ZToMuMuGammaAnalyzer") <<
"Error! Can't get the product: muon_token_" << endl;
1188 muonCollection = *(muonHandle.product());
1193 if (!bsHandle.isValid()) {
1194 edm::LogError(
"TrackerOnlyConversionProducer") <<
"Error! Can't get the product primary Vertex Collection "
1202 for (
uint filterIndex = 0; filterIndex < triggerEvent.sizeFilters();
1204 string label = triggerEvent.filterTag(filterIndex).label();
1205 if (label.find(
"Photon") != string::npos) {
1206 for (
uint filterKeyIndex = 0; filterKeyIndex < triggerEvent.filterKeys(filterIndex).size();
1209 triggerEvent.filterKeys(filterIndex)[filterKeyIndex]);
1218 if (
i != (
Keys.size() - 1)) {
1239 if (muonCollection.size() < 2)
1242 for (reco::MuonCollection::const_iterator iMu = muonCollection.begin(); iMu != muonCollection.end(); iMu++) {
1246 for (reco::MuonCollection::const_iterator iMu2 = iMu + 1; iMu2 != muonCollection.end(); iMu2++) {
1249 if (iMu->charge() * iMu2->charge() > 0)
1261 if (photonHandle->empty())
1266 for (
unsigned int iPho = 0; iPho < photonHandle->size(); iPho++) {
1269 double dr1 =
deltaR2((*iMu).eta(), aPho->eta(), (*iMu).phi(), aPho->phi());
1270 double dr2 =
deltaR2((*iMu2).eta(), aPho->eta(), (*iMu2).phi(), aPho->phi());
1301 if (aPho->isEB() || aPho->isEE()) {
1318 h_phoSigmaEoverE_[0]->
Fill(aPho->getCorrectedEnergyError(aPho->getCandidateP4type()) / aPho->energy());
1321 h_phoSigmaEoverE_[iDet]->
Fill(aPho->getCorrectedEnergyError(aPho->getCandidateP4type()) / aPho->energy());
1323 aPho->getCorrectedEnergyError(aPho->getCandidateP4type()) / aPho->energy());
1385 if (
fName_ ==
"zmumugammaGedValidation") {
1386 float SumPtIsoValCh = 0.;
1387 float SumPtIsoValNh = 0.;
1388 float SumPtIsoValPh = 0.;
1390 float SumPtIsoValCleanCh = 0.;
1391 float SumPtIsoValCleanNh = 0.;
1392 float SumPtIsoValCleanPh = 0.;
1394 for (
unsigned int lCand = 0; lCand < pfCandidateHandle->size(); lCand++) {
1396 float dR =
deltaR2(aPho->eta(), aPho->phi(), pfCandRef->eta(), pfCandRef->phi());
1397 if (dR < 0.4 * 0.4) {
1407 SumPtIsoValCh += pfCandRef->pt();
1412 SumPtIsoValNh += pfCandRef->pt();
1417 SumPtIsoValPh += pfCandRef->pt();
1423 for (std::vector<reco::PFCandidateRef>::const_iterator
i = phoToParticleBasedIsoMap[aPho].
begin();
1424 i != phoToParticleBasedIsoMap[aPho].end();
1427 if ((*
i) == pfCandRef) {
1435 SumPtIsoValCleanCh += pfCandRef->pt();
1440 SumPtIsoValCleanNh += pfCandRef->pt();
1445 SumPtIsoValCleanPh += pfCandRef->pt();
MonitorElement * h_dRPhoPFcand_Pho_unCleaned_[3]
MonitorElement * p_hOverEVsEta_[3]
MonitorElement * h_pfMva_[3]
MonitorElement * h_SumPtOverPhoPt_ChHad_unCleaned_[3]
MonitorElement * h_dRPhoPFcand_Pho_Cleaned_[3]
MonitorElement * h2_nTrackIsolSolidVsEt_[3]
ParticleType
particle types
MonitorElement * p_sigmaIetaIetaVsEta_[3]
MonitorElement * p_r1x5VsEta_[3]
float sumPt
sum-pt of tracks
bool muonSelection(const reco::Muon &m, const reco::BeamSpot &bs)
MonitorElement * h_phoSigmaIetaIeta_[3]
double pt() const final
transverse momentum
The single EDProduct to be saved for each event (AOD case)
MonitorElement * h2_r2x5VsEta_[3]
MonitorElement * h_newhOverE_[3]
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
MonitorElement * h2_trackPtSumHollowVsEt_[3]
MonitorElement * h_SumPtOverPhoPt_NeuHad_unCleaned_[3]
edm::EDGetTokenT< std::vector< reco::Photon > > photon_token_
MonitorElement * p_nTrackIsolHollowVsEta_[3]
MonitorElement * h2_r9VsEt_[3]
MonitorElement * h_nCluOutsideMustache_[3]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * h2_ecalSumVsEt_[3]
MonitorElement * h_nTrackIsolSolid_[3]
MonitorElement * h_SumPtOverPhoPt_Pho_Cleaned_[3]
MonitorElement * h_trackPtSumHollow_[3]
MonitorElement * h2_nTrackIsolSolidVsEta_[3]
MonitorElement * p_ecalSumVsEt_[3]
MonitorElement * h_phoEta_[3]
MonitorElement * h_nPho_[3]
MonitorElement * h_chHadIso_[3]
MonitorElement * h_phoSigmaEoverE_[3]
MonitorElement * h_dRPhoPFcand_NeuHad_Cleaned_[3]
MonitorElement * h_r1x5_[3]
MonitorElement * p_phoSigmaEoverEVsNVtx_[3]
MonitorElement * h2_sigmaIetaIetaVsEta_[3]
MonitorElement * h_dRPhoPFcand_NeuHad_unCleaned_[3]
MonitorElement * h2_hcalSumVsEt_[3]
MonitorElement * h_hcalSum_[3]
MonitorElement * h_phoPhi_[3]
unsigned int prescaleFactor_
MonitorElement * p_trackPtSumHollowVsEt_[3]
Log< level::Error, false > LogError
MonitorElement * h2_ecalSumVsEta_[3]
edm::EDGetTokenT< trigger::TriggerEvent > triggerEvent_token_
std::vector< Muon > MuonCollection
collection of Muon objects
MonitorElement * h_hOverE_[3]
MonitorElement * h_trackPtSumSolid_[3]
MonitorElement * p_hcalSumVsEt_[3]
MonitorElement * p_e1x5VsEt_[3]
MonitorElement * h2_r2x5VsEt_[3]
MonitorElement * h_h1OverE_[3]
MonitorElement * h_SumPtOverPhoPt_ChHad_Cleaned_[3]
MonitorElement * h2_e1x5VsEta_[3]
MonitorElement * h1_mumuGammaInvMass_[3]
MonitorElement * h2_trackPtSumSolidVsEt_[3]
MonitorElement * h_phoE_[3]
MonitorElement * p_r2x5VsEta_[3]
MonitorElement * h_nRecoVtx_
MonitorElement * p_e2x5VsEt_[3]
MonitorElement * p_hcalSumVsEta_[3]
float mumuInvMass(const reco::Muon &m1, const reco::Muon &m2)
float mumuGammaInvMass(const reco::Muon &mu1, const reco::Muon &mu2, const reco::PhotonRef &pho)
MonitorElement * h_phoEt_[3]
MonitorElement * p_ecalSumVsEta_[3]
MonitorElement * p_r9VsEta_[3]
MonitorElement * h_nHadIso_[3]
edm::EDGetTokenT< reco::VertexCollection > offline_pvToken_
MonitorElement * p_trackPtSumSolidVsEta_[3]
MonitorElement * h1_mumuInvMass_[3]
photon histos
Log< level::Info, false > LogInfo
MonitorElement * h2_trackPtSumSolidVsEta_[3]
MonitorElement * h2_hcalSumVsEta_[3]
MonitorElement * h_dRPhoPFcand_ChHad_unCleaned_[3]
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
bool photonSelection(const reco::PhotonRef &p)
MonitorElement * h_scPhi_[3]
MonitorElement * h2_e1x5VsEt_[3]
MonitorElement * h_scEta_[3]
edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonIsoValmap_token_
std::vector< size_type > Keys
std::vector< Photon > PhotonCollection
collectin of Photon objects
MonitorElement * h_nTrackIsolHollow_[3]
MonitorElement * p_r2x5VsEt_[3]
MonitorElement * h_SumPtOverPhoPt_Pho_unCleaned_[3]
MonitorElement * h_SumPtOverPhoPt_NeuHad_Cleaned_[3]
MonitorElement * h_etOutsideMustache_[3]
MonitorElement * h_e1x5_[3]
MonitorElement * h2_nTrackIsolHollowVsEt_[3]
MonitorElement * h2_nTrackIsolHollowVsEta_[3]
edm::EDGetTokenT< reco::BeamSpot > beamSpot_token_
MonitorElement * h2_e2x5VsEta_[3]
MonitorElement * h2_trackPtSumHollowVsEta_[3]
MonitorElement * h_r9_[3]
MonitorElement * p_r1x5VsEt_[3]
MonitorElement * p_nTrackIsolHollowVsEt_[3]
MonitorElement * p_r9VsEt_[3]
bool basicMuonSelection(const reco::Muon &m)
MonitorElement * p_trackPtSumSolidVsEt_[3]
MonitorElement * p_e2x5VsEta_[3]
MonitorElement * h_e2x5_[3]
MonitorElement * h2_r1x5VsEta_[3]
MonitorElement * p_trackPtSumHollowVsEta_[3]
float maxMumuGammaInvMass_
MonitorElement * h_dRPhoPFcand_ChHad_Cleaned_[3]
MonitorElement * p_hOverEVsEt_[3]
MonitorElement * h2_r1x5VsEt_[3]
MonitorElement * p_nTrackIsolSolidVsEt_[3]
MonitorElement * p_e1x5VsEta_[3]
MonitorElement * p_nTrackIsolSolidVsEta_[3]
MonitorElement * h2_r9VsEta_[3]
const MuonIsolation & isolationR03() const
edm::EDGetTokenT< std::vector< reco::Muon > > muon_token_
MonitorElement * h_ecalSum_[3]
MonitorElement * h_phoIso_[3]
MonitorElement * h_h2OverE_[3]
MonitorElement * h_r2x5_[3]
MonitorElement * h2_e2x5VsEt_[3]