clas12root
Loading...
Searching...
No Matches
vertdoca.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: vertdoca.h
9 * Author: dglazier
10 *
11 * Created on April 27, 2017, 10:01 AM
12 */
13
14#ifndef VERTDOCA_H
15#define VERTDOCA_H
16
17#include <iostream>
18#include <vector>
19#include <memory>
20#include <hipo4/bank.h>
21
22namespace clas12 {
23
24 class vertdoca : public hipo::bank {
25
26
27 public:
28
29
30 vertdoca(hipo::schema __schema);
31 virtual ~vertdoca() = default;
32
33 short getIndex1(int entry) const noexcept{ return getShort(_index1_order,entry); }
34 short getIndex2(int entry) const noexcept{ return getShort(_index2_order,entry); }
35 float getX(int entry) const noexcept{ return getFloat(_x_order,entry); }
36 float getY(int entry) const noexcept{ return getFloat(_y_order,entry); }
37 float getZ(int entry) const noexcept{ return getFloat(_z_order,entry); }
38 float getX1(int entry) const noexcept{ return getFloat(_x1_order,entry); }
39 float getY1(int entry) const noexcept{ return getFloat(_y1_order,entry); }
40 float getZ1(int entry) const noexcept{ return getFloat(_z1_order,entry); }
41 float getX2(int entry) const noexcept{ return getFloat(_x2_order,entry); }
42 float getY2(int entry) const noexcept{ return getFloat(_y2_order,entry); }
43 float getZ2(int entry) const noexcept{ return getFloat(_z2_order,entry); }
44
45 float getCx1(int entry) const noexcept{ return getFloat(_cx1_order,entry); }
46 float getCy1(int entry) const noexcept{ return getFloat(_cy1_order,entry); }
47 float getCz1(int entry) const noexcept{ return getFloat(_cz1_order,entry); }
48 float getCx2(int entry) const noexcept{ return getFloat(_cx2_order,entry); }
49 float getCy2(int entry) const noexcept{ return getFloat(_cy2_order,entry); }
50 float getCz2(int entry) const noexcept{ return getFloat(_cz2_order,entry); }
51 float getR(int entry) const noexcept{ return getFloat(_r_order,entry); }
52
53
59 void notify() final{
60 bank::notify();
61 }
62
63 int getCombinationEntry(const int index1,const int index2){
64 for(int i=0;i<getSize();++i){
65 auto i1= getIndex1(i);
66 auto i2= getIndex2(i);
67 if(i1==index1&&i2==index2)
68 return i;
69 else if(i2==index1&&i1==index2)
70 return i;
71 }
72 return -1;
73 }
74 bool isTrack1(const int index1,const int combiEntry){
75 return index1==getIndex1(combiEntry);
76 }
77
78 private :
79
80
81 int _index1_order{-1};
82 int _index2_order{-1};
83 int _x_order{-1};
84 int _y_order{-1};
85 int _z_order{-1};
86 int _x1_order{-1};
87 int _y1_order{-1};
88 int _z1_order{-1};
89 int _x2_order{-1};
90 int _y2_order{-1};
91 int _z2_order{-1};
92 int _cx1_order{-1};
93 int _cy1_order{-1};
94 int _cz1_order{-1};
95 int _cx2_order{-1};
96 int _cy2_order{-1};
97 int _cz2_order{-1};
98 int _r_order{-1};
99
100
101 };
102
104 using vertdoca_uptr=std::unique_ptr<clas12::vertdoca>;
105
106}
107
108#endif /* UTILS_H */
Definition vertdoca.h:24
float getZ(int entry) const noexcept
Definition vertdoca.h:37
int getCombinationEntry(const int index1, const int index2)
Definition vertdoca.h:63
float getY(int entry) const noexcept
Definition vertdoca.h:36
float getCy1(int entry) const noexcept
Definition vertdoca.h:46
vertdoca(hipo::schema __schema)
Definition vertdoca.cpp:8
float getCz1(int entry) const noexcept
Definition vertdoca.h:47
virtual ~vertdoca()=default
void notify() final
Definition vertdoca.h:59
float getZ1(int entry) const noexcept
Definition vertdoca.h:40
float getCy2(int entry) const noexcept
Definition vertdoca.h:49
float getX1(int entry) const noexcept
Definition vertdoca.h:38
float getR(int entry) const noexcept
Definition vertdoca.h:51
float getX2(int entry) const noexcept
Definition vertdoca.h:41
float getY1(int entry) const noexcept
Definition vertdoca.h:39
float getZ2(int entry) const noexcept
Definition vertdoca.h:43
float getY2(int entry) const noexcept
Definition vertdoca.h:42
short getIndex1(int entry) const noexcept
Definition vertdoca.h:33
float getCx1(int entry) const noexcept
Definition vertdoca.h:45
bool isTrack1(const int index1, const int combiEntry)
Definition vertdoca.h:74
short getIndex2(int entry) const noexcept
Definition vertdoca.h:34
float getCx2(int entry) const noexcept
Definition vertdoca.h:48
float getX(int entry) const noexcept
Definition vertdoca.h:35
float getCz2(int entry) const noexcept
Definition vertdoca.h:50
Definition calextras.cpp:10
std::unique_ptr< clas12::vertdoca > vertdoca_uptr
Definition vertdoca.h:104
clas12::vertdoca * vertdoca_ptr
Definition vertdoca.h:103