ATLAS Offline Software
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 
21  ElementLink<TrigEFBphysContainer> secondaryDecay;
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 
68 }
TrigEFBphys::fity
float fity() const
accessor method: y position of vertex
Definition: TrigEFBphys.h:81
TrigEFBphys::phi
float phi() const
accessor method: phi
Definition: TrigEFBphys.h:69
TrigEFBphys::fitmass
float fitmass() const
accessor method: mass from vertex fit
Definition: TrigEFBphys.h:73
ElementLinkCnv_p3::persToTrans
void persToTrans(const PersLink_t &pers, Link_t &trans, MsgStream &log) const
TrigEFBphys_p3
Definition: TrigEFBphys_p3.h:26
TrigEFBphys
Definition: TrigEFBphys.h:42
TrigEFBphysCnv_p3::transToPers
virtual void transToPers(const TrigEFBphys *transObj, TrigEFBphys_p3 *persObj, MsgStream &log)
Definition: TrigEFBphysCnv_p3.cxx:46
TrigEFBphys_p3::m_secondaryDecay
ElementLinkInt_p3 m_secondaryDecay
Definition: TrigEFBphys_p3.h:51
ElementLinkVectorCnv_p1
Definition: ElementLinkVectorCnv_p1.h:28
TrigEFBphys::fitz
float fitz() const
accessor method: z position of vertex
Definition: TrigEFBphys.h:83
TrigEFBphys::eta
float eta() const
accessor method: eta
Definition: TrigEFBphys.h:67
TrigEFBphysCnv_p3::m_elementLinkEFBphysCnv
ElementLinkCnv_p3< ElementLink< TrigEFBphysContainer > > m_elementLinkEFBphysCnv
Definition: TrigEFBphysCnv_p3.h:44
ElementLinkVectorCnv_p1::persToTrans
void persToTrans(const PersLinkVect_t &pers, LinkVect_t &trans, MsgStream &log) const
TrigEFBphys::fitchi2
float fitchi2() const
accessor method: chi2 from vertex fit
Definition: TrigEFBphys.h:75
TrigEFBphys_p3::m_allInts
int m_allInts[3]
Definition: TrigEFBphys_p3.h:48
ElementLinkCnv_p3::transToPers
void transToPers(const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
TrigEFBphys::addTrack
void addTrack(const ElementLink< Rec::TrackParticleContainer > &track)
set method: add track to particle
Definition: TrigEFBphys.cxx:56
TrigEFBphys::secondaryDecayLink
const ElementLink< TrigEFBphysContainer > & secondaryDecayLink() const
Definition: TrigEFBphys.cxx:175
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
TrigEFBphys::trackVector
const ElementLinkVector< Rec::TrackParticleContainer > & trackVector() const
accessor method:vector of tracks used to make particle
Definition: TrigEFBphys.h:89
TrigEFBphys_p3::m_allFloats
float m_allFloats[8]
Definition: TrigEFBphys_p3.h:49
TrigEFBphys::mass
float mass() const
accessor method: mass
Definition: TrigEFBphys.h:71
TrigEFBphys::fitndof
int fitndof() const
accessor method: ndof from vertex fit
Definition: TrigEFBphys.h:77
TrigEFBphys_p3.h
ElementLinkVector< Rec::TrackParticleContainer >
TrigEFBphys::pType
pType
enum for different particle types
Definition: TrigEFBphys.h:47
TrigEFBphys.h
TrigEFBphys::roiId
int roiId() const
accessor method: ID of L1 RoI
Definition: TrigEFBphys.h:63
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
ElementLinkVectorCnv_p1::transToPers
void transToPers(const LinkVect_t &trans, PersLinkVect_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
TrigEFBphys_p3::m_trackVector
ElementLinkIntVector_p1 m_trackVector
Definition: TrigEFBphys_p3.h:52
TrigEFBphys::particleType
pType particleType() const
accessor method: particle Type
Definition: TrigEFBphys.h:65
TrigEFBphysCnv_p3::persToTrans
virtual void persToTrans(const TrigEFBphys_p3 *persObj, TrigEFBphys *transObj, MsgStream &log)
Definition: TrigEFBphysCnv_p3.cxx:15
TrigEFBphysCnv_p3.h
TrigEFBphys::fitx
float fitx() const
accessor method: x position of vertex
Definition: TrigEFBphys.h:79