CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
HPartVSEta Class Reference

#include <Histograms.h>

Inherits Histograms.

Public Member Functions

void Clear () override
 
void Fill (const CLHEP::HepLorentzVector &momentum, const double &weight=1.) override
 
void Fill (const reco::Particle::LorentzVector &p4, const double &weight=1.) override
 
 HPartVSEta (const TString &name, const double &minMass=0., const double &maxMass=100., const double &maxPt=100.)
 
void Write () override
 
 ~HPartVSEta () override
 

Public Attributes

TProfile * hCurvVSEta_prof_
 
TH2F * hMassVSEta_
 
TProfile * hMassVSEta_prof_
 
TH2F * hPtVSEta_
 
TProfile * hPtVSEta_prof_
 

Detailed Description

Definition at line 522 of file Histograms.h.

Constructor & Destructor Documentation

◆ HPartVSEta()

HPartVSEta::HPartVSEta ( const TString &  name,
const double &  minMass = 0.,
const double &  maxMass = 100.,
const double &  maxPt = 100. 
)
inline

Definition at line 524 of file Histograms.h.

524  {
525  name_ = name;
526  hPtVSEta_ = new TH2F(name + "_PtVSEta", "transverse momentum vs pseudorapidity", 32, -3.2, 3.2, 200, 0, maxPt);
527  hMassVSEta_ = new TH2F(name + "_MassVSEta", "mass vs pseudorapidity", 32, -3.2, 3.2, 40, minMass, maxMass);
528  // TD profile histograms
529  // ---------------------
530  hPtVSEta_prof_ = new TProfile(name + "_PtVSEta_prof", "mass vs pseudorapidity", 32, -3.2, 3.2, 0, maxPt);
532  new TProfile(name + "_MassVSEta_prof", "mass vs pseudorapidity", 32, -3.2, 3.2, minMass, maxMass);
533  hCurvVSEta_prof_ = new TProfile(name + "_CurvVSEta_prof", "curvature vs pseudorapidity", 32, -3.2, 3.2, 0, 1.);
534  }

References hCurvVSEta_prof_, hMassVSEta_, hMassVSEta_prof_, hPtVSEta_, hPtVSEta_prof_, B2GTnPMonitor_cfi::maxMass, MuonErrorMatrixAnalyzer_cfi::maxPt, B2GTnPMonitor_cfi::minMass, and Skims_PA_cff::name.

◆ ~HPartVSEta()

HPartVSEta::~HPartVSEta ( )
inlineoverride

Definition at line 536 of file Histograms.h.

536  {
537  delete hPtVSEta_;
538  delete hMassVSEta_;
539  delete hPtVSEta_prof_;
540  delete hMassVSEta_prof_;
541  delete hCurvVSEta_prof_;
542  }

References hCurvVSEta_prof_, hMassVSEta_, hMassVSEta_prof_, hPtVSEta_, and hPtVSEta_prof_.

Member Function Documentation

◆ Clear()

void HPartVSEta::Clear ( )
inlineoverride

Definition at line 570 of file Histograms.h.

570  {
571  hPtVSEta_->Clear();
572  hPtVSEta_prof_->Clear();
573  hCurvVSEta_prof_->Clear();
574  hMassVSEta_->Clear();
575  hMassVSEta_prof_->Clear();
576  }

References hCurvVSEta_prof_, hMassVSEta_, hMassVSEta_prof_, hPtVSEta_, and hPtVSEta_prof_.

◆ Fill() [1/2]

void HPartVSEta::Fill ( const CLHEP::HepLorentzVector &  momentum,
const double &  weight = 1. 
)
inlineoverride

Definition at line 548 of file Histograms.h.

548  {
549  hPtVSEta_->Fill(momentum.eta(), momentum.perp(), weight);
550  hPtVSEta_prof_->Fill(momentum.eta(), momentum.perp(), weight);
551 
552  hMassVSEta_->Fill(momentum.eta(), momentum.m(), weight);
553  hMassVSEta_prof_->Fill(momentum.eta(), momentum.m(), weight);
554  hCurvVSEta_prof_->Fill(momentum.eta(), 1 / momentum.perp(), weight);
555  }

References hCurvVSEta_prof_, hMassVSEta_, hMassVSEta_prof_, hPtVSEta_, hPtVSEta_prof_, and mps_merge::weight.

◆ Fill() [2/2]

void HPartVSEta::Fill ( const reco::Particle::LorentzVector p4,
const double &  weight = 1. 
)
inlineoverride

Definition at line 544 of file Histograms.h.

544  {
545  Fill(CLHEP::HepLorentzVector(p4.x(), p4.y(), p4.z(), p4.t()), weight);
546  }

References p4.

◆ Write()

void HPartVSEta::Write ( )
inlineoverride

Definition at line 557 of file Histograms.h.

557  {
558  hPtVSEta_->Write();
559  hPtVSEta_prof_->Write();
560  hCurvVSEta_prof_->Write();
561  hMassVSEta_->Write();
562  hMassVSEta_prof_->Write();
563 
564  // std::vector<TGraphErrors*> graphs( (MuScleFitUtils::fitMass(hMassVSEta_)) );
565  // for (std::vector<TGraphErrors*>::const_iterator graph = graphs.begin(); graph != graphs.end(); graph++) {
566  // (*graph)->Write();
567  // }
568  }

References hCurvVSEta_prof_, hMassVSEta_, hMassVSEta_prof_, hPtVSEta_, and hPtVSEta_prof_.

Member Data Documentation

◆ hCurvVSEta_prof_

TProfile* HPartVSEta::hCurvVSEta_prof_

Definition at line 583 of file Histograms.h.

Referenced by Clear(), Fill(), HPartVSEta(), Write(), and ~HPartVSEta().

◆ hMassVSEta_

TH2F* HPartVSEta::hMassVSEta_

Definition at line 580 of file Histograms.h.

Referenced by Clear(), Fill(), HPartVSEta(), Write(), and ~HPartVSEta().

◆ hMassVSEta_prof_

TProfile* HPartVSEta::hMassVSEta_prof_

Definition at line 581 of file Histograms.h.

Referenced by Clear(), Fill(), HPartVSEta(), Write(), and ~HPartVSEta().

◆ hPtVSEta_

TH2F* HPartVSEta::hPtVSEta_

Definition at line 579 of file Histograms.h.

Referenced by Clear(), Fill(), HPartVSEta(), Write(), and ~HPartVSEta().

◆ hPtVSEta_prof_

TProfile* HPartVSEta::hPtVSEta_prof_

Definition at line 582 of file Histograms.h.

Referenced by Clear(), Fill(), HPartVSEta(), Write(), and ~HPartVSEta().

mps_merge.weight
weight
Definition: mps_merge.py:88
HPartVSEta::hPtVSEta_
TH2F * hPtVSEta_
Definition: Histograms.h:579
HPartVSEta::hPtVSEta_prof_
TProfile * hPtVSEta_prof_
Definition: Histograms.h:582
MuonErrorMatrixAnalyzer_cfi.maxPt
maxPt
Definition: MuonErrorMatrixAnalyzer_cfi.py:19
HPartVSEta::hCurvVSEta_prof_
TProfile * hCurvVSEta_prof_
Definition: Histograms.h:583
HPartVSEta::hMassVSEta_prof_
TProfile * hMassVSEta_prof_
Definition: Histograms.h:581
B2GTnPMonitor_cfi.maxMass
maxMass
Definition: B2GTnPMonitor_cfi.py:55
p4
double p4[4]
Definition: TauolaWrapper.h:92
HPartVSEta::Fill
void Fill(const reco::Particle::LorentzVector &p4, const double &weight=1.) override
Definition: Histograms.h:544
HPartVSEta::hMassVSEta_
TH2F * hMassVSEta_
Definition: Histograms.h:580
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
B2GTnPMonitor_cfi.minMass
minMass
Definition: B2GTnPMonitor_cfi.py:54
weight
Definition: weight.py:1