ATLAS Offline Software
MuCTPIL1TopoCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 // Gaudi/Athena include(s):
7 #include "GaudiKernel/MsgStream.h"
8 
9 // TrigT1 inlcude(s):
11 
12 // Local include(s):
15 
21  MsgStream& log ) {
22 
23  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converting MuCTPIL1Topo from persistent state..." << endmsg;
24 
25  for (const MuCTPIL1TopoCandidate_p1 &cand : persObj->m_muonTopoCandidates) {
27  muCand.setCandidateData(cand.m_sectorName,
28  cand.m_roiID,
29  cand.m_bcid,
30  cand.m_ptThresholdID,
31  cand.m_ptL1TopoCode,
32  cand.m_ptValue,
33  cand.m_eta,
34  cand.m_phi,
35  cand.m_etacode,
36  cand.m_phicode,
37  cand.m_etamin,
38  cand.m_etamax,
39  cand.m_phimin,
40  cand.m_phimax,
41  cand.m_mioctID,
42  cand.m_ieta,
43  cand.m_iphi);
44 
45  muCand.setTGCFlags(cand.m_bw2or3,
46  cand.m_innerCoin,
47  cand.m_goodMF,
48  cand.m_charge);
49 
50  muCand.setRPCFlags(cand.m_is2cand,
51  cand.m_phiOvl);
52 
53  muCand.setRoiWord(cand.m_roiWord);
54 
55  transObj->addCandidate(muCand);
56  }
57  transObj->setBcidOffset (persObj->m_bcidOffset);
58 
59  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Converting MuCTPIL1Topo from persistent state [OK]" << endmsg;
60 
61  return;
62 }
63 
69  MsgStream& log ) {
70 
71  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Creating persistent state of MuCTPIL1Topo..." << endmsg;
72 
73  persObj->m_muonTopoCandidates.clear();
74  for (const LVL1::MuCTPIL1TopoCandidate & cand : transObj->getCandidates()) {
76  muCand.m_sectorName = cand.getSectorName();
77  muCand.m_roiID = cand.getRoiID();
78  muCand.m_bcid = cand.getbcid();
79  muCand.m_ptThresholdID = cand.getptThresholdID();
80  muCand.m_ptL1TopoCode = cand.getptL1TopoCode();
81  muCand.m_ptValue = cand.getptValue();
82  muCand.m_eta = cand.geteta();
83  muCand.m_phi = cand.getphi();
84  muCand.m_etacode = cand.getetacode();
85  muCand.m_phicode = cand.getphicode();
86  muCand.m_etamin = cand.getetamin();
87  muCand.m_etamax = cand.getetamax();
88  muCand.m_phimin = cand.getphimin();
89  muCand.m_phimax = cand.getphimax();
90  muCand.m_roiWord = cand.getRoiWord();
91  muCand.m_mioctID = cand.getMioctID();
92  muCand.m_ieta = cand.getieta();
93  muCand.m_iphi = cand.getiphi();
94  muCand.m_phiOvl = cand.getphiOvl();
95  muCand.m_is2cand = cand.getis2cand();
96  muCand.m_charge = cand.getcharge();
97  muCand.m_bw2or3 = cand.getbw2or3();
98  muCand.m_innerCoin = cand.getinnerCoin();
99  muCand.m_goodMF = cand.getgoodMF();
100 
101  persObj->m_muonTopoCandidates.push_back(muCand);
102  }
103  persObj->m_bcidOffset = transObj->getBcidOffset();
104 
105  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Creating persistent state of MuCTPIL1Topo [OK]" << endmsg;
106 
107  return;
108 }
MuCTPIL1TopoCandidate_p1::m_phimax
float m_phimax
Definition: MuCTPIL1TopoCandidate_p1.h:34
MuCTPIL1TopoCandidate.h
LVL1::MuCTPIL1TopoCandidate::setRPCFlags
void setRPCFlags(bool is2cand, bool phiOvl)
Definition: MuCTPIL1TopoCandidate.cxx:61
LVL1::MuCTPIL1TopoCandidate::setCandidateData
void setCandidateData(const std::string &sectorName, unsigned int roiID, unsigned int bcid, unsigned int ptThresholdID, unsigned int ptL1TopoCode, unsigned int ptValue, float eta, float phi, unsigned int etacode, unsigned int phicode, float etamin, float etamax, float phimin, float phimax, unsigned int mioctID, int ieta, int iphi)
Definition: MuCTPIL1TopoCandidate.cxx:17
MuCTPIL1TopoCandidate_p1::m_mioctID
unsigned int m_mioctID
Definition: MuCTPIL1TopoCandidate_p1.h:36
MuCTPIL1TopoCnv_p1::persToTrans
virtual void persToTrans(const MuCTPIL1Topo_p1 *persObj, LVL1::MuCTPIL1Topo *transObj, MsgStream &log) override
Function transferring the information from a persistent MuCTPIL1Topo_p1 object to a transient MuCTPIL...
Definition: MuCTPIL1TopoCnv_p1.cxx:20
MuCTPIL1TopoCandidate_p1::m_bw2or3
bool m_bw2or3
Definition: MuCTPIL1TopoCandidate_p1.h:42
MuCTPIL1TopoCandidate_p1::m_sectorName
std::string m_sectorName
Definition: MuCTPIL1TopoCandidate_p1.h:21
MuCTPIL1TopoCandidate_p1::m_roiWord
unsigned int m_roiWord
Definition: MuCTPIL1TopoCandidate_p1.h:35
LVL1::MuCTPIL1TopoCandidate::setTGCFlags
void setTGCFlags(bool bw2or3, bool innerCoin, bool goodMF, int charge)
Definition: MuCTPIL1TopoCandidate.cxx:53
LVL1::MuCTPIL1Topo
MuCTPI input class to the L1Topo simulation.
Definition: MuCTPIL1Topo.h:24
MuCTPIL1TopoCandidate_p1::m_etamax
float m_etamax
Definition: MuCTPIL1TopoCandidate_p1.h:32
MuCTPIL1TopoCandidate_p1::m_iphi
int m_iphi
Definition: MuCTPIL1TopoCandidate_p1.h:38
MuCTPIL1TopoCandidate_p1::m_phi
float m_phi
Definition: MuCTPIL1TopoCandidate_p1.h:28
LVL1::MuCTPIL1Topo::setBcidOffset
void setBcidOffset(int bcidOffset)
Definition: MuCTPIL1Topo.h:45
LVL1::MuCTPIL1Topo::getBcidOffset
int getBcidOffset() const
Definition: MuCTPIL1Topo.h:46
MuCTPIL1TopoCandidate_p1::m_is2cand
bool m_is2cand
Definition: MuCTPIL1TopoCandidate_p1.h:40
MuCTPIL1Topo_p1::m_muonTopoCandidates
std::vector< MuCTPIL1TopoCandidate_p1 > m_muonTopoCandidates
Definition: MuCTPIL1Topo_p1.h:25
MuCTPIL1TopoCandidate_p1.h
MuCTPIL1TopoCandidate_p1::m_ptL1TopoCode
unsigned int m_ptL1TopoCode
Definition: MuCTPIL1TopoCandidate_p1.h:25
LVL1::MuCTPIL1Topo::getCandidates
const std::vector< MuCTPIL1TopoCandidate > & getCandidates() const
Definition: MuCTPIL1Topo.cxx:41
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuCTPIL1TopoCandidate_p1::m_bcid
unsigned int m_bcid
Definition: MuCTPIL1TopoCandidate_p1.h:23
MuCTPIL1Topo_p1::m_bcidOffset
int m_bcidOffset
Definition: MuCTPIL1Topo_p1.h:24
MuCTPIL1TopoCnv_p1::transToPers
virtual void transToPers(const LVL1::MuCTPIL1Topo *transObj, MuCTPIL1Topo_p1 *persObj, MsgStream &log) override
Function transferring the information from a transient MuCTPIL1Topo object to a persistent MuCTPIL1To...
Definition: MuCTPIL1TopoCnv_p1.cxx:68
MuCTPIL1TopoCandidate_p1::m_roiID
unsigned int m_roiID
Definition: MuCTPIL1TopoCandidate_p1.h:22
LVL1::MuCTPIL1TopoCandidate::setRoiWord
void setRoiWord(unsigned int roi)
Definition: MuCTPIL1TopoCandidate.cxx:68
LVL1::MuCTPIL1TopoCandidate
MuCTPI input class to the L1Topo simulation.
Definition: MuCTPIL1TopoCandidate.h:23
MuCTPIL1TopoCandidate_p1::m_phiOvl
bool m_phiOvl
Definition: MuCTPIL1TopoCandidate_p1.h:39
MuCTPIL1TopoCandidate_p1::m_eta
float m_eta
Definition: MuCTPIL1TopoCandidate_p1.h:27
MuCTPIL1TopoCnv_p1.h
MuCTPIL1TopoCandidate_p1::m_ptThresholdID
unsigned int m_ptThresholdID
Definition: MuCTPIL1TopoCandidate_p1.h:24
MuCTPIL1TopoCandidate_p1::m_innerCoin
bool m_innerCoin
Definition: MuCTPIL1TopoCandidate_p1.h:43
MuCTPIL1TopoCandidate_p1::m_phimin
float m_phimin
Definition: MuCTPIL1TopoCandidate_p1.h:33
LVL1::MuCTPIL1Topo::addCandidate
void addCandidate(const MuCTPIL1TopoCandidate &candidate)
Definition: MuCTPIL1Topo.cxx:51
MuCTPIL1TopoCandidate_p1::m_phicode
unsigned int m_phicode
Definition: MuCTPIL1TopoCandidate_p1.h:30
MuCTPIL1TopoCandidate_p1::m_etacode
unsigned int m_etacode
Definition: MuCTPIL1TopoCandidate_p1.h:29
MuCTPIL1TopoCandidate_p1
Persistent representation of MuCTPIL1TopoCandidate.
Definition: MuCTPIL1TopoCandidate_p1.h:20
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuCTPIL1TopoCandidate_p1::m_ieta
int m_ieta
Definition: MuCTPIL1TopoCandidate_p1.h:37
MuCTPIL1Topo_p1
Persistent representation of MuCTPIL1Topo.
Definition: MuCTPIL1Topo_p1.h:23
MuCTPIL1TopoCandidate_p1::m_goodMF
bool m_goodMF
Definition: MuCTPIL1TopoCandidate_p1.h:44
MuCTPIL1TopoCandidate_p1::m_etamin
float m_etamin
Definition: MuCTPIL1TopoCandidate_p1.h:31
MuCTPIL1TopoCandidate_p1::m_charge
int m_charge
Definition: MuCTPIL1TopoCandidate_p1.h:41
MuCTPIL1TopoCandidate_p1::m_ptValue
unsigned int m_ptValue
Definition: MuCTPIL1TopoCandidate_p1.h:26