CMS 3D CMS Logo

TracktoRPC.cc
Go to the documentation of this file.
12 #include "TracktoRPC.h"
13 #include "DTStationIndex.h"
14 #include "DTObjectMap.h"
15 #include "CSCStationIndex.h"
16 #include "CSCObjectMap.h"
17 
18 #include <ctime>
19 #include <TMath.h>
20 
21 bool TracktoRPC::ValidRPCSurface(RPCDetId rpcid, LocalPoint LocalP, const RPCGeometry *rpcGeo) {
22  const GeomDet *whichdet3 = rpcGeo->idToDet(rpcid.rawId());
23  const RPCRoll *aroll = dynamic_cast<const RPCRoll *>(whichdet3);
24  float locx = LocalP.x(), locy = LocalP.y(); //, locz=LocalP.z();
25  if (aroll->isBarrel()) {
26  const Bounds &rollbound = rpcGeo->idToDet((rpcid))->surface().bounds();
27  float boundlength = rollbound.length();
28  float boundwidth = rollbound.width();
29 
30  if (fabs(locx) < boundwidth / 2 && fabs(locy) < boundlength / 2 && locy > -boundlength / 2)
31  return true;
32  else
33  return false;
34 
35  } else if (aroll->isForward()) {
36  const Bounds &rollbound = rpcGeo->idToDet((rpcid))->surface().bounds();
37  float boundlength = rollbound.length();
38  float boundwidth = rollbound.width();
39 
40  float nminx = TMath::Pi() * (18 * boundwidth / TMath::Pi() - boundlength) / 18;
41  float ylimit = ((boundlength) / (boundwidth / 2 - nminx / 2)) * fabs(locx) + boundlength / 2 -
42  ((boundlength) / (boundwidth / 2 - nminx / 2)) * (boundwidth / 2);
43  if (ylimit < -boundlength / 2)
44  ylimit = -boundlength / 2;
45 
46  if (fabs(locx) < boundwidth / 2 && fabs(locy) < boundlength / 2 && locy > ylimit)
47  return true;
48  else
49  return false;
50  } else
51  return false;
52 }
53 
55  : rpcGeoToken_(iC.esConsumes()),
56  dtGeoToken_(iC.esConsumes()),
57  dtMapToken_(iC.esConsumes()),
58  cscGeoToken_(iC.esConsumes()),
59  cscMapToken_(iC.esConsumes()),
60  propagatorToken_(iC.esConsumes(edm::ESInputTag("", "SteppingHelixPropagatorAny"))) {
61  if (tracklabel.label().find("cosmic") == 0)
62  theTrackTransformer = std::make_unique<TrackTransformerForCosmicMuons>(iConfig, iC);
63  else if (tracklabel.label().find("globalCosmic") == 0)
64  theTrackTransformer = std::make_unique<TrackTransformerForCosmicMuons>(iConfig, iC);
65  else
66  theTrackTransformer = std::make_unique<TrackTransformer>(iConfig, iC);
67 }
68 
69 std::unique_ptr<RPCRecHitCollection> TracktoRPC::thePoints(reco::TrackCollection const *alltracks,
70  edm::EventSetup const &iSetup,
71  bool debug) {
72  auto _ThePoints = std::make_unique<RPCRecHitCollection>();
73  // if(alltracks->empty()) return;
74 
75  theTrackTransformer->setServices(iSetup);
76 
77  const RPCGeometry *rpcGeo = &iSetup.getData(rpcGeoToken_);
78  const DTGeometry *dtGeo = &iSetup.getData(dtGeoToken_);
79  const DTObjectMap *dtMap = &iSetup.getData(dtMapToken_);
80  const CSCGeometry *cscGeo = &iSetup.getData(cscGeoToken_);
81  const CSCObjectMap *cscMap = &iSetup.getData(cscMapToken_);
83 
84  edm::OwnVector<RPCRecHit> RPCPointVector;
85  std::vector<uint32_t> rpcput;
86  double MaxD = 999.;
87 
88  for (TrackCollection::const_iterator track = alltracks->begin(); track != alltracks->end(); track++) {
90  if (debug)
91  std::cout << "Building Trajectory from Track. " << std::endl;
92 
93  std::vector<uint32_t> rpcrolls;
94  std::vector<uint32_t> rpcrolls2;
95  std::map<uint32_t, int> rpcNdtcsc;
96  std::map<uint32_t, int> rpcrollCounter;
97 
98  float tInX = track->innerPosition().X(), tInY = track->innerPosition().Y(), tInZ = track->innerPosition().Z();
99  float tOuX = track->outerPosition().X(), tOuY = track->outerPosition().Y(), tOuZ = track->outerPosition().Z();
100  if (tInX > tOuX) {
101  float temp = tOuX;
102  tOuX = tInX;
103  tInX = temp;
104  }
105  if (tInY > tOuY) {
106  float temp = tOuY;
107  tOuY = tInY;
108  tInY = temp;
109  }
110  if (tInZ > tOuZ) {
111  float temp = tOuZ;
112  tOuZ = tInZ;
113  tInZ = temp;
114  }
115 
116  if (debug)
117  std::cout << "in (x,y,z): (" << tInX << ", " << tInY << ", " << tInZ << ")" << std::endl;
118  if (debug)
119  std::cout << "out (x,y,z): (" << tOuX << ", " << tOuY << ", " << tOuZ << ")" << std::endl;
120 
121  if (debug)
122  std::cout << "1. Search expeted RPC roll detid !!" << std::endl;
123  for (trackingRecHit_iterator hit = track->recHitsBegin(); hit != track->recHitsEnd(); hit++) {
124  if ((*hit)->isValid()) {
125  DetId id = (*hit)->geographicalId();
126 
127  if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::DT) {
128  const GeomDet *geomDet = dtGeo->idToDet((*hit)->geographicalId());
129  const DTLayer *dtlayer = dynamic_cast<const DTLayer *>(geomDet);
130  if (dtlayer)
131  for (Trajectories::const_iterator trajectory = trajectories.begin(); trajectory != trajectories.end();
132  ++trajectory) {
133  const BoundPlane &DTSurface = dtlayer->surface();
134  const GlobalPoint dcPoint = DTSurface.toGlobal(LocalPoint(0., 0., 0.));
135 
136  TrajectoryMeasurement tMt = trajectory->closestMeasurement(dcPoint);
137  const TrajectoryStateOnSurface &upd2 = (tMt).updatedState();
138  if (upd2.isValid()) {
139  LocalPoint trajLP = upd2.localPosition();
140  LocalPoint trackLP = (*hit)->localPosition();
141  float dx = trajLP.x() - trackLP.x(), dy = trajLP.y() - trackLP.y(); //, dz=trajLP.z()-trackLP.z();
142  if (dx > 10. && dy > 10.)
143  continue;
144 
145  DTChamberId dtid(geomDet->geographicalId().rawId());
146  int dtW = dtid.wheel(), dtS = dtid.sector(), dtT = dtid.station();
147  if (dtS == 13)
148  dtS = 4;
149  if (dtS == 14)
150  dtS = 10;
151  DTStationIndex theindex(0, dtW, dtS, dtT);
152  const std::set<RPCDetId> &rollsForThisDT = dtMap->getRolls(theindex);
153  for (std::set<RPCDetId>::iterator iteraRoll = rollsForThisDT.begin(); iteraRoll != rollsForThisDT.end();
154  iteraRoll++) {
155  const RPCRoll *rollasociated = rpcGeo->roll(*iteraRoll);
156 
158  propagator->propagate(upd2, rpcGeo->idToDet(rollasociated->id())->surface());
159  if (ptss.isValid())
160  if (ValidRPCSurface(rollasociated->id().rawId(), ptss.localPosition(), rpcGeo)) {
161  rpcrollCounter[rollasociated->id().rawId()]++;
162  bool check = true;
163  std::vector<uint32_t>::iterator rpcroll;
164  for (rpcroll = rpcrolls.begin(); rpcroll < rpcrolls.end(); rpcroll++)
165  if (rollasociated->id().rawId() == *rpcroll)
166  check = false;
167  if (check == true) {
168  rpcrolls.push_back(rollasociated->id().rawId());
169  RPCGeomServ servId(rollasociated->id().rawId());
170  if (debug)
171  std::cout << "1\t Barrel RPC roll" << rollasociated->id().rawId() << " "
172  << servId.name().c_str() << std::endl;
173  }
174  }
175  }
176  }
177  }
178  } else if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::CSC) {
179  const GeomDet *geomDet = cscGeo->idToDet((*hit)->geographicalId());
180  const CSCLayer *csclayer = dynamic_cast<const CSCLayer *>(geomDet);
181 
182  CSCDetId cscid(geomDet->geographicalId().rawId());
183  if (csclayer)
184  for (Trajectories::const_iterator trajectory = trajectories.begin(); trajectory != trajectories.end();
185  ++trajectory) {
186  const BoundPlane &CSCSurface = csclayer->surface();
187  const GlobalPoint dcPoint = CSCSurface.toGlobal(LocalPoint(0., 0., 0.));
188 
189  TrajectoryMeasurement tMt = trajectory->closestMeasurement(dcPoint);
190  const TrajectoryStateOnSurface &upd2 = (tMt).updatedState();
191 
192  if (upd2.isValid() && cscid.station() != 4 && cscid.ring() != 1) {
193  LocalPoint trajLP = upd2.localPosition();
194  LocalPoint trackLP = (*hit)->localPosition();
195  float dx = trajLP.x() - trackLP.x(), dy = trajLP.y() - trackLP.y(); //, dz=trajLP.z()-trackLP.z();
196  if (dx > 10. && dy > 10.)
197  continue;
198 
199  int En = cscid.endcap(), St = cscid.station(), Ri = cscid.ring();
200  int rpcSegment = cscid.chamber();
201  if (En == 2)
202  En = -1;
203  if (Ri == 4)
204  Ri = 1;
205 
206  CSCStationIndex theindex(En, St, Ri, rpcSegment);
207  const std::set<RPCDetId> &rollsForThisCSC = cscMap->getRolls(theindex);
208  for (std::set<RPCDetId>::iterator iteraRoll = rollsForThisCSC.begin();
209  iteraRoll != rollsForThisCSC.end();
210  iteraRoll++) {
211  const RPCRoll *rollasociated = rpcGeo->roll(*iteraRoll);
212 
214  propagator->propagate(upd2, rpcGeo->idToDet(rollasociated->id())->surface());
215  if (ptss.isValid())
216  if (ValidRPCSurface(rollasociated->id().rawId(), ptss.localPosition(), rpcGeo)) {
217  rpcrollCounter[rollasociated->id().rawId()]++;
218  bool check = true;
219  std::vector<uint32_t>::iterator rpcroll;
220  for (rpcroll = rpcrolls.begin(); rpcroll < rpcrolls.end(); rpcroll++)
221  if (rollasociated->id().rawId() == *rpcroll)
222  check = false;
223  if (check == true) {
224  rpcrolls.push_back(rollasociated->id().rawId());
225  RPCGeomServ servId(rollasociated->id().rawId());
226  if (debug)
227  std::cout << "1\t Forward RPC roll" << rollasociated->id().rawId() << " "
228  << servId.name().c_str() << std::endl;
229  }
230  }
231  }
232  }
233  }
234  } else {
235  if (debug)
236  std::cout << "1\t The hit is not DT/CSC's. " << std::endl;
237  }
238  }
239  }
240  if (debug)
241  std::cout << "First step OK!!\n2. Search nearest DT/CSC sufrace!!" << std::endl;
242  std::vector<uint32_t>::iterator rpcroll;
243  for (rpcroll = rpcrolls.begin(); rpcroll < rpcrolls.end(); rpcroll++) {
244  RPCDetId rpcid(*rpcroll);
245  const GlobalPoint &rGP = rpcGeo->idToDet(*rpcroll)->surface().toGlobal(LocalPoint(0, 0, 0));
246  RPCGeomServ servId(rpcid);
247  int rEn = rpcid.region(), rSe = rpcid.sector(), rWr = rpcid.ring(), rSt = rpcid.station(), rCh = servId.segment();
248 
249  if (rpcrollCounter[*rpcroll] < 3)
250  continue;
251 
252  uint32_t dtcscid = 0;
253  double distance = MaxD;
254 
255  // if(rSt ==2 && rEn==0) MaxD=100;
256  // else if(rSt ==3 && rEn==0) MaxD=100;
257  // else if(rSt ==4 && rEn==0) MaxD =150;
258  for (trackingRecHit_iterator hit = track->recHitsBegin(); hit != track->recHitsEnd(); hit++) {
259  if ((*hit)->isValid()) {
260  DetId id = (*hit)->geographicalId();
261  if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::DT) {
262  const GeomDet *geomDet = dtGeo->idToDet((*hit)->geographicalId());
263  //const DTLayer *dtlayer = dynamic_cast<const DTLayer *>(geomDet);
264  const GlobalPoint &dtGP = dtGeo->idToDet((*hit)->geographicalId())->surface().toGlobal(LocalPoint(0, 0, 0));
265  double dx = rGP.x() - dtGP.x(), dy = rGP.y() - dtGP.y(), dz = rGP.z() - dtGP.z();
266  double distanceN = sqrt(dx * dx + dy * dy + dz * dz);
267 
268  DTChamberId dtid(geomDet->geographicalId().rawId());
269  int Se = dtid.sector(), Wh = dtid.wheel(), St = dtid.station();
270  if (Se == 13)
271  Se = 4;
272  if (Se == 14)
273  Se = 10;
274 
275  if (rEn == 0 && (rSe - Se) == 0 && (rWr - Wh) == 0 && (rSt - St) == 0 && distanceN < distance) {
276  dtcscid = geomDet->geographicalId().rawId();
277  distance = distanceN;
278  if (debug)
279  std::cout << "2\t DT " << dtcscid << " Wheel : " << Wh << " station : " << St << " sector : " << Se
280  << std::endl;
281  }
282  } else if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::CSC) {
283  const GeomDet *geomDet = cscGeo->idToDet((*hit)->geographicalId());
284  //const CSCLayer *csclayer = dynamic_cast<const CSCLayer *>(geomDet);
285  const GlobalPoint &cscGP =
286  cscGeo->idToDet((*hit)->geographicalId())->surface().toGlobal(LocalPoint(0, 0, 0));
287  double dx = rGP.x() - cscGP.x(), dy = rGP.y() - cscGP.y(), dz = rGP.z() - cscGP.z();
288  double distanceN = sqrt(dx * dx + dy * dy + dz * dz);
289 
290  CSCDetId cscid(geomDet->geographicalId().rawId());
291  int En = cscid.endcap(), Ri = cscid.ring(), St = cscid.station(), Ch = cscid.chamber();
292  if (En == 2)
293  En = -1;
294  if (Ri == 4)
295  Ri = 1;
296 
297  if ((rEn - En) == 0 && (rSt - St) == 0 && (Ch - rCh) == 0 && rWr != 1 && rSt != 4 && distanceN < distance) {
298  dtcscid = geomDet->geographicalId().rawId();
299  distance = distanceN;
300  if (debug)
301  std::cout << "2\t CSC " << dtcscid << " region : " << En << " station : " << St << " Ring : " << Ri
302  << " chamber : " << Ch << std::endl;
303  }
304  }
305  }
306  }
307  if (dtcscid != 0 && distance < MaxD) {
308  rpcrolls2.push_back(*rpcroll);
309  rpcNdtcsc[*rpcroll] = dtcscid;
310  }
311  }
312  if (debug)
313  std::cout << "Second step OK!! \n3. Propagate to RPC from DT/CSC!!" << std::endl;
314  //std::map<uint32_t, int> rpcput;
315  std::vector<uint32_t>::iterator rpcroll2;
316  for (rpcroll2 = rpcrolls2.begin(); rpcroll2 < rpcrolls2.end(); rpcroll2++) {
317  bool check = true;
318  std::vector<uint32_t>::iterator rpcput_;
319  for (rpcput_ = rpcput.begin(); rpcput_ < rpcput.end(); rpcput_++)
320  if (*rpcroll2 == *rpcput_)
321  check = false;
322 
323  if (check == true) {
324  uint32_t dtcscid = rpcNdtcsc[*rpcroll2];
325  DetId id(dtcscid);
326  if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::DT) {
327  const GeomDet *geomDet = dtGeo->idToDet(dtcscid);
328  const DTLayer *dtlayer = dynamic_cast<const DTLayer *>(geomDet);
329 
330  if (dtlayer)
331  for (Trajectories::const_iterator trajectory = trajectories.begin(); trajectory != trajectories.end();
332  ++trajectory) {
333  const BoundPlane &DTSurface = dtlayer->surface();
334  const GlobalPoint dcPoint = DTSurface.toGlobal(LocalPoint(0., 0., 0.));
335 
336  TrajectoryMeasurement tMt = trajectory->closestMeasurement(dcPoint);
337  const TrajectoryStateOnSurface &upd2 = (tMt).updatedState();
338  if (upd2.isValid()) {
339  TrajectoryStateOnSurface ptss = propagator->propagate(upd2, rpcGeo->idToDet(*rpcroll2)->surface());
340  if (ptss.isValid())
341  if (ValidRPCSurface(*rpcroll2, ptss.localPosition(), rpcGeo)) {
342  float rpcGPX = ptss.globalPosition().x();
343  float rpcGPY = ptss.globalPosition().y();
344  float rpcGPZ = ptss.globalPosition().z();
345 
346  if (tInX > rpcGPX || tOuX < rpcGPX)
347  continue;
348  if (tInY > rpcGPY || tOuY < rpcGPY)
349  continue;
350  if (tInZ > rpcGPZ || tOuZ < rpcGPZ)
351  continue;
352 
353  const GeomDet *geomDet2 = rpcGeo->idToDet(*rpcroll2);
354  const RPCRoll *aroll = dynamic_cast<const RPCRoll *>(geomDet2);
355  const RectangularStripTopology *top_ =
356  dynamic_cast<const RectangularStripTopology *>(&(aroll->topology()));
357  LocalPoint xmin = top_->localPosition(0.);
358  LocalPoint xmax = top_->localPosition((float)aroll->nstrips());
359  float rsize = fabs(xmax.x() - xmin.x());
360  float stripl = top_->stripLength();
361  //float stripw = top_->pitch();
362  float eyr = 1;
363 
364  float locx = ptss.localPosition().x(), locy = ptss.localPosition().y(),
365  locz = ptss.localPosition().z();
366  if (locx < rsize * eyr && locy < stripl * eyr && locz < 1.) {
367  RPCRecHit RPCPoint(*rpcroll2, 0, LocalPoint(locx, locy, locz));
368 
369  RPCGeomServ servId(*rpcroll2);
370  if (debug)
371  std::cout << "3\t Barrel Expected RPC " << servId.name().c_str()
372  << " \tLocalposition X: " << locx << ", Y: " << locy << " GlobalPosition(x,y,z) ("
373  << rpcGPX << ", " << rpcGPY << ", " << rpcGPZ << ")" << std::endl;
374  RPCPointVector.clear();
375  RPCPointVector.push_back(RPCPoint);
376  _ThePoints->put(*rpcroll2, RPCPointVector.begin(), RPCPointVector.end());
377  rpcput.push_back(*rpcroll2);
378  }
379  }
380  }
381  }
382  } else if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::CSC) {
383  const GeomDet *geomDet4 = cscGeo->idToDet(dtcscid);
384  const CSCLayer *csclayer = dynamic_cast<const CSCLayer *>(geomDet4);
385 
386  if (csclayer)
387  for (Trajectories::const_iterator trajectory = trajectories.begin(); trajectory != trajectories.end();
388  ++trajectory) {
389  const BoundPlane &CSCSurface = csclayer->surface();
390  const GlobalPoint dcPoint = CSCSurface.toGlobal(LocalPoint(0., 0., 0.));
391 
392  TrajectoryMeasurement tMt = trajectory->closestMeasurement(dcPoint);
393  const TrajectoryStateOnSurface &upd2 = (tMt).updatedState();
394  if (upd2.isValid()) {
395  TrajectoryStateOnSurface ptss = propagator->propagate(upd2, rpcGeo->idToDet(*rpcroll2)->surface());
396  if (ptss.isValid())
397  if (ValidRPCSurface(*rpcroll2, ptss.localPosition(), rpcGeo)) {
398  float rpcGPX = ptss.globalPosition().x();
399  float rpcGPY = ptss.globalPosition().y();
400  float rpcGPZ = ptss.globalPosition().z();
401 
402  if (tInX > rpcGPX || tOuX < rpcGPX)
403  continue;
404  if (tInY > rpcGPY || tOuY < rpcGPY)
405  continue;
406  if (tInZ > rpcGPZ || tOuZ < rpcGPZ)
407  continue;
408 
409  RPCDetId rpcid(*rpcroll2);
410  const GeomDet *geomDet3 = rpcGeo->idToDet(*rpcroll2);
411  const RPCRoll *aroll = dynamic_cast<const RPCRoll *>(geomDet3);
412  const TrapezoidalStripTopology *top_ =
413  dynamic_cast<const TrapezoidalStripTopology *>(&(aroll->topology()));
414  LocalPoint xmin = top_->localPosition(0.);
415  LocalPoint xmax = top_->localPosition((float)aroll->nstrips());
416  float rsize = fabs(xmax.x() - xmin.x());
417  float stripl = top_->stripLength();
418  //float stripw = top_->pitch();
419 
420  float eyr = 1;
422  float locx = ptss.localPosition().x(), locy = ptss.localPosition().y(),
423  locz = ptss.localPosition().z();
424  if (locx < rsize * eyr && locy < stripl * eyr && locz < 1.) {
425  RPCRecHit RPCPoint(*rpcroll2, 0, LocalPoint(locx, locy, locz));
426  RPCGeomServ servId(*rpcroll2);
427  if (debug)
428  std::cout << "3\t Forward Expected RPC " << servId.name().c_str()
429  << " \tLocalposition X: " << locx << ", Y: " << locy << " GlobalPosition(x,y,z) ("
430  << rpcGPX << ", " << rpcGPY << ", " << rpcGPZ << ")" << std::endl;
431  RPCPointVector.clear();
432  RPCPointVector.push_back(RPCPoint);
433  _ThePoints->put(*rpcroll2, RPCPointVector.begin(), RPCPointVector.end());
434  rpcput.push_back(*rpcroll2);
435  }
436  }
437  }
438  }
439  }
440  }
441  }
442  if (debug)
443  std::cout << "last steps OK!! " << std::endl;
444  }
445 
446  return _ThePoints;
447 }
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
Definition: RPCDetId.h:81
std::vector< Trajectory > Trajectories
const double Pi
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
LocalPoint localPosition(float strip) const override
edm::ESGetToken< DTObjectMap, MuonGeometryRecord > dtMapToken_
Definition: TracktoRPC.h:77
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
virtual float length() const =0
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< CSCObjectMap, MuonGeometryRecord > cscMapToken_
Definition: TracktoRPC.h:79
T z() const
Definition: PV3DBase.h:61
bool isForward() const
Definition: RPCRoll.cc:43
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
int ring() const
Definition: RPCDetId.h:59
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
Definition: RPCGeometry.cc:50
std::string const & label() const
Definition: InputTag.h:36
int nstrips() const
Definition: RPCRoll.cc:24
std::unique_ptr< TrackTransformerBase > theTrackTransformer
Definition: TracktoRPC.h:81
std::set< RPCDetId > const & getRolls(DTStationIndex index) const
Definition: DTObjectMap.cc:36
iterator begin()
Definition: OwnVector.h:280
float stripLength() const override
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
void push_back(D *&d)
Definition: OwnVector.h:326
virtual std::string name()
Definition: RPCGeomServ.cc:11
GlobalPoint globalPosition() const
bool isBarrel() const
Definition: RPCRoll.cc:41
TracktoRPC(const edm::ParameterSet &iConfig, const edm::InputTag &tracklabel, edm::ConsumesCollector iC)
Definition: TracktoRPC.cc:54
std::unique_ptr< RPCRecHitCollection > thePoints(reco::TrackCollection const *alltracks, edm::EventSetup const &iSetup, bool debug)
Definition: TracktoRPC.cc:69
T sqrt(T t)
Definition: SSEVec.h:19
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77
void clear()
Definition: OwnVector.h:481
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
Definition: TracktoRPC.h:80
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeoToken_
Definition: TracktoRPC.h:78
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Definition: DetId.h:17
bool ValidRPCSurface(RPCDetId rpcid, LocalPoint LocalP, const RPCGeometry *rpcGeo)
Definition: TracktoRPC.cc:21
iterator end()
Definition: OwnVector.h:285
virtual int segment()
Definition: RPCGeomServ.cc:361
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
#define debug
Definition: HDRShower.cc:19
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int endcap() const
Definition: CSCDetId.h:85
int station() const
Definition: RPCDetId.h:78
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeoToken_
Definition: TracktoRPC.h:76
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:53
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:42
HLT enums.
int sector() const
Definition: DTChamberId.h:52
const Topology & topology() const override
Definition: RPCRoll.cc:18
RPCDetId id() const
Definition: RPCRoll.cc:16
Definition: Bounds.h:18
static constexpr int DT
Definition: MuonSubdetId.h:11
float stripLength() const override
det heigth (strip length in the middle)
static constexpr int CSC
Definition: MuonSubdetId.h:12
virtual float width() const =0
const GeomDet * idToDet(DetId) const override
Definition: RPCGeometry.cc:32
std::set< RPCDetId > const & getRolls(CSCStationIndex index) const
Definition: CSCObjectMap.cc:42
LocalPoint localPosition(float strip) const override
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeoToken_
Definition: TracktoRPC.h:75
const GeomDet * idToDet(DetId) const override
Definition: CSCGeometry.cc:91
const Bounds & bounds() const
Definition: Surface.h:87