CMS 3D CMS Logo

Public Member Functions | Protected Attributes

TauElementsOperators Class Reference

#include <TauElementsOperators.h>

Inheritance diagram for TauElementsOperators:
CaloTauElementsOperators PFTauElementsOperators

List of all members.

Public Member Functions

double computeConeSize (const TFormula &ConeSizeTFormula, double ConeSizeMin, double ConeSizeMax)
double computeConeSize (const TFormula &ConeSizeTFormula, double ConeSizeMin, double ConeSizeMax, double transverseEnergy, double energy, double jetOpeningAngle=0.)
double discriminatorByIsolTracksN (std::string matchingConeMetric, double matchingConeSize, double ptLeadingTrackMin, double ptOtherTracksMin, std::string signalConeMetric, double signalConeSize, std::string isolationConeMetric, double isolationConeSize, unsigned int isolationAnnulus_Tracksmaxn) const
double discriminatorByIsolTracksN (unsigned int isolationAnnulus_Tracksmaxn) const
double discriminatorByIsolTracksN (const math::XYZVector &coneAxis, std::string matchingConeMetric, double matchingConeSize, double ptLeadingTrackMin, double ptOtherTracksMin, std::string signalConeMetric, double signalConeSize, std::string isolationConeMetric, double isolationConeSize, unsigned int isolationAnnulus_Tracksmaxn) const
const reco::TrackRef leadTk (const math::XYZVector &jetAxis, std::string matchingConeMetric, double matchingConeSize, double ptTrackMin) const
const reco::TrackRef leadTk (std::string matchingConeMetric, double matchingConeSize, double ptTrackMin) const
void replaceSubStr (std::string &s, const std::string &oldSubStr, const std::string &newSubStr)
 TauElementsOperators (reco::BaseTau &)
 TauElementsOperators ()
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
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
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
const reco::TrackRefVector tracksInCone (const math::XYZVector &coneAxis, const std::string coneMetric, const double coneSize, const double ptTrackMin) const
 ~TauElementsOperators ()

Protected Attributes

double AreaMetric_recoElements_maxabsEta_
reco::BaseTauBaseTau_
TFormula ConeSizeTFormula
reco::TrackRefVector IsolTracks_
Angle< math::XYZVectormetricAngle_
DeltaR< math::XYZVectormetricDR_
reco::TrackRefVector Tracks_
ElementsInAnnulus
< math::XYZVector, Angle
< math::XYZVector >, Angle
< math::XYZVector >
, reco::TrackCollection
TracksinAnnulus_innerAngleouterAnglemetrics_
ElementsInAnnulus
< math::XYZVector, Angle
< math::XYZVector >, DeltaR
< math::XYZVector >
, reco::TrackCollection
TracksinAnnulus_innerAngleouterDRmetrics_
ElementsInAnnulus
< math::XYZVector, DeltaR
< math::XYZVector >, Angle
< math::XYZVector >
, reco::TrackCollection
TracksinAnnulus_innerDRouterAnglemetrics_
ElementsInAnnulus
< math::XYZVector, DeltaR
< math::XYZVector >, DeltaR
< math::XYZVector >
, reco::TrackCollection
TracksinAnnulus_innerDRouterDRmetrics_
ElementsInCone
< math::XYZVector, Angle
< math::XYZVector >
, reco::TrackCollection
TracksinCone_Anglemetric_
ElementsInCone
< math::XYZVector, DeltaR
< math::XYZVector >
, reco::TrackCollection
TracksinCone_DRmetric_

Detailed Description

Definition at line 17 of file TauElementsOperators.h.


Constructor & Destructor Documentation

TauElementsOperators::TauElementsOperators ( )
TauElementsOperators::TauElementsOperators ( reco::BaseTau theBaseTau)

Definition at line 6 of file TauElementsOperators.cc.

References reco::BaseTau::isolationTracks(), and IsolTracks_.

TauElementsOperators::~TauElementsOperators ( ) [inline]

Definition at line 21 of file TauElementsOperators.h.

{}   

Member Function Documentation

double TauElementsOperators::computeConeSize ( const TFormula &  ConeSizeTFormula,
double  ConeSizeMin,
double  ConeSizeMax 
)

Definition at line 10 of file TauElementsOperators.cc.

References BaseTau_, reco::LeafCandidate::energy(), reco::LeafCandidate::et(), x, and detailsBasic3DVector::y.

Referenced by CaloRecoTauAlgorithm::buildCaloTau(), and PFRecoTauAlgorithm::buildPFTau().

                                                                                                                  {
  double x=BaseTau_.energy();
  double y=BaseTau_.et();
  double ConeSize=ConeSizeTFormula.Eval(x,y);
  if (ConeSize<ConeSizeMin)ConeSize=ConeSizeMin;
  if (ConeSize>ConeSizeMax)ConeSize=ConeSizeMax;
  return ConeSize;
}
double TauElementsOperators::computeConeSize ( const TFormula &  ConeSizeTFormula,
double  ConeSizeMin,
double  ConeSizeMax,
double  transverseEnergy,
double  energy,
double  jetOpeningAngle = 0. 
)

Definition at line 19 of file TauElementsOperators.cc.

                                                                                                                                                                                  {
  double ConeSize=ConeSizeTFormula.Eval(energy, transverseEnergy, jetOpeningAngle);
  if (ConeSize<ConeSizeMin)ConeSize=ConeSizeMin;
  if (ConeSize>ConeSizeMax)ConeSize=ConeSizeMax;
  return ConeSize;
}
double TauElementsOperators::discriminatorByIsolTracksN ( unsigned int  isolationAnnulus_Tracksmaxn) const

Definition at line 241 of file TauElementsOperators.cc.

References IsolTracks_, and edm::RefVector< C, T, F >::size().

                                                                                                    {
  if ((unsigned int)IsolTracks_.size()>isolationAnnulus_Tracksmaxn)return 0.;
  else return 1.;
}
double TauElementsOperators::discriminatorByIsolTracksN ( const math::XYZVector coneAxis,
std::string  matchingConeMetric,
double  matchingConeSize,
double  ptLeadingTrackMin,
double  ptOtherTracksMin,
std::string  signalConeMetric,
double  signalConeSize,
std::string  isolationConeMetric,
double  isolationConeSize,
unsigned int  isolationAnnulus_Tracksmaxn 
) const
double TauElementsOperators::discriminatorByIsolTracksN ( std::string  matchingConeMetric,
double  matchingConeSize,
double  ptLeadingTrackMin,
double  ptOtherTracksMin,
std::string  signalConeMetric,
double  signalConeSize,
std::string  isolationConeMetric,
double  isolationConeSize,
unsigned int  isolationAnnulus_Tracksmaxn 
) const
const reco::TrackRef TauElementsOperators::leadTk ( std::string  matchingConeMetric,
double  matchingConeSize,
double  ptTrackMin 
) const
const reco::TrackRef TauElementsOperators::leadTk ( const math::XYZVector jetAxis,
std::string  matchingConeMetric,
double  matchingConeSize,
double  ptTrackMin 
) const
void TauElementsOperators::replaceSubStr ( std::string &  s,
const std::string &  oldSubStr,
const std::string &  newSubStr 
)

Definition at line 53 of file TauElementsOperators.cc.

                                                                                                 {
  //--- protect replacement algorithm
  //    from case that oldSubStr and newSubStr are equal
  //    (nothing to be done anyway)
  if ( oldSubStr == newSubStr ) return;
  
  //--- protect replacement algorithm
  //    from case that oldSubStr contains no characters
  //    (i.e. matches everything)
  if ( oldSubStr.empty() ) return;
  
  const string::size_type lengthOldSubStr = oldSubStr.size();
  const string::size_type lengthNewSubStr = newSubStr.size();
  
  string::size_type positionPreviousMatch = 0;
  string::size_type positionNextMatch = 0;
  
  //--- consecutively replace all occurences of oldSubStr by newSubStr;
  //    keep iterating until no occurence of oldSubStr left
  while ( (positionNextMatch = s.find(oldSubStr, positionPreviousMatch)) != string::npos ) {
    s.replace(positionNextMatch, lengthOldSubStr, newSubStr);
    positionPreviousMatch = positionNextMatch + lengthNewSubStr;
  } 
}
const reco::TrackRefVector TauElementsOperators::tracksInAnnulus ( const math::XYZVector coneAxis,
const std::string  innerconeMetric,
const double  innerconeSize,
const std::string  outerconeMetric,
const double  outerconeSize,
const double  ptTrackMin 
) const
const reco::TrackRefVector TauElementsOperators::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
const reco::TrackRefVector TauElementsOperators::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
const reco::TrackRefVector TauElementsOperators::tracksInCone ( const math::XYZVector coneAxis,
const std::string  coneMetric,
const double  coneSize,
const double  ptTrackMin 
) const

Member Data Documentation

Reimplemented in CaloTauElementsOperators, and PFTauElementsOperators.

Definition at line 53 of file TauElementsOperators.h.

Definition at line 52 of file TauElementsOperators.h.

Referenced by computeConeSize().

Definition at line 50 of file TauElementsOperators.h.

Definition at line 55 of file TauElementsOperators.h.

Referenced by discriminatorByIsolTracksN(), and TauElementsOperators().

Reimplemented in CaloTauElementsOperators, and PFTauElementsOperators.

Definition at line 58 of file TauElementsOperators.h.

Reimplemented in CaloTauElementsOperators, and PFTauElementsOperators.

Definition at line 57 of file TauElementsOperators.h.

Definition at line 63 of file TauElementsOperators.h.

Definition at line 64 of file TauElementsOperators.h.

Definition at line 62 of file TauElementsOperators.h.

Definition at line 61 of file TauElementsOperators.h.

Definition at line 60 of file TauElementsOperators.h.

Definition at line 59 of file TauElementsOperators.h.