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