ATLAS Offline Software
Loading...
Searching...
No Matches
InDetTrackTruthOriginTool.h
Go to the documentation of this file.
1// -*- c++ -*-
2/*
3 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
4*/
5
6#ifndef INDETTRACKSYSTEMATICSTOOLS_INDETTRACKTRUTHORIGINTOOL_H
7#define INDETTRACKSYSTEMATICSTOOLS_INDETTRACKTRUTHORIGINTOOL_H
8
10#include "AsgTools/AsgTool.h"
13#include <string>
14
15namespace InDet {
16
23
25
29
30 public:
31
32 InDetTrackTruthOriginTool (const std::string& name);
34
35 virtual StatusCode initialize() override;
36
38 virtual const xAOD::TruthParticle* getTruth( const xAOD::TrackParticle* track ) const override;
39
41 virtual int getTruthOrigin(const xAOD::TruthParticle* truth) const override;
42
44 virtual int getTrackOrigin(const xAOD::TrackParticle* track) const override;
45
47 virtual bool isFrom(const xAOD::TruthParticle* truth, int flav) const override;
48
49 private:
50
52 virtual bool isFromRec(const xAOD::TruthParticle* truth, int flav, int depth=0) const;
53
55
58
60
61}; // class InDetTrackTruthOriginTool
62
63} // namespace InDet
64
65#endif
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
This class determines the truth origin of a track.
This class determines the truth origin of a track.
virtual ASG_TOOL_CLASS2(InDetTrackTruthOriginTool, asg::IAsgTool, InDet::IInDetTrackTruthOriginTool) public ~InDetTrackTruthOriginTool()
virtual bool isFromRec(const xAOD::TruthParticle *truth, int flav, int depth=0) const
recursion-safe(r) version of isFrom
virtual int getTruthOrigin(const xAOD::TruthParticle *truth) const override
Computes the truth particle origin.
virtual StatusCode initialize() override
virtual const xAOD::TruthParticle * getTruth(const xAOD::TrackParticle *track) const override
Safely access a track's linked truth particle, if available.
virtual int getTrackOrigin(const xAOD::TrackParticle *track) const override
Computes the track origin.
virtual bool isFrom(const xAOD::TruthParticle *truth, int flav) const override
Check if a truth particle is from the specified origin (from B or D hadron, or tau)
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41
std::string depth
tag string for intendation
Definition fastadd.cxx:46
Primary Vertex Finder.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.