1 #ifndef Validation_RecoMuon_Histograms_H 2 #define Validation_RecoMuon_Histograms_H 110 "Efficiecny as a function of "+title,
112 hSim->GetXaxis()->GetXmin(),
113 hSim->GetXaxis()->GetXmax()
116 me->
getTH1F()->Divide(hReco,hSim,1.,1.,
"b");
119 int nBinsEta = me->
getTH1F()->GetNbinsX();
120 for(
int bin = 1;
bin <= nBinsEta;
bin++) {
121 float nSimHit = hSim->GetBinContent(
bin);
122 float eff = me->
getTH1F()->GetBinContent(
bin);
124 if(nSimHit != 0 && eff <= 1) {
125 error =
sqrt(eff*(1-eff)/nSimHit);
171 double eta = 15.;
int neta = 800;
172 double phi = 12.;
int nphi = 400;
173 double pt = 60.;
int npt = 2000;
190 h2PtVsEta = ibooker.
book2D(
theName+
"_Pt_vs_Eta"+
where,
"P_{t} "+
theName+
" as a function of #eta",200,-2.5,2.5,npt,-pt,pt);
193 h2EtaVsPt = ibooker.
book2D(
theName+
"_Eta_vs_Pt"+
where,
"#eta "+
theName+
" as a function of P_{t}",1000,0,2000,neta,-eta,eta);
196 h2PhiVsPt = ibooker.
book2D(
theName+
"_Phi_vs_Pt"+
where,
"#phi "+
theName+
" as a function of P_{t}",1000,0,2000,nphi,-phi,phi);
197 h2PhiVsEta = ibooker.
book2D(
theName+
"_Phi_vs_Eta"+
where,
"#phi "+
theName+
" as a function of #eta",200,-2.5,2.5,nphi,-phi,phi);
208 double rp,
double rpt,
double reta,
double rphi,
double rcharge){
210 Fill(rp, rpt, reta, rphi, rcharge);
213 h2Eta->Fill(eta,reta);
214 h2Phi->Fill(phi,rphi);
219 h2PtVsEta->Fill(eta,rpt);
220 h2PtVsPhi->Fill(phi,rpt);
222 h2EtaVsPt ->Fill(pt,reta);
223 h2EtaVsPhi->Fill(phi,reta);
225 h2PhiVsPt ->Fill(pt,rphi);
226 h2PhiVsEta->Fill(eta,rphi);
231 double rp,
double rpt){
241 h2PtVsEta->Fill(eta,rpt);
242 h2PtVsPhi->Fill(phi,rpt);
245 void Fill(
double rp,
double rpt,
246 double reta,
double rphi,
double rcharge){
295 hResX = ibooker.
book1D (
theName+
"_X_Res",
"X residual", 5000, -0.5,0.5);
296 hResY = ibooker.
book1D (
theName+
"_Y_Res",
"Y residual", 5000, -1.,1.);
297 hResZ = ibooker.
book1D (
theName+
"_Z_Res",
"Z residual", 5000, -1.5,1.5);
299 hResXVsEta = ibooker.
book2D(
theName+
"_XResVsEta",
"X residual vs eta",
300 200, -2.5,2.5, 5000, -1.5,1.5);
301 hResYVsEta = ibooker.
book2D(
theName+
"_YResVsEta",
"Y residual vs eta",
302 200, -2.5,2.5, 5000, -1.,1.);
303 hResZVsEta = ibooker.
book2D(
theName+
"_ZResVsEta",
"Z residual vs eta",
304 200, -2.5,2.5, 5000, -1.5,1.5);
306 hXResVsPhi = ibooker.
book2D(
theName+
"_XResVsPhi",
"X residual vs phi",
308 hYResVsPhi = ibooker.
book2D(
theName+
"_YResVsPhi",
"Y residual vs phi",
310 hZResVsPhi = ibooker.
book2D(
theName+
"_ZResVsPhi",
"Z residual vs phi",
313 hXResVsPos = ibooker.
book2D(
theName+
"_XResVsPos",
"X residual vs position",
314 10000, -750,750, 5000, -0.5,0.5);
315 hYResVsPos = ibooker.
book2D(
theName+
"_YResVsPos",
"Y residual vs position",
316 10000, -740,740, 5000, -1.,1.);
317 hZResVsPos = ibooker.
book2D(
theName+
"_ZResVsPos",
"Z residual vs position",
318 10000, -1100,1100, 5000, -1.5,1.5);
320 hXPull = ibooker.
book1D (
theName+
"_XPull",
"X pull", 600, -2,2);
321 hYPull = ibooker.
book1D (
theName+
"_YPull",
"Y pull", 600, -2,2);
322 hZPull = ibooker.
book1D (
theName+
"_ZPull",
"Z pull", 600, -2,2);
324 hXPullVsPos = ibooker.
book2D (
theName+
"_XPullVsPos",
"X pull vs position",10000, -750,750, 600, -2,2);
325 hYPullVsPos = ibooker.
book2D (
theName+
"_YPullVsPos",
"Y pull vs position",10000, -740,740, 600, -2,2);
326 hZPullVsPos = ibooker.
book2D (
theName+
"_ZPullVsPos",
"Z pull vs position",10000, -1100,1100, 600, -2,2);
334 double dx,
double dy,
double dz,
335 double errx,
double erry,
double errz,
338 double rx = dx/
x,
ry = dy/
y, rz = dz/
z;
344 hResXVsEta->Fill(eta,rx);
345 hResYVsEta->Fill(eta,ry);
346 hResZVsEta->Fill(eta,rz);
348 hXResVsPhi->Fill(phi,rx);
349 hYResVsPhi->Fill(phi,ry);
350 hZResVsPhi->Fill(phi,rz);
352 hXResVsPos->Fill(x,rx);
353 hYResVsPos->Fill(y,ry);
354 hZResVsPos->Fill(z,rz);
357 std::cout <<
"NO proper error set for X: "<<errx<<std::endl;
359 hXPull->Fill(dx/errx);
360 hXPullVsPos->Fill(x,dx/errx);
364 std::cout <<
"NO proper error set for Y: "<<erry<<std::endl;
366 hYPull->Fill(dy/erry);
367 hYPullVsPos->Fill(y,dy/erry);
370 std::cout <<
"NO proper error set for Z: "<<errz<<std::endl;
372 hZPull->Fill(dz/errz);
373 hZPullVsPos->Fill(z,dz/errz);
MonitorElement * hResXVsEta
MonitorElement * h2PhiVsPt
double computeEfficiency(HTrackVariables *sim, DQMStore::IBooker &ibooker)
MonitorElement * h2EtaVsPhi
void Fill(double p, double pt, double eta, double phi, double rp, double rpt, double reta, double rphi, double rcharge)
HResolution(DQMStore::IBooker &ibooker, std::string dirName_, std::string name, std::string whereIs)
MonitorElement * hXPullVsPos
HResolution1DRecHit(DQMStore::IBooker &ibooker, const TString &name_, TFile *file)
HResolution(DQMStore::IBooker &ibooker, std::string name, TFile *file)
HResolution1DRecHit(DQMStore::IBooker &ibooker, std::string name)
MonitorElement * h2PhiVsEta
void Fill(double pt, double eta, double phi)
MonitorElement * hYPullVsPos
MonitorElement * hYResVsPhi
std::vector< MonitorElement * > efficiencyHistos
MonitorElement * hPhiVsGen
MonitorElement * hResYVsEta
void setCurrentFolder(std::string const &fullpath)
HTrackVariables(DQMStore::IBooker &ibooker, std::string dirName_, std::string name, std::string whereIs="")
MonitorElement * hResZVsEta
MonitorElement * book1D(Args &&...args)
void Fill(double rp, double rpt, double reta, double rphi, double rcharge)
MonitorElement * computeEfficiency(MonitorElement *reco, MonitorElement *sim, DQMStore::IBooker &ibooker)
MonitorElement * hXResVsPos
void Fill(double p, double pt, double eta, double phi, double rp, double rpt)
MonitorElement * hZPullVsPos
MonitorElement * hPtVsGen
MonitorElement * charge()
bin
set the eta bin as selection string.
void Fill(double p, double pt, double eta, double phi, double charge)
MonitorElement * hXResVsPhi
MonitorElement * book2D(Args &&...args)
MonitorElement * hZResVsPhi
MonitorElement * hEtaVsGen
MonitorElement * hYResVsPos
MonitorElement * h2EtaVsPt
MonitorElement * h2PtVsPhi
void Fill(double x, double y, double z, double dx, double dy, double dz, double errx, double erry, double errz, double eta, double phi)
MonitorElement * hZResVsPos
MonitorElement * h2PtVsEta
void FillDeltaR(double deltaR)