BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
L1Branch.h
Go to the documentation of this file.
1
/*
2
*====================================================================
3
*
4
* CBM Level 1 Reconstruction
5
*
6
* Authors: I.Kisel, S.Gorbunov
7
*
8
* e-mail : ikisel@kip.uni-heidelberg.de
9
*
10
*====================================================================
11
*
12
* L1 branch class
13
*
14
*====================================================================
15
*/
16
17
#ifndef L1Branch_H
18
#define L1Branch_H
19
20
#include "
L1StsHit.h
"
21
22
#include <vector>
23
24
class
L1Triplet
;
25
26
struct
L1Branch
27
{
28
L1Branch
()
29
:
Quality
(0)
30
,
Momentum
(0)
31
,
chi2
(0)
32
,
StsHits
()
33
{
34
StsHits
.resize(12);
35
}
36
37
unsigned
short
int
Quality
;
38
float
Momentum
,
chi2
;
39
std::vector<THitI>
StsHits
;
40
41
void
Set
(
unsigned
char
iStation,
unsigned
char
Length,
float
Chi2,
float
Qp)
42
{
43
unsigned
short
int
ista = 16 - iStation;
44
float
tmp =
sqrt
(Chi2) / 3.5 * 255;
45
if
(tmp > 255)
46
tmp = 255;
47
unsigned
short
int
chi_2 = 255 -
static_cast<
unsigned
char
>
(tmp);
48
Quality
= (Length << 12) + (ista << 8) + chi_2;
49
Momentum
= 1.0 /
fabs
(Qp);
50
// chi2 = chi_2;
51
chi2
= Chi2;
52
}
53
54
void
SetLength
(
unsigned
char
Length) {
Quality
+= -(
Quality
>> 12) + (Length << 12); }
55
56
static
bool
compareChi2
(
const
L1Branch
& a,
const
L1Branch
& b) {
return
(a.Quality > b.Quality); }
57
static
bool
comparePChi2
(
const
L1Branch
* a,
const
L1Branch
* b) {
return
compareChi2
(*a, *b); }
58
static
bool
compareMomentum
(
const
L1Branch
& a,
const
L1Branch
& b) {
return
(a.Momentum > b.Momentum); }
59
static
bool
comparePMomentum
(
const
L1Branch
* a,
const
L1Branch
* b) {
return
compareMomentum
(*a, *b); }
60
};
61
62
#endif
L1StsHit.h
fabs
friend F32vec4 fabs(const F32vec4 &a)
Definition
P4_F32vec4.h:52
L1Triplet
Definition
L1Triplet.h:5
sqrt
RVec< PromoteType< T > > sqrt(const RVec< T > &v)
L1Branch::compareChi2
static bool compareChi2(const L1Branch &a, const L1Branch &b)
Definition
L1Branch.h:56
L1Branch::Momentum
float Momentum
Definition
L1Branch.h:38
L1Branch::chi2
float chi2
Definition
L1Branch.h:38
L1Branch::StsHits
std::vector< THitI > StsHits
Definition
L1Branch.h:39
L1Branch::SetLength
void SetLength(unsigned char Length)
Definition
L1Branch.h:54
L1Branch::comparePMomentum
static bool comparePMomentum(const L1Branch *a, const L1Branch *b)
Definition
L1Branch.h:59
L1Branch::Set
void Set(unsigned char iStation, unsigned char Length, float Chi2, float Qp)
Definition
L1Branch.h:41
L1Branch::L1Branch
L1Branch()
Definition
L1Branch.h:28
L1Branch::comparePChi2
static bool comparePChi2(const L1Branch *a, const L1Branch *b)
Definition
L1Branch.h:57
L1Branch::Quality
unsigned short int Quality
Definition
L1Branch.h:37
L1Branch::compareMomentum
static bool compareMomentum(const L1Branch &a, const L1Branch &b)
Definition
L1Branch.h:58
reconstruction
cat
L1Algo
L1Branch.h
Generated on
for BmnRoot by
1.17.0