AliRoot Core  d69033e (d69033e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FitRodShift.C File Reference
#include "TFile.h"
#include "TTreeStream.h"
#include "TMath.h"
#include "TGraph.h"
#include "TRandom.h"
#include "TTree.h"
#include "TF1.h"
#include "TH2F.h"
#include "TH3F.h"
#include "TAxis.h"
#include "TPad.h"
#include "TCanvas.h"
#include "TStyle.h"
#include "AliTPCParamSR.h"
#include "TDatabasePDG.h"
#include "AliTPCFCVoltError3D.h"
#include "AliTPCROCVoltError3D.h"
#include "AliTPCComposedCorrection.h"
#include "AliTPCBoundaryVoltError.h"
#include "AliCDBEntry.h"
#include "AliTPCROC.h"
#include <TStatToolkit.h>
#include "TCut.h"
#include "TGraphErrors.h"
#include "AliTPCCalibGlobalMisalignment.h"
Include dependency graph for FitRodShift.C:

Go to the source code of this file.

Functions

void FitFunctionQA ()
 
void MakeQA ()
 
void DrawAlignParam ()
 
void PrintFit (TString fitString, TString filter)
 
void LoadModels ()
 
void RegisterAlignFunction ()
 
void LoadTrees ()
 
Double_t DeltaLookup (Double_t sector, Double_t localX, Double_t kZ, Double_t xref, Int_t value, Int_t corr)
 
void MakeAliases ()
 
AliTPCCalibGlobalMisalignmentMakeAlignCorrection (TVectorD paramA, TVectorD paramC, TMatrixD covar, Double_t chi2)
 
AliTPCCalibGlobalMisalignmentMakeQuadrantCorrection (TVectorD paramA, TVectorD paramC, TMatrixD covar, Double_t chi2)
 
AliTPCFCVoltError3DMakeEfieldCorrection (TVectorD paramA, TVectorD paramC, TMatrixD covar, Double_t chi2)
 
void FitRodShift (Bool_t flagIFCcopper=kTRUE)
 

Variables

TTreeSRedirector * pcWorkspace = 0
 
TTree * treeDY = 0
 
TTree * treeDZ = 0
 
AliTPCFCVoltError3DrotOFC =0
 
AliTPCFCVoltError3DrodOFC1 =0
 
AliTPCFCVoltError3DrodOFC2 =0
 
AliTPCFCVoltError3DrotIFC =0
 
AliTPCFCVoltError3DrodIFC1 =0
 
AliTPCFCVoltError3DrodIFC2 =0
 
AliTPCFCVoltError3DrodAll =0
 
AliTPCComposedCorrectioncorFit0 = 0
 

Detailed Description

Author
maria.nosp@m.n.iv.nosp@m.anov@.nosp@m.cern.nosp@m..ch, Stefa.nosp@m.n.Ro.nosp@m.ssegg.nosp@m.er@c.nosp@m.ern.c.nosp@m.h

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);

Definition in file FitRodShift.C.

Function Documentation

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

Definition at line 319 of file FitRodShift.C.

void DrawAlignParam ( )

Definition at line 882 of file FitRodShift.C.

Referenced by MakeQA().

void FitFunctionQA ( )

Definition at line 835 of file FitRodShift.C.

Referenced by MakeQA().

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

Definition at line 641 of file FitRodShift.C.

void LoadModels ( )

Load the models from the file Or create it

Definition at line 113 of file FitRodShift.C.

Referenced by FitRodShift(), and MakeQA().

void LoadTrees ( )
  1. Load trees
  2. Make standard cuts - filter the tree
  3. makeStandard aliases

Definition at line 280 of file FitRodShift.C.

Referenced by FitRodShift(), and MakeQA().

void MakeAliases ( )

make alias names

Definition at line 329 of file FitRodShift.C.

Referenced by FitRodShift(), and MakeQA().

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

Definition at line 386 of file FitRodShift.C.

Referenced by FitRodShift().

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

Definition at line 572 of file FitRodShift.C.

Referenced by FitRodShift().

void MakeQA ( )

Definition at line 818 of file FitRodShift.C.

Referenced by FitRodShift().

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

Definition at line 492 of file FitRodShift.C.

Referenced by FitRodShift().

void PrintFit ( TString  fitString,
TString  filter 
)

helper function to print substring of the fit TString fitString =*strFitGA; TString filter="rot";

Definition at line 97 of file FitRodShift.C.

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 10 - deltaX 11 - deltaY 12 - deltaZ 13 - rot0 (phi) 14 - rot1 (theta) 15 - rot2

Definition at line 222 of file FitRodShift.C.

Referenced by FitRodShift(), and MakeQA().

Variable Documentation

Definition at line 92 of file FitRodShift.C.

TTreeSRedirector* pcWorkspace = 0

Definition at line 80 of file FitRodShift.C.

Referenced by FitRodShift(), and MakeAlignCorrection().

AliTPCFCVoltError3D* rodAll =0

Definition at line 90 of file FitRodShift.C.

AliTPCFCVoltError3D* rodIFC1 =0

Definition at line 88 of file FitRodShift.C.

AliTPCFCVoltError3D* rodIFC2 =0

Definition at line 89 of file FitRodShift.C.

AliTPCFCVoltError3D* rodOFC1 =0

Definition at line 85 of file FitRodShift.C.

AliTPCFCVoltError3D* rodOFC2 =0

Definition at line 86 of file FitRodShift.C.

AliTPCFCVoltError3D* rotIFC =0

Definition at line 87 of file FitRodShift.C.

AliTPCFCVoltError3D* rotOFC =0

Definition at line 84 of file FitRodShift.C.

TTree* treeDY = 0

Definition at line 81 of file FitRodShift.C.

Referenced by FitFunctionQA(), FitRodShift(), LoadTrees(), and MakeAliases().

TTree* treeDZ = 0

Definition at line 82 of file FitRodShift.C.

Referenced by LoadTrees().