cmssw: In `PixelBaryCentreAnalyzer`, `SiPixelQuality` is not updated when changing run
When adding in Alignment/OfflineValidation/plugins/PixelBaryCentreAnalyzer.cc:L302 the following:
std::cout << usePixelQuality_ << '\t' << run_ << '\t' << badPixelInfo->BadModuleNumber() << std::endl;
Running with a run range:
$ cmsRun PixelBaryCentreAnalyzer_cfg.py firstRun=345747 lastRun=345863
Begin processing the 1st record. Run 345747, Event 1, LumiSection 1 on stream 0 at 21-Jul-2022 13:24:20.614 CEST
1 345747 66
0 345747 66
1 345863 66
0 345863 66
...
but with only one run:
$ cmsRun PixelBaryCentreAnalyzer_cfg.py firstRun=345863 lastRun=345863
1 345863 68
0 345863 68
...
So it seems that the SiPixelQuality
object returned from EventSetup::getData()
is not updated.
Note that you may have to make SiPixelQuality::BadModuleNumber() const.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 30 (30 by maintainers)
If the code is just fetching EventSetup data and not doing any expensive calculation each time it changes, it is best just to get the data in the Event each time. The retrieval of data from the EventSetup is very efficient.
the call is done at
analyze
:https://github.com/cms-sw/cmssw/blob/d7e416cc8b5654e29c68d406d6aecd52a80561e9/Alignment/OfflineValidation/plugins/PixelBaryCentreAnalyzer.cc#L218
so the
esConsumes
statement is correct. IF one wants to watch for LS it should be done in thebeginLuminosityBlock
transition (this analyzer doesn’t have the method). Also it would beg the question of which LS to take since the analysis is done per run.