Line data Source code
1 : #ifndef ALIHLTTPCFASTTRANSFORMOBJECT_H
2 : #define ALIHLTTPCFASTTRANSFORMOBJECT_H
3 :
4 : //* This file is property of and copyright by the ALICE HLT Project *
5 : //* ALICE Experiment at CERN, All rights reserved. *
6 : //* See cxx source for full Copyright notice *
7 :
8 : /** @file AliHLTTPCFastTransformObjectObject.h
9 : @author Sergey Gorbunov
10 : @date
11 : @brief
12 : */
13 :
14 : // see below for class documentation
15 : // or
16 : // refer to README to build package
17 : // or
18 : // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
19 :
20 : #include "TObject.h"
21 : #include "AliHLTTPCSpline2D3DObject.h"
22 :
23 : /**
24 : * The class to store transformation map for AliHLTTPCFastTransform
25 : */
26 :
27 :
28 : class AliHLTTPCFastTransformObject: public TObject{
29 :
30 : public:
31 :
32 : /** standard constructor */
33 : AliHLTTPCFastTransformObject();
34 :
35 : /** constructor */
36 : AliHLTTPCFastTransformObject( const AliHLTTPCFastTransformObject & );
37 :
38 : /** assignment operator */
39 : AliHLTTPCFastTransformObject& operator=( const AliHLTTPCFastTransformObject &);
40 :
41 : /** destructor */
42 0 : ~AliHLTTPCFastTransformObject(){};
43 :
44 : /** version */
45 0 : Int_t GetVersion() const { return fVersion; }
46 :
47 : /** deinitialization */
48 : void Reset();
49 :
50 : /** N sectors */
51 0 : static Int_t GetNSec() { return fkNSec; }
52 0 : static Int_t GetNSecIn() { return fkNSecIn; }
53 0 : static Int_t GetNSecOut() { return fkNSecOut; }
54 :
55 : /** N rows per inner sector */
56 0 : static Int_t GetNRowsIn() { return fkNRowsIn; }
57 :
58 : /** N rows per outer sector */
59 0 : static Int_t GetNRowsOut() { return fkNRowsOut; }
60 :
61 : /** last calibrated time bin */
62 0 : Int_t GetLastTimeBin() const { return fLastTimeBin; }
63 :
64 : /** split of splines in time direction */
65 0 : Int_t GetTimeSplit1() const { return fTimeSplit1; }
66 :
67 : /** split of splines in time direction */
68 0 : Int_t GetTimeSplit2() const { return fTimeSplit2; }
69 :
70 : /** alignment matrices*/
71 0 : const TArrayF & GetAlignment() const { return fAlignment; }
72 :
73 : /** transformation spline */
74 : const AliHLTTPCSpline2D3DObject& GetSpline ( Int_t iSec, Int_t iRow, Int_t iSpline ) const {
75 0 : if( iSec<fkNSecIn ) return fSplines[iSec*fkNRowsIn*3 + iRow*3 + iSpline];
76 0 : else return fSplines[fkNSplinesIn + (iSec-fkNSecIn)*fkNRowsOut*3 + iRow*3 + iSpline];
77 0 : }
78 :
79 : const AliHLTTPCSpline2D3DObject& GetSplineIn ( Int_t iSecIn, Int_t iRow, Int_t iSpline ) const {
80 0 : return fSplines[iSecIn*fkNRowsIn*3 + iRow*3 + iSpline];
81 : }
82 :
83 : const AliHLTTPCSpline2D3DObject& GetSplineOut ( Int_t iSecOut, Int_t iRow, Int_t iSpline ) const {
84 0 : return fSplines[fkNSplinesIn + iSecOut*fkNRowsOut*3 + iRow*3 + iSpline];
85 : }
86 :
87 : /** last calibrated time bin */
88 0 : void SetLastTimeBin( Int_t v ){ fLastTimeBin = v; }
89 :
90 : /** split of splines in time direction */
91 0 : void SetTimeSplit1( Float_t v){ fTimeSplit1 = v; }
92 :
93 : /** split of splines in time direction */
94 0 : void SetTimeSplit2( Float_t v){ fTimeSplit2 = v; }
95 :
96 : /** alignment matrices*/
97 0 : TArrayF & GetAlignmentNonConst(){ return fAlignment; }
98 :
99 : /** transformation spline */
100 : AliHLTTPCSpline2D3DObject& GetSplineNonConst( Int_t iSec, Int_t iRow, Int_t iSpline ){
101 0 : if( iSec<fkNSecIn ) return fSplines[iSec*fkNRowsIn*3 + iRow*3 + iSpline];
102 0 : else return fSplines[fkNSplinesIn + (iSec-fkNSecIn)*fkNRowsOut*3 + iRow*3 + iSpline];
103 0 : }
104 :
105 : AliHLTTPCSpline2D3DObject& GetSplineInNonConst ( Int_t iSecIn, Int_t iRow, Int_t iSpline ) {
106 0 : return fSplines[iSecIn*fkNRowsIn*3 + iRow*3 + iSpline];
107 : }
108 :
109 : AliHLTTPCSpline2D3DObject& GetSplineOutNonConst ( Int_t iSecOut, Int_t iRow, Int_t iSpline ) {
110 0 : return fSplines[fkNSplinesIn + iSecOut*fkNRowsOut*3 + iRow*3 + iSpline];
111 : }
112 :
113 0 : bool IsSectorInit(int sec) const {return fSectorInit[sec];}
114 0 : void SetInitSec(Int_t sector, bool init) {if (sector >= 0 && sector < fkNSec) fSectorInit[sector] = init;}
115 :
116 : void Merge(const AliHLTTPCFastTransformObject& obj);
117 : Long64_t Merge(TCollection* list);
118 :
119 : private:
120 :
121 : static const Int_t fkNSecIn = 36; // transient
122 : static const Int_t fkNSecOut = 36; // transient
123 : static const Int_t fkNSec = 36+36;//fkNSecIn + fkNSecOut;
124 : static const Int_t fkNRowsIn = 63; // transient
125 : static const Int_t fkNRowsOut = 96; // transient
126 : static const Int_t fkNSplinesIn = 36*63*3;// fkNSecIn*fkNRowsIn*3;
127 : static const Int_t fkNSplinesOut = 36*96*3;// fkNSecOut*fkNRowsOut*3;
128 :
129 : bool fSectorInit[fkNSec]; //Sectors which are initialized
130 :
131 : Int_t fVersion;
132 : Int_t fLastTimeBin; // last calibrated time bin
133 : Float_t fTimeSplit1; // split of splines in time direction
134 : Float_t fTimeSplit2; // split of splines in time direction
135 : TArrayF fAlignment; // alignment matrices translation,rotation,reverse rotation
136 : AliHLTTPCSpline2D3DObject fSplines[fkNSplinesIn + fkNSplinesOut]; // transient
137 :
138 : public:
139 :
140 6 : ClassDef(AliHLTTPCFastTransformObject,1)
141 : };
142 :
143 : #endif
|