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
 
 EDProducer (const EDProducer &)=delete
 
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
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices 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_
 
const ChannelAssignmentchannelAssignment_
 
edm::ParameterSet config
 Containers of parameters passed by python configuration file. More...
 
std::map< string, vector< int > > dtclayerdisk
 
const edm::ESGetToken< tt::Setup, tt::SetupRcdesGetToken_
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordesGetTokenBfield_
 
const ESGetToken< ChannelAssignment, ChannelAssignmentRcdesGetTokenChannelAssignment_
 
const edm::ESGetToken< hph::Setup, hph::SetupRcdesGetTokenHPH_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordesGetTokenTGeom_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdesGetTokenTTopo_
 
int eventnum
 
trklet::TrackletEventProcessor eventProcessor
 
bool extended_
 
int failScenario_
 
edm::FileInPath fitPatternFile
 File path for configuration files. More...
 
const edm::EDGetTokenT< reco::BeamSpotgetTokenBS_
 
const edm::EDGetTokenT< TTDTCgetTokenDTC_
 
edm::EDGetTokenT< std::vector< TrackingParticle > > getTokenTrackingParticle_
 
edm::EDGetTokenT< TTClusterAssociationMap< Ref_Phase2TrackerDigi_ > > getTokenTTClusterMCTruth_
 
edm::InputTag MCTruthClusterInputTag
 
edm::InputTag MCTruthStubInputTag
 
edm::FileInPath memoryModulesFile
 
unsigned int nHelixPar_
 
edm::FileInPath processingModulesFile
 
const edm::EDPutTokenT< StreamsStubputTokenStubs_
 
const edm::EDPutTokenT< StreamsputTokenTracks_
 
bool readMoreMcTruth_
 
bool reduced_
 
trklet::Settings settings_
 
const Setupsetup_
 
const hph::SetupsetupHPH_
 
StubKillerstubKiller_
 
edm::FileInPath tableTEDFile
 
edm::FileInPath tableTREFile
 
edm::InputTag TrackingParticleInputTag
 
bool trackQuality_
 
std::unique_ptr< L1TrackQualitytrackQualityModel_
 
edm::FileInPath wiresFile
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 141 of file L1FPGATrackProducer.cc.

Constructor & Destructor Documentation

◆ L1FPGATrackProducer()

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

Constructor/destructor.

Definition at line 227 of file L1FPGATrackProducer.cc.

References asciiEventOut_, asciiEventOutName_, channelAssignment_, trklet::Settings::debugTracklet(), trklet::Settings::doMultipleMatches(), eventnum, cppFunctionSkipper::exception, extended_, failScenario_, fitPatternFile, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), getTokenTrackingParticle_, getTokenTTClusterMCTruth_, edm::ParameterSet::getUntrackedParameter(), MCTruthClusterInputTag, memoryModulesFile, nHelixPar_, processingModulesFile, readMoreMcTruth_, reduced_, trklet::Settings::removalType(), trklet::Settings::setDoMultipleMatches(), trklet::Settings::setExtended(), trklet::Settings::setFakefit(), trklet::Settings::setFitPatternFile(), trklet::Settings::setMemoryModulesFile(), trklet::Settings::setNbitstrackletindex(), trklet::Settings::setNHelixPar(), trklet::Settings::setProcessingModulesFile(), trklet::Settings::setReduced(), trklet::Settings::setRemovalType(), trklet::Settings::setStoreTrackBuilderOutput(), trklet::Settings::setTableTEDFile(), trklet::Settings::setTableTREFile(), settings_, setup_, trklet::Settings::setWiresFile(), trklet::Settings::storeTrackBuilderOutput(), tableTEDFile, tableTREFile, TrackingParticleInputTag, trackQuality_, trackQualityModel_, and wiresFile.

228  : config(iConfig),
229  readMoreMcTruth_(iConfig.getParameter<bool>("readMoreMcTruth")),
230  MCTruthClusterInputTag(readMoreMcTruth_ ? config.getParameter<edm::InputTag>("MCTruthClusterInputTag")
231  : edm::InputTag()),
232  MCTruthStubInputTag(readMoreMcTruth_ ? config.getParameter<edm::InputTag>("MCTruthStubInputTag")
233  : edm::InputTag()),
234  TrackingParticleInputTag(readMoreMcTruth_ ? iConfig.getParameter<edm::InputTag>("TrackingParticleInputTag")
235  : edm::InputTag()),
236  // book ED products
237  getTokenBS_(consumes<reco::BeamSpot>(config.getParameter<edm::InputTag>("BeamSpotSource"))),
238  getTokenDTC_(consumes<TTDTC>(edm::InputTag(iConfig.getParameter<edm::InputTag>("InputTagTTDTC")))),
239  // book ED output token for clock and bit accurate tracks
240  putTokenTracks_(produces<Streams>("Level1TTTracks")),
241  // book ED output token for clock and bit accurate stubs
242  putTokenStubs_(produces<StreamsStub>("Level1TTTracks")),
243  // book ES products
244  esGetTokenChannelAssignment_(esConsumes<ChannelAssignment, ChannelAssignmentRcd, Transition::BeginRun>()),
245  esGetTokenBfield_(esConsumes<edm::Transition::BeginRun>()),
248  esGetToken_(esConsumes<tt::Setup, tt::SetupRcd, edm::Transition::BeginRun>()),
249  esGetTokenHPH_(esConsumes<hph::Setup, hph::SetupRcd, edm::Transition::BeginRun>()) {
250  if (readMoreMcTruth_) {
251  getTokenTTClusterMCTruth_ = consumes<TTClusterAssociationMap<Ref_Phase2TrackerDigi_>>(MCTruthClusterInputTag);
252  getTokenTrackingParticle_ = consumes<std::vector<TrackingParticle>>(TrackingParticleInputTag);
253  }
254 
255  produces<std::vector<TTTrack<Ref_Phase2TrackerDigi_>>>("Level1TTTracks").setBranchAlias("Level1TTTracks");
256 
257  asciiEventOutName_ = iConfig.getUntrackedParameter<string>("asciiFileName", "");
258 
259  processingModulesFile = iConfig.getParameter<edm::FileInPath>("processingModulesFile");
260  memoryModulesFile = iConfig.getParameter<edm::FileInPath>("memoryModulesFile");
261  wiresFile = iConfig.getParameter<edm::FileInPath>("wiresFile");
262 
263  failScenario_ = iConfig.getUntrackedParameter<int>("FailScenario", 0);
264 
265  extended_ = iConfig.getParameter<bool>("Extended");
266  reduced_ = iConfig.getParameter<bool>("Reduced");
267  nHelixPar_ = iConfig.getParameter<unsigned int>("Hnpar");
268 
269  if (extended_) {
270  tableTEDFile = iConfig.getParameter<edm::FileInPath>("tableTEDFile");
271  tableTREFile = iConfig.getParameter<edm::FileInPath>("tableTREFile");
272  }
273 
274  // initial ES products
275  channelAssignment_ = nullptr;
276  setup_ = nullptr;
277 
278  // --------------------------------------------------------------------------------
279  // set options in Settings based on inputs from configuration files
280  // --------------------------------------------------------------------------------
281 
285 
286 #ifndef USEHYBRID
287  fitPatternFile = iConfig.getParameter<edm::FileInPath>("fitPatternFile");
289 #endif
293 
294  settings_.setFakefit(iConfig.getParameter<bool>("Fakefit"));
295  settings_.setStoreTrackBuilderOutput(iConfig.getParameter<bool>("StoreTrackBuilderOutput"));
296  settings_.setRemovalType(iConfig.getParameter<string>("RemovalType"));
297  settings_.setDoMultipleMatches(iConfig.getParameter<bool>("DoMultipleMatches"));
298 
299  if (extended_) {
302 
303  //FIXME: The TED and TRE tables are currently disabled by default, so we
304  //need to allow for the additional tracklets that will eventually be
305  //removed by these tables, once they are finalized
307  }
308 
309  eventnum = 0;
310  if (not asciiEventOutName_.empty()) {
311  asciiEventOut_.open(asciiEventOutName_.c_str());
312  }
313 
314  if (settings_.debugTracklet()) {
315  edm::LogVerbatim("Tracklet")
316 #ifndef USEHYBRID
317  << "fit pattern : " << fitPatternFile.fullPath()
318 #endif
319  << "\n process modules : " << processingModulesFile.fullPath()
320  << "\n memory modules : " << memoryModulesFile.fullPath() << "\n wires : " << wiresFile.fullPath();
321  if (extended_) {
322  edm::LogVerbatim("Tracklet") << "table_TED : " << tableTEDFile.fullPath()
323  << "\n table_TRE : " << tableTREFile.fullPath();
324  }
325  }
326 
327  trackQuality_ = iConfig.getParameter<bool>("TrackQuality");
328  if (trackQuality_) {
329  trackQualityModel_ = std::make_unique<L1TrackQuality>(iConfig.getParameter<edm::ParameterSet>("TrackQualityPSet"));
330  }
332  cms::Exception exception("ConfigurationNotSupported.");
333  exception.addContext("L1FPGATrackProducer::produce");
335  exception << "Storing of TrackBuilder output does not support doMultipleMatches.";
336  if (!settings_.removalType().empty())
337  exception << "Storing of TrackBuilder output does not support duplicate removal.";
338  throw exception;
339  }
340 }
Log< level::Info, true > LogVerbatim
void setMemoryModulesFile(std::string memoryModulesFileName)
Definition: Settings.h:86
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::InputTag MCTruthStubInputTag
void setStoreTrackBuilderOutput(bool storeTrackBuilderOutput)
Definition: Settings.h:258
edm::FileInPath tableTREFile
trklet::Settings settings_
void setFitPatternFile(std::string fitPatternFileName)
Definition: Settings.h:82
const edm::EDGetTokenT< reco::BeamSpot > getTokenBS_
edm::InputTag MCTruthClusterInputTag
void setReduced(bool reduced)
Definition: Settings.h:280
Definition: config.py:1
T getUntrackedParameter(std::string const &, T const &) const
edm::FileInPath tableTEDFile
void setRemovalType(std::string removalType)
Definition: Settings.h:261
edm::EDGetTokenT< std::vector< TrackingParticle > > getTokenTrackingParticle_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > esGetTokenTTopo_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > esGetTokenTGeom_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > esGetTokenBfield_
const edm::ESGetToken< hph::Setup, hph::SetupRcd > esGetTokenHPH_
edm::FileInPath processingModulesFile
const ChannelAssignment * channelAssignment_
std::string removalType() const
Definition: Settings.h:251
const edm::ESGetToken< tt::Setup, tt::SetupRcd > esGetToken_
bool doMultipleMatches() const
Definition: Settings.h:254
const edm::EDPutTokenT< Streams > putTokenTracks_
void setFakefit(bool fakefit)
Definition: Settings.h:256
edm::InputTag TrackingParticleInputTag
bool debugTracklet() const
Definition: Settings.h:194
bool storeTrackBuilderOutput() const
Definition: Settings.h:257
void setProcessingModulesFile(std::string processingModulesFileName)
Definition: Settings.h:83
const edm::EDGetTokenT< TTDTC > getTokenDTC_
void setDoMultipleMatches(bool doMultipleMatches)
Definition: Settings.h:262
edm::FileInPath memoryModulesFile
const edm::EDPutTokenT< StreamsStub > putTokenStubs_
std::unique_ptr< L1TrackQuality > trackQualityModel_
edm::FileInPath fitPatternFile
File path for configuration files.
edm::EDGetTokenT< TTClusterAssociationMap< Ref_Phase2TrackerDigi_ > > getTokenTTClusterMCTruth_
void setNbitstrackletindex(unsigned int nbitstrackletindex)
Definition: Settings.h:317
void setNHelixPar(unsigned int nHelixPar)
Definition: Settings.h:266
void setWiresFile(std::string wiresFileName)
Definition: Settings.h:87
const std::string & fullPath() const
Definition: FileInPath.cc:144
void setTableTREFile(std::string tableTREFileName)
Definition: Settings.h:89
edm::ParameterSet config
Containers of parameters passed by python configuration file.
void setTableTEDFile(std::string tableTEDFileName)
Definition: Settings.h:88
void setExtended(bool extended)
Definition: Settings.h:269
const ESGetToken< ChannelAssignment, ChannelAssignmentRcd > esGetTokenChannelAssignment_

◆ ~L1FPGATrackProducer()

L1FPGATrackProducer::~L1FPGATrackProducer ( )
override

Definition at line 344 of file L1FPGATrackProducer.cc.

References asciiEventOut_.

344  {
345  if (asciiEventOut_.is_open()) {
346  asciiEventOut_.close();
347  }
348 }

Member Function Documentation

◆ beginRun()

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

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

Definition at line 356 of file L1FPGATrackProducer.cc.

References channelAssignment_, esGetToken_, esGetTokenBfield_, esGetTokenChannelAssignment_, esGetTokenHPH_, eventProcessor, edm::EventSetup::getData(), trklet::TrackletEventProcessor::init(), MagneticField::inTesla(), trklet::Settings::passSetup(), trklet::Settings::setBfield(), settings_, setup_, setupHPH_, and PV3DBase< T, PVType, FrameType >::z().

356  {
358  // GET MAGNETIC FIELD //
359  const MagneticField* theMagneticField = &iSetup.getData(esGetTokenBfield_);
360  double mMagneticFieldStrength = theMagneticField->inTesla(GlobalPoint(0, 0, 0)).z();
361  settings_.setBfield(mMagneticFieldStrength);
362 
363  setup_ = &iSetup.getData(esGetToken_);
364 
366 
367  setupHPH_ = &iSetup.getData(esGetTokenHPH_);
368  // Tracklet pattern reco output channel info.
370  // initialize the tracklet event processing (this sets all the processing & memory modules, wiring, etc)
372 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
trklet::Settings settings_
void init(Settings const &theSettings, const tt::Setup *setup=nullptr)
T z() const
Definition: PV3DBase.h:61
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
trklet::TrackletEventProcessor eventProcessor
const hph::Setup * setupHPH_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > esGetTokenBfield_
const edm::ESGetToken< hph::Setup, hph::SetupRcd > esGetTokenHPH_
const ChannelAssignment * channelAssignment_
const edm::ESGetToken< tt::Setup, tt::SetupRcd > esGetToken_
void setBfield(double bfield)
Definition: Settings.h:285
void passSetup(const tt::Setup *setup)
Definition: Settings.h:71
const ESGetToken< ChannelAssignment, ChannelAssignmentRcd > esGetTokenChannelAssignment_

◆ endRun()

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

Definition at line 352 of file L1FPGATrackProducer.cc.

352 {}

◆ produce()

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

Prepare output

LOOP OVER TRACKING PARTICLES & GET SIMTRACKS

READ DTC STUB INFORMATION ///

Get the Inner and Outer TTCluster

Implements edm::one::EDProducerBase.

Definition at line 376 of file L1FPGATrackProducer.cc.

References funct::abs(), asciiEventOut_, asciiEventOutName_, cms::cuda::assert(), Reference_intrackfit_cff::barrel, trklet::Settings::bfield(), ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, channelAssignment_, trklet::ChannelAssignment::channelId(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), trklet::StubStreamData::dataBits(), tt::Setup::dtcId(), esGetTokenTGeom_, esGetTokenTTopo_, makeMEIFBenchmarkPlots::ev, trklet::TrackletEventProcessor::event(), eventnum, eventProcessor, failScenario_, StubPtConsistency::getConsistency(), edm::EventSetup::getData(), getTokenBS_, getTokenDTC_, getTokenTrackingParticle_, getTokenTTClusterMCTruth_, Matriplex::hypot(), mps_fire::i, TTBV::ids(), TrackerGeometry::idToDetUnit(), iEvent, StubKiller::initialise(), createfilelist::int, trklet::StubStreamData::iSeed(), edm::Ref< C, T, F >::isNull(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, StubKiller::killStub(), tt::Setup::layerId(), Topology::localPosition(), PV3DBase< T, PVType, FrameType >::mag(), genParticles_cff::map, trklet::ChannelAssignment::maxNumProjectionLayers(), eostools::move(), trklet::N_LAYER, trklet::N_SECTOR, trklet::Settings::nHelixPar(), trklet::ChannelAssignment::numChannelsStub(), trklet::ChannelAssignment::numChannelsTrack(), trklet::ChannelAssignment::numProjectionLayers(), trklet::ChannelAssignment::numSeedingLayers(), tt::Setup::numTiltedLayerRing(), trklet::ChannelAssignment::offsetStub(), reco::BeamSpot::position(), tt::Setup::psModule(), putTokenStubs_, putTokenTracks_, DetId::rawId(), readMoreMcTruth_, nano_mu_digi_cff::region, TTBV::set(), settings_, setup_, tas::sim_eta(), tas::sim_phi(), tas::sim_pt(), trklet::Settings::slotToDTCname(), TTDTC::stream(), AlCaHLTBitMon_QueryRunRegistry::string, trklet::StubStreamData::stub(), stubKiller_, tt::Setup::stubPos(), SimL1Emulator_cff::stubs, TTDTC::tfpChannels(), TTDTC::tfpRegions(), TrackerTopology::tidRing(), TrackerTopology::tobRod(), TrackerTopology::tobSide(), HLT_2024v14_cff::track, trackQuality_, trackQualityModel_, trklet::TrackletEventProcessor::tracks(), DiMuonV_cfg::tracks, trklet::L1TStub::uniqueIndex(), heppy_batch::val, trklet::StubStreamData::valid(), btvMC_cff::vx, btvMC_cff::vy, btvMC_cff::vz, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

376  {
377  typedef std::map<trklet::L1TStub,
380  stubMapType;
381  typedef std::map<unsigned int,
383  stubIndexMapType;
385  TTClusterRef;
386 
388  auto L1TkTracksForOutput = std::make_unique<std::vector<TTTrack<Ref_Phase2TrackerDigi_>>>();
389 
390  stubMapType stubMap;
391  stubIndexMapType stubIndexMap;
392 
394  // GET BS //
395  edm::Handle<reco::BeamSpot> beamSpotHandle;
396  iEvent.getByToken(getTokenBS_, beamSpotHandle);
397  math::XYZPoint bsPosition = beamSpotHandle->position();
398 
399  eventnum++;
401  ev.setEventNum(eventnum);
402  ev.setIP(bsPosition.x(), bsPosition.y());
403 
404  // tracking particles
405  edm::Handle<std::vector<TrackingParticle>> TrackingParticleHandle;
406  if (readMoreMcTruth_)
407  iEvent.getByToken(getTokenTrackingParticle_, TrackingParticleHandle);
408 
409  // tracker topology
410  const TrackerTopology* const tTopo = &iSetup.getData(esGetTokenTTopo_);
411  const TrackerGeometry* const theTrackerGeom = &iSetup.getData(esGetTokenTGeom_);
412 
413  // check killing stubs for detector degradation studies
414  // if failType = 0, StubKiller does not kill any modules
415  int failType = 0;
416  if (failScenario_ < 0 || failScenario_ > 9) {
417  edm::LogVerbatim("Tracklet") << "Invalid fail scenario! Ignoring input";
418  } else
419  failType = failScenario_;
420 
421  stubKiller_ = new StubKiller();
422  stubKiller_->initialise(failType, tTopo, theTrackerGeom);
423 
425  // GET THE PRIMITIVES //
426  edm::Handle<TTDTC> handleDTC;
427  iEvent.getByToken<TTDTC>(getTokenDTC_, handleDTC);
428 
429  // must be defined for code to compile, even if it's not used unless readMoreMcTruth_ is true
430  map<edm::Ptr<TrackingParticle>, int> translateTP;
431 
432  // MC truth association maps
434  if (readMoreMcTruth_) {
435  iEvent.getByToken(getTokenTTClusterMCTruth_, MCTruthTTClusterHandle);
436 
439 
440  int ntps = 1; //count from 1 ; 0 will mean invalid
441 
442  int this_tp = 0;
443  if (readMoreMcTruth_) {
444  for (const auto& iterTP : *TrackingParticleHandle) {
445  edm::Ptr<TrackingParticle> tp_ptr(TrackingParticleHandle, this_tp);
446  this_tp++;
447 
448  // only keep TPs producing a cluster
449  if (MCTruthTTClusterHandle->findTTClusterRefs(tp_ptr).empty())
450  continue;
451 
452  if (iterTP.g4Tracks().empty()) {
453  continue;
454  }
455 
456  int sim_eventid = iterTP.g4Tracks().at(0).eventId().event();
457  int sim_type = iterTP.pdgId();
458  float sim_pt = iterTP.pt();
459  float sim_eta = iterTP.eta();
460  float sim_phi = iterTP.phi();
461 
462  float vx = iterTP.vertex().x();
463  float vy = iterTP.vertex().y();
464  float vz = iterTP.vertex().z();
465 
466  if (sim_pt < 1.0 || std::abs(vz) > 100.0 || hypot(vx, vy) > 50.0)
467  continue;
468 
469  ev.addL1SimTrack(sim_eventid, ntps, sim_type, sim_pt, sim_eta, sim_phi, vx, vy, vz);
470 
471  translateTP[tp_ptr] = ntps;
472  ntps++;
473 
474  } //end loop over TPs
475  }
476 
477  } // end if (readMoreMcTruth_)
478 
482 
483  // Process stubs in each region and channel within that tracking region
484  unsigned int theStubIndex = 0;
485  for (const int& region : handleDTC->tfpRegions()) {
486  for (const int& channel : handleDTC->tfpChannels()) {
487  // Get the DTC name & ID from the channel
488  unsigned int atcaSlot = channel % 12;
489  string dtcname = settings_.slotToDTCname(atcaSlot);
490  if (channel % 24 >= 12)
491  dtcname = "neg" + dtcname;
492  dtcname += (channel < 24) ? "_A" : "_B"; // which detector region
493  int dtcId = setup_->dtcId(region, channel);
494 
495  // Get the stubs from the DTC
496  const tt::StreamStub& streamFromDTC{handleDTC->stream(region, channel)};
497 
498  // Prepare the DTC stubs for the IR
499  for (size_t stubIndex = 0; stubIndex < streamFromDTC.size(); ++stubIndex) {
500  const tt::FrameStub& stub{streamFromDTC[stubIndex]};
501  const TTStubRef& stubRef = stub.first;
502 
503  if (stubRef.isNull())
504  continue;
505 
506  const GlobalPoint& ttPos = setup_->stubPos(stubRef);
507 
508  //Get the 2 bits for the layercode
509  string layerword = stub.second.to_string().substr(61, 2);
510  unsigned int layercode = 2 * (layerword[0] - '0') + layerword[1] - '0';
511  assert(layercode < 4);
512 
513  //translation from the two bit layercode to the layer/disk number of each of the
514  //12 channels (dtcs)
515  // FIX: take this from DTC cabling map.
516  static const int layerdisktab[12][4] = {{0, 6, 8, 10},
517  {0, 7, 9, -1},
518  {1, 7, -1, -1},
519  {6, 8, 10, -1},
520  {2, 7, -1, -1},
521  {2, 9, -1, -1},
522  {3, 4, -1, -1},
523  {4, -1, -1, -1},
524  {5, -1, -1, -1},
525  {5, 8, -1, -1},
526  {6, 9, -1, -1},
527  {7, 10, -1, -1}};
528 
529  int layerdisk = layerdisktab[channel % 12][layercode];
530  assert(layerdisk != -1);
531 
532  //Get the 36 bit word - skip the lowest 3 buts (status and layer code)
533  constexpr int DTCLinkWordSize = 64;
534  constexpr int StubWordSize = 36;
535  constexpr int LayerandStatusCodeSize = 3;
536  string stubword =
537  stub.second.to_string().substr(DTCLinkWordSize - StubWordSize - LayerandStatusCodeSize, StubWordSize);
538  string stubwordhex = "";
539 
540  //Loop over the 9 words in the 36 bit stub word
541  for (unsigned int i = 0; i < 9; i++) {
542  bitset<4> bits(stubword.substr(i * 4, 4));
543  ulong val = bits.to_ulong();
544  stubwordhex += ((val < 10) ? ('0' + val) : ('A' + val - 10));
545  }
546 
549  innerCluster = stub.first->clusterRef(0);
551  outerCluster = stub.first->clusterRef(1);
552 
553  // -----------------------------------------------------
554  // check module orientation, if flipped, need to store that information for track fit
555  // -----------------------------------------------------
556 
557  const DetId innerDetId = innerCluster->getDetId();
558  const GeomDetUnit* det_inner = theTrackerGeom->idToDetUnit(innerDetId);
559  const auto* theGeomDet_inner = dynamic_cast<const PixelGeomDetUnit*>(det_inner);
560  const PixelTopology* topol_inner = dynamic_cast<const PixelTopology*>(&(theGeomDet_inner->specificTopology()));
561 
562  MeasurementPoint coords_inner = innerCluster->findAverageLocalCoordinatesCentered();
563  LocalPoint clustlp_inner = topol_inner->localPosition(coords_inner);
564  GlobalPoint posStub_inner = theGeomDet_inner->surface().toGlobal(clustlp_inner);
565 
566  const DetId outerDetId = outerCluster->getDetId();
567  const GeomDetUnit* det_outer = theTrackerGeom->idToDetUnit(outerDetId);
568  const auto* theGeomDet_outer = dynamic_cast<const PixelGeomDetUnit*>(det_outer);
569  const PixelTopology* topol_outer = dynamic_cast<const PixelTopology*>(&(theGeomDet_outer->specificTopology()));
570 
571  MeasurementPoint coords_outer = outerCluster->findAverageLocalCoordinatesCentered();
572  LocalPoint clustlp_outer = topol_outer->localPosition(coords_outer);
573  GlobalPoint posStub_outer = theGeomDet_outer->surface().toGlobal(clustlp_outer);
574 
575  bool isFlipped = (posStub_outer.mag() < posStub_inner.mag());
576 
577  vector<int> assocTPs;
578 
579  for (unsigned int iClus = 0; iClus <= 1; iClus++) { // Loop over both clusters that make up stub.
580 
581  const TTClusterRef& ttClusterRef = stubRef->clusterRef(iClus);
582 
583  // Now identify all TP's contributing to either cluster in stub.
584  if (readMoreMcTruth_) {
585  vector<edm::Ptr<TrackingParticle>> vecTpPtr =
586  MCTruthTTClusterHandle->findTrackingParticlePtrs(ttClusterRef);
587 
588  for (const edm::Ptr<TrackingParticle>& tpPtr : vecTpPtr) {
589  if (translateTP.find(tpPtr) != translateTP.end()) {
590  if (iClus == 0) {
591  assocTPs.push_back(translateTP.at(tpPtr));
592  } else {
593  assocTPs.push_back(-translateTP.at(tpPtr));
594  }
595  // N.B. Since not all tracking particles are stored in InputData::vTPs_, sometimes no match will be found.
596  } else {
597  assocTPs.push_back(0);
598  }
599  }
600  }
601  }
602 
603  double stubbend = stubRef->bendFE(); //stubRef->rawBend()
604  if (ttPos.z() < -120) {
605  stubbend = -stubbend;
606  }
607 
608  bool barrel = (layerdisk < N_LAYER);
609  // See https://github.com/cms-sw/cmssw/tree/master/Geometry/TrackerNumberingBuilder
610  enum TypeBarrel { nonBarrel = 0, tiltedMinus = 1, tiltedPlus = 2, flat = 3 };
611  const TypeBarrel type = static_cast<TypeBarrel>(tTopo->tobSide(innerDetId));
612  bool tiltedBarrel = barrel && (type == tiltedMinus || type == tiltedPlus);
613  unsigned int tiltedRingId = 0;
614  // Tilted module ring no. (Increasing 1 to 12 as |z| increases).
615  if (tiltedBarrel) {
616  tiltedRingId = tTopo->tobRod(innerDetId);
617  if (type == tiltedMinus) {
618  unsigned int layp1 = 1 + layerdisk; // Setup counts from 1
619  unsigned int nTilted = setup_->numTiltedLayerRing(layp1);
620  tiltedRingId = 1 + nTilted - tiltedRingId;
621  }
622  }
623  // Endcap module ring number (1-15) in endcap disks.
624  unsigned int endcapRingId = barrel ? 0 : tTopo->tidRing(innerDetId);
625 
626  const unsigned int intDetId = innerDetId.rawId();
627 
628  // check killing stubs for detector degredation studies
629  const TTStub<Ref_Phase2TrackerDigi_>* theStub = &(*stubRef);
630  bool killThisStub = stubKiller_->killStub(theStub);
631  if (!killThisStub) {
632  ev.addStub(dtcname,
633  region,
634  layerdisk,
635  stubwordhex,
636  setup_->psModule(dtcId),
637  isFlipped,
638  tiltedBarrel,
639  tiltedRingId,
640  endcapRingId,
641  intDetId,
642  ttPos.x(),
643  ttPos.y(),
644  ttPos.z(),
645  stubbend,
646  stubRef->innerClusterPosition(),
647  assocTPs,
648  theStubIndex);
649 
650  const trklet::L1TStub& lastStub = ev.lastStub();
651  stubMap[lastStub] = stubRef;
652  stubIndexMap[lastStub.uniqueIndex()] = stub.first;
653  theStubIndex++;
654  }
655  }
656  }
657  }
658 
660  // NOW RUN THE L1 tracking
661 
662  if (!asciiEventOutName_.empty()) {
663  ev.write(asciiEventOut_);
664  }
665 
666  const std::vector<trklet::Track>& tracks = eventProcessor.tracks();
667 
668  // max number of projection layers
669  const unsigned int maxNumProjectionLayers = channelAssignment_->maxNumProjectionLayers();
670  // number of track channels
671  const unsigned int numStreamsTrack = N_SECTOR * channelAssignment_->numChannelsTrack();
672  // number of stub channels
673  const unsigned int numStreamsStub = N_SECTOR * channelAssignment_->numChannelsStub();
674  // number of seeding layers
675  const unsigned int numSeedingLayers = channelAssignment_->numSeedingLayers();
676  // max number of stub channel per track
677  const unsigned int numStubChannel = maxNumProjectionLayers + numSeedingLayers;
678  // number of stub channels if all seed types streams padded to have same number of stub channels (for coding simplicity)
679  const unsigned int numStreamsStubRaw = numStreamsTrack * numStubChannel;
680 
681  // Streams formatted to allow this code to run outside CMSSW.
682  vector<vector<string>> streamsTrackRaw(numStreamsTrack);
683  vector<vector<StubStreamData>> streamsStubRaw(numStreamsStubRaw);
684 
685  // this performs the actual tracklet event processing
686  eventProcessor.event(ev, streamsTrackRaw, streamsStubRaw);
687 
688  for (const auto& track : tracks) {
689  if (track.duplicate())
690  continue;
691 
692  // this is where we create the TTTrack object
693  double tmp_rinv = track.rinv(settings_);
694  double tmp_phi = track.phi0(settings_);
695  double tmp_tanL = track.tanL(settings_);
696  double tmp_z0 = track.z0(settings_);
697  double tmp_d0 = track.d0(settings_);
698  double tmp_chi2rphi = track.chisqrphi();
699  double tmp_chi2rz = track.chisqrz();
700  unsigned int tmp_hit = track.hitpattern();
701 
702  TTTrack<Ref_Phase2TrackerDigi_> aTrack(tmp_rinv,
703  tmp_phi,
704  tmp_tanL,
705  tmp_z0,
706  tmp_d0,
707  tmp_chi2rphi,
708  tmp_chi2rz,
709  0,
710  0,
711  0,
712  tmp_hit,
714  settings_.bfield());
715 
716  unsigned int trksector = track.sector();
717  unsigned int trkseed = (unsigned int)abs(track.seed());
718 
719  aTrack.setPhiSector(trksector);
720  aTrack.setTrackSeedType(trkseed);
721 
722  const vector<trklet::L1TStub>& stubptrs = track.stubs();
723  vector<trklet::L1TStub> stubs;
724 
725  stubs.reserve(stubptrs.size());
726  for (const auto& stubptr : stubptrs) {
727  stubs.push_back(stubptr);
728  }
729 
730  int countStubs = 0;
731  stubMapType::const_iterator it;
732  stubIndexMapType::const_iterator itIndex;
733  for (const auto& itstubs : stubs) {
734  itIndex = stubIndexMap.find(itstubs.uniqueIndex());
735  if (itIndex != stubIndexMap.end()) {
736  aTrack.addStubRef(itIndex->second);
737  countStubs = countStubs + 1;
738  } else {
739  // could not find stub in stub map
740  }
741  }
742 
743  // pt consistency
744  aTrack.setStubPtConsistency(
745  StubPtConsistency::getConsistency(aTrack, theTrackerGeom, tTopo, settings_.bfield(), settings_.nHelixPar()));
746 
747  // set track word before TQ MVA calculated which uses track word variables
748  aTrack.setTrackWordBits();
749 
750  if (trackQuality_) {
751  trackQualityModel_->setL1TrackQuality(aTrack);
752  }
753 
754  // hph::HitPatternHelper hph(setupHPH_, tmp_hit, tmp_tanL, tmp_z0);
755  // if (trackQuality_) {
756  // trackQualityModel_->setBonusFeatures(hph.bonusFeatures());
757  // }
758 
759  // set track word again to set MVA variable from TTTrack into track word
760  aTrack.setTrackWordBits();
761  // test track word
762  //aTrack.testTrackWordBits();
763 
764  L1TkTracksForOutput->push_back(aTrack);
765  }
766 
767  iEvent.put(std::move(L1TkTracksForOutput), "Level1TTTracks");
768 
769  // produce clock and bit accurate stream output tracks and stubs.
770  // from end of tracklet pattern recognition.
771  // Convertion here is from stream format that allows this code to run
772  // outside CMSSW to the EDProduct one.
773  Streams streamsTrack(numStreamsTrack);
774  StreamsStub streamsStub(numStreamsStub);
775 
776  for (unsigned int chanTrk = 0; chanTrk < numStreamsTrack; chanTrk++) {
777  for (unsigned int itk = 0; itk < streamsTrackRaw[chanTrk].size(); itk++) {
778  std::string bitsTrk = streamsTrackRaw[chanTrk][itk];
779  int iSeed = chanTrk % channelAssignment_->numChannelsTrack(); // seed type
780  streamsTrack[chanTrk].emplace_back(bitsTrk);
781 
782  const unsigned int chanStubOffsetIn = chanTrk * numStubChannel;
783  const unsigned int chanStubOffsetOut = channelAssignment_->offsetStub(chanTrk);
784  const unsigned int numProjLayers = channelAssignment_->numProjectionLayers(iSeed);
785  TTBV hitMap(0, numProjLayers + numSeedingLayers);
786  // remove padding from stub stream
787  for (unsigned int iproj = 0; iproj < numStubChannel; iproj++) {
788  // FW current has one (perhaps invalid) stub per layer per track.
789  const StubStreamData& stubdata = streamsStubRaw[chanStubOffsetIn + iproj][itk];
790  const L1TStub& stub = stubdata.stub();
791  if (!stubdata.valid())
792  continue;
793  const TTStubRef& ttStubRef = stubMap[stub];
794  const int seedType = stubdata.iSeed();
795  const int layerId = setup_->layerId(ttStubRef);
796  const int channelId = channelAssignment_->channelId(seedType, layerId);
797  hitMap.set(channelId);
798  streamsStub[chanStubOffsetOut + channelId].emplace_back(ttStubRef, stubdata.dataBits());
799  }
800  for (int layerId : hitMap.ids(false)) { // invalid stubs
801  streamsStub[chanStubOffsetOut + layerId].emplace_back(tt::FrameStub());
802  }
803  }
804  }
805 
806  iEvent.emplace(putTokenTracks_, std::move(streamsTrack));
807  iEvent.emplace(putTokenStubs_, std::move(streamsStub));
808 
809 }
Log< level::Info, true > LogVerbatim
MPlex< T, D1, D2, N > hypot(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:616
unsigned int tobSide(const DetId &id) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
trklet::Settings settings_
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
const Point & position() const
position
Definition: BeamSpot.h:59
Bit vector used by Track Trigger emulators. Mainly used to convert integers into arbitrary (within ma...
Definition: TTBV.h:20
std::pair< TTStubRef, Frame > FrameStub
Definition: TTTypes.h:60
T z() const
Definition: PV3DBase.h:61
std::vector< StreamStub > StreamsStub
Definition: TTTypes.h:66
std::vector< FrameStub > StreamStub
Definition: TTTypes.h:63
std::string slotToDTCname(unsigned int slot) const
Definition: Settings.h:469
const edm::EDGetTokenT< reco::BeamSpot > getTokenBS_
trklet::TrackletEventProcessor eventProcessor
int channelId(const TTTrackRef &ttTrackRef) const
const std::vector< int > & tfpChannels() const
Definition: TTDTC.h:26
assert(be >=bs)
int offsetStub(int channelTrack) const
edm::EDGetTokenT< std::vector< TrackingParticle > > getTokenTrackingParticle_
T x() const
Definition: PV3DBase.h:59
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > esGetTokenTGeom_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > esGetTokenTTopo_
T y() const
Definition: PV3DBase.h:60
int iEvent
Definition: GenABIO.cc:224
GlobalPoint stubPos(const TTStubRef &ttStubRef) const
Definition: Setup.cc:824
TTClusterRefT< Ref_Phase2TrackerDigi_ > TTClusterRef
Definition: TTTypes.h:45
double bfield() const
Definition: Settings.h:284
int layerId(const TTStubRef &ttStubRef) const
Definition: Setup.cc:511
const std::string & dataBits() const
void initialise(unsigned int killScenario, const TrackerTopology *trackerTopology, const TrackerGeometry *trackerGeometry)
Definition: StubKiller.cc:20
T mag() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const std::vector< int > & tfpRegions() const
Definition: TTDTC.h:24
const ChannelAssignment * channelAssignment_
bool killStub(const TTStub< Ref_Phase2TrackerDigi_ > *stub, const std::vector< int > layersToKill, const double minPhiToKill, const double maxPhiToKill, const double minZToKill, const double maxZToKill, const double minRToKill, const double maxRToKill, const double fractionOfStubsToKillInLayers, const double fractionOfStubsToKillEverywhere)
Definition: StubKiller.cc:212
const edm::EDPutTokenT< Streams > putTokenTracks_
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
bool isNull() const
Checks for null.
Definition: Ref.h:229
const std::vector< Track > & tracks() const
constexpr unsigned int N_SECTOR
Definition: Settings.h:23
int numProjectionLayers(int seedType) const
Definition: DetId.h:17
const L1TStub & stub() const
bool psModule(int dtcId) const
Definition: Setup.cc:322
NOTE: this is needed even if it seems not.
Definition: TTCluster.h:27
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
const std::vector< float > & sim_pt()
Definition: Trktree.cc:6774
unsigned int nHelixPar() const
Definition: Settings.h:265
const edm::EDGetTokenT< TTDTC > getTokenDTC_
Class to store hardware like structured TTStub Collection used by Track Trigger emulators.
Definition: TTDTC.h:17
std::vector< Stream > Streams
Definition: TTTypes.h:68
unsigned int tobRod(const DetId &id) const
const edm::EDPutTokenT< StreamsStub > putTokenStubs_
double numTiltedLayerRing(int layerId) const
Definition: Setup.h:313
const std::vector< float > & sim_eta()
Definition: Trktree.cc:6715
std::unique_ptr< L1TrackQuality > trackQualityModel_
edm::EDGetTokenT< TTClusterAssociationMap< Ref_Phase2TrackerDigi_ > > getTokenTTClusterMCTruth_
unsigned int tidRing(const DetId &id) const
const std::vector< float > & sim_phi()
Definition: Trktree.cc:6927
int dtcId(int tklId) const
Definition: Setup.cc:294
void event(SLHCEvent &ev, std::vector< std::vector< std::string >> &streamsTrackRaw, std::vector< std::vector< StubStreamData >> &streamsStubRaw)
const tt::StreamStub & stream(int tfpRegion, int tfpChannel) const
Definition: TTDTC.cc:48
def move(src, dest)
Definition: eostools.py:511
unsigned int uniqueIndex() const
Definition: L1TStub.h:92
float getConsistency(TTTrack< Ref_Phase2TrackerDigi_ > aTrack, const TrackerGeometry *theTrackerGeom, const TrackerTopology *tTopo, double mMagneticFieldStrength, int nPar)
constexpr int N_LAYER
Definition: Settings.h:25

Member Data Documentation

◆ asciiEventOut_

std::ofstream L1FPGATrackProducer::asciiEventOut_
private

Definition at line 167 of file L1FPGATrackProducer.cc.

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

◆ asciiEventOutName_

string L1FPGATrackProducer::asciiEventOutName_
private

Definition at line 166 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ channelAssignment_

const ChannelAssignment* L1FPGATrackProducer::channelAssignment_
private

Definition at line 204 of file L1FPGATrackProducer.cc.

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

◆ config

edm::ParameterSet L1FPGATrackProducer::config
private

Containers of parameters passed by python configuration file.

Definition at line 151 of file L1FPGATrackProducer.cc.

◆ dtclayerdisk

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

Definition at line 186 of file L1FPGATrackProducer.cc.

◆ esGetToken_

const edm::ESGetToken<tt::Setup, tt::SetupRcd> L1FPGATrackProducer::esGetToken_
private

Definition at line 215 of file L1FPGATrackProducer.cc.

Referenced by beginRun().

◆ esGetTokenBfield_

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> L1FPGATrackProducer::esGetTokenBfield_
private

Definition at line 212 of file L1FPGATrackProducer.cc.

Referenced by beginRun().

◆ esGetTokenChannelAssignment_

const ESGetToken<ChannelAssignment, ChannelAssignmentRcd> L1FPGATrackProducer::esGetTokenChannelAssignment_
private

Definition at line 202 of file L1FPGATrackProducer.cc.

Referenced by beginRun().

◆ esGetTokenHPH_

const edm::ESGetToken<hph::Setup, hph::SetupRcd> L1FPGATrackProducer::esGetTokenHPH_
private

Definition at line 216 of file L1FPGATrackProducer.cc.

Referenced by beginRun().

◆ esGetTokenTGeom_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> L1FPGATrackProducer::esGetTokenTGeom_
private

Definition at line 213 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ esGetTokenTTopo_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> L1FPGATrackProducer::esGetTokenTTopo_
private

Definition at line 214 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ eventnum

int L1FPGATrackProducer::eventnum
private

Definition at line 148 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ eventProcessor

trklet::TrackletEventProcessor L1FPGATrackProducer::eventProcessor
private

Definition at line 173 of file L1FPGATrackProducer.cc.

Referenced by beginRun(), and produce().

◆ extended_

bool L1FPGATrackProducer::extended_
private

Definition at line 180 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ failScenario_

int L1FPGATrackProducer::failScenario_
private

Definition at line 177 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ fitPatternFile

edm::FileInPath L1FPGATrackProducer::fitPatternFile
private

File path for configuration files.

Definition at line 157 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ getTokenBS_

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

Definition at line 192 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ getTokenDTC_

const edm::EDGetTokenT<TTDTC> L1FPGATrackProducer::getTokenDTC_
private

Definition at line 193 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ getTokenTrackingParticle_

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

Definition at line 195 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ getTokenTTClusterMCTruth_

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

Definition at line 194 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ MCTruthClusterInputTag

edm::InputTag L1FPGATrackProducer::MCTruthClusterInputTag
private

Definition at line 188 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ MCTruthStubInputTag

edm::InputTag L1FPGATrackProducer::MCTruthStubInputTag
private

Definition at line 189 of file L1FPGATrackProducer.cc.

◆ memoryModulesFile

edm::FileInPath L1FPGATrackProducer::memoryModulesFile
private

Definition at line 159 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ nHelixPar_

unsigned int L1FPGATrackProducer::nHelixPar_
private

Definition at line 179 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ processingModulesFile

edm::FileInPath L1FPGATrackProducer::processingModulesFile
private

Definition at line 160 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ putTokenStubs_

const edm::EDPutTokenT<StreamsStub> L1FPGATrackProducer::putTokenStubs_
private

Definition at line 200 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ putTokenTracks_

const edm::EDPutTokenT<Streams> L1FPGATrackProducer::putTokenTracks_
private

Definition at line 198 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ readMoreMcTruth_

bool L1FPGATrackProducer::readMoreMcTruth_
private

Definition at line 153 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ reduced_

bool L1FPGATrackProducer::reduced_
private

Definition at line 181 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ settings_

trklet::Settings L1FPGATrackProducer::settings_
private

Definition at line 170 of file L1FPGATrackProducer.cc.

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

◆ setup_

const Setup* L1FPGATrackProducer::setup_
private

◆ setupHPH_

const hph::Setup* L1FPGATrackProducer::setupHPH_
private

Definition at line 209 of file L1FPGATrackProducer.cc.

Referenced by beginRun().

◆ stubKiller_

StubKiller* L1FPGATrackProducer::stubKiller_
private

Definition at line 176 of file L1FPGATrackProducer.cc.

Referenced by produce().

◆ tableTEDFile

edm::FileInPath L1FPGATrackProducer::tableTEDFile
private

Definition at line 163 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ tableTREFile

edm::FileInPath L1FPGATrackProducer::tableTREFile
private

Definition at line 164 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ TrackingParticleInputTag

edm::InputTag L1FPGATrackProducer::TrackingParticleInputTag
private

Definition at line 190 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().

◆ trackQuality_

bool L1FPGATrackProducer::trackQuality_
private

Definition at line 183 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ trackQualityModel_

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

Definition at line 184 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer(), and produce().

◆ wiresFile

edm::FileInPath L1FPGATrackProducer::wiresFile
private

Definition at line 161 of file L1FPGATrackProducer.cc.

Referenced by L1FPGATrackProducer().