CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
PFTauElementsOperators Class Reference

#include <PFTauElementsOperators.h>

Inheritance diagram for PFTauElementsOperators:
TauElementsOperators

Public Member Functions

void computeInsideOutContents (const std::vector< reco::PFCandidatePtr > &theChargedCands, const std::vector< reco::PFCandidatePtr > &theGammaCands, const math::XYZVector &leadTrackVector, const TFormula &coneSizeFormula, double(*ptrToMetricFunction)(const math::XYZVector &, const math::XYZVector &), const double minChargedSize, const double maxChargedSize, const double minNeutralSize, const double maxNeutralSize, const double minChargedPt, const double minNeutralPt, const std::string &outlierCollectorConeMetric, const double outlierCollectorConeSize, std::vector< reco::PFCandidatePtr > &signalChargedObjects, std::vector< reco::PFCandidatePtr > &outlierChargedObjects, std::vector< reco::PFCandidatePtr > &signalGammaObjects, std::vector< reco::PFCandidatePtr > &outlierGammaObjects, bool useScanningAxis)
 compute size of cone using the Inside-Out cone (Author Evan Friis, UC Davis) More...
 
void copyCandRefsFilteredByPt (const std::vector< reco::PFCandidatePtr > &theInputCands, std::vector< reco::PFCandidatePtr > &theOutputCands, const double minPt)
 append elements of theInputCands that pass Pt requirement to the end of theOutputCands More...
 
double discriminatorByIsolPFCandsEtSum (double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFCandsEtSum (std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFCandsEtSum (const math::XYZVector &myVector, std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFCandsN (int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFCandsN (std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFCandsN (const math::XYZVector &myVector, std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFChargedHadrCandsEtSum (std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFChargedHadrCandsEtSum (double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFChargedHadrCandsEtSum (const math::XYZVector &myVector, std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFChargedHadrCandsN (int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFChargedHadrCandsN (std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFChargedHadrCandsN (const math::XYZVector &myVector, std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFGammaCandsEtSum (double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFGammaCandsEtSum (std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFGammaCandsEtSum (const math::XYZVector &myVector, std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFGammaCandsN (int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFGammaCandsN (std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFGammaCandsN (const math::XYZVector &myVector, std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFNeutrHadrCandsEtSum (double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFNeutrHadrCandsEtSum (std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFNeutrHadrCandsEtSum (const math::XYZVector &myVector, std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, double IsolPFCands_maxEtSum=0)
 
double discriminatorByIsolPFNeutrHadrCandsN (int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFNeutrHadrCandsN (std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, int IsolPFCands_maxN=0)
 
double discriminatorByIsolPFNeutrHadrCandsN (const math::XYZVector &myVector, std::string matchingcone_metric, double matchingcone_size, std::string signalcone_metric, double signalcone_size, std::string isolcone_metric, double isolcone_size, bool useOnlyChargedHadrforleadPFCand, double minPt_leadPFCand, double minPt_PFCand, int IsolPFCands_maxN=0)
 
reco::PFCandidatePtr leadPFCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::PFCandidatePtr leadPFCand (const math::XYZVector &myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::PFCandidatePtr leadPFChargedHadrCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::PFCandidatePtr leadPFChargedHadrCand (const math::XYZVector &myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::PFCandidatePtr leadPFGammaCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::PFCandidatePtr leadPFGammaCand (const math::XYZVector &myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::PFCandidatePtr leadPFNeutrHadrCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::PFCandidatePtr leadPFNeutrHadrCand (const math::XYZVector &myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
std::vector< reco::PFCandidatePtrPFCandsInAnnulus (const std::vector< reco::PFCandidatePtr > &PFCands, const math::XYZVector &myVector, const std::string innercone_metric, const double innercone_size, const std::string outercone_metric, const double outercone_size, const double minPt) const
 
std::vector< reco::PFCandidatePtrPFCandsInAnnulus (const math::XYZVector &myVector, const std::string innercone_metric, const double innercone_size, const std::string outercone_metric, const double outercone_size, const double minPt) const
 
std::vector< reco::PFCandidatePtrPFCandsInCone (const std::vector< reco::PFCandidatePtr > &PFCands, const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
 
std::vector< reco::PFCandidatePtrPFCandsInCone (const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
 
std::vector< reco::PFCandidatePtrPFChargedHadrCandsInAnnulus (const math::XYZVector &myVector, const std::string innercone_metric, const double innercone_size, const std::string outercone_metric, const double outercone_size, const double minPt) const
 
std::vector< reco::PFCandidatePtrPFChargedHadrCandsInAnnulus (const math::XYZVector &myVector, const std::string innercone_metric, const double innercone_size, const std::string outercone_metric, const double outercone_size, const double minPt, const double PFChargedHadrCand_tracktorefpoint_maxDZ, const double refpoint_Z, const reco::Vertex &myPV) const
 
std::vector< reco::PFCandidatePtrPFChargedHadrCandsInCone (const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
 
std::vector< reco::PFCandidatePtrPFChargedHadrCandsInCone (const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt, const double PFChargedHadrCand_tracktorefpoint_maxDZ, const double refpoint_Z, const reco::Vertex &mPV) const
 
std::vector< reco::PFCandidatePtrPFGammaCandsInAnnulus (const math::XYZVector &myVector, const std::string innercone_metric, const double innercone_size, const std::string outercone_metric, const double outercone_size, const double minPt) const
 
std::vector< reco::PFCandidatePtrPFGammaCandsInCone (const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
 
std::pair< std::vector< reco::PFCandidatePtr >, std::vector< reco::PFCandidatePtr > > PFGammaCandsInOutEllipse (const std::vector< reco::PFCandidatePtr > &, const reco::PFCandidate &, double rPhi, double rEta, double maxPt) const
 
std::vector< reco::PFCandidatePtrPFNeutrHadrCandsInAnnulus (const math::XYZVector &myVector, const std::string innercone_metric, const double innercone_size, const std::string outercone_metric, const double outercone_size, const double minPt) const
 
std::vector< reco::PFCandidatePtrPFNeutrHadrCandsInCone (const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
 
 PFTauElementsOperators (reco::PFTau &thePFTau)
 
void setAreaMetricrecoElementsmaxabsEta (double x)
 
 ~PFTauElementsOperators ()
 
- Public Member Functions inherited from TauElementsOperators
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 ()
 

Private Member Functions

double computeAngle (const math::XYZVector &vec1, const math::XYZVector &vec2)
 
double computeDeltaR (const math::XYZVector &vec1, const math::XYZVector &vec2)
 

Private Attributes

double AreaMetric_recoElements_maxabsEta_
 
std::vector< reco::PFCandidatePtrIsolPFCands_
 
std::vector< reco::PFCandidatePtrIsolPFChargedHadrCands_
 
std::vector< reco::PFCandidatePtrIsolPFGammaCands_
 
std::vector< reco::PFCandidatePtrIsolPFNeutrHadrCands_
 
Angle< math::XYZVectormetricAngle_
 
DeltaR< math::XYZVectormetricDR_
 
ElementsInEllipse< reco::PFCandidate, reco::PFCandidatePFCandidatesInEllipse_
 
std::vector< reco::PFCandidatePtrPFCands_
 
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector >, Angle< math::XYZVector >, reco::PFCandidatePFCandsinAnnulus_innerAngleouterAnglemetrics_
 
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector >, DeltaR< math::XYZVector >, reco::PFCandidatePFCandsinAnnulus_innerAngleouterDRmetrics_
 
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector >, Angle< math::XYZVector >, reco::PFCandidatePFCandsinAnnulus_innerDRouterAnglemetrics_
 
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector >, DeltaR< math::XYZVector >, reco::PFCandidatePFCandsinAnnulus_innerDRouterDRmetrics_
 
ElementsInCone< math::XYZVector, Angle< math::XYZVector >, reco::PFCandidatePFCandsinCone_Anglemetric_
 
ElementsInCone< math::XYZVector, DeltaR< math::XYZVector >, reco::PFCandidatePFCandsinCone_DRmetric_
 
std::vector< reco::PFCandidatePtrPFChargedHadrCands_
 
std::vector< reco::PFCandidatePtrPFGammaCands_
 
reco::PFJetRef PFJetRef_
 
std::vector< reco::PFCandidatePtrPFNeutrHadrCands_
 

Additional Inherited Members

- Protected Attributes inherited from TauElementsOperators
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::TrackCollectionTracksinAnnulus_innerAngleouterAnglemetrics_
 
ElementsInAnnulusRef< math::XYZVector, Angle< math::XYZVector >, DeltaR< math::XYZVector >, reco::TrackCollectionTracksinAnnulus_innerAngleouterDRmetrics_
 
ElementsInAnnulusRef< math::XYZVector, DeltaR< math::XYZVector >, Angle< math::XYZVector >, reco::TrackCollectionTracksinAnnulus_innerDRouterAnglemetrics_
 
ElementsInAnnulusRef< math::XYZVector, DeltaR< math::XYZVector >, DeltaR< math::XYZVector >, reco::TrackCollectionTracksinAnnulus_innerDRouterDRmetrics_
 
ElementsInConeRef< math::XYZVector, Angle< math::XYZVector >, reco::TrackCollectionTracksinCone_Anglemetric_
 
ElementsInConeRef< math::XYZVector, DeltaR< math::XYZVector >, reco::TrackCollectionTracksinCone_DRmetric_
 

Detailed Description

Definition at line 31 of file PFTauElementsOperators.h.

Constructor & Destructor Documentation

PFTauElementsOperators::PFTauElementsOperators ( reco::PFTau thePFTau)

Definition at line 6 of file PFTauElementsOperators.cc.

References reco::PFTau::isolationPFCands(), reco::PFTau::isolationPFChargedHadrCands(), reco::PFTau::isolationPFGammaCands(), reco::PFTau::isolationPFNeutrHadrCands(), IsolPFCands_, IsolPFChargedHadrCands_, IsolPFGammaCands_, IsolPFNeutrHadrCands_, PFCands_, PFChargedHadrCands_, PFGammaCands_, PFJetRef_, PFNeutrHadrCands_, reco::PFTau::pfTauTagInfoRef(), and TauElementsOperators::Tracks_.

7  PFJetRef_=thePFTau.pfTauTagInfoRef()->pfjetRef();
8  PFCands_=thePFTau.pfTauTagInfoRef()->PFCands();
9  PFChargedHadrCands_=thePFTau.pfTauTagInfoRef()->PFChargedHadrCands();
10  PFNeutrHadrCands_=thePFTau.pfTauTagInfoRef()->PFNeutrHadrCands();
11  PFGammaCands_=thePFTau.pfTauTagInfoRef()->PFGammaCands();
12  IsolPFCands_=thePFTau.isolationPFCands();
16  Tracks_=thePFTau.pfTauTagInfoRef()->Tracks();
17 }
std::vector< reco::PFCandidatePtr > IsolPFChargedHadrCands_
std::vector< reco::PFCandidatePtr > IsolPFGammaCands_
const std::vector< reco::PFCandidatePtr > & isolationPFCands() const
PFCandidates in isolation region.
Definition: PFTau.cc:87
std::vector< reco::PFCandidatePtr > PFGammaCands_
std::vector< reco::PFCandidatePtr > IsolPFNeutrHadrCands_
std::vector< reco::PFCandidatePtr > PFNeutrHadrCands_
const std::vector< reco::PFCandidatePtr > & isolationPFGammaCands() const
Gamma candidates in isolation region.
Definition: PFTau.cc:93
std::vector< reco::PFCandidatePtr > PFCands_
std::vector< reco::PFCandidatePtr > IsolPFCands_
const std::vector< reco::PFCandidatePtr > & isolationPFNeutrHadrCands() const
Definition: PFTau.cc:91
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
Charged candidates in isolation region.
Definition: PFTau.cc:89
reco::TrackRefVector Tracks_
const PFTauTagInfoRef & pfTauTagInfoRef() const
Definition: PFTau.cc:61
std::vector< reco::PFCandidatePtr > PFChargedHadrCands_
PFTauElementsOperators::~PFTauElementsOperators ( )
inline

Member Function Documentation

double PFTauElementsOperators::computeAngle ( const math::XYZVector vec1,
const math::XYZVector vec2 
)
private
double PFTauElementsOperators::computeDeltaR ( const math::XYZVector vec1,
const math::XYZVector vec2 
)
private
void PFTauElementsOperators::computeInsideOutContents ( const std::vector< reco::PFCandidatePtr > &  theChargedCands,
const std::vector< reco::PFCandidatePtr > &  theGammaCands,
const math::XYZVector leadTrackVector,
const TFormula &  coneSizeFormula,
double(*)(const math::XYZVector &, const math::XYZVector &)  ptrToMetricFunction,
const double  minChargedSize,
const double  maxChargedSize,
const double  minNeutralSize,
const double  maxNeutralSize,
const double  minChargedPt,
const double  minNeutralPt,
const std::string &  outlierCollectorConeMetric,
const double  outlierCollectorConeSize,
std::vector< reco::PFCandidatePtr > &  signalChargedObjects,
std::vector< reco::PFCandidatePtr > &  outlierChargedObjects,
std::vector< reco::PFCandidatePtr > &  signalGammaObjects,
std::vector< reco::PFCandidatePtr > &  outlierGammaObjects,
bool  useScanningAxis 
)

compute size of cone using the Inside-Out cone (Author Evan Friis, UC Davis)

Definition at line 298 of file PFTauElementsOperators.cc.

References TauTagTools::computeAngle(), TauTagTools::computeDeltaR(), copyCandRefsFilteredByPt(), ALCARECOTkAlJpsiMuMu_cff::numberOfCandidates, and FixedAreaIsolationCone::setAcceptanceLimit().

Referenced by ~PFTauElementsOperators().

305 {
306  if (theChargedCands.empty() && theGammaCands.empty())
307  return;
308  //copy the vector of PFCands filtering by Pt
309  std::vector<reco::PFCandidatePtr> filteredCands;
310  filteredCands.reserve(theChargedCands.size() + theGammaCands.size());
311 
312  copyCandRefsFilteredByPt(theChargedCands, filteredCands, minChargedPt);
313  copyCandRefsFilteredByPt(theGammaCands, filteredCands, minNeutralPt);
314 
315  if (filteredCands.empty())
316  return;
317 
318 
319  //create vector of indexes as RefVectors can't use STL algos?
320  unsigned int numberOfCandidates = filteredCands.size();
321  std::vector<uint32_t> filteredCandIndexes(numberOfCandidates);
322  for(uint32_t theIndex = 0; theIndex < numberOfCandidates; theIndex++)
323  filteredCandIndexes[theIndex] = theIndex;
324 
325  TauTagTools::sortRefsByOpeningDistance myAngularSorter(leadTrackVector, ptrToMetricFunction, filteredCands);
326 
327  //sort the remaining candidates by angle to seed track
328  sort(filteredCandIndexes.begin(), filteredCandIndexes.end(), myAngularSorter);
329 
330  std::vector<reco::PFCandidatePtr> sortedCands;
331  for(std::vector<uint32_t>::const_iterator theSortedIndex = filteredCandIndexes.begin();
332  theSortedIndex != filteredCandIndexes.end();
333  ++theSortedIndex)
334  {
335  sortedCands.push_back(filteredCands.at(*theSortedIndex));
336  }
337 
338  //get first candidate (seed trk by definition)
339  std::vector<reco::PFCandidatePtr>::const_iterator signalObjectCandidate = sortedCands.begin();
340  double totalEnergySoFar = (**signalObjectCandidate).energy();
341  double totalEtSoFar = (**signalObjectCandidate).et();
342  math::XYZVector axisVectorSoFar = leadTrackVector;
343  double currentDelToCenter = ptrToMetricFunction(leadTrackVector, axisVectorSoFar);
344  //advance to next object
345  ++signalObjectCandidate;
346  bool doneBuilding = false;
347  while (!doneBuilding && signalObjectCandidate != sortedCands.end())
348  {
349  //compute cutoff quanity
350  math::XYZVector testAxis = axisVectorSoFar;
351  if (useScanningAxis)
352  testAxis += (**signalObjectCandidate).momentum();
353  currentDelToCenter = ptrToMetricFunction((**signalObjectCandidate).momentum(), testAxis);
354  double testEnergy = totalEnergySoFar + (**signalObjectCandidate).energy();
355  double testEt = totalEtSoFar + (**signalObjectCandidate).et();
356  bool isCharged = (**signalObjectCandidate).charge();
357  bool addThisObject = true;
358  if (currentDelToCenter > ((isCharged)?maxChargedSize:maxNeutralSize) ) {
359  //max conesize is reached
360  addThisObject = false;
361  }
362  else if (currentDelToCenter > ((isCharged)?minChargedSize:minNeutralSize) )
363  {
364  //only do calculation if we are in the region above the minimum size
365  double cutOffQuantity = coneSizeFormula.Eval(testEnergy, testEt);
366  if (currentDelToCenter > cutOffQuantity)
367  addThisObject = false;
368  else if (useScanningAxis)
369  {
370  //make sure we don't make the seed track kinematically inconsistent
371  //(stop growth if axis-lead track distance greater than computed opening angle
372  if (ptrToMetricFunction(testAxis, leadTrackVector) > cutOffQuantity)
373  addThisObject = false;
374  }
375  }
376  if (addThisObject)
377  {
378  axisVectorSoFar = testAxis;
379  totalEnergySoFar = testEnergy;
380  totalEtSoFar = testEt;
381  ++signalObjectCandidate; //signal object candidate now points to one past the
382  }
383  else
384  {
385  doneBuilding = true;
386  }
387  }
388  // split the collection into two collections
389  double largest3DOpeningAngleSignal = 0.; //used for area outlier collection cone
390  for (std::vector<reco::PFCandidatePtr>::const_iterator iterCand = sortedCands.begin();
391  iterCand != signalObjectCandidate;
392  ++iterCand)
393  {
394  double angleToAxis = TauTagTools::computeAngle((*iterCand)->momentum(), axisVectorSoFar);
395  if (angleToAxis > largest3DOpeningAngleSignal)
396  largest3DOpeningAngleSignal = angleToAxis;
397 
398  if ((*iterCand)->charge())
399  signalChargedObjects.push_back(*iterCand);
400  else
401  signalGammaObjects.push_back(*iterCand);
402  }
403 
404  //function pointer to outlier collection cutoff quantity
405  double (*outlierCollectionCalculator)(const math::XYZVector&, const math::XYZVector&) = TauTagTools::computeAngle;
406  double outlierCollectionComputedMaxSize = 0;
407 
408  if (!outlierCollectorConeMetric.compare("angle"))
409  {
410  outlierCollectionCalculator = TauTagTools::computeAngle;
411  outlierCollectionComputedMaxSize = outlierCollectionMaxSize;
412  } else if (!outlierCollectorConeMetric.compare("area"))
413  {
414  //determine opening angle (in 3D space of signal objects)
415 
416  outlierCollectionCalculator = TauTagTools::computeAngle; //the area cone outside angle is defined in 3D
417  FixedAreaIsolationCone theFixedAreaCone;
418  theFixedAreaCone.setAcceptanceLimit(2.5);
419  //calculate new iso cone size
420  int errorFlagForConeSizeCalc = 0;
421  outlierCollectionComputedMaxSize = theFixedAreaCone(axisVectorSoFar.theta(), axisVectorSoFar.phi(), largest3DOpeningAngleSignal, outlierCollectionMaxSize, errorFlagForConeSizeCalc);
422  if (errorFlagForConeSizeCalc != 0)
423  {
424  edm::LogError("PFRecoTauAlgorithm") << "Error: " << errorFlagForConeSizeCalc << " when calculated const area annulus. Taking all non-signal PFJet consituents!";
425  outlierCollectionComputedMaxSize = 1000.; //takes everything...
426  }
427  } else if (!outlierCollectorConeMetric.compare("DR"))
428  {
429  outlierCollectionCalculator = TauTagTools::computeDeltaR;
430  outlierCollectionComputedMaxSize = outlierCollectionMaxSize;
431  }
432  else //warn if metric choice for outlier collection is not consistent
433  {
434  edm::LogWarning("PFRecoTauAlgorithm") << "Error in computeInsideOutContents(...): Outlier (isolation) collector cone metric (" << outlierCollectorConeMetric
435  << ") is not recognized! All non-signal associated PFJet constituents will be included in the outliers!";
436  }
437 
438  for (std::vector<reco::PFCandidatePtr>::const_iterator iterCand = signalObjectCandidate;
439  iterCand != sortedCands.end();
440  ++iterCand)
441  {
442  //stop adding objects if we have reached the maximum outleir collector size
443  double outlierOpeningQuantity = outlierCollectionCalculator(axisVectorSoFar, (*iterCand)->momentum());
444  if (outlierOpeningQuantity > outlierCollectionComputedMaxSize) break;
445 
446  if ((*iterCand)->charge())
447  outlierChargedObjects.push_back(*iterCand);
448  else
449  outlierGammaObjects.push_back(*iterCand);
450  }
451  //done
452 }
double computeAngle(const math::XYZVector &vec1, const math::XYZVector &vec2)
Definition: TauTagTools.cc:13
void copyCandRefsFilteredByPt(const std::vector< reco::PFCandidatePtr > &theInputCands, std::vector< reco::PFCandidatePtr > &theOutputCands, const double minPt)
append elements of theInputCands that pass Pt requirement to the end of theOutputCands ...
void setAcceptanceLimit(double etaMaxTrackingAcceptance)
double computeDeltaR(const math::XYZVector &vec1, const math::XYZVector &vec2)
Definition: TauTagTools.cc:8
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
void PFTauElementsOperators::copyCandRefsFilteredByPt ( const std::vector< reco::PFCandidatePtr > &  theInputCands,
std::vector< reco::PFCandidatePtr > &  theOutputCands,
const double  minPt 
)

append elements of theInputCands that pass Pt requirement to the end of theOutputCands

Definition at line 284 of file PFTauElementsOperators.cc.

References lostTracks_cfi::minPt.

Referenced by computeInsideOutContents(), and ~PFTauElementsOperators().

285 {
286  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFCand = theInputCands.begin();
287  iPFCand != theInputCands.end();
288  ++iPFCand)
289  {
290  if ( (*iPFCand)->pt() > minPt )
291  theOutputCands.push_back(*iPFCand);
292  }
293 }
double PFTauElementsOperators::discriminatorByIsolPFCandsEtSum ( double  IsolPFCands_maxEtSum = 0)

Definition at line 572 of file PFTauElementsOperators.cc.

References IsolPFCands_, leadPFCand(), leadPFChargedHadrCand(), and PFCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

572  {
573  double myIsolPFCandsEtSum=0.;
574  double myDiscriminator=0.;
575  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFCand=IsolPFCands_.begin();iPFCand!=IsolPFCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
576  if (myIsolPFCandsEtSum<=IsolPFCands_maxEtSum) myDiscriminator=1;
577  return myDiscriminator;
578 }
std::vector< reco::PFCandidatePtr > IsolPFCands_
double PFTauElementsOperators::discriminatorByIsolPFCandsEtSum ( std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFCandsEtSum ( const math::XYZVector myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFCandsN ( int  IsolPFCands_maxN = 0)

Definition at line 456 of file PFTauElementsOperators.cc.

References IsolPFCands_, leadPFCand(), leadPFChargedHadrCand(), and PFCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

456  {
457  double myDiscriminator=0.;
458  if ((int)IsolPFCands_.size()<=IsolPFCands_maxN) myDiscriminator=1;
459  return myDiscriminator;
460 }
std::vector< reco::PFCandidatePtr > IsolPFCands_
double PFTauElementsOperators::discriminatorByIsolPFCandsN ( std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFCandsN ( const math::XYZVector myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsEtSum ( std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsEtSum ( double  IsolPFCands_maxEtSum = 0)

Definition at line 607 of file PFTauElementsOperators.cc.

References discriminatorByIsolPFChargedHadrCandsEtSum(), IsolPFChargedHadrCands_, leadPFCand(), leadPFChargedHadrCand(), and PFChargedHadrCandsInAnnulus().

607  {
608  double myIsolPFCandsEtSum=0.;
609  double myDiscriminator=0.;
610  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFCand=IsolPFChargedHadrCands_.begin();iPFCand!=IsolPFChargedHadrCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
611  if (myIsolPFCandsEtSum<=IsolPFChargedHadrCands_maxEtSum) myDiscriminator=1;
612  return myDiscriminator;
613 }
std::vector< reco::PFCandidatePtr > IsolPFChargedHadrCands_
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsEtSum ( const math::XYZVector myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsN ( int  IsolPFCands_maxN = 0)

Definition at line 485 of file PFTauElementsOperators.cc.

References IsolPFChargedHadrCands_, leadPFCand(), leadPFChargedHadrCand(), and PFChargedHadrCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

485  {
486  double myDiscriminator=0.;
487  if ((int)IsolPFChargedHadrCands_.size()<=IsolPFChargedHadrCands_maxN) myDiscriminator=1;
488  return myDiscriminator;
489 }
std::vector< reco::PFCandidatePtr > IsolPFChargedHadrCands_
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsN ( std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsN ( const math::XYZVector myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFGammaCandsEtSum ( double  IsolPFCands_maxEtSum = 0)

Definition at line 677 of file PFTauElementsOperators.cc.

References IsolPFGammaCands_, leadPFCand(), leadPFChargedHadrCand(), and PFGammaCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

677  {
678  double myIsolPFCandsEtSum=0.;
679  double myDiscriminator=0.;
680  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFCand=IsolPFGammaCands_.begin();iPFCand!=IsolPFGammaCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
681  if (myIsolPFCandsEtSum<=IsolPFGammaCands_maxEtSum) myDiscriminator=1;
682  return myDiscriminator;
683 }
std::vector< reco::PFCandidatePtr > IsolPFGammaCands_
double PFTauElementsOperators::discriminatorByIsolPFGammaCandsEtSum ( std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFGammaCandsEtSum ( const math::XYZVector myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFGammaCandsN ( int  IsolPFCands_maxN = 0)

Definition at line 543 of file PFTauElementsOperators.cc.

References IsolPFGammaCands_, leadPFCand(), leadPFChargedHadrCand(), and PFGammaCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

543  {
544  double myDiscriminator=0.;
545  if ((int)IsolPFGammaCands_.size()<=IsolPFGammaCands_maxN) myDiscriminator=1;
546  return myDiscriminator;
547 }
std::vector< reco::PFCandidatePtr > IsolPFGammaCands_
double PFTauElementsOperators::discriminatorByIsolPFGammaCandsN ( std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFGammaCandsN ( const math::XYZVector myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFNeutrHadrCandsEtSum ( double  IsolPFCands_maxEtSum = 0)

Definition at line 642 of file PFTauElementsOperators.cc.

References IsolPFNeutrHadrCands_, leadPFCand(), leadPFChargedHadrCand(), and PFNeutrHadrCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

642  {
643  double myIsolPFCandsEtSum=0.;
644  double myDiscriminator=0.;
645  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFCand=IsolPFNeutrHadrCands_.begin();iPFCand!=IsolPFNeutrHadrCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
646  if (myIsolPFCandsEtSum<=IsolPFNeutrHadrCands_maxEtSum) myDiscriminator=1;
647  return myDiscriminator;
648 }
std::vector< reco::PFCandidatePtr > IsolPFNeutrHadrCands_
double PFTauElementsOperators::discriminatorByIsolPFNeutrHadrCandsEtSum ( std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFNeutrHadrCandsEtSum ( const math::XYZVector myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFNeutrHadrCandsN ( int  IsolPFCands_maxN = 0)

Definition at line 514 of file PFTauElementsOperators.cc.

References IsolPFNeutrHadrCands_, leadPFCand(), leadPFChargedHadrCand(), and PFNeutrHadrCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

514  {
515  double myDiscriminator=0.;
516  if ((int)IsolPFNeutrHadrCands_.size()<=IsolPFNeutrHadrCands_maxN) myDiscriminator=1;
517  return myDiscriminator;
518 }
std::vector< reco::PFCandidatePtr > IsolPFNeutrHadrCands_
double PFTauElementsOperators::discriminatorByIsolPFNeutrHadrCandsN ( std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFNeutrHadrCandsN ( const math::XYZVector myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
reco::PFCandidatePtr PFTauElementsOperators::leadPFCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidatePtr PFTauElementsOperators::leadPFCand ( const math::XYZVector myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidatePtr PFTauElementsOperators::leadPFChargedHadrCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidatePtr PFTauElementsOperators::leadPFChargedHadrCand ( const math::XYZVector myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidatePtr PFTauElementsOperators::leadPFGammaCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidatePtr PFTauElementsOperators::leadPFGammaCand ( const math::XYZVector myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidatePtr PFTauElementsOperators::leadPFNeutrHadrCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidatePtr PFTauElementsOperators::leadPFNeutrHadrCand ( const math::XYZVector myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFCandsInAnnulus ( const std::vector< reco::PFCandidatePtr > &  PFCands,
const math::XYZVector myVector,
const std::string  innercone_metric,
const double  innercone_size,
const std::string  outercone_metric,
const double  outercone_size,
const double  minPt 
) const
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFCandsInAnnulus ( const math::XYZVector myVector,
const std::string  innercone_metric,
const double  innercone_size,
const std::string  outercone_metric,
const double  outercone_size,
const double  minPt 
) const
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFCandsInCone ( const std::vector< reco::PFCandidatePtr > &  PFCands,
const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFCandsInCone ( const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFChargedHadrCandsInAnnulus ( const math::XYZVector myVector,
const std::string  innercone_metric,
const double  innercone_size,
const std::string  outercone_metric,
const double  outercone_size,
const double  minPt 
) const
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFChargedHadrCandsInAnnulus ( const math::XYZVector myVector,
const std::string  innercone_metric,
const double  innercone_size,
const std::string  outercone_metric,
const double  outercone_size,
const double  minPt,
const double  PFChargedHadrCand_tracktorefpoint_maxDZ,
const double  refpoint_Z,
const reco::Vertex myPV 
) const
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFChargedHadrCandsInCone ( const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFChargedHadrCandsInCone ( const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt,
const double  PFChargedHadrCand_tracktorefpoint_maxDZ,
const double  refpoint_Z,
const reco::Vertex mPV 
) const
std::vector< reco::PFCandidatePtr > PFTauElementsOperators::PFGammaCandsInAnnulus ( const math::XYZVector myVector,
const std::string  innercone_metric,
const double  innercone_size,
const std::string  outercone_metric,
const double  outercone_size,
const double  minPt 
) const

Definition at line 158 of file PFTauElementsOperators.cc.

References leadPFCand(), leadPFChargedHadrCand(), leadPFGammaCand(), leadPFNeutrHadrCand(), lostTracks_cfi::minPt, PFCandsInAnnulus(), PFCandsInCone(), PFChargedHadrCandsInCone(), PFGammaCands_, PFGammaCandsInCone(), PFJetRef_, and PFNeutrHadrCandsInCone().

Referenced by PFRecoTauAlgorithm::buildPFTau(), discriminatorByIsolPFGammaCandsEtSum(), discriminatorByIsolPFGammaCandsN(), and ~PFTauElementsOperators().

158  {
159  std::vector<reco::PFCandidatePtr> theFilteredPFCandsInAnnulus=PFCandsInAnnulus(PFGammaCands_,myVector,innercone_metric,innercone_size,outercone_metric,outercone_size,minPt);
160  return theFilteredPFCandsInAnnulus;
161 }
std::vector< reco::PFCandidatePtr > PFGammaCands_
std::vector< reco::PFCandidatePtr > PFCandsInAnnulus(const std::vector< reco::PFCandidatePtr > &PFCands, const math::XYZVector &myVector, const std::string innercone_metric, const double innercone_size, const std::string outercone_metric, const double outercone_size, const double minPt) const
std::vector< reco::PFCandidatePtr > PFTauElementsOperators::PFGammaCandsInCone ( const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const

Definition at line 62 of file PFTauElementsOperators.cc.

References PFCandsInCone(), and PFGammaCands_.

Referenced by PFRecoTauAlgorithm::buildPFTau(), PFGammaCandsInAnnulus(), and ~PFTauElementsOperators().

62  {
63  std::vector<reco::PFCandidatePtr> theFilteredPFCandsInCone=PFCandsInCone(PFGammaCands_,myVector,conemetric,conesize,minPt);
64  return theFilteredPFCandsInCone;
65 }
std::vector< reco::PFCandidatePtr > PFCandsInCone(const std::vector< reco::PFCandidatePtr > &PFCands, const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
std::vector< reco::PFCandidatePtr > PFGammaCands_
std::pair< std::vector< reco::PFCandidatePtr >, std::vector< reco::PFCandidatePtr > > PFTauElementsOperators::PFGammaCandsInOutEllipse ( const std::vector< reco::PFCandidatePtr > &  PFGammaCands_,
const reco::PFCandidate leadCand_,
double  rPhi,
double  rEta,
double  maxPt 
) const

Definition at line 68 of file PFTauElementsOperators.cc.

References AreaMetric_recoElements_maxabsEta_, TauTagTools::filteredPFChargedHadrCands(), MuonErrorMatrixAnalyzer_cfi::maxPt, metricAngle_, metricDR_, lostTracks_cfi::minPt, PFCandidatesInEllipse_, PFCands_, PFCandsInAnnulus(), PFCandsinAnnulus_innerAngleouterAnglemetrics_, PFCandsinAnnulus_innerAngleouterDRmetrics_, PFCandsinAnnulus_innerDRouterAnglemetrics_, PFCandsinAnnulus_innerDRouterDRmetrics_, PFChargedHadrCands_, PFChargedHadrCandsInAnnulus(), reco::Vertex::position(), and FixedAreaIsolationCone::setAcceptanceLimit().

Referenced by PFRecoTauAlgorithm::buildPFTau(), and ~PFTauElementsOperators().

68  {
69  std::pair<std::vector<reco::PFCandidatePtr>,std::vector<reco::PFCandidatePtr>> myPFGammaCandsInEllipse = PFCandidatesInEllipse_(leadCand_, rPhi, rEta, PFGammaCands_);
70  std::vector<reco::PFCandidatePtr> thePFGammaCandsInEllipse = myPFGammaCandsInEllipse.first;
71  std::vector<reco::PFCandidatePtr> thePFGammaCandsOutEllipse = myPFGammaCandsInEllipse.second;
72  std::vector<reco::PFCandidatePtr> theFilteredPFGammaCandsInEllipse;
73  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFGammaCand = thePFGammaCandsInEllipse.begin(); iPFGammaCand != thePFGammaCandsInEllipse.end(); ++iPFGammaCand){
74  if((**iPFGammaCand).pt() <= maxPt) theFilteredPFGammaCandsInEllipse.push_back(*iPFGammaCand);
75  else thePFGammaCandsOutEllipse.push_back(*iPFGammaCand);
76  }
77  std::pair<std::vector<reco::PFCandidatePtr>, std::vector<reco::PFCandidatePtr>> theFilteredPFGammaCandsInOutEllipse(theFilteredPFGammaCandsInEllipse, thePFGammaCandsOutEllipse);
78 
79  return theFilteredPFGammaCandsInOutEllipse;
80 }
std::vector< reco::PFCandidatePtr > PFGammaCands_
ElementsInEllipse< reco::PFCandidate, reco::PFCandidate > PFCandidatesInEllipse_
std::vector< reco::PFCandidatePtr > PFTauElementsOperators::PFNeutrHadrCandsInAnnulus ( const math::XYZVector myVector,
const std::string  innercone_metric,
const double  innercone_size,
const std::string  outercone_metric,
const double  outercone_size,
const double  minPt 
) const

Definition at line 154 of file PFTauElementsOperators.cc.

References PFCandsInAnnulus(), and PFNeutrHadrCands_.

Referenced by PFRecoTauAlgorithm::buildPFTau(), discriminatorByIsolPFNeutrHadrCandsEtSum(), discriminatorByIsolPFNeutrHadrCandsN(), and ~PFTauElementsOperators().

154  {
155  std::vector<reco::PFCandidatePtr> theFilteredPFCandsInAnnulus=PFCandsInAnnulus(PFNeutrHadrCands_,myVector,innercone_metric,innercone_size,outercone_metric,outercone_size,minPt);
156  return theFilteredPFCandsInAnnulus;
157 }
std::vector< reco::PFCandidatePtr > PFNeutrHadrCands_
std::vector< reco::PFCandidatePtr > PFCandsInAnnulus(const std::vector< reco::PFCandidatePtr > &PFCands, const math::XYZVector &myVector, const std::string innercone_metric, const double innercone_size, const std::string outercone_metric, const double outercone_size, const double minPt) const
std::vector< reco::PFCandidatePtr > PFTauElementsOperators::PFNeutrHadrCandsInCone ( const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const

Definition at line 58 of file PFTauElementsOperators.cc.

References PFCandsInCone(), and PFNeutrHadrCands_.

Referenced by PFRecoTauAlgorithm::buildPFTau(), PFGammaCandsInAnnulus(), and ~PFTauElementsOperators().

58  {
59  std::vector<reco::PFCandidatePtr> theFilteredPFCandsInCone=PFCandsInCone(PFNeutrHadrCands_,myVector,conemetric,conesize,minPt);
60  return theFilteredPFCandsInCone;
61 }
std::vector< reco::PFCandidatePtr > PFCandsInCone(const std::vector< reco::PFCandidatePtr > &PFCands, const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
std::vector< reco::PFCandidatePtr > PFNeutrHadrCands_
void PFTauElementsOperators::setAreaMetricrecoElementsmaxabsEta ( double  x)

Member Data Documentation

double PFTauElementsOperators::AreaMetric_recoElements_maxabsEta_
private
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::IsolPFCands_
private
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::IsolPFChargedHadrCands_
private
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::IsolPFGammaCands_
private
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::IsolPFNeutrHadrCands_
private
Angle<math::XYZVector> PFTauElementsOperators::metricAngle_
private
DeltaR<math::XYZVector> PFTauElementsOperators::metricDR_
private
ElementsInEllipse<reco::PFCandidate, reco::PFCandidate> PFTauElementsOperators::PFCandidatesInEllipse_
private

Definition at line 125 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInOutEllipse().

std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFCands_
private
ElementsInAnnulus<math::XYZVector,Angle<math::XYZVector>,Angle<math::XYZVector>,reco::PFCandidate> PFTauElementsOperators::PFCandsinAnnulus_innerAngleouterAnglemetrics_
private

Definition at line 123 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInOutEllipse().

ElementsInAnnulus<math::XYZVector,Angle<math::XYZVector>,DeltaR<math::XYZVector>,reco::PFCandidate> PFTauElementsOperators::PFCandsinAnnulus_innerAngleouterDRmetrics_
private

Definition at line 124 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInOutEllipse().

ElementsInAnnulus<math::XYZVector,DeltaR<math::XYZVector>,Angle<math::XYZVector>,reco::PFCandidate> PFTauElementsOperators::PFCandsinAnnulus_innerDRouterAnglemetrics_
private

Definition at line 122 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInOutEllipse().

ElementsInAnnulus<math::XYZVector,DeltaR<math::XYZVector>,DeltaR<math::XYZVector>,reco::PFCandidate> PFTauElementsOperators::PFCandsinAnnulus_innerDRouterDRmetrics_
private

Definition at line 121 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInOutEllipse().

ElementsInCone<math::XYZVector,Angle<math::XYZVector>,reco::PFCandidate> PFTauElementsOperators::PFCandsinCone_Anglemetric_
private

Definition at line 120 of file PFTauElementsOperators.h.

Referenced by setAreaMetricrecoElementsmaxabsEta().

ElementsInCone<math::XYZVector,DeltaR<math::XYZVector>,reco::PFCandidate> PFTauElementsOperators::PFCandsinCone_DRmetric_
private

Definition at line 119 of file PFTauElementsOperators.h.

Referenced by setAreaMetricrecoElementsmaxabsEta().

std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFChargedHadrCands_
private
std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFGammaCands_
private
reco::PFJetRef PFTauElementsOperators::PFJetRef_
private

Definition at line 104 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInAnnulus(), and PFTauElementsOperators().

std::vector<reco::PFCandidatePtr> PFTauElementsOperators::PFNeutrHadrCands_
private