CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
HDelta Class Reference

#include <Histograms.h>

Inheritance diagram for HDelta:
Histograms

Public Member Functions

virtual void Clear ()
 
virtual void Fill (const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2)
 
virtual void Fill (const CLHEP::HepLorentzVector &p1, const reco::Particle::LorentzVector &p2)
 
virtual void Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2)
 
 HDelta (const TString &name)
 
 HDelta (TFile *outputFile, const TString &name)
 
 HDelta (const TString &name, TFile *file)
 
virtual void Write ()
 
 ~HDelta ()
 
- Public Member Functions inherited from Histograms
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, const int charge, const double &weight=1.)
 
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)
 
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 ()
 

Public Attributes

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

Additional Inherited Members

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

Detailed Description

Definition at line 422 of file Histograms.h.

Constructor & Destructor Documentation

HDelta::HDelta ( const TString &  name)
inline

Definition at line 425 of file Histograms.h.

425  :
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 ) )
435  {}
TH1F * hCotgTheta_
Definition: Histograms.h:516
TH1F * hEtaSign_
Definition: Histograms.h:513
TH1F * hEta_
Definition: Histograms.h:512
TH1F * hDeltaR_
Definition: Histograms.h:517
TH1F * hTheta_
Definition: Histograms.h:515
TH1F * hPhi_
Definition: Histograms.h:514
HDelta::HDelta ( TFile *  outputFile,
const TString &  name 
)
inline

Definition at line 437 of file Histograms.h.

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

Definition at line 449 of file Histograms.h.

References hCotgTheta_, hDeltaR_, hEta_, hEtaSign_, hPhi_, hTheta_, mergeVDriftHistosByStation::name, and Histograms::name_.

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

Definition at line 459 of file Histograms.h.

References hCotgTheta_, hDeltaR_, hEta_, hEtaSign_, hPhi_, and hTheta_.

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

Member Function Documentation

virtual void HDelta::Clear ( )
inlinevirtual

Implements Histograms.

Definition at line 502 of file Histograms.h.

References hCotgTheta_, hDeltaR_, hEta_, hEtaSign_, hPhi_, and hTheta_.

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

Reimplemented from Histograms.

Definition at line 468 of file Histograms.h.

Referenced by Fill().

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

Reimplemented from Histograms.

Definition at line 473 of file Histograms.h.

References Fill().

473  {
474  Fill (p1,CLHEP::HepLorentzVector(p2.x(),p2.y(),p2.z(),p2.t()));
475  }
virtual void Fill(const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2)
Definition: Histograms.h:468
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
virtual void HDelta::Fill ( const CLHEP::HepLorentzVector &  momentum1,
const CLHEP::HepLorentzVector &  momentum2 
)
inlinevirtual

Reimplemented from Histograms.

Definition at line 477 of file Histograms.h.

References MuScleFitUtils::deltaPhi(), hCotgTheta_, hDeltaR_, hEta_, hEtaSign_, hPhi_, hTheta_, and mathSSE::sqrt().

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

Implements Histograms.

Definition at line 491 of file Histograms.h.

References hCotgTheta_, hDeltaR_, hEta_, hEtaSign_, Histograms::histoDir_, hPhi_, and hTheta_.

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

Member Data Documentation

TH1F* HDelta::hCotgTheta_

Definition at line 516 of file Histograms.h.

Referenced by Clear(), Fill(), HDelta(), Write(), and ~HDelta().

TH1F* HDelta::hDeltaR_

Definition at line 517 of file Histograms.h.

Referenced by Clear(), Fill(), HDelta(), Write(), and ~HDelta().

TH1F* HDelta::hEta_

Definition at line 512 of file Histograms.h.

Referenced by Clear(), Fill(), HDelta(), Write(), and ~HDelta().

TH1F* HDelta::hEtaSign_

Definition at line 513 of file Histograms.h.

Referenced by Clear(), Fill(), HDelta(), Write(), and ~HDelta().

TH1F* HDelta::hPhi_

Definition at line 514 of file Histograms.h.

Referenced by Clear(), Fill(), HDelta(), Write(), and ~HDelta().

TH1F* HDelta::hTheta_

Definition at line 515 of file Histograms.h.

Referenced by Clear(), Fill(), HDelta(), Write(), and ~HDelta().