ATLAS Offline Software
Loading...
Searching...
No Matches
TrigEFBphysCnv_p3.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9
11
12//-----------------------------------------------------------------------------
13// Persistent to transient
14//-----------------------------------------------------------------------------
16 TrigEFBphys *transObj,
17 MsgStream &log )
18{
19 log << MSG::DEBUG << "TrigEFBphysCnv_p3::persToTrans called " << endmsg;
20
22 m_elementLinkEFBphysCnv.persToTrans(&persObj->m_secondaryDecay, &secondaryDecay, log);
23
24 *transObj = TrigEFBphys (persObj->m_allInts[0], // roiID
25 persObj->m_allFloats[0], // eta
26 persObj->m_allFloats[1], // phi
27 static_cast<TrigEFBphys::pType>(persObj->m_allInts[1]), // particleType
28 persObj->m_allFloats[2], // mass
29 secondaryDecay);
30 transObj->fitmass (persObj->m_allFloats[3]);
31 transObj->fitchi2 (persObj->m_allFloats[4]);
32 transObj->fitndof (persObj->m_allInts[2]);
33 transObj->fitx (persObj->m_allFloats[5]);
34 transObj->fity (persObj->m_allFloats[6]);
35 transObj->fitz (persObj->m_allFloats[7]);
36
38 trackELVCnv.persToTrans(&persObj->m_trackVector, &trackVector, log);
39 for (const ElementLink<Rec::TrackParticleContainer> el : trackVector)
40 transObj->addTrack (el);
41}
42
43//-----------------------------------------------------------------------------
44// Transient to persistent
45//-----------------------------------------------------------------------------
47 TrigEFBphys_p3 *persObj,
48 MsgStream &log )
49{
50 log << MSG::DEBUG << "TrigEFBphysCnv_p3::transToPers called " << endmsg;
51
52 persObj->m_allInts[0] = transObj->roiId() ;
53 persObj->m_allInts[1] = transObj->particleType();
54 persObj->m_allInts[2] = transObj->fitndof() ;
55
56 persObj->m_allFloats[0] = transObj->eta() ;
57 persObj->m_allFloats[1] = transObj->phi() ;
58 persObj->m_allFloats[2] = transObj->mass() ;
59 persObj->m_allFloats[3] = transObj->fitmass() ;
60 persObj->m_allFloats[4] = transObj->fitchi2() ;
61 persObj->m_allFloats[5] = transObj->fitx() ;
62 persObj->m_allFloats[6] = transObj->fity() ;
63 persObj->m_allFloats[7] = transObj->fitz() ;
64
65 trackELVCnv.transToPers(&transObj->trackVector(), &persObj->m_trackVector, log);
66
67 m_elementLinkEFBphysCnv.transToPers(&transObj->secondaryDecayLink(), &persObj->m_secondaryDecay, log);
68}
#define endmsg
static const ElementLinkVectorCnv_p1< ElementLinkVector< Rec::TrackParticleContainer > > trackELVCnv
ElementLinkVector implementation for standalone ROOT.
virtual void persToTrans(const TrigEFBphys_p3 *persObj, TrigEFBphys *transObj, MsgStream &log)
virtual void transToPers(const TrigEFBphys *transObj, TrigEFBphys_p3 *persObj, MsgStream &log)
ElementLinkCnv_p3< ElementLink< TrigEFBphysContainer > > m_elementLinkEFBphysCnv
ElementLinkIntVector_p1 m_trackVector
float m_allFloats[8]
ElementLinkInt_p3 m_secondaryDecay
float phi() const
accessor method: phi
Definition TrigEFBphys.h:69
float fitchi2() const
accessor method: chi2 from vertex fit
Definition TrigEFBphys.h:75
const ElementLink< TrigEFBphysContainer > & secondaryDecayLink() const
void addTrack(const ElementLink< Rec::TrackParticleContainer > &track)
set method: add track to particle
float fitmass() const
accessor method: mass from vertex fit
Definition TrigEFBphys.h:73
pType
enum for different particle types
Definition TrigEFBphys.h:47
float fity() const
accessor method: y position of vertex
Definition TrigEFBphys.h:81
float fitx() const
accessor method: x position of vertex
Definition TrigEFBphys.h:79
pType particleType() const
accessor method: particle Type
Definition TrigEFBphys.h:65
float mass() const
accessor method: mass
Definition TrigEFBphys.h:71
float fitz() const
accessor method: z position of vertex
Definition TrigEFBphys.h:83
int roiId() const
accessor method: ID of L1 RoI
Definition TrigEFBphys.h:63
float eta() const
accessor method: eta
Definition TrigEFBphys.h:67
const ElementLinkVector< Rec::TrackParticleContainer > & trackVector() const
accessor method:vector of tracks used to make particle
Definition TrigEFBphys.h:89
int fitndof() const
accessor method: ndof from vertex fit
Definition TrigEFBphys.h:77