Main Page
Namespaces
Classes
Package Documentation
src
L1Trigger
DTTraco
src
DTTracoCand.cc
Go to the documentation of this file.
1
//-------------------------------------------------
2
//
3
// Class: DTTracoCand
4
//
5
// Description: Implementation of L1MuDTTracoChip
6
// candidate
7
//
8
//
9
// Author List:
10
// C. Grandi
11
// Modifications:
12
// SV BTIC parameter from config
13
// SV bti Trig pointer stored insted of trigdata
14
// 22/VI/04 SV: last trigger code update
15
// 04/XI/04 SV: bug fixed for wrong MB1 superlayer offset!
16
// III/05 SV: NEWGEO update
17
//----------------------------------------------------------
18
19
//-----------------------
20
// This Class's Header --
21
//-----------------------
22
#include "
L1Trigger/DTTraco/interface/DTTracoCand.h
"
23
24
//-------------------------------
25
// Collaborating Class Headers --
26
//-------------------------------
27
#include "
L1Trigger/DTBti/interface/DTBtiTrigData.h
"
28
#include "
L1Trigger/DTTraco/interface/DTTracoChip.h
"
29
#include "
L1TriggerConfig/DTTPGConfig/interface/DTConfigTraco.h
"
30
31
//---------------
32
// C++ Headers --
33
//---------------
34
#include <iostream>
35
36
//----------------
37
// Constructors --
38
//----------------
39
DTTracoCand::DTTracoCand
(
DTTracoChip
*tc,
const
DTBtiTrigData
*btitr,
int
pos
,
40
int
step
)
41
: _traco(tc), _btitr(btitr), _step(step), _position(pos), _usable(1) {
42
43
if
(pos < 1 || pos > 4 *
DTConfigTraco::NBTITC
) {
44
std::cout
<<
"DTTracoCand::DTTracoCand: wrong position: "
<< pos;
45
std::cout
<<
", dummy coordinates set!"
<< std::endl;
46
_tcX
= 9999;
47
_tcK
= 9999;
48
return
;
49
}
50
// abs value of K in local TRACO frame (angle conversion):
51
// for sorting the angle closest to normal of chamber
52
// Ktr = Kbti - BTIC - KRAD
53
_tcK
=
abs
(btitr->
K
() - tc->
KRad
() - tc->
BTIC
());
54
55
// X in local TRACO frame (position conversion): Xtr = Xbti + BTIC*(i+4 or
56
// o-4)
57
int
lstep = tc->
BTIC
();
58
_tcX
= btitr->
X
() + lstep * ((pos <=
DTConfigTraco::NBTITC
) *
59
(pos - 1 + DTConfigTraco::NBTITC) +
// inner
60
(pos >
DTConfigTraco::NBTITC
) *
61
(pos - 1 - DTConfigTraco::NBTITC));
// outer
62
63
// NEWGEO add phi sl offset to inner positions
64
if
(btitr->
btiSL
() == 1)
65
_tcX
+= tc->
IBTIOFF
();
66
67
/* DEBUG
68
btitr->print();
69
std::cout << "K in local " << tc->number() << " TRACO " << K() << std::endl;
70
std::cout << "X in local " << tc->number() << " TRACO " << X() << " offset "
71
<< tc->IBTIOFF() << std::endl; print();
72
*/
73
74
/*
75
//OBSOLETE
76
//ATTENTION!! This isn't the "real" MB-superlayer shift
77
//because wires have been renamed/shifted in : DTTrigGeom::cellMapping(int
78
sl, int lay, int tube)
79
//this is a "patch" : to BE FIXED with NEW GEOMETRY!
80
81
//MB1: half cell shift
82
if(btitr->btiSL()==1 && tc->station()==1)
83
_tcX += (int)(0.5*lstep);
84
//MB2
85
// if(btitr->btiSL()==1 && tc->station()==2)
86
// _tcX += (int)(-lstep);
87
88
//std::cout << "X in local TRACO frame = " << _tcX << std::endl;
89
//print();
90
*/
91
}
92
93
DTTracoCand::DTTracoCand
(
const
DTTracoCand
&tccand)
94
:
_traco
(tccand.
_traco
),
_btitr
(tccand.
_btitr
),
_step
(tccand.
_step
),
95
_position
(tccand.
_position
),
_usable
(tccand.
_usable
),
_tcX
(tccand.
_tcX
),
96
_tcK
(tccand.
_tcK
) {}
97
98
//--------------
99
// Destructor --
100
//--------------
101
DTTracoCand::~DTTracoCand
() {}
102
103
//--------------
104
// Operations --
105
//--------------
106
107
DTTracoCand
&
DTTracoCand::operator=
(
const
DTTracoCand
&tccand) {
108
if
(
this
!= &tccand) {
109
_traco
= tccand.
_traco
;
110
_btitr
= tccand.
_btitr
;
111
_position
= tccand.
_position
;
112
_step
= tccand.
_step
;
113
_usable
= tccand.
_usable
;
114
_tcX
= tccand.
_tcX
;
115
_tcK
= tccand.
_tcK
;
116
}
117
return
*
this
;
118
}
119
120
void
DTTracoCand::print
()
const
{
121
// int sl = _btitr->btiSL();
122
std::cout
<<
" step "
<<
_step
;
123
std::cout
<<
" Position "
<<
_position
;
124
std::cout
<<
" Code = "
<<
_btitr
->
code
();
125
std::cout
<<
" SL = "
<<
_btitr
->
btiSL
();
126
std::cout
<<
" N = "
<<
_btitr
->
btiNumber
();
127
std::cout
<<
" X = "
<<
_btitr
->
X
();
128
std::cout
<<
" K = "
<<
_btitr
->
K
();
129
std::cout
<<
" Kr = "
<<
_traco
->
KRad
();
130
std::cout
<<
" |K-Kr| = "
<<
_tcK
<< std::endl;
131
}
DTTracoCand::_step
int _step
Definition:
DTTracoCand.h:113
DTTracoChip::BTIC
int BTIC() const
BTIC parameter.
Definition:
DTTracoChip.h:124
DTTracoChip::KRad
int KRad() const
K par of the radial angle of corr center referred to plane sl.
Definition:
DTTracoChip.cc:1190
DTTracoCand::DTTracoCand
DTTracoCand()
Constructor.
Definition:
DTTracoCand.h:42
DTConfigTraco.h
DTBtiTrigData::X
int X() const
Return trigger X parameter.
Definition:
DTBtiTrigData.h:145
DTBtiTrigData.h
DTTracoCand::_btitr
const DTBtiTrigData * _btitr
Definition:
DTTracoCand.h:109
DTTracoCand::_position
int _position
Definition:
DTTracoCand.h:114
DTBtiTrigData
Definition:
DTBtiTrigData.h:39
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
DTTracoCand::~DTTracoCand
~DTTracoCand()
Destructor.
Definition:
DTTracoCand.cc:101
DTTracoCand::operator=
DTTracoCand & operator=(const DTTracoCand &tccand)
Assignment operator.
Definition:
DTTracoCand.cc:107
DTBtiTrigData::btiNumber
int btiNumber() const
Return parent BTI number.
Definition:
DTBtiTrigData.h:120
pos
Definition:
PixelAliasList.h:18
DTBtiTrigData::btiSL
int btiSL() const
Return parent BTI superlayer.
Definition:
DTBtiTrigData.h:125
DTTracoChip::IBTIOFF
int IBTIOFF() const
IBTIOFF parameter.
Definition:
DTTracoChip.h:127
DTBtiTrigData::K
int K() const
Return trigger K parameter.
Definition:
DTBtiTrigData.h:140
DTTracoCand::_usable
int _usable
Definition:
DTTracoCand.h:115
DTTracoChip
Definition:
DTTracoChip.h:53
DTTracoCand::_tcX
int _tcX
Definition:
DTTracoCand.h:116
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
step
step
Definition:
StallMonitor.cc:94
DTTracoCand
Definition:
DTTracoCand.h:38
DTConfig::NBTITC
static const int NBTITC
Definition:
DTConfig.h:38
DTTracoCand::_traco
DTTracoChip * _traco
Definition:
DTTracoCand.h:107
DTTracoChip.h
DTTracoCand.h
DTTracoCand::print
void print() const
Print candidate.
Definition:
DTTracoCand.cc:120
DTTracoCand::_tcK
int _tcK
Definition:
DTTracoCand.h:117
DTBtiTrigData::code
int code() const
Return trigger code.
Definition:
DTBtiTrigData.h:135
Generated for CMSSW Reference Manual by
1.8.11