CMS 3D CMS Logo

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

#include <SimpleL1MuGMTCand.h>

Inheritance diagram for SimpleL1MuGMTCand:
L1MuGMTExtendedCand L1MuGMTCand

Classes

class  Rank
 define a rank for muon candidates More...
 

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
 
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...
 
virtual ~SimpleL1MuGMTCand ()
 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 (unsigned data, unsigned rank, int bx=0)
 constructor More...
 
 L1MuGMTExtendedCand (const L1MuGMTExtendedCand &)
 copy 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...
 
virtual ~L1MuGMTExtendedCand ()
 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 (unsigned data, int bx=0)
 constructor from dataword More...
 
 L1MuGMTCand (const L1MuGMTCand &)
 copy constructor 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

- 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

Definition at line 28 of file SimpleL1MuGMTCand.h.

Constructor & Destructor Documentation

SimpleL1MuGMTCand::SimpleL1MuGMTCand ( )

constructor

Definition at line 15 of file SimpleL1MuGMTCand.cc.

15  :
16  m_name("FastL1MuCand"), m_empty(true),
17  m_phi(0), m_eta(31), m_pt(0), m_charge(0), m_quality(0),
18  m_rank(0), m_smearedPt(0) { }
unsigned int m_quality
SimpleL1MuGMTCand::SimpleL1MuGMTCand ( const SimpleL1MuGMTCand mu)

copy constructor

Definition at line 20 of file SimpleL1MuGMTCand.cc.

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

20  :
21  m_name(mu.m_name), m_empty(mu.m_empty),
22  m_phi(mu.m_phi), m_eta(mu.m_eta), m_pt(mu.m_pt),
26  setQuality(m_quality & 7);
27  setEtaPacked(m_eta & 63);
28  setPhiPacked(m_phi & 255);
30  setPtPacked(m_pt & 31);
31 }
void setPtPacked(unsigned pt)
set packed pt-code of muon candidate
Definition: L1MuGMTCand.h:154
unsigned int m_quality
void setCharge(int charge)
set charge and packed code of muon candidate
void setQuality(unsigned quality)
set quality of muon candidate
Definition: L1MuGMTCand.h:157
void setEtaPacked(unsigned eta)
set packed eta-code of muon candidate
Definition: L1MuGMTCand.h:160
const LorentzVector getMomentum() const
void setMomentum(const LorentzVector &m)
void setPhiPacked(unsigned phi)
set packed phi-code of muon candidate
Definition: L1MuGMTCand.h:151
SimpleL1MuGMTCand::SimpleL1MuGMTCand ( const SimpleL1MuGMTCand mu)

copy constructor from pointer

Definition at line 33 of file SimpleL1MuGMTCand.cc.

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

33  :
34  m_name(mu->m_name), m_empty(mu->m_empty),
35  m_phi(mu->m_phi), m_eta(mu->m_eta), m_pt(mu->m_pt),
38  setMomentum(mu->getMomentum());
39  setQuality(m_quality & 7);
40  setEtaPacked(m_eta & 63);
41  setPhiPacked(m_phi & 255);
43  setPtPacked(m_pt & 31);
44 }
void setPtPacked(unsigned pt)
set packed pt-code of muon candidate
Definition: L1MuGMTCand.h:154
unsigned int m_quality
void setCharge(int charge)
set charge and packed code of muon candidate
void setQuality(unsigned quality)
set quality of muon candidate
Definition: L1MuGMTCand.h:157
void setEtaPacked(unsigned eta)
set packed eta-code of muon candidate
Definition: L1MuGMTCand.h:160
const LorentzVector getMomentum() const
void setMomentum(const LorentzVector &m)
void setPhiPacked(unsigned phi)
set packed phi-code of muon candidate
Definition: L1MuGMTCand.h:151
SimpleL1MuGMTCand::SimpleL1MuGMTCand ( const SimTrack p)

convert a FSimTrack into a SimpleL1MuGMTCand (L1MuGMTExtendedCand)

Definition at line 46 of file SimpleL1MuGMTCand.cc.

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

46  {
47  // setMomentum(p->momentum());
48  LorentzVector toBeRemoved(p->momentum().x(),p->momentum().y(),p->momentum().z(),p->momentum().t());
49  setMomentum(toBeRemoved);
50  m_name = "FastL1MuCand";
51  m_empty = false;
52  m_quality = 7;
54  m_rank = 0;
55  setEta(myMomentum.Eta());
56  setPhi(myMomentum.Phi());
57  setCharge(int(p->charge()));
58  setPt(myMomentum.Pt());
59  setBx(0);
60  if ( fabs(myMomentum.eta()) > 1.04 )
61  setFwdBit(1);
62  else
63  setFwdBit(0);
64  setRPCBit(0);
65 
66 }
math::XYZTLorentzVector LorentzVector
float charge() const
charge
Definition: CoreSimTrack.cc:18
unsigned int m_quality
void setFwdBit(unsigned int fwdbit)
set forward bit (1=forward, 0=barrel)
void setCharge(int charge)
set charge and packed code of muon candidate
void setBx(int bx)
set bunch crossing identifier
Definition: L1MuGMTCand.h:172
void setPt(float pt)
set pt-value and packed code of muon candidate
void setEta(float eta)
set eta-value and packed code of muon candidate
void setQuality(unsigned quality)
set quality of muon candidate
Definition: L1MuGMTCand.h:157
void setRPCBit(unsigned int rpcbit)
set RPC bit (1=RPC, 0=DT/CSC or matched)
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:22
void setMomentum(const LorentzVector &m)
void setPhi(float phi)
set phi-value and packed code of muon candidate
LorentzVector myMomentum
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 68 of file SimpleL1MuGMTCand.cc.

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

74  {
75  // setMomentum(p->momentum());
76  LorentzVector toBeRemoved(p->momentum().x(),p->momentum().y(),p->momentum().z(),p->momentum().t());
77  setMomentum(toBeRemoved);
78  m_name = "FastL1MuCand";
79  m_empty = false;
80  m_quality = 7;
82  m_rank = 0;
89  setCharge(int(p->charge()));
90  m_pt = pTIndex;
91  setPtPacked(pTIndex);
92  setPtValue(pTValue);
93  m_smearedPt = myMomentum.Pt();
94  setBx(0);
95  if ( fabs(etaValue) > 1.04 )
96  setFwdBit(1);
97  else
98  setFwdBit(0);
99  setRPCBit(0);
100 
101 }
float etaValue() const
Definition: L1MuGMTCand.cc:114
void setPtPacked(unsigned pt)
set packed pt-code of muon candidate
Definition: L1MuGMTCand.h:154
float phiValue() const
Definition: L1MuGMTCand.cc:100
unsigned int phiIndex() const
get phi-code
Definition: L1MuGMTCand.h:73
math::XYZTLorentzVector LorentzVector
unsigned int etaIndex() const
get eta-code
Definition: L1MuGMTCand.h:108
float charge() const
charge
Definition: CoreSimTrack.cc:18
unsigned int m_quality
void setPhiValue(float phiVal)
Setters for physical values.
Definition: L1MuGMTCand.h:177
void setFwdBit(unsigned int fwdbit)
set forward bit (1=forward, 0=barrel)
void setCharge(int charge)
set charge and packed code of muon candidate
void setBx(int bx)
set bunch crossing identifier
Definition: L1MuGMTCand.h:172
void setQuality(unsigned quality)
set quality of muon candidate
Definition: L1MuGMTCand.h:157
void setEtaPacked(unsigned eta)
set packed eta-code of muon candidate
Definition: L1MuGMTCand.h:160
void setEtaValue(float etaVal)
Set Eta Value (need to set type, first)
Definition: L1MuGMTCand.h:183
void setRPCBit(unsigned int rpcbit)
set RPC bit (1=RPC, 0=DT/CSC or matched)
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:22
void setMomentum(const LorentzVector &m)
void setPtValue(float ptVal)
Set Pt Value.
Definition: L1MuGMTCand.h:180
LorentzVector myMomentum
void setPhiPacked(unsigned phi)
set packed phi-code of muon candidate
Definition: L1MuGMTCand.h:151
SimpleL1MuGMTCand::~SimpleL1MuGMTCand ( )
virtual

destructor

Definition at line 103 of file SimpleL1MuGMTCand.cc.

References reset().

103  {
104 
105  reset();
106 
107 }
void reset()
reset muon candidate

Member Function Documentation

int SimpleL1MuGMTCand::charge ( void  ) const
inline

get charge

Definition at line 70 of file SimpleL1MuGMTCand.h.

References m_charge.

Referenced by print(), and setCharge().

70 { return m_charge; }
void SimpleL1MuGMTCand::disable ( )
inline

disable muon candidate

Definition at line 82 of file SimpleL1MuGMTCand.h.

References m_empty.

82 { m_empty = true; }
bool SimpleL1MuGMTCand::empty ( void  ) const
inline

is it an empty muon candidate?

Definition at line 76 of file SimpleL1MuGMTCand.h.

References m_empty.

Referenced by operator<<(), print(), Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

76 { return m_empty; }
void SimpleL1MuGMTCand::enable ( )
inline

enable muon candidate

Definition at line 79 of file SimpleL1MuGMTCand.h.

References m_empty.

79 { m_empty = false; }
unsigned int SimpleL1MuGMTCand::eta ( void  ) const
inline

get eta-code

Definition at line 64 of file SimpleL1MuGMTCand.h.

References m_eta.

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

64 { return m_eta; }
unsigned int SimpleL1MuGMTCand::etaRegionIndex ( ) const
inline

Definition at line 108 of file SimpleL1MuGMTCand.h.

References eta().

108 { return eta(); }
unsigned int eta() const
get eta-code
const LorentzVector SimpleL1MuGMTCand::getMomentum ( ) const
inline

Definition at line 114 of file SimpleL1MuGMTCand.h.

References myMomentum.

Referenced by SimpleL1MuGMTCand().

114 { return myMomentum; }
LorentzVector myMomentum
unsigned int SimpleL1MuGMTCand::linearizedPt ( float  lsbValue,
unsigned  maxScale 
) const
inline

nevermind this one

Definition at line 103 of file SimpleL1MuGMTCand.h.

103 { return 0; }
std::string SimpleL1MuGMTCand::name ( void  ) const
inline
bool SimpleL1MuGMTCand::operator!= ( const SimpleL1MuGMTCand cand) const

unequal operator

Definition at line 276 of file SimpleL1MuGMTCand.cc.

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

276  {
277 
278  if ( m_empty != cand.m_empty ) return true;
279  if ( m_phi != cand.m_phi ) return true;
280  if ( m_eta != cand.m_eta ) return true;
281  if ( m_pt != cand.m_pt ) return true;
282  if ( m_charge != cand.m_charge ) return true;
283  if ( m_quality != cand.m_quality ) return true;
284  if ( m_rank != cand.m_rank ) return true;
285  return false;
286 
287 }
unsigned int m_quality
SimpleL1MuGMTCand & SimpleL1MuGMTCand::operator= ( const SimpleL1MuGMTCand cand)

assignment operator

Definition at line 223 of file SimpleL1MuGMTCand.cc.

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

223  {
224 
225  if ( this != &cand ) {
226 
227  m_empty = cand.m_empty;
228  m_phi = cand.m_phi;
229  m_eta = cand.m_eta;
230  m_pt = cand.m_pt;
231  m_charge = cand.m_charge;
232  m_quality = cand.m_quality;
233  m_rank = cand.m_rank;
234  m_smearedPt = cand.m_smearedPt;
235 
236  }
237  return *this;
238 
239 }
unsigned int m_quality
SimpleL1MuGMTCand * SimpleL1MuGMTCand::operator= ( const SimTrack p)

assignment operator for a FSimTrack

Definition at line 245 of file SimpleL1MuGMTCand.cc.

References CoreSimTrack::charge(), m_empty, CoreSimTrack::momentum(), setCharge(), setEta(), setPhi(), setPt(), and mathSSE::sqrt().

245  {
246 
247  m_empty = false;
248  setEta(p->momentum().eta());
249  setPhi(p->momentum().phi());
250  setCharge(int(p->charge()));
251  setPt(std::sqrt(p->momentum().perp2()));
252 
253  return this;
254 }
float charge() const
charge
Definition: CoreSimTrack.cc:18
T sqrt(T t)
Definition: SSEVec.h:48
void setCharge(int charge)
set charge and packed code of muon candidate
void setPt(float pt)
set pt-value and packed code of muon candidate
void setEta(float eta)
set eta-value and packed code of muon candidate
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:22
void setPhi(float phi)
set phi-value and packed code of muon candidate
bool SimpleL1MuGMTCand::operator== ( const SimpleL1MuGMTCand cand) const

equal operator

Definition at line 259 of file SimpleL1MuGMTCand.cc.

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

259  {
260 
261  if ( m_empty != cand.m_empty ) return false;
262  if ( m_phi != cand.m_phi ) return false;
263  if ( m_eta != cand.m_eta ) return false;
264  if ( m_pt != cand.m_pt ) return false;
265  if ( m_charge != cand.m_charge ) return false;
266  if ( m_quality != cand.m_quality ) return false;
267  if ( m_rank != cand.m_rank ) return false;
268  return true;
269 
270 }
unsigned int m_quality
unsigned int SimpleL1MuGMTCand::phi ( void  ) const
inline

get phi-code

Definition at line 61 of file SimpleL1MuGMTCand.h.

References m_phi.

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

61 { return m_phi; }
unsigned int SimpleL1MuGMTCand::phiRegionIndex ( ) const
inline

Definition at line 110 of file SimpleL1MuGMTCand.h.

References phi().

110 { return phi(); }
unsigned int phi() const
get phi-code
void SimpleL1MuGMTCand::print ( void  ) const

print parameters of muon candidate

Definition at line 293 of file SimpleL1MuGMTCand.cc.

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

293  {
294 
295  using namespace std;
296 
297  if ( !empty() ) {
298  cout.setf(ios::showpoint);
299  cout.setf(ios::right,ios::adjustfield);
300  cout << setiosflags(ios::showpoint | ios::fixed)
301  << "pt = " << setw(5) << setprecision(1) << ptValue() << " GeV "
302  << "charge = " << setw(2) << charge() << " "
303  << "eta = " << setw(5) << setprecision(2) << etaValue() << " "
304  << "phi = " << setw(5) << setprecision(3) << phiValue() << " rad "
305  << "rank = " << setw(6) << rank() << endl;
306  }
307 
308 }
float etaValue() const
Definition: L1MuGMTCand.cc:114
float phiValue() const
Definition: L1MuGMTCand.cc:100
unsigned int rank() const
get rank
int charge() const
get charge
bool empty() const
is it an empty muon candidate?
float ptValue() const
Definition: L1MuGMTCand.cc:128
tuple cout
Definition: gather_cfg.py:121
unsigned int SimpleL1MuGMTCand::pt ( void  ) const
inline
unsigned int SimpleL1MuGMTCand::quality ( void  ) const
inline

get quality (not implemented for FAMOS)

Definition at line 106 of file SimpleL1MuGMTCand.h.

References m_quality.

106 { return m_quality; }
unsigned int m_quality
unsigned int SimpleL1MuGMTCand::rank ( ) const
inline

get rank

Definition at line 73 of file SimpleL1MuGMTCand.h.

References m_rank.

Referenced by SimpleL1MuGMTCand::Rank::operator()(), print(), and setRank().

73 { return m_rank; }
void SimpleL1MuGMTCand::reset ( void  )

reset muon candidate

Definition at line 111 of file SimpleL1MuGMTCand.cc.

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

Referenced by ~SimpleL1MuGMTCand().

111  {
112 
113  m_empty = true;
114  m_phi = 0;
115  m_eta = 31;
116  m_pt = 0;
117  m_charge = 0;
118  m_quality = 0;
119  m_rank = 0;
120  m_smearedPt = 0;
121 
122 }
unsigned int m_quality
void SimpleL1MuGMTCand::setCharge ( int  charge)

set charge and packed code of muon candidate

Definition at line 200 of file SimpleL1MuGMTCand.cc.

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

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

200  {
201 
202  m_charge = charge;
203  setChargePacked(charge == 1 ? 0 : 1);
204 
205 }
int charge() const
get charge
void setChargePacked(unsigned ch)
set packed charge/synchronization word of muon candidate (0=POS, 1=NEG, 2=UNDEF, 3=SYNC) ...
Definition: L1MuGMTCand.h:169
void SimpleL1MuGMTCand::setEta ( float  eta)

set eta-value and packed code of muon candidate

Definition at line 152 of file SimpleL1MuGMTCand.cc.

References diffTreeTool::diff, etaScale, i, cmsHarvester::index, m_eta, L1MuGMTCand::setEtaPacked(), and L1MuGMTCand::setEtaValue().

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

152  {
153 
154  int index = 0;
155  float mindiff = 1000.0;
156 
157  for ( int i = 0; i < 63; i++ ) {
158  float diff = fabs(SimpleL1MuGMTCand::etaScale[i]-eta);
159  if ( diff <= mindiff ) {
160  mindiff = diff;
161  index = i;
162  }
163  }
164 
165  m_eta = index;
166  setEtaPacked(m_eta & 63 );
168 
169 }
int i
Definition: DBlmapReader.cc:9
unsigned int eta() const
get eta-code
static const float etaScale[63]
void setEtaPacked(unsigned eta)
set packed eta-code of muon candidate
Definition: L1MuGMTCand.h:160
void setEtaValue(float etaVal)
Set Eta Value (need to set type, first)
Definition: L1MuGMTCand.h:183
void SimpleL1MuGMTCand::setMomentum ( const LorentzVector m)
inline
void SimpleL1MuGMTCand::setPhi ( float  phi)

set phi-value and packed code of muon candidate

Definition at line 128 of file SimpleL1MuGMTCand.cc.

References diffTreeTool::diff, i, cmsHarvester::index, m_phi, M_PI, phi(), phiScale, L1MuGMTCand::setPhiPacked(), and L1MuGMTCand::setPhiValue().

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

128  {
129 
130  int index = 0;
131  float mindiff = 1000.0;
132 
133  if (phi < 0.) {phi = 2* M_PI + phi; }
134  for ( int i = 0; i < 144; i++ ) {
135  float diff = fabs(SimpleL1MuGMTCand::phiScale[i]-phi);
136  if ( diff <= mindiff ) {
137  mindiff = diff;
138  index = i;
139  }
140  }
141 
142  m_phi = index;
143  setPhiPacked(m_phi & 255 );
145 
146 }
int i
Definition: DBlmapReader.cc:9
void setPhiValue(float phiVal)
Setters for physical values.
Definition: L1MuGMTCand.h:177
#define M_PI
unsigned int phi() const
get phi-code
static const float phiScale[144]
void setPhiPacked(unsigned phi)
set packed phi-code of muon candidate
Definition: L1MuGMTCand.h:151
void SimpleL1MuGMTCand::setPt ( float  pt)

set pt-value and packed code of muon candidate

Definition at line 175 of file SimpleL1MuGMTCand.cc.

References diffTreeTool::diff, i, cmsHarvester::index, m_pt, m_smearedPt, pt(), ptScale, L1MuGMTCand::setPtPacked(), and L1MuGMTCand::setPtValue().

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

175  {
176 
177  int index = 0;
178  m_smearedPt = pt;
179 
180  float mindiff = 1000.0;
181 
182  for ( int i = 0; i < 32; i++ ) {
183  float diff = fabs(SimpleL1MuGMTCand::ptScale[i]-pt);
184  if ( diff <= mindiff ) {
185  mindiff = diff;
186  index = i;
187  }
188  }
189 
190  m_pt = index;
191  setPtPacked(m_pt & 31 );
193 
194 }
void setPtPacked(unsigned pt)
set packed pt-code of muon candidate
Definition: L1MuGMTCand.h:154
int i
Definition: DBlmapReader.cc:9
unsigned int pt() const
get pt-code
static const float ptScale[32]
void setPtValue(float ptVal)
Set Pt Value.
Definition: L1MuGMTCand.h:180
void SimpleL1MuGMTCand::setRank ( unsigned int  rank)
inline

set rank

Definition at line 97 of file SimpleL1MuGMTCand.h.

References m_rank, and rank().

97 { m_rank = rank; }
unsigned int rank() const
get rank
float SimpleL1MuGMTCand::smearedPt ( ) const
inline

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

Definition at line 100 of file SimpleL1MuGMTCand.h.

References m_smearedPt.

100 { return m_smearedPt; }

Friends And Related Function Documentation

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

output stream operator

Definition at line 314 of file SimpleL1MuGMTCand.cc.

314  {
315 
316  using namespace std;
317 
318  if ( !id.empty() ) {
319  s << setiosflags(ios::showpoint | ios::fixed)
320  << "pt = " << setw(5) << setprecision(1) << id.ptValue() << " GeV "
321  << "charge = " << setw(2) << id.charge() << " "
322  << "eta = " << setw(5) << setprecision(2) << id.etaValue() << " "
323  << "phi = " << setw(5) << setprecision(3) << id.phiValue() << " rad ";
324 
325  }
326  return s;
327 
328 }
bool empty() const
is it an empty muon candidate?

Member Data Documentation

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 145 of file SimpleL1MuGMTCand.h.

Referenced by setEta().

int SimpleL1MuGMTCand::m_charge
private
bool SimpleL1MuGMTCand::m_empty
private
unsigned int SimpleL1MuGMTCand::m_eta
private
std::string SimpleL1MuGMTCand::m_name
private

Definition at line 150 of file SimpleL1MuGMTCand.h.

Referenced by name(), and SimpleL1MuGMTCand().

unsigned int SimpleL1MuGMTCand::m_phi
private
unsigned int SimpleL1MuGMTCand::m_pt
private

Definition at line 155 of file SimpleL1MuGMTCand.h.

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

unsigned int SimpleL1MuGMTCand::m_quality
private
unsigned int SimpleL1MuGMTCand::m_rank
private
float SimpleL1MuGMTCand::m_smearedPt
private

Definition at line 159 of file SimpleL1MuGMTCand.h.

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

LorentzVector SimpleL1MuGMTCand::myMomentum
private

Definition at line 161 of file SimpleL1MuGMTCand.h.

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

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 146 of file SimpleL1MuGMTCand.h.

Referenced by setPhi().

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 144 of file SimpleL1MuGMTCand.h.

Referenced by setPt().