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

References hMassVSPt_, hMassVSPt_prof_, and mergeVDriftHistosByStation::name.

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  }
TProfile * hMassVSPt_prof_
Definition: Histograms.h:773
TH2F * hMassVSPt_
Definition: Histograms.h:772

◆ ~HPartVSPt()

HPartVSPt::~HPartVSPt ( )
inlineoverride

Definition at line 742 of file Histograms.h.

References hMassVSPt_, and hMassVSPt_prof_.

742  {
743  delete hMassVSPt_;
744  delete hMassVSPt_prof_;
745  }
TProfile * hMassVSPt_prof_
Definition: Histograms.h:773
TH2F * hMassVSPt_
Definition: Histograms.h:772

Member Function Documentation

◆ Clear()

void HPartVSPt::Clear ( )
inlineoverride

Definition at line 766 of file Histograms.h.

References hMassVSPt_, and hMassVSPt_prof_.

766  {
767  hMassVSPt_->Clear();
768  hMassVSPt_prof_->Clear();
769  }
TProfile * hMassVSPt_prof_
Definition: Histograms.h:773
TH2F * hMassVSPt_
Definition: Histograms.h:772

◆ Fill() [1/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  }
Definition: weight.py:1
void Fill(const reco::Particle::LorentzVector &p4, const double &weight=1.) override
Definition: Histograms.h:747

◆ Fill() [2/2]

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

Definition at line 751 of file Histograms.h.

References hMassVSPt_, hMassVSPt_prof_, and mps_merge::weight.

751  {
752  hMassVSPt_->Fill(momentum.eta(), momentum.m(), weight);
753  hMassVSPt_prof_->Fill(momentum.eta(), momentum.m(), weight);
754  }
TProfile * hMassVSPt_prof_
Definition: Histograms.h:773
TH2F * hMassVSPt_
Definition: Histograms.h:772

◆ Write()

void HPartVSPt::Write ( )
inlineoverride

Definition at line 756 of file Histograms.h.

References hMassVSPt_, and hMassVSPt_prof_.

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  }
TProfile * hMassVSPt_prof_
Definition: Histograms.h:773
TH2F * hMassVSPt_
Definition: Histograms.h:772

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().