clas12root
Loading...
Searching...
No Matches
utracker.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: utracker.h
9 * Author: dglazier
10 *
11 * Created on February 20, 2023
12 */
13
14#ifndef CLAS12_UTRACKER_H
15#define CLAS12_UTRACKER_H
16
17#include "particle_detector.h"
18
19
20namespace clas12 {
21
22 class utracker : public particle_detector {
23
24
25 public:
26
27
28 utracker()=default;
29
30 utracker(hipo::schema __schema);
31
32 ~utracker() override=default;
33
34 //getter funtions for items in utracker 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 double getPx() const noexcept {
61 if(_index>-1)return getFloat(_px_order,_index);
62 return 0;
63 }
64 double getPy() const noexcept {
65 if(_index>-1)return getFloat(_py_order,_index);
66 return 0;
67 }
68 double getPz() const noexcept {
69 if(_index>-1)return getFloat(_pz_order,_index);
70 return 0;
71 }
72 double getVx() const noexcept {
73 if(_index>-1)return getFloat(_vx_order,_index);
74 return 0;
75 }
76 double getVy() const noexcept {
77 if(_index>-1)return getFloat(_vy_order,_index);
78 return 0;
79 }
80 double getVz() const noexcept {
81 if(_index>-1)return getFloat(_vz_order,_index);
82 return 0;
83 }
84
85 private:
86
87 int _NDF_order=-1;
88 int _sector_order=-1;
89 int _status_order=-1;
90 int _q_order=-1;
91 int _chi2_order=-1;
92 int _px_order=-1;
93 int _py_order=-1;
94 int _pz_order=-1;
95 int _vx_order=-1;
96 int _vy_order=-1;
97 int _vz_order=-1;
98
99
100
101 }; //class utracker
102
104 using utrck_uptr=std::unique_ptr<clas12::utracker>;
105
106}//namespace clas12
107
108#endif /* UTILS_H */
int _index
Definition particle_detector.h:83
Definition utracker.h:22
int getSector() const noexcept
Definition utracker.h:39
double getVz() const noexcept
Definition utracker.h:80
int getCharge() const noexcept
Definition utracker.h:47
double getVy() const noexcept
Definition utracker.h:76
int getNDF() const noexcept
Definition utracker.h:35
int getStatus() const noexcept
Definition utracker.h:43
double getPy() const noexcept
Definition utracker.h:64
utracker()=default
~utracker() override=default
double getChi2() const noexcept
Definition utracker.h:51
double getChi2N() const noexcept
Definition utracker.h:55
double getPx() const noexcept
Definition utracker.h:60
double getVx() const noexcept
Definition utracker.h:72
double getPz() const noexcept
Definition utracker.h:68
Definition calextras.cpp:10
clas12::utracker * utrck_ptr
Definition utracker.h:103
std::unique_ptr< clas12::utracker > utrck_uptr
Definition utracker.h:104