ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetEventTPCnv
src
ParticleJetCnv_p1.cxx
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// ParticleJetCnv_p1.cxx
8
// Implementation file for class ParticleJetCnv_p1
9
// Author: K.Cranmer<cranmer@cern.ch>
10
// Author: S.Binet<binet@cern.ch>
12
13
14
// STL includes
15
16
// JetTagEvent includes
17
#include "
JetEvent/Jet.h
"
18
19
#include "
egammaEvent/ElectronConstituent.h
"
20
#include "
egammaEvent/ElectronAssociation.h
"
21
#include "
MuonIDEvent/MuonConstituent.h
"
22
#include "
MuonIDEvent/MuonAssociation.h
"
23
24
25
// EventCommonTPCnv includes
26
#include "
EventCommonTPCnv/P4ImplPxPyPzECnv_p1.h
"
27
28
// ParticleEventTPCnv includes
29
#include "
ParticleEventTPCnv/ParticleBaseCnv_p1.h
"
30
31
32
// ParticleEventTPCnv includes
33
#include "
JetEventTPCnv/ParticleJetCnv_p1.h
"
34
35
36
37
38
// converters
39
static
const
P4ImplPxPyPzECnv_p1
momCnv
;
40
static
const
ParticleBaseCnv_p1
partBaseCnv
;
41
42
43
void
44
ParticleJetCnv_p1::persToTrans
(
const
ParticleJet_p1
* pers,
45
Jet
* trans,
46
MsgStream&
msg
)
const
47
{
48
msg
<< MSG::DEBUG <<
"ParticleJet_p1 Loading Jet from persistent state... pers="
<< pers
49
<<
" trans="
<< trans
50
<<
endmsg
;
51
52
msg
<< MSG::DEBUG <<
" ParticleJetCnv_p1 pers e="
<< pers->
m_momentum
.
m_ene
<<
endmsg
;
53
// base classes
54
partBaseCnv
.persToTrans( &pers->
m_particleBase
, &trans->
particleBase
(),
msg
);
55
msg
<< MSG::DEBUG <<
"ParticleJet_p1 converted particlebase"
<<
endmsg
;
56
57
momCnv
.persToTrans ( &pers->
m_momentum
, &trans->
momentumBase
(),
msg
);
58
msg
<< MSG::DEBUG <<
"ParticleJet_p1 converted momentum"
<<
endmsg
;
59
60
61
trans->
setSignalState
(
P4SignalState::CALIBRATED
);
62
msg
<< MSG::DEBUG <<
" ParticleJetCnv_p1 pers e="
<< pers->
m_momentum
.
m_ene
<<
" trans e="
<< trans->
e
() <<
endmsg
;
63
64
trans->
setCombinedLikelihood
( pers->
m_combinedLikelihood
);
65
66
trans->
setJetAuthor
( pers->
m_author
);
67
68
size_t
ntag = pers->
m_tagJetInfo
.size();
69
for
(
size_t
i=0;i<ntag;i++){
70
Jet::taginfo_t
* tagi =
dynamic_cast<
Jet::taginfo_t
*
>
(pers->
m_tagJetInfo
[i]);
71
if
(tagi) trans->
setTagInfo
(tagi->
infoType
(), tagi);
72
}
73
74
// Constitutents are now Associations
75
//trans->m_constituents = pers->m_constituents;
76
size_t
nconst = pers->
m_constituents
.size();
77
for
(
size_t
i=0;i<nconst;i++){
78
Analysis::IConstituent
* iconstit = pers->
m_constituents
[i];
79
std::string constit_name = iconstit->
name
();
80
msg
<< MSG::DEBUG <<
" constituent = "
<< constit_name <<
endmsg
;
81
82
83
84
delete
iconstit;
85
}
86
87
88
const_cast<
ParticleJet_p1
*
>
(pers)->m_tagJetInfo.clear();
89
const_cast<
ParticleJet_p1
*
>
(pers)->m_constituents.clear();
90
}
91
92
void
93
ParticleJetCnv_p1::transToPers
(
const
Jet
*
/*trans*/
,
94
ParticleJet_p1
* ,
95
MsgStream&
msg
)
const
96
{
97
msg
<< MSG::ERROR <<
"Creating persistent state of ParticleJet... This should not happen anymore"
98
<<
endmsg
;
99
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:61
ElectronAssociation.h
ElectronConstituent.h
momCnv
static const P4ImplPxPyPzECnv_p1 momCnv
Definition
JetCnv_p1.cxx:30
MuonAssociation.h
MuonConstituent.h
P4ImplPxPyPzECnv_p1.h
ParticleBaseCnv_p1.h
partBaseCnv
static const ParticleBaseCnv_p1 partBaseCnv
Definition
ParticleJetCnv_p1.cxx:40
ParticleJetCnv_p1.h
Jet.h
Analysis::IConstituent
Class IConstituent: This is the abstract base class for additional jet constituents to be put into th...
Definition
IConstituent.h:43
Analysis::IConstituent::name
virtual NameType name() const =0
returns the infoType of the info objects.
Analysis::ITagInfo::infoType
virtual TagInfoType infoType() const =0
a clone method for the proper workings of the copy constructor
Jet
Definition
Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
Jet::taginfo_t
JetTagInfoBase taginfo_t
Definition
Reconstruction/Jet/JetEvent/JetEvent/Jet.h:129
Jet::setJetAuthor
void setJetAuthor(const std::string &author)
Set author of this Jet (only the author, tags unchanged).
Definition
Jet.cxx:1094
Jet::setCombinedLikelihood
void setCombinedLikelihood(const std::vector< double > &combinedLikelihood)
(depreciated) Likelihood store setter
Definition
Jet.cxx:978
Jet::setTagInfo
void setTagInfo(const mkey_t &key, const taginfo_t *pTagInfo, bool useLink=false)
Set tag info object.
Definition
Jet.cxx:853
P4ImplPxPyPzECnv_p1
Definition
P4ImplPxPyPzECnv_p1.h:38
P4PxPyPzE_p1::m_ene
float m_ene
Definition
P4PxPyPzE_p1.h:42
ParticleBaseCnv_p1
Definition
ParticleBaseCnv_p1.h:30
ParticleJetCnv_p1::persToTrans
virtual void persToTrans(const ParticleJet_p1 *persObj, Jet *transObj, MsgStream &msg) const override
Method creating the transient representation of Jet from its persistent representation ParticleJet_p1...
Definition
ParticleJetCnv_p1.cxx:44
ParticleJetCnv_p1::transToPers
virtual void transToPers(const Jet *transObj, ParticleJet_p1 *persObj, MsgStream &msg) const override
Method creating the persistent representation ParticleJet_p1 from its transient representation Jet.
Definition
ParticleJetCnv_p1.cxx:93
ParticleJet_p1
Definition
ParticleJet_p1.h:35
ParticleJet_p1::m_particleBase
ParticleBase_p1 m_particleBase
the ParticleBase part
Definition
ParticleJet_p1.h:65
ParticleJet_p1::m_combinedLikelihood
std::vector< double > m_combinedLikelihood
combined likelihoods
Definition
ParticleJet_p1.h:70
ParticleJet_p1::m_constituents
std::vector< Analysis::IConstituent * > m_constituents
IConstituents objects.
Definition
ParticleJet_p1.h:79
ParticleJet_p1::m_momentum
P4PxPyPzE_p1 m_momentum
the 4-mom part
Definition
ParticleJet_p1.h:62
ParticleJet_p1::m_author
std::string m_author
authors
Definition
ParticleJet_p1.h:73
ParticleJet_p1::m_tagJetInfo
std::vector< Analysis::ITagInfo * > m_tagJetInfo
ITagInfo objects.
Definition
ParticleJet_p1.h:76
ParticleSigStateImpl::setSignalState
virtual bool setSignalState(state_t s)
set the current signal state
Definition
ParticleSigStateImpl.h:1157
ParticleSigStateImpl::particleBase
const particle_type & particleBase() const
access to underlying base type (IParticle-like)
Definition
ParticleSigStateImpl.h:469
ParticleSigStateImpl::e
virtual double e() const
energy
Definition
ParticleSigStateImpl.h:751
ParticleSigStateImpl::momentumBase
const momentum_type & momentumBase(state_t s) const
access to underlying base type (I4Momentum-like)
Definition
ParticleSigStateImpl.h:447
P4SignalState::CALIBRATED
@ CALIBRATED
Definition
ISignalState.h:31
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0