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  //advance to next object
344  ++signalObjectCandidate;
345  bool doneBuilding = false;
346  while (!doneBuilding && signalObjectCandidate != sortedCands.end())
347  {
348  //compute cutoff quanity
349  math::XYZVector testAxis = axisVectorSoFar;
350  if (useScanningAxis)
351  testAxis += (**signalObjectCandidate).momentum();
352  double currentDelToCenter = ptrToMetricFunction((**signalObjectCandidate).momentum(), testAxis);
353  double testEnergy = totalEnergySoFar + (**signalObjectCandidate).energy();
354  double testEt = totalEtSoFar + (**signalObjectCandidate).et();
355  bool isCharged = (**signalObjectCandidate).charge();
356  bool addThisObject = true;
357  if (currentDelToCenter > ((isCharged)?maxChargedSize:maxNeutralSize) ) {
358  //max conesize is reached
359  addThisObject = false;
360  }
361  else if (currentDelToCenter > ((isCharged)?minChargedSize:minNeutralSize) )
362  {
363  //only do calculation if we are in the region above the minimum size
364  double cutOffQuantity = coneSizeFormula.Eval(testEnergy, testEt);
365  if (currentDelToCenter > cutOffQuantity)
366  addThisObject = false;
367  else if (useScanningAxis)
368  {
369  //make sure we don't make the seed track kinematically inconsistent
370  //(stop growth if axis-lead track distance greater than computed opening angle
371  if (ptrToMetricFunction(testAxis, leadTrackVector) > cutOffQuantity)
372  addThisObject = false;
373  }
374  }
375  if (addThisObject)
376  {
377  axisVectorSoFar = testAxis;
378  totalEnergySoFar = testEnergy;
379  totalEtSoFar = testEt;
380  ++signalObjectCandidate; //signal object candidate now points to one past the
381  }
382  else
383  {
384  doneBuilding = true;
385  }
386  }
387  // split the collection into two collections
388  double largest3DOpeningAngleSignal = 0.; //used for area outlier collection cone
389  for (std::vector<reco::PFCandidatePtr>::const_iterator iterCand = sortedCands.begin();
390  iterCand != signalObjectCandidate;
391  ++iterCand)
392  {
393  double angleToAxis = TauTagTools::computeAngle((*iterCand)->momentum(), axisVectorSoFar);
394  if (angleToAxis > largest3DOpeningAngleSignal)
395  largest3DOpeningAngleSignal = angleToAxis;
396 
397  if ((*iterCand)->charge())
398  signalChargedObjects.push_back(*iterCand);
399  else
400  signalGammaObjects.push_back(*iterCand);
401  }
402 
403  //function pointer to outlier collection cutoff quantity
404  double (*outlierCollectionCalculator)(const math::XYZVector&, const math::XYZVector&) = TauTagTools::computeAngle;
405  double outlierCollectionComputedMaxSize = 0;
406 
407  if (!outlierCollectorConeMetric.compare("angle"))
408  {
409  outlierCollectionCalculator = TauTagTools::computeAngle;
410  outlierCollectionComputedMaxSize = outlierCollectionMaxSize;
411  } else if (!outlierCollectorConeMetric.compare("area"))
412  {
413  //determine opening angle (in 3D space of signal objects)
414 
415  outlierCollectionCalculator = TauTagTools::computeAngle; //the area cone outside angle is defined in 3D
416  FixedAreaIsolationCone theFixedAreaCone;
417  theFixedAreaCone.setAcceptanceLimit(2.5);
418  //calculate new iso cone size
419  int errorFlagForConeSizeCalc = 0;
420  outlierCollectionComputedMaxSize = theFixedAreaCone(axisVectorSoFar.theta(), axisVectorSoFar.phi(), largest3DOpeningAngleSignal, outlierCollectionMaxSize, errorFlagForConeSizeCalc);
421  if (errorFlagForConeSizeCalc != 0)
422  {
423  edm::LogError("PFRecoTauAlgorithm") << "Error: " << errorFlagForConeSizeCalc << " when calculated const area annulus. Taking all non-signal PFJet consituents!";
424  outlierCollectionComputedMaxSize = 1000.; //takes everything...
425  }
426  } else if (!outlierCollectorConeMetric.compare("DR"))
427  {
428  outlierCollectionCalculator = TauTagTools::computeDeltaR;
429  outlierCollectionComputedMaxSize = outlierCollectionMaxSize;
430  }
431  else //warn if metric choice for outlier collection is not consistent
432  {
433  edm::LogWarning("PFRecoTauAlgorithm") << "Error in computeInsideOutContents(...): Outlier (isolation) collector cone metric (" << outlierCollectorConeMetric
434  << ") is not recognized! All non-signal associated PFJet constituents will be included in the outliers!";
435  }
436 
437  for (std::vector<reco::PFCandidatePtr>::const_iterator iterCand = signalObjectCandidate;
438  iterCand != sortedCands.end();
439  ++iterCand)
440  {
441  //stop adding objects if we have reached the maximum outleir collector size
442  double outlierOpeningQuantity = outlierCollectionCalculator(axisVectorSoFar, (*iterCand)->momentum());
443  if (outlierOpeningQuantity > outlierCollectionComputedMaxSize) break;
444 
445  if ((*iterCand)->charge())
446  outlierChargedObjects.push_back(*iterCand);
447  else
448  outlierGammaObjects.push_back(*iterCand);
449  }
450  //done
451 }
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 571 of file PFTauElementsOperators.cc.

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

Referenced by ~PFTauElementsOperators().

571  {
572  double myIsolPFCandsEtSum=0.;
573  double myDiscriminator=0.;
574  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFCand=IsolPFCands_.begin();iPFCand!=IsolPFCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
575  if (myIsolPFCandsEtSum<=IsolPFCands_maxEtSum) myDiscriminator=1;
576  return myDiscriminator;
577 }
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 455 of file PFTauElementsOperators.cc.

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

Referenced by ~PFTauElementsOperators().

455  {
456  double myDiscriminator=0.;
457  if ((int)IsolPFCands_.size()<=IsolPFCands_maxN) myDiscriminator=1;
458  return myDiscriminator;
459 }
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 606 of file PFTauElementsOperators.cc.

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

606  {
607  double myIsolPFCandsEtSum=0.;
608  double myDiscriminator=0.;
609  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFCand=IsolPFChargedHadrCands_.begin();iPFCand!=IsolPFChargedHadrCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
610  if (myIsolPFCandsEtSum<=IsolPFChargedHadrCands_maxEtSum) myDiscriminator=1;
611  return myDiscriminator;
612 }
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 484 of file PFTauElementsOperators.cc.

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

Referenced by ~PFTauElementsOperators().

484  {
485  double myDiscriminator=0.;
486  if ((int)IsolPFChargedHadrCands_.size()<=IsolPFChargedHadrCands_maxN) myDiscriminator=1;
487  return myDiscriminator;
488 }
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 676 of file PFTauElementsOperators.cc.

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

Referenced by ~PFTauElementsOperators().

676  {
677  double myIsolPFCandsEtSum=0.;
678  double myDiscriminator=0.;
679  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFCand=IsolPFGammaCands_.begin();iPFCand!=IsolPFGammaCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
680  if (myIsolPFCandsEtSum<=IsolPFGammaCands_maxEtSum) myDiscriminator=1;
681  return myDiscriminator;
682 }
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 542 of file PFTauElementsOperators.cc.

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

Referenced by ~PFTauElementsOperators().

542  {
543  double myDiscriminator=0.;
544  if ((int)IsolPFGammaCands_.size()<=IsolPFGammaCands_maxN) myDiscriminator=1;
545  return myDiscriminator;
546 }
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 641 of file PFTauElementsOperators.cc.

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

Referenced by ~PFTauElementsOperators().

641  {
642  double myIsolPFCandsEtSum=0.;
643  double myDiscriminator=0.;
644  for(std::vector<reco::PFCandidatePtr>::const_iterator iPFCand=IsolPFNeutrHadrCands_.begin();iPFCand!=IsolPFNeutrHadrCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
645  if (myIsolPFCandsEtSum<=IsolPFNeutrHadrCands_maxEtSum) myDiscriminator=1;
646  return myDiscriminator;
647 }
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 513 of file PFTauElementsOperators.cc.

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

Referenced by ~PFTauElementsOperators().

513  {
514  double myDiscriminator=0.;
515  if ((int)IsolPFNeutrHadrCands_.size()<=IsolPFNeutrHadrCands_maxN) myDiscriminator=1;
516  return myDiscriminator;
517 }
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