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 "TauAnalysisTools/ITauTruthTrackMatchingTool.h"
00021
00022
00023 #include "xAODTruth/TruthVertex.h"
00024
00025
00026 namespace TauAnalysisTools
00027 {
00028 enum TrackType_t
00029 {
00030 UnclassifiedTrack = 0,
00031 TauTrack = 1,
00032 ConversionTrack = 2,
00033 UnderlyingEventTrack = 3,
00034 SecondaryTrack = 4,
00035 PileupTrack = 5,
00036 FakeTrack = 6
00037 };
00038
00039
00040 class TauTruthTrackMatchingTool
00041 : public TauAnalysisTools::ITauTruthTrackMatchingTool
00042 , public asg::AsgTool
00043 {
00045 ASG_TOOL_CLASS( TauTruthTrackMatchingTool,
00046 TauAnalysisTools::ITauTruthTrackMatchingTool )
00047
00048 public:
00049
00050 TauTruthTrackMatchingTool( const std::string& name );
00051
00052 virtual ~TauTruthTrackMatchingTool();
00053
00054 virtual StatusCode initialize();
00055
00056
00057 virtual StatusCode classifyTracks(std::vector<const TAUTRACKPARTICLE*>& vTracks);
00058
00059
00060 virtual StatusCode classifyTrack(const TAUTRACKPARTICLE& xTrackParticle);
00061
00062 private:
00063
00064 StatusCode classifyConversion(const TAUTRACKPARTICLE& xTrackParticle, const xAOD::TruthParticle& xTruthParticle);
00065 StatusCode checkTrackType(const TAUTRACKPARTICLE& xTrackParticle);
00066 StatusCode checkTrackIsTauInheritant(const TAUTRACKPARTICLE& xTrackParticle);
00067 bool checkTruthParent(const xAOD::TruthParticle& xTruthParticle, int& iDepth, std::string& sHistory);
00068 const xAOD::TruthParticle* getTruthParticle(const TAUTRACKPARTICLE& xTrackParticle);
00069
00070 private:
00071 bool m_bIsHadronicTrackAvailable;
00072 bool m_bIsHadronicTrackAvailableChecked;
00073
00074 };
00075
00076 }
00077 #endif // TAUANALYSISTOOLS_TAUTRUTHTRACKMATCHINGTOOL_H
00078