CMS 3D CMS Logo

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, int station)
 
 HRes1DHit (std::string name_, DQMStore *dbe_, bool doall=true, bool local=true)
 
 ~HRes1DHit ()
 

Public Attributes

bool _doall
 
MonitorElementhDist
 
MonitorElementhPull
 
MonitorElementhPullSt [4]
 
MonitorElementhPullVsAngle
 
MonitorElementhPullVsDistFE
 
MonitorElementhPullVsPos
 
MonitorElementhRes
 
MonitorElementhResSt [4]
 
MonitorElementhResVsAngle
 
MonitorElementhResVsDistFE
 
MonitorElementhResVsEta
 
MonitorElementhResVsPhi
 
MonitorElementhResVsPos
 
TString name
 

Detailed Description

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

Definition at line 26 of file Histograms.h.

Constructor & Destructor Documentation

HRes1DHit::HRes1DHit ( std::string  name_,
DQMStore dbe_,
bool  doall = true,
bool  local = true 
)
inline

Definition at line 28 of file Histograms.h.

References _doall, DQMStore::book1D(), DQMStore::book2D(), DTRecHitQuality_cfi::doall, hDist, hPull, hPullSt, hPullVsAngle, hPullVsDistFE, hPullVsPos, hRes, hResSt, hResVsAngle, hResVsDistFE, hResVsEta, hResVsPhi, hResVsPos, DQMStore::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

28  {
29  std::string pre ="1D_";
30  pre += name_;
31  _doall = doall;
32  // Position, sigma, residual, pull
33  //sprintf (histo_n, "1D_%s_hDist",N); sprintf(histo_t, "1D RHit distance from wire");
34  // hDist=0; hDist = dbe_->book1D(histo_n, histo_t, 100, 0,2.5);
35  dbe_->setCurrentFolder("DT/1DRecHits/Res/");
36 
37  if(doall){
38  hDist=0; hDist = dbe_->book1D(pre + "_hDist" ,"1D RHit distance from wire", 100, 0,2.5);
39  //hDist = new TH1F ("1D_"+N+"_hDist", "1D RHit distance from wire", 100, 0,2.5);
40  hResVsAngle = 0; hResVsAngle = dbe_->book2D(pre+"_hResVsAngle", "1D RHit residual vs impact angle",100, -1.2,1.2, 100, -0.2,0.2);
41  hResVsDistFE = 0; hResVsDistFE = dbe_->book2D(pre+"_hResVsDistFE", "1D RHit residual vs FE distance", 100, 0.,400., 150, -0.5,0.5);
42  dbe_->setCurrentFolder("DT/1DRecHits/Pull/");
43  hPullVsPos= 0; hPullVsPos = dbe_->book2D (pre+"_hPullVsPos", "1D RHit pull vs position", 100, 0,2.5, 100, -5,5);
44  hPullVsAngle = 0; hPullVsAngle = dbe_->book2D (pre+"_hPullVsAngle", "1D RHit pull vs impact angle",100, -1.2,1.2, 100, -5,5);
45  hPullVsDistFE = 0; hPullVsDistFE = dbe_->book2D (pre+"_hPullVsDistFE", "1D RHit pull vs FE distance", 100, 0., 400., 100, -5,5);
46  }
47  dbe_->setCurrentFolder("DT/1DRecHits/Res/");
48  hRes=0; hRes = dbe_->book1D(pre + "_hRes","1D RHit residual", 300, -0.5,0.5);
49  hResSt[0] = 0; hResSt[0] = dbe_->book1D(pre + "_hResMB1","1D RHit residual", 300, -0.5,0.5);
50  hResSt[1] = 0; hResSt[1] = dbe_->book1D(pre + "_hResMB2","1D RHit residual", 300, -0.5,0.5);
51  hResSt[2] = 0; hResSt[2] = dbe_->book1D(pre + "_hResMB3","1D RHit residual", 300, -0.5,0.5);
52  hResSt[3] = 0; hResSt[3] = dbe_->book1D(pre + "_hResMB4","1D RHit residual", 300, -0.5,0.5);
53 
54  //hRes = new TH1F ("1D_"+N+"_hRes", "1D RHit residual", 300, -1.5,1.5);
55  hResVsEta=0; hResVsEta = dbe_->book2D(pre +"_hResVsEta" , "1D RHit residual vs eta", 50, -1.25,1.25,150,-0.5,0.5);
56  //hResVsEta = new TH2F("1D_"+N+"_hResVsEta", "1D RHit residual vs eta",50, -1.25,1.25, 150, -1.5,1.5);
57  hResVsPhi = 0; hResVsPhi = dbe_->book2D(pre+"_hResVsPhi" , "1D RHit residual vs phi",100, -3.2, 3.2, 150, -0.5,0.5);
58  //hResVsPhi = new TH2F("1D_"+N+"_hResVsPhi", "1D RHit residual vs phi", 100, -3.2, 3.2, 150, -1.5,1.5);
59  hResVsPos = 0; hResVsPos = dbe_->book2D(pre+"_hResVsPos", "1D RHit residual vs position",100, 0, 2.5, 150, -0.5,0.5);
60  //hResVsPos = new TH2F("1D_"+N+"_hResVsPos", "1D RHit residual vs position",100, 0, 2.5, 150, -1.5,1.5);
61  dbe_->setCurrentFolder("DT/1DRecHits/Pull/");
62  hPull =0; hPull = dbe_->book1D (pre+"_hPull", "1D RHit pull", 100, -5,5);
63  hPullSt[0] = 0; hPullSt[0] = dbe_->book1D(pre + "_hPullMB1","1D RHit residual", 100, -5,5);
64  hPullSt[1] = 0; hPullSt[1] = dbe_->book1D(pre + "_hPullMB2","1D RHit residual", 100, -5,5);
65  hPullSt[2] = 0; hPullSt[2] = dbe_->book1D(pre + "_hPullMB3","1D RHit residual", 100, -5,5);
66  hPullSt[3] = 0; hPullSt[3] = dbe_->book1D(pre + "_hPullMB4","1D RHit residual", 100, -5,5);
67  }
MonitorElement * hResSt[4]
Definition: Histograms.h:144
MonitorElement * hResVsEta
Definition: Histograms.h:145
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1034
MonitorElement * hResVsDistFE
Definition: Histograms.h:149
MonitorElement * hPullSt[4]
Definition: Histograms.h:152
MonitorElement * hResVsAngle
Definition: Histograms.h:148
MonitorElement * hRes
Definition: Histograms.h:143
MonitorElement * hPullVsAngle
Definition: Histograms.h:154
MonitorElement * hPullVsPos
Definition: Histograms.h:153
MonitorElement * hDist
Definition: Histograms.h:142
bool _doall
Definition: Histograms.h:156
MonitorElement * hResVsPos
Definition: Histograms.h:147
MonitorElement * hResVsPhi
Definition: Histograms.h:146
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1162
MonitorElement * hPull
Definition: Histograms.h:151
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:740
MonitorElement * hPullVsDistFE
Definition: Histograms.h:155
HRes1DHit::~HRes1DHit ( )
inline

Definition at line 86 of file Histograms.h.

86  {
87  // delete hDist;
88  // delete hRes;
89  // delete hResVsEta;
90  // delete hResVsPhi;
91  // delete hResVsPos;
92  // delete hPull;
93  }

Member Function Documentation

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

Definition at line 95 of file Histograms.h.

References _doall, gather_cfg::cout, MonitorElement::Fill(), hDist, hPull, hPullSt, hPullVsAngle, hPullVsDistFE, hPullVsPos, hRes, hResSt, hResVsAngle, hResVsDistFE, hResVsEta, hResVsPhi, and hResVsPos.

Referenced by DTRecHitQuality::compute().

102  {
103  // Reso, pull
104  float res = distRecHit-distSimHit;
105  if(_doall){
106  hDist->Fill(distRecHit);
107  hResVsAngle->Fill(thetaSimHit,res);
108  hResVsDistFE->Fill(distFESimHit,res);
109  }
110  hRes->Fill(res); hResSt[station-1]->Fill(res);
111  hResVsEta->Fill(etaSimHit,res);
112  hResVsPhi->Fill(phiSimHit,res);
113  hResVsPos->Fill(distSimHit,res);
114  if(errRecHit!=0) {
115  float pull=res/errRecHit;
116  hPull->Fill(pull);hPullSt[station-1]->Fill(pull);
117  if(_doall){
118  hPullVsPos->Fill(distSimHit,pull);
119  hPullVsAngle->Fill(thetaSimHit,pull);
120  hPullVsDistFE->Fill(distFESimHit,pull);
121  }
122  }
123  else std::cout<<"Error: RecHit error = 0" << std::endl;
124  }
MonitorElement * hResSt[4]
Definition: Histograms.h:144
MonitorElement * hResVsEta
Definition: Histograms.h:145
MonitorElement * hResVsDistFE
Definition: Histograms.h:149
Definition: Electron.h:4
void Fill(long long x)
MonitorElement * hPullSt[4]
Definition: Histograms.h:152
MonitorElement * hResVsAngle
Definition: Histograms.h:148
MonitorElement * hRes
Definition: Histograms.h:143
MonitorElement * hPullVsAngle
Definition: Histograms.h:154
MonitorElement * hPullVsPos
Definition: Histograms.h:153
MonitorElement * hDist
Definition: Histograms.h:142
bool _doall
Definition: Histograms.h:156
MonitorElement * hResVsPos
Definition: Histograms.h:147
MonitorElement * hResVsPhi
Definition: Histograms.h:146
MonitorElement * hPull
Definition: Histograms.h:151
MonitorElement * hPullVsDistFE
Definition: Histograms.h:155

Member Data Documentation

bool HRes1DHit::_doall
MonitorElement* HRes1DHit::hDist

Definition at line 142 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hPull

Definition at line 151 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hPullSt[4]

Definition at line 152 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hPullVsAngle

Definition at line 154 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hPullVsDistFE

Definition at line 155 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hPullVsPos

Definition at line 153 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hRes

Definition at line 143 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hResSt[4]

Definition at line 144 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hResVsAngle

Definition at line 148 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hResVsDistFE

Definition at line 149 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hResVsEta

Definition at line 145 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hResVsPhi

Definition at line 146 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

MonitorElement* HRes1DHit::hResVsPos

Definition at line 147 of file Histograms.h.

Referenced by Fill(), and HRes1DHit().

TString HRes1DHit::name