Skip to content

Commit

Permalink
Make L1TNtuples compile
Browse files Browse the repository at this point in the history
  • Loading branch information
cerminar committed Jan 25, 2024
1 parent ab95828 commit 70ade3a
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 89 deletions.
110 changes: 55 additions & 55 deletions L1Trigger/L1TNtuples/src/L1AnalysisPhaseII.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,20 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEG(const edm::Handle<l1t::TkElectronCol
l1extra_.tkElectronEt.push_back(it->et());
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++;
}
}
Expand All @@ -227,19 +227,19 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEG(const edm::Handle<l1t::TkElectronCol
l1extra_.tkElectronEt.push_back(it->et());
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++;
}
}
Expand All @@ -255,20 +255,20 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEGV2(const edm::Handle<l1t::TkElectronC
l1extra_.tkElectronV2Et.push_back(it->et());
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++;
}
}
Expand All @@ -280,19 +280,19 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEGV2(const edm::Handle<l1t::TkElectronC
l1extra_.tkElectronV2Et.push_back(it->et());
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++;
}
}
Expand All @@ -311,15 +311,15 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEM(const edm::Handle<l1t::TkEmCollectio
l1extra_.tkPhotonTrkIso.push_back(it->trkIsol());
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++;
}
}
Expand All @@ -333,14 +333,14 @@ void L1Analysis::L1AnalysisPhaseII::SetTkEM(const edm::Handle<l1t::TkEmCollectio
l1extra_.tkPhotonTrkIso.push_back(it->trkIsol());
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++;
}
}
Expand Down Expand Up @@ -423,8 +423,8 @@ void L1Analysis::L1AnalysisPhaseII::SetTkMuon(const edm::Handle<l1t::TkMuonColle
l1extra_.tkMuonPt.push_back(it->pt());
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);
Expand Down
68 changes: 34 additions & 34 deletions L1Trigger/L1TNtuples/src/L1AnalysisPhaseIIStep1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,22 +170,22 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEG(const edm::Handle<l1t::TkElectr
l1extra_.tkElectronEt.push_back(it->et());
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++;
}
}
Expand All @@ -198,21 +198,21 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEG(const edm::Handle<l1t::TkElectr
l1extra_.tkElectronEt.push_back(it->et());
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++;
}
}
Expand All @@ -236,15 +236,15 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEM(const edm::Handle<l1t::TkEmColl
l1extra_.tkPhotonPuppiIso.push_back(it->puppiIsol());
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++;
}
}
Expand All @@ -263,14 +263,14 @@ void L1Analysis::L1AnalysisPhaseIIStep1::SetTkEM(const edm::Handle<l1t::TkEmColl
l1extra_.tkPhotonPuppiIso.push_back(it->puppiIsol());
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++;
}
}
Expand Down

0 comments on commit 70ade3a

Please sign in to comment.