Add ECAL Phase 2 digis and TP digis validation - #51400
Conversation
|
cms-bot internal usage |
|
type ecal |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51400/50065
|
|
A new Pull Request was created by @thomreis for master. It involves the following packages:
@BenjaminRS, @civanch, @cmsbuild, @ctarricone, @gabrielmscampos, @kpedro88, @mdhildreth, @quinnanm, @rseidita can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
please test |
|
+1 Size: This PR adds an extra 32KB to repository Comparison SummarySummary:
|
|
+simulation |
| void EcalDigisValidationPh2::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) { | ||
| Char_t histo[200]; | ||
|
|
||
| ibooker.setCurrentFolder("EcalDigisV/EcalDigiTask"); | ||
|
|
||
| sprintf(histo, "EcalDigiTask Gun Momentum"); | ||
| meGunEnergy_ = ibooker.book1D(histo, histo, 100, 0., 1000.); | ||
|
|
||
| sprintf(histo, "EcalDigiTask Gun Eta"); | ||
| meGunEta_ = ibooker.book1D(histo, histo, 700, -3.5, 3.5); | ||
|
|
||
| sprintf(histo, "EcalDigiTask Gun Phi"); | ||
| meGunPhi_ = ibooker.book1D(histo, histo, 360, 0., 360.); | ||
|
|
||
| sprintf(histo, "EcalDigiTask maximum Digi over Sim ratio"); | ||
| meDigiSimRatio_ = ibooker.book1D(histo, histo, 100, 0., 2.); | ||
|
|
||
| sprintf(histo, "EcalDigiTask maximum Digi over Sim ratio gt 10 ADC"); | ||
| meDigiSimRatiogt10ADC_ = ibooker.book1D(histo, histo, 100, 0., 2.); | ||
|
|
||
| sprintf(histo, "EcalDigiTask maximum Digi over Sim ratio gt 100 ADC"); | ||
| meDigiSimRatiogt100ADC_ = ibooker.book1D(histo, histo, 100, 0., 2.); | ||
|
|
||
| sprintf(histo, "EcalDigiTask occupancy"); | ||
| meDigiOccupancy_ = ibooker.book2D(histo, histo, 360, 0., 360., 170, -85., 85.); | ||
|
|
||
| sprintf(histo, "EcalDigiTask digis multiplicity"); | ||
| meDigiMultiplicity_ = ibooker.book1D(histo, histo, 612, 0., 61200); | ||
|
|
||
| sprintf(histo, "EcalDigiTask global pulse shape"); | ||
| meDigiADCGlobal_ = ibooker.bookProfile(histo, histo, kMaxSamples_, 0, kMaxSamples_, 10000, 0., 1000.); | ||
|
|
||
| for (int i = 0; i < kMaxSamples_; ++i) { | ||
| sprintf(histo, "EcalDigiTask analog pulse %02d", i + 1); | ||
| meDigiADCAnalog_[i] = ibooker.book1D(histo, histo, 4000, 0., 400.); | ||
|
|
||
| sprintf(histo, "EcalDigiTask ADC pulse %02d Gain 10", i + 1); | ||
| meDigiADCg10_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5); | ||
|
|
||
| sprintf(histo, "EcalDigiTask ADC pulse %02d Gain 1", i + 1); | ||
| meDigiADCg1_[i] = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5); | ||
|
|
||
| sprintf(histo, "EcalDigiTask gain pulse %02d", i + 1); | ||
| meDigiGain_[i] = ibooker.book1D(histo, histo, 2, 0, 2); | ||
| } | ||
|
|
||
| sprintf(histo, "EcalDigiTask pedestal for pre-sample"); | ||
| mePedestal_ = ibooker.book1D(histo, histo, 4096, -0.5, 4095.5); | ||
|
|
||
| sprintf(histo, "EcalDigiTask maximum position gt 10 ADC"); | ||
| meMaximumgt10ADC_ = ibooker.book1D(histo, histo, kMaxSamples_, 0., static_cast<double>(kMaxSamples_)); | ||
|
|
||
| sprintf(histo, "EcalDigiTask maximum position gt 100 ADC"); | ||
| meMaximumgt100ADC_ = ibooker.book1D(histo, histo, kMaxSamples_, 0., static_cast<double>(kMaxSamples_)); | ||
|
|
||
| sprintf(histo, "EcalDigiTask ADC counts after gain switch"); | ||
| menADCafterSwitch_ = ibooker.book1D(histo, histo, kMaxSamples_, 0., static_cast<double>(kMaxSamples_)); | ||
| } |
There was a problem hiding this comment.
Please, use std::string instead of a fixed sized buffer + sprintf. For the loop you can use std::format to concatenate an std::string with the counter.
| meDigiADCGlobal_->Fill(sample, ebAnalogSignal[sample]); | ||
| } | ||
|
|
||
| if (ebSimMap[ebid.rawId()] != 0.) { |
There was a problem hiding this comment.
std::map::operator[] will silently create a key:value (with value 0.0f) pair in ebSimMap if ebid.rawId() is not found in the map. The initial filling of ebSimMap comes from looping over barrelHits (line 214), and here ebid.rawId() comes from looping over digis. You may consider the use of std::map:find(), to avoid filling ebSimMap silently.
| #include <map> | ||
|
|
||
| class EcalDigisValidationPh2 : public DQMEDAnalyzer { | ||
| typedef std::map<uint32_t, float, std::less<uint32_t> > MapType; |
There was a problem hiding this comment.
std::less<uint32_t> is already the default comparison object, you can remove it.
| void EcalTPsValidationPh2::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) { | ||
| Char_t histo[200]; | ||
|
|
||
| ibooker.setCurrentFolder("EcalDigisV/EcalTriggerPrimitivesTask"); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP digis multiplicity"); | ||
| meTPDigisMultiplicity_ = ibooker.book1D(histo, histo, 613, 0, 61300); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP digi occupancy"); | ||
| meTPDigiOccupancy_ = ibooker.book2D(histo, histo, 360, 0., 360., 170, -85., 85.); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP digi size"); | ||
| meTPDigiSize_ = ibooker.book1D(histo, histo, kMaxSamples_, 0, kMaxSamples_); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP digi encoded ET"); | ||
| meTPDigiEt_ = ibooker.book1D(histo, histo, 1025, -1, 1024); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP digi spike flag"); | ||
| meTPDigiSpike_ = ibooker.book1D(histo, histo, 2, 0, 2); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP digi time"); | ||
| meTPDigiTime_ = ibooker.book1D(histo, histo, 33, -1, 32); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP digi debug flag"); | ||
| meTPDigiDebugFlag_ = ibooker.book1D(histo, histo, 2, 0, 2); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP digi sample of interest"); | ||
| meTPDigiSOI_ = ibooker.book1D(histo, histo, kMaxSamples_ + 1, -1, kMaxSamples_); | ||
|
|
||
| for (unsigned int i = 0; i < kMaxSamples_; ++i) { | ||
| sprintf(histo, "EcalTPDigiTask TP sample %02d encoded ET", i); | ||
| meTPSampleEt_[i] = ibooker.book1D(histo, histo, 1024, 0, 1024); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP sample %02d spike flag", i); | ||
| meTPSampleSpike_[i] = ibooker.book1D(histo, histo, 2, 0, 2); | ||
|
|
||
| sprintf(histo, "EcalTPDigiTask TP sample %02d time", i); | ||
| meTPSampleTime_[i] = ibooker.book1D(histo, histo, 32, 0, 32); | ||
| } | ||
| } |
There was a problem hiding this comment.
same here for std::string, forgot to comment before (sorry!)
|
please test |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-51400/50118
|
|
Pull request #51400 was updated. @BenjaminRS, @ctarricone, @gabrielmscampos, @quinnanm, @rseidita can you please check and sign again. |
|
+1 Size: This PR adds an extra 28KB to repository Comparison SummarySummary:
|
|
Hi @gabrielmscampos can you please sign this again? |
|
+dqm |
|
+l1 |
|
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. @mandrenguyen, @sextonkennedy, @ftenchini (and backports should be raised in the release meeting by the corresponding L2) |
|
+1 |
PR description:
This PR adds validation histograms for the ECAL Phase 2 digis and TP digis. The validation is activated with the eras
phase2_ecal_develandphase2_ecalTP_devel, respectively.PR validation:
Tested with the ECAL Phase 2 developments workflows 34434.612, 34634.612, 34634.61299. The newly added histograms appear in the DQM ROOT file and are filled.