00001 #ifndef RecoTauTag_RecoTau_TauElementsOperators_H_
00002 #define RecoTauTag_RecoTau_TauElementsOperators_H_
00003
00004 #include "DataFormats/TauReco/interface/BaseTau.h"
00005 #include "DataFormats/TrackReco/interface/Track.h"
00006 #include "DataFormats/VertexReco/interface/Vertex.h"
00007
00008 #include "RecoTauTag/TauTagTools/interface/ElementsInCone.h"
00009 #include "RecoTauTag/TauTagTools/interface/ElementsInAnnulus.h"
00010
00011 #include "PhysicsTools/IsolationUtils/interface/FixedAreaIsolationCone.h"
00012 #include "DataFormats/Math/interface/deltaR.h"
00013 #include "CommonTools/Utils/interface/Angle.h"
00014
00015 #include "TFormula.h"
00016
00017 class TauElementsOperators{
00018 public:
00019 TauElementsOperators();
00020 TauElementsOperators(reco::BaseTau&);
00021 ~TauElementsOperators(){}
00022
00023 double computeConeSize(const TFormula& ConeSizeTFormula,double ConeSizeMin,double ConeSizeMax);
00024 double computeConeSize(const TFormula& ConeSizeTFormula,double ConeSizeMin,double ConeSizeMax, double transverseEnergy, double energy, double jetOpeningAngle = 0.);
00025
00026
00027 void replaceSubStr(std::string& s,const std::string& oldSubStr,const std::string& newSubStr);
00028
00029 const reco::TrackRef leadTk(std::string matchingConeMetric,double matchingConeSize,double ptTrackMin)const;
00030 const reco::TrackRef leadTk(const math::XYZVector& jetAxis,std::string matchingConeMetric,double matchingConeSize,double ptTrackMin)const;
00031
00032
00033 const reco::TrackRefVector tracksInCone(const math::XYZVector& coneAxis,const std::string coneMetric,const double coneSize,const double ptTrackMin)const;
00034 const reco::TrackRefVector tracksInCone(const math::XYZVector& coneAxis,const std::string coneMetric,const double coneSize,const double ptTrackMin,const double tracktorefpoint_maxDZ,const double refpoint_Z, const reco::Vertex &myPV)const;
00035
00036 const reco::TrackRefVector tracksInAnnulus(const math::XYZVector& coneAxis,const std::string innerconeMetric,const double innerconeSize,const std::string outerconeMetric,const double outerconeSize,const double ptTrackMin)const;
00037 const reco::TrackRefVector tracksInAnnulus(const math::XYZVector& coneAxis,const std::string innerconeMetric,const double innerconeSize,const std::string outerconeMetric,const double outerconeSize,const double ptTrackMin,const double tracktorefpoint_maxDZ,const double refpoint_Z, const reco::Vertex &myPV)const;
00038
00039
00040 double discriminatorByIsolTracksN(unsigned int isolationAnnulus_Tracksmaxn)const;
00041 double discriminatorByIsolTracksN(const math::XYZVector& coneAxis,
00042 std::string matchingConeMetric,double matchingConeSize, double ptLeadingTrackMin, double ptOtherTracksMin,
00043 std::string signalConeMetric,double signalConeSize,std::string isolationConeMetric,double isolationConeSize,
00044 unsigned int isolationAnnulus_Tracksmaxn)const;
00045
00046 double discriminatorByIsolTracksN(std::string matchingConeMetric,double matchingConeSize, double ptLeadingTrackMin, double ptOtherTracksMin,
00047 std::string signalConeMetric,double signalConeSize,std::string isolationConeMetric,double isolationConeSize,
00048 unsigned int isolationAnnulus_Tracksmaxn)const;
00049 protected:
00050 TFormula ConeSizeTFormula;
00051
00052 reco::BaseTau& BaseTau_;
00053 double AreaMetric_recoElements_maxabsEta_;
00054 reco::TrackRefVector Tracks_;
00055 reco::TrackRefVector IsolTracks_;
00056
00057 DeltaR<math::XYZVector> metricDR_;
00058 Angle<math::XYZVector> metricAngle_;
00059 ElementsInCone<math::XYZVector,DeltaR<math::XYZVector>,reco::TrackCollection> TracksinCone_DRmetric_;
00060 ElementsInCone<math::XYZVector,Angle<math::XYZVector>,reco::TrackCollection> TracksinCone_Anglemetric_;
00061 ElementsInAnnulus<math::XYZVector,DeltaR<math::XYZVector>,DeltaR<math::XYZVector>,reco::TrackCollection> TracksinAnnulus_innerDRouterDRmetrics_;
00062 ElementsInAnnulus<math::XYZVector,DeltaR<math::XYZVector>,Angle<math::XYZVector>,reco::TrackCollection> TracksinAnnulus_innerDRouterAnglemetrics_;
00063 ElementsInAnnulus<math::XYZVector,Angle<math::XYZVector>,Angle<math::XYZVector>,reco::TrackCollection> TracksinAnnulus_innerAngleouterAnglemetrics_;
00064 ElementsInAnnulus<math::XYZVector,Angle<math::XYZVector>,DeltaR<math::XYZVector>,reco::TrackCollection> TracksinAnnulus_innerAngleouterDRmetrics_;
00065 };
00066
00067
00068 #endif
00069
00070