CMS 3D CMS Logo

L1FPGATrackProducer.cc
Go to the documentation of this file.
1 // Producer by Anders //
3 // and Emmanuele //
4 // july 2012 @ CU //
6 
8 // FRAMEWORK HEADERS
11 //
18 //
22 
24 // DATA FORMATS HEADERS
27 //
32 //
35 
46 //
49 //
55 //
58 //
63 
65 // DETECTOR GEOMETRY HEADERS
76 //
78 
80 // Tracklet emulation
86 
88 // PHYSICS TOOLS
91 
94 
97 
99 // STD HEADERS
100 #include <memory>
101 #include <string>
102 #include <iostream>
103 #include <fstream>
104 
106 // NAMESPACES
107 using namespace edm;
108 using namespace std;
109 
111 // //
112 // CLASS DEFINITION //
113 // //
115 
117 // this class is needed to make a map
118 // between different types of stubs
120 public:
121  bool operator()(const trklet::L1TStub& x, const trklet::L1TStub& y) const {
122  if (x.x() != y.x())
123  return (y.x() > x.x());
124  else {
125  if (x.y() != y.y())
126  return (y.y() > x.y());
127  else
128  return (x.z() > y.z());
129  }
130  }
131 };
132 
133 class L1FPGATrackProducer : public edm::one::EDProducer<edm::one::WatchRuns> {
134 public:
136  explicit L1FPGATrackProducer(const edm::ParameterSet& iConfig);
137  ~L1FPGATrackProducer() override;
138 
139 private:
140  int eventnum;
141 
144 
146 
152 
156 
159 
161  std::ofstream asciiEventOut_;
162 
164 
165  // settings containing various constants for the tracklet processing
167 
168  // event processor for the tracklet track finding
170 
171  unsigned int nHelixPar_;
172  bool extended_;
173 
175  std::unique_ptr<TrackQuality> trackQualityModel_;
176 
177  std::map<string, vector<int>> dtclayerdisk;
178 
181 
188 
191 
196 
199  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override;
200  void endRun(edm::Run const&, edm::EventSetup const&) override;
201  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
202 };
203 
205 // CONSTRUCTOR
207  : config(iConfig),
208  readMoreMcTruth_(iConfig.getParameter<bool>("readMoreMcTruth")),
209  MCTruthClusterInputTag(readMoreMcTruth_ ? config.getParameter<edm::InputTag>("MCTruthClusterInputTag")
210  : edm::InputTag()),
211  MCTruthStubInputTag(readMoreMcTruth_ ? config.getParameter<edm::InputTag>("MCTruthStubInputTag")
212  : edm::InputTag()),
213  TrackingParticleInputTag(readMoreMcTruth_ ? iConfig.getParameter<edm::InputTag>("TrackingParticleInputTag")
214  : edm::InputTag()),
215  TrackingVertexInputTag(readMoreMcTruth_ ? iConfig.getParameter<edm::InputTag>("TrackingVertexInputTag")
216  : edm::InputTag()),
217  ttStubSrc_(config.getParameter<edm::InputTag>("TTStubSource")),
218  bsSrc_(config.getParameter<edm::InputTag>("BeamSpotSource")),
219 
220  ttStubToken_(consumes<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>>(ttStubSrc_)),
221  bsToken_(consumes<reco::BeamSpot>(bsSrc_)) {
222  if (readMoreMcTruth_) {
223  ttClusterMCTruthToken_ = consumes<TTClusterAssociationMap<Ref_Phase2TrackerDigi_>>(MCTruthClusterInputTag);
224  ttStubMCTruthToken_ = consumes<TTStubAssociationMap<Ref_Phase2TrackerDigi_>>(MCTruthStubInputTag);
225  TrackingParticleToken_ = consumes<std::vector<TrackingParticle>>(TrackingParticleInputTag);
226  TrackingVertexToken_ = consumes<std::vector<TrackingVertex>>(TrackingVertexInputTag);
227  }
228 
229  produces<std::vector<TTTrack<Ref_Phase2TrackerDigi_>>>("Level1TTTracks").setBranchAlias("Level1TTTracks");
230 
231  asciiEventOutName_ = iConfig.getUntrackedParameter<string>("asciiFileName", "");
232 
233  fitPatternFile = iConfig.getParameter<edm::FileInPath>("fitPatternFile");
234  processingModulesFile = iConfig.getParameter<edm::FileInPath>("processingModulesFile");
235  memoryModulesFile = iConfig.getParameter<edm::FileInPath>("memoryModulesFile");
236  wiresFile = iConfig.getParameter<edm::FileInPath>("wiresFile");
237 
238  DTCLinkFile = iConfig.getParameter<edm::FileInPath>("DTCLinkFile");
239  moduleCablingFile = iConfig.getParameter<edm::FileInPath>("moduleCablingFile");
240  DTCLinkLayerDiskFile = iConfig.getParameter<edm::FileInPath>("DTCLinkLayerDiskFile");
241 
242  extended_ = iConfig.getParameter<bool>("Extended");
243  nHelixPar_ = iConfig.getParameter<unsigned int>("Hnpar");
244 
245  if (extended_) {
246  tableTEDFile = iConfig.getParameter<edm::FileInPath>("tableTEDFile");
247  tableTREFile = iConfig.getParameter<edm::FileInPath>("tableTREFile");
248  }
249 
250  // --------------------------------------------------------------------------------
251  // set options in Settings based on inputs from configuration files
252  // --------------------------------------------------------------------------------
253 
256 
264 
265  if (extended_) {
268 
269  //FIXME: The TED and TRE tables are currently disabled by default, so we
270  //need to allow for the additional tracklets that will eventually be
271  //removed by these tables, once they are finalized
273  }
274 
275  eventnum = 0;
276  if (not asciiEventOutName_.empty()) {
277  asciiEventOut_.open(asciiEventOutName_.c_str());
278  }
279 
280  if (settings.debugTracklet()) {
281  edm::LogVerbatim("Tracklet") << "cabling DTC links : " << DTCLinkFile.fullPath()
282  << "\n module cabling : " << moduleCablingFile.fullPath()
283  << "\n DTC link layer disk : " << DTCLinkLayerDiskFile.fullPath()
284  << "\n fit pattern : " << fitPatternFile.fullPath()
285  << "\n process modules : " << processingModulesFile.fullPath()
286  << "\n memory modules : " << memoryModulesFile.fullPath()
287  << "\n wires : " << wiresFile.fullPath();
288  if (extended_) {
289  edm::LogVerbatim("Tracklet") << "table_TED : " << tableTEDFile.fullPath()
290  << "\n table_TRE : " << tableTREFile.fullPath();
291  }
292  }
293 
294  trackQuality_ = iConfig.getParameter<bool>("TrackQuality");
295  if (trackQuality_) {
296  trackQualityModel_ = std::make_unique<TrackQuality>(iConfig.getParameter<edm::ParameterSet>("TrackQualityPSet"));
297  }
298 }
299 
301 // DESTRUCTOR
303  if (asciiEventOut_.is_open()) {
304  asciiEventOut_.close();
305  }
306 }
307 
309 //
311 
313 // BEGIN JOB
316  // GET MAGNETIC FIELD //
317  edm::ESHandle<MagneticField> magneticFieldHandle;
318  iSetup.get<IdealMagneticFieldRecord>().get(magneticFieldHandle);
319  const MagneticField* theMagneticField = magneticFieldHandle.product();
320  double mMagneticFieldStrength = theMagneticField->inTesla(GlobalPoint(0, 0, 0)).z();
321  settings.setBfield(mMagneticFieldStrength);
322 
323  // initialize the tracklet event processing (this sets all the processing & memory modules, wiring, etc)
325 }
326 
328 // PRODUCE
330  typedef std::map<trklet::L1TStub,
333  stubMapType;
335  TTClusterRef;
336 
338  auto L1TkTracksForOutput = std::make_unique<std::vector<TTTrack<Ref_Phase2TrackerDigi_>>>();
339 
340  stubMapType stubMap;
341 
343  edm::ESHandle<TrackerGeometry> geometryHandle;
344 
346  iSetup.get<TrackerDigiGeometryRecord>().get(geometryHandle);
347 
349  // GET BS //
350  edm::Handle<reco::BeamSpot> beamSpotHandle;
351  iEvent.getByToken(bsToken_, beamSpotHandle);
352  math::XYZPoint bsPosition = beamSpotHandle->position();
353 
356 
357  eventnum++;
359  ev.setEventNum(eventnum);
360  ev.setIPx(bsPosition.x());
361  ev.setIPy(bsPosition.y());
362 
363  // tracking particles
364  edm::Handle<std::vector<TrackingParticle>> TrackingParticleHandle;
365  edm::Handle<std::vector<TrackingVertex>> TrackingVertexHandle;
366  if (readMoreMcTruth_)
367  iEvent.getByToken(TrackingParticleToken_, TrackingParticleHandle);
368  if (readMoreMcTruth_)
369  iEvent.getByToken(TrackingVertexToken_, TrackingVertexHandle);
370 
371  // tracker topology
372  const TrackerTopology* const tTopo = tTopoHandle.product();
373  const TrackerGeometry* const theTrackerGeom = tGeomHandle.product();
374 
376  // GET THE PRIMITIVES //
378  iEvent.getByToken(ttStubToken_, Phase2TrackerDigiTTStubHandle);
379 
380  // must be defined for code to compile, even if it's not used unless readMoreMcTruth_ is true
381  map<edm::Ptr<TrackingParticle>, int> translateTP;
382 
383  // MC truth association maps
386  if (readMoreMcTruth_) {
387  iEvent.getByToken(ttClusterMCTruthToken_, MCTruthTTClusterHandle);
388  iEvent.getByToken(ttStubMCTruthToken_, MCTruthTTStubHandle);
389 
392 
393  int ntps = 1; //count from 1 ; 0 will mean invalid
394 
395  int this_tp = 0;
396  for (const auto& iterTP : *TrackingParticleHandle) {
397  edm::Ptr<TrackingParticle> tp_ptr(TrackingParticleHandle, this_tp);
398  this_tp++;
399 
400  // only keep TPs producing a cluster
401  if (MCTruthTTClusterHandle->findTTClusterRefs(tp_ptr).empty())
402  continue;
403 
404  if (iterTP.g4Tracks().empty()) {
405  continue;
406  }
407 
408  int sim_eventid = iterTP.g4Tracks().at(0).eventId().event();
409  int sim_type = iterTP.pdgId();
410  float sim_pt = iterTP.pt();
411  float sim_eta = iterTP.eta();
412  float sim_phi = iterTP.phi();
413 
414  float vx = iterTP.vertex().x();
415  float vy = iterTP.vertex().y();
416  float vz = iterTP.vertex().z();
417 
418  if (sim_pt < 1.0 || std::abs(vz) > 100.0 || hypot(vx, vy) > 50.0)
419  continue;
420 
421  ev.addL1SimTrack(sim_eventid, ntps, sim_type, sim_pt, sim_eta, sim_phi, vx, vy, vz);
422 
423  translateTP[tp_ptr] = ntps;
424  ntps++;
425 
426  } //end loop over TPs
427 
428  } // end if (readMoreMcTruth_)
429 
433 
434  bool firstPS = true;
435  bool first2S = true;
436 
437  for (const auto& gd : theTrackerGeom->dets()) {
438  DetId detid = (*gd).geographicalId();
439  if (detid.subdetId() != StripSubdetector::TOB && detid.subdetId() != StripSubdetector::TID)
440  continue; // only run on OT
441  if (!tTopo->isLower(detid))
442  continue; // loop on the stacks: choose the lower arbitrarily
443  DetId stackDetid = tTopo->stack(detid); // Stub module detid
444 
445  if (Phase2TrackerDigiTTStubHandle->find(stackDetid) == Phase2TrackerDigiTTStubHandle->end())
446  continue;
447 
448  // Get the DetSets of the Clusters
449  edmNew::DetSet<TTStub<Ref_Phase2TrackerDigi_>> stubs = (*Phase2TrackerDigiTTStubHandle)[stackDetid];
450  const GeomDetUnit* det0 = theTrackerGeom->idToDetUnit(detid);
451  const auto* theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(det0);
452  const PixelTopology* topol = dynamic_cast<const PixelTopology*>(&(theGeomDet->specificTopology()));
453 
454  bool isPSmodule = theTrackerGeom->getDetectorType(detid) == TrackerGeometry::ModuleType::Ph2PSP;
455 
456  // set constants that are common for all modules/stubs of a given type (PS vs 2S)
457  if (isPSmodule && firstPS) {
458  settings.setNStrips_PS(topol->nrows());
459  settings.setStripPitch_PS(topol->pitch().first);
460  settings.setStripLength_PS(topol->pitch().second);
461  firstPS = false;
462  }
463  if (!isPSmodule && first2S) {
464  settings.setNStrips_2S(topol->nrows());
465  settings.setStripPitch_2S(topol->pitch().first);
466  settings.setStripLength_2S(topol->pitch().second);
467  first2S = false;
468  }
469 
470  // loop over stubs
471  for (auto stubIter = stubs.begin(); stubIter != stubs.end(); ++stubIter) {
473  edmNew::makeRefTo(Phase2TrackerDigiTTStubHandle, stubIter);
474 
475  vector<int> assocTPs;
476 
477  if (readMoreMcTruth_) {
478  for (unsigned int iClus = 0; iClus <= 1; iClus++) { // Loop over both clusters that make up stub.
479 
480  const TTClusterRef& ttClusterRef = tempStubPtr->clusterRef(iClus);
481 
482  // Now identify all TP's contributing to either cluster in stub.
483  vector<edm::Ptr<TrackingParticle>> vecTpPtr = MCTruthTTClusterHandle->findTrackingParticlePtrs(ttClusterRef);
484 
485  for (const edm::Ptr<TrackingParticle>& tpPtr : vecTpPtr) {
486  if (translateTP.find(tpPtr) != translateTP.end()) {
487  if (iClus == 0) {
488  assocTPs.push_back(translateTP.at(tpPtr));
489  } else {
490  assocTPs.push_back(-translateTP.at(tpPtr));
491  }
492  // N.B. Since not all tracking particles are stored in InputData::vTPs_, sometimes no match will be found.
493  } else {
494  assocTPs.push_back(0);
495  }
496  }
497  }
498  } // end if (readMoreMcTruth_)
499 
500  MeasurementPoint coords = tempStubPtr->clusterRef(0)->findAverageLocalCoordinatesCentered();
501  LocalPoint clustlp = topol->localPosition(coords);
502  GlobalPoint posStub = theGeomDet->surface().toGlobal(clustlp);
503 
504  int eventID = -1;
505 
506  if (readMoreMcTruth_) {
507  edm::Ptr<TrackingParticle> my_tp = MCTruthTTStubHandle->findTrackingParticlePtr(tempStubPtr);
508  }
509 
510  int layer = -999999;
511  int ladder = -999999;
512  int module = -999999;
513 
514  int strip = 460;
515 
516  if (detid.subdetId() == StripSubdetector::TOB) {
517  layer = static_cast<int>(tTopo->layer(detid));
518  module = static_cast<int>(tTopo->module(detid));
519  ladder = static_cast<int>(tTopo->tobRod(detid));
520 
521  // https://github.com/cms-sw/cmssw/tree/master/Geometry/TrackerNumberingBuilder
522  // tobSide = 1: ring- (tilted)
523  // tobSide = 2: ring+ (tilted)
524  // tobSide = 3: barrel (flat)
525  enum TypeBarrel { nonBarrel = 0, tiltedMinus = 1, tiltedPlus = 2, flat = 3 };
526  const TypeBarrel type = static_cast<TypeBarrel>(tTopo->tobSide(detid));
527 
528  // modules in the flat part of barrel are mounted on planks, while modules in tilted part are on rings
529  // below, "module" is the module number in the z direction (from minus z to positive),
530  // while "ladder" is the module number in the phi direction
531 
532  if (layer > 0 && layer <= (int)trklet::N_PSLAYER) {
533  if (type == tiltedMinus) {
534  module = static_cast<int>(tTopo->tobRod(detid));
535  ladder = static_cast<int>(tTopo->module(detid));
536  }
537  if (type == tiltedPlus) {
538  module =
539  trklet::N_TILTED_RINGS + trklet::N_MOD_PLANK.at(layer - 1) + static_cast<int>(tTopo->tobRod(detid));
540  ladder = static_cast<int>(tTopo->module(detid));
541  }
542  if (type == flat) {
543  module = trklet::N_TILTED_RINGS + static_cast<int>(tTopo->module(detid));
544  }
545  }
546  } else if (detid.subdetId() == StripSubdetector::TID) {
547  layer = 1000 + static_cast<int>(tTopo->tidRing(detid));
548  ladder = static_cast<int>(tTopo->module(detid));
549  module = static_cast<int>(tTopo->tidWheel(detid));
550  }
551 
554  tempStubPtr->clusterRef(0);
556  tempStubPtr->clusterRef(1);
557 
558  std::vector<int> irphi;
559  std::vector<int> innerrows = innerCluster->getRows();
560  irphi.reserve(innerrows.size());
561  for (int innerrow : innerrows) {
562  irphi.push_back(innerrow);
563  }
564  std::vector<int> outerrows = outerCluster->getRows();
565  for (int outerrow : outerrows) {
566  irphi.push_back(outerrow);
567  }
568 
569  // -----------------------------------------------------
570  // check module orientation, if flipped, need to store that information for track fit
571  // -----------------------------------------------------
572 
573  const DetId innerDetId = innerCluster->getDetId();
574  const GeomDetUnit* det_inner = theTrackerGeom->idToDetUnit(innerDetId);
575  const auto* theGeomDet_inner = dynamic_cast<const PixelGeomDetUnit*>(det_inner);
576  const PixelTopology* topol_inner = dynamic_cast<const PixelTopology*>(&(theGeomDet_inner->specificTopology()));
577 
578  MeasurementPoint coords_inner = innerCluster->findAverageLocalCoordinatesCentered();
579  LocalPoint clustlp_inner = topol_inner->localPosition(coords_inner);
580  GlobalPoint posStub_inner = theGeomDet_inner->surface().toGlobal(clustlp_inner);
581 
582  const DetId outerDetId = outerCluster->getDetId();
583  const GeomDetUnit* det_outer = theTrackerGeom->idToDetUnit(outerDetId);
584  const auto* theGeomDet_outer = dynamic_cast<const PixelGeomDetUnit*>(det_outer);
585  const PixelTopology* topol_outer = dynamic_cast<const PixelTopology*>(&(theGeomDet_outer->specificTopology()));
586 
587  MeasurementPoint coords_outer = outerCluster->findAverageLocalCoordinatesCentered();
588  LocalPoint clustlp_outer = topol_outer->localPosition(coords_outer);
589  GlobalPoint posStub_outer = theGeomDet_outer->surface().toGlobal(clustlp_outer);
590 
591  bool isFlipped = (posStub_outer.mag() < posStub_inner.mag());
592 
593  // -----------------------------------------------------
594  // correct sign for stubs in negative endcap
595  float stub_bend = tempStubPtr->bendFE();
596  float stub_pt = -1;
597  if (layer > 999 && posStub.z() < 0.0) {
598  stub_bend = -stub_bend;
599  }
600  if (!irphi.empty()) {
601  strip = irphi[0];
602  }
603 
604  //if module FE inefficiencies are calculated, a stub is thrown out if rawBend > 100
605  if ((tempStubPtr->rawBend() < 100.) && (ev.addStub(layer,
606  ladder,
607  module,
608  strip,
609  eventID,
610  assocTPs,
611  stub_pt,
612  stub_bend,
613  posStub.x(),
614  posStub.y(),
615  posStub.z(),
616  isPSmodule,
617  isFlipped))) {
618  const trklet::L1TStub& lastStub = ev.lastStub();
619  stubMap[lastStub] = tempStubPtr;
620  }
621  }
622  }
623 
625  // NOW RUN THE L1 tracking
626 
627  if (!asciiEventOutName_.empty()) {
628  ev.write(asciiEventOut_);
629  }
630 
631  std::vector<trklet::Track*>& tracks = eventProcessor.tracks();
632 
633  trklet::L1SimTrack simtrk(0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
634 
635  // this performs the actual tracklet event processing
637 
638  int ntracks = 0;
639 
640  for (auto track : tracks) {
641  if (track->duplicate())
642  continue;
643 
644  ntracks++;
645 
646  // this is where we create the TTTrack object
647  double tmp_rinv = track->rinv(settings);
648  double tmp_phi = track->phi0(settings);
649  double tmp_tanL = track->tanL(settings);
650  double tmp_z0 = track->z0(settings);
651  double tmp_d0 = track->d0(settings);
652  double tmp_chi2rphi = track->chisqrphi();
653  double tmp_chi2rz = track->chisqrz();
654  unsigned int tmp_hit = track->hitpattern();
655 
656  TTTrack<Ref_Phase2TrackerDigi_> aTrack(tmp_rinv,
657  tmp_phi,
658  tmp_tanL,
659  tmp_z0,
660  tmp_d0,
661  tmp_chi2rphi,
662  tmp_chi2rz,
663  0,
664  0,
665  0,
666  tmp_hit,
668  settings.bfield());
669 
670  unsigned int trksector = track->sector();
671  unsigned int trkseed = (unsigned int)abs(track->seed());
672 
673  aTrack.setPhiSector(trksector);
674  aTrack.setTrackSeedType(trkseed);
675 
676  const vector<const trklet::L1TStub*>& stubptrs = track->stubs();
677  vector<trklet::L1TStub> stubs;
678 
679  stubs.reserve(stubptrs.size());
680  for (auto stubptr : stubptrs) {
681  stubs.push_back(*stubptr);
682  }
683 
684  stubMapType::const_iterator it;
685  for (const auto& itstubs : stubs) {
686  it = stubMap.find(itstubs);
687  if (it != stubMap.end()) {
688  aTrack.addStubRef(it->second);
689  } else {
690  // could not find stub in stub map
691  }
692  }
693 
694  // pt consistency
695  aTrack.setStubPtConsistency(
696  StubPtConsistency::getConsistency(aTrack, theTrackerGeom, tTopo, settings.bfield(), settings.nHelixPar()));
697 
698  // set TTTrack word
699  aTrack.setTrackWordBits();
700 
701  if (trackQuality_) {
702  trackQualityModel_->setTrackQuality(aTrack);
703  }
704 
705  // test track word
706  //aTrack.testTrackWordBits();
707 
708  L1TkTracksForOutput->push_back(aTrack);
709  }
710 
711  iEvent.put(std::move(L1TkTracksForOutput), "Level1TTTracks");
712 
713 }
714 
715 // ///////////////////////////
716 // // DEFINE THIS AS A PLUG-IN
Settings.h
trklet::Settings::setWiresFile
void setWiresFile(std::string wiresFileName)
Definition: Settings.h:65
L1FPGATrackProducer::processingModulesFile
edm::FileInPath processingModulesFile
Definition: L1FPGATrackProducer.cc:150
trklet::N_PSLAYER
constexpr unsigned int N_PSLAYER
Definition: Settings.h:21
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::DetSetVector
Definition: DetSetVector.h:61
Point2DBase
Definition: Point2DBase.h:9
Ecal2004TBTDCRanges_v1_cff.endRun
endRun
Definition: Ecal2004TBTDCRanges_v1_cff.py:4
L1TStub.h
trklet::TrackletEventProcessor::event
void event(SLHCEvent &ev)
Definition: TrackletEventProcessor.cc:174
Handle.h
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
electrons_cff.bool
bool
Definition: electrons_cff.py:366
L1FPGATrackProducer::settings
trklet::Settings settings
Definition: L1FPGATrackProducer.cc:166
EDProducer.h
FreeTrajectoryState.h
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
MessageLogger.h
TrackerGeometry.h
GeomDet
Definition: GeomDet.h:27
FastHelix.h
L1FPGATrackProducer::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: L1FPGATrackProducer.cc:329
ESHandle.h
align::BeamSpot
Definition: StructureType.h:95
RectangularPixelTopology.h
trklet::Settings::setDTCLinkLayerDiskFile
void setDTCLinkLayerDiskFile(std::string DTCLinkLayerDiskFileName)
Definition: Settings.h:57
TrackerTopology::isLower
bool isLower(const DetId &id) const
Definition: TrackerTopology.cc:195
L1FPGATrackProducer::TrackingVertexInputTag
edm::InputTag TrackingVertexInputTag
Definition: L1FPGATrackProducer.cc:185
TTTypes.h
L1FPGATrackProducer::tGeomHandle
edm::ESHandle< TrackerGeometry > tGeomHandle
Definition: L1FPGATrackProducer.cc:180
L1FPGATrackProducer::moduleCablingFile
edm::FileInPath moduleCablingFile
Definition: L1FPGATrackProducer.cc:154
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
Tracklet_cfi.MCTruthClusterInputTag
MCTruthClusterInputTag
Definition: Tracklet_cfi.py:7
trklet::Settings::setTableTEDFile
void setTableTEDFile(std::string tableTEDFileName)
Definition: Settings.h:66
L1FPGATrackProducer::trackQualityModel_
std::unique_ptr< TrackQuality > trackQualityModel_
Definition: L1FPGATrackProducer.cc:175
edm::Run
Definition: Run.h:45
L1FPGATrackProducer::TrackingParticleInputTag
edm::InputTag TrackingParticleInputTag
Definition: L1FPGATrackProducer.cc:184
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
L1FPGATrackProducer::ttStubSrc_
edm::InputTag ttStubSrc_
Definition: L1FPGATrackProducer.cc:186
TrackerTopology
Definition: TrackerTopology.h:16
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
L1FPGATrackProducer
Definition: L1FPGATrackProducer.cc:133
trklet::TrackletEventProcessor::init
void init(Settings const &theSettings)
Definition: TrackletEventProcessor.cc:26
PSimHitContainer.h
trklet::Settings
Definition: Settings.h:31
edmNew::makeRefTo
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
Definition: DetSetVectorNew.h:689
PixelTopology::pitch
virtual std::pair< float, float > pitch() const =0
trklet::L1TStub
Definition: L1TStub.h:12
GeomDetType.h
L1FPGATrackProducer::~L1FPGATrackProducer
~L1FPGATrackProducer() override
Definition: L1FPGATrackProducer.cc:302
TTTrack
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
trklet::L1SimTrack
Definition: SLHCEvent.h:16
L1FPGATrackProducer::L1FPGATrackProducer
L1FPGATrackProducer(const edm::ParameterSet &iConfig)
Constructor/destructor.
Definition: L1FPGATrackProducer.cc:206
PixelChannelIdentifier.h
TrackingVertex.h
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
TrackerTopology::stack
uint32_t stack(const DetId &id) const
Definition: TrackerTopology.cc:104
edm::one::EDProducer
Definition: EDProducer.h:30
Tracklet_cfi.MCTruthStubInputTag
MCTruthStubInputTag
Definition: Tracklet_cfi.py:8
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
L1FPGATrackProducer::memoryModulesFile
edm::FileInPath memoryModulesFile
Definition: L1FPGATrackProducer.cc:149
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
L1FPGATrackProducer::ttClusterMCTruthToken_
edm::EDGetTokenT< TTClusterAssociationMap< Ref_Phase2TrackerDigi_ > > ttClusterMCTruthToken_
Definition: L1FPGATrackProducer.cc:192
TTTrack_TrackWord.h
vertices_cff.ntracks
ntracks
Definition: vertices_cff.py:34
TrackerTopology::module
unsigned int module(const DetId &id) const
Definition: TrackerTopology.cc:66
Tracklet_cfi.TrackingParticleInputTag
TrackingParticleInputTag
Definition: Tracklet_cfi.py:9
TrackerGeometry::getDetectorType
ModuleType getDetectorType(DetId) const
Definition: TrackerGeometry.cc:247
L1FPGATrackProducer::bsSrc_
edm::InputTag bsSrc_
Definition: L1FPGATrackProducer.cc:187
StubPtConsistency.h
edm::Handle< reco::BeamSpot >
TTClusterAssociationMap.h
trklet::Settings::bfield
double bfield() const
Definition: Settings.h:230
trklet::Settings::setStripLength_2S
void setStripLength_2S(double stripLength_2S)
Definition: Settings.h:243
trklet::Settings::setStripPitch_PS
void setStripPitch_PS(double stripPitch_PS)
Definition: Settings.h:238
TrackerTopology::tidRing
unsigned int tidRing(const DetId &id) const
Definition: TrackerTopology.h:218
edmNew
Definition: DetSet2RangeMap.h:11
TrackerTopology::tobRod
unsigned int tobRod(const DetId &id) const
Definition: TrackerTopology.h:195
trklet::N_TILTED_RINGS
constexpr unsigned int N_TILTED_RINGS
Definition: Settings.h:772
edm::Ref
Definition: AssociativeIterator.h:58
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
L1TStubCompare::operator()
bool operator()(const trklet::L1TStub &x, const trklet::L1TStub &y) const
Definition: L1FPGATrackProducer.cc:121
FileInPath.h
GenParticle.h
TrackerGeometry::idToDetUnit
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: TrackerGeometry.cc:183
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
L1FPGATrackProducer::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: L1FPGATrackProducer.cc:310
L1FPGATrackProducer::bsToken_
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: L1FPGATrackProducer.cc:190
Sector.h
L1FPGATrackProducer::readMoreMcTruth_
bool readMoreMcTruth_
Definition: L1FPGATrackProducer.cc:145
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
config
Definition: config.py:1
DetId
Definition: DetId.h:17
edm::FileInPath
Definition: FileInPath.h:64
L1FPGATrackProducer::fitPatternFile
edm::FileInPath fitPatternFile
File path for configuration files.
Definition: L1FPGATrackProducer.cc:148
edmNew::DetSet::end
iterator end()
Definition: DetSetNew.h:56
MakerMacros.h
L1FPGATrackProducer::nHelixPar_
unsigned int nHelixPar_
Definition: L1FPGATrackProducer.cc:171
PSimHit.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
BeamSpot.h
L1FPGATrackProducer::config
edm::ParameterSet config
Containers of parameters passed by python configuration file.
Definition: L1FPGATrackProducer.cc:143
L1FPGATrackProducer::DTCLinkFile
edm::FileInPath DTCLinkFile
Definition: L1FPGATrackProducer.cc:153
Service.h
L1FPGATrackProducer::tableTREFile
edm::FileInPath tableTREFile
Definition: L1FPGATrackProducer.cc:158
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
SimVertex.h
TTStub
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
IdealMagneticFieldRecord.h
L1FPGATrackProducer::eventnum
int eventnum
Definition: L1FPGATrackProducer.cc:140
StackedTrackerGeometryRecord.h
edm::ESHandle< TrackerTopology >
edmNew::DetSet
Definition: DetSetNew.h:22
trklet::Settings::setNStrips_2S
void setNStrips_2S(unsigned int nStrips_2S)
Definition: Settings.h:235
SLHCEvent.h
L1FPGATrackProducer::dtclayerdisk
std::map< string, vector< int > > dtclayerdisk
Definition: L1FPGATrackProducer.cc:177
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
reco::BeamSpot::position
const Point & position() const
position
Definition: BeamSpot.h:59
trklet::Settings::setDTCLinkFile
void setDTCLinkFile(std::string DTCLinkFileName)
Definition: Settings.h:55
TTTrack.h
Point3DBase< float, LocalTag >
PixelTopology
Definition: PixelTopology.h:10
trklet::Settings::setNStrips_PS
void setNStrips_PS(unsigned int nStrips_PS)
Definition: Settings.h:234
trklet::Settings::setModuleCablingFile
void setModuleCablingFile(std::string moduleCablingFileName)
Definition: Settings.h:56
MeasurementVector.h
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
L1FPGATrackProducer::tTopoHandle
edm::ESHandle< TrackerTopology > tTopoHandle
Definition: L1FPGATrackProducer.cc:179
TrackerDigiGeometryRecord.h
HelixArbitraryPlaneCrossing.h
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
L1FPGATrackProducer::MCTruthStubInputTag
edm::InputTag MCTruthStubInputTag
Definition: L1FPGATrackProducer.cc:183
L1FPGATrackProducer::ttStubToken_
const edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > ttStubToken_
Definition: L1FPGATrackProducer.cc:189
Event.h
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
L1FPGATrackProducer::eventProcessor
trklet::TrackletEventProcessor eventProcessor
Definition: L1FPGATrackProducer.cc:169
trklet::Settings::nHelixPar
unsigned int nHelixPar() const
Definition: Settings.h:222
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
L1FPGATrackProducer::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup) override
Definition: L1FPGATrackProducer.cc:314
trklet::SLHCEvent
Definition: SLHCEvent.h:54
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
LorentzVector.h
trklet::TrackletEventProcessor
Definition: TrackletEventProcessor.h:22
ModuleDef.h
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
PixelGeomDetUnit.h
TTStubAssociationMap.h
L1TStubCompare
Definition: L1FPGATrackProducer.cc:119
MeasurementPoint.h
edmNew::DetSet::begin
iterator begin()
Definition: DetSetNew.h:54
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:58
trklet::Settings::setBfield
void setBfield(double bfield)
Definition: Settings.h:231
TrackerGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: TrackerGeometry.h:62
DetSetVector.h
TTClusterRef
TTClusterRefT< Ref_Phase2TrackerDigi_ > TTClusterRef
Definition: TTTypes.h:44
get
#define get
PixelGeomDetType.h
trklet::Settings::setNHelixPar
void setNHelixPar(unsigned int nHelixPar)
Definition: Settings.h:223
TTCluster.h
trklet::TrackletEventProcessor::tracks
std::vector< Track * > & tracks()
Definition: TrackletEventProcessor.h:34
Cabling.h
InputTag.h
edm::Ptr< TrackingParticle >
Tracklet_cfi.TrackingVertexInputTag
TrackingVertexInputTag
Definition: Tracklet_cfi.py:10
trklet::Settings::setTableTREFile
void setTableTREFile(std::string tableTREFileName)
Definition: Settings.h:67
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
trklet::Settings::setStripPitch_2S
void setStripPitch_2S(double stripPitch_2S)
Definition: Settings.h:239
L1FPGATrackProducer::MCTruthClusterInputTag
edm::InputTag MCTruthClusterInputTag
Definition: L1FPGATrackProducer.cc:182
TrackletEventProcessor.h
TrackingParticle.h
GeomDet.h
L1FPGATrackProducer::geometryType_
string geometryType_
Definition: L1FPGATrackProducer.cc:163
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Ref.h
trklet::Settings::setExtended
void setExtended(bool extended)
Definition: Settings.h:226
Track.h
DetId.h
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
L1FPGATrackProducer::asciiEventOutName_
string asciiEventOutName_
Definition: L1FPGATrackProducer.cc:160
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
L1FPGATrackProducer::extended_
bool extended_
Definition: L1FPGATrackProducer.cc:172
trklet::N_MOD_PLANK
constexpr std::array< unsigned int, N_PSLAYER > N_MOD_PLANK
Definition: Settings.h:773
trklet::Settings::setStripLength_PS
void setStripLength_PS(double stripLength_PS)
Definition: Settings.h:242
PVValHelper::ladder
Definition: PVValidationHelpers.h:73
trklet::Settings::setMemoryModulesFile
void setMemoryModulesFile(std::string memoryModulesFileName)
Definition: Settings.h:64
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
EventSetup.h
trklet::Settings::debugTracklet
bool debugTracklet() const
Definition: Settings.h:161
L1FPGATrackProducer::ttStubMCTruthToken_
edm::EDGetTokenT< TTStubAssociationMap< Ref_Phase2TrackerDigi_ > > ttStubMCTruthToken_
Definition: L1FPGATrackProducer.cc:193
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TTCluster
NOTE: this is needed even if it seems not.
Definition: TTCluster.h:27
BoundPlane.h
TTStub.h
StubPtConsistency::getConsistency
float getConsistency(TTTrack< Ref_Phase2TrackerDigi_ > aTrack, const TrackerGeometry *theTrackerGeom, const TrackerTopology *tTopo, double mMagneticFieldStrength, int nPar)
Definition: StubPtConsistency.cc:9
L1FPGATrackProducer::tableTEDFile
edm::FileInPath tableTEDFile
Definition: L1FPGATrackProducer.cc:157
TrackQuality.h
Candidate.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1FPGATrackProducer::TrackingVertexToken_
edm::EDGetTokenT< std::vector< TrackingVertex > > TrackingVertexToken_
Definition: L1FPGATrackProducer.cc:195
genParticles_cff.map
map
Definition: genParticles_cff.py:11
L1FPGATrackProducer::DTCLinkLayerDiskFile
edm::FileInPath DTCLinkLayerDiskFile
Definition: L1FPGATrackProducer.cc:155
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
SimTrack.h
ParameterSet.h
PXBDetId.h
L1FPGATrackProducer::TrackingParticleToken_
edm::EDGetTokenT< std::vector< TrackingParticle > > TrackingParticleToken_
Definition: L1FPGATrackProducer.cc:194
PXFDetId.h
trklet::Settings::setProcessingModulesFile
void setProcessingModulesFile(std::string processingModulesFileName)
Definition: Settings.h:61
edm::Event
Definition: Event.h:73
PixelTopology::nrows
virtual int nrows() const =0
trklet::Settings::setFitPatternFile
void setFitPatternFile(std::string fitPatternFileName)
Definition: Settings.h:60
L1FPGATrackProducer::asciiEventOut_
std::ofstream asciiEventOut_
Definition: L1FPGATrackProducer.cc:161
L1FPGATrackProducer::wiresFile
edm::FileInPath wiresFile
Definition: L1FPGATrackProducer.cc:151
Vector3D.h
MagneticField
Definition: MagneticField.h:19
SimTrackContainer.h
edm::InputTag
Definition: InputTag.h:15
SimVertexContainer.h
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
TrackerTopology::tobSide
unsigned int tobSide(const DetId &id) const
Definition: TrackerTopology.h:180
PixelTopologyBuilder.h
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:161
L1FPGATrackProducer::trackQuality_
bool trackQuality_
Definition: L1FPGATrackProducer.cc:174
TrackerGeometry::ModuleType::Ph2PSP
trklet::Settings::setNbitstrackletindex
void setNbitstrackletindex(unsigned int nbitstrackletindex)
Definition: Settings.h:249
TrackerGeometry
Definition: TrackerGeometry.h:14