CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Static Public Member Functions
l1t::MicroGMTConfiguration Class Reference

#include <MicroGMTConfiguration.h>

Public Types

typedef MuonCaloSum CaloInput
 
typedef MuonCaloSumBxCollection CaloInputCollection
 
enum  input_t {
  PT, PT_COARSE, PHI, ETA,
  ETA_COARSE, QUALITY, DELTA_ETA_RED, DELTA_PHI_RED,
  ENERGYSUM, ETA_FINE_BIT
}
 
typedef
RegionalMuonCandBxCollection 
InputCollection
 
typedef GMTInternalMuon InterMuon
 
typedef GMTInternalMuonCollection InterMuonCollection
 
typedef GMTInternalMuonList InterMuonList
 
typedef Muon OutMuon
 
enum  output_t { ETA_OUT, PHI_OUT }
 
typedef MuonBxCollection OutputCollection
 
typedef std::pair< input_t, int > PortType
 

Static Public Member Functions

static int calcGlobalPhi (int locPhi, tftype t, int proc)
 
static double calcMuonEtaExtra (const l1t::Muon &mu)
 
static double calcMuonPhiExtra (const l1t::Muon &mu)
 
static unsigned getTwosComp (const int signedInt, const int width)
 
static int setOutputMuonQuality (int muQual, tftype type, int haloBit)
 

Detailed Description

Definition at line 16 of file MicroGMTConfiguration.h.

Member Typedef Documentation

Definition at line 33 of file MicroGMTConfiguration.h.

Definition at line 34 of file MicroGMTConfiguration.h.

Definition at line 27 of file MicroGMTConfiguration.h.

Definition at line 30 of file MicroGMTConfiguration.h.

Definition at line 31 of file MicroGMTConfiguration.h.

Definition at line 32 of file MicroGMTConfiguration.h.

Definition at line 29 of file MicroGMTConfiguration.h.

Definition at line 28 of file MicroGMTConfiguration.h.

Definition at line 26 of file MicroGMTConfiguration.h.

Member Enumeration Documentation

Enumerator
ETA_OUT 
PHI_OUT 

Definition at line 22 of file MicroGMTConfiguration.h.

Member Function Documentation

int l1t::MicroGMTConfiguration::calcGlobalPhi ( int  locPhi,
tftype  t,
int  proc 
)
static

Definition at line 13 of file MicroGMTConfiguration.cc.

References l1t::bmtf, and proc.

Referenced by L1TStage2uGMT::analyze(), and L1Analysis::L1AnalysisL1UpgradeTfMuon::SetTfMuon().

13  {
14  int globPhi = 0;
15  if (t == bmtf) {
16  // each BMTF processor corresponds to a 30 degree wedge = 48 in int-scale
17  globPhi = (proc) * 48 + locPhi;
18  // first processor starts at CMS phi = -15 degrees...
19  globPhi += 576-24;
20  // handle wrap-around (since we add the 576-24, the value will never be negative!)
21  globPhi = globPhi%576;
22  } else {
23  // all others correspond to 60 degree sectors = 96 in int-scale
24  globPhi = (proc) * 96 + locPhi;
25  // first processor starts at CMS phi = 15 degrees (24 in int)... Handle wrap-around with %. Add 576 to make sure the number is positive
26  globPhi = (globPhi + 600) % 576;
27  }
28  return globPhi;
29 }
TrainProcessor *const proc
Definition: MVATrainer.cc:101
double l1t::MicroGMTConfiguration::calcMuonEtaExtra ( const l1t::Muon mu)
static

Definition at line 43 of file MicroGMTConfiguration.cc.

References l1t::Muon::hwDEtaExtra(), and l1t::L1Candidate::hwEta().

Referenced by L1Analysis::L1AnalysisL1Upgrade::SetMuon().

44 {
45  return (mu.hwEta() + mu.hwDEtaExtra()) * 0.010875;
46 }
int hwDEtaExtra() const
Definition: Muon.cc:172
int hwEta() const
Definition: L1Candidate.h:49
double l1t::MicroGMTConfiguration::calcMuonPhiExtra ( const l1t::Muon mu)
static

Definition at line 49 of file MicroGMTConfiguration.cc.

References l1t::Muon::hwDPhiExtra(), and l1t::L1Candidate::hwPhi().

Referenced by L1Analysis::L1AnalysisL1Upgrade::SetMuon().

50 {
51  auto hwPhiExtra = mu.hwPhi() + mu.hwDPhiExtra();
52  while (hwPhiExtra < 0) {
53  hwPhiExtra += 576;
54  }
55  while (hwPhiExtra > 575) {
56  hwPhiExtra -= 576;
57  }
58  //use the LorentzVector to get phi in the range -pi to +pi exactly as in the emulator
59  math::PtEtaPhiMLorentzVector vec{0., 0., hwPhiExtra*0.010908, 0.};
60  return vec.phi();
61 }
int hwDPhiExtra() const
Definition: Muon.cc:166
int hwPhi() const
Definition: L1Candidate.h:50
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
unsigned l1t::MicroGMTConfiguration::getTwosComp ( const int  signedInt,
const int  width 
)
static

Definition at line 4 of file MicroGMTConfiguration.cc.

References create_public_lumi_plots::width.

Referenced by l1t::MicroGMTIsolationUnit::getCaloIndex().

4  {
5  if (signed_int >= 0) {
6  return (unsigned)signed_int;
7  }
8  int all_one = (1 << width)-1;
9  return ((-signed_int) ^ all_one) + 1;
10 }
int l1t::MicroGMTConfiguration::setOutputMuonQuality ( int  muQual,
tftype  type,
int  haloBit 
)
static

Definition at line 32 of file MicroGMTConfiguration.cc.

References l1t::emtf_neg, and l1t::emtf_pos.

32  {
33  // use only the two MSBs for the muon to the uGT
34  int outQual = muQual & 0xC;
35  if (haloBit == 1 && (type == tftype::emtf_neg || type == tftype::emtf_pos)) {
36  // set quality to 0xF if the halo bit is set
37  outQual = 0xF;
38  }
39  return outQual;
40 }
type
Definition: HCALResponse.h:21