From: marian Date: Mon, 16 Jun 2008 16:51:08 +0000 (+0000) Subject: Skeleton for the Laser CE analysis X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=13ba36849dfb91a40cf9d7f633da5e4b86cc318a Skeleton for the Laser CE analysis For the moment - committed just to have it under svn control (Marian) --- diff --git a/TPC/macros/AnalyzeLaser.C b/TPC/macros/AnalyzeLaser.C new file mode 100644 index 00000000000..b7c0d7986f8 --- /dev/null +++ b/TPC/macros/AnalyzeLaser.C @@ -0,0 +1,62 @@ + +gSystem->Load("libSTAT.so"); +TStatToolkit stat; +Int_t npoints; +Double_t chi2; +TVectorD vec; +TMatrixD mat; + + +TObjArray * array = AliTPCCalibViewerGUI::ShowGUI("laserTree.root"); +AliTPCCalibViewerGUI * viewer = (AliTPCCalibViewerGUI*)array->At(0); +TTree * tree = viewer->GetViewer()->GetTree(); +TFile fp("/data/calib/CalibTreePulser_run33834_Cside.root"); +tree->AddFriend(treePulser,"P."); + + +tree->SetAlias("dt","(sector%36>30)*2+(sector<36)*0.3"); +tree->SetAlias("T","T0_100_220.fElements-P..StandardTime0.fElements"); +tree->SetAlias("Tm","T0_100_220_Median.fElements"); +tree->SetAlias("Q","Q_100_220.fElements"); +tree->SetAlias("Qm","Q_100_220_Median.fElements"); + +tree->SetAlias("Qcut","abs(Q/Qm-2)<1.4&&Q>6&&Q<200"); +tree->SetAlias("Tcut","abs(T-Tm)<2"); + + + +TString strSector=""; +{ + for (Int_t isec=54;isec<71;isec+=1){ + if (isec!=64) { + strSector+="(sector=="; + strSector+=isec; + strSector+=")++"; + strSector+="(lx.fElements-195.)*(sector=="; + strSector+=isec; + strSector+=")++"; + strSector+="((lx.fElements-195)^2)*(sector=="; + strSector+=isec; + strSector+=")++"; + } + } +} + + +TCut cutA="Tcut&&Qcut&§or%36>17"; + +TString *strFitG =stat.FitPlane(tree,"T+dt","gx.fElements++gy.fElements",cutA,chi2,npoints,vec,mat); + +TString *strFitGL =stat.FitPlane(tree,"T+dt","lx.fElements++ly.fElements++gx.fElements++gy.fElements",cutA,chi2,npoints,vec,mat); + +TString *strFitGL2 =stat.FitPlane(tree,"T+dt","lx.fElements++ly.fElements++gx.fElements++gy.fElements++lx.fElements^2++ly.fElements^2",cutA,chi2,npoints,vec,mat); + +TString *strFitGLA =stat.FitPlane(tree,"T+dt",strSector+"lx.fElements++ly.fElements++gx.fElements++gy.fElements++lx.fElements^2++ly.fElements^2",cutA,chi2,npoints,vec,mat); + + +tree->SetAlias("tfitG",strFitG->Data()) +tree->SetAlias("tfitGL",strFitGL->Data()) +tree->SetAlias("tfitGL2",strFitGL2->Data()) +tree->SetAlias("tfitGLA",strFitGLA->Data()) + +