CMS 3D CMS Logo

Public Member Functions | Public Attributes

HResolutionVSPart Class Reference

A set of histograms for resolution. More...

#include <Histograms.h>

Inheritance diagram for HResolutionVSPart:
Histograms

List of all members.

Public Member Functions

virtual void Clear ()
virtual void Fill (const reco::Particle::LorentzVector &p4, const double &resValue, const int charge)
 HResolutionVSPart (TFile *outputFile, const TString &name, const double maxPt=100, const double &yMinEta=0., const double &yMaxEta=2., const double &yMinPt=0., const double &yMaxPt=2., const bool doProfiles=false)
 HResolutionVSPart (const TString &name, TFile *file)
virtual void Write ()
 ~HResolutionVSPart ()

Public Attributes

bool doProfiles_
TH1F * hAbsReso_
TH2F * hAbsResoVSEta_
TH2F * hAbsResoVSPhi_
TH2F * hAbsResoVSPt_
TH1F * hReso_
TH2F * hResoVSEta_
TProfile * hResoVSEta_prof_
TProfile * hResoVSPhi_prof_
TH2F * hResoVSPhiMinus_
TH2F * hResoVSPhiPlus_
TH2F * hResoVSPt_
TH2F * hResoVSPt_Bar_
TProfile * hResoVSPt_Bar_prof_
TH2F * hResoVSPt_Endc_17_
TProfile * hResoVSPt_Endc_17_prof_
TH2F * hResoVSPt_Endc_20_
TProfile * hResoVSPt_Endc_20_prof_
TH2F * hResoVSPt_Endc_24_
TProfile * hResoVSPt_Endc_24_prof_
TH2F * hResoVSPt_Ovlap_
TProfile * hResoVSPt_Ovlap_prof_
TProfile * hResoVSPt_prof_
TH2F * hResoVSPtEta_
TH2F * hResoVSTheta_

Detailed Description

A set of histograms for resolution.

Definition at line 1140 of file Histograms.h.


Constructor & Destructor Documentation

HResolutionVSPart::HResolutionVSPart ( TFile *  outputFile,
const TString &  name,
const double  maxPt = 100,
const double &  yMinEta = 0.,
const double &  yMaxEta = 2.,
const double &  yMinPt = 0.,
const double &  yMaxPt = 2.,
const bool  doProfiles = false 
) [inline]

Definition at line 1143 of file Histograms.h.

References doProfiles_, hAbsReso_, hAbsResoVSEta_, hAbsResoVSPhi_, hAbsResoVSPt_, hReso_, hResoVSEta_, hResoVSEta_prof_, hResoVSPhi_prof_, hResoVSPhiMinus_, hResoVSPhiPlus_, hResoVSPt_, hResoVSPt_Bar_, hResoVSPt_Bar_prof_, hResoVSPt_Endc_17_, hResoVSPt_Endc_17_prof_, hResoVSPt_Endc_20_, hResoVSPt_Endc_20_prof_, hResoVSPt_Endc_24_, hResoVSPt_Endc_24_prof_, hResoVSPt_Ovlap_, hResoVSPt_Ovlap_prof_, hResoVSPt_prof_, hResoVSPtEta_, hResoVSTheta_, and Pi.

                                                   : Histograms(outputFile, name), doProfiles_(doProfiles)
  {
    // Kinematical variables

    // hReso           = new TH1F (name+"_Reso", "resolution", 4000, -1, 1);
    // hResoVSPtEta    = new TH2F (name+"_ResoVSPtEta", "resolution VS pt and #eta", 200, 0, 200, 60, -3, 3);
    // hResoVSPt       = new TH2F (name+"_ResoVSPt", "resolution VS pt", 200, 0, 200, 8000, -1, 1);
    // //hResoVSPt_prof  = new TProfile (name+"_ResoVSPt_prof", "resolution VS pt", 100, 0, 200, -1, 1);
    // hResoVSEta      = new TH2F (name+"_ResoVSEta", "resolution VS eta", 60, -3, 3, 8000, yMinEta, yMaxEta);
    // hResoVSTheta    = new TH2F (name+"_ResoVSTheta", "resolution VS theta", 30, 0, TMath::Pi(), 8000, -1, 1);
    // //hResoVSEta_prof = new TProfile (name+"_ResoVSEta_prof", "resolution VS eta", 10, -2.5, 2.5, -1, 1);
    // hResoVSPhiPlus  = new TH2F (name+"_ResoVSPhiPlus", "resolution VS phi mu+", 14, -3.2, 3.2, 8000, -1, 1);
    // hResoVSPhiMinus = new TH2F (name+"_ResoVSPhiMinus", "resolution VS phi mu-", 14, -3.2, 3.2, 8000, -1, 1);
    // //hResoVSPhi_prof = new TProfile (name+"_ResoVSPhi_prof", "resolution VS phi", 14, -3.2, 3.2, -1, 1);
    // hAbsReso        = new TH1F (name+"_AbsReso", "resolution", 100, 0, 1);
    // hAbsResoVSPt    = new TH2F (name+"_AbsResoVSPt", "Abs resolution VS pt", 200, 0, 500, 100, 0, 1);
    // hAbsResoVSEta   = new TH2F (name+"_AbsResoVSEta", "Abs resolution VS eta", 60, -3, 3, 100, 0, 1);
    // hAbsResoVSPhi   = new TH2F (name+"_AbsResoVSPhi", "Abs resolution VS phi", 14, -3.2, 3.2, 100, 0, 1);

    hReso_           = new TH1F( name+"_Reso", "resolution", 200, -1, 1 );
    hResoVSPtEta_    = new TH2F( name+"_ResoVSPtEta", "resolution VS pt and #eta", 200, 0, maxPt, 60, -3, 3 );
    hResoVSPt_       = new TH2F( name+"_ResoVSPt", "resolution VS pt", 200, 0, maxPt, 200, yMinPt, yMaxPt );
    hResoVSPt_Bar_   = new TH2F( name+"_ResoVSPt_Bar", "resolution VS pt Barrel", 200, 0, maxPt, 200, yMinPt, yMaxPt );
    hResoVSPt_Endc_17_  = new TH2F( name+"_ResoVSPt_Endc_1.7", "resolution VS pt Endcap (1.4<eta<1.7)", 200, 0, maxPt, 200, yMinPt, yMaxPt );
    hResoVSPt_Endc_20_  = new TH2F( name+"_ResoVSPt_Endc_2.0", "resolution VS pt Endcap (1.7<eta<2.0)", 200, 0, maxPt, 200, yMinPt, yMaxPt );
    hResoVSPt_Endc_24_  = new TH2F( name+"_ResoVSPt_Endc_2.4", "resolution VS pt Endcap (2.0<eta<2.4)", 200, 0, maxPt, 200, yMinPt, yMaxPt );
    hResoVSPt_Ovlap_ = new TH2F( name+"_ResoVSPt_Ovlap", "resolution VS pt overlap", 200, 0, maxPt, 200, yMinPt, yMaxPt );
    hResoVSEta_      = new TH2F( name+"_ResoVSEta", "resolution VS eta", 200, -3, 3, 200, yMinEta, yMaxEta );
    hResoVSTheta_    = new TH2F( name+"_ResoVSTheta", "resolution VS theta", 30, 0, TMath::Pi(), 200, yMinEta, yMaxEta );
    hResoVSPhiPlus_  = new TH2F( name+"_ResoVSPhiPlus", "resolution VS phi mu+",  16, -3.2, 3.2, 200, -1, 1 );
    hResoVSPhiMinus_ = new TH2F( name+"_ResoVSPhiMinus", "resolution VS phi mu-", 16, -3.2, 3.2, 200, -1, 1 );
    hAbsReso_        = new TH1F( name+"_AbsReso", "resolution", 100, 0, 1 );
    hAbsResoVSPt_    = new TH2F( name+"_AbsResoVSPt", "Abs resolution VS pt", 200, 0, maxPt, 100, 0, 1 );
    hAbsResoVSEta_   = new TH2F( name+"_AbsResoVSEta", "Abs resolution VS eta", 64, -3.2, 3.2, 100, 0, 1 );
    hAbsResoVSPhi_   = new TH2F( name+"_AbsResoVSPhi", "Abs resolution VS phi", 16, -3.2, 3.2, 100, 0, 1 );
    if( doProfiles_ ) {
      hResoVSPt_prof_    = new TProfile(name+"_ResoVSPt_prof", "resolution VS pt", 100, 0, maxPt, yMinPt, yMaxPt );
      hResoVSPt_Bar_prof_    = new TProfile(name+"_ResoVSPt_Bar_prof", "resolution VS pt Barrel", 100, 0, maxPt, yMinPt, yMaxPt );
      hResoVSPt_Endc_17_prof_   = new TProfile(name+"_ResoVSPt_Endc_1.7_prof", "resolution VS pt Endcap (1.4<eta<1.7)", 100, 0, maxPt, yMinPt, yMaxPt );
      hResoVSPt_Endc_20_prof_   = new TProfile(name+"_ResoVSPt_Endc_2.0_prof", "resolution VS pt Endcap (1.7<eta<2.0)", 100, 0, maxPt, yMinPt, yMaxPt );
      hResoVSPt_Endc_24_prof_   = new TProfile(name+"_ResoVSPt_Endc_2.4_prof", "resolution VS pt Endcap (2.0<eta<2.4)", 100, 0, maxPt, yMinPt, yMaxPt );
      hResoVSPt_Ovlap_prof_  = new TProfile(name+"_ResoVSPt_Ovlap_prof", "resolution VS pt Overlap", 100, 0, maxPt, yMinPt, yMaxPt );
      hResoVSEta_prof_       = new TProfile(name+"_ResoVSEta_prof", "resolution VS eta", 200, -3.0, 3.0, yMinEta, yMaxEta );
      hResoVSPhi_prof_       = new TProfile(name+"_ResoVSPhi_prof", "resolution VS phi", 16, -3.2, 3.2, -1, 1 );
    }
  }
HResolutionVSPart::HResolutionVSPart ( const TString &  name,
TFile *  file 
) [inline]

Definition at line 1193 of file Histograms.h.

References doProfiles_, hAbsReso_, hAbsResoVSEta_, hAbsResoVSPhi_, hAbsResoVSPt_, hReso_, hResoVSEta_, hResoVSEta_prof_, hResoVSPhi_prof_, hResoVSPhiMinus_, hResoVSPhiPlus_, hResoVSPt_, hResoVSPt_Bar_, hResoVSPt_Bar_prof_, hResoVSPt_Endc_17_, hResoVSPt_Endc_17_prof_, hResoVSPt_Endc_20_, hResoVSPt_Endc_20_prof_, hResoVSPt_Endc_24_, hResoVSPt_Endc_24_prof_, hResoVSPt_Ovlap_, hResoVSPt_Ovlap_prof_, hResoVSPt_prof_, hResoVSPtEta_, hResoVSTheta_, mergeVDriftHistosByStation::name, and Histograms::name_.

                                                       {
    name_=name;
    hReso_           = (TH1F *) file->Get(name+"_Reso");
    hResoVSPtEta_    = (TH2F *) file->Get(name+"_ResoVSPtEta");
    hResoVSPt_       = (TH2F *) file->Get(name+"_ResoVSPt");
    hResoVSPt_Bar_   = (TH2F *) file->Get(name+"_ResoVSPt");
    hResoVSPt_Endc_17_  = (TH2F *) file->Get(name+"_ResoVSPt");
    hResoVSPt_Endc_20_  = (TH2F *) file->Get(name+"_ResoVSPt");
    hResoVSPt_Endc_24_  = (TH2F *) file->Get(name+"_ResoVSPt");
    hResoVSPt_Ovlap_ = (TH2F *) file->Get(name+"_ResoVSPt");
    hResoVSEta_      = (TH2F *) file->Get(name+"_ResoVSEta");
    hResoVSTheta_    = (TH2F *) file->Get(name+"_ResoVSTheta");
    hResoVSPhiPlus_  = (TH2F *) file->Get(name+"_ResoVSPhiPlus");
    hResoVSPhiMinus_ = (TH2F *) file->Get(name+"_ResoVSPhiMinus");
    hAbsReso_        = (TH1F *) file->Get(name+"_AbsReso");
    hAbsResoVSPt_    = (TH2F *) file->Get(name+"_AbsResoVSPt");
    hAbsResoVSEta_   = (TH2F *) file->Get(name+"_AbsResoVSEta");
    hAbsResoVSPhi_   = (TH2F *) file->Get(name+"_AbsResoVSPhi");
    if( doProfiles_ ) {
      hResoVSPt_prof_  = (TProfile *) file->Get(name+"_ResoVSPt_prof");
      hResoVSPt_Bar_prof_ = (TProfile *) file->Get(name+"_ResoVSPt_prof"); 
      hResoVSPt_Endc_17_prof_ = (TProfile *) file->Get(name+"_ResoVSPt_1.7_prof"); 
      hResoVSPt_Endc_20_prof_ = (TProfile *) file->Get(name+"_ResoVSPt_2.0_prof"); 
      hResoVSPt_Endc_24_prof_ = (TProfile *) file->Get(name+"_ResoVSPt_2.4_prof"); 
      hResoVSPt_Ovlap_prof_= (TProfile *) file->Get(name+"_ResoVSPt_prof"); 
      hResoVSEta_prof_ = (TProfile *) file->Get(name+"_ResoVSEta_prof");
      hResoVSPhi_prof_ = (TProfile *) file->Get(name+"_ResoVSPhi_prof");
    }
  }
HResolutionVSPart::~HResolutionVSPart ( ) [inline]

Member Function Documentation

virtual void HResolutionVSPart::Clear ( ) [inline, virtual]
virtual void HResolutionVSPart::Fill ( const reco::Particle::LorentzVector p4,
const double &  resValue,
const int  charge 
) [inline, virtual]

Reimplemented from Histograms.

Definition at line 1252 of file Histograms.h.

References doProfiles_, eta, hAbsReso_, hAbsResoVSEta_, hAbsResoVSPhi_, hAbsResoVSPt_, hReso_, hResoVSEta_, hResoVSEta_prof_, hResoVSPhi_prof_, hResoVSPhiMinus_, hResoVSPhiPlus_, hResoVSPt_, hResoVSPt_Bar_, hResoVSPt_Bar_prof_, hResoVSPt_Endc_17_, hResoVSPt_Endc_17_prof_, hResoVSPt_Endc_20_, hResoVSPt_Endc_20_prof_, hResoVSPt_Endc_24_, hResoVSPt_Endc_24_prof_, hResoVSPt_Ovlap_, hResoVSPt_Ovlap_prof_, hResoVSPt_prof_, hResoVSPtEta_, and hResoVSTheta_.

                                                                                                     { 
    double pt = p4.Pt();
    double eta = p4.Eta();
    hReso_->Fill(resValue);
    hResoVSPtEta_->Fill(pt, eta,resValue); 
    hResoVSPt_->Fill(pt,resValue); 
    if(fabs(eta)<=0.9)
      hResoVSPt_Bar_->Fill(pt,resValue);
    else if(fabs(eta)>0.9 && fabs(eta)<=1.4)
      hResoVSPt_Ovlap_->Fill(pt,resValue);
    else if(fabs(eta)>1.4 && fabs(eta)<=1.7)
      hResoVSPt_Endc_17_->Fill(pt,resValue);
    else if(fabs(eta)>1.7 && fabs(eta)<=2.0)
      hResoVSPt_Endc_20_->Fill(pt,resValue);
    else
      hResoVSPt_Endc_24_->Fill(pt,resValue);
     
    hResoVSEta_->Fill(eta,resValue);
    hResoVSTheta_->Fill(p4.Theta(),resValue);
    if(charge>0)
      hResoVSPhiPlus_->Fill(p4.Phi(),resValue); 
    else if(charge<0)
      hResoVSPhiMinus_->Fill(p4.Phi(),resValue); 
    hAbsReso_->Fill(fabs(resValue)); 
    hAbsResoVSPt_->Fill(pt,fabs(resValue)); 
    hAbsResoVSEta_->Fill(eta,fabs(resValue)); 
    hAbsResoVSPhi_->Fill(p4.Phi(),fabs(resValue));     
    if( doProfiles_ ) {
      hResoVSPt_prof_->Fill(p4.Pt(),resValue); 
      if(fabs(eta)<=0.9)
        hResoVSPt_Bar_prof_->Fill(p4.Pt(),resValue); 
      else if(fabs(eta)>0.9 && fabs(eta)<=1.4)
        hResoVSPt_Ovlap_prof_->Fill(pt,resValue);
      else if(fabs(eta)>1.4 && fabs(eta)<=1.7)
        hResoVSPt_Endc_17_prof_->Fill(pt,resValue);
      else if(fabs(eta)>1.7 && fabs(eta)<=2.0)
        hResoVSPt_Endc_20_prof_->Fill(pt,resValue);
      else
        hResoVSPt_Endc_24_prof_->Fill(pt,resValue);
      
      hResoVSEta_prof_->Fill(p4.Eta(),resValue); 
      hResoVSPhi_prof_->Fill(p4.Phi(),resValue); 
    }
  }
virtual void HResolutionVSPart::Write ( ) [inline, virtual]

Member Data Documentation

Definition at line 1382 of file Histograms.h.

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

Definition at line 1378 of file Histograms.h.

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

Definition at line 1380 of file Histograms.h.

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

Definition at line 1381 of file Histograms.h.

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

Definition at line 1379 of file Histograms.h.

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

Definition at line 1358 of file Histograms.h.

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

Definition at line 1372 of file Histograms.h.

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

Definition at line 1374 of file Histograms.h.

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

Definition at line 1377 of file Histograms.h.

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

Definition at line 1375 of file Histograms.h.

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

Definition at line 1376 of file Histograms.h.

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

Definition at line 1360 of file Histograms.h.

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

Definition at line 1361 of file Histograms.h.

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

Definition at line 1367 of file Histograms.h.

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

Definition at line 1362 of file Histograms.h.

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

Definition at line 1368 of file Histograms.h.

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

Definition at line 1363 of file Histograms.h.

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

Definition at line 1369 of file Histograms.h.

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

Definition at line 1364 of file Histograms.h.

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

Definition at line 1370 of file Histograms.h.

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

Definition at line 1365 of file Histograms.h.

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

Definition at line 1371 of file Histograms.h.

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

Definition at line 1366 of file Histograms.h.

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

Definition at line 1359 of file Histograms.h.

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

Definition at line 1373 of file Histograms.h.

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