ATLAS Offline Software
SVInfoPlusCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
10 #include "JetTagInfo/SVTrackInfo.h"
13 
14 #include "GaudiKernel/MsgStream.h"
15 
16 #include <algorithm>
17 using std::transform;
18 using std::back_inserter;
19 
20 namespace Analysis {
21 
22 
27  SVInfoPlus_p1 *persObj,
28  MsgStream &msg)
29  {
32  transObj,
33  msg);
34 
36  persObj->m_NGTinJet = transObj->getNGTrackInJet();
37  persObj->m_NGTinSvx = transObj->getNGTrackInSvx();
38  persObj->m_N2Tpair = transObj->getN2T();
39  persObj->m_masssvx = transObj->getMass();
40  persObj->m_efracsvx = transObj->getEnergyFraction();
41  persObj->m_normdist = transObj->getNormDist();
42 
44  &transObj->getRecSvx(),
45  msg);
46 
53 
55  size_t sz = transObj->numTrackInfo();
56  for (size_t i = 0; i < sz; i++)
57  movedVector.push_back (transObj->getTrackInfo(i).trackLink());
58 
59  m_trackVecCnv.transToPers (&movedVector, &persObj->m_trackinfo, msg);
60  }
61 
66  SVInfoPlus *transObj,
67  MsgStream &msg)
68  {
69  // Clear contained vector.
70  *transObj = SVInfoPlus();
71 
73  fillTransFromPStore (&m_baseTagCnv, persObj->m_BaseTagInfo, transObj, msg);
74 
76  transObj->setNGTrackInJet (persObj->m_NGTinJet);
77  transObj->setNGTrackInSvx (persObj->m_NGTinSvx);
78  transObj->setN2T (persObj->m_N2Tpair);
79  transObj->setMass (persObj->m_masssvx);
80  transObj->setEnergyFraction (persObj->m_efracsvx);
81  transObj->setNormDist (persObj->m_normdist);
82 
83  Trk::RecVertex svx;
85  persObj->m_recsvx,
86  &svx,
87  msg);
88  transObj->setRecSvx (std::move (svx));
89 
97 
99  m_trackVecCnv.persToTrans(&persObj->m_trackinfo, &movedVector, msg);
100  size_t sz = movedVector.size();
101  for (size_t i = 0; i < sz; i++)
102  transObj->addTrackInfo (SVTrackInfo (movedVector[i]));
103  }
104 
105 }
fitman.sz
sz
Definition: fitman.py:527
Analysis::SVInfoPlus::setMass
void setMass(float)
Definition: SVInfoPlus.h:72
Analysis::SVInfoPlusCnv_p1::m_baseTagCnv
BaseTagInfoCnv_p1 * m_baseTagCnv
Definition: SVInfoPlusCnv_p1.h:39
Analysis::SVInfoPlus::addTrackInfo
void addTrackInfo(const SVTrackInfo &i)
Definition: SVInfoPlus.h:75
Analysis::SVTrackInfo
Definition: SVTrackInfo.h:17
Analysis::SVInfoPlus_p1::m_N2Tpair
long int m_N2Tpair
Definition: SVInfoPlus_p1.h:33
Analysis::SVInfoPlus::getNGTrackInSvx
long int getNGTrackInSvx() const
Definition: SVInfoPlus.h:79
BaseTagInfoCnv_p1.h
ElementLinkVector< Rec::TrackParticleContainer >
ElementLinkVectorCnv_p1::persToTrans
void persToTrans(const PersLinkVect_t &pers, LinkVect_t &trans, MsgStream &log) const
Analysis::SVInfoPlus::setRecSvx
void setRecSvx(const Trk::RecVertex &)
Set methods.
Definition: SVInfoPlus.h:68
ITPConverterFor< TRANS_BASE >::fillTransFromPStore
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Convert persistent object, stored in the the top-level persistent object and referenced by the TP Ref...
Definition: TPConverter.h:145
Trk::RecVertex
Trk::RecVertex inherits from Trk::Vertex.
Definition: RecVertex.h:44
Analysis::SVInfoPlus_p1::m_NGTinSvx
long int m_NGTinSvx
Definition: SVInfoPlus_p1.h:32
Analysis::SVInfoPlus::setEnergyFraction
void setEnergyFraction(float)
Definition: SVInfoPlus.h:73
Analysis::SVInfoPlus_p1::m_masssvx
float m_masssvx
Definition: SVInfoPlus_p1.h:34
Analysis::SVInfoPlus_p1::m_BaseTagInfo
TPObjRef m_BaseTagInfo
Basic info.
Definition: SVInfoPlus_p1.h:25
Analysis::SVInfoPlusCnv_p1::m_trackVecCnv
ElementLinkVectorCnv_p1< ElementLinkVector< Rec::TrackParticleContainer > > m_trackVecCnv
Definition: SVInfoPlusCnv_p1.h:41
lumiFormat.i
int i
Definition: lumiFormat.py:85
Analysis::SVInfoPlus::getNormDist
float getNormDist() const
Definition: SVInfoPlus.h:83
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
SVInfoPlus.h
Analysis::SVInfoPlus::numTrackInfo
int numTrackInfo() const
Definition: SVInfoPlus.h:84
SVInfoPlusCnv_p1.h
Analysis::SVInfoPlus_p1
Definition: SVInfoPlus_p1.h:20
Analysis::SVInfoPlus_p1::m_trackinfo
ElementLinkIntVector_p1 m_trackinfo
Definition: SVInfoPlus_p1.h:39
ElementLinkVector::push_back
void push_back(const ElemLink &link)
Definition: AthLinks/ElementLinkVector.h:318
Analysis::SVInfoPlus::setNGTrackInSvx
void setNGTrackInSvx(long int)
Definition: SVInfoPlus.h:70
ITPConverterFor< TRANS_BASE >::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Persistify an object and store the persistent represenation in the storage vector of the top-level pe...
Definition: TPConverter.h:119
ITPConverterFor< TRANS_BASE >::baseToPersistent
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Persistify bass class of a given object and store the persistent represenation in the storage vector ...
Definition: TPConverter.h:97
Analysis::SVTrackInfo::trackLink
const ElementLink< Rec::TrackParticleContainer > & trackLink() const
Definition: SVTrackInfo.h:52
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Analysis::SVInfoPlus_p1::m_recsvx
TPObjRef m_recsvx
All of this data will be written out.
Definition: SVInfoPlus_p1.h:29
Analysis::SVInfoPlus::getN2T
long int getN2T() const
Definition: SVInfoPlus.h:80
Analysis::SVInfoPlus::setNormDist
void setNormDist(float)
Definition: SVInfoPlus.h:74
Analysis::SVInfoPlus::getTrackInfo
const SVTrackInfo & getTrackInfo(uint i) const
Definition: SVInfoPlus.h:85
Analysis::SVInfoPlus::setNGTrackInJet
void setNGTrackInJet(long int)
Definition: SVInfoPlus.h:69
Analysis::SVInfoPlus::getNGTrackInJet
long int getNGTrackInJet() const
Definition: SVInfoPlus.h:78
Analysis::SVInfoPlus::setN2T
void setN2T(long int)
Definition: SVInfoPlus.h:71
Analysis::SVInfoPlusCnv_p1::m_recoVertexCnv
ITPConverterFor< Trk::Vertex > * m_recoVertexCnv
Definition: SVInfoPlusCnv_p1.h:40
Analysis::SVInfoPlus_p1::m_efracsvx
float m_efracsvx
Definition: SVInfoPlus_p1.h:35
Analysis::SVInfoPlus_p1::m_NGTinJet
long int m_NGTinJet
Definition: SVInfoPlus_p1.h:31
Analysis::SVInfoPlus
Definition: SVInfoPlus.h:17
Analysis::SVInfoPlus_p1::m_normdist
float m_normdist
Definition: SVInfoPlus_p1.h:36
ElementLinkVector::size
size_type size() const
Definition: AthLinks/ElementLinkVector.h:294
Analysis::SVInfoPlusCnv_p1::persToTrans
virtual void persToTrans(const SVInfoPlus_p1 *persObj, SVInfoPlus *transObj, MsgStream &log)
Load from disk format to in-memory format.
Definition: SVInfoPlusCnv_p1.cxx:65
ElementLinkVectorCnv_p1::transToPers
void transToPers(const LinkVect_t &trans, PersLinkVect_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
Analysis::SVInfoPlus::getRecSvx
const Trk::RecVertex & getRecSvx() const
Get methods.
Definition: SVInfoPlus.h:77
Analysis::SVInfoPlus::getEnergyFraction
float getEnergyFraction() const
Definition: SVInfoPlus.h:82
SVTrackInfo.h
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Analysis::SVInfoPlus::getMass
float getMass() const
Definition: SVInfoPlus.h:81
Analysis::SVInfoPlusCnv_p1::transToPers
virtual void transToPers(const SVInfoPlus *transObj, SVInfoPlus_p1 *persObj, MsgStream &log)
Given a transient rep, save it to a persistent one.
Definition: SVInfoPlusCnv_p1.cxx:26