ATLAS Offline Software
TrigL2BphysCnv_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 
10 
11 //-----------------------------------------------------------------------------
12 // Persistent to transient
13 //-----------------------------------------------------------------------------
15  TrigL2Bphys *transObj,
16  MsgStream &log )
17 {
18  log << MSG::DEBUG << "TrigL2BphysCnv_p3::persToTrans called " << endmsg;
19 
20 
21  ElementLink<TrigL2BphysContainer> secondaryDecay;
22  m_elementLinkL2BphysCnv.persToTrans(&persObj->m_secondaryDecay, &secondaryDecay, log);
23 
24  *transObj = TrigL2Bphys (persObj->m_allInts[0], // roiID
25  persObj->m_allFloats[0], // eta
26  persObj->m_allFloats[1], // phi
27  static_cast<TrigL2Bphys::pType>(persObj->m_allInts[1]), // particleType
28  persObj->m_allFloats[2], // mass
29  secondaryDecay);
30 
31  transObj->fitndof (persObj->m_allInts[2]);
32  transObj->fitmass (persObj->m_allFloats[3]);
33  transObj->fitchi2 (persObj->m_allFloats[4]);
34  transObj->fitx (persObj->m_allFloats[5]);
35  transObj->fity (persObj->m_allFloats[6]);
36  transObj->fitz (persObj->m_allFloats[7]);
37 
39  trackELVCnv.persToTrans(&persObj->m_trackVector, &trackVector, log);
40  for (const ElementLink<TrigInDetTrackCollection> el : trackVector)
41  transObj->addTrack (el);
42 }
43 
44 //-----------------------------------------------------------------------------
45 // Transient to persistent
46 //-----------------------------------------------------------------------------
48  TrigL2Bphys_p3 *persObj,
49  MsgStream &log )
50 {
51  log << MSG::DEBUG << "TrigL2BphysCnv_p3::transToPers called " << endmsg;
52 
53  persObj->m_allInts[0] = transObj->roiId() ;
54  persObj->m_allInts[1] = transObj->particleType();
55  persObj->m_allInts[2] = transObj->fitndof() ;
56 
57  persObj->m_allFloats[0] = transObj->eta() ;
58  persObj->m_allFloats[1] = transObj->phi() ;
59  persObj->m_allFloats[2] = transObj->mass() ;
60  persObj->m_allFloats[3] = transObj->fitmass() ;
61  persObj->m_allFloats[4] = transObj->fitchi2() ;
62  persObj->m_allFloats[5] = transObj->fitx() ;
63  persObj->m_allFloats[6] = transObj->fity() ;
64  persObj->m_allFloats[7] = transObj->fitz() ;
65 
66  trackELVCnv.transToPers(&transObj->trackVector(), &persObj->m_trackVector, log);
67 
69 }
TrigL2Bphys::fitndof
int fitndof() const
accessor method: ndof from vertex fit
Definition: TrigL2Bphys.h:80
TrigL2Bphys_p3.h
ElementLinkCnv_p3::persToTrans
void persToTrans(const PersLink_t &pers, Link_t &trans, MsgStream &log) const
TrigL2Bphys_p3::m_trackVector
ElementLinkIntVector_p1 m_trackVector
Definition: TrigL2Bphys_p3.h:50
TrigL2Bphys::roiId
int roiId() const
accessor method: ID of L1 RoI
Definition: TrigL2Bphys.h:66
TrigL2Bphys_p3
Definition: TrigL2Bphys_p3.h:25
TrigL2Bphys::addTrack
void addTrack(const ElementLink< TrigInDetTrackCollection > &track)
set method: add track to particle
Definition: TrigL2Bphys.cxx:58
TrigL2Bphys::eta
float eta() const
accessor method: eta
Definition: TrigL2Bphys.h:70
ElementLinkVectorCnv_p1
Definition: ElementLinkVectorCnv_p1.h:28
TrigL2Bphys::fitchi2
float fitchi2() const
accessor method: chi2 from vertex fit
Definition: TrigL2Bphys.h:78
TrigL2Bphys::particleType
pType particleType() const
accessor method: particle Type
Definition: TrigL2Bphys.h:68
TrigL2Bphys
Definition: TrigL2Bphys.h:43
TrigL2BphysCnv_p3.h
ElementLinkCnv_p3::transToPers
void transToPers(const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
TrigL2Bphys::fitz
float fitz() const
accessor method: z position of vertex
Definition: TrigL2Bphys.h:86
TrigL2Bphys_p3::m_allFloats
float m_allFloats[8]
Definition: TrigL2Bphys_p3.h:47
TrigL2BphysCnv_p3::persToTrans
virtual void persToTrans(const TrigL2Bphys_p3 *persObj, TrigL2Bphys *transObj, MsgStream &log)
Definition: TrigL2BphysCnv_p3.cxx:14
TrigL2Bphys_p3::m_secondaryDecay
ElementLinkInt_p3 m_secondaryDecay
Definition: TrigL2Bphys_p3.h:51
TrigL2Bphys::fity
float fity() const
accessor method: y position of vertex
Definition: TrigL2Bphys.h:84
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
TrigL2BphysCnv_p3::m_elementLinkL2BphysCnv
ElementLinkCnv_p3< ElementLink< TrigL2BphysContainer > > m_elementLinkL2BphysCnv
Definition: TrigL2BphysCnv_p3.h:48
TrigL2Bphys::fitx
float fitx() const
accessor method: x position of vertex
Definition: TrigL2Bphys.h:82
ElementLinkVector< TrigInDetTrackCollection >
TrigL2Bphys::secondaryDecayLink
const ElementLink< TrigL2BphysContainer > & secondaryDecayLink() const
Definition: TrigL2Bphys.cxx:68
TrigL2Bphys::pType
pType
enum for different particle types
Definition: TrigL2Bphys.h:47
TrigL2Bphys::mass
float mass() const
accessor method: mass
Definition: TrigL2Bphys.h:74
TrigL2Bphys.h
TrigL2Bphys::trackVector
const ElementLinkVector< TrigInDetTrackCollection > & trackVector() const
accessor method:vector of tracks used to make particle
Definition: TrigL2Bphys.h:93
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigL2Bphys::fitmass
float fitmass() const
accessor method: mass from vertex fit
Definition: TrigL2Bphys.h:76
TrigL2BphysCnv_p3::transToPers
virtual void transToPers(const TrigL2Bphys *transObj, TrigL2Bphys_p3 *persObj, MsgStream &log)
Definition: TrigL2BphysCnv_p3.cxx:47
TrigL2Bphys_p3::m_allInts
int m_allInts[3]
Definition: TrigL2Bphys_p3.h:48
TrigL2Bphys::phi
float phi() const
accessor method: phi
Definition: TrigL2Bphys.h:72