Skip to content

Commit fab4bea

Browse files
committed
Clean up statics in CalibMuon/DTDigiSync.
1 parent edff3dd commit fab4bea

6 files changed

+38
-65
lines changed

CalibMuon/DTDigiSync/src/DTTTrigSyncFromDB.cc

+11-16
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ using namespace std;
2424
using namespace edm;
2525

2626

27-
DTTTrigSyncFromDB::DTTTrigSyncFromDB(const ParameterSet& config){
28-
debug = config.getUntrackedParameter<bool>("debug");
27+
DTTTrigSyncFromDB::DTTTrigSyncFromDB(const ParameterSet& config)
28+
: debug(config.getUntrackedParameter<bool>("debug")),
2929
// The velocity of signal propagation along the wire (cm/ns)
30-
theVPropWire = config.getParameter<double>("vPropWire");
30+
theVPropWire(config.getParameter<double>("vPropWire")),
3131
// Switch on/off the T0 correction from pulses
32-
doT0Correction = config.getParameter<bool>("doT0Correction");
32+
doT0Correction(config.getParameter<bool>("doT0Correction")),
3333
// Switch on/off the TOF correction for particles from IP
34-
doTOFCorrection = config.getParameter<bool>("doTOFCorrection");
35-
theTOFCorrType = config.getParameter<int>("tofCorrType");
34+
doTOFCorrection(config.getParameter<bool>("doTOFCorrection")),
35+
theTOFCorrType(config.getParameter<int>("tofCorrType")),
3636
// Switch on/off the correction for the signal propagation along the wire
37-
doWirePropCorrection = config.getParameter<bool>("doWirePropCorrection");
38-
theWirePropCorrType = config.getParameter<int>("wirePropCorrType");
37+
doWirePropCorrection(config.getParameter<bool>("doWirePropCorrection")),
38+
theWirePropCorrType(config.getParameter<int>("wirePropCorrType")),
3939
// spacing of BX in ns
40-
theBXspace = config.getUntrackedParameter<double>("bxSpace", 25.);
41-
42-
thetTrigLabel = config.getParameter<string>("tTrigLabel");
40+
theBXspace(config.getUntrackedParameter<double>("bxSpace", 25.)),
41+
thetTrigLabel(config.getParameter<string>("tTrigLabel"))
42+
{
4343
}
4444

4545

@@ -198,11 +198,6 @@ double DTTTrigSyncFromDB::offset(const DTWireId& wireId) {
198198

199199
}
200200

201-
202-
// Set the verbosity level
203-
bool DTTTrigSyncFromDB::debug = false;
204-
205-
206201
double DTTTrigSyncFromDB::emulatorOffset(const DTWireId& wireId,
207202
double &tTrig,
208203
double &t0cell) {

CalibMuon/DTDigiSync/src/DTTTrigSyncFromDB.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class DTTTrigSyncFromDB : public DTTTrigBaseSync {
9696
const DTT0 *tZeroMap;
9797
const DTTtrig *tTrigMap;
9898
// Set the verbosity level
99-
static bool debug;
99+
const bool debug;
100100
// The velocity of signal propagation along the wire (cm/ns)
101101
double theVPropWire;
102102
// Switch on/off the T0 correction from pulses

CalibMuon/DTDigiSync/src/DTTTrigSyncT0Only.cc

+3-6
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ using namespace std;
2020
using namespace edm;
2121

2222

23-
DTTTrigSyncT0Only::DTTTrigSyncT0Only(const ParameterSet& config){
24-
debug = config.getUntrackedParameter<bool>("debug");
23+
DTTTrigSyncT0Only::DTTTrigSyncT0Only(const ParameterSet& config)
24+
:debug(config.getUntrackedParameter<bool>("debug"))
25+
{
2526
}
2627

2728

@@ -77,10 +78,6 @@ double DTTTrigSyncT0Only::offset(const DTWireId& wireId) {
7778
}
7879

7980

80-
// Set the verbosity level
81-
bool DTTTrigSyncT0Only::debug;
82-
83-
8481
double DTTTrigSyncT0Only::emulatorOffset(const DTWireId& wireId,
8582
double &tTrig,
8683
double &t0cell) {

CalibMuon/DTDigiSync/src/DTTTrigSyncT0Only.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class DTTTrigSyncT0Only : public DTTTrigBaseSync {
6060
const DTT0 *tZeroMap;
6161

6262
// Set the verbosity level
63-
static bool debug;
63+
const bool debug;
6464
};
6565
#endif
6666

CalibMuon/DTDigiSync/src/DTTTrigSyncTOFCorr.cc

+18-37
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,24 @@
1515

1616
using namespace std;
1717

18-
19-
20-
DTTTrigSyncTOFCorr::DTTTrigSyncTOFCorr(const edm::ParameterSet& config){
21-
theTTrig = config.getParameter<double>("tTrig"); // FIXME: Default was 500 ns
22-
theVPropWire = config.getParameter<double>("vPropWire"); // FIXME: Default was 24.4 cm/ns
23-
theTOFCorrType = config.getParameter<int>("tofCorrType"); // FIXME: Default was 1
24-
debug = config.getUntrackedParameter<bool>("debug");
25-
// spacing of BX in ns
26-
theBXspace = config.getUntrackedParameter<double>("bxSpace", 25.);
27-
18+
DTTTrigSyncTOFCorr::DTTTrigSyncTOFCorr(const edm::ParameterSet& config)
19+
:
20+
// The fixed t0 (or t_trig) to be subtracted to digi time (ns)
21+
theTTrig(config.getParameter<double>("tTrig")), // FIXME: Default was 500 ns
22+
// Velocity of signal propagation along the wire (cm/ns)
23+
theVPropWire(config.getParameter<double>("vPropWire")), // FIXME: Default was 24.4 cm/ns
24+
// Select the mode for TOF correction:
25+
// 0: tofCorr = TOF from IP to 3D Hit position (globPos)
26+
// 1: tofCorr = TOF correction for distance difference
27+
// between 3D center of the chamber and hit position
28+
// (default)
29+
// 2: tofCorr = TOF correction for distance difference
30+
// between 3D center of the wire and hit position
31+
// (This mode in available for backward compatibility)
32+
theTOFCorrType(config.getParameter<int>("tofCorrType")), // FIXME: Default was 1
33+
debug(config.getUntrackedParameter<bool>("debug")),
34+
theBXspace(config.getUntrackedParameter<double>("bxSpace", 25.)) // spacing of BX in ns
35+
{
2836
}
2937

3038

@@ -109,33 +117,6 @@ double DTTTrigSyncTOFCorr::offset(const DTWireId& wireId) {
109117
}
110118

111119

112-
// The fixed t0 (or t_trig) to be subtracted to digi time (ns)
113-
double DTTTrigSyncTOFCorr::theTTrig;
114-
115-
116-
117-
// Velocity of signal propagation along the wire (cm/ns)
118-
double DTTTrigSyncTOFCorr::theVPropWire;
119-
120-
121-
122-
// Select the mode for TOF correction:
123-
// 0: tofCorr = TOF from IP to 3D Hit position (globPos)
124-
// 1: tofCorr = TOF correction for distance difference
125-
// between 3D center of the chamber and hit position
126-
// (default)
127-
// 2: tofCorr = TOF correction for distance difference
128-
// between 3D center of the wire and hit position
129-
// (This mode in available for backward compatibility)
130-
int DTTTrigSyncTOFCorr::theTOFCorrType;
131-
132-
133-
134-
// Set the verbosity level
135-
bool DTTTrigSyncTOFCorr::debug;
136-
137-
138-
139120
double DTTTrigSyncTOFCorr::emulatorOffset(const DTWireId& wireId,
140121
double &tTrig,
141122
double &t0cell) {

CalibMuon/DTDigiSync/src/DTTTrigSyncTOFCorr.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,23 @@ class DTTTrigSyncTOFCorr : public DTTTrigBaseSync {
8989

9090
private:
9191
// The fixed t_trig to be subtracted to digi time (ns)
92-
static double theTTrig;
92+
const double theTTrig;
9393
// Velocity of signal propagation along the wire (cm/ns)
9494
// For the value
9595
// cfr. CMS-IN 2000-021: (2.56+-0.17)x1e8 m/s
9696
// CMS NOTE 2003-17: (0.244) m/ns = 24.4 cm/ns
97-
static double theVPropWire;
97+
const double theVPropWire;
9898

9999
// Select the mode for TOF correction:
100100
// 0: tofCorr = TOF from IP to 3D Hit position (globPos)
101101
// 1: tofCorr = TOF correction for distance difference
102102
// between 3D center of the chamber and hit position
103103
// 2: tofCorr = TOF correction for distance difference
104104
// between 3D center of the wire and hit position
105-
static int theTOFCorrType;
105+
const int theTOFCorrType;
106106

107107
// Set the verbosity level
108-
static bool debug;
108+
const bool debug;
109109
// spacing of BX in ns
110110
double theBXspace;
111111
};

0 commit comments

Comments
 (0)