CMS 3D CMS Logo

DTSectCollPhCand.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
10 //
11 //--------------------------------------------------
12 #ifndef DT_SECT_COLL_PH_CAND_H
13 #define DT_SECT_COLL_PH_CAND_H
14 
15 //----------------------
16 // Base Class Headers --
17 //----------------------
23 //---------------
24 // C++ Headers --
25 //---------------
26 #include <string>
27 
28 // ---------------------
29 // -- Class Interface --
30 // ---------------------
31 
33 public:
35  DTSectCollPhCand(DTSC*, const DTChambPhSegm*, int);
36 
39 
41  DTSectCollPhCand(const DTSectCollPhCand& tsccand);
42 
45 
48 
49  // Non-const methods
50 
52  void setBitsSectColl();
53 
55  void clearBits() { _dataword.assign(5, 3, 0x7); }
56 
58  void clearBitsSectColl() { _dataword.assign(0, 13, 0x1fff); }
59 
61  void setSecondTrack() {
62  _dataword.set(14);
63  _isCarry = 1;
64  }
65 
67  void resetCarry() { _isCarry = 0; }
68 
70 
72  inline void clear();
73 
74  // Const methods
75 
77  inline const DTConfigSectColl* config() const { return _tsc->config(); }
78 
80  inline DTSC* tsc() const { return _tsc; }
81 
83  inline int isFirst() const { return _dataword.element(14) == 0; }
84 
86  inline const DTChambPhSegm* tsTr() const { return _tsmsegm; }
87 
89  inline unsigned dataword() const { return _dataword.dataWord(0) & 0x1ff; }
90 
92  bool operator<(const DTSectCollPhCand& c) const { return _dataword < c._dataword; }
93 
95  bool operator<=(const DTSectCollPhCand& c) const { return _dataword <= c._dataword; }
96 
98  void print() const;
99 
101  int CoarseSync() const;
102 
103 private:
106 
107  // BitArray<9> _dataword; // the word on which sorting is done
108  BitArray<15> _dataword; // the word on which sorting is done. reserve space enough for Preview and full data
109 
110  int _isCarry;
111 };
112 #endif
DTSectCollPhCand::operator=
DTSectCollPhCand & operator=(const DTSectCollPhCand &tsccand)
Assignment operator.
Definition: DTSectCollPhCand.cc:46
DTTracoTrigData.h
DTSectCollPhCand::clear
void clear()
Set the SC Candidate step.
Definition: DTSectCollPhCand.cc:54
DTConfigSectColl
Definition: DTConfigSectColl.h:37
DTSectCollPhCand::_tsmsegm
const DTChambPhSegm * _tsmsegm
Definition: DTSectCollPhCand.h:105
DTSectCollPhCand::setBitsSectColl
void setBitsSectColl()
Set the bits for DTTSM analysis.
Definition: DTSectCollPhCand.cc:69
DTSectCollPhCand
Definition: DTSectCollPhCand.h:32
BitArray::assign
void assign(const int p, const int n, const int val)
Definition: BitArray.h:233
DTSectCollPhCand::CoarseSync
int CoarseSync() const
Return the Coarse Sync Parameter.
Definition: DTSectCollPhCand.cc:60
DTChambPhSegm.h
DTSectCollPhCand::~DTSectCollPhCand
~DTSectCollPhCand()
Destructor.
Definition: DTSectCollPhCand.cc:40
DTSectCollPhCand::clearBitsSectColl
void clearBitsSectColl()
Clear (set to 1) the quality bits for Sector Collector.
Definition: DTSectCollPhCand.h:58
DTSectCollPhCand::dataword
unsigned dataword() const
Return an uint16 with the content of the data word (for debugging)
Definition: DTSectCollPhCand.h:89
BitArray::dataWord
unsigned dataWord(const int i) const
Definition: BitArray.h:124
DTSectCollPhCand::tsc
DTSC * tsc() const
Return the DTTSS.
Definition: DTSectCollPhCand.h:80
BitArray::element
int element(const int pos) const
Definition: BitArray.h:206
DTSectCollPhCand::isFirst
int isFirst() const
Return first/second track bit value.
Definition: DTSectCollPhCand.h:83
DTSC::config
const DTConfigSectColl * config() const
Configuration set.
Definition: DTSC.h:82
DTSectCollPhCand::clearBits
void clearBits()
Clear (set to 1) the quality bits (but first/second track bit)
Definition: DTSectCollPhCand.h:55
DTSectCollPhCand::resetCarry
void resetCarry()
Reset the carry bit.
Definition: DTSectCollPhCand.h:67
DTSectCollPhCand::_isCarry
int _isCarry
Definition: DTSectCollPhCand.h:110
DTSectCollPhCand::_tsc
DTSC * _tsc
Definition: DTSectCollPhCand.h:104
DTSectCollPhCand::DTSectCollPhCand
DTSectCollPhCand()
Constructor.
Definition: DTSectCollPhCand.cc:35
DTSectCollPhCand::operator<
bool operator<(const DTSectCollPhCand &c) const
Operator < used for sorting.
Definition: DTSectCollPhCand.h:92
DTSC
Definition: DTSC.h:41
DTSectCollPhCand::config
const DTConfigSectColl * config() const
Configuration set.
Definition: DTSectCollPhCand.h:77
DTSectCollPhCand::print
void print() const
Print the trigger.
Definition: DTSectCollPhCand.cc:111
DTSectCollPhCand::setSecondTrack
void setSecondTrack()
Set the first track bit to second track (used for carry)
Definition: DTSectCollPhCand.h:61
DTSectCollPhCand::operator<=
bool operator<=(const DTSectCollPhCand &c) const
Operator <= used for sorting.
Definition: DTSectCollPhCand.h:95
DTChambPhSegm
Definition: DTChambPhSegm.h:41
DTSectCollPhCand::tsTr
const DTChambPhSegm * tsTr() const
Return associated TSPhi trigger.
Definition: DTSectCollPhCand.h:86
BitArray::set
void set(const int i)
Definition: BitArray.h:224
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
DTSectCollPhCand::_dataword
BitArray< 15 > _dataword
Definition: DTSectCollPhCand.h:108
DTSC.h
BitArray.h
DTConfigSectColl.h
BitArray< 15 >