|
8 | 8 | // root -l makeTimeResPlot.C\(\"DQM_filename.root\"\) |
9 | 9 | // |
10 | 10 | // 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: |
12 | 12 | // |
13 | 13 | // process.btlLocalRecoValid.optionalPlots = cms.bool(True) |
14 | 14 | // process.btlLocalRecoValid.UncalibRecHitsPlots = cms.bool(True) |
@@ -73,10 +73,11 @@ TH1F* h_TimeResEta_ETL[2][nBinsEta_ETL]; |
73 | 73 | TH1F* g_TimeResQ_ETL[2]; |
74 | 74 | TH1F* g_TimeResEta_ETL[2]; |
75 | 75 |
|
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) { |
80 | 81 | gStyle->SetOptStat(kFALSE); |
81 | 82 |
|
82 | 83 | // --- Histograms booking |
@@ -120,7 +121,7 @@ void makeTimeResPlots(const TString DQMfilename = "DQM_V0001_UNKNOWN_R000000001. |
120 | 121 | // BTL |
121 | 122 | ///////////////////////////////////////////////////////////////////////////////// |
122 | 123 |
|
123 | | - if (subDet == 0 || subDet == 1) { |
| 124 | + if (subDet == SUBDET_BOTH || subDet == SUBDET_BTL) { |
124 | 125 | // --------------------------------------------------------------------------- |
125 | 126 | // BTL time resolution vs E |
126 | 127 |
|
@@ -308,7 +309,7 @@ void makeTimeResPlots(const TString DQMfilename = "DQM_V0001_UNKNOWN_R000000001. |
308 | 309 | // ETL |
309 | 310 | ///////////////////////////////////////////////////////////////////////////////// |
310 | 311 |
|
311 | | - if (subDet == 0 || subDet == 2) { |
| 312 | + if (subDet == SUBDET_BOTH || subDet == SUBDET_ETL) { |
312 | 313 | // --------------------------------------------------------------------------- |
313 | 314 | // ETL time resolution vs amplitude and |eta| |
314 | 315 |
|
|
0 commit comments