CMS 3D CMS Logo

Public Member Functions | Public Attributes

HDelta Class Reference

#include <Histograms.h>

Inheritance diagram for HDelta:
Histograms

List of all members.

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 Attributes

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

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.

                                :
    Histograms(name),
    // Kinematical variables
    // ---------------------
    hEta_( new TH1F (name+"_DeltaEta", "#Delta#eta", 100, 0, 6) ),
    hEtaSign_( new TH1F (name+"_DeltaEtaSign", "#Delta#eta with sign", 100, -6, 6) ),
    hPhi_( new TH1F (name+"_DeltaPhi", "#Delta#phi", 100,0,3.2) ),
    hTheta_( new TH1F (name+"_DeltaTheta", "#Delta#theta", 100,-3.2,3.2) ),
    hCotgTheta_( new TH1F (name+"_DeltaCotgTheta", "#Delta Cotg(#theta )", 100,-3.2,3.2) ),
    hDeltaR_( new TH1F (name+"_DeltaR","#Delta R", 400, 0, 4 ) )
  {}
HDelta::HDelta ( TFile *  outputFile,
const TString &  name 
) [inline]

Definition at line 439 of file Histograms.h.

                                                   :
    Histograms(outputFile, name),
    // Kinematical variables
    // ---------------------
    hEta_( new TH1F (name+"_DeltaEta", "#Delta#eta", 100, 0, 6) ),
    hEtaSign_( new TH1F (name+"_DeltaEtaSign", "#Delta#eta with sign", 100, -6, 6) ),
    hPhi_( new TH1F (name+"_DeltaPhi", "#Delta#phi", 100,0,3.2) ),
    hTheta_( new TH1F (name+"_DeltaTheta", "#Delta#theta", 100,-3.2,3.2) ),
    hCotgTheta_( new TH1F (name+"_DeltaCotgTheta", "#Delta Cotg(#theta )", 100,-3.2,3.2) ),
    hDeltaR_( new TH1F (name+"_DeltaR","#DeltaR", 400, 0, 4 ) )
  {}
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_.

                                             {
    name_ = name;
    hEta_       = (TH1F *) file->Get(name+"_DeltaEta");
    hEtaSign_   = (TH1F *) file->Get(name+"_DeltaEtaSign");
    hPhi_       = (TH1F *) file->Get(name+"_DeltaPhi");
    hTheta_     = (TH1F *) file->Get(name+"_DeltaTheta");
    hCotgTheta_ = (TH1F *) file->Get(name+"_DeltaCotgTheta");
    hDeltaR_    = (TH1F *) file->Get(name+"_DeltaR");
   }
HDelta::~HDelta ( ) [inline]

Definition at line 461 of file Histograms.h.

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

            {
    delete hEta_;
    delete hEtaSign_;
    delete hPhi_;
    delete hTheta_;
    delete hCotgTheta_;
    delete hDeltaR_;
  }

Member Function Documentation

virtual void HDelta::Clear ( ) [inline, virtual]

Implements Histograms.

Definition at line 504 of file Histograms.h.

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

                       {
    hEta_->Clear();
    hEtaSign_->Clear();
    hPhi_->Clear();
    hTheta_->Clear();
    hDeltaR_->Clear();
    hCotgTheta_->Clear();
  }
virtual void HDelta::Fill ( const CLHEP::HepLorentzVector &  p1,
const reco::Particle::LorentzVector p2 
) [inline, virtual]

Reimplemented from Histograms.

Definition at line 475 of file Histograms.h.

References Fill().

                                                                                             {
    Fill (p1,CLHEP::HepLorentzVector(p2.x(),p2.y(),p2.z(),p2.t()));
  }
virtual void HDelta::Fill ( const reco::Particle::LorentzVector p1,
const reco::Particle::LorentzVector p2 
) [inline, virtual]

Reimplemented from Histograms.

Definition at line 470 of file Histograms.h.

Referenced by Fill().

                                                                                                 {
    Fill (CLHEP::HepLorentzVector(p1.x(),p1.y(),p1.z(),p1.t()), 
          CLHEP::HepLorentzVector(p2.x(),p2.y(),p2.z(),p2.t()));
  }
virtual void HDelta::Fill ( const CLHEP::HepLorentzVector &  momentum1,
const CLHEP::HepLorentzVector &  momentum2 
) [inline, virtual]

Reimplemented from Histograms.

Definition at line 479 of file Histograms.h.

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

                                                                                                       {
    hEta_->Fill(fabs( momentum1.eta()-momentum2.eta() ));
    hEtaSign_->Fill(momentum1.eta()-momentum2.eta());
    hPhi_->Fill(MuScleFitUtils::deltaPhi(momentum1.phi(),momentum2.phi()));
    hTheta_->Fill(momentum1.theta()-momentum2.theta());
    // hCotgTheta->Fill(1/(TMath::Tan(momentum1.theta()))-1/(TMath::Tan(momentum2.theta())));
    double theta1 = momentum1.theta();
    double theta2 = momentum2.theta();
    hCotgTheta_->Fill(TMath::Cos(theta1)/TMath::Sin(theta1) - TMath::Cos(theta2)/TMath::Sin(theta2));
    hDeltaR_->Fill(sqrt((momentum1.eta()-momentum2.eta())*(momentum1.eta()-momentum2.eta()) +
                        (MuScleFitUtils::deltaPhi(momentum1.phi(),momentum2.phi()))*
                        (MuScleFitUtils::deltaPhi(momentum1.phi(),momentum2.phi()))));
  }
virtual void HDelta::Write ( ) [inline, virtual]

Implements Histograms.

Definition at line 493 of file Histograms.h.

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

                       {
    if(histoDir_ != 0) histoDir_->cd();

    hEta_->Write();
    hEtaSign_->Write();
    hPhi_->Write();
    hTheta_->Write();
    hCotgTheta_->Write();
    hDeltaR_->Write();
  }

Member Data Documentation

Definition at line 518 of file Histograms.h.

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

Definition at line 519 of file Histograms.h.

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

Definition at line 514 of file Histograms.h.

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

Definition at line 515 of file Histograms.h.

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

Definition at line 516 of file Histograms.h.

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

Definition at line 517 of file Histograms.h.

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