1 #ifndef ALIPHOSMODULEMISALIGNMENT_H
2 #define ALIPHOSMODULEMISALIGNMENT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 // Utility class to calculate PHOS module's
9 // misalignment from ideal geometry (defined by AliPHOSGeometry)
10 // and survey data. 5 modules expected.
11 // Number of modules is specified by enumerator kModules here,
12 // if this number changes in AliPHOSGeometry
13 // - CHANGE kModules constant here.
14 // We do not have such compile-time constant in
16 // I define module position by three points
17 // with names "name0", "name1", "name2".
21 // <-------------Z-----------------|--
22 // name1 ------------------- name0 |
36 // "PHOS MODULE Position 2 (Production 2)
37 // MEASUREMENT AFTER FINAL INSTALLATION
38 // Measurement on 19.05.2008": (https://edms.cern.ch/document/922320)
40 // name0 == "T2_10000"
41 // name1 == "T2_10027"
42 // name2 == "T2_24000"
47 // AliPHOSGeometry * phosGeom = AliPHOSGeometry::GetInstance("IHEP", "");
49 // //For AliSurveyObj usage details see $ALICE_ROOT/STEER/AliSurveyObj.h,
50 // //here's example with local file.
51 // AliSurveyObj survey;
52 // survey.FillFromLocalFile("local_file_name");
54 // AliPHOSModuleMisalignment delta(*phosGeom);
55 // TGeoHMatrix m;//matrix to save transformations in.
56 // delta.DeltaTransformation(moduleNumber, survey.GetData(), "T2_10000",
57 // "T2_10027", "T2_24000", &m);
59 // Author: Timur Pocheptsov.
69 class AliPHOSGeometry;
71 class AliPHOSModuleMisalignment {
77 AliPHOSModuleMisalignment(const AliPHOSGeometry & geom, Bool_t debug = kFALSE);
78 //ClassDef macro will add virtual functions,
79 //so, I have to define virtual dtor
80 //to supress warnings.
81 virtual ~AliPHOSModuleMisalignment();
82 //Module number "module" starts from zero.
83 void DeltaTransformation(UInt_t module, const TObjArray * points, const TString & name0,
84 const TString & name1, const TString & name2, TGeoHMatrix * delta);
86 void FindIdealModule(UInt_t module);
87 void FindRealModule(const AliSurveyPoint * pt0, const AliSurveyPoint * pt1,
88 const AliSurveyPoint * pt2);
89 void FindDelta(TGeoHMatrix * delta)const;
92 Bool_t fDebug; // debug level
94 Double_t fAngles[kModules][3][2]; // Matrix of rotation angles
95 Double_t fCenters[kModules][3]; // Matrix of center displacements
96 Double_t fModule[3][3]; //Module's described by 3 points (non-positioned module)
97 Double_t fU[3][3]; //Points from ideal module
98 Double_t fV[3][3]; //Points from real module
100 ClassDef(AliPHOSModuleMisalignment, 1)//Utility class for module misalignment.