AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MakeAlignCalPad.C File Reference
#include "TH1D.h"
#include "TH2F.h"
#include "THnSparse.h"
#include "TVectorD.h"
#include "TTreeStream.h"
#include "TFile.h"
#include "AliTPCcalibAlign.h"
#include "AliTPCROC.h"
#include "AliTPCCalROC.h"
#include "AliTPCCalPad.h"
#include "TF1.h"
#include "TH2.h"
#include "TH3.h"
#include "TROOT.h"
#include "TProfile.h"
#include "AliTPCPreprocessorOnline.h"
#include "AliTPCcalibDB.h"
#include "AliTPCkalmanAlign.h"
#include "TPostScript.h"
#include "TLegend.h"
#include "TCut.h"
#include "TCanvas.h"
#include "TStyle.h"
#include "AliTPCExBEffectiveSector.h"
#include "AliTPCComposedCorrection.h"
#include "AliCDBMetaData.h"
#include "AliCDBId.h"
#include "AliCDBManager.h"
#include "AliCDBStorage.h"
#include "AliCDBEntry.h"
#include "TStatToolkit.h"
Include dependency graph for MakeAlignCalPad.C:

Go to the source code of this file.

Functions

Double_t GetCorr (Double_t sector, Double_t localX, Double_t kZ, Int_t type)
 
void MakeFits ()
 
void InitTPCalign ()
 
void MakeAlignCalPad (Int_t mode)
 
void FitdY (TTree *tree)
 
void DumpDerivative (TH3 *his)
 
void LoadDistortionTrees ()
 
void UpdateEffSectorOCDB ()
 
void DrawDiff ()
 
void MakePlotDeltaZ ()
 
void MakeAlign ()
 

Variables

TObject * palign =0
 
TTree * treeP =0
 
TTree * treeM =0
 
TTree * tree0 =0
 
TTree * treePZ =0
 
TTree * treeMZ =0
 
TTree * tree0Z =0
 
AliTPCROCproc = AliTPCROC::Instance()
 
AliTPCExBEffectiveSectorgeffCorr =0
 

Detailed Description

Author
maria.nosp@m.n.iv.nosp@m.anov@.nosp@m.cern.nosp@m..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:

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
MakeFits(); // this is logn proceure 30 minutes
//UpdateOCDB(0,AliCDBRunRange::Infinity());
//
gROOT->Macro("~/NimStyle.C")

Definition in file MakeAlignCalPad.C.

Function Documentation

void DrawDiff ( )

Definition at line 397 of file MakeAlignCalPad.C.

void DumpDerivative ( TH3 *  his)

Definition at line 239 of file MakeAlignCalPad.C.

void FitdY ( TTree *  tree)

Definition at line 158 of file MakeAlignCalPad.C.

Double_t GetCorr ( Double_t  sector,
Double_t  localX,
Double_t  kZ,
Int_t  type 
)

calculate the correction at given position - check the geffCorr

Definition at line 276 of file MakeAlignCalPad.C.

void InitTPCalign ( )

read the TPC alignment

Definition at line 133 of file MakeAlignCalPad.C.

Referenced by MakeAlignCalPad().

void LoadDistortionTrees ( )

Load distortion tree

Definition at line 300 of file MakeAlignCalPad.C.

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

Definition at line 503 of file MakeAlignCalPad.C.

void MakeAlignCalPad ( Int_t  mode)

Make AlignCalpad and make report

Definition at line 118 of file MakeAlignCalPad.C.

void MakeFits ( )

Definition at line 150 of file MakeAlignCalPad.C.

Referenced by MakeAlignCalPad().

void MakePlotDeltaZ ( )

Definition at line 424 of file MakeAlignCalPad.C.

void UpdateEffSectorOCDB ( )

Incremeantal update ot the correction maps corrections on top of previous corrections

Definition at line 324 of file MakeAlignCalPad.C.

Variable Documentation

Definition at line 110 of file MakeAlignCalPad.C.

TObject* palign =0

Definition at line 102 of file MakeAlignCalPad.C.

Referenced by InitTPCalign(), and MakeFits().

Definition at line 109 of file MakeAlignCalPad.C.

TTree* tree0 =0

Definition at line 105 of file MakeAlignCalPad.C.

Referenced by LoadDistortionTrees(), MakeChain(), and MakePlotDeltaZ().

TTree* tree0Z =0

Definition at line 108 of file MakeAlignCalPad.C.

Referenced by LoadDistortionTrees().

TTree* treeM =0

Definition at line 104 of file MakeAlignCalPad.C.

Referenced by LoadDistortionTrees(), and MakeChain().

TTree* treeMZ =0

Definition at line 107 of file MakeAlignCalPad.C.

Referenced by LoadDistortionTrees().

TTree* treeP =0

Definition at line 103 of file MakeAlignCalPad.C.

Referenced by ConvertHits(), LoadDistortionTrees(), and MakeChain().

TTree* treePZ =0

Definition at line 106 of file MakeAlignCalPad.C.

Referenced by LoadDistortionTrees().