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

Run2-alca99 Modify all macros used to calibrate Hcal using IsoTracks #20608

Merged
merged 4 commits into from Oct 4, 2017

Conversation

bsunanda
Copy link
Contributor

No description provided.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/PR-20608/856

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @bsunanda for master.

It involves the following packages:

Calibration/HcalCalibAlgos

@ghellwig, @arunhep, @cerminar, @cmsbuild, @franzoni, @lpernie can you please review it and eventually sign? Thanks.
@ghellwig, @mmusich, @tocheng this is something you requested to watch as well.
@davidlange6, @slava77 you are the release manager for this.

cms-bot commands are listed here

Copy link

@ghellwig ghellwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no major concerns, just address my minor comments

unsigned int correctDetId(unsigned int detId);

static const unsigned int nmax_=10;
bool debug_;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to make this const as this is known already at construction time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

unsigned int getDetId(int subdet, int ieta, int iphi, int depth);
unsigned int correctDetId(unsigned int detId);

static const unsigned int nmax_=10;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make this constexpr (although it likely doesn't matter much in a ROOT macro)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try constexpr in ROOT macro with cint - it does not work for 5.45

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not work for 5.26

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, if the macro has to cover several root versions, it's fine, but why do you use such an old version?
the default one is ROOT 6 in 94X


void CalibCorr::readCorr(const std::string& infile) {

std::ifstream fInput(infile.c_str());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please drop .c_str() as there is also a constructor taking directly the std::string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to work for ROOT 5.26 as well

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as above: why do you need it for ROOT 5.26?

unsigned int id_ = ((4<<28)|((subdet&0x7)<<25));
id_ |= ((0x1000000) | ((depth&0xF)<<20) |
((ieta>0)?(0x80000|(ieta<<10)):((-ieta)<<10)) |
(iphi&0x3FF));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these magic numbers documented somewhere?

ieta = ((detId >> 10) & 0x1FF);
zside = (detId&0x80000)?(1):(-1);
depth = ((detId >> 20) & 0xF);
iphi = (detId & 0x3FF);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

double fact0, fact1, fact2;
};

CalibTree(const char *dupFileName, std::string rcorFileName, bool flag,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use const std::string&


void Run(const char *inFileName, const char *dirName, const char *treeName,
const char *outFileName, const char *corrFileName,
const char *dupFileName, const std::string rcorFileName,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use const std::string&

CalibTree::~CalibTree() {
if (cFactor_) delete cFactor_;
if (!fChain) return;
delete fChain->GetCurrentFile();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

<< std::endl;
}

for (std::map<unsigned int,TH1D*>::iterator itr = histos.begin();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be a const_iterator, right?
or use auto together with cbegin()
applies also to iterators below

if (truncateFlag_) {
if ((subdet == 1) && (ieta > 14)) depth = 1;
}
id = (subdet<<25) | (0x1000000) | ((depth&0xF)<<20) | ((zside>0)?(0x80000|(ieta<<10)):(ieta<<10));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic numbers

@davidlange6
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/PR-20608/858

@cmsbuild
Copy link
Contributor

Pull request #20608 was updated. @ghellwig, @arunhep, @cerminar, @cmsbuild, @franzoni, @lpernie can you please check and sign again.

@davidlange6
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 20, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/23128/console Started: 2017/09/20 20:44

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2017

The code-checks are being triggered in jenkins.

@bsunanda
Copy link
Contributor Author

bsunanda commented Oct 3, 2017

@cmsbuild Please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2017

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/PR-20608/1123

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/23416/console Started: 2017/10/03 22:12

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2017

Pull request #20608 was updated. @ghellwig, @arunhep, @cerminar, @cmsbuild, @franzoni, @lpernie can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2017

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2017

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2017

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-20608/23416/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 26
  • DQMHistoTests: Total histograms compared: 2761357
  • DQMHistoTests: Total failures: 241
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2760929
  • DQMHistoTests: Total skipped: 187
  • DQMHistoTests: Total Missing objects: 0
  • Checked 107 log files, 10 edm output root files, 26 DQM output files

@ghellwig
Copy link

ghellwig commented Oct 4, 2017

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2017

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar (and backports should be raised in the release meeting by the corresponding L2)

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 024141f into cms-sw:master Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants