CMS 3D CMS Logo

csc::L1Track Class Reference

#include <DataFormats/L1CSCTrackFinder/interface/L1Track.h>

Inheritance diagram for csc::L1Track:

L1MuRegionalCand

List of all members.

Public Member Functions

int BX () const
unsigned cscid () const
unsigned endcap () const
 L1Track (const csc::L1Track &)
 L1Track (const csc::L1TrackId &)
 L1Track ()
unsigned localPhi () const
unsigned mb1ID () const
unsigned me1ID () const
unsigned me2ID () const
unsigned me3ID () const
unsigned me4ID () const
bool operator!= (const csc::L1Track &) const
bool operator< (const csc::L1Track &) const
bool operator<= (const csc::L1Track &) const
const csc::L1Trackoperator= (const csc::L1Track &)
bool operator== (const csc::L1Track &) const
bool operator> (const csc::L1Track &) const
bool operator>= (const csc::L1Track &) const
unsigned outputLink () const
void Print () const
unsigned ptLUTAddress () const
unsigned rank () const
unsigned sector () const
void setLocalPhi (const unsigned &lphi)
void setPtLUTAddress (const unsigned &adr)
void setRank (const unsigned &rank)
unsigned station () const
unsigned subsector () const
bool winner () const
virtual ~L1Track ()

Static Public Member Functions

static void decodeRank (const unsigned &rank, unsigned &pt, unsigned &quality)
static unsigned encodeRank (const unsigned &pt, const unsigned &quality)

Private Member Functions

void setStationIds (const unsigned &me1, const unsigned &me2, const unsigned &me3, const unsigned &me4, const unsigned &mb1)

Private Attributes

bool m_empty
unsigned m_endcap
unsigned m_lphi
std::string m_name
unsigned m_output_link
unsigned m_ptAddress
unsigned m_rank
unsigned m_sector
bool m_winner
unsigned mb1_id
unsigned me1_id
unsigned me2_id
unsigned me3_id
unsigned me4_id

Friends

class ::CSCTFSPCoreLogic
class ::CSCTFUnpacker
class CSCTFSectorProcessor
 Only the Unpacker and SectorProcessor should have access to addTrackStub() This prevents people from adding too many track stubs.


Detailed Description

Definition at line 21 of file L1Track.h.


Constructor & Destructor Documentation

csc::L1Track::L1Track (  )  [inline]

Definition at line 24 of file L1Track.h.

References L1MuRegionalCand::setPtPacked(), and L1MuRegionalCand::setType().

00024 : L1MuRegionalCand(), m_name("csc::L1Track") { setType(2); setPtPacked(0); }

L1Track::L1Track ( const csc::L1TrackId id  ) 

Definition at line 5 of file L1Track.cc.

References m_empty, m_endcap, m_lphi, m_output_link, m_ptAddress, m_rank, m_sector, m_winner, mb1_id, me1_id, me2_id, me3_id, me4_id, L1MuRegionalCand::setPtPacked(), and L1MuRegionalCand::setType().

00005                                         : m_name("csc::L1Track")
00006   {
00007     m_endcap = id.endcap();
00008     m_sector = id.sector();
00009     m_lphi = 0;
00010     m_ptAddress = 0;
00011     m_empty = true;
00012     setType(2);
00013     setPtPacked(0);
00014     m_rank = 0;
00015     me1_id = 0;
00016     me2_id = 0;
00017     me3_id = 0;
00018     me4_id = 0;
00019     mb1_id = 0;
00020     m_output_link = 0;
00021     m_winner = false;
00022   }

L1Track::L1Track ( const csc::L1Track rhs  ) 

Definition at line 24 of file L1Track.cc.

References m_empty, m_endcap, m_lphi, m_output_link, m_ptAddress, m_rank, m_sector, m_winner, mb1_id, me1_id, me2_id, me3_id, and me4_id.

00024                                         : L1MuRegionalCand(rhs.type_idx(),rhs.phi_packed(),rhs.eta_packed(),
00025                                                       rhs.pt_packed(),rhs.charge_packed(),
00026                                                       rhs.charge_valid_packed(),rhs.finehalo_packed(),
00027                                                       rhs.quality_packed(),rhs.bx()),
00028                                               m_name(rhs.m_name)
00029   {
00030     m_empty = rhs.m_empty;
00031     m_lphi = rhs.m_lphi;
00032     m_endcap = rhs.m_endcap;
00033     m_sector = rhs.m_sector;
00034     m_ptAddress = rhs.m_ptAddress;
00035     m_rank = rhs.m_rank;
00036     me1_id = rhs.me1_id;
00037     me2_id = rhs.me2_id;
00038     me3_id = rhs.me3_id;
00039     me4_id = rhs.me4_id;
00040     mb1_id = rhs.mb1_id;
00041     m_output_link = rhs.m_output_link;
00042     m_winner = rhs.m_winner;
00043   }

L1Track::~L1Track (  )  [virtual]

Definition at line 45 of file L1Track.cc.

00046   {
00047   }


Member Function Documentation

int csc::L1Track::BX (  )  const [inline]

Definition at line 51 of file L1Track.h.

References L1MuRegionalCand::bx().

00051 { return bx(); }

unsigned csc::L1Track::cscid (  )  const [inline]

Definition at line 49 of file L1Track.h.

00049 { return 0; }

void L1Track::decodeRank ( const unsigned &  rank,
unsigned &  pt,
unsigned &  quality 
) [static]

Definition at line 103 of file L1Track.cc.

References L1MuRegionalCand::PT_LENGTH.

Referenced by MuonCandProducerMon::produce().

00104   {
00105     if(rank == 0)
00106       {
00107         quality = 0;
00108         pt = 0;
00109       }
00110     else
00111       {
00112         quality = rank >> L1MuRegionalCand::PT_LENGTH;
00113         pt = rank & ( (1<<L1MuRegionalCand::PT_LENGTH) - 1);
00114       }
00115   }

unsigned L1Track::encodeRank ( const unsigned &  pt,
const unsigned &  quality 
) [static]

Definition at line 97 of file L1Track.cc.

References L1MuRegionalCand::PT_LENGTH.

00098   {
00099     if(pt == 0) return 0;
00100     return pt | (quality << L1MuRegionalCand::PT_LENGTH);
00101   }

unsigned csc::L1Track::endcap (  )  const [inline]

Definition at line 44 of file L1Track.h.

References m_endcap.

00044 { return m_endcap; }

unsigned csc::L1Track::localPhi (  )  const [inline]

Definition at line 35 of file L1Track.h.

References m_lphi.

00035 { return m_lphi; }

unsigned csc::L1Track::mb1ID (  )  const [inline]

Definition at line 42 of file L1Track.h.

References mb1_id.

00042 { return mb1_id; }

unsigned csc::L1Track::me1ID (  )  const [inline]

Definition at line 38 of file L1Track.h.

References me1_id.

00038 { return me1_id; }

unsigned csc::L1Track::me2ID (  )  const [inline]

Definition at line 39 of file L1Track.h.

References me2_id.

00039 { return me2_id; }

unsigned csc::L1Track::me3ID (  )  const [inline]

Definition at line 40 of file L1Track.h.

References me3_id.

00040 { return me3_id; }

unsigned csc::L1Track::me4ID (  )  const [inline]

Definition at line 41 of file L1Track.h.

References me4_id.

00041 { return me4_id; }

bool L1Track::operator!= ( const csc::L1Track rhs  )  const

Definition at line 142 of file L1Track.cc.

References rank().

00143   {
00144     return (rank() != rhs.rank());
00145   }

bool L1Track::operator< ( const csc::L1Track rhs  )  const

Definition at line 122 of file L1Track.cc.

References rank().

00123   {
00124     return (rank() < rhs.rank());
00125   }

bool L1Track::operator<= ( const csc::L1Track rhs  )  const

Definition at line 132 of file L1Track.cc.

References rank().

00133   {
00134     return (rank() <= rhs.rank());
00135   }

const csc::L1Track & L1Track::operator= ( const csc::L1Track rhs  ) 

Definition at line 49 of file L1Track.cc.

References L1MuRegionalCand::bx(), L1MuRegionalCand::charge_packed(), L1MuRegionalCand::charge_valid_packed(), L1MuRegionalCand::eta_packed(), L1MuRegionalCand::finehalo_packed(), L1MuRegionalCand::getDataWord(), m_empty, m_endcap, m_lphi, m_name, m_output_link, m_ptAddress, m_rank, m_sector, m_winner, mb1_id, me1_id, me2_id, me3_id, me4_id, L1MuRegionalCand::phi_packed(), L1MuRegionalCand::pt_packed(), L1MuRegionalCand::quality_packed(), and L1MuRegionalCand::type_idx().

00050   {
00051     if(this != &rhs)
00052       {
00053         m_empty = rhs.m_empty;
00054         this->setBx(rhs.bx());
00055         this->setDataWord(rhs.getDataWord());
00056         m_name    = rhs.m_name;
00057         m_lphi    = rhs.m_lphi;
00058         this->setType(rhs.type_idx());
00059         this->setPhiPacked(rhs.phi_packed());
00060         this->setEtaPacked(rhs.eta_packed());
00061         this->setPtPacked(rhs.pt_packed());
00062         this->setChargePacked(rhs.charge_packed());
00063         this->setChargeValidPacked(rhs.charge_valid_packed());
00064         this->setFineHaloPacked(rhs.finehalo_packed());
00065         this->setQualityPacked(rhs.quality_packed());
00066         m_endcap = rhs.m_endcap;
00067         m_sector = rhs.m_sector;
00068         m_ptAddress = rhs.m_ptAddress;
00069         m_rank = rhs.m_rank;
00070         me1_id = rhs.me1_id;
00071         me2_id = rhs.me2_id;
00072         me3_id = rhs.me3_id;
00073         me4_id = rhs.me4_id;
00074         mb1_id = rhs.mb1_id;
00075         m_output_link = rhs.m_output_link;
00076     m_winner = rhs.m_winner;
00077           }
00078     return *this;
00079   }

bool L1Track::operator== ( const csc::L1Track rhs  )  const

Definition at line 137 of file L1Track.cc.

References rank().

00138   {
00139     return (rank() == rhs.rank());
00140   }

bool L1Track::operator> ( const csc::L1Track rhs  )  const

Definition at line 117 of file L1Track.cc.

References rank().

00118   {
00119     return (rank() > rhs.rank());
00120   }

bool L1Track::operator>= ( const csc::L1Track rhs  )  const

Definition at line 127 of file L1Track.cc.

References rank().

00128   {
00129     return (rank() >= rhs.rank());
00130   }

unsigned csc::L1Track::outputLink (  )  const [inline]

Definition at line 59 of file L1Track.h.

References m_output_link.

00059 {return m_output_link;}

void L1Track::Print (  )  const

Definition at line 147 of file L1Track.cc.

References GenMuonPlsPt100GeV_cfg::cout, empty, GeomDetEnumerators::endcap, and lat::endl().

00148   {
00149     if (!empty())
00150       {
00151         std::cout << "\t  Pt(int): "  << " " << pt_packed()
00152                   << " Phi(int): " << " " << phi_packed()
00153                   << " Eta(int): " << " " << eta_packed()
00154                   << " Quality: "  << " " << quality_packed()
00155                   << " charge: "   << " " << charge_packed()
00156                   << " side: "   << " " << endcap()
00157                   << " bx: "       << " " << BX()
00158           << " Winner: "   << " " << winner()
00159                   << std::endl;
00160       }
00161     else
00162       {
00163         std::cout <<"\t  Empty track!\n";
00164         std::cout << "\t  Pt(int): "  << " " << "unassigned or zero"
00165                   << " Phi(int): " << " " << phi_packed()
00166                   << " Eta(int): " << " " << eta_packed()
00167                   << " Quality: "  << " " << "unassigned or zero"
00168                   << " charge: "   << " " << charge_packed()
00169                   << " side: "   << " " << endcap()
00170                   << " bx: "       << " " << BX()
00171           << " Winner: "   << " " << winner()
00172                   << std::endl;
00173       }
00174   }

unsigned csc::L1Track::ptLUTAddress (  )  const [inline]

Definition at line 56 of file L1Track.h.

References m_ptAddress.

00056 { return m_ptAddress; }

unsigned L1Track::rank (  )  const

Definition at line 81 of file L1Track.cc.

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

00082   {
00083     return m_rank;
00084   }

unsigned csc::L1Track::sector (  )  const [inline]

Definition at line 45 of file L1Track.h.

References m_sector.

00045 { return m_sector; }

void csc::L1Track::setLocalPhi ( const unsigned &  lphi  )  [inline]

Definition at line 36 of file L1Track.h.

References m_lphi.

Referenced by CSCTFSPCoreLogic::run().

00036 { m_lphi = lphi; }

void csc::L1Track::setPtLUTAddress ( const unsigned &  adr  )  [inline]

Definition at line 57 of file L1Track.h.

References m_ptAddress.

Referenced by CSCTFSectorProcessor::run(), and CSCTFSPCoreLogic::run().

00057 { m_ptAddress = adr; }

void csc::L1Track::setRank ( const unsigned &  rank  )  [inline]

Definition at line 33 of file L1Track.h.

References m_rank.

Referenced by CSCTFSectorProcessor::run().

00033 { m_rank = rank; }

void L1Track::setStationIds ( const unsigned &  me1,
const unsigned &  me2,
const unsigned &  me3,
const unsigned &  me4,
const unsigned &  mb1 
) [private]

Definition at line 86 of file L1Track.cc.

Referenced by CSCTFSPCoreLogic::run().

00089   {
00090     me1_id = me1;
00091     me2_id = me2;
00092     me3_id = me3;
00093     me4_id = me4;
00094     mb1_id = mb1;
00095   }

unsigned csc::L1Track::station (  )  const [inline]

Definition at line 46 of file L1Track.h.

00046 { return 0; }

unsigned csc::L1Track::subsector (  )  const [inline]

Definition at line 48 of file L1Track.h.

00048 { return 0; }

bool csc::L1Track::winner (  )  const [inline]

Definition at line 60 of file L1Track.h.

References m_winner.

00060 {return m_winner;}


Friends And Related Function Documentation

friend class ::CSCTFSPCoreLogic [friend]

Definition at line 77 of file L1Track.h.

friend class ::CSCTFUnpacker [friend]

Definition at line 76 of file L1Track.h.

friend class CSCTFSectorProcessor [friend]

Only the Unpacker and SectorProcessor should have access to addTrackStub() This prevents people from adding too many track stubs.

Definition at line 75 of file L1Track.h.


Member Data Documentation

bool csc::L1Track::m_empty [private]

Definition at line 92 of file L1Track.h.

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

unsigned csc::L1Track::m_endcap [private]

Definition at line 85 of file L1Track.h.

Referenced by endcap(), L1Track(), and operator=().

unsigned csc::L1Track::m_lphi [private]

Definition at line 87 of file L1Track.h.

Referenced by L1Track(), localPhi(), operator=(), and setLocalPhi().

std::string csc::L1Track::m_name [private]

Definition at line 83 of file L1Track.h.

Referenced by operator=().

unsigned csc::L1Track::m_output_link [private]

Definition at line 91 of file L1Track.h.

Referenced by L1Track(), operator=(), outputLink(), and CSCTFSPCoreLogic::run().

unsigned csc::L1Track::m_ptAddress [private]

Definition at line 88 of file L1Track.h.

Referenced by L1Track(), operator=(), ptLUTAddress(), and setPtLUTAddress().

unsigned csc::L1Track::m_rank [private]

Definition at line 90 of file L1Track.h.

Referenced by L1Track(), operator=(), and setRank().

unsigned csc::L1Track::m_sector [private]

Definition at line 85 of file L1Track.h.

Referenced by L1Track(), operator=(), and sector().

bool csc::L1Track::m_winner [private]

Definition at line 93 of file L1Track.h.

Referenced by L1Track(), operator=(), and winner().

unsigned csc::L1Track::mb1_id [private]

Definition at line 89 of file L1Track.h.

Referenced by L1Track(), mb1ID(), and operator=().

unsigned csc::L1Track::me1_id [private]

Definition at line 89 of file L1Track.h.

Referenced by L1Track(), me1ID(), and operator=().

unsigned csc::L1Track::me2_id [private]

Definition at line 89 of file L1Track.h.

Referenced by L1Track(), me2ID(), and operator=().

unsigned csc::L1Track::me3_id [private]

Definition at line 89 of file L1Track.h.

Referenced by L1Track(), me3ID(), and operator=().

unsigned csc::L1Track::me4_id [private]

Definition at line 89 of file L1Track.h.

Referenced by L1Track(), me4ID(), and operator=().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:36:54 2009 for CMSSW by  doxygen 1.5.4