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::CandidatePtr > &theChargedCands, const std::vector< reco::CandidatePtr > &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::CandidatePtr > &signalChargedObjects, std::vector< reco::CandidatePtr > &outlierChargedObjects, std::vector< reco::CandidatePtr > &signalGammaObjects, std::vector< reco::CandidatePtr > &outlierGammaObjects, bool useScanningAxis)
 compute size of cone using the Inside-Out cone (Author Evan Friis, UC Davis) More...
 
void copyCandRefsFilteredByPt (const std::vector< reco::CandidatePtr > &theInputCands, std::vector< reco::CandidatePtr > &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::CandidatePtr leadCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::CandidatePtr leadCand (const math::XYZVector &myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::CandidatePtr leadChargedHadrCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::CandidatePtr leadChargedHadrCand (const math::XYZVector &myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::CandidatePtr leadGammaCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::CandidatePtr leadGammaCand (const math::XYZVector &myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::CandidatePtr leadNeutrHadrCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
reco::CandidatePtr leadNeutrHadrCand (const math::XYZVector &myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
 
std::vector< reco::CandidatePtrPFCandsInAnnulus (const std::vector< reco::CandidatePtr > &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::CandidatePtrPFCandsInAnnulus (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::CandidatePtrPFCandsInCone (const std::vector< reco::CandidatePtr > &PFCands, const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
 
std::vector< reco::CandidatePtrPFCandsInCone (const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
 
std::vector< reco::CandidatePtrPFChargedHadrCandsInAnnulus (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::CandidatePtrPFChargedHadrCandsInAnnulus (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::CandidatePtrPFChargedHadrCandsInCone (const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
 
std::vector< reco::CandidatePtrPFChargedHadrCandsInCone (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::CandidatePtrPFGammaCandsInAnnulus (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::CandidatePtrPFGammaCandsInCone (const math::XYZVector &myVector, const std::string conemetric, const double conesize, const double minPt) const
 
std::pair< std::vector< reco::CandidatePtr >, std::vector< reco::CandidatePtr > > PFGammaCandsInOutEllipse (const std::vector< reco::CandidatePtr > &, const reco::Candidate &, double rPhi, double rEta, double maxPt) const
 
std::vector< reco::CandidatePtrPFNeutrHadrCandsInAnnulus (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::CandidatePtrPFNeutrHadrCandsInCone (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::CandidatePtrIsolPFCands_
 
std::vector< reco::CandidatePtrIsolPFChargedHadrCands_
 
std::vector< reco::CandidatePtrIsolPFGammaCands_
 
std::vector< reco::CandidatePtrIsolPFNeutrHadrCands_
 
Angle< math::XYZVectormetricAngle_
 
DeltaR< math::XYZVectormetricDR_
 
ElementsInEllipse< reco::Candidate, reco::CandidatePFCandidatesInEllipse_
 
std::vector< reco::CandidatePtrPFCands_
 
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector >, Angle< math::XYZVector >, reco::CandidatePFCandsinAnnulus_innerAngleouterAnglemetrics_
 
ElementsInAnnulus< math::XYZVector, Angle< math::XYZVector >, DeltaR< math::XYZVector >, reco::CandidatePFCandsinAnnulus_innerAngleouterDRmetrics_
 
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector >, Angle< math::XYZVector >, reco::CandidatePFCandsinAnnulus_innerDRouterAnglemetrics_
 
ElementsInAnnulus< math::XYZVector, DeltaR< math::XYZVector >, DeltaR< math::XYZVector >, reco::CandidatePFCandsinAnnulus_innerDRouterDRmetrics_
 
ElementsInCone< math::XYZVector, Angle< math::XYZVector >, reco::CandidatePFCandsinCone_Anglemetric_
 
ElementsInCone< math::XYZVector, DeltaR< math::XYZVector >, reco::CandidatePFCandsinCone_DRmetric_
 
std::vector< reco::CandidatePtrPFChargedHadrCands_
 
std::vector< reco::CandidatePtrPFGammaCands_
 
reco::JetBaseRef PFJetRef_
 
std::vector< reco::CandidatePtrPFNeutrHadrCands_
 

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::isolationCands(), reco::PFTau::isolationChargedHadrCands(), reco::PFTau::isolationGammaCands(), reco::PFTau::isolationNeutrHadrCands(), 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.isolationCands();
16  Tracks_=thePFTau.pfTauTagInfoRef()->Tracks();
17 }
std::vector< reco::CandidatePtr > PFGammaCands_
std::vector< reco::CandidatePtr > PFCands_
std::vector< reco::CandidatePtr > PFChargedHadrCands_
std::vector< reco::CandidatePtr > IsolPFChargedHadrCands_
const std::vector< reco::CandidatePtr > & isolationGammaCands() const
Gamma candidates in isolation region.
Definition: PFTau.cc:93
std::vector< reco::CandidatePtr > PFNeutrHadrCands_
reco::TrackRefVector Tracks_
const std::vector< reco::CandidatePtr > & isolationChargedHadrCands() const
Charged candidates in isolation region.
Definition: PFTau.cc:89
const PFTauTagInfoRef & pfTauTagInfoRef() const
Definition: PFTau.cc:61
std::vector< reco::CandidatePtr > IsolPFNeutrHadrCands_
std::vector< reco::CandidatePtr > IsolPFGammaCands_
const std::vector< reco::CandidatePtr > & isolationNeutrHadrCands() const
Definition: PFTau.cc:91
const std::vector< reco::CandidatePtr > & isolationCands() const
Candidates in isolation region.
Definition: PFTau.cc:87
std::vector< reco::CandidatePtr > IsolPFCands_
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::CandidatePtr > &  theChargedCands,
const std::vector< reco::CandidatePtr > &  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::CandidatePtr > &  signalChargedObjects,
std::vector< reco::CandidatePtr > &  outlierChargedObjects,
std::vector< reco::CandidatePtr > &  signalGammaObjects,
std::vector< reco::CandidatePtr > &  outlierGammaObjects,
bool  useScanningAxis 
)

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

Definition at line 300 of file PFTauElementsOperators.cc.

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

Referenced by ~PFTauElementsOperators().

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

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

Definition at line 286 of file PFTauElementsOperators.cc.

References lostTracks_cfi::minPt.

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

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

Definition at line 573 of file PFTauElementsOperators.cc.

References IsolPFCands_, leadCand(), leadChargedHadrCand(), and PFCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

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

References IsolPFCands_, leadCand(), leadChargedHadrCand(), and PFCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

457  {
458  double myDiscriminator=0.;
459  if ((int)IsolPFCands_.size()<=IsolPFCands_maxN) myDiscriminator=1;
460  return myDiscriminator;
461 }
std::vector< reco::CandidatePtr > 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 608 of file PFTauElementsOperators.cc.

References discriminatorByIsolPFChargedHadrCandsEtSum(), IsolPFChargedHadrCands_, leadCand(), leadChargedHadrCand(), and PFChargedHadrCandsInAnnulus().

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

References IsolPFChargedHadrCands_, leadCand(), leadChargedHadrCand(), and PFChargedHadrCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

486  {
487  double myDiscriminator=0.;
488  if ((int)IsolPFChargedHadrCands_.size()<=IsolPFChargedHadrCands_maxN) myDiscriminator=1;
489  return myDiscriminator;
490 }
std::vector< reco::CandidatePtr > 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 678 of file PFTauElementsOperators.cc.

References IsolPFGammaCands_, leadCand(), leadChargedHadrCand(), and PFGammaCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

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

References IsolPFGammaCands_, leadCand(), leadChargedHadrCand(), and PFGammaCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

544  {
545  double myDiscriminator=0.;
546  if ((int)IsolPFGammaCands_.size()<=IsolPFGammaCands_maxN) myDiscriminator=1;
547  return myDiscriminator;
548 }
std::vector< reco::CandidatePtr > 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 643 of file PFTauElementsOperators.cc.

References IsolPFNeutrHadrCands_, leadCand(), leadChargedHadrCand(), and PFNeutrHadrCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

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

References IsolPFNeutrHadrCands_, leadCand(), leadChargedHadrCand(), and PFNeutrHadrCandsInAnnulus().

Referenced by ~PFTauElementsOperators().

515  {
516  double myDiscriminator=0.;
517  if ((int)IsolPFNeutrHadrCands_.size()<=IsolPFNeutrHadrCands_maxN) myDiscriminator=1;
518  return myDiscriminator;
519 }
std::vector< reco::CandidatePtr > 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::CandidatePtr PFTauElementsOperators::leadCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::CandidatePtr PFTauElementsOperators::leadCand ( const math::XYZVector myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::CandidatePtr PFTauElementsOperators::leadChargedHadrCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::CandidatePtr PFTauElementsOperators::leadChargedHadrCand ( const math::XYZVector myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const

Referenced by Tau.Tau::dxy_approx(), and Tau.Tau::dz().

reco::CandidatePtr PFTauElementsOperators::leadGammaCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::CandidatePtr PFTauElementsOperators::leadGammaCand ( const math::XYZVector myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::CandidatePtr PFTauElementsOperators::leadNeutrHadrCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::CandidatePtr PFTauElementsOperators::leadNeutrHadrCand ( const math::XYZVector myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
std::vector<reco::CandidatePtr> PFTauElementsOperators::PFCandsInAnnulus ( const std::vector< reco::CandidatePtr > &  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::CandidatePtr> 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::CandidatePtr> PFTauElementsOperators::PFCandsInCone ( const std::vector< reco::CandidatePtr > &  PFCands,
const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const
std::vector<reco::CandidatePtr> PFTauElementsOperators::PFCandsInCone ( const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const
std::vector<reco::CandidatePtr> 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::CandidatePtr> 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::CandidatePtr> PFTauElementsOperators::PFChargedHadrCandsInCone ( const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const
std::vector<reco::CandidatePtr> 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::CandidatePtr > 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 160 of file PFTauElementsOperators.cc.

References leadCand(), leadChargedHadrCand(), leadGammaCand(), leadNeutrHadrCand(), lostTracks_cfi::minPt, PFCandsInAnnulus(), PFCandsInCone(), PFChargedHadrCandsInCone(), PFGammaCands_, PFGammaCandsInCone(), PFJetRef_, and PFNeutrHadrCandsInCone().

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

160  {
161  std::vector<reco::CandidatePtr> theFilteredPFCandsInAnnulus=PFCandsInAnnulus(PFGammaCands_,myVector,innercone_metric,innercone_size,outercone_metric,outercone_size,minPt);
162  return theFilteredPFCandsInAnnulus;
163 }
std::vector< reco::CandidatePtr > PFGammaCands_
std::vector< reco::CandidatePtr > PFCandsInAnnulus(const std::vector< reco::CandidatePtr > &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::CandidatePtr > PFTauElementsOperators::PFGammaCandsInCone ( const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const

Definition at line 63 of file PFTauElementsOperators.cc.

References PFCandsInCone(), and PFGammaCands_.

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

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

Definition at line 69 of file PFTauElementsOperators.cc.

References AreaMetric_recoElements_maxabsEta_, Exception, 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().

69  {
70  std::pair<std::vector<reco::CandidatePtr>,std::vector<reco::CandidatePtr>> myPFGammaCandsInEllipse = PFCandidatesInEllipse_(leadCand_, rPhi, rEta, PFGammaCands_);
71  std::vector<reco::CandidatePtr> thePFGammaCandsInEllipse = myPFGammaCandsInEllipse.first;
72  std::vector<reco::CandidatePtr> thePFGammaCandsOutEllipse = myPFGammaCandsInEllipse.second;
73  std::vector<reco::CandidatePtr> theFilteredPFGammaCandsInEllipse;
74  for(std::vector<reco::CandidatePtr>::const_iterator iPFGammaCand = thePFGammaCandsInEllipse.begin(); iPFGammaCand != thePFGammaCandsInEllipse.end(); ++iPFGammaCand){
75  if((**iPFGammaCand).pt() <= maxPt) theFilteredPFGammaCandsInEllipse.push_back(*iPFGammaCand);
76  else thePFGammaCandsOutEllipse.push_back(*iPFGammaCand);
77  }
78  std::pair<std::vector<reco::CandidatePtr>, std::vector<reco::CandidatePtr>> theFilteredPFGammaCandsInOutEllipse(theFilteredPFGammaCandsInEllipse, thePFGammaCandsOutEllipse);
79 
80  return theFilteredPFGammaCandsInOutEllipse;
81 }
std::vector< reco::CandidatePtr > PFGammaCands_
ElementsInEllipse< reco::Candidate, reco::Candidate > PFCandidatesInEllipse_
std::vector< reco::CandidatePtr > 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 156 of file PFTauElementsOperators.cc.

References PFCandsInAnnulus(), and PFNeutrHadrCands_.

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

156  {
157  std::vector<reco::CandidatePtr> theFilteredPFCandsInAnnulus=PFCandsInAnnulus(PFNeutrHadrCands_,myVector,innercone_metric,innercone_size,outercone_metric,outercone_size,minPt);
158  return theFilteredPFCandsInAnnulus;
159 }
std::vector< reco::CandidatePtr > PFNeutrHadrCands_
std::vector< reco::CandidatePtr > PFCandsInAnnulus(const std::vector< reco::CandidatePtr > &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::CandidatePtr > PFTauElementsOperators::PFNeutrHadrCandsInCone ( const math::XYZVector myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const

Definition at line 59 of file PFTauElementsOperators.cc.

References PFCandsInCone(), and PFNeutrHadrCands_.

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

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

Member Data Documentation

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

Definition at line 125 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInOutEllipse().

std::vector<reco::CandidatePtr> PFTauElementsOperators::PFCands_
private
ElementsInAnnulus<math::XYZVector,Angle<math::XYZVector>,Angle<math::XYZVector>,reco::Candidate> 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::Candidate> 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::Candidate> 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::Candidate> PFTauElementsOperators::PFCandsinAnnulus_innerDRouterDRmetrics_
private

Definition at line 121 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInOutEllipse().

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

Definition at line 120 of file PFTauElementsOperators.h.

Referenced by setAreaMetricrecoElementsmaxabsEta().

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

Definition at line 119 of file PFTauElementsOperators.h.

Referenced by setAreaMetricrecoElementsmaxabsEta().

std::vector<reco::CandidatePtr> PFTauElementsOperators::PFChargedHadrCands_
private
std::vector<reco::CandidatePtr> PFTauElementsOperators::PFGammaCands_
private
reco::JetBaseRef PFTauElementsOperators::PFJetRef_
private

Definition at line 104 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInAnnulus(), and PFTauElementsOperators().

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