]>
Commit | Line | Data |
---|---|---|
7b85e477 | 1 | #ifndef ALIITSALIGNMILLE2_H |
2 | #define ALIITSALIGNMILLE2_H | |
6526a72c | 3 | |
7b85e477 | 4 | /* Copyright(c) 2007-2009 , ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
057304f3 | 7 | /* $Id$ */ |
6526a72c | 8 | //----------------------------------------------------------------------------- |
7b85e477 | 9 | // |
6526a72c | 10 | // Interface to AliMillePede2 alignment class for the ALICE ITS detector |
11 | // | |
12 | // ITS specific alignment class which interface to AliMillepede. | |
13 | // For each track ProcessTrack calculates the local and global derivatives | |
14 | // at each hit and fill the corresponding local equations. Provide methods for | |
15 | // fixing or constraining detection elements for best results. | |
16 | // | |
17 | // author M. Lunardon (thanks to J. Castillo), ruben.shahoyan@cern.ch | |
18 | //----------------------------------------------------------------------------- | |
7b85e477 | 19 | |
20 | #include <TString.h> | |
21 | #include <TObject.h> | |
6526a72c | 22 | #include <TGeoMatrix.h> |
6be22b3f | 23 | #include <TArrayS.h> |
24 | #include <TArrayD.h> | |
7b85e477 | 25 | #include "AliTrackPointArray.h" |
26 | #include "AliITSAlignMille2Module.h" | |
27 | ||
45993b23 | 28 | class TSystem; |
29 | class TGeoManager; | |
30 | class TVirtualFitter; | |
7b85e477 | 31 | class AliMillePede2; |
32 | class AliAlignObjParams; | |
7b85e477 | 33 | class AliTrackFitterRieman; |
45993b23 | 34 | class AliITSAlignMille2Constraint; |
35 | class AliITSAlignMille2ConstrArray; | |
36 | class AliITSresponseSDD; | |
6be22b3f | 37 | class AliITSTPArrayFit; |
7b85e477 | 38 | |
39 | class AliITSAlignMille2: public TObject | |
40 | { | |
41 | public: | |
6be22b3f | 42 | enum {kX,kY,kZ}; |
43 | enum {kNLocal=5,kMaxPoints=100, | |
44 | kNParChGeom = AliITSAlignMille2Module::kMaxParGeom, | |
45 | kNParCh = AliITSAlignMille2Module::kMaxParTot, | |
46 | kMaxITSSensID=2197,kMaxITSSensVID=14300,kMinITSSupeModuleID=14336, | |
47 | kSDDoffsID=240,kNSDDmod=260}; | |
7b85e477 | 48 | // |
49 | public: | |
50 | // | |
6be22b3f | 51 | AliITSAlignMille2(const Char_t *configFilename="AliITSAlignMille.conf",TList* userInfo=0); |
7b85e477 | 52 | virtual ~AliITSAlignMille2(); |
53 | // | |
6526a72c | 54 | AliMillePede2* GetMillePede() const {return fMillepede;} |
6be22b3f | 55 | AliITSTPArrayFit* GetTPAFitter() const {return fTPAFitter;} |
6526a72c | 56 | // |
57 | // configuration methods | |
58 | // | |
59 | Int_t IsVIDDefined(UShort_t voluid) const; | |
60 | Int_t IsVIDContained(UShort_t voluid) const; | |
61 | Int_t IsSymDefined(const Char_t* name) const; | |
62 | Int_t IsSymContained(const Char_t* name) const; | |
8fd71c0a | 63 | Int_t GetRequestedModID(UShort_t voluid) const; |
6526a72c | 64 | // |
7b85e477 | 65 | Int_t GetModuleIndex(const Char_t *symname); |
66 | Int_t GetModuleIndex(UShort_t voluid); | |
67 | UShort_t GetModuleVolumeID(const Char_t *symname); | |
68 | UShort_t GetModuleVolumeID(Int_t index); | |
6526a72c | 69 | AliITSAlignMille2Module* GetMilleModuleByVID(UShort_t voluid) const; // get pointer to the defined supermodule |
70 | AliITSAlignMille2Module* GetMilleModuleBySymName(const Char_t* symname) const; // get pointer to the defined supermodule | |
71 | AliITSAlignMille2Module* GetMilleModuleIfContained(const Char_t* symname) const; | |
72 | AliITSAlignMille2Module* GetMilleModule(Int_t id) const {return (AliITSAlignMille2Module*)fMilleModule[id];} | |
73 | AliITSAlignMille2Module* GetCurrentModule() const {return fCurrentModule;} | |
74 | AliITSAlignMille2Module* GetSuperModule(Int_t id) const {return (AliITSAlignMille2Module*)fSuperModule[id];} | |
75 | // | |
76 | AliAlignObjParams* GetPrealignedObject(const Char_t* symname) const; | |
77 | AliAlignObjParams* GetConstrRefObject(const Char_t* symname) const; | |
78 | // | |
79 | void ConvertParamsToGlobal(); | |
80 | void ConvertParamsToLocal(); | |
7b85e477 | 81 | // |
6be22b3f | 82 | const Char_t* GetGeometryPath() {return fGeometryPath.Data();} |
83 | const Char_t* GetPreAlignmentPath() {return fPreDeltaPath.Data();} | |
7b85e477 | 84 | TClonesArray* GetPreAlignmentDeltas() const {return fPrealignment;} |
6526a72c | 85 | AliITSresponseSDD* GetSDDPrecalibration() const {return fCorrectSDD;} |
86 | AliITSresponseSDD* GetSDDInit() const {return fInitialRecSDD;} | |
7b85e477 | 87 | void PrintCurrentModuleInfo() const {if (fCurrentModule) fCurrentModule->Print();} |
88 | void Print(Option_t*) const; | |
89 | Bool_t IsConfigured() const {return fIsConfigured;} | |
7b85e477 | 90 | Bool_t GetUseGlobalDelta() const {return fUseGlobalDelta;} |
6526a72c | 91 | Bool_t IsConstraintWrtRef() const {return fConstrRef!=0;} |
92 | Bool_t FixedOrphans() const; | |
6be22b3f | 93 | Bool_t IsLocalYError() const {return fUseLocalYErr;} |
6526a72c | 94 | // |
95 | // geometry stuffs | |
96 | Int_t GetNModules() const {return fNModules;} | |
97 | Int_t GetCurrentModuleIndex() const {return fCurrentModule ? fCurrentModule->GetIndex():-1;} | |
98 | TGeoHMatrix *GetCurrentModuleHMatrix() const {return fCurrentModule ? fCurrentModule->GetMatrix():0;} | |
99 | Double_t *GetCurrentModuleTranslation() const {return fCurrentModule ? fCurrentModule->GetMatrix()->GetTranslation():0;} | |
100 | Int_t GetCurrentModuleInternalIndex() const {return fCurrentModule ? Int_t(fCurrentModule->GetUniqueID()):-1;} | |
101 | Int_t GetTotBadLocEqPoints() const {return fTotBadLocEqPoints;} | |
102 | Int_t GetNConstraints() const {return fConstraints.GetLast()+1;} | |
103 | Int_t InitModuleParams(); | |
7b85e477 | 104 | // |
105 | // fitting methods | |
45993b23 | 106 | AliTrackFitterRieman *GetRiemanFitter() const {return fRieman;} |
7b85e477 | 107 | AliTrackPointArray *PrepareTrack(const AliTrackPointArray *track); |
45993b23 | 108 | AliTrackPointArray *GetCurrentTrack() const {return (AliTrackPointArray*)fTrack;} |
109 | AliTrackPoint *GetCurrentCluster() const {return (AliTrackPoint*)&fCluster;} | |
110 | void SetCurrentTrack(const AliTrackPointArray *atp) {fTrack = (AliTrackPointArray*)atp;} | |
6be22b3f | 111 | void SetCurrentCluster(const AliTrackPoint &atp); |
7b85e477 | 112 | void InitTrackParams(int meth=1); |
6526a72c | 113 | Int_t ProcessTrack(const AliTrackPointArray *track); |
7b85e477 | 114 | Int_t CheckCurrentTrack(); |
6526a72c | 115 | // |
7b85e477 | 116 | Int_t CalcIntersectionPoint(Double_t *lpar, Double_t *gpar); |
117 | Int_t CalcDerivatives(Int_t paridx, Bool_t islpar); | |
118 | Double_t* GetLocalIntersectionPoint() const {return (Double_t*)fPintLoc;} | |
119 | Double_t* GetGlobalIntersectionPoint() const {return (Double_t*)fPintGlo;} | |
120 | AliTrackPointArray *SortTrack(const AliTrackPointArray *atp); | |
121 | void SetTemporaryExcludedModule(Int_t index) {fTempExcludedModule=index;} | |
122 | Int_t GetTemporaryExcludedModule() const {return fTempExcludedModule;} | |
6526a72c | 123 | Double_t GetMeasGlo(Int_t dim) const {return fMeasGlo[dim];} |
124 | Double_t GetMeasLoc(Int_t dim) const {return fMeasLoc[dim];} | |
125 | Int_t GetCurrentLayer() const; | |
6be22b3f | 126 | void SetBField(Double_t b=0); |
127 | void SetUseLocalYErrors(Bool_t v=kTRUE) {fUseLocalYErr = v && fTPAFitter;} | |
128 | void SetMinPointsPerSensor( Int_t n ) {fMinPntPerSens = n>0 ? n:0;} | |
129 | Int_t GetMinPointsPerSensor() const {return fMinPntPerSens;} | |
130 | void ConstrainHelixFitPT( Int_t q=0,Double_t pt=-1, Double_t err=-1); | |
131 | void ConstrainHelixFitCurv(Int_t q=0,Double_t crv=-1,Double_t crverr=-1); | |
132 | Double_t GetHelixContraintCharge() const {return fConstrCharge;} | |
133 | Double_t GetHelixContraintPT() const {return fConstrPT;} | |
134 | Double_t GetHelixContraintPTErr() const {return fConstrPTErr;} | |
135 | // | |
136 | TGeoHMatrix* GetSensorOrigMatrixSID(Int_t sid) const; | |
137 | TGeoHMatrix* GetSensorOrigMatrixVID(Int_t vid) const; | |
138 | // | |
139 | TGeoHMatrix* GetSensorCurrMatrixSID(Int_t sid) const; | |
140 | TGeoHMatrix* GetSensorCurrMatrixVID(Int_t vid) const; | |
141 | ||
7b85e477 | 142 | // Hierarchical contraints |
6526a72c | 143 | Bool_t PseudoParentsAllowed() const {return fAllowPseudoParents;} |
144 | void ConstrainModuleSubUnitsMean(Int_t idm, Double_t val=0, UInt_t pattern=0xff); | |
145 | void ConstrainModuleSubUnitsMedian(Int_t idm, Double_t val=0, UInt_t pattern=0xff); | |
146 | void ConstrainOrphansMean(Double_t val=0, UInt_t pattern=0xff); | |
147 | void ConstrainOrphansMedian(Double_t val=0, UInt_t pattern=0xff); | |
148 | void ConstrainLocal(const Char_t* name,Double_t *parcf,Int_t npar,Double_t val,Double_t err); | |
7b85e477 | 149 | // |
45993b23 | 150 | void ApplyGaussianConstraint(const AliITSAlignMille2ConstrArray* cstr); |
6526a72c | 151 | void ApplyPreConstraints(); |
152 | void ApplyPostConstraints(); | |
7b85e477 | 153 | // |
45993b23 | 154 | Bool_t IsParModConstrained(const AliITSAlignMille2Module* mod,Int_t par, Bool_t &meanmed, Bool_t &gaussian) const; |
155 | Bool_t IsParModFamilyVaried(const AliITSAlignMille2Module* mod,Int_t par,Int_t depth=999) const; | |
156 | Bool_t IsParFamilyFree(const AliITSAlignMille2Module* mod,Int_t par,Int_t depth=999) const; | |
7b85e477 | 157 | // |
158 | // millepede methods | |
6526a72c | 159 | Int_t GlobalFit(); |
7b85e477 | 160 | void FixParameter(Int_t param, Double_t value); |
7b85e477 | 161 | void PrintGlobalParameters(); |
7b85e477 | 162 | // |
6be22b3f | 163 | TClonesArray* CreateDeltas(); |
164 | AliITSresponseSDD* CreateSDDResponse(); | |
6526a72c | 165 | // module specific |
7b85e477 | 166 | // |
6526a72c | 167 | Double_t GetTDriftSDD() const; |
168 | Double_t GetVDriftSDD() const; | |
169 | // | |
170 | AliITSAlignMille2Constraint* GetConstraint(Int_t i) const {return (AliITSAlignMille2Constraint*)fConstraints.At(i);} | |
171 | AliITSAlignMille2Constraint* GetConstraint(const char* name) const {return (AliITSAlignMille2Constraint*)fConstraints.FindObject(name);} | |
7b85e477 | 172 | // |
173 | // debug stuffs | |
6be22b3f | 174 | void FetchCluster(int ip) {fTrack->GetPoint(fCluster,ip);fCluster.SetUniqueID(ip);} |
45993b23 | 175 | void SetLocalInitParams(const Double_t *par) {for (int i=kNLocal;i--;) fLocalInitParam[i]=par[i];} |
7b85e477 | 176 | Double_t *GetMeasLoc() const {return (Double_t*)fMeasLoc;} |
177 | Double_t *GetSigmaLoc() const {return (Double_t*)fSigmaLoc;} | |
178 | Double_t GetBField() const {return fBField;} | |
179 | Double_t *GetLocalInitParam() const {return (Double_t*)fLocalInitParam;} | |
180 | Double_t *GetLocalInitParEr() const {return (Double_t*)fLocalInitParEr;} | |
6526a72c | 181 | Double_t GetLocalDif(int par, int coor) const {return fDerivativeLoc[par][coor];} |
182 | Double_t GetGlobalDif(int par, int coor) const {return fDerivativeGlo[par][coor];} | |
7b85e477 | 183 | Int_t GetPreAlignmentQualityFactor(Int_t index) const;// if not prealign. return -1 |
184 | void SetBug(Int_t bug) {fBug=bug;} // 1:SSD inversion sens.18-19 | |
6526a72c | 185 | static AliITSAlignMille2* GetInstance() {return fgInstance;} |
186 | ||
6be22b3f | 187 | // pepo270809 |
188 | Int_t GetExtraClustersMode() const {return fExtraClustersMode;} | |
189 | void SetExtraClustersMode(Int_t mode) {fExtraClustersMode=mode;} | |
190 | // endpepo270809 | |
191 | ||
6526a72c | 192 | // pepo |
193 | // flag for AliITSAlignMille compatibility | |
194 | Int_t GetMilleVersion() const {return fMilleVersion;} | |
195 | void SetMilleVersion(Int_t m1) {fMilleVersion=m1;} | |
196 | // modified existing methods | |
197 | void SetCurrentModule(Int_t id); | |
198 | // old methods recovered | |
199 | Int_t IsDefined(UShort_t voluid) const {return IsVIDDefined(voluid);} | |
200 | Int_t IsContained(UShort_t voluid) const {return IsVIDContained(voluid);} | |
201 | // moved from private to public | |
202 | void SetRequiredPoint(Char_t* where, Int_t ndet, Int_t updw, Int_t nreqpts); | |
203 | Bool_t InitRiemanFit(); | |
204 | void SetMinNPtsPerTrack(Int_t pts=3) {fMinNPtsPerTrack=pts;} | |
7b85e477 | 205 | // |
6be22b3f | 206 | static Bool_t IsZero(Double_t v,Double_t threshold = 1e-16) { return TMath::Abs(v)<threshold; } |
207 | static void SetWordBit(UInt_t word,Int_t bitID) { word |= (1<<bitID);} | |
208 | static void ResetWordBit(UInt_t word,Int_t bitID) { word &= ~(1<<bitID);} | |
209 | static Bool_t TestWordBit(UInt_t word,Int_t bitID) { return (Bool_t)(word&(1<<bitID));} | |
210 | // | |
4bd2db93 | 211 | protected: |
7b85e477 | 212 | // |
4bd2db93 | 213 | struct Mille2Data { // structure to store data for 2 LocalEquations (X and Z) |
214 | enum {kMaxLev = 7}; | |
6be22b3f | 215 | Double_t fMeas[3]; // measured coordinates |
216 | Double_t fSigma[3]; // measured errors | |
217 | Double_t fDerLoc[kNLocal][3]; // calculated local derivatives | |
4bd2db93 | 218 | Int_t fNModFilled, fNGlobFilled, fModuleID[kMaxLev]; // used module info |
219 | Int_t fParMilleID[AliITSAlignMille2Module::kMaxParTot*kMaxLev]; // param id's | |
6be22b3f | 220 | Double_t fDerGlo[AliITSAlignMille2Module::kMaxParTot*kMaxLev][3]; // global derivatives |
4bd2db93 | 221 | }; |
6be22b3f | 222 | // |
7b85e477 | 223 | // configuration methods |
6526a72c | 224 | void Init(); |
abd7ef79 | 225 | Int_t CacheMatricesOrig(); |
226 | Int_t CacheMatricesCurr(); | |
6be22b3f | 227 | Int_t ProcessUserInfo(TList *userInfo=0); |
7b85e477 | 228 | Int_t LoadConfig(const Char_t *cfile="AliITSAlignMille.conf"); |
6526a72c | 229 | TObjArray* GetConfigRecord(FILE* stream, TString& recTitle, TString& recOpt, Bool_t rew); |
18986853 | 230 | Int_t CheckConfigRecords(FILE* stream); |
6526a72c | 231 | // |
232 | void BuildHierarchy(); | |
7b85e477 | 233 | Int_t LoadSuperModuleFile(const Char_t *cfile="ITSMilleSuperModules.root"); |
6be22b3f | 234 | Int_t LoadSDDResponse(TString& path, AliITSresponseSDD *&resp); |
235 | Int_t LoadDeltas(TString& path, TClonesArray *&arr); | |
7b85e477 | 236 | void ResetLocalEquation(); |
6526a72c | 237 | Int_t InitGeometry(); |
7b85e477 | 238 | Int_t ApplyToGeometry(); |
239 | // | |
6526a72c | 240 | void ConstrainModuleSubUnits(Int_t idm, Double_t val=0, UInt_t pattern=0xff); |
241 | void ConstrainOrphans(Double_t val=0,UInt_t pattern=0xff); | |
242 | void PostConstrainModuleSubUnits(Int_t type,Int_t idm, Double_t val, UInt_t pattern); | |
243 | void PostConstrainOrphans(Int_t type,Double_t val, UInt_t pattern); | |
244 | // | |
6be22b3f | 245 | void SetGeometryPath(const Char_t* filename="geometry.root") { fGeometryPath = filename; } |
6526a72c | 246 | |
247 | void SetInitTrackParamsMeth(Int_t meth=1) {fInitTrackParamsMeth=meth;} | |
248 | // | |
249 | void AddConstraint(Double_t *factor, Double_t value, Double_t sigma=0); | |
6be22b3f | 250 | void InitGlobalParameters(Double_t *par); |
251 | Bool_t SetLocalDerivative(Int_t index, Double_t value) {return IsZero(fLocalDerivatives[index]=value);} | |
252 | Bool_t SetGlobalDerivative(Int_t index, Double_t value) {return IsZero(fGlobalDerivatives[index]=value);} | |
6526a72c | 253 | // |
7b85e477 | 254 | // millepede methods |
6526a72c | 255 | // |
4bd2db93 | 256 | Int_t AddLocalEquation(Mille2Data &m); |
6be22b3f | 257 | Int_t AddLocalEquationTPA(Mille2Data &m); |
4bd2db93 | 258 | void SetLocalEquations(const Mille2Data *marr, Int_t neq); |
6526a72c | 259 | void SetUseGlobalDelta(Bool_t v=kTRUE) {fUseGlobalDelta = v;} |
260 | void SetAllowPseudoParents(Bool_t v=kTRUE) {fAllowPseudoParents = v;} | |
261 | Int_t SetConstraintWrtRef(const char* reffname); | |
7b85e477 | 262 | // |
263 | AliITSAlignMille2(const AliITSAlignMille2& rhs); | |
264 | AliITSAlignMille2& operator=(const AliITSAlignMille2& rhs); | |
265 | // | |
266 | protected: | |
267 | // | |
18986853 | 268 | enum { |
6be22b3f | 269 | kOCDBPath, |
18986853 | 270 | kGeomFile, |
271 | kSuperModileFile, | |
272 | kConstrRefFile, | |
6be22b3f | 273 | kPreDeltaFile, |
18986853 | 274 | kPreCalSDDFile, |
275 | kInitCalSDDFile, | |
6be22b3f | 276 | kInitDeltaFile, |
18986853 | 277 | kGlobalDeltas, |
278 | kConstrLocal, | |
279 | kModVolID, | |
280 | kModIndex, | |
281 | kPseudoParents, | |
282 | kTrackFitMethod, | |
283 | kMinPntTrack, | |
284 | kNStDev, | |
285 | kResCutInit, | |
286 | kResCutOther, | |
287 | kLocalSigFactor, | |
288 | kStartFactor, | |
289 | kBField, | |
290 | kSparseMatrix, | |
291 | kRequirePoint, | |
292 | kConstrOrphans, | |
293 | kConstrSubunits, | |
294 | kApplyConstr, | |
6be22b3f | 295 | kExtraClustersMode, |
296 | kTPAFitter, | |
297 | kUseLocalYErr, | |
298 | kMinPointsSens, | |
18986853 | 299 | // |
300 | kNKeyWords | |
301 | }; // id's of the keywirds for config file records | |
302 | ||
7b85e477 | 303 | // millepede stuffs |
304 | AliMillePede2 *fMillepede; // Detector independent alignment class | |
305 | Double_t fStartFac; // Initial value for chi2 cut | |
306 | Double_t fResCutInitial; // Cut on residual for first iteration | |
307 | Double_t fResCut; // Cut on residual for other iterations | |
308 | Int_t fNGlobal; // Number of global parameters | |
309 | Int_t fNLocal; // Number of local parameters | |
310 | Int_t fNStdDev; // Number of standard deviations for chi2 cut | |
311 | Bool_t fIsMilleInit; // Flag for initialization | |
6526a72c | 312 | Bool_t fAllowPseudoParents; // For simple constraints don't involve parents into the fit |
7b85e477 | 313 | // |
314 | // fitting stuffs | |
6be22b3f | 315 | AliITSTPArrayFit *fTPAFitter; // TPArrayFitter |
7b85e477 | 316 | AliITSAlignMille2Module *fCurrentModule; // Current SuperModule index |
317 | AliTrackPointArray *fTrack; // pointer to current track | |
6526a72c | 318 | TObjArray fTrackBuff; // buffer for tracks of min length |
7b85e477 | 319 | AliTrackPoint fCluster; // current cluster |
6be22b3f | 320 | Int_t fCurrentSensID; // sensor index for current cluster |
321 | TArrayD fClusLoc; // local coordinates of the clusters | |
322 | TArrayD fClusGlo; // global coordinates of the clusters | |
323 | TArrayD fClusSigLoc; // local cov matrix of the clusters | |
7b85e477 | 324 | Double_t *fGlobalDerivatives; // Array of global derivatives |
325 | Double_t fLocalDerivatives[kNLocal]; // Array of local deriv. | |
326 | Double_t fLocalInitParam[kNLocal]; // Array with inital values for local parameters for current track | |
327 | Double_t fLocalInitParEr[kNLocal][kNLocal];// Array with inital values for local parameters for current track | |
328 | Double_t fModuleInitParam[kNParCh]; // Array with inital values for current module parameters (init geometry) | |
45993b23 | 329 | Double_t fPintLoc[3]; // track/module intersection point in local coordinates |
330 | Double_t fPintLoc0[3]; // track/module intersection point in local coordinates (before variation) | |
331 | Double_t fPintGlo[3]; // track/module intersection point in global coordinates | |
6be22b3f | 332 | Double_t *fMeasLoc; // current point local coordinates (the original ones) |
333 | Double_t *fMeasGlo; // current point glob. coord (AliTrackPoint) | |
334 | Double_t *fSigmaLoc; // stdev current point | |
7b85e477 | 335 | Double_t fSigmaFactor[3]; // multiplicative factor for cluster sigmaX,Y,Z |
6be22b3f | 336 | Double_t fConstrPT; // optional PT constraint for helix (abs value) |
337 | Double_t fConstrPTErr; // error on this constraint (0 - exact) | |
338 | Int_t fConstrCharge; // optional constraint on charge of Helix track (0 - no constraint) | |
7b85e477 | 339 | // |
6526a72c | 340 | Double_t fDerivativeLoc[kNLocal][3]; // XYZ deriv. over local params |
341 | Double_t fDerivativeGlo[kNParCh][3]; // XYZ deriv. over global params | |
7b85e477 | 342 | Int_t fMinNPtsPerTrack; // min number of points per track to accept it |
343 | Int_t fInitTrackParamsMeth; // method for track fit | |
344 | Int_t fTotBadLocEqPoints; // total number of reject points because of bad EqLoc | |
345 | AliTrackFitterRieman *fRieman; // riemann fitter for helices | |
346 | // | |
6526a72c | 347 | TObjArray fConstraints; // list of constraints |
6be22b3f | 348 | TObjArray fCacheMatrixOrig; // cach for original geom matrices |
349 | TObjArray fCacheMatrixCurr; // cach for prealigned geom matrices | |
7b85e477 | 350 | // >> new members |
351 | Bool_t fUseGlobalDelta; // intetpret deltas as global | |
352 | Bool_t fRequirePoints; // required points in specific layers | |
353 | Int_t fNReqLayUp[6]; /// number of points required in layer[n] with Y>0 | |
354 | Int_t fNReqLayDown[6]; /// number of points required in layer[n] with Y<0 | |
355 | Int_t fNReqLay[6]; /// number of points required in layer[n] | |
356 | Int_t fNReqDetUp[3]; /// number of points required in Detector[n] with Y>0 | |
357 | Int_t fNReqDetDown[3]; /// number of points required in Detector[n] with Y<0 | |
358 | Int_t fNReqDet[3]; /// number of points required in Detector[n] | |
359 | Int_t fTempExcludedModule; /// single module temporary excluded from initial fit | |
360 | // << new members | |
361 | // | |
6be22b3f | 362 | // OCDB stuff |
363 | TString fDefCDBpath; // default OCDB path | |
364 | TString fInitDeltaPath; // where to take the deltas used to produce the points | |
365 | TString fInitSDDRespPath; // where to take the initial SDD response used to produce the points | |
366 | TString fPreCalSDDRespPath; // precalibration SDD response file name | |
7b85e477 | 367 | // geometry stuffs |
6be22b3f | 368 | TString fGeometryPath; // Geometry file name |
369 | TString fPreDeltaPath; // file with prealigned objects | |
370 | TString fConstrRefPath; // file with prealigned objects wrt which constraints are defined | |
45993b23 | 371 | TGeoManager *fGeoManager; // pointer to Alice geomanager |
372 | Bool_t fIsConfigured; // flag for loaded config file | |
373 | TArrayS fPreAlignQF; // prealignment flags (not used?) | |
7b85e477 | 374 | // |
6be22b3f | 375 | AliITSresponseSDD* fCorrectSDD; // array of SDD t0/vdrift calib params |
376 | AliITSresponseSDD* fInitialRecSDD; // array of SDD t0/vdrift calib params used to create the track points | |
7b85e477 | 377 | TClonesArray* fPrealignment; // array of prealignment global deltas |
6526a72c | 378 | TClonesArray* fConstrRef; // array of refererence deltas with respect to which the constraint are defined (survey?) |
7b85e477 | 379 | TObjArray fMilleModule; /// array of super modules to be aligned |
380 | TObjArray fSuperModule; /// array of super modules defined in supermodule file | |
381 | Int_t fNModules; // number of defined modules from config file | |
382 | Int_t fNSuperModules; /// number of custom supermodules in SM file | |
383 | Bool_t fUsePreAlignment; // start from prealigned setup | |
6be22b3f | 384 | Bool_t fUseLocalYErr; // use local Yerror due to the sensor thickness |
7b85e477 | 385 | Bool_t fBOn; // magentic field ON |
386 | Double_t fBField; // value of magnetic field | |
6be22b3f | 387 | Int_t fMinPntPerSens; // min number of points per module to vary it |
7b85e477 | 388 | Int_t fBug; /// tag for temporary bug correction |
6526a72c | 389 | // pepo |
390 | Int_t fMilleVersion; /// tag for backward compatibility | |
391 | // endpepo | |
6be22b3f | 392 | // pepo270809 |
393 | Int_t fExtraClustersMode; /// 1=remove random / 2=remove internal / 10=use only tracks with xcl | |
394 | // endpepo270809 | |
6526a72c | 395 | // |
396 | Double_t fDriftSpeed[50]; //temporary array for drift times of SDD alitrackpoints | |
397 | Double_t fDriftTime0[50]; //temporary array for drift time 0's used for SDD alitrackpoints | |
6be22b3f | 398 | Double_t fExtClusterPar[9]; //array to store the parameters of the externally imposed cluster |
7b85e477 | 399 | // |
400 | static AliITSAlignMille2* fgInstance; // global pointer on itself | |
401 | static Int_t fgInstanceID; // global counter of the instances | |
6be22b3f | 402 | static const Char_t * fgkRecKeys[]; // keywords for config file records |
403 | static const Char_t fgkXYZ[]; // XYZ labels | |
6526a72c | 404 | // |
7b85e477 | 405 | ClassDef(AliITSAlignMille2, 0) |
7b85e477 | 406 | }; |
407 | ||
6be22b3f | 408 | |
409 | //______________________________________________________________________________________ | |
410 | inline void AliITSAlignMille2::SetCurrentCluster(const AliTrackPoint &atp) | |
411 | { | |
412 | // set current cluster | |
413 | fCluster = atp; | |
414 | fCurrentSensID = AliITSAlignMille2Module::GetIndexFromVolumeID(fCluster.GetVolumeID()); | |
415 | } | |
416 | ||
417 | //______________________________________________________________________________________ | |
418 | inline TGeoHMatrix* AliITSAlignMille2::GetSensorOrigMatrixSID(Int_t sid) const | |
419 | { | |
420 | // get cached original matrix by sensor ID | |
421 | return sid<0 ? 0 : (TGeoHMatrix*) fCacheMatrixOrig[sid]; | |
422 | } | |
423 | ||
424 | //______________________________________________________________________________________ | |
425 | inline TGeoHMatrix* AliITSAlignMille2::GetSensorOrigMatrixVID(Int_t vid) const | |
426 | { | |
427 | // get cached original matrix by sensor volume ID | |
428 | return GetSensorOrigMatrixSID( AliITSAlignMille2Module::GetIndexFromVolumeID(vid) ); | |
429 | } | |
430 | ||
431 | //______________________________________________________________________________________ | |
432 | inline TGeoHMatrix* AliITSAlignMille2::GetSensorCurrMatrixSID(Int_t sid) const | |
433 | { | |
434 | // get cached current matrix by sensor ID | |
435 | return sid<0 ? 0 : (TGeoHMatrix*) fCacheMatrixCurr[sid]; | |
436 | } | |
437 | ||
438 | //______________________________________________________________________________________ | |
439 | inline TGeoHMatrix* AliITSAlignMille2::GetSensorCurrMatrixVID(Int_t vid) const | |
440 | { | |
441 | // get cached current matrix by sensor volume ID | |
442 | return GetSensorCurrMatrixSID( AliITSAlignMille2Module::GetIndexFromVolumeID(vid) ); | |
443 | } | |
444 | ||
7b85e477 | 445 | #endif |
18986853 | 446 |