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

Constructor & Destructor Documentation

HDelta::HDelta ( const TString &  name)
inline

Definition at line 330 of file Histograms.h.

330  :
331  Histograms(name),
332  // Kinematical variables
333  // ---------------------
334  hEta_( new TH1F (name+"_DeltaEta", "#Delta#eta", 100, 0, 6) ),
335  hEtaSign_( new TH1F (name+"_DeltaEtaSign", "#Delta#eta with sign", 100, -6, 6) ),
336  hPhi_( new TH1F (name+"_DeltaPhi", "#Delta#phi", 100,0,3.2) ),
337  hTheta_( new TH1F (name+"_DeltaTheta", "#Delta#theta", 100,-3.2,3.2) ),
338  hCotgTheta_( new TH1F (name+"_DeltaCotgTheta", "#Delta Cotg(#theta )", 100,-3.2,3.2) ),
339  hDeltaR_( new TH1F (name+"_DeltaR","#Delta R", 400, 0, 4 ) )
340  {}
TH1F * hCotgTheta_
Definition: Histograms.h:421
TH1F * hEtaSign_
Definition: Histograms.h:418
TH1F * hEta_
Definition: Histograms.h:417
TH1F * hDeltaR_
Definition: Histograms.h:422
TH1F * hTheta_
Definition: Histograms.h:420
TH1F * hPhi_
Definition: Histograms.h:419
HDelta::HDelta ( TFile *  outputFile,
const TString &  name 
)
inline

Definition at line 342 of file Histograms.h.

342  :
344  // Kinematical variables
345  // ---------------------
346  hEta_( new TH1F (name+"_DeltaEta", "#Delta#eta", 100, 0, 6) ),
347  hEtaSign_( new TH1F (name+"_DeltaEtaSign", "#Delta#eta with sign", 100, -6, 6) ),
348  hPhi_( new TH1F (name+"_DeltaPhi", "#Delta#phi", 100,0,3.2) ),
349  hTheta_( new TH1F (name+"_DeltaTheta", "#Delta#theta", 100,-3.2,3.2) ),
350  hCotgTheta_( new TH1F (name+"_DeltaCotgTheta", "#Delta Cotg(#theta )", 100,-3.2,3.2) ),
351  hDeltaR_( new TH1F (name+"_DeltaR","#DeltaR", 400, 0, 4 ) )
352  {}
TH1F * hCotgTheta_
Definition: Histograms.h:421
TH1F * hEtaSign_
Definition: Histograms.h:418
TH1F * hEta_
Definition: Histograms.h:417
TH1F * hDeltaR_
Definition: Histograms.h:422
TH1F * hTheta_
Definition: Histograms.h:420
TH1F * hPhi_
Definition: Histograms.h:419
HDelta::HDelta ( const TString &  name,
TFile *  file 
)
inline

Definition at line 354 of file Histograms.h.

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

354  {
355  name_ = name;
356  hEta_ = (TH1F *) file->Get(name+"_DeltaEta");
357  hEtaSign_ = (TH1F *) file->Get(name+"_DeltaEtaSign");
358  hPhi_ = (TH1F *) file->Get(name+"_DeltaPhi");
359  hTheta_ = (TH1F *) file->Get(name+"_DeltaTheta");
360  hCotgTheta_ = (TH1F *) file->Get(name+"_DeltaCotgTheta");
361  hDeltaR_ = (TH1F *) file->Get(name+"_DeltaR");
362  }
TH1F * hCotgTheta_
Definition: Histograms.h:421
TH1F * hEtaSign_
Definition: Histograms.h:418
TString name_
Definition: Histograms.h:106
TH1F * hEta_
Definition: Histograms.h:417
TH1F * hDeltaR_
Definition: Histograms.h:422
TH1F * hTheta_
Definition: Histograms.h:420
TH1F * hPhi_
Definition: Histograms.h:419
HDelta::~HDelta ( )
inline

Definition at line 364 of file Histograms.h.

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

364  {
365  delete hEta_;
366  delete hEtaSign_;
367  delete hPhi_;
368  delete hTheta_;
369  delete hCotgTheta_;
370  delete hDeltaR_;
371  }
TH1F * hCotgTheta_
Definition: Histograms.h:421
TH1F * hEtaSign_
Definition: Histograms.h:418
TH1F * hEta_
Definition: Histograms.h:417
TH1F * hDeltaR_
Definition: Histograms.h:422
TH1F * hTheta_
Definition: Histograms.h:420
TH1F * hPhi_
Definition: Histograms.h:419

Member Function Documentation

virtual void HDelta::Clear ( )
inlinevirtual

Implements Histograms.

Definition at line 407 of file Histograms.h.

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

407  {
408  hEta_->Clear();
409  hEtaSign_->Clear();
410  hPhi_->Clear();
411  hTheta_->Clear();
412  hDeltaR_->Clear();
413  hCotgTheta_->Clear();
414  }
TH1F * hCotgTheta_
Definition: Histograms.h:421
TH1F * hEtaSign_
Definition: Histograms.h:418
TH1F * hEta_
Definition: Histograms.h:417
TH1F * hDeltaR_
Definition: Histograms.h:422
TH1F * hTheta_
Definition: Histograms.h:420
TH1F * hPhi_
Definition: Histograms.h:419
virtual void HDelta::Fill ( const reco::Particle::LorentzVector p1,
const reco::Particle::LorentzVector p2 
)
inlinevirtual

Reimplemented from Histograms.

Definition at line 373 of file Histograms.h.

Referenced by Fill().

373  {
374  Fill (CLHEP::HepLorentzVector(p1.x(),p1.y(),p1.z(),p1.t()),
375  CLHEP::HepLorentzVector(p2.x(),p2.y(),p2.z(),p2.t()));
376  }
virtual void Fill(const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2)
Definition: Histograms.h:373
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 378 of file Histograms.h.

References Fill().

378  {
379  Fill (p1,CLHEP::HepLorentzVector(p2.x(),p2.y(),p2.z(),p2.t()));
380  }
virtual void Fill(const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2)
Definition: Histograms.h:373
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 382 of file Histograms.h.

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

382  {
383  hEta_->Fill(fabs( momentum1.eta()-momentum2.eta() ));
384  hEtaSign_->Fill(momentum1.eta()-momentum2.eta());
385  hPhi_->Fill(MuScleFitUtils::deltaPhi(momentum1.phi(),momentum2.phi()));
386  hTheta_->Fill(momentum1.theta()-momentum2.theta());
387  // hCotgTheta->Fill(1/(TMath::Tan(momentum1.theta()))-1/(TMath::Tan(momentum2.theta())));
388  double theta1 = momentum1.theta();
389  double theta2 = momentum2.theta();
390  hCotgTheta_->Fill(TMath::Cos(theta1)/TMath::Sin(theta1) - TMath::Cos(theta2)/TMath::Sin(theta2));
391  hDeltaR_->Fill(sqrt((momentum1.eta()-momentum2.eta())*(momentum1.eta()-momentum2.eta()) +
392  (MuScleFitUtils::deltaPhi(momentum1.phi(),momentum2.phi()))*
393  (MuScleFitUtils::deltaPhi(momentum1.phi(),momentum2.phi()))));
394  }
TH1F * hCotgTheta_
Definition: Histograms.h:421
TH1F * hEtaSign_
Definition: Histograms.h:418
TH1F * hEta_
Definition: Histograms.h:417
T sqrt(T t)
Definition: SSEVec.h:28
TH1F * hDeltaR_
Definition: Histograms.h:422
TH1F * hTheta_
Definition: Histograms.h:420
static double deltaPhi(const double &phi1, const double &phi2)
TH1F * hPhi_
Definition: Histograms.h:419
virtual void HDelta::Write ( )
inlinevirtual

Implements Histograms.

Definition at line 396 of file Histograms.h.

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

396  {
397  if(histoDir_ != 0) histoDir_->cd();
398 
399  hEta_->Write();
400  hEtaSign_->Write();
401  hPhi_->Write();
402  hTheta_->Write();
403  hCotgTheta_->Write();
404  hDeltaR_->Write();
405  }
TH1F * hCotgTheta_
Definition: Histograms.h:421
TH1F * hEtaSign_
Definition: Histograms.h:418
TH1F * hEta_
Definition: Histograms.h:417
TDirectory * histoDir_
Definition: Histograms.h:108
TH1F * hDeltaR_
Definition: Histograms.h:422
TH1F * hTheta_
Definition: Histograms.h:420
TH1F * hPhi_
Definition: Histograms.h:419

Member Data Documentation

TH1F* HDelta::hCotgTheta_

Definition at line 421 of file Histograms.h.

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

TH1F* HDelta::hDeltaR_

Definition at line 422 of file Histograms.h.

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

TH1F* HDelta::hEta_

Definition at line 417 of file Histograms.h.

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

TH1F* HDelta::hEtaSign_

Definition at line 418 of file Histograms.h.

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

TH1F* HDelta::hPhi_

Definition at line 419 of file Histograms.h.

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

TH1F* HDelta::hTheta_

Definition at line 420 of file Histograms.h.

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