CMS 3D CMS Logo

Functions | Variables
convert Namespace Reference

Functions

float floatEta (glbeta_intern eta)
 
float floatPhi (glbphi_intern phi)
 
float floatPt (pt_intern pt)
 
float floatZ0 (z0_intern z0)
 
int intPt (pt_intern pt)
 
glbeta_intern makeGlbEta (float eta)
 
glbeta_intern makeGlbEtaRoundEven (float eta)
 
glbphi_intern makeGlbPhi (float phi)
 
pt_intern makePt (int pt)
 
pt_intern makePtFromFloat (float pt)
 
z0_intern makeZ0 (float z0)
 
ap_uint< pt_intern::width > ptToInt (pt_intern pt)
 

Variables

static const float ETA_LSB = M_PI / pow(2.0, 12) * ETA_LSB_POW
 
static const float ETA_LSB_POW = pow(2.0, -1 * ETA_EXTRABITS)
 
const int INTPHI_PI = 720
 
const int INTPHI_TWOPI = 2 * INTPHI_PI
 
static const float INTPT_LSB = INTPT_LSB_POW
 
static const float INTPT_LSB_POW = pow(2.0, -5 - PT_EXTRABITS)
 
static const float PHI_LSB = M_PI / pow(2.0, 12) * PHI_LSB_POW
 
static const float PHI_LSB_POW = pow(2.0, -1 * PHI_EXTRABITS)
 
static const float Z0_LSB = 0.05 * Z0_LSB_POW
 
static const float Z0_LSB_POW = pow(2.0, -1 * Z0_EXTRABITS)
 

Function Documentation

◆ floatEta()

float convert::floatEta ( glbeta_intern  eta)
inline

Definition at line 35 of file L1TrackJetEmulationProducer.h.

References PVValHelper::eta, and ETA_LSB.

35 { return eta.to_float() * ETA_LSB; }
static const float ETA_LSB

◆ floatPhi()

float convert::floatPhi ( glbphi_intern  phi)
inline

Definition at line 36 of file L1TrackJetEmulationProducer.h.

References PHI_LSB.

36 { return phi.to_float() * PHI_LSB; }
static const float PHI_LSB

◆ floatPt()

float convert::floatPt ( pt_intern  pt)
inline

Definition at line 33 of file L1TrackJetEmulationProducer.h.

References DiDispStaMuonMonitor_cfi::pt.

33 { return pt.to_float(); }

◆ floatZ0()

float convert::floatZ0 ( z0_intern  z0)
inline

Definition at line 37 of file L1TrackJetEmulationProducer.h.

References HLTMuonOfflineAnalyzer_cfi::z0, and Z0_LSB.

37 { return z0.to_float() * Z0_LSB; }
static const float Z0_LSB

◆ intPt()

int convert::intPt ( pt_intern  pt)
inline

Definition at line 34 of file L1TrackJetEmulationProducer.h.

References DiDispStaMuonMonitor_cfi::pt.

34 { return (ap_ufixed<18 + PT_EXTRABITS, 13 + PT_EXTRABITS>(pt)).to_int(); }

◆ makeGlbEta()

glbeta_intern convert::makeGlbEta ( float  eta)
inline

◆ makeGlbEtaRoundEven()

glbeta_intern convert::makeGlbEtaRoundEven ( float  eta)
inline

Definition at line 51 of file L1TrackJetEmulationProducer.h.

References PVValHelper::eta, and ETA_LSB.

51  {
52  glbeta_intern ghweta = round(eta / ETA_LSB);
53  return (ghweta % 2) ? glbeta_intern(ghweta + 1) : ghweta;
54  }
static const float ETA_LSB
ap_int< 14+ETA_EXTRABITS > glbeta_intern

◆ makeGlbPhi()

glbphi_intern convert::makeGlbPhi ( float  phi)
inline

◆ makePt()

pt_intern convert::makePt ( int  pt)
inline

Definition at line 39 of file L1TrackJetEmulationProducer.h.

References DiDispStaMuonMonitor_cfi::pt.

39 { return ap_ufixed<18 + PT_EXTRABITS, 13 + PT_EXTRABITS>(pt); }

◆ makePtFromFloat()

pt_intern convert::makePtFromFloat ( float  pt)
inline

Definition at line 40 of file L1TrackJetEmulationProducer.h.

References INTPT_LSB_POW, and DiDispStaMuonMonitor_cfi::pt.

Referenced by L1TrackJetEmulationProducer::L2_cluster(), and L1TrackJetEmulationProducer::produce().

40 { return pt_intern(INTPT_LSB_POW * round(pt / INTPT_LSB_POW)); }
ap_ufixed< 16+PT_EXTRABITS, 11, AP_TRN, AP_SAT > pt_intern
static const float INTPT_LSB_POW

◆ makeZ0()

z0_intern convert::makeZ0 ( float  z0)
inline

◆ ptToInt()

ap_uint<pt_intern::width> convert::ptToInt ( pt_intern  pt)
inline

Definition at line 43 of file L1TrackJetEmulationProducer.h.

References DiDispStaMuonMonitor_cfi::pt, runTheMatrix::ret, and ApeEstimator_cff::width.

43  {
44  // note: this can be synthethized, e.g. when pT is used as intex in a LUT
45  ap_uint<pt_intern::width> ret = 0;
46  ret(pt_intern::width - 1, 0) = pt(pt_intern::width - 1, 0);
47  return ret;
48  }
ret
prodAgent to be discontinued

Variable Documentation

◆ ETA_LSB

const float convert::ETA_LSB = M_PI / pow(2.0, 12) * ETA_LSB_POW
static

◆ ETA_LSB_POW

const float convert::ETA_LSB_POW = pow(2.0, -1 * ETA_EXTRABITS)
static

Definition at line 27 of file L1TrackJetEmulationProducer.h.

Referenced by L1TrackJetEmulationProducer::produce().

◆ INTPHI_PI

const int convert::INTPHI_PI = 720

Definition at line 23 of file L1TrackJetEmulationProducer.h.

◆ INTPHI_TWOPI

const int convert::INTPHI_TWOPI = 2 * INTPHI_PI

Definition at line 24 of file L1TrackJetEmulationProducer.h.

◆ INTPT_LSB

const float convert::INTPT_LSB = INTPT_LSB_POW
static

Definition at line 26 of file L1TrackJetEmulationProducer.h.

◆ INTPT_LSB_POW

const float convert::INTPT_LSB_POW = pow(2.0, -5 - PT_EXTRABITS)
static

Definition at line 25 of file L1TrackJetEmulationProducer.h.

Referenced by makePtFromFloat().

◆ PHI_LSB

const float convert::PHI_LSB = M_PI / pow(2.0, 12) * PHI_LSB_POW
static

◆ PHI_LSB_POW

const float convert::PHI_LSB_POW = pow(2.0, -1 * PHI_EXTRABITS)
static

Definition at line 29 of file L1TrackJetEmulationProducer.h.

Referenced by L1TrackJetEmulationProducer::produce().

◆ Z0_LSB

const float convert::Z0_LSB = 0.05 * Z0_LSB_POW
static

◆ Z0_LSB_POW

const float convert::Z0_LSB_POW = pow(2.0, -1 * Z0_EXTRABITS)
static

Definition at line 31 of file L1TrackJetEmulationProducer.h.

Referenced by L1TrackJetEmulationProducer::produce().