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)
 
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
 
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_
 
unsigned pt_lut_ver_
 
SectorProcessorLUT sector_processor_lut_
 
VersionControl version_control_
 

Detailed Description

Definition at line 19 of file EMTFSetup.h.

Constructor & Destructor Documentation

◆ EMTFSetup()

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

Definition at line 8 of file EMTFSetup.cc.

11  version_control_(iConfig),
13  pt_assign_engine_(nullptr),
14  fw_ver_(0),
15  pt_lut_ver_(0),
16  pc_lut_ver_(0) {
17  // Set pt assignment engine according to Era
18  if (era() == "Run2_2016") {
20  } else if (era() == "Run2_2017" || era() == "Run2_2018") {
22  } else if (era() == "Run3_2021") {
23  pt_assign_engine_.reset(new PtAssignmentEngine2017()); //TODO - implement ver 2021
24  } else {
25  throw cms::Exception("L1TMuonEndCap") << "Cannot recognize the era option: " << era();
26  }
27 
28  emtf_assert(pt_assign_engine_ != nullptr);
29 }

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

◆ ~EMTFSetup()

EMTFSetup::~EMTFSetup ( )

Definition at line 31 of file EMTFSetup.cc.

31 {}

Member Function Documentation

◆ era()

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

Definition at line 52 of file EMTFSetup.h.

52 { 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 44 of file EMTFSetup.h.

44 { 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 46 of file EMTFSetup.h.

46 { 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 45 of file EMTFSetup.h.

45 { return pt_lut_ver_; }

References pt_lut_ver_.

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

◆ getConditionHelper()

const ConditionHelper& EMTFSetup::getConditionHelper ( ) const
inline

Definition at line 30 of file EMTFSetup.h.

30 { return condition_helper_; }

References condition_helper_.

Referenced by TrackFinder::process().

◆ getConfig()

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

Definition at line 49 of file EMTFSetup.h.

49 { return version_control_.getConfig(); }

References VersionControl::getConfig(), and version_control_.

Referenced by TrackFinder::process().

◆ getGeometryTranslator()

const GeometryTranslator& EMTFSetup::getGeometryTranslator ( ) const
inline

Definition at line 28 of file EMTFSetup.h.

28 { return geometry_translator_; }

References geometry_translator_.

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

◆ getPtAssignmentEngine()

PtAssignmentEngine* EMTFSetup::getPtAssignmentEngine ( ) const
inline

Definition at line 36 of file EMTFSetup.h.

36 { return pt_assign_engine_.get(); }

References pt_assign_engine_.

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

◆ getSectorProcessorLUT()

const SectorProcessorLUT& EMTFSetup::getSectorProcessorLUT ( ) const
inline

Definition at line 34 of file EMTFSetup.h.

34 { return sector_processor_lut_; }

References sector_processor_lut_.

Referenced by SectorProcessor::process_single_bx().

◆ getVersionControl()

const VersionControl& EMTFSetup::getVersionControl ( ) const
inline

Definition at line 32 of file EMTFSetup.h.

32 { 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 33 of file EMTFSetup.cc.

33  {
34  // Get the geometry for TP conversions
36 
37  // Get the conditions, primarily the firmware version and the BDT forests
39 
40  // Set version numbers
44 
45  if (!useO2O()) {
46  // Currently, do not modify fw_ver_ and pt_lut_ver_
48  }
49 
50  // Do run-dependent configuration. This may overwrite the configurables passed by the python config file
52 
53  // Reload primitive conversion LUTs if necessary
55 
56  // Reload pT LUT if necessary
58 
59  return;
60 }

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 51 of file EMTFSetup.h.

51 { 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 50 of file EMTFSetup.h.

50 { return version_control_.verbose(); }

References VersionControl::verbose(), and version_control_.

Member Data Documentation

◆ condition_helper_

ConditionHelper EMTFSetup::condition_helper_
private

Definition at line 57 of file EMTFSetup.h.

Referenced by getConditionHelper(), and reload().

◆ fw_ver_

unsigned EMTFSetup::fw_ver_
private

Definition at line 67 of file EMTFSetup.h.

Referenced by get_fw_version(), and reload().

◆ geometry_translator_

GeometryTranslator EMTFSetup::geometry_translator_
private

Definition at line 55 of file EMTFSetup.h.

Referenced by getGeometryTranslator(), and reload().

◆ pc_lut_ver_

unsigned EMTFSetup::pc_lut_ver_
private

Definition at line 69 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 64 of file EMTFSetup.h.

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

◆ pt_lut_ver_

unsigned EMTFSetup::pt_lut_ver_
private

Definition at line 68 of file EMTFSetup.h.

Referenced by get_pt_lut_version(), and reload().

◆ sector_processor_lut_

SectorProcessorLUT EMTFSetup::sector_processor_lut_
private

Definition at line 61 of file EMTFSetup.h.

Referenced by getSectorProcessorLUT(), and reload().

◆ version_control_

VersionControl EMTFSetup::version_control_
private

Definition at line 59 of file EMTFSetup.h.

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

VersionControl::configure_by_fw_version
void configure_by_fw_version(unsigned fw_version)
Definition: VersionControl.cc:68
EMTFSetup::era
std::string era() const
Definition: EMTFSetup.h:52
ConditionHelper::get_pc_lut_version_unchecked
unsigned int get_pc_lut_version_unchecked() const
Definition: ConditionHelper.cc:88
EMTFSetup::sector_processor_lut_
SectorProcessorLUT sector_processor_lut_
Definition: EMTFSetup.h:61
VersionControl::useO2O
bool useO2O() const
Definition: VersionControl.h:19
EMTFSetup::useO2O
bool useO2O() const
Definition: EMTFSetup.h:51
ConditionHelper::get_fw_version
unsigned int get_fw_version() const
Definition: ConditionHelper.cc:58
PtAssignmentEngine2017
Definition: PtAssignmentEngine2017.h:7
VersionControl::getConfig
const edm::ParameterSet & getConfig() const
Definition: VersionControl.h:17
EMTFSetup::geometry_translator_
GeometryTranslator geometry_translator_
Definition: EMTFSetup.h:55
EMTFSetup::get_pt_lut_version
unsigned get_pt_lut_version() const
Definition: EMTFSetup.h:45
EMTFSetup::pt_assign_engine_
std::unique_ptr< PtAssignmentEngine > pt_assign_engine_
Definition: EMTFSetup.h:64
EMTFSetup::version_control_
VersionControl version_control_
Definition: EMTFSetup.h:59
L1TMuon::GeometryTranslator::checkAndUpdateGeometry
void checkAndUpdateGeometry(const edm::EventSetup &)
Definition: GeometryTranslator.cc:122
EMTFSetup::get_pc_lut_version
unsigned get_pc_lut_version() const
Definition: EMTFSetup.h:46
iEvent
int iEvent
Definition: GenABIO.cc:224
ConditionHelper::get_pc_lut_version
unsigned int get_pc_lut_version() const
Definition: ConditionHelper.cc:71
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:69
Exception
Definition: hltDiff.cc:246
PtAssignmentEngine2016
Definition: PtAssignmentEngine2016.h:7
emtf_assert
#define emtf_assert(expr)
Definition: DebugTools.h:18
EMTFSetup::pt_lut_ver_
unsigned pt_lut_ver_
Definition: EMTFSetup.h:68
EMTFSetup::get_fw_version
unsigned get_fw_version() const
Definition: EMTFSetup.h:44
EMTFSetup::condition_helper_
ConditionHelper condition_helper_
Definition: EMTFSetup.h:57
ConditionHelper::getForest
const L1TMuonEndCapForest * getForest() const
Definition: ConditionHelper.h:24
EMTFSetup::fw_ver_
unsigned fw_ver_
Definition: EMTFSetup.h:67
ConditionHelper::get_pt_lut_version
unsigned int get_pt_lut_version() const
Definition: ConditionHelper.cc:63
ConditionHelper::checkAndUpdateConditions
void checkAndUpdateConditions(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: ConditionHelper.cc:17