CMS 3D CMS Logo

Public Member Functions | Protected Attributes

HMassVSPart Class Reference

#include <Histograms.h>

Inheritance diagram for HMassVSPart:
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.)
 HMassVSPart (const TString &name, const double &minMass=0., const double &maxMass=150., const double maxPt=100.)
 HMassVSPart (const TString &name, TFile *file)
virtual void Write ()
 ~HMassVSPart ()

Protected Attributes

TH2F * hMassVSEta_
TH2F * hMassVSPhiMinus_
TH2F * hMassVSPhiPlus_
TH2F * hMassVSPt_

Detailed Description

Definition at line 688 of file Histograms.h.


Constructor & Destructor Documentation

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

Definition at line 691 of file Histograms.h.

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

                                                                                                                             {
    name_ = name;

    // Kinematical variables
    // ---------------------
    hMassVSPt_       = new TH2F( name+"_MassVSPt", "resonance mass vs muon transverse momentum", 200, 0., maxPt, 6000, minMass, maxMass );
    hMassVSEta_      = new TH2F( name+"_MassVSEta", "resonance mass vs muon pseudorapidity", 60, -6., 6., 6000, minMass, maxMass );
    hMassVSPhiPlus_  = new TH2F( name+"_MassVSPhiPlus", "resonance mass vs muon+ phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass );
    hMassVSPhiMinus_ = new TH2F( name+"_MassVSPhiMinus", "resonance mass vs muon- phi angle", 64, -3.2, 3.2, 6000, minMass, maxMass );
    //hMassVSPt_prof       = new TProfile (name+"_MassVSPt_prof", "resonance mass vs muon transverse momentum", 100, 0., 200., minMass, maxMass);
    //hMassVSEta_prof      = new TProfile (name+"_MassVSEta_prof", "resonance mass vs muon pseudorapidity", 30, -6., 6., minMass, maxMass);
    //hMassVSPhiPlus_prof  = new TProfile (name+"_MassVSPhiPlus_prof", "resonance mass vs muon+ phi angle", 32, -3.2, 3.2, minMass, maxMass);
    //hMassVSPhiMinus_prof = new TProfile (name+"_MassVSPhiMinus_prof", "resonance mass vs muon- phi angle", 32, -3.2, 3.2, minMass, maxMass);
   }
HMassVSPart::HMassVSPart ( const TString &  name,
TFile *  file 
) [inline]

Definition at line 706 of file Histograms.h.

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

                                                {
    name_=name;
    hMassVSPt_       = (TH2F *) file->Get(name+"_MassVSPt");
    hMassVSEta_      = (TH2F *) file->Get(name+"_MassVSEta");
    hMassVSPhiPlus_  = (TH2F *) file->Get(name+"_MassVSPhiPlus");
    hMassVSPhiMinus_ = (TH2F *) file->Get(name+"_MassVSPhiMinus");
    //hMassVSPt_prof       = (TProfile *) file->Get(name+"_MassVSPt_prof");
    //hMassVSEta_prof      = (TProfile *) file->Get(name+"_MassVSEta_prof");
    //hMassVSPhiPlus_prof  = (TProfile *) file->Get(name+"_MassVSPhiPlus_prof");
    //hMassVSPhiMinus_prof = (TProfile *) file->Get(name+"_MassVSPhiMinus_prof");
  }
HMassVSPart::~HMassVSPart ( ) [inline]

Definition at line 718 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

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

Member Function Documentation

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

Implements Histograms.

Definition at line 760 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

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

Reimplemented from Histograms.

Definition at line 730 of file Histograms.h.

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

                                                                                                                                                    { 
     hMassVSPt_->Fill(momentum1.perp(),momentum2.m(), weight); 
     //hMassVSPt_prof_->Fill(momentum1.perp(),momentum2.m()); 
     hMassVSEta_->Fill(momentum1.eta(),momentum2.m(), weight); 
     //hMassVSEta_prof_->Fill(momentum1.eta(),momentum2.m()); 
     if(charge>0){
       hMassVSPhiPlus_->Fill(momentum1.phi(),momentum2.m(), weight);
       //hMassVSPhiPlus_prof_->Fill(momentum1.phi(),momentum2.m());
     }
     else if(charge<0){
       hMassVSPhiMinus_->Fill(momentum1.phi(),momentum2.m(), weight);
       //hMassVSPhiMinus_prof_->Fill(momentum1.phi(),momentum2.m());
     }
     else {
       LogDebug("Histograms") << "HMassVSPart: wrong charge value = " << charge << std::endl;
       abort();
     }
   }
virtual void HMassVSPart::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 725 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 HMassVSPart::Write ( ) [inline, virtual]

Implements Histograms.

Definition at line 749 of file Histograms.h.

References hMassVSEta_, hMassVSPhiMinus_, hMassVSPhiPlus_, and hMassVSPt_.

                       {
    hMassVSPt_->Write();
    hMassVSEta_->Write();
    hMassVSPhiPlus_->Write();
    hMassVSPhiMinus_->Write();
    //hMassVSPt_prof_->Write();
    //hMassVSEta_prof_->Write();    
    //hMassVSPhiPlus_prof_->Write();
    //hMassVSPhiMinus_prof_->Write();
  }

Member Data Documentation

TH2F* HMassVSPart::hMassVSEta_ [protected]

Definition at line 773 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPhiMinus_ [protected]

Definition at line 775 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPhiPlus_ [protected]

Definition at line 774 of file Histograms.h.

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

TH2F* HMassVSPart::hMassVSPt_ [protected]

Definition at line 772 of file Histograms.h.

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