CMS 3D CMS Logo

Public Member Functions | Protected Member Functions

PFTauDiscriminants::InvariantMass Class Reference

#include <Discriminants.h>

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

List of all members.

Public Member Functions

 InvariantMass ()
 ~InvariantMass ()

Protected Member Functions

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

Detailed Description

Definition at line 182 of file Discriminants.h.


Constructor & Destructor Documentation

PFTauDiscriminants::InvariantMass::InvariantMass ( ) [inline]

Definition at line 184 of file Discriminants.h.

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

Definition at line 185 of file Discriminants.h.

{};

Member Function Documentation

void InvariantMass< T1, T2 >::doComputation ( PFTauDiscriminantManager input,
std::vector< double > &  result 
) [protected, virtual]

Implements PFTauDiscriminants::DiscriminantBase< double >.

Definition at line 245 of file Discriminants.cc.

References PFTauDiscriminants::PFTauDiscriminantManager::mainTrack(), reco::Candidate::p4(), and PFTauDiscriminants::PFTauDiscriminantManager::signalObjectsSortedByPt().

{
   const std::vector<const reco::Candidate*>& theSignalObjects = input->signalObjectsSortedByPt();
   const reco::Candidate* theMainTrack = input->mainTrack();
   if (!theMainTrack)
      return;
   LorentzVector fourVectorSoFar = theMainTrack->p4();

   for(std::vector<const reco::Candidate*>::const_iterator iObject  = theSignalObjects.begin();
         iObject != theSignalObjects.end();
         ++iObject)
   {
      const reco::Candidate* currentObject = *iObject;
      if (currentObject != theMainTrack)
      {
         fourVectorSoFar += currentObject->p4();
         result.push_back(fourVectorSoFar.mass());
      }
   }
}