CMS 3D CMS Logo

Public Member Functions | Protected Attributes

METBenchmark Class Reference

To plot MET quantities. More...

#include <METBenchmark.h>

Inheritance diagram for METBenchmark:
Benchmark METBenchmarkAnalyzer

List of all members.

Public Member Functions

template<class C >
void fill (const C &candidates)
 fill a collection
void fillOne (const reco::MET &candidate)
 fill histograms with a given particle
 METBenchmark (Mode mode)
void setup ()
 book histograms
virtual ~METBenchmark ()

Protected Attributes

TH1F * etOverSumEt_
TH2F * mex_VS_sumEt_
TH1F * phi_
TH1F * pt2_
TH1F * pt_
TH1F * px_
TH1F * py_
TH1F * sumEt2_
TH1F * sumEt_

Detailed Description

To plot MET quantities.

Definition at line 9 of file METBenchmark.h.


Constructor & Destructor Documentation

METBenchmark::METBenchmark ( Mode  mode) [inline]

Definition at line 13 of file METBenchmark.h.

METBenchmark::~METBenchmark ( ) [virtual]

Definition at line 19 of file METBenchmark.cc.

{}

Member Function Documentation

template<class C >
void METBenchmark::fill ( const C &  candidates)

fill a collection

Definition at line 41 of file METBenchmark.h.

References fillOne(), and i.

Referenced by METBenchmarkAnalyzer::analyze().

                                               {

  for (unsigned int i = 0; i < candCollection.size(); ++i) {
    const reco::MET& cand = candCollection[i];
    fillOne(cand);
  }
}
void METBenchmark::fillOne ( const reco::MET candidate)

fill histograms with a given particle

Definition at line 63 of file METBenchmark.cc.

References reco::LeafCandidate::eta(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), and reco::MET::sumEt().

Referenced by fill().

                                              {

  if( !isInRange(cand.pt(), cand.eta(), cand.phi() ) ) return;

  pt_->Fill( cand.pt() );
  pt2_->Fill( cand.pt() );
  px_->Fill( cand.px() );
  py_->Fill( cand.py() );
  phi_->Fill( cand.phi() );
  sumEt_->Fill( cand.sumEt() );
  sumEt2_->Fill( cand.sumEt() );
  if (cand.sumEt()>3.0) etOverSumEt_->Fill( cand.pt()/cand.sumEt() );
  mex_VS_sumEt_->Fill( cand.sumEt(), cand.px() );
  mex_VS_sumEt_->Fill( cand.sumEt(), cand.py() );
}
void METBenchmark::setup ( void  )

book histograms

Definition at line 22 of file METBenchmark.cc.

References Benchmark::PhaseSpace::m, Benchmark::PhaseSpace::M, and Benchmark::PhaseSpace::n.

Referenced by METBenchmarkAnalyzer::beginJob().

                         {

  //std::cout << "FL: METBenchmark.cc: start setup()" << std::endl;

  PhaseSpace ptPS(100,0,200);
  PhaseSpace pt2PS(100,0,7000);
  PhaseSpace pxPS(100,-100.,100);
  PhaseSpace phiPS(50, -3.1416, 3.1416);
  PhaseSpace sumEtPS(100, 0, 3000);
  PhaseSpace sumEt2PS(100, 0, 7000);
  PhaseSpace sumEt3PS(50, 0, 200);
  PhaseSpace etOverSumEtPS(100, 0.0, 1.0);

  switch(mode_) {
  case DQMOFFLINE:
    ptPS = PhaseSpace(200, 0, 200);
    pxPS = PhaseSpace(200,-100.,100);
    sumEtPS = PhaseSpace(200, 0, 200);
    break;
  default:
    break;
  }

  pt_ = book1D("pt_", "pt_;p_{T} [GeV]", ptPS.n, ptPS.m, ptPS.M);
  pt2_ = book1D("pt2_", "pt2_;p_{T} [GeV]", pt2PS.n, pt2PS.m, pt2PS.M);
  px_ = book1D("px_", "px_;p_{X} [GeV]", pxPS.n, pxPS.m, pxPS.M);
  py_ = book1D("py_", "py_;p_{Y} [GeV]", pxPS.n, pxPS.m, pxPS.M);

  // might want to increase the number of bins, to match the size of the ECAL crystals
  phi_ = book1D("phi_", "phi_;#phi", phiPS.n, phiPS.m, phiPS.M);
  sumEt_ = book1D("sumEt_", "sumEt_;#SigmaE_{T} [GeV]", sumEtPS.n, sumEtPS.m, sumEtPS.M);
  sumEt2_ = book1D("sumEt2_", "sumEt2_;#SigmaE_{T} [GeV]", sumEt2PS.n, sumEt2PS.m, sumEt2PS.M);
  etOverSumEt_ = book1D("etOverSumEt_", "etOverSumEt_;p_{T}/#SigmaE_{T}", etOverSumEtPS.n, etOverSumEtPS.m, etOverSumEtPS.M);

  mex_VS_sumEt_= book2D("mex_VS_sumEt_", 
                        ";#SigmaE_{T} [GeV];p_{X} [GeV]",
                        sumEt3PS.n, sumEt3PS.m, sumEt3PS.M,
                        pxPS.n, pxPS.m, pxPS.M );
}

Member Data Documentation

TH1F* METBenchmark::etOverSumEt_ [protected]

Definition at line 35 of file METBenchmark.h.

TH2F* METBenchmark::mex_VS_sumEt_ [protected]

Definition at line 36 of file METBenchmark.h.

TH1F* METBenchmark::phi_ [protected]

Definition at line 32 of file METBenchmark.h.

TH1F* METBenchmark::pt2_ [protected]

Definition at line 29 of file METBenchmark.h.

TH1F* METBenchmark::pt_ [protected]

Definition at line 28 of file METBenchmark.h.

TH1F* METBenchmark::px_ [protected]

Definition at line 30 of file METBenchmark.h.

TH1F* METBenchmark::py_ [protected]

Definition at line 31 of file METBenchmark.h.

TH1F* METBenchmark::sumEt2_ [protected]

Definition at line 34 of file METBenchmark.h.

TH1F* METBenchmark::sumEt_ [protected]

Definition at line 33 of file METBenchmark.h.