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 423 of file Histograms.h.

Constructor & Destructor Documentation

HDelta::HDelta ( const TString &  name)
inline

Definition at line 426 of file Histograms.h.

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

Definition at line 438 of file Histograms.h.

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

Definition at line 450 of file Histograms.h.

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

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

Definition at line 460 of file Histograms.h.

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

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

Member Function Documentation

virtual void HDelta::Clear ( )
inlinevirtual

Implements Histograms.

Definition at line 503 of file Histograms.h.

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

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

Reimplemented from Histograms.

Definition at line 469 of file Histograms.h.

Referenced by Fill().

469  {
470  Fill (CLHEP::HepLorentzVector(p1.x(),p1.y(),p1.z(),p1.t()),
471  CLHEP::HepLorentzVector(p2.x(),p2.y(),p2.z(),p2.t()));
472  }
virtual void Fill(const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2)
Definition: Histograms.h:469
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 474 of file Histograms.h.

References Fill().

474  {
475  Fill (p1,CLHEP::HepLorentzVector(p2.x(),p2.y(),p2.z(),p2.t()));
476  }
virtual void Fill(const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2)
Definition: Histograms.h:469
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 478 of file Histograms.h.

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

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

Implements Histograms.

Definition at line 492 of file Histograms.h.

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

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

Member Data Documentation

TH1F* HDelta::hCotgTheta_

Definition at line 517 of file Histograms.h.

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

TH1F* HDelta::hDeltaR_

Definition at line 518 of file Histograms.h.

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

TH1F* HDelta::hEta_

Definition at line 513 of file Histograms.h.

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

TH1F* HDelta::hEtaSign_

Definition at line 514 of file Histograms.h.

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

TH1F* HDelta::hPhi_

Definition at line 515 of file Histograms.h.

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

TH1F* HDelta::hTheta_

Definition at line 516 of file Histograms.h.

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