CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
OmtfEmulation Class Reference

#include <OmtfEmulation.h>

Inheritance diagram for OmtfEmulation:
OMTFReconstruction

Public Member Functions

void addObservers (const MuonGeometryTokens &muonGeometryTokens, const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > &magneticFieldEsToken, const edm::ESGetToken< Propagator, TrackingComponentsRecord > &propagatorEsToken) override
 
void beginJob ()
 
 OmtfEmulation (const edm::ParameterSet &edmParameterSet, MuStubsInputTokens &muStubsInputTokens, edm::EDGetTokenT< L1Phase2MuDTPhContainer > inputTokenDTPhPhase2)
 
 ~OmtfEmulation () override=default
 
- Public Member Functions inherited from OMTFReconstruction
void beginJob ()
 
void beginJob ()
 
void beginRun (edm::Run const &run, edm::EventSetup const &iSetup, edm::ESGetToken< L1TMuonOverlapParams, L1TMuonOverlapParamsRcd > &omtfParamsEsToken, const MuonGeometryTokens &muonGeometryTokens, const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > &magneticFieldEsToken, const edm::ESGetToken< Propagator, TrackingComponentsRecord > &propagatorEsToken)
 
void beginRun (edm::Run const &, edm::EventSetup const &)
 
void endJob ()
 
void endJob ()
 
 OMTFReconstruction (const edm::ParameterSet &, MuStubsInputTokens &muStubsInputTokens)
 
 OMTFReconstruction (const edm::ParameterSet &, edm::ConsumesCollector &&)
 
std::unique_ptr< l1t::RegionalMuonCandBxCollectionreconstruct (const edm::Event &, const edm::EventSetup &)
 
std::unique_ptr< l1t::RegionalMuonCandBxCollectionreconstruct (const edm::Event &, const edm::EventSetup &)
 
void setInputMaker (unique_ptr< OMTFinputMaker > inputMaker)
 
virtual ~OMTFReconstruction ()
 
 ~OMTFReconstruction ()
 

Private Attributes

edm::EDGetTokenT< L1Phase2MuDTPhContainerinputTokenDTPhPhase2
 
unique_ptr< PtAssignmentBaseptAssignment
 

Additional Inherited Members

- Protected Attributes inherited from OMTFReconstruction
edm::ParameterSet edmParameterSet
 
unique_ptr< OMTFinputMakerinputMaker
 
MuStubsInputTokensmuStubsInputTokens
 
std::vector< std::unique_ptr< IOMTFEmulationObserver > > observers
 
unique_ptr< OMTFConfigurationomtfConfig
 
unique_ptr< L1TMuonOverlapParamsomtfParams
 OMTF objects. More...
 
edm::ESWatcher< L1TMuonOverlapParamsRcdomtfParamsRecordWatcher
 
unique_ptr< IProcessorEmulatoromtfProc
 

Detailed Description

Definition at line 16 of file OmtfEmulation.h.

Constructor & Destructor Documentation

◆ OmtfEmulation()

OmtfEmulation::OmtfEmulation ( const edm::ParameterSet edmParameterSet,
MuStubsInputTokens muStubsInputTokens,
edm::EDGetTokenT< L1Phase2MuDTPhContainer inputTokenDTPhPhase2 
)

Definition at line 18 of file OmtfEmulation.cc.

MuStubsInputTokens & muStubsInputTokens
OMTFReconstruction(const edm::ParameterSet &, edm::ConsumesCollector &&)
edm::ParameterSet edmParameterSet
edm::EDGetTokenT< L1Phase2MuDTPhContainer > inputTokenDTPhPhase2
Definition: OmtfEmulation.h:31

◆ ~OmtfEmulation()

OmtfEmulation::~OmtfEmulation ( )
overridedefault

Member Function Documentation

◆ addObservers()

void OmtfEmulation::addObservers ( const MuonGeometryTokens muonGeometryTokens,
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > &  magneticFieldEsToken,
const edm::ESGetToken< Propagator, TrackingComponentsRecord > &  propagatorEsToken 
)
overridevirtual

Reimplemented from OMTFReconstruction.

Definition at line 36 of file OmtfEmulation.cc.

References OMTFReconstruction::addObservers(), OMTFReconstruction::edmParameterSet, edm::ParameterSet::exists(), contentValuesFiles::fullPath, edm::ParameterSet::getParameter(), OMTFReconstruction::observers, OMTFReconstruction::omtfConfig, OMTFReconstruction::omtfProc, ptAssignment, OMTFProcessor< GoldenPatternType >::setPtAssignment(), and AlCaHLTBitMon_QueryRunRegistry::string.

38  {
39  if (observers.empty()) { //assuring it is done only at the first run
40  OMTFReconstruction::addObservers(muonGeometryTokens, magneticFieldEsToken, propagatorEsToken);
41  /* if(edmParameterSet.exists("patternsPtAssignment") && edmParameterSet.getParameter<bool>("patternsPtAssignment")) {
42  //std::string rootFileName = edmParameterSet.getParameter<std::string>("dumpHitsFileName");
43  .emplace_back(std::make_unique<PatternsPtAssignment>(edmParameterSet, omtfConfig.get(), omtfProcGoldenPat->getPatterns(), ""));
44  }*/
45  }
46 
47  if (edmParameterSet.exists("neuralNetworkFile") && !ptAssignment) {
48  edm::LogImportant("OMTFReconstruction") << "constructing PtAssignmentNNRegression" << std::endl;
49  std::string neuralNetworkFile = edmParameterSet.getParameter<edm::FileInPath>("neuralNetworkFile").fullPath();
50  ptAssignment = std::make_unique<PtAssignmentNNRegression>(edmParameterSet, omtfConfig.get(), neuralNetworkFile);
51  }
52 
53  auto omtfProcGoldenPat = dynamic_cast<OMTFProcessor<GoldenPattern>*>(omtfProc.get());
54  if (omtfProcGoldenPat) {
55  omtfProcGoldenPat->setPtAssignment(ptAssignment.get());
56  //omtfProcGoldenPat can be constructed from scratch each run, so ptAssignment is set herer every run
57  }
58 }
virtual void setPtAssignment(PtAssignmentBase *ptAssignment)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
bool exists(std::string const &parameterName) const
checks if a parameter exists
virtual void addObservers(const MuonGeometryTokens &muonGeometryTokens, const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > &magneticFieldEsToken, const edm::ESGetToken< Propagator, TrackingComponentsRecord > &propagatorEsToken)
std::vector< std::unique_ptr< IOMTFEmulationObserver > > observers
Log< level::Error, true > LogImportant
unique_ptr< OMTFConfiguration > omtfConfig
edm::ParameterSet edmParameterSet
unique_ptr< IProcessorEmulator > omtfProc
unique_ptr< PtAssignmentBase > ptAssignment
Definition: OmtfEmulation.h:33

◆ beginJob()

void OmtfEmulation::beginJob ( void  )

Definition at line 23 of file OmtfEmulation.cc.

References OMTFReconstruction::edmParameterSet, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), OMTFReconstruction::inputMaker, inputTokenDTPhPhase2, OMTFReconstruction::muStubsInputTokens, and OMTFReconstruction::omtfConfig.

Referenced by L1TMuonOverlapPhase2TrackProducer::beginJob().

23  {
24  if (edmParameterSet.exists("usePhase2DTPrimitives") && edmParameterSet.getParameter<bool>("usePhase2DTPrimitives")) {
25  inputMaker = std::make_unique<InputMakerPhase2>(edmParameterSet,
28  omtfConfig.get(),
29  std::make_unique<OmtfPhase2AngleConverter>());
30  } else {
31  inputMaker = std::make_unique<OMTFinputMaker>(
32  edmParameterSet, muStubsInputTokens, omtfConfig.get(), std::make_unique<OmtfAngleConverter>());
33  }
34 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
bool exists(std::string const &parameterName) const
checks if a parameter exists
unique_ptr< OMTFinputMaker > inputMaker
MuStubsInputTokens & muStubsInputTokens
unique_ptr< OMTFConfiguration > omtfConfig
edm::ParameterSet edmParameterSet
edm::EDGetTokenT< L1Phase2MuDTPhContainer > inputTokenDTPhPhase2
Definition: OmtfEmulation.h:31

Member Data Documentation

◆ inputTokenDTPhPhase2

edm::EDGetTokenT<L1Phase2MuDTPhContainer> OmtfEmulation::inputTokenDTPhPhase2
private

Definition at line 31 of file OmtfEmulation.h.

Referenced by beginJob().

◆ ptAssignment

unique_ptr<PtAssignmentBase> OmtfEmulation::ptAssignment
private

Definition at line 33 of file OmtfEmulation.h.

Referenced by addObservers().