ATLAS Offline Software
TRT_HitCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "Identifier/Identifier.h"
8 
11 
12 
13 void
15  MsgStream &log)
16 {
17  HepMcParticleLinkCnv_p1 HepMcPLCnv;
18  HepMcParticleLink link;
19  HepMcPLCnv.persToTrans(&(persObj->m_partLink),&link, log);
20 
21  *transObj = TRTUncompressedHit (persObj-> hitID,
22  link,
23  persObj->particleEncoding,
24  persObj->kineticEnergy,
25  persObj->energyDeposit,
26  persObj->preStepX,
27  persObj->preStepY,
28  persObj->preStepZ,
29  persObj->postStepX,
30  persObj->postStepY,
31  persObj->postStepZ,
32  persObj->globalTime);
33 }
34 
35 
36 void
38  MsgStream &log)
39 {
40  // if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "TRT_HitCnv_p1::transToPers called " << endmsg;
41  HepMcParticleLinkCnv_p1 HepMcPLCnv;
42  persObj->hitID = transObj-> GetHitID();
43  HepMcPLCnv.transToPers(&(transObj->particleLink()),&(persObj->m_partLink), log);
44  persObj->particleEncoding = transObj->GetParticleEncoding();
45  persObj->kineticEnergy = transObj->GetKineticEnergy();
46  persObj->energyDeposit = transObj->GetEnergyDeposit();
47 
48  persObj->preStepX = transObj->GetPreStepX();
49  persObj->preStepY = transObj->GetPreStepY();
50  persObj->preStepZ = transObj->GetPreStepZ();
51 
52  persObj->postStepX = transObj->GetPostStepX();
53  persObj->postStepY = transObj->GetPostStepY();
54  persObj->postStepZ = transObj->GetPostStepZ();
55  persObj->globalTime = transObj->GetGlobalTime();
56 
57 }
TRT_Hit_p1
Definition: TRT_Hit_p1.h:10
TRT_Hit_p1::preStepY
float preStepY
Definition: TRT_Hit_p1.h:18
TRT_Hit_p1::preStepZ
float preStepZ
Definition: TRT_Hit_p1.h:19
TRT_HitCnv_p1::persToTrans
virtual void persToTrans(const TRT_Hit_p1 *persObj, TRTUncompressedHit *transObj, MsgStream &log)
Definition: TRT_HitCnv_p1.cxx:14
TRTUncompressedHit::GetPreStepY
float GetPreStepY() const
Definition: TRTUncompressedHit.h:67
TRTUncompressedHit::GetParticleEncoding
int GetParticleEncoding() const
Definition: TRTUncompressedHit.h:55
TRT_Hit_p1::postStepZ
float postStepZ
Definition: TRT_Hit_p1.h:22
TRTUncompressedHit
Definition: TRTUncompressedHit.h:11
TRT_Hit_p1::kineticEnergy
float kineticEnergy
Definition: TRT_Hit_p1.h:15
TRTUncompressedHit::GetPostStepY
float GetPostStepY() const
Definition: TRTUncompressedHit.h:76
TRTUncompressedHit::GetGlobalTime
float GetGlobalTime() const
Definition: TRTUncompressedHit.h:82
TRTUncompressedHit::GetPreStepZ
float GetPreStepZ() const
Definition: TRTUncompressedHit.h:70
TRT_Hit_p1::preStepX
float preStepX
Definition: TRT_Hit_p1.h:17
TRTUncompressedHit::GetKineticEnergy
float GetKineticEnergy() const
Definition: TRTUncompressedHit.h:58
TRT_Hit_p1::m_partLink
HepMcParticleLink_p1 m_partLink
Definition: TRT_Hit_p1.h:13
TRT_Hit_p1::postStepY
float postStepY
Definition: TRT_Hit_p1.h:21
TRT_Hit_p1::postStepX
float postStepX
Definition: TRT_Hit_p1.h:20
TRT_Hit_p1::hitID
int hitID
Definition: TRT_Hit_p1.h:12
HepMcParticleLinkCnv_p1.h
TRT_HitCnv_p1.h
TRTUncompressedHit::GetEnergyDeposit
float GetEnergyDeposit() const
Definition: TRTUncompressedHit.h:61
HepMcParticleLinkCnv_p1::transToPers
virtual void transToPers(const HepMcParticleLink *transObj, HepMcParticleLink_p1 *persObj, MsgStream &msg) const override
Method creating the persistent representation HepMcParticleLink_p1 from its transient representation ...
Definition: HepMcParticleLinkCnv_p1.cxx:51
HepMcParticleLinkCnv_p1
Definition: HepMcParticleLinkCnv_p1.h:33
TRT_Hit_p1::energyDeposit
float energyDeposit
Definition: TRT_Hit_p1.h:16
HepMcParticleLinkCnv_p1::persToTrans
virtual void persToTrans(const HepMcParticleLink_p1 *persObj, HepMcParticleLink *transObj, MsgStream &msg) const override
Method creating the transient representation of HepMcParticleLink from its persistent representation ...
Definition: HepMcParticleLinkCnv_p1.cxx:31
TRT_Hit_p1.h
TRTUncompressedHit::GetPreStepX
float GetPreStepX() const
Definition: TRTUncompressedHit.h:64
TRTUncompressedHit.h
TRT_Hit_p1::particleEncoding
int particleEncoding
Definition: TRT_Hit_p1.h:14
TRT_Hit_p1::globalTime
float globalTime
Definition: TRT_Hit_p1.h:23
TRTUncompressedHit::GetPostStepX
float GetPostStepX() const
Definition: TRTUncompressedHit.h:73
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TRT_HitCnv_p1::transToPers
virtual void transToPers(const TRTUncompressedHit *transObj, TRT_Hit_p1 *persObj, MsgStream &log)
Definition: TRT_HitCnv_p1.cxx:37
TRTUncompressedHit::particleLink
const HepMcParticleLink & particleLink() const
Definition: TRTUncompressedHit.h:109
TRTUncompressedHit::GetPostStepZ
float GetPostStepZ() const
Definition: TRTUncompressedHit.h:79