ATLAS Offline Software
LUCID_SimHitCnv_p2.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_p2::persToTrans(const LUCID_SimHit_p2* persObj, LUCID_SimHit* transObj, MsgStream& log) {
11 
12  log << MSG::DEBUG << "LUCID_SimHitCnv_p2::persToTrans called " << endmsg;
13 
14  HepMcParticleLinkCnv_p2 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_p2::transToPers(const LUCID_SimHit* transObj, LUCID_SimHit_p2* persObj, MsgStream& log) {
34 
35  log << MSG::DEBUG << "LUCID_SimHitCnv_p2::transToPers called " << endmsg;
36 
37  HepMcParticleLinkCnv_p2 HepMcPLCnv;
38 
39  persObj->m_tubeID = transObj->GetTubeID();
40  persObj->m_track = transObj->truthBarcode();
41  persObj->m_pdgCode = transObj->GetPdgCode();
42  persObj->m_genVolume = transObj->GetGenVolume();
43  persObj->m_stepStartPosX = transObj->GetX();
44  persObj->m_stepStartPosY = transObj->GetY();
45  persObj->m_stepStartPosZ = transObj->GetZ();
46  persObj->m_stepEndPosX = transObj->GetEPX();
47  persObj->m_stepEndPosY = transObj->GetEPY();
48  persObj->m_stepEndPosZ = transObj->GetEPZ();
49  persObj->m_preStepTime = transObj->GetPreStepTime();
50  persObj->m_postStepTime = transObj->GetPostStepTime();
51  persObj->m_wavelength = transObj->GetWavelength();
52  persObj->m_energy = transObj->GetEnergy();
53 
54  HepMcPLCnv.transToPers(&(transObj->particleLink()),&(persObj->m_partLink), log);
55 }
HepMcParticleLinkCnv_p2::persToTrans
virtual void persToTrans(const HepMcParticleLink_p2 *persObj, HepMcParticleLink *transObj, MsgStream &msg) const override
Method creating the transient representation of HepMcParticleLink from its persistent representation ...
Definition: HepMcParticleLinkCnv_p2.cxx:15
LUCID_SimHit::GetPdgCode
int GetPdgCode() const
Definition: LUCID_SimHit.h:72
LUCID_SimHit::GetZ
float GetZ() const
Definition: LUCID_SimHit.h:63
HepMcParticleLinkCnv_p2::transToPers
virtual void transToPers(const HepMcParticleLink *transObj, HepMcParticleLink_p2 *persObj, MsgStream &msg) const override
Method creating the persistent representation HepMcParticleLink_p2 from its transient representation ...
Definition: HepMcParticleLinkCnv_p2.cxx:31
LUCID_SimHit::GetEPY
float GetEPY() const
Definition: LUCID_SimHit.h:66
LUCID_SimHitCnv_p2::persToTrans
virtual void persToTrans(const LUCID_SimHit_p2 *persObj, LUCID_SimHit *transObj, MsgStream &log)
Definition: LUCID_SimHitCnv_p2.cxx:10
LUCID_SimHitCnv_p2.h
LUCID_SimHit_p2::m_pdgCode
int m_pdgCode
Definition: LUCID_SimHit_p2.h:41
LUCID_SimHit::GetPostStepTime
float GetPostStepTime() const
Definition: LUCID_SimHit.h:75
LUCID_SimHit_p2::m_stepStartPosZ
float m_stepStartPosZ
Definition: LUCID_SimHit_p2.h:45
LUCID_SimHit::GetEPZ
float GetEPZ() const
Definition: LUCID_SimHit.h:67
LUCID_SimHit::GetPreStepTime
float GetPreStepTime() const
Definition: LUCID_SimHit.h:74
LUCID_SimHit::GetEnergy
float GetEnergy() const
Definition: LUCID_SimHit.h:77
LUCID_SimHit::GetWavelength
float GetWavelength() const
Definition: LUCID_SimHit.h:76
LUCID_SimHit_p2::m_genVolume
int m_genVolume
Definition: LUCID_SimHit_p2.h:42
LUCID_SimHit::GetEPX
float GetEPX() const
Definition: LUCID_SimHit.h:65
LUCID_SimHit_p2::m_wavelength
float m_wavelength
Definition: LUCID_SimHit_p2.h:51
LUCID_SimHit_p2::m_stepEndPosZ
float m_stepEndPosZ
Definition: LUCID_SimHit_p2.h:48
LUCID_SimHit::GetX
float GetX() const
Definition: LUCID_SimHit.h:61
LUCID_SimHit::GetGenVolume
int GetGenVolume() const
Definition: LUCID_SimHit.h:73
LUCID_SimHit_p2::m_postStepTime
float m_postStepTime
Definition: LUCID_SimHit_p2.h:50
LUCID_SimHit_p2::m_stepEndPosY
float m_stepEndPosY
Definition: LUCID_SimHit_p2.h:47
LUCID_SimHitCnv_p2::transToPers
virtual void transToPers(const LUCID_SimHit *transObj, LUCID_SimHit_p2 *persObj, MsgStream &log)
Definition: LUCID_SimHitCnv_p2.cxx:33
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LUCID_SimHit_p2::m_track
int m_track
Definition: LUCID_SimHit_p2.h:40
LUCID_SimHit::GetY
float GetY() const
Definition: LUCID_SimHit.h:62
LUCID_SimHit
Definition: LUCID_SimHit.h:17
LUCID_SimHit_p2
Definition: LUCID_SimHit_p2.h:11
LUCID_SimHit_p2::m_stepEndPosX
float m_stepEndPosX
Definition: LUCID_SimHit_p2.h:46
LUCID_SimHit_p2::m_stepStartPosY
float m_stepStartPosY
Definition: LUCID_SimHit_p2.h:44
LUCID_SimHit_p2::m_partLink
HepMcParticleLink_p2 m_partLink
Definition: LUCID_SimHit_p2.h:37
LUCID_SimHit_p2::m_tubeID
short m_tubeID
Definition: LUCID_SimHit_p2.h:39
LUCID_SimHit_p2::m_energy
float m_energy
Definition: LUCID_SimHit_p2.h:52
LUCID_SimHit::particleLink
const HepMcParticleLink & particleLink() const
Definition: LUCID_SimHit.h:99
LUCID_SimHit::GetTubeID
short GetTubeID() const
Definition: LUCID_SimHit.h:69
HepMcParticleLinkCnv_p2.h
LUCID_SimHit::truthBarcode
int truthBarcode() const
Definition: LUCID_SimHit.h:70
LUCID_SimHit.h
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LUCID_SimHit_p2::m_preStepTime
float m_preStepTime
Definition: LUCID_SimHit_p2.h:49
HepMcParticleLinkCnv_p2
Definition: HepMcParticleLinkCnv_p2.h:29
LUCID_SimHit_p2::m_stepStartPosX
float m_stepStartPosX
Definition: LUCID_SimHit_p2.h:43