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
void declareHistograms ()
 
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.)
 
void fillEventInfo (int proc, int strk, int ntrkr)
 
void fillRecHistograms (const RecTrack_t &r)
 
void fillSimHistograms (const SimTrack_t &s)
 
void fillVzeroHistograms (const RecVzero_t &r, int part)
 
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)
 
 Histograms (const edm::ParameterSet &pset)
 
virtual void SetWeight (double weight)
 
void writeHistograms ()
 
virtual ~Histograms ()
 
 ~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 424 of file Histograms.h.

Constructor & Destructor Documentation

HDelta::HDelta ( const TString &  name)
inline

Definition at line 427 of file Histograms.h.

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

Definition at line 439 of file Histograms.h.

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

Definition at line 451 of file Histograms.h.

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

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

Definition at line 461 of file Histograms.h.

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

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

Member Function Documentation

virtual void HDelta::Clear ( )
inlinevirtual

Implements Histograms.

Definition at line 504 of file Histograms.h.

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

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

Reimplemented from Histograms.

Definition at line 470 of file Histograms.h.

Referenced by Fill().

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

References Fill().

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

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

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

Implements Histograms.

Definition at line 493 of file Histograms.h.

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

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

Member Data Documentation

TH1F* HDelta::hCotgTheta_

Definition at line 518 of file Histograms.h.

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

TH1F* HDelta::hDeltaR_

Definition at line 519 of file Histograms.h.

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

TH1F* HDelta::hEta_

Definition at line 514 of file Histograms.h.

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

TH1F* HDelta::hEtaSign_

Definition at line 515 of file Histograms.h.

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

TH1F* HDelta::hPhi_

Definition at line 516 of file Histograms.h.

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

TH1F* HDelta::hTheta_

Definition at line 517 of file Histograms.h.

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