ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
TauAnalysisTools::BuildTruthTaus Class Referenceabstract

#include <BuildTruthTaus.h>

Inheritance diagram for TauAnalysisTools::BuildTruthTaus:
Collaboration diagram for TauAnalysisTools::BuildTruthTaus:

Classes

struct  TauTruthInfo
 

Public Member Functions

virtual void print () const =0
 Print the state of the tool. More...
 
virtual StatusCode sysInitialize ()
 Function initialising the tool in the correct way in Athena. More...
 
virtual void print () const
 Print the state of the tool. 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 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, V, H > &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
 

Protected Member Functions

StatusCode retrieveTruthTaus (TruthTausEvent &truthTausEvent, const EventContext &ctx) const
 
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...
 

Protected Attributes

TruthTausEvent m_truthTausEvent
 
bool m_bTruthTauAvailable {}
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual ~BuildTruthTaus ()=default
 
virtual StatusCode initialize () override
 
virtual void setTruthMatchingMode () override
 
virtual StatusCode retrieveTruthTaus () override
 
virtual StatusCode retrieveTruthTaus (ITruthTausEvent &truthTausEvent, const EventContext &ctx) const override
 
StatusCode buildTruthTausFromTruthParticles (TruthTausEvent &truthTausEvent, const EventContext &ctx) const
 
StatusCode examineTruthTau (const xAOD::TruthParticle &xTruthParticle) const
 
StatusCode examineTruthTauDecay (const xAOD::TruthParticle &xTruthParticle, TauTruthInfo &truthInfo) const
 
void printDecay (const xAOD::TruthParticle &xTruthParticle, int depth=0) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

Gaudi::Property< bool > m_bWriteInvisibleFourMomentum { this, "WriteInvisibleFourMomentum", false}
 
Gaudi::Property< bool > m_bWriteVisibleChargedFourMomentum { this, "WriteVisibleChargedFourMomentum", false}
 
Gaudi::Property< bool > m_bWriteVisibleNeutralFourMomentum { this, "WriteVisibleNeutralFourMomentum", false}
 
Gaudi::Property< bool > m_bWriteDecayModeVector { this, "WriteDecayModeVector", true}
 
Gaudi::Property< bool > m_bWriteVertices { this, "WriteVertices", true}
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthTauInputContainer { this, "TruthTauContainerName", "TruthTaus", "Truth tau input container name (truth matching mode)" }
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthParticleContainer { this, "TruthParticleContainerName", "TruthParticles", "Truth particles input container name" }
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthElectronContainer { this, "TruthElectronContainerName", "TruthElectrons", "Truth electrons input container name" }
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthMuonContainer { this, "TruthMuonContainerName", "TruthMuons", "Truth muons input container name" }
 
SG::ReadHandleKey< xAOD::JetContainerm_truthJetContainer { this, "TruthJetContainerName", "AntiKt4TruthDressedWZJets", "Truth jets input container name" }
 
SG::WriteHandleKey< xAOD::TruthParticleContainerm_truthTauOutputContainer { this, "NewTruthTauContainerName", "TruthTaus", "Truth tau output container name" }
 
SG::ReadDecorHandleKey< xAOD::TruthParticleContainerm_originReadDecorKey {this, "inputClassifierParticleOrigin", "TruthParticles.classifierParticleOrigin", "Particle origin"}
 
SG::ReadDecorHandleKey< xAOD::TruthParticleContainerm_typeReadDecorKey {this, "inputClassifierParticleType", "TruthParticles.classifierParticleType", "Particle type"}
 
SG::ReadDecorHandleKey< xAOD::TruthParticleContainerm_outcomeReadDecorKey {this, "inputClassifierParticleOutCome", "TruthParticles.classifierParticleOutCome", "Particle outcome"}
 
SG::ReadDecorHandleKey< xAOD::TruthParticleContainerm_classificationReadDecorKey {this, "inputClassification", "TruthParticles.Classification", "Classification code"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_linkDecoratorKey {this, "originalTruthParticle", "TruthTaus.originalTruthParticle", "Name of the decoration linking to the original truth particle"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_originDecoratorKey {this, "classifierParticleOrigin", "TruthTaus.classifierParticleOrigin", "Name of the decoration which records the particle origin"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_typeDecoratorKey {this, "classifierParticleType", "TruthTaus.classifierParticleType", "Name of the decoration which records the particle type"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_outcomeDecoratorKey {this, "classifierParticleOutCome", "TruthTaus.classifierParticleOutCome", "Name of the decoration which records the particle outcome"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_classificationDecoratorKey {this, "Classification", "TruthTaus.Classification", "Name of the decoration which records the particle classification"}
 
bool m_truthMatchingMode = false
 
MetaStore_t m_inputMetaStore
 Object accessing the input metadata store. More...
 
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store. More...
 
bool m_beginInputFileCalled
 Flag helping to discover when the tool misses the opening of the first input file. More...
 
bool m_useIncidents
 
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
 

Callback functions helping in metadata reading/writing

void setUseIncidents (const bool flag)
 
virtual void handle (const Incident &inc)
 Function receiving incidents from IncidentSvc/TEvent. More...
 
virtual StatusCode beginInputFile ()
 Function called when a new input file is opened. More...
 
virtual StatusCode endInputFile ()
 Function called when the currently open input file got completely processed. More...
 
virtual StatusCode beginEvent ()
 Function called when a new events is loaded. More...
 
virtual StatusCode metaDataStop ()
 Function called when the tool should write out its metadata. More...
 

Detailed Description

Definition at line 36 of file BuildTruthTaus.h.

Member Typedef Documentation

◆ MetaStore_t

Type of the metadata store object in Athena.

Definition at line 66 of file AsgMetadataTool.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 68 of file AsgMetadataTool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~BuildTruthTaus()

virtual TauAnalysisTools::BuildTruthTaus::~BuildTruthTaus ( )
privatevirtualdefault

Member Function Documentation

◆ beginEvent()

StatusCode asg::AsgMetadataTool::beginEvent ( )
protectedvirtualinherited

Function called when a new events is loaded.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, TauAnalysisTools::TauSelectionTool, TauAnalysisTools::DiTauSelectionTool, TauAnalysisTools::CommonSmearingTool, TauAnalysisTools::DiTauEfficiencyCorrectionsTool, Trig::TrigDecisionTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, Trig::TrigConfBunchCrossingTool, xAODMaker::TriggerMenuMetaDataTool, and Trig::xAODBunchCrossingTool.

Definition at line 201 of file AsgMetadataTool.cxx.

201  {
202 
203  // Return gracefully:
204  return StatusCode::SUCCESS;
205  }

◆ beginInputFile()

StatusCode asg::AsgMetadataTool::beginInputFile ( )
protectedvirtualinherited

Function called when a new input file is opened.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in AsgElectronEfficiencyCorrectionTool, TrigConf::xAODConfigTool, PMGTools::PMGTruthWeightTool, BookkeeperTool, BookkeeperDumperTool, Trig::TrigDecisionTool, xAODMaker::TriggerMenuMetaDataTool, xAODMaker::TruthMetaDataTool, Trig::xAODBunchCrossingTool, TauAnalysisTools::TauEfficiencyCorrectionsTool, and TauAnalysisTools::TauSmearingTool.

Definition at line 185 of file AsgMetadataTool.cxx.

185  {
186 
187  // Return gracefully:
188  return StatusCode::SUCCESS;
189  }

◆ buildTruthTausFromTruthParticles()

StatusCode BuildTruthTaus::buildTruthTausFromTruthParticles ( TruthTausEvent &  truthTausEvent,
const EventContext &  ctx 
) const
private

Definition at line 161 of file BuildTruthTaus.cxx.

162 {
167 
173 
174  for (auto xTruthParticle : *truthTausEvent.m_xTruthParticleContainer)
175  {
176  if ( xTruthParticle->isTau() )
177  {
178  auto xTruthTau = std::make_unique<xAOD::TruthParticle>();
179  xTruthTau->makePrivateStore( *xTruthParticle );
180 
181  if ( examineTruthTau(*xTruthTau).isFailure() )
182  {
183  continue;
184  }
185 
186  // adding decorations onto the truth tau requires that it is in the final Aux store
187  truthTausEvent.m_xTruthTauContainer->push_back(std::move(xTruthTau));
188  xAOD::TruthParticle* truthTau = truthTausEvent.m_xTruthTauContainer->back();
189 
190  // propagate MCTruthClassifier decorations
191  typeDecorator(*truthTau) = typeReadDecor.isAvailable() ? typeReadDecor(*xTruthParticle) : -1234;
192  originDecorator(*truthTau) = originReadDecor.isAvailable() ? originReadDecor(*xTruthParticle) : -1234;
193  outcomeDecorator(*truthTau) = outcomeReadDecor.isAvailable() ? outcomeReadDecor(*xTruthParticle) : -1234;
194  classificationDecorator(*truthTau) = classificationReadDecor.isAvailable() ? classificationReadDecor(*xTruthParticle) : -1234;
195 
196  // create link to the original TruthParticle
197  ElementLink < xAOD::TruthParticleContainer > lTruthParticleLink(xTruthParticle, *truthTausEvent.m_xTruthParticleContainer);
198  linkDecorator(*truthTau) = lTruthParticleLink;
199  }
200  }
201  return StatusCode::SUCCESS;
202 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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; }

◆ endInputFile()

StatusCode asg::AsgMetadataTool::endInputFile ( )
protectedvirtualinherited

Function called when the currently open input file got completely processed.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 193 of file AsgMetadataTool.cxx.

193  {
194 
195  // Return gracefully:
196  return StatusCode::SUCCESS;
197  }

◆ 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; }

◆ examineTruthTau()

StatusCode BuildTruthTaus::examineTruthTau ( const xAOD::TruthParticle xTruthParticle) const
private

Definition at line 205 of file BuildTruthTaus.cxx.

206 {
207  // skip this tau if it has no decay vertex, should not happen
208  if ( !xTruthParticle.hasDecayVtx() )
209  return StatusCode::FAILURE;
210 
211  ATH_MSG_VERBOSE("looking for charged daughters of a truth tau");
212 
213  TauTruthInfo truthInfo;
214 
215  const xAOD::TruthVertex* xDecayVertex = xTruthParticle.decayVtx();
216  if (xDecayVertex == nullptr)
217  return StatusCode::FAILURE;
218  for ( size_t iOutgoingParticle = 0; iOutgoingParticle < xDecayVertex->nOutgoingParticles(); ++iOutgoingParticle )
219  {
220  const xAOD::TruthParticle* xTruthDaughter = xDecayVertex->outgoingParticle(iOutgoingParticle);
221  if (xTruthDaughter == nullptr)
222  {
223  ATH_MSG_ERROR("Truth daughter of tau decay was not found in "<< m_truthParticleContainer.key() <<" container. Please ensure that this container has the full tau decay information or produce the TruthTaus container in AtlasDerivation.");
224  return StatusCode::FAILURE;
225  }
226 
227  // if tau decays into tau this is not a proper tau decay
228  if ( xTruthDaughter->isTau() )
229  {
230  ATH_MSG_VERBOSE("Tau decays into a tau itself -> skip this decay");
231  return StatusCode::FAILURE;
232  }
233  }
234 
235  examineTruthTauDecay(xTruthParticle, truthInfo).ignore();
236 
237  if (truthInfo.m_bIsHadronicTau)
238  ATH_MSG_VERBOSE(truthInfo.m_iNChargedDaughters << " prong hadronic truth tau was found with uniqueID "<<HepMC::uniqueID(xTruthParticle));
239  else
240  ATH_MSG_VERBOSE(truthInfo.m_iNChargedDaughters << " prong leptonic truth tau was found with uniqueID "<<HepMC::uniqueID(xTruthParticle));
241  if ( truthInfo.m_iNChargedDaughters%2 == 0 )
242  {
243  ATH_MSG_WARNING("found tau with even multiplicity: " << truthInfo.m_iNChargedDaughters);
244  printDecay(xTruthParticle);
245  }
246 
247  static const SG::Decorator<double> decPtVis("pt_vis");
248  static const SG::Decorator<double> decEtaVis("eta_vis");
249  static const SG::Decorator<double> decPhiVis("phi_vis");
250  static const SG::Decorator<double> decMVis("m_vis");
251 
252  static const SG::Decorator<size_t> decNumCharged("numCharged");
253  static const SG::Decorator<size_t> decNumChargedPion("numChargedPion");
254  static const SG::Decorator<size_t> decNumNeutral("numNeutral");
255  static const SG::Decorator<size_t> decNumNeutralPion("numNeutralPion");
256 
257  decPtVis(xTruthParticle) = truthInfo.m_vTruthVisTLV.Pt();
258  decEtaVis(xTruthParticle) = truthInfo.m_vTruthVisTLV.Eta();
259  decPhiVis(xTruthParticle) = truthInfo.m_vTruthVisTLV.Phi();
260  decMVis(xTruthParticle) = truthInfo.m_vTruthVisTLV.M();
261 
262  decNumCharged(xTruthParticle) = truthInfo.m_iNChargedDaughters;
263  decNumChargedPion(xTruthParticle) = truthInfo.m_iNChargedPions;
264  decNumNeutral(xTruthParticle) = truthInfo.m_iNNeutralPions+truthInfo.m_iNNeutralOthers;
265  decNumNeutralPion(xTruthParticle) = truthInfo.m_iNNeutralPions;
266 
267  static const SG::Decorator<char> decIsHadronicTau("IsHadronicTau");
268  decIsHadronicTau(xTruthParticle) = (char)truthInfo.m_bIsHadronicTau;
269 
271  {
272  TLorentzVector vTruthInvisTLV = xTruthParticle.p4() - truthInfo.m_vTruthVisTLV;
273  static const SG::Decorator<double> decPtInvis("pt_invis");
274  static const SG::Decorator<double> decEtaInvis("eta_invis");
275  static const SG::Decorator<double> decPhiInvis("phi_invis");
276  static const SG::Decorator<double> decMInvis("m_invis");
277  decPtInvis(xTruthParticle) = vTruthInvisTLV.Pt();
278  decEtaInvis(xTruthParticle) = vTruthInvisTLV.Eta();
279  decPhiInvis(xTruthParticle) = vTruthInvisTLV.Phi();
280  decMInvis(xTruthParticle) = vTruthInvisTLV.M();
281  }
282 
284  {
285  static const SG::Decorator<double> decPtVisCharged("pt_vis_charged");
286  static const SG::Decorator<double> decEtaVisCharged("eta_vis_charged");
287  static const SG::Decorator<double> decPhiVisCharged("phi_vis_charged");
288  static const SG::Decorator<double> decMVisCharged("m_vis_charged");
289  decPtVisCharged(xTruthParticle) = truthInfo.m_vTruthVisTLVCharged.Pt();
290  decEtaVisCharged(xTruthParticle) = truthInfo.m_vTruthVisTLVCharged.Eta();
291  decPhiVisCharged(xTruthParticle) = truthInfo.m_vTruthVisTLVCharged.Phi();
292  decMVisCharged(xTruthParticle) = truthInfo.m_vTruthVisTLVCharged.M();
293  }
294 
296  {
297  static const SG::Decorator<double> decPtVisNeutral("pt_vis_neutral");
298  static const SG::Decorator<double> decEtaVisNeutral("eta_vis_neutral");
299  static const SG::Decorator<double> decPhiVisNeutral("phi_vis_neutral");
300  static const SG::Decorator<double> decMVisNeutral("m_vis_neutral");
301  decPtVisNeutral(xTruthParticle) = truthInfo.m_vTruthVisTLVNeutral.Pt();
302  decEtaVisNeutral(xTruthParticle) = truthInfo.m_vTruthVisTLVNeutral.Eta();
303  decPhiVisNeutral(xTruthParticle) = truthInfo.m_vTruthVisTLVNeutral.Phi();
304  decMVisNeutral(xTruthParticle) = truthInfo.m_vTruthVisTLVNeutral.M();
305  }
306 
308  {
309  static const SG::Decorator<std::vector<int> > decDecayModeVector("DecayModeVector");
310  decDecayModeVector(xTruthParticle) = truthInfo.m_vDecayMode;
311  }
312 
313  if ( m_bWriteVertices )
314  {
315  // tau decay vertex
316  static const SG::Decorator<float> decDecayVertexX("decay_vertex_x");
317  static const SG::Decorator<float> decDecayVertexY("decay_vertex_y");
318  static const SG::Decorator<float> decDecayVertexZ("decay_vertex_z");
319 
320  decDecayVertexX(xTruthParticle) = truthInfo.m_vDecayVertex.X();
321  decDecayVertexY(xTruthParticle) = truthInfo.m_vDecayVertex.Y();
322  decDecayVertexZ(xTruthParticle) = truthInfo.m_vDecayVertex.Z();
323 
324  // tau production vertex
325  static const SG::Decorator<float> decProdVertexX("prod_vertex_x");
326  static const SG::Decorator<float> decProdVertexY("prod_vertex_y");
327  static const SG::Decorator<float> decProdVertexZ("prod_vertex_z");
328 
329  decProdVertexX(xTruthParticle) = truthInfo.m_vProdVertex.X();
330  decProdVertexY(xTruthParticle) = truthInfo.m_vProdVertex.Y();
331  decProdVertexZ(xTruthParticle) = truthInfo.m_vProdVertex.Z();
332  }
333 
334  return StatusCode::SUCCESS;
335 }

◆ examineTruthTauDecay()

StatusCode BuildTruthTaus::examineTruthTauDecay ( const xAOD::TruthParticle xTruthParticle,
TauTruthInfo truthInfo 
) const
private

Definition at line 338 of file BuildTruthTaus.cxx.

340 {
341  // get vertex and check if it exists
342  const xAOD::TruthVertex* xDecayVertex = xTruthParticle.decayVtx();
343  if (!xDecayVertex)
344  return StatusCode::SUCCESS;
345 
346  truthInfo.m_vDecayVertex.SetXYZ(xDecayVertex->x(),xDecayVertex->y(),xDecayVertex->z());
347 
348  if (xTruthParticle.hasProdVtx() ) {
349  const xAOD::TruthVertex* xProdVertex = xTruthParticle.prodVtx();
350  truthInfo.m_vProdVertex.SetXYZ(xProdVertex->x(),xProdVertex->y(),xProdVertex->z());
351  } else {
352  truthInfo.m_vProdVertex.SetXYZ(-1234,-1234,-1234);
353  }
354 
355  for ( size_t iOutgoingParticle = 0; iOutgoingParticle < xDecayVertex->nOutgoingParticles(); ++iOutgoingParticle )
356  {
357  const xAOD::TruthParticle* xTruthDaughter = xDecayVertex->outgoingParticle(iOutgoingParticle);
358  if (xTruthDaughter == nullptr)
359  {
360  ATH_MSG_ERROR("Truth daughter of tau decay was not found in "<< m_truthParticleContainer.key() <<" container. Please ensure that this container has the full tau decay information or produce the TruthTaus container in AtlasDerivation.");
361  return StatusCode::FAILURE;
362  }
363 
364  int iAbsPdgId = xTruthDaughter->absPdgId();
365  int iPdgId = xTruthDaughter->pdgId();
366 
367  // look at decay of unstable particles
368  if (MC::isDecayed(xTruthDaughter) || !MC::isPhysical(xTruthDaughter))
369  {
370  if ( iAbsPdgId != 111 && iAbsPdgId != 311 && iAbsPdgId != 310 && iAbsPdgId != 130 )
371  {
372  examineTruthTauDecay(*xTruthDaughter, truthInfo).ignore();
373  continue;
374  }
375  }
376 
377  // only process stable particles
378  if (!MC::isStable(xTruthDaughter) && !MC::isDecayed(xTruthDaughter))
379  continue;
380 
381  // add pdgID to vector for decay mode classification
382  truthInfo.m_vDecayMode.push_back(iPdgId);
383 
384  // if tau decays leptonically, indicated by an electron/muon neutrino then
385  // it is not a hadronic decay
386  if ( xTruthDaughter->isHadron() )
387  truthInfo.m_bIsHadronicTau = true;
388 
389  // ignore neutrinos for further progress
390  if ( xTruthDaughter->isNeutrino() )
391  {
392  ATH_MSG_VERBOSE("found neutrino decay particle with PdgId "<<iPdgId);
393  continue;
394  }
395 
396  // add momentum of non-neutrino particle to visible momentum
397  truthInfo.m_vTruthVisTLV += xTruthDaughter->p4();
399  if ( xTruthDaughter->isCharged() )
400  truthInfo.m_vTruthVisTLVCharged += xTruthDaughter->p4();
402  if ( xTruthDaughter->isNeutral() )
403  truthInfo.m_vTruthVisTLVNeutral += xTruthDaughter->p4();
404 
405  // only count charged decay particles
406  if ( xTruthDaughter->isCharged() )
407  {
408  ATH_MSG_VERBOSE("found charged decay particle with PdgId "<<iPdgId);
409  truthInfo.m_iNChargedDaughters++;
410  // count charged pions
411  if (iAbsPdgId==211) truthInfo.m_iNChargedPions++;
412  else truthInfo.m_iNChargedOthers++;
413  }
414  else
415  {
416  ATH_MSG_VERBOSE("found neutral decay particle with PdgId "<<iPdgId);
417  // count neutral pions
418  if (iAbsPdgId==111) truthInfo.m_iNNeutralPions++;
419  else truthInfo.m_iNNeutralOthers++;
420  }
421  }
422  return StatusCode::SUCCESS;
423 }

◆ 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

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ handle()

void asg::AsgMetadataTool::handle ( const Incident &  inc)
protectedvirtualinherited

Function receiving incidents from IncidentSvc/TEvent.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 135 of file AsgMetadataTool.cxx.

135  {
136 
137  // Tell the user what's happening:
138  ATH_MSG_VERBOSE( "Callback received with incident: " << inc.type() );
139 
140  // Call the appropriate member function:
141  if( inc.type() == IncidentType::BeginInputFile ) {
142  m_beginInputFileCalled = true;
143  if( beginInputFile().isFailure() ) {
144  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
145  throw std::runtime_error( "Couldn't call beginInputFile()" );
146  }
147  } else if( inc.type() == IncidentType::EndInputFile ) {
148  if( endInputFile().isFailure() ) {
149  ATH_MSG_FATAL( "Failed to call endInputFile()" );
150  throw std::runtime_error( "Couldn't call endInputFile()" );
151  }
152  } else if( inc.type() == IncidentType::BeginEvent ) {
153  // If the tool didn't catch the begin input file incident for the
154  // first input file of the job, then call the appropriate function
155  // now.
156  if( ! m_beginInputFileCalled ) {
157  m_beginInputFileCalled = true;
158  if( beginInputFile().isFailure() ) {
159  ATH_MSG_FATAL( "Failed to call beginInputFile()" );
160  throw std::runtime_error( "Couldn't call beginInputFile()" );
161  }
162  }
163  if( beginEvent().isFailure() ) {
164  ATH_MSG_FATAL( "Failed to call beginEvent()" );
165  throw std::runtime_error( "Couldn't call beginEvent()" );
166  }
167 
168  #ifdef XAOD_STANDALONE
169  } else if( inc.type() == IncidentType::MetaDataStop ) {
170  if( metaDataStop().isFailure() ) {
171  ATH_MSG_FATAL( "Failed to call metaDataStop()" );
172  throw std::runtime_error( "Couldn't call metaDataStop()" );
173  }
174 
175  #endif // XAOD_STANDALONE
176  } else {
177  ATH_MSG_WARNING( "Unknown incident type received in AsgMetaDataTool: " << inc.type() );
178  }
179 
180  return;
181  }

◆ initialize()

StatusCode BuildTruthTaus::initialize ( )
overrideprivatevirtual

Implements TauAnalysisTools::IBuildTruthTaus.

Reimplemented in TauAnalysisTools::TauTruthMatchingTool, and TauAnalysisTools::DiTauTruthMatchingTool.

Definition at line 32 of file BuildTruthTaus.cxx.

33 {
34  if (!m_truthMatchingMode) {
35  ATH_MSG_INFO( "Initializing BuildTruthTaus, will generate " << m_truthTauOutputContainer.key() << " from " << m_truthParticleContainer.key() << " container" );
36  }
37  else {
38  ATH_MSG_INFO( "Initializing BuildTruthTaus in truth matching mode, using input container " << m_truthTauInputContainer.key() );
39  }
40 
41  // input containers
47 
48  // in truth matching mode, truth electron/muon/jet containers are optional but expected
49  if (m_truthMatchingMode) {
51  ATH_MSG_WARNING("Truth electron container is not available, won't perform matching to truth electrons");
52  }
54  ATH_MSG_WARNING("Truth muon container is not available, won't perform matching to truth muons");
55  }
56  if (m_truthJetContainer.empty()) {
57  ATH_MSG_WARNING("Truth jet container is not available, won't perform matching to truth jets");
58  }
59  }
60 
61  // output container
63 
64  // input decorations
69  // output decorations
75 
76  // drop at earliest occasion
78 
79  return StatusCode::SUCCESS;
80 }

◆ 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.

◆ inputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore ( ) const
inherited

Accessor for the input metadata store.

Definition at line 93 of file AsgMetadataTool.cxx.

93  {
94 
95 #ifdef XAOD_STANDALONE
96  return &m_inputMetaStore;
97 #else // XAOD_STANDALONE
98  return m_inputMetaStore;
99 #endif // XAOD_STANDALONE
100  }

◆ metaDataStop()

StatusCode asg::AsgMetadataTool::metaDataStop ( )
protectedvirtualinherited

Function called when the tool should write out its metadata.

Dummy implementation that can be overridden by the derived tool.

Reimplemented in BookkeeperTool, BookkeeperDumperTool, xAODMaker::TriggerMenuMetaDataTool, and xAODMaker::TruthMetaDataTool.

Definition at line 209 of file AsgMetadataTool.cxx.

209  {
210 
211  // Return gracefully:
212  return StatusCode::SUCCESS;
213  }

◆ 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  }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

◆ 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.

◆ outputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore ( ) const
inherited

Accessor for the output metadata store.

Definition at line 102 of file AsgMetadataTool.cxx.

102  {
103 
104 #ifdef XAOD_STANDALONE
105  return &m_outputMetaStore;
106 #else // XAOD_STANDALONE
107  return m_outputMetaStore;
108 #endif // XAOD_STANDALONE
109  }

◆ print() [1/2]

void asg::AsgTool::print ( ) const
virtualinherited

◆ print() [2/2]

virtual void asg::IAsgTool::print ( ) const
pure virtualinherited

◆ printDecay()

void BuildTruthTaus::printDecay ( const xAOD::TruthParticle xTruthParticle,
int  depth = 0 
) const
private

Definition at line 425 of file BuildTruthTaus.cxx.

426 {
427  // loop over all decay particles, print their kinematic and other properties
428 
429  const xAOD::TruthVertex* xDecayVertex = xTruthParticle.decayVtx();
430  if (xDecayVertex == nullptr)
431  return;
432 
433  for ( size_t iOutgoingParticle = 0; iOutgoingParticle < xDecayVertex->nOutgoingParticles(); ++iOutgoingParticle )
434  {
435  const xAOD::TruthParticle* xTruthDaughter = xDecayVertex->outgoingParticle(iOutgoingParticle);
436  if (xTruthDaughter == nullptr)
437  {
438  ATH_MSG_WARNING("Truth daughter of tau decay was not found in "<< m_truthParticleContainer.key() <<" container. Please ensure that this container has the full tau decay information or produce the TruthTaus container in AtlasDerivation.");
439  return;
440  }
441  ATH_MSG_WARNING("depth "<<depth
442  <<" e "<<xTruthDaughter->e()
443  <<" eta "<<xTruthDaughter->p4().Eta()
444  <<" phi "<<xTruthDaughter->p4().Phi()
445  <<" pdgid "<<xTruthDaughter->pdgId()
446  <<" status "<<xTruthDaughter->status()
447  <<" uniqueID "<<HepMC::uniqueID(xTruthDaughter));
448  printDecay(*xTruthDaughter, depth+1);
449  }
450 }

◆ 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  }

◆ retrieveTruthTaus() [1/3]

StatusCode BuildTruthTaus::retrieveTruthTaus ( )
overrideprivatevirtual

Implements TauAnalysisTools::IBuildTruthTaus.

Definition at line 83 of file BuildTruthTaus.cxx.

84 {
85  const EventContext& ctx = Gaudi::Hive::currentContext();
86  return retrieveTruthTaus (m_truthTausEvent, ctx);
87 }

◆ retrieveTruthTaus() [2/3]

StatusCode BuildTruthTaus::retrieveTruthTaus ( ITruthTausEvent truthTausEvent,
const EventContext &  ctx 
) const
overrideprivatevirtual

Implements TauAnalysisTools::IBuildTruthTaus.

Definition at line 90 of file BuildTruthTaus.cxx.

91 {
92  return retrieveTruthTaus (dynamic_cast<TruthTausEvent&> (truthTausEvent), ctx);
93 }

◆ retrieveTruthTaus() [3/3]

StatusCode BuildTruthTaus::retrieveTruthTaus ( TruthTausEvent &  truthTausEvent,
const EventContext &  ctx 
) const
protected

Definition at line 96 of file BuildTruthTaus.cxx.

97 {
98  // truth matching mode
99  if (m_truthMatchingMode) {
102  if (!truthElectronsHandle.isValid()) {
103  ATH_MSG_ERROR ("Could not retrieve " << truthElectronsHandle.key());
104  return StatusCode::FAILURE;
105  }
106  truthTausEvent.m_xTruthElectronContainerConst = truthElectronsHandle.cptr();
107  }
108 
109  if (!m_truthMuonContainer.empty()) {
111  if (!truthMuonsHandle.isValid()) {
112  ATH_MSG_ERROR ("Could not retrieve " << truthMuonsHandle.key());
113  return StatusCode::FAILURE;
114  }
115  truthTausEvent.m_xTruthMuonContainerConst = truthMuonsHandle.cptr();
116  }
117 
118  if (!m_truthJetContainer.empty()) {
120  if (!truthJetsHandle.isValid()) {
121  ATH_MSG_ERROR ("Could not retrieve " << truthJetsHandle.key());
122  return StatusCode::FAILURE;
123  }
124  truthTausEvent.m_xTruthJetContainerConst = truthJetsHandle.cptr();
125  }
126 
128  if (!truthTausHandle.isValid()) {
129  ATH_MSG_ERROR ("Could not retrieve " << truthTausHandle.key());
130  return StatusCode::FAILURE;
131  }
132  truthTausEvent.m_xTruthTauContainerConst = truthTausHandle.cptr();
133  }
134  // truth tau building mode
135  else {
137  if (!truthParticlesHandle.isValid()) {
138  ATH_MSG_ERROR ("Could not retrieve " << truthParticlesHandle.key());
139  return StatusCode::FAILURE;
140  }
141  truthTausEvent.m_xTruthParticleContainer = truthParticlesHandle.cptr();
142 
143  auto truthTausOutput = std::make_unique<xAOD::TruthParticleContainer>();
144  auto truthTausOutputAux = std::make_unique<xAOD::TruthParticleAuxContainer>();
145  truthTausOutput->setStore(truthTausOutputAux.get());
146  truthTausEvent.m_xTruthTauContainer = truthTausOutput.get();
147 
148  auto writeHandle = SG::makeHandle(m_truthTauOutputContainer, ctx);
149  ATH_CHECK(writeHandle.record(std::move(truthTausOutput), std::move(truthTausOutputAux)));
150 
151  ATH_CHECK( buildTruthTausFromTruthParticles(truthTausEvent, ctx) );
152  }
153 
154  return StatusCode::SUCCESS;
155 }

◆ setTruthMatchingMode()

virtual void TauAnalysisTools::BuildTruthTaus::setTruthMatchingMode ( )
inlineoverrideprivatevirtual

Implements TauAnalysisTools::IBuildTruthTaus.

Definition at line 65 of file BuildTruthTaus.h.

65  {
66  m_truthMatchingMode = true;
67  };

◆ setUseIncidents()

void asg::AsgMetadataTool::setUseIncidents ( const bool  flag)
inlineprotectedinherited

Definition at line 132 of file AsgMetadataTool.h.

133  {
135  }

◆ sysInitialize()

StatusCode asg::AsgMetadataTool::sysInitialize ( )
virtualinherited

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.

Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.

Definition at line 115 of file AsgMetadataTool.cxx.

115  {
116 
117 #ifndef XAOD_STANDALONE
118  if (m_useIncidents) {
119  // Connect to the IncidentSvc:
120  ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
121  ATH_CHECK( incSvc.retrieve() );
122 
123  // Set up the right callbacks: don't rethrow exceptions, any failure and we should end
124  incSvc->addListener( this, IncidentType::BeginEvent, 0, false );
125  }
126  // Let the base class do its thing:
127  ATH_CHECK( AlgTool::sysInitialize() );
128 
129 #endif // not XAOD_STANDALONE
130 
131  // Return gracefully:
132  return StatusCode::SUCCESS;
133  }

◆ 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_beginInputFileCalled

bool asg::AsgMetadataTool::m_beginInputFileCalled
privateinherited

Flag helping to discover when the tool misses the opening of the first input file.

Definition at line 126 of file AsgMetadataTool.h.

◆ m_bTruthTauAvailable

bool TauAnalysisTools::BuildTruthTaus::m_bTruthTauAvailable {}
protected

Definition at line 113 of file BuildTruthTaus.h.

◆ m_bWriteDecayModeVector

Gaudi::Property<bool> TauAnalysisTools::BuildTruthTaus::m_bWriteDecayModeVector { this, "WriteDecayModeVector", true}
private

Definition at line 121 of file BuildTruthTaus.h.

◆ m_bWriteInvisibleFourMomentum

Gaudi::Property<bool> TauAnalysisTools::BuildTruthTaus::m_bWriteInvisibleFourMomentum { this, "WriteInvisibleFourMomentum", false}
private

Definition at line 118 of file BuildTruthTaus.h.

◆ m_bWriteVertices

Gaudi::Property<bool> TauAnalysisTools::BuildTruthTaus::m_bWriteVertices { this, "WriteVertices", true}
private

Definition at line 122 of file BuildTruthTaus.h.

◆ m_bWriteVisibleChargedFourMomentum

Gaudi::Property<bool> TauAnalysisTools::BuildTruthTaus::m_bWriteVisibleChargedFourMomentum { this, "WriteVisibleChargedFourMomentum", false}
private

Definition at line 119 of file BuildTruthTaus.h.

◆ m_bWriteVisibleNeutralFourMomentum

Gaudi::Property<bool> TauAnalysisTools::BuildTruthTaus::m_bWriteVisibleNeutralFourMomentum { this, "WriteVisibleNeutralFourMomentum", false}
private

Definition at line 120 of file BuildTruthTaus.h.

◆ m_classificationDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_classificationDecoratorKey {this, "Classification", "TruthTaus.Classification", "Name of the decoration which records the particle classification"}
private

Definition at line 143 of file BuildTruthTaus.h.

◆ m_classificationReadDecorKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_classificationReadDecorKey {this, "inputClassification", "TruthParticles.Classification", "Classification code"}
private

Definition at line 137 of file BuildTruthTaus.h.

◆ 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_inputMetaStore

MetaStore_t asg::AsgMetadataTool::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 119 of file AsgMetadataTool.h.

◆ m_linkDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_linkDecoratorKey {this, "originalTruthParticle", "TruthTaus.originalTruthParticle", "Name of the decoration linking to the original truth particle"}
private

Definition at line 139 of file BuildTruthTaus.h.

◆ m_originDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_originDecoratorKey {this, "classifierParticleOrigin", "TruthTaus.classifierParticleOrigin", "Name of the decoration which records the particle origin"}
private

Definition at line 140 of file BuildTruthTaus.h.

◆ m_originReadDecorKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_originReadDecorKey {this, "inputClassifierParticleOrigin", "TruthParticles.classifierParticleOrigin", "Particle origin"}
private

Definition at line 134 of file BuildTruthTaus.h.

◆ m_outcomeDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_outcomeDecoratorKey {this, "classifierParticleOutCome", "TruthTaus.classifierParticleOutCome", "Name of the decoration which records the particle outcome"}
private

Definition at line 142 of file BuildTruthTaus.h.

◆ m_outcomeReadDecorKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_outcomeReadDecorKey {this, "inputClassifierParticleOutCome", "TruthParticles.classifierParticleOutCome", "Particle outcome"}
private

Definition at line 136 of file BuildTruthTaus.h.

◆ m_outputMetaStore

MetaStore_t asg::AsgMetadataTool::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 121 of file AsgMetadataTool.h.

◆ m_truthElectronContainer

SG::ReadHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_truthElectronContainer { this, "TruthElectronContainerName", "TruthElectrons", "Truth electrons input container name" }
private

Definition at line 127 of file BuildTruthTaus.h.

◆ m_truthJetContainer

SG::ReadHandleKey<xAOD::JetContainer> TauAnalysisTools::BuildTruthTaus::m_truthJetContainer { this, "TruthJetContainerName", "AntiKt4TruthDressedWZJets", "Truth jets input container name" }
private

Definition at line 129 of file BuildTruthTaus.h.

◆ m_truthMatchingMode

bool TauAnalysisTools::BuildTruthTaus::m_truthMatchingMode = false
private

Definition at line 145 of file BuildTruthTaus.h.

◆ m_truthMuonContainer

SG::ReadHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_truthMuonContainer { this, "TruthMuonContainerName", "TruthMuons", "Truth muons input container name" }
private

Definition at line 128 of file BuildTruthTaus.h.

◆ m_truthParticleContainer

SG::ReadHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_truthParticleContainer { this, "TruthParticleContainerName", "TruthParticles", "Truth particles input container name" }
private

Definition at line 126 of file BuildTruthTaus.h.

◆ m_truthTauInputContainer

SG::ReadHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_truthTauInputContainer { this, "TruthTauContainerName", "TruthTaus", "Truth tau input container name (truth matching mode)" }
private

Definition at line 125 of file BuildTruthTaus.h.

◆ m_truthTauOutputContainer

SG::WriteHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_truthTauOutputContainer { this, "NewTruthTauContainerName", "TruthTaus", "Truth tau output container name" }
private

Definition at line 131 of file BuildTruthTaus.h.

◆ m_truthTausEvent

TruthTausEvent TauAnalysisTools::BuildTruthTaus::m_truthTausEvent
protected

Definition at line 110 of file BuildTruthTaus.h.

◆ m_typeDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_typeDecoratorKey {this, "classifierParticleType", "TruthTaus.classifierParticleType", "Name of the decoration which records the particle type"}
private

Definition at line 141 of file BuildTruthTaus.h.

◆ m_typeReadDecorKey

SG::ReadDecorHandleKey<xAOD::TruthParticleContainer> TauAnalysisTools::BuildTruthTaus::m_typeReadDecorKey {this, "inputClassifierParticleType", "TruthParticles.classifierParticleType", "Particle type"}
private

Definition at line 135 of file BuildTruthTaus.h.

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.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:
TauAnalysisTools::BuildTruthTaus::examineTruthTau
StatusCode examineTruthTau(const xAOD::TruthParticle &xTruthParticle) const
Definition: BuildTruthTaus.cxx:205
TauAnalysisTools::BuildTruthTaus::m_bWriteInvisibleFourMomentum
Gaudi::Property< bool > m_bWriteInvisibleFourMomentum
Definition: BuildTruthTaus.h:118
xAOD::TruthVertex_v1::nOutgoingParticles
size_t nOutgoingParticles() const
Get the number of outgoing particles.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
egammaParameters::depth
@ depth
pointing depth of the shower as calculated in egammaqgcld
Definition: egammaParamDefs.h:276
xAOD::TruthParticle_v1::absPdgId
int absPdgId() const
Absolute PDG ID code (often useful)
asg::AsgMetadataTool::beginEvent
virtual StatusCode beginEvent()
Function called when a new events is loaded.
Definition: AsgMetadataTool.cxx:201
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
TauAnalysisTools::BuildTruthTaus::m_truthElectronContainer
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthElectronContainer
Definition: BuildTruthTaus.h:127
TauAnalysisTools::BuildTruthTaus::m_bWriteVertices
Gaudi::Property< bool > m_bWriteVertices
Definition: BuildTruthTaus.h:122
xAOD::IParticle::isAvailable
XAOD_AUXDATA_DEPRECATED bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if a user property is available for reading or not.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:135
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TauAnalysisTools::BuildTruthTaus::printDecay
void printDecay(const xAOD::TruthParticle &xTruthParticle, int depth=0) const
Definition: BuildTruthTaus.cxx:425
SG::ReadHandle< xAOD::TruthParticleContainer >
TauAnalysisTools::BuildTruthTaus::retrieveTruthTaus
virtual StatusCode retrieveTruthTaus() override
Definition: BuildTruthTaus.cxx:83
xAOD::char
char
Definition: TrigDecision_v1.cxx:38
TauAnalysisTools::BuildTruthTaus::m_truthTauOutputContainer
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_truthTauOutputContainer
Definition: BuildTruthTaus.h:131
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TauAnalysisTools::BuildTruthTaus::m_typeDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_typeDecoratorKey
Definition: BuildTruthTaus.h:141
TauAnalysisTools::BuildTruthTaus::m_truthMatchingMode
bool m_truthMatchingMode
Definition: BuildTruthTaus.h:145
asg::AsgMetadataTool::m_beginInputFileCalled
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
Definition: AsgMetadataTool.h:126
TauAnalysisTools::BuildTruthTaus::m_bWriteDecayModeVector
Gaudi::Property< bool > m_bWriteDecayModeVector
Definition: BuildTruthTaus.h:121
TauAnalysisTools::BuildTruthTaus::m_bWriteVisibleChargedFourMomentum
Gaudi::Property< bool > m_bWriteVisibleChargedFourMomentum
Definition: BuildTruthTaus.h:119
asg::AsgMetadataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition: AsgMetadataTool.cxx:193
asg::AsgMetadataTool::m_outputMetaStore
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.
Definition: AsgMetadataTool.h:121
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
TauAnalysisTools::BuildTruthTaus::m_typeReadDecorKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_typeReadDecorKey
Definition: BuildTruthTaus.h:135
xAOD::TruthVertex_v1::y
float y() const
Vertex y displacement.
TauAnalysisTools::BuildTruthTaus::m_classificationReadDecorKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_classificationReadDecorKey
Definition: BuildTruthTaus.h:137
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
MC::isPhysical
bool isPhysical(const T &p)
Identify if the particle is physical, i.e. is stable or decayed.
Definition: HepMCHelpers.h:51
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TauAnalysisTools::BuildTruthTaus::m_linkDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_linkDecoratorKey
Definition: BuildTruthTaus.h:139
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAOD::TruthParticle_v1::hasDecayVtx
bool hasDecayVtx() const
Check for a decay vertex on this particle.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
TauAnalysisTools::BuildTruthTaus::buildTruthTausFromTruthParticles
StatusCode buildTruthTausFromTruthParticles(TruthTausEvent &truthTausEvent, const EventContext &ctx) const
Definition: BuildTruthTaus.cxx:161
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::TruthParticle_v1::e
virtual double e() const override final
The total energy of the particle.
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
SG::ReadDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
TauAnalysisTools::BuildTruthTaus::m_bTruthTauAvailable
bool m_bTruthTauAvailable
Definition: BuildTruthTaus.h:113
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
asg::AsgMetadataTool::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition: AsgMetadataTool.cxx:185
master.flag
bool flag
Definition: master.py:29
xAOD::TruthParticle_v1::hasProdVtx
bool hasProdVtx() const
Check for a production vertex on this particle.
Definition: TruthParticle_v1.cxx:69
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
asg::AsgMetadataTool::metaDataStop
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.
Definition: AsgMetadataTool.cxx:209
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
xAOD::TruthParticle_v1::isTau
bool isTau() const
Whether the particle is a tau (or antitau)
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::TruthParticle_v1::isCharged
bool isCharged() const
Whether the particle is electrically charged.
TauAnalysisTools::BuildTruthTaus::m_originReadDecorKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_originReadDecorKey
Definition: BuildTruthTaus.h:134
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::TruthParticle_v1::decayVtx
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
xAOD::TruthParticle_v1::prodVtx
const TruthVertex_v1 * prodVtx() const
The production vertex of this particle.
Definition: TruthParticle_v1.cxx:75
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
TauAnalysisTools::BuildTruthTaus::m_truthTausEvent
TruthTausEvent m_truthTausEvent
Definition: BuildTruthTaus.h:110
TauAnalysisTools::BuildTruthTaus::m_outcomeReadDecorKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_outcomeReadDecorKey
Definition: BuildTruthTaus.h:136
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
asg::AsgMetadataTool::m_inputMetaStore
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.
Definition: AsgMetadataTool.h:119
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
TauAnalysisTools::BuildTruthTaus::m_truthTauInputContainer
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthTauInputContainer
Definition: BuildTruthTaus.h:125
xAOD::TruthVertex_v1::x
float x() const
Vertex x displacement.
TauAnalysisTools::BuildTruthTaus::m_classificationDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_classificationDecoratorKey
Definition: BuildTruthTaus.h:143
TauAnalysisTools::BuildTruthTaus::m_truthJetContainer
SG::ReadHandleKey< xAOD::JetContainer > m_truthJetContainer
Definition: BuildTruthTaus.h:129
xAOD::TruthParticle_v1::status
int status() const
Status code.
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
a
TList * a
Definition: liststreamerinfos.cxx:10
SG::WriteDecorHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
h
TauAnalysisTools::BuildTruthTaus::m_truthMuonContainer
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthMuonContainer
Definition: BuildTruthTaus.h:128
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MC::isDecayed
bool isDecayed(const T &p)
Identify if the particle decayed.
Definition: HepMCHelpers.h:42
xAOD::TruthVertex_v1::z
float z() const
Vertex longitudinal distance along the beam line form the origin.
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
TauAnalysisTools::BuildTruthTaus::m_outcomeDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_outcomeDecoratorKey
Definition: BuildTruthTaus.h:142
TauAnalysisTools::BuildTruthTaus::m_bWriteVisibleNeutralFourMomentum
Gaudi::Property< bool > m_bWriteVisibleNeutralFourMomentum
Definition: BuildTruthTaus.h:120
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
xAOD::TruthParticle_v1::isNeutrino
bool isNeutrino() const
Whether the particle is a neutrino (or antineutrino)
TauAnalysisTools::BuildTruthTaus::m_truthParticleContainer
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainer
Definition: BuildTruthTaus.h:126
TauAnalysisTools::BuildTruthTaus::m_originDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_originDecoratorKey
Definition: BuildTruthTaus.h:140
xAOD::TruthParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TruthParticle_v1.cxx:191
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
SG::DataProxy
Definition: DataProxy.h:45
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:27
TauAnalysisTools::BuildTruthTaus::examineTruthTauDecay
StatusCode examineTruthTauDecay(const xAOD::TruthParticle &xTruthParticle, TauTruthInfo &truthInfo) const
Definition: BuildTruthTaus.cxx:338
xAOD::TruthParticle_v1::isNeutral
bool isNeutral() const
Whether the particle is electrically neutral.
xAOD::TruthVertex_v1::outgoingParticle
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
Definition: TruthVertex_v1.cxx:120
fitman.k
k
Definition: fitman.py:528
xAOD::TruthParticle_v1::isHadron
bool isHadron() const
Whether the particle is a hadron.
ServiceHandle< IIncidentSvc >
asg::AsgMetadataTool::m_useIncidents
bool m_useIncidents
Definition: AsgMetadataTool.h:128