BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
L1Triplet.h
Go to the documentation of this file.
1
#ifndef L1Triplet_H
2
#define L1Triplet_H
3
4
class
L1Triplet
5
{
6
7
private
:
8
THitI
w0
;
// left hit (16b) index in vStsHits array
9
THitI
w1
;
// middle hit(16b)
10
THitI
w2
;
// right hit(16b)
11
unsigned
char
b0
;
// chi2(5b) + level(3b)
12
unsigned
char
bl
;
// level
13
unsigned
char
b1
;
// qp (8b)
14
unsigned
char
st
;
// staL (4b), staM-1-staL (2b), staR-2-staL (2b)
15
float
chi2
;
16
17
public
:
18
unsigned
char
Cqp
;
19
20
std::vector<unsigned int>
neighbours
;
21
22
L1Triplet
()
23
:
w0
(0)
24
,
w1
(0)
25
,
w2
(0)
26
,
b0
(0)
27
,
bl
(0)
28
,
b1
(0)
29
,
st
(0)
30
,
chi2
(0.)
31
,
Cqp
(0)
32
,
neighbours
()
33
{
34
neighbours
.clear();
35
};
36
37
void
Set
(
unsigned
int
iHitL,
38
unsigned
int
iHitM,
39
unsigned
int
iHitR,
40
unsigned
int
iStaL,
41
unsigned
int
iStaM,
42
unsigned
int
iStaR,
43
unsigned
char
Level,
44
unsigned
char
Qp,
45
float
Chi2)
46
{
47
chi2
= Chi2;
48
49
w0
= iHitL;
50
w1
= iHitM;
51
w2
= iHitR;
52
53
Chi2 =
sqrt
(
fabs
(Chi2)) * 31. / 3.5;
// 3.5 == 31
54
if
(Chi2 > 31 || !finite(Chi2))
55
Chi2 = 31;
56
b0
= ((
static_cast<
unsigned
char
>
(Chi2)) << 3) + (Level % 8);
57
b1
= Qp;
58
bl
= Level;
59
60
st
= (iStaL << 4) + ((iStaM - iStaL - 1) << 2) + (iStaR - iStaL - 2);
61
}
62
63
THitI
GetLHit
()
const
{
return
w0
; }
64
THitI
GetMHit
()
const
{
return
w1
; }
65
THitI
GetRHit
()
const
{
return
w2
; }
66
67
// unsigned int GetFirstNeighbour() const {
68
// return w1;
69
// }
70
// unsigned int GetNNeighbours() const {
71
// return w2;
72
// }
73
74
unsigned
char
GetLevel
()
const
75
{
76
// return b0%8;
77
return
bl
;
78
}
79
80
unsigned
char
GetQp
()
const
{
return
b1
; }
81
82
float
GetChi2
()
const
83
{
84
// float x = (b0>>3)*3.5/31.;
85
// return x*x;
86
return
chi2
;
87
}
88
89
float
GetQpOrig
(
float
MaxInvMom) {
return
(
GetQp
() * (MaxInvMom * 2) / 255. - MaxInvMom); }
90
91
int
GetLSta
()
const
{
return
st
>> 4; }
92
93
int
GetMSta
()
const
{
return
((
st
% 16) >> 2) +
GetLSta
() + 1; }
94
95
int
GetRSta
()
const
{
return
(
st
% 4) +
GetLSta
() + 2; }
96
};
97
98
#endif
THitI
unsigned int THitI
Definition
L1StsHit.h:6
fabs
friend F32vec4 fabs(const F32vec4 &a)
Definition
P4_F32vec4.h:52
L1Triplet::Set
void Set(unsigned int iHitL, unsigned int iHitM, unsigned int iHitR, unsigned int iStaL, unsigned int iStaM, unsigned int iStaR, unsigned char Level, unsigned char Qp, float Chi2)
Definition
L1Triplet.h:37
L1Triplet::GetRSta
int GetRSta() const
Definition
L1Triplet.h:95
L1Triplet::L1Triplet
L1Triplet()
Definition
L1Triplet.h:22
L1Triplet::st
unsigned char st
Definition
L1Triplet.h:14
L1Triplet::GetQp
unsigned char GetQp() const
Definition
L1Triplet.h:80
L1Triplet::w2
THitI w2
Definition
L1Triplet.h:10
L1Triplet::w0
THitI w0
Definition
L1Triplet.h:8
L1Triplet::b1
unsigned char b1
Definition
L1Triplet.h:13
L1Triplet::GetLSta
int GetLSta() const
Definition
L1Triplet.h:91
L1Triplet::GetLHit
THitI GetLHit() const
Definition
L1Triplet.h:63
L1Triplet::GetMHit
THitI GetMHit() const
Definition
L1Triplet.h:64
L1Triplet::bl
unsigned char bl
Definition
L1Triplet.h:12
L1Triplet::GetMSta
int GetMSta() const
Definition
L1Triplet.h:93
L1Triplet::w1
THitI w1
Definition
L1Triplet.h:9
L1Triplet::GetRHit
THitI GetRHit() const
Definition
L1Triplet.h:65
L1Triplet::GetQpOrig
float GetQpOrig(float MaxInvMom)
Definition
L1Triplet.h:89
L1Triplet::GetLevel
unsigned char GetLevel() const
Definition
L1Triplet.h:74
L1Triplet::neighbours
std::vector< unsigned int > neighbours
Definition
L1Triplet.h:20
L1Triplet::chi2
float chi2
Definition
L1Triplet.h:15
L1Triplet::Cqp
unsigned char Cqp
Definition
L1Triplet.h:18
L1Triplet::GetChi2
float GetChi2() const
Definition
L1Triplet.h:82
L1Triplet::b0
unsigned char b0
Definition
L1Triplet.h:11
sqrt
RVec< PromoteType< T > > sqrt(const RVec< T > &v)
reconstruction
cat
L1Algo
L1Triplet.h
Generated on
for BmnRoot by
1.17.0