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