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

#include <Discriminants.h>

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

Public Member Functions

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

Constructor & Destructor Documentation

PFTauDiscriminants::Dalitz::Dalitz ( )
inline

Definition at line 155 of file Discriminants.h.

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

Definition at line 156 of file Discriminants.h.

156 {};

Member Function Documentation

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

Implements PFTauDiscriminants::DiscriminantBase< double >.

Definition at line 204 of file Discriminants.cc.

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

205 {
206  const std::vector<const reco::Candidate*>& theSignalObjects = input->signalObjectsSortedByPt();
207  const reco::Candidate* theMainTrack = input->mainTrack();
208  if (!theMainTrack)
209  return;
210  LorentzVector mainTrackFourVector = theMainTrack->p4();
211 
212  for(std::vector<const reco::Candidate*>::const_iterator iObject = theSignalObjects.begin();
213  iObject != theSignalObjects.end();
214  ++iObject)
215  {
216  const reco::Candidate* currentObject = *iObject;
217  if (currentObject != theMainTrack)
218  {
219  LorentzVector combinedFourVector = mainTrackFourVector + currentObject->p4();
220  result.push_back(combinedFourVector.mass());
221  }
222  }
223 }
math::XYZTLorentzVector LorentzVector
Definition: HLTMuonBPAG.h:55
tuple result
Definition: query.py:137
tuple input
Definition: collect_tpl.py:10
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector