clas12root
Loading...
Searching...
No Matches
tracker.h
Go to the documentation of this file.
1
/*
2
* To change this license header, choose License Headers in Project Properties.
3
* To change this template file, choose Tools | Templates
4
* and open the template in the editor.
5
*/
6
7
/*
8
* File: tracker.h
9
* Author: dglazier
10
*
11
* Created on April 27, 2017, 10:01 AM
12
*/
13
14
#ifndef CLAS12_TRACKER_H
15
#define CLAS12_TRACKER_H
16
17
#include "
particle_detector.h
"
18
19
20
namespace
clas12
{
21
22
class
tracker
:
public
particle_detector
{
23
24
25
public
:
26
27
28
tracker
()=
default
;
29
30
tracker
(hipo::schema __schema);
31
32
~tracker
()
override
=
default
;
33
34
//getter funtions for items in tracker bank
35
int
getNDF
() const noexcept {
36
if
(
_index
>-1)
return
getShort(_NDF_order,
_index
);
37
return
0;
38
}
39
int
getSector
() const noexcept {
40
if
(
_index
>-1)
return
getByte(_sector_order,
_index
);
41
return
0;
42
}
43
int
getStatus
() const noexcept {
44
if
(
_index
>-1)
return
getShort(_status_order,
_index
);
45
return
0;
46
}
47
int
getCharge
() const noexcept {
48
if
(
_index
>-1)
return
getByte(_q_order,
_index
);
49
return
0;
50
}
51
double
getChi2
() const noexcept {
52
if
(
_index
>-1)
return
getFloat(_chi2_order,
_index
);
53
return
0;
54
}
55
double
getChi2N
() const noexcept {
56
auto
N=
getNDF
();
57
if
(N)
return
getChi2
()/N;
58
return
0;
59
}
60
61
private
:
62
63
int
_NDF_order=-1;
64
int
_sector_order=-1;
65
int
_status_order=-1;
66
int
_q_order=-1;
67
int
_chi2_order=-1;
68
69
70
71
};
//class tracker
72
73
using
trck_ptr
=
clas12::tracker
*;
74
using
trck_uptr
=std::unique_ptr<clas12::tracker>;
75
76
}
//namespace clas12
77
78
#endif
/* UTILS_H */
clas12::particle_detector::_index
int _index
Definition
particle_detector.h:83
clas12::particle_detector::particle_detector
particle_detector()=default
clas12::tracker
Definition
tracker.h:22
clas12::tracker::~tracker
~tracker() override=default
clas12::tracker::getSector
int getSector() const noexcept
Definition
tracker.h:39
clas12::tracker::getChi2N
double getChi2N() const noexcept
Definition
tracker.h:55
clas12::tracker::getChi2
double getChi2() const noexcept
Definition
tracker.h:51
clas12::tracker::getStatus
int getStatus() const noexcept
Definition
tracker.h:43
clas12::tracker::getNDF
int getNDF() const noexcept
Definition
tracker.h:35
clas12::tracker::tracker
tracker()=default
clas12::tracker::getCharge
int getCharge() const noexcept
Definition
tracker.h:47
clas12
Definition
calextras.cpp:10
clas12::trck_ptr
clas12::tracker * trck_ptr
Definition
tracker.h:73
clas12::trck_uptr
std::unique_ptr< clas12::tracker > trck_uptr
Definition
tracker.h:74
particle_detector.h
Clas12Banks
tracker.h
Generated by
1.15.0