AliRoot Core  3dc7879 (3dc7879)
CalibAlignKalman.C File Reference
#include <fstream>
#include "TSystem.h"
#include "TROOT.h"
#include "TRandom.h"
#include "TMath.h"
#include "TBits.h"
#include "TFormula.h"
#include "TF1.h"
#include "TLinearFitter.h"
#include "TFile.h"
#include "TChain.h"
#include "TCut.h"
#include "TEntryList.h"
#include "TH1F.h"
#include "THnSparse.h"
#include "AliSysInfo.h"
#include "AliExternalTrackParam.h"
#include "TTreeStream.h"
#include "AliTrackPointArray.h"
#include "AliLog.h"
#include "AliTPCTransformation.h"
#include "AliTPCkalmanFit.h"
#include "AliMathBase.h"
#include "AliXRDPROOFtoolkit.h"
Include dependency graph for CalibAlignKalman.C:

Go to the source code of this file.

Functions

TMatrixD cutMatrix (4 *7, 2)
 
AliTPCkalmanFitCalibAlignKalmanFit (Int_t maxTracks, Int_t trackDump)
 
void FilterTracks ()
 
AliTPCkalmanFitSetupFit ()
 
void AddFitFieldCage (AliTPCkalmanFit *kalmanFit)
 
void AddPhiScaling (AliTPCkalmanFit *kalmanFit)
 
void AddZShift (AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin)
 
void AddZTilting (AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin)
 
void AddLocalXYMisalignment (AliTPCkalmanFit *kalmanFit)
 
void AddLocalXYMisalignmentSector (AliTPCkalmanFit *kalmanFit)
 
void AddAlignOROCIROCFourier (AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin)
 
void AddAlignSectorFourier (AliTPCkalmanFit *kalmanFit, Int_t ncos, Int_t nsin)
 
void AddDrift (AliTPCkalmanFit *kalmanFit)
 
AliTrackPointArrayFilterPoints (AliTrackPointArray &points, Int_t dir, TTreeSRedirector *pcstream)
 
TVectorD * EstimateScatteringKalmanLinear (AliTrackPointArray &points, AliExternalTrackParam &p0, AliExternalTrackParam &p1, TTreeSRedirector *pcstream)
 
AliTrackPointArraySkipPoints (AliTrackPointArray &points, Int_t nskip, Int_t nskipOffset)
 
AliTPCkalmanFitFitPointsLinear (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)
 
void QAPointsLinear (Int_t maxTracks, Int_t trackDump)
 
void TestScattering (Int_t maxTracks, Int_t trackDump)
 
AliTrackPointArraySortPoints (AliTrackPointArray &points)
 
void SelectPixel ()
 
void SelectNonPixelA ()
 
void SelectNonPixelC ()
 
void DumpQA1D (TObjArray &arrayOut)
 
void MakeFolders (TObjArray *arrayOut)
 

Variables

const Float_t krmsYcut = 0.2
 
const Float_t krmsZcut = 0.2
 
const Float_t krmsYcutGlobal = 0.2
 
const Float_t krmsZcutGlobal = 2.0
 
const Float_t kSigmaCut = 5.
 
const Int_t knclCut = 80
 
const Double_t kArmCut = 50.
 
const Double_t kNsigma = 5.
 
const Double_t rmsCut09 [6] ={0.15,0.9,0.015, 0.2, 0.9, 0.015}
 
Int_t toSkip = 2
 
Int_t toSkipOffset = 0
 
Int_t toSkipTrack = 2
 
Int_t toSkipTrackOffset = 0
 
Int_t isFilterTest = 0
 
TCut * cSide [4] ={0,0,0,0}
 
TCut * cP3 [4] ={0,0,0,0}
 
TCut * cSP3 [4] ={0,0,0,0}
 
TCut * cP4 [4] ={0,0,0,0}
 
TCut * cM4 [4] ={0,0,0,0}
 
TCut * cA [4] ={0,0,0,0}
 
TCut cutAll =""
 
TChain * chainPoints =0
 
TEntryList * elist =0
 
AliTPCkalmanFitkalmanFitNew =0
 
AliTPCkalmanFitkalmanFitOrig =0
 
AliTPCkalmanFitkalmanFitApply =0
 

Detailed Description

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+");
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();
kalmanFit0->DumpCorelation(0.8);
TFile f("kalmanfitTPC.root");

Definition in file CalibAlignKalman.C.

Function Documentation

void AddAlignOROCIROCFourier ( AliTPCkalmanFit kalmanFit,
Int_t  ncos,
Int_t  nsin 
)

Definition at line 1182 of file CalibAlignKalman.C.

Referenced by SetupFit().

void AddAlignSectorFourier ( AliTPCkalmanFit kalmanFit,
Int_t  ncos,
Int_t  nsin 
)

Definition at line 1275 of file CalibAlignKalman.C.

Referenced by SetupFit().

void AddDrift ( AliTPCkalmanFit kalmanFit)

Add drift velocity transformation

Definition at line 934 of file CalibAlignKalman.C.

Referenced by SetupFit().

void AddFitFieldCage ( AliTPCkalmanFit kalmanFit)

Add radial scaling due field cage

Definition at line 858 of file CalibAlignKalman.C.

Referenced by SetupFit().

void AddLocalXYMisalignment ( AliTPCkalmanFit kalmanFit)

Definition at line 1096 of file CalibAlignKalman.C.

void AddLocalXYMisalignmentSector ( AliTPCkalmanFit kalmanFit)

Definition at line 1126 of file CalibAlignKalman.C.

void AddPhiScaling ( AliTPCkalmanFit kalmanFit)

Add linear local phi scaling - separate IROC/OROC - A side/C side "tscalingLocalPhiIROC" "tscalingLocalPhiOROC"

Definition at line 906 of file CalibAlignKalman.C.

Referenced by SetupFit().

void AddZShift ( AliTPCkalmanFit kalmanFit,
Int_t  ncos,
Int_t  nsin 
)

Definition at line 952 of file CalibAlignKalman.C.

Referenced by SetupFit().

void AddZTilting ( AliTPCkalmanFit kalmanFit,
Int_t  ncos,
Int_t  nsin 
)

z tilting absolute (sector) and relative (IROC-OROC)

Definition at line 1025 of file CalibAlignKalman.C.

Referenced by SetupFit().

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 
)

Definition at line 138 of file CalibAlignKalman.C.

AliTPCkalmanFit * CalibAlignKalmanFit ( Int_t  maxTracks,
Int_t  trackDump 
)

Fitting procedure

Definition at line 172 of file CalibAlignKalman.C.

Referenced by CalibAlignKalman().

TMatrixD cutMatrix ( 4 *  7,
 
)

Referenced by FilterTracks(), and FitPointsLinear().

void DumpQA1D ( TObjArray arrayOut)

Definition at line 1412 of file CalibAlignKalman.C.

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

Definition at line 636 of file CalibAlignKalman.C.

Referenced by FitPointsLinear(), QAPointsLinear(), and TestScattering().

AliTrackPointArray * FilterPoints ( AliTrackPointArray points,
Int_t  dir,
TTreeSRedirector pcstream 
)

Filter points - input points for KalmanFilter

Definition at line 518 of file CalibAlignKalman.C.

Referenced by FitPointsLinear(), and QAPointsLinear().

void FilterTracks ( )

Definition at line 204 of file CalibAlignKalman.C.

Referenced by CalibAlignKalmanFit().

AliTPCkalmanFit * FitPointsLinear ( Int_t  maxTracks,
Int_t  trackDump 
)

Definition at line 302 of file CalibAlignKalman.C.

Referenced by CalibAlignKalmanFit().

void MakeFolders ( TObjArray arrayOut)

Definition at line 1486 of file CalibAlignKalman.C.

void QAPointsLinear ( Int_t  maxTracks,
Int_t  trackDump 
)

check the consistency of kalman fit Apply transformation

Definition at line 391 of file CalibAlignKalman.C.

void SelectNonPixelA ( )

Definition at line 1393 of file CalibAlignKalman.C.

Referenced by DumpQA1D().

void SelectNonPixelC ( )

Definition at line 1402 of file CalibAlignKalman.C.

Referenced by DumpQA1D().

void SelectPixel ( )

Definition at line 1384 of file CalibAlignKalman.C.

Referenced by DumpQA1D().

AliTPCkalmanFit * SetupFit ( )

Definition at line 186 of file CalibAlignKalman.C.

Referenced by CalibAlignKalmanFit(), and QAPointsLinear().

AliTrackPointArray * SkipPoints ( AliTrackPointArray points,
Int_t  nskip,
Int_t  nskipOffset 
)

create new array with skipped points

Definition at line 498 of file CalibAlignKalman.C.

Referenced by FitPointsLinear().

AliTrackPointArray* SortPoints ( AliTrackPointArray points)

Creates the array - points sorted according radius - neccessay for kalman fit

0. choose the frame - rotation angle

Definition at line 606 of file CalibAlignKalman.C.

void TestScattering ( Int_t  maxTracks,
Int_t  trackDump 
)

test Multiple scattering algorithm Apply transformation

create debug streeamers

Definition at line 457 of file CalibAlignKalman.C.

Variable Documentation

TCut* cA[4] ={0,0,0,0}

Definition at line 102 of file CalibAlignKalman.C.

Referenced by FilterTracks(), MakePlotDeltaZ(), and MUONplotefficiency().

TChain* chainPoints =0
TCut* cM4[4] ={0,0,0,0}

Definition at line 101 of file CalibAlignKalman.C.

Referenced by FilterTracks().

TCut* cP3[4] ={0,0,0,0}

Definition at line 98 of file CalibAlignKalman.C.

Referenced by FilterTracks().

TCut* cP4[4] ={0,0,0,0}
TCut* cSide[4] ={0,0,0,0}

Definition at line 97 of file CalibAlignKalman.C.

Referenced by FilterTracks().

TCut* cSP3[4] ={0,0,0,0}

Definition at line 99 of file CalibAlignKalman.C.

Referenced by FilterTracks().

TCut cutAll =""

Definition at line 104 of file CalibAlignKalman.C.

Referenced by FilterTracks(), Fit(), FitFit(), InitCutsAlign(), and LoadTrees().

TEntryList* elist =0

Definition at line 111 of file CalibAlignKalman.C.

Referenced by FilterTracks(), FitPointsLinear(), QAPointsLinear(), and TestScattering().

Int_t isFilterTest = 0

Definition at line 93 of file CalibAlignKalman.C.

Referenced by CalibAlignKalman(), and FitPointsLinear().

AliTPCkalmanFit* kalmanFitApply =0

Definition at line 114 of file CalibAlignKalman.C.

AliTPCkalmanFit* kalmanFitNew =0

Definition at line 112 of file CalibAlignKalman.C.

Referenced by FitPointsLinear().

AliTPCkalmanFit* kalmanFitOrig =0

Definition at line 113 of file CalibAlignKalman.C.

const Double_t kArmCut = 50.

Definition at line 69 of file CalibAlignKalman.C.

Referenced by FilterPoints().

const Int_t knclCut = 80

Definition at line 68 of file CalibAlignKalman.C.

Referenced by FilterPoints().

const Double_t kNsigma = 5.

Definition at line 70 of file CalibAlignKalman.C.

Referenced by FilterTracks().

const Float_t krmsYcut = 0.2

Definition at line 63 of file CalibAlignKalman.C.

const Float_t krmsYcutGlobal = 0.2

Definition at line 65 of file CalibAlignKalman.C.

Referenced by FilterPoints().

const Float_t krmsZcut = 0.2

Definition at line 64 of file CalibAlignKalman.C.

const Float_t krmsZcutGlobal = 2.0

Definition at line 66 of file CalibAlignKalman.C.

const Float_t kSigmaCut = 5.
const Double_t rmsCut09[6] ={0.15,0.9,0.015, 0.2, 0.9, 0.015}

Definition at line 83 of file CalibAlignKalman.C.

Referenced by FitPointsLinear().

Int_t toSkip = 2

Definition at line 89 of file CalibAlignKalman.C.

Referenced by CalibAlignKalman(), and FitPointsLinear().

Int_t toSkipOffset = 0

Definition at line 90 of file CalibAlignKalman.C.

Referenced by CalibAlignKalman(), and FitPointsLinear().

Int_t toSkipTrack = 2

Definition at line 91 of file CalibAlignKalman.C.

Referenced by CalibAlignKalman(), FitPointsLinear(), and QAPointsLinear().

Int_t toSkipTrackOffset = 0

Definition at line 92 of file CalibAlignKalman.C.

Referenced by CalibAlignKalman(), FitPointsLinear(), and QAPointsLinear().