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 reco::Particle::LorentzVector &p4, const double &weight=1.) override
 
void Fill (const CLHEP::HepLorentzVector &momentum, 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 524 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 526 of file Histograms.h.

References hCurvVSEta_prof_, hMassVSEta_, hMassVSEta_prof_, hPtVSEta_, hPtVSEta_prof_, B2GTnPMonitor_cfi::maxMass, PV_cfg::maxPt, B2GTnPMonitor_cfi::minMass, and mergeVDriftHistosByStation::name.

526  {
527  name_ = name;
528  hPtVSEta_ = new TH2F(name + "_PtVSEta", "transverse momentum vs pseudorapidity", 32, -3.2, 3.2, 200, 0, maxPt);
529  hMassVSEta_ = new TH2F(name + "_MassVSEta", "mass vs pseudorapidity", 32, -3.2, 3.2, 40, minMass, maxMass);
530  // TD profile histograms
531  // ---------------------
532  hPtVSEta_prof_ = new TProfile(name + "_PtVSEta_prof", "mass vs pseudorapidity", 32, -3.2, 3.2, 0, maxPt);
534  new TProfile(name + "_MassVSEta_prof", "mass vs pseudorapidity", 32, -3.2, 3.2, minMass, maxMass);
535  hCurvVSEta_prof_ = new TProfile(name + "_CurvVSEta_prof", "curvature vs pseudorapidity", 32, -3.2, 3.2, 0, 1.);
536  }
TProfile * hPtVSEta_prof_
Definition: Histograms.h:584
TProfile * hCurvVSEta_prof_
Definition: Histograms.h:585
TH2F * hPtVSEta_
Definition: Histograms.h:581
TProfile * hMassVSEta_prof_
Definition: Histograms.h:583
maxPt
Definition: PV_cfg.py:224
TH2F * hMassVSEta_
Definition: Histograms.h:582

◆ ~HPartVSEta()

HPartVSEta::~HPartVSEta ( )
inlineoverride

Definition at line 538 of file Histograms.h.

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

538  {
539  delete hPtVSEta_;
540  delete hMassVSEta_;
541  delete hPtVSEta_prof_;
542  delete hMassVSEta_prof_;
543  delete hCurvVSEta_prof_;
544  }
TProfile * hPtVSEta_prof_
Definition: Histograms.h:584
TProfile * hCurvVSEta_prof_
Definition: Histograms.h:585
TH2F * hPtVSEta_
Definition: Histograms.h:581
TProfile * hMassVSEta_prof_
Definition: Histograms.h:583
TH2F * hMassVSEta_
Definition: Histograms.h:582

Member Function Documentation

◆ Clear()

void HPartVSEta::Clear ( )
inlineoverride

Definition at line 572 of file Histograms.h.

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

572  {
573  hPtVSEta_->Clear();
574  hPtVSEta_prof_->Clear();
575  hCurvVSEta_prof_->Clear();
576  hMassVSEta_->Clear();
577  hMassVSEta_prof_->Clear();
578  }
TProfile * hPtVSEta_prof_
Definition: Histograms.h:584
TProfile * hCurvVSEta_prof_
Definition: Histograms.h:585
TH2F * hPtVSEta_
Definition: Histograms.h:581
TProfile * hMassVSEta_prof_
Definition: Histograms.h:583
TH2F * hMassVSEta_
Definition: Histograms.h:582

◆ Fill() [1/2]

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

Definition at line 546 of file Histograms.h.

546  {
547  Fill(CLHEP::HepLorentzVector(p4.x(), p4.y(), p4.z(), p4.t()), weight);
548  }
Definition: weight.py:1
void Fill(const reco::Particle::LorentzVector &p4, const double &weight=1.) override
Definition: Histograms.h:546

◆ Fill() [2/2]

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

Definition at line 550 of file Histograms.h.

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

550  {
551  hPtVSEta_->Fill(momentum.eta(), momentum.perp(), weight);
552  hPtVSEta_prof_->Fill(momentum.eta(), momentum.perp(), weight);
553 
554  hMassVSEta_->Fill(momentum.eta(), momentum.m(), weight);
555  hMassVSEta_prof_->Fill(momentum.eta(), momentum.m(), weight);
556  hCurvVSEta_prof_->Fill(momentum.eta(), 1 / momentum.perp(), weight);
557  }
TProfile * hPtVSEta_prof_
Definition: Histograms.h:584
TProfile * hCurvVSEta_prof_
Definition: Histograms.h:585
TH2F * hPtVSEta_
Definition: Histograms.h:581
TProfile * hMassVSEta_prof_
Definition: Histograms.h:583
TH2F * hMassVSEta_
Definition: Histograms.h:582

◆ Write()

void HPartVSEta::Write ( )
inlineoverride

Definition at line 559 of file Histograms.h.

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

559  {
560  hPtVSEta_->Write();
561  hPtVSEta_prof_->Write();
562  hCurvVSEta_prof_->Write();
563  hMassVSEta_->Write();
564  hMassVSEta_prof_->Write();
565 
566  // std::vector<TGraphErrors*> graphs( (MuScleFitUtils::fitMass(hMassVSEta_)) );
567  // for (std::vector<TGraphErrors*>::const_iterator graph = graphs.begin(); graph != graphs.end(); graph++) {
568  // (*graph)->Write();
569  // }
570  }
TProfile * hPtVSEta_prof_
Definition: Histograms.h:584
TProfile * hCurvVSEta_prof_
Definition: Histograms.h:585
TH2F * hPtVSEta_
Definition: Histograms.h:581
TProfile * hMassVSEta_prof_
Definition: Histograms.h:583
TH2F * hMassVSEta_
Definition: Histograms.h:582

Member Data Documentation

◆ hCurvVSEta_prof_

TProfile* HPartVSEta::hCurvVSEta_prof_

Definition at line 585 of file Histograms.h.

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

◆ hMassVSEta_

TH2F* HPartVSEta::hMassVSEta_

Definition at line 582 of file Histograms.h.

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

◆ hMassVSEta_prof_

TProfile* HPartVSEta::hMassVSEta_prof_

Definition at line 583 of file Histograms.h.

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

◆ hPtVSEta_

TH2F* HPartVSEta::hPtVSEta_

Definition at line 581 of file Histograms.h.

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

◆ hPtVSEta_prof_

TProfile* HPartVSEta::hPtVSEta_prof_

Definition at line 584 of file Histograms.h.

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