ATLAS Offline Software
Loading...
Searching...
No Matches
TruthInfoCnv_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
12
13#include "GaudiKernel/MsgStream.h"
14
15namespace Analysis {
16
18 TruthInfo_p1 *persObj,
19 MsgStream &msg)
20 {
23 transObj,
24 msg);
25
26 static const std::string s_B("B");
27 static const std::string s_C("C");
28 static const std::string s_T("T");
29
31 persObj->m_jetTruthLabel = transObj->jetTruthLabel();
32 persObj->m_distanceToBQuark = transObj->deltaRMinTo(s_B);
33 persObj->m_distanceToCQuark = transObj->deltaRMinTo(s_C);
34 persObj->m_distanceToTLepton = transObj->deltaRMinTo(s_T);
35 persObj->m_BHadronDecayVertex = transObj->BDecayVertex();
36 persObj->m_BHadronPdg = transObj->BHadronPdg();
37 }
38
40 TruthInfo *transObj,
41 MsgStream &msg)
42 {
44 fillTransFromPStore (&m_baseTagCnv, persObj->m_BaseTagInfo, transObj, msg);
45
46 static const std::string s_B("B");
47 static const std::string s_C("C");
48 static const std::string s_T("T");
49
51 transObj->setJetTruthLabel (persObj->m_jetTruthLabel);
52 transObj->deltaRMinTo (s_B, persObj->m_distanceToBQuark);
53 transObj->deltaRMinTo (s_C, persObj->m_distanceToCQuark);
54 transObj->deltaRMinTo (s_T, persObj->m_distanceToTLepton);
55 transObj->BDecayVertex (persObj->m_BHadronDecayVertex);
56 transObj->BHadronPdg (persObj->m_BHadronPdg);
57 }
58
59}
virtual void transToPers(const TruthInfo *transObj, TruthInfo_p1 *persObj, MsgStream &log)
BaseTagInfoCnv_p1 * m_baseTagCnv
virtual void persToTrans(const TruthInfo_p1 *persObj, TruthInfo *transObj, MsgStream &log)
std::string m_jetTruthLabel
All of this data will be written out.
TPObjRef m_BaseTagInfo
Basic info.
Eigen::Vector3d m_BHadronDecayVertex
Class TruthInfo: Class to store more truth information about a JetTag (e.g.
Definition TruthInfo.h:19
void setJetTruthLabel(const std::string &jetTruthLabel)
set the truth label The string with which to set the truth label is stored in the JetTruthMatch algto...
Definition TruthInfo.h:84
void deltaRMinTo(const std::string &key, double dR)
min deltaR to quarks:
Definition TruthInfo.cxx:63
const std::string & jetTruthLabel() const
return the truth label
Definition TruthInfo.h:79
void BDecayVertex(const Eigen::Vector3d &)
Definition TruthInfo.h:69
void BHadronPdg(const int)
Definition TruthInfo.h:71
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Definition TPConverter.h:97
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
The namespace of all packages in PhysicsAnalysis/JetTagging.
MsgStream & msg
Definition testRead.cxx:32