CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

reco::MET Class Reference

#include <MET.h>

Inheritance diagram for reco::MET:
reco::RecoCandidate reco::LeafCandidate reco::Candidate pat::PATObject< reco::MET > reco::CaloMET reco::GenMET reco::PFClusterMET reco::PFMET pat::MET

List of all members.

Public Member Functions

METclone () const
 returns a clone of the Candidate object
std::vector< double > dmEx () const
std::vector< double > dmEy () const
std::vector< double > dSignificance () const
std::vector< double > dsumEt () const
double e_longitudinal () const
TMatrixD getSignificanceMatrix (void) const
 MET ()
 MET (double sumet_, std::vector< CorrMETData > corr_, const LorentzVector &p4_, const Point &vtx_)
 MET (const LorentzVector &p4_, const Point &vtx_)
 MET (double sumet_, const LorentzVector &p4_, const Point &vtx_)
std::vector< CorrMETDatamEtCorr () const
double mEtSig () const
void setSignificanceMatrix (const TMatrixD &matrix)
double significance () const
double sumEt () const

Private Member Functions

virtual bool overlap (const Candidate &) const
 check overlap with another candidate

Private Attributes

std::vector< CorrMETDatacorr
double elongit
double signif_dxx
double signif_dxy
double signif_dyx
double signif_dyy
double sumet

Detailed Description

Definition at line 32 of file MET.h.


Constructor & Destructor Documentation

MET::MET ( )

Reimplemented in pat::MET.

Definition at line 15 of file MET.cc.

Referenced by clone().

MET::MET ( const LorentzVector p4_,
const Point vtx_ 
)

Definition at line 28 of file MET.cc.

References elongit, signif_dxx, signif_dxy, signif_dyx, signif_dyy, and sumet.

                                                      : 
  RecoCandidate( 0, p4_, vtx_ )
{
  sumet = 0.0;
  elongit = 0.0;
  signif_dxx=signif_dyy=signif_dyx=signif_dxy=0.;
}
MET::MET ( double  sumet_,
const LorentzVector p4_,
const Point vtx_ 
)

Definition at line 42 of file MET.cc.

References elongit, signif_dxx, signif_dxy, signif_dyx, signif_dyy, and sumet.

                                                                     : 
  RecoCandidate( 0, p4_, vtx_ ) 
{
  sumet = sumet_;
  elongit = 0.0;
  signif_dxx=signif_dyy=signif_dyx=signif_dxy=0.;
}
MET::MET ( double  sumet_,
std::vector< CorrMETData corr_,
const LorentzVector p4_,
const Point vtx_ 
)

Definition at line 56 of file MET.cc.

References corr, elongit, i, signif_dxx, signif_dxy, signif_dyx, signif_dyy, and sumet.

                                                        : 
  RecoCandidate( 0, p4_, vtx_ )
{
  sumet = sumet_;
  elongit = 0.0;
  signif_dxx=signif_dyy=signif_dyx=signif_dxy=0.;
  //-----------------------------------
  // Fill the vector containing the corrections (corr) with vector of 
  // known corrections (corr_) passed in via the constructor.
  std::vector<CorrMETData>::const_iterator i;
  for( i = corr_.begin(); i != corr_.end();  i++ ) 
    {
      corr.push_back( *i );
    }
}

Member Function Documentation

MET * MET::clone ( void  ) const [virtual]

returns a clone of the Candidate object

Reimplemented from reco::RecoCandidate.

Reimplemented in pat::MET.

Definition at line 77 of file MET.cc.

References MET().

                       {
     return new MET( * this );
}
std::vector< double > MET::dmEx ( ) const

Definition at line 102 of file MET.cc.

References corr, and i.

{
  std::vector<double> deltas;
  std::vector<CorrMETData>::const_iterator i;
  for( i = corr.begin(); i != corr.end(); i++ )
    {
      deltas.push_back( i->mex );
    }
  return deltas;
}
std::vector< double > MET::dmEy ( ) const

Definition at line 118 of file MET.cc.

References corr, and i.

{
  std::vector<double> deltas;
  std::vector<CorrMETData>::const_iterator i;
  for( i = corr.begin(); i != corr.end(); i++ )
    {
      deltas.push_back( i->mey );
    }
  return deltas;
}
std::vector< double > MET::dSignificance ( ) const

Definition at line 163 of file MET.cc.

References corr, and i.

{
  std::vector<double> deltas;
  std::vector<CorrMETData>::const_iterator i;
  for( i = corr.begin(); i != corr.end(); i++ )
    {
      deltas.push_back( i->significance );
    }
  return deltas;
}
std::vector< double > MET::dsumEt ( ) const

Definition at line 134 of file MET.cc.

References corr, and i.

{
  std::vector<double> deltas;
  std::vector<CorrMETData>::const_iterator i;
  for( i = corr.begin(); i != corr.end(); i++ )
    {
      deltas.push_back( i->sumet );
    }
  return deltas;
}
double reco::MET::e_longitudinal ( ) const [inline]

Definition at line 55 of file MET.h.

References elongit.

Referenced by MuCorrMETAnalyzer::fillMonitorElement(), and TcMETAnalyzer::fillMonitorElement().

{return elongit; }  
TMatrixD MET::getSignificanceMatrix ( void  ) const

Definition at line 149 of file MET.cc.

References query::result, signif_dxx, signif_dxy, signif_dyx, and signif_dyy.

Referenced by significance().

{
  TMatrixD result(2,2);
  result(0,0)=signif_dxx;
  result(0,1)=signif_dxy;
  result(1,0)=signif_dyx;
  result(1,1)=signif_dyy;
  return result;
}
std::vector<CorrMETData> reco::MET::mEtCorr ( ) const [inline]
double reco::MET::mEtSig ( ) const [inline]
bool MET::overlap ( const Candidate ) const [private, virtual]

check overlap with another candidate

Implements reco::RecoCandidate.

Reimplemented in reco::CaloMET, and reco::GenMET.

Definition at line 178 of file MET.cc.

{
  return false;
}
void MET::setSignificanceMatrix ( const TMatrixD &  matrix)

Definition at line 185 of file MET.cc.

References signif_dxx, signif_dxy, signif_dyx, and signif_dyy.

Referenced by PFSpecificAlgo::addInfo(), and cms::METProducer::produce().

                                                  {
  signif_dxx=inmatrix(0,0);
  signif_dxy=inmatrix(0,1);
  signif_dyx=inmatrix(1,0);
  signif_dyy=inmatrix(1,1);
  return;
}
double MET::significance ( ) const

Definition at line 83 of file MET.cc.

References getSignificanceMatrix(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), signif_dxx, signif_dxy, signif_dyx, and signif_dyy.

Referenced by reco::CaloMET::metSignificance().

                               {
  if(signif_dxx==0 && signif_dyy==0 && signif_dxy==0 && signif_dyx==0)
    return -1;
  TMatrixD metmat = getSignificanceMatrix();
  TVectorD metvec(2);
  metvec(0)=this->px();
  metvec(1)=this->py();
  double signif = -1;
  if(std::fabs(metmat.Determinant())>0.000001){
    metmat.Invert();
    signif = metvec * (metmat * metvec);
  }
  return signif;
}
double reco::MET::sumEt ( ) const [inline]

Member Data Documentation

std::vector<CorrMETData> reco::MET::corr [private]

Definition at line 76 of file MET.h.

Referenced by dmEx(), dmEy(), dSignificance(), dsumEt(), MET(), and mEtCorr().

double reco::MET::elongit [private]

Definition at line 70 of file MET.h.

Referenced by e_longitudinal(), and MET().

double reco::MET::signif_dxx [private]

Definition at line 72 of file MET.h.

Referenced by getSignificanceMatrix(), MET(), setSignificanceMatrix(), and significance().

double reco::MET::signif_dxy [private]

Definition at line 75 of file MET.h.

Referenced by getSignificanceMatrix(), MET(), setSignificanceMatrix(), and significance().

double reco::MET::signif_dyx [private]

Definition at line 74 of file MET.h.

Referenced by getSignificanceMatrix(), MET(), setSignificanceMatrix(), and significance().

double reco::MET::signif_dyy [private]

Definition at line 73 of file MET.h.

Referenced by getSignificanceMatrix(), MET(), setSignificanceMatrix(), and significance().

double reco::MET::sumet [private]

Definition at line 69 of file MET.h.

Referenced by MET(), mEtSig(), and sumEt().