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 
12 
16 
17 #include "TFormula.h"
18 
20  public:
24  // 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
25  double computeConeSize(const TFormula& ConeSizeTFormula,double ConeSizeMin,double ConeSizeMax);
26  double computeConeSize(const TFormula& ConeSizeTFormula,double ConeSizeMin,double ConeSizeMax, double transverseEnergy, double energy, double jetOpeningAngle = 0.);
27 
28  //TFormula computeConeSizeTFormula(const std::string& ConeSizeFormula,const char* errorMessage);
29  void replaceSubStr(std::string& s,const std::string& oldSubStr,const std::string& newSubStr);
30  //return the leading (i.e. highest Pt) Track in a given cone around the jet axis or a given direction
31  const reco::TrackRef leadTk(std::string matchingConeMetric,double matchingConeSize,double ptTrackMin)const;
32  const reco::TrackRef leadTk(const math::XYZVector& jetAxis,std::string matchingConeMetric,double matchingConeSize,double ptTrackMin)const;
33 
34  // return all Tracks in a cone of metric* "coneMetric" and size "coneSize" around a direction "coneAxis"
35  const reco::TrackRefVector tracksInCone(const math::XYZVector& coneAxis,const std::string coneMetric,const double coneSize,const double ptTrackMin)const;
36  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;
37  // 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"
38  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;
39  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;
40  // return 1 if no/low Tracks activity in an isolation annulus around a leading Track, 0 otherwise;
41  // different possible metrics* for the matching, signal and isolation cones;
42  double discriminatorByIsolTracksN(unsigned int isolationAnnulus_Tracksmaxn)const;
43  double discriminatorByIsolTracksN(const math::XYZVector& coneAxis,
44  std::string matchingConeMetric,double matchingConeSize, double ptLeadingTrackMin, double ptOtherTracksMin,
45  std::string signalConeMetric,double signalConeSize,std::string isolationConeMetric,double isolationConeSize,
46  unsigned int isolationAnnulus_Tracksmaxn)const;
47  // matching cone axis is the jet axis, signal and isolation cones axes are a leading Track axis;
48  double discriminatorByIsolTracksN(std::string matchingConeMetric,double matchingConeSize, double ptLeadingTrackMin, double ptOtherTracksMin,
49  std::string signalConeMetric,double signalConeSize,std::string isolationConeMetric,double isolationConeSize,
50  unsigned int isolationAnnulus_Tracksmaxn)const;
51  protected:
52  TFormula ConeSizeTFormula;
53 
56  reco::TrackRefVector Tracks_; // track selection criteria applied
57  reco::TrackRefVector IsolTracks_; // tracks in an isolation annulus, track selection criteria applied;
58  // template objects for DR and Angle metrics
67 };
68 
69 
70 #endif
71 
72 // * different possible metrics for a cone : "DR", "angle", "area";
double computeConeSize(const TFormula &ConeSizeTFormula, double ConeSizeMin, double ConeSizeMax)
ElementsInAnnulusRef< math::XYZVector, Angle< math::XYZVector >, DeltaR< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerAngleouterDRmetrics_
const reco::TrackRef leadTk(std::string matchingConeMetric, double matchingConeSize, double ptTrackMin) const
ElementsInAnnulusRef< math::XYZVector, DeltaR< math::XYZVector >, DeltaR< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerDRouterDRmetrics_
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:13
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
ElementsInAnnulusRef< math::XYZVector, DeltaR< math::XYZVector >, Angle< math::XYZVector >, reco::TrackCollection > TracksinAnnulus_innerDRouterAnglemetrics_
reco::TrackRefVector IsolTracks_
ElementsInConeRef< math::XYZVector, DeltaR< math::XYZVector >, reco::TrackCollection > TracksinCone_DRmetric_
ElementsInAnnulusRef< 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:30
Angle< math::XYZVector > metricAngle_
ElementsInConeRef< math::XYZVector, Angle< math::XYZVector >, reco::TrackCollection > TracksinCone_Anglemetric_
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