#include <Histograms.h>
Public Member Functions | |
virtual void | Clear () |
virtual void | Fill (const reco::Particle::LorentzVector &p4, const double &weight=1.) |
virtual void | Fill (const CLHEP::HepLorentzVector &momentum, const double &weight=1.) |
virtual void | Fill (unsigned int number) |
HParticle (const TString &name, const double &minMass=0., const double &maxMass=200., const double &maxPt=100.) | |
HParticle (TFile *outputFile, const TString &name, const double &minMass=0., const double &maxMass=200., const double &maxPt=100.) | |
Constructor that puts the histograms inside a TDirectory. | |
HParticle (const TString &name, TFile *file) | |
virtual void | Write () |
~HParticle () | |
Protected Attributes | |
TH1F * | hEta_ |
TH1F * | hMass_ |
TH1F * | hNumber_ |
TH1F * | hPhi_ |
TH1F * | hPt_ |
TH2F * | hPtVsEta_ |
Definition at line 221 of file Histograms.h.
HParticle::HParticle | ( | const TString & | name, |
const double & | minMass = 0. , |
||
const double & | maxMass = 200. , |
||
const double & | maxPt = 100. |
||
) | [inline] |
Definition at line 223 of file Histograms.h.
: Histograms(name), // Kinematical variables hPt_( new TH1F (name+"_Pt", "transverse momentum", 100, 0, maxPt) ), hPtVsEta_( new TH2F (name+"_PtVsEta", "transverse momentum vs #eta", 100, 0, maxPt, 100, -3.0, 3.0) ), hEta_( new TH1F (name+"_Eta", "pseudorapidity", 60, -3.0, 3.0) ), hPhi_( new TH1F (name+"_Phi", "phi angle", 64, -3.2, 3.2) ), hMass_( new TH1F (name+"_Mass", "mass", 10000, minMass, maxMass) ), // hMass_fine_ = new TH1F (name+"_Mass_fine", "low mass fine binning", 4000, 0., 20. ); //Removed to avoid too many histos (more binning added to hMass) hNumber_( new TH1F (name+"_Number", "number", 20, -0.5, 19.5) ) {}
HParticle::HParticle | ( | TFile * | outputFile, |
const TString & | name, | ||
const double & | minMass = 0. , |
||
const double & | maxMass = 200. , |
||
const double & | maxPt = 100. |
||
) | [inline] |
Constructor that puts the histograms inside a TDirectory.
Definition at line 236 of file Histograms.h.
References hEta_, hMass_, hNumber_, hPhi_, hPt_, and hPtVsEta_.
: Histograms(outputFile, name) { // Kinematical variables hPt_ = new TH1F (name+"_Pt", "transverse momentum", 100, 0, maxPt); hPtVsEta_ = new TH2F (name+"_PtVsEta", "transverse momentum vs #eta", 100, 0, maxPt, 100, -3.0, 3.0); hEta_ = new TH1F (name+"_Eta", "pseudorapidity", 60, -3.0, 3.0); hPhi_ = new TH1F (name+"_Phi", "phi angle", 64, -3.2, 3.2); hMass_ = new TH1F (name+"_Mass", "mass", 40000, minMass, maxMass); // hMass_fine_ = new TH1F (name+"_Mass_fine", "low mass fine binning", 4000, 0., 20. ); //Removed to avoid too many histos (more binning added to hMass) hNumber_ = new TH1F (name+"_Number", "number", 20, -0.5, 19.5); }
HParticle::HParticle | ( | const TString & | name, |
TFile * | file | ||
) | [inline] |
Definition at line 249 of file Histograms.h.
: Histograms(name), hPt_( (TH1F *) file->Get(name_+"_Pt") ), hPtVsEta_( (TH2F *) file->Get(name_+"_PtVsEta") ), hEta_( (TH1F *) file->Get(name_+"_Eta") ), hPhi_( (TH1F *) file->Get(name_+"_Phi") ), hMass_( (TH1F *) file->Get(name_+"_Mass") ), //hMass_fine_ = (TH1F *) file->Get(name_+"_Mass_fine"); hNumber_( (TH1F *) file->Get(name_+"_Number") ) {}
HParticle::~HParticle | ( | ) | [inline] |
virtual void HParticle::Clear | ( | ) | [inline, virtual] |
virtual void HParticle::Fill | ( | const CLHEP::HepLorentzVector & | momentum, |
const double & | weight = 1. |
||
) | [inline, virtual] |
Reimplemented from Histograms.
Definition at line 276 of file Histograms.h.
References hEta_, hMass_, hPhi_, hPt_, hPtVsEta_, and CommonMethods::weight().
virtual void HParticle::Fill | ( | const reco::Particle::LorentzVector & | p4, |
const double & | weight = 1. |
||
) | [inline, virtual] |
Reimplemented from Histograms.
Definition at line 271 of file Histograms.h.
References CommonMethods::weight().
virtual void HParticle::Fill | ( | unsigned int | number | ) | [inline, virtual] |
Reimplemented from Histograms.
Definition at line 286 of file Histograms.h.
References hNumber_.
{ hNumber_->Fill(number); }
virtual void HParticle::Write | ( | ) | [inline, virtual] |
Implements Histograms.
Definition at line 291 of file Histograms.h.
References hEta_, Histograms::histoDir_, hMass_, hNumber_, hPhi_, hPt_, and hPtVsEta_.
TH1F* HParticle::hEta_ [protected] |
Definition at line 317 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH1F* HParticle::hMass_ [protected] |
Definition at line 319 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH1F* HParticle::hNumber_ [protected] |
Definition at line 321 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH1F* HParticle::hPhi_ [protected] |
Definition at line 318 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH1F* HParticle::hPt_ [protected] |
Definition at line 315 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH2F* HParticle::hPtVsEta_ [protected] |
Definition at line 316 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().