CMS 3D CMS Logo

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

A wrapper for the TH1D 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 HTH1D:
Histograms

Public Member Functions

void Clear () override
 
void Fill (const double &x, const double &y) override
 
 HTH1D (TFile *outputFile, const TString &name, const TString &title, const int xBins, const double &xMin, const double &xMax)
 
TH1D * operator-> ()
 
virtual void SetXTitle (const TString &title)
 
virtual void SetYTitle (const TString &title)
 
void Write () override
 
 ~HTH1D () 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

TH1D * tH1D_
 
- Protected Attributes inherited from Histograms
TDirectory * histoDir_
 
TString name_
 
TFile * outputFile_
 
double theWeight_
 

Detailed Description

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

Definition at line 172 of file Histograms.h.

Constructor & Destructor Documentation

HTH1D::HTH1D ( TFile *  outputFile,
const TString &  name,
const TString &  title,
const int  xBins,
const double &  xMin,
const double &  xMax 
)
inline
HTH1D::~HTH1D ( )
inlineoverride

Definition at line 178 of file Histograms.h.

178  {
179  delete tH1D_;
180  }
TH1D * tH1D_
Definition: Histograms.h:199

Member Function Documentation

void HTH1D::Clear ( )
inlineoverridevirtual

Implements Histograms.

Definition at line 188 of file Histograms.h.

188  {
189  tH1D_->Clear();
190  }
TH1D * tH1D_
Definition: Histograms.h:199
void HTH1D::Fill ( const double &  x,
const double &  y 
)
inlineoverridevirtual

Reimplemented from Histograms.

Definition at line 181 of file Histograms.h.

181  {
182  tH1D_->Fill(x, y);
183  }
TH1D * tH1D_
Definition: Histograms.h:199
TH1D* HTH1D::operator-> ( )
inline

Definition at line 197 of file Histograms.h.

197 { return tH1D_; }
TH1D * tH1D_
Definition: Histograms.h:199
virtual void HTH1D::SetXTitle ( const TString &  title)
inlinevirtual

Definition at line 191 of file Histograms.h.

191  {
192  tH1D_->GetXaxis()->SetTitle(title);
193  }
TH1D * tH1D_
Definition: Histograms.h:199
virtual void HTH1D::SetYTitle ( const TString &  title)
inlinevirtual

Definition at line 194 of file Histograms.h.

194  {
195  tH1D_->GetYaxis()->SetTitle(title);
196  }
TH1D * tH1D_
Definition: Histograms.h:199
void HTH1D::Write ( )
inlineoverridevirtual

Implements Histograms.

Definition at line 184 of file Histograms.h.

References Histograms::histoDir_.

184  {
185  if(histoDir_ != nullptr) histoDir_->cd();
186  tH1D_->Write();
187  }
TH1D * tH1D_
Definition: Histograms.h:199
TDirectory * histoDir_
Definition: Histograms.h:124

Member Data Documentation

TH1D* HTH1D::tH1D_
protected

Definition at line 199 of file Histograms.h.