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

HCAL LUT generation and validation #19864

Merged
merged 7 commits into from Aug 22, 2017

Conversation

akhukhun
Copy link
Contributor

The PR includes

  • code to generate current HCAL LUTs: i.e. 2017 input/compression LUTs and HF channel mask, adc threshold and tdc mask tables.
  • Simple Hcal LUT analyzer for validation
  • Increased precision for L1TriggerObject dumping that removes discrepancies due to rounding.

The changes will not affect TP emulation.

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

CalibCalorimetry/CaloTPG
CalibCalorimetry/HcalAlgos
CalibCalorimetry/HcalTPGAlgos
CaloOnlineTools/HcalOnlineDb

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

cms-bot commands are listed here

@rekovic
Copy link
Contributor

rekovic commented Jul 25, 2017

@akhukhun
cout is not thread safe. Please use LogInfo or similar.

const HcalLutMetadata *metadata = conditions->getHcalLutMetadata();
const HcalTopology *topo = metadata->topo();

std::auto_ptr<HcalL1TriggerObjects> HcalL1TrigObjCol(new HcalL1TriggerObjects);
Copy link
Contributor

Choose a reason for hiding this comment

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

auto_ptr is depricated in C++11. Please use unique_ptr

@@ -70,6 +70,7 @@ void CaloTPGTranscoderULUT::loadHCALCompress(HcalLutMetadata const& lutMetadata,
bool isHBHE = (abs(ieta) < theTrigTowerGeometry.firstHFTower(version));

unsigned int lutsize = getOutputLUTSize(id);
outputLUT_[index].resize(lutsize);

for (unsigned int i = 0; i < threshold; ++i)
Copy link
Contributor

Choose a reason for hiding this comment

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

please use range-based loop.

@@ -267,6 +268,8 @@ void HcaluLUTTPGCoder::update(const HcalDbService& conditions) {
float gain = 0;
uint32_t status = 0;

QIEType_[lutId]=conditions.getHcalQIEType(cell)->getValue();

if (LUTGenerationMode_){
const HcalCalibrations& calibrations = conditions.getHcalCalibrations(cell);
for (int capId = 0; capId < 4; ++capId){
Copy link
Contributor

Choose a reason for hiding this comment

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

use range-based loop

upgradeQIE11LUT_ ;
return lut.at(lutId);
}

void HcaluLUTTPGCoder::lookupMSB(const HBHEDataFrame& df, std::vector<bool>& msb) const{
msb.resize(df.size());
for (int i=0; i<df.size(); ++i)
Copy link
Contributor

Choose a reason for hiding this comment

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

use range-based loop.

int nzero[7];
int nreal[7];
int extra[7];
for(int i=0; i<7; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

use range-based loop

}
bool zero=true;
const std::vector<unsigned int>& lut2 = xml2->second;
for(size_t i=0; i<lut2.size(); ++i){
Copy link
Contributor

Choose a reason for hiding this comment

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

use range-based loop

else nreal[subdet]++;
}
cout << Form("%3s: %8s %8s %8s %8s", "Det", "total", "nonzeros", "zeroes", "extra") << endl;
for(int i=1; i<6; ++i) cout << Form("%3s: %8d %8d %8d %8d", DET[i], ntota[i], nreal[i], nzero[i], extra[i]) << endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

use range-based loop

cout << Form("%3s: %8s %8s %8s %8s", "Det", "total", "nonzeros", "zeroes", "extra") << endl;
for(int i=1; i<6; ++i) cout << Form("%3s: %8d %8d %8d %8d", DET[i], ntota[i], nreal[i], nzero[i], extra[i]) << endl;
cout << "--------------------------------------------" << endl;
for(int i=0; i<7; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

use range-based loop

Copy link
Contributor

Choose a reason for hiding this comment

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

and everywhere else in this file.

@@ -1550,6 +1643,11 @@ int HcalLutManager::createLutXmlFiles_HBEFFromCoder_HOFromAscii_ZDC( std::string
//
const std::map<int, boost::shared_ptr<LutXml> > _comp_lut_xml = getCompressionLutXmlFromCoder( _transcoder, _tag, split_by_crate );
addLutMap( xml, _comp_lut_xml );

for(int masktype=0; masktype<3; ++masktype){
Copy link
Contributor

Choose a reason for hiding this comment

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

use range-based loop

float gain = 0.0;
float ped = 0.0;

for (int i=0; i<4; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

use range-based loop

@franzoni
Copy link

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 25, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/21736/console Started: 2017/07/25 16:32

@cmsbuild
Copy link
Contributor

-1

Tested at: 959c308

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
939e204
You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19864/21736/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19864/21736/git-merge-result

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19864/21736/summary.html

I found follow errors while testing this PR

Failed tests: ClangBuild

  • Clang:

I found a compilation error while trying to compile with clang:
I used this command:
scram b vclean && scram build -k -j 16 USER_CXXFLAGS='-fsyntax-only' COMPILER='llvm compile'

Entering library rule at src/CalibCalorimetry/CaloTPG/plugins
Entering library rule at CaloOnlineTools/HcalOnlineDb
>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CalibCalorimetry/CaloTPG/plugins/CaloTPGTranscoderULUTs.cc 
>> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CaloOnlineTools/HcalOnlineDb/src/ZdcLut.cc 
In file included from /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CalibCalorimetry/HcalTPGAlgos/src/LutXml.cc:20:
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CalibCalorimetry/HcalTPGAlgos/interface/LutXml.h:86:99: error: 'auto' not allowed in function prototype
  XERCES_CPP_NAMESPACE::DOMElement * addData( std::string _elements, std::string _encoding, const auto& _lut );
                                                                                                  ^~~~
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_3_X_2017-07-25-1100/src/CalibCalorimetry/HcalTPGAlgos/src/LutXml.cc:157:83: error: 'auto' not allowed in function prototype
DOMElement * LutXml::addData( std::string _elements, std::string _encoding, const auto& _lut )
                                                                                  ^~~~


The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:
939e204
You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19864/21736/git-log-recent-commits
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-19864/21736/git-merge-result

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

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

Comparison Summary:

  • You potentially added 5 lines to the logs
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 23
  • DQMHistoTests: Total histograms compared: 2363781
  • DQMHistoTests: Total failures: 14627
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2348988
  • DQMHistoTests: Total skipped: 166
  • DQMHistoTests: Total Missing objects: 0
  • Checked 93 log files, 14 edm output root files, 23 DQM output files

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 3, 2017

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

@kpedro88
Copy link
Contributor

kpedro88 commented Aug 3, 2017

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 3, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/22050/console Started: 2017/08/03 16:05

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 3, 2017

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 3, 2017

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 3, 2017

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 25
  • DQMHistoTests: Total histograms compared: 2639325
  • DQMHistoTests: Total failures: 44406
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2594738
  • DQMHistoTests: Total skipped: 181
  • DQMHistoTests: Total Missing objects: 0
  • Checked 102 log files, 14 edm output root files, 25 DQM output files

@arunhep
Copy link
Contributor

arunhep commented Aug 8, 2017

+1

@ggovi
Copy link
Contributor

ggovi commented Aug 15, 2017

+1

@davidlange6
Copy link
Contributor

+1

@rekovic
Copy link
Contributor

rekovic commented Aug 22, 2017

+1

@cmsbuild
Copy link
Contributor

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 be automatically merged.

@cmsbuild cmsbuild merged commit 09041a6 into cms-sw:master Aug 22, 2017
@akhukhun akhukhun deleted the new-hcal-lut-generation branch February 22, 2018 09:36
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

10 participants