CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

PFTauElementsOperators Class Reference

#include <PFTauElementsOperators.h>

Inheritance diagram for PFTauElementsOperators:
TauElementsOperators

List of all members.

Public Member Functions

void computeInsideOutContents (const reco::PFCandidateRefVector &theChargedCands, const reco::PFCandidateRefVector &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, reco::PFCandidateRefVector &signalChargedObjects, reco::PFCandidateRefVector &outlierChargedObjects, reco::PFCandidateRefVector &signalGammaObjects, reco::PFCandidateRefVector &outlierGammaObjects, bool useScanningAxis)
 compute size of cone using the Inside-Out cone (Author Evan Friis, UC Davis)
void copyCandRefsFilteredByPt (const reco::PFCandidateRefVector &theInputCands, reco::PFCandidateRefVector &theOutputCands, const double minPt)
 append elements of theInputCands that pass Pt requirement to the end of theOutputCands
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 (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 (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 (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 (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 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 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 (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 (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 (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 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 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 (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 discriminatorByIsolPFNeutrHadrCandsN (int IsolPFCands_maxN=0)
reco::PFCandidateRef leadPFCand (const math::XYZVector myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
reco::PFCandidateRef leadPFCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
reco::PFCandidateRef leadPFChargedHadrCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
reco::PFCandidateRef leadPFChargedHadrCand (const math::XYZVector myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
reco::PFCandidateRef leadPFGammaCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
reco::PFCandidateRef leadPFGammaCand (const math::XYZVector myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
reco::PFCandidateRef leadPFNeutrHadrCand (const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
reco::PFCandidateRef leadPFNeutrHadrCand (const math::XYZVector myVector, const std::string matchingcone_metric, const double matchingcone_size, const double minPt) const
reco::PFCandidateRefVector PFCandsInAnnulus (const reco::PFCandidateRefVector 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
reco::PFCandidateRefVector 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
reco::PFCandidateRefVector PFCandsInCone (const math::XYZVector myVector, const std::string conemetric, const double conesize, const double minPt) const
reco::PFCandidateRefVector PFCandsInCone (const reco::PFCandidateRefVector PFCands, const math::XYZVector myVector, const std::string conemetric, const double conesize, const double minPt) const
reco::PFCandidateRefVector 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
reco::PFCandidateRefVector 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
reco::PFCandidateRefVector 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
reco::PFCandidateRefVector PFChargedHadrCandsInCone (const math::XYZVector myVector, const std::string conemetric, const double conesize, const double minPt) const
reco::PFCandidateRefVector 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
reco::PFCandidateRefVector PFGammaCandsInCone (const math::XYZVector myVector, const std::string conemetric, const double conesize, const double minPt) const
std::pair
< reco::PFCandidateRefVector,
reco::PFCandidateRefVector
PFGammaCandsInOutEllipse (const reco::PFCandidateRefVector, const reco::PFCandidate, double rPhi, double rEta, double maxPt) const
reco::PFCandidateRefVector 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
reco::PFCandidateRefVector PFNeutrHadrCandsInCone (const math::XYZVector myVector, const std::string conemetric, const double conesize, const double minPt) const
 PFTauElementsOperators (reco::PFTau &thePFTau)
void setAreaMetricrecoElementsmaxabsEta (double x)
 ~PFTauElementsOperators ()

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_
reco::PFCandidateRefVector IsolPFCands_
reco::PFCandidateRefVector IsolPFChargedHadrCands_
reco::PFCandidateRefVector IsolPFGammaCands_
reco::PFCandidateRefVector IsolPFNeutrHadrCands_
Angle< math::XYZVectormetricAngle_
DeltaR< math::XYZVectormetricDR_
ElementsInEllipse
< reco::PFCandidate,
reco::PFCandidateCollection
PFCandidatesInEllipse_
reco::PFCandidateRefVector PFCands_
ElementsInAnnulus
< math::XYZVector, Angle
< math::XYZVector >, Angle
< math::XYZVector >
, reco::PFCandidateCollection
PFCandsinAnnulus_innerAngleouterAnglemetrics_
ElementsInAnnulus
< math::XYZVector, Angle
< math::XYZVector >, DeltaR
< math::XYZVector >
, reco::PFCandidateCollection
PFCandsinAnnulus_innerAngleouterDRmetrics_
ElementsInAnnulus
< math::XYZVector, DeltaR
< math::XYZVector >, Angle
< math::XYZVector >
, reco::PFCandidateCollection
PFCandsinAnnulus_innerDRouterAnglemetrics_
ElementsInAnnulus
< math::XYZVector, DeltaR
< math::XYZVector >, DeltaR
< math::XYZVector >
, reco::PFCandidateCollection
PFCandsinAnnulus_innerDRouterDRmetrics_
ElementsInCone
< math::XYZVector, Angle
< math::XYZVector >
, reco::PFCandidateCollection
PFCandsinCone_Anglemetric_
ElementsInCone
< math::XYZVector, DeltaR
< math::XYZVector >
, reco::PFCandidateCollection
PFCandsinCone_DRmetric_
reco::PFCandidateRefVector PFChargedHadrCands_
reco::PFCandidateRefVector PFGammaCands_
reco::PFJetRef PFJetRef_
reco::PFCandidateRefVector PFNeutrHadrCands_

Detailed Description

Definition at line 31 of file PFTauElementsOperators.h.


Constructor & Destructor Documentation

PFTauElementsOperators::PFTauElementsOperators ( reco::PFTau thePFTau)
PFTauElementsOperators::~PFTauElementsOperators ( ) [inline]

Definition at line 34 of file PFTauElementsOperators.h.

{}   

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 reco::PFCandidateRefVector theChargedCands,
const reco::PFCandidateRefVector 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,
reco::PFCandidateRefVector signalChargedObjects,
reco::PFCandidateRefVector outlierChargedObjects,
reco::PFCandidateRefVector signalGammaObjects,
reco::PFCandidateRefVector 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 edm::RefVector< C, T, F >::at(), TauTagTools::computeAngle(), computeAngle(), computeDeltaR(), copyCandRefsFilteredByPt(), edm::RefVector< C, T, F >::empty(), edm::RefVector< C, T, F >::push_back(), edm::RefVector< C, T, F >::reserve(), FixedAreaIsolationCone::setAcceptanceLimit(), edm::RefVector< C, T, F >::size(), and python::multivaluedict::sort().

{
   if (theChargedCands.empty() && theGammaCands.empty()) 
      return;
   //copy the vector of PFCands filtering by Pt
   PFCandidateRefVector filteredCands;
   filteredCands.reserve(theChargedCands.size() + theGammaCands.size());

   copyCandRefsFilteredByPt(theChargedCands, filteredCands, minChargedPt);
   copyCandRefsFilteredByPt(theGammaCands, filteredCands, minNeutralPt);

   if (filteredCands.empty())
      return;


   //create vector of indexes as RefVectors can't use STL algos?
   unsigned int numberOfCandidates = filteredCands.size();
   std::vector<uint32_t> filteredCandIndexes(numberOfCandidates);
   for(uint32_t theIndex = 0; theIndex < numberOfCandidates; theIndex++)
      filteredCandIndexes[theIndex] = theIndex;
   
   TauTagTools::sortRefsByOpeningDistance myAngularSorter(leadTrackVector, ptrToMetricFunction, filteredCands);

   //sort the remaining candidates by angle to seed track
   sort(filteredCandIndexes.begin(), filteredCandIndexes.end(), myAngularSorter);

   PFCandidateRefVector sortedCands;
   for(std::vector<uint32_t>::const_iterator theSortedIndex = filteredCandIndexes.begin();
                                        theSortedIndex != filteredCandIndexes.end();
                                        ++theSortedIndex)
   {
      sortedCands.push_back(filteredCands.at(*theSortedIndex));
   }

   //get first candidate (seed trk by definition)
   PFCandidateRefVector::const_iterator signalObjectCandidate = sortedCands.begin();
   double totalEnergySoFar                                    = (**signalObjectCandidate).energy();
   double totalEtSoFar                                        = (**signalObjectCandidate).et();
   math::XYZVector axisVectorSoFar                            = leadTrackVector;
   double currentDelToCenter = ptrToMetricFunction(leadTrackVector, axisVectorSoFar);
   //advance to next object
   ++signalObjectCandidate;
   bool doneBuilding = false;
   while (!doneBuilding && signalObjectCandidate != sortedCands.end())
   {
      //compute cutoff quanity
      math::XYZVector testAxis       = axisVectorSoFar;
      if (useScanningAxis)
         testAxis           += (**signalObjectCandidate).momentum();
      currentDelToCenter    = ptrToMetricFunction((**signalObjectCandidate).momentum(), testAxis);
      double testEnergy     = totalEnergySoFar + (**signalObjectCandidate).energy();
      double testEt         = totalEtSoFar     + (**signalObjectCandidate).et();
      bool isCharged        = (**signalObjectCandidate).charge();
      bool addThisObject    = true;
      if (currentDelToCenter > ((isCharged)?maxChargedSize:maxNeutralSize) ) {
         //max conesize is reached
         addThisObject = false;
      }
      else if (currentDelToCenter > ((isCharged)?minChargedSize:minNeutralSize) )
      {
         //only do calculation if we are in the region above the minimum size
         double cutOffQuantity = coneSizeFormula.Eval(testEnergy, testEt);
         if (currentDelToCenter > cutOffQuantity)
            addThisObject = false;
         else if (useScanningAxis)
         {
            //make sure we don't make the seed track kinematically inconsistent  
            //(stop growth if axis-lead track distance greater than computed opening angle
            if (ptrToMetricFunction(testAxis, leadTrackVector) > cutOffQuantity)
               addThisObject = false;
         }
      }
      if (addThisObject)
      {
         axisVectorSoFar  = testAxis;
         totalEnergySoFar = testEnergy;
         totalEtSoFar     = testEt;
         ++signalObjectCandidate;  //signal object candidate now points to one past the
      }
      else
      {
         doneBuilding = true;
      }
   }
   // split the collection into two collections
   double largest3DOpeningAngleSignal = 0.;  //used for area outlier collection cone
   for (PFCandidateRefVector::const_iterator iterCand =  sortedCands.begin();
                                             iterCand != signalObjectCandidate;
                                             ++iterCand)
   {
      double angleToAxis = TauTagTools::computeAngle((*iterCand)->momentum(), axisVectorSoFar);
      if (angleToAxis > largest3DOpeningAngleSignal)
         largest3DOpeningAngleSignal = angleToAxis;

      if ((*iterCand)->charge())
         signalChargedObjects.push_back(*iterCand);
      else
         signalGammaObjects.push_back(*iterCand);
   }

   //function pointer to outlier collection cutoff quantity
   double (*outlierCollectionCalculator)(const math::XYZVector&, const math::XYZVector&) = TauTagTools::computeAngle;
   double outlierCollectionComputedMaxSize = 0;

   if (!outlierCollectorConeMetric.compare("angle"))
   {
      outlierCollectionCalculator       = TauTagTools::computeAngle;
      outlierCollectionComputedMaxSize  = outlierCollectionMaxSize;
   } else if (!outlierCollectorConeMetric.compare("area"))
   {
      //determine opening angle (in 3D space of signal objects)
      
      outlierCollectionCalculator       = TauTagTools::computeAngle;  //the area cone outside angle is defined in 3D
      FixedAreaIsolationCone theFixedAreaCone;
      theFixedAreaCone.setAcceptanceLimit(2.5);
      //calculate new iso cone size
      int errorFlagForConeSizeCalc = 0;
      outlierCollectionComputedMaxSize = theFixedAreaCone(axisVectorSoFar.theta(), axisVectorSoFar.phi(), largest3DOpeningAngleSignal, outlierCollectionMaxSize, errorFlagForConeSizeCalc);
      if (errorFlagForConeSizeCalc != 0)
      {
         edm::LogError("PFRecoTauAlgorithm") << "Error: " << errorFlagForConeSizeCalc << " when calculated const area annulus.  Taking all non-signal PFJet consituents!";
         outlierCollectionComputedMaxSize = 1000.;  //takes everything...
      }
   } else if (!outlierCollectorConeMetric.compare("DR"))
   {
      outlierCollectionCalculator       = TauTagTools::computeDeltaR;
      outlierCollectionComputedMaxSize  = outlierCollectionMaxSize;
   } 
   else //warn if metric choice for outlier collection is not consistent
   {
      edm::LogWarning("PFRecoTauAlgorithm") << "Error in computeInsideOutContents(...):  Outlier (isolation) collector cone metric (" << outlierCollectorConeMetric 
                                            << ") is not recognized! All non-signal associated PFJet constituents will be included in the outliers!";
   }

   for (PFCandidateRefVector::const_iterator iterCand =  signalObjectCandidate;
                                             iterCand != sortedCands.end();
                                             ++iterCand)
   {
      //stop adding objects if we have reached the maximum outleir collector size
      double outlierOpeningQuantity = outlierCollectionCalculator(axisVectorSoFar, (*iterCand)->momentum());
      if (outlierOpeningQuantity > outlierCollectionComputedMaxSize) break;

      if ((*iterCand)->charge())
         outlierChargedObjects.push_back(*iterCand);
      else
         outlierGammaObjects.push_back(*iterCand);
   }
   //done
}
void PFTauElementsOperators::copyCandRefsFilteredByPt ( const reco::PFCandidateRefVector theInputCands,
reco::PFCandidateRefVector 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 edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), gsfElectronCkfTrackCandidateMaker_cff::minPt, and edm::RefVector< C, T, F >::push_back().

Referenced by computeInsideOutContents().

{
   for(PFCandidateRefVector::const_iterator iPFCand  = theInputCands.begin();
                                            iPFCand != theInputCands.end();
                                            ++iPFCand)
   {
      if ( (*iPFCand)->pt() > minPt )
         theOutputCands.push_back(*iPFCand);
   }
}
double PFTauElementsOperators::discriminatorByIsolPFCandsEtSum ( double  IsolPFCands_maxEtSum = 0)

Definition at line 572 of file PFTauElementsOperators.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), and IsolPFCands_.

                                                                                         {
  double myIsolPFCandsEtSum=0.;
  double myDiscriminator=0.;
  for(PFCandidateRefVector::const_iterator iPFCand=IsolPFCands_.begin();iPFCand!=IsolPFCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
  if (myIsolPFCandsEtSum<=IsolPFCands_maxEtSum) myDiscriminator=1;
  return myDiscriminator;
}
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 ( math::XYZVector  myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFCandsN ( int  IsolPFCands_maxN = 0)

Definition at line 456 of file PFTauElementsOperators.cc.

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

                                                                              {
  double myDiscriminator=0.;
  if ((int)IsolPFCands_.size()<=IsolPFCands_maxN) myDiscriminator=1;
  return myDiscriminator;
}
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 ( math::XYZVector  myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsEtSum ( std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsEtSum ( double  IsolPFCands_maxEtSum = 0)

Definition at line 607 of file PFTauElementsOperators.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), and IsolPFChargedHadrCands_.

                                                                                                               {
  double myIsolPFCandsEtSum=0.;
  double myDiscriminator=0.;
  for(PFCandidateRefVector::const_iterator iPFCand=IsolPFChargedHadrCands_.begin();iPFCand!=IsolPFChargedHadrCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
  if (myIsolPFCandsEtSum<=IsolPFChargedHadrCands_maxEtSum) myDiscriminator=1;
  return myDiscriminator;
}
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsEtSum ( math::XYZVector  myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
double  IsolPFCands_maxEtSum = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFChargedHadrCandsN ( int  IsolPFCands_maxN = 0)

Definition at line 485 of file PFTauElementsOperators.cc.

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

                                                                                                    {
  double myDiscriminator=0.;
  if ((int)IsolPFChargedHadrCands_.size()<=IsolPFChargedHadrCands_maxN) myDiscriminator=1;
  return myDiscriminator;
}
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 ( math::XYZVector  myVector,
std::string  matchingcone_metric,
double  matchingcone_size,
std::string  signalcone_metric,
double  signalcone_size,
std::string  isolcone_metric,
double  isolcone_size,
bool  useOnlyChargedHadrforleadPFCand,
double  minPt_leadPFCand,
double  minPt_PFCand,
int  IsolPFCands_maxN = 0 
)
double PFTauElementsOperators::discriminatorByIsolPFGammaCandsEtSum ( double  IsolPFCands_maxEtSum = 0)

Definition at line 677 of file PFTauElementsOperators.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), and IsolPFGammaCands_.

                                                                                                   {
  double myIsolPFCandsEtSum=0.;
  double myDiscriminator=0.;
  for(PFCandidateRefVector::const_iterator iPFCand=IsolPFGammaCands_.begin();iPFCand!=IsolPFGammaCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
  if (myIsolPFCandsEtSum<=IsolPFGammaCands_maxEtSum) myDiscriminator=1;
  return myDiscriminator;
}
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 ( 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 ( 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::discriminatorByIsolPFGammaCandsN ( int  IsolPFCands_maxN = 0)

Definition at line 543 of file PFTauElementsOperators.cc.

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

                                                                                        {
  double myDiscriminator=0.;
  if ((int)IsolPFGammaCands_.size()<=IsolPFGammaCands_maxN) myDiscriminator=1;
  return myDiscriminator;
}
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::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 ( double  IsolPFCands_maxEtSum = 0)

Definition at line 642 of file PFTauElementsOperators.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), and IsolPFNeutrHadrCands_.

                                                                                                           {
  double myIsolPFCandsEtSum=0.;
  double myDiscriminator=0.;
  for(PFCandidateRefVector::const_iterator iPFCand=IsolPFNeutrHadrCands_.begin();iPFCand!=IsolPFNeutrHadrCands_.end();iPFCand++) myIsolPFCandsEtSum+=(**iPFCand).et();
  if (myIsolPFCandsEtSum<=IsolPFNeutrHadrCands_maxEtSum) myDiscriminator=1;
  return myDiscriminator;
}
double PFTauElementsOperators::discriminatorByIsolPFNeutrHadrCandsEtSum ( 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 ( 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 ( 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::discriminatorByIsolPFNeutrHadrCandsN ( int  IsolPFCands_maxN = 0)

Definition at line 514 of file PFTauElementsOperators.cc.

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

                                                                                                {
  double myDiscriminator=0.;
  if ((int)IsolPFNeutrHadrCands_.size()<=IsolPFNeutrHadrCands_maxN) myDiscriminator=1;
  return myDiscriminator;
}
reco::PFCandidateRef PFTauElementsOperators::leadPFCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidateRef PFTauElementsOperators::leadPFCand ( const math::XYZVector  myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidateRef PFTauElementsOperators::leadPFChargedHadrCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidateRef PFTauElementsOperators::leadPFChargedHadrCand ( const math::XYZVector  myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidateRef PFTauElementsOperators::leadPFGammaCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidateRef PFTauElementsOperators::leadPFGammaCand ( const math::XYZVector  myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidateRef PFTauElementsOperators::leadPFNeutrHadrCand ( const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidateRef PFTauElementsOperators::leadPFNeutrHadrCand ( const math::XYZVector  myVector,
const std::string  matchingcone_metric,
const double  matchingcone_size,
const double  minPt 
) const
reco::PFCandidateRefVector 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
reco::PFCandidateRefVector PFTauElementsOperators::PFCandsInAnnulus ( const reco::PFCandidateRefVector  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
reco::PFCandidateRefVector PFTauElementsOperators::PFCandsInCone ( const reco::PFCandidateRefVector  PFCands,
const math::XYZVector  myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const
reco::PFCandidateRefVector PFTauElementsOperators::PFCandsInCone ( const math::XYZVector  myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const
reco::PFCandidateRefVector 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
reco::PFCandidateRefVector 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
reco::PFCandidateRefVector PFTauElementsOperators::PFChargedHadrCandsInCone ( const math::XYZVector  myVector,
const std::string  conemetric,
const double  conesize,
const double  minPt 
) const
reco::PFCandidateRefVector 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
PFCandidateRefVector 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 PFCandsInAnnulus(), and PFGammaCands_.

Referenced by PFRecoTauAlgorithm::buildPFTau().

                                                                                                                                                                                                                                           {     
  PFCandidateRefVector theFilteredPFCandsInAnnulus=PFCandsInAnnulus(PFGammaCands_,myVector,innercone_metric,innercone_size,outercone_metric,outercone_size,minPt);
  return theFilteredPFCandsInAnnulus;
}
PFCandidateRefVector 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().

                                                                                                                                                                  {     
  PFCandidateRefVector theFilteredPFCandsInCone=PFCandsInCone(PFGammaCands_,myVector,conemetric,conesize,minPt);
  return theFilteredPFCandsInCone;
}
std::pair< PFCandidateRefVector, PFCandidateRefVector > PFTauElementsOperators::PFGammaCandsInOutEllipse ( const reco::PFCandidateRefVector  PFGammaCands_,
const reco::PFCandidate  leadCand_,
double  rPhi,
double  rEta,
double  maxPt 
) const

Definition at line 68 of file PFTauElementsOperators.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), PFCandidatesInEllipse_, and edm::RefVector< C, T, F >::push_back().

Referenced by PFRecoTauAlgorithm::buildPFTau().

                                                                                                                                                                                                                       {
  std::pair<PFCandidateRefVector,PFCandidateRefVector> myPFGammaCandsInEllipse = PFCandidatesInEllipse_(leadCand_, rPhi, rEta, PFGammaCands_);
  PFCandidateRefVector thePFGammaCandsInEllipse = myPFGammaCandsInEllipse.first;
  PFCandidateRefVector thePFGammaCandsOutEllipse = myPFGammaCandsInEllipse.second;
  PFCandidateRefVector theFilteredPFGammaCandsInEllipse;
  for(PFCandidateRefVector::const_iterator iPFGammaCand = thePFGammaCandsInEllipse.begin(); iPFGammaCand != thePFGammaCandsInEllipse.end(); ++iPFGammaCand){
    if((**iPFGammaCand).pt() <= maxPt) theFilteredPFGammaCandsInEllipse.push_back(*iPFGammaCand);
    else thePFGammaCandsOutEllipse.push_back(*iPFGammaCand);
  }
  std::pair<PFCandidateRefVector, PFCandidateRefVector> theFilteredPFGammaCandsInOutEllipse(theFilteredPFGammaCandsInEllipse, thePFGammaCandsOutEllipse);
  
  return theFilteredPFGammaCandsInOutEllipse;
}
PFCandidateRefVector 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().

                                                                                                                                                                                                                                               {     
  PFCandidateRefVector theFilteredPFCandsInAnnulus=PFCandsInAnnulus(PFNeutrHadrCands_,myVector,innercone_metric,innercone_size,outercone_metric,outercone_size,minPt);
  return theFilteredPFCandsInAnnulus;
}
PFCandidateRefVector 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().

                                                                                                                                                                     {     
  PFCandidateRefVector theFilteredPFCandsInCone=PFCandsInCone(PFNeutrHadrCands_,myVector,conemetric,conesize,minPt);
  return theFilteredPFCandsInCone;
}
void PFTauElementsOperators::setAreaMetricrecoElementsmaxabsEta ( double  x)

Member Data Documentation

Reimplemented from TauElementsOperators.

Definition at line 105 of file PFTauElementsOperators.h.

Referenced by setAreaMetricrecoElementsmaxabsEta().

Reimplemented from TauElementsOperators.

Definition at line 116 of file PFTauElementsOperators.h.

Reimplemented from TauElementsOperators.

Definition at line 115 of file PFTauElementsOperators.h.

Definition at line 125 of file PFTauElementsOperators.h.

Referenced by PFGammaCandsInOutEllipse().

Definition at line 106 of file PFTauElementsOperators.h.

Referenced by PFTauElementsOperators().

Definition at line 123 of file PFTauElementsOperators.h.

Definition at line 124 of file PFTauElementsOperators.h.

Definition at line 122 of file PFTauElementsOperators.h.

Definition at line 121 of file PFTauElementsOperators.h.

Definition at line 120 of file PFTauElementsOperators.h.

Definition at line 119 of file PFTauElementsOperators.h.

Definition at line 108 of file PFTauElementsOperators.h.

Referenced by PFTauElementsOperators().

Definition at line 104 of file PFTauElementsOperators.h.

Referenced by PFTauElementsOperators().