ATLAS Offline Software
SimulationHitCnv_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 
5 //#define private public
6 //#define protected public
8 //#undef private
9 //#undef protected
10 
11 #include "Identifier/Identifier.h"
13 
14 void SimulationHitCnv_p1::persToTrans(const SimulationHit_p1* persObj, SimulationHit* transObj, MsgStream &log)
15 {
16  log << MSG::DEBUG << "SimulationHitCnv_p1::persToTrans called " << endmsg;
17 
18  SimulationHit::StepPoint pre( persObj->m_pre_time,CLHEP::Hep3Vector( persObj->m_pre_position_x, persObj->m_pre_position_y, persObj->m_pre_position_z) ,
19  persObj->m_pre_kinetic_energy, CLHEP::Hep3Vector(persObj->m_pre_direction_x, persObj->m_pre_direction_y, persObj->m_pre_direction_z),
20  CLHEP::Hep3Vector(persObj->m_pre_momentum_x, persObj->m_pre_momentum_y, persObj->m_pre_momentum_z));
21  SimulationHit::StepPoint post( persObj->m_post_time,CLHEP::Hep3Vector( persObj->m_post_position_x, persObj->m_post_position_y, persObj->m_post_position_z) ,
22  persObj->m_post_kinetic_energy, CLHEP::Hep3Vector(persObj->m_post_direction_x, persObj->m_post_direction_y, persObj->m_post_direction_z),
23  CLHEP::Hep3Vector(persObj->m_post_momentum_x, persObj->m_post_momentum_y, persObj->m_post_momentum_z));
24  transObj->m_pre = pre;
25  transObj->m_post = post;
26  transObj->m_deposit_energy=persObj->m_deposit_energy;
27  transObj->m_pdgcode=persObj->m_pdgcode;
28  transObj->m_track_id=persObj->m_track_id;
29  transObj->m_parent_id=persObj->m_parent_id;
30 }
31 
32 void SimulationHitCnv_p1::transToPers(const SimulationHit* transObj, SimulationHit_p1* persObj, MsgStream &log)
33 {
34  log << MSG::DEBUG << "SimulationHitCnv_p1::transToPers called " << endmsg;
35 
36  persObj->m_pre_time = transObj->m_pre.time;
37  persObj->m_pre_kinetic_energy = transObj->m_pre.kinetic_energy;
38  persObj->m_pre_position_x = transObj->m_pre.position.x();
39  persObj->m_pre_position_y = transObj->m_pre.position.y();
40  persObj->m_pre_position_z = transObj->m_pre.position.z();
41  persObj->m_pre_direction_x = transObj->m_pre.direction.x();
42  persObj->m_pre_direction_y = transObj->m_pre.direction.y();
43  persObj->m_pre_direction_z = transObj->m_pre.direction.z();
44  persObj->m_pre_momentum_x = transObj->m_pre.momentum.x();
45  persObj->m_pre_momentum_y = transObj->m_pre.momentum.y();
46  persObj->m_pre_momentum_z = transObj->m_pre.momentum.z();
47  persObj->m_post_time = transObj->m_post.time;
48  persObj->m_post_kinetic_energy = transObj->m_post.kinetic_energy;
49  persObj->m_post_position_x = transObj->m_post.position.x();
50  persObj->m_post_position_y = transObj->m_post.position.y();
51  persObj->m_post_position_z = transObj->m_post.position.z();
52  persObj->m_post_direction_x = transObj->m_post.direction.x();
53  persObj->m_post_direction_y = transObj->m_post.direction.y();
54  persObj->m_post_direction_z = transObj->m_post.direction.z();
55  persObj->m_post_momentum_x = transObj->m_post.momentum.x();
56  persObj->m_post_momentum_y = transObj->m_post.momentum.y();
57  persObj->m_post_momentum_z = transObj->m_post.momentum.z();
58  persObj->m_deposit_energy=transObj->m_deposit_energy;
59  persObj->m_pdgcode=transObj->m_pdgcode;
60  persObj->m_track_id=transObj->m_track_id;
61  persObj->m_parent_id=transObj->m_parent_id;
62 
63  }
SimulationHit_p1::m_pdgcode
int m_pdgcode
Definition: SimulationHit_p1.h:66
SimulationHit_p1::m_pre_position_y
double m_pre_position_y
Definition: SimulationHit_p1.h:45
SimulationHit_p1::m_deposit_energy
double m_deposit_energy
Definition: SimulationHit_p1.h:65
SimulationHit_p1::m_post_momentum_z
double m_post_momentum_z
Definition: SimulationHit_p1.h:64
SimulationHit_p1::m_pre_position_x
double m_pre_position_x
Definition: SimulationHit_p1.h:44
SimulationHit_p1::m_post_time
double m_post_time
Definition: SimulationHit_p1.h:54
SimulationHit_p1::m_pre_time
double m_pre_time
Definition: SimulationHit_p1.h:43
SimulationHit::m_pre
StepPoint m_pre
Definition: SimulationHit.h:39
SimulationHit_p1::m_track_id
int m_track_id
Definition: SimulationHit_p1.h:67
SimulationHit_p1::m_pre_momentum_y
double m_pre_momentum_y
Definition: SimulationHit_p1.h:52
SimulationHit_p1::m_post_kinetic_energy
double m_post_kinetic_energy
Definition: SimulationHit_p1.h:58
SimulationHit_p1::m_pre_direction_x
double m_pre_direction_x
Definition: SimulationHit_p1.h:48
SimulationHit::StepPoint::time
double time
Definition: SimulationHit.h:23
SimulationHit_p1::m_post_position_x
double m_post_position_x
Definition: SimulationHit_p1.h:55
SimulationHit_p1::m_pre_kinetic_energy
double m_pre_kinetic_energy
Definition: SimulationHit_p1.h:47
SimulationHitCnv_p1.h
SimulationHit
Definition: SimulationHit.h:11
SimulationHit_p1::m_post_direction_x
double m_post_direction_x
Definition: SimulationHit_p1.h:59
SimulationHit_p1::m_post_position_y
double m_post_position_y
Definition: SimulationHit_p1.h:56
SimulationHit_p1::m_pre_momentum_x
double m_pre_momentum_x
Definition: SimulationHit_p1.h:51
SimulationHit_p1::m_post_direction_y
double m_post_direction_y
Definition: SimulationHit_p1.h:60
SimulationHit_p1::m_pre_momentum_z
double m_pre_momentum_z
Definition: SimulationHit_p1.h:53
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
SimulationHit::StepPoint
Definition: SimulationHit.h:19
SimulationHit_p1::m_post_momentum_x
double m_post_momentum_x
Definition: SimulationHit_p1.h:62
SimulationHitCnv_p1::persToTrans
virtual void persToTrans(const SimulationHit_p1 *persObj, SimulationHit *transObj, MsgStream &log)
Definition: SimulationHitCnv_p1.cxx:14
SimulationHit_p1
Definition: SimulationHit_p1.h:9
SimulationHit::m_parent_id
int m_parent_id
Definition: SimulationHit.h:44
SimulationHit::StepPoint::position
CLHEP::Hep3Vector position
Definition: SimulationHit.h:24
SimulationHit::m_post
StepPoint m_post
Definition: SimulationHit.h:40
SimulationHit_p1::m_post_direction_z
double m_post_direction_z
Definition: SimulationHit_p1.h:61
SimulationHit::StepPoint::kinetic_energy
double kinetic_energy
Definition: SimulationHit.h:25
SimulationHitCnv_p1::transToPers
virtual void transToPers(const SimulationHit *transObj, SimulationHit_p1 *persObj, MsgStream &log)
Definition: SimulationHitCnv_p1.cxx:32
SimulationHit::m_pdgcode
int m_pdgcode
Definition: SimulationHit.h:42
SimulationHit_p1::m_parent_id
int m_parent_id
Definition: SimulationHit_p1.h:68
SimulationHit_p1::m_pre_direction_y
double m_pre_direction_y
Definition: SimulationHit_p1.h:49
SimulationHit::m_track_id
int m_track_id
Definition: SimulationHit.h:43
SimulationHit::m_deposit_energy
double m_deposit_energy
Definition: SimulationHit.h:41
SimulationHit_p1::m_post_momentum_y
double m_post_momentum_y
Definition: SimulationHit_p1.h:63
SimulationHit_p1::m_post_position_z
double m_post_position_z
Definition: SimulationHit_p1.h:57
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
SimulationHit.h
SimulationHit::StepPoint::direction
CLHEP::Hep3Vector direction
Definition: SimulationHit.h:26
SimulationHit_p1::m_pre_direction_z
double m_pre_direction_z
Definition: SimulationHit_p1.h:50
SimulationHit::StepPoint::momentum
CLHEP::Hep3Vector momentum
Definition: SimulationHit.h:27
SimulationHit_p1::m_pre_position_z
double m_pre_position_z
Definition: SimulationHit_p1.h:46