CMS 3D CMS Logo

Public Member Functions | Protected Attributes

HMassVSPartProfile Class Reference

#include <Histograms.h>

Inheritance diagram for HMassVSPartProfile:
Histograms

List of all members.

Public Member Functions

virtual void Clear ()
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 &p41, const reco::Particle::LorentzVector &p42, const int charge, const double &weight=1.)
 HMassVSPartProfile (const TString &name, const double &minMass=0., const double &maxMass=150., const double maxPt=100.)
 HMassVSPartProfile (const TString &name, TFile *file)
virtual void Write ()
 ~HMassVSPartProfile ()

Protected Attributes

TProfile2D * hMassVSEta_
TProfile2D * hMassVSPhiMinus_
TProfile2D * hMassVSPhiPlus_
TProfile2D * hMassVSPt_

Detailed Description

Definition at line 785 of file Histograms.h.


Constructor & Destructor Documentation

HMassVSPartProfile::HMassVSPartProfile ( const TString &  name,
const double &  minMass = 0.,
const double &  maxMass = 150.,
const double  maxPt = 100. 
) [inline]

Definition at line 788 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, mergeVDriftHistosByStation::name, and Histograms::name_.

                                                                                                                                    {
    name_ = name;

    // Kinematical variables
    // ---------------------
    hMassVSPt_       = new TProfile2D( name+"_MassVSPt", "resonance mass vs muon transverse momentum", 200, 0., maxPt, 6000, minMass, maxMass, 0., 100. );
    hMassVSEta_      = new TProfile2D( name+"_MassVSEta", "resonance mass vs muon pseudorapidity", 60, -6., 6., 6000, minMass, maxMass, 0., 100. );
    hMassVSPhiPlus_  = new TProfile2D( name+"_MassVSPhiPlus", "resonance mass vs muon+ phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass, 0., 100. );
    hMassVSPhiMinus_ = new TProfile2D( name+"_MassVSPhiMinus", "resonance mass vs muon- phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass, 0., 100. );
   }
HMassVSPartProfile::HMassVSPartProfile ( const TString &  name,
TFile *  file 
) [inline]

Definition at line 799 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, mergeVDriftHistosByStation::name, and Histograms::name_.

                                                       {
    name_=name;
    hMassVSPt_       = (TProfile2D *) file->Get(name+"_MassVSPt");
    hMassVSEta_      = (TProfile2D *) file->Get(name+"_MassVSEta");
    hMassVSPhiPlus_  = (TProfile2D *) file->Get(name+"_MassVSPhiPlus");
    hMassVSPhiMinus_ = (TProfile2D *) file->Get(name+"_MassVSPhiMinus");
  }
HMassVSPartProfile::~HMassVSPartProfile ( ) [inline]

Definition at line 807 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

                       {
    delete hMassVSPt_;
    delete hMassVSEta_;
    delete hMassVSPhiPlus_;
    delete hMassVSPhiMinus_;
  }

Member Function Documentation

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

Implements Histograms.

Definition at line 841 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

                       {
    hMassVSPt_->Clear();
    hMassVSEta_->Clear();    
    hMassVSPhiPlus_->Clear();
    hMassVSPhiMinus_->Clear();
  }
virtual void HMassVSPartProfile::Fill ( const CLHEP::HepLorentzVector &  momentum1,
const CLHEP::HepLorentzVector &  momentum2,
const int  charge,
const double &  weight = 1. 
) [inline, virtual]

Reimplemented from Histograms.

Definition at line 819 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, hMassVSPt_, LogDebug, and CommonMethods::weight().

                                                                                                                                                    { 
    hMassVSPt_->Fill(momentum1.perp(),momentum2.m(), weight); 
    hMassVSEta_->Fill(momentum1.eta(),momentum2.m(), weight); 
    if(charge>0){
      hMassVSPhiPlus_->Fill(momentum1.phi(), momentum2.m(), weight);
    }
    else if(charge<0){
      hMassVSPhiMinus_->Fill(momentum1.phi(), momentum2.m(), weight);
    }
    else {
      LogDebug("Histograms") << "HMassVSPartProfile: wrong charge value = " << charge << std::endl;
      abort();
    }
  }
virtual void HMassVSPartProfile::Fill ( const reco::Particle::LorentzVector p41,
const reco::Particle::LorentzVector p42,
const int  charge,
const double &  weight = 1. 
) [inline, virtual]

Reimplemented from Histograms.

Definition at line 814 of file Histograms.h.

References CommonMethods::weight().

                                                                                                                                                {
    Fill(CLHEP::HepLorentzVector(p41.x(),p41.y(),p41.z(),p41.t()),
         CLHEP::HepLorentzVector(p42.x(),p42.y(),p42.z(),p42.t()), charge, weight);
  }
virtual void HMassVSPartProfile::Write ( ) [inline, virtual]

Implements Histograms.

Definition at line 834 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

                       {
    hMassVSPt_->Write();
    hMassVSEta_->Write();
    hMassVSPhiPlus_->Write();
    hMassVSPhiMinus_->Write();
  }

Member Data Documentation

TProfile2D* HMassVSPartProfile::hMassVSEta_ [protected]

Definition at line 850 of file Histograms.h.

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

TProfile2D* HMassVSPartProfile::hMassVSPhiMinus_ [protected]

Definition at line 852 of file Histograms.h.

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

TProfile2D* HMassVSPartProfile::hMassVSPhiPlus_ [protected]

Definition at line 851 of file Histograms.h.

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

TProfile2D* HMassVSPartProfile::hMassVSPt_ [protected]

Definition at line 849 of file Histograms.h.

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