CMS 3D CMS Logo

List of all members | Public Member Functions
OmtfPhase2AngleConverter Class Reference

#include <OmtfPhase2AngleConverter.h>

Inheritance diagram for OmtfPhase2AngleConverter:
OmtfAngleConverter AngleConverterBase

Public Member Functions

int getProcessorPhi (int phiZero, l1t::tftype part, int dtScNum, int dtPhi) const override
 
 OmtfPhase2AngleConverter ()
 
 ~OmtfPhase2AngleConverter () override=default
 
- Public Member Functions inherited from OmtfAngleConverter
virtual int getGlobalEta (const DTChamberId dTChamberId, const L1MuDTChambThContainer *dtThDigis, int bxNum) const
 
virtual int getGlobalEta (unsigned int rawid, const CSCCorrelatedLCTDigi &aDigi, float &r) const
 Convert local eta coordinate to global digital microGMT scale. More...
 
virtual EtaValue getGlobalEta (unsigned int rawid, const unsigned int &aDigi) const
 
virtual std::vector< EtaValuegetGlobalEta (const L1MuDTChambThContainer *dtThDigis, int bxFrom, int bxTo) const
 
virtual EtaValue getGlobalEta (const CSCDetId &detId, const CSCCorrelatedLCTDigi &aDigi) const
 Convert local eta coordinate to global digital microGMT scale. More...
 
virtual void getGlobalEta (const L1MuDTChambThDigi &thetaDigi, std::vector< EtaValue > &etaSegments) const
 
virtual int getGlobalEtaRpc (unsigned int rawid, const unsigned int &aDigi, float &r) const
 Convert local eta coordinate to global digital microGMT scale. More...
 
 OmtfAngleConverter ()
 
 ~OmtfAngleConverter () override
 
- Public Member Functions inherited from AngleConverterBase
 AngleConverterBase ()
 
virtual void checkAndUpdateGeometry (const edm::EventSetup &, const ProcConfigurationBase *config, const MuonGeometryTokens &muonGeometryTokens)
 Update the Geometry with current Event Setup. More...
 
float cscChamberEtaSize (const CSCDetId &id) const
 
virtual void getGlobalEta (const L1MuDTChambThDigi &thetaDigi, std::vector< EtaValue > &etaSegments) const
 
virtual std::vector< EtaValuegetGlobalEta (const L1MuDTChambThContainer *dtThDigis, int bxFrom, int bxTo) const
 
virtual EtaValue getGlobalEta (const CSCDetId &detId, const CSCCorrelatedLCTDigi &aDigi) const
 Convert local eta coordinate to global digital microGMT scale. More...
 
virtual EtaValue getGlobalEta (unsigned int rawid, const unsigned int &aDigi) const
 
virtual EtaValue getGlobalEtaCsc (const CSCDetId &detId) const
 returns the eta position of the CSC chamber More...
 
virtual EtaValue getGlobalEtaDt (const DTChamberId &detId) const
 
virtual int getProcessorPhi (int phiZero, l1t::tftype part, const CSCDetId &csc, const CSCCorrelatedLCTDigi &digi, unsigned int iInput) const
 
virtual int getProcessorPhi (unsigned int iProcessor, l1t::tftype part, const RPCDetId &rollId, const unsigned int &digi) const
 
virtual int getProcessorPhi (int phiZero, l1t::tftype part, const RPCDetId &rollId, const unsigned int &digi1, const unsigned int &digi2) const
 
virtual ~AngleConverterBase ()
 

Additional Inherited Members

- Protected Member Functions inherited from AngleConverterBase
virtual const int findBTIgroup (const L1MuDTChambPhDigi &aDigi, const L1MuDTChambThContainer *dtThDigis)
 Find BTI group. More...
 
virtual bool isCSCCounterClockwise (const CSCLayer *layer) const
 Check orientation of strips in given CSC chamber. More...
 
- Protected Attributes inherited from AngleConverterBase
edm::ESHandle< CSCGeometry_geocsc
 
edm::ESHandle< DTGeometry_geodt
 
unsigned long long _geom_cache_id = 0
 
edm::ESHandle< RPCGeometry_georpc
 
const ProcConfigurationBaseconfig = nullptr
 
edm::ESWatcher< MuonGeometryRecordmuonGeometryRecordWatcher
 
unsigned int nPhiBins = 0
 Number of phi bins along 2Pi. More...
 

Detailed Description

Definition at line 6 of file OmtfPhase2AngleConverter.h.

Constructor & Destructor Documentation

◆ OmtfPhase2AngleConverter()

OmtfPhase2AngleConverter::OmtfPhase2AngleConverter ( )
inline

Definition at line 8 of file OmtfPhase2AngleConverter.h.

8 {};

◆ ~OmtfPhase2AngleConverter()

OmtfPhase2AngleConverter::~OmtfPhase2AngleConverter ( )
overridedefault

Member Function Documentation

◆ getProcessorPhi()

int OmtfPhase2AngleConverter::getProcessorPhi ( int  phiZero,
l1t::tftype  part,
int  dtScNum,
int  dtPhi 
) const
overridevirtual

get phi of DT,CSC and RPC azimutal angle digi in processor scale, used by OMTF algorithm. in case of wrong phi returns OMTFConfiguration::instance()->nPhiBins phiZero - desired phi where the scale should start, should be in the desired scale, use getProcessorPhiZero to obtain it

Reimplemented from AngleConverterBase.

Definition at line 3 of file OmtfPhase2AngleConverter.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), createfilelist::int, M_PI, AngleConverterBase::nPhiBins, l1ctLayer1_cff::phiZero, l1tEGammaCrystalsEmulatorProducer_cfi::scale, and nano_mu_digi_cff::sector.

3  {
4  constexpr int dtPhiBins = 65536; //65536. for [-0.5,0.5] radians
5  double hsPhiPitch = 2 * M_PI / nPhiBins; // width of phi Pitch, related to halfStrip at CSC station 2
6 
7  int sector = dtScNum + 1; //NOTE: there is a inconsistency in DT sector numb. Thus +1 needed to get detector numb.
8 
9  double scale = 0.5 / dtPhiBins / hsPhiPitch; //was 0.8
10  int scale_coeff = lround(scale * (1 << 15));
11 
12  int ichamber = sector - 1;
13  if (ichamber > 6)
14  ichamber = ichamber - 12;
15 
16  int offsetGlobal = (int)nPhiBins * ichamber / 12;
17 
18  int phiConverted = ((dtPhi * scale_coeff) >> 15) + offsetGlobal - phiZero;
19 
20  return config->foldPhi(phiConverted);
21 }
Definition: config.py:1
unsigned int nPhiBins
Number of phi bins along 2Pi.
#define M_PI