CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes | Friends

L1MuDTTrack Class Reference

#include <L1MuDTTrack.h>

Inheritance diagram for L1MuDTTrack:
L1MuRegionalCand

List of all members.

Classes

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

Public Member Functions

L1MuDTAddressArray address () const
 get address-array for this muon candidate
int address (int stat) const
 get relative address of a given station
int charge () const
 get charge (1 bit)
void disable ()
 disable muon candidate
bool empty () const
 is it an empty muon candidate?
void enable ()
 enable muon candidate
unsigned int eta () const
 get eta-code (6 bits)
bool fineEtaBit () const
 get fine eta bit
const L1MuDTTrackSegEtagetEndTSeta () const
 return end eta track segment of muon candidate
const L1MuDTTrackSegPhigetEndTSphi () const
 return end phi track segment of muon candidate
const L1MuDTTrackSegEtagetStartTSeta () const
 return start eta track segment of muon candidate
const L1MuDTTrackSegPhigetStartTSphi () const
 return start phi track segment of muon candidate
const std::vector
< L1MuDTTrackSegEta > & 
getTSeta () const
 return all eta track segments of the muon candidate
const std::vector
< L1MuDTTrackSegPhi > & 
getTSphi () const
 return all phi track segments of the muon candidate
 L1MuDTTrack (const L1MuDTSecProcId &)
 constructor
 L1MuDTTrack ()
 default constructor
 L1MuDTTrack (const L1MuDTTrack &)
 copy constructor
std::string name () const
 get name of object
int numberOfTSeta () const
 return number of eta track segments used to form the muon candidate
int numberOfTSphi () const
 return number of phi track segments used to form the muon candidate
bool operator!= (const L1MuDTTrack &) const
 unequal operator
L1MuDTTrackoperator= (const L1MuDTTrack &)
 assignment operator
bool operator== (const L1MuDTTrack &) const
 equal operator
unsigned int phi () const
 get phi-code (8 bits)
void print () const
 print parameters of muon candidate
unsigned int pt () const
 get pt-code (5 bits)
void reset ()
 reset muon candidate
void setAddresses (const L1MuDTAddressArray &addr)
 set relative addresses of muon candidate
void setCharge (int charge)
 set charge of muon candidate
void setEta (int eta)
 set eta-code of muon candidate
void setFineEtaBit ()
 set fine eta bit
void setName (std::string name)
 set name of object
void setPhi (int phi)
 set phi-code of muon candidate
void setPt (int pt)
 set pt-code of muon candidate
void setQuality (unsigned int quality)
 set quality of muon candidate
void setTC (TrackClass tc)
 set track-class of muon candidate
void setTSeta (const std::vector< const L1MuDTTrackSegEta * > &tsList)
 set eta track segments used to form the muon candidate
void setTSphi (const std::vector< const L1MuDTTrackSegPhi * > &tsList)
 set phi track segments used to form the muon candidate
const L1MuDTSecProcIdspid () const
 return Sector Processor in which the muon candidate was found
TrackClass tc () const
 get track-class
unsigned int triggerScale (float value, const edm::EventSetup &c) const
 convert pt value in GeV to pt code
virtual ~L1MuDTTrack ()
 destructor

Private Attributes

L1MuDTAddressArray m_addArray
bool m_empty
std::string m_name
L1MuDTSecProcId m_spid
TrackClass m_tc
std::vector< L1MuDTTrackSegEtam_tsetaList
std::vector< L1MuDTTrackSegPhim_tsphiList

Friends

std::ostream & operator<< (std::ostream &, const L1MuDTTrack &)
 output stream operator

Detailed Description

L1 Muon Track Candidate

Date:
2007/04/10 13:04:51
Revision:
1.5

N. Neumeister CERN EP J. Troconiz UAM Madrid

Definition at line 51 of file L1MuDTTrack.h.


Constructor & Destructor Documentation

L1MuDTTrack::L1MuDTTrack ( )

default constructor

Definition at line 50 of file L1MuDTTrack.cc.

References m_tsetaList, m_tsphiList, L1MuRegionalCand::setChargeValid(), and L1MuRegionalCand::setType().

                         :
               L1MuRegionalCand(0,0),
               m_spid(L1MuDTSecProcId()), m_name("L1MuDTTrack"), m_empty(true),
               m_tc(UNDEF),
               m_addArray(), m_tsphiList(), m_tsetaList() {

  m_tsphiList.reserve(4);
  m_tsetaList.reserve(3);
  
  setType(0);
  setChargeValid(true);

}
L1MuDTTrack::L1MuDTTrack ( const L1MuDTSecProcId spid)

constructor

Definition at line 65 of file L1MuDTTrack.cc.

References m_tsetaList, m_tsphiList, L1MuRegionalCand::setChargeValid(), and L1MuRegionalCand::setType().

                                                    :
               L1MuRegionalCand(0,0),
               m_spid(spid), m_name("L1MuDTTrack"), m_empty(true), 
               m_tc(UNDEF),
               m_addArray(), m_tsphiList(), m_tsetaList() {

  m_tsphiList.reserve(4);
  m_tsetaList.reserve(3);
  
  setType(0);
  setChargeValid(true);

}
L1MuDTTrack::L1MuDTTrack ( const L1MuDTTrack id)

copy constructor

Definition at line 80 of file L1MuDTTrack.cc.

L1MuDTTrack::~L1MuDTTrack ( ) [virtual]

destructor

Definition at line 91 of file L1MuDTTrack.cc.

{}

Member Function Documentation

L1MuDTAddressArray L1MuDTTrack::address ( ) const [inline]

get address-array for this muon candidate

Definition at line 98 of file L1MuDTTrack.h.

References m_addArray.

Referenced by L1MuDTEtaProcessor::receiveAddresses(), L1MuDTTrackFinder::run(), and L1MuDTWedgeSorter::run().

{ return m_addArray; }
int L1MuDTTrack::address ( int  stat) const [inline]

get relative address of a given station

Definition at line 101 of file L1MuDTTrack.h.

References m_addArray, and L1MuDTAddressArray::station().

{ return m_addArray.station(stat); }
int L1MuDTTrack::charge ( void  ) const [inline]

get charge (1 bit)

Definition at line 86 of file L1MuDTTrack.h.

References L1MuRegionalCand::chargeValue().

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

{ return chargeValue(); }
void L1MuDTTrack::disable ( ) [inline]

disable muon candidate

Definition at line 131 of file L1MuDTTrack.h.

References m_empty.

{ m_empty = true; }
bool L1MuDTTrack::empty ( void  ) const [inline, virtual]

is it an empty muon candidate?

Reimplemented from L1MuRegionalCand.

Definition at line 92 of file L1MuDTTrack.h.

References m_empty.

Referenced by print(), L1MuDTEtaProcessor::receiveAddresses(), L1MuDTTrackFinder::run(), and L1MuDTWedgeSorter::run().

{ return m_empty; }
void L1MuDTTrack::enable ( ) [inline]

enable muon candidate

Definition at line 128 of file L1MuDTTrack.h.

References m_empty, and L1MuRegionalCand::setType().

Referenced by L1MuDTAssignmentUnit::run().

{ m_empty = false; setType(0); }
unsigned int L1MuDTTrack::eta ( void  ) const [inline]

get eta-code (6 bits)

Definition at line 80 of file L1MuDTTrack.h.

References L1MuRegionalCand::eta_packed().

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

{ return eta_packed(); }
bool L1MuDTTrack::fineEtaBit ( ) const [inline]

get fine eta bit

Definition at line 83 of file L1MuDTTrack.h.

References L1MuRegionalCand::isFineHalo().

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

{ return isFineHalo(); }
const L1MuDTTrackSegEta & L1MuDTTrack::getEndTSeta ( ) const

return end eta track segment of muon candidate

Definition at line 160 of file L1MuDTTrack.cc.

References m_tsetaList.

                                                        {

  return m_tsetaList.back();

}
const L1MuDTTrackSegPhi & L1MuDTTrack::getEndTSphi ( ) const

return end phi track segment of muon candidate

Definition at line 140 of file L1MuDTTrack.cc.

References m_tsphiList.

                                                        { 

  return m_tsphiList.back(); 

}
const L1MuDTTrackSegEta & L1MuDTTrack::getStartTSeta ( ) const

return start eta track segment of muon candidate

Definition at line 150 of file L1MuDTTrack.cc.

References m_tsetaList.

                                                          {

  return m_tsetaList.front(); 

}
const L1MuDTTrackSegPhi & L1MuDTTrack::getStartTSphi ( ) const

return start phi track segment of muon candidate

Definition at line 130 of file L1MuDTTrack.cc.

References m_tsphiList.

                                                          { 

  return m_tsphiList.front();

}
const std::vector<L1MuDTTrackSegEta>& L1MuDTTrack::getTSeta ( ) const [inline]

return all eta track segments of the muon candidate

Definition at line 119 of file L1MuDTTrack.h.

References m_tsetaList.

{ return m_tsetaList; }
const std::vector<L1MuDTTrackSegPhi>& L1MuDTTrack::getTSphi ( ) const [inline]

return all phi track segments of the muon candidate

Definition at line 110 of file L1MuDTTrack.h.

References m_tsphiList.

{ return m_tsphiList; }
std::string L1MuDTTrack::name ( void  ) const [inline]

get name of object

Definition at line 71 of file L1MuDTTrack.h.

References m_name.

Referenced by setName().

{ return m_name; }
int L1MuDTTrack::numberOfTSeta ( ) const [inline]

return number of eta track segments used to form the muon candidate

Definition at line 107 of file L1MuDTTrack.h.

References m_tsetaList.

{ return m_tsetaList.size(); }
int L1MuDTTrack::numberOfTSphi ( ) const [inline]

return number of phi track segments used to form the muon candidate

Definition at line 104 of file L1MuDTTrack.h.

References m_tsphiList.

{ return m_tsphiList.size(); }
bool L1MuDTTrack::operator!= ( const L1MuDTTrack track) const

unequal operator

Definition at line 257 of file L1MuDTTrack.cc.

References L1MuRegionalCand::bx(), charge(), eta(), fineEtaBit(), m_addArray, m_empty, m_spid, m_tc, phi(), pt(), and L1MuRegionalCand::quality().

                                                           {

  if ( m_spid       != track.m_spid )       return true;
  if ( m_empty      != track.m_empty )      return true;
  if ( m_tc         != track.m_tc )         return true;
  if ( bx()         != track.bx() )         return true;
  if ( phi()        != track.phi() )        return true;
  if ( eta()        != track.eta() )        return true;
  if ( fineEtaBit() != track.fineEtaBit() ) return true;
  if ( pt()         != track.pt() )         return true;
  if ( charge()     != track.charge() )     return true;
  if ( quality()    != track.quality() )    return true;
  if ( m_addArray   != track.m_addArray )   return true;
  return false;

}
L1MuDTTrack & L1MuDTTrack::operator= ( const L1MuDTTrack track)

assignment operator

Definition at line 215 of file L1MuDTTrack.cc.

References L1MuRegionalCand::bx(), L1MuRegionalCand::getDataWord(), m_addArray, m_empty, m_name, m_spid, m_tc, m_tsetaList, m_tsphiList, L1MuRegionalCand::setBx(), and L1MuRegionalCand::setDataWord().

                                                            {

  if ( this != &track ) {
    this->setBx(track.bx());
    this->setDataWord(track.getDataWord());
    m_spid      = track.m_spid;  
    m_empty     = track.m_empty;
    m_name      = track.m_name;
    m_tc        = track.m_tc;
    m_addArray  = track.m_addArray;
    m_tsphiList = track.m_tsphiList;
    m_tsetaList = track.m_tsetaList;
  }
  return *this;

}
bool L1MuDTTrack::operator== ( const L1MuDTTrack track) const

equal operator

Definition at line 236 of file L1MuDTTrack.cc.

References L1MuRegionalCand::bx(), charge(), eta(), fineEtaBit(), m_addArray, m_empty, m_spid, m_tc, phi(), pt(), and L1MuRegionalCand::quality().

                                                           {

  if ( m_spid       != track.m_spid )       return false;
  if ( m_empty      != track.m_empty )      return false;
  if ( m_tc         != track.m_tc )         return false;
  if ( bx()         != track.bx() )         return false;  
  if ( phi()        != track.phi() )        return false;
  if ( eta()        != track.eta() )        return false;
  if ( fineEtaBit() != track.fineEtaBit() ) return false;
  if ( pt()         != track.pt() )         return false;
  if ( charge()     != track.charge() )     return false;
  if ( quality()    != track.quality() )    return false;
  if ( m_addArray   != track.m_addArray )   return false;
  return true;

}
unsigned int L1MuDTTrack::phi ( void  ) const [inline]

get phi-code (8 bits)

Definition at line 77 of file L1MuDTTrack.h.

References L1MuRegionalCand::phi_packed().

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

{ return phi_packed(); }
void L1MuDTTrack::print ( void  ) const [virtual]

print parameters of muon candidate

Reimplemented from L1MuRegionalCand.

Definition at line 278 of file L1MuDTTrack.cc.

References L1MuRegionalCand::bx(), L1MuRegionalCand::charge_packed(), gather_cfg::cout, empty(), L1MuRegionalCand::eta_packed(), L1MuRegionalCand::finehalo_packed(), m_spid, m_tsphiList, L1MuRegionalCand::phi_packed(), L1MuRegionalCand::pt_packed(), L1MuRegionalCand::quality_packed(), and tc().

                              {

  if ( !empty() ) {
    cout.setf(ios::showpoint);
    cout.setf(ios::right,ios::adjustfield);  
    cout << setiosflags(ios::showpoint | ios::fixed);
    cout << "MUON : "
         << "pt = "      << setw(2) << pt_packed() << "  "
         << "charge = "  << setw(2) << charge_packed() << "  "
         << "eta = "     << setw(2) << eta_packed()
         << " ("         << setw(1) << finehalo_packed() << ")  "  
         << "phi = "     << setw(3) << phi_packed() << "  "
         << "quality = " << setw(1) << quality_packed() << '\t'
         << "class = "   << tc() << "  "
         << "bx = "      << setw(2) << bx() << endl;
    cout << "       found in " << m_spid << " with phi track segments :" << endl;
    vector<L1MuDTTrackSegPhi>::const_iterator iter;
    for ( iter = m_tsphiList.begin(); iter != m_tsphiList.end(); iter++ ) {
       cout << "       " << (*iter) << endl;
    }
  }

}
unsigned int L1MuDTTrack::pt ( ) const [inline]

get pt-code (5 bits)

Definition at line 74 of file L1MuDTTrack.h.

References L1MuRegionalCand::pt_packed().

Referenced by operator!=(), L1MuDTTrack::Rank::operator()(), and operator==().

{ return pt_packed(); }
void L1MuDTTrack::reset ( void  ) [virtual]

reset muon candidate

Reimplemented from L1MuRegionalCand.

Definition at line 101 of file L1MuDTTrack.cc.

References m_addArray, m_empty, m_tc, m_tsetaList, m_tsphiList, L1MuDTAddressArray::reset(), and UNDEF.

void L1MuDTTrack::setAddresses ( const L1MuDTAddressArray addr) [inline]

set relative addresses of muon candidate

Definition at line 158 of file L1MuDTTrack.h.

References m_addArray.

Referenced by L1MuDTAssignmentUnit::run().

{ m_addArray = addr; }
void L1MuDTTrack::setCharge ( int  charge) [inline]

set charge of muon candidate

Definition at line 152 of file L1MuDTTrack.h.

References L1MuRegionalCand::setChargeValid(), and L1MuRegionalCand::setChargeValue().

Referenced by L1MuDTAssignmentUnit::PtAU().

void L1MuDTTrack::setEta ( int  eta)

set eta-code of muon candidate

Definition at line 116 of file L1MuDTTrack.cc.

References L1MuSignedPacking< Bits >::packedFromIdx(), and L1MuRegionalCand::setEtaPacked().

Referenced by L1MuDTEtaProcessor::assign().

                                {

  // eta is a signed integer [-32,31], 
  // representing 64 bins in an interval [-1.2,+1.2] 
  // first convert eta into an unsigned integer
  L1MuSignedPacking<6> pEta;
  setEtaPacked(pEta.packedFromIdx(eta));

}
void L1MuDTTrack::setFineEtaBit ( ) [inline]

set fine eta bit

Definition at line 146 of file L1MuDTTrack.h.

References L1MuRegionalCand::setFineHalo().

Referenced by L1MuDTEtaProcessor::assign().

{ setFineHalo(true); }
void L1MuDTTrack::setName ( std::string  name) [inline]

set name of object

Definition at line 134 of file L1MuDTTrack.h.

References m_name, and name().

{ m_name = name; }
void L1MuDTTrack::setPhi ( int  phi) [inline]

set phi-code of muon candidate

Definition at line 140 of file L1MuDTTrack.h.

References L1MuRegionalCand::setPhiPacked().

Referenced by L1MuDTAssignmentUnit::PhiAU().

void L1MuDTTrack::setPt ( int  pt) [inline]

set pt-code of muon candidate

Definition at line 149 of file L1MuDTTrack.h.

References L1MuRegionalCand::setPtPacked().

Referenced by L1MuDTAssignmentUnit::PtAU().

void L1MuDTTrack::setQuality ( unsigned int  quality) [inline]

set quality of muon candidate

Definition at line 155 of file L1MuDTTrack.h.

References L1MuRegionalCand::setQualityPacked().

Referenced by L1MuDTAssignmentUnit::QuaAU().

void L1MuDTTrack::setTC ( TrackClass  tc) [inline]

set track-class of muon candidate

Definition at line 137 of file L1MuDTTrack.h.

References m_tc, and tc().

Referenced by L1MuDTAssignmentUnit::run().

{ m_tc = tc; }
void L1MuDTTrack::setTSeta ( const std::vector< const L1MuDTTrackSegEta * > &  tsList)

set eta track segments used to form the muon candidate

Definition at line 185 of file L1MuDTTrack.cc.

References m_tsetaList.

Referenced by L1MuDTEtaProcessor::assign().

                                                                         {

  if ( !tsList.empty() ) {
    vector<const L1MuDTTrackSegEta*>::const_iterator iter;
    for ( iter = tsList.begin(); iter != tsList.end(); iter++ ) {
      if ( *iter ) m_tsetaList.push_back(**iter);
    }  
  }

}
void L1MuDTTrack::setTSphi ( const std::vector< const L1MuDTTrackSegPhi * > &  tsList)

set phi track segments used to form the muon candidate

Definition at line 170 of file L1MuDTTrack.cc.

References m_tsphiList.

Referenced by L1MuDTAssignmentUnit::run().

                                                                         {

  if ( !tsList.empty() ) {
    vector<const L1MuDTTrackSegPhi*>::const_iterator iter;
    for ( iter = tsList.begin(); iter != tsList.end(); iter++ ) {
      if ( *iter ) m_tsphiList.push_back(**iter);
    } 
  } 

}
const L1MuDTSecProcId& L1MuDTTrack::spid ( ) const [inline]

return Sector Processor in which the muon candidate was found

Definition at line 95 of file L1MuDTTrack.h.

References m_spid.

Referenced by L1MuDTTrackFinder::run().

{ return m_spid; }
TrackClass L1MuDTTrack::tc ( ) const [inline]

get track-class

Definition at line 89 of file L1MuDTTrack.h.

References m_tc.

Referenced by print(), L1MuDTTrackFinder::run(), and setTC().

{ return m_tc; }
unsigned int L1MuDTTrack::triggerScale ( float  value,
const edm::EventSetup c 
) const

convert pt value in GeV to pt code

Definition at line 200 of file L1MuDTTrack.cc.

References edm::EventSetup::get().

                                                                                {

  const float eps = 1.e-5; // add an epsilon so that setting works with low edge value

  edm::ESHandle< L1MuTriggerPtScale > theTriggerScales;
  c.get< L1MuTriggerPtScaleRcd >().get( theTriggerScales );
  unsigned int t_Scale = theTriggerScales->getPtScale()->getPacked( value + eps );

  return t_Scale;
}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const L1MuDTTrack  
) [friend]

output stream operator


Member Data Documentation

Definition at line 204 of file L1MuDTTrack.h.

Referenced by address(), operator!=(), operator=(), operator==(), reset(), and setAddresses().

bool L1MuDTTrack::m_empty [private]

Definition at line 201 of file L1MuDTTrack.h.

Referenced by disable(), empty(), enable(), operator!=(), operator=(), operator==(), and reset().

std::string L1MuDTTrack::m_name [private]

Definition at line 200 of file L1MuDTTrack.h.

Referenced by name(), operator=(), and setName().

Definition at line 199 of file L1MuDTTrack.h.

Referenced by operator!=(), operator=(), operator==(), print(), and spid().

Definition at line 202 of file L1MuDTTrack.h.

Referenced by operator!=(), operator=(), operator==(), reset(), setTC(), and tc().