CMS 3D CMS Logo

Public Member Functions | Public Attributes

HRes1DHit Class Reference

A set of histograms of residuals and pulls for 1D RecHits. More...

#include <Histograms.h>

List of all members.

Public Member Functions

void Fill (float distSimHit, float thetaSimHit, float distFESimHit, float distRecHit, float etaSimHit, float phiSimHit, float errRecHit)
 HRes1DHit (std::string name_)
 HRes1DHit (TString name_, TFile *file)
void Write ()
 ~HRes1DHit ()

Public Attributes

TH1F * hDist
TH1F * hPull
TH2F * hPullVsAngle
TH2F * hPullVsDistFE
TH2F * hPullVsPos
TH1F * hRes
TH2F * hResVsAngle
TH2F * hResVsDistFE
TH2F * hResVsEta
TH2F * hResVsPhi
TH2F * hResVsPos
TString name

Detailed Description

A set of histograms of residuals and pulls for 1D RecHits.

Definition at line 25 of file Histograms.h.


Constructor & Destructor Documentation

HRes1DHit::HRes1DHit ( std::string  name_) [inline]

Definition at line 27 of file Histograms.h.

References hDist, hPull, hPullVsAngle, hPullVsDistFE, hPullVsPos, hRes, hResVsAngle, hResVsDistFE, hResVsEta, hResVsPhi, hResVsPos, MultiGaussianStateTransform::N, and name.

                              {
      TString N = name_.c_str();
      name=N;

      // Position, sigma, residual, pull
      hDist       = new TH1F ("1D_"+N+"_hDist", "1D RHit distance from wire", 100, 0,2.5);
      hRes        = new TH1F ("1D_"+N+"_hRes", "1D RHit residual", 300, -1.5,1.5);
      hResVsEta   = new TH2F("1D_"+N+"_hResVsEta", "1D RHit residual vs eta",
                             50, -1.25,1.25, 150, -1.5,1.5);
      hResVsPhi   = new TH2F("1D_"+N+"_hResVsPhi", "1D RHit residual vs phi",
                             100, -3.2, 3.2, 150, -1.5,1.5);
      hResVsPos   = new TH2F("1D_"+N+"_hResVsPos", "1D RHit residual vs position",
                             100, 0, 2.5, 150, -1.5,1.5);    
      hResVsAngle   = new TH2F("1D_"+N+"_hResVsAngle", "1D RHit residual vs impact angle",
                               100, 0.,1.2, 150, -1.5,1.5);    
      hResVsDistFE = new TH2F("1D_"+N+"_hResVsDistFE", "1D RHit residual vs FE distance",
                              100, 0.,400., 150, -1.5,1.5);    
      hPull       = new TH1F ("1D_"+N+"_hPull", "1D RHit pull", 100, -5,5);
      hPullVsPos  = new TH2F ("1D_"+N+"_hPullVsPos", "1D RHit pull vs position", 100, 0,2.5, 100, -5,5);
      hPullVsAngle  = new TH2F ("1D_"+N+"_hPullVsAngle", "1D RHit pull vs impact angle",
                                100, 0.,+1.2, 100, -5,5);
      hPullVsDistFE  = new TH2F ("1D_"+N+"_hPullVsDistFE", "1D RHit pull vs FE distance",
                                 100, 0., 400., 100, -5,5);
    }
HRes1DHit::HRes1DHit ( TString  name_,
TFile *  file 
) [inline]

Definition at line 52 of file Histograms.h.

References hDist, hPull, hPullVsAngle, hPullVsDistFE, hPullVsPos, hRes, hResVsAngle, hResVsDistFE, hResVsEta, hResVsPhi, hResVsPos, and name.

                                         {
      name=name_;
      hDist          = (TH1F *) file->Get("1D_"+name+"_hDist");
      hRes           = (TH1F *) file->Get("1D_"+name+"_hRes");
      hResVsEta      = (TH2F *) file->Get("1D_"+name+"_hResVsEta");
      hResVsPhi      = (TH2F *) file->Get("1D_"+name+"_hResVsPhi");
      hResVsPos      = (TH2F *) file->Get("1D_"+name+"_hResVsPos");
      hResVsAngle    = (TH2F *) file->Get("1D_"+name+"_hResVsAngle");
      hResVsDistFE   = (TH2F *) file->Get("1D_"+name+"_hResVsDistFE");
      hPull          = (TH1F *) file->Get("1D_"+name+"_hPull");
      hPullVsPos     = (TH2F *) file->Get("1D_"+name+"_hPullVsPos");
      hPullVsAngle   = (TH2F *) file->Get("1D_"+name+"_hPullVsAngle");
      hPullVsDistFE  = (TH2F *) file->Get("1D_"+name+"_hPullVsDistFE");
    }
HRes1DHit::~HRes1DHit ( ) [inline]

Definition at line 68 of file Histograms.h.

                {
      //     delete hDist;
      //     delete hRes;
      //     delete hResVsEta;
      //     delete hResVsPhi;
      //     delete hResVsPos;
      //     delete hPull;
    }

Member Function Documentation

void HRes1DHit::Fill ( float  distSimHit,
float  thetaSimHit,
float  distFESimHit,
float  distRecHit,
float  etaSimHit,
float  phiSimHit,
float  errRecHit 
) [inline]

Definition at line 77 of file Histograms.h.

References gather_cfg::cout, hDist, hPull, hPullVsAngle, hPullVsDistFE, hPullVsPos, hRes, hResVsAngle, hResVsDistFE, hResVsEta, hResVsPhi, and hResVsPos.

Referenced by DTRecHitQuality::compute().

                               {
      // Reso, pull
      hDist->Fill(distRecHit);
      float res = distRecHit-distSimHit;
      hRes->Fill(res);
      hResVsEta->Fill(etaSimHit,res);
      hResVsPhi->Fill(phiSimHit,res);
      hResVsPos->Fill(distSimHit,res);
      hResVsAngle->Fill(thetaSimHit,res);
      hResVsDistFE->Fill(distFESimHit,res);
      if(errRecHit!=0) {
        float pull=res/errRecHit;
        hPull->Fill(pull);
        hPullVsPos->Fill(distSimHit,pull);
        hPullVsAngle->Fill(thetaSimHit,pull);
        hPullVsDistFE->Fill(distFESimHit,pull);
      }
      else std::cout<<"Error: RecHit error = 0" << std::endl;
    }
void HRes1DHit::Write ( ) [inline]

Definition at line 103 of file Histograms.h.

References hDist, hPull, hPullVsAngle, hPullVsDistFE, hPullVsPos, hRes, hResVsAngle, hResVsDistFE, hResVsEta, hResVsPhi, and hResVsPos.

                 {
      hDist->Write();     
      hRes->Write();      
      hResVsEta->Write();   
      hResVsPhi->Write(); 
      hResVsPos->Write(); 
      hResVsAngle->Write(); 
      hResVsDistFE->Write(); 
      hPull->Write();
      hPullVsPos->Write();
      hPullVsAngle->Write();
      hPullVsDistFE->Write();
    }

Member Data Documentation

Definition at line 119 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 127 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 129 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 130 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 128 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 120 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 124 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 125 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 121 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 122 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

Definition at line 123 of file Histograms.h.

Referenced by Fill(), HRes1DHit(), and Write().

TString HRes1DHit::name

Definition at line 132 of file Histograms.h.

Referenced by HRes1DHit().