CMS 3D CMS Logo

Public Member Functions | Private Attributes

reco::WMuNuCandidatePtr Class Reference

#include <WMuNuCandidatePtr.h>

Inheritance diagram for reco::WMuNuCandidatePtr:
reco::CompositePtrCandidate reco::LeafCandidate reco::Candidate

List of all members.

Public Member Functions

double acop () const
double eT () const
const reco::MuongetMuon () const
const reco::METgetNeutrino () const
double massT () const
 WMuNuCandidatePtr ()
 WMuNuCandidatePtr (const reco::CandidatePtr, const reco::CandidatePtr)
 ~WMuNuCandidatePtr ()

Private Attributes

edm::Ptr< Muonmuon_
edm::Ptr< METneutrino_

Detailed Description

Definition at line 19 of file WMuNuCandidatePtr.h.


Constructor & Destructor Documentation

WMuNuCandidatePtr::WMuNuCandidatePtr ( )

Definition at line 10 of file WMuNuCandidatePtr.cc.

{}
WMuNuCandidatePtr::WMuNuCandidatePtr ( const reco::CandidatePtr  muon,
const reco::CandidatePtr  met 
)

Definition at line 12 of file WMuNuCandidatePtr.cc.

References reco::CompositePtrCandidate::addDaughter(), gather_cfg::cout, muon_, neutrino_, reco::LeafCandidate::px(), and AddFourMomenta::set().

                                                                                           : muon_(muon), neutrino_(met)  
{
      addDaughter(muon_);
      addDaughter(neutrino_);
      AddFourMomenta addP4;
      addP4.set(*this);
      cout<<"WCandidatePtr Created   Wpx="<<muon_->px()<<" + "<<neutrino_->px()<<" ?= "<<this->px()<<endl;
      //WARNING: W CandidatePtrs combine the information from a Muon with the (px,py) information of the MET as the Neutrino
      // --> There is no Pz information!!!!
      // Be very careful when using the default CandidatePtr functions (.mass, .mt, .et, etc). They may not be what you are looking for :-).
}
WMuNuCandidatePtr::~WMuNuCandidatePtr ( )

Definition at line 24 of file WMuNuCandidatePtr.cc.

{
}

Member Function Documentation

double WMuNuCandidatePtr::acop ( ) const

Definition at line 44 of file WMuNuCandidatePtr.cc.

References M_PI, muon_, and neutrino_.

                                    {
      // Acoplanarity between the muon and the MET
       Geom::Phi<double> deltaphi(muon_->phi()-neutrino_->phi());
       double acop = deltaphi.value();
       if (acop<0) acop = - acop;
       acop = M_PI - acop;
       return acop;
}
double WMuNuCandidatePtr::eT ( ) const

Definition at line 28 of file WMuNuCandidatePtr.cc.

References muon_, and neutrino_.

Referenced by massT().

                                  {
 double e_t=0; 
     e_t=muon_->pt()+neutrino_->pt();
 return e_t; 
}
const reco::Muon& reco::WMuNuCandidatePtr::getMuon ( ) const [inline]

Definition at line 40 of file WMuNuCandidatePtr.h.

References muon_.

{return *muon_;}; 
const reco::MET& reco::WMuNuCandidatePtr::getNeutrino ( ) const [inline]

Definition at line 41 of file WMuNuCandidatePtr.h.

{return *neutrino_;};
double WMuNuCandidatePtr::massT ( ) const

Definition at line 34 of file WMuNuCandidatePtr.cc.

References eT(), reco::LeafCandidate::mt(), muon_, neutrino_, and mathSSE::sqrt().

                                     {
      // CandidatePtrs have a mt() function which computes the tranverse mass from E & pz. 
      // As MET does not have pz information... WMuNuCandidatePtrs have an alternative function to compute the mt quantity
      // used in the WMuNu Inclusive analysis just from px, py
      double wpx=muon_->px()+neutrino_->px(); double wpy=muon_->py()+neutrino_->py();
      double mt = eT()*eT() - wpx*wpx - wpy*wpy;
      mt = (mt>0) ? sqrt(mt) : 0;
      return mt; 
}

Member Data Documentation

Definition at line 41 of file WMuNuCandidatePtr.h.

Referenced by acop(), eT(), getMuon(), massT(), and WMuNuCandidatePtr().

Definition at line 48 of file WMuNuCandidatePtr.h.

Referenced by acop(), eT(), massT(), and WMuNuCandidatePtr().