ATLAS Offline Software
JetCnv_p1.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // JetCnv_p1.cxx
8 // Implementation file for class JetCnv_p1
9 // Author: S.Binet<binet@cern.ch>
11 
12 
13 // STL includes
14 
15 // JetEvent includes
16 #include "JetEvent/Jet.h"
17 
18 // DataModelAthenaPool includes
20 
21 // EventCommonTPCnv includes
23 
24 // JetEventTPCnv includes
26 
28 
29 // pre-allocate converters
30 static const P4ImplPxPyPzECnv_p1 momCnv;
31 static const NavigableCnv_t navCnv;
32 
33 
34 void JetCnv_p1::persToTrans( const Jet_p1* pers,
35  Jet* trans,
36  MsgStream& msg ) const
37 {
38 // msg << MSG::DEBUG << "Loading Jet from persistent state..."
39 // << endmsg;
40  navCnv.persToTrans( &pers->m_nav,
41  &trans->navigableBase(),
42  msg );
43  momCnv.persToTrans( &pers->m_momentum, &trans->momentumBase(), msg );
44 
46 // msg << MSG::DEBUG << "Loaded Jet from persistent state [OK]"
47 // << endmsg;
48 
49  // Jet comes from a DataPool.
50  // So we need to be sure to re-initialize everything in the Jet.
51  trans->setCombinedLikelihood (std::vector<double>());
52  trans->setJetAuthor ("Unknown");
53  if (trans->m_tagInfoStore)
54  trans->m_tagInfoStore->clear();
55  // if (trans->m_shapeStore)
56  // trans->m_shapeStore->clear();
57  if (trans->m_assocStore)
58  trans->m_assocStore->clear();
59 
60  trans->setRawE( trans->e() ) ;
61  trans->setRawPx( trans->px() ) ;
62  trans->setRawPy( trans->py() ) ;
63  trans->setRawPz( trans->pz() ) ;
64 
65  static const Jet jtmp;
66  trans->particleBase() = jtmp.particleBase();
67 }
68 
69 void JetCnv_p1::transToPers( const Jet* /*trans*/,
70  Jet_p1* /*pers*/,
71  MsgStream& /*msg*/ ) const
72 {
73 // msg << MSG::DEBUG << "Creating persistent state of Jet..."
74 // << endmsg;
75 
76  // navCnv.transToPers( &trans->navigableBase(),
77  // &pers->m_nav, msg );
78  // momCnv.transToPers( &trans->momentumBase(), &pers->m_momentum, msg );
79 
80 // msg << MSG::DEBUG << "Created persistent state of Jet [OK]"
81 // << endmsg;
82  }
ParticleSigStateImpl::py
virtual double py() const
y component of momentum
Definition: ParticleSigStateImpl.h:679
ParticleSigStateImpl::e
virtual double e() const
energy
Definition: ParticleSigStateImpl.h:751
Jet
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
JetCnv_p1.h
ParticleSigStateImpl::px
virtual double px() const
We re-define here extra class routines that will allow direct access to signal state kinematics witho...
Definition: ParticleSigStateImpl.h:671
Jet_p1::m_nav
Navigable_p1< uint32_t, double > m_nav
the navigable part
Definition: Jet_p1.h:63
ParticleSigStateImpl::particleBase
const particle_type & particleBase() const
access to underlying base type (IParticle-like)
Definition: ParticleSigStateImpl.h:469
Jet_p1
Definition: Jet_p1.h:28
ParticleSigStateImpl::momentumBase
const momentum_type & momentumBase(state_t s) const
access to underlying base type (I4Momentum-like)
Definition: ParticleSigStateImpl.h:447
NavigableCnv_p1::persToTrans
void persToTrans(const PersNavigable_t &pers, Navigable_t &trans, MsgStream &log) const
P4ImplPxPyPzECnv_p1.h
Jet::setRawPy
void setRawPy(double py)
Sets uncalibrated .
Definition: Jet.cxx:905
Jet::setRawE
void setRawE(double e)
Sets uncalibrated
Definition: Jet.cxx:901
Jet::setCombinedLikelihood
void setCombinedLikelihood(const std::vector< double > &combinedLikelihood)
(depreciated) Likelihood store setter
Definition: Jet.cxx:978
Jet::m_tagInfoStore
tagstore_t * m_tagInfoStore
Tag info store.
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:741
Jet::setRawPz
void setRawPz(double pz)
Sets uncalibrated .
Definition: Jet.cxx:907
ParticleSigStateImpl::navigableBase
const navigable_type & navigableBase() const
access to underlying base type (INavigable-like)
Definition: ParticleSigStateImpl.h:439
P4ImplPxPyPzECnv_p1
Definition: P4ImplPxPyPzECnv_p1.h:38
P4SignalState::JETFINAL
@ JETFINAL
Definition: ISignalState.h:34
Jet::m_assocStore
assostore_t * m_assocStore
key descriptor for all jet stores
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:738
Jet_p1::m_momentum
P4PxPyPzE_p1 m_momentum
the 4-mom part
Definition: Jet_p1.h:66
ParticleSigStateImpl::setSignalState
virtual bool setSignalState(state_t s)
set the current signal state
Definition: ParticleSigStateImpl.h:1157
Jet.h
P4ImplPxPyPzECnv_p1::persToTrans
virtual void persToTrans(const P4ImplPxPyPzE_p1 *persObj, P4ImplPxPyPzE *transObj, MsgStream &msg) const override
Method creating the transient representation of P4ImplPxPyPzE from its persistent representation P4Im...
Definition: P4ImplPxPyPzECnv_p1.cxx:26
NavigableCnv_p1.h
This file contains the class definition for the NavigableCnv_p1 class. NOTE: it should be included fi...
ParticleSigStateImpl::pz
virtual double pz() const
z component of momentum
Definition: ParticleSigStateImpl.h:687
JetCnv_p1::transToPers
virtual void transToPers(const Jet *transObj, Jet_p1 *persObj, MsgStream &msg) const override
Method creating the persistent representation Jet_p1 from its transient representation Jet.
Definition: JetCnv_p1.cxx:69
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Jet::setRawPx
void setRawPx(double px)
Sets uncalibrated .
Definition: Jet.cxx:903
JetCnv_p1::persToTrans
virtual void persToTrans(const Jet_p1 *persObj, Jet *transObj, MsgStream &msg) const override
Method creating the transient representation of Jet from its persistent representation Jet_p1.
Definition: JetCnv_p1.cxx:34
Jet::setJetAuthor
void setJetAuthor(const std::string &author)
Set author of this Jet (only the author, tags unchanged)
Definition: Jet.cxx:1094
NavigableCnv_p1
Definition: NavigableCnv_p1.h:29