00001
00002 #ifndef TAUANALYSISTOOLS_TAUTRUTHTRACKMATCHINGTOOL_H
00003 #define TAUANALYSISTOOLS_TAUTRUTHTRACKMATCHINGTOOL_H
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "AsgTools/AsgTool.h"
00017 #include "AsgTools/AnaToolHandle.h"
00018
00019
00020 #include "InDetTrackSelectionTool/InDetTrackSelectionTool.h"
00021
00022
00023 #include "TauAnalysisTools/ITauTruthTrackMatchingTool.h"
00024
00025
00026 #include "xAODTruth/TruthVertex.h"
00027
00028
00029 namespace TauAnalysisTools
00030 {
00031 enum TrackType_t
00032 {
00033 UnclassifiedTrack = 0,
00034 TauTrack = 1,
00035 ConversionTrack = 2,
00036 UnderlyingEventTrack = 3,
00037 SecondaryTrack = 4,
00038 PileupTrack = 5,
00039 FakeTrack = 6
00040 };
00041
00042
00043 class TauTruthTrackMatchingTool
00044 : public TauAnalysisTools::ITauTruthTrackMatchingTool
00045 , public asg::AsgTool
00046 {
00048 ASG_TOOL_CLASS( TauTruthTrackMatchingTool,
00049 TauAnalysisTools::ITauTruthTrackMatchingTool )
00050
00051 public:
00052
00053 TauTruthTrackMatchingTool( const std::string& name );
00054
00055 virtual ~TauTruthTrackMatchingTool();
00056
00057 virtual StatusCode initialize();
00058
00059
00060 virtual StatusCode classifyTracks(std::vector<const TAUTRACKPARTICLE*>& vTracks);
00061
00062
00063 virtual StatusCode classifyTrack(const TAUTRACKPARTICLE& xTrackParticle);
00064
00065 private:
00066
00067 StatusCode classifyConversion(const TAUTRACKPARTICLE& xTrackParticle, const xAOD::TruthParticle& xTruthParticle);
00068 StatusCode checkTrackType(const TAUTRACKPARTICLE& xTrackParticle);
00069 StatusCode checkTrackIsTauInheritant(const TAUTRACKPARTICLE& xTrackParticle);
00070 bool checkTruthParent(const xAOD::TruthParticle& xTruthParticle, int& iDepth, std::string& sHistory);
00071 const xAOD::TruthParticle* getTruthParticle(const TAUTRACKPARTICLE& xTrackParticle);
00072
00073 private:
00074 bool m_bIsHadronicTrackAvailable;
00075 bool m_bIsHadronicTrackAvailableChecked;
00076 bool m_bIsInitialized;
00077 asg::AnaToolHandle<InDet::IInDetTrackSelectionTool> m_tInDetTrackSelectionTool;
00078
00079 };
00080
00081 }
00082 #endif // TAUANALYSISTOOLS_TAUTRUTHTRACKMATCHINGTOOL_H
00083