#include <Discriminants.h>
Public Member Functions | |
OutlierNCharged () | |
~OutlierNCharged () | |
Protected Member Functions | |
void | doComputation (PFTauDiscriminantManager *input, std::vector< int > &result) |
Definition at line 44 of file Discriminants.h.
PFTauDiscriminants::OutlierNCharged::OutlierNCharged | ( | ) | [inline] |
Definition at line 46 of file Discriminants.h.
:DiscriminantBase<int>("OutlierNCharged", "I", true, false, -1){};
PFTauDiscriminants::OutlierNCharged::~OutlierNCharged | ( | ) | [inline] |
Definition at line 47 of file Discriminants.h.
{};
void PFTauDiscriminants::OutlierNCharged::doComputation | ( | PFTauDiscriminantManager * | input, |
std::vector< int > & | result | ||
) | [protected, virtual] |
Implements PFTauDiscriminants::DiscriminantBase< int >.
Definition at line 16 of file Discriminants.cc.
References reco::Candidate::charge(), PFTauDiscriminants::PFTauDiscriminantManager::outlierObjectsSortedByPt(), and convertSQLitetoXML_cfg::output.
{ size_t output = 0; const std::vector<const reco::Candidate*>& theOutlierObjects = input->outlierObjectsSortedByPt(); for(std::vector<const reco::Candidate*>::const_iterator iObject = theOutlierObjects.begin(); iObject != theOutlierObjects.end(); ++iObject) { const reco::Candidate* currentObject = *iObject; if (currentObject && currentObject->charge() != 0 ) output++; } // convert to int for TTree result.push_back(static_cast<int>(output)); }