CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
HPartVSPt 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
 
 HPartVSPt (const TString &name)
 
void Write () override
 
 ~HPartVSPt () override
 

Public Attributes

TH2F * hMassVSPt_
 
TProfile * hMassVSPt_prof_
 

Detailed Description

Definition at line 733 of file Histograms.h.

Constructor & Destructor Documentation

◆ HPartVSPt()

HPartVSPt::HPartVSPt ( const TString &  name)
inline

Definition at line 735 of file Histograms.h.

735  {
736  name_ = name;
737  hMassVSPt_ = new TH2F(name + "_MassVSPt", "mass vs transverse momentum", 12, -6, 6, 40, 70, 110);
738  // TD profile histograms
739  hMassVSPt_prof_ = new TProfile(name + "_MassVSPt_prof", "mass vs transverse momentum", 12, -3, 3, 86, 116);
740  }

References hMassVSPt_, hMassVSPt_prof_, and Skims_PA_cff::name.

◆ ~HPartVSPt()

HPartVSPt::~HPartVSPt ( )
inlineoverride

Definition at line 742 of file Histograms.h.

742  {
743  delete hMassVSPt_;
744  delete hMassVSPt_prof_;
745  }

References hMassVSPt_, and hMassVSPt_prof_.

Member Function Documentation

◆ Clear()

void HPartVSPt::Clear ( )
inlineoverride

Definition at line 766 of file Histograms.h.

766  {
767  hMassVSPt_->Clear();
768  hMassVSPt_prof_->Clear();
769  }

References hMassVSPt_, and hMassVSPt_prof_.

◆ Fill() [1/2]

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

Definition at line 751 of file Histograms.h.

751  {
752  hMassVSPt_->Fill(momentum.eta(), momentum.m(), weight);
753  hMassVSPt_prof_->Fill(momentum.eta(), momentum.m(), weight);
754  }

References hMassVSPt_, hMassVSPt_prof_, and mps_merge::weight.

◆ Fill() [2/2]

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

Definition at line 747 of file Histograms.h.

747  {
748  Fill(CLHEP::HepLorentzVector(p4.x(), p4.y(), p4.z(), p4.t()), weight);
749  }

References p4.

◆ Write()

void HPartVSPt::Write ( )
inlineoverride

Definition at line 756 of file Histograms.h.

756  {
757  hMassVSPt_->Write();
758  hMassVSPt_prof_->Write();
759 
760  // std::vector<TGraphErrors*> graphs( (MuScleFitUtils::fitMass(hMassVSPt_)) );
761  // for(std::vector<TGraphErrors*>::const_iterator graph = graphs.begin(); graph != graphs.end(); graph++){
762  // (*graph)->Write();
763  // }
764  }

References hMassVSPt_, and hMassVSPt_prof_.

Member Data Documentation

◆ hMassVSPt_

TH2F* HPartVSPt::hMassVSPt_

Definition at line 772 of file Histograms.h.

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

◆ hMassVSPt_prof_

TProfile* HPartVSPt::hMassVSPt_prof_

Definition at line 773 of file Histograms.h.

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

mps_merge.weight
weight
Definition: mps_merge.py:88
HPartVSPt::Fill
void Fill(const reco::Particle::LorentzVector &p4, const double &weight=1.) override
Definition: Histograms.h:747
HPartVSPt::hMassVSPt_prof_
TProfile * hMassVSPt_prof_
Definition: Histograms.h:773
p4
double p4[4]
Definition: TauolaWrapper.h:92
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
weight
Definition: weight.py:1
HPartVSPt::hMassVSPt_
TH2F * hMassVSPt_
Definition: Histograms.h:772