00001
00003
00005
00012 #ifndef CPBTAGGINGSELECTIONTOOL_H
00013 #define CPBTAGGINGSELECTIONTOOL_H
00014
00015 #include "xAODBTaggingEfficiency/IBTaggingSelectionTool.h"
00016 #include "xAODBTagging/BTagging.h"
00017
00018 #include "AsgTools/AsgTool.h"
00019 #include "PATCore/IAsgSelectionTool.h"
00020
00021 #include "TFile.h"
00022 #include "TSpline.h"
00023 #include "TVector.h"
00024 #include <string>
00025 #include <set>
00026 #include <vector>
00027 #include <map>
00028
00029 class BTaggingSelectionTool: public asg::AsgTool,
00030 public virtual IBTaggingSelectionTool,
00031 public virtual IAsgSelectionTool {
00032 typedef double (xAOD::BTagging::* tagWeight_member_t)() const;
00033
00035 ASG_TOOL_CLASS2( BTaggingSelectionTool , IAsgSelectionTool, IBTaggingSelectionTool )
00036
00037 public:
00039 BTaggingSelectionTool( const std::string& name );
00040 StatusCode initialize();
00042 virtual const Root::TAccept& getTAccept() const;
00043
00045 virtual const Root::TAccept& accept( const xAOD::IParticle* p ) const;
00046 virtual const Root::TAccept& accept( const xAOD::Jet& jet ) const;
00047
00049 virtual const Root::TAccept& accept(double , double , double ) const;
00050 virtual const Root::TAccept& accept(double , double , double , double ) const;
00051
00054 virtual int getQuantile( const xAOD::IParticle* ) const;
00055 virtual int getQuantile( const xAOD::Jet& ) const;
00056 virtual int getQuantile( double , double , double ) const;
00057
00058 virtual double getCutValue() const;
00059
00060 private:
00062 virtual bool checkRange( double , double ) const;
00063
00064 bool m_initialised;
00065
00067 mutable Root::TAccept m_accept;
00068
00069 double m_maxEta;
00070 double m_minPt;
00071 double m_maxRangePt;
00072 std::string m_CutFileName;
00073 std::string m_taggerName;
00074 std::string m_OP;
00075 std::string m_jetAuthor;
00076
00077 TFile *m_inf;
00078 TSpline3 *m_spline;
00079 TVector *m_constcut;
00080 double m_continuouscuts[6];
00081
00082 };
00083
00084 #endif // CPBTAGGINGSELECTIONTOOL_H
00085