ATLAS Offline Software
TrigElectronCnv_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 
10 static const ElementLinkCnv_p1<ElementLink<TrigInDetTrackCollection> > ELinkIDTrackCnv;
11 // static ElementLinkCnv_p1<ElementLink<TrigEMClusterContainer> > m_ELinkEMclusterCnv;
12 
13 //-----------------------------------------------------------------------------
14 // Persistent to transient
15 //-----------------------------------------------------------------------------
17  TrigElectron* transObj,
18  MsgStream &log)
19 {
20  log << MSG::DEBUG << "TrigElectronCnv_p2::persToTrans called " << endmsg;
21 
23  ELinkIDTrackCnv.persToTrans( &persObj->m_track, &track, log );
24 
26  m_ELinkEMclusterCnv.persToTrans( &persObj->m_cluster, &cluster, log );
27 
28  *transObj = TrigElectron (0, 0, 0,
29  persObj->m_roiWord,
30  persObj->m_valid,
31  persObj->m_tr_eta_at_calo, // trkEtaAtCalo
32  persObj->m_tr_phi_at_calo, // trkPhiAtCalo
33  persObj->m_etoverpt, // EToverPT,
34  cluster,
35  persObj->m_cl_eta, // caloEta
36  persObj->m_cl_phi, // caloPhi
37  persObj->m_cl_Rcore, // Rcore
38  persObj->m_cl_Eratio, // Eratio
39  persObj->m_cl_EThad, // EThad
40  persObj->m_cl_e_frac_S0, // F0
41  persObj->m_cl_e_frac_S1, // F1
42  persObj->m_cl_e_frac_S2, // F2
43  persObj->m_cl_e_frac_S3, // F3
44  track,
45  persObj->m_tr_Algo, // trackAlgo
46  persObj->m_tr_Zvtx,
47  persObj->m_tr_nr_trt_hits,
48  persObj->m_tr_nr_trt_hithresh_hits);
49 
50  log << MSG::DEBUG << "TrigElectronCnv_p2::persToTrans filling 4-mom. base class from persistent" << endmsg;
51  fillTransFromPStore( &m_p4PtEtaPhiMCnv, persObj->m_p4PtEtaPhiM, transObj, log );
52 
53  log << MSG::DEBUG << "TrigElectronCnv_p2::persToTrans done" << endmsg;
54 }
55 
56 
57 //-----------------------------------------------------------------------------
58 // Transient to persistent
59 //-----------------------------------------------------------------------------
61  TrigElectron_p2* persObj,
62  MsgStream &log)
63 {
64  log << MSG::DEBUG << "TrigElectronCnv_p2::transToPers called " << endmsg;
65 
66  persObj->m_roiWord = transObj->roiId() ;
67  persObj->m_valid = transObj->isValid() ;
68  persObj->m_tr_Algo = transObj->trackAlgo() ;
69  persObj->m_tr_Zvtx = transObj->Zvtx() ;
70  persObj->m_tr_nr_trt_hits = transObj->nTRTHits() ;
71  persObj->m_tr_nr_trt_hithresh_hits = transObj->nTRTHiThresholdHits() ;
72  persObj->m_tr_eta_at_calo = transObj->trkEtaAtCalo();
73  persObj->m_tr_phi_at_calo = transObj->trkPhiAtCalo();
74  persObj->m_etoverpt = transObj->EtOverPt() ;
75  persObj->m_cl_eta = transObj->caloEta();
76  persObj->m_cl_phi = transObj->caloPhi();
77  persObj->m_cl_Rcore = transObj->Rcore() ;
78  persObj->m_cl_Eratio = transObj->Eratio() ;
79  persObj->m_cl_EThad = transObj->EThad() ;
80  persObj->m_cl_e_frac_S0 = transObj->F0();
81  persObj->m_cl_e_frac_S1 = transObj->F1();
82  persObj->m_cl_e_frac_S2 = transObj->F2();
83  persObj->m_cl_e_frac_S3 = transObj->F3();
84 
85  log << MSG::DEBUG << "TrigElectronCnv_p2::transToPers calling e-link persToTrabs(track) " << endmsg;
86  ELinkIDTrackCnv.transToPers( &transObj->trackLink(), &persObj->m_track, log );
87  log << MSG::DEBUG << "TrigElectronCnv_p2::transToPers calling e-link persToTrabs(cluster) " << endmsg;
88  m_ELinkEMclusterCnv.transToPers( &transObj->clusterLink(), &persObj->m_cluster, log );
89 
90  log << MSG::DEBUG << "TrigElectronCnv_p2::transToPers persistifying 4-mom. base class" << endmsg;
91  persObj->m_p4PtEtaPhiM = baseToPersistent( &m_p4PtEtaPhiMCnv, transObj, log );
92 
93  log << MSG::DEBUG << "TrigElectronCnv_p1::transToPers done" << endmsg;
94 }
TrigElectron::EtOverPt
float EtOverPt() const
accessor to ratio of cluster Et to track Pt
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:159
TrigElectron::trackAlgo
TrigInDetTrack::AlgoId trackAlgo() const
accessors to return the tracking quantities
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:121
TrigElectronCnv_p2::persToTrans
virtual void persToTrans(const TrigElectron_p2 *persObj, TrigElectron *transObj, MsgStream &log)
Definition: TrigElectronCnv_p2.cxx:16
TrigElectron_p2::m_etoverpt
float m_etoverpt
Definition: TrigElectron_p2.h:78
TrigElectron::F3
float F3() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:176
TrigElectron::trkPhiAtCalo
float trkPhiAtCalo() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:147
TrigElectron_p2::m_tr_Zvtx
float m_tr_Zvtx
Definition: TrigElectron_p2.h:73
TrigElectron_p2::m_roiWord
unsigned int m_roiWord
Definition: TrigElectron_p2.h:70
TrigElectron.h
TrigElectron::Eratio
float Eratio() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:168
TrigElectron_p2::m_cl_e_frac_S3
float m_cl_e_frac_S3
Definition: TrigElectron_p2.h:87
TrigElectron::roiId
int roiId() const
accessor methods:
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:114
TrigElectronCnv_p2::transToPers
virtual void transToPers(const TrigElectron *transObj, TrigElectron_p2 *persObj, MsgStream &log)
Definition: TrigElectronCnv_p2.cxx:60
TrigElectron
File: TrigElectron.h.
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:63
TrigElectron::F1
float F1() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:174
TrigElectron_p2
Definition: TrigElectron_p2.h:28
TrigElectronCnv_p2::m_p4PtEtaPhiMCnv
P4PtEtaPhiMCnv_p1 * m_p4PtEtaPhiMCnv
Definition: TrigElectronCnv_p2.h:59
TrigElectron_p2::m_p4PtEtaPhiM
TPObjRef m_p4PtEtaPhiM
Definition: TrigElectron_p2.h:94
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
TrigElectronCnv_p2.h
TrigElectron_p2::m_tr_nr_trt_hits
int m_tr_nr_trt_hits
Definition: TrigElectron_p2.h:74
TrigElectron::caloEta
float caloEta() const
accessors to get cluster eta and phi (note baseclass eta and phi come from track)
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:162
TrigElectron_p2::m_tr_nr_trt_hithresh_hits
int m_tr_nr_trt_hithresh_hits
Definition: TrigElectron_p2.h:75
TrigElectron_p2::m_cl_e_frac_S0
float m_cl_e_frac_S0
Definition: TrigElectron_p2.h:84
TrigElectron::trkEtaAtCalo
float trkEtaAtCalo() const
accessor to get eta and phi of electron candidate track extrapolated the calorimeter
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:146
TrigElectron_p2::m_cluster
ElementLinkInt_p1 m_cluster
Definition: TrigElectron_p2.h:90
ElementLinkCnv_p1::transToPers
void transToPers(const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
TrigElectron::EThad
float EThad() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:169
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigElectron::nTRTHits
int nTRTHits() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:123
TrigElectron::caloPhi
float caloPhi() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:163
TrigElectron_p2.h
TrigElectron::F0
float F0() const
accessors for calibrated energy fractions in each sampling - to reject noise
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:173
TrigElectron::Zvtx
float Zvtx() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:122
TrigElectron::Rcore
float Rcore() const
accessors for shower shape quantities
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:166
ElementLinkCnv_p1
Definition: ElementLinkCnv_p1.h:27
TrigElectron::nTRTHiThresholdHits
int nTRTHiThresholdHits() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:124
TrigElectron_p2::m_cl_Eratio
float m_cl_Eratio
Definition: TrigElectron_p2.h:82
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
TrigElectron::isValid
bool isValid() const
accessor to get TrigElectron valid flag
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:118
TrigElectron::F2
float F2() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:175
ElementLinkCnv_p1::persToTrans
void persToTrans(const PersLink_t &pers, Link_t &trans, MsgStream &log) const
TrigElectron_p2::m_track
ElementLinkInt_p1 m_track
Definition: TrigElectron_p2.h:91
TrigElectron_p2::m_tr_eta_at_calo
float m_tr_eta_at_calo
Definition: TrigElectron_p2.h:76
TrigElectron_p2::m_cl_e_frac_S2
float m_cl_e_frac_S2
Definition: TrigElectron_p2.h:86
xAOD::TrigElectron
TrigElectron_v1 TrigElectron
Declare the latest version of the class.
Definition: Event/xAOD/xAODTrigEgamma/xAODTrigEgamma/TrigElectron.h:16
TrigElectron_p2::m_cl_e_frac_S1
float m_cl_e_frac_S1
Definition: TrigElectron_p2.h:85
TrigElectron_p2::m_cl_phi
float m_cl_phi
Definition: TrigElectron_p2.h:80
TrigElectron_p2::m_valid
bool m_valid
Definition: TrigElectron_p2.h:71
TrigElectronCnv_p2::m_ELinkEMclusterCnv
ElementLinkCnv_p1< ElementLink< TrigEMClusterContainer > > m_ELinkEMclusterCnv
Definition: TrigElectronCnv_p2.h:55
DEBUG
#define DEBUG
Definition: page_access.h:11
TrigElectron_p2::m_cl_eta
float m_cl_eta
Definition: TrigElectron_p2.h:79
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigElectron::trackLink
const ElementLink< TrigInDetTrackCollection > & trackLink() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:185
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
TrigElectron::clusterLink
const ElementLink< TrigEMClusterContainer > & clusterLink() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:180
TrigElectron_p2::m_tr_phi_at_calo
float m_tr_phi_at_calo
Definition: TrigElectron_p2.h:77
TrigElectron_p2::m_tr_Algo
TrigInDetTrack::AlgoId m_tr_Algo
Definition: TrigElectron_p2.h:72
TrigElectron_p2::m_cl_Rcore
float m_cl_Rcore
Definition: TrigElectron_p2.h:81
TrigElectron_p2::m_cl_EThad
float m_cl_EThad
Definition: TrigElectron_p2.h:83