#include <Histograms.h>
Public Member Functions | |
virtual void | Clear () |
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 (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 | |
TProfile * | hCurvVsEtaNeg_ |
TProfile * | hCurvVsEtaPos_ |
TProfile * | hCurvVsPhiNeg_ |
TProfile * | hCurvVsPhiPos_ |
TH1F * | hEta_ |
TH1F * | hMass_ |
TH1F * | hNumber_ |
TH1F * | hPhi_ |
TH1F * | hPt_ |
TH2F * | hPtVsEta_ |
TProfile * | hPtVsPhiNeg_ |
TProfile * | hPtVsPhiPos_ |
Definition at line 238 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 240 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) ), hCurvVsEtaNeg_( new TProfile(name+"_CurvVsEtaNeg", "q/pT vs #eta neg.", 64, -3.2, 3.2, -1., 0.) ), hCurvVsEtaPos_( new TProfile(name+"_CurvVsEtaPos", "q/pT vs #eta pos.", 64, -3.2, 3.2, 0., 1.) ), hCurvVsPhiNeg_( new TProfile(name+"_CurvVsPhiNeg", "q/pT vs #phi neg.", 32, -3.2, 3.2, -1., 0.) ), hCurvVsPhiPos_( new TProfile(name+"_CurvVsPhiPos", "q/pT vs #phi pos.", 32, -3.2, 3.2, 0., 1.) ), hPtVsPhiNeg_( new TProfile(name+"_PtVsPhiNeg", "pT vs #phi neg.", 32, -3.2, 3.2, 0.,100) ), hPtVsPhiPos_( new TProfile(name+"_PtVsPhiPos", "pT vs #phi pos.", 32, -3.2, 3.2, 0.,100) ), hEta_( new TH1F (name+"_Eta", "pseudorapidity", 64, -3.2, 3.2) ), hPhi_( new TH1F (name+"_Phi", "phi angle", 64, -3.2, 3.2) ), hMass_( new TH1F (name+"_Mass", "mass", 10000, minMass, maxMass) ), 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 262 of file Histograms.h.
References hCurvVsEtaNeg_, hCurvVsEtaPos_, hCurvVsPhiNeg_, hCurvVsPhiPos_, hEta_, hMass_, hNumber_, hPhi_, hPt_, hPtVsEta_, hPtVsPhiNeg_, and hPtVsPhiPos_.
: 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); hPtVsEta_ = new TH2F (name+"_PtVsEta", "transverse momentum vs #eta", 100, 0, maxPt, 100, -3.0, 3.0); hCurvVsEtaNeg_ = new TProfile(name+"_CurvVsEtaNeg", "q/pT vs #eta neg.", 100, -3.0, 3.0, -1. ,0.); hCurvVsEtaPos_ = new TProfile(name+"_CurvVsEtaPos", "q/pT vs #eta pos.", 100, -3.0, 3.0, 0., 1.); hCurvVsPhiNeg_ = new TProfile(name+"_CurvVsPhiNeg", "q/pT vs #phi neg.", 32, -3.2, 3.2, -1. ,0.); hCurvVsPhiPos_ = new TProfile(name+"_CurvVsPhiPos", "q/pT vs #phi pos.", 32, -3.2, 3.2, 0., 1.); hPtVsPhiNeg_ = new TProfile(name+"_PtVsPhiNeg", "pT vs #phi neg.", 32, -3.2, 3.2, 0.,100); hPtVsPhiPos_ = new TProfile(name+"_PtVsPhiPos", "pT vs #phi pos.", 32, -3.2, 3.2, 0.,100); //hPtVSPhi_prof_ = new TProfile (name+"_PtVSPhi_prof", "pt vs phi angle",12, -3.2, 3.2, 0, 200); hEta_ = new TH1F (name+"_Eta", "pseudorapidity", 64, -3.2, 3.2); hPhi_ = new TH1F (name+"_Phi", "phi angle", 64, -3.2, 3.2); hMass_ = new TH1F (name+"_Mass", "mass", 40000, minMass, maxMass); hNumber_ = new TH1F (name+"_Number", "number", 20, -0.5, 19.5); }
HParticle::HParticle | ( | const TString & | name, |
TFile * | file | ||
) | [inline] |
Definition at line 288 of file Histograms.h.
: Histograms(name), hPt_( (TH1F *) file->Get(name_+"_Pt") ), hPtVsEta_( (TH2F *) file->Get(name_+"_PtVsEta") ), hCurvVsEtaNeg_( (TProfile *) file->Get(name_+"_CurvVsEtaNeg") ), hCurvVsEtaPos_( (TProfile *) file->Get(name_+"_CurvVsEtaPos") ), hCurvVsPhiNeg_( (TProfile *) file->Get(name_+"_CurvVsPhiNeg") ), hCurvVsPhiPos_( (TProfile *) file->Get(name_+"_CurvVsPhiPos") ), hPtVsPhiNeg_( (TProfile *) file->Get(name_+"_PtVsPhiNeg") ), hPtVsPhiPos_( (TProfile *) file->Get(name_+"_PtVsPhiPos") ), 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] |
Definition at line 309 of file Histograms.h.
References hCurvVsEtaNeg_, hCurvVsEtaPos_, hCurvVsPhiNeg_, hCurvVsPhiPos_, hEta_, hMass_, hNumber_, hPhi_, hPt_, hPtVsEta_, hPtVsPhiNeg_, and hPtVsPhiPos_.
{ delete hPt_; delete hPtVsEta_; delete hCurvVsEtaNeg_; delete hCurvVsEtaPos_; delete hCurvVsPhiNeg_; delete hCurvVsPhiPos_; delete hPtVsPhiNeg_; delete hPtVsPhiPos_; delete hEta_; delete hPhi_; delete hMass_; // delete hMass_fine_; delete hNumber_; }
virtual void HParticle::Clear | ( | ) | [inline, virtual] |
Implements Histograms.
Definition at line 382 of file Histograms.h.
References hCurvVsEtaNeg_, hCurvVsEtaPos_, hCurvVsPhiNeg_, hCurvVsPhiPos_, hEta_, hMass_, hNumber_, hPhi_, hPt_, hPtVsEta_, hPtVsPhiNeg_, and hPtVsPhiPos_.
{ hPt_->Clear(); hPtVsEta_->Clear(); hCurvVsEtaNeg_->Clear(); hCurvVsEtaPos_->Clear(); hCurvVsPhiNeg_->Clear(); hCurvVsPhiPos_->Clear(); hPtVsPhiNeg_->Clear(); hPtVsPhiPos_->Clear(); hEta_->Clear(); hPhi_->Clear(); hMass_->Clear(); //hMass_fine_->Clear(); hNumber_->Clear(); }
virtual void HParticle::Fill | ( | const CLHEP::HepLorentzVector & | momentum, |
const int | charge, | ||
const double & | weight = 1. |
||
) | [inline, virtual] |
Reimplemented from Histograms.
Definition at line 334 of file Histograms.h.
References hCurvVsEtaNeg_, hCurvVsEtaPos_, hCurvVsPhiNeg_, hCurvVsPhiPos_, hEta_, hMass_, hPhi_, hPt_, hPtVsEta_, hPtVsPhiNeg_, hPtVsPhiPos_, and histoStyle::weight.
{ hPt_->Fill(momentum.perp(), weight); hPtVsEta_->Fill(momentum.perp(), momentum.eta(), weight); // std::cout<< "charge-> " <<charge<<std::endl; if(charge<0)hCurvVsEtaNeg_->Fill( momentum.eta(),charge/(momentum.perp()),weight); if(charge>0)hCurvVsEtaPos_->Fill( momentum.eta(),charge/(momentum.perp()),weight); if(charge<0)hCurvVsPhiNeg_->Fill( momentum.phi(),charge/(momentum.perp()),weight); if(charge>0)hCurvVsPhiPos_->Fill( momentum.phi(),charge/(momentum.perp()),weight); if(charge<0)hPtVsPhiNeg_->Fill( momentum.phi(),momentum.perp(),weight); if(charge>0)hPtVsPhiPos_->Fill( momentum.phi(),momentum.perp(),weight); hEta_->Fill(momentum.eta(), weight); hPhi_->Fill(momentum.phi(), weight); hMass_->Fill(momentum.m(), weight); //hMass_fine_->Fill(momentum.m(), weight); }
virtual void HParticle::Fill | ( | const reco::Particle::LorentzVector & | p4, |
const int | charge, | ||
const double & | weight = 1. |
||
) | [inline, virtual] |
Reimplemented from Histograms.
Definition at line 329 of file Histograms.h.
References histoStyle::weight.
virtual void HParticle::Fill | ( | unsigned int | number | ) | [inline, virtual] |
Reimplemented from Histograms.
Definition at line 356 of file Histograms.h.
References hNumber_.
{ hNumber_->Fill(number); }
virtual void HParticle::Write | ( | ) | [inline, virtual] |
Implements Histograms.
Definition at line 361 of file Histograms.h.
References hCurvVsEtaNeg_, hCurvVsEtaPos_, hCurvVsPhiNeg_, hCurvVsPhiPos_, hEta_, Histograms::histoDir_, hMass_, hNumber_, hPhi_, hPt_, hPtVsEta_, hPtVsPhiNeg_, and hPtVsPhiPos_.
{ if(histoDir_ != 0) histoDir_->cd(); hPt_->Write(); hPtVsEta_->Write(); hCurvVsEtaNeg_->Write(); hCurvVsEtaPos_->Write(); hCurvVsPhiNeg_->Write(); hCurvVsPhiPos_->Write(); hPtVsPhiNeg_->Write(); hPtVsPhiPos_->Write(); hEta_->Write(); hPhi_->Write(); hMass_->Write(); //hMass_fine_->Write(); hNumber_->Write(); }
TProfile* HParticle::hCurvVsEtaNeg_ [protected] |
Definition at line 406 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TProfile* HParticle::hCurvVsEtaPos_ [protected] |
Definition at line 407 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TProfile* HParticle::hCurvVsPhiNeg_ [protected] |
Definition at line 408 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TProfile* HParticle::hCurvVsPhiPos_ [protected] |
Definition at line 409 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH1F* HParticle::hEta_ [protected] |
Definition at line 414 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH1F* HParticle::hMass_ [protected] |
Definition at line 416 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH1F* HParticle::hNumber_ [protected] |
Definition at line 418 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH1F* HParticle::hPhi_ [protected] |
Definition at line 415 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH1F* HParticle::hPt_ [protected] |
Definition at line 403 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TH2F* HParticle::hPtVsEta_ [protected] |
Definition at line 404 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TProfile* HParticle::hPtVsPhiNeg_ [protected] |
Definition at line 411 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().
TProfile* HParticle::hPtVsPhiPos_ [protected] |
Definition at line 412 of file Histograms.h.
Referenced by Clear(), Fill(), HParticle(), Write(), and ~HParticle().