Skip to content

Commit c83ecb1

Browse files
authored
Merge pull request #47939 from bsunanda/Run3-sim163
Run3-sim163 Equip the digi study with a few diagnostic statements
2 parents 699c67e + d831f8e commit c83ecb1

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

Validation/EcalDigis/test/EcalDigiStudy.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/*
23
* \file EcalDigiStudy.h
34
*
@@ -267,6 +268,7 @@ void EcalDigiStudy::analyze(edm::Event const& e, edm::EventSetup const& c) {
267268
pedestalPreSample /= 3.;
268269
pedestalPreSampleAnalog /= 3.;
269270

271+
#ifdef EDM_ML_DEBUG
270272
if (verbose_) {
271273
edm::LogVerbatim("EcalDigiStudy")
272274
<< "Barrel Digi for EBDetId = " << ebid.rawId() << " eta,phi " << ebid.ieta() << " " << ebid.iphi();
@@ -278,6 +280,7 @@ void EcalDigiStudy::analyze(edm::Event const& e, edm::EventSetup const& c) {
278280
if (countsAfterGainSwitch > 0)
279281
edm::LogVerbatim("EcalDigiStudy") << "Counts after switch " << countsAfterGainSwitch;
280282
}
283+
#endif
281284
if (countsAfterGainSwitch > 0 && countsAfterGainSwitch < 5) {
282285
edm::LogWarning("EcalDigiStudy") << "Wrong number of counts after gain switch before next switch! "
283286
<< countsAfterGainSwitch;
@@ -391,6 +394,7 @@ void EcalDigiStudy::analyze(edm::Event const& e, edm::EventSetup const& c) {
391394
pedestalPreSample /= 3.;
392395
pedestalPreSampleAnalog /= 3.;
393396

397+
#ifdef EDM_ML_DEBUG
394398
edm::LogVerbatim("EcalDigiStudy") << "Endcap Digi for EEDetId = " << eeid.rawId() << " x,y " << eeid.ix() << " "
395399
<< eeid.iy();
396400
for (int i = 0; i < 10; i++)
@@ -400,7 +404,7 @@ void EcalDigiStudy::analyze(edm::Event const& e, edm::EventSetup const& c) {
400404
<< " Pedestal from pre-sample = " << pedestalPreSampleAnalog;
401405
if (countsAfterGainSwitch > 0)
402406
edm::LogVerbatim("EcalDigiStudy") << "Counts after switch " << countsAfterGainSwitch;
403-
407+
#endif
404408
if (countsAfterGainSwitch > 0 && countsAfterGainSwitch < 5) {
405409
edm::LogWarning("EcalDigiStudy") << "Wrong number of counts after gain switch before next switch! "
406410
<< countsAfterGainSwitch;

Validation/EcalDigis/test/runEcalDigiStudy_cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
process = cms.Process('DigiStudy')
2323

24-
fileInput = "file:/eos/user/s/sarkar/Simulation/PUMixing/" + options.IPType + ".root"
24+
fileInput = "file:/eos/user/s/sarkar/Simulation/PUMixing/CMSSW_151X/" + options.IPType + ".root"
2525
fileName = "EC" + options.IPType + ".root"
2626

2727
print("Input file: ", fileInput)

Validation/HcalDigis/test/HcalDigiStudy.cc

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
#include "TH1D.h"
5656
#include "TProfile.h"
5757

58+
//#define EDM_ML_DEBUG
59+
5860
class HcalDigiStudy : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
5961
public:
6062
explicit HcalDigiStudy(const edm::ParameterSet&);
@@ -835,7 +837,10 @@ void HcalDigiStudy::reco(const edm::Event& iEvent,
835837

836838
// CYCLE OVER CELLS ========================================================
837839
int Ndig = 0;
838-
840+
#ifdef EDM_ML_DEBUG
841+
edm::LogVerbatim("HcalDiguStudy") << "Subdet " << subdet_ << " with " << digiCollection->size()
842+
<< " entries in DigiCollection";
843+
#endif
839844
for (digiItr = digiCollection->begin(); digiItr != digiCollection->end(); digiItr++) {
840845
HcalDetId cell(digiItr->id());
841846
int depth = cell.depth();
@@ -1151,6 +1156,10 @@ void HcalDigiStudy::reco(const edm::Event& iEvent,
11511156

11521157
// CYCLE OVER CELLS ========================================================
11531158
int Ndig = 0;
1159+
#ifdef EDM_ML_DEBUG
1160+
edm::LogVerbatim("HcalDiguStudy") << "Subdet " << subdet_ << " with " << digiCollection->size()
1161+
<< " entries in DigiCollection";
1162+
#endif
11541163

11551164
for (typename HcalDataFrameContainer<dataFrameType>::const_iterator digiItr = digiCollection->begin();
11561165
digiItr != digiCollection->end();
@@ -1202,8 +1211,9 @@ void HcalDigiStudy::reco(const edm::Event& iEvent,
12021211
pedWidth->getWidth(0));
12031212

12041213
} // end of event #1
1205-
//edm::LogVerbatim("OutputInfo") << "==== End of event noise block in cell cycle";
1206-
1214+
//#ifdef EDM_ML_DEBUG
1215+
// edm::LogVerbatim("HcalDigiStudy") << "==== End of event noise block in cell cycle";
1216+
//#endif
12071217
if (sub == isubdet)
12081218
Ndig++; // subdet number of digi
12091219

Validation/HcalDigis/test/runHcalDigiStudy_cfg.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
process = cms.Process('DigiStudy')
2323

24-
fileInput = "file:/eos/user/s/sarkar/Simulation/PUMixing/" + options.IPType + ".root"
24+
fileInput = "file:/eos/user/s/sarkar/Simulation/PUMixing/CMSSW_151X/" + options.IPType + ".root"
25+
#fileInput = "file:/eos/user/s/sarkar/Simulation/PUMixing/" + options.IPType + ".root"
2526
fileName = "HC" + options.IPType + ".root"
2627

2728
print("Input file: ", fileInput)
@@ -37,6 +38,8 @@
3738
from Configuration.AlCa.GlobalTag import GlobalTag
3839
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2023_realistic', '')
3940

41+
process.MessageLogger.HcalDigiStudy=dict()
42+
4043
process.source = cms.Source("PoolSource",
4144
fileNames = cms.untracked.vstring(fileInput) )
4245

@@ -51,6 +54,7 @@
5154
process.analysis_step = cms.Path(process.hcalDigiStudy)
5255
process.hcalDigiStudy.TestNumber = True
5356
#process.hcalDigiStudy.simHits = "fastSimProducer:HcalHits"
57+
process.hcalDigiStudy.mc = "no"
5458

5559
# Schedule definition
5660
process.schedule = cms.Schedule(

0 commit comments

Comments
 (0)