ATLAS Offline Software
TrigTauTracksInfoCnv_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 
8 
9 //-----------------------------------------------------------------------------
10 // Persistent to transient
11 //-----------------------------------------------------------------------------
13  TrigTauTracksInfo *transObj,
14  MsgStream &log )
15 {
16  log << MSG::DEBUG << "TrigTauTracksInfoCnv_p2::persToTrans called " << endmsg;
17 
18  transObj->setRoiId (persObj->m_allTheInts[0]) ;
19  transObj->setNCoreTracks (persObj->m_allTheInts[1]) ;
20  transObj->setNSlowTracks (persObj->m_allTheInts[2]) ;
21  transObj->setNIsoTracks (persObj->m_allTheInts[3]) ;
22 
23  transObj->setCharge (persObj->m_allTheFloats[0]) ;
24  transObj->setLeadingTrackPt (persObj->m_allTheFloats[1]) ;
25  transObj->setScalarPtSumCore (persObj->m_allTheFloats[2]) ;
26  transObj->setScalarPtSumIso (persObj->m_allTheFloats[3]) ;
27  transObj->setPtBalance (persObj->m_allTheFloats[4]) ;
28 
29  m_P4PtEtaPhiMCnv.persToTrans(&(persObj->m_P4PtEtaPhiM), transObj, log);
30  P4PtEtaPhiM fastest3;
31  m_3fastestP4PtEtaPhiMCnv.persToTrans(&(persObj->m_3fastest), &fastest3, log);
32  transObj->set3fastestPtEtaPhiM (fastest3.pt(), fastest3.eta(),
33  fastest3.phi(), fastest3.m());
34 }
35 
36 //-----------------------------------------------------------------------------
37 // Transient to persistent
38 //-----------------------------------------------------------------------------
40  TrigTauTracksInfo_p2 *persObj,
41  MsgStream &log )
42 {
43  log << MSG::DEBUG << "TrigTauTracksInfoCnv_p2::transToPers called " << endmsg;
44 
45  persObj->m_allTheInts[0] = transObj->roiId() ;
46  persObj->m_allTheInts[1] = transObj->nCoreTracks() ;
47  persObj->m_allTheInts[2] = transObj->nSlowTracks() ;
48  persObj->m_allTheInts[3] = transObj->nIsoTracks() ;
49 
50  persObj->m_allTheFloats[0] = transObj->charge() ;
51  persObj->m_allTheFloats[1] = transObj->leadingTrackPt() ;
52  persObj->m_allTheFloats[2] = transObj->scalarPtSumCore();
53  persObj->m_allTheFloats[3] = transObj->scalarPtSumIso() ;
54  persObj->m_allTheFloats[4] = transObj->ptBalance() ;
55 
56  m_P4PtEtaPhiMCnv.transToPers(transObj, &(persObj->m_P4PtEtaPhiM), log);
58  &(persObj->m_3fastest), log);
59 
60 }
TrigTauTracksInfo::threeFastestTracks
const P4PtEtaPhiM & threeFastestTracks() const
Definition: TrigTauTracksInfo.h:50
TrigTauTracksInfo::roiId
int roiId() const
getters
Definition: TrigTauTracksInfo.h:37
TrigTauTracksInfo::setLeadingTrackPt
void setLeadingTrackPt(float pt)
Definition: TrigTauTracksInfo.h:61
TrigTauTracksInfo::nCoreTracks
int nCoreTracks() const
Definition: TrigTauTracksInfo.h:39
TrigTauTracksInfo::setNIsoTracks
void setNIsoTracks(int nIsoTrk)
Definition: TrigTauTracksInfo.h:58
TrigTauTracksInfoCnv_p2::m_3fastestP4PtEtaPhiMCnv
P4PtEtaPhiMCnv_p1 m_3fastestP4PtEtaPhiMCnv
Definition: TrigTauTracksInfoCnv_p2.h:43
TrigTauTracksInfo::leadingTrackPt
float leadingTrackPt() const
Definition: TrigTauTracksInfo.h:44
TrigTauTracksInfo
Definition: TrigTauTracksInfo.h:28
TrigTauTracksInfoCnv_p2::m_P4PtEtaPhiMCnv
P4PtEtaPhiMCnv_p1 m_P4PtEtaPhiMCnv
Definition: TrigTauTracksInfoCnv_p2.h:44
P4PtEtaPhiM::phi
virtual double phi() const
get phi data member
Definition: P4PtEtaPhiM.h:109
TrigTauTracksInfo::setPtBalance
void setPtBalance(float ptBal)
Definition: TrigTauTracksInfo.h:64
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigTauTracksInfoCnv_p2::transToPers
virtual void transToPers(const TrigTauTracksInfo *transObj, TrigTauTracksInfo_p2 *persObj, MsgStream &log)
Definition: TrigTauTracksInfoCnv_p2.cxx:39
TrigTauTracksInfo::setNSlowTracks
void setNSlowTracks(int nSlowTrk)
Definition: TrigTauTracksInfo.h:57
TrigTauTracksInfo::setScalarPtSumCore
void setScalarPtSumCore(float sumPtCore)
Definition: TrigTauTracksInfo.h:62
P4PtEtaPhiM::m
virtual double m() const
get mass data member
Definition: P4PtEtaPhiM.h:112
TrigTauTracksInfo_p2::m_3fastest
P4PtEtaPhiM_p1 m_3fastest
Definition: TrigTauTracksInfo_p2.h:62
TrigTauTracksInfo::charge
float charge() const
Definition: TrigTauTracksInfo.h:43
P4PtEtaPhiM::pt
virtual double pt() const
get pt data member
Definition: P4PtEtaPhiM.h:103
TrigTauTracksInfoCnv_p2.h
TrigTauTracksInfo.h
TrigTauTracksInfo_p2.h
TrigTauTracksInfoCnv_p2::persToTrans
virtual void persToTrans(const TrigTauTracksInfo_p2 *persObj, TrigTauTracksInfo *transObj, MsgStream &log)
Definition: TrigTauTracksInfoCnv_p2.cxx:12
TrigTauTracksInfo::setCharge
void setCharge(float charge)
Definition: TrigTauTracksInfo.h:60
TrigTauTracksInfo_p2::m_allTheFloats
float m_allTheFloats[5]
Definition: TrigTauTracksInfo_p2.h:52
P4PtEtaPhiM::eta
virtual double eta() const
get eta data member
Definition: P4PtEtaPhiM.h:106
P4PtEtaPhiMCnv_p1::persToTrans
virtual void persToTrans(const P4PtEtaPhiM_p1 *persObj, P4PtEtaPhiM *transObj, MsgStream &log) const override
Method creating the transient representation of P4PtEtaPhiM from its persistent representation P4PtEt...
Definition: P4PtEtaPhiMCnv_p1.cxx:26
TrigTauTracksInfo_p2::m_P4PtEtaPhiM
P4PtEtaPhiM_p1 m_P4PtEtaPhiM
Definition: TrigTauTracksInfo_p2.h:63
P4PtEtaPhiMCnv_p1::transToPers
virtual void transToPers(const P4PtEtaPhiM *transObj, P4PtEtaPhiM_p1 *persObj, MsgStream &log) const override
Method creating the persistent representation P4PtEtaPhiM_p1 from its transient representation P4PtEt...
Definition: P4PtEtaPhiMCnv_p1.cxx:38
TrigTauTracksInfo::setRoiId
void setRoiId(int id)
setters
Definition: TrigTauTracksInfo.h:55
TrigTauTracksInfo::nIsoTracks
int nIsoTracks() const
Definition: TrigTauTracksInfo.h:41
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigTauTracksInfo::ptBalance
float ptBalance() const
Definition: TrigTauTracksInfo.h:48
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigTauTracksInfo::nSlowTracks
int nSlowTracks() const
Definition: TrigTauTracksInfo.h:40
TrigTauTracksInfo::setScalarPtSumIso
void setScalarPtSumIso(float sumPtIso)
Definition: TrigTauTracksInfo.h:63
TrigTauTracksInfo::scalarPtSumCore
float scalarPtSumCore() const
Definition: TrigTauTracksInfo.h:46
P4PtEtaPhiM
Definition: P4PtEtaPhiM.h:25
TrigTauTracksInfo::setNCoreTracks
void setNCoreTracks(int nCoreTrk)
Definition: TrigTauTracksInfo.h:56
TrigTauTracksInfo_p2::m_allTheInts
int m_allTheInts[4]
Definition: TrigTauTracksInfo_p2.h:44
TrigTauTracksInfo::scalarPtSumIso
float scalarPtSumIso() const
Definition: TrigTauTracksInfo.h:47
TrigTauTracksInfo_p2
Definition: TrigTauTracksInfo_p2.h:24
TrigTauTracksInfo::set3fastestPtEtaPhiM
void set3fastestPtEtaPhiM(float pt, float eta, float phi, float m)
Definition: TrigInDetEvent/src/TrigTauTracksInfo.cxx:43