From 70ade3abe2b5fe62357b693c919392ad885d7eea Mon Sep 17 00:00:00 2001 From: Gianluca Date: Thu, 25 Jan 2024 10:00:19 +0100 Subject: [PATCH] Make L1TNtuples compile --- L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc | 110 +++++++++--------- .../L1TNtuples/src/L1AnalysisPhaseIIStep1.cc | 68 +++++------ 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc b/L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc index 18a4d89de1873..686594cdb2699 100644 --- a/L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc +++ b/L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc @@ -202,20 +202,20 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEG(const edm::Handleet()); l1extra_.tkElectronEta.push_back(it->eta()); l1extra_.tkElectronPhi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronChg.push_back(chargeFromCurvature); + // int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck + // l1extra_.tkElectronChg.push_back(chargeFromCurvature); l1extra_.tkElectronzVtx.push_back(it->trkzVtx()); l1extra_.tkElectronTrkIso.push_back(it->trkIsol()); - l1extra_.tkElectronHwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkElectronEGRefPt.push_back(it->EGRef()->et()); - l1extra_.tkElectronEGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkElectronEGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkElectronHwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkElectronEGRefPt.push_back(it->EGRef()->et()); + // l1extra_.tkElectronEGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkElectronEGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkElectronBx.push_back(0); //it->bx()); l1extra_.tkElectronHGC.push_back(0); - bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; // LooseTrackID should be the second bit - l1extra_.tkElectronPassesLooseTrackID.push_back(quality); - quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; // LooseTrackID should be the second bit - l1extra_.tkElectronPassesPhotonID.push_back(quality); + // bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; // LooseTrackID should be the second bit + // l1extra_.tkElectronPassesLooseTrackID.push_back(quality); + // quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; // LooseTrackID should be the second bit + // l1extra_.tkElectronPassesPhotonID.push_back(quality); l1extra_.nTkElectrons++; } } @@ -227,19 +227,19 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEG(const edm::Handleet()); l1extra_.tkElectronEta.push_back(it->eta()); l1extra_.tkElectronPhi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronChg.push_back(chargeFromCurvature); + // int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck + // l1extra_.tkElectronChg.push_back(chargeFromCurvature); l1extra_.tkElectronzVtx.push_back(it->trkzVtx()); l1extra_.tkElectronTrkIso.push_back(it->trkIsol()); - l1extra_.tkElectronHwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkElectronEGRefPt.push_back(it->EGRef()->et()); - l1extra_.tkElectronEGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkElectronEGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkElectronHwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkElectronEGRefPt.push_back(it->EGRef()->et()); + // l1extra_.tkElectronEGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkElectronEGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkElectronBx.push_back(0); //it->bx()); l1extra_.tkElectronHGC.push_back(1); - bool quality = (it->EGRef()->hwQual() == 5); - l1extra_.tkElectronPassesLooseTrackID.push_back(quality); - l1extra_.tkElectronPassesPhotonID.push_back(quality); + // bool quality = (it->EGRef()->hwQual() == 5); + // l1extra_.tkElectronPassesLooseTrackID.push_back(quality); + // l1extra_.tkElectronPassesPhotonID.push_back(quality); l1extra_.nTkElectrons++; } } @@ -255,20 +255,20 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEGV2(const edm::Handleet()); l1extra_.tkElectronV2Eta.push_back(it->eta()); l1extra_.tkElectronV2Phi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronV2Chg.push_back(chargeFromCurvature); + // int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck + // l1extra_.tkElectronV2Chg.push_back(chargeFromCurvature); l1extra_.tkElectronV2zVtx.push_back(it->trkzVtx()); l1extra_.tkElectronV2TrkIso.push_back(it->trkIsol()); - l1extra_.tkElectronV2HwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkElectronV2EGRefPt.push_back(it->EGRef()->et()); - l1extra_.tkElectronV2EGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkElectronV2EGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkElectronV2HwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkElectronV2EGRefPt.push_back(it->EGRef()->et()); + // l1extra_.tkElectronV2EGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkElectronV2EGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkElectronV2Bx.push_back(0); //it->bx()); l1extra_.tkElectronV2HGC.push_back(0); - bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; - l1extra_.tkElectronV2PassesLooseTrackID.push_back(quality); - quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; - l1extra_.tkElectronV2PassesPhotonID.push_back(quality); + // bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; + // l1extra_.tkElectronV2PassesLooseTrackID.push_back(quality); + // quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; + // l1extra_.tkElectronV2PassesPhotonID.push_back(quality); l1extra_.nTkElectronsV2++; } } @@ -280,19 +280,19 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEGV2(const edm::Handleet()); l1extra_.tkElectronV2Eta.push_back(it->eta()); l1extra_.tkElectronV2Phi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronV2Chg.push_back(chargeFromCurvature); + // int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck + // l1extra_.tkElectronV2Chg.push_back(chargeFromCurvature); l1extra_.tkElectronV2zVtx.push_back(it->trkzVtx()); l1extra_.tkElectronV2TrkIso.push_back(it->trkIsol()); - l1extra_.tkElectronV2HwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkElectronV2EGRefPt.push_back(it->EGRef()->et()); - l1extra_.tkElectronV2EGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkElectronV2EGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkElectronV2HwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkElectronV2EGRefPt.push_back(it->EGRef()->et()); + // l1extra_.tkElectronV2EGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkElectronV2EGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkElectronV2Bx.push_back(0); //it->bx()); l1extra_.tkElectronV2HGC.push_back(1); - bool quality = (it->EGRef()->hwQual() == 5); - l1extra_.tkElectronV2PassesLooseTrackID.push_back(quality); - l1extra_.tkElectronV2PassesPhotonID.push_back(quality); + // bool quality = (it->EGRef()->hwQual() == 5); + // l1extra_.tkElectronV2PassesLooseTrackID.push_back(quality); + // l1extra_.tkElectronV2PassesPhotonID.push_back(quality); l1extra_.nTkElectronsV2++; } } @@ -311,15 +311,15 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEM(const edm::HandletrkIsol()); l1extra_.tkPhotonTrkIsoPV.push_back(it->trkIsolPV()); l1extra_.tkPhotonBx.push_back(0); //it->bx()); - l1extra_.tkPhotonHwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkPhotonEGRefPt.push_back(it->EGRef()->et()); - l1extra_.tkPhotonEGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkPhotonEGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkPhotonHwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkPhotonEGRefPt.push_back(it->EGRef()->et()); + // l1extra_.tkPhotonEGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkPhotonEGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkPhotonHGC.push_back(0); - bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; - l1extra_.tkPhotonPassesLooseTrackID.push_back(quality); - quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; // Photon Id should be the third bit - l1extra_.tkPhotonPassesPhotonID.push_back(quality); + // bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; + // l1extra_.tkPhotonPassesLooseTrackID.push_back(quality); + // quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; // Photon Id should be the third bit + // l1extra_.tkPhotonPassesPhotonID.push_back(quality); l1extra_.nTkPhotons++; } } @@ -333,14 +333,14 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEM(const edm::HandletrkIsol()); l1extra_.tkPhotonTrkIsoPV.push_back(it->trkIsolPV()); l1extra_.tkPhotonBx.push_back(0); //it->bx()); - l1extra_.tkPhotonHwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkPhotonEGRefPt.push_back(it->EGRef()->et()); - l1extra_.tkPhotonEGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkPhotonEGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkPhotonHwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkPhotonEGRefPt.push_back(it->EGRef()->et()); + // l1extra_.tkPhotonEGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkPhotonEGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkPhotonHGC.push_back(1); - bool quality = (it->EGRef()->hwQual() == 5); - l1extra_.tkPhotonPassesLooseTrackID.push_back(quality); - l1extra_.tkPhotonPassesPhotonID.push_back(quality); + // bool quality = (it->EGRef()->hwQual() == 5); + // l1extra_.tkPhotonPassesLooseTrackID.push_back(quality); + // l1extra_.tkPhotonPassesPhotonID.push_back(quality); l1extra_.nTkPhotons++; } } @@ -423,8 +423,8 @@ void L1Analysis::L1AnalysisPhaseII::SetTkMuon(const edm::Handlept()); l1extra_.tkMuonEta.push_back(it->eta()); l1extra_.tkMuonPhi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkMuonChg.push_back(chargeFromCurvature); + // int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck + // l1extra_.tkMuonChg.push_back(chargeFromCurvature); l1extra_.tkMuonTrkIso.push_back(it->trkIsol()); if (it->muonDetector() != 3) { l1extra_.tkMuonMuRefPt.push_back(it->muRef()->hwPt() * 0.5); diff --git a/L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc b/L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc index 0611575b68ad0..ac224e4808e3f 100644 --- a/L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc +++ b/L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc @@ -170,22 +170,22 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEG(const edm::Handleet()); l1extra_.tkElectronEta.push_back(it->eta()); l1extra_.tkElectronPhi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronChg.push_back(chargeFromCurvature); + // int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck + // l1extra_.tkElectronChg.push_back(chargeFromCurvature); l1extra_.tkElectronzVtx.push_back(it->trkzVtx()); l1extra_.tkElectronTrkIso.push_back(it->trkIsol()); l1extra_.tkElectronPfIso.push_back(it->pfIsol()); l1extra_.tkElectronPuppiIso.push_back(it->puppiIsol()); - l1extra_.tkElectronHwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkElectronEGRefPt.push_back(it->EGRef()->et()); //Rename this? - l1extra_.tkElectronEGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkElectronEGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkElectronHwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkElectronEGRefPt.push_back(it->EGRef()->et()); //Rename this? + // l1extra_.tkElectronEGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkElectronEGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkElectronBx.push_back(0); //it->bx()); l1extra_.tkElectronHGC.push_back(0); - bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; // LooseTrackID should be the second bit - l1extra_.tkElectronPassesLooseTrackID.push_back(quality); - quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; // LooseTrackID should be the second bit - l1extra_.tkElectronPassesPhotonID.push_back(quality); + // bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; // LooseTrackID should be the second bit + // l1extra_.tkElectronPassesLooseTrackID.push_back(quality); + // quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; // LooseTrackID should be the second bit + // l1extra_.tkElectronPassesPhotonID.push_back(quality); l1extra_.nTkElectrons++; } } @@ -198,21 +198,21 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEG(const edm::Handleet()); l1extra_.tkElectronEta.push_back(it->eta()); l1extra_.tkElectronPhi.push_back(it->phi()); - int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck - l1extra_.tkElectronChg.push_back(chargeFromCurvature); + // int chargeFromCurvature = (it->trackCurvature() > 0) ? 1 : -1; // ThisIsACheck + // l1extra_.tkElectronChg.push_back(chargeFromCurvature); l1extra_.tkElectronzVtx.push_back(it->trkzVtx()); l1extra_.tkElectronTrkIso.push_back(it->trkIsol()); l1extra_.tkElectronPfIso.push_back(it->pfIsol()); l1extra_.tkElectronPuppiIso.push_back(it->puppiIsol()); - l1extra_.tkElectronHwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkElectronEGRefPt.push_back(it->EGRef()->et()); //Rename this? - l1extra_.tkElectronEGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkElectronEGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkElectronHwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkElectronEGRefPt.push_back(it->EGRef()->et()); //Rename this? + // l1extra_.tkElectronEGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkElectronEGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkElectronBx.push_back(0); //it->bx()); l1extra_.tkElectronHGC.push_back(1); - bool quality = (it->EGRef()->hwQual() == 3); - l1extra_.tkElectronPassesLooseTrackID.push_back(quality); - l1extra_.tkElectronPassesPhotonID.push_back(quality); + // bool quality = (it->EGRef()->hwQual() == 3); + // l1extra_.tkElectronPassesLooseTrackID.push_back(quality); + // l1extra_.tkElectronPassesPhotonID.push_back(quality); l1extra_.nTkElectrons++; } } @@ -236,15 +236,15 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEM(const edm::HandlepuppiIsol()); l1extra_.tkPhotonPuppiIsoPV.push_back(it->puppiIsolPV()); l1extra_.tkPhotonBx.push_back(0); //it->bx()); - l1extra_.tkPhotonHwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkPhotonEGRefPt.push_back(it->EGRef()->et()); //REname this? - l1extra_.tkPhotonEGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkPhotonEGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkPhotonHwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkPhotonEGRefPt.push_back(it->EGRef()->et()); //REname this? + // l1extra_.tkPhotonEGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkPhotonEGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkPhotonHGC.push_back(0); - bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; - l1extra_.tkPhotonPassesLooseTrackID.push_back(quality); - quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; // Photon Id should be the third bit - l1extra_.tkPhotonPassesPhotonID.push_back(quality); + // bool quality = ((it->EGRef()->hwQual() >> 1) & 1) > 0; + // l1extra_.tkPhotonPassesLooseTrackID.push_back(quality); + // quality = ((it->EGRef()->hwQual() >> 2) & 1) > 0; // Photon Id should be the third bit + // l1extra_.tkPhotonPassesPhotonID.push_back(quality); l1extra_.nTkPhotons++; } } @@ -263,14 +263,14 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEM(const edm::HandlepuppiIsol()); l1extra_.tkPhotonPuppiIsoPV.push_back(it->puppiIsolPV()); l1extra_.tkPhotonBx.push_back(0); //it->bx()); - l1extra_.tkPhotonHwQual.push_back(it->EGRef()->hwQual()); - l1extra_.tkPhotonEGRefPt.push_back(it->EGRef()->et()); //rename this? - l1extra_.tkPhotonEGRefEta.push_back(it->EGRef()->eta()); - l1extra_.tkPhotonEGRefPhi.push_back(it->EGRef()->phi()); + // l1extra_.tkPhotonHwQual.push_back(it->EGRef()->hwQual()); + // l1extra_.tkPhotonEGRefPt.push_back(it->EGRef()->et()); //rename this? + // l1extra_.tkPhotonEGRefEta.push_back(it->EGRef()->eta()); + // l1extra_.tkPhotonEGRefPhi.push_back(it->EGRef()->phi()); l1extra_.tkPhotonHGC.push_back(1); - bool quality = (it->EGRef()->hwQual() == 3); - l1extra_.tkPhotonPassesLooseTrackID.push_back(quality); - l1extra_.tkPhotonPassesPhotonID.push_back(quality); + // bool quality = (it->EGRef()->hwQual() == 3); + // l1extra_.tkPhotonPassesLooseTrackID.push_back(quality); + // l1extra_.tkPhotonPassesPhotonID.push_back(quality); l1extra_.nTkPhotons++; } }