CMS 3D CMS Logo

Public Member Functions | Protected Member Functions

PFTauDiscriminants::ChargedOutlierSumPt Class Reference

#include <Discriminants.h>

Inheritance diagram for PFTauDiscriminants::ChargedOutlierSumPt:
PFTauDiscriminants::DiscriminantBase< double > PFTauDiscriminants::Discriminant

List of all members.

Public Member Functions

 ChargedOutlierSumPt ()
 ~ChargedOutlierSumPt ()

Protected Member Functions

void doComputation (PFTauDiscriminantManager *input, std::vector< double > &result)

Detailed Description

Definition at line 230 of file Discriminants.h.


Constructor & Destructor Documentation

PFTauDiscriminants::ChargedOutlierSumPt::ChargedOutlierSumPt ( ) [inline]

Definition at line 232 of file Discriminants.h.

:DiscriminantBase<double>("ChargedOutlierSumPt", "D", true, false, 0.0){};
PFTauDiscriminants::ChargedOutlierSumPt::~ChargedOutlierSumPt ( ) [inline]

Definition at line 233 of file Discriminants.h.

{};

Member Function Documentation

void PFTauDiscriminants::ChargedOutlierSumPt::doComputation ( PFTauDiscriminantManager input,
std::vector< double > &  result 
) [protected, virtual]

Implements PFTauDiscriminants::DiscriminantBase< double >.

Definition at line 343 of file Discriminants.cc.

References reco::Candidate::charge(), PFTauDiscriminants::PFTauDiscriminantManager::outlierObjectsSortedByPt(), convertSQLitetoXML_cfg::output, and reco::Candidate::pt().

{
   const std::vector<const reco::Candidate*>& theOutlierObjects = input->outlierObjectsSortedByPt();
   double output = 0.0;
   for(std::vector<const reco::Candidate*>::const_iterator iObject  = theOutlierObjects.begin();
         iObject != theOutlierObjects.end();
         ++iObject)
   {
      const reco::Candidate* currentObject = *iObject;
      if (currentObject && currentObject->charge())
         output += currentObject->pt();
   }
   result.push_back(output);
}