LCOV - code coverage report
Current view: top level - PHOS/PHOSbase - AliPHOSModuleMisalignment.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 2 50.0 %
Date: 2016-06-14 17:26:59 Functions: 1 8 12.5 %

          Line data    Source code
       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                               */
       5             : 
       6             : /* $Id: $ */
       7             : 
       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
      15             : // AliPHOSGeometry.
      16             : // I define module position by three points
      17             : // with names "name0", "name1", "name2".
      18             : //
      19             : // Module:
      20             : //                                 |
      21             : // <-------------Z-----------------|--
      22             : // name1 ------------------- name0 |
      23             : //                               | |
      24             : //                               | |
      25             : //                               | |
      26             : //                               | |
      27             : //                               | |
      28             : //                               | X
      29             : //                               | |
      30             : //                               | |
      31             : //                               | |
      32             : //                               | |
      33             : //                           name2 |
      34             : //
      35             : // For example, in
      36             : //    "PHOS MODULE Position 2 (Production 2) 
      37             : //     MEASUREMENT AFTER FINAL INSTALLATION
      38             : //     Measurement on 19.05.2008": (https://edms.cern.ch/document/922320)
      39             : //
      40             : // name0 == "T2_10000"
      41             : // name1 == "T2_10027"
      42             : // name2 == "T2_24000"
      43             : //
      44             : // Usage:
      45             : //
      46             : // ...
      47             : // AliPHOSGeometry * phosGeom = AliPHOSGeometry::GetInstance("IHEP", "");
      48             : // ...
      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");
      53             : // ...
      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);
      58             : //
      59             : // Author: Timur Pocheptsov.
      60             : // 2 December 2008
      61             : 
      62             : //ROOT's typedefs.
      63             : #include <Rtypes.h>
      64             : 
      65             : class TGeoHMatrix;
      66             : class TString;
      67             : 
      68             : class AliSurveyPoint;
      69             : class AliPHOSGeometry;
      70             : 
      71           0 : class AliPHOSModuleMisalignment {
      72             :   enum {
      73             :     kModules = 5
      74             :   };
      75             : 
      76             : public:
      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);
      85             : private:
      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;
      90             : 
      91             : private:
      92             :   Bool_t   fDebug;  // debug level
      93             : 
      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
      99             : 
     100          22 :   ClassDef(AliPHOSModuleMisalignment, 1)//Utility class for module misalignment.
     101             : };
     102             : 
     103             : #endif

Generated by: LCOV version 1.11