CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
HRes1DHit Class Reference

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

#include <Histograms.h>

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.

27  {
28  TString N = name_.c_str();
29  name=N;
30 
31  // Position, sigma, residual, pull
32  hDist = new TH1F ("1D_"+N+"_hDist", "1D RHit distance from wire", 100, 0,2.5);
33  hRes = new TH1F ("1D_"+N+"_hRes", "1D RHit residual", 300, -1.5,1.5);
34  hResVsEta = new TH2F("1D_"+N+"_hResVsEta", "1D RHit residual vs eta",
35  50, -1.25,1.25, 150, -1.5,1.5);
36  hResVsPhi = new TH2F("1D_"+N+"_hResVsPhi", "1D RHit residual vs phi",
37  100, -3.2, 3.2, 150, -1.5,1.5);
38  hResVsPos = new TH2F("1D_"+N+"_hResVsPos", "1D RHit residual vs position",
39  100, 0, 2.5, 150, -1.5,1.5);
40  hResVsAngle = new TH2F("1D_"+N+"_hResVsAngle", "1D RHit residual vs impact angle",
41  100, 0.,1.2, 150, -1.5,1.5);
42  hResVsDistFE = new TH2F("1D_"+N+"_hResVsDistFE", "1D RHit residual vs FE distance",
43  100, 0.,400., 150, -1.5,1.5);
44  hPull = new TH1F ("1D_"+N+"_hPull", "1D RHit pull", 100, -5,5);
45  hPullVsPos = new TH2F ("1D_"+N+"_hPullVsPos", "1D RHit pull vs position", 100, 0,2.5, 100, -5,5);
46  hPullVsAngle = new TH2F ("1D_"+N+"_hPullVsAngle", "1D RHit pull vs impact angle",
47  100, 0.,+1.2, 100, -5,5);
48  hPullVsDistFE = new TH2F ("1D_"+N+"_hPullVsDistFE", "1D RHit pull vs FE distance",
49  100, 0., 400., 100, -5,5);
50  }
TH2F * hResVsEta
Definition: Histograms.h:121
TH1F * hPull
Definition: Histograms.h:127
TH2F * hResVsDistFE
Definition: Histograms.h:125
TH1F * hDist
Definition: Histograms.h:119
TH2F * hResVsAngle
Definition: Histograms.h:124
TH2F * hResVsPos
Definition: Histograms.h:123
TH1F * hRes
Definition: Histograms.h:120
TH2F * hPullVsPos
Definition: Histograms.h:128
TH2F * hPullVsDistFE
Definition: Histograms.h:130
TH2F * hResVsPhi
Definition: Histograms.h:122
TString name
Definition: Histograms.h:132
TH2F * hPullVsAngle
Definition: Histograms.h:129
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.

52  {
53  name=name_;
54  hDist = (TH1F *) file->Get("1D_"+name+"_hDist");
55  hRes = (TH1F *) file->Get("1D_"+name+"_hRes");
56  hResVsEta = (TH2F *) file->Get("1D_"+name+"_hResVsEta");
57  hResVsPhi = (TH2F *) file->Get("1D_"+name+"_hResVsPhi");
58  hResVsPos = (TH2F *) file->Get("1D_"+name+"_hResVsPos");
59  hResVsAngle = (TH2F *) file->Get("1D_"+name+"_hResVsAngle");
60  hResVsDistFE = (TH2F *) file->Get("1D_"+name+"_hResVsDistFE");
61  hPull = (TH1F *) file->Get("1D_"+name+"_hPull");
62  hPullVsPos = (TH2F *) file->Get("1D_"+name+"_hPullVsPos");
63  hPullVsAngle = (TH2F *) file->Get("1D_"+name+"_hPullVsAngle");
64  hPullVsDistFE = (TH2F *) file->Get("1D_"+name+"_hPullVsDistFE");
65  }
TH2F * hResVsEta
Definition: Histograms.h:121
TH1F * hPull
Definition: Histograms.h:127
TH2F * hResVsDistFE
Definition: Histograms.h:125
TH1F * hDist
Definition: Histograms.h:119
TH2F * hResVsAngle
Definition: Histograms.h:124
TH2F * hResVsPos
Definition: Histograms.h:123
TH1F * hRes
Definition: Histograms.h:120
TH2F * hPullVsPos
Definition: Histograms.h:128
TH2F * hPullVsDistFE
Definition: Histograms.h:130
TH2F * hResVsPhi
Definition: Histograms.h:122
TString name
Definition: Histograms.h:132
TH2F * hPullVsAngle
Definition: Histograms.h:129
HRes1DHit::~HRes1DHit ( )
inline

Definition at line 68 of file Histograms.h.

68  {
69  // delete hDist;
70  // delete hRes;
71  // delete hResVsEta;
72  // delete hResVsPhi;
73  // delete hResVsPos;
74  // delete hPull;
75  }

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().

83  {
84  // Reso, pull
85  hDist->Fill(distRecHit);
86  float res = distRecHit-distSimHit;
87  hRes->Fill(res);
88  hResVsEta->Fill(etaSimHit,res);
89  hResVsPhi->Fill(phiSimHit,res);
90  hResVsPos->Fill(distSimHit,res);
91  hResVsAngle->Fill(thetaSimHit,res);
92  hResVsDistFE->Fill(distFESimHit,res);
93  if(errRecHit!=0) {
94  float pull=res/errRecHit;
95  hPull->Fill(pull);
96  hPullVsPos->Fill(distSimHit,pull);
97  hPullVsAngle->Fill(thetaSimHit,pull);
98  hPullVsDistFE->Fill(distFESimHit,pull);
99  }
100  else std::cout<<"Error: RecHit error = 0" << std::endl;
101  }
TH2F * hResVsEta
Definition: Histograms.h:121
TH1F * hPull
Definition: Histograms.h:127
TH2F * hResVsDistFE
Definition: Histograms.h:125
TH1F * hDist
Definition: Histograms.h:119
TH2F * hResVsAngle
Definition: Histograms.h:124
TH2F * hResVsPos
Definition: Histograms.h:123
TH1F * hRes
Definition: Histograms.h:120
TH2F * hPullVsPos
Definition: Histograms.h:128
TH2F * hPullVsDistFE
Definition: Histograms.h:130
TH2F * hResVsPhi
Definition: Histograms.h:122
tuple cout
Definition: gather_cfg.py:41
TH2F * hPullVsAngle
Definition: Histograms.h:129
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.

103  {
104  hDist->Write();
105  hRes->Write();
106  hResVsEta->Write();
107  hResVsPhi->Write();
108  hResVsPos->Write();
109  hResVsAngle->Write();
110  hResVsDistFE->Write();
111  hPull->Write();
112  hPullVsPos->Write();
113  hPullVsAngle->Write();
114  hPullVsDistFE->Write();
115  }
TH2F * hResVsEta
Definition: Histograms.h:121
TH1F * hPull
Definition: Histograms.h:127
TH2F * hResVsDistFE
Definition: Histograms.h:125
TH1F * hDist
Definition: Histograms.h:119
TH2F * hResVsAngle
Definition: Histograms.h:124
TH2F * hResVsPos
Definition: Histograms.h:123
TH1F * hRes
Definition: Histograms.h:120
TH2F * hPullVsPos
Definition: Histograms.h:128
TH2F * hPullVsDistFE
Definition: Histograms.h:130
TH2F * hResVsPhi
Definition: Histograms.h:122
TH2F * hPullVsAngle
Definition: Histograms.h:129

Member Data Documentation

TH1F* HRes1DHit::hDist

Definition at line 119 of file Histograms.h.

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

TH1F* HRes1DHit::hPull

Definition at line 127 of file Histograms.h.

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

TH2F* HRes1DHit::hPullVsAngle

Definition at line 129 of file Histograms.h.

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

TH2F* HRes1DHit::hPullVsDistFE

Definition at line 130 of file Histograms.h.

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

TH2F* HRes1DHit::hPullVsPos

Definition at line 128 of file Histograms.h.

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

TH1F* HRes1DHit::hRes

Definition at line 120 of file Histograms.h.

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

TH2F* HRes1DHit::hResVsAngle

Definition at line 124 of file Histograms.h.

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

TH2F* HRes1DHit::hResVsDistFE

Definition at line 125 of file Histograms.h.

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

TH2F* HRes1DHit::hResVsEta

Definition at line 121 of file Histograms.h.

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

TH2F* HRes1DHit::hResVsPhi

Definition at line 122 of file Histograms.h.

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

TH2F* HRes1DHit::hResVsPos

Definition at line 123 of file Histograms.h.

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

TString HRes1DHit::name