Skip to content

Commit

Permalink
Merge pull request #35282 from bsunanda/Run3-alca200
Browse files Browse the repository at this point in the history
Run3-alca200 Bug fix to 2 classes in Calibration/HcalCalibAlgos
  • Loading branch information
cmsbuild authored Sep 15, 2021
2 parents 19ce7e0 + 96bd131 commit 0967201
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
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

0 comments on commit 0967201

Please sign in to comment.