00001 #pragma once
00002
00003 #include "IInDetTrackTruthOriginTool.h"
00004 #include "AsgTools/AsgTool.h"
00005 #include "xAODTracking/TrackParticle.h"
00006 #include "xAODTruth/TruthParticle.h"
00007 #include <string>
00008
00009 namespace InDet {
00010
00018 class InDetTrackTruthOriginTool : public virtual IInDetTrackTruthOriginTool, public asg::AsgTool {
00019
00020 ASG_TOOL_CLASS2( InDetTrackTruthOriginTool,
00021 asg::IAsgTool,
00022 InDet::IInDetTrackTruthOriginTool )
00023
00024 public:
00025
00026 InDetTrackTruthOriginTool (const std::string& name);
00027 virtual ~InDetTrackTruthOriginTool();
00028
00029 virtual StatusCode initialize() override;
00030 virtual void prepare() override {};
00031 virtual StatusCode finalize() override;
00032
00034 virtual int getTrackOrigin(const xAOD::TrackParticle* track) const override;
00035 virtual int getTrackOrigin(const xAOD::TrackParticle* track, int &parentID) const override;
00036
00037 private:
00038
00039 bool isFrom(const xAOD::TruthParticle* part, int flav) const;
00040 int getParentID(const xAOD::TruthParticle* part) const;
00041
00042 float m_matchingProbabilityCut = 0.75;
00043 float m_barcodeG4 = 2e5;
00044
00045 std::string m_truthParticleLinkName = "truthParticleLink";
00046 std::string m_truthMatchProbabilityAuxName = "truthMatchProbability";
00047
00048 };
00049
00050 }