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 731 of file Histograms.h.

Constructor & Destructor Documentation

◆ HPartVSPt()

HPartVSPt::HPartVSPt ( const TString &  name)
inline

Definition at line 733 of file Histograms.h.

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

References hMassVSPt_, hMassVSPt_prof_, and Skims_PA_cff::name.

◆ ~HPartVSPt()

HPartVSPt::~HPartVSPt ( )
inlineoverride

Definition at line 740 of file Histograms.h.

740  {
741  delete hMassVSPt_;
742  delete hMassVSPt_prof_;
743  }

References hMassVSPt_, and hMassVSPt_prof_.

Member Function Documentation

◆ Clear()

void HPartVSPt::Clear ( )
inlineoverride

Definition at line 764 of file Histograms.h.

764  {
765  hMassVSPt_->Clear();
766  hMassVSPt_prof_->Clear();
767  }

References hMassVSPt_, and hMassVSPt_prof_.

◆ Fill() [1/2]

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

Definition at line 749 of file Histograms.h.

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

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 745 of file Histograms.h.

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

References p4.

◆ Write()

void HPartVSPt::Write ( )
inlineoverride

Definition at line 754 of file Histograms.h.

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

References hMassVSPt_, and hMassVSPt_prof_.

Member Data Documentation

◆ hMassVSPt_

TH2F* HPartVSPt::hMassVSPt_

Definition at line 770 of file Histograms.h.

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

◆ hMassVSPt_prof_

TProfile* HPartVSPt::hMassVSPt_prof_

Definition at line 771 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:745
HPartVSPt::hMassVSPt_prof_
TProfile * hMassVSPt_prof_
Definition: Histograms.h:771
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:770