CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1Track.h
Go to the documentation of this file.
1 
9 #ifndef L1CSCTrackFinder_L1Track_h
10 #define L1CSCTrackFinder_L1Track_h
11 
14 
16 class CSCTFUnpacker;
17 class CSCTFSPCoreLogic;
18 
19 namespace csc{
20 
21  class L1Track : public L1MuRegionalCand
22  {
23  public:
24  L1Track() : L1MuRegionalCand(), m_name("csc::L1Track") { setType(2); setPtPacked(0); }
25  L1Track( const csc::L1TrackId& );
26  L1Track( const csc::L1Track& );
27 
28  const csc::L1Track& operator=(const csc::L1Track&);
29 
30  virtual ~L1Track();
31 
32  unsigned rank() const;
33  void setRank(const unsigned& rank) { m_rank = rank; }
34 
35  unsigned localPhi() const { return m_lphi; }
36  void setLocalPhi(const unsigned& lphi) { m_lphi = lphi; }
37 
38  unsigned me1ID() const { return me1_id; }
39  unsigned me2ID() const { return me2_id; }
40  unsigned me3ID() const { return me3_id; }
41  unsigned me4ID() const { return me4_id; }
42  unsigned mb1ID() const { return mb1_id; }
43 
44  unsigned endcap() const { return m_endcap; }
45  unsigned sector() const { return m_sector; }
46  unsigned station() const { return 0; }
47  // these next two are needed by the trigger container class
48  unsigned subsector() const { return 0; }
49  unsigned cscid() const { return 0; }
50 
51  int BX() const { return bx(); }
52 
53  static unsigned encodeRank(const unsigned& pt, const unsigned& quality);
54  static void decodeRank(const unsigned& rank, unsigned& pt, unsigned& quality);
55 
56  unsigned ptLUTAddress() const { return m_ptAddress; }
57  unsigned front_rear() const { return m_fr; }
58  void setPtLUTAddress(const unsigned& adr) { m_ptAddress = adr; }
59  void set_front_rear(unsigned fr) { m_fr=fr; }
60 
61  unsigned outputLink() const {return m_output_link;}
62  void setOutputLink( unsigned oPL ) { m_output_link = oPL; }
63  bool winner() const {return m_winner;}
64 
65  bool operator>(const csc::L1Track&) const;
66  bool operator<(const csc::L1Track&) const;
67  bool operator>=(const csc::L1Track&) const;
68  bool operator<=(const csc::L1Track&) const;
69  bool operator==(const csc::L1Track&) const;
70  bool operator!=(const csc::L1Track&) const;
71 
72  //friend std::ostream& operator<<(std::ostream&, const csc::L1Track&);
73  //friend std::ostream& operator<<(std::ostream&, csc::L1Track&);
74 
77 
78  friend class CSCTFSectorProcessor; // for track stubs
79  friend class ::CSCTFUnpacker; // for track id bits and track stubs
80  friend class ::CSCTFSPCoreLogic; // for track id bits
81 
82  void Print() const;
83 
84  // Accessors for some technical information:
85  unsigned deltaPhi12(void) const { return m_ptAddress&0xFF; }
86  unsigned deltaPhi23(void) const { return (m_ptAddress>>8)&0xF; }
87  unsigned addressEta(void) const { return (m_ptAddress>>12)&0xF; }
88  unsigned mode (void) const { return (m_ptAddress>>16)&0xF; }
89  bool sign (void) const { return (m_ptAddress>>20)&0x1; }
90  bool synch_err (void) const { return m_se; }
91  bool bx0 (void) const { return m_bx0; }
92  bool bc0 (void) const { return m_bc0; }
93  unsigned me1Tbin (void) const { return m_me1Tbin; }
94  unsigned me2Tbin (void) const { return m_me2Tbin; }
95  unsigned me3Tbin (void) const { return m_me3Tbin; }
96  unsigned me4Tbin (void) const { return m_me4Tbin; }
97  unsigned mb1Tbin (void) const { return m_mbTbin; }
98  void setBits (unsigned se, unsigned bx0, unsigned bc0) { m_se=se; m_bx0=bx0; m_bc0=bc0; }
99  void setTbins (unsigned me1, unsigned me2, unsigned me3, unsigned me4, unsigned mb) { m_me1Tbin=me1; m_me2Tbin=me2; m_me3Tbin=me3; m_me4Tbin=me4; m_mbTbin=mb; }
100  void setStationIds(const unsigned& me1, const unsigned& me2,
101  const unsigned& me3, const unsigned& me4,
102  const unsigned& mb1);
103 
104  unsigned modeExtended(void) const;
105  private:
106 
108  //L1TrackId m_id; remove this nested class for now... POOL doesn't like it.
109  unsigned m_endcap, m_sector;
110  //CSCCorrelatedLCTDigiCollection track_stubs; same as above
111  unsigned m_lphi;
112  unsigned m_ptAddress;
113  unsigned m_fr;
115  unsigned m_rank;
116  unsigned m_output_link;
117  bool m_empty;
118  bool m_winner;
119 
120  // Technical information:
121  bool m_se, m_bx0, m_bc0;
123  };
124 }
125 
126 #endif
unsigned m_me2Tbin
Definition: L1Track.h:122
bool operator<=(const csc::L1Track &) const
Definition: L1Track.cc:169
unsigned deltaPhi23(void) const
Definition: L1Track.h:86
std::string m_name
Definition: L1Track.h:107
unsigned mode(void) const
Definition: L1Track.h:88
void setLocalPhi(const unsigned &lphi)
Definition: L1Track.h:36
unsigned station() const
Definition: L1Track.h:46
bool bx0(void) const
Definition: L1Track.h:91
unsigned cscid() const
Definition: L1Track.h:49
unsigned modeExtended(void) const
Definition: L1Track.cc:213
unsigned m_ptAddress
Definition: L1Track.h:112
void set_front_rear(unsigned fr)
Definition: L1Track.h:59
bool m_bc0
Definition: L1Track.h:121
unsigned me1ID() const
Definition: L1Track.h:38
void setBits(unsigned se, unsigned bx0, unsigned bc0)
Definition: L1Track.h:98
unsigned me2Tbin(void) const
Definition: L1Track.h:94
unsigned m_me3Tbin
Definition: L1Track.h:122
void Print() const
Definition: L1Track.cc:184
bool bc0(void) const
Definition: L1Track.h:92
unsigned me2ID() const
Definition: L1Track.h:39
bool synch_err(void) const
Definition: L1Track.h:90
unsigned me3_id
Definition: L1Track.h:114
unsigned me1Tbin(void) const
Definition: L1Track.h:93
bool m_se
Definition: L1Track.h:121
void setPtLUTAddress(const unsigned &adr)
Definition: L1Track.h:58
unsigned m_mbTbin
Definition: L1Track.h:122
bool operator==(const csc::L1Track &) const
Definition: L1Track.cc:174
unsigned mb1_id
Definition: L1Track.h:114
static unsigned encodeRank(const unsigned &pt, const unsigned &quality)
Definition: L1Track.cc:134
void setRank(const unsigned &rank)
Definition: L1Track.h:33
unsigned m_me1Tbin
Definition: L1Track.h:122
unsigned me2_id
Definition: L1Track.h:114
unsigned me1_id
Definition: L1Track.h:114
unsigned m_sector
Definition: L1Track.h:109
unsigned mb1ID() const
Definition: L1Track.h:42
unsigned m_output_link
Definition: L1Track.h:116
unsigned m_me4Tbin
Definition: L1Track.h:122
unsigned me4Tbin(void) const
Definition: L1Track.h:96
unsigned m_rank
Definition: L1Track.h:115
unsigned ptLUTAddress() const
Definition: L1Track.h:56
unsigned addressEta(void) const
Definition: L1Track.h:87
unsigned mb1Tbin(void) const
Definition: L1Track.h:97
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
unsigned sector() const
Definition: L1Track.h:45
virtual ~L1Track()
Definition: L1Track.cc:73
const csc::L1Track & operator=(const csc::L1Track &)
Definition: L1Track.cc:77
static void decodeRank(const unsigned &rank, unsigned &pt, unsigned &quality)
Definition: L1Track.cc:140
unsigned rank() const
Definition: L1Track.cc:118
unsigned localPhi() const
Definition: L1Track.h:35
unsigned m_fr
Definition: L1Track.h:113
unsigned subsector() const
Definition: L1Track.h:48
unsigned outputLink() const
Definition: L1Track.h:61
bool winner() const
Definition: L1Track.h:63
void setPtPacked(unsigned pt)
Set Pt: 0..31.
bool operator>(const csc::L1Track &) const
Definition: L1Track.cc:154
unsigned m_lphi
Definition: L1Track.h:111
void setOutputLink(unsigned oPL)
Definition: L1Track.h:62
unsigned front_rear() const
Definition: L1Track.h:57
unsigned int quality() const
return quality
unsigned me4_id
Definition: L1Track.h:114
void setTbins(unsigned me1, unsigned me2, unsigned me3, unsigned me4, unsigned mb)
Definition: L1Track.h:99
bool m_bx0
Definition: L1Track.h:121
int bx() const
return bunch crossing identifier
unsigned endcap() const
Definition: L1Track.h:44
bool operator>=(const csc::L1Track &) const
Definition: L1Track.cc:164
unsigned deltaPhi12(void) const
Definition: L1Track.h:85
unsigned me4ID() const
Definition: L1Track.h:41
void setStationIds(const unsigned &me1, const unsigned &me2, const unsigned &me3, const unsigned &me4, const unsigned &mb1)
Definition: L1Track.cc:123
unsigned m_endcap
Definition: L1Track.h:109
bool sign(void) const
Definition: L1Track.h:89
unsigned me3Tbin(void) const
Definition: L1Track.h:95
bool operator!=(const csc::L1Track &) const
Definition: L1Track.cc:179
int BX() const
Definition: L1Track.h:51
unsigned me3ID() const
Definition: L1Track.h:40
bool m_winner
Definition: L1Track.h:118
bool m_empty
Definition: L1Track.h:117
bool operator<(const csc::L1Track &) const
Definition: L1Track.cc:159