Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run3-alca200 Bug fix to 2 classes in Calibration/HcalCalibAlgos #35282

Merged
merged 1 commit into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions Calibration/HcalCalibAlgos/plugins/HOCalibAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,20 @@ class HOCalibAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
void analyze(const edm::Event&, const edm::EventSetup&) override;
void endJob() override {}

int getHOieta(int ij) { return (ij < netamx / 2) ? -netamx / 2 + ij : -netamx / 2 + ij + 1; }
int invert_HOieta(int ieta) { return (ieta < 0) ? netamx / 2 + ieta : netamx / 2 + ieta - 1; }

int mypow_2[31];
static const int netamx = 30;
static const int nphimx = 72;
static const int ringmx = 5;
static const int ncut = 14;
static constexpr int netamx = 30;
static constexpr int nphimx = 72;
static constexpr int ringmx = 5;
static constexpr int ncut = 14;

const char* varcrit[3] = {"All", "steps", "n-1"}; // or opposite

const double elosfact = (14.9 + 0.96 * fabs(log(8 * 2.8)) + 0.033 * 8 * (1.0 - pow(8, -0.33)));

int getHOieta(int ij) { return (ij < netamx / 2) ? -netamx / 2 + ij : -netamx / 2 + ij + 1; }
int invert_HOieta(int ieta) { return (ieta < 0) ? netamx / 2 + ieta : netamx / 2 + ieta - 1; }

int mypow_2[31];

bool m_cosmic;
bool m_zeroField;
int m_bins;
Expand Down
13 changes: 7 additions & 6 deletions Calibration/HcalCalibAlgos/plugins/HcalIsoTrkAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -937,9 +937,13 @@ std::array<int, 3> HcalIsoTrkAnalyzer::fillTree(std::vector<math::XYZTLorentzVec
trkDetItr++, nTracks++) {
const reco::Track* pTrack = &(*(trkDetItr->trkItr));
math::XYZTLorentzVector v4(pTrack->px(), pTrack->py(), pTrack->pz(), pTrack->p());
t_p = pTrack->p();
t_pt = pTrack->pt();
t_phi = pTrack->phi();

#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HcalIsoTrack") << "This track : " << nTracks << " (pt|eta|phi|p) :" << pTrack->pt() << "|"
<< pTrack->eta() << "|" << pTrack->phi() << "|" << pTrack->p();
edm::LogVerbatim("HcalIsoTrack") << "This track : " << nTracks << " (pt|eta|phi|p) :" << t_pt << "|"
<< pTrack->eta() << "|" << t_phi << "|" << t_p;
#endif
t_mindR2 = 999;
for (unsigned int k = 0; k < vecL3.size(); ++k) {
Expand All @@ -952,6 +956,7 @@ std::array<int, 3> HcalIsoTrkAnalyzer::fillTree(std::vector<math::XYZTLorentzVec
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HcalIsoTrack") << "Closest L3 object at dr :" << t_mindR2 << " and from L1 " << t_mindR1;
#endif

t_ieta = t_iphi = 0;
if (trkDetItr->okHCAL) {
HcalDetId detId = (HcalDetId)(trkDetItr->detIdHCAL);
Expand Down Expand Up @@ -1207,10 +1212,6 @@ std::array<int, 3> HcalIsoTrkAnalyzer::fillTree(std::vector<math::XYZTLorentzVec
}
storeEnergy(3, respCorrs, ids3, edet3, t_eHcal30, t_DetIds3, t_HitEnergies3);

t_p = pTrack->p();
t_pt = pTrack->pt();
t_phi = pTrack->phi();

#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HcalIsoTrack") << "This track : " << nTracks << " (pt|eta|phi|p) :" << t_pt << "|"
<< pTrack->eta() << "|" << t_phi << "|" << t_p << " Generator Level p "
Expand Down