1 #ifndef Validation_RecoMuon_Histograms_H
2 #define Validation_RecoMuon_Histograms_H
109 std::string
name = hReco->GetName();
110 std::string
title = hReco->GetTitle();
114 "Efficiecny as a function of "+title,
116 hSim->GetXaxis()->GetXmin(),
117 hSim->GetXaxis()->GetXmax()
120 me->
getTH1F()->Divide(hReco,hSim,1.,1.,
"b");
123 int nBinsEta = me->
getTH1F()->GetNbinsX();
124 for(
int bin = 1;
bin <= nBinsEta;
bin++) {
125 float nSimHit = hSim->GetBinContent(
bin);
128 if(nSimHit != 0 && eff <= 1) {
129 error =
sqrt(eff*(1-eff)/nSimHit);
177 double eta = 15.;
int neta = 800;
178 double phi = 12.;
int nphi = 400;
179 double pt = 60.;
int npt = 2000;
214 double rp,
double rpt,
double reta,
double rphi,
double rcharge){
216 Fill(rp, rpt, reta, rphi, rcharge);
237 double rp,
double rpt){
251 void Fill(
double rp,
double rpt,
252 double reta,
double rphi,
double rcharge){
307 200, -2.5,2.5, 5000, -1.5,1.5);
309 200, -2.5,2.5, 5000, -1.,1.);
311 200, -2.5,2.5, 5000, -1.5,1.5);
321 10000, -750,750, 5000, -0.5,0.5);
323 10000, -740,740, 5000, -1.,1.);
325 10000, -1100,1100, 5000, -1.5,1.5);
341 double dx,
double dy,
double dz,
342 double errx,
double erry,
double errz,
345 double rx = dx/
x,
ry = dy/
y, rz = dz/
z;
364 std::cout <<
"NO proper error set for X: "<<errx<<std::endl;
371 std::cout <<
"NO proper error set for Y: "<<erry<<std::endl;
377 std::cout <<
"NO proper error set for Z: "<<errz<<std::endl;
MonitorElement * hResXVsEta
MonitorElement * h2PhiVsPt
MonitorElement * h2EtaVsPhi
void Fill(double p, double pt, double eta, double phi, double rp, double rpt, double reta, double rphi, double rcharge)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
double computeEfficiency(HTrackVariables *sim)
HResolution(std::string name, TFile *file)
void cd(void)
go to top directory (ie. root)
HTrackVariables(std::string dirName_, std::string name, std::string whereIs="")
MonitorElement * hXPullVsPos
MonitorElement * h2PhiVsEta
void Fill(double pt, double eta, double phi)
MonitorElement * hYPullVsPos
MonitorElement * hYResVsPhi
std::vector< MonitorElement * > efficiencyHistos
MonitorElement * hPhiVsGen
MonitorElement * hResYVsEta
MonitorElement * hResZVsEta
void Fill(double rp, double rpt, double reta, double rphi, double rcharge)
MonitorElement * hXResVsPos
void Fill(double p, double pt, double eta, double phi, double rp, double rpt)
MonitorElement * computeEfficiency(MonitorElement *reco, MonitorElement *sim)
MonitorElement * hZPullVsPos
MonitorElement * hPtVsGen
MonitorElement * charge()
double deltaR(double eta1, double eta2, double phi1, double phi2)
HResolution1DRecHit(TString name_, TFile *file)
void Fill(double p, double pt, double eta, double phi, double charge)
MonitorElement * hXResVsPhi
MonitorElement * hZResVsPhi
TH1F * getTH1F(void) const
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)
HResolution(std::string dirName_, std::string name, std::string whereIs)
MonitorElement * hZResVsPos
HResolution1DRecHit(std::string name)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
virtual Int_t Fill(Double_t x, Double_t y)
MonitorElement * h2PtVsEta
void setCurrentFolder(const std::string &fullpath)
void FillDeltaR(double deltaR)