ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagInfoTPCnv
src
MSVVtxInfoCnv_p2.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
7
#include "
JetTagInfo/SVTrackInfo.h
"
8
#include "
JetTagInfo/MSVVtxInfo.h
"
9
#include "
JetTagInfoTPCnv/MSVVtxInfoCnv_p2.h
"
10
11
#include "GaudiKernel/MsgStream.h"
12
13
#include <algorithm>
14
using
std::transform;
15
using
std::back_inserter;
16
17
namespace
Analysis
{
18
19
23
void
MSVVtxInfoCnv_p2::transToPers
(
const
MSVVtxInfo
*transObj,
24
MSVVtxInfo_p2
*persObj,
25
MsgStream &
msg
)
26
{
27
28
persObj->
m_masssvx
= transObj->
getMass
();
29
persObj->
m_ptsvx
= transObj->
getPt
();
30
persObj->
m_etasvx
= transObj->
getEta
();
31
persObj->
m_phisvx
= transObj->
getPhi
();
32
persObj->
m_efracsvx
= transObj->
getEnergyFraction
();
33
persObj->
m_normdist
= transObj->
getNormDist
();
34
35
persObj->
m_recsvx
=
toPersistent
(&
m_recoVertexCnv
,
36
&transObj->
getRecSvx
(),
37
msg
);
38
45
46
ElementLinkVector<Rec::TrackParticleContainer>
movedVector;
47
size_t
sz
= transObj->
numTrackInfo
();
48
for
(
size_t
i = 0; i <
sz
; i++)
49
movedVector.
push_back
(transObj->
getTrackInfo
(i).
trackLink
());
50
51
m_trackVecCnv
.transToPers (&movedVector, &persObj->
m_trackinfo
,
msg
);
52
}
53
57
void
MSVVtxInfoCnv_p2::persToTrans
(
const
MSVVtxInfo_p2
*persObj,
58
MSVVtxInfo
*transObj,
59
MsgStream &
msg
)
60
{
61
// Clear contained vector.
62
*transObj =
MSVVtxInfo
();
63
64
transObj->
setMass
(persObj->
m_masssvx
);
65
transObj->
setPt
(persObj->
m_ptsvx
);
66
transObj->
setEta
(persObj->
m_etasvx
);
67
transObj->
setPhi
(persObj->
m_phisvx
);
68
transObj->
setEnergyFraction
(persObj->
m_efracsvx
);
69
transObj->
setNormDist
(persObj->
m_normdist
);
70
71
Trk::RecVertex
svx;
72
fillTransFromPStore
(&
m_recoVertexCnv
,
73
persObj->
m_recsvx
,
74
&svx,
75
msg
);
76
transObj->
setRecSvx
(std::move (svx));
77
85
86
ElementLinkVector<Rec::TrackParticleContainer>
movedVector;
87
m_trackVecCnv
.persToTrans(&persObj->
m_trackinfo
, &movedVector,
msg
);
88
size_t
sz
= movedVector.
size
();
89
for
(
size_t
i = 0; i <
sz
; i++)
90
transObj->
addTrackInfo
(
SVTrackInfo
(movedVector[i]));
91
}
92
93
}
sz
static Double_t sz
Definition
LArPhysWaveHECTool.cxx:37
MSVVtxInfoCnv_p2.h
MSVVtxInfo.h
SVTrackInfo.h
Analysis::MSVVtxInfoCnv_p2::m_recoVertexCnv
ITPConverterFor< Trk::Vertex > * m_recoVertexCnv
Definition
MSVVtxInfoCnv_p2.h:36
Analysis::MSVVtxInfoCnv_p2::m_trackVecCnv
ElementLinkVectorCnv_p1< ElementLinkVector< Rec::TrackParticleContainer > > m_trackVecCnv
Definition
MSVVtxInfoCnv_p2.h:37
Analysis::MSVVtxInfoCnv_p2::transToPers
virtual void transToPers(const MSVVtxInfo *transObj, MSVVtxInfo_p2 *persObj, MsgStream &log)
Given a transient rep, save it to a persistent one.
Definition
MSVVtxInfoCnv_p2.cxx:23
Analysis::MSVVtxInfoCnv_p2::persToTrans
virtual void persToTrans(const MSVVtxInfo_p2 *persObj, MSVVtxInfo *transObj, MsgStream &log)
Load from disk format to in-memory format.
Definition
MSVVtxInfoCnv_p2.cxx:57
Analysis::MSVVtxInfo_p2
Definition
MSVVtxInfo_p2.h:17
Analysis::MSVVtxInfo_p2::m_ptsvx
float m_ptsvx
Definition
MSVVtxInfo_p2.h:27
Analysis::MSVVtxInfo_p2::m_phisvx
float m_phisvx
Definition
MSVVtxInfo_p2.h:29
Analysis::MSVVtxInfo_p2::m_efracsvx
float m_efracsvx
Definition
MSVVtxInfo_p2.h:30
Analysis::MSVVtxInfo_p2::m_recsvx
TPObjRef m_recsvx
All of this data will be written out.
Definition
MSVVtxInfo_p2.h:24
Analysis::MSVVtxInfo_p2::m_trackinfo
ElementLinkIntVector_p1 m_trackinfo
Definition
MSVVtxInfo_p2.h:34
Analysis::MSVVtxInfo_p2::m_etasvx
float m_etasvx
Definition
MSVVtxInfo_p2.h:28
Analysis::MSVVtxInfo_p2::m_masssvx
float m_masssvx
Definition
MSVVtxInfo_p2.h:26
Analysis::MSVVtxInfo_p2::m_normdist
float m_normdist
Definition
MSVVtxInfo_p2.h:31
Analysis::MSVVtxInfo
Definition
MSVVtxInfo.h:17
Analysis::MSVVtxInfo::setEta
void setEta(float)
Definition
MSVVtxInfo.h:57
Analysis::MSVVtxInfo::addTrackInfo
void addTrackInfo(const SVTrackInfo &i)
Definition
MSVVtxInfo.h:61
Analysis::MSVVtxInfo::getNormDist
float getNormDist() const
Definition
MSVVtxInfo.h:69
Analysis::MSVVtxInfo::setMass
void setMass(float)
Definition
MSVVtxInfo.h:55
Analysis::MSVVtxInfo::setRecSvx
void setRecSvx(const Trk::RecVertex &)
Set methods.
Definition
MSVVtxInfo.h:54
Analysis::MSVVtxInfo::getRecSvx
const Trk::RecVertex & getRecSvx() const
Get methods.
Definition
MSVVtxInfo.h:63
Analysis::MSVVtxInfo::setPt
void setPt(float)
Definition
MSVVtxInfo.h:56
Analysis::MSVVtxInfo::getEnergyFraction
float getEnergyFraction() const
Definition
MSVVtxInfo.h:68
Analysis::MSVVtxInfo::getEta
float getEta() const
Definition
MSVVtxInfo.h:66
Analysis::MSVVtxInfo::getTrackInfo
const SVTrackInfo & getTrackInfo(unsigned int i) const
Definition
MSVVtxInfo.h:71
Analysis::MSVVtxInfo::numTrackInfo
int numTrackInfo() const
Definition
MSVVtxInfo.h:70
Analysis::MSVVtxInfo::getMass
float getMass() const
Definition
MSVVtxInfo.h:64
Analysis::MSVVtxInfo::getPt
float getPt() const
Definition
MSVVtxInfo.h:65
Analysis::MSVVtxInfo::setEnergyFraction
void setEnergyFraction(float)
Definition
MSVVtxInfo.h:59
Analysis::MSVVtxInfo::setNormDist
void setNormDist(float)
Definition
MSVVtxInfo.h:60
Analysis::MSVVtxInfo::setPhi
void setPhi(float)
Definition
MSVVtxInfo.h:58
Analysis::MSVVtxInfo::getPhi
float getPhi() const
Definition
MSVVtxInfo.h:67
Analysis::SVTrackInfo
Definition
SVTrackInfo.h:17
Analysis::SVTrackInfo::trackLink
const ElementLink< Rec::TrackParticleContainer > & trackLink() const
Definition
SVTrackInfo.h:52
ElementLinkVector
ElementLinkVector implementation for standalone ROOT.
Definition
AthLinks/ElementLinkVector.h:64
ElementLinkVector::push_back
void push_back(const ElemLink &link)
Definition
AthLinks/ElementLinkVector.h:317
ElementLinkVector::size
size_type size() const
Definition
AthLinks/ElementLinkVector.h:293
TPPolyCnvBase< TRANS, TRANS, PERS >::fillTransFromPStore
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Definition
TPConverter.h:145
TPPolyCnvBase< TRANS, TRANS, PERS >::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Definition
TPConverter.h:119
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition
RecVertex.h:44
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
IConstituent.h:25
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0