16#include <hipo4/bank.h>
31 mcparticle(hipo::schema aschema,hipo::schema schmatch);
36 int getPid(
int index)
const noexcept {
return getInt(_pid_order,index);}
37 float getPx(
int index)
const noexcept {
return getFloat(_px_order,index);}
38 float getPy(
int index)
const noexcept {
return getFloat(_py_order,index);}
39 float getPz(
int index)
const noexcept {
return getFloat(_pz_order,index);}
40 float getVx(
int index)
const noexcept {
return getFloat(_vx_order,index);}
41 float getVy(
int index)
const noexcept {
return getFloat(_vy_order,index);}
42 float getVz(
int index)
const noexcept {
return getFloat(_vz_order,index);}
43 float getMass(
int index)
const noexcept {
return getFloat(_mass_order,index);}
44 int getIndex(
int index)
const noexcept {
return getByte(_index_order,index);}
45 int getType(
int index)
const noexcept {
return getByte(_type_order,index);}
46 int getParent(
int index)
const noexcept {
return getByte(_parent_order,index);}
47 int getDaughter(
int index)
const noexcept {
return getByte(_daughter_order,index);}
48 float getLifetime(
int index)
const noexcept {
return getFloat(_life_order,index);}
50 int getPid() const noexcept {
return _entry==-1 ? 0: getInt(_pid_order,_entry);}
51 float getPx() const noexcept {
return _entry==-1 ? 0: getFloat(_px_order,_entry);}
52 float getPy() const noexcept {
return _entry==-1 ? 0: getFloat(_py_order,_entry);}
53 float getPz() const noexcept {
return _entry==-1 ? 0: getFloat(_pz_order,_entry);}
54 float getVx() const noexcept {
return _entry==-1 ? 0: getFloat(_vx_order,_entry);}
55 float getVy() const noexcept {
return _entry==-1 ? 0: getFloat(_vy_order,_entry);}
56 float getVz() const noexcept {
return _entry==-1 ? 0: getFloat(_vz_order,_entry);}
57 float getMass() const noexcept {
return _entry==-1 ? 0: getFloat(_mass_order,_entry);}
58 int getIndex() const noexcept {
return _entry==-1 ? 0: getByte(_index_order,_entry);}
59 int getType() const noexcept {
return _entry==-1 ? 0: getByte(_type_order,_entry);}
60 int getParent() const noexcept {
return _entry==-1 ? 0: getByte(_parent_order,_entry);}
61 int getDaughter() const noexcept {
return _entry==-1 ? 0: getByte(_daughter_order,_entry);}
62 float getLifetime() const noexcept {
return _entry==-1 ? 0: getFloat(_life_order,_entry);}
65 float getP() const noexcept{
66 auto x= getFloat(_px_order,_entry);
67 auto y= getFloat(_py_order,_entry);
68 auto z= getFloat(_pz_order,_entry);
69 return sqrt(x*x+y*y+z*z);
72 auto x= getFloat(_px_order,_entry);
73 auto y= getFloat(_py_order,_entry);
74 auto z= getFloat(_pz_order,_entry);
75 return x == 0.0 && y == 0.0 && z == 0.0 ? 0.0
76 : atan2(sqrt(x*x+y*y),z);
79 auto x= getFloat(_px_order,_entry);
80 auto y= getFloat(_py_order,_entry);
85 if( i<getRows() )_entry=i;
92 if(_match.get())_match->setEntry(_matched_pindex);
97 short getEntry() const noexcept{
return _entry;}
109 _matched_pindex=pindex;
110 return _match.get()!=
nullptr ?
111 _entry=_match->getMCindex(pindex) : _entry=-1 ;
135 int _index_order{-1};
136 int _parent_order{-1};
137 int _daughter_order{-1};
139 mutable short _entry={0};
140 mutable short _matched_pindex;
Definition mcparticle.h:23
mcmatch * getMatch() const
Definition mcparticle.h:118
float getMass(int index) const noexcept
Definition mcparticle.h:43
float getPz(int index) const noexcept
Definition mcparticle.h:39
void setEntry(short i) const
Definition mcparticle.h:84
int getIndex() const noexcept
Definition mcparticle.h:58
void setBankEntry(short i)
Definition mcparticle.h:94
void notify() final
Definition mcparticle.h:103
float getPx(int index) const noexcept
Definition mcparticle.h:37
float getP() const noexcept
Definition mcparticle.h:65
float getPz() const noexcept
Definition mcparticle.h:53
int getParent(int index) const noexcept
Definition mcparticle.h:46
short getEntry() const noexcept
Definition mcparticle.h:97
int getIndex(int index) const noexcept
Definition mcparticle.h:44
bool isMatched() const noexcept
Definition mcparticle.h:113
float getTheta() const noexcept
Definition mcparticle.h:71
float getVz(int index) const noexcept
Definition mcparticle.h:42
float getLifetime(int index) const noexcept
Definition mcparticle.h:48
float getPy() const noexcept
Definition mcparticle.h:52
float getVx() const noexcept
Definition mcparticle.h:54
float getPy(int index) const noexcept
Definition mcparticle.h:38
float getVy(int index) const noexcept
Definition mcparticle.h:41
float getPx() const noexcept
Definition mcparticle.h:51
int match_to(int pindex) const
Definition mcparticle.h:108
float getLifetime() const noexcept
Definition mcparticle.h:62
int getType() const noexcept
Definition mcparticle.h:59
float getPhi() const noexcept
Definition mcparticle.h:78
float getVy() const noexcept
Definition mcparticle.h:55
float getMass() const noexcept
Definition mcparticle.h:57
int getType(int index) const noexcept
Definition mcparticle.h:45
int getParent() const noexcept
Definition mcparticle.h:60
int getDaughter(int index) const noexcept
Definition mcparticle.h:47
float getVx(int index) const noexcept
Definition mcparticle.h:40
void setMatchEntry(short ip, short imc) const
Definition mcparticle.h:89
virtual ~mcparticle()=default
int getDaughter() const noexcept
Definition mcparticle.h:61
float getVz() const noexcept
Definition mcparticle.h:56
int getPid(int index) const noexcept
Definition mcparticle.h:36
int getPid() const noexcept
Definition mcparticle.h:50
Definition calextras.cpp:10
clas12::mcparticle * mcpar_ptr
Definition mcparticle.h:144
std::unique_ptr< clas12::mcparticle > mcpar_uptr
Definition mcparticle.h:145
std::unique_ptr< clas12::mcmatch > mcmatch_uptr
Definition mcmatch.h:111