CMS 3D CMS Logo

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

#include <L1MuGMTExtendedCand.h>

Inheritance diagram for L1MuGMTExtendedCand:
L1MuGMTCand SimpleL1MuGMTCand

Public Member Functions

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...
 
 ~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 (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 Member Functions

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...
 

Private Types

enum  { IDXDTCSC_START = 26 }
 
enum  { IDXDTCSC_LENGTH = 2 }
 
enum  { IDXRPC_START = 28 }
 
enum  { IDXRPC_LENGTH = 2 }
 
enum  { FWDBIT_START = 30 }
 
enum  { FWDBIT_LENGTH = 1 }
 
enum  { ISRPCBIT_START = 31 }
 
enum  { ISRPCBIT_LENGTH = 1 }
 

Private Attributes

unsigned int m_rank
 

Friends

std::ostream & operator<< (std::ostream &, const L1MuGMTExtendedCand &)
 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

L1 Global Muon Trigger Extended Candidate.

This is a GMT candidate with extended information that will be sent to Readout.

This candidates contains extra information such as sort rank and indices of the contributing muons.

Definition at line 46 of file L1MuGMTExtendedCand.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
IDXDTCSC_START 

Definition at line 135 of file L1MuGMTExtendedCand.h.

anonymous enum
private
Enumerator
IDXDTCSC_LENGTH 

Definition at line 136 of file L1MuGMTExtendedCand.h.

136 { IDXDTCSC_LENGTH = 2 }; // Bit 26:27 DT/CSC muon index
anonymous enum
private
Enumerator
IDXRPC_START 

Definition at line 137 of file L1MuGMTExtendedCand.h.

anonymous enum
private
Enumerator
IDXRPC_LENGTH 

Definition at line 138 of file L1MuGMTExtendedCand.h.

138 { IDXRPC_LENGTH = 2 }; // Bit 28:29 RPC muon index
anonymous enum
private
Enumerator
FWDBIT_START 

Definition at line 139 of file L1MuGMTExtendedCand.h.

anonymous enum
private
Enumerator
FWDBIT_LENGTH 

Definition at line 140 of file L1MuGMTExtendedCand.h.

anonymous enum
private
Enumerator
ISRPCBIT_START 

Definition at line 141 of file L1MuGMTExtendedCand.h.

anonymous enum
private
Enumerator
ISRPCBIT_LENGTH 

Definition at line 142 of file L1MuGMTExtendedCand.h.

Constructor & Destructor Documentation

L1MuGMTExtendedCand::L1MuGMTExtendedCand ( )

constructor

Definition at line 47 of file L1MuGMTExtendedCand.cc.

47 : L1MuGMTCand(), m_rank(0) {}
L1MuGMTCand()
constructor
Definition: L1MuGMTCand.cc:49
L1MuGMTExtendedCand::L1MuGMTExtendedCand ( unsigned  data,
unsigned  rank,
int  bx = 0 
)

constructor

Definition at line 51 of file L1MuGMTExtendedCand.cc.

51 : L1MuGMTCand(data, bx), m_rank(rank) {}
unsigned int rank() const
get rank
L1MuGMTCand()
constructor
Definition: L1MuGMTCand.cc:49
int bx() const
get bunch crossing identifier
Definition: L1MuGMTCand.h:117
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
L1MuGMTExtendedCand::L1MuGMTExtendedCand ( const L1MuGMTExtendedCand mu)

copy constructor

Definition at line 49 of file L1MuGMTExtendedCand.cc.

49 : L1MuGMTCand(mu), m_rank(mu.m_rank) {}
L1MuGMTCand()
constructor
Definition: L1MuGMTCand.cc:49
L1MuGMTExtendedCand::~L1MuGMTExtendedCand ( )
override

destructor

Definition at line 56 of file L1MuGMTExtendedCand.cc.

References reset().

56 { reset(); }
void reset()
reset muon candidate

Member Function Documentation

static bool L1MuGMTExtendedCand::compareRank ( const L1MuGMTExtendedCand first,
const L1MuGMTExtendedCand second 
)
inlinestatic

define a rank for muon candidates

Definition at line 119 of file L1MuGMTExtendedCand.h.

References first, rank(), and edm::second().

Referenced by L1MuGMTSorter::run().

119  {
120  unsigned int rank_f = (first) ? first->rank() : 0;
121  unsigned int rank_s = (second) ? second->rank() : 0;
122  return rank_f > rank_s;
123  }
unsigned int rank() const
get rank
U second(std::pair< T, U > const &p)
unsigned int L1MuGMTExtendedCand::detector ( ) const

get detector bits 1=rpc, 2=dtbx, 4=csc, 3=rpc+dtbx, 5=rpc+csc supported for backward compatibility only

Definition at line 77 of file L1MuGMTExtendedCand.cc.

References isFwd(), isRPC(), and L1MuGMTCand::quality().

77  {
78  if (quality() == 7) // matched ?
79  return isFwd() ? 5 : 3;
80  else
81  return isRPC() ? 1 : (isFwd() ? 4 : 2);
82 }
bool isRPC() const
get RPC bit (true=RPC, false = DT/CSC or matched)
unsigned int quality() const
get quality
Definition: L1MuGMTCand.h:90
bool isFwd() const
get forward bit (true=forward, false=barrel)
unsigned L1MuGMTExtendedCand::getDTCSCIndex ( ) const
inline

get index of contributing DT/CSC muon

Definition at line 71 of file L1MuGMTExtendedCand.h.

References IDXDTCSC_LENGTH, IDXDTCSC_START, and L1MuGMTCand::readDataField().

Referenced by print(), and L2MuonSeedGenerator::produce().

unsigned L1MuGMTExtendedCand::getRPCIndex ( ) const
inline

get index of contributing RPC muon

Definition at line 74 of file L1MuGMTExtendedCand.h.

References IDXRPC_LENGTH, IDXRPC_START, and L1MuGMTCand::readDataField().

Referenced by print(), and L2MuonSeedGenerator::produce().

bool L1MuGMTExtendedCand::isFwd ( ) const
inline

get forward bit (true=forward, false=barrel)

Definition at line 77 of file L1MuGMTExtendedCand.h.

References FWDBIT_LENGTH, FWDBIT_START, and L1MuGMTCand::readDataField().

Referenced by detector(), l1extra::L1MuonParticle::L1MuonParticle(), print(), and L2MuonSeedGenerator::produce().

bool L1MuGMTExtendedCand::isRPC ( ) const
inline

get RPC bit (true=RPC, false = DT/CSC or matched)

Definition at line 80 of file L1MuGMTExtendedCand.h.

References ISRPCBIT_LENGTH, ISRPCBIT_START, and L1MuGMTCand::readDataField().

Referenced by detector(), l1extra::L1MuonParticle::L1MuonParticle(), print(), and L2MuonSeedGenerator::produce().

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

unequal operator

Definition at line 98 of file L1MuGMTExtendedCand.cc.

References m_rank.

98  {
99  if ((L1MuGMTCand const&)*this != cand)
100  return true;
101  if (m_rank != cand.m_rank)
102  return true;
103  return false;
104 }
bool L1MuGMTExtendedCand::operator== ( const L1MuGMTExtendedCand cand) const

equal operator

Definition at line 87 of file L1MuGMTExtendedCand.cc.

References m_rank.

87  {
88  if ((L1MuGMTCand const&)*this != cand)
89  return false;
90  if (m_rank != cand.m_rank)
91  return false;
92  return true;
93 }
void L1MuGMTExtendedCand::print ( void  ) const

print parameters of muon candidate

Definition at line 109 of file L1MuGMTExtendedCand.cc.

References L1MuGMTCand::empty(), getDTCSCIndex(), getRPCIndex(), isFwd(), isRPC(), L1MuGMTCand::print(), and rank().

109  {
111  if (!empty()) {
112  edm::LogVerbatim("GMT_Candidate_info") << setiosflags(ios::right | ios::adjustfield | ios::showpoint | ios::fixed)
113  << "rank = " << setw(3) << rank() << " "
114  << "idxdtcsc = " << setw(1) << getDTCSCIndex() << " "
115  << "idxrpc = " << setw(1) << getRPCIndex() << " "
116  << "isFwd = " << setw(1) << isFwd() << " "
117  << "isRPC = " << setw(1) << isRPC() << endl;
118  }
119 }
Log< level::Info, true > LogVerbatim
unsigned int rank() const
get rank
bool empty() const
is it an empty muon candidate?
Definition: L1MuGMTCand.h:61
bool isRPC() const
get RPC bit (true=RPC, false = DT/CSC or matched)
unsigned getRPCIndex() const
get index of contributing RPC muon
unsigned getDTCSCIndex() const
get index of contributing DT/CSC muon
bool isFwd() const
get forward bit (true=forward, false=barrel)
void print() const
print parameters of muon candidate
Definition: L1MuGMTCand.cc:144
unsigned int L1MuGMTExtendedCand::rank ( ) const
inline

get rank

Definition at line 68 of file L1MuGMTExtendedCand.h.

References m_rank.

Referenced by compareRank(), print(), rankRef(), and setRank().

68 { return m_rank; }
static bool L1MuGMTExtendedCand::rankRef ( const L1MuGMTExtendedCand first,
const L1MuGMTExtendedCand second 
)
inlinestatic

define a rank for muon candidates

Definition at line 126 of file L1MuGMTExtendedCand.h.

References rank().

Referenced by L1MuGMTReadoutRecord::getGMTCands().

126  {
127  unsigned int rank_f = first.rank();
128  unsigned int rank_s = second.rank();
129  return rank_f > rank_s;
130  }
unsigned int rank() const
get rank
void L1MuGMTExtendedCand::reset ( void  )

reset muon candidate

Definition at line 65 of file L1MuGMTExtendedCand.cc.

References m_rank, and L1MuGMTCand::reset().

Referenced by ~L1MuGMTExtendedCand().

65  {
67  m_rank = 0;
68 }
void reset()
reset muon candidate
Definition: L1MuGMTCand.cc:81
void L1MuGMTExtendedCand::setDTCSCIndex ( unsigned int  idxdtcsc)
inline
void L1MuGMTExtendedCand::setFwdBit ( unsigned int  fwdbit)
inline
void L1MuGMTExtendedCand::setRank ( unsigned int  rank)
inline

set rank

Definition at line 83 of file L1MuGMTExtendedCand.h.

References m_rank, and rank().

Referenced by L1MuGMTMerger::createDTCSCCand(), L1MuGMTMerger::createMergedCand(), and L1MuGMTMerger::createRPCCand().

83 { m_rank = rank; }
unsigned int rank() const
get rank
void L1MuGMTExtendedCand::setRPCBit ( unsigned int  rpcbit)
inline
void L1MuGMTExtendedCand::setRPCIndex ( unsigned int  idxrpc)
inline

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const L1MuGMTExtendedCand  
)
friend

output stream operator

Member Data Documentation

unsigned int L1MuGMTExtendedCand::m_rank
private

Definition at line 133 of file L1MuGMTExtendedCand.h.

Referenced by operator!=(), operator==(), rank(), reset(), and setRank().