CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
HDelta Class Reference

#include <Histograms.h>

Inherits Histograms.

Public Member Functions

void Clear () override
 
void Fill (const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2) override
 
void Fill (const CLHEP::HepLorentzVector &p1, const reco::Particle::LorentzVector &p2) override
 
void Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2) override
 
 HDelta (const TString &name)
 
 HDelta (TFile *outputFile, const TString &name)
 
 HDelta (const TString &name, TFile *file)
 
void Write () override
 
 ~HDelta () override
 

Public Attributes

TH1F * hCotgTheta_
 
TH1F * hDeltaR_
 
TH1F * hEta_
 
TH1F * hEtaSign_
 
TH1F * hPhi_
 
TH1F * hTheta_
 

Detailed Description

Definition at line 423 of file Histograms.h.

Constructor & Destructor Documentation

HDelta::HDelta ( const TString &  name)
inline

Definition at line 425 of file Histograms.h.

426  : Histograms(name),
427  // Kinematical variables
428  // ---------------------
429  hEta_(new TH1F(name + "_DeltaEta", "#Delta#eta", 100, 0, 6)),
430  hEtaSign_(new TH1F(name + "_DeltaEtaSign", "#Delta#eta with sign", 100, -6, 6)),
431  hPhi_(new TH1F(name + "_DeltaPhi", "#Delta#phi", 100, 0, 3.2)),
432  hTheta_(new TH1F(name + "_DeltaTheta", "#Delta#theta", 100, -3.2, 3.2)),
433  hCotgTheta_(new TH1F(name + "_DeltaCotgTheta", "#Delta Cotg(#theta )", 100, -3.2, 3.2)),
434  hDeltaR_(new TH1F(name + "_DeltaR", "#Delta R", 400, 0, 4)) {}
TH1F * hCotgTheta_
Definition: Histograms.h:515
TH1F * hEtaSign_
Definition: Histograms.h:512
TH1F * hEta_
Definition: Histograms.h:511
TH1F * hDeltaR_
Definition: Histograms.h:516
TH1F * hTheta_
Definition: Histograms.h:514
TH1F * hPhi_
Definition: Histograms.h:513
HDelta::HDelta ( TFile *  outputFile,
const TString &  name 
)
inline

Definition at line 436 of file Histograms.h.

437  : Histograms(outputFile, name),
438  // Kinematical variables
439  // ---------------------
440  hEta_(new TH1F(name + "_DeltaEta", "#Delta#eta", 100, 0, 6)),
441  hEtaSign_(new TH1F(name + "_DeltaEtaSign", "#Delta#eta with sign", 100, -6, 6)),
442  hPhi_(new TH1F(name + "_DeltaPhi", "#Delta#phi", 100, 0, 3.2)),
443  hTheta_(new TH1F(name + "_DeltaTheta", "#Delta#theta", 100, -3.2, 3.2)),
444  hCotgTheta_(new TH1F(name + "_DeltaCotgTheta", "#Delta Cotg(#theta )", 100, -3.2, 3.2)),
445  hDeltaR_(new TH1F(name + "_DeltaR", "#DeltaR", 400, 0, 4)) {}
TH1F * hCotgTheta_
Definition: Histograms.h:515
TH1F * hEtaSign_
Definition: Histograms.h:512
TH1F * hEta_
Definition: Histograms.h:511
TH1F * hDeltaR_
Definition: Histograms.h:516
TH1F * hTheta_
Definition: Histograms.h:514
TH1F * hPhi_
Definition: Histograms.h:513
HDelta::HDelta ( const TString &  name,
TFile *  file 
)
inline

Definition at line 447 of file Histograms.h.

References Skims_PA_cff::name.

447  {
448  name_ = name;
449  hEta_ = (TH1F*)file->Get(name + "_DeltaEta");
450  hEtaSign_ = (TH1F*)file->Get(name + "_DeltaEtaSign");
451  hPhi_ = (TH1F*)file->Get(name + "_DeltaPhi");
452  hTheta_ = (TH1F*)file->Get(name + "_DeltaTheta");
453  hCotgTheta_ = (TH1F*)file->Get(name + "_DeltaCotgTheta");
454  hDeltaR_ = (TH1F*)file->Get(name + "_DeltaR");
455  }
TH1F * hCotgTheta_
Definition: Histograms.h:515
TH1F * hEtaSign_
Definition: Histograms.h:512
TH1F * hEta_
Definition: Histograms.h:511
TH1F * hDeltaR_
Definition: Histograms.h:516
TH1F * hTheta_
Definition: Histograms.h:514
TH1F * hPhi_
Definition: Histograms.h:513
HDelta::~HDelta ( )
inlineoverride

Definition at line 457 of file Histograms.h.

457  {
458  delete hEta_;
459  delete hEtaSign_;
460  delete hPhi_;
461  delete hTheta_;
462  delete hCotgTheta_;
463  delete hDeltaR_;
464  }
TH1F * hCotgTheta_
Definition: Histograms.h:515
TH1F * hEtaSign_
Definition: Histograms.h:512
TH1F * hEta_
Definition: Histograms.h:511
TH1F * hDeltaR_
Definition: Histograms.h:516
TH1F * hTheta_
Definition: Histograms.h:514
TH1F * hPhi_
Definition: Histograms.h:513

Member Function Documentation

void HDelta::Clear ( )
inlineoverride

Definition at line 501 of file Histograms.h.

501  {
502  hEta_->Clear();
503  hEtaSign_->Clear();
504  hPhi_->Clear();
505  hTheta_->Clear();
506  hDeltaR_->Clear();
507  hCotgTheta_->Clear();
508  }
TH1F * hCotgTheta_
Definition: Histograms.h:515
TH1F * hEtaSign_
Definition: Histograms.h:512
TH1F * hEta_
Definition: Histograms.h:511
TH1F * hDeltaR_
Definition: Histograms.h:516
TH1F * hTheta_
Definition: Histograms.h:514
TH1F * hPhi_
Definition: Histograms.h:513
void HDelta::Fill ( const reco::Particle::LorentzVector p1,
const reco::Particle::LorentzVector p2 
)
inlineoverride

Definition at line 466 of file Histograms.h.

References HcalObjRepresent::Fill().

466  {
467  Fill(CLHEP::HepLorentzVector(p1.x(), p1.y(), p1.z(), p1.t()),
468  CLHEP::HepLorentzVector(p2.x(), p2.y(), p2.z(), p2.t()));
469  }
void Fill(const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2) override
Definition: Histograms.h:466
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
void HDelta::Fill ( const CLHEP::HepLorentzVector &  p1,
const reco::Particle::LorentzVector p2 
)
inlineoverride

Definition at line 471 of file Histograms.h.

References HcalObjRepresent::Fill().

471  {
472  Fill(p1, CLHEP::HepLorentzVector(p2.x(), p2.y(), p2.z(), p2.t()));
473  }
void Fill(const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2) override
Definition: Histograms.h:466
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
void HDelta::Fill ( const CLHEP::HepLorentzVector &  momentum1,
const CLHEP::HepLorentzVector &  momentum2 
)
inlineoverride

Definition at line 475 of file Histograms.h.

References MuScleFitUtils::deltaPhi(), and mathSSE::sqrt().

475  {
476  hEta_->Fill(fabs(momentum1.eta() - momentum2.eta()));
477  hEtaSign_->Fill(momentum1.eta() - momentum2.eta());
478  hPhi_->Fill(MuScleFitUtils::deltaPhi(momentum1.phi(), momentum2.phi()));
479  hTheta_->Fill(momentum1.theta() - momentum2.theta());
480  // hCotgTheta->Fill(1/(TMath::Tan(momentum1.theta()))-1/(TMath::Tan(momentum2.theta())));
481  double theta1 = momentum1.theta();
482  double theta2 = momentum2.theta();
483  hCotgTheta_->Fill(TMath::Cos(theta1) / TMath::Sin(theta1) - TMath::Cos(theta2) / TMath::Sin(theta2));
484  hDeltaR_->Fill(sqrt((momentum1.eta() - momentum2.eta()) * (momentum1.eta() - momentum2.eta()) +
485  (MuScleFitUtils::deltaPhi(momentum1.phi(), momentum2.phi())) *
486  (MuScleFitUtils::deltaPhi(momentum1.phi(), momentum2.phi()))));
487  }
TH1F * hCotgTheta_
Definition: Histograms.h:515
TH1F * hEtaSign_
Definition: Histograms.h:512
TH1F * hEta_
Definition: Histograms.h:511
T sqrt(T t)
Definition: SSEVec.h:19
TH1F * hDeltaR_
Definition: Histograms.h:516
TH1F * hTheta_
Definition: Histograms.h:514
static double deltaPhi(const double &phi1, const double &phi2)
TH1F * hPhi_
Definition: Histograms.h:513
void HDelta::Write ( )
inlineoverride

Definition at line 489 of file Histograms.h.

489  {
490  if (histoDir_ != nullptr)
491  histoDir_->cd();
492 
493  hEta_->Write();
494  hEtaSign_->Write();
495  hPhi_->Write();
496  hTheta_->Write();
497  hCotgTheta_->Write();
498  hDeltaR_->Write();
499  }
TH1F * hCotgTheta_
Definition: Histograms.h:515
TH1F * hEtaSign_
Definition: Histograms.h:512
TH1F * hEta_
Definition: Histograms.h:511
TH1F * hDeltaR_
Definition: Histograms.h:516
TH1F * hTheta_
Definition: Histograms.h:514
TH1F * hPhi_
Definition: Histograms.h:513

Member Data Documentation

TH1F* HDelta::hCotgTheta_

Definition at line 515 of file Histograms.h.

TH1F* HDelta::hDeltaR_

Definition at line 516 of file Histograms.h.

TH1F* HDelta::hEta_

Definition at line 511 of file Histograms.h.

TH1F* HDelta::hEtaSign_

Definition at line 512 of file Histograms.h.

TH1F* HDelta::hPhi_

Definition at line 513 of file Histograms.h.

TH1F* HDelta::hTheta_

Definition at line 514 of file Histograms.h.