ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
RecTPCnv
src
MissingEtTruthCnv_p1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/********************************************************************
6
7
NAME: MissingEtTruthCnv_p1.cxx
8
PACKAGE: offline/Reconstruction/RecTPCnv
9
10
AUTHORS: S. Resconi
11
CREATED: Jul 2007
12
13
PURPOSE: Transient/Persisten converter for MissingEtTruth class
14
********************************************************************/
15
16
17
// STL includes
18
19
// AthenaPoolCnvSvc includes
20
#include "
AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h
"
21
22
// MissingETEvent includes
23
#include "
MissingETEvent/MissingET.h
"
24
#include "
MissingETEvent/MissingEtTruth.h
"
25
26
// RecTPCnv includes
27
#include "
RecTPCnv/MissingEtTruthCnv_p1.h
"
28
#include "
RecTPCnv/MissingETCnv_p1.h
"
29
30
// MissingET converter
31
static
const
MissingETCnv_p1
metCnv
;
32
33
34
void
MissingEtTruthCnv_p1::persToTrans
(
const
MissingEtTruth_p1
* pers,
35
MissingEtTruth
*
trans
,
36
MsgStream&
msg
)
const
37
{
38
// msg << MSG::DEBUG << "Loading MissingEtTruth from persistent state..." << endmsg;
39
40
trans
->setExTruthVec (std::vector<double> (pers->
m_exTruth
));
41
trans
->setEyTruthVec (std::vector<double> (pers->
m_eyTruth
));
42
trans
->setEtSumTruthVec (std::vector<double> (pers->
m_etSumTruth
));
43
44
// use the MissingET converter to convert from pers to trans
45
metCnv
.persToTrans(&pers->
m_met
,
trans
,
msg
);
46
47
// for (unsigned int vi=0;vi<trans->m_exTruth.size();++vi)
48
// std::cout<<"IN EtTruth ex: "<<trans->m_exTruth[vi]<<"\tey: "<<trans->m_eyTruth[vi]<<"\tet: "<<trans->m_etSumTruth[vi]<<std::endl;
49
50
return
;
51
}
52
53
void
MissingEtTruthCnv_p1::transToPers
(
const
MissingEtTruth
*
trans
,
54
MissingEtTruth_p1
* pers,
55
MsgStream&
msg
)
const
56
{
57
// msg << MSG::DEBUG << "Creating persistent state of MissingEtTruth..." << endmsg;
58
59
pers->
m_exTruth
=
trans
->exTruthVec();
60
pers->
m_eyTruth
=
trans
->eyTruthVec();
61
pers->
m_etSumTruth
=
trans
->etSumTruthVec();
62
63
64
if
(
trans
->getSource() >= 0 &&
trans
->getSource() < 1000 )
65
{
66
// use the MissingET converter to convert from trans to pers
67
MissingET_p1
theMet;
68
metCnv
.transToPers(
trans
, &theMet,
msg
);
69
pers->
m_met
= theMet;
70
71
}
72
73
// for (unsigned int vi=0;vi<trans->m_exTruth.size();++vi)
74
// std::cout<<"OUT EtTruth ex: "<<trans->m_exTruth[vi]<<"\tey: "<<trans->m_eyTruth[vi]<<"\tet: "<<trans->m_etSumTruth[vi]<<std::endl;
75
76
return
;
77
}
MissingETCnv_p1.h
metCnv
static const MissingETCnv_p1 metCnv
Definition
MissingEtCaloCnv_p1.cxx:31
MissingEtTruthCnv_p1.h
MissingEtTruth.h
MissingET.h
T_AthenaPoolTPConverter.h
MissingETCnv_p1
Definition
MissingETCnv_p1.h:26
MissingET_p1
Definition
MissingET_p1.h:27
MissingEtTruthCnv_p1::transToPers
virtual void transToPers(const MissingEtTruth *transObj, MissingEtTruth_p1 *persObj, MsgStream &msg) const override
Definition
MissingEtTruthCnv_p1.cxx:53
MissingEtTruthCnv_p1::persToTrans
virtual void persToTrans(const MissingEtTruth_p1 *persObj, MissingEtTruth *transObj, MsgStream &msg) const override
Definition
MissingEtTruthCnv_p1.cxx:34
MissingEtTruth_p1
Definition
MissingEtTruth_p1.h:25
MissingEtTruth_p1::m_eyTruth
std::vector< double > m_eyTruth
Definition
MissingEtTruth_p1.h:43
MissingEtTruth_p1::m_met
MissingET_p1 m_met
Definition
MissingEtTruth_p1.h:39
MissingEtTruth_p1::m_exTruth
std::vector< double > m_exTruth
basic components of MissingEtTruth_p1
Definition
MissingEtTruth_p1.h:42
MissingEtTruth_p1::m_etSumTruth
std::vector< double > m_etSumTruth
Definition
MissingEtTruth_p1.h:44
MissingEtTruth
Definition
MissingEtTruth.h:28
trans
TH1F * trans(TH1F *h, bool t=false)
Definition
comparitor.cxx:199
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0