CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
TauElementsOperators Class Reference

#include <TauElementsOperators.h>

Inheritance diagram for TauElementsOperators:
CaloTauElementsOperators PFTauElementsOperators

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 (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
 
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
 
const reco::TrackRef leadTk (std::string matchingConeMetric, double matchingConeSize, double ptTrackMin) const
 
const reco::TrackRef leadTk (const math::XYZVector &jetAxis, std::string matchingConeMetric, double matchingConeSize, double ptTrackMin) const
 
void replaceSubStr (std::string &s, const std::string &oldSubStr, const std::string &newSubStr)
 
 TauElementsOperators ()
 
 TauElementsOperators (reco::BaseTau &)
 
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
 
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
 
 ~TauElementsOperators ()
 

Protected Attributes

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

Detailed Description

Definition at line 19 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_.

7  IsolTracks_=theBaseTau.isolationTracks();
8 }
virtual const reco::TrackRefVector & isolationTracks() const
Definition: BaseTau.cc:30
reco::TrackRefVector IsolTracks_
TauElementsOperators::~TauElementsOperators ( )
inline

Definition at line 23 of file TauElementsOperators.h.

23 {}

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().

10  {
11  double x=BaseTau_.energy();
12  double y=BaseTau_.et();
13  double ConeSize=ConeSizeTFormula.Eval(x,y);
14  if (ConeSize<ConeSizeMin)ConeSize=ConeSizeMin;
15  if (ConeSize>ConeSizeMax)ConeSize=ConeSizeMax;
16  return ConeSize;
17 }
virtual double et() const
transverse energy
virtual double energy() const
energy
Definition: DDAxes.h:10
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.

19  {
20  double ConeSize=ConeSizeTFormula.Eval(energy, transverseEnergy, jetOpeningAngle);
21  if (ConeSize<ConeSizeMin)ConeSize=ConeSizeMin;
22  if (ConeSize>ConeSizeMax)ConeSize=ConeSizeMax;
23  return ConeSize;
24 }
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().

241  {
242  if ((unsigned int)IsolTracks_.size()>isolationAnnulus_Tracksmaxn)return 0.;
243  else return 1.;
244 }
reco::TrackRefVector IsolTracks_
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
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.

53  {
54  //--- protect replacement algorithm
55  // from case that oldSubStr and newSubStr are equal
56  // (nothing to be done anyway)
57  if ( oldSubStr == newSubStr ) return;
58 
59  //--- protect replacement algorithm
60  // from case that oldSubStr contains no characters
61  // (i.e. matches everything)
62  if ( oldSubStr.empty() ) return;
63 
64  const string::size_type lengthOldSubStr = oldSubStr.size();
65  const string::size_type lengthNewSubStr = newSubStr.size();
66 
67  string::size_type positionPreviousMatch = 0;
68  string::size_type positionNextMatch = 0;
69 
70  //--- consecutively replace all occurences of oldSubStr by newSubStr;
71  // keep iterating until no occurence of oldSubStr left
72  while ( (positionNextMatch = s.find(oldSubStr, positionPreviousMatch)) != string::npos ) {
73  s.replace(positionNextMatch, lengthOldSubStr, newSubStr);
74  positionPreviousMatch = positionNextMatch + lengthNewSubStr;
75  }
76 }
uint16_t size_type
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
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

Member Data Documentation

double TauElementsOperators::AreaMetric_recoElements_maxabsEta_
protected

Definition at line 55 of file TauElementsOperators.h.

reco::BaseTau& TauElementsOperators::BaseTau_
protected

Definition at line 54 of file TauElementsOperators.h.

Referenced by computeConeSize().

TFormula TauElementsOperators::ConeSizeTFormula
protected

Definition at line 52 of file TauElementsOperators.h.

reco::TrackRefVector TauElementsOperators::IsolTracks_
protected

Definition at line 57 of file TauElementsOperators.h.

Referenced by discriminatorByIsolTracksN(), and TauElementsOperators().

Angle<math::XYZVector> TauElementsOperators::metricAngle_
protected

Definition at line 60 of file TauElementsOperators.h.

DeltaR<math::XYZVector> TauElementsOperators::metricDR_
protected

Definition at line 59 of file TauElementsOperators.h.

reco::TrackRefVector TauElementsOperators::Tracks_
protected
ElementsInAnnulusRef<math::XYZVector,Angle<math::XYZVector>,Angle<math::XYZVector>,reco::TrackCollection> TauElementsOperators::TracksinAnnulus_innerAngleouterAnglemetrics_
protected

Definition at line 65 of file TauElementsOperators.h.

ElementsInAnnulusRef<math::XYZVector,Angle<math::XYZVector>,DeltaR<math::XYZVector>,reco::TrackCollection> TauElementsOperators::TracksinAnnulus_innerAngleouterDRmetrics_
protected

Definition at line 66 of file TauElementsOperators.h.

ElementsInAnnulusRef<math::XYZVector,DeltaR<math::XYZVector>,Angle<math::XYZVector>,reco::TrackCollection> TauElementsOperators::TracksinAnnulus_innerDRouterAnglemetrics_
protected

Definition at line 64 of file TauElementsOperators.h.

ElementsInAnnulusRef<math::XYZVector,DeltaR<math::XYZVector>,DeltaR<math::XYZVector>,reco::TrackCollection> TauElementsOperators::TracksinAnnulus_innerDRouterDRmetrics_
protected

Definition at line 63 of file TauElementsOperators.h.

ElementsInConeRef<math::XYZVector,Angle<math::XYZVector>,reco::TrackCollection> TauElementsOperators::TracksinCone_Anglemetric_
protected

Definition at line 62 of file TauElementsOperators.h.

ElementsInConeRef<math::XYZVector,DeltaR<math::XYZVector>,reco::TrackCollection> TauElementsOperators::TracksinCone_DRmetric_
protected

Definition at line 61 of file TauElementsOperators.h.