1 #ifndef RecoLocalMuon_Histograms_H
2 #define RecoLocalMuon_Histograms_H
38 hDist=0;
hDist = dbe_->
book1D(pre +
"_hDist" ,
"1D RHit distance from wire", 100, 0,2.5);
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);
59 hResVsPos = 0;
hResVsPos = dbe_->
book2D(pre+
"_hResVsPos",
"1D RHit residual vs position",100, 0, 2.5, 150, -0.5,0.5);
95 void Fill(
float distSimHit,
104 float res = distRecHit-distSimHit;
115 float pull=res/errRecHit;
123 else std::cout<<
"Error: RecHit error = 0" << std::endl;
240 hEffVsEta->SetTitle(
"1D RecHit Efficiency as a function of Eta");
246 for(
int bin = 1;
bin <= nBinsEta;
bin++) {
247 float nSimHit = hEffEtaMuSimHit->GetBinContent(
bin);
251 error =
sqrt(eff*(1-eff)/nSimHit);
259 hEffVsPhi->SetTitle(
"1D RecHit Efficiency as a function of Phi");
264 for(
int bin = 1;
bin <= nBinsPhi;
bin++) {
265 float nSimHit = hEffPhiMuSimHit->GetBinContent(
bin);
269 error =
sqrt(eff*(1-eff)/nSimHit);
277 hEffVsDist->SetTitle(
"1D RecHit Efficiency as a function of Dist");
282 for(
int bin = 1;
bin <= nBinsDist;
bin++) {
283 float nSimHit = hEffDistMuSimHit->GetBinContent(
bin);
287 error =
sqrt(eff*(1-eff)/nSimHit);
338 hRecAngle=0;
hRecAngle = dbe_->
book1D (pre+
"_hRecAngle",
"Distribution of Rec segment angles;angle (rad)",100, -1.5, 1.5);
339 hSimAngle=0;
hSimAngle = dbe_->
book1D (pre+
"_hSimAngle",
"Distribution of segment angles from SimHits;angle (rad)",100, -1.5, 1.5);
343 100, -3.2, 3.2, 150, -0.2, 0.2);
345 100, -2.5, 2.5, 150, -0.2, 0.2);
347 100, -3.2, 3.2, 150, -0.2, 0.2);
350 "Residual on 2D segment position vs Residual on 2D segment angle;angle (rad);res (cm)",
351 100, -0.3, 0.3, 150, -0.2, 0.2);
355 hResAngle=0;
hResAngle = dbe_->
book1D (pre+
"_hResAngle",
"Residual on 2D segment angle;angle_{rec}-angle_{sim} (rad)", 50, -0.01, 0.01);
357 hResPos=0;
hResPos = dbe_->
book1D (pre+
"_hResPos",
"Residual on 2D segment position (x at SL center);x_{rec}-x_{sim} (cm)",
361 hPullAngle=0;
hPullAngle = dbe_->
book1D (pre+
"_hPullAngle",
"Pull on 2D segment angle;(angle_{rec}-angle_{sim})/#sigma (rad)", 150, -5, 5);
362 hPullPos=0;
hPullPos = dbe_->
book1D (pre+
"_hPullPos",
"Pull on 2D segment position (x at SL center);(x_{rec}-x_{sim} (cm))/#sigma",
388 void Fill(
float angleSimSegment,
389 float angleRecSegment,
397 float resAngle = angleRecSegment-angleSimSegment;
399 float resPos = posRecSegment-posSimSegment;
554 hEffVsEta->SetTitle(
"2D RecHit Efficiency as a function of Eta");
559 for(
int bin = 1;
bin <= nBinsEta;
bin++) {
560 float nSimHit = hEffEtaSimSegm->GetBinContent(
bin);
564 error =
sqrt(eff*(1-eff)/nSimHit);
572 hEffVsPhi->SetTitle(
"2D RecHit Efficiency as a function of Phi");
577 for(
int bin = 1;
bin <= nBinsPhi;
bin++) {
578 float nSimHit = hEffPhiSimSegm->GetBinContent(
bin);
582 error =
sqrt(eff*(1-eff)/nSimHit);
591 hEffVsPos->SetTitle(
"2D RecHit Efficiency as a function of position in SL");
595 for(
int bin = 1;
bin <= nBinsPos;
bin++) {
596 float nSimHit = hEffPosSimSegm->GetBinContent(
bin);
600 error =
sqrt(eff*(1-eff)/nSimHit);
608 hEffVsAngle->SetTitle(
"2D RecHit Efficiency as a function of angle");
613 for(
int bin = 1;
bin <= nBinsAngle;
bin++) {
614 float nSimHit = hEffAngleSimSegm->GetBinContent(
bin);
618 error =
sqrt(eff*(1-eff)/nSimHit);
675 hRecAlpha=0;
hRecAlpha = dbe_->
book1D (pre+
"_hRecAlpha",
"4D RecHit alpha (RPhi) distribution;#alpha^{x} (rad)", 100, -1.5, 1.5);
676 hRecBeta=0;
hRecBeta = dbe_->
book1D (pre+
"_hRecBeta",
"4D RecHit beta distribution:#alpha^{y} (rad)", 100, -1.5, 1.5);
678 hSimAlpha=0;
hSimAlpha = dbe_->
book1D(pre+
"_hSimAlpha",
"4D segment from SimHit alpha (RPhi) distribution;i#alpha^{x} (rad)",
680 hSimBeta=0;
hSimBeta = dbe_->
book1D(pre+
"_hSimBeta",
"4D segment from SimHit beta distribution;#alpha^{y} (rad)",
683 100, -1.5, 1.5, 100, -1.5, 1.5);
685 100, -1.5, 1.5, 100, -1.5, 1.5);
688 "4D RecHit residual on #alpha_x direction vs eta;#eta;#alpha^{x}_{rec}-#alpha^{x}_{sim} (rad)",
689 100, -2.5, 2.5, 100, -0.025, 0.025);
691 "4D RecHit residual on #alpha_x direction vs phi (rad);#phi (rad);#alpha^{x}_{rec}-#alpha^{x}_{sim} (rad)",
692 100, -3.2, 3.2, 100, -0.025, 0.025);
694 "4D RecHit residual on beta direction vs eta;#eta;#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)",
695 100, -2.5, 2.5, 200, -0.2, 0.2);
697 "4D RecHit residual on beta direction vs phi;#phi (rad);#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)",
698 100, -3.2, 3.2, 200, -0.2, 0.2);
700 hResXVsEta=0;
hResXVsEta = dbe_->
book2D (pre+
"_hResXVsEta",
"4D RecHit residual on position (x) in chamber vs eta;#eta;x_{rec}-x_{sim} (cm)",
701 100, -2.5, 2.5, 150, -0.3, 0.3);
702 hResXVsPhi=0;
hResXVsPhi= dbe_->
book2D (pre+
"_hResXVsPhi",
"4D RecHit residual on position (x) in chamber vs phi;#phi (rad);x_{rec}-x_{sim} (cm)",
703 100, -3.2, 3.2, 150, -0.3, 0.3);
705 hResYVsEta=0;
hResYVsEta = dbe_->
book2D (pre+
"_hResYVsEta",
"4D RecHit residual on position (y) in chamber vs eta;#eta;y_{rec}-y_{sim} (cm)",
706 100, -2.5, 2.5, 150, -0.6, 0.6);
707 hResYVsPhi=0;
hResYVsPhi = dbe_->
book2D (pre+
"_hResYVsPhi",
"4D RecHit residual on position (y) in chamber vs phi;#phi (rad);y_{rec}-y_{sim} (cm)",
708 100, -3.2, 3.2, 150, -0.6, 0.6);
711 200, -0.3, 0.3, 500, -0.15, 0.15);
713 150, -0.6, 0.6, 50, -0.3, 0.3);
715 150, -0.3, 0.3, 500, -0.15, 0.15);
718 150, -0.6, 0.6, 500, -0.15, 0.15);
722 hSimBetaRZ=0;
hSimBetaRZ = dbe_->
book1D(pre+
"_hSimBetaRZ",
"4D segment from SimHit beta distribution in RZ SL;#alpha^{y} (rad)",
725 100, -1.5, 1.5, 100, -1.5, 1.5);
728 "4D RecHit residual on beta direction vs eta;#eta in RZ SL;#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)",
729 100, -2.5, 2.5, 200, -0.2, 0.2);
731 "4D RecHit residual on beta direction vs phi in RZ SL;#phi (rad);#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)",
732 100, -3.2, 3.2, 200, -0.2, 0.2);
734 "4D RecHit residual on position (y) in chamber vs eta in RZ SL;#eta;y_{rec}-y_{sim} (cm)",
735 100, -2.5, 2.5, 150, -0.6, 0.6);
737 "4D RecHit residual on position (y) in chamber vs phi in RZ SL;#phi (rad);y_{rec}-y_{sim} (cm)",
738 100, -3.2, 3.2, 150, -0.6, 0.6);
741 "4D RecHit pull on #alpha_x direction vs eta;#eta;(#alpha^{x}_{rec}-#alpha^{x}_{sim})/#sigma",
742 100, -2.5, 2.5, 100, -5, 5);
744 "4D RecHit pull on #alpha_x direction vs phi (rad);#phi (rad);(#alpha^{x}_{rec}-#alpha^{x}_{sim})/#sigma",
745 100, -3.2, 3.2, 100, -5, 5);
747 "4D RecHit pull on beta direction vs eta;#eta;(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma",
748 100, -2.5, 2.5, 200, -5, 5);
750 "4D RecHit pull on beta direction vs phi;#phi (rad);(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma",
751 100, -3.2, 3.2, 200, -5, 5);
753 "4D RecHit pull on position (x) in chamber vs eta;#eta;(x_{rec}-x_{sim})#sigma",
754 100, -2.5, 2.5, 150, -5, 5);
756 "4D RecHit pull on position (x) in chamber vs phi;#phi (rad);(x_{rec}-x_{sim})/#sigma",
757 100, -3.2, 3.2, 150, -5, 5);
759 "4D RecHit pull on position (y) in chamber vs eta;#eta;(y_{rec}-y_{sim})/#sigma",
760 100, -2.5, 2.5, 150, -5, 5);
762 "4D RecHit pull on position (y) in chamber vs phi;#phi (rad);(y_{rec}-y_{sim})/#sigma",
763 100, -3.2, 3.2, 150, -5, 5);
765 "4D RecHit pull on beta direction vs eta;#eta in RZ SL;(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma",
766 100, -2.5, 2.5, 200, -5, 5);
768 "4D RecHit pull on beta direction vs phi in RZ SL;#phi (rad);(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma",
769 100, -3.2, 3.2, 200, -5, 5);
771 "4D RecHit pull on position (y) in chamber vs eta in RZ SL;#eta;(y_{rec}-y_{sim})/#sigma",
772 100, -2.5, 2.5, 150, -5, 5);
774 "4D RecHit pull on position (y) in chamber vs phi in RZ SL;#phi (rad);(y_{rec}-y_{sim})/#sigma",
775 100, -3.2, 3.2, 150, -5, 5);
780 "4D RecHit residual on #alpha_x direction;#alpha^{x}_{rec}-#alpha^{x}_{sim} (rad)",
784 "4D RecHit residual on beta direction;#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)",
786 hResX=0;
hResX = dbe_->
book1D (pre+
"_hResX",
"4D RecHit residual on position (x) in chamber;x_{rec}-x_{sim} (cm)",
788 hResY=0;
hResY = dbe_->
book1D (pre+
"_hResY",
"4D RecHit residual on position (y) in chamber;y_{rec}-y_{sim} (cm)", 150, -0.6, 0.6);
793 "4D RecHit residual on beta direction in RZ SL;#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)",
797 "4D RecHit residual on position (y) in chamber in RZ SL;y_{rec}-y_{sim} (cm)",
804 "4D RecHit pull on #alpha_x direction;(#alpha^{x}_{rec}-#alpha^{x}_{sim})/#sigma",
807 "4D RecHit pull on beta direction;(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma",
811 "4D RecHit pull on position (x) in chamber;(x_{rec}-x_{sim})#sigma",
815 "4D RecHit pull on position (y) in chamber;(y_{rec}-y_{sim})/#sigma", 150, -5, 5);
818 "4D RecHit pull on beta direction in RZ SL;(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma",
822 "4D RecHit pull on position (y) in chamber in RZ SL;(y_{rec}-y_{sim})/#sigma",
829 ht0 = dbe_->
book2D(pre+
"_ht0",
"t0", 200,-25,25,200,-25,25);
834 void Fill(
float simDirectionAlpha,
835 float recDirectionAlpha,
836 float simDirectionBeta,
837 float recDirectionBeta,
859 float resAlpha = recDirectionAlpha - simDirectionAlpha;
862 float resBeta = recDirectionBeta - simDirectionBeta;
865 float resX = recX - simX;
868 float resY = recY - simY;
873 float resBetaRZ = recBetaRZ - simBetaRZ;
876 float resYRZ = recYRZ - simYRZ;
1027 hXRecHit=0;
hXRecHit = dbe_->
book1D(pre+
"_hXRecHit",
"X position in Chamber of SimHit segment with 4D RecHit (cm)",
1033 hYRecHit=0;
hYRecHit = dbe_->
book1D(pre+
"_hYRecHit",
"Y position in Chamber of SimHit segment with 4D RecHit (cm)",
1049 hNSeg =0;
hNSeg = dbe_->
book1D(pre+
"_hNSeg",
"Number of rec segment per sim seg",
1092 hEffVsEta->SetTitle(
"4D RecHit Efficiency as a function of Eta");
1096 for(
int bin = 1;
bin <= nBinsEta;
bin++) {
1097 float nSimHit = hEffEtaSimSegm->GetBinContent(
bin);
1101 error =
sqrt(eff*(1-eff)/nSimHit);
1109 hEffVsPhi->SetTitle(
"4D RecHit Efficiency as a function of Phi");
1113 for(
int bin = 1;
bin <= nBinsPhi;
bin++) {
1114 float nSimHit = hEffPhiSimSegm->GetBinContent(
bin);
1118 error =
sqrt(eff*(1-eff)/nSimHit);
1126 hEffVsX->SetTitle(
"4D RecHit Efficiency as a function of x position in Chamber");
1127 hEffVsX->Divide(hEffXSimSegm);
1129 int nBinsX =
hEffVsX->GetNbinsX();
1130 for(
int bin = 1;
bin <= nBinsX;
bin++) {
1131 float nSimHit = hEffXSimSegm->GetBinContent(
bin);
1135 error =
sqrt(eff*(1-eff)/nSimHit);
1144 hEffVsY->SetTitle(
"4D RecHit Efficiency as a function of y position in Chamber");
1145 hEffVsY->Divide(hEffYSimSegm);
1147 int nBinsY =
hEffVsY->GetNbinsX();
1148 for(
int bin = 1;
bin <= nBinsY;
bin++) {
1149 float nSimHit = hEffYSimSegm->GetBinContent(
bin);
1153 error =
sqrt(eff*(1-eff)/nSimHit);
1161 hEffVsAlpha->SetTitle(
"4D RecHit Efficiency as a function of alpha");
1165 for(
int bin = 1;
bin <= nBinsAlpha;
bin++) {
1166 float nSimHit = hEffAlphaSimSegm->GetBinContent(
bin);
1170 error =
sqrt(eff*(1-eff)/nSimHit);
1179 hEffVsBeta->SetTitle(
"4D RecHit Efficiency as a function of beta");
1183 for(
int bin = 1;
bin <= nBinsBeta;
bin++) {
1184 float nSimHit = hEffBetaSimSegm->GetBinContent(
bin);
1188 error =
sqrt(eff*(1-eff)/nSimHit);
HEff4DHit(std::string name_, DQMStore *dbe_)
MonitorElement * hPullAlpha
MonitorElement * hResPosVsEta
MonitorElement * hPullAngle
MonitorElement * hPullPos
MonitorElement * hAlphaRecHit
MonitorElement * hSimAlpha
MonitorElement * hResBetaVsPhi
void Fill(float distSimHit, float etaSimHit, float phiSimHit, bool fillRecHit)
MonitorElement * hResYVsEta
void Fill(float etaSimSegm, float phiSimSegm, float xSimSegm, float ySimSegm, float alphaSimSegm, float betaSimSegm, bool fillRecHit, int nSeg)
HEff2DHit(std::string name_, DQMStore *dbe_)
MonitorElement * hResSt[4]
HRes4DHit(std::string name_, DQMStore *dbe_, bool doall=true, bool local=true)
MonitorElement * hResVsEta
MonitorElement * hEtaRecHit
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * hBetaSimSegm
MonitorElement * hRecVsSimBeta
void Fill(float distSimHit, float thetaSimHit, float distFESimHit, float distRecHit, float etaSimHit, float phiSimHit, float errRecHit, int station)
MonitorElement * hPhiMuSimHit
MonitorElement * hXRecHit
MonitorElement * hResVsDistFE
MonitorElement * hResBeta
MonitorElement * hSimAngle
MonitorElement * hResAlphaVsResX
MonitorElement * hPullXVsEta
MonitorElement * hEtaSimSegm
MonitorElement * hHitMult
MonitorElement * hResXVsEta
MonitorElement * hResAlphaVsEta
MonitorElement * hPhiRecHit
MonitorElement * hSimBetaRZ
MonitorElement * hResAngleVsPhi
MonitorElement * hPullBeta
MonitorElement * hResAlphaVsPhi
MonitorElement * hPosRecHit
HRes2DHit(std::string name_, DQMStore *dbe_, bool doall=true, bool local=true)
MonitorElement * hPhiSimSegm
MonitorElement * hEtaSimSegm
MonitorElement * hResBetaVsEtaRZ
MonitorElement * hRecVsSimAngle
MonitorElement * hPullBetaVsEtaRZ
MonitorElement * hPullYVsPhi
MonitorElement * hPullSt[4]
MonitorElement * hPhiRecHit
void Fill(float simDirectionAlpha, float recDirectionAlpha, float simDirectionBeta, float recDirectionBeta, float simX, float recX, float simY, float recY, float simEta, float simPhi, float recYRZ, float simYRZ, float recBetaRZ, float simBetaRZ, float sigmaAlpha, float sigmaBeta, float sigmaX, float sigmaY, float sigmaBetaRZ, float sigmaYRZ, int nHitsPhi, int nHitsTheta, float t0Phi, float t0Theta)
MonitorElement * hAngleSimSegm
MonitorElement * hResBetaVsEta
MonitorElement * hRecAlpha
MonitorElement * hResBetaRZ
MonitorElement * hEtaRecHit
MonitorElement * hResVsAngle
MonitorElement * hResYVsPhi
MonitorElement * hResBetaVsPhiRZ
MonitorElement * hRecVsSimBetaRZ
A set of histograms for efficiency 4D RecHits.
void Fill(float angleSimSegment, float angleRecSegment, float posSimSegment, float posRecSegment, float etaSimSegment, float phiSimSegment, float sigmaPos, float sigmaAngle)
MonitorElement * hResAlphaVsResBeta
MonitorElement * hResAngle
MonitorElement * hPullBetaVsPhiRZ
MonitorElement * hRecBeta
MonitorElement * hRecVsSimAlpha
A set of histograms of residuals and pulls for 1D RecHits.
MonitorElement * hSimBeta
MonitorElement * hPullAlphaVsPhi
MonitorElement * hResYVsPhiRZ
MonitorElement * hRecBetaRZ
MonitorElement * hPullYVsPhiRZ
MonitorElement * hPullBetaVsPhi
MonitorElement * hPullYVsEta
MonitorElement * hPullVsAngle
MonitorElement * hBetaRecHit
MonitorElement * hPullYRZ
MonitorElement * hPullVsPos
MonitorElement * hAlphaSimSegm
MonitorElement * hPhiRecHit
MonitorElement * hYSimSegm
HRes1DHit(std::string name_, DQMStore *dbe_, bool doall=true, bool local=true)
void Fill(float etaSimSegm, float phiSimSegm, float posSimSegm, float angleSimSegm, bool fillRecHit)
MonitorElement * hRecAngle
MonitorElement * hPosSimSegm
MonitorElement * hPullAlphaVsEta
MonitorElement * hPullYVsEtaRZ
MonitorElement * hDistRecHit
MonitorElement * hResVsPos
MonitorElement * hAngleRecHit
MonitorElement * hPhiSimSegm
MonitorElement * hYRecHit
MonitorElement * hPullBetaRZ
MonitorElement * hResAlpha
MonitorElement * hResXVsResY
MonitorElement * hEtaRecHit
MonitorElement * hResYVsEtaRZ
HEff1DHit(std::string name_, DQMStore *dbe_)
MonitorElement * hResXVsPhi
MonitorElement * hXSimSegm
MonitorElement * hDistMuSimHit
MonitorElement * hPullXVsPhi
MonitorElement * hResPosVsPhi
MonitorElement * hResVsPhi
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
MonitorElement * hResAlphaVsResY
MonitorElement * hResPosVsResAngle
MonitorElement * hResAngleVsEta
MonitorElement * hPullBetaVsEta
MonitorElement * hEtaMuSimHit
void setCurrentFolder(const std::string &fullpath)
MonitorElement * hPullVsDistFE