CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
HTH2D Class Reference

A wrapper for the TH2D histogram to allow it to be put inside the same map as all the other classes in this file. More...

#include <Histograms.h>

Inheritance diagram for HTH2D:
Histograms

Public Member Functions

void Clear () override
 
void Fill (const double &x, const double &y) override
 
TProfile * getProfile ()
 
 HTH2D (TFile *outputFile, const TString &name, const TString &title, const TString &dirName, const int xBins, const double &xMin, const double &xMax, const int yBins, const double &yMin, const double &yMax)
 
TH2D * operator-> ()
 
virtual void SetXTitle (const TString &title)
 
virtual void SetYTitle (const TString &title)
 
void Write () override
 
 ~HTH2D () override
 
- Public Member Functions inherited from Histograms
virtual void Fill (const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2)
 
virtual void Fill (const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2, const int charge, const double &weight=1.)
 
virtual void Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2)
 
virtual void Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2, const int charge, const double &weight=1.)
 
virtual void Fill (const CLHEP::HepLorentzVector &p1, const reco::Particle::LorentzVector &p2)
 
virtual void Fill (const reco::Particle::LorentzVector &p4, const double &weight=1.)
 
virtual void Fill (const reco::Particle::LorentzVector &p4, const int charge, const double &weight=1.)
 
virtual void Fill (const CLHEP::HepLorentzVector &momentum, const int charge, const double &weight=1.)
 
virtual void Fill (const reco::Particle::LorentzVector &p4, const double &resValue, const int charge)
 
virtual void Fill (const reco::Particle::LorentzVector &p4, const double &genValue, const double recValue, const int charge)
 
virtual void Fill (const CLHEP::HepLorentzVector &p, const double &likeValue)
 
virtual void Fill (const unsigned int number)
 
virtual void Fill (const reco::Particle::LorentzVector &recoP1, const int charge1, const reco::Particle::LorentzVector &genP1, const reco::Particle::LorentzVector &recoP2, const int charge2, const reco::Particle::LorentzVector &genP2, const double &recoMass, const double &genMass)
 
virtual void Fill (const reco::Particle::LorentzVector &recoP1, const int charge1, const reco::Particle::LorentzVector &recoP2, const int charge2, const double &recoMass, const double &genMass)
 
virtual void Fill (const reco::Particle::LorentzVector &recoP1, const reco::Particle::LorentzVector &genP1, const reco::Particle::LorentzVector &recoP2, const reco::Particle::LorentzVector &genP2)
 
virtual void Fill (const double &x, const double &y, const double &a, const double &b)
 
virtual void Fill (const reco::Particle::LorentzVector &p41, const reco::Particle::LorentzVector &p42, const reco::Particle::LorentzVector &p4Res, const double &weight=1.)
 
virtual void Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2, const CLHEP::HepLorentzVector &momentumRes, const double &weight=1.)
 
virtual double Get (const reco::Particle::LorentzVector &recoP1, const TString &covarianceName)
 
virtual TString GetName ()
 
 Histograms ()
 
 Histograms (const TString &name)
 
 Histograms (TFile *outputFile, const TString &name)
 
virtual void SetWeight (double weight)
 
virtual ~Histograms ()
 

Protected Attributes

TH2D * tH2d_
 
TProfile * tProfile_
 
- Protected Attributes inherited from Histograms
TDirectory * histoDir_
 
TString name_
 
TFile * outputFile_
 
double theWeight_
 

Detailed Description

A wrapper for the TH2D histogram to allow it to be put inside the same map as all the other classes in this file.

Definition at line 131 of file Histograms.h.

Constructor & Destructor Documentation

HTH2D::HTH2D ( TFile *  outputFile,
const TString &  name,
const TString &  title,
const TString &  dirName,
const int  xBins,
const double &  xMin,
const double &  xMax,
const int  yBins,
const double &  yMin,
const double &  yMax 
)
inline
HTH2D::~HTH2D ( )
inlineoverride

Definition at line 139 of file Histograms.h.

139  {
140  delete tH2d_;
141  delete tProfile_;
142  }
TProfile * tProfile_
Definition: Histograms.h:168
TH2D * tH2d_
Definition: Histograms.h:167

Member Function Documentation

void HTH2D::Clear ( )
inlineoverridevirtual

Implements Histograms.

Definition at line 152 of file Histograms.h.

152  {
153  tH2d_->Clear();
154  tProfile_->Clear();
155  }
TProfile * tProfile_
Definition: Histograms.h:168
TH2D * tH2d_
Definition: Histograms.h:167
void HTH2D::Fill ( const double &  x,
const double &  y 
)
inlineoverridevirtual

Reimplemented from Histograms.

Definition at line 143 of file Histograms.h.

143  {
144  tH2d_->Fill(x,y);
145  tProfile_->Fill(x,y);
146  }
TProfile * tProfile_
Definition: Histograms.h:168
TH2D * tH2d_
Definition: Histograms.h:167
TProfile* HTH2D::getProfile ( )
inline

Definition at line 165 of file Histograms.h.

165 { return tProfile_; }
TProfile * tProfile_
Definition: Histograms.h:168
TH2D* HTH2D::operator-> ( )
inline

Definition at line 164 of file Histograms.h.

164 { return tH2d_; }
TH2D * tH2d_
Definition: Histograms.h:167
virtual void HTH2D::SetXTitle ( const TString &  title)
inlinevirtual

Definition at line 156 of file Histograms.h.

156  {
157  tH2d_->GetXaxis()->SetTitle(title);
158  tProfile_->GetXaxis()->SetTitle(title);
159  }
TProfile * tProfile_
Definition: Histograms.h:168
TH2D * tH2d_
Definition: Histograms.h:167
virtual void HTH2D::SetYTitle ( const TString &  title)
inlinevirtual

Definition at line 160 of file Histograms.h.

160  {
161  tH2d_->GetYaxis()->SetTitle(title);
162  tProfile_->GetYaxis()->SetTitle(title);
163  }
TProfile * tProfile_
Definition: Histograms.h:168
TH2D * tH2d_
Definition: Histograms.h:167
void HTH2D::Write ( )
inlineoverridevirtual

Implements Histograms.

Definition at line 147 of file Histograms.h.

References Histograms::histoDir_.

147  {
148  if(histoDir_ != nullptr) histoDir_->cd();
149  tH2d_->Write();
150  tProfile_->Write();
151  }
TDirectory * histoDir_
Definition: Histograms.h:124
TProfile * tProfile_
Definition: Histograms.h:168
TH2D * tH2d_
Definition: Histograms.h:167

Member Data Documentation

TH2D* HTH2D::tH2d_
protected

Definition at line 167 of file Histograms.h.

TProfile* HTH2D::tProfile_
protected

Definition at line 168 of file Histograms.h.