ATLAS Offline Software
TrigPhotonCnv_p2.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 
9 static const ElementLinkCnv_p1< ElementLink<TrigEMClusterContainer> > eLinkEMClusterCnv;
10 
11 //-----------------------------------------------------------------------------
12 // Persistent to transient
13 //-----------------------------------------------------------------------------
15  TrigPhoton *transObj,
16  MsgStream &log )
17 {
18  log << MSG::DEBUG << "TrigPhotonCnv_p2::persToTrans called " << endmsg;
19 
21  eLinkEMClusterCnv.persToTrans( &persObj->m_cluster, &cluster, log );
22 
23  *transObj = TrigPhoton (0, 0, 0,
24  persObj->m_roiID,
25  persObj->m_valid,
26  cluster,
27  persObj->m_HadEt,
28  persObj->m_energyRatio,
29  persObj->m_rCore,
30  persObj->m_dEta,
31  persObj->m_dPhi,
32  persObj->m_Fside,
33  persObj->m_Weta2,
34  persObj->m_cl_e_frac_S0,
35  persObj->m_cl_e_frac_S1,
36  persObj->m_cl_e_frac_S2,
37  persObj->m_cl_e_frac_S3
38  );
39 
40  fillTransFromPStore( &m_p4PtEtaPhiMCnv, persObj->m_p4PtEtaPhiM, transObj, log );
41 }
42 
43 //-----------------------------------------------------------------------------
44 // Transient to persistent
45 //-----------------------------------------------------------------------------
47  TrigPhoton_p2 *persObj,
48  MsgStream &log )
49 {
50  log << MSG::DEBUG << "TrigPhotonCnv_p2::transToPers called " << endmsg;
51 
52  persObj->m_roiID = transObj->roiId() ;
53  persObj->m_HadEt = transObj->HadEt() ;
54  persObj->m_energyRatio = transObj->energyRatio() ;
55  persObj->m_rCore = transObj->rCore() ;
56  persObj->m_dPhi = transObj->dPhi() ;
57  persObj->m_dEta = transObj->dEta() ;
58  persObj->m_cl_e_frac_S0 = transObj->F0() ;
59  persObj->m_cl_e_frac_S1 = transObj->F1() ;
60  persObj->m_cl_e_frac_S2 = transObj->F2() ;
61  persObj->m_cl_e_frac_S3 = transObj->F3() ;
62  persObj->m_Fside = transObj->Fside() ;
63  persObj->m_Weta2 = transObj->Weta2() ;
64  persObj->m_valid = transObj->isValid() ;
65 
66  eLinkEMClusterCnv.transToPers( &transObj->clusterLink(), &persObj->m_cluster, log );
67 
68  persObj->m_p4PtEtaPhiM = baseToPersistent( &m_p4PtEtaPhiMCnv, transObj, log );
69 
70 }
TrigPhotonCnv_p2::persToTrans
virtual void persToTrans(const TrigPhoton_p2 *persObj, TrigPhoton *transObj, MsgStream &log)
Definition: TrigPhotonCnv_p2.cxx:14
TrigPhoton::Fside
float Fside() const
energy in a 7 strips (around hottest strip) minus energy in 3 strips divided by energy in 3 strips
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:116
TrigPhoton_p2.h
TrigPhoton.h
TrigPhoton_p2::m_dPhi
float m_dPhi
Definition: TrigPhoton_p2.h:68
TrigPhotonCnv_p2::m_p4PtEtaPhiMCnv
P4PtEtaPhiMCnv_p1 * m_p4PtEtaPhiMCnv
Definition: TrigPhotonCnv_p2.h:51
TrigPhoton_p2::m_p4PtEtaPhiM
TPObjRef m_p4PtEtaPhiM
Definition: TrigPhoton_p2.h:81
TrigPhoton::F0
float F0() const
accessors for calibrated energy and energy fraction in calo samples
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:129
TrigPhoton::roiId
int roiId() const
accessor to get RoI ID (should also introduce roiWord
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:96
TrigPhoton_p2::m_HadEt
float m_HadEt
Definition: TrigPhoton_p2.h:65
TrigPhoton_p2
Definition: TrigPhoton_p2.h:27
TrigPhoton_p2::m_dEta
float m_dEta
Definition: TrigPhoton_p2.h:69
ITPConverterFor::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
TrigPhoton::dPhi
float dPhi() const
accessor for difference between cluster and Roi phi
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:122
TrigPhoton::F1
float F1() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:130
TrigPhoton::F2
float F2() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:131
TrigPhoton_p2::m_cl_e_frac_S0
float m_cl_e_frac_S0
Definition: TrigPhoton_p2.h:70
xAOD::TrigPhoton
TrigPhoton_v1 TrigPhoton
Declare the latest version of TrigPhoton.
Definition: Event/xAOD/xAODTrigEgamma/xAODTrigEgamma/TrigPhoton.h:16
TrigPhoton_p2::m_valid
bool m_valid
Definition: TrigPhoton_p2.h:76
ElementLinkCnv_p1::transToPers
void transToPers(const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
TrigPhoton::dEta
float dEta() const
accessor for difference between cluster and Roi eta
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:125
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigPhoton_p2::m_cl_e_frac_S3
float m_cl_e_frac_S3
Definition: TrigPhoton_p2.h:73
TrigPhotonCnv_p2::transToPers
virtual void transToPers(const TrigPhoton *transObj, TrigPhoton_p2 *persObj, MsgStream &log)
Definition: TrigPhotonCnv_p2.cxx:46
TrigPhoton::HadEt
float HadEt() const
accessor for hadronic energy in 1st hadronic sampling behind cluster
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:103
TrigPhoton_p2::m_rCore
float m_rCore
Definition: TrigPhoton_p2.h:67
TrigPhoton_p2::m_cl_e_frac_S2
float m_cl_e_frac_S2
Definition: TrigPhoton_p2.h:72
ElementLinkCnv_p1
Definition: ElementLinkCnv_p1.h:27
TrigPhoton_p2::m_cluster
ElementLinkInt_p1 m_cluster
Definition: TrigPhoton_p2.h:79
ITPConverterFor::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
TrigPhoton::F3
float F3() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:132
TrigPhoton_p2::m_cl_e_frac_S1
float m_cl_e_frac_S1
Definition: TrigPhoton_p2.h:71
ElementLinkCnv_p1::persToTrans
void persToTrans(const PersLink_t &pers, Link_t &trans, MsgStream &log) const
TrigPhoton_p2::m_Weta2
float m_Weta2
Definition: TrigPhoton_p2.h:75
TrigPhoton_p2::m_roiID
int m_roiID
Definition: TrigPhoton_p2.h:64
TrigPhoton::clusterLink
const ElementLink< TrigEMClusterContainer > & clusterLink() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:138
TrigPhoton::isValid
bool isValid() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:93
TrigPhoton::energyRatio
float energyRatio() const
accessor for fraction difference of EM cluster emaxs1 and e2tsts1
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:107
TrigPhoton::rCore
float rCore() const
cluster energy in 3x7 cells / energy in 7x7 cells in 2nd sampling
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:111
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigPhoton::Weta2
float Weta2() const
cluster width (based on a 3x5 cluster - 2nd layer)
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:119
TrigPhoton
File: TrigPhoton.h.
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigPhoton.h:44
TrigPhoton_p2::m_energyRatio
float m_energyRatio
Definition: TrigPhoton_p2.h:66
TrigPhoton_p2::m_Fside
float m_Fside
Definition: TrigPhoton_p2.h:74
TrigPhotonCnv_p2.h