Skip to content

Commit 81837fd

Browse files
committed
Comments from BenjaminRS
1 parent 6f5c86d commit 81837fd

File tree

10 files changed

+45
-95
lines changed

10 files changed

+45
-95
lines changed

DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShower.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616
#ifndef L1Phase2MuDTShower_H
1717
#define L1Phase2MuDTShower_H
1818

19-
//------------------------------------
20-
// Collaborating Class Declarations --
21-
//------------------------------------
22-
23-
//----------------------
24-
// Base Class Headers --
25-
//----------------------
26-
2719
//---------------
2820
// C++ Headers --
2921
//---------------
@@ -36,6 +28,7 @@
3628
class L1Phase2MuDTShower {
3729
public:
3830
// Constructors
31+
3932
L1Phase2MuDTShower();
4033

4134
L1Phase2MuDTShower(int wh, // Wheel
@@ -51,8 +44,6 @@ class L1Phase2MuDTShower {
5144
const std::vector<int> wires_profile // Wires profile
5245
);
5346

54-
virtual ~L1Phase2MuDTShower() {};
55-
5647
// Operations
5748

5849
int whNum() const;

DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShowerContainer.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//-------------------------------------------------
22
//
3-
// Class L1Phase2MuDTPhContainer
3+
// Class L1Phase2MuDTShowerContainer
44
//
55
// Description: trigger primtive data for the
6-
// muon barrel Phase2 trigger
6+
// muon barrel Phase2 trigger shower
77
//
88
//
9-
// Author List: Federica Primavera Bologna INFN
9+
// Author List: Daniel Estrada Acevedo Oviedo Spain
1010
//
1111
//
1212
//--------------------------------------------------
@@ -23,10 +23,6 @@
2323
//----------------------
2424
#include <vector>
2525

26-
//---------------
27-
// C++ Headers --
28-
//---------------
29-
3026
// ---------------------
3127
// -- Class Interface --
3228
// ---------------------

DataFormats/L1DTTrackFinder/src/L1Phase2MuDTShower.cc

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
//-------------------------------------------------
22
//
3-
// Class L1MuDTChambPhDigi
3+
// Class L1Phase2MuDTShower
44
//
5-
// Description: trigger primtive data for the
6-
// muon barrel Phase2 trigger
5+
// Description: trigger primitive data for the
6+
// muon barrel Phase2 trigger showers
77
//
88
//
99
// Author List:
10-
// Federica Primavera Bologna INFN
1110
// Carlos Vico Oviedo Spain,
1211
// Daniel Estrada Acevedo Oviedo Spain.
1312
//
@@ -19,18 +18,6 @@
1918
//-----------------------
2019
#include "DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShower.h"
2120

22-
//-------------------------------
23-
// Collaborating Class Headers --
24-
//-------------------------------
25-
26-
//---------------
27-
// C++ Headers --
28-
//---------------
29-
30-
//-------------------
31-
// Initializations --
32-
//-------------------
33-
3421
//----------------
3522
// Constructors --
3623
//----------------

DataFormats/L1DTTrackFinder/src/L1Phase2MuDTShowerContainer.cc

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//-------------------------------------------------
22
//
3-
// Class L1MuDTChambContainer
3+
// Class L1Phase2MuDTShowerContainer
44
//
5-
// Description: trigger primtive data for the
6-
// muon barrel Phase2 trigger
5+
// Description: trigger primitive data for the
6+
// muon barrel Phase2 trigger shower
77
//
88
//
9-
// Author List: Federica Primavera Bologna INFN
9+
// Author List: Daniel Estrada Acevedo Oviedo Spain.
1010
//
1111
//
1212
//--------------------------------------------------
@@ -16,18 +16,6 @@
1616
//-----------------------
1717
#include "DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShowerContainer.h"
1818

19-
//-------------------------------
20-
// Collaborating Class Headers --
21-
//-------------------------------
22-
23-
//---------------
24-
// C++ Headers --
25-
//---------------
26-
27-
//-------------------
28-
// Initializations --
29-
//-------------------
30-
3119
//----------------
3220
// Constructors --
3321
//----------------

L1Trigger/DTTriggerPhase2/interface/MPThetaMatching.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,16 @@ class MPThetaMatching : public MPFilter {
3838

3939
void finish() override;
4040

41-
// Other public methods
42-
4341
// Public attributes
4442

4543
float vwire = 24.4; // cm/ns
46-
// float zFE[5] = {-654., -389., 123., 389., 654.}; //cm
47-
// float xFE[3] = {199/2., 245/2., 303/2.};//cm
4844
float zFE[5] = {-658.9, -393.3, 126.4, 393.3, 658.9}; //cm
4945
float xFE[3] = {218 / 2., 266.8 / 2., 315 / 2.}; //cm
5046
float ZRES_CONV = 65536. / 1500;
5147

5248
private:
5349
// Private methods
54-
std::vector<cmsdt::metaPrimitive> filter(std::vector<cmsdt::metaPrimitive> inMPs,
55-
// int th_option,
56-
// int th_quality,
57-
double shift_back);
50+
std::vector<cmsdt::metaPrimitive> filter(std::vector<cmsdt::metaPrimitive> inMPs, double shift_back);
5851

5952
bool isThereThetaMPInChamber(int sector, int wheel, int station, std::vector<cmsdt::metaPrimitive> thetaMPs);
6053
std::vector<cmsdt::metaPrimitive> getBestThetaMPInChamber(std::vector<cmsdt::metaPrimitive> thetaMPs);
@@ -68,8 +61,6 @@ class MPThetaMatching : public MPFilter {
6861
std::vector<cmsdt::metaPrimitive> *outMPaths,
6962
std::vector<cmsdt::metaPrimitive> *savedThetas);
7063

71-
//float computePosRefX(cmsdt::metaPrimitive);
72-
7364
// Private attributes
7465
const bool debug_;
7566
int th_option_;

L1Trigger/DTTriggerPhase2/interface/ShowerBuilder.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ class ShowerBuilder {
135135
const DTDigiCollection& digis,
136136
ShowerCandidatePtr& showerCandidate_SL1,
137137
ShowerCandidatePtr& showerCandidate_SL3);
138-
virtual void finish();
139138

140139
private:
141140
// Private auxiliary methods

L1Trigger/DTTriggerPhase2/interface/ShowerCandidate.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@
99
class ShowerCandidate {
1010
public:
1111
ShowerCandidate();
12-
1312
ShowerCandidate& operator=(const ShowerCandidate& other);
1413

15-
virtual ~ShowerCandidate() {}
16-
1714
// setter methods
1815
void rawId(int rawId) { rawId_ = rawId; }
1916
void setBX(int bx) { bx_ = bx; }

L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2ShowerProd.cc

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
#include <cmath>
5252

5353
using namespace edm;
54-
using namespace std;
5554
using namespace cmsdt;
5655

5756
class DTTrigPhase2ShowerProd : public edm::stream::EDProducer<> {
@@ -115,26 +114,26 @@ DTTrigPhase2ShowerProd::DTTrigPhase2ShowerProd(const ParameterSet& pset) {
115114
dtGeomH = esConsumes<DTGeometry, MuonGeometryRecord, edm::Transition::BeginRun>();
116115

117116
if (debug_) {
118-
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: constructor" << endl;
117+
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: constructor" << std::endl;
119118
if (showerTaggingAlgo_ == 0) {
120-
LogDebug("DTTrigPhase2ShowerProd") << "Using standalone mode" << endl;
119+
LogDebug("DTTrigPhase2ShowerProd") << "Using standalone mode" << std::endl;
121120
} else if (showerTaggingAlgo_ == 1) {
122-
LogDebug("DTTrigPhase2ShowerProd") << "Using firmware emulation mode" << endl;
121+
LogDebug("DTTrigPhase2ShowerProd") << "Using firmware emulation mode" << std::endl;
123122
} else
124-
LogError("DTTrigPhase2ShowerProd") << "Unrecognized shower tagging algorithm" << endl;
123+
LogError("DTTrigPhase2ShowerProd") << "Unrecognized shower tagging algorithm" << std::endl;
125124
}
126125
}
127126

128127
DTTrigPhase2ShowerProd::~DTTrigPhase2ShowerProd() {
129128
// Destructor implementation
130129
if (debug_)
131-
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: destructor" << endl;
130+
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: destructor" << std::endl;
132131
}
133132

134133
void DTTrigPhase2ShowerProd::beginRun(edm::Run const& iRun, const edm::EventSetup& iEventSetup) {
135134
// beginRun implementation
136135
if (debug_)
137-
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: beginRun started" << endl;
136+
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: beginRun started" << std::endl;
138137

139138
showerBuilder->initialise(iEventSetup);
140139
if (auto geom = iEventSetup.getHandle(dtGeomH)) {
@@ -145,7 +144,7 @@ void DTTrigPhase2ShowerProd::beginRun(edm::Run const& iRun, const edm::EventSetu
145144
void DTTrigPhase2ShowerProd::produce(edm::Event& iEvent, const edm::EventSetup& iEventSetup) {
146145
// produce implementation
147146
if (debug_)
148-
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: produce Processing event" << endl;
147+
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: produce Processing event" << std::endl;
149148

150149
// Fetch the handle for hits
151150
edm::Handle<DTDigiCollection> dtdigis;
@@ -155,7 +154,7 @@ void DTTrigPhase2ShowerProd::produce(edm::Event& iEvent, const edm::EventSetup&
155154
DTDigiMap digiMap;
156155
DTDigiCollection::DigiRangeIterator detUnitIt;
157156
if (debug_)
158-
LogDebug("DTTrigPhase2ShowerProd") << " Preprocessing hits..." << endl;
157+
LogDebug("DTTrigPhase2ShowerProd") << " Preprocessing hits..." << std::endl;
159158

160159
for (const auto& detUnitIt : *dtdigis) {
161160
const DTLayerId& layId = detUnitIt.first;
@@ -166,11 +165,11 @@ void DTTrigPhase2ShowerProd::produce(edm::Event& iEvent, const edm::EventSetup&
166165

167166
if (debug_)
168167
LogDebug("DTTrigPhase2ShowerProd") << " Hits preprocessed: " << digiMap.size() << " DT chambers to analyze"
169-
<< endl;
168+
<< std::endl;
170169

171170
// 2. Look for showers in each chamber
172171
if (debug_)
173-
LogDebug("DTTrigPhase2ShowerProd") << " Building shower candidates for:" << endl;
172+
LogDebug("DTTrigPhase2ShowerProd") << " Building shower candidates for:" << std::endl;
174173

175174
std::map<DTSuperLayerId, ShowerCandidatePtr> ShowerCandidates;
176175
for (const auto& ich : dtGeo_->chambers()) {
@@ -185,7 +184,7 @@ void DTTrigPhase2ShowerProd::produce(edm::Event& iEvent, const edm::EventSetup&
185184
continue;
186185

187186
if (debug_)
188-
LogDebug("DTTrigPhase2ShowerProd") << " " << chid << endl;
187+
LogDebug("DTTrigPhase2ShowerProd") << " " << chid << std::endl;
189188

190189
showerBuilder->run(iEvent, iEventSetup, (*dmit).second, ShowerCandidates[sl1id], ShowerCandidates[sl3id]);
191190

@@ -196,7 +195,7 @@ void DTTrigPhase2ShowerProd::produce(edm::Event& iEvent, const edm::EventSetup&
196195

197196
// 3. Check shower candidates and store them if flagged
198197
if (debug_)
199-
LogDebug("DTTrigPhase2ShowerProd") << " Selecting shower candidates" << endl;
198+
LogDebug("DTTrigPhase2ShowerProd") << " Selecting shower candidates" << std::endl;
200199

201200
std::vector<L1Phase2MuDTShower> outShower; // prepare output container
202201
for (auto& sl_showerCand : ShowerCandidates) {
@@ -225,7 +224,7 @@ void DTTrigPhase2ShowerProd::produce(edm::Event& iEvent, const edm::EventSetup&
225224
}
226225
}
227226
if (debug_)
228-
LogDebug("DTTrigPhase2ShowerProd") << " Storing results..." << endl;
227+
LogDebug("DTTrigPhase2ShowerProd") << " Storing results..." << std::endl;
229228

230229
// 4.1 Storing results
231230
std::unique_ptr<L1Phase2MuDTShowerContainer> resultShower(new L1Phase2MuDTShowerContainer);
@@ -236,7 +235,7 @@ void DTTrigPhase2ShowerProd::produce(edm::Event& iEvent, const edm::EventSetup&
236235
void DTTrigPhase2ShowerProd::endRun(edm::Run const& iRun, const edm::EventSetup& iEventSetup) {
237236
// endRun implementation
238237
if (debug_)
239-
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: endRun" << endl;
238+
LogDebug("DTTrigPhase2ShowerProd") << "DTTrigPhase2ShowerProd: endRun" << std::endl;
240239
}
241240

242241
void DTTrigPhase2ShowerProd::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {

L1Trigger/DTTriggerPhase2/src/MPThetaMatching.cc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "L1Trigger/DTTriggerPhase2/interface/constants.h"
44

55
using namespace edm;
6-
using namespace std;
76
using namespace cmsdt;
87

98
namespace {
@@ -47,6 +46,7 @@ MPThetaMatching::MPThetaMatching(const ParameterSet &pset)
4746
scenario_(pset.getParameter<int>("scenario")) {}
4847

4948
MPThetaMatching::~MPThetaMatching() { finish(); }
49+
5050
// ============================================================================
5151
// Main methods (initialise, run, finish)
5252
// ============================================================================
@@ -59,13 +59,16 @@ void MPThetaMatching::run(edm::Event &iEvent,
5959
if (debug_)
6060
LogDebug("MPThetaMatching") << "MPThetaMatching: run";
6161

62-
double shift_back = 0; // Needed for t0 (TDC) calculation, taken from main algo
62+
//static const double shift_back; // Needed for t0 (TDC) calculation, taken from main algo
63+
double temp_shift = 0;
6364
if (scenario_ == MC)
64-
shift_back = 400;
65+
temp_shift = 400; // value used in standard CMSSW simulation
6566
else if (scenario_ == DATA)
66-
shift_back = 0;
67+
temp_shift = 0;
6768
else if (scenario_ == SLICE_TEST)
68-
shift_back = 400;
69+
temp_shift = 400; // slice test mimics simulation
70+
71+
static const double shift_back = temp_shift; // Needed for t0 (TDC) calculation, taken from main algo
6972

7073
if (th_option_ > 0) {
7174
auto filteredMPs = filter(inMPaths, shift_back);
@@ -74,7 +77,8 @@ void MPThetaMatching::run(edm::Event &iEvent,
7477
} else {
7578
if (th_option_ < 0)
7679
LogDebug("MPThetaMatching")
77-
<< "MPThetaMatching: th_option can NOT be negative!!! Check settings. Saving all MPs for the moment" << endl;
80+
<< "MPThetaMatching: th_option can NOT be negative!!! Check settings. Saving all MPs for the moment"
81+
<< std::endl;
7882
outMPaths = inMPaths; //no filter at all
7983
}
8084
}
@@ -159,7 +163,6 @@ std::vector<metaPrimitive> MPThetaMatching::filter(std::vector<metaPrimitive> in
159163
oldStation = station;
160164
}
161165

162-
// float t0 = (mpTheta.t0 - shift_back * LHC_CLK_FREQ) * ((float) TIME_TO_TDC_COUNTS / (float) LHC_CLK_FREQ);
163166
float t0 = ((int)round(mpTheta.t0 / (float)LHC_CLK_FREQ)) - shift_back;
164167
float posRefZ = zFE[wheel + 2];
165168

L1Trigger/DTTriggerPhase2/src/ShowerBuilder.cc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "FWCore/ParameterSet/interface/ParameterSet.h"
44

55
using namespace edm;
6-
using namespace std;
76
using namespace cmsdt;
87

98
// ============================================================================
@@ -38,8 +37,8 @@ void ShowerBuilder::run(Event &iEvent,
3837
setInChannels(&digis);
3938

4039
std::map<int, ShowerCandidatePtr> aux_showerCands{// defined as a map to easy acces with SL number
41-
{1, make_shared<ShowerCandidate>()},
42-
{3, make_shared<ShowerCandidate>()}};
40+
{1, std::make_shared<ShowerCandidate>()},
41+
{3, std::make_shared<ShowerCandidate>()}};
4342

4443
int nHits = all_hits.size();
4544
if (nHits != 0) {
@@ -62,8 +61,6 @@ void ShowerBuilder::run(Event &iEvent,
6261
showerCandidate_SL3 = std::move(aux_showerCands[3]);
6362
}
6463

65-
void ShowerBuilder::finish() {};
66-
6764
// ============================================================================
6865
// Auxiliary methods
6966
// ============================================================================
@@ -230,13 +227,15 @@ void ShowerBuilder::set_shower_properties(ShowerCandidatePtr &showerCand,
230227
}
231228

232229
void ShowerBuilder::groupHits_byBx() {
233-
double shift_back = 0;
234-
if (scenario_ == MC) //scope for MC
235-
shift_back = 400;
230+
double temp_shift = 0;
231+
if (scenario_ == MC) //scope for MC
232+
temp_shift = 400; // value used in standard CMSSW simulation
236233
else if (scenario_ == DATA) //scope for data
237-
shift_back = 0;
234+
temp_shift = 0;
238235
else if (scenario_ == SLICE_TEST) //scope for slice test
239-
shift_back = 400;
236+
temp_shift = 400; // slice test to mimic simulation
237+
238+
static const double shift_back = temp_shift;
240239

241240
all_hits_perBx.clear();
242241
// Group hits by BX

0 commit comments

Comments
 (0)