CMS 3D CMS Logo

Public Member Functions | Protected Member Functions

PFTauDiscriminants::GammaOccupancy Class Reference

#include <Discriminants.h>

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

List of all members.

Public Member Functions

 GammaOccupancy ()
 ~GammaOccupancy ()

Protected Member Functions

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

Detailed Description

Definition at line 119 of file Discriminants.h.


Constructor & Destructor Documentation

PFTauDiscriminants::GammaOccupancy::GammaOccupancy ( ) [inline]

Definition at line 121 of file Discriminants.h.

:DiscriminantBase<double>("GammaOccupancy", "vector<double>", false, true, 0.0){}
PFTauDiscriminants::GammaOccupancy::~GammaOccupancy ( ) [inline]

Definition at line 122 of file Discriminants.h.

{};

Member Function Documentation

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

Implements PFTauDiscriminants::DiscriminantBase< double >.

Definition at line 125 of file Discriminants.cc.

References reco::Candidate::charge(), PFTauDiscriminants::PFTauDiscriminantManager::getLeafDaughters(), and PFTauDiscriminants::PFTauDiscriminantManager::signalObjectsSortedByPt().

{
   const std::vector<const reco::Candidate*>& theSignalObjects = input->signalObjectsSortedByPt();

   for(std::vector<const reco::Candidate*>::const_iterator iObject  = theSignalObjects.begin();
         iObject != theSignalObjects.end();
         ++iObject)
   {
      const reco::Candidate* currentObject = *iObject;
      if (!currentObject->charge())
         result.push_back(input->getLeafDaughters(currentObject).size());
   }
}