ATLAS Offline Software
Loading...
Searching...
No Matches
LUCID_SimHitCnv_p1.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
10void LUCID_SimHitCnv_p1::persToTrans(const LUCID_SimHit_p1* persObj, LUCID_SimHit* transObj, MsgStream& log) {
11
12 log << MSG::DEBUG << "LUCID_SimHitCnv_p1::persToTrans called " << endmsg;
13
14 HepMcParticleLinkCnv_p1 HepMcPLCnv;
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
33void LUCID_SimHitCnv_p1::transToPers(const LUCID_SimHit* transObj, LUCID_SimHit_p1* persObj, MsgStream& log) {
34
35 log << MSG::DEBUG << "LUCID_SimHitCnv_p1::transToPers called " << endmsg;
36
37 HepMcParticleLinkCnv_p1 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}
#define endmsg
virtual void persToTrans(const HepMcParticleLink_p1 *persObj, HepMcParticleLink *transObj, MsgStream &msg) const override
Method creating the transient representation of HepMcParticleLink from its persistent representation ...
virtual void transToPers(const HepMcParticleLink *transObj, HepMcParticleLink_p1 *persObj, MsgStream &msg) const override
Method creating the persistent representation HepMcParticleLink_p1 from its transient representation ...
virtual void persToTrans(const LUCID_SimHit_p1 *persObj, LUCID_SimHit *transObj, MsgStream &log)
virtual void transToPers(const LUCID_SimHit *transObj, LUCID_SimHit_p1 *persObj, MsgStream &log)
HepMcParticleLink_p1 m_partLink
float GetEPY() const
float GetEnergy() const
float GetPreStepTime() const
const HepMcParticleLink & particleLink() const
float GetEPZ() const
float GetX() const
float GetPostStepTime() const
float GetY() const
float GetEPX() const
int truthBarcode() const
int GetPdgCode() const
float GetWavelength() const
short GetTubeID() const
float GetZ() const
int GetGenVolume() const