From 35d81915c653c2f4d0aee4f5e64bf934bea27ffb Mon Sep 17 00:00:00 2001 From: dberzano Date: Tue, 3 Feb 2015 16:54:58 +0100 Subject: [PATCH] doxy: TPC/CalibMacros --- TPC/CalibMacros/AliTPCCorrectionDemo.C | 54 +++--- TPC/CalibMacros/AliTPCDistortionFun.C | 112 +++++------ TPC/CalibMacros/AnalyzeLaserCE.C | 213 ++++++++++----------- TPC/CalibMacros/CalibAlign.C | 126 ++++++------ TPC/CalibMacros/CalibAlignKalman.C | 181 ++++++++---------- TPC/CalibMacros/CalibClParam.C | 22 +-- TPC/CalibMacros/CalibClParamNew.C | 112 +++++------ TPC/CalibMacros/CalibCosmic.C | 99 +++++----- TPC/CalibMacros/CalibKalman.C | 19 +- TPC/CalibMacros/CalibLaserExBscan.C | 78 ++++---- TPC/CalibMacros/CalibLaserVscan.C | 166 ++++++++-------- TPC/CalibMacros/CalibPID.C | 90 +++++---- TPC/CalibMacros/CalibQA.C | 32 ++-- TPC/CalibMacros/CalibTime.C | 52 ++--- TPC/CalibMacros/CalibTimeGain.C | 71 ++++--- TPC/CalibMacros/CosmicPerformance.C | 81 ++++---- TPC/CalibMacros/CreateGainMap.C | 65 +++---- TPC/CalibMacros/CreateIonTailObject.C | 33 ++-- TPC/CalibMacros/CreateRefMap.C | 12 +- TPC/CalibMacros/DriftKalman.C | 5 +- TPC/CalibMacros/FitAlignCombined.C | 198 +++++++++---------- TPC/CalibMacros/FitRodShift.C | 251 ++++++++++++------------ TPC/CalibMacros/MakeAlignCalPad.C | 166 ++++++++-------- TPC/CalibMacros/MakeGlobalFit.C | 66 +++---- TPC/CalibMacros/MakeLookup.C | 90 ++++----- TPC/CalibMacros/RegisterCorrection.C | 253 ++++++++++++------------- TPC/CalibMacros/distortionMapDraw.C | 18 +- TPC/CalibMacros/driftITSTPC.C | 34 ++-- TPC/CalibMacros/makeOCDBTPC.C | 7 +- doxygen/Doxyfile.in | 3 +- 30 files changed, 1267 insertions(+), 1442 deletions(-) mode change 100755 => 100644 TPC/CalibMacros/CreateIonTailObject.C diff --git a/TPC/CalibMacros/AliTPCCorrectionDemo.C b/TPC/CalibMacros/AliTPCCorrectionDemo.C index 7579670be54..58065e5b79f 100644 --- a/TPC/CalibMacros/AliTPCCorrectionDemo.C +++ b/TPC/CalibMacros/AliTPCCorrectionDemo.C @@ -1,7 +1,9 @@ -/* - gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/ -I$ALICE_ROOT/include -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TPC -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TRD -I$ALICE_ROOT/TOF -I$ALICE_ROOT/RAW -I$ALICE_ROOT/STAT"); +/// \file AliTPCCorrectionDemo.C +/// +/// ~~~{.cpp} +/// gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/ -I$ALICE_ROOT/include -I$ALICE_ROOT/STEER -I$ALICE_ROOT/TPC -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TRD -I$ALICE_ROOT/TOF -I$ALICE_ROOT/RAW -I$ALICE_ROOT/STAT"); +/// ~~~ - */ #if !defined(__CINT__) || defined(__MAKECINT__) #include "THnSparse.h" #include "TLatex.h" @@ -44,23 +46,21 @@ void AliTPCCorrectionDemo() { - // - // This is a Demo function of the general class AliTPCCorrection, which is used for - // general space point correction due to different effects. - // The effects used in this Demo are: - // 1. ExB twist - general offset of the TPC axis in comparison to the B field axis - // 2. GG error (Gating Grid volt. error) - not perfectly aligned GG voltage (in terms of voltage) - // 3. ExBBShape - B field shape correction of the secound order - // - // See class descriptions for further details - // - // Authors: Magnus Mager, Stefan Rossegger, Jim Thomas - // - // - // omegaTau (wt) of the langevin equation - // This is a function of the drift vel., the magnetic and electric field - // e.g. vd=2.6 cm/usc; Ez=400 V/cm; Bz=0.5 T - // wt = -10.0*(Bz*10)*vd/Ez = -0.325 + /// This is a Demo function of the general class AliTPCCorrection, which is used for + /// general space point correction due to different effects. + /// The effects used in this Demo are: + /// 1. ExB twist - general offset of the TPC axis in comparison to the B field axis + /// 2. GG error (Gating Grid volt. error) - not perfectly aligned GG voltage (in terms of voltage) + /// 3. ExBBShape - B field shape correction of the secound order + /// + /// See class descriptions for further details + /// + /// Authors: Magnus Mager, Stefan Rossegger, Jim Thomas + /// + /// omegaTau (wt) of the langevin equation + /// This is a function of the drift vel., the magnetic and electric field + /// e.g. vd=2.6 cm/usc; Ez=400 V/cm; Bz=0.5 T + /// wt = -10.0*(Bz*10)*vd/Ez = -0.325 Double_t vdrift = 2.6; // [cm/us] // to be updated: per second (ideally) Double_t bzField = -0.5; // [Tesla] // to be updated: per run @@ -107,9 +107,8 @@ void AliTPCCorrectionDemo() { void MakeDistortionMap(){ - // - // make distortiona map example for specific transformation - // + /// make distortiona map example for specific transformation + Int_t run=0; TTreeSRedirector *pcstream = new TTreeSRedirector("distort.root"); Double_t vdrift = 2.6; // [cm/us] // to be updated: per second (ideally) @@ -172,9 +171,8 @@ void MakeDistortionMap(){ } void DrawDistortionMap(){ - // - // Example -drawing of distortion maps - // + /// Example -drawing of distortion maps + TFile f("distort.root"); TTree * fitDistorttwistX001= (TTree*)f.Get("fitDistorttwistX001"); TTree * fitDistortggoffsetA50C50=(TTree*)f.Get("fitDistortggoffsetA50C50"); @@ -212,9 +210,7 @@ void DrawDistortionMap(){ void TestVertex(){ - // - // - // .x ConfigCalibTrain.C(120829) + /// .x ConfigCalibTrain.C(120829) AliTPCComposedCorrection * corrC = ( AliTPCComposedCorrection *)AliTPCcalibDB::Instance()->GetTPCComposedCorrection(0.5); AliTPCCorrection * corrT = (AliTPCCorrection *)corrC->GetCorrections()->FindObject("exb_twist"); diff --git a/TPC/CalibMacros/AliTPCDistortionFun.C b/TPC/CalibMacros/AliTPCDistortionFun.C index 4f0502ba3be..2d538537770 100644 --- a/TPC/CalibMacros/AliTPCDistortionFun.C +++ b/TPC/CalibMacros/AliTPCDistortionFun.C @@ -1,53 +1,47 @@ -/* - Simple compiled macro for declaration of static distortion function - on top of the AliTPCDistortion class. - Why: - 1. Use static function in the fitting procedure - 2. Usage in TFormual, TF1, Tf2 ... for visualization. - 3. Usage in tree->Draw() for visualization - 4. Simple visualization of fit residuals in multidemension - using tree Draw functionality - - - - Usage: - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC"); - .L $ALICE_ROOT/TPC/CalibMacros/AliTPCDistortions.cxx+ - .L $ALICE_ROOT/TPC/CalibMacros/AliTPCDistortionFun.C+ - - Example: - // - // Draw integrated distortion in local x - // - TF2 fdistIFCXvZX("fdistIFCXvZX","GetIFCDistortion(y,0,x,0)*sign(x)",-250,250,80,250); - fdistIFCXvZX.SetNpx(200); - fdistIFCXvZX.SetNpy(200); - fdistIFCXvZX.GetXaxis()->SetTitle("Z (cm)"); - fdistIFCXvZX.GetYaxis()->SetTitle("local X (cm)"); - fdistIFCXvZX->Draw("colz"); - // - // Draw local distortion angle dx/dz in mrad - // - TF2 fangleIFCXvZX("fangleIFCXvZX","1000*(GetIFCDistortion(y,0,x,0)-GetIFCDistortion(y,0,x-1,0))",-250,250,85,245); - fangleIFCXvZX.SetNpx(200); - fangleIFCXvZX.SetNpy(200); - fangleIFCXvZX.GetXaxis()->SetTitle("Z (cm)"); - fangleIFCXvZX.GetYaxis()->SetTitle("local X (cm)"); - fangleIFCXvZX->Draw("colz"); - - // - // - // - TF2 fangleGGXvZX("fangleGGXvZX","1000*(GetGGDistortion(y,0,x,0,1*400,1*400)-GetGGDistortion(y,0,x-1,0,1*400,1*400))*sign(x)",-250,250,85,245); - fangleGGXvZX.SetNpx(200); - fangleGGXvZX.SetNpy(200); - fangleGGXvZX.GetXaxis()->SetTitle("Z (cm)"); - fangleGGXvZX.GetYaxis()->SetTitle("local X (cm)"); - fangleGGXvZX->Draw("colz"); - - - -*/ - +/// \file AliTPCDistortionFun.C +/// +/// Simple compiled macro for declaration of static distortion function +/// on top of the AliTPCDistortion class. +/// Why: +/// 1. Use static function in the fitting procedure +/// 2. Usage in TFormual, TF1, Tf2 ... for visualization. +/// 3. Usage in tree->Draw() for visualization +/// 4. Simple visualization of fit residuals in multidemension - using tree Draw functionality +/// +/// Usage: +/// ~~~ +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC"); +/// .L $ALICE_ROOT/TPC/CalibMacros/AliTPCDistortions.cxx+ +/// .L $ALICE_ROOT/TPC/CalibMacros/AliTPCDistortionFun.C+ +/// ~~~ +/// +/// Example: +/// +/// ~~~{.cpp} +/// // Draw integrated distortion in local x +/// +/// TF2 fdistIFCXvZX("fdistIFCXvZX","GetIFCDistortion(y,0,x,0)*sign(x)",-250,250,80,250); +/// fdistIFCXvZX.SetNpx(200); +/// fdistIFCXvZX.SetNpy(200); +/// fdistIFCXvZX.GetXaxis()->SetTitle("Z (cm)"); +/// fdistIFCXvZX.GetYaxis()->SetTitle("local X (cm)"); +/// fdistIFCXvZX->Draw("colz"); +/// +/// // Draw local distortion angle dx/dz in mrad +/// TF2 fangleIFCXvZX("fangleIFCXvZX","1000*(GetIFCDistortion(y,0,x,0)-GetIFCDistortion(y,0,x-1,0))",-250,250,85,245); +/// fangleIFCXvZX.SetNpx(200); +/// fangleIFCXvZX.SetNpy(200); +/// fangleIFCXvZX.GetXaxis()->SetTitle("Z (cm)"); +/// fangleIFCXvZX.GetYaxis()->SetTitle("local X (cm)"); +/// fangleIFCXvZX->Draw("colz"); +/// +/// TF2 fangleGGXvZX("fangleGGXvZX","1000*(GetGGDistortion(y,0,x,0,1*400,1*400)-GetGGDistortion(y,0,x-1,0,1*400,1*400))*sign(x)",-250,250,85,245); +/// fangleGGXvZX.SetNpx(200); +/// fangleGGXvZX.SetNpy(200); +/// fangleGGXvZX.GetXaxis()->SetTitle("Z (cm)"); +/// fangleGGXvZX.GetYaxis()->SetTitle("local X (cm)"); +/// fangleGGXvZX->Draw("colz"); +/// ~~~ #include "TCanvas.h" #include "TF1.h" @@ -57,7 +51,8 @@ TObjArray *arrayPic=new TObjArray; Double_t GetIFCDistortion(Double_t lx, Double_t ly, Double_t lz, Int_t icoord, Double_t shift=1.){ - // + /// + static AliTPCDistortions transform; static Bool_t doInit=kTRUE; if (doInit){ @@ -79,9 +74,8 @@ Double_t GetIFCDistortion(Double_t lx, Double_t ly, Double_t lz, Int_t icoord, D Double_t GetGGDistortion(Double_t lx, Double_t ly, Double_t lz, Int_t icoord, Double_t deltaVGGA=1., Double_t deltaVGGC=1.){ - // - // GG distortion induced distortions - // + /// GG distortion induced distortions + static AliTPCDistortions transform; static Bool_t doInit=kTRUE; if (doInit){ @@ -104,9 +98,8 @@ Double_t GetGGDistortion(Double_t lx, Double_t ly, Double_t lz, Int_t icoord, Do void MakePicIFCDX(){ - // - // - // + /// + TCanvas *canvasIFC1D= new TCanvas("IFC radial shift", "IFC radial shift"); TLegend *legend = new TLegend(0.1,0.60,0.5,0.9, "Radial distortion due IFC shift 1 mm "); @@ -126,9 +119,8 @@ void MakePicIFCDX(){ } void MakePicIFCDXangle(){ - // - // - // + /// + TCanvas *canvasIFC1D= new TCanvas("IFC radial shift - angle", "IFC radial shift angle"); TLegend *legend = new TLegend(0.1,0.60,0.9,0.9, "Radial distortion due IFC shift 1 mm "); diff --git a/TPC/CalibMacros/AnalyzeLaserCE.C b/TPC/CalibMacros/AnalyzeLaserCE.C index a9dc2b7206d..af12f5da0d0 100644 --- a/TPC/CalibMacros/AnalyzeLaserCE.C +++ b/TPC/CalibMacros/AnalyzeLaserCE.C @@ -1,82 +1,79 @@ -/* +/// \file AnalyzeLaserCE.C +/// +/// Macro to perform fits of the Laser Central electrode data +/// Several fit methods implemented +/// +/// 0. RebuildCE("ce.root","pul.root"); - rebuild data from the scratch +/// - the data will be storered in file inname +/// +/// 1. RebuildData() - transform arbitrary layout of the Input data to the internal format +/// StoreData(); - The data tree expected in file inname (see variable bellow) +/// StoreTree(); - Modify inname and xxside and tcor in order to transform data +/// +/// +/// 2. MakeFit(); - Make a fit of the data - already in internal format +/// StoreData(); - Store +/// StoreTree(); +/// +/// 3. MakeRes(); - Make the final calibration + combination of different components +/// +/// 4. LoadViewer(); - Browse the fit parameters +/// +/// ~~~ +/// .x ~/rootlogon.C +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC -I$ALICE_ROOT/STAT"); +/// gSystem->Load("libSTAT"); +/// .L $ALICE_ROOT/TPC/CalibMacros/AnalyzeLaserCE.C+ +/// +/// // setup aliases +/// +/// qaside="CE_Q"; +/// taside="CE_T"; +/// raside="CE_RMS"; +/// qcside="CE_Q"; +/// tcside="CE_T"; +/// rcside="CE_RMS"; +/// ~~~ +/// +/// Calibration viewer variables: +/// +/// Result - resulting correction +/// out - outlyers not used for fit +/// tcor - offset specified by user before fitting +/// timeF1 - sector local fit - plane +/// timeF2 - sector local fit - parabola +/// timeIn - input times +/// qIn - input charge +/// out - outlyers not used for fit +/// tcor - offset specified by user before fitting +/// timeF1 - sector time local fit - plane +/// timeF2 - sector time local fit - parabola +/// qF1 - sector q local fit - plane +/// qF2 - sector q local fit - parabola +/// +/// fitted values +/// ffit0 - base fit +/// ffit1 - adding common shifts - alpha dependendent +/// ffit2 - adding opposite shifts - alpha dependent +/// +/// fGXY - global fit parameter - XY +/// fInOut - global fit parameter - inner-outer sector matching +/// fLX - global LX dependence +/// +/// Gloabl fit o consist of +/// -fGXY~-fLX~-fTL~-fOff~:ffit0~ +/// +/// +/// Control variable - check results +/// +/// ffit2~-(timeIn~):lx~ - fit value minus input time +/// +/// result cosntruction: +/// (timeF2~-ffit2~+fTL~+fInOut~):Result~ +/// +/// timeF2~-Result~:ffit2~-fTL~-fInOut~ -Macro to perform fits of the Laser Central electrode data -Several fit methods implemented -0. RebuildCE("ce.root","pul.root"); - rebuild data from the scratch - - the data will be storered in file inname - -1. RebuildData() - transform arbitrary layout of the Input data to the internal format - StoreData(); - The data tree expected in file inname (see variable bellow) - StoreTree(); - Modify inname and xxside and tcor in order to transform data - - -2. MakeFit(); - Make a fit of the data - already in internal format - StoreData(); - Store - StoreTree(); - -3. MakeRes(); - Make the final calibration + combination of different components - -4. LoadViewer(); - Browse the fit parameters - - -.x ~/rootlogon.C -gSystem->AddIncludePath("-I$ALICE_ROOT/TPC -I$ALICE_ROOT/STAT"); -gSystem->Load("libSTAT"); -.L $ALICE_ROOT/TPC/CalibMacros/AnalyzeLaserCE.C+ - -// setup aliases -qaside="CE_Q"; -taside="CE_T"; -raside="CE_RMS"; -qcside="CE_Q"; -tcside="CE_T"; -rcside="CE_RMS"; - - - - -Calibration viewer variables: - -Result - resulting correction -out - outlyers not used for fit -tcor - offset specified by user before fitting -timeF1 - sector local fit - plane -timeF2 - sector local fit - parabola -timeIn - input times -qIn - input charge -out - outlyers not used for fit -tcor - offset specified by user before fitting -timeF1 - sector time local fit - plane -timeF2 - sector time local fit - parabola -qF1 - sector q local fit - plane -qF2 - sector q local fit - parabola -// fitted values -// -ffit0 - base fit -ffit1 - adding common shifts - alpha dependendent -ffit2 - adding opposite shifts - alpha dependent -// -fGXY - global fit parameter - XY -fInOut - global fit parameter - inner-outer sector matching -fLX - global LX dependence -// -Gloabl fit o consist of --fGXY~-fLX~-fTL~-fOff~:ffit0~ - -// -// Control variable - check results -// -// -ffit2~-(timeIn~):lx~ - fit value minus input time - -result cosntruction: -(timeF2~-ffit2~+fTL~+fInOut~):Result~ -// -timeF2~-Result~:ffit2~-fTL~-fInOut~ - - -*/ #include #include "TString.h" #include "TSystem.h" @@ -178,9 +175,8 @@ void StoreTree(); // store fit data in the output tree void AnalyzeLaser(){ - // - // - // + /// + LoadViewer(); MakeAliases1(); } @@ -212,8 +208,8 @@ void MakeFitPulser(){ } void MakeFit(){ - // - // + /// + LoadData(); //LoadViewer(); // @@ -383,9 +379,8 @@ void MakeFit(){ void LoadViewer(){ - // - // Load calib Viewer - // + /// Load calib Viewer + TObjArray * array = AliTPCCalibViewerGUI::ShowGUI(fname); viewer = (AliTPCCalibViewerGUI*)array->At(0); makePad = viewer->GetViewer(); @@ -399,9 +394,8 @@ void LoadViewer(){ void RebuildData(){ - // - // transform the input data to the fit format - // + /// transform the input data to the fit format + TStopwatch timer; makePad = new AliTPCCalibViewer(inname); tree = makePad->GetTree(); @@ -477,9 +471,8 @@ void RebuildData(){ } void LoadData(){ - // - // Get Data - // + /// Get Data + TFile f(oname); calPadIn = (AliTPCCalPad*)f.Get("timeIn"); // original time pad calPadF1 = (AliTPCCalPad*)f.Get("timeF1"); // original time pad - fit plane @@ -505,9 +498,8 @@ void LoadData(){ } void StoreData(){ - // - // Store data - // + /// Store data + TFile * fstore = new TFile(oname,"recreate"); if (calPadIn) calPadIn->Write("timeIn"); // original time pad if (calPadF1) calPadF1->Write("timeF1"); // original time pad - fit plane @@ -535,9 +527,8 @@ void StoreData(){ } void StoreTree(){ - // - // - // + /// + AliTPCPreprocessorOnline * preprocesor = new AliTPCPreprocessorOnline; // if (calPadIn) preprocesor->AddComponent(calPadIn->Clone()); @@ -567,9 +558,8 @@ void StoreTree(){ void MakeAliases0(){ - // - // Define variables and selection of outliers - for user defined tree - // + /// Define variables and selection of outliers - for user defined tree + tree->SetAlias("tcor",tcor.Data()); // correction variable tree->SetAlias("ta",taside+".fElements"); tree->SetAlias("tc",tcside+".fElements"); @@ -596,9 +586,8 @@ void MakeAliases0(){ void MakeAliases1(){ - // - // Define variables and selection of outliers -for default usage - // + /// Define variables and selection of outliers -for default usage + tree->SetAlias("tcor","tcor.fElements"); // correction variable tree->SetAlias("side","1-(sector%36>17)*2"); tree->SetAlias("dt","timeIn.fElements"); @@ -622,9 +611,8 @@ void MakeAliases1(){ void MakeRes() { - // - // make final calibration - // + /// make final calibration + AliTPCCalPad * calPadRes0 =new AliTPCCalPad(*calPadIn); calPadRes0->Add(calPad2,-1); // remove global fit calPadRes = calPadRes0->GlobalFit("Result", calPadOut,kTRUE,1,0.9); @@ -652,10 +640,10 @@ void MakeRes() void RebuildCE(char *finname, char *pulname){ - // - // Transformation from the CE to the visualization-analisys output - // - // finname = CE_Vscan_Run_61684-50_170.root; + /// Transformation from the CE to the visualization-analisys output + /// + /// finname = CE_Vscan_Run_61684-50_170.root; + TFile f(finname); AliTPCCalibCE * ce = (AliTPCCalibCE*)f.Get("AliTPCCalibCE"); // @@ -703,9 +691,8 @@ void AnalyzeLaserCE(){ void AddFiles(char *list){ - // - // prepare viewer for data sets - // + /// prepare viewer for data sets + fstream finput; finput.open(list, ios_base::in); // diff --git a/TPC/CalibMacros/CalibAlign.C b/TPC/CalibMacros/CalibAlign.C index 420a9be95f7..6a503eb7036 100644 --- a/TPC/CalibMacros/CalibAlign.C +++ b/TPC/CalibMacros/CalibAlign.C @@ -1,31 +1,31 @@ -/* - .x ~/UliStyle.C - .x ~/rootlogon.C - gSystem->Load("libSTAT"); - gSystem->Load("libANALYSIS"); - gSystem->Load("libTPCcalib"); - gSystem->Load("libSTAT"); - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); - - - - gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+") - AliXRDPROOFtoolkit tool; - TChain * chainCosmic = tool.MakeChain("cosmic.txt","Track0",0,1000000); - chainCosmic->Lookup(); - chainCosmic->SetProof(kTRUE); - TChain * chainTr = tool.MakeChain("align.txt","Tracklet",0,10200); - chainTr->Lookup(); - //chainTr->SetProof(kTRUE); - // - // - // - .L $ALICE_ROOT/TPC/CalibMacros/CalibAlign.C - SetAlias(); - InitCutsAlign(); - MakeAlign(); +/// \file CalibAlign.C +/// +/// ~~~{.cpp} +/// .x ~/UliStyle.C +/// .x ~/rootlogon.C +/// gSystem->Load("libSTAT"); +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libTPCcalib"); +/// gSystem->Load("libSTAT"); +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); +/// +/// +/// +/// gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+") +/// AliXRDPROOFtoolkit tool; +/// TChain * chainCosmic = tool.MakeChain("cosmic.txt","Track0",0,1000000); +/// chainCosmic->Lookup(); +/// chainCosmic->SetProof(kTRUE); +/// TChain * chainTr = tool.MakeChain("align.txt","Tracklet",0,10200); +/// chainTr->Lookup(); +/// //chainTr->SetProof(kTRUE); +/// +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibAlign.C +/// SetAlias(); +/// InitCutsAlign(); +/// MakeAlign(); +/// ~~~ -*/ /* #include "TMath.h" #include "TFile.h" @@ -40,15 +40,12 @@ #include "AliTPCcalibAlign.h" */ - - AliTPCcalibAlign align; TChain * chainTr; void SetAlias(){ - // - // - // + /// + chainTr->SetAlias("dP0","tp1.fP[0]-tp2.fP[0]"); chainTr->SetAlias("dP1","tp1.fP[1]-tp2.fP[1]"); chainTr->SetAlias("dP2","tp1.fP[2]-tp2.fP[2]"); @@ -100,7 +97,8 @@ void SetAlias(){ void InitCutsAlign(){ - // resolution cuts + /// resolution cuts + TCut cutS0("sqrt(tp2.fC[0]+tp2.fC[0])<0.2"); TCut cutS1("sqrt(tp2.fC[2]+tp2.fC[2])<0.2"); TCut cutS2("sqrt(tp2.fC[5]+tp2.fC[5])<0.01"); @@ -134,9 +132,8 @@ void MakeAlign(){ } void MakeCompareAlign(){ - // - // - // + /// + TFile falignTreeNoMag("/lustre_alpha/alice/miranov/rec/LHC08d/nomag/alignTree.root"); TTree * treeAlignNoMag = (TTree*)falignTreeNoMag.Get("Align"); TFile falignTree("alignTree.root"); @@ -150,8 +147,8 @@ TMatrixD * arrayAlign[72]; TMatrixD * arrayAlignTmp[72]; void ClearMatrices(){ - // - // + /// + for (Int_t i=0;i<72; i++) { TMatrixD * mat = new TMatrixD(4,4); mat->UnitMatrix(); @@ -162,9 +159,8 @@ void ClearMatrices(){ } void GlobalAlign(){ - // - // Global Align - // + /// Global Align + TTreeSRedirector *cstream = new TTreeSRedirector("galign.root"); for (Int_t iter=0; iter<10;iter++){ @@ -225,9 +221,8 @@ void GlobalAlign(){ void MakeGlobalCorr(){ - // - // - // + /// + TStatToolkit toolkit; Double_t chi2=0; Int_t npoints=0; @@ -274,9 +269,8 @@ void MakeGlobalCorr(){ } void P0resolZ(){ - // - // - // + /// + TH2F * hdP0Z = new TH2F("hdP0Z","hdP0Z",10,-250,250,100,-0.5,0.5); TH2F * hdP0ZNoCor = new TH2F("hdP0ZNoCor","hdP0ZNoCor",10,-250,250,100,-0.5,0.5); chainTr->Draw("(dP0-corrP0)/sqrt(2.):meanZ>>hdP0Z",""+cutRun+cutS+cutN120,""); @@ -322,9 +316,8 @@ void P0resolZ(){ } void P1resolZ(){ - // - // - // + /// + TH2F * hdP1Z = new TH2F("hdP1Z","hdP1Z",10,-250,250,100,-0.2,0.2); TH2F * hdP1ZNoCor = new TH2F("hdP1ZNoCor","hdP1ZNoCor",10,-250,250,100,-0.2,0.2); chainTr->Draw("(dP1-corrP1)/sqrt(2.):meanZ>>hdP1Z",""+cutRun+cutS+cutN120,""); @@ -371,9 +364,8 @@ void P1resolZ(){ void P4resolZ(){ - // - // - // + /// + TH2F * hdP4Z = new TH2F("hdP4Z","hdP4Z",10,-250,250,100,-0.4,0.4); TH2F * hdP4ZNoCor = new TH2F("hdP4ZNoCor","hdP4ZNoCor",10,-250,250,100,-0.4,0.4); chainTr->Draw("(dP4-corrP4)/sqrt(2.):meanZ>>hdP4Z",""+cutRun+cutS+cutN120,""); @@ -423,9 +415,8 @@ void P4resolZ(){ void MakeFit(){ - // - // - // + /// + TChain *chainTracklet=chainTr; AliTPCcalibAlign align; // @@ -457,7 +448,8 @@ void MakeFit(){ // chainTr->Scan("vy1:AliTPCcalibAlign::SCorrect(0,1,s1,s2,vx1,vy1,vz1,vdydx1,vdzdx1)","","",100); void MakePlot(){ - // + /// + chainTr->Draw("vy2-vy1:s1>>hisdYNoCor(36,0,36,100,-0.3,0.3)","abs(s2-s1-36)<1","",40000); chainTr->Draw("vy2-vy1-dy1:s1>>hisdYCor(36,0,36,100,-0.3,0.3)","abs(s2-s1-36)<1","",40000); hisdYCor->FitSlicesY(); @@ -468,9 +460,8 @@ void MakePlot(){ void dPhi(){ - // - // - // + /// + treeAlign->Draw("1000*m6.fElements[4]","s2==s1+36&&nphi>100"); htemp->SetXTitle("#Delta_{#phi} (mrad)"); gPad->SaveAs("picAlign/mag5dPhi.eps"); @@ -492,9 +483,8 @@ void dPhi(){ void dTheta(){ - // - // - // + /// + treeAlign->Draw("1000*m6.fElements[8]","s2==s1+36&&nphi>100"); htemp->SetXTitle("#Delta_{#theta} (mrad)"); gPad->SaveAs("picAlign/mag5dTheta.eps"); @@ -525,9 +515,8 @@ void dTheta(){ void dZ(){ - // - // - // + /// + treeAlign->Draw("dz","s2==s1+36&&nphi>100"); htemp->SetXTitle("#Delta_{Z} (cm)"); gPad->SaveAs("picAlign/mag5dZ.eps"); @@ -556,9 +545,8 @@ void dZ(){ } void dY(){ - // - // - // + /// + treeAlign->Draw("dy","s2==s1+36&&nphi>100"); htemp->SetXTitle("#Delta_{Y} (cm)"); gPad->SaveAs("picAlign/mag5dY.eps"); diff --git a/TPC/CalibMacros/CalibAlignKalman.C b/TPC/CalibMacros/CalibAlignKalman.C index 8e46c41d5e1..b7614bbcb0e 100644 --- a/TPC/CalibMacros/CalibAlignKalman.C +++ b/TPC/CalibMacros/CalibAlignKalman.C @@ -1,27 +1,28 @@ -/* - - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC"); - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); - gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+"); - - gROOT->LoadMacro("$ALICE_ROOT/TPC/CalibMacros/CalibAlignKalman.C+"); - - AliTPCTransformation::BuildBasicFormulas(); - - AliXRDPROOFtoolkit tool; - chainPoints = tool.MakeChainRandom("align.txt","trackPoints",0,50000); - chainPoints->Lookup(); - // - chainMS = tool.MakeChainRandom("kalmanFit.list","kf",0,50000); - chainMS->Lookup(); - - chainFP = tool.MakeChainRandom("kalmanFit.list","filter",0,50000); - chainFP->Lookup(); - -// CalibAlignKalmanFit(40000,1); -// kalmanFit0->DumpCorelation(0.8); -// TFile f("kalmanfitTPC.root"); -*/ +/// \file CalibAlignKalman.C +/// +/// ~~~{.cpp} +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC"); +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); +/// gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+"); +/// +/// gROOT->LoadMacro("$ALICE_ROOT/TPC/CalibMacros/CalibAlignKalman.C+"); +/// +/// AliTPCTransformation::BuildBasicFormulas(); +/// +/// AliXRDPROOFtoolkit tool; +/// chainPoints = tool.MakeChainRandom("align.txt","trackPoints",0,50000); +/// chainPoints->Lookup(); +/// +/// chainMS = tool.MakeChainRandom("kalmanFit.list","kf",0,50000); +/// chainMS->Lookup(); +/// +/// chainFP = tool.MakeChainRandom("kalmanFit.list","filter",0,50000); +/// chainFP->Lookup(); +/// +/// CalibAlignKalmanFit(40000,1); +/// kalmanFit0->DumpCorelation(0.8); +/// TFile f("kalmanfitTPC.root"); +/// ~~~ #ifdef __CINT__ @@ -135,9 +136,8 @@ AliTrackPointArray *SkipPoints(AliTrackPointArray &points, Int_t nskip, Int_t ns AliTPCkalmanFit * FitPointsLinear(Int_t maxTracks, Int_t trackDump); void CalibAlignKalman(Int_t npoints, Int_t maxFiles, Int_t startFile, Int_t trackDump, Int_t nSkipTrack, Int_t nSkipTrackOffset, Int_t nSkip, Int_t nSkipOffset, Int_t bfilterTest){ - // - // - // + /// + AliTPCTransformation::BuildBasicFormulas(); toSkip=nSkip; toSkipOffset= nSkipOffset; @@ -170,9 +170,8 @@ void CalibAlignKalman(Int_t npoints, Int_t maxFiles, Int_t startFile, Int_t trac AliTPCkalmanFit * CalibAlignKalmanFit(Int_t maxTracks, Int_t trackDump){ - // - // Fitting procedure - // + /// Fitting procedure + AliTPCTransformation::BuildBasicFormulas(); FilterTracks(); kalmanFitNew = SetupFit(); @@ -185,7 +184,8 @@ AliTPCkalmanFit * CalibAlignKalmanFit(Int_t maxTracks, Int_t trackDump){ AliTPCkalmanFit * SetupFit(){ - // + /// + AliTPCkalmanFit *kalmanFit = new AliTPCkalmanFit; AddFitFieldCage(kalmanFit); AddPhiScaling(kalmanFit); @@ -202,9 +202,7 @@ AliTPCkalmanFit * SetupFit(){ void FilterTracks(){ - // - // - // + /// cSide[0] = new TCut("cutAA","p0In.fP[1]>0&&p1In.fP[1]>0"); cSide[1] = new TCut("cutCC","p0In.fP[1]<0&&p1In.fP[1]<0"); @@ -302,10 +300,8 @@ void FilterTracks(){ AliTPCkalmanFit * FitPointsLinear(Int_t maxTracks, Int_t trackDump){ - // - // - // - // create debug streeamers + // create debug streamers + TTreeSRedirector *pcstream = new TTreeSRedirector("kalmanfitTPC.root"); TTreeSRedirector *pcstreamOrig = new TTreeSRedirector("kalmanfitTPCOrig.root"); pcstream->GetFile()->cd(); @@ -393,10 +389,9 @@ AliTPCkalmanFit * FitPointsLinear(Int_t maxTracks, Int_t trackDump){ } void QAPointsLinear(Int_t maxTracks, Int_t trackDump){ - // - // check the consistency of kalman fit - // Apply transformation - // + /// check the consistency of kalman fit + /// Apply transformation + // create debug streeamers TTreeSRedirector *pcstreamNonCalib = new TTreeSRedirector("kalmanfitTPCQANonCalib.root"); TTreeSRedirector *pcstreamCalib = new TTreeSRedirector("kalmanfitTPCQACalib.root"); @@ -406,7 +401,6 @@ void QAPointsLinear(Int_t maxTracks, Int_t trackDump){ kalmanFitters[i]=SetupFit(); } // - // AliTrackPointArray *points=0; AliExternalTrackParam *param0=0; AliExternalTrackParam *param1=0; @@ -461,11 +455,11 @@ void QAPointsLinear(Int_t maxTracks, Int_t trackDump){ void TestScattering(Int_t maxTracks, Int_t trackDump){ - // - // test Multiple scattering algorithm - // Apply transformation - // - // create debug streeamers + /// test Multiple scattering algorithm + /// Apply transformation + /// + /// create debug streeamers + TTreeSRedirector *pcstream = new TTreeSRedirector("kalmanfitTPCMS.root"); // // @@ -502,9 +496,8 @@ void TestScattering(Int_t maxTracks, Int_t trackDump){ AliTrackPointArray *SkipPoints(AliTrackPointArray &points, Int_t nskip, Int_t nskipOffset){ - // - // create new array with skipped points - // + /// create new array with skipped points + Int_t npoints = points.GetNPoints(); Int_t npointsF = (npoints-nskipOffset-1)/nskip; AliTrackPoint point; @@ -523,10 +516,8 @@ AliTrackPointArray *SkipPoints(AliTrackPointArray &points, Int_t nskip, Int_t ns AliTrackPointArray *FilterPoints(AliTrackPointArray &points, Int_t dir, TTreeSRedirector *pcstream){ - // - // Filter points - input points for KalmanFilter - // - // + /// Filter points - input points for KalmanFilter + TLinearFitter lfitY(2,"pol1"); TLinearFitter lfitZ(2,"pol1"); TVectorD vecZ(2); @@ -613,12 +604,10 @@ AliTrackPointArray *FilterPoints(AliTrackPointArray &points, Int_t dir, TTreeSRe AliTrackPointArray * SortPoints(AliTrackPointArray &points){ - // - //Creates the array - points sorted according radius - neccessay for kalman fit - // - // - // 0. choose the frame - rotation angle - // + /// Creates the array - points sorted according radius - neccessay for kalman fit + /// + /// 0. choose the frame - rotation angle + Int_t npoints = points.GetNPoints(); if (npoints<1) return 0; Double_t currentAlpha = TMath::ATan2(points.GetY()[npoints-1]-points.GetY()[0], points.GetX()[npoints-1]-points.GetX()[0]); @@ -645,9 +634,8 @@ AliTrackPointArray * SortPoints(AliTrackPointArray &points){ } TVectorD * EstimateScatteringKalmanLinear(AliTrackPointArray &points, AliExternalTrackParam &p0, AliExternalTrackParam &p1 , TTreeSRedirector *pcstream){ - // - // Algorithm - 0. Fit the track forward and backward - // - 1. Store the current parameters in each point + /// Algorithm - 0. Fit the track forward and backward + /// - 1. Store the current parameters in each point const Int_t kMinPoints= 70; const Double_t kResY = 0.1; @@ -868,9 +856,8 @@ TVectorD * EstimateScatteringKalmanLinear(AliTrackPointArray &points, AliExtern void AddFitFieldCage(AliTPCkalmanFit *kalmanFit){ - // - // Add radial scaling due field cage - // + /// Add radial scaling due field cage + TVectorD fpar(10); AliTPCTransformation * transformation=0; char tname[100]; @@ -917,11 +904,10 @@ void AddFitFieldCage(AliTPCkalmanFit *kalmanFit){ void AddPhiScaling(AliTPCkalmanFit *kalmanFit){ - // - // Add linear local phi scaling - - // separate IROC/OROC - A side/C side - // "tscalingLocalPhiIROC" - // "tscalingLocalPhiOROC" + /// Add linear local phi scaling - + /// separate IROC/OROC - A side/C side + /// "tscalingLocalPhiIROC" + /// "tscalingLocalPhiOROC" TBits maskInner(72); TBits maskOuter(72); @@ -946,9 +932,8 @@ void AddPhiScaling(AliTPCkalmanFit *kalmanFit){ } void AddDrift(AliTPCkalmanFit *kalmanFit){ - // - // Add drift velocity transformation - // + /// Add drift velocity transformation + TVectorD fpar(10); AliTPCTransformation * transformation=0; fpar[0]=1; @@ -965,9 +950,8 @@ void AddDrift(AliTPCkalmanFit *kalmanFit){ void AddZShift(AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin){ - // - // - // + /// + TVectorD fpar(10); fpar[0]=0; fpar[1]=0; fpar[2]=0; char tname[1000]; @@ -1039,10 +1023,8 @@ void AddZShift(AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin){ void AddZTilting(AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin){ - // - // z tilting absolute (sector) and relative (IROC-OROC) - // - // + /// z tilting absolute (sector) and relative (IROC-OROC) + TVectorD fpar(10); fpar[0]=0; fpar[1]=0; fpar[2]=0; char tname[1000]; @@ -1112,9 +1094,8 @@ void AddZTilting(AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin){ void AddLocalXYMisalignment(AliTPCkalmanFit *kalmanFit){ - // - // - // + /// + TVectorD fpar(10); AliTPCTransformation * transformation=0; TBits maskInnerA(72); @@ -1143,9 +1124,8 @@ void AddLocalXYMisalignment(AliTPCkalmanFit *kalmanFit){ } void AddLocalXYMisalignmentSector(AliTPCkalmanFit *kalmanFit){ - // - // - // + /// + TVectorD fpar(10); AliTPCTransformation * transformation=0; Int_t fixSector =4; @@ -1200,9 +1180,8 @@ void AddLocalXYMisalignmentSector(AliTPCkalmanFit *kalmanFit){ void AddAlignOROCIROCFourier(AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin){ - // - // - // + /// + TVectorD fpar(10); AliTPCTransformation * transformation=0; @@ -1294,9 +1273,8 @@ void AddAlignOROCIROCFourier(AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin } void AddAlignSectorFourier(AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin){ - // - // - // + /// + TVectorD fpar(10); AliTPCTransformation * transformation=0; @@ -1432,9 +1410,8 @@ void SelectNonPixelC(){ void DumpQA1D( TObjArray &arrayOut){ - // - // - // + /// + TF1 fg("fg","gaus"); TMatrixD sideARMS(8,2); TMatrixD sideCRMS(8,2); @@ -1507,9 +1484,8 @@ void DumpQA1D( TObjArray &arrayOut){ } void MakeFolders(TObjArray * arrayOut){ - // - // - // + /// + TFolder *folderBase = new TFolder("TPC align","TPC align"); // // @@ -1527,9 +1503,8 @@ void MakeFolders(TObjArray * arrayOut){ void MergeKalman(const char * list = "kalmanFit.list"){ - // - // - // + /// + ifstream in; in.open(list); TString currentFile; diff --git a/TPC/CalibMacros/CalibClParam.C b/TPC/CalibMacros/CalibClParam.C index 3e31232d259..674afe35584 100644 --- a/TPC/CalibMacros/CalibClParam.C +++ b/TPC/CalibMacros/CalibClParam.C @@ -1,12 +1,10 @@ -// -// Procedures to create a cluster parametererization -// Currently only pseudo code - once will be stable - to be updated as a "normal" macro -// +/// \file CalibClParam.C +/// +/// Procedures to create a cluster parametererization +/// Currently only pseudo code - once will be stable - to be updated as a "normal" macro void PseudoCode(){ - // - // That rough sequence to update a Cluster param calibration using debug streamers - // + /// That rough sequence to update a Cluster param calibration using debug streamers // //0. Load libraries @@ -72,9 +70,8 @@ void PseudoCode(){ void UpdateParam(){ - // - // Pseudo code -to update cluster params - // + /// Pseudo code -to update cluster params + .L $ALICE_ROOT/TPC/Cal/AliTPCCreateDummyCDB.C TFile f2("paramout.root"); AliTPCClusterParam *param2 = (AliTPCClusterParam*)f2.Get("clusterParam"); @@ -87,9 +84,8 @@ void UpdateParam(){ void TestChainCosmicDedx(){ - // - // pseudo cose - // + /// pseudo cose + gSystem->Load("libANALYSIS"); gSystem->Load("libSTAT"); gSystem->Load("libTPCcalib"); diff --git a/TPC/CalibMacros/CalibClParamNew.C b/TPC/CalibMacros/CalibClParamNew.C index 77a74483acf..0f6695f6081 100644 --- a/TPC/CalibMacros/CalibClParamNew.C +++ b/TPC/CalibMacros/CalibClParamNew.C @@ -1,61 +1,61 @@ -/* -// Pseudo code -// 1. Load Calibration from DB - - .x $ALICE_ROOT/TPC/macros/ConfigOCDB.C - -// -//2. Load Calibration components -// -.x ~/UliStyle.C -gSystem->Load("libANALYSIS"); -gSystem->Load("libSTAT"); -gSystem->Load("libTPCcalib"); -TFile fcalib("CalibObjects.root"); -TObjArray * array = (TObjArray*)fcalib.Get("TPCCalib"); -AliTPCcalibTracksGain * gain = ( AliTPCcalibTracksGain *)array->FindObject("calibTracksGain"); - -// -//3. -// -AliTPCClusterParam * paramCl = AliTPCcalibDB::Instance()->GetClusterParam(); -gain->UpdateClusterParam(paramCl); - -// -//4. Test - visulaize results -// -TF1 fdr("fdr","AliTPCClusterParam::SQnorm(0,0,x,0,0)",0,1); - -// -//5. Update the ClusterParam in your OCDB -// -// -Int_t runNumber = 0; //61725 -AliCDBMetaData *metaData= new AliCDBMetaData(); -metaData->SetObjectClassName("AliTPCClusterParam"); -metaData->SetResponsible("Marian Ivanov"); -metaData->SetBeamPeriod(1); -metaData->SetAliRootVersion("05-06-00"); //root version -metaData->SetComment("October runs calibration"); -AliCDBId id1("TPC/Calib/ClusterParam", runNumber, AliCDBRunRange::Infinity()); -gStorage = AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT/OCDB"); -gStorage->Put(paramCl, id1, metaData); - - -// -// 6. dEdx matching - Currently only debug streamers -// Load Proof with OCDB - See pseudo code TestChainCosmicdEdx -*/ - - - - +/// \file CalibClParamNew.C +/// +/// Pseudo code +/// +/// 1. Load Calibration from DB +/// +/// ~~~ +/// .x $ALICE_ROOT/TPC/macros/ConfigOCDB.C +/// ~~~ +/// +/// 2. Load Calibration components +/// +/// ~~~ +/// .x ~/UliStyle.C +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libSTAT"); +/// gSystem->Load("libTPCcalib"); +/// TFile fcalib("CalibObjects.root"); +/// TObjArray * array = (TObjArray*)fcalib.Get("TPCCalib"); +/// AliTPCcalibTracksGain * gain = ( AliTPCcalibTracksGain *)array->FindObject("calibTracksGain"); +/// ~~~ +/// +/// 3. +/// +/// ~~~ +/// AliTPCClusterParam * paramCl = AliTPCcalibDB::Instance()->GetClusterParam(); +/// gain->UpdateClusterParam(paramCl); +/// ~~~ +/// +/// 4. Test - visulaize results +/// +/// ~~~ +/// TF1 fdr("fdr","AliTPCClusterParam::SQnorm(0,0,x,0,0)",0,1); +/// ~~~ +/// +/// +/// 5. Update the ClusterParam in your OCDB +/// +/// ~~~{.cpp} +/// Int_t runNumber = 0; //61725 +/// AliCDBMetaData *metaData= new AliCDBMetaData(); +/// metaData->SetObjectClassName("AliTPCClusterParam"); +/// metaData->SetResponsible("Marian Ivanov"); +/// metaData->SetBeamPeriod(1); +/// metaData->SetAliRootVersion("05-06-00"); //root version +/// metaData->SetComment("October runs calibration"); +/// AliCDBId id1("TPC/Calib/ClusterParam", runNumber, AliCDBRunRange::Infinity()); +/// gStorage = AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT/OCDB"); +/// gStorage->Put(paramCl, id1, metaData); +/// ~~~ +/// +/// 6. dEdx matching - Currently only debug streamers +/// Load Proof with OCDB +/// See pseudo code TestChainCosmicdEdx void TestChainCosmicDedx(){ - // - // pseudo cose - // + /// pseudo cose + gSystem->Load("libANALYSIS"); gSystem->Load("libSTAT"); gSystem->Load("libTPCcalib"); diff --git a/TPC/CalibMacros/CalibCosmic.C b/TPC/CalibMacros/CalibCosmic.C index a4ad97f5064..47fd6218141 100644 --- a/TPC/CalibMacros/CalibCosmic.C +++ b/TPC/CalibMacros/CalibCosmic.C @@ -1,28 +1,31 @@ -/* -Draw result of perfomance test: - -aliroot -b -q $ALICE_ROOT/TPC/scripts/loadTPCcalib.C $ALICE_ROOT/TPC/CalibMacros/CalibCosmic.C - - //gROOT->Macro("~/NimStyle.C"); - gSystem->AddIncludePath("-I$ALICE_ROOT/STAT") - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC") - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros") - - gSystem->Load("libANALYSIS"); - gSystem->Load("libTPCcalib"); - .L $ALICE_ROOT/TPC/CalibMacros/CalibCosmic.C - // init - Init(); - SetDefaultCut(); // check defualt cut - // - MakeDefaultPlots(); - - gROOT->Macro("~/NimStyle.C"); - TFile f("cosmicPlots.root"); - TBrowser b - b.Add(CosmicPlots,"CosmicPlot"); - -*/ +/// \file CalibCosmic.C +/// +/// Draw result of perfomance test: +/// +/// ~~~ +/// aliroot -b -q $ALICE_ROOT/TPC/scripts/loadTPCcalib.C $ALICE_ROOT/TPC/CalibMacros/CalibCosmic.C +/// ~~~ +/// +/// ~~~{.cpp} +/// // gROOT->Macro("~/NimStyle.C"); +/// gSystem->AddIncludePath("-I$ALICE_ROOT/STAT") +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC") +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros") +/// +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libTPCcalib"); +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibCosmic.C +/// // init +/// Init(); +/// SetDefaultCut(); // check defualt cut +/// // +/// MakeDefaultPlots(); +/// +/// gROOT->Macro("~/NimStyle.C"); +/// TFile f("cosmicPlots.root"); +/// TBrowser b +/// b.Add(CosmicPlots,"CosmicPlot"); +/// ~~~ #if !defined(__CINT__) || defined(__MAKECINT__) #include "THnSparse.h" @@ -67,7 +70,8 @@ void MakeDefaultPlots(); void CalibCosmic(){ - // init + /// init + Init(); SetDefaultCut(); // @@ -75,8 +79,8 @@ void CalibCosmic(){ } void Init(){ - // - // + /// + TH1::AddDirectory(0); TFile fcalib("TPCCosmicObjects.root"); cosmicScan = ( AliTPCcalibCosmic *)fcalib.Get("cosmicTPC"); @@ -185,9 +189,8 @@ TH1 * GetPull(Int_t type){ void DrawResoldEdx(){ - // - // - // + /// + Int_t kmicolors[10]={1,2,3,6,7,8,9,10,11,12}; Int_t kmimarkers[10]={21,22,23,24,25,26,27,28,29,30}; TH2 *htemp; @@ -248,9 +251,8 @@ void DrawResoldEdx(){ } void DrawStat(Int_t coord, TObjArray *array=0){ - // - // - // + /// + TCanvas *cStat = new TCanvas(Form("Cosmic stat%d",coord), Form("CosmicStat%d",coord),1000,800); Float_t mx0=0.2, mx1=0.05, my0=0.15, my1=0.1; cStat->SetMargin(mx0,mx1,my0,my1); @@ -271,8 +273,8 @@ void SetStylePad(TVirtualPad *pad){ } void MakePlotPt(TObjArray * array){ - // - // + /// + TCanvas *cptRes = new TCanvas("TPCPtResol","TPCPtResol",900,600); cptRes->Divide(2,1); SetStylePad(cptRes->cd(1)); @@ -322,8 +324,8 @@ void MakePlotPt(TObjArray * array){ void MakePlotP4(TObjArray * array){ - // - // + /// + TCanvas *cptRes = new TCanvas("TPCP4Resol","TPCP4Resol",900,600); cptRes->Divide(2,1); SetStylePad(cptRes->cd(1)); @@ -378,8 +380,8 @@ void MakePlotP4(TObjArray * array){ void MakePlotPosY(TObjArray * array){ - // - // + /// + TCanvas *cptRes = new TCanvas("TPCPosResolY","TPCPosResolY",900,600); cptRes->Divide(2,1); SetStylePad(cptRes->cd(1)); @@ -430,8 +432,8 @@ void MakePlotPosY(TObjArray * array){ } void MakePlotSnp(TObjArray * array){ - // - // + /// + TCanvas *cptRes = new TCanvas("TPCSnp","TPCSnp",900,600); cptRes->Divide(2,1); SetStylePad(cptRes->cd(1)); @@ -479,8 +481,8 @@ void MakePlotSnp(TObjArray * array){ if (array) array->AddLast(cptRes); } void MakePlotTgl(TObjArray * array){ - // - // + /// + TCanvas *cptRes = new TCanvas("TPCtgl","TPCtgl",900,600); cptRes->Divide(2,1); SetStylePad(cptRes->cd(1)); @@ -529,8 +531,8 @@ void MakePlotTgl(TObjArray * array){ } void MakePlotPosZ(TObjArray * array){ - // - // + /// + TCanvas *cptRes = new TCanvas("TPCPosResolZ","TPCPosResolZ",900,600); cptRes->Divide(2,1); SetStylePad(cptRes->cd(1)); @@ -583,9 +585,8 @@ void MakePlotPosZ(TObjArray * array){ void MakeDefaultPlots(){ - // - // - // + /// + gStyle->SetOptStat(1100); DrawStat(0,picArray); gStyle->SetOptStat(0); diff --git a/TPC/CalibMacros/CalibKalman.C b/TPC/CalibMacros/CalibKalman.C index 52166c48844..235ea333337 100644 --- a/TPC/CalibMacros/CalibKalman.C +++ b/TPC/CalibMacros/CalibKalman.C @@ -1,11 +1,14 @@ -/* - .x ~/rootlogon.C - gSystem->Load("libANALYSIS"); - gSystem->Load("libTPCcalib"); - - .L $ALICE_ROOT/TPC/CalibMacros/CalibKalman.C+ - -*/ +/// \file CalibKalman.C +/// +/// ~~~ +/// .x ~/rootlogon.C +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libTPCcalib"); +/// +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibKalman.C+ +/// ~~~ + + #include "TTreeStream.h" #include "TFile.h" diff --git a/TPC/CalibMacros/CalibLaserExBscan.C b/TPC/CalibMacros/CalibLaserExBscan.C index 47fa44a45e8..a09b59c6057 100644 --- a/TPC/CalibMacros/CalibLaserExBscan.C +++ b/TPC/CalibMacros/CalibLaserExBscan.C @@ -1,24 +1,23 @@ -/* -// - .x ~/rootlogon.C - .L $ALICE_ROOT/TPC/CalibMacros/CalibLaserExBscan.C - - - // 0. Make a calibration - // 1. Make a laser scan list - // e.g in TPC workscape - - // 2. Define a reference data e.g: - // for a in `cat laserScan.txt`; do echo `pwd`/../mergerunMag0.list/laserMean.root; done >laserScanRef.txt - - Init(); // init chain - MakeAliases(); // make alaises for variables - - -*/ - - - +/// \file CalibLaserExBscan.C +/// +/// ~~~ +/// .x ~/rootlogon.C +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibLaserExBscan.C +/// ~~~ +/// +/// 0. Make a calibration +/// 1. Make a laser scan list +/// e.g in TPC workscape +/// +/// 2. Define a reference data e.g: +/// ~~~ +/// for a in `cat laserScan.txt`; do echo `pwd`/../mergerunMag0.list/laserMean.root; done >laserScanRef.txt +/// ~~~ +/// +/// ~~~{.cpp} +/// Init(); // init chain +/// MakeAliases(); // make alaises for variables +/// ~~~ TCut cutE="eY.fElements<0.02&&Rr.eY.fElements<0.02"; // error cut 200 microns TCut cutN="nCl.fElements>10&&Rr.nCl.fElements>10"; // number of clusters cut @@ -60,9 +59,8 @@ Double_t chi2A[6]; // void Init(){ - // - // - // + /// + gSystem->Load("libANALYSIS"); gSystem->Load("libTPCcalib"); gSystem->Load("libSTAT"); @@ -79,10 +77,10 @@ void Init(){ void MakeAliases(){ - // - // shortcuts for variables to fit - // - // bserved distrotions + /// shortcuts for variables to fit + /// + /// bserved distrotions + chain->SetAlias("dy","(dY.fElements-Rr.dY.fElements)"); // y ~ (r-phi) distortion chain->SetAlias("ctany","(dY.fElements-Rr.dY.fElements)/(250*dr)"); // mean distortion (angle) over drift length // @@ -108,9 +106,8 @@ void MakeAliases(){ TMatrixD * MakeErrVector(TMatrixD & mat){ - // - // get error vector - // + /// get error vector + Int_t nrows=mat.GetNrows(); TMatrixD *err = new TMatrixD(nrows,1); for (Int_t i=0; iDraw("(dy-dyAM5_FA):LTr.fVecPhi.fElements>>hisAM5(60,-3.14,3.14,100,-0.2,0.2)",cutAM5,""); chain->Draw("(dy-dyAP5_FA):LTr.fVecPhi.fElements>>hisAP5(60,-3.14,3.14,100,-0.2,0.2)",cutAP5,""); chain->Draw("(dy-dyAP2_FA):LTr.fVecPhi.fElements>>hisAP2(60,-3.14,3.14,100,-0.2,0.2)",cutAP2,""); @@ -294,9 +287,8 @@ void MakeGraphs(){ void DumpFit(){ - // - // - // + /// + TTreeSRedirector *pcstream = new TTreeSRedirector("exbFits.root"); for (Int_t i=0; i<5;i++){ diff --git a/TPC/CalibMacros/CalibLaserVscan.C b/TPC/CalibMacros/CalibLaserVscan.C index c1e47e2a011..c93f6b75330 100644 --- a/TPC/CalibMacros/CalibLaserVscan.C +++ b/TPC/CalibMacros/CalibLaserVscan.C @@ -1,45 +1,48 @@ - -/* - // - // 0. Make a calibration - // 1. Make a laser scan list - // e.g in TPC workscape - find `pwd`/*/laserMean.root >laserScan.txt - // 2. Define a reference data - rrunA=84469/; for a in `cat laserScan.txt`; do echo `pwd`/$rrunA/laserMean.root; done >laserScanRefA.txt - rrunC=84469; for a in `cat laserScan.txt`; do echo `pwd`/$rrunC/laserMean.root; done >laserScanRefC.txt - rrun=84469; for a in `cat laserScan.txt`; do echo `pwd`/$rrun/laserMean.root; done >laserScanRef.txt - // - // - .x ~/rootlogon.C - gSystem->Load("libANALYSIS"); - gSystem->Load("libTPCcalib"); - gSystem->Load("libSTAT"); - - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); - gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+") - .L $ALICE_ROOT/TPC/CalibMacros/CalibLaserVscan.C+ - - AliXRDPROOFtoolkit tool; - chain = tool.MakeChainRandom("laserScan.txt","Mean",0,10200); - chain->Lookup(); - chainRef = tool.MakeChain("laserScanRef.txt","Mean",0,10200); - chain->AddFriend(chainRef,"R") - chainRefA = tool.MakeChain("laserScanRefA.txt","Mean",0,10200); - chain->AddFriend(chainRefA,"RA") - chainRefC = tool.MakeChain("laserScanRefC.txt","Mean",0,10200); - chain->AddFriend(chainRefC,"RC") - // - // MakeMeanBundle(); - // SaveResult(); - // - ReadRunSetup(); - ReadResult(); - - MakeAnalysisBeam(); - TFile fbundle("scanDeltaBeam.root"); - chain->Draw("mphi:GetValueBundle(id,1)","isOK&&GetValueBundle(id,0)>3&<r.fSide==0","") -*/ +/// \file CalibLaserVscan.C +/// +/// 0. Make a calibration +/// 1. Make a laser scan list +/// e.g in TPC workscape +/// +/// ~~~ +/// find `pwd`/*/laserMean.root >laserScan.txt +/// ~~~ +/// +/// ~~~{.cpp} +/// // 2. Define a reference data +/// rrunA=84469/; for a in `cat laserScan.txt`; do echo `pwd`/$rrunA/laserMean.root; done >laserScanRefA.txt +/// rrunC=84469; for a in `cat laserScan.txt`; do echo `pwd`/$rrunC/laserMean.root; done >laserScanRefC.txt +/// rrun=84469; for a in `cat laserScan.txt`; do echo `pwd`/$rrun/laserMean.root; done >laserScanRef.txt +/// // +/// .x ~/rootlogon.C +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libTPCcalib"); +/// gSystem->Load("libSTAT"); +/// +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); +/// gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+") +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibLaserVscan.C+ +/// +/// AliXRDPROOFtoolkit tool; +/// chain = tool.MakeChainRandom("laserScan.txt","Mean",0,10200); +/// chain->Lookup(); +/// chainRef = tool.MakeChain("laserScanRef.txt","Mean",0,10200); +/// chain->AddFriend(chainRef,"R") +/// chainRefA = tool.MakeChain("laserScanRefA.txt","Mean",0,10200); +/// chain->AddFriend(chainRefA,"RA") +/// chainRefC = tool.MakeChain("laserScanRefC.txt","Mean",0,10200); +/// chain->AddFriend(chainRefC,"RC") +/// // +/// // MakeMeanBundle(); +/// // SaveResult(); +/// // +/// ReadRunSetup(); +/// ReadResult(); +/// +/// MakeAnalysisBeam(); +/// TFile fbundle("scanDeltaBeam.root"); +/// chain->Draw("mphi:GetValueBundle(id,1)","isOK&&GetValueBundle(id,0)>3&<r.fSide==0","") +/// ~~~ #include #include "TFile.h" @@ -98,8 +101,8 @@ TCut cC="eY.fElements<0.01&&RA.eY.fElements<0.01&&X.fElements>10&&RA.X.fElements Double_t GetValueBundle(Int_t id, Int_t type){ - // - // + /// + return matrixMeanBundle(id,type); } @@ -119,14 +122,14 @@ Double_t GetDyBundle(Int_t id){ } Double_t GetRMSBundle(Int_t id, Int_t type){ - // - // + /// + return matrixRMSBundle(id,type); } Int_t GetVoltage(Int_t run, Int_t type){ - // - // Get the voltage - // run# -0 ggA 1- ggC 2- coA 3-coC 4-skA 5-skC + /// Get the voltage + /// run# -0 ggA 1- ggC 2- coA 3-coC 4-skA 5-skC + TVectorD *runVoltage = mapRunVoltage[run]; if (!runVoltage) return -1; return (*runVoltage)[type]; @@ -280,9 +283,8 @@ void MakeAnalysisBeam(){ void MakeMeanBundle(){ - // - // - // + /// + AliTPCLaserTrack::LoadTracks(); AliTPCLaserTrack *ltrack; TF1 * fp1 = 0; @@ -375,9 +377,8 @@ void MakeMeanBundle(){ void MakeGraphsdY(){ - // - // Make delta Y pictures from voltage scan - // + /// Make delta Y pictures from voltage scan + TObjArray *aprofY = new TObjArray(14); for (Int_t ib=0;ib<14;ib++){ TProfile *profY = new TProfile("py","py",100,0,150); @@ -409,9 +410,8 @@ void MakeGraphsdY(){ } void MakeGraphsdP2(){ - // - // Make delta Y pictures from voltage scan - // + /// Make delta Y pictures from voltage scan + TObjArray *aprofP2 = new TObjArray(14); for (Int_t ib=0;ib<14;ib++){ TProfile *profP2 = new TProfile("pyP","pyP",100,0,150); @@ -446,9 +446,8 @@ void MakeGraphsdP2(){ void MakeGraphsP4(){ - // - // Make delta Y pictures from voltage scan - // + /// Make delta Y pictures from voltage scan + TObjArray *aprofP4 = new TObjArray(14); for (Int_t ib=0;ib<14;ib++){ TProfile *profP4 = new TProfile("pp4","pp4",100,0,150); @@ -481,9 +480,8 @@ void MakeGraphsP4(){ void MakePlotsP2GG(TCut ucut){ - // - // - // + /// + TFile fbundle("scanDeltaBeam.root"); TTree * treeScan = (TTree*)fbundle.Get("vScanBeam"); TGraph *graph[4]; @@ -525,9 +523,8 @@ void MakePlotsP2GG(TCut ucut){ void MakePlotsP2Cover(TCut ucut){ - // - // - // + /// + TFile fbundle("scanDeltaBeam.root"); TTree * treeScan = (TTree*)fbundle.Get("vScanBeam"); TGraph *graph[4]; @@ -565,9 +562,8 @@ void MakePlotsP2Cover(TCut ucut){ } void MakePlotsP2Skirt(TCut ucut){ - // - // - // + /// + TFile fbundle("scanDeltaBeam.root"); TTree * treeScan = (TTree*)fbundle.Get("vScanBeam"); TGraph *graph[4]; @@ -608,9 +604,8 @@ void MakePlotsP2Skirt(TCut ucut){ void MakePlotsdYGG(){ - // - // - // + /// + TFile fbundle("scanDeltaBeam.root"); TTree * treeScan = (TTree*)fbundle.Get("vScanBeam"); TGraph *graph[4]; @@ -643,9 +638,8 @@ void MakePlotsdYGG(){ void MakePlotsdYCover(TCut ucut){ - // - // - // + /// + TFile fbundle("scanDeltaBeam.root"); TTree * treeScan = (TTree*)fbundle.Get("vScanBeam"); TGraph *graph[4]; @@ -677,9 +671,8 @@ void MakePlotsdYCover(TCut ucut){ } void MakePlotsdYSkirt(TCut ucut){ - // - // - // + /// + TFile fbundle("scanDeltaBeam.root"); TTree * treeScan = (TTree*)fbundle.Get("vScanBeam"); TGraph *graph[4]; @@ -713,9 +706,8 @@ void MakePlotsdYSkirt(TCut ucut){ void GetOptimalSetting(){ - // - // - // + /// + TFile fbundle("scanDeltaBeam.root"); TTree * treeScan = (TTree*)fbundle.Get("vScanBeam"); // @@ -768,9 +760,8 @@ void GetOptimalSetting(){ void MakeAliases(){ - // - // use table - // + /// use table + chain->SetAlias("VggA","GetVoltage(run,0)"); chain->SetAlias("VggC","GetVoltage(run,1)"); chain->SetAlias("VcoA","GetVoltage(run,2)"); @@ -808,9 +799,8 @@ void MakeAliases(){ void MakeAliasesBoth(){ - // - // cuts - slect good tracks - // + /// cuts - slect good tracks + chain->SetAlias("TisOK","mdEdx>5&&entries>400"); chain->SetAlias("ATisOK","(LTr.fSide==0)*(RA.mdEdx>5&&RA.entries>500)"); chain->SetAlias("CTisOK","(LTr.fSide==1)*(RC.mdEdx>5&&RC.entries>500)"); diff --git a/TPC/CalibMacros/CalibPID.C b/TPC/CalibMacros/CalibPID.C index b7534d46163..8b999871525 100644 --- a/TPC/CalibMacros/CalibPID.C +++ b/TPC/CalibMacros/CalibPID.C @@ -1,45 +1,44 @@ -/* +/// \file CalibPID.C +/// +/// 1. dump information to the tree +/// +/// ~~~{.cpp} +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libTPCcalib"); +/// gSystem->Load("libSTAT"); +/// +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibPID.C+ +/// .x ../ConfigOCDB.C +/// paramCl = AliTPCcalibDB::Instance()->GetClusterParam(); +/// Init("calibPID06"); +/// LookupHisto() // change SetRange in LookupHisto if needed !, check with pid->GetHistQtot()->Projection(0,1)->Draw("colz") +/// ~~~ +/// +/// exit aliroot +/// +/// 2. update the OCDB +/// +/// ~~~{.cpp} +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libTPCcalib"); +/// gSystem->Load("libSTAT"); +/// +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibPID.C+ +/// .x ../ConfigOCDB.C +/// paramCl = AliTPCcalibDB::Instance()->GetClusterParam(); +/// +/// TFile fff("lookupdEdx.root") +/// TTree * treeDump =0; +/// TObjArray fitArr; +/// treeDump = (TTree*)fff.Get("dumpdEdx"); +/// +/// TCut cutAll = "meangTot>0.0&&sumMax>150&&sumTot>150&&rmsgMax/rmsMax<1.5&&abs(p3)<1&&isOK"; +/// treeDump->Draw("meanTotP:ipad","meangTot>0&&isOK"+cutAll,"*") +/// +/// FitFit(kTRUE) +/// StoreParam("local:///lustre/alice/akalweit/OCDBforMC") // specify corresponding location before !! +/// ~~~ -// -// 1. dump information to the tree -// -gSystem->Load("libANALYSIS"); -gSystem->Load("libTPCcalib"); -gSystem->Load("libSTAT"); - -.L $ALICE_ROOT/TPC/CalibMacros/CalibPID.C+ -.x ../ConfigOCDB.C -paramCl = AliTPCcalibDB::Instance()->GetClusterParam(); -Init("calibPID06"); -LookupHisto() // change SetRange in LookupHisto if needed !, check with pid->GetHistQtot()->Projection(0,1)->Draw("colz") - -// exit aliroot - -// -// 2. update the OCDB -// - -gSystem->Load("libANALYSIS"); -gSystem->Load("libTPCcalib"); -gSystem->Load("libSTAT"); - -.L $ALICE_ROOT/TPC/CalibMacros/CalibPID.C+ -.x ../ConfigOCDB.C -paramCl = AliTPCcalibDB::Instance()->GetClusterParam(); - -TFile fff("lookupdEdx.root") -TTree * treeDump =0; -TObjArray fitArr; -treeDump = (TTree*)fff.Get("dumpdEdx"); - -TCut cutAll = "meangTot>0.0&&sumMax>150&&sumTot>150&&rmsgMax/rmsMax<1.5&&abs(p3)<1&&isOK"; -treeDump->Draw("meanTotP:ipad","meangTot>0&&isOK"+cutAll,"*") - -FitFit(kTRUE) -StoreParam("local:///lustre/alice/akalweit/OCDBforMC") // specify corresponding location before !! - - -*/ #include "TMath.h" #include "TString.h" #include "TFile.h" @@ -82,8 +81,8 @@ Int_t kmimarkers[10]={21,22,23,24,25,26,27,28,29,30}; //Int_t binsQA[7] = {150, 10, 10, 10, 50, 50, 8}; void Init(char* name="calibPID06"){ - // - // + /// + TFile fcalib("CalibObjectsTrain2.root"); //TObjArray * array = (TObjArray*)fcalib.Get("TPCCalib"); // old interface pid = ( AliTPCcalibPID *) fcalib.Get(name); @@ -172,9 +171,8 @@ void ReadTrees(){ void Fit(Bool_t updateParam=kFALSE){ - // - // align pads - // + /// align pads + TStatToolkit toolkit; Double_t chi2; TVectorD paramTot[5], paramMax[5]; diff --git a/TPC/CalibMacros/CalibQA.C b/TPC/CalibMacros/CalibQA.C index 4178365fc3b..88d453d2b47 100644 --- a/TPC/CalibMacros/CalibQA.C +++ b/TPC/CalibMacros/CalibQA.C @@ -1,12 +1,14 @@ -/* - Make default plotsfrom AliTPCdataQA components: - - aliroot -b -q $ALICE_ROOT/TPC/CalibMacros/CalibQA.C\(121694\); - - .L $ALICE_ROOT/TPC/CalibMacros/CalibQA.C - Int_t run=121694; - CalibQA(run); -*/ +/// \file CalibQA.C +/// +/// Make default plotsfrom AliTPCdataQA components: +/// +/// ~~~ +/// aliroot -b -q $ALICE_ROOT/TPC/CalibMacros/CalibQA.C\(121694\); +/// +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibQA.C +/// Int_t run=121694; +/// CalibQA(run); +/// ~~~ TCut cutNoise="PadNoise.fElements<1.5&&abs(PadNoise.fElements/PadNoise_Median-1)<0.5"; TCut cutTime="abs(TimePosition.fElements-TimePosition_Median)<100"; @@ -41,9 +43,8 @@ void InitOCDB(Int_t run){ } void MakeTree(){ - // - // make summary tree - // + /// make summary tree + AliTPCcalibDB::Instance()->UpdateNonRec(); AliTPCdataQA* dataQA = AliTPCcalibDB::Instance()->GetDataQA(); AliTPCCalPad* gain = AliTPCcalibDB::Instance()->GetDedxGainFactor(); @@ -103,9 +104,8 @@ TCanvas * DrawOccupancy(){ } TCanvas * DrawGain(){ - // - // Compare the amplitude with krypton gain amplitude - // Similar filtering as in occupancy plot - // + /// Compare the amplitude with krypton gain amplitude + /// Similar filtering as in occupancy plot + return 0; } diff --git a/TPC/CalibMacros/CalibTime.C b/TPC/CalibMacros/CalibTime.C index 8d556ea6a00..7e610c10879 100644 --- a/TPC/CalibMacros/CalibTime.C +++ b/TPC/CalibMacros/CalibTime.C @@ -1,19 +1,27 @@ - +/// \file CalibTime.C +/// +/// Macro to visualize and analyze time dependent variables +/// +/// ~~~ +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibTime.C +/// +/// // 1. Init - Load libraries tools +/// Init() +/// +/// // 2. Load debug streamers +/// InitChains() +/// ~~~ gSystem->Load("libANALYSIS"); gSystem->Load("libSTAT"); gSystem->Load("libTPCcalib"); - TFile f("CalibObjects.root"); AliTPCcalibTime *calibTime = (AliTPCcalibTime *)f->Get("TPCCalib")->FindObject("calibTime"); - TPair * addPair= calibTime->GetMapDz()->FindObject(" D0SCO "); THnSparse* addHist=dynamic_cast(addPair->Value()); - -// TGraph * gr = AliTPCcalibBase::FitSlices(addHist,2,0,100,100); gr->SetMarkerColor(2); gr->Draw("same*"); @@ -30,29 +38,6 @@ gr->SetMarkerStyle(25); grfit->SetLineColor(2); grfit->Draw("lu"); - - - - - - - - - -/* - - Macro to visualize and analyze time dependent variables - // - .L $ALICE_ROOT/TPC/CalibMacros/CalibTime.C - // - // 1. Init - Load libraries tools - Init() - // 2. Load debug streamers - InitChains() - -*/ - - // // Chain Based analysis // @@ -61,7 +46,8 @@ grfit->Draw("lu"); TChain * chainLaser=0, *chainDz=0, *chaindEdx=0; void Init(){ - // Load neccesary libraries + /// Load neccesary libraries + gSystem->Load("libANALYSIS"); gSystem->Load("libSTAT"); gSystem->Load("libTPCcalib"); @@ -96,7 +82,8 @@ void InitChains(){ void MakeTglFitCosmic(){ - // Fit the z correction factor + /// Fit the z correction factor + TStatToolkit toolkit; Double_t chi2=0; Int_t npoints=0; @@ -135,9 +122,8 @@ void MakeTglFitCosmic(){ void MakeTglFitCosmic(){ - // - // - // + /// + TStatToolkit toolkit; Double_t chi2=0; Int_t npoints=0; diff --git a/TPC/CalibMacros/CalibTimeGain.C b/TPC/CalibMacros/CalibTimeGain.C index 849bf6abee0..3101fc6a4f9 100644 --- a/TPC/CalibMacros/CalibTimeGain.C +++ b/TPC/CalibMacros/CalibTimeGain.C @@ -1,23 +1,27 @@ -// Macro to generate and update OCDB entries for a given run: -// this is a TObjArray which has at 0 the MIP-Spline and at 1 the Fermi-Plateau-Spline ... -// Responsible: marian.ivanov@cern.ch -// Responsible: A.Kalweit@gsi.de - -/* How to use it locally: -// -// Load libraries -gSystem->Load("libANALYSIS"); -gSystem->Load("libSTAT"); -gSystem->Load("libTPCcalib"); -gSystem->AddIncludePath("-I$ALICE_ROOT/TPC"); -.L $ALICE_ROOT/TPC/CalibMacros/CalibTimeGain.C+ - -//Make calibration -CalibTimeGain("CalibObjectsTrain1.root",0,120000); -TBrowser b; -b.Add(gainArray); - -*/ +/// \file CalibTimeGain.C +/// +/// Macro to generate and update OCDB entries for a given run: +/// this is a TObjArray which has at 0 the MIP-Spline and at 1 the Fermi-Plateau-Spline ... +/// +/// \author marian.ivanov@cern.ch +/// \author A.Kalweit@gsi.de +/// +/// How to use it locally: +/// +/// ~~~{.cpp} +/// // Load libraries +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libSTAT"); +/// gSystem->Load("libTPCcalib"); +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC"); +/// .L $ALICE_ROOT/TPC/CalibMacros/CalibTimeGain.C+ +/// +/// //Make calibration +/// CalibTimeGain("CalibObjectsTrain1.root",0,120000); +/// TBrowser b; +/// b.Add(gainArray); +/// ~~~ + #if !defined(__CINT__) || defined(__MAKECINT__) #include "TObjArray.h" #include "TGraphErrors.h" @@ -53,9 +57,8 @@ Bool_t AnalyzeGain(Int_t startRunNumber, Int_t endRunNumber, Int_t minEntriesGau void CalibTimeGain(Char_t* fileName="CalibObjectsTrain1.root", Int_t startRunNumber=0, Int_t endRunNumber=AliCDBRunRange::Infinity(), TString ocdbStorage=""){ - // - // Update OCDB gain - // + /// Update OCDB gain + ReadGainGlobal(fileName); AnalyzeGain(startRunNumber,endRunNumber, 1000,1.43); MakeQAPlot(1.43); @@ -67,9 +70,8 @@ void CalibTimeGain(Char_t* fileName="CalibObjectsTrain1.root", Int_t startRunNum void ReadGainGlobal(Char_t* fileName){ - // - // read calibration entries from file - // + /// read calibration entries from file + TFile fcalib(fileName); TObjArray * array = (TObjArray*)fcalib.Get("TPCCalib"); if (array){ @@ -103,9 +105,8 @@ void ReadGainGlobal(Char_t* fileName){ Bool_t AnalyzeGain(Int_t startRunNumber, Int_t endRunNumber, Int_t minEntriesGaussFit, Float_t FPtoMIPratio){ - // - // - // + /// + gainMIP->GetHistGainTime()->GetAxis(5)->SetRangeUser(startRunNumber, endRunNumber); // 1.) try to create MIP spline gainMIP->GetHistGainTime()->GetAxis(2)->SetRangeUser(1.51,2.49); // only beam data @@ -146,9 +147,8 @@ Bool_t AnalyzeGain(Int_t startRunNumber, Int_t endRunNumber, Int_t minEntriesGau void UpdateOCDBGain(Int_t startRunNumber, Int_t endRunNumber, const Char_t *storagePath){ - // - // Update OCDB entry - // + /// Update OCDB entry + AliCDBMetaData *metaData= new AliCDBMetaData(); metaData->SetObjectClassName("TObjArray"); metaData->SetResponsible("Alexander Kalweit"); @@ -161,11 +161,8 @@ void UpdateOCDBGain(Int_t startRunNumber, Int_t endRunNumber, const Char_t *stor } void MakeQAPlot(Float_t FPtoMIPratio) { - // - // Make QA plot to visualize results - // - // - // + /// Make QA plot to visualize results + if (graphCosmic) { TCanvas * canvasCosmic = new TCanvas("gain Cosmic", "time dependent gain QA histogram cosmic"); canvasCosmic->cd(); diff --git a/TPC/CalibMacros/CosmicPerformance.C b/TPC/CalibMacros/CosmicPerformance.C index 8f0f879f667..e4cd276692e 100644 --- a/TPC/CalibMacros/CosmicPerformance.C +++ b/TPC/CalibMacros/CosmicPerformance.C @@ -1,39 +1,37 @@ -/* - - .x ~/UliStyle.C - .x ~/NimStyle.C - .x ~/rootlogon.C - TProof::Open(""); - gSystem->Load("libSTAT"); - gSystem->Load("libANALYSIS"); - gSystem->Load("libTPCcalib"); - gSystem->Load("libSTAT"); - - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); - gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+"); - AliXRDPROOFtoolkit tool; - TChain * chain = tool.MakeChain("cosmic.txt","Track0",0,1000000); - chain->Lookup(); - chain->SetProof(kTRUE); - - .L $ALICE_ROOT/TPC/CalibMacros/CosmicPerformance.C+ - chainCosmic=chain; - MakeCuts() - MakeAlias(); - Make1PtPlot(); - Draw1Pt(); - Draw1PtPull(); - - MakeZPlot(); - DrawZ(); - DrawZPull(); - - // - PtResolPt(); - +/// \file CosmicPerformance.C +/// +/// ~~~{.cpp} +/// .x ~/UliStyle.C +/// .x ~/NimStyle.C +/// .x ~/rootlogon.C +/// TProof::Open(""); +/// gSystem->Load("libSTAT"); +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libTPCcalib"); +/// gSystem->Load("libSTAT"); +/// +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros"); +/// gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+"); +/// AliXRDPROOFtoolkit tool; +/// TChain * chain = tool.MakeChain("cosmic.txt","Track0",0,1000000); +/// chain->Lookup(); +/// chain->SetProof(kTRUE); +/// +/// .L $ALICE_ROOT/TPC/CalibMacros/CosmicPerformance.C+ +/// chainCosmic=chain; +/// MakeCuts() +/// MakeAlias(); +/// Make1PtPlot(); +/// Draw1Pt(); +/// Draw1PtPull(); +/// +/// MakeZPlot(); +/// DrawZ(); +/// DrawZPull(); +/// +/// PtResolPt(); +/// ~~~ -*/ - #include "TTree.h" #include "TChain.h" #include "TPad.h" @@ -103,9 +101,8 @@ TH1F * hsSP1Pt[5]; TH1F * hsPP1Pt[5]; void MakeCutsParam(){ - // - // Default selection criteria - // + /// Default selection criteria + cutDiff[0]="abs(Tr0.fP[0]+Tr1.fP[0])<3"; cutDiff[1]="abs(Tr0.fP[1]-Tr1.fP[1])<15"; cutDiff[2]="abs(Tr1.fAlpha-Tr0.fAlpha+pi)<0.1"; @@ -122,9 +119,8 @@ void MakeCutsParam(){ } void MakeGeomCuts(){ -// -// Geometrical cut -// + /// Geometrical cut + TCut cutOx("Op1.fX>240&&Op0.fX>240"); TCut cutOz("abs(Op1.fP[1])<240&&abs(Op0.fP[1])<240"); TCut cutIz("abs(Ip1.fP[1])<240&&abs(Ip0.fP[1])<240"); @@ -136,7 +132,8 @@ void MakeGeomCuts(){ } void MakeCuts(){ - // make cuts all + /// make cuts all + MakeGeomCuts(); MakeCutsParam(); cutAll = cutDiff[5]+cutPull[5]+cutGeomTPC; diff --git a/TPC/CalibMacros/CreateGainMap.C b/TPC/CalibMacros/CreateGainMap.C index 8415205a268..edad3c6aee2 100644 --- a/TPC/CalibMacros/CreateGainMap.C +++ b/TPC/CalibMacros/CreateGainMap.C @@ -1,40 +1,34 @@ -/* - -This macro creates a gain map for the TPC based on the results of the Krypton calibration. -The main steps are the following: - -1. Define outlier-pads where the krypton calibration was not succesful -2. A parabolic fit for the whole chamber is performed -3. replace outliers with fitted values -4. normalize separately IROCs and OROCs - -For more details see below. - - - -example usage: -============== - -TFile f("calibKr.root") -AliTPCCalPad * kryptonRaw = new AliTPCCalPad(*fitMean) -AliTPCCalPad * kryptonMean = new AliTPCCalPad(*spectrMean) -AliTPCCalPad * kryptonChi2 = new AliTPCCalPad(*fitNormChi2) -AliTPCCalPad * kryptonRMS = new AliTPCCalPad(*fitRMS) - -.L CreateGainMap.C -AliTPCCalPad * final = CreateGainMap(kryptonRaw, kryptonRMS) - -TFile *h = new TFile("GainMap.root", "RECREATE") -final.Write() - -*/ - +/// \file CreateGainMap.C +/// This macro creates a gain map for the TPC based on the results of the Krypton calibration. +/// The main steps are the following: +/// +/// 1. Define outlier-pads where the krypton calibration was not succesful +/// 2. A parabolic fit for the whole chamber is performed +/// 3. replace outliers with fitted values +/// 4. normalize separately IROCs and OROCs +/// +/// For more details see below. +/// +/// ~~~{.cpp} +/// TFile f("calibKr.root") +/// AliTPCCalPad * kryptonRaw = new AliTPCCalPad(*fitMean) +/// AliTPCCalPad * kryptonMean = new AliTPCCalPad(*spectrMean) +/// AliTPCCalPad * kryptonChi2 = new AliTPCCalPad(*fitNormChi2) +/// AliTPCCalPad * kryptonRMS = new AliTPCCalPad(*fitRMS) +/// +/// .L CreateGainMap.C +/// AliTPCCalPad * final = CreateGainMap(kryptonRaw, kryptonRMS) +/// +/// TFile *h = new TFile("GainMap.root", "RECREATE") +/// final.Write() +/// ~~~ AliTPCCalPad * CreateGainMap(AliTPCCalPad *krypFitMean, AliTPCCalPad *krypFitRMS, AliTPCCalPad *noiseMap = 0, AliTPCCalPad *krypSpectrMean = 0, AliTPCCalPad *krypChi2 = 0, AliTPCCalPad *pulser = 0, AliTPCCalPad *electrode = 0) { // Draw input map + TCanvas *test3 = new TCanvas("ASIDE3", "Aoriginal"); krypFitMean->MakeHisto2D()->Draw("colz"); TCanvas *test4 = new TCanvas("CSIDE4", "Coriginal"); @@ -191,9 +185,7 @@ AliTPCCalPad * CreateGainMap(AliTPCCalPad *krypFitMean, AliTPCCalPad *krypFitRMS void MakeCalibTree(char * inputKr="calibKr.root", char * inputCE ="fitCE.root", char * inputPulser=0){ - // - // - // + AliTPCPreprocessorOnline * preprocesor = new AliTPCPreprocessorOnline; TFile f(inputKr); TFile fce(inputCE); @@ -228,9 +220,8 @@ AliTPCCalibViewerGUI*viewer =0; TTree * tree =0; void LoadViewer(){ - // - // Load calib Viewer - // + /// Load calib Viewer + TObjArray * array = AliTPCCalibViewerGUI::ShowGUI("gainTree.root"); AliTPCCalibViewerGUI* viewer = (AliTPCCalibViewerGUI*)array->At(0); makePad = viewer->GetViewer(); diff --git a/TPC/CalibMacros/CreateIonTailObject.C b/TPC/CalibMacros/CreateIonTailObject.C old mode 100755 new mode 100644 index abb9477fbb2..01b5b5ddaa1 --- a/TPC/CalibMacros/CreateIonTailObject.C +++ b/TPC/CalibMacros/CreateIonTailObject.C @@ -1,17 +1,19 @@ -/* CreateIonTailObject - * Generic script in order to create a IonTail object - * - * Usage : aliroot -b -q CreateIonTailObject.C - * - * - * Read object : - * - * TFile* f = TFile::Open("/tmp/ocdb/TPC/Calib/IonTail/Run0_999999999_v0_s0.root") - * AliCDBEntry* entry = static_cast(f.Get("AliCDBEntry")) - * TObjArray * arr = entry->GetObject(); - * arr->ls() - * - */ +/// \file CreateIonTailObject.C +/// +/// CreateIonTailObject +/// Generic script in order to create a IonTail object +/// +/// Usage: `aliroot -b -q CreateIonTailObject.C` +/// +/// Read object: +/// +/// ~~~{.cpp} +/// TFile* f = TFile::Open("/tmp/ocdb/TPC/Calib/IonTail/Run0_999999999_v0_s0.root") +/// AliCDBEntry* entry = static_cast(f.Get("AliCDBEntry")) +/// TObjArray * arr = entry->GetObject(); +/// arr->ls(); +/// ~~~ + void CreateIonTailObject( const Char_t* objectPath = "/u/marsland/MAF/OCDBimp/AllResponseFunctions.root", const Int_t minRun = 0, const Int_t maxRun = AliCDBRunRange::Infinity(), @@ -20,8 +22,7 @@ void CreateIonTailObject( const Char_t* objectPath = "/u/marsland/MAF/OCDBimp/Al const Char_t *comment = "Create new IonTail object", const Char_t* alirootVersion = "05-02-Rev-35") { - // -- Get Input - // ------------------------------------------------------------------- + // Get Input TFile* inFile = TFile::Open(objectPath); if (!inFile) { printf("File %s could not be found!\n", objectPath); diff --git a/TPC/CalibMacros/CreateRefMap.C b/TPC/CalibMacros/CreateRefMap.C index 3d428f1623d..ffe9361c2ec 100644 --- a/TPC/CalibMacros/CreateRefMap.C +++ b/TPC/CalibMacros/CreateRefMap.C @@ -1,14 +1,10 @@ -/* - Create refernce map - -*/ +/// \file CreateRefMap.C +/// Create reference map void CreateRefMap(){ - // aliroot -b -q $ALICE_ROOT/TPC/CalibMacros/CreateRefMap.C - // - //cdb storage - output stored in the working directory - // + /// aliroot -b -q $ALICE_ROOT/TPC/CalibMacros/CreateRefMap.C + // cdb storage - output stored in the working directory TString storage="local://"+gSystem->GetFromPipe("pwd")+"/OCDB"; //set reference run numbers for the various ocdb entries Int_t pedestalRun=121642; diff --git a/TPC/CalibMacros/DriftKalman.C b/TPC/CalibMacros/DriftKalman.C index 6194737527b..5be8c62e5b3 100644 --- a/TPC/CalibMacros/DriftKalman.C +++ b/TPC/CalibMacros/DriftKalman.C @@ -1,6 +1,7 @@ -// See http://en.wikipedia.org/wiki/Kalman_filter -// +/// \file DriftKalman.C +/// See http://en.wikipedia.org/wiki/Kalman_filter + /* .x ~/UliStyle.C gSystem->AddIncludePath("-I$ALICE_ROOT/STAT"); diff --git a/TPC/CalibMacros/FitAlignCombined.C b/TPC/CalibMacros/FitAlignCombined.C index a2ad187223a..8cbadf4d532 100644 --- a/TPC/CalibMacros/FitAlignCombined.C +++ b/TPC/CalibMacros/FitAlignCombined.C @@ -1,45 +1,38 @@ -/* - marian.ivanov@cern.ch - Macro to create alignment/distortion maps - As a input output of AliTPCcalibAlign and AliTPCcalibTime is used. - distortion lookup tables are used. - - Input file mean.root with distortion tree expected to be in directory: - ../mergeField0/mean.root - - - The ouput file fitAlignCombined.root contains: - 1. Resulting (residual) AliTPCCalibMisalignment - 2. QA fit plots - - Functions documented inside: - - RegisterAlignFunction(); - MakeAlignFunctionGlobal(); - MakeAlignFunctionSector(); - -*/ - - -/* - Example usage: - // - .x ~/NimStyle.C - gROOT->Macro("~/rootlogon.C"); - gSystem->Load("libANALYSIS"); - gSystem->Load("libSTAT"); - gSystem->Load("libTPCcalib"); - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros -I$ALICE_ROOT/TPC/TPC -I$ALICE_ROOT/STAT"); - .L $ALICE_ROOT/TPC/CalibMacros/FitAlignCombined.C+ - .x ConfigCalibTrain.C(119047) - // - // - FitAlignCombinedCorr(); - - -*/ - - +/// \file FitAlignCombined.C +/// +/// \author marian.ivanov@cern.ch +/// +/// Macro to create alignment/distortion maps +/// As a input output of AliTPCcalibAlign and AliTPCcalibTime is used. +/// distortion lookup tables are used. +/// +/// Input file mean.root with distortion tree expected to be in directory: +/// ../mergeField0/mean.root +/// +/// The ouput file fitAlignCombined.root contains: +/// 1. Resulting (residual) AliTPCCalibMisalignment +/// 2. QA fit plots +/// +/// Functions documented inside: +/// +/// RegisterAlignFunction(); +/// MakeAlignFunctionGlobal(); +/// MakeAlignFunctionSector(); +/// +/// Example usage: +/// +/// ~~~ +/// .x ~/NimStyle.C +/// gROOT->Macro("~/rootlogon.C"); +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libSTAT"); +/// gSystem->Load("libTPCcalib"); +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros -I$ALICE_ROOT/TPC/TPC -I$ALICE_ROOT/STAT"); +/// .L $ALICE_ROOT/TPC/CalibMacros/FitAlignCombined.C+ +/// .x ConfigCalibTrain.C(119047) +/// +/// FitAlignCombinedCorr(); +/// ~~~ #if !defined(__CINT__) || defined(__MAKECINT__) #include "TH1D.h" @@ -119,17 +112,17 @@ TCut cutS="entries>1000&&abs(snp)<0.2&&abs(theta)<1."; void RegisterAlignFunction(){ - // - // Register primitive alignment components. - // Linear conbination of primitev forulas used for fit - // The nominal delta 1 mm in shift and 1 mrad in rotation - // Primitive formulas registeren in AliTPCCoreection::AddvisualCorrection - // 0 - deltaX - // 1 - deltaY - // 2 - deltaZ - // 3 - rot0 (phi) - // 4 - rot1 (theta) - // 5 - rot2 + /// Register primitive alignment components. + /// Linear conbination of primitev forulas used for fit + /// The nominal delta 1 mm in shift and 1 mrad in rotation + /// Primitive formulas registeren in AliTPCCoreection::AddvisualCorrection + /// 0 - deltaX + /// 1 - deltaY + /// 2 - deltaZ + /// 3 - rot0 (phi) + /// 4 - rot1 (theta) + /// 5 - rot2 + TGeoHMatrix matrixX; TGeoHMatrix matrixY; TGeoHMatrix matrixZ; @@ -176,12 +169,11 @@ void RegisterAlignFunction(){ } AliTPCCalibGlobalMisalignment * MakeAlignFunctionGlobal(TVectorD paramYGlobal){ - // - // Take a fit parameters and make a combined correction - // 1. Take the common part - // 3. Make combined AliTPCCalibGlobalMisalignment - register it - // 4. Compare the aliases with fit values - IT is OK - // + /// Take a fit parameters and make a combined correction + /// 1. Take the common part + /// 3. Make combined AliTPCCalibGlobalMisalignment - register it + /// 4. Compare the aliases with fit values - IT is OK + AliTPCCalibGlobalMisalignment *alignGlobal =new AliTPCCalibGlobalMisalignment; TGeoHMatrix matGlobal; // global parameters TGeoHMatrix matDelta; // delta A side - C side @@ -226,14 +218,13 @@ AliTPCCalibGlobalMisalignment * MakeAlignFunctionGlobal(TVectorD paramYGlobal){ AliTPCCalibGlobalMisalignment * MakeAlignFunctionSector(TVectorD paramYLocal){ - // - // Take a fit parameters and make a combined correction: - // Only delta local Y and delta phi are fitted - not sensityvity for other parameters - // Algorithm: - // 1. Loop over sectors - // 2. Make combined AliTPCCalibGlobalMisalignment - register it - // 3. Compare the aliases with fit values - IT is OK - // + /// Take a fit parameters and make a combined correction: + /// Only delta local Y and delta phi are fitted - not sensityvity for other parameters + /// Algorithm: + /// 1. Loop over sectors + /// 2. Make combined AliTPCCalibGlobalMisalignment - register it + /// 3. Compare the aliases with fit values - IT is OK + AliTPCCalibGlobalMisalignment *alignLocal =new AliTPCCalibGlobalMisalignment; TGeoHMatrix matrixX; TGeoHMatrix matrixY; @@ -318,13 +309,12 @@ AliTPCCalibGlobalMisalignment * MakeAlignFunctionSector(TVectorD paramYLocal){ void LoadTrees(){ - // - // make sector alignment - using Kalman filter method -AliTPCkalmanAlign - // Combined information is used, mean residuals are minimized: - // - // 1. TPC-ITS alignment - // 2. TPC vertex alignment - // + /// make sector alignment - using Kalman filter method -AliTPCkalmanAlign + /// Combined information is used, mean residuals are minimized: + /// + /// 1. TPC-ITS alignment + /// 2. TPC vertex alignment + TFile *f0 = new TFile("../mergeField0/mean.root"); TFile *fP= new TFile("../mergePlus/mean.root"); TFile *fM= new TFile("../mergeMinus/mean.root"); @@ -390,9 +380,8 @@ void LoadTrees(){ void FitAlignCombinedCorr(){ - // - // Fit Global X and globalY shift at vertex and at ITS - // + /// Fit Global X and globalY shift at vertex and at ITS + RegisterAlignFunction(); LoadTrees(); combAlignOCDBOld = AliTPCCalibGlobalMisalignment::CreateOCDBAlign(); @@ -535,12 +524,8 @@ void FitAlignCombinedCorr(){ } void DrawFitQA(){ - // - // - // - // - // MakeQA plot 1D - // + /// MakeQA plot 1D + TCanvas c; c.SetLeftMargin(0.15); chain->Draw("1000*(mean-deltaG)>>his(100,-1.5,1.5)",cutS+"type==2&&refX==0",""); @@ -652,10 +637,8 @@ void DrawFitQA(){ void FitAlignCombined0(){ - // - // Fit Global X and globalY shift at vertex and at ITS - // - + /// Fit Global X and globalY shift at vertex and at ITS + TTreeSRedirector *pcstream= new TTreeSRedirector("fitAlignCombined.root"); TStatToolkit toolkit; @@ -850,14 +833,13 @@ void FitAlignCombined0(){ } void FitAlignCombined(){ - // - // - // make sector alignment - using Kalman filter method -AliTPCkalmanAlign - // Combined information is used, mean residuals are minimized: - // - // 1. TPC-TPC sector alignment - // 2. TPC-ITS alignment - // 3. TPC vertex alignment + /// make sector alignment - using Kalman filter method -AliTPCkalmanAlign + /// Combined information is used, mean residuals are minimized: + /// + /// 1. TPC-TPC sector alignment + /// 2. TPC-ITS alignment + /// 3. TPC vertex alignment + TFile fcalib("../mergeField0/TPCAlignObjects.root"); AliTPCcalibAlign * align = ( AliTPCcalibAlign *)fcalib.Get("alignTPC"); @@ -1100,13 +1082,12 @@ void FitAlignCombined(){ void UpdateOCDBAlign(){ - // - // Store resulting OCDB entry - // 0. Setup OCDB to get necccessary old entries - not done here - // 1. Get old OCDB entry - // 2. Get delta alignment - // 3. Add delta alignment - // 4. Store new alignment in + /// Store resulting OCDB entry + /// 0. Setup OCDB to get necccessary old entries - not done here + /// 1. Get old OCDB entry + /// 2. Get delta alignment + /// 3. Add delta alignment + /// 4. Store new alignment in AliCDBEntry * entry = AliCDBManager::Instance()->Get("TPC/Align/Data"); TClonesArray * array = (TClonesArray*)entry->GetObject(); @@ -1165,13 +1146,12 @@ void UpdateOCDBAlign(){ void UpdateOCDBAlign0(){ - // - // Store resulting OCDB entry - // 0. Setup OCDB to get necccessary old entries - not done here - // 1. Get old OCDB entry - // 2. Get delta alignment - // 3. Add delta alignment - // 4. Store new alignment in + /// Store resulting OCDB entry + /// 0. Setup OCDB to get necccessary old entries - not done here + /// 1. Get old OCDB entry + /// 2. Get delta alignment + /// 3. Add delta alignment + /// 4. Store new alignment in AliCDBEntry * entry = AliCDBManager::Instance()->Get("TPC/Align/Data"); TClonesArray * array = (TClonesArray*)entry->GetObject(); diff --git a/TPC/CalibMacros/FitRodShift.C b/TPC/CalibMacros/FitRodShift.C index 6acde877dd3..aa561dac91d 100644 --- a/TPC/CalibMacros/FitRodShift.C +++ b/TPC/CalibMacros/FitRodShift.C @@ -1,54 +1,53 @@ -/* - marian.ivanov@cern.ch, Stefan.Rossegger@cern.ch - - Macro to fit alignment/E field distortion maps - As a input output cluster distortion maps (produced by AliTPCcalibAling class) - are used. Cluster distrotion maps granularity (180 *phi x44 *theta x 53 R) - - In total 440 parameters to fit using global fit: - - 1. Rotation and translation for each sector (72x2) - 2. Rotation and translation for each quadrant of OROC (36x4x2) - 3. Rod/strip shifts in IFC and OFC (18 sectors x 2 sides x 2 ) - 4. Rotated clips in IFC and OFC - - - Input file mean.root with distortion tree expected to be in directory: - ../mergeField0/clusterDY.root - The ouput file fitRodShift.root contains: - 1. Resulting (residual) AliTPCCalibMisalignment and AliTPCFCVoltError3D classes - 2. All important temporary results are stored in the workspace (TTreeSRedirector) associated - with the file - fitrodShift - 2.a Fit parameters with errors - 2.b QA default graphs - 2.c QA defualt histograms - - - - Functions: - 1. LoadModels() - load models to fit - Rod shift (10,20) - 2. RegisterAlignFunction() - register align functions (10-16) - 3. LoadTrees - load trees and make aliases - 4. PrintFit - helper function to print substring of the fit - 5. DeltaLookup - function to calulate the distortion for given distortion cunction - - - 6. MakeAliases - Make tree aliases shortcuts for the fitting function - // - 7. MakeAlignCorrection - Crete alignment entry to be stored in the OCDB - - Dump fit parameters and errors - 8. MakeQuadrantCorrection - - - Dump fit parameters and errors - - 9. FitRodShifts - main minimization function - - - .x ~/rootlogon.C - .x ~/NimStyle.C - .L $ALICE_ROOT/TPC/CalibMacros/FitRodShift.C+ - FitRodShift(kFALSE); - // - -*/ +/// \file FitRodShift.C +/// +/// \author marian.ivanov@cern.ch, Stefan.Rossegger@cern.ch +/// +/// Macro to fit alignment/E field distortion maps +/// As a input output cluster distortion maps (produced by AliTPCcalibAling class) +/// are used. Cluster distrotion maps granularity (180 *phi x44 *theta x 53 R) +/// +/// In total 440 parameters to fit using global fit: +/// +/// 1. Rotation and translation for each sector (72x2) +/// 2. Rotation and translation for each quadrant of OROC (36x4x2) +/// 3. Rod/strip shifts in IFC and OFC (18 sectors x 2 sides x 2 ) +/// 4. Rotated clips in IFC and OFC +/// +/// +/// Input file mean.root with distortion tree expected to be in directory: +/// ../mergeField0/clusterDY.root +/// The ouput file fitRodShift.root contains: +/// 1. Resulting (residual) AliTPCCalibMisalignment and AliTPCFCVoltError3D classes +/// 2. All important temporary results are stored in the workspace (TTreeSRedirector) associated +/// with the file - fitrodShift +/// 2.a Fit parameters with errors +/// 2.b QA default graphs +/// 2.c QA defualt histograms +/// +/// +/// +/// Functions: +/// 1. LoadModels() - load models to fit - Rod shift (10,20) +/// 2. RegisterAlignFunction() - register align functions (10-16) +/// 3. LoadTrees - load trees and make aliases +/// 4. PrintFit - helper function to print substring of the fit +/// 5. DeltaLookup - function to calulate the distortion for given distortion cunction +/// - +/// 6. MakeAliases - Make tree aliases shortcuts for the fitting function +/// +/// 7. MakeAlignCorrection - Crete alignment entry to be stored in the OCDB +/// - Dump fit parameters and errors +/// 8. MakeQuadrantCorrection - +/// - Dump fit parameters and errors +/// +/// 9. FitRodShifts - main minimization function +/// +/// ~~~ +/// .x ~/rootlogon.C +/// .x ~/NimStyle.C +/// .L $ALICE_ROOT/TPC/CalibMacros/FitRodShift.C+ +/// FitRodShift(kFALSE); +/// ~~~ #if !defined(__CINT__) || defined(__MAKECINT__) #include "TFile.h" @@ -96,11 +95,10 @@ void MakeQA(); void DrawAlignParam(); void PrintFit(TString fitString, TString filter){ - // - // helper function to print substring of the fit - // TString fitString =*strFitGA; - // TString filter="rot"; - // + /// helper function to print substring of the fit + /// TString fitString =*strFitGA; + /// TString filter="rot"; + TObjArray *arr = fitString.Tokenize("++"); Int_t entries=arr->GetEntries(); for (Int_t i=0; iGet("delta"); @@ -322,20 +317,18 @@ void LoadTrees(){ } Double_t DeltaLookup(Double_t sector, Double_t localX, Double_t kZ, Double_t xref, Int_t value, Int_t corr){ - // - // Distortion maps are calculated relative to the reference X plane - // The same procedure applied for given correction - // fd(sector, localX, kZ) ==> fd(sector, localX, kZ)-fd(sector, xref, kZ)*localX/xref - // + /// Distortion maps are calculated relative to the reference X plane + /// The same procedure applied for given correction + /// fd(sector, localX, kZ) ==> fd(sector, localX, kZ)-fd(sector, xref, kZ)*localX/xref + Double_t distortion = AliTPCCorrection::GetCorrSector(sector,localX,kZ,value,corr); Double_t distortionRef = AliTPCCorrection::GetCorrSector(sector,xref,kZ,value,corr)*localX/xref; return distortion-distortionRef; } void MakeAliases(){ - // - // make alias names - // + /// make alias names + AliTPCROC * roc = AliTPCROC::Instance(); Double_t xref = ( roc->GetPadRowRadii(0,0)+roc->GetPadRowRadii(36,roc->GetNRows(36)-1))*0.5; treeDY->SetAlias("iroc","(localX<134)"); // IROC @@ -391,16 +384,15 @@ void MakeAliases(){ } AliTPCCalibGlobalMisalignment *MakeAlignCorrection(TVectorD paramA, TVectorD paramC, TMatrixD covar, Double_t chi2){ - // - // Make a global alignmnet - // Take a fit parameters and make a combined correction: - // Only delta local Y and delta phi are fitted - not sensitivity for other parameters - // GX and GY shift extracted per side. - // - // Algorithm: - // 1. Loop over sectors - // 2. Make combined AliTPCCalibGlobalMisalignment - // + /// Make a global alignmnet + /// Take a fit parameters and make a combined correction: + /// Only delta local Y and delta phi are fitted - not sensitivity for other parameters + /// GX and GY shift extracted per side. + /// + /// Algorithm: + /// 1. Loop over sectors + /// 2. Make combined AliTPCCalibGlobalMisalignment + AliTPCCalibGlobalMisalignment *alignLocal =new AliTPCCalibGlobalMisalignment; Int_t offset=3; AliTPCROC * roc = AliTPCROC::Instance(); @@ -498,18 +490,17 @@ AliTPCCalibGlobalMisalignment *MakeAlignCorrection(TVectorD paramA, TVectorD par } AliTPCCalibGlobalMisalignment *MakeQuadrantCorrection(TVectorD paramA, TVectorD paramC, TMatrixD covar, Double_t chi2){ - // - // Make a global alignmnet - // side= 1 - A side - // side=-1 - C side - // Take a fit parameters and make a combined correction: - // Only delta local Y and delta phi are fitted - not sensitivity for other parameters - // GX and GY shift extracted per side. - // - // Algorithm: - // 1. Loop over sectors - // 2. Make combined AliTPCCalibGlobalMisalignment - // + /// Make a global alignmnet + /// side= 1 - A side + /// side=-1 - C side + /// Take a fit parameters and make a combined correction: + /// Only delta local Y and delta phi are fitted - not sensitivity for other parameters + /// GX and GY shift extracted per side. + /// + /// Algorithm: + /// 1. Loop over sectors + /// 2. Make combined AliTPCCalibGlobalMisalignment + AliTPCCalibGlobalMisalignment *alignLocalQuadrant =new AliTPCCalibGlobalMisalignment; // Int_t offset=3+3*18; @@ -579,17 +570,16 @@ AliTPCCalibGlobalMisalignment *MakeQuadrantCorrection(TVectorD paramA, TVectorD } AliTPCFCVoltError3D* MakeEfieldCorrection(TVectorD paramA, TVectorD paramC, TMatrixD covar, Double_t chi2){ - // - // Make a global AliTPCFCVoltError3D object - // - // Take a fit parameters and make a combined correction: - // Only delta local Y and delta phi are fitted - not sensitivity for other parameters - // GX and GY shift extracted per side. - // - // Algorithm: - // 1. Loop over sectors - // 2. Make combined AliTPCCalibGlobalMisalignment - // + /// Make a global AliTPCFCVoltError3D object + /// + /// Take a fit parameters and make a combined correction: + /// Only delta local Y and delta phi are fitted - not sensitivity for other parameters + /// GX and GY shift extracted per side. + /// + /// Algorithm: + /// 1. Loop over sectors + /// 2. Make combined AliTPCCalibGlobalMisalignment + Int_t offset=3+9*18; // AliTPCFCVoltError3D* corrField = new AliTPCFCVoltError3D; @@ -649,14 +639,13 @@ AliTPCFCVoltError3D* MakeEfieldCorrection(TVectorD paramA, TVectorD paramC, TMat void FitRodShift(Bool_t flagIFCcopper = kTRUE) { - // - // Main fit function - // In total 440 parameters to fit using global fit: - // 1. Rotation and translation for each sector (72x2) - // 2. Rotation and translation for each quadrant of OROC (36x4x2) - // 3. Rod/strip shifts in IFC and OFC (18 sectors x 2 sides x 2 ) - // 4. Rotated clips in IFC and OFC - // + /// Main fit function + /// In total 440 parameters to fit using global fit: + /// 1. Rotation and translation for each sector (72x2) + /// 2. Rotation and translation for each quadrant of OROC (36x4x2) + /// 3. Rod/strip shifts in IFC and OFC (18 sectors x 2 sides x 2 ) + /// 4. Rotated clips in IFC and OFC + LoadTrees(); LoadModels(); RegisterAlignFunction(); @@ -844,9 +833,8 @@ void MakeQA(){ } void FitFunctionQA(){ - // - // - // + /// + TH1 *his=0; TCanvas *canvasDist= new TCanvas("FitQA","fitQA",1200,800); canvasDist->Divide(2,2); @@ -892,9 +880,8 @@ void FitFunctionQA(){ } void DrawAlignParam(){ - // - // - // + /// + TFile f("fitAlignLookup.root"); TTree * treeAlign=(TTree*)f.Get("align"); TTree * treeQuadrant=(TTree*)f.Get("quadrant"); diff --git a/TPC/CalibMacros/MakeAlignCalPad.C b/TPC/CalibMacros/MakeAlignCalPad.C index 0472058fb3a..bce5e729e2b 100644 --- a/TPC/CalibMacros/MakeAlignCalPad.C +++ b/TPC/CalibMacros/MakeAlignCalPad.C @@ -1,50 +1,68 @@ -/* - marian.ivanov@cern.ch - Macro to create alignment/distortion maps - As a input output of AliTPCcalibAlign is used. - - Algorithm: - - In the setup without the magnetic field the tracks are fitted using the linear track model. - ( in y-rphi coordinate the primary vertex is also used as a constrain) - Residuals (deltas0 between the track and clusters in Y and in z direction are filled in the 4 D histogram: - Delta: phi(180 bins): localX(53 bins): tan(phi): tan(theta)(10 bins) - - Distortion map are extracted form the residual histograms as a mean value at each bin. - Linear fits are then performed for each pad - delta as function of theta - Delta Ymeas = offsetY+slopeY*tan(theta) - Delta Zmeas = offsetZ+slopeZ*tan(theta) - - Resulting residuals exported into the OCDB are: - DeltaY = offsetY - DeltaZ = offsetZ - DeltaR = slopeZ; - - Example usage: +/// \file MakeAlignCalPad.C +/// +/// \author marian.ivanov@cern.ch +/// +/// Macro to create alignment/distortion maps +/// As a input output of AliTPCcalibAlign is used. +/// +/// Algorithm: +/// +/// In the setup without the magnetic field the tracks are fitted using the linear track model. +/// ( in y-rphi coordinate the primary vertex is also used as a constrain) +/// Residuals (deltas0 between the track and clusters in Y and in z direction are filled in the 4 D histogram: +/// Delta: phi(180 bins): localX(53 bins): tan(phi): tan(theta)(10 bins) +/// +/// Distortion map are extracted form the residual histograms as a mean value at each bin. +/// Linear fits are then performed for each pad - delta as function of theta +/// +/// ~~~{.cpp} +/// Delta Ymeas = offsetY+slopeY*tan(theta) +/// Delta Zmeas = offsetZ+slopeZ*tan(theta) +/// ~~~ +/// +/// Resulting residuals exported into the OCDB are: +/// +/// ~~~{.cpp} +/// DeltaY = offsetY +/// DeltaZ = offsetZ +/// DeltaR = slopeZ; +/// ~~~ +/// +/// Example usage: +/// +/// make calpad+ make report ps file: +/// +/// ~~~ +/// aliroot -b -q ~/NimStyle.C ../ConfigCalibTrain.C\(119037\) $ALICE_ROOT/TPC/CalibMacros/MakeAlignCalPad.C\(1\) +/// ~~~ +/// +/// make only report ps file: +/// +/// ~~~ +/// aliroot -b -q ~/NimStyle.C $ALICE_ROOT/TPC/CalibMacros/MakeAlignCalPad.C\(3\) +/// ~~~ +/// +/// Making fit - iterative procedure - see below: +/// +/// ~~~{.cpp} +/// gROOT->Macro("~/rootlogon.C"); +/// gSystem->Load("libANALYSIS"); +/// gSystem->Load("libSTAT"); +/// gSystem->Load("libTPCcalib"); +/// gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros -I$ALICE_ROOT/TPC/TPC -I$ALICE_ROOT/STAT"); +/// .L $ALICE_ROOT/TPC/CalibMacros/MakeAlignCalPad.C+ +/// // load OCDB +/// +/// gROOT->Macro("../ConfigCalibTrain.C(119037)"); +/// //2 +/// InitTPCalign(); +/// MakeFits(); // this is logn proceure 30 minutes +/// +/// //UpdateOCDB(0,AliCDBRunRange::Infinity()); +/// // +/// gROOT->Macro("~/NimStyle.C") +/// ~~~ - make calpad+ make report ps file: - aliroot -b -q ~/NimStyle.C ../ConfigCalibTrain.C\(119037\) $ALICE_ROOT/TPC/CalibMacros/MakeAlignCalPad.C\(1\) - make only report ps file: - aliroot -b -q ~/NimStyle.C $ALICE_ROOT/TPC/CalibMacros/MakeAlignCalPad.C\(3\) - Making fit - iterative procedure - see below: - - gROOT->Macro("~/rootlogon.C"); - gSystem->Load("libANALYSIS"); - gSystem->Load("libSTAT"); - gSystem->Load("libTPCcalib"); - gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros -I$ALICE_ROOT/TPC/TPC -I$ALICE_ROOT/STAT"); - .L $ALICE_ROOT/TPC/CalibMacros/MakeAlignCalPad.C+ - //load OCDB - gROOT->Macro("../ConfigCalibTrain.C(119037)"); - //2 - InitTPCalign(); - MakeFits(); // this is logn proceure 30 minutes - - //UpdateOCDB(0,AliCDBRunRange::Infinity()); - // - gROOT->Macro("~/NimStyle.C") - -*/ #if !defined(__CINT__) || defined(__MAKECINT__) #include "TH1D.h" #include "TH2F.h" @@ -98,9 +116,8 @@ void InitTPCalign(); void MakeAlignCalPad(Int_t mode){ - // - // Make AlignCalpad and make report - // + /// Make AlignCalpad and make report + gSystem->Load("libANALYSIS"); gSystem->Load("libSTAT"); gSystem->Load("libTPCcalib"); @@ -114,9 +131,8 @@ void MakeAlignCalPad(Int_t mode){ void InitTPCalign(){ - // - // read the TPC alignment - // + /// read the TPC alignment + TFile fcalib("CalibObjects.root"); TObjArray * array = (TObjArray*)fcalib.Get("TPCCalib"); if (array){ @@ -140,9 +156,7 @@ void MakeFits(){ } void FitdY(TTree * tree){ - // - // - // + /// AliTPCROC * roc = AliTPCROC::Instance(); Double_t xquadrant = roc->GetPadRowRadii(36,53); @@ -223,9 +237,8 @@ void FitdY(TTree * tree){ void DumpDerivative(TH3 * his){ - // - // - // + /// + Int_t nbins0=his->GetXaxis()->GetNbins(); Int_t nbins1=his->GetYaxis()->GetNbins(); Int_t nbins2=his->GetZaxis()->GetNbins(); @@ -261,9 +274,8 @@ void DumpDerivative(TH3 * his){ } Double_t GetCorr(Double_t sector, Double_t localX, Double_t kZ, Int_t type){ - // - // calculate the correction at given position - check the geffCorr - // + /// calculate the correction at given position - check the geffCorr + Double_t phi=sector*TMath::Pi()/9.; Double_t gx = localX*TMath::Cos(phi); Double_t gy = localX*TMath::Sin(phi); @@ -286,9 +298,8 @@ Double_t GetCorr(Double_t sector, Double_t localX, Double_t kZ, Int_t type){ void LoadDistortionTrees(){ - // - // Load distortion tree - // + /// Load distortion tree + TFile *fp = new TFile("clusterDYPlus.root"); TFile *fm = new TFile("clusterDYMinus.root"); TFile *f0 = new TFile("clusterDY0.root"); @@ -311,10 +322,9 @@ void LoadDistortionTrees(){ } void UpdateEffSectorOCDB(){ - // - // Incremeantal update ot the correction maps - // corrections on top of previous corrections - // + /// Incremeantal update ot the correction maps + /// corrections on top of previous corrections + TFile fp("clusterDYPlus.root"); TFile fm("clusterDYMinus.root"); TFile f0("clusterDY0.root"); @@ -412,9 +422,8 @@ void DrawDiff(){ void MakePlotDeltaZ(){ - // - // - // + /// + TCut cut="entries>500&&PZ.entries>500&&MZ.entries>500"; TCanvas *cA = new TCanvas("deltaZA","deltaZA",900,700); TCanvas *cC = new TCanvas("deltaZC","deltaZC",900,700); @@ -492,14 +501,13 @@ void MakePlotDeltaZ(){ void MakeAlign(){ - // - // make sector alignment - using Kalman filter method -AliTPCkalmanAlign - // Combined information is used, mean residuals are minimized: - // - // 1. TPC-TPC sector alignment - // 2. TPC-ITS alignment - // 3. TPC vertex alignment - // + /// make sector alignment - using Kalman filter method -AliTPCkalmanAlign + /// Combined information is used, mean residuals are minimized: + /// + /// 1. TPC-TPC sector alignment + /// 2. TPC-ITS alignment + /// 3. TPC vertex alignment + TFile fcalib("../mergeField0/TPCAlignObjects.root"); AliTPCcalibAlign * align = ( AliTPCcalibAlign *)fcalib.Get("alignTPC"); TFile f0("../mergeField0/mean.root"); diff --git a/TPC/CalibMacros/MakeGlobalFit.C b/TPC/CalibMacros/MakeGlobalFit.C index 36f1fd57267..8ae9d13ab42 100644 --- a/TPC/CalibMacros/MakeGlobalFit.C +++ b/TPC/CalibMacros/MakeGlobalFit.C @@ -63,7 +63,8 @@ Bool_t enableSign=kFALSE; Bool_t useEff0=kFALSE; Bool_t useEffD=kFALSE; Bool_t useEffR=kFALSE; -// +/// \file MakeGlobalFit.C + TChain *chain = 0; TChain *chainRef = 0; Bool_t printMatrix=kFALSE; @@ -105,9 +106,8 @@ void MakeAliases(){ void MakeGlobalFit(){ - // - // - // + /// + gROOT->Macro("~/rootlogon.C"); //gROOT->Macro("NimStyle.C"); gSystem->AddIncludePath("-I$ALICE_ROOT/STAT"); @@ -218,8 +218,8 @@ void MakeGlobalFit(){ } void MakeChain(){ - // - // + /// + TH1::AddDirectory(0); TFile * f0 =0; // file 0 field TFile * fp =0; // file plus @@ -267,9 +267,8 @@ void MakeChain(){ void MakeCuts(){ - // - // - // + /// + TCut cutS="((rms>0&&R.rms>0&&entries>0&&R.entries>0))"; // statistic cuts TCut cutType="((dtype==R.dtype)&&(ptype==R.ptype))"; // corresponding types TCut cutOut="(ptype==0)*abs(mdelta)<(0.3+rms)||(ptype==0&&abs(mdelta*85)<(0.3+rms*85))"; // corresponding types @@ -284,9 +283,8 @@ void MakeCuts(){ TMatrixD * MakeCorrelation(TMatrixD &matrix){ - // - // - // + /// + Int_t nrows = matrix.GetNrows(); TMatrixD * mat = new TMatrixD(nrows,nrows); for (Int_t irow=0; irowDivide(1,2); @@ -494,9 +490,8 @@ TCanvas* DrawFitITS(const char *name){ TCanvas* DrawFitLaser(const char *cname){ - // - // - // + /// + TH1::AddDirectory(0); TCut cutLaser=cut+"isLaser&&bz<0"; TCanvas *canvas= new TCanvas(cname, cname,800,800); @@ -555,9 +550,8 @@ TCanvas* DrawFitLaser(const char *cname){ TCanvas* DrawFitVertex(const char *name){ - // - // - // + /// + TLegend *legend=0; TCanvas *canvas = new TCanvas(name,name,800,800); canvas->Divide(1,2); @@ -811,9 +805,8 @@ TCanvas * DrawCorrdSnp(){ TCanvas * DrawFitdY(const char *name){ - // - // - // + /// + TH1::AddDirectory(0); TCanvas *canvas = new TCanvas(name,name,800,800); canvas->Divide(3,5); @@ -843,9 +836,8 @@ TCanvas * DrawFitdY(const char *name){ } TCanvas * DrawFitdSnp(const char *name){ - // - // - // + /// + TH1::AddDirectory(0); TCanvas *canvas = new TCanvas(name,name,800,800); canvas->Divide(3,5); @@ -1121,14 +1113,12 @@ TCanvas * MakeComposedCorrection(const char *name){ void MakeOCDBEntry(Int_t refRun){ - // - // make a Correction OCDB entry - // take the fit values writen in config file - // - // - // 1. Read previous value used in calibration - // OCDB has to be initialized before - + /// make a Correction OCDB entry + /// take the fit values writen in config file + /// + /// 1. Read previous value used in calibration + /// OCDB has to be initialized before + gROOT->Macro(Form("ConfigCalibTrain.C(%d)",refRun)); // configuring calib db gROOT->LoadMacro("AddTaskTPCCalib.C"); gROOT->ProcessLine(Form("ConfigOCDB(%d);",refRun)); diff --git a/TPC/CalibMacros/MakeLookup.C b/TPC/CalibMacros/MakeLookup.C index 32b5c420fd7..866a828155a 100644 --- a/TPC/CalibMacros/MakeLookup.C +++ b/TPC/CalibMacros/MakeLookup.C @@ -1,21 +1,17 @@ -// -// Make lookup of distortion TPC distortion +(ITS and TRD) -// Input: Residual histograms obtained in the AliTPCcalibTime - -// Residual histograms: -// 1. TPC-ITS - entrance of the TPC -// 2. TPC-ITS - at the vertex -// 3. TPC-TRD - outer wall of the TPC - -// Histogram binning: -// 1. Theta - fP3 -// 2. Phi - global phi at the entrance (case 1,2) and at the outer wall of TPC (case 3) -// 3. snp(phi) - fP2 - local inclination angle at reference X - -// Output value: -// Mean residuals, rms and number of entries in each bing -// -// +/// \file MakeLookup.C +/// +/// Make lookup of distortion TPC distortion +(ITS and TRD) +/// Input: Residual histograms obtained in the AliTPCcalibTime +/// Residual histograms: +/// 1. TPC-ITS - entrance of the TPC +/// 2. TPC-ITS - at the vertex +/// 3. TPC-TRD - outer wall of the TPC +/// Histogram binning: +/// 1. Theta - fP3 +/// 2. Phi - global phi at the entrance (case 1,2) and at the outer wall of TPC (case 3) +/// 3. snp(phi) - fP2 - local inclination angle at reference X +/// Output value: +/// Mean residuals, rms and number of entries in each bing /* @@ -94,10 +90,10 @@ void MakeLaserTree(); void AddEffectiveCorrection(AliTPCComposedCorrection* comp); void MakeLookup(Int_t run, Int_t mode){ - // - // make a lookup tree with mean values - // 5. make laser tree - // 4. + /// make a lookup tree with mean values + /// 5. make laser tree + /// 4. + gSystem->AddIncludePath("-I$ALICE_ROOT/STAT"); gSystem->Load("libANALYSIS"); gSystem->Load("libTPCcalib"); @@ -158,10 +154,9 @@ void MakeLookup(Int_t run, Int_t mode){ void MakeFits(Int_t run){ - // - // Make the fits of distortion - // store fit results and QA pictures in the file distortFit.root - // + /// Make the fits of distortion + /// store fit results and QA pictures in the file distortFit.root + TCut cut="entries>50&&rms>0"; TTreeSRedirector *pcstream = new TTreeSRedirector("distortFit.root"); AliXRDPROOFtoolkit tool; @@ -227,7 +222,8 @@ void MakeFits(Int_t run){ void FitLookup(TChain *chainIn, const char *prefix, TVectorD &vecA, TVectorD &vecC, TVectorD& vecStatA, TVectorD &vecStatC, TCut cut, TObjArray *picArray){ - // TCut cut="entries>100&&rms>0"; + /// TCut cut="entries>100&&rms>0"; + vecStatA.ResizeTo(6); vecStatC.ResizeTo(6); vecA.ResizeTo(10); @@ -313,9 +309,8 @@ void FitLookup(TChain *chainIn, const char *prefix, TVectorD &vecA, TVectorD &ve void DrawDistortionDy(TCut cutUser, Double_t ymin, Double_t ymax){ - // - // - // + /// + TFile fplus("meanBplus.root"); TFile fminus("meanBminus.root"); TTree * titsDyPlus= (TTree*)fplus.Get("ITSdy"); @@ -459,12 +454,9 @@ void DrawDistortionDy(TCut cutUser, Double_t ymin, Double_t ymax){ void MakeFitTree(){ - // - // 1. Initialize ocdb e.g - // .x $ALICE_ROOT/ANALYSIS/CalibMacros/Pass0/ConfigCalibTrain.C(114972,) - // .x $ALICE_ROOT/ANALYSIS/CalibMacros/Pass0/ConfigCalibTrain.C(114972,"local:///lustre/alice/alien/alice/data/2010/OCDB") - // - // + /// 1. Initialize ocdb e.g + /// .x $ALICE_ROOT/ANALYSIS/CalibMacros/Pass0/ConfigCalibTrain.C(114972,) + /// .x $ALICE_ROOT/ANALYSIS/CalibMacros/Pass0/ConfigCalibTrain.C(114972,"local:///lustre/alice/alien/alice/data/2010/OCDB") AliTPCComposedCorrection *cc= MakeComposedCorrection(); TObjArray * corr = (TObjArray*)(cc->GetCorrections()); @@ -566,11 +558,9 @@ void MakeGlobalFit(){ void MakeGlobalFitRelative(Int_t highFrequency=0){ - // - // Make a global fit of ExB - // To get rid of the misalignment errors - - // Use relative change of deltas for 2 different filed settings - // + /// Make a global fit of ExB + /// To get rid of the misalignment errors - + /// Use relative change of deltas for 2 different filed settings AliXRDPROOFtoolkit tool; // TChain *chain = tool.MakeChain("distortion.txt","fit",0,100000); @@ -771,9 +761,8 @@ void DrawDistortionMaps(const char *fname){ TCanvas * DrawDistortionMaps(TTree * treedy, TTree * treedsnp, TTree* treed1pt, const char * name, const char *title){ - // - // - // + /// + TH1::AddDirectory(0); TCanvas *cdist = new TCanvas(name,name,1200,800); cdist->Divide(3,2); @@ -841,7 +830,8 @@ TCanvas * DrawDistortionMaps(TTree * treedy, TTree * treedsnp, TTree* treed1pt, AliTPCComposedCorrection * MakeComposedCorrection(){ - // + /// + Double_t bzField=AliTrackerBase::GetBz(); AliMagF* magF= (AliMagF*)(TGeoGlobalMagField::Instance()->GetField()); Double_t vdrift = 2.6; // [cm/us] // to be updated: per second (ideally) @@ -914,9 +904,8 @@ AliTPCComposedCorrection * MakeComposedCorrection(){ void AddEffectiveCorrection(AliTPCComposedCorrection* comp){ - // - // - // + /// + TMatrixD polA(18,4); TMatrixD polC(18,4); TMatrixD valA(18,1); @@ -962,9 +951,8 @@ void AddEffectiveCorrection(AliTPCComposedCorrection* comp){ void MakeLaserTree(){ - // - // - // + /// + AliTPCComposedCorrection *cc= MakeComposedCorrection(); TObjArray * corr = (TObjArray*)(cc->GetCorrections()); // corr->AddLast(cc); diff --git a/TPC/CalibMacros/RegisterCorrection.C b/TPC/CalibMacros/RegisterCorrection.C index c442b05b92e..c35909d05d6 100644 --- a/TPC/CalibMacros/RegisterCorrection.C +++ b/TPC/CalibMacros/RegisterCorrection.C @@ -1,47 +1,47 @@ -/* - marian.ivanov@cern.ch - // - Register primitive corrections: base functions for minimization: - Id numbers are associated to given primitive corrections. - See comments in the function headers. - Used only for residuals minimization not in the reconstruction. - File with all primitives expected to be in the current directory: - filenames: - TPCCorrectionPrimitives.root - Alignment, Quadrants, 2D symentrid and rod misalingment - TPCCorrectionPrimitivesROC.root - ExB distortion due to the common ROC misalignment - TPCCorrectionPrimitivesSector.root - ExB distortion due to the one sector misalingment (sector 0) - TPCCorrectionPrimitivesFieldCage.root - ExB distortion due to the Field cage missalignment - // - - RegisterCorrection(); - Reserved id's 0 -999 - // - RegisterAliTPCFCVoltError3D(); - Reserved id's 0 -99 - RegisterAliTPCBoundaryVoltError(); - Reserved id's 100-199 - RegisterAliTPCCalibGlobalMisalignment(); - Reserved id's 200-499 - RegisterAliTPCExBBShape(); - Reserved id's 500-600 - RegisterAliTPCExBTwist(); - Reserved id's 600-700 - RegisterAliTPCROCVoltError3D() - Reserved id's 700-800 - RegisterAliTPCROCVoltError3DSector() - Reserved id's 800-900 - .x ~/rootlogon.C - .L $ALICE_ROOT/TPC/CalibMacros/RegisterCorrection.C+ - RegisterCorrection(); - -*/ - -/* - Example use: - .x ~/rootlogon.C - .L $ALICE_ROOT/PWGPP/CalibMacros/CPass0/ConfigCalibTrain.C - ConfigCalibTrain(119037,"local:///cvmfs/alice.gsi.de/alice/data/2010/OCDB/") - - .L $ALICE_ROOT/TPC/CalibMacros/RegisterCorrection.C+ - RegisterCorrection(0); - - //See example usage of correction primitive/derivatives in file - - -*/ - +/// \file RegisterCorrection.C +/// +/// \author marian.ivanov@cern.ch +/// +/// Register primitive corrections: base functions for minimization: +/// Id numbers are associated to given primitive corrections. +/// See comments in the function headers. +/// Used only for residuals minimization not in the reconstruction. +/// File with all primitives expected to be in the current directory: +/// filenames: +/// TPCCorrectionPrimitives.root - Alignment, Quadrants, 2D symentrid and rod misalingment +/// TPCCorrectionPrimitivesROC.root - ExB distortion due to the common ROC misalignment +/// TPCCorrectionPrimitivesSector.root - ExB distortion due to the one sector misalingment (sector 0) +/// TPCCorrectionPrimitivesFieldCage.root - ExB distortion due to the Field cage missalignment +/// +/// +/// RegisterCorrection(); - Reserved id's 0 -999 +/// +/// RegisterAliTPCFCVoltError3D(); - Reserved id's 0 -99 +/// RegisterAliTPCBoundaryVoltError(); - Reserved id's 100-199 +/// RegisterAliTPCCalibGlobalMisalignment(); - Reserved id's 200-499 +/// RegisterAliTPCExBBShape(); - Reserved id's 500-600 +/// RegisterAliTPCExBTwist(); - Reserved id's 600-700 +/// RegisterAliTPCROCVoltError3D() - Reserved id's 700-800 +/// RegisterAliTPCROCVoltError3DSector() - Reserved id's 800-900 +/// +/// ~~~ +/// .x ~/rootlogon.C +/// .L $ALICE_ROOT/TPC/CalibMacros/RegisterCorrection.C+ +/// RegisterCorrection(); +/// ~~~ +/// +/// Example use: +/// +/// ~~~ +/// .x ~/rootlogon.C +/// .L $ALICE_ROOT/PWGPP/CalibMacros/CPass0/ConfigCalibTrain.C +/// ConfigCalibTrain(119037,"local:///cvmfs/alice.gsi.de/alice/data/2010/OCDB/") +/// +/// .L $ALICE_ROOT/TPC/CalibMacros/RegisterCorrection.C+ +/// RegisterCorrection(0); +/// ~~~ +/// +/// See example usage of correction primitive/derivatives in file #if !defined(__CINT__) || defined(__MAKECINT__) #include "TFile.h" @@ -176,14 +176,10 @@ void RegisterAliTPCFCVoltError3DRodFCSideRadiusType(); // void RegisterCorrection(Int_t type=0){ - // - // - // - // check the presence of corrections in file - // - //gROOT->Macro("ConfigCalibTrain.C(119037)"); - // - // + /// check the presence of corrections in file + /// + /// gROOT->Macro("ConfigCalibTrain.C(119037)"); + if (type==1) return RegisterAliTPCROCVoltError3D(); // 3D distortion due misalignemnt of FC .... if (type==2) return RegisterAliTPCROCVoltError3DSector(); // 3D distortion due misalingment of Sectors if (type==4) return RegisterAliTPCFCVoltError3DRodFCSideRadiusType(); @@ -222,25 +218,24 @@ void RegisterCorrection(Int_t type=0){ void RegisterAliTPCFCVoltError3D(){ - // - // Load the models from the file - // Or create it - // Register functions with following IDs: - // IMPORTANT: The nominal shift is in mm - // - // rotOFC - 0 - // rodOFC1 - 1 - // rodOFC2 - 2 - // rotIFC - 3 - // rodIFC1 - 4 - // rodIFC2 - 5 - // rodIFCShift - 6 - // rodIFCSin - 7 - // rodIFCCos - 8 - // rodOFCShift - 9 - // rodOFCSin - 10 - // rodOFCCos - 11 - // + /// Load the models from the file + /// Or create it + /// Register functions with following IDs: + /// IMPORTANT: The nominal shift is in mm + /// + /// rotOFC - 0 + /// rodOFC1 - 1 + /// rodOFC2 - 2 + /// rotIFC - 3 + /// rodIFC1 - 4 + /// rodIFC2 - 5 + /// rodIFCShift - 6 + /// rodIFCSin - 7 + /// rodIFCCos - 8 + /// rodOFCShift - 9 + /// rodOFCSin - 10 + /// rodOFCCos - 11 + printf("RegisterAliTPCFCVoltError3D()"); Int_t volt = 40; // 40 V ~ 1mm AliTPCComposedCorrection *corrField3D = (AliTPCComposedCorrection*) fCorrections->Get("TPCFCVoltError3D"); @@ -389,15 +384,14 @@ void RegisterAliTPCFCVoltError3D(){ void RegisterAliTPCFCVoltError3DRodFCSideRadiusType(){ - // - // Load the models from the file - // Or create it - // Register functions with following IDs: - // IMPORTANT: The nominal shift is in mm - // - // naming convention: - // rodFCSide%dRadius%dType%d - // + /// Load the models from the file + /// Or create it + /// Register functions with following IDs: + /// IMPORTANT: The nominal shift is in mm + /// + /// naming convention: + /// rodFCSide%dRadius%dType%d + ::Info("RegisterAliTPCFCVoltError3DRodFCSideRadiusType()","Start"); Int_t volt = 40; // 40 V ~ 1mm TFile * fCorrectionsRodFCSideRadiusType = TFile::Open("TPCCorrectionPrimitivesFieldCage.root","update"); @@ -465,18 +459,17 @@ void RegisterAliTPCFCVoltError3DRodFCSideRadiusType(){ void RegisterAliTPCCalibGlobalMisalignment(){ - // - // Register primitive alignment components. - // Linear conbination of primitev forulas used for fit - // The nominal delta 1 mm in shift and 1 mrad in rotation - // Primitive formulas registeren in AliTPCCoreection::AddvisualCorrection - // 20 - deltaX - // 21 - deltaY - // 22 - deltaZ - // 23 - rot0 (phi) - // 24 - rot1 (theta) - // 25 - rot2 - // + /// Register primitive alignment components. + /// Linear conbination of primitev forulas used for fit + /// The nominal delta 1 mm in shift and 1 mrad in rotation + /// Primitive formulas registeren in AliTPCCoreection::AddvisualCorrection + /// 20 - deltaX + /// 21 - deltaY + /// 22 - deltaZ + /// 23 - rot0 (phi) + /// 24 - rot1 (theta) + /// 25 - rot2 + printf("RegisterAliTPCCalibGlobalMisalignment()\n"); TGeoHMatrix matrixX; TGeoHMatrix matrixY; @@ -601,15 +594,14 @@ void RegisterAliTPCCalibGlobalMisalignment(){ void RegisterAliTPCBoundaryVoltError(){ - // - // Register phi symetric E filed distortions - // 100-108 - A side 0 Field - // 110-118 - C side 0 Field - // 120-128 - A side +0.5 Field - // 130-138 - C side +0.5 Field - // 140-148 - A side -0.5 Field - // 150-158 - C side -0.5 Field - // + /// Register phi symetric E filed distortions + /// 100-108 - A side 0 Field + /// 110-118 - C side 0 Field + /// 120-128 - A side +0.5 Field + /// 130-138 - C side +0.5 Field + /// 140-148 - A side -0.5 Field + /// 150-158 - C side -0.5 Field + Double_t vdrift = 2.64; // [cm/us] // to be updated: per second (ideally) Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully) Double_t T1 = 1.0; @@ -704,9 +696,8 @@ void RegisterAliTPCBoundaryVoltError(){ void RegisterAliTPCExBShape(){ - // - // - // + /// + AliMagF *magF = new AliMagF("mag","mag"); exbShape = new AliTPCExBBShape; @@ -734,9 +725,8 @@ void RegisterAliTPCExBShape(){ void RegisterAliTPCExBTwist(){ - // - // - // + /// + twistX = new AliTPCExBTwist; twistY = new AliTPCExBTwist; twistX->SetXTwist(0.001); // 1 mrad twist in x @@ -752,9 +742,8 @@ void RegisterAliTPCExBTwist(){ } void RegisterAliTPCCorrectionDrift(){ - // - // Drift distortion/correction - // + /// Drift distortion/correction + for (Int_t idrift=0; idrift<7; idrift++) { calibDrift[idrift]=new AliTPCCorrectionDrift; } @@ -788,11 +777,11 @@ void RegisterAliTPCCorrectionDrift(){ void RegisterAliTPCROCVoltError3D(){ - // - // ROC rotation transformation - // 700 -709 - 0 field - // 710 -719 - +0.5 field - // 720 -729 - -0.5 field + /// ROC rotation transformation + /// 700 -709 - 0 field + /// 710 -719 - +0.5 field + /// 720 -729 - -0.5 field + Double_t vdrift = 2.64; // [cm/us] // to be updated: per second (ideally) Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully) Double_t T1 = 1.0; @@ -1155,11 +1144,10 @@ void RegisterAliTPCROCVoltError3D(){ void RegisterAliTPCROCVoltError3DSector(){ - // - // ROC rotation and shift transformation - // 800-819 - 0.0 Field - // 820-839 - +0.5 Field - // 840-859 - +0.5 Field + /// ROC rotation and shift transformation + /// 800-819 - 0.0 Field + /// 820-839 - +0.5 Field + /// 840-859 - +0.5 Field rocShiftIROCA0=0; // IROC shift A0 side rocRotIROCA0=0; // IROC rot A0 side @@ -1364,9 +1352,8 @@ void RegisterAliTPCROCVoltError3DSector(){ AliTPCComposedCorrection * MakeComposedCorrectionExB(){ - // - // make composed corection for ExB scanning - // + /// make composed corection for ExB scanning + RegisterCorrection(); // // @@ -1482,9 +1469,8 @@ AliTPCComposedCorrection * MakeComposedCorrectionExB(){ AliTPCComposedCorrection * GetCorrectionFromFile(){ - // - // Getthe appropariate correction form the closest file - // + /// Getthe appropariate correction form the closest file + TFile * fexb= TFile::Open("RegisterCorrectionExB.root"); if (!fexb) fexb= TFile::Open("../RegisterCorrectionExB.root"); if (!fexb) fexb= TFile::Open("../../RegisterCorrectionExB.root"); @@ -1522,11 +1508,11 @@ AliTPCComposedCorrection * GetCorrectionFromFile(){ } void TestParExample(){ - // - // dz shift example: AliTPCCorrection::AddVisualCorrection(rocDzIROCA,705); - // => parabolic fit and helix fit agrees - once significant ammount of points used - // 160 point - agreement ~2%; - // 80 points - agreement ~5% + /// dz shift example: AliTPCCorrection::AddVisualCorrection(rocDzIROCA,705); + /// => parabolic fit and helix fit agrees - once significant ammount of points used + /// 160 point - agreement ~2%; + /// 80 points - agreement ~5% + AliTPCCorrection* corr = AliTPCCorrection::GetVisualCorrection(705); corr->SetOmegaTauT1T2(0.33,1,1); TF1 f705Par("f705","AliTPCCorrectionFit::EvalAtPar(0,0,85, x,0.1,705,0,80)",0,360); @@ -1541,9 +1527,8 @@ void TestParExample(){ void TestFitSpeed(Int_t nEvals){ - // - // test speed of helix fit/ resp. parabolic fir - // + /// test speed of helix fit/ resp. parabolic fir + TStopwatch timerh; ::Info("TestFitSpeed","Helix fit"); for (Int_t i=0;iRndm(),0.1,705,0,80); diff --git a/TPC/CalibMacros/distortionMapDraw.C b/TPC/CalibMacros/distortionMapDraw.C index a8827d19adb..941b04493a1 100644 --- a/TPC/CalibMacros/distortionMapDraw.C +++ b/TPC/CalibMacros/distortionMapDraw.C @@ -1,13 +1,13 @@ -// -// This is an example macro for drawing of the distortion maps which were created during the CPass0 -// respectivally, CPass1 -// -// Macro to be extended - resulting QA plots to be published on the web page -// +/// \file distortionMapDraw.C +/// +/// This is an example macro for drawing of the distortion maps which were created during the CPass0 +/// respectivally, CPass1 +/// +/// Macro to be extended - resulting QA plots to be published on the web page + void distortionMapDraw(){ - // - // 1.) connect the grid - // + // 1.) connect the grid + TGrid::Connect("alien"); // // 2.) Open calibration of interest. e.g diff --git a/TPC/CalibMacros/driftITSTPC.C b/TPC/CalibMacros/driftITSTPC.C index 0c7540d9c82..95ba6f0d3cc 100644 --- a/TPC/CalibMacros/driftITSTPC.C +++ b/TPC/CalibMacros/driftITSTPC.C @@ -1,3 +1,5 @@ +/// \file driftITSTPC.C + /* Formulas: @@ -96,8 +98,8 @@ TVectorD errors; void FillVar(){ - // - // + /// + npoints =tree->Draw("side",cutA+cut1+cut2); vside.ResizeTo(npoints); vside.SetElements(tree->GetV1()); // @@ -136,9 +138,8 @@ void FillVar(){ void FitI1(){ - // - // Independent fit 1 - // + /// Independent fit 1 + TString fstringTl1=""; fstringTl1+="(side)++"; fstringTl1+="(tl)++"; @@ -170,9 +171,8 @@ void FitI1(){ } void Fit2I(){ - // - // Independent fit - // + /// Independent fit + TString fstringTl2=""; fstringTl2+="(side)++"; fstringTl2+="(tl)++"; @@ -218,11 +218,10 @@ void Fit2I(){ void Fit1(){ - // - // - // dz = zs-z = -s*vr *(z0-s*z)+s*dzt - // dzs/dl = dz/dl +s*s*vr*dz/dl - // d(dz/dl) = vr*dz/dl + /// dz = zs-z = -s*vr *(z0-s*z)+s*dzt + /// dzs/dl = dz/dl +s*s*vr*dz/dl + /// d(dz/dl) = vr*dz/dl + TLinearFitter fitter1(5, "hyp4"); // parameters // 0 - P3 offset @@ -270,11 +269,10 @@ void Fit1(){ void Fit2(){ - // - // - // dz = zs-z = -s*vr *(z0-s*z)+s*dzt - // dzs/dl = dz/dl +s*s*vr*dz/dl - // d(dz/dl) = vr*dz/dl + /// dz = zs-z = -s*vr *(z0-s*z)+s*dzt + /// dzs/dl = dz/dl +s*s*vr*dz/dl + /// d(dz/dl) = vr*dz/dl + TLinearFitter fitter2(7, "hyp6"); // parameters // 0 - P3 offset diff --git a/TPC/CalibMacros/makeOCDBTPC.C b/TPC/CalibMacros/makeOCDBTPC.C index 89bac0725ed..4e2e6066601 100644 --- a/TPC/CalibMacros/makeOCDBTPC.C +++ b/TPC/CalibMacros/makeOCDBTPC.C @@ -1,3 +1,5 @@ +/// \file makeOCDBTPC.C + /* Make OCDB entries for the calibration using tracks: The specific storage is set in the STEERING macro. @@ -15,9 +17,8 @@ void makeOCDBTPC(Int_t startRun, Int_t endRun=AliCDBRunRange::Infinity(),TString inputFile="CalibObjects.root", TString ocdbStorage=""){ - // - // - // + /// + gSystem->Load("libSTEER"); gSystem->Load("libANALYSIS"); gSystem->Load("libSTAT"); diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in index c6164482f3d..63536146fc6 100644 --- a/doxygen/Doxyfile.in +++ b/doxygen/Doxyfile.in @@ -762,7 +762,8 @@ INPUT = @CMAKE_SOURCE_DIR@/doxygen \ @CMAKE_SOURCE_DIR@/TPC \ @CMAKE_SOURCE_DIR@/TPC/Attic \ @CMAKE_SOURCE_DIR@/TPC/Base/test \ - @CMAKE_SOURCE_DIR@/TPC/Cal + @CMAKE_SOURCE_DIR@/TPC/Cal \ + @CMAKE_SOURCE_DIR@/TPC/CalibMacros # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -- 2.43.0