ATLAS Offline Software
egammaCnv_p1.cxx
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // egammaCnv_p1.cxx
8 // Implementation file for class egammaCnv_p1
9 // Author: K.Cranmer<cranmer@cern.ch>
10 // Author: S.Binet<binet@cern.ch>
12 
13 
14 // STL includes
15 
16 #include "GaudiKernel/GaudiException.h"
17 
18 // egammaEventTPCnv includes
20 
21 // some constants used to keep consistency over business of egPID conversion
22 // --hack-hack-hack-- (ugly-ugly)
23 
25 // Public methods:
27 
28 // Constructors
30 
31 // Destructor
33 
35 // Const methods:
37 
39  egamma* trans,
40  MsgStream& msg )
41 {
42 // msg << MSG::DEBUG << "Loading egamma from persistent state..."
43 // << endmsg;
44 
45  // Clear
46  *trans = egamma (pers->m_author);
47 
49  &trans->momentumBase(),
50  msg);
52  &trans->particleBase(),
53  msg);
54 
55  // element links
57  m_clusterCnv.persToTrans( &pers->m_cluster, &cluster, msg );
58  trans->setClusterElementLink (cluster);
59 
62  &el,
63  msg );
65 
68  &vx,
69  msg );
70  trans->setConversionElementLink(vx);
71 
74  &egDetails,
75  msg );
76  trans->setDetailElementLinkVector (std::move (egDetails));
77 
78  // egPID filling (doubles)
79  {
80  const std::vector<double>& egID = pers->m_egammaDblPIDs;
81  const std::vector<unsigned int>& egEnum = pers->m_egammaEnumPIDs;
82 
83  // if you crash here, then there is a data corruption...
84  assert( egEnum.size() == egID.size() );
85 
86  for ( unsigned int i=0; i< egID.size(); i++ ) {
87  trans->set_egammaID( (egammaPIDObs::PID) egEnum[i], egID[i] );
88  }
89  }
90  //Clearing Rings ElementLink:
91  trans->resetRings();
92 }
93 
94 void egammaCnv_p1::transToPers( const egamma* /*trans*/,
95  egamma_p1* /*pers*/,
96  MsgStream& /*msg*/ )
97 {
98 
99  throw GaudiException("Deprecated method, we have evolved to use egamma_p2.Please migrate to use egammaCnv_p2::transToPers","egammaCnv_p1::transToPers", StatusCode::FAILURE);
100 }
egammaCnv_p1.h
egamma::setDetailElementLinkVector
void setDetailElementLinkVector(const ElementLinkVector< egDetailContainer > &v)
Definition: egamma.cxx:627
egamma_p1
Definition: egamma_p1.h:33
egamma_p1::m_particleBase
ParticleBase_p1 m_particleBase
the ParticleBase part
Definition: egamma_p1.h:63
egamma_p1::m_cluster
ElementLinkInt_p1 m_cluster
links to clusters
Definition: egamma_p1.h:68
egammaPIDObs::PID
PID
Definition: egammaPIDdefsObs.h:53
ElementLinkVector< egDetailContainer >
ElementLinkVectorCnv_p1::persToTrans
void persToTrans(const PersLinkVect_t &pers, LinkVect_t &trans, MsgStream &log) const
egamma_p1::m_trackParticle
ElementLinkInt_p1 m_trackParticle
links to tracks
Definition: egamma_p1.h:71
egamma_p1::m_author
unsigned int m_author
Definition: egamma_p1.h:80
egamma_p1::m_egDetails
ElementLinkIntVector_p1 m_egDetails
links to egDetails
Definition: egamma_p1.h:77
egamma
Definition: egamma.h:58
egammaCnv_p1::m_conversionCnv
ConversionLinkCnv_t m_conversionCnv
Definition: egammaCnv_p1.h:84
egamma_p1::m_conversion
ElementLinkInt_p1 m_conversion
links to tracks
Definition: egamma_p1.h:74
ParticleBaseCnv_p1::persToTrans
virtual void persToTrans(const ParticleBase_p1 *persObj, ParticleBase *transObj, MsgStream &msg) const final
Method creating the transient representation of ParticleBase from its persistent representation Parti...
Definition: ParticleBaseCnv_p1.cxx:49
egamma_p1::m_egammaDblPIDs
std::vector< double > m_egammaDblPIDs
Definition: egamma_p1.h:84
egamma::resetRings
void resetRings()
Reset Cluster.
Definition: egamma.cxx:479
lumiFormat.i
int i
Definition: lumiFormat.py:85
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
egamma::setTrackParticleElementLink
void setTrackParticleElementLink(const ElementLink< Rec::TrackParticleContainer > &link)
Set Track Particle Link.
Definition: egamma.cxx:543
egammaCnv_p1::m_clusterCnv
ClusterLinkCnv_t m_clusterCnv
Definition: egammaCnv_p1.h:82
ParticleImpl::momentumBase
const momentum_type & momentumBase() const
access to underlying base type (I4Momentum-like)
Definition: ParticleImpl.h:393
ParticleImpl::particleBase
const particle_type & particleBase() const
access to underlying base type (IParticle-like)
Definition: ParticleImpl.h:403
ElementLinkCnv_p1::persToTrans
void persToTrans(const PersLink_t &pers, Link_t &trans, MsgStream &log) const
egamma::set_egammaID
bool set_egammaID(egammaPIDObs::PID id, double result)
set_egamma ID, for doubles and all possible weights as likelihood
Definition: egamma.cxx:329
egamma_p1::m_momentum
P4EEtaPhiM_p1 m_momentum
the 4-mom part
Definition: egamma_p1.h:60
egamma::setClusterElementLink
void setClusterElementLink(const ElementLink< CaloClusterContainer > &link)
Set Cluster Element Link.
Definition: egamma.cxx:512
egammaCnv_p1::m_trackCnv
TrackLinkCnv_t m_trackCnv
Definition: egammaCnv_p1.h:83
P4ImplEEtaPhiMCnv_p1::persToTrans
virtual void persToTrans(const P4ImplEEtaPhiM_p1 *persObj, P4ImplEEtaPhiM *transObj, MsgStream &msg) const override
Method creating the transient representation of P4ImplEEtaPhiM from its persistent representation P4I...
Definition: P4ImplEEtaPhiMCnv_p1.cxx:26
egammaCnv_p1::m_partBaseCnv
ParticleBaseCnv_p1 m_partBaseCnv
Definition: egammaCnv_p1.h:81
egammaCnv_p1::m_momCnv
P4ImplEEtaPhiMCnv_p1 m_momCnv
Definition: egammaCnv_p1.h:80
egammaCnv_p1::transToPers
virtual void transToPers(const egamma *transObj, egamma_p1 *persObj, MsgStream &msg) override final
Method creating the persistent representation egamma_p1 from its transient representation egamma.
Definition: egammaCnv_p1.cxx:94
egamma_p1::m_egammaEnumPIDs
std::vector< unsigned int > m_egammaEnumPIDs
egamma PID
Definition: egamma_p1.h:83
egammaCnv_p1::m_egDetailsCnv
EgDetailsCnv_t m_egDetailsCnv
Definition: egammaCnv_p1.h:85
egammaCnv_p1::persToTrans
virtual void persToTrans(const egamma_p1 *persObj, egamma *transObj, MsgStream &msg) override final
Method creating the transient representation of egamma from its persistent representation egamma_p1.
Definition: egammaCnv_p1.cxx:38
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
egamma::setConversionElementLink
void setConversionElementLink(const ElementLink< VxContainer > &link)
Set Conversion.
Definition: egamma.cxx:588