CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Friends
SimpleL1MuGMTCand Class Reference

#include <SimpleL1MuGMTCand.h>

Inheritance diagram for SimpleL1MuGMTCand:
L1MuGMTExtendedCand L1MuGMTCand

Public Types

typedef math::XYZTLorentzVector LorentzVector
 

Public Member Functions

int charge () const
 get charge More...
 
void disable ()
 disable muon candidate More...
 
bool empty () const
 is it an empty muon candidate? More...
 
void enable ()
 enable muon candidate More...
 
unsigned int eta () const
 get eta-code More...
 
unsigned int etaRegionIndex () const
 
const LorentzVector getMomentum () const
 
bool getRank (const SimpleL1MuGMTCand *first, const SimpleL1MuGMTCand *second) const
 define a rank for muon candidates More...
 
unsigned int linearizedPt (float lsbValue, unsigned maxScale) const
 nevermind this one More...
 
std::string name () const
 get name of object More...
 
bool operator!= (const SimpleL1MuGMTCand &) const
 unequal operator More...
 
SimpleL1MuGMTCandoperator= (const SimpleL1MuGMTCand &)
 assignment operator More...
 
SimpleL1MuGMTCandoperator= (const SimTrack *)
 assignment operator for a FSimTrack More...
 
bool operator== (const SimpleL1MuGMTCand &) const
 equal operator More...
 
unsigned int phi () const
 get phi-code More...
 
unsigned int phiRegionIndex () const
 
void print () const
 print parameters of muon candidate More...
 
unsigned int pt () const
 get pt-code More...
 
unsigned int quality () const
 get quality (not implemented for FAMOS) More...
 
unsigned int rank () const
 get rank More...
 
void reset ()
 reset muon candidate More...
 
void setCharge (int charge)
 set charge and packed code of muon candidate More...
 
void setEta (float eta)
 set eta-value and packed code of muon candidate More...
 
void setMomentum (const LorentzVector &m)
 
void setPhi (float phi)
 set phi-value and packed code of muon candidate More...
 
void setPt (float pt)
 set pt-value and packed code of muon candidate More...
 
void setRank (unsigned int rank)
 set rank More...
 
 SimpleL1MuGMTCand ()
 constructor More...
 
 SimpleL1MuGMTCand (const SimpleL1MuGMTCand &)
 copy constructor More...
 
 SimpleL1MuGMTCand (const SimpleL1MuGMTCand *)
 copy constructor from pointer More...
 
 SimpleL1MuGMTCand (const SimTrack *)
 convert a FSimTrack into a SimpleL1MuGMTCand (L1MuGMTExtendedCand) More...
 
 SimpleL1MuGMTCand (const SimTrack *p, unsigned etaIndex, unsigned phiIndex, unsigned pTIndex, float etaValue, float phiValue, float pTValue)
 The same as above, but without relying on internal tables (safer) More...
 
float smearedPt () const
 return the smeared L1 Pt value before discretization in 32-bit More...
 
 ~SimpleL1MuGMTCand () override
 destructor More...
 
- Public Member Functions inherited from L1MuGMTExtendedCand
unsigned int detector () const
 
unsigned getDTCSCIndex () const
 get index of contributing DT/CSC muon More...
 
unsigned getRPCIndex () const
 get index of contributing RPC muon More...
 
bool isFwd () const
 get forward bit (true=forward, false=barrel) More...
 
bool isRPC () const
 get RPC bit (true=RPC, false = DT/CSC or matched) More...
 
 L1MuGMTExtendedCand ()
 constructor More...
 
 L1MuGMTExtendedCand (const L1MuGMTExtendedCand &)
 copy constructor More...
 
 L1MuGMTExtendedCand (unsigned data, unsigned rank, int bx=0)
 constructor More...
 
bool operator!= (const L1MuGMTExtendedCand &) const
 unequal operator More...
 
bool operator== (const L1MuGMTExtendedCand &) const
 equal operator More...
 
void print () const
 print parameters of muon candidate More...
 
unsigned int rank () const
 get rank More...
 
void reset ()
 reset muon candidate More...
 
void setDTCSCIndex (unsigned int idxdtcsc)
 set index of contributing DT/CSC muon More...
 
void setFwdBit (unsigned int fwdbit)
 set forward bit (1=forward, 0=barrel) More...
 
void setRank (unsigned int rank)
 set rank More...
 
void setRPCBit (unsigned int rpcbit)
 set RPC bit (1=RPC, 0=DT/CSC or matched) More...
 
void setRPCIndex (unsigned int idxrpc)
 set index of contributing RPC muon More...
 
 ~L1MuGMTExtendedCand () override
 destructor More...
 
- Public Member Functions inherited from L1MuGMTCand
int bx () const
 get bunch crossing identifier More...
 
int charge () const
 get charge (+1 -1) More...
 
bool charge_valid () const
 is the charge valid ? More...
 
bool empty () const
 is it an empty muon candidate? More...
 
unsigned int etaIndex () const
 get eta-code More...
 
unsigned int etaRegionIndex () const
 
float etaValue () const
 
unsigned getDataWord () const
 get muon data word More...
 
bool isHaloCand () const
 interpretation of quality code: is the candidate a beam halo muon ? More...
 
bool isMatchedCand () const
 interpretation of quality code: is the candidate a matched candidate ? More...
 
bool isol () const
 get isolation More...
 
bool isSyncWord () const
 is the candidate a sync word More...
 
 L1MuGMTCand ()
 constructor More...
 
 L1MuGMTCand (const L1MuGMTCand &)
 copy constructor More...
 
 L1MuGMTCand (unsigned data, int bx=0)
 constructor from dataword More...
 
unsigned int linearizedPt (float lsbValue, unsigned maxScale) const
 
bool mip () const
 get mip More...
 
std::string name () const
 get name of object More...
 
bool operator!= (const L1MuGMTCand &) const
 unequal operator More...
 
bool operator== (const L1MuGMTCand &) const
 equal operator More...
 
unsigned int phiIndex () const
 get phi-code More...
 
unsigned int phiRegionIndex () const
 
float phiValue () const
 
void print () const
 print parameters of muon candidate More...
 
unsigned int ptIndex () const
 get pt-code More...
 
float ptValue () const
 
unsigned int quality () const
 get quality More...
 
void reset ()
 reset muon candidate More...
 
void setBx (int bx)
 set bunch crossing identifier More...
 
void setChargePacked (unsigned ch)
 set packed charge/synchronization word of muon candidate (0=POS, 1=NEG, 2=UNDEF, 3=SYNC) More...
 
void setEtaPacked (unsigned eta)
 set packed eta-code of muon candidate More...
 
void setEtaValue (float etaVal)
 Set Eta Value (need to set type, first) More...
 
void setIsolation (bool isol)
 set isolation of muon candidate More...
 
void setMIP (bool mip)
 set min ionizing bit for muon candidate More...
 
void setPhiPacked (unsigned phi)
 set packed phi-code of muon candidate More...
 
void setPhiValue (float phiVal)
 Setters for physical values. More...
 
void setPtPacked (unsigned pt)
 set packed pt-code of muon candidate More...
 
void setPtValue (float ptVal)
 Set Pt Value. More...
 
void setQuality (unsigned quality)
 set quality of muon candidate More...
 
unsigned sysign () const
 get charge/synchronization word (0=POS, 1=NEG, 2=UNDEF, 3=SYNC) More...
 
bool useInDiMuonTrigger () const
 interpretation of quality code: is the candidate to be used in a di-muon trigger ? More...
 
bool useInSingleMuonTrigger () const
 interpretation of quality code: is the candidate to be used in a single muon trigger ? More...
 
virtual ~L1MuGMTCand ()
 destructor More...
 

Static Public Attributes

static const float etaScale [63]
 
static const float phiScale [144]
 
static const float ptScale [32]
 

Private Attributes

int m_charge
 
bool m_empty
 
unsigned int m_eta
 
std::string m_name
 
unsigned int m_phi
 
unsigned int m_pt
 
unsigned int m_quality
 
unsigned int m_rank
 
float m_smearedPt
 
LorentzVector myMomentum
 

Friends

std::ostream & operator<< (std::ostream &, const SimpleL1MuGMTCand &)
 output stream operator More...
 

Additional Inherited Members

- Static Public Member Functions inherited from L1MuGMTExtendedCand
static bool compareRank (const L1MuGMTExtendedCand *first, const L1MuGMTExtendedCand *second)
 define a rank for muon candidates More...
 
static bool rankRef (const L1MuGMTExtendedCand &first, const L1MuGMTExtendedCand &second)
 define a rank for muon candidates More...
 
- Protected Types inherited from L1MuGMTCand
enum  { PHI_START = 0 }
 
enum  { PHI_LENGTH = 8 }
 
enum  { PT_START = 8 }
 
enum  { PT_LENGTH = 5 }
 
enum  { QUAL_START = 13 }
 
enum  { QUAL_LENGTH = 3 }
 
enum  { ETA_START = 16 }
 
enum  { ETA_LENGTH = 6 }
 
enum  { ISO_START = 22 }
 
enum  { ISO_LENGTH = 1 }
 
enum  { MIP_START = 23 }
 
enum  { MIP_LENGTH = 1 }
 
enum  { SYSIGN_START = 24 }
 
enum  { SYSIGN_LENGTH = 2 }
 
- Protected Member Functions inherited from L1MuGMTCand
unsigned readDataField (unsigned start, unsigned count) const
 
void writeDataField (unsigned start, unsigned count, unsigned value)
 
- Protected Attributes inherited from L1MuGMTCand
int m_bx
 
unsigned m_dataWord
 
float m_etaValue
 
std::string m_name
 
float m_phiValue
 
float m_ptValue
 
- Static Protected Attributes inherited from L1MuGMTCand
static const float m_invalidValue = -10.
 

Detailed Description

Description: Simple L1 Global Muon Trigger Candidate Inherits the basics from 'L1MuGMTCand' base class. Contains pointer to RawHepEventParticle from the event manager. Allows easy conversion from a RawHepEventParticle.

Author: Andrea Perrotta 05/09/2006

Definition at line 24 of file SimpleL1MuGMTCand.h.

Member Typedef Documentation

◆ LorentzVector

Definition at line 26 of file SimpleL1MuGMTCand.h.

Constructor & Destructor Documentation

◆ SimpleL1MuGMTCand() [1/5]

SimpleL1MuGMTCand::SimpleL1MuGMTCand ( )

constructor

Definition at line 14 of file SimpleL1MuGMTCand.cc.

15  : m_name("FastL1MuCand"),
16  m_empty(true),
17  m_phi(0),
18  m_eta(31),
19  m_pt(0),
20  m_charge(0),
21  m_quality(0),
22  m_rank(0),
23  m_smearedPt(0) {}

◆ SimpleL1MuGMTCand() [2/5]

SimpleL1MuGMTCand::SimpleL1MuGMTCand ( const SimpleL1MuGMTCand mu)

copy constructor

Definition at line 25 of file SimpleL1MuGMTCand.cc.

27  m_name(mu.m_name),
28  m_empty(mu.m_empty),
29  m_phi(mu.m_phi),
30  m_eta(mu.m_eta),
31  m_pt(mu.m_pt),
32  m_charge(mu.m_charge),
33  m_quality(mu.m_quality),
34  m_rank(mu.m_rank),
35  m_smearedPt(mu.m_smearedPt) {
36  setMomentum(mu.getMomentum());
37  setQuality(m_quality & 7);
38  setEtaPacked(m_eta & 63);
39  setPhiPacked(m_phi & 255);
41  setPtPacked(m_pt & 31);
42 }

References m_charge, m_eta, m_phi, m_pt, m_quality, amptDefaultParameters_cff::mu, setCharge(), L1MuGMTCand::setEtaPacked(), setMomentum(), L1MuGMTCand::setPhiPacked(), L1MuGMTCand::setPtPacked(), and L1MuGMTCand::setQuality().

◆ SimpleL1MuGMTCand() [3/5]

SimpleL1MuGMTCand::SimpleL1MuGMTCand ( const SimpleL1MuGMTCand mu)

copy constructor from pointer

Definition at line 44 of file SimpleL1MuGMTCand.cc.

45  : m_name(mu->m_name),
46  m_empty(mu->m_empty),
47  m_phi(mu->m_phi),
48  m_eta(mu->m_eta),
49  m_pt(mu->m_pt),
50  m_charge(mu->m_charge),
51  m_quality(mu->m_quality),
52  m_rank(mu->m_rank),
53  m_smearedPt(mu->m_smearedPt) {
54  setMomentum(mu->getMomentum());
55  setQuality(m_quality & 7);
56  setEtaPacked(m_eta & 63);
57  setPhiPacked(m_phi & 255);
59  setPtPacked(m_pt & 31);
60 }

References m_charge, m_eta, m_phi, m_pt, m_quality, amptDefaultParameters_cff::mu, setCharge(), L1MuGMTCand::setEtaPacked(), setMomentum(), L1MuGMTCand::setPhiPacked(), L1MuGMTCand::setPtPacked(), and L1MuGMTCand::setQuality().

◆ SimpleL1MuGMTCand() [4/5]

SimpleL1MuGMTCand::SimpleL1MuGMTCand ( const SimTrack p)

convert a FSimTrack into a SimpleL1MuGMTCand (L1MuGMTExtendedCand)

Definition at line 62 of file SimpleL1MuGMTCand.cc.

62  {
63  // setMomentum(p->momentum());
64  LorentzVector toBeRemoved(p->momentum().x(), p->momentum().y(), p->momentum().z(), p->momentum().t());
65  setMomentum(toBeRemoved);
66  m_name = "FastL1MuCand";
67  m_empty = false;
68  m_quality = 7;
70  m_rank = 0;
71  setEta(myMomentum.Eta());
72  setPhi(myMomentum.Phi());
73  setCharge(int(p->charge()));
74  setPt(myMomentum.Pt());
75  setBx(0);
76  if (fabs(myMomentum.eta()) > 1.04)
77  setFwdBit(1);
78  else
79  setFwdBit(0);
80  setRPCBit(0);
81 }

References m_empty, m_name, m_quality, m_rank, myMomentum, AlCaHLTBitMon_ParallelJobs::p, L1MuGMTCand::setBx(), setCharge(), setEta(), L1MuGMTExtendedCand::setFwdBit(), setMomentum(), setPhi(), setPt(), L1MuGMTCand::setQuality(), and L1MuGMTExtendedCand::setRPCBit().

◆ SimpleL1MuGMTCand() [5/5]

SimpleL1MuGMTCand::SimpleL1MuGMTCand ( const SimTrack p,
unsigned  etaIndex,
unsigned  phiIndex,
unsigned  pTIndex,
float  etaValue,
float  phiValue,
float  pTValue 
)

The same as above, but without relying on internal tables (safer)

Definition at line 83 of file SimpleL1MuGMTCand.cc.

89  {
90  // setMomentum(p->momentum());
91  LorentzVector toBeRemoved(p->momentum().x(), p->momentum().y(), p->momentum().z(), p->momentum().t());
92  setMomentum(toBeRemoved);
93  m_name = "FastL1MuCand";
94  m_empty = false;
95  m_quality = 7;
97  m_rank = 0;
98  m_phi = phiIndex;
101  m_eta = etaIndex;
104  setCharge(int(p->charge()));
105  m_pt = pTIndex;
106  setPtPacked(pTIndex);
107  setPtValue(pTValue);
108  m_smearedPt = myMomentum.Pt();
109  setBx(0);
110  if (fabs(etaValue) > 1.04)
111  setFwdBit(1);
112  else
113  setFwdBit(0);
114  setRPCBit(0);
115 }

References L1MuGMTCand::etaIndex(), L1MuGMTCand::etaValue(), m_empty, m_eta, m_name, m_phi, m_pt, m_quality, m_rank, m_smearedPt, myMomentum, AlCaHLTBitMon_ParallelJobs::p, L1MuGMTCand::phiIndex(), L1MuGMTCand::phiValue(), L1MuGMTCand::setBx(), setCharge(), L1MuGMTCand::setEtaPacked(), L1MuGMTCand::setEtaValue(), L1MuGMTExtendedCand::setFwdBit(), setMomentum(), L1MuGMTCand::setPhiPacked(), L1MuGMTCand::setPhiValue(), L1MuGMTCand::setPtPacked(), L1MuGMTCand::setPtValue(), L1MuGMTCand::setQuality(), and L1MuGMTExtendedCand::setRPCBit().

◆ ~SimpleL1MuGMTCand()

SimpleL1MuGMTCand::~SimpleL1MuGMTCand ( )
override

destructor

Definition at line 117 of file SimpleL1MuGMTCand.cc.

117 { reset(); }

References reset().

Member Function Documentation

◆ charge()

int SimpleL1MuGMTCand::charge ( void  ) const
inline

get charge

Definition at line 68 of file SimpleL1MuGMTCand.h.

68 { return m_charge; }

References m_charge.

Referenced by print(), and setCharge().

◆ disable()

void SimpleL1MuGMTCand::disable ( )
inline

disable muon candidate

Definition at line 80 of file SimpleL1MuGMTCand.h.

80 { m_empty = true; }

References m_empty.

◆ empty()

bool SimpleL1MuGMTCand::empty ( void  ) const
inline

is it an empty muon candidate?

Definition at line 74 of file SimpleL1MuGMTCand.h.

74 { return m_empty; }

References m_empty.

Referenced by operator<<(), and print().

◆ enable()

void SimpleL1MuGMTCand::enable ( )
inline

enable muon candidate

Definition at line 77 of file SimpleL1MuGMTCand.h.

77 { m_empty = false; }

References m_empty.

◆ eta()

unsigned int SimpleL1MuGMTCand::eta ( void  ) const
inline

get eta-code

Definition at line 62 of file SimpleL1MuGMTCand.h.

62 { return m_eta; }

References m_eta.

Referenced by Particle.Particle::__str__(), etaRegionIndex(), Jet.Jet::jetID(), Jet.Jet::puJetId(), and setEta().

◆ etaRegionIndex()

unsigned int SimpleL1MuGMTCand::etaRegionIndex ( ) const
inline

Definition at line 106 of file SimpleL1MuGMTCand.h.

106 { return eta(); }

References eta().

◆ getMomentum()

const LorentzVector SimpleL1MuGMTCand::getMomentum ( ) const
inline

Definition at line 112 of file SimpleL1MuGMTCand.h.

112 { return myMomentum; }

References myMomentum.

◆ getRank()

bool SimpleL1MuGMTCand::getRank ( const SimpleL1MuGMTCand first,
const SimpleL1MuGMTCand second 
) const
inline

define a rank for muon candidates

Definition at line 133 of file SimpleL1MuGMTCand.h.

133  {
134  unsigned int rank_f = (first) ? first->rank() : 0;
135  unsigned int rank_s = (second) ? second->rank() : 0;
136  return rank_f > rank_s;
137  }

References first, and edm::second().

◆ linearizedPt()

unsigned int SimpleL1MuGMTCand::linearizedPt ( float  lsbValue,
unsigned  maxScale 
) const
inline

nevermind this one

Definition at line 101 of file SimpleL1MuGMTCand.h.

101 { return 0; }

◆ name()

std::string SimpleL1MuGMTCand::name ( void  ) const
inline

get name of object

Definition at line 56 of file SimpleL1MuGMTCand.h.

56 { return m_name; }

References m_name.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

◆ operator!=()

bool SimpleL1MuGMTCand::operator!= ( const SimpleL1MuGMTCand cand) const

unequal operator

Definition at line 268 of file SimpleL1MuGMTCand.cc.

268  {
269  if (m_empty != cand.m_empty)
270  return true;
271  if (m_phi != cand.m_phi)
272  return true;
273  if (m_eta != cand.m_eta)
274  return true;
275  if (m_pt != cand.m_pt)
276  return true;
277  if (m_charge != cand.m_charge)
278  return true;
279  if (m_quality != cand.m_quality)
280  return true;
281  if (m_rank != cand.m_rank)
282  return true;
283  return false;
284 }

References m_charge, m_empty, m_eta, m_phi, m_pt, m_quality, and m_rank.

◆ operator=() [1/2]

SimpleL1MuGMTCand & SimpleL1MuGMTCand::operator= ( const SimpleL1MuGMTCand cand)

assignment operator

Definition at line 217 of file SimpleL1MuGMTCand.cc.

217  {
218  if (this != &cand) {
219  m_empty = cand.m_empty;
220  m_phi = cand.m_phi;
221  m_eta = cand.m_eta;
222  m_pt = cand.m_pt;
223  m_charge = cand.m_charge;
224  m_quality = cand.m_quality;
225  m_rank = cand.m_rank;
226  m_smearedPt = cand.m_smearedPt;
227  }
228  return *this;
229 }

References m_charge, m_empty, m_eta, m_phi, m_pt, m_quality, m_rank, and m_smearedPt.

◆ operator=() [2/2]

SimpleL1MuGMTCand * SimpleL1MuGMTCand::operator= ( const SimTrack p)

assignment operator for a FSimTrack

Definition at line 234 of file SimpleL1MuGMTCand.cc.

234  {
235  m_empty = false;
236  setEta(p->momentum().eta());
237  setPhi(p->momentum().phi());
238  setCharge(int(p->charge()));
239  setPt(std::sqrt(p->momentum().perp2()));
240 
241  return this;
242 }

References m_empty, AlCaHLTBitMon_ParallelJobs::p, setCharge(), setEta(), setPhi(), setPt(), and mathSSE::sqrt().

◆ operator==()

bool SimpleL1MuGMTCand::operator== ( const SimpleL1MuGMTCand cand) const

equal operator

Definition at line 247 of file SimpleL1MuGMTCand.cc.

247  {
248  if (m_empty != cand.m_empty)
249  return false;
250  if (m_phi != cand.m_phi)
251  return false;
252  if (m_eta != cand.m_eta)
253  return false;
254  if (m_pt != cand.m_pt)
255  return false;
256  if (m_charge != cand.m_charge)
257  return false;
258  if (m_quality != cand.m_quality)
259  return false;
260  if (m_rank != cand.m_rank)
261  return false;
262  return true;
263 }

References m_charge, m_empty, m_eta, m_phi, m_pt, m_quality, and m_rank.

◆ phi()

unsigned int SimpleL1MuGMTCand::phi ( void  ) const
inline

get phi-code

Definition at line 59 of file SimpleL1MuGMTCand.h.

59 { return m_phi; }

References m_phi.

Referenced by Particle.Particle::__str__(), ntupleDataFormat.Track::phiPull(), phiRegionIndex(), and setPhi().

◆ phiRegionIndex()

unsigned int SimpleL1MuGMTCand::phiRegionIndex ( ) const
inline

Definition at line 108 of file SimpleL1MuGMTCand.h.

108 { return phi(); }

References phi().

◆ print()

void SimpleL1MuGMTCand::print ( void  ) const

print parameters of muon candidate

Definition at line 289 of file SimpleL1MuGMTCand.cc.

289  {
290  using namespace std;
291 
292  if (!empty()) {
293  cout.setf(ios::showpoint);
294  cout.setf(ios::right, ios::adjustfield);
295  cout << setiosflags(ios::showpoint | ios::fixed) << "pt = " << setw(5) << setprecision(1) << ptValue() << " GeV "
296  << "charge = " << setw(2) << charge() << " "
297  << "eta = " << setw(5) << setprecision(2) << etaValue() << " "
298  << "phi = " << setw(5) << setprecision(3) << phiValue() << " rad "
299  << "rank = " << setw(6) << rank() << endl;
300  }
301 }

References charge(), gather_cfg::cout, empty(), L1MuGMTCand::etaValue(), alignBH_cfg::fixed, L1MuGMTCand::phiValue(), L1MuGMTCand::ptValue(), and rank().

◆ pt()

unsigned int SimpleL1MuGMTCand::pt ( ) const
inline

◆ quality()

unsigned int SimpleL1MuGMTCand::quality ( void  ) const
inline

get quality (not implemented for FAMOS)

Definition at line 104 of file SimpleL1MuGMTCand.h.

104 { return m_quality; }

References m_quality.

◆ rank()

unsigned int SimpleL1MuGMTCand::rank ( ) const
inline

get rank

Definition at line 71 of file SimpleL1MuGMTCand.h.

71 { return m_rank; }

References m_rank.

Referenced by print(), and setRank().

◆ reset()

void SimpleL1MuGMTCand::reset ( void  )

reset muon candidate

Definition at line 120 of file SimpleL1MuGMTCand.cc.

120  {
121  m_empty = true;
122  m_phi = 0;
123  m_eta = 31;
124  m_pt = 0;
125  m_charge = 0;
126  m_quality = 0;
127  m_rank = 0;
128  m_smearedPt = 0;
129 }

References m_charge, m_empty, m_eta, m_phi, m_pt, m_quality, m_rank, and m_smearedPt.

Referenced by ~SimpleL1MuGMTCand().

◆ setCharge()

void SimpleL1MuGMTCand::setCharge ( int  charge)

set charge and packed code of muon candidate

Definition at line 199 of file SimpleL1MuGMTCand.cc.

199  {
200  m_charge = charge;
201  setChargePacked(charge == 1 ? 0 : 1);
202 }

References charge(), m_charge, and L1MuGMTCand::setChargePacked().

Referenced by operator=(), and SimpleL1MuGMTCand().

◆ setEta()

void SimpleL1MuGMTCand::setEta ( float  eta)

set eta-value and packed code of muon candidate

Definition at line 157 of file SimpleL1MuGMTCand.cc.

157  {
158  int index = 0;
159  float mindiff = 1000.0;
160 
161  for (int i = 0; i < 63; i++) {
162  float diff = fabs(SimpleL1MuGMTCand::etaScale[i] - eta);
163  if (diff <= mindiff) {
164  mindiff = diff;
165  index = i;
166  }
167  }
168 
169  m_eta = index;
170  setEtaPacked(m_eta & 63);
172 }

References change_name::diff, eta(), etaScale, mps_fire::i, m_eta, L1MuGMTCand::setEtaPacked(), and L1MuGMTCand::setEtaValue().

Referenced by operator=(), and SimpleL1MuGMTCand().

◆ setMomentum()

void SimpleL1MuGMTCand::setMomentum ( const LorentzVector m)
inline

Definition at line 111 of file SimpleL1MuGMTCand.h.

111 { myMomentum = m; }

References visualization-live-secondInstance_cfg::m, and myMomentum.

Referenced by SimpleL1MuGMTCand().

◆ setPhi()

void SimpleL1MuGMTCand::setPhi ( float  phi)

set phi-value and packed code of muon candidate

Definition at line 134 of file SimpleL1MuGMTCand.cc.

134  {
135  int index = 0;
136  float mindiff = 1000.0;
137 
138  if (phi < 0.) {
139  phi = 2 * M_PI + phi;
140  }
141  for (int i = 0; i < 144; i++) {
142  float diff = fabs(SimpleL1MuGMTCand::phiScale[i] - phi);
143  if (diff <= mindiff) {
144  mindiff = diff;
145  index = i;
146  }
147  }
148 
149  m_phi = index;
150  setPhiPacked(m_phi & 255);
152 }

References change_name::diff, mps_fire::i, m_phi, M_PI, phi(), phiScale, L1MuGMTCand::setPhiPacked(), and L1MuGMTCand::setPhiValue().

Referenced by operator=(), and SimpleL1MuGMTCand().

◆ setPt()

void SimpleL1MuGMTCand::setPt ( float  pt)

set pt-value and packed code of muon candidate

Definition at line 177 of file SimpleL1MuGMTCand.cc.

177  {
178  int index = 0;
179  m_smearedPt = pt;
180 
181  float mindiff = 1000.0;
182 
183  for (int i = 0; i < 32; i++) {
184  float diff = fabs(SimpleL1MuGMTCand::ptScale[i] - pt);
185  if (diff <= mindiff) {
186  mindiff = diff;
187  index = i;
188  }
189  }
190 
191  m_pt = index;
192  setPtPacked(m_pt & 31);
194 }

References change_name::diff, mps_fire::i, m_pt, m_smearedPt, pt(), ptScale, L1MuGMTCand::setPtPacked(), and L1MuGMTCand::setPtValue().

Referenced by operator=(), and SimpleL1MuGMTCand().

◆ setRank()

void SimpleL1MuGMTCand::setRank ( unsigned int  rank)
inline

set rank

Definition at line 95 of file SimpleL1MuGMTCand.h.

95 { m_rank = rank; }

References m_rank, and rank().

◆ smearedPt()

float SimpleL1MuGMTCand::smearedPt ( ) const
inline

return the smeared L1 Pt value before discretization in 32-bit

Definition at line 98 of file SimpleL1MuGMTCand.h.

98 { return m_smearedPt; }

References m_smearedPt.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
const SimpleL1MuGMTCand id 
)
friend

output stream operator

Definition at line 306 of file SimpleL1MuGMTCand.cc.

306  {
307  using namespace std;
308 
309  if (!id.empty()) {
310  s << setiosflags(ios::showpoint | ios::fixed) << "pt = " << setw(5) << setprecision(1) << id.ptValue() << " GeV "
311  << "charge = " << setw(2) << id.charge() << " "
312  << "eta = " << setw(5) << setprecision(2) << id.etaValue() << " "
313  << "phi = " << setw(5) << setprecision(3) << id.phiValue() << " rad ";
314  }
315  return s;
316 }

Member Data Documentation

◆ etaScale

const float SimpleL1MuGMTCand::etaScale
static
Initial value:
= {
-2.40, -2.35, -2.30, -2.25, -2.20, -2.15, -2.10, -2.05, -2.00, -1.95, -1.90, -1.85, -1.80, -1.75, -1.70, -1.60,
-1.50, -1.40, -1.30, -1.20, -1.10, -1.00, -0.90, -0.80, -0.70, -0.60, -0.50, -0.40, -0.30, -0.20, -0.10, 0.00,
0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60,
1.70, 1.75, 1.80, 1.85, 1.90, 1.95, 2.00, 2.05, 2.10, 2.15, 2.20, 2.25, 2.30, 2.35, 2.40}

Definition at line 140 of file SimpleL1MuGMTCand.h.

Referenced by setEta().

◆ m_charge

int SimpleL1MuGMTCand::m_charge
private

◆ m_empty

bool SimpleL1MuGMTCand::m_empty
private

◆ m_eta

unsigned int SimpleL1MuGMTCand::m_eta
private

◆ m_name

std::string SimpleL1MuGMTCand::m_name
private

Definition at line 144 of file SimpleL1MuGMTCand.h.

Referenced by name(), and SimpleL1MuGMTCand().

◆ m_phi

unsigned int SimpleL1MuGMTCand::m_phi
private

◆ m_pt

unsigned int SimpleL1MuGMTCand::m_pt
private

Definition at line 149 of file SimpleL1MuGMTCand.h.

Referenced by operator!=(), operator=(), operator==(), pt(), reset(), setPt(), and SimpleL1MuGMTCand().

◆ m_quality

unsigned int SimpleL1MuGMTCand::m_quality
private

◆ m_rank

unsigned int SimpleL1MuGMTCand::m_rank
private

◆ m_smearedPt

float SimpleL1MuGMTCand::m_smearedPt
private

Definition at line 153 of file SimpleL1MuGMTCand.h.

Referenced by operator=(), reset(), setPt(), SimpleL1MuGMTCand(), and smearedPt().

◆ myMomentum

LorentzVector SimpleL1MuGMTCand::myMomentum
private

Definition at line 155 of file SimpleL1MuGMTCand.h.

Referenced by getMomentum(), setMomentum(), and SimpleL1MuGMTCand().

◆ phiScale

const float SimpleL1MuGMTCand::phiScale
static
Initial value:
= {
0.0000, 0.0436, 0.0873, 0.1309, 0.1745, 0.2182, 0.2618, 0.3054, 0.3491, 0.3927, 0.4363, 0.4800, 0.5236, 0.5672,
0.6109, 0.6545, 0.6981, 0.7418, 0.7854, 0.8290, 0.8727, 0.9163, 0.9599, 1.0036, 1.0472, 1.0908, 1.1345, 1.1781,
1.2217, 1.2654, 1.3090, 1.3526, 1.3963, 1.4399, 1.4835, 1.5272, 1.5708, 1.6144, 1.6581, 1.7017, 1.7453, 1.7890,
1.8326, 1.8762, 1.9199, 1.9635, 2.0071, 2.0508, 2.0944, 2.1380, 2.1817, 2.2253, 2.2689, 2.3126, 2.3562, 2.3998,
2.4435, 2.4871, 2.5307, 2.5744, 2.6180, 2.6616, 2.7053, 2.7489, 2.7925, 2.8362, 2.8798, 2.9234, 2.9671, 3.0107,
3.0543, 3.0980, 3.1416, 3.1852, 3.2289, 3.2725, 3.3161, 3.3598, 3.4034, 3.4470, 3.4907, 3.5343, 3.5779, 3.6216,
3.6652, 3.7088, 3.7525, 3.7961, 3.8397, 3.8834, 3.9270, 3.9706, 4.0143, 4.0579, 4.1015, 4.1452, 4.1888, 4.2324,
4.2761, 4.3197, 4.3633, 4.4070, 4.4506, 4.4942, 4.5379, 4.5815, 4.6251, 4.6688, 4.7124, 4.7560, 4.7997, 4.8433,
4.8869, 4.9306, 4.9742, 5.0178, 5.0615, 5.1051, 5.1487, 5.1924, 5.2360, 5.2796, 5.3233, 5.3669, 5.4105, 5.4542,
5.4978, 5.5414, 5.5851, 5.6287, 5.6723, 5.7160, 5.7596, 5.8032, 5.8469, 5.8905, 5.9341, 5.9778, 6.0214, 6.0650,
6.1087, 6.1523, 6.1959, 6.2396}

Definition at line 141 of file SimpleL1MuGMTCand.h.

Referenced by setPhi().

◆ ptScale

const float SimpleL1MuGMTCand::ptScale
static
Initial value:
= {0.0, 0.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0,
7.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 25.0, 30.0, 35.0,
40.0, 45.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 120.0, 140.0}

Definition at line 139 of file SimpleL1MuGMTCand.h.

Referenced by setPt().

change_name.diff
diff
Definition: change_name.py:13
L1MuGMTCand::etaIndex
unsigned int etaIndex() const
get eta-code
Definition: L1MuGMTCand.h:105
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
mps_fire.i
i
Definition: mps_fire.py:428
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SimpleL1MuGMTCand::m_eta
unsigned int m_eta
Definition: SimpleL1MuGMTCand.h:148
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
L1MuGMTCand::setPhiValue
void setPhiValue(float phiVal)
Setters for physical values.
Definition: L1MuGMTCand.h:174
alignCSCRings.s
s
Definition: alignCSCRings.py:92
SimpleL1MuGMTCand::etaScale
static const float etaScale[63]
Definition: SimpleL1MuGMTCand.h:140
SimpleL1MuGMTCand::setCharge
void setCharge(int charge)
set charge and packed code of muon candidate
Definition: SimpleL1MuGMTCand.cc:199
SimpleL1MuGMTCand::charge
int charge() const
get charge
Definition: SimpleL1MuGMTCand.h:68
SimpleL1MuGMTCand::eta
unsigned int eta() const
get eta-code
Definition: SimpleL1MuGMTCand.h:62
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
SimpleL1MuGMTCand::reset
void reset()
reset muon candidate
Definition: SimpleL1MuGMTCand.cc:120
SimpleL1MuGMTCand::m_quality
unsigned int m_quality
Definition: SimpleL1MuGMTCand.h:151
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
L1MuGMTCand::etaValue
float etaValue() const
Definition: L1MuGMTCand.cc:102
L1MuGMTCand::setChargePacked
void setChargePacked(unsigned ch)
set packed charge/synchronization word of muon candidate (0=POS, 1=NEG, 2=UNDEF, 3=SYNC)
Definition: L1MuGMTCand.h:166
SimpleL1MuGMTCand::m_rank
unsigned int m_rank
Definition: SimpleL1MuGMTCand.h:152
SimpleL1MuGMTCand::rank
unsigned int rank() const
get rank
Definition: SimpleL1MuGMTCand.h:71
SimpleL1MuGMTCand::setEta
void setEta(float eta)
set eta-value and packed code of muon candidate
Definition: SimpleL1MuGMTCand.cc:157
L1MuGMTCand::setBx
void setBx(int bx)
set bunch crossing identifier
Definition: L1MuGMTCand.h:169
SimpleL1MuGMTCand::m_charge
int m_charge
Definition: SimpleL1MuGMTCand.h:150
cand
Definition: decayParser.h:32
L1MuGMTCand::setQuality
void setQuality(unsigned quality)
set quality of muon candidate
Definition: L1MuGMTCand.h:154
L1MuGMTCand::ptValue
float ptValue() const
Definition: L1MuGMTCand.cc:112
SimpleL1MuGMTCand::m_empty
bool m_empty
Definition: SimpleL1MuGMTCand.h:145
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
SimpleL1MuGMTCand::ptScale
static const float ptScale[32]
Definition: SimpleL1MuGMTCand.h:139
SimpleL1MuGMTCand::setPt
void setPt(float pt)
set pt-value and packed code of muon candidate
Definition: SimpleL1MuGMTCand.cc:177
L1MuGMTExtendedCand::L1MuGMTExtendedCand
L1MuGMTExtendedCand()
constructor
Definition: L1MuGMTExtendedCand.cc:47
L1MuGMTCand::setEtaPacked
void setEtaPacked(unsigned eta)
set packed eta-code of muon candidate
Definition: L1MuGMTCand.h:157
SimpleL1MuGMTCand::phi
unsigned int phi() const
get phi-code
Definition: SimpleL1MuGMTCand.h:59
L1MuGMTCand::phiIndex
unsigned int phiIndex() const
get phi-code
Definition: L1MuGMTCand.h:70
SimpleL1MuGMTCand::m_phi
unsigned int m_phi
Definition: SimpleL1MuGMTCand.h:147
SimpleL1MuGMTCand::pt
unsigned int pt() const
get pt-code
Definition: SimpleL1MuGMTCand.h:65
SimpleL1MuGMTCand::empty
bool empty() const
is it an empty muon candidate?
Definition: SimpleL1MuGMTCand.h:74
SimpleL1MuGMTCand::setPhi
void setPhi(float phi)
set phi-value and packed code of muon candidate
Definition: SimpleL1MuGMTCand.cc:134
std
Definition: JetResolutionObject.h:76
SimpleL1MuGMTCand::m_name
std::string m_name
Definition: SimpleL1MuGMTCand.h:144
L1MuGMTCand::phiValue
float phiValue() const
Definition: L1MuGMTCand.cc:92
LorentzVector
math::XYZTLorentzVector LorentzVector
Definition: HLTMuonMatchAndPlot.h:49
SimpleL1MuGMTCand::m_smearedPt
float m_smearedPt
Definition: SimpleL1MuGMTCand.h:153
L1MuGMTCand::setPtValue
void setPtValue(float ptVal)
Set Pt Value.
Definition: L1MuGMTCand.h:177
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
L1MuGMTExtendedCand::setRPCBit
void setRPCBit(unsigned int rpcbit)
set RPC bit (1=RPC, 0=DT/CSC or matched)
Definition: L1MuGMTExtendedCand.h:104
L1MuGMTCand::setEtaValue
void setEtaValue(float etaVal)
Set Eta Value (need to set type, first)
Definition: L1MuGMTCand.h:180
SimpleL1MuGMTCand::setMomentum
void setMomentum(const LorentzVector &m)
Definition: SimpleL1MuGMTCand.h:111
L1MuGMTExtendedCand::setFwdBit
void setFwdBit(unsigned int fwdbit)
set forward bit (1=forward, 0=barrel)
Definition: L1MuGMTExtendedCand.h:101
SimpleL1MuGMTCand::myMomentum
LorentzVector myMomentum
Definition: SimpleL1MuGMTCand.h:155
L1MuGMTCand::setPtPacked
void setPtPacked(unsigned pt)
set packed pt-code of muon candidate
Definition: L1MuGMTCand.h:151
SimpleL1MuGMTCand::m_pt
unsigned int m_pt
Definition: SimpleL1MuGMTCand.h:149
SimpleL1MuGMTCand::phiScale
static const float phiScale[144]
Definition: SimpleL1MuGMTCand.h:141
L1MuGMTCand::setPhiPacked
void setPhiPacked(unsigned phi)
set packed phi-code of muon candidate
Definition: L1MuGMTCand.h:148