CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions
PFTauDiscriminants::NeutralOutlierSumPt Class Reference

#include <Discriminants.h>

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

Public Member Functions

 NeutralOutlierSumPt ()
 
 ~NeutralOutlierSumPt ()
 
- Public Member Functions inherited from PFTauDiscriminants::DiscriminantBase< double >
void branchTree (TTree *theTree)
 add a branch to a ttree corresponding to this variable More...
 
void compute (PFTauDiscriminantManager *input)
 
 DiscriminantBase (std::string name, std::string rootTypeName, bool branchAsSimpleDataType, bool isMultiple, doubledefaultValue)
 
void fillMVA (std::vector< PhysicsTools::Variable::Value > &mvaHolder) const
 
virtual void setNullResult (PFTauDiscriminantManager *input)
 
virtual ~DiscriminantBase ()
 
- Public Member Functions inherited from PFTauDiscriminants::Discriminant
 Discriminant (std::string name, std::string rootTypeName, bool branchAsSimpleDataType)
 
std::string name () const
 
std::string rootTypeName () const
 
PhysicsTools::AtomicId theAtomicId () const
 
virtual ~Discriminant ()
 

Protected Member Functions

void doComputation (PFTauDiscriminantManager *input, std::vector< double > &result)
 
- Protected Member Functions inherited from PFTauDiscriminants::Discriminant
bool branchSimply () const
 determines whether or not to use simple struct like branching or custom class branching (e.g. TLorentzVector) More...
 

Additional Inherited Members

- Public Types inherited from PFTauDiscriminants::DiscriminantBase< double >
typedef std::vector< double >
::const_iterator 
myVectorIterator
 

Detailed Description

Definition at line 254 of file Discriminants.h.

Constructor & Destructor Documentation

PFTauDiscriminants::NeutralOutlierSumPt::NeutralOutlierSumPt ( )
inline

Definition at line 256 of file Discriminants.h.

256 :DiscriminantBase<double>("NeutralOutlierSumPt", "D", true, false, 0.0){};
PFTauDiscriminants::NeutralOutlierSumPt::~NeutralOutlierSumPt ( )
inline

Definition at line 257 of file Discriminants.h.

257 {};

Member Function Documentation

void PFTauDiscriminants::NeutralOutlierSumPt::doComputation ( PFTauDiscriminantManager input,
std::vector< double > &  result 
)
protectedvirtual

Implements PFTauDiscriminants::DiscriminantBase< double >.

Definition at line 389 of file Discriminants.cc.

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

390 {
391  const std::vector<const reco::Candidate*>& theOutlierObjects = input->outlierObjectsSortedByPt();
392  double output = 0.0;
393  for(std::vector<const reco::Candidate*>::const_iterator iObject = theOutlierObjects.begin();
394  iObject != theOutlierObjects.end();
395  ++iObject)
396  {
397  const reco::Candidate* currentObject = *iObject;
398  if (currentObject && !currentObject->charge())
399  output += currentObject->pt();
400  }
401  result.push_back(output);
402 }
virtual double pt() const =0
transverse momentum
tuple result
Definition: query.py:137
virtual int charge() const =0
electric charge
tuple input
Definition: collect_tpl.py:10