#include <L1Trigger/DTTraco/interface/DTTracoCand.h>
Public Member Functions | |
const DTBtiTrigData * | BtiTrig () const |
Return associated BTI trigger. | |
DTTracoCand (const DTTracoCand &tccand) | |
Constructor. | |
DTTracoCand (DTTracoChip *tc, const DTBtiTrigData *btitr, int pos, int step) | |
Constructor. | |
DTTracoCand () | |
Constructor. | |
int | K () const |
Return K-KRAD. | |
bool | operator< (const DTTracoCand &c) const |
returns true if it has smaller K w.r.t. DTTracoChip center K (sort ascend) | |
DTTracoCand & | operator= (const DTTracoCand &tccand) |
Assignment operator. | |
int | position () const |
Return position inside TRACO. | |
void | print () const |
Print candidate. | |
void | setBits (int itk) |
set quality bits for first/second track | |
void | setUnused () |
set candidate unused (usable) | |
void | setUsed () |
set candidate used (unusable) | |
int | step () const |
Return Bunch crossing. | |
DTTracoChip * | Traco () const |
Return parent TRACO. | |
int | usable () const |
Check if candidate is usable. | |
int | X () const |
Return local X coordinate. | |
~DTTracoCand () | |
Destructor. | |
Private Attributes | |
const DTBtiTrigData * | _btitr |
BitArray< 7 > | _dataword |
int | _position |
int | _step |
int | _tcK |
int | _tcX |
DTTracoChip * | _traco |
int | _usable |
Modifications: S.V. store BtiTrig pointer instead of TrigData
Definition at line 40 of file DTTracoCand.h.
DTTracoCand::DTTracoCand | ( | ) | [inline] |
DTTracoCand::DTTracoCand | ( | DTTracoChip * | tc, | |
const DTBtiTrigData * | btitr, | |||
int | pos, | |||
int | step | |||
) |
Constructor.
Definition at line 39 of file DTTracoCand.cc.
References _tcK, _tcX, funct::abs(), DTTracoChip::BTIC(), DTBtiTrigData::btiSL(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DTTracoChip::IBTIOFF(), DTBtiTrigData::K(), DTTracoChip::KRad(), DTConfig::NBTITC, and DTBtiTrigData::X().
00041 : 00042 _traco(tc), _btitr(btitr), _step(step), _position(pos), _usable(1) { 00043 00044 if(pos<1 || pos>4*DTConfigTraco::NBTITC) { 00045 std::cout << "DTTracoCand::DTTracoCand: wrong position: " << pos; 00046 std::cout << ", dummy coordinates set!" << std::endl; 00047 _tcX = 9999; 00048 _tcK = 9999; 00049 return; 00050 } 00051 // abs value of K in local TRACO frame (angle conversion): 00052 // for sorting the angle closest to normal of chamber 00053 // Ktr = Kbti - BTIC - KRAD 00054 _tcK = abs( btitr->K() - tc->KRad() - tc->BTIC() ); 00055 00056 00057 // X in local TRACO frame (position conversion): Xtr = Xbti + BTIC*(i+4 or o-4) 00058 int lstep = tc->BTIC(); 00059 _tcX = btitr->X() + lstep * ( 00060 (pos<=DTConfigTraco::NBTITC)*(pos-1 + DTConfigTraco::NBTITC) + // inner 00061 (pos> DTConfigTraco::NBTITC)*(pos-1 - DTConfigTraco::NBTITC) ); // outer 00062 00063 //NEWGEO add phi sl offset to inner positions 00064 if(btitr->btiSL()==1) 00065 _tcX += tc->IBTIOFF(); 00066 00067 /* DEBUG 00068 btitr->print(); 00069 std::cout << "K in local " << tc->number() << " TRACO " << K() << std::endl; 00070 std::cout << "X in local " << tc->number() << " TRACO " << X() << " offset " << tc->IBTIOFF() << std::endl; 00071 print(); 00072 */ 00073 00074 /* 00075 //OBSOLETE 00076 //ATTENTION!! This isn't the "real" MB-superlayer shift 00077 //because wires have been renamed/shifted in : DTTrigGeom::cellMapping(int sl, int lay, int tube) 00078 //this is a "patch" : to BE FIXED with NEW GEOMETRY! 00079 00080 //MB1: half cell shift 00081 if(btitr->btiSL()==1 && tc->station()==1) 00082 _tcX += (int)(0.5*lstep); 00083 //MB2 00084 // if(btitr->btiSL()==1 && tc->station()==2) 00085 // _tcX += (int)(-lstep); 00086 00087 //std::cout << "X in local TRACO frame = " << _tcX << std::endl; 00088 //print(); 00089 */ 00090 }
DTTracoCand::DTTracoCand | ( | const DTTracoCand & | tccand | ) |
DTTracoCand::~DTTracoCand | ( | ) |
const DTBtiTrigData* DTTracoCand::BtiTrig | ( | ) | const [inline] |
Return associated BTI trigger.
Definition at line 72 of file DTTracoCand.h.
References _btitr.
Referenced by DTTracoChip::AdjBtiLTSuppressed(), DTTracoChip::DoAdjBtiLts(), DTTracoChip::setPV(), DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().
00072 { return _btitr; }
int DTTracoCand::K | ( | ) | const [inline] |
Return K-KRAD.
Definition at line 81 of file DTTracoCand.h.
References _tcK.
Referenced by DTTracoChip::setPV().
00081 { return _tcK; }
bool DTTracoCand::operator< | ( | const DTTracoCand & | c | ) | const [inline] |
returns true if it has smaller K w.r.t. DTTracoChip center K (sort ascend)
Definition at line 90 of file DTTracoCand.h.
References _tcK.
DTTracoCand & DTTracoCand::operator= | ( | const DTTracoCand & | tccand | ) |
Assignment operator.
Definition at line 108 of file DTTracoCand.cc.
References _btitr, _position, _step, _tcK, _tcX, _traco, and _usable.
00108 { 00109 if(this != &tccand){ 00110 _traco = tccand._traco; 00111 _btitr = tccand._btitr; 00112 _position = tccand._position; 00113 _step = tccand._step; 00114 _usable = tccand._usable; 00115 _tcX = tccand._tcX; 00116 _tcK = tccand._tcK; 00117 } 00118 return *this; 00119 }
Return position inside TRACO.
Definition at line 78 of file DTTracoCand.h.
References _position.
Referenced by DTTracoChip::AdjBtiLTSuppressed(), and DTTracoChip::setPV().
00078 { return _position; }
Print candidate.
Definition at line 122 of file DTTracoCand.cc.
References _btitr, _position, _step, _tcK, _traco, DTBtiTrigData::btiNumber(), DTBtiTrigData::btiSL(), DTBtiTrigData::code(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DTBtiTrigData::K(), DTTracoChip::KRad(), and DTBtiTrigData::X().
Referenced by DTTracoChip::run(), DTTracoChip::setPV(), DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().
00122 { 00123 // int sl = _btitr->btiSL(); 00124 std::cout << " step " << _step; 00125 std::cout << " Position " << _position; 00126 std::cout << " Code = " << _btitr->code(); 00127 std::cout << " SL = " << _btitr->btiSL(); 00128 std::cout << " N = " << _btitr->btiNumber(); 00129 std::cout << " X = " << _btitr->X(); 00130 std::cout << " K = " << _btitr->K(); 00131 std::cout << " Kr = " << _traco->KRad(); 00132 std::cout << " |K-Kr| = " << _tcK << std::endl; 00133 }
void DTTracoCand::setUnused | ( | ) | [inline] |
set candidate unused (usable)
Definition at line 63 of file DTTracoCand.h.
References _usable.
Referenced by DTTracoChip::storeUncorr().
00063 {_usable=1; }
void DTTracoCand::setUsed | ( | ) | [inline] |
set candidate used (unusable)
Definition at line 60 of file DTTracoCand.h.
References _usable.
Referenced by DTTracoChip::run().
00060 { _usable=0; }
int DTTracoCand::step | ( | ) | const [inline] |
Return Bunch crossing.
Definition at line 75 of file DTTracoCand.h.
References _step.
Referenced by DTTracoChip::AdjBtiLTSuppressed(), and DTTracoChip::setPV().
00075 { return _step; }
DTTracoChip* DTTracoCand::Traco | ( | ) | const [inline] |
Return parent TRACO.
Definition at line 69 of file DTTracoCand.h.
References _traco.
00069 { return _traco; }
int DTTracoCand::usable | ( | ) | const [inline] |
Check if candidate is usable.
Definition at line 87 of file DTTracoCand.h.
References _usable.
00087 { return _usable; }
int DTTracoCand::X | ( | ) | const [inline] |
Return local X coordinate.
Definition at line 84 of file DTTracoCand.h.
References _tcX.
Referenced by DTTracoChip::storeCorr(), and DTTracoChip::storeUncorr().
00084 { return _tcX; }
const DTBtiTrigData* DTTracoCand::_btitr [private] |
BitArray<7> DTTracoCand::_dataword [private] |
Definition at line 115 of file DTTracoCand.h.
int DTTracoCand::_position [private] |
int DTTracoCand::_step [private] |
int DTTracoCand::_tcK [private] |
Definition at line 120 of file DTTracoCand.h.
Referenced by DTTracoCand(), K(), operator<(), operator=(), and print().
int DTTracoCand::_tcX [private] |
DTTracoChip* DTTracoCand::_traco [private] |
int DTTracoCand::_usable [private] |
Definition at line 118 of file DTTracoCand.h.
Referenced by operator=(), setUnused(), setUsed(), and usable().