Skip to content

Commit 7a4f4ce

Browse files
authored
Merge pull request cms-sw#33978 from cecilecaillol/l1t-updateVertexFinder_alexx_120X
L1T phase-2: Update VertexFinder and remove the old L1TkPrimaryVertexProducer
2 parents a6b8acc + 93ac253 commit 7a4f4ce

39 files changed

+3643
-1502
lines changed

DataFormats/L1Trigger/interface/Vertex.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@ namespace l1t {
1717
typedef TTTrack<Ref_Phase2TrackerDigi_> Track_t;
1818

1919
Vertex();
20-
Vertex(float z0, const std::vector<edm::Ptr<Track_t>>& tracks);
20+
Vertex(float pt, float z0, const std::vector<edm::Ptr<Track_t>>& tracks);
2121
~Vertex();
2222

23+
float pt() const;
2324
float z0() const;
2425

2526
const std::vector<edm::Ptr<Track_t>>& tracks() const;
2627

2728
private:
29+
float pt_;
2830
float z0_;
2931
std::vector<edm::Ptr<Track_t>> tracks_;
3032
};

DataFormats/L1Trigger/src/Vertex.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
namespace l1t {
44

5-
Vertex::Vertex() : z0_(0.0) {}
5+
Vertex::Vertex() : pt_(0.0), z0_(0.0) {}
66

7-
Vertex::Vertex(float z0, const std::vector<edm::Ptr<Track_t>>& tracks) : z0_(z0), tracks_(tracks) {}
7+
Vertex::Vertex(float pt, float z0, const std::vector<edm::Ptr<Track_t>>& tracks)
8+
: pt_(pt), z0_(z0), tracks_(tracks) {}
89

910
Vertex::~Vertex() {}
1011

12+
float Vertex::pt() const { return pt_; }
13+
1114
float Vertex::z0() const { return z0_; }
1215

1316
const std::vector<edm::Ptr<Vertex::Track_t>>& Vertex::tracks() const { return tracks_; }

DataFormats/L1Trigger/src/classes_def.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@
280280

281281
<class name="edm::Ptr<l1t::L1Candidate>"/>
282282

283-
<class name="l1t::Vertex" ClassVersion="3">
283+
<class name="l1t::Vertex" ClassVersion="4">
284+
<version ClassVersion="4" checksum="3366446278"/>
284285
<version ClassVersion="3" checksum="514139083"/>
285286
</class>
286287
<class name="std::vector<l1t::Vertex>"/>

L1Trigger/L1TTrackMatch/plugins/L1TkFastVertexProducer.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ L1TkFastVertexProducer::L1TkFastVertexProducer(const edm::ParameterSet& iConfig)
109109
consumes<std::vector<reco::GenParticle> >(iConfig.getParameter<edm::InputTag>("GenParticleInputTag"))),
110110
trackToken_(consumes<std::vector<TTTrack<Ref_Phase2TrackerDigi_> > >(
111111
iConfig.getParameter<edm::InputTag>("L1TrackInputTag"))),
112-
topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>()) {
112+
topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>(edm::ESInputTag("", ""))) {
113113
zMax_ = (float)iConfig.getParameter<double>("ZMAX");
114114
chi2Max_ = (float)iConfig.getParameter<double>("CHI2MAX");
115115
pTMinTra_ = (float)iConfig.getParameter<double>("PTMINTRA");
@@ -147,8 +147,7 @@ void L1TkFastVertexProducer::produce(edm::StreamID, edm::Event& iEvent, const ed
147147
auto result = std::make_unique<TkPrimaryVertexCollection>();
148148

149149
// Tracker Topology
150-
edm::ESHandle<TrackerTopology> tTopoHandle = iSetup.getHandle(topoToken_);
151-
const TrackerTopology* tTopo = tTopoHandle.product();
150+
const TrackerTopology& tTopo = iSetup.getData(topoToken_);
152151

153152
TH1F htmp("htmp", ";z (cm); Tracks", nBinning_, xmin_, xmax_);
154153
TH1F htmp_weight("htmp_weight", ";z (cm); Tracks", nBinning_, xmin_, xmax_);
@@ -271,9 +270,9 @@ void L1TkFastVertexProducer::produce(edm::StreamID, edm::Event& iEvent, const ed
271270
bool isPS = false;
272271
DetId detId(stub->getDetId());
273272
if (detId.det() == DetId::Detector::Tracker) {
274-
if (detId.subdetId() == StripSubdetector::TOB && tTopo->tobLayer(detId) <= 3)
273+
if (detId.subdetId() == StripSubdetector::TOB && tTopo.tobLayer(detId) <= 3)
275274
isPS = true;
276-
else if (detId.subdetId() == StripSubdetector::TID && tTopo->tidRing(detId) <= 9)
275+
else if (detId.subdetId() == StripSubdetector::TID && tTopo.tidRing(detId) <= 9)
277276
isPS = true;
278277
}
279278
if (isPS)

L1Trigger/L1TTrackMatch/plugins/L1TrackFastJetProducer.cc

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "FWCore/Framework/interface/EDProducer.h"
1414
#include "FWCore/Framework/interface/Event.h"
1515
#include "FWCore/Framework/interface/MakerMacros.h"
16-
#include "FWCore/Framework/interface/ESHandle.h"
1716
#include "FWCore/Framework/interface/EventSetup.h"
1817
#include "DataFormats/Common/interface/Handle.h"
1918
#include "FWCore/Utilities/interface/InputTag.h"
@@ -78,13 +77,15 @@ class L1TrackFastJetProducer : public edm::EDProducer {
7877

7978
const edm::EDGetTokenT<std::vector<TTTrack<Ref_Phase2TrackerDigi_> > > trackToken_;
8079
edm::EDGetTokenT<TkPrimaryVertexCollection> pvToken_;
80+
edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken_;
8181
};
8282

8383
// constructor
8484
L1TrackFastJetProducer::L1TrackFastJetProducer(const edm::ParameterSet& iConfig)
8585
: trackToken_(consumes<std::vector<TTTrack<Ref_Phase2TrackerDigi_> > >(
8686
iConfig.getParameter<edm::InputTag>("L1TrackInputTag"))),
87-
pvToken_(consumes<TkPrimaryVertexCollection>(iConfig.getParameter<edm::InputTag>("L1PrimaryVertexTag"))) {
87+
pvToken_(consumes<TkPrimaryVertexCollection>(iConfig.getParameter<edm::InputTag>("L1PrimaryVertexTag"))),
88+
tTopoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>(edm::ESInputTag("", ""))) {
8889
trkZMax_ = (float)iConfig.getParameter<double>("trk_zMax");
8990
trkChi2dofMax_ = (float)iConfig.getParameter<double>("trk_chi2dofMax");
9091
trkBendChi2Max_ = iConfig.getParameter<double>("trk_bendChi2Max");
@@ -115,11 +116,7 @@ void L1TrackFastJetProducer::produce(edm::Event& iEvent, const edm::EventSetup&
115116
std::vector<TTTrack<Ref_Phase2TrackerDigi_> >::const_iterator iterL1Track;
116117

117118
// Tracker Topology
118-
edm::ESHandle<TrackerTopology> tTopoHandle_;
119-
iSetup.get<TrackerTopologyRcd>().get(tTopoHandle_);
120-
const TrackerTopology* tTopo = tTopoHandle_.product();
121-
ESHandle<TrackerGeometry> tGeomHandle;
122-
iSetup.get<TrackerDigiGeometryRecord>().get(tGeomHandle);
119+
const TrackerTopology& tTopo = iSetup.getData(tTopoToken_);
123120

124121
edm::Handle<TkPrimaryVertexCollection> TkPrimaryVertexHandle;
125122
iEvent.getByToken(pvToken_, TkPrimaryVertexHandle);
@@ -159,9 +156,9 @@ void L1TrackFastJetProducer::produce(edm::Event& iEvent, const edm::EventSetup&
159156
DetId detId(theStubs.at(istub)->getDetId());
160157
bool tmp_isPS = false;
161158
if (detId.det() == DetId::Detector::Tracker) {
162-
if (detId.subdetId() == StripSubdetector::TOB && tTopo->tobLayer(detId) <= 3)
159+
if (detId.subdetId() == StripSubdetector::TOB && tTopo.tobLayer(detId) <= 3)
163160
tmp_isPS = true;
164-
else if (detId.subdetId() == StripSubdetector::TID && tTopo->tidRing(detId) <= 9)
161+
else if (detId.subdetId() == StripSubdetector::TID && tTopo.tidRing(detId) <= 9)
165162
tmp_isPS = true;
166163
}
167164
if (tmp_isPS)

L1Trigger/L1TTrackMatch/plugins/L1TrackJetProducer.cc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "FWCore/Framework/interface/Frameworkfwd.h"
1818
#include "FWCore/Framework/interface/stream/EDProducer.h"
1919
#include "FWCore/Framework/interface/Event.h"
20-
#include "FWCore/Framework/interface/ESHandle.h"
2120
#include "FWCore/Framework/interface/EventSetup.h"
2221
#include "FWCore/Framework/interface/MakerMacros.h"
2322
#include "FWCore/ParameterSet/interface/ParameterSet.h"
@@ -62,6 +61,8 @@ class L1TrackJetProducer : public stream::EDProducer<> {
6261
// ----------member data ---------------------------
6362

6463
const EDGetTokenT<vector<TTTrack<Ref_Phase2TrackerDigi_> > > trackToken_;
64+
edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken_;
65+
6566
vector<Ptr<L1TTTrackType> > L1TrkPtrs_;
6667
vector<int> zBinCount_;
6768
vector<int> ttrk_;
@@ -100,7 +101,8 @@ class L1TrackJetProducer : public stream::EDProducer<> {
100101

101102
L1TrackJetProducer::L1TrackJetProducer(const ParameterSet &iConfig)
102103
: trackToken_(
103-
consumes<vector<TTTrack<Ref_Phase2TrackerDigi_> > >(iConfig.getParameter<InputTag>("L1TrackInputTag"))) {
104+
consumes<vector<TTTrack<Ref_Phase2TrackerDigi_> > >(iConfig.getParameter<InputTag>("L1TrackInputTag"))),
105+
tTopoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>(edm::ESInputTag("", ""))) {
104106
trkZMax_ = (float)iConfig.getParameter<double>("trk_zMax");
105107
trkPtMax_ = (float)iConfig.getParameter<double>("trk_ptMax");
106108
trkPtMin_ = (float)iConfig.getParameter<double>("trk_ptMin");
@@ -144,11 +146,7 @@ void L1TrackJetProducer::produce(Event &iEvent, const EventSetup &iSetup) {
144146
unique_ptr<TkJetCollection> L1L1TrackJetProducer(new TkJetCollection);
145147

146148
// For TTStubs
147-
ESHandle<TrackerTopology> tTopoHandle;
148-
iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
149-
ESHandle<TrackerGeometry> tGeomHandle;
150-
iSetup.get<TrackerDigiGeometryRecord>().get(tGeomHandle);
151-
const TrackerTopology *const tTopo = tTopoHandle.product();
149+
const TrackerTopology &tTopo = iSetup.getData(tTopoToken_);
152150

153151
edm::Handle<vector<TTTrack<Ref_Phase2TrackerDigi_> > > TTTrackHandle;
154152
iEvent.getByToken(trackToken_, TTTrackHandle);
@@ -174,8 +172,8 @@ void L1TrackJetProducer::produce(Event &iEvent, const EventSetup &iSetup) {
174172
for (int istub = 0; istub < trk_nstubs; istub++) { // loop over the stubs
175173
DetId detId(trkPtr->getStubRefs().at(istub)->getDetId());
176174
if (detId.det() == DetId::Detector::Tracker) {
177-
if ((detId.subdetId() == StripSubdetector::TOB && tTopo->tobLayer(detId) <= 3) ||
178-
(detId.subdetId() == StripSubdetector::TID && tTopo->tidRing(detId) <= 9))
175+
if ((detId.subdetId() == StripSubdetector::TOB && tTopo.tobLayer(detId) <= 3) ||
176+
(detId.subdetId() == StripSubdetector::TID && tTopo.tidRing(detId) <= 9))
179177
trk_nPS++;
180178
}
181179
}

L1Trigger/L1TTrackMatch/plugins/L1TrackObjectNtupleMaker.cc

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "FWCore/Framework/interface/MakerMacros.h"
1111
#include "FWCore/Framework/interface/EDAnalyzer.h"
1212
#include "FWCore/Framework/interface/Event.h"
13-
#include "FWCore/Framework/interface/ESHandle.h"
1413
#include "FWCore/Framework/interface/EventSetup.h"
1514
#include "FWCore/MessageLogger/interface/MessageLogger.h"
1615
#include "FWCore/Utilities/interface/InputTag.h"
@@ -176,6 +175,9 @@ class L1TrackObjectNtupleMaker : public edm::EDAnalyzer {
176175
edm::EDGetTokenT<l1t::TkJetCollection> TrackJetsToken_;
177176
edm::EDGetTokenT<l1t::TkJetCollection> TrackJetsExtendedToken_;
178177

178+
edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken_;
179+
edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> tGeomToken_;
180+
179181
//-----------------------------------------------------------------------------------------------
180182
// tree & branches for mini-ntuple
181183

@@ -452,6 +454,9 @@ L1TrackObjectNtupleMaker::L1TrackObjectNtupleMaker(edm::ParameterSet const& iCon
452454
GenJetToken_ = consumes<std::vector<reco::GenJet> >(GenJetInputTag);
453455
GenParticleToken_ = consumes<std::vector<reco::GenParticle> >(GenParticleInputTag);
454456
L1VertexToken_ = consumes<l1t::TkPrimaryVertexCollection>(RecoVertexInputTag);
457+
458+
tTopoToken_ = esConsumes<TrackerTopology, TrackerTopologyRcd>(edm::ESInputTag("", ""));
459+
tGeomToken_ = esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>(edm::ESInputTag("", ""));
455460
}
456461

457462
/////////////
@@ -1093,7 +1098,10 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
10931098

10941099
// -----------------------------------------------------------------------------------------------
10951100
// more for TTStubs
1096-
edm::ESHandle<TrackerGeometry> geometryHandle;
1101+
const TrackerTopology& tTopo = iSetup.getData(tTopoToken_);
1102+
const TrackerGeometry& tGeom = iSetup.getData(tGeomToken_);
1103+
1104+
/*edm::ESHandle<TrackerGeometry> geometryHandle;
10971105
iSetup.get<TrackerDigiGeometryRecord>().get(geometryHandle);
10981106
10991107
edm::ESHandle<TrackerTopology> tTopoHandle;
@@ -1103,7 +1111,7 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
11031111
iSetup.get<TrackerDigiGeometryRecord>().get(tGeomHandle);
11041112
11051113
const TrackerTopology* const tTopo = tTopoHandle.product();
1106-
const TrackerGeometry* const theTrackerGeom = tGeomHandle.product();
1114+
const TrackerGeometry* const theTrackerGeom = tGeomHandle.product();*/
11071115

11081116
//Gen particles
11091117
edm::Handle<std::vector<reco::GenParticle> > GenParticleHandle;
@@ -1186,20 +1194,20 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
11861194
// loop over L1 stubs
11871195
// ----------------------------------------------------------------------------------------------
11881196
if (SaveStubs) {
1189-
for (auto gd = theTrackerGeom->dets().begin(); gd != theTrackerGeom->dets().end(); gd++) {
1197+
for (auto gd = tGeom.dets().begin(); gd != tGeom.dets().end(); gd++) {
11901198
DetId detid = (*gd)->geographicalId();
11911199
if (detid.subdetId() != StripSubdetector::TOB && detid.subdetId() != StripSubdetector::TID)
11921200
continue;
1193-
if (!tTopo->isLower(detid))
1194-
continue; // loop on the stacks: choose the lower arbitrarily
1195-
DetId stackDetid = tTopo->stack(detid); // Stub module detid
1201+
if (!tTopo.isLower(detid))
1202+
continue; // loop on the stacks: choose the lower arbitrarily
1203+
DetId stackDetid = tTopo.stack(detid); // Stub module detid
11961204

11971205
if (TTStubHandle->find(stackDetid) == TTStubHandle->end())
11981206
continue;
11991207

12001208
// Get the DetSets of the Clusters
12011209
edmNew::DetSet<TTStub<Ref_Phase2TrackerDigi_> > stubs = (*TTStubHandle)[stackDetid];
1202-
const GeomDetUnit* det0 = theTrackerGeom->idToDetUnit(detid);
1210+
const GeomDetUnit* det0 = tGeom.idToDetUnit(detid);
12031211
const auto* theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(det0);
12041212
const PixelTopology* topol = dynamic_cast<const PixelTopology*>(&(theGeomDet->specificTopology()));
12051213

@@ -1212,10 +1220,10 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
12121220
int layer = -999999;
12131221
if (detid.subdetId() == StripSubdetector::TOB) {
12141222
isBarrel = 1;
1215-
layer = static_cast<int>(tTopo->layer(detid));
1223+
layer = static_cast<int>(tTopo.layer(detid));
12161224
} else if (detid.subdetId() == StripSubdetector::TID) {
12171225
isBarrel = 0;
1218-
layer = static_cast<int>(tTopo->layer(detid));
1226+
layer = static_cast<int>(tTopo.layer(detid));
12191227
} else {
12201228
edm::LogVerbatim("Tracklet") << "WARNING -- neither TOB or TID stub, shouldn't happen...";
12211229
layer = -1;
@@ -1330,9 +1338,9 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
13301338
// loop over stubs
13311339
for (int is = 0; is < tmp_trk_nstub; is++) {
13321340
//detID of stub
1333-
DetId detIdStub = theTrackerGeom->idToDet((stubRefs.at(is)->clusterRef(0))->getDetId())->geographicalId();
1341+
DetId detIdStub = tGeom.idToDet((stubRefs.at(is)->clusterRef(0))->getDetId())->geographicalId();
13341342
MeasurementPoint coords = stubRefs.at(is)->clusterRef(0)->findAverageLocalCoordinatesCentered();
1335-
const GeomDet* theGeomDet = theTrackerGeom->idToDet(detIdStub);
1343+
const GeomDet* theGeomDet = tGeom.idToDet(detIdStub);
13361344
Global3DPoint posStub = theGeomDet->surface().toGlobal(theGeomDet->topology().localPosition(coords));
13371345

13381346
double x = posStub.x();
@@ -1341,13 +1349,13 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
13411349

13421350
int layer = -999999;
13431351
if (detIdStub.subdetId() == StripSubdetector::TOB) {
1344-
layer = static_cast<int>(tTopo->layer(detIdStub));
1352+
layer = static_cast<int>(tTopo.layer(detIdStub));
13451353
if (DebugMode)
13461354
edm::LogVerbatim("Tracklet")
13471355
<< " stub in layer " << layer << " at position x y z = " << x << " " << y << " " << z;
13481356
tmp_trk_lhits += pow(10, layer - 1);
13491357
} else if (detIdStub.subdetId() == StripSubdetector::TID) {
1350-
layer = static_cast<int>(tTopo->layer(detIdStub));
1358+
layer = static_cast<int>(tTopo.layer(detIdStub));
13511359
if (DebugMode)
13521360
edm::LogVerbatim("Tracklet")
13531361
<< " stub in disk " << layer << " at position x y z = " << x << " " << y << " " << z;
@@ -1509,9 +1517,9 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
15091517
// loop over stubs
15101518
for (int is = 0; is < tmp_trk_nstub; is++) {
15111519
//detID of stub
1512-
DetId detIdStub = theTrackerGeom->idToDet((stubRefs.at(is)->clusterRef(0))->getDetId())->geographicalId();
1520+
DetId detIdStub = tGeom.idToDet((stubRefs.at(is)->clusterRef(0))->getDetId())->geographicalId();
15131521
MeasurementPoint coords = stubRefs.at(is)->clusterRef(0)->findAverageLocalCoordinatesCentered();
1514-
const GeomDet* theGeomDet = theTrackerGeom->idToDet(detIdStub);
1522+
const GeomDet* theGeomDet = tGeom.idToDet(detIdStub);
15151523
Global3DPoint posStub = theGeomDet->surface().toGlobal(theGeomDet->topology().localPosition(coords));
15161524

15171525
double x = posStub.x();
@@ -1520,13 +1528,13 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
15201528

15211529
int layer = -999999;
15221530
if (detIdStub.subdetId() == StripSubdetector::TOB) {
1523-
layer = static_cast<int>(tTopo->layer(detIdStub));
1531+
layer = static_cast<int>(tTopo.layer(detIdStub));
15241532
if (DebugMode)
15251533
edm::LogVerbatim("Tracklet")
15261534
<< " stub in layer " << layer << " at position x y z = " << x << " " << y << " " << z;
15271535
tmp_trk_lhits += pow(10, layer - 1);
15281536
} else if (detIdStub.subdetId() == StripSubdetector::TID) {
1529-
layer = static_cast<int>(tTopo->layer(detIdStub));
1537+
layer = static_cast<int>(tTopo.layer(detIdStub));
15301538
if (DebugMode)
15311539
edm::LogVerbatim("Tracklet")
15321540
<< " stub in disk " << layer << " at position x y z = " << x << " " << y << " " << z;
@@ -1738,9 +1746,9 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
17381746

17391747
int layer = -1;
17401748
if (detid.subdetId() == StripSubdetector::TOB) {
1741-
layer = static_cast<int>(tTopo->layer(detid)) - 1; //fill in array as entries 0-5
1749+
layer = static_cast<int>(tTopo.layer(detid)) - 1; //fill in array as entries 0-5
17421750
} else if (detid.subdetId() == StripSubdetector::TID) {
1743-
layer = static_cast<int>(tTopo->layer(detid)) + 5; //fill in array as entries 6-10
1751+
layer = static_cast<int>(tTopo.layer(detid)) + 5; //fill in array as entries 6-10
17441752
}
17451753

17461754
//treat genuine stubs separately (==2 is genuine, ==1 is not)
@@ -1932,13 +1940,13 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
19321940
int tmp_nstub = stubRefs.size();
19331941

19341942
for (int is = 0; is < tmp_nstub; is++) {
1935-
DetId detIdStub = theTrackerGeom->idToDet((stubRefs.at(is)->clusterRef(0))->getDetId())->geographicalId();
1943+
DetId detIdStub = tGeom.idToDet((stubRefs.at(is)->clusterRef(0))->getDetId())->geographicalId();
19361944
int layer = -999999;
19371945
if (detIdStub.subdetId() == StripSubdetector::TOB) {
1938-
layer = static_cast<int>(tTopo->layer(detIdStub));
1946+
layer = static_cast<int>(tTopo.layer(detIdStub));
19391947
tmp_matchtrk_lhits += pow(10, layer - 1);
19401948
} else if (detIdStub.subdetId() == StripSubdetector::TID) {
1941-
layer = static_cast<int>(tTopo->layer(detIdStub));
1949+
layer = static_cast<int>(tTopo.layer(detIdStub));
19421950
tmp_matchtrk_dhits += pow(10, layer - 1);
19431951
}
19441952
}
@@ -2102,13 +2110,13 @@ void L1TrackObjectNtupleMaker::analyze(const edm::Event& iEvent, const edm::Even
21022110
int tmp_nstub = stubRefs.size();
21032111

21042112
for (int is = 0; is < tmp_nstub; is++) {
2105-
DetId detIdStub = theTrackerGeom->idToDet((stubRefs.at(is)->clusterRef(0))->getDetId())->geographicalId();
2113+
DetId detIdStub = tGeom.idToDet((stubRefs.at(is)->clusterRef(0))->getDetId())->geographicalId();
21062114
int layer = -999999;
21072115
if (detIdStub.subdetId() == StripSubdetector::TOB) {
2108-
layer = static_cast<int>(tTopo->layer(detIdStub));
2116+
layer = static_cast<int>(tTopo.layer(detIdStub));
21092117
tmp_matchtrkExt_lhits += pow(10, layer - 1);
21102118
} else if (detIdStub.subdetId() == StripSubdetector::TID) {
2111-
layer = static_cast<int>(tTopo->layer(detIdStub));
2119+
layer = static_cast<int>(tTopo.layer(detIdStub));
21122120
tmp_matchtrkExt_dhits += pow(10, layer - 1);
21132121
}
21142122
}

0 commit comments

Comments
 (0)