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::TrackAngle Class Reference

#include <Discriminants.h>

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

Public Member Functions

 TrackAngle ()
 
 ~TrackAngle ()
 
- 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 137 of file Discriminants.h.

Constructor & Destructor Documentation

PFTauDiscriminants::TrackAngle::TrackAngle ( )
inline

Definition at line 139 of file Discriminants.h.

139 :DiscriminantBase<double>("TrackAngle", "vector<double>", false, true, 0.0){};
PFTauDiscriminants::TrackAngle::~TrackAngle ( )
inline

Definition at line 140 of file Discriminants.h.

140 {};

Member Function Documentation

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

Implements PFTauDiscriminants::DiscriminantBase< double >.

Definition at line 164 of file Discriminants.cc.

References reco::Candidate::charge(), PFTauDiscriminants::PFTauDiscriminantManager::getDecayMode(), PFTauDiscriminants::PFTauDiscriminantManager::mainTrack(), reco::Candidate::momentum(), reco::LeafCandidate::momentum(), and PFTauDiscriminants::PFTauDiscriminantManager::signalObjectsSortedByPt().

165 {
166  const std::vector<const reco::Candidate*>& theSignalObjects = input->signalObjectsSortedByPt();
167 
168  math::XYZVector signalObjectsAxis = input->getDecayMode()->momentum();
169 
170  const reco::Candidate* theMainTrack = input->mainTrack();
171 
172  DeltaR<math::XYZVector> myDRComputer;
173 
174  for(std::vector<const reco::Candidate*>::const_iterator iObject = theSignalObjects.begin();
175  iObject != theSignalObjects.end();
176  ++iObject)
177  {
178  const reco::Candidate* currentObject = *iObject;
179  if (currentObject->charge() && currentObject != theMainTrack)
180  result.push_back(myDRComputer(currentObject->momentum(), signalObjectsAxis));
181  }
182 }
virtual Vector momentum() const =0
spatial momentum vector
tuple result
Definition: query.py:137
virtual int charge() const =0
electric charge
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31