ATLAS Offline Software
LUCID_SimHitCnv_p3.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "Identifier/Identifier.h"
9 
10 void LUCID_SimHitCnv_p3::persToTrans(const LUCID_SimHit_p3* persObj, LUCID_SimHit* transObj, MsgStream& log) {
11 
12  log << MSG::DEBUG << "LUCID_SimHitCnv_p3::persToTrans called " << endmsg;
13 
14  HepMcParticleLinkCnv_p3 HepMcPLCnv;
15  HepMcParticleLink link;
16  HepMcPLCnv.persToTrans(&(persObj->m_partLink),&(link), log);
17  *transObj = LUCID_SimHit (persObj->m_tubeID,
18  persObj->m_pdgCode,
19  link,
20  persObj->m_genVolume,
21  persObj->m_stepStartPosX,
22  persObj->m_stepStartPosY,
23  persObj->m_stepStartPosZ,
24  persObj->m_stepEndPosX,
25  persObj->m_stepEndPosY,
26  persObj->m_stepEndPosZ,
27  persObj->m_preStepTime,
28  persObj->m_postStepTime,
29  persObj->m_wavelength,
30  persObj->m_energy);
31 }
32 
33 void LUCID_SimHitCnv_p3::transToPers(const LUCID_SimHit* transObj, LUCID_SimHit_p3* persObj, MsgStream& log) {
34 
35  log << MSG::DEBUG << "LUCID_SimHitCnv_p3::transToPers called " << endmsg;
36 
37  HepMcParticleLinkCnv_p3 HepMcPLCnv;
38 
39  persObj->m_tubeID = transObj->GetTubeID();
40  persObj->m_pdgCode = transObj->GetPdgCode();
41  persObj->m_genVolume = transObj->GetGenVolume();
42  persObj->m_stepStartPosX = transObj->GetX();
43  persObj->m_stepStartPosY = transObj->GetY();
44  persObj->m_stepStartPosZ = transObj->GetZ();
45  persObj->m_stepEndPosX = transObj->GetEPX();
46  persObj->m_stepEndPosY = transObj->GetEPY();
47  persObj->m_stepEndPosZ = transObj->GetEPZ();
48  persObj->m_preStepTime = transObj->GetPreStepTime();
49  persObj->m_postStepTime = transObj->GetPostStepTime();
50  persObj->m_wavelength = transObj->GetWavelength();
51  persObj->m_energy = transObj->GetEnergy();
52 
53  HepMcPLCnv.transToPers(&(transObj->particleLink()),&(persObj->m_partLink), log);
54 }
HepMcParticleLinkCnv_p3
Definition: HepMcParticleLinkCnv_p3.h:29
HepMcParticleLinkCnv_p3.h
LUCID_SimHit::GetPdgCode
int GetPdgCode() const
Definition: LUCID_SimHit.h:72
LUCID_SimHit::GetZ
float GetZ() const
Definition: LUCID_SimHit.h:63
LUCID_SimHit_p3::m_postStepTime
float m_postStepTime
Definition: LUCID_SimHit_p3.h:33
LUCID_SimHit_p3::m_pdgCode
int m_pdgCode
Definition: LUCID_SimHit_p3.h:24
LUCID_SimHit::GetEPY
float GetEPY() const
Definition: LUCID_SimHit.h:66
HepMcParticleLinkCnv_p3::persToTrans
virtual void persToTrans(const HepMcParticleLink_p3 *persObj, HepMcParticleLink *transObj, MsgStream &msg) const override
Method creating the transient representation of HepMcParticleLink from its persistent representation ...
Definition: HepMcParticleLinkCnv_p3.cxx:15
LUCID_SimHit_p3::m_tubeID
short m_tubeID
Definition: LUCID_SimHit_p3.h:23
LUCID_SimHit::GetPostStepTime
float GetPostStepTime() const
Definition: LUCID_SimHit.h:75
LUCID_SimHit::GetEPZ
float GetEPZ() const
Definition: LUCID_SimHit.h:67
LUCID_SimHit::GetPreStepTime
float GetPreStepTime() const
Definition: LUCID_SimHit.h:74
LUCID_SimHit_p3::m_genVolume
int m_genVolume
Definition: LUCID_SimHit_p3.h:25
LUCID_SimHitCnv_p3.h
LUCID_SimHit_p3::m_energy
float m_energy
Definition: LUCID_SimHit_p3.h:35
LUCID_SimHit::GetEnergy
float GetEnergy() const
Definition: LUCID_SimHit.h:77
LUCID_SimHit_p3::m_stepEndPosX
float m_stepEndPosX
Definition: LUCID_SimHit_p3.h:29
LUCID_SimHit::GetWavelength
float GetWavelength() const
Definition: LUCID_SimHit.h:76
LUCID_SimHit::GetEPX
float GetEPX() const
Definition: LUCID_SimHit.h:65
LUCID_SimHit::GetX
float GetX() const
Definition: LUCID_SimHit.h:61
LUCID_SimHit::GetGenVolume
int GetGenVolume() const
Definition: LUCID_SimHit.h:73
LUCID_SimHit_p3
Definition: LUCID_SimHit_p3.h:11
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LUCID_SimHit::GetY
float GetY() const
Definition: LUCID_SimHit.h:62
LUCID_SimHit
Definition: LUCID_SimHit.h:17
HepMcParticleLinkCnv_p3::transToPers
virtual void transToPers(const HepMcParticleLink *transObj, HepMcParticleLink_p3 *persObj, MsgStream &msg) const override
Method creating the persistent representation HepMcParticleLink_p3 from its transient representation ...
Definition: HepMcParticleLinkCnv_p3.cxx:31
LUCID_SimHit_p3::m_wavelength
float m_wavelength
Definition: LUCID_SimHit_p3.h:34
LUCID_SimHit_p3::m_preStepTime
float m_preStepTime
Definition: LUCID_SimHit_p3.h:32
LUCID_SimHit_p3::m_stepStartPosY
float m_stepStartPosY
Definition: LUCID_SimHit_p3.h:27
LUCID_SimHit_p3::m_stepEndPosY
float m_stepEndPosY
Definition: LUCID_SimHit_p3.h:30
LUCID_SimHit::particleLink
const HepMcParticleLink & particleLink() const
Definition: LUCID_SimHit.h:99
LUCID_SimHit_p3::m_stepEndPosZ
float m_stepEndPosZ
Definition: LUCID_SimHit_p3.h:31
LUCID_SimHit_p3::m_stepStartPosZ
float m_stepStartPosZ
Definition: LUCID_SimHit_p3.h:28
LUCID_SimHitCnv_p3::persToTrans
virtual void persToTrans(const LUCID_SimHit_p3 *persObj, LUCID_SimHit *transObj, MsgStream &log)
Definition: LUCID_SimHitCnv_p3.cxx:10
LUCID_SimHit::GetTubeID
short GetTubeID() const
Definition: LUCID_SimHit.h:69
LUCID_SimHit.h
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LUCID_SimHitCnv_p3::transToPers
virtual void transToPers(const LUCID_SimHit *transObj, LUCID_SimHit_p3 *persObj, MsgStream &log)
Definition: LUCID_SimHitCnv_p3.cxx:33
LUCID_SimHit_p3::m_stepStartPosX
float m_stepStartPosX
Definition: LUCID_SimHit_p3.h:26
LUCID_SimHit_p3::m_partLink
HepMcParticleLink_p3 m_partLink
Definition: LUCID_SimHit_p3.h:21