During simulation: fill STU region w/ non null time sums
[u/mrichter/AliRoot.git] / TPC / AliTPCComposedCorrection.h
CommitLineData
0116859c 1#ifndef ALI_TPC_COMPOSED_CORRECTION_H
2#define ALI_TPC_COMPOSED_CORRECTION_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////////////////////////////////////////////////////////////////////////////////
8// //
9// AliTPCComposedCorrection class //
10// //
11// This class is creating a correction that is composed out of smaller //
12// corrections. //
13// There are two ways the sub-corrections can be combined into this one: //
14// 1. kParallel: All corrections are applied at the given position x and //
15// the dx terms are summed up (this commutes). //
16// 2. kQueue: The corrections are called in order. The first one at the //
17// given position x resulting in dx1, the second one is called at //
18// the corrected position (x+dx1) resulting in dx2, the third one //
19// is then called at position (x+dx1+dx2) and so forth. dx=dx1+dx2+... //
20// is returned. //
21// For the inverse of the correction this is taken into account by reversing //
22// the order the corrections are applied in the kQueue case (no issue for //
23// kParallel). //
24// //
25// date: 27/04/2010 //
26// Authors: Magnus Mager, Stefan Rossegger, Jim Thomas //
27////////////////////////////////////////////////////////////////////////////////
28
29#include "AliTPCCorrection.h"
cfe2c39a 30#include "TVectorD.h"
0116859c 31
32class TCollection;
b1f0a2a5 33class TTimeStamp;
0116859c 34
35class AliTPCComposedCorrection : public AliTPCCorrection {
36public:
37 enum CompositionType {kParallel,kQueue};
38
39 AliTPCComposedCorrection();
40 AliTPCComposedCorrection(TCollection *corrections,CompositionType mode);
41 virtual ~AliTPCComposedCorrection();
42
43 void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2);
44
45 TCollection* GetCorrections() const {return fCorrections;}
b1f0a2a5 46 void SetCorrections(const TCollection *corrections) {fCorrections=(TCollection*)corrections;}
0116859c 47 CompositionType GetMode() const {return fMode;}
48 void SetMode(CompositionType mode) {fMode=mode;}
49
50 virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
51 virtual void GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]);
52
53 virtual void Print(Option_t* option="") const;
54
e527a1b9 55 // initialization and update functions
56 virtual void Init();
57 virtual void Update(const TTimeStamp &timeStamp);
cfe2c39a 58 void SetWeights(TVectorD * weights){fWeights= (TVectorD*) weights->Clone();}
59 const TVectorD * GetWeights() const {return fWeights;}
e527a1b9 60
0116859c 61private:
62 TCollection *fCorrections; // The corrections this one is composed of.
63 CompositionType fMode; // The way to apply the corrections (see general class documentation)
cfe2c39a 64 TVectorD *fWeights; // optional vector with weights - used for fit benchmarking
3d8a9e4c 65 AliTPCComposedCorrection & operator = (const AliTPCComposedCorrection &); // dummy assignment operator
0116859c 66 AliTPCComposedCorrection(const AliTPCComposedCorrection&); //dummy copy contructor
67
cfe2c39a 68 ClassDef(AliTPCComposedCorrection,2);
0116859c 69};
70
71#endif