CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1FPGATrackProducer Class Reference
Inheritance diagram for L1FPGATrackProducer:
edm::one::EDProducer< edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1FPGATrackProducer (const edm::ParameterSet &iConfig)
 Constructor/destructor. More...
 
 ~L1FPGATrackProducer () override
 
- Public Member Functions inherited from edm::one::EDProducer< edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void beginRun (const edm::Run &run, const edm::EventSetup &iSetup) override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 

Private Attributes

std::ofstream asciiEventOut_
 
string asciiEventOutName_
 
edm::InputTag bsSrc_
 
const edm::EDGetTokenT< reco::BeamSpotbsToken_
 
edm::ParameterSet config
 Containers of parameters passed by python configuration file. More...
 
std::map< string, vector< int > > dtclayerdisk
 
edm::FileInPath DTCLinkFile
 
edm::FileInPath DTCLinkLayerDiskFile
 
int eventnum
 
trklet::TrackletEventProcessor eventProcessor
 
bool extended_
 
edm::FileInPath fitPatternFile
 File path for configuration files. More...
 
string geometryType_
 
edm::InputTag MCTruthClusterInputTag
 
edm::InputTag MCTruthStubInputTag
 
edm::FileInPath memoryModulesFile
 
edm::FileInPath moduleCablingFile
 
unsigned int nHelixPar_
 
edm::FileInPath processingModulesFile
 
bool readMoreMcTruth_
 
trklet::Settings settings
 
edm::FileInPath tableTEDFile
 
edm::FileInPath tableTREFile
 
edm::ESHandle< TrackerGeometrytGeomHandle
 
edm::InputTag TrackingParticleInputTag
 
edm::EDGetTokenT< std::vector< TrackingParticle > > TrackingParticleToken_
 
edm::InputTag TrackingVertexInputTag
 
edm::EDGetTokenT< std::vector< TrackingVertex > > TrackingVertexToken_
 
bool trackQuality_
 
std::unique_ptr< TrackQualitytrackQualityModel_
 
edm::EDGetTokenT< TTClusterAssociationMap< Ref_Phase2TrackerDigi_ > > ttClusterMCTruthToken_
 
edm::ESHandle< TrackerTopologytTopoHandle
 
edm::EDGetTokenT< TTStubAssociationMap< Ref_Phase2TrackerDigi_ > > ttStubMCTruthToken_
 
edm::InputTag ttStubSrc_
 
const edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > ttStubToken_
 
edm::FileInPath wiresFile
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 133 of file L1FPGATrackProducer.cc.

Constructor & Destructor Documentation

◆ L1FPGATrackProducer()

L1FPGATrackProducer::L1FPGATrackProducer ( const edm::ParameterSet iConfig)
explicit

Constructor/destructor.

Definition at line 206 of file L1FPGATrackProducer.cc.

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 
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 }

References asciiEventOut_, asciiEventOutName_, trklet::Settings::debugTracklet(), DTCLinkFile, DTCLinkLayerDiskFile, eventnum, extended_, fitPatternFile, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), MCTruthClusterInputTag, MCTruthStubInputTag, memoryModulesFile, moduleCablingFile, nHelixPar_, processingModulesFile, readMoreMcTruth_, trklet::Settings::setDTCLinkFile(), trklet::Settings::setDTCLinkLayerDiskFile(), trklet::Settings::setExtended(), trklet::Settings::setFitPatternFile(), trklet::Settings::setMemoryModulesFile(), trklet::Settings::setModuleCablingFile(), trklet::Settings::setNbitstrackletindex(), trklet::Settings::setNHelixPar(), trklet::Settings::setProcessingModulesFile(), trklet::Settings::setTableTEDFile(), trklet::Settings::setTableTREFile(), settings, trklet::Settings::setWiresFile(), tableTEDFile, tableTREFile, TrackingParticleInputTag, TrackingParticleToken_, TrackingVertexInputTag, TrackingVertexToken_, trackQuality_, trackQualityModel_, ttClusterMCTruthToken_, ttStubMCTruthToken_, and wiresFile.

◆ ~L1FPGATrackProducer()

L1FPGATrackProducer::~L1FPGATrackProducer ( )
override

Definition at line 302 of file L1FPGATrackProducer.cc.

302  {
303  if (asciiEventOut_.is_open()) {
304  asciiEventOut_.close();
305  }
306 }

References asciiEventOut_.

Member Function Documentation

◆ beginRun()

void L1FPGATrackProducer::beginRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
overrideprivate

///////////////// /// MANDATORY METHODS ///

Definition at line 314 of file L1FPGATrackProducer.cc.

314  {
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 }

References eventProcessor, edm::EventSetup::get(), get, trklet::TrackletEventProcessor::init(), MagneticField::inTesla(), edm::ESHandle< T >::product(), trklet::Settings::setBfield(), settings, and PV3DBase< T, PVType, FrameType >::z().

◆ endRun()

void L1FPGATrackProducer::endRun ( edm::Run const &  run,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 310 of file L1FPGATrackProducer.cc.

310 {}

◆ produce()

void L1FPGATrackProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Prepare output

Geometry handles etc

Set pointers to Stacked Modules

LOOP OVER TRACKING PARTICLES & GET SIMTRACKS

COLLECT STUB INFORMATION ///

Get the Inner and Outer TTCluster

Implements edm::one::EDProducerBase.

Definition at line 329 of file L1FPGATrackProducer.cc.

329  {
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 }

References funct::abs(), asciiEventOut_, asciiEventOutName_, edmNew::DetSet< T >::begin(), trklet::Settings::bfield(), bsToken_, TrackerGeometry::dets(), edmNew::DetSet< T >::end(), ev, trklet::TrackletEventProcessor::event(), eventnum, eventProcessor, edm::EventSetup::get(), get, StubPtConsistency::getConsistency(), TrackerGeometry::getDetectorType(), TrackerGeometry::idToDetUnit(), iEvent, createfilelist::int, TrackerTopology::isLower(), PVValHelper::ladder, phase1PixelTopology::layer, TrackerTopology::layer(), Topology::localPosition(), PV3DBase< T, PVType, FrameType >::mag(), edmNew::makeRefTo(), genParticles_cff::map, TrackerTopology::module(), eostools::move(), trklet::N_MOD_PLANK, trklet::N_PSLAYER, trklet::N_TILTED_RINGS, trklet::Settings::nHelixPar(), PixelTopology::nrows(), vertices_cff::ntracks, TrackerGeometry::Ph2PSP, PixelTopology::pitch(), reco::BeamSpot::position(), edm::ESHandle< T >::product(), readMoreMcTruth_, trklet::Settings::setNStrips_2S(), trklet::Settings::setNStrips_PS(), trklet::Settings::setStripLength_2S(), trklet::Settings::setStripLength_PS(), trklet::Settings::setStripPitch_2S(), trklet::Settings::setStripPitch_PS(), settings, TrackerTopology::stack(), digitizers_cfi::strip, DetId::subdetId(), tGeomHandle, StripSubdetector::TID, TrackerTopology::tidRing(), TrackerTopology::tidWheel(), StripSubdetector::TOB, TrackerTopology::tobRod(), TrackerTopology::tobSide(), HLT_FULL_cff::track, TrackingParticleToken_, TrackingVertexToken_, trackQuality_, trackQualityModel_, trklet::TrackletEventProcessor::tracks(), tracks, ttClusterMCTruthToken_, tTopoHandle, ttStubMCTruthToken_, ttStubToken_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Member Data Documentation

◆ asciiEventOut_

std::ofstream L1FPGATrackProducer::asciiEventOut_
private

Definition at line 161 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), produce(), and ~L1FPGATrackProducer().

◆ asciiEventOutName_

string L1FPGATrackProducer::asciiEventOutName_
private

Definition at line 160 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ bsSrc_

edm::InputTag L1FPGATrackProducer::bsSrc_
private

Definition at line 187 of file L1FPGATrackProducer.cc.

◆ bsToken_

const edm::EDGetTokenT<reco::BeamSpot> L1FPGATrackProducer::bsToken_
private

Definition at line 190 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ config

edm::ParameterSet L1FPGATrackProducer::config
private

Containers of parameters passed by python configuration file.

Definition at line 143 of file L1FPGATrackProducer.cc.

◆ dtclayerdisk

std::map<string, vector<int> > L1FPGATrackProducer::dtclayerdisk
private

Definition at line 177 of file L1FPGATrackProducer.cc.

◆ DTCLinkFile

edm::FileInPath L1FPGATrackProducer::DTCLinkFile
private

Definition at line 153 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ DTCLinkLayerDiskFile

edm::FileInPath L1FPGATrackProducer::DTCLinkLayerDiskFile
private

Definition at line 155 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ eventnum

int L1FPGATrackProducer::eventnum
private

Definition at line 140 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ eventProcessor

trklet::TrackletEventProcessor L1FPGATrackProducer::eventProcessor
private

Definition at line 169 of file L1FPGATrackProducer.cc.

Referenced by beginRun(), and produce().

◆ extended_

bool L1FPGATrackProducer::extended_
private

Definition at line 172 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ fitPatternFile

edm::FileInPath L1FPGATrackProducer::fitPatternFile
private

File path for configuration files.

Definition at line 148 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ geometryType_

string L1FPGATrackProducer::geometryType_
private

Definition at line 163 of file L1FPGATrackProducer.cc.

◆ MCTruthClusterInputTag

edm::InputTag L1FPGATrackProducer::MCTruthClusterInputTag
private

Definition at line 182 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ MCTruthStubInputTag

edm::InputTag L1FPGATrackProducer::MCTruthStubInputTag
private

Definition at line 183 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ memoryModulesFile

edm::FileInPath L1FPGATrackProducer::memoryModulesFile
private

Definition at line 149 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ moduleCablingFile

edm::FileInPath L1FPGATrackProducer::moduleCablingFile
private

Definition at line 154 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ nHelixPar_

unsigned int L1FPGATrackProducer::nHelixPar_
private

Definition at line 171 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ processingModulesFile

edm::FileInPath L1FPGATrackProducer::processingModulesFile
private

Definition at line 150 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ readMoreMcTruth_

bool L1FPGATrackProducer::readMoreMcTruth_
private

Definition at line 145 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ settings

trklet::Settings L1FPGATrackProducer::settings
private

Definition at line 166 of file L1FPGATrackProducer.cc.

Referenced by beginRun(), L1FPGATrackProducer(), and produce().

◆ tableTEDFile

edm::FileInPath L1FPGATrackProducer::tableTEDFile
private

Definition at line 157 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ tableTREFile

edm::FileInPath L1FPGATrackProducer::tableTREFile
private

Definition at line 158 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ tGeomHandle

edm::ESHandle<TrackerGeometry> L1FPGATrackProducer::tGeomHandle
private

Definition at line 180 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ TrackingParticleInputTag

edm::InputTag L1FPGATrackProducer::TrackingParticleInputTag
private

Definition at line 184 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ TrackingParticleToken_

edm::EDGetTokenT<std::vector<TrackingParticle> > L1FPGATrackProducer::TrackingParticleToken_
private

Definition at line 194 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ TrackingVertexInputTag

edm::InputTag L1FPGATrackProducer::TrackingVertexInputTag
private

Definition at line 185 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ TrackingVertexToken_

edm::EDGetTokenT<std::vector<TrackingVertex> > L1FPGATrackProducer::TrackingVertexToken_
private

Definition at line 195 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ trackQuality_

bool L1FPGATrackProducer::trackQuality_
private

Definition at line 174 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ trackQualityModel_

std::unique_ptr<TrackQuality> L1FPGATrackProducer::trackQualityModel_
private

Definition at line 175 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ ttClusterMCTruthToken_

edm::EDGetTokenT<TTClusterAssociationMap<Ref_Phase2TrackerDigi_> > L1FPGATrackProducer::ttClusterMCTruthToken_
private

Definition at line 192 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ tTopoHandle

edm::ESHandle<TrackerTopology> L1FPGATrackProducer::tTopoHandle
private

Definition at line 179 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ ttStubMCTruthToken_

edm::EDGetTokenT<TTStubAssociationMap<Ref_Phase2TrackerDigi_> > L1FPGATrackProducer::ttStubMCTruthToken_
private

Definition at line 193 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ ttStubSrc_

edm::InputTag L1FPGATrackProducer::ttStubSrc_
private

Definition at line 186 of file L1FPGATrackProducer.cc.

◆ ttStubToken_

const edm::EDGetTokenT<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_> > > L1FPGATrackProducer::ttStubToken_
private

Definition at line 189 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ wiresFile

edm::FileInPath L1FPGATrackProducer::wiresFile
private

Definition at line 151 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

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
Point2DBase
Definition: Point2DBase.h:9
trklet::TrackletEventProcessor::event
void event(SLHCEvent &ev)
Definition: TrackletEventProcessor.cc:174
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
L1FPGATrackProducer::settings
trklet::Settings settings
Definition: L1FPGATrackProducer.cc:166
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
GeomDet
Definition: GeomDet.h:27
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
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
trklet::Settings::setTableTEDFile
void setTableTEDFile(std::string tableTEDFileName)
Definition: Settings.h:66
L1FPGATrackProducer::trackQualityModel_
std::unique_ptr< TrackQuality > trackQualityModel_
Definition: L1FPGATrackProducer.cc:175
L1FPGATrackProducer::TrackingParticleInputTag
edm::InputTag TrackingParticleInputTag
Definition: L1FPGATrackProducer.cc:184
L1FPGATrackProducer::ttStubSrc_
edm::InputTag ttStubSrc_
Definition: L1FPGATrackProducer.cc:186
TrackerTopology
Definition: TrackerTopology.h:16
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
trklet::TrackletEventProcessor::init
void init(Settings const &theSettings)
Definition: TrackletEventProcessor.cc: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:689
PixelTopology::pitch
virtual std::pair< float, float > pitch() const =0
trklet::L1TStub
Definition: L1TStub.h:12
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
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
TrackerTopology::stack
uint32_t stack(const DetId &id) const
Definition: TrackerTopology.cc:104
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
L1FPGATrackProducer::memoryModulesFile
edm::FileInPath memoryModulesFile
Definition: L1FPGATrackProducer.cc:149
L1FPGATrackProducer::ttClusterMCTruthToken_
edm::EDGetTokenT< TTClusterAssociationMap< Ref_Phase2TrackerDigi_ > > ttClusterMCTruthToken_
Definition: L1FPGATrackProducer.cc:192
vertices_cff.ntracks
ntracks
Definition: vertices_cff.py:34
TrackerTopology::module
unsigned int module(const DetId &id) const
Definition: TrackerTopology.cc:66
TrackerGeometry::getDetectorType
ModuleType getDetectorType(DetId) const
Definition: TrackerGeometry.cc:247
L1FPGATrackProducer::bsSrc_
edm::InputTag bsSrc_
Definition: L1FPGATrackProducer.cc:187
edm::Handle< reco::BeamSpot >
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
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
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::bsToken_
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
Definition: L1FPGATrackProducer.cc:190
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
L1FPGATrackProducer::nHelixPar_
unsigned int nHelixPar_
Definition: L1FPGATrackProducer.cc:171
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
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
L1FPGATrackProducer::tableTREFile
edm::FileInPath tableTREFile
Definition: L1FPGATrackProducer.cc:158
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
TTStub
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
L1FPGATrackProducer::eventnum
int eventnum
Definition: L1FPGATrackProducer.cc:140
edm::ESHandle< MagneticField >
edmNew::DetSet
Definition: DetSetNew.h:22
trklet::Settings::setNStrips_2S
void setNStrips_2S(unsigned int nStrips_2S)
Definition: Settings.h:235
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
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
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
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
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
trklet::SLHCEvent
Definition: SLHCEvent.h:54
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
L1TStubCompare
Definition: L1FPGATrackProducer.cc:119
edmNew::DetSet::begin
iterator begin()
Definition: DetSetNew.h:54
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
TTClusterRef
TTClusterRefT< Ref_Phase2TrackerDigi_ > TTClusterRef
Definition: TTTypes.h:44
get
#define get
trklet::Settings::setNHelixPar
void setNHelixPar(unsigned int nHelixPar)
Definition: Settings.h:223
trklet::TrackletEventProcessor::tracks
std::vector< Track * > & tracks()
Definition: TrackletEventProcessor.h:34
edm::Ptr< TrackingParticle >
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
edmNew::DetSetVector
Definition: DetSetNew.h:13
eostools.move
def move(src, dest)
Definition: eostools.py:511
trklet::Settings::setExtended
void setExtended(bool extended)
Definition: Settings.h:226
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
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
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
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
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:155
L1FPGATrackProducer::TrackingParticleToken_
edm::EDGetTokenT< std::vector< TrackingParticle > > TrackingParticleToken_
Definition: L1FPGATrackProducer.cc:194
trklet::Settings::setProcessingModulesFile
void setProcessingModulesFile(std::string processingModulesFileName)
Definition: Settings.h:61
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
MagneticField
Definition: MagneticField.h:19
edm::InputTag
Definition: InputTag.h:15
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
TrackerTopology::tobSide
unsigned int tobSide(const DetId &id) const
Definition: TrackerTopology.h:180
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