37 #include "StFtpcLaserCalib.hh"
38 #include "StFtpcTrackMaker/StFtpcPoint.hh"
39 #include "StFtpcTrackMaker/StFtpcTrack.hh"
40 #include "StFtpcTrackMaker/StFtpcVertex.hh"
41 #include "TObjArray.h"
45 const Float_t rad2grad=180/TMath::Pi();
48 static Double_t funcxz(
float x,
float z,Double_t *par);
49 static Double_t funcyz(
float y,
float z,Double_t *par);
50 static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
56 static Float_t z[11],x[11],y[11];
57 static Float_t ex[11],ey[11];
61 StFtpcLaserCalib::StFtpcLaserCalib()
63 mMinuit=
new TMinuit(4);
70 StFtpcLaserCalib::StFtpcLaserCalib(
int ftpc,
int lsec,
int straight,
int gfit,
int minz,
int maxz,
int minrad,
int maxrad,
float gt0,
float ggas,
float gTemp,
StFtpcLaserTrafo *trafo,
StarMagField *gmagf)
80 mMinuit=
new TMinuit(4);
101 Double_t funcxz(
float x,
float z,Double_t *par)
104 return x-(par[0]*z+par[1]);
108 Double_t funcyz(
float y,
float z,Double_t *par)
110 return y-(par[2]*z+par[3]);
116 void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
123 Double_t deltaxz, deltayz;
126 for (i=0;i<nhits; i++)
130 deltaxz=funcxz(x[i],z[i],par)/ex[i];
131 deltayz=funcyz(y[i],z[i],par)/ey[i];
132 chisq += (deltaxz*deltaxz+deltayz*deltayz);
141 bool StFtpcLaserCalib::cut(
int i)
143 LOG_DEBUG<<
"StFtpcLaserCalib::cut i "<<i<<
" z "<< z[i]<<
" MINZ "<<MINZ<<
" MAXZ "<<MAXZ<<
" radius "<<radius[i]<<
" MINRAD "<<MINRAD<<
" MAXRAD "<<MAXRAD<<
" laser_sector "<<hsec[i]<<endm;
144 if ((z[i]>MINZ && z[i]<MAXZ) && (radius[i]>MINRAD && radius[i]<MAXRAD) && laser_sector(FTPC,LSEC,hsec[i]) )
152 void StFtpcLaserCalib::minuit_init()
156 mMinuit->SetPrintLevel(-1);
157 mMinuit->SetFCN(&fcn);
162 mMinuit->mnexcm(
"SET ERR", arglist ,1,ierflg);
168 void StFtpcLaserCalib::minuit_set_par()
170 mMinuit->SetPrintLevel(-1);
173 Double_t vstart[4] = {1,1,1,1};
176 Double_t step[4] = {0.1,0.1,0.1,0.1};
177 mMinuit->mnparm(0,
"mxz", vstart[0], step[0], 0,0,ierflg);
178 mMinuit->mnparm(1,
"bxz", vstart[1], step[1], 0,0,ierflg);
179 mMinuit->mnparm(2,
"myz", vstart[2], step[2], 0,0,ierflg);
180 mMinuit->mnparm(3,
"byz", vstart[3], step[3], 0,0,ierflg);
186 void StFtpcLaserCalib::minuit_print()
189 Double_t amin,edm,errdef;
190 Int_t nvpar,nparx,icstat;
191 LOG_INFO<<
"StFtpcLaserCalib::minuit_print():"<<endm;
192 mMinuit->mnstat(amin,edm,errdef,nvpar,nparx,icstat);
193 mMinuit->mnprin(5,amin);
200 void StFtpcLaserCalib::calc_res()
206 TF1 *fxz=
new TF1(
"fxz",
"[0]*x+[1]",0,6);
207 TF1 *fyz=
new TF1(
"fyz",
"[0]*x+[1]",0,6);
211 for (
int i=0;i<4;i++)
213 mMinuit->GetParameter(i,v,ev);
214 if (i<2) fxz->SetParameter(i,v);
215 else fyz->SetParameter(i-2,v);
222 htrcharge->Fill(trcharge);
225 hinvp->Fill(1/p*trcharge);
226 hinvpt->Fill(1/pt*trcharge);
229 for (
int i=0;i<nhits;i++)
231 calcx[i]=fxz->Eval(z[i]);
232 calcy[i]=fyz->Eval(z[i]);
236 resx[i]=(x[i]-fxz->Eval(z[i]));
237 resy[i]=(y[i]-fyz->Eval(z[i]));
238 calcrad[i]=sqrt(fxz->Eval(z[i])*fxz->Eval(z[i])+fyz->Eval(z[i])*fyz->Eval(z[i]));
240 rpol[i]=sqrt(fxz->Eval(zfieldcage)*fxz->Eval(zfieldcage)+fyz->Eval(zfieldcage)*fyz->Eval(zfieldcage));
242 rpol[i]=sqrt(fxz->Eval(-zfieldcage)*fxz->Eval(-zfieldcage)+fyz->Eval(-zfieldcage)*fyz->Eval(-zfieldcage));
243 calcphi[i]=zyltrafo(fxz->Eval(z[i]),fyz->Eval(z[i]),z[i]);
244 resrad[i]=radius[i]-calcrad[i];
245 resphi[i]=(phi[i]-calcphi[i])*Rad2Grad;
256 int StFtpcLaserCalib::laser_fit(
int getnhits)
263 for (
int i=0;i<nhits;i++)
267 fillarray(x[i],y[i],z[i],ex[i],ey[i],new_nhits,hsec[i],ppos[i],ppossigma[i],softsec[i],softrow[i],timepos[i],padl[i],timel[i],maxadc[i],charge[i]);
287 for (
int i=0;i<nhits;i++)
293 if (mtrafo->padtrans(softrow[i],softsec[i],timepos[i],ppos[i],&x[i],&y[i]))
296 radius[i]=sqrt(x[i]*x[i]+y[i]*y[i]);
298 phi[i]=zyltrafo(x[i],y[i],z[i]);
301 LOG_ERROR<<
"ERROR padtrans !"<<endm;
321 TObjArray *mTrackHits=
new TObjArray(0);
324 for (
int i=0;i<nhits;i++)
327 StFtpcPoint *mNewPoint=
new StFtpcPoint(softrow[i],softsec[i],0,0,0,0,0,0,0,0,x[i],y[i],z[i],ex[i],ey[i],0,0,0,0);
328 mTrackHits->AddLast(mNewPoint);
330 mLaserTrack->AddPoint((
StFtpcPoint*) mTrackHits->Last());
343 mLaserTrack->Fit(laser_vertex,10.,
false);
344 if (mLaserTrack->GetP() == 0 && mLaserTrack->GetPt() == 0) {
353 trcharge=mLaserTrack->GetCharge();
354 p=mLaserTrack->GetP();
355 pt=mLaserTrack->GetPt();
360 for (
int i=0;i<nhits;i++)
363 resx2[i]=((
StFtpcPoint*) mTrackHits->At(i))->GetXGlobResidual();
364 resy2[i]=((
StFtpcPoint*) mTrackHits->At(i))->GetYGlobResidual();
365 resrad2[i]=((
StFtpcPoint*) mTrackHits->At(i))->GetRGlobResidual();
366 resphi2[i]=((
StFtpcPoint*) mTrackHits->At(i))->GetPhiGlobResidual();
394 x_d[i]=x[i]-x_s[i];y_d[i]=y[i]-y_s[i];
415 for (
int i=0;i<nhits;i++)
433 mMinuit->mnexcm(
"MIGRAD", arglist , 2 ,ierflg);
442 for (
int i=0;i<nhits;i++)
449 LOG_ERROR<<
"StFtpcLaserCalib::laser_fit - Number cluster on tracks = 0 !"<<endm;
462 void StFtpcLaserCalib::defl_angle_transv()
464 TSpectrum *specrad=
new TSpectrum();
467 LOG_INFO<<
"*******************************"<<endm;
468 for (
int i=0;i<specrad->Search(hrad,2.5);i++)
470 LOG_INFO<<
"Radius "<<i<<
" : "<<specrad->GetPositionX()[i]<<endm;
472 LOG_INFO<<
"*******************************"<<endm;
478 void StFtpcLaserCalib::defl_histograms_st()
482 for (
int i=1;i<11;i++)
484 sprintf(name,
"rad_l%d",i);
485 sprintf(name2,
"pad_l%d",i);
488 hpadcut[i]=
new TH1F(name2,name2,200,105,125);
489 hradcut[i]=
new TH1F(name,name,(
int)((radcutmaxst[i]-radcutminst[i])/0.1),radcutminst[i],radcutmaxst[i]);
493 hpadcut[i]=
new TH1F();
494 hradcut[i]=
new TH1F();
501 void StFtpcLaserCalib::defl_histograms()
505 for (
int i=1;i<11;i++)
507 sprintf(name,
"rad_l%d",i);
508 sprintf(name2,
"pad_l%d",i);
510 hpadcut[i]=
new TH1F(name2,name2,300,120,150);
511 hradcut[i]=
new TH1F(name,name,(
int)((radcutmax[i]-radcutmin[i])/0.1),radcutmin[i],radcutmax[i]);
518 void StFtpcLaserCalib::extrapol_histograms()
522 for (
int i=1;i<4;i++)
524 sprintf(name,
"radpol_l%d",i);
525 hradpolcut[i]=
new TH1F(name,name,(
int)((radcutmaxst[i]-radcutminst[i])/0.025),radcutminst[i],radcutmaxst[i]);
531 void StFtpcLaserCalib::fill_extrapol_histograms(
float getradpol)
533 for (
int i=1;i<4;i++)
535 if (getradpol>radcutminst[i] && getradpol<radcutmaxst[i])
537 ((TH1F*) hradpolcut[i])->Fill(getradpol);
544 void StFtpcLaserCalib::fill_defl_histograms(
float getrad,
float getpadpos)
546 for (
int i=1;i<11;i++)
548 if (getrad>radcutmin[i] && getrad<radcutmax[i])
550 ((TH1F*) hradcut[i])->Fill(getrad);
551 ((TH1F*) hpadcut[i])->Fill(getpadpos);
560 void StFtpcLaserCalib::fill_defl_histograms_st(
float getrad,
float getpadpos)
562 for (
int i=1;i<4;i++)
564 if (getrad>radcutminst[i] && getrad<radcutmaxst[i])
566 ((TH1F*) hradcut[i])->Fill(getrad);
567 ((TH1F*) hpadcut[i])->Fill(getpadpos);
575 void StFtpcLaserCalib::analyse_defl()
577 ofstream padfile,padfile2;
578 padfile.open(filename+
"_padpos.log",ios::out);
579 padfile2.open(filename+
"_padpos2.log",ios::out);
582 padfile<<
"Padposition and radius with mean of histograms :"<<endl;
583 padfile<<
"------------------------------------------------"<<endl;
585 padfile<<
"radius [cm] | padposition"<<endl;
586 padfile<<
"-------------------------"<<endl;
589 for (
int i=1;i<11;i++)
591 if (((TH1F*) hradcut[i])->GetEntries()>0)
593 padfile<<((TH1F*) hradcut[i])->GetMean()<<
"+-"<<((TH1F*) hradcut[i])->GetRMS()<<
" ";
594 padfile<<((TH1F*) hpadcut[i])->GetMean()<<
"+-"<<((TH1F*) hpadcut[i])->GetRMS()<<endl;
595 padfile2<<((TH1F*) hradcut[i])->GetMean()<<
" "<<((TH1F*) hradcut[i])->GetRMS()<<
" ";
596 padfile2<<((TH1F*) hpadcut[i])->GetMean()<<
" "<<((TH1F*) hpadcut[i])->GetRMS()<<endl;
602 padfile<<
"Padposition and radius with mean of gausfit :"<<endl;
603 padfile<<
"------------------------------------------------"<<endl;
605 padfile<<
"radius [cm] | padposition"<<endl;
606 padfile<<
"-------------------------"<<endl;
610 TF1 *gausfit3=
new TF1(
"gausfit3",
"gaus");
612 for (
int i=1;i<11;i++)
614 if (((TH1F*) hradcut[i])->GetEntries()>0)
616 ((TH1F*) hradcut[i])->Fit(
"gausfit3",
"NQ");
617 padfile<<gausfit3->GetParameter(1)<<
"+-"<<gausfit3->GetParameter(2)<<
" ";
618 padfile2<<gausfit3->GetParameter(1)<<
" "<<gausfit3->GetParameter(2)<<
" ";
619 ((TH1F*) hpadcut[i])->Fit(
"gausfit3",
"NQ");
620 padfile<<gausfit3->GetParameter(1)<<
"+-"<<gausfit3->GetParameter(2)<<endl;
621 padfile2<<gausfit3->GetParameter(1)<<
" "<<gausfit3->GetParameter(2)<<endl;
634 void StFtpcLaserCalib::PositionLog()
638 logfile.open(filename+
".log",ios::out);
640 TSpectrum *spec=
new TSpectrum();
644 for (
int i=0;i<spec->Search(hrad,6);i++)
647 logfile<<
"Radius after Peakfinder : "<<(spec->GetPositionX())[i]<<endl;
650 float min=(spec->GetPositionX()[i]-1);
651 float max=(spec->GetPositionX()[i]+1);
652 TF1 *gausfit=
new TF1(
"gausfit",
"gaus",min,max);
653 gausfit->SetParameter(1,(spec->GetPositionX())[i]);
655 hrad->Fit(gausfit,
"RQN");
657 logfile<<
"Radius after Gausfit : "<<gausfit->GetParameter(1)<<
" +- "<<gausfit->GetParameter(2)<<endl;
663 for (
int i=0;i<spec->Search(hphi,6);i++)
666 logfile<<
"Phi after Peakfinder : "<<(spec->GetPositionX())[i]<<endl;
669 float min=(spec->GetPositionX()[i]-0.5);
670 float max=(spec->GetPositionX()[i]+0.5);
671 TF1 *gausfit2=
new TF1(
"gausfit2",
"gaus",min,max);
672 gausfit2->SetParameter(1,(spec->GetPositionX())[i]);
673 hphi->Fit(gausfit2,
"RQN");
675 logfile<<
"Phi after Gausfit : "<<gausfit2->GetParameter(1)<<
" +- "<<gausfit2->GetParameter(2)<<endl;
683 void StFtpcLaserCalib::fillarray(
float tx,
float ty,
float tz,
float tex,
float tey,
int n,
int nsec,
float gppos,
float gppossigma,
int gsoftsec,
int gsoftrow,
float gtimepos,
float getpadl,
float gettimel,
float getmaxadc,
float getcharge)
686 radius[n]=sqrt(tx*tx+ty*ty);
687 phi[n]=zyltrafo(tx,ty,tz);
696 ppossigma[n]=gppossigma;
710 void StFtpcLaserCalib::Fill(
int l)
712 hrad->Fill(radius[l]);
713 hradpol->Fill(rpol[l]);
714 hphi->Fill(phi[l]*rad2grad);
715 hcalcrad->Fill(calcrad[l]);
716 hcalcphi->Fill(calcphi[l]);
717 hphiz->Fill(z[l],phi[l]);
718 hradz->Fill(z[l],radius[l]);
719 hresx->Fill(resx[l]);
720 hresy->Fill(resy[l]);
721 hresrad->Fill(resrad[l]);
722 hresphi->Fill(resphi[l]);
723 hresrad2->Fill(resrad[l],radius[l]);
724 hresphi2->Fill(resphi[l],radius[l]);
725 hresx2->Fill(resx[l],radius[l]);
726 hresy2->Fill(resy[l],radius[l]);
729 hhresx->Fill(resx2[l]);
730 hhresy->Fill(resy2[l]);
731 hhresrad->Fill(resrad2[l]);
732 hhresphi->Fill(resphi2[l]*rad2grad);
733 hhresrad2->Fill(resrad2[l],radius[l]);
734 hhresphi2->Fill(resphi2[l]*rad2grad,radius[l]);
735 hhresx2->Fill(resx2[l],radius[l]);
736 hhresy2->Fill(resy2[l],radius[l]);
740 htime->Fill(timepos[l]);
741 hpadrad->Fill(radius[l],ppos[l]);
742 hpadsigma->Fill(ppossigma[l]);
743 hpadl->Fill(padl[l]);
744 htimel->Fill(timel[l]);
745 hcharge->Fill(charge[l]);
746 hmaxadc->Fill(maxadc[l]);
749 hbdiffx->Fill(x_d[l]);
750 hbdiffy->Fill(y_d[l]);
753 if (STRAIGHT==0 || STRAIGHT==3)
754 fill_defl_histograms(radius[l],ppos[l]);
755 else if (STRAIGHT==1)
756 fill_defl_histograms_st(radius[l],ppos[l]);
758 fill_extrapol_histograms(rpol[l]);
764 void StFtpcLaserCalib::MakePs()
766 LOG_INFO<<
"Create "<<filename+
".ps"<<endm;
768 gStyle->SetPalette(1);
770 TCanvas *c1 =
new TCanvas(
"c1",
"ps",200,10,700,500);
771 TPostScript *fps=
new TPostScript(filename+
".ps",112);
783 hradz->DrawCopy(
"box");
791 TF1 *gfit=
new TF1(
"gfit",
"gaus",-0.5,0.5);
792 gfit->FixParameter(1,0.0);
795 gfit->SetLineColor(2);
796 gfit->SetLineWidth(1);
799 logfile.open(filename+
"_res.log",ios::out);
802 hresx->Fit(gfit,
"QR");
803 logfile<<deltat0<<
" "<<deltagas<<
" "<<deltaTemp<<
" "<<gfit->GetParameter(2)<<
" "<<gfit->GetChisquare()<<endl;
806 hresy->Fit(gfit,
"QR");
807 logfile<<deltat0<<
" "<<deltagas<<
" "<<deltaTemp<<
" "<<gfit->GetParameter(2)<<
" "<<gfit->GetChisquare()<<endl;
810 hresrad->Fit(gfit,
"QR");
811 logfile<<deltat0<<
" "<<deltagas<<
" "<<deltaTemp<<
" "<<gfit->GetParameter(2)<<
" "<<gfit->GetChisquare()<<endl;
814 hresphi->Fit(gfit,
"QR");
815 logfile<<deltat0<<
" "<<deltagas<<
" "<<deltaTemp<<
" "<<gfit->GetParameter(2)<<
" "<<gfit->GetChisquare()<<endl;
822 hresrad2->DrawCopy(
"colz");
824 hresphi2->DrawCopy(
"colz");
830 hresx2->DrawCopy(
"colz");
832 hresy2->DrawCopy(
"colz");
842 hpadrad->DrawCopy(
"colz");
844 hpadsigma->DrawCopy();
848 for (
int i=1;i<4;i++)
851 ((TH1F*) hradpolcut[i])->DrawCopy();
852 logfile<<deltat0<<
" "<<deltagas<<
" "<<deltaTemp<<
" "<<((TH1F*) hradpolcut[i])->GetMean()<<
" "<<((TH1F*) hradpolcut[i])->GetRMS()<<endl;
853 logfile<<deltat0<<
" "<<deltagas<<
" "<<deltaTemp<<
" "<<(((TH1F*) hradpolcut[i])->GetXaxis())->GetBinCenter(((TH1F*) hradpolcut[i])->GetMaximumBin())<<endl;
858 c1->cd(1);hpadl->DrawCopy();
859 c1->cd(2);htimel->DrawCopy();
860 c1->cd(3);hmaxadc->DrawCopy();
861 c1->cd(4);hcharge->DrawCopy();
867 c1->cd(1);hinvp->DrawCopy();hinvp->Fit(gfit,
"QR");
868 c1->cd(2);hinvpt->DrawCopy();hinvpt->Fit(gfit,
"QR");
869 c1->cd(3);hbdiffx->DrawCopy();
870 c1->cd(4);hbdiffy->DrawCopy();
873 gfit->SetLineColor(3);
878 hhresx->Fit(gfit,
"QR");
881 hhresy->Fit(gfit,
"QR");
883 hhresrad->DrawCopy();
884 hhresrad->Fit(gfit,
"QR");
886 hhresphi->DrawCopy();
887 hhresphi->Fit(gfit,
"QR");
892 hhresrad2->DrawCopy(
"colz");
894 hhresphi2->DrawCopy(
"colz");
896 hhresx2->DrawCopy(
"colz");
898 hhresy2->DrawCopy(
"colz");
904 hresx->SetLineColor(2);
905 hresx->DrawCopy(
"same");
908 hresy->SetLineColor(2);
909 hresy->DrawCopy(
"same");
911 hhresrad->DrawCopy();
912 hresrad->SetLineColor(2);
913 hresrad->DrawCopy(
"same");
915 hhresphi->DrawCopy();
916 hresphi->SetLineColor(2);
917 hresphi->DrawCopy(
"same");
928 void StFtpcLaserCalib::MakeOutput(TString eingabe,
char* t0,
char* gas,
float gastemp)
933 std::string dTstring = dT.str();
934 const char *dTemp = dTstring.c_str();
942 eingabe +=
"all_lsec";
949 else if (STRAIGHT==0)
951 else if (STRAIGHT==2)
953 else if (STRAIGHT==3)
956 eingabe +=
"_dt"; eingabe +=t0;
957 eingabe +=
"_dg"; eingabe +=gas;
958 eingabe +=
"_dT"; eingabe +=dTemp;
962 LOG_INFO<<
"Create file : "<<filename+
".root"<<endm;
963 outfile=
new TFile(filename+
".root",
"RECREATE");
965 hrad=
new TH1F(
"rad",
"radius (straight) laser tracks",124*8,0.5,31.5);
966 hradpol=
new TH1F(
"radpol",
"radius laser tracks extrapoliert fieldcage",124*8,0.5,31.5);
968 hphi=
new TH1F(
"phi",
"phi laser tracks",360*4,-90,270);
969 hcalcrad=
new TH1F(
"clacrad",
"calc radius",124*8,0.5,31.5);
970 hcalcphi=
new TH1F(
"calcphi",
"calc phi",48*8,-6,6);
971 hcalcrad->SetLineColor(2);hcalcphi->SetLineColor(2);
975 hradz=
new TH2F(
"radz",
"radius (straight) laser tracks",100,140,275,124*4,0.5,31.5);
976 hphiz=
new TH2F(
"phiz",
"phi (straight) laser tracks",100,140,275,48*2,0,4);
980 hradz=
new TH2F(
"radz",
"radius (straight) laser tracks",100,-275,-140,124*4,0.5,31.5);
981 hphiz=
new TH2F(
"phiz",
"phi (straight) laser tracks",100,-275,-140,48*2,0,4);
985 hradz=
new TH2F(
"radz",
"radius (straight) laser tracks",200,-275,275,124*4,0.5,31.5);
986 hphiz=
new TH2F(
"phiz",
"phi (straight) laser tracks",200,-275,275,48*2,0,4);
989 Int_t r_vs_z_bin=124/2;
991 hresx=
new TH1F(
"resx",
"Residual x",100,-0.5,0.5);
992 hresy=
new TH1F(
"resy",
"Residual y",100,-0.5,0.5);
993 hresrad=
new TH1F(
"resrad",
"Residual radius",100,-0.5,0.5);
994 hresphi=
new TH1F(
"resphi",
"Residual phi",100,-0.5,0.5);
995 hresx2=
new TH2F(
"resx2",
"Residual x vs.radius",100,-0.5,0.5,r_vs_z_bin,0.5,31.5);
996 hresx2->SetMinimum(0);
997 hresy2=
new TH2F(
"resy2",
"Residual y vs. radius",100,-0.5,0.5,r_vs_z_bin,0.5,31.5);
998 hresy2->SetMinimum(0);
999 hresrad2=
new TH2F(
"resrad2",
"Residual radius vs.radius",100,-0.5,0.5,r_vs_z_bin,0.5,31.5);
1000 hresrad2->SetMinimum(0);
1001 hresphi2=
new TH2F(
"resphi2",
"Residual phi vs. radius",100,-0.5,0.5,r_vs_z_bin,0.5,31.5);
1002 hresphi2->SetMinimum(0);
1003 hpad=
new TH1F(
"pados",
"Padposition",1600,0,160);
1004 htime=
new TH1F(
"timepos",
"Timeposition",1800,0,180);
1005 hpadrad=
new TH2F(
"radpados",
"Padposition vs. radius",r_vs_z_bin,0.5,31.5,1600,0,160);
1006 hpadsigma=
new TH1F(
"padsigma",
"Sigma padposition",50,0,5);
1008 hmaxadc=
new TH1F(
"maxadc",
"MaxAdc",150,0.5,150.5);
1009 hcharge=
new TH1F(
"charge",
"Charge",300,0.5,1500.5);
1010 hpadl=
new TH1F(
"padl",
"Padlength",15,0.5,15.5);
1011 htimel=
new TH1F(
"timel",
"Timelength",20,0.5,20.5);
1013 hnhits=
new TH1F(
"nhits",
"Number hits on laser track",8,3.5,11.5);
1016 htrcharge=
new TH1F(
"trcharge",
"Charge of Helix Fit",3,-1.5,1.5);
1017 hp=
new TH1F(
"p",
"p Helix Fit",100, -0.5, 0.5);
1018 hpt=
new TH1F(
"pt",
"pt Helix Fit",100, -0.5, 0.5);
1019 hinvp=
new TH1F(
"invp",
"1/p * charge of Helix Fit",100, -0.5, 0.5);
1020 hinvpt=
new TH1F(
"invpt",
"1/pt * charge of Helix Fit",50, -0.5, 0.5);
1022 hhresx=
new TH1F(
"hresx",
"Residual x Helix Fit",100,-0.5,0.5);
1023 hhresy=
new TH1F(
"hrresy",
"Residual y Helix Fit",100,-0.5,0.5);
1024 hhresrad=
new TH1F(
"hrresrad",
"Residual radius Helix Fit",100,-0.5,0.5);
1025 hhresphi=
new TH1F(
"hresphi",
"Residual phi Helix Fit",100,-0.5,0.5);
1026 hhresrad2=
new TH2F(
"hresrad2",
"Residual radius vs.radius Helix Fit",100,-0.5,0.5,r_vs_z_bin,0.5,31.5);
1027 hhresphi2=
new TH2F(
"hresphi2",
"Residual phi vs. radius Helix Fit",100,-0.5,0.5,r_vs_z_bin,0.5,31.5);
1028 hhresx2=
new TH2F(
"hresx2",
"Residual x vs.radius Helix Fit",100,-0.5,0.5,r_vs_z_bin,0.5,31.5);
1029 hhresy2=
new TH2F(
"hresy2",
"Residual y vs. radius Helix Fit",100,-0.5,0.5,r_vs_z_bin,0.5,31.5);
1031 hbdiffx=
new TH1F(
"bdiffx",
"Differenz x and B-field corr. x",100,-0.01,0.01);
1032 hbdiffy=
new TH1F(
"bdiffy",
"Differenz y and B-field corr. y",100,-0.01,0.01);
1041 defl_histograms_st();
1044 extrapol_histograms();
1051 StFtpcLaserCalib::~StFtpcLaserCalib()
1062 delete hrad;
delete hradpol;
delete hphi;
delete hcalcrad;
1063 delete hcalcphi;
delete hradz;
delete hphiz;
1064 delete hresx;
delete hresy;
delete hresphi;
delete hresrad;
delete hresrad2;
1065 delete hresphi2;
delete hpad;
delete hpadrad;
delete hpadsigma;
delete htime;
1068 delete hhresx;
delete hhresy;
delete hhresphi;
delete hhresrad;
delete hhresrad2;
delete hhresphi2;
1070 delete hp;
delete hpt;
delete hinvp;
delete hinvpt;
1071 delete hhresx2;
delete hhresy2;
1072 delete hresx2;
delete hresy2;
1073 delete hbdiffx;
delete hbdiffy;
1079 for (
int i=1;i<4;i++)
1080 {
delete hpadcut[i];
delete hradcut[i];}
1084 for (
int i=1;i<11;i++)
1085 {
delete hpadcut[i];
delete hradcut[i];}