ATLAS Offline Software
TrigElectronCnv_p3.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_p3<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_p3::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_allTheFloats[1], // trkEtaAtCalo
32  persObj->m_allTheFloats[2], // trkPhiAtCalo
33  persObj->m_allTheFloats[3], // EToverPT,
34  cluster,
35  persObj->m_allTheFloats[4], // caloEta
36  persObj->m_allTheFloats[5], // caloPhi
37  persObj->m_allTheFloats[6], // Rcore
38  persObj->m_allTheFloats[7], // Eratio
39  persObj->m_allTheFloats[8], // EThad
40  persObj->m_allTheFloats[9], // F0
41  persObj->m_allTheFloats[10], // F1
42  persObj->m_allTheFloats[11], // F2
43  persObj->m_allTheFloats[12], // F3
44  track,
45  persObj->m_tr_Algo, // trackAlgo
46  persObj->m_allTheFloats[0], // Zvtx
47  persObj->m_tr_nr_trt_hits,
48  persObj->m_tr_nr_trt_hithresh_hits);
49 
50 
51 
52  m_p4PtEtaPhiMCnv.persToTrans(&(persObj->m_P4PtEtaPhiM), transObj, log);
53  //fillTransFromPStore( &m_p4PtEtaPhiMCnv, persObj->m_p4PtEtaPhiM, transObj, log );
54 
55  log << MSG::DEBUG << "TrigElectronCnv_p3::persToTrans done" << endmsg;
56 }
57 
58 
59 //-----------------------------------------------------------------------------
60 // Transient to persistent
61 //-----------------------------------------------------------------------------
63  TrigElectron_p3* persObj,
64  MsgStream &log)
65 {
66  log << MSG::DEBUG << "TrigElectronCnv_p3::transToPers called " << endmsg;
67 
68  persObj->m_roiWord = transObj->roiId() ;
69  persObj->m_valid = transObj->isValid() ;
70  persObj->m_tr_Algo = transObj->trackAlgo() ;
71  persObj->m_tr_nr_trt_hits = transObj->nTRTHits() ;
72  persObj->m_tr_nr_trt_hithresh_hits = transObj->nTRTHiThresholdHits() ;
73 
74  persObj->m_allTheFloats[0] = transObj->Zvtx() ;
75  persObj->m_allTheFloats[1] = transObj->trkEtaAtCalo() ;
76  persObj->m_allTheFloats[2] = transObj->trkPhiAtCalo() ;
77  persObj->m_allTheFloats[3] = transObj->EtOverPt() ;
78  persObj->m_allTheFloats[4] = transObj->caloEta();
79  persObj->m_allTheFloats[5] = transObj->caloPhi();
80  persObj->m_allTheFloats[6] = transObj->Rcore() ;
81  persObj->m_allTheFloats[7] = transObj->Eratio() ;
82  persObj->m_allTheFloats[8] = transObj->EThad() ;
83  persObj->m_allTheFloats[9] = transObj->F0() ;
84  persObj->m_allTheFloats[10] = transObj->F1() ;
85  persObj->m_allTheFloats[11] = transObj->F2() ;
86  persObj->m_allTheFloats[12] = transObj->F3() ;
87 
88  log << MSG::DEBUG << "TrigElectronCnv_p3::transToPers calling e-link persToTrabs(track) " << endmsg;
89  ELinkIDTrackCnv.transToPers( &transObj->trackLink(), &persObj->m_track, log );
90  log << MSG::DEBUG << "TrigElectronCnv_p3::transToPers calling e-link persToTrabs(cluster) " << endmsg;
91  m_ELinkEMclusterCnv.transToPers( &transObj->clusterLink(), &persObj->m_cluster, log );
92 
93  log << MSG::DEBUG << "TrigElectronCnv_p3::transToPers persistifying 4-mom. base class" << endmsg;
94  m_p4PtEtaPhiMCnv.transToPers(transObj, &(persObj->m_P4PtEtaPhiM), log);
95  //persObj->m_p4PtEtaPhiM = baseToPersistent( &m_p4PtEtaPhiMCnv, transObj, log );
96 
97  log << MSG::DEBUG << "TrigElectronCnv_p3::transToPers done" << endmsg;
98 }
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
ElementLinkCnv_p3
Definition: ElementLinkCnv_p3.h:27
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
ElementLinkCnv_p3::persToTrans
void persToTrans(const PersLink_t &pers, Link_t &trans, MsgStream &log) const
TrigElectron.h
TrigElectron::Eratio
float Eratio() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:168
TrigElectron_p3::m_tr_nr_trt_hithresh_hits
int m_tr_nr_trt_hithresh_hits
Definition: TrigElectron_p3.h:63
TrigElectron::roiId
int roiId() const
accessor methods:
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:114
TrigElectron_p3::m_cluster
ElementLinkInt_p3 m_cluster
Definition: TrigElectron_p3.h:84
TrigElectron_p3::m_tr_Algo
TrigInDetTrack::AlgoId m_tr_Algo
Definition: TrigElectron_p3.h:61
TrigElectron
File: TrigElectron.h.
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:63
TrigElectron_p3::m_track
ElementLinkInt_p3 m_track
Definition: TrigElectron_p3.h:85
TrigElectron::F1
float F1() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:174
TrigElectron_p3::m_P4PtEtaPhiM
P4PtEtaPhiM_p1 m_P4PtEtaPhiM
Definition: TrigElectron_p3.h:89
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::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
ElementLinkCnv_p3::transToPers
void transToPers(const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
TrigElectron_p3.h
TrigElectron_p3::m_roiWord
unsigned int m_roiWord
Definition: TrigElectron_p3.h:59
TrigElectronCnv_p3::m_ELinkEMclusterCnv
ElementLinkCnv_p3< ElementLink< TrigEMClusterContainer > > m_ELinkEMclusterCnv
Definition: TrigElectronCnv_p3.h:55
TrigElectronCnv_p3.h
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::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
TrigElectron::nTRTHiThresholdHits
int nTRTHiThresholdHits() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:124
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
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
TrigElectron_p3::m_valid
bool m_valid
Definition: TrigElectron_p3.h:60
xAOD::TrigElectron
TrigElectron_v1 TrigElectron
Declare the latest version of the class.
Definition: Event/xAOD/xAODTrigEgamma/xAODTrigEgamma/TrigElectron.h:16
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
TrigElectron_p3::m_tr_nr_trt_hits
int m_tr_nr_trt_hits
Definition: TrigElectron_p3.h:62
TrigElectron_p3
Definition: TrigElectron_p3.h:30
TrigElectron_p3::m_allTheFloats
float m_allTheFloats[13]
Definition: TrigElectron_p3.h:81
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TrigElectronCnv_p3::persToTrans
virtual void persToTrans(const TrigElectron_p3 *persObj, TrigElectron *transObj, MsgStream &log)
Definition: TrigElectronCnv_p3.cxx:16
TrigElectronCnv_p3::transToPers
virtual void transToPers(const TrigElectron *transObj, TrigElectron_p3 *persObj, MsgStream &log)
Definition: TrigElectronCnv_p3.cxx:62
TrigElectron::trackLink
const ElementLink< TrigInDetTrackCollection > & trackLink() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:185
TrigElectronCnv_p3::m_p4PtEtaPhiMCnv
P4PtEtaPhiMCnv_p1 m_p4PtEtaPhiMCnv
Definition: TrigElectronCnv_p3.h:59
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
TrigElectron::clusterLink
const ElementLink< TrigEMClusterContainer > & clusterLink() const
Definition: Trigger/TrigEvent/TrigParticle/TrigParticle/TrigElectron.h:180