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

Transient<->persistent converter for Analysis::TauCommonDetails v3. More...

#include <TauJetCnv_p3.h>

Collaboration diagram for TauJetCnv_p3:

Public Member Functions

 TauJetCnv_p3 ()
 Constructor. More...
 
void persToTrans (const TauJet_p3 *pers, Analysis::TauJet *trans, MsgStream &msg) const
 Fills a transient object from a persistent object. More...
 
void transToPers (const Analysis::TauJet *trans, TauJet_p3 *pers, MsgStream &msg) const
 Fills a persistent object from a transient object
More...
 

Detailed Description

Transient<->persistent converter for Analysis::TauCommonDetails v3.

Definition at line 27 of file TauJetCnv_p3.h.

Constructor & Destructor Documentation

◆ TauJetCnv_p3()

TauJetCnv_p3::TauJetCnv_p3 ( )
inline

Constructor.

Definition at line 31 of file TauJetCnv_p3.h.

31 {}

Member Function Documentation

◆ persToTrans()

void TauJetCnv_p3::persToTrans ( const TauJet_p3 pers,
Analysis::TauJet trans,
MsgStream &  msg 
) const

Fills a transient object from a persistent object.

Parameters
persPersistent object
transTransient object
msgMessage stream

Definition at line 52 of file TauJetCnv_p3.cxx.

55 {
56  momCnv.persToTrans( &pers->m_momentum, &trans->momentumBase(), msg );
57  partBaseCnv.persToTrans( &pers->m_particleBase, &trans->particleBase(),
58  msg );
59  clusterCnv.persToTrans( &pers->m_cluster, &trans->clusterLink(), msg );
60  clusterCnv.persToTrans( &pers->m_cellCluster, &trans->cellClusterLink(), msg );
61  jetCnv.persToTrans( &pers->m_jet, &trans->jetLink(), msg );
62  tracksCnv.persToTrans( &pers->m_tracks, &trans->trackLinkVector(), msg );
63  detailsCnv.persToTrans( &pers->m_tauDetails, &trans->tauDetailLinkVector(), msg );
64  trans->setNumberOfTracks (pers->m_numberOfTracks);
65  trans->setROIWord (pers->m_roiWord);
66 
67  if( getBit( pers->m_flags, 0 ) ) {
68  std::vector<std::pair<TauJetParameters::TauID, double> > params;
69  params.reserve(pers->m_params.size());
70  for (const auto& p : pers->m_params) {
71  params.emplace_back( static_cast<TauJetParameters::TauID>( p.first),
72  p.second);
73 
74  }
75 
76  Analysis::TauPID* tauID = new Analysis::TauPID (std::move(params),
77  pers->m_isTauFlags,
78  pers->m_vetoFlags);
79  trans->setTauID (tauID);
80  } else {
81  trans->setTauID( 0 );
82  }
83 
84  if( getBit( pers->m_flags, 2 ) )
86  if( getBit( pers->m_flags, 3 ) )
88  conversionTracksCnv.persToTrans(
89  &pers->m_conversionTracks,
90  &trans->conversionTrackLinkVector(), msg );
91 }

◆ transToPers()

void TauJetCnv_p3::transToPers ( const Analysis::TauJet trans,
TauJet_p3 pers,
MsgStream &  msg 
) const

Fills a persistent object from a transient object

Parameters
transTransient object
persPersistent object
msgMessage stream

Definition at line 93 of file TauJetCnv_p3.cxx.

96 {
97  momCnv.transToPers( &trans->momentumBase(), &pers->m_momentum, msg );
98  partBaseCnv.transToPers( &trans->particleBase(), &pers->m_particleBase,
99  msg );
100  const ElementLink<CaloClusterContainer> clusterLink = trans->clusterLink();
101  clusterCnv.transToPers( &clusterLink, &pers->m_cluster, msg );
102  const ElementLink<CaloClusterContainer> cellClusterLink = trans->cellClusterLink();
103  clusterCnv.transToPers( &cellClusterLink, &pers->m_cellCluster, msg );
104  const ElementLink<JetCollection> jetLink = trans->jetLink();
105  jetCnv.transToPers( &jetLink, &pers->m_jet, msg );
106  tracksCnv.transToPers( &trans->trackLinkVector(), &pers->m_tracks, msg );
107  detailsCnv.transToPers( &trans->tauDetailLinkVector(), &pers->m_tauDetails, msg );
108  pers->m_numberOfTracks = trans->numberOfTracks();
109  pers->m_roiWord = trans->ROIWord();
110  pers->m_params.clear();
111 
112 
113  if( trans->tauID() ) {
114  setBit( pers->m_flags, 0, true );
115 
116  pers->m_vetoFlags = trans->tauID()->vetoFlags().to_ulong();
117  pers->m_isTauFlags = trans->tauID()->isTauFlags().to_ulong();
118 
119  pers->m_params.reserve (trans->tauID()->params().size());
120  for (const auto& p : trans->tauID()->params()) {
121  pers->m_params.emplace_back (static_cast<int>( p.first ), p.second);
122  }
123  } else {
124  setBit( pers->m_flags, 0, false );
125  }
126  if( trans->hasAuthor( TauJetParameters::tauRec ) )
127  setBit( pers->m_flags, 2, true );
128  if( trans->hasAuthor( TauJetParameters::tau1P3P ) )
129  setBit( pers->m_flags, 3, true );
130  conversionTracksCnv.transToPers(
131  &trans->conversionTrackLinkVector(),
132  &pers->m_conversionTracks, msg );
133 }

The documentation for this class was generated from the following files:
Analysis::TauJet::setROIWord
void setROIWord(unsigned int RoiWord)
Set ROI Word (trigger purposes)
Analysis::TauJet::setTauID
void setTauID(TauPID *tauID)
Set TauPID object that contains discriminant values.
TauJet_p3::m_momentum
P4EEtaPhiMFloat_p2 m_momentum
Definition: TauJet_p3.h:50
Analysis::TauPID
Class containing discriminants produced by identification algorithms.
Definition: TauPID.h:32
TauJetParameters::tau1P3P
@ tau1P3P
Definition: TauJetParameters.h:36
TauJet_p3::m_vetoFlags
unsigned long m_vetoFlags
Definition: TauJet_p3.h:61
TauJet_p3::m_tracks
ElementLinkIntVector_p1 m_tracks
Definition: TauJet_p3.h:55
Analysis::TauJet::hasAuthor
bool hasAuthor(const TauJetParameters ::Author &author) const
check if this object has Author author (can be more than one)
TauJet_p3::m_flags
unsigned char m_flags
Definition: TauJet_p3.h:57
TauJet_p3::m_numberOfTracks
unsigned long m_numberOfTracks
Definition: TauJet_p3.h:63
Analysis::TauJet::numberOfTracks
unsigned int numberOfTracks() const
Get number of tracks.
ElementLinkVectorCnv_p1::persToTrans
void persToTrans(const PersLinkVect_t &pers, LinkVect_t &trans, MsgStream &log) const
Analysis::TauJet::jetLink
const ElementLink< JetCollection > jetLink() const
ElementLink to seed Jet, might be invalid if not seeded from a Jet
TauJet_p3::m_cellCluster
ElementLinkInt_p1 m_cellCluster
Definition: TauJet_p3.h:53
Analysis::TauPID::isTauFlags
const std::bitset< 32 > & isTauFlags() const
Definition: TauPID.cxx:90
Analysis::TauJet::tauID
const TauPID * tauID() const
Get TauPID object containing discriminant values.
TauJet_p3::m_jet
ElementLinkInt_p1 m_jet
Definition: TauJet_p3.h:54
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
TauJet_p3::m_isTauFlags
unsigned long m_isTauFlags
Definition: TauJet_p3.h:62
TauJet_p3::m_tauDetails
ElementLinkIntVector_p1 m_tauDetails
Definition: TauJet_p3.h:56
TauJet_p3::m_cluster
ElementLinkInt_p1 m_cluster
Definition: TauJet_p3.h:52
Analysis::TauJet::conversionTrackLinkVector
const ElementLinkVector< Rec::TrackParticleContainer > & conversionTrackLinkVector() const
Get conversion track element link vector (const)
Analysis::TauPID::vetoFlags
const std::bitset< 32 > & vetoFlags() const
Definition: TauPID.cxx:94
Analysis::TauJet::clusterLink
const ElementLink< CaloClusterContainer > clusterLink() const
ElementLink to seed CaloCluster, DEPRECATED as of release 13
ParticleImpl::momentumBase
const momentum_type & momentumBase() const
access to underlying base type (I4Momentum-like)
Definition: ParticleImpl.h:393
Analysis::TauJet::ROIWord
unsigned int ROIWord() const
Retrieve ROI Word (trigger purposes)
TauJetParameters::TauID
TauID
Enum for discriminants.
Definition: TauJetParameters.h:44
P4ImplEEtaPhiMCnv_p2::transToPers
virtual void transToPers(const P4ImplEEtaPhiM *transObj, P4EEtaPhiMFloat_p2 *persObj, MsgStream &log) const override
Method creating the persistent representation P4EEtaPhiMFloat_p2 from its transient representation P4...
Definition: P4ImplEEtaPhiMCnv_p2.cxx:38
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
P4ImplEEtaPhiMCnv_p2::persToTrans
virtual void persToTrans(const P4EEtaPhiMFloat_p2 *persObj, P4ImplEEtaPhiM *transObj, MsgStream &log) const override
Method creating the transient representation of P4ImplEEtaPhiM from its persistent representation P4E...
Definition: P4ImplEEtaPhiMCnv_p2.cxx:26
TauJet_p3::m_params
std ::vector< std ::pair< int, float > > m_params
Definition: TauJet_p3.h:65
TauJet_p3::m_roiWord
unsigned int m_roiWord
Definition: TauJet_p3.h:64
Analysis::TauJet::trackLinkVector
const ElementLinkVector< Rec::TrackParticleContainer > & trackLinkVector() const
Get track link vector.
ElementLinkVectorCnv_p1::transToPers
void transToPers(const LinkVect_t &trans, PersLinkVect_t &pers, const SG::ThinningCache *cache, MsgStream &log) const
Analysis::TauJet::setNumberOfTracks
void setNumberOfTracks(unsigned int numberOfTracks)
Set number of tracks @ param numberOfTracks Number of tracks.
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
TauJet_p3::m_particleBase
ParticleBase_p1 m_particleBase
Definition: TauJet_p3.h:51
TauJet_p3::m_conversionTracks
ElementLinkIntVector_p1 m_conversionTracks
Definition: TauJet_p3.h:66
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
Analysis::TauJet::cellClusterLink
const ElementLink< CaloClusterContainer > cellClusterLink() const
ElementLink to cell CaloCluster, might be invalid the ID variables are calculated from this cluster i...
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Analysis::TauJet::setAuthor
void setAuthor(const TauJetParameters ::Author &author)
set the author flag to true
Analysis::TauPID::params
const std::vector< std::pair< TauJetParameters::TauID, double > > & params() const
Definition: TauPID.cxx:86
Analysis::TauJet::tauDetailLinkVector
ElementLinkVector< TauDetailsContainer > & tauDetailLinkVector()