ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TrigMuonEFInfoToMuonCnvTool Class Reference

#include <TrigMuonEFInfoToMuonCnvTool.h>

Inheritance diagram for TrigMuonEFInfoToMuonCnvTool:
Collaboration diagram for TrigMuonEFInfoToMuonCnvTool:

Public Member Functions

 TrigMuonEFInfoToMuonCnvTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual ~TrigMuonEFInfoToMuonCnvTool ()=default
 Destructor. More...
 
virtual StatusCode initialize () override
 initialize the tool More...
 
virtual StatusCode convertTrigMuonEFInfo (const TrigMuonEFInfo &efinfo, xAOD::MuonContainer &muoncontainer, xAOD::TrackParticleContainer *combParticleContainer, xAOD::TrackParticleContainer *extrapParticleContainer) const override
 Convert a single TrigMuonEFInfo object into (maybe multiple) xAOD::Muon objects. More...
 
virtual StatusCode convertTrigMuonEFInfoContainer (const TrigMuonEFInfoContainer &efinfocont, xAOD::MuonContainer &muoncontainer, xAOD::TrackParticleContainer *combParticleContainer, xAOD::TrackParticleContainer *extrapParticleContainer) const override
 Convert full TrigMuonEFInfoContainer into xAOD::MuonContainer. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

StatusCode convertTrigMuonEFTrack (const TrigMuonEFTrack &eftrack, xAOD::TrackParticle &trackpart) const
 Convert TrigMuonEFTrack into a xAOD::TrackParticle. More...
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

bool m_makeIDTrackLink
 Flag to decide if we want to make element link to EF ID xAOD tracks - only turn on once EF ID conversion is done. More...
 
std::string m_inDetTrackParticles
 Name of container that holds the EF ID xAOD track particles. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 25 of file TrigMuonEFInfoToMuonCnvTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigMuonEFInfoToMuonCnvTool()

TrigMuonEFInfoToMuonCnvTool::TrigMuonEFInfoToMuonCnvTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard constructor.

Constructor - should declare any property settings in here.

Definition at line 20 of file TrigMuonEFInfoToMuonCnvTool.cxx.

20  :
22 {
23  declareInterface<ITrigMuonEFInfoToMuonCnvTool>(this);
24 
25  declareProperty( "MakeIDTrackLink", m_makeIDTrackLink = true);
26  declareProperty( "xAODEFInDetTrackParticleContainerName", m_inDetTrackParticles = "EFInDetTrackParticles" );
27 }

◆ ~TrigMuonEFInfoToMuonCnvTool()

virtual TrigMuonEFInfoToMuonCnvTool::~TrigMuonEFInfoToMuonCnvTool ( )
virtualdefault

Destructor.

Member Function Documentation

◆ convertTrigMuonEFInfo()

StatusCode TrigMuonEFInfoToMuonCnvTool::convertTrigMuonEFInfo ( const TrigMuonEFInfo efinfo,
xAOD::MuonContainer muoncontainer,
xAOD::TrackParticleContainer combParticleContainer,
xAOD::TrackParticleContainer extrapParticleContainer 
) const
overridevirtual

Convert a single TrigMuonEFInfo object into (maybe multiple) xAOD::Muon objects.

Convert input TrigMuonEFInfo object into multuple xAOD::Muon objects.

The xAOD::Muon objects are stored into the MuonContainer passed to the function. Since the xAOD::Muons hold links to xAOD::TrackParticles, then these TrackParticles are created and stored in the containers passed to the function (if not 0).

Implements ITrigMuonEFInfoToMuonCnvTool.

Definition at line 47 of file TrigMuonEFInfoToMuonCnvTool.cxx.

50  {
51 
52  ATH_MSG_DEBUG("Start conversion of TrigMuonEFInfo, n(muons) to convert = " << efinfo.TrackContainer()->size());
53  const int nmuin = muoncontainer.size();
54  // loop on TrigMuonEFInfoTracks attached to this TrigMuonEFInfo object
55  for( const auto *infotrk : *(efinfo.TrackContainer()) ) {
56 
57  if( !infotrk->hasExtrapolatedTrack() && !infotrk->hasCombinedTrack() ){
58  ATH_MSG_WARNING("TrigMuonEFInfoTrack has no extrapolated or combined track, will not be converted to xAOD");
59  continue;
60  }
61 
62  // TrigMuonEFInfoTracks are essentially muons, so create an xAOD::Muon at this point and put it in the container
63  xAOD::Muon* muon = new xAOD::Muon();
64  muoncontainer.push_back(muon);
65 
66  // make extrapolated TrackParticle and fill it
67  if(infotrk->hasExtrapolatedTrack()) {
68  const TrigMuonEFTrack* extraptrk = infotrk->ExtrapolatedTrack();
69  xAOD::TrackParticle* extrapTrackPart = new xAOD::TrackParticle();
70  if(extrapParticleContainer) extrapParticleContainer->push_back( extrapTrackPart );
71  else extrapTrackPart->makePrivateStore();
72 
73  StatusCode sc = convertTrigMuonEFTrack( *extraptrk, *extrapTrackPart );
74  if(sc.isFailure()) return sc;
75 
76  // create and set element link to the xAOD::TrackParticle
77  if(extrapParticleContainer) {
78  ElementLink<xAOD::TrackParticleContainer> link( *extrapParticleContainer, extrapParticleContainer->size() - 1 );
79  muon->setTrackParticleLink( xAOD::Muon::MuonSpectrometerTrackParticle, link );
80  }
81 
82  // set main muon 4-vector to the extrapolated track
83  muon->setP4(extraptrk->pt(),extraptrk->eta(),extraptrk->phi());
84  // set some author flags - note this relies on the 'knowledge' that we only ran muid at EF before 2015
85  muon->addAllAuthor(xAOD::Muon::MuidSA);
86  muon->setAuthor(xAOD::Muon::MuidSA);
87  muon->setMuonType(xAOD::Muon::MuonStandAlone);
88 
89  // clean up the track particle in case we did not put it in a container
90  if(!extrapParticleContainer) delete extraptrk;
91  }
92 
93  // make combined TrackParticle object and fill it
94  if(infotrk->hasCombinedTrack()) {
95  const TrigMuonEFCbTrack* combtrk = infotrk->CombinedTrack();
96  xAOD::TrackParticle* combinedTrackPart = new xAOD::TrackParticle();
97  if(combParticleContainer) combParticleContainer->push_back( combinedTrackPart );
98  else combinedTrackPart->makePrivateStore();
99 
100  StatusCode sc = convertTrigMuonEFTrack( *combtrk, *combinedTrackPart );
101  if(sc.isFailure()) return sc;
102 
103  // create and set element link to the xAOD::TrackParticle
104  if(combParticleContainer) {
105  ElementLink<xAOD::TrackParticleContainer> link( *combParticleContainer, combParticleContainer->size() - 1 );
106  muon->setTrackParticleLink( xAOD::Muon::CombinedTrackParticle, link );
107  }
108 
109  // set main muon 4-vector to the combined track
110  muon->setP4(combtrk->pt(),combtrk->eta(),combtrk->phi());
111  // set some author flags - note this relies on the 'knowledge' that we ran muid and mugirl at EF before 2015
112  if( infotrk->MuonType() == TrigMuonEFInfoTrack::MuonTypeEFMuon ) {
113  muon->addAllAuthor(xAOD::Muon::MuidCo);
114  muon->setAuthor(xAOD::Muon::MuidCo);
115  muon->setMuonType(xAOD::Muon::Combined);
116  } else {
117  muon->addAllAuthor(xAOD::Muon::MuGirl);
118  muon->setAuthor(xAOD::Muon::MuGirl);
119  // we set all MuGirl to be combined because we set the combined track, could change this once ID track link works
120  muon->setMuonType(xAOD::Muon::Combined);
121  //if( infotrk->MuonType() == TrigMuonEFInfoTrack::MuGirlMuonTag) muon->setMuonType(xAOD::Muon::SegmentTagged);
122  //else muon->setMuonType(xAOD::Muon::Combined);
123  }
124 
125  if(m_makeIDTrackLink) {
126  // create element link to the ID track
128  if(oldLink.isValid()) {
129  // This code assumes that the tracks in the xAOD EF ID track container are in the same order as in the Rec::TrackParticle container
130  // Same assumption was made in the offline code,
132  std::string name = m_inDetTrackParticles;
133  if (name.empty())
134  name = oldLink.dataID();
135  newLink.resetWithKeyAndIndex( name, oldLink.index() );
136  if(newLink.isValid()) ATH_MSG_VERBOSE("Successfully created element link to ID xAOD track particle");
137  else ATH_MSG_WARNING("Created an invalid element link to ID xAOD track particle");
138 
139  } else ATH_MSG_WARNING("TrigMuonEFCbTrack with invalid element link to ID track - cannot create link for xAOD muon");
140  }//create element link to ID track
141 
142  // clean up the track particle in case we did not put it in a container
143  if(!combParticleContainer) delete combinedTrackPart;
144 
145  } // valid combinedTrack
146 
147  }// loop on TrigMuonEFInfoTracks in the TrigMuonEFInfo objects
148 
149  ATH_MSG_DEBUG("Conversion finished, n(muons) added to xAOD container = " << muoncontainer.size()-nmuin);
150 
151  return StatusCode::SUCCESS;
152 
153 }// end convertTrigMuonEFInfo function

◆ convertTrigMuonEFInfoContainer()

StatusCode TrigMuonEFInfoToMuonCnvTool::convertTrigMuonEFInfoContainer ( const TrigMuonEFInfoContainer efinfocont,
xAOD::MuonContainer muoncontainer,
xAOD::TrackParticleContainer combParticleContainer,
xAOD::TrackParticleContainer extrapParticleContainer 
) const
overridevirtual

Convert full TrigMuonEFInfoContainer into xAOD::MuonContainer.

Implements ITrigMuonEFInfoToMuonCnvTool.

Definition at line 156 of file TrigMuonEFInfoToMuonCnvTool.cxx.

159  {
160  //loop on TrigMunEFInfo objects and convert them
161  for(const auto *efinfo : efinfocont) {
162  StatusCode sc = convertTrigMuonEFInfo( *efinfo, muoncontainer, combParticleContainer, extrapParticleContainer );
163  if(sc.isFailure()) return sc;
164  }
165 
166  return StatusCode::SUCCESS;
167 }// end convertTrigMuonEFInfoContainer

◆ convertTrigMuonEFTrack()

StatusCode TrigMuonEFInfoToMuonCnvTool::convertTrigMuonEFTrack ( const TrigMuonEFTrack eftrack,
xAOD::TrackParticle trackpart 
) const
protected

Convert TrigMuonEFTrack into a xAOD::TrackParticle.

Fill xAOD::TrackParticle with values from TrigMuonEFTrack.

Definition at line 172 of file TrigMuonEFInfoToMuonCnvTool.cxx.

172  {
173  double p = 0.0001;
174  const double charge = eftrack.charge();
175  if( std::abs(eftrack.p()) < p ) {
176  ATH_MSG_WARNING("TrigMuonEFTrack has p close to zero = " << eftrack.p() << "set to " << p);
177  } else {
178  p = std::abs(eftrack.p());
179  }
180  const double qoverp = charge / p;
181  double theta = atan(eftrack.tanTh());
182  if(theta < 0.0) theta += M_PI ; // atan returns theta in -pi/2 -> pi/2, so convert to 0 -> pi
183 
184  trackpart.setDefiningParameters( eftrack.d0(), eftrack.z0(), eftrack.phi(), theta, qoverp);
185  trackpart.setParametersOrigin( eftrack.posX(), eftrack.posY(), eftrack.posZ() );
186 
187  /*if(abs(eftrack.pt() - trackpart.pt())> 10.0) {
188  if(eftrack.pt() < 1000000.0) {
189  ATH_MSG_ERROR("pT mismatch, parameters are:");
190  ATH_MSG_ERROR("input d0, z0, phi, theta, qoverp = " << eftrack.d0() << ", " << eftrack.z0() << ", " << eftrack.phi() << ", " << theta << ", " << qoverp);
191  ATH_MSG_ERROR("old e, pt, eta, phi, m = " << std::fixed << std::setprecision(8) << eftrack.e() << ", " << eftrack.pt() << ", " << eftrack.eta() << ", " << eftrack.phi() << ", " << eftrack.m());
192  ATH_MSG_ERROR("new e, pt, eta, phi, m = " << std::fixed << std::setprecision(8) << trackpart.e() << ", " << trackpart.pt() << ", " << trackpart.eta() << ", " << trackpart.phi() << ", " << trackpart.m());
193  return StatusCode::FAILURE;
194  }
195  }*/
196 
197  return StatusCode::SUCCESS;
198 } // end convertTrigMuonEFTrack function

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode TrigMuonEFInfoToMuonCnvTool::initialize ( )
overridevirtual

initialize the tool

Initialize the tool.

Definition at line 32 of file TrigMuonEFInfoToMuonCnvTool.cxx.

32  {
33 
34  if(m_makeIDTrackLink) ATH_MSG_INFO("Will make links to EF ID xAOD track particles");
35  else ATH_MSG_INFO("Will not make links to EF ID xAOD track particles");
36  ATH_MSG_INFO("EF ID track particle container name: " << m_inDetTrackParticles);
37 
38  return StatusCode::SUCCESS;
39 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & ITrigMuonEFInfoToMuonCnvTool::interfaceID ( )
inlinestaticinherited

Definition at line 46 of file ITrigMuonEFInfoToMuonCnvTool.h.

46  {
47  return IID_XAODEFMUONCNV_ITrigMuonEFInfoToMuonCnvTool;
48 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_inDetTrackParticles

std::string TrigMuonEFInfoToMuonCnvTool::m_inDetTrackParticles
private

Name of container that holds the EF ID xAOD track particles.

Definition at line 61 of file TrigMuonEFInfoToMuonCnvTool.h.

◆ m_makeIDTrackLink

bool TrigMuonEFInfoToMuonCnvTool::m_makeIDTrackLink
private

Flag to decide if we want to make element link to EF ID xAOD tracks - only turn on once EF ID conversion is done.

Definition at line 58 of file TrigMuonEFInfoToMuonCnvTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
TrigMuonEFTrack::posX
double posX() const
Definition: TrigMuonEFTrack.h:98
TrigMuonEFTrack::charge
double charge() const
Definition: TrigMuonEFTrack.h:52
xAOD::MuGirl
@ MuGirl
MuGirl.
Definition: TrackingPrimitives.h:141
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TrigMuonEFTrack
Definition: TrigMuonEFTrack.h:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TrigMuonEFInfoToMuonCnvTool::convertTrigMuonEFInfo
virtual StatusCode convertTrigMuonEFInfo(const TrigMuonEFInfo &efinfo, xAOD::MuonContainer &muoncontainer, xAOD::TrackParticleContainer *combParticleContainer, xAOD::TrackParticleContainer *extrapParticleContainer) const override
Convert a single TrigMuonEFInfo object into (maybe multiple) xAOD::Muon objects.
Definition: TrigMuonEFInfoToMuonCnvTool.cxx:47
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
M_PI
#define M_PI
Definition: ActiveFraction.h:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
TrigMuonEFTrack::d0
double d0() const
Definition: TrigMuonEFTrack.h:59
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::TrackParticle_v1::setDefiningParameters
void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP)
Set the defining parameters.
Definition: TrackParticle_v1.cxx:177
TrigMuonEFCbTrack::getIDTrackParticleLink
const ElementLink< Rec::TrackParticleContainer > & getIDTrackParticleLink() const
Definition: TrigMuonEFCbTrack.h:53
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
P4IPtCotThPhiMBase::p
virtual double p() const
momentum magnitude
Definition: P4IPtCotThPhiMBase.cxx:18
TrigMuonEFTrack::posY
double posY() const
Definition: TrigMuonEFTrack.h:108
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
P4IPtCotThPhiMBase::eta
virtual double eta() const
pseudo rapidity
Definition: P4IPtCotThPhiMBase.cxx:76
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
P4IPtCotThPhiM::phi
virtual double phi() const
get phi data member
Definition: P4IPtCotThPhiM.h:106
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
TrigMuonEFInfoToMuonCnvTool::m_inDetTrackParticles
std::string m_inDetTrackParticles
Name of container that holds the EF ID xAOD track particles.
Definition: TrigMuonEFInfoToMuonCnvTool.h:61
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigMuonEFCbTrack
Definition: TrigMuonEFCbTrack.h:28
TrigMuonEFInfoToMuonCnvTool::m_makeIDTrackLink
bool m_makeIDTrackLink
Flag to decide if we want to make element link to EF ID xAOD tracks - only turn on once EF ID convers...
Definition: TrigMuonEFInfoToMuonCnvTool.h:58
charge
double charge(const T &p)
Definition: AtlasPID.h:756
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
MuonParameters::MuidSA
@ MuidSA
Definition: MuonParamDefs.h:59
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:192
TrigMuonEFTrack::posZ
double posZ() const
Definition: TrigMuonEFTrack.h:118
TrigMuonEFInfoToMuonCnvTool::convertTrigMuonEFTrack
StatusCode convertTrigMuonEFTrack(const TrigMuonEFTrack &eftrack, xAOD::TrackParticle &trackpart) const
Convert TrigMuonEFTrack into a xAOD::TrackParticle.
Definition: TrigMuonEFInfoToMuonCnvTool.cxx:172
MuonParameters::MuidCo
@ MuidCo
Definition: MuonParamDefs.h:60
TrigMuonEFTrack::z0
double z0() const
Definition: TrigMuonEFTrack.h:69
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
TrigMuonEFInfo::TrackContainer
const TrigMuonEFInfoTrackContainer * TrackContainer() const
Definition: TrigMuonEFInfo.h:94
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
TrigMuonEFInfoTrack::MuonTypeEFMuon
static const int MuonTypeEFMuon
Definition: TrigMuonEFInfoTrack.h:25
xAOD::TrackParticle_v1::setParametersOrigin
void setParametersOrigin(float x, float y, float z)
Set the origin for the parameters.
Definition: TrackParticle_v1.cxx:473
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
P4IPtCotThPhiMBase::pt
virtual double pt() const
transverse momentum
Definition: P4IPtCotThPhiMBase.cxx:12
fitman.k
k
Definition: fitman.py:528
P4IPtCotThPhiMBase::tanTh
virtual double tanTh() const
tan theta
Definition: P4IPtCotThPhiMBase.cxx:36