ATLAS Offline Software
Public Member Functions | List of all members
TauJetCnv_p1 Class Reference

#include <TauJetCnv_p1.h>

Collaboration diagram for TauJetCnv_p1:

Public Member Functions

 TauJetCnv_p1 ()
 
void persToTrans (const TauJet_p1 *persObj, Analysis ::TauJet *transObj, MsgStream &msg) const
 
void transToPers (const Analysis ::TauJet *transObj, TauJet_p1 *persObj, MsgStream &msg) const
 

Detailed Description

Definition at line 23 of file TauJetCnv_p1.h.

Constructor & Destructor Documentation

◆ TauJetCnv_p1()

TauJetCnv_p1::TauJetCnv_p1 ( )
inline

Definition at line 26 of file TauJetCnv_p1.h.

26 {};

Member Function Documentation

◆ persToTrans()

void TauJetCnv_p1::persToTrans ( const TauJet_p1 persObj,
Analysis ::TauJet transObj,
MsgStream &  msg 
) const

Definition at line 39 of file TauJetCnv_p1.cxx.

42 {
43  momCnv.persToTrans( &pers->m_momentum, &trans->momentumBase(), msg );
44  partBaseCnv.persToTrans( &pers->m_particleBase, &trans->particleBase(),
45  msg );
46  clusterCnv.persToTrans( &pers->m_cluster, &trans->clusterLink(), msg );
47  clusterCnv.persToTrans( &pers->m_cellCluster, &trans->cellClusterLink(), msg );
48  jetCnv.persToTrans( &pers->m_jet, &trans->jetLink(), msg );
49  tracksCnv.persToTrans( &pers->m_tracks, &trans->trackLinkVector(), msg );
50  detailsCnv.persToTrans( &pers->m_tauDetails, &trans->tauDetailLinkVector(), msg );
51  trans->setNumberOfTracks (pers->m_numberOfTracks);
52  trans->setROIWord (pers->m_roiWord);
53 
54  if( getBit( pers->m_flags, 0 ) )
55  {
56  std::vector<std::pair<TauJetParameters::TauID, double> > params;
57  params.reserve(pers->m_params.size());
58  for (const auto& p : pers->m_params) {
59  params.emplace_back( static_cast<TauJetParameters::TauID>( p.first),
60  p.second);
61  }
62 
63  Analysis::TauPID* tauID = new Analysis::TauPID (std::move(params),
64  std::bitset<32>(),
65  pers->m_vetoFlags);
66  trans->setTauID (tauID);
67  }
68  else
69  trans->setTauID( 0 );
70 
71  if( getBit( pers->m_flags, 2 ) )
72  trans->setAuthor( TauJetParameters :: tauRec );
73  if( getBit( pers->m_flags, 3 ) )
74  trans->setAuthor( TauJetParameters :: tau1P3P );
75 }

◆ transToPers()

void TauJetCnv_p1::transToPers ( const Analysis ::TauJet transObj,
TauJet_p1 persObj,
MsgStream &  msg 
) const

Definition at line 77 of file TauJetCnv_p1.cxx.

80 {
81  pers->m_params.clear();
82  momCnv.transToPers( &trans->momentumBase(), &pers->m_momentum, msg );
83  partBaseCnv.transToPers( &trans->particleBase(), &pers->m_particleBase, msg );
84  const ElementLink<CaloClusterContainer> clusterLink = trans->clusterLink();
85  clusterCnv.transToPers( &clusterLink, &pers->m_cluster, msg );
86  const ElementLink<CaloClusterContainer> cellClusterLink = trans->cellClusterLink();
87  clusterCnv.transToPers( &cellClusterLink, &pers->m_cellCluster, msg );
88  const ElementLink<JetCollection> jetLink = trans->jetLink();
89  jetCnv.transToPers( &jetLink, &pers->m_jet, msg );
90  tracksCnv.transToPers( &trans->trackLinkVector(), &pers->m_tracks, msg );
91  detailsCnv.transToPers( &trans->tauDetailLinkVector(), &pers->m_tauDetails, msg );
92  pers->m_numberOfTracks = trans->numberOfTracks();
93  pers->m_roiWord = trans->ROIWord();
94 
95  if( trans->tauID() )
96  {
97  setBit( pers->m_flags, 0, true );
98 
99  pers->m_vetoFlags = trans->tauID()->vetoFlags().to_ulong();
100 
101  pers->m_params.reserve (trans->tauID()->params().size());
102  for (const auto& p : trans->tauID()->params()) {
103  pers->m_params.emplace_back (static_cast<int>( p.first ), p.second);
104  }
105  }
106  else
107  setBit( pers->m_flags, 0, false );
108 
109  if( trans->hasAuthor( TauJetParameters :: tauRec ) )
110  setBit( pers->m_flags, 2, true );
111  if( trans->hasAuthor( TauJetParameters :: tau1P3P ) )
112  setBit( pers->m_flags, 3, true );
113 }

The documentation for this class was generated from the following files:
Analysis::TauPID
Class containing discriminants produced by identification algorithms.
Definition: TauPID.h:32
TauJetParameters::tau1P3P
@ tau1P3P
Definition: TauJetParameters.h:36
ElementLinkVectorCnv_p1::persToTrans
void persToTrans(const PersLinkVect_t &pers, LinkVect_t &trans, MsgStream &log) const
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
TauJetParameters::tauRec
@ tauRec
Definition: TauJetParameters.h:35
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ElementLinkCnv_p1::transToPers
void transToPers(const Link_t &trans, PersLink_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
TauJetParameters::TauID
TauID
Enum for discriminants.
Definition: TauJetParameters.h:44
ElementLinkCnv_p1::persToTrans
void persToTrans(const PersLink_t &pers, Link_t &trans, MsgStream &log) const
P4ImplEEtaPhiMCnv_p1::transToPers
virtual void transToPers(const P4ImplEEtaPhiM *transObj, P4ImplEEtaPhiM_p1 *persObj, MsgStream &msg) const override
Method creating the persistent representation P4ImplEEtaPhiM_p1 from its transient representation P4I...
Definition: P4ImplEEtaPhiMCnv_p1.cxx:38
ElementLinkVectorCnv_p1::transToPers
void transToPers(const LinkVect_t &trans, PersLinkVect_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
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
ParticleBaseCnv_p1::transToPers
virtual void transToPers(const ParticleBase *transObj, ParticleBase_p1 *persObj, MsgStream &msg) const final
Method creating the persistent representation ParticleBase_p1 from its transient representation Parti...
Definition: ParticleBaseCnv_p1.cxx:80
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7