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.

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

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 }
GeometryTranslator geometry_translator_
Definition: EMTFSetup.h:58
std::unique_ptr< PtAssignmentEngineDxy > pt_assign_engine_dxy_
Definition: EMTFSetup.h:69
std::unique_ptr< PtAssignmentEngine > pt_assign_engine_
Definition: EMTFSetup.h:67
unsigned pt_lut_ver_
Definition: EMTFSetup.h:73
ConditionHelper condition_helper_
Definition: EMTFSetup.h:60
VersionControl version_control_
Definition: EMTFSetup.h:62
unsigned pc_lut_ver_
Definition: EMTFSetup.h:74
SectorProcessorLUT sector_processor_lut_
Definition: EMTFSetup.h:64
#define emtf_assert(expr)
Definition: DebugTools.h:18
std::string era() const
Definition: EMTFSetup.h:55
unsigned fw_ver_
Definition: EMTFSetup.h:72

◆ ~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.

References VersionControl::era(), and version_control_.

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

55 { return version_control_.era(); }
std::string era() const
VersionControl version_control_
Definition: EMTFSetup.h:62

◆ get_fw_version()

unsigned EMTFSetup::get_fw_version ( ) const
inline

Definition at line 47 of file EMTFSetup.h.

References fw_ver_.

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

47 { return fw_ver_; }
unsigned fw_ver_
Definition: EMTFSetup.h:72

◆ get_pc_lut_version()

unsigned EMTFSetup::get_pc_lut_version ( ) const
inline

Definition at line 49 of file EMTFSetup.h.

References pc_lut_ver_.

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

49 { return pc_lut_ver_; }
unsigned pc_lut_ver_
Definition: EMTFSetup.h:74

◆ get_pt_lut_version()

unsigned EMTFSetup::get_pt_lut_version ( ) const
inline

Definition at line 48 of file EMTFSetup.h.

References pt_lut_ver_.

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

48 { return pt_lut_ver_; }
unsigned pt_lut_ver_
Definition: EMTFSetup.h:73

◆ getConditionHelper()

const ConditionHelper& EMTFSetup::getConditionHelper ( ) const
inline

Definition at line 31 of file EMTFSetup.h.

References condition_helper_.

Referenced by TrackFinder::process().

31 { return condition_helper_; }
ConditionHelper condition_helper_
Definition: EMTFSetup.h:60

◆ getConfig()

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

Definition at line 52 of file EMTFSetup.h.

References VersionControl::getConfig(), and version_control_.

Referenced by TrackFinder::process().

52 { return version_control_.getConfig(); }
VersionControl version_control_
Definition: EMTFSetup.h:62
const edm::ParameterSet & getConfig() const

◆ getGeometryTranslator()

const GeometryTranslator& EMTFSetup::getGeometryTranslator ( ) const
inline

Definition at line 29 of file EMTFSetup.h.

References geometry_translator_.

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

29 { return geometry_translator_; }
GeometryTranslator geometry_translator_
Definition: EMTFSetup.h:58

◆ getPtAssignmentEngine()

PtAssignmentEngine* EMTFSetup::getPtAssignmentEngine ( ) const
inline

Definition at line 37 of file EMTFSetup.h.

References pt_assign_engine_.

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

37 { return pt_assign_engine_.get(); }
std::unique_ptr< PtAssignmentEngine > pt_assign_engine_
Definition: EMTFSetup.h:67

◆ getPtAssignmentEngineDxy()

PtAssignmentEngineDxy* EMTFSetup::getPtAssignmentEngineDxy ( ) const
inline

Definition at line 39 of file EMTFSetup.h.

References pt_assign_engine_dxy_.

Referenced by SectorProcessor::process_single_bx().

39 { return pt_assign_engine_dxy_.get(); }
std::unique_ptr< PtAssignmentEngineDxy > pt_assign_engine_dxy_
Definition: EMTFSetup.h:69

◆ getSectorProcessorLUT()

const SectorProcessorLUT& EMTFSetup::getSectorProcessorLUT ( ) const
inline

Definition at line 35 of file EMTFSetup.h.

References sector_processor_lut_.

Referenced by SectorProcessor::process_single_bx().

35 { return sector_processor_lut_; }
SectorProcessorLUT sector_processor_lut_
Definition: EMTFSetup.h:64

◆ getVersionControl()

const VersionControl& EMTFSetup::getVersionControl ( ) const
inline

Definition at line 33 of file EMTFSetup.h.

References version_control_.

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

33 { return version_control_; }
VersionControl version_control_
Definition: EMTFSetup.h:62

◆ reload()

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

Definition at line 41 of file EMTFSetup.cc.

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().

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 }
GeometryTranslator geometry_translator_
Definition: EMTFSetup.h:58
std::unique_ptr< PtAssignmentEngine > pt_assign_engine_
Definition: EMTFSetup.h:67
unsigned pt_lut_ver_
Definition: EMTFSetup.h:73
void checkAndUpdateConditions(const edm::EventSetup &iSetup)
void configure_by_fw_version(unsigned fw_version)
void read(bool pc_lut_data, int pc_lut_version)
unsigned int get_pc_lut_version_unchecked() const
ConditionHelper condition_helper_
Definition: EMTFSetup.h:60
VersionControl version_control_
Definition: EMTFSetup.h:62
int iEvent
Definition: GenABIO.cc:224
void checkAndUpdateGeometry(const edm::EventSetup &)
unsigned get_fw_version() const
Definition: EMTFSetup.h:47
unsigned get_pc_lut_version() const
Definition: EMTFSetup.h:49
unsigned pc_lut_ver_
Definition: EMTFSetup.h:74
SectorProcessorLUT sector_processor_lut_
Definition: EMTFSetup.h:64
bool useO2O() const
Definition: EMTFSetup.h:54
const L1TMuonEndCapForest * getForest() const
unsigned get_pt_lut_version() const
Definition: EMTFSetup.h:48
unsigned int get_fw_version() const
unsigned fw_ver_
Definition: EMTFSetup.h:72
unsigned int get_pc_lut_version() const
unsigned int get_pt_lut_version() const

◆ useO2O()

bool EMTFSetup::useO2O ( ) const
inline

Definition at line 54 of file EMTFSetup.h.

References VersionControl::useO2O(), and version_control_.

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

54 { return version_control_.useO2O(); }
bool useO2O() const
VersionControl version_control_
Definition: EMTFSetup.h:62

◆ verbose()

int EMTFSetup::verbose ( ) const
inline

Definition at line 53 of file EMTFSetup.h.

References VersionControl::verbose(), and version_control_.

53 { return version_control_.verbose(); }
VersionControl version_control_
Definition: EMTFSetup.h:62
int verbose() const

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().