Skip to content

Commit dffb4e9

Browse files
committed
Improved code readability
1 parent eedef00 commit dffb4e9

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Validation/MtdValidation/macros/makeTimeResPlots.C

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// root -l makeTimeResPlot.C\(\"DQM_filename.root\"\)
99
//
1010
// NB: In order to have the UncalibratedRecHits histograms filled,
11-
// the MTD validation has to be run the flags:
11+
// the MTD validation has to be run with the flags:
1212
//
1313
// process.btlLocalRecoValid.optionalPlots = cms.bool(True)
1414
// process.btlLocalRecoValid.UncalibRecHitsPlots = cms.bool(True)
@@ -73,10 +73,11 @@ TH1F* h_TimeResEta_ETL[2][nBinsEta_ETL];
7373
TH1F* g_TimeResQ_ETL[2];
7474
TH1F* g_TimeResEta_ETL[2];
7575

76-
// subDet = 0: make both BTL and ETL plots
77-
// subDet = 1: make only BTL plots
78-
// subDet = 2: make only ETL plots
79-
void makeTimeResPlots(const TString DQMfilename = "DQM_V0001_UNKNOWN_R000000001.root", const int subDet = 0) {
76+
constexpr int SUBDET_BOTH = 0;
77+
constexpr int SUBDET_BTL = 1;
78+
constexpr int SUBDET_ETL = 2;
79+
80+
void makeTimeResPlots(const TString DQMfilename = "DQM_V0001_UNKNOWN_R000000001.root", const int subDet = SUBDET_BOTH) {
8081
gStyle->SetOptStat(kFALSE);
8182

8283
// --- Histograms booking
@@ -120,7 +121,7 @@ void makeTimeResPlots(const TString DQMfilename = "DQM_V0001_UNKNOWN_R000000001.
120121
// BTL
121122
/////////////////////////////////////////////////////////////////////////////////
122123

123-
if (subDet == 0 || subDet == 1) {
124+
if (subDet == SUBDET_BOTH || subDet == SUBDET_BTL) {
124125
// ---------------------------------------------------------------------------
125126
// BTL time resolution vs E
126127

@@ -308,7 +309,7 @@ void makeTimeResPlots(const TString DQMfilename = "DQM_V0001_UNKNOWN_R000000001.
308309
// ETL
309310
/////////////////////////////////////////////////////////////////////////////////
310311

311-
if (subDet == 0 || subDet == 2) {
312+
if (subDet == SUBDET_BOTH || subDet == SUBDET_ETL) {
312313
// ---------------------------------------------------------------------------
313314
// ETL time resolution vs amplitude and |eta|
314315

0 commit comments

Comments
 (0)