CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual void Clear ()
 
virtual void Fill (const double &x, const double &y)
 
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)
 
virtual void Write ()
 
 ~HTH2D ()
 
- Public Member Functions inherited from Histograms
void declareHistograms ()
 
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.)
 
void fillEventInfo (int proc, int strk, int ntrkr)
 
void fillRecHistograms (const RecTrack_t &r)
 
void fillSimHistograms (const SimTrack_t &s)
 
void fillVzeroHistograms (const RecVzero_t &r, int part)
 
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)
 
 Histograms (const edm::ParameterSet &pset)
 
virtual void SetWeight (double weight)
 
void writeHistograms ()
 
virtual ~Histograms ()
 
 ~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 132 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

Definition at line 135 of file Histograms.h.

138  tH2d_( new TH2D(name, title, xBins, xMin, xMax, yBins, yMin, yMax) ),
139  tProfile_( new TProfile(name+"Prof", title+" profile", xBins, xMin, xMax, yMin, yMax) ) {}
TProfile * tProfile_
Definition: Histograms.h:169
TH2D * tH2d_
Definition: Histograms.h:168
HTH2D::~HTH2D ( )
inline

Definition at line 140 of file Histograms.h.

References tH2d_, and tProfile_.

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

Member Function Documentation

virtual void HTH2D::Clear ( )
inlinevirtual

Implements Histograms.

Definition at line 153 of file Histograms.h.

References tH2d_, and tProfile_.

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

Reimplemented from Histograms.

Definition at line 144 of file Histograms.h.

References tH2d_, and tProfile_.

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

Definition at line 166 of file Histograms.h.

References tProfile_.

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

Definition at line 165 of file Histograms.h.

References tH2d_.

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

Definition at line 157 of file Histograms.h.

References tH2d_, and tProfile_.

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

Definition at line 161 of file Histograms.h.

References tH2d_, and tProfile_.

161  {
162  tH2d_->GetYaxis()->SetTitle(title);
163  tProfile_->GetYaxis()->SetTitle(title);
164  }
TProfile * tProfile_
Definition: Histograms.h:169
TH2D * tH2d_
Definition: Histograms.h:168
virtual void HTH2D::Write ( )
inlinevirtual

Implements Histograms.

Definition at line 148 of file Histograms.h.

References Histograms::histoDir_, tH2d_, and tProfile_.

148  {
149  if(histoDir_ != 0) histoDir_->cd();
150  tH2d_->Write();
151  tProfile_->Write();
152  }
TDirectory * histoDir_
Definition: Histograms.h:125
TProfile * tProfile_
Definition: Histograms.h:169
TH2D * tH2d_
Definition: Histograms.h:168

Member Data Documentation

TH2D* HTH2D::tH2d_
protected

Definition at line 168 of file Histograms.h.

Referenced by Clear(), Fill(), operator->(), SetXTitle(), SetYTitle(), Write(), and ~HTH2D().

TProfile* HTH2D::tProfile_
protected

Definition at line 169 of file Histograms.h.

Referenced by Clear(), Fill(), getProfile(), SetXTitle(), SetYTitle(), Write(), and ~HTH2D().