CMS 3D CMS Logo

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

#include <EMTFSetup.h>

Public Member Functions

 EMTFSetup (const edm::ParameterSet &iConfig, edm::ConsumesCollector iCollector)
 
std::string era () const
 
unsigned get_fw_version () const
 
unsigned get_pc_lut_version () const
 
unsigned get_pt_lut_version () const
 
const ConditionHelpergetConditionHelper () const
 
const edm::ParameterSetgetConfig () const
 
const GeometryTranslatorgetGeometryTranslator () const
 
PtAssignmentEnginegetPtAssignmentEngine () const
 
PtAssignmentEngineDxygetPtAssignmentEngineDxy () const
 
const SectorProcessorLUTgetSectorProcessorLUT () const
 
const VersionControlgetVersionControl () const
 
void reload (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
bool useO2O () const
 
int verbose () const
 
 ~EMTFSetup ()
 

Private Attributes

ConditionHelper condition_helper_
 
unsigned fw_ver_
 
GeometryTranslator geometry_translator_
 
unsigned pc_lut_ver_
 
std::unique_ptr< PtAssignmentEnginept_assign_engine_
 
std::unique_ptr< PtAssignmentEngineDxypt_assign_engine_dxy_
 
unsigned pt_lut_ver_
 
SectorProcessorLUT sector_processor_lut_
 
VersionControl version_control_
 

Detailed Description

Definition at line 20 of file EMTFSetup.h.

Constructor & Destructor Documentation

◆ EMTFSetup()

EMTFSetup::EMTFSetup ( const edm::ParameterSet iConfig,
edm::ConsumesCollector  iCollector 
)
explicit

Definition at line 11 of file EMTFSetup.cc.

12  : geometry_translator_(iCollector),
13  condition_helper_(iCollector),
14  version_control_(iConfig),
16  pt_assign_engine_(nullptr),
17  pt_assign_engine_dxy_(nullptr),
18  fw_ver_(0),
19  pt_lut_ver_(0),
20  pc_lut_ver_(0) {
21  // Set pt assignment engine according to Era
22  if (era() == "Run2_2016") {
23  pt_assign_engine_ = std::make_unique<PtAssignmentEngine2016>();
24  } else if (era() == "Run2_2017" || era() == "Run2_2018") {
25  pt_assign_engine_ = std::make_unique<PtAssignmentEngine2017>();
26  } else if (era() == "Run3_2021") {
27  pt_assign_engine_ = std::make_unique<PtAssignmentEngine2017>(); //TODO - implement ver 2021
28  } else {
29  throw cms::Exception("L1TMuonEndCap") << "Cannot recognize the era option: " << era();
30  }
31 
32  // No era setup for displaced pT assignment engine
33  pt_assign_engine_dxy_ = std::make_unique<PtAssignmentEngineDxy>();
34 
35  emtf_assert(pt_assign_engine_ != nullptr);
37 }

References emtf_assert, era(), Exception, pt_assign_engine_, and pt_assign_engine_dxy_.

◆ ~EMTFSetup()

EMTFSetup::~EMTFSetup ( )

Definition at line 39 of file EMTFSetup.cc.

39 {}

Member Function Documentation

◆ era()

std::string EMTFSetup::era ( ) const
inline

Definition at line 55 of file EMTFSetup.h.

55 { return version_control_.era(); }

References VersionControl::era(), and version_control_.

Referenced by EMTFSetup(), and TrackFinder::process().

◆ get_fw_version()

unsigned EMTFSetup::get_fw_version ( ) const
inline

Definition at line 47 of file EMTFSetup.h.

47 { return fw_ver_; }

References fw_ver_.

Referenced by TrackFinder::process(), and reload().

◆ get_pc_lut_version()

unsigned EMTFSetup::get_pc_lut_version ( ) const
inline

Definition at line 49 of file EMTFSetup.h.

49 { return pc_lut_ver_; }

References pc_lut_ver_.

Referenced by TrackFinder::process(), and reload().

◆ get_pt_lut_version()

unsigned EMTFSetup::get_pt_lut_version ( ) const
inline

Definition at line 48 of file EMTFSetup.h.

48 { return pt_lut_ver_; }

References pt_lut_ver_.

Referenced by TrackFinder::process(), and reload().

◆ getConditionHelper()

const ConditionHelper& EMTFSetup::getConditionHelper ( ) const
inline

Definition at line 31 of file EMTFSetup.h.

31 { return condition_helper_; }

References condition_helper_.

Referenced by TrackFinder::process().

◆ getConfig()

const edm::ParameterSet& EMTFSetup::getConfig ( ) const
inline

Definition at line 52 of file EMTFSetup.h.

52 { return version_control_.getConfig(); }

References VersionControl::getConfig(), and version_control_.

Referenced by TrackFinder::process().

◆ getGeometryTranslator()

const GeometryTranslator& EMTFSetup::getGeometryTranslator ( ) const
inline

Definition at line 29 of file EMTFSetup.h.

29 { return geometry_translator_; }

References geometry_translator_.

Referenced by TrackFinder::process(), and SectorProcessor::process_single_bx().

◆ getPtAssignmentEngine()

PtAssignmentEngine* EMTFSetup::getPtAssignmentEngine ( ) const
inline

Definition at line 37 of file EMTFSetup.h.

37 { return pt_assign_engine_.get(); }

References pt_assign_engine_.

Referenced by TrackFinder::process(), and SectorProcessor::process_single_bx().

◆ getPtAssignmentEngineDxy()

PtAssignmentEngineDxy* EMTFSetup::getPtAssignmentEngineDxy ( ) const
inline

Definition at line 39 of file EMTFSetup.h.

39 { return pt_assign_engine_dxy_.get(); }

References pt_assign_engine_dxy_.

Referenced by SectorProcessor::process_single_bx().

◆ getSectorProcessorLUT()

const SectorProcessorLUT& EMTFSetup::getSectorProcessorLUT ( ) const
inline

Definition at line 35 of file EMTFSetup.h.

35 { return sector_processor_lut_; }

References sector_processor_lut_.

Referenced by SectorProcessor::process_single_bx().

◆ getVersionControl()

const VersionControl& EMTFSetup::getVersionControl ( ) const
inline

Definition at line 33 of file EMTFSetup.h.

33 { return version_control_; }

References version_control_.

Referenced by SectorProcessor::process(), and SectorProcessor::process_single_bx().

◆ reload()

void EMTFSetup::reload ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Definition at line 41 of file EMTFSetup.cc.

41  {
42  // Get the geometry for TP conversions
44 
45  // Get the conditions, primarily the firmware version and the BDT forests
47 
48  // Set version numbers
52 
53  if (!useO2O()) {
54  // Currently, do not modify fw_ver_ and pt_lut_ver_
56  }
57 
58  // Do run-dependent configuration. This may overwrite the configurables passed by the python config file
60 
61  // Reload primitive conversion LUTs if necessary
63 
64  // Reload pT LUT if necessary
66 
67  return;
68 }

References ConditionHelper::checkAndUpdateConditions(), L1TMuon::GeometryTranslator::checkAndUpdateGeometry(), condition_helper_, VersionControl::configure_by_fw_version(), fw_ver_, geometry_translator_, ConditionHelper::get_fw_version(), get_fw_version(), ConditionHelper::get_pc_lut_version(), get_pc_lut_version(), ConditionHelper::get_pc_lut_version_unchecked(), ConditionHelper::get_pt_lut_version(), get_pt_lut_version(), ConditionHelper::getForest(), iEvent, pc_lut_ver_, pt_assign_engine_, pt_lut_ver_, SectorProcessorLUT::read(), sector_processor_lut_, useO2O(), and version_control_.

Referenced by TrackFinder::process().

◆ useO2O()

bool EMTFSetup::useO2O ( ) const
inline

Definition at line 54 of file EMTFSetup.h.

54 { return version_control_.useO2O(); }

References VersionControl::useO2O(), and version_control_.

Referenced by TrackFinder::process(), and reload().

◆ verbose()

int EMTFSetup::verbose ( ) const
inline

Definition at line 53 of file EMTFSetup.h.

53 { return version_control_.verbose(); }

References VersionControl::verbose(), and version_control_.

Member Data Documentation

◆ condition_helper_

ConditionHelper EMTFSetup::condition_helper_
private

Definition at line 60 of file EMTFSetup.h.

Referenced by getConditionHelper(), and reload().

◆ fw_ver_

unsigned EMTFSetup::fw_ver_
private

Definition at line 72 of file EMTFSetup.h.

Referenced by get_fw_version(), and reload().

◆ geometry_translator_

GeometryTranslator EMTFSetup::geometry_translator_
private

Definition at line 58 of file EMTFSetup.h.

Referenced by getGeometryTranslator(), and reload().

◆ pc_lut_ver_

unsigned EMTFSetup::pc_lut_ver_
private

Definition at line 74 of file EMTFSetup.h.

Referenced by get_pc_lut_version(), and reload().

◆ pt_assign_engine_

std::unique_ptr<PtAssignmentEngine> EMTFSetup::pt_assign_engine_
private

Definition at line 67 of file EMTFSetup.h.

Referenced by EMTFSetup(), getPtAssignmentEngine(), and reload().

◆ pt_assign_engine_dxy_

std::unique_ptr<PtAssignmentEngineDxy> EMTFSetup::pt_assign_engine_dxy_
private

Definition at line 69 of file EMTFSetup.h.

Referenced by EMTFSetup(), and getPtAssignmentEngineDxy().

◆ pt_lut_ver_

unsigned EMTFSetup::pt_lut_ver_
private

Definition at line 73 of file EMTFSetup.h.

Referenced by get_pt_lut_version(), and reload().

◆ sector_processor_lut_

SectorProcessorLUT EMTFSetup::sector_processor_lut_
private

Definition at line 64 of file EMTFSetup.h.

Referenced by getSectorProcessorLUT(), and reload().

◆ version_control_

VersionControl EMTFSetup::version_control_
private

Definition at line 62 of file EMTFSetup.h.

Referenced by era(), getConfig(), getVersionControl(), reload(), useO2O(), and verbose().

EMTFSetup::pt_assign_engine_dxy_
std::unique_ptr< PtAssignmentEngineDxy > pt_assign_engine_dxy_
Definition: EMTFSetup.h:69
VersionControl::configure_by_fw_version
void configure_by_fw_version(unsigned fw_version)
Definition: VersionControl.cc:71
EMTFSetup::era
std::string era() const
Definition: EMTFSetup.h:55
ConditionHelper::get_pc_lut_version_unchecked
unsigned int get_pc_lut_version_unchecked() const
Definition: ConditionHelper.cc:90
EMTFSetup::sector_processor_lut_
SectorProcessorLUT sector_processor_lut_
Definition: EMTFSetup.h:64
VersionControl::useO2O
bool useO2O() const
Definition: VersionControl.h:19
EMTFSetup::useO2O
bool useO2O() const
Definition: EMTFSetup.h:54
ConditionHelper::get_fw_version
unsigned int get_fw_version() const
Definition: ConditionHelper.cc:60
VersionControl::getConfig
const edm::ParameterSet & getConfig() const
Definition: VersionControl.h:17
EMTFSetup::geometry_translator_
GeometryTranslator geometry_translator_
Definition: EMTFSetup.h:58
EMTFSetup::get_pt_lut_version
unsigned get_pt_lut_version() const
Definition: EMTFSetup.h:48
EMTFSetup::pt_assign_engine_
std::unique_ptr< PtAssignmentEngine > pt_assign_engine_
Definition: EMTFSetup.h:67
EMTFSetup::version_control_
VersionControl version_control_
Definition: EMTFSetup.h:62
L1TMuon::GeometryTranslator::checkAndUpdateGeometry
void checkAndUpdateGeometry(const edm::EventSetup &)
Definition: GeometryTranslator.cc:131
EMTFSetup::get_pc_lut_version
unsigned get_pc_lut_version() const
Definition: EMTFSetup.h:49
iEvent
int iEvent
Definition: GenABIO.cc:224
ConditionHelper::get_pc_lut_version
unsigned int get_pc_lut_version() const
Definition: ConditionHelper.cc:73
ConditionHelper::checkAndUpdateConditions
void checkAndUpdateConditions(const edm::EventSetup &iSetup)
Definition: ConditionHelper.cc:19
SectorProcessorLUT::read
void read(bool pc_lut_data, int pc_lut_version)
Definition: SectorProcessorLUT.cc:14
VersionControl::era
std::string era() const
Definition: VersionControl.h:20
VersionControl::verbose
int verbose() const
Definition: VersionControl.h:18
EMTFSetup::pc_lut_ver_
unsigned pc_lut_ver_
Definition: EMTFSetup.h:74
Exception
Definition: hltDiff.cc:245
emtf_assert
#define emtf_assert(expr)
Definition: DebugTools.h:18
EMTFSetup::pt_lut_ver_
unsigned pt_lut_ver_
Definition: EMTFSetup.h:73
EMTFSetup::get_fw_version
unsigned get_fw_version() const
Definition: EMTFSetup.h:47
EMTFSetup::condition_helper_
ConditionHelper condition_helper_
Definition: EMTFSetup.h:60
ConditionHelper::getForest
const L1TMuonEndCapForest * getForest() const
Definition: ConditionHelper.h:27
EMTFSetup::fw_ver_
unsigned fw_ver_
Definition: EMTFSetup.h:72
ConditionHelper::get_pt_lut_version
unsigned int get_pt_lut_version() const
Definition: ConditionHelper.cc:65