CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TauElementsOperators.h
Go to the documentation of this file.
1 #ifndef RecoTauTag_RecoTau_TauElementsOperators_H_
2 #define RecoTauTag_RecoTau_TauElementsOperators_H_
3 
7 
10 
14 
15 #include "TFormula.h"
16 
18  public:
22  // compute size of signal cone possibly depending on E(energy) and/or ET(transverse energy), and/or seed Jet Opening DR of the tau-jet candidate
23  double computeConeSize(const TFormula& ConeSizeTFormula,double ConeSizeMin,double ConeSizeMax);
24  double computeConeSize(const TFormula& ConeSizeTFormula,double ConeSizeMin,double ConeSizeMax, double transverseEnergy, double energy, double jetOpeningAngle = 0.);
25 
26  //TFormula computeConeSizeTFormula(const std::string& ConeSizeFormula,const char* errorMessage);
27  void replaceSubStr(std::string& s,const std::string& oldSubStr,const std::string& newSubStr);
28  //return the leading (i.e. highest Pt) Track in a given cone around the jet axis or a given direction
29  const reco::TrackRef leadTk(std::string matchingConeMetric,double matchingConeSize,double ptTrackMin)const;
30  const reco::TrackRef leadTk(const math::XYZVector& jetAxis,std::string matchingConeMetric,double matchingConeSize,double ptTrackMin)const;
31 
32  // return all Tracks in a cone of metric* "coneMetric" and size "coneSize" around a direction "coneAxis"
33  const reco::TrackRefVector tracksInCone(const math::XYZVector& coneAxis,const std::string coneMetric,const double coneSize,const double ptTrackMin)const;
34  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;
35  // return all Tracks in an annulus defined by inner(metric* "innerconeMetric" and size "innerconeSize") and outer(metric* "outerconeMetric" and size "outerconeSize") cones around a direction "coneAxis"
36  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;
37  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;
38  // return 1 if no/low Tracks activity in an isolation annulus around a leading Track, 0 otherwise;
39  // different possible metrics* for the matching, signal and isolation cones;
40  double discriminatorByIsolTracksN(unsigned int isolationAnnulus_Tracksmaxn)const;
41  double discriminatorByIsolTracksN(const math::XYZVector& coneAxis,
42  std::string matchingConeMetric,double matchingConeSize, double ptLeadingTrackMin, double ptOtherTracksMin,
43  std::string signalConeMetric,double signalConeSize,std::string isolationConeMetric,double isolationConeSize,
44  unsigned int isolationAnnulus_Tracksmaxn)const;
45  // matching cone axis is the jet axis, signal and isolation cones axes are a leading Track axis;
46  double discriminatorByIsolTracksN(std::string matchingConeMetric,double matchingConeSize, double ptLeadingTrackMin, double ptOtherTracksMin,
47  std::string signalConeMetric,double signalConeSize,std::string isolationConeMetric,double isolationConeSize,
48  unsigned int isolationAnnulus_Tracksmaxn)const;
49  protected:
50  TFormula ConeSizeTFormula;
51 
54  reco::TrackRefVector Tracks_; // track selection criteria applied
55  reco::TrackRefVector IsolTracks_; // tracks in an isolation annulus, track selection criteria applied;
56  // template objects for DR and Angle metrics
65 };
66 
67 
68 #endif
69 
70 // * different possible metrics for a cone : "DR", "angle", "area";
double computeConeSize(const TFormula &ConeSizeTFormula, double ConeSizeMin, double ConeSizeMax)
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector >, Angle< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerDRouterAnglemetrics_
const reco::TrackRef leadTk(std::string matchingConeMetric, double matchingConeSize, double ptTrackMin) const
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
double discriminatorByIsolTracksN(unsigned int isolationAnnulus_Tracksmaxn) const
DeltaR< math::XYZVector > metricDR_
const reco::TrackRefVector tracksInCone(const math::XYZVector &coneAxis, const std::string coneMetric, const double coneSize, const double ptTrackMin) const
reco::TrackRefVector IsolTracks_
ElementsInCone< math::XYZVector, DeltaR< math::XYZVector >, reco::TrackCollection > TracksinCone_DRmetric_
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector >, Angle< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerAngleouterAnglemetrics_
reco::TrackRefVector Tracks_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
Angle< math::XYZVector > metricAngle_
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector >, DeltaR< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerDRouterDRmetrics_
void replaceSubStr(std::string &s, const std::string &oldSubStr, const std::string &newSubStr)
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
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector >, DeltaR< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerAngleouterDRmetrics_
ElementsInCone< math::XYZVector, Angle< math::XYZVector >, reco::TrackCollection > TracksinCone_Anglemetric_