]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/TOFbase/AliTOFAlignment.h
CMake: removing qpythia from the depedencies
[u/mrichter/AliRoot.git] / TOF / TOFbase / AliTOFAlignment.h
1 #ifndef ALITOFALIGNMENT_H
2 #define ALITOFALIGNMENT_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //////////////////////////////////////////////////////////////////
8 //  class for TOF Alignment::                                   //
9 //////////////////////////////////////////////////////////////////
10 //#include <TObject.h>
11 //#include <TString.h>
12 #include "TTask.h"
13 //#include "TGeoManager.h"
14 //#include "TGeoVolume.h"
15 //#include "TGeoBBox.h"
16 //#include "TGeoTrd1.h"
17 //#include "TGeoPhysicalNode.h"
18 //#include "TGeoNode.h"
19 //#include "TGeoMatrix.h"
20
21 class TGeoManager;
22 class TObjArray;
23 class TString;
24 class TGeoMatrix;
25 class TGeoManager;
26 class TGeoHMatrix;
27
28 class AliTOFAlignment :public TTask{
29
30   enum {kMaxAlignObj=2000}; //maximal number of the TOF Alignable Objects
31
32  public:
33
34   AliTOFAlignment(); 
35   AliTOFAlignment(const AliTOFAlignment &t); //Copy Ctor 
36   AliTOFAlignment& operator=(const AliTOFAlignment &source); // Assignment Operator
37   virtual ~AliTOFAlignment();
38   virtual void WriteParOnCDB(const Char_t *sel, Int_t minrun, Int_t maxrun);
39   virtual void ReadParFromCDB(const Char_t *sel, Int_t nrun);
40   virtual void WriteSimParOnCDB(const Char_t *sel, Int_t minrun, Int_t maxrun);
41   virtual void ReadSimParFromCDB(const Char_t *sel, Int_t nrun);
42   virtual void Smear(Float_t * const tr=0, Float_t * const rot=0); // create a set of AlignObj for TOF
43   virtual void Align(Float_t * const tr=0, Float_t * const rot=0); // create a set of AlignObj for TOF
44   TObjArray * GetTOFAlignArray() const {return fTOFAlignObjArray;}
45
46   //methods for survey
47   virtual void WriteOnCDBforDC();
48   virtual void ReadFromCDBforDC();
49   virtual void BuildGeomForSurvey();      //Build ideal geometry (FTOA in BTOF)
50   virtual void InsertMisAlignment(Float_t * const mis); //To test align. from Survey
51   virtual void MakeDefData(const Int_t nf,TString namefiles[]); //Combines survey data from different files
52   virtual void WriteCombData(const Char_t *nomefile, Int_t option); //Write combined data on a file 
53   virtual void ReadSurveyDataAndAlign(); //Read survey data and call the right Alignement procedure  
54   virtual void WriteSimSurveyData(const Char_t *nomefile); // Write sim data in standard format
55
56 private:
57   
58   static const Double_t fgkRorigTOF;  //Radius of the TOF ext. volume, cm
59   static const Double_t fgkX1BTOF;    //x1 size of BTOF
60   static const Double_t fgkX2BTOF;    //x2 size of BTOF
61   static const Double_t fgkYBTOF;     //y size of BTOF
62   static const Double_t fgkZBTOF;     //z size of BTOF
63   
64   // Four fiducial marks on SM, expressed in local coordinates (origin=center of TOF SM)
65   // They are positioned at x=+/- 38 cm, y=+/- 457.3 cm, z=11.2 cm
66
67   static const Double_t fgkXFM; //x pos of FM in BTOF, cm 
68   static const Double_t fgkYFM; //y pos of FM in BTOF, cm
69   static const Double_t fgkZFM; //z pos of FM in BTOF, cm
70   
71   Int_t fNTOFAlignObj;           //Number of Alignable Objects
72   TGeoManager *fTOFmgr;          //Pointer to TGeoManager
73   TObjArray *fTOFAlignObjArray;  //Pointer to the TOF alignable objects
74   TGeoHMatrix* fTOFMatrixId[18]; //Ideal Matrices of TOF Volumes in the GRS
75   Float_t fCombFMData[72][6];    //Combined survey data
76   Int_t fNFMforSM[18][5];        //Number of FM for each SM
77
78   void AlignFromSurveyABC(Int_t iSM);  //From Survey data of FM ABC, derive the needed transformations to get the Alignment Objects. 
79   void AlignFromSurveyABD(Int_t iSM);  //From Survey data of FM ABD, derive the needed transformations to get the Alignment Objects. 
80   void AlignFromSurveyACD(Int_t iSM);  //From Survey data of FM ACD, derive the needed transformations to get the Alignment Objects. 
81   void AlignFromSurveyBCD(Int_t iSM);  //From Survey data of FM BCD, derive the needed transformations to get the Alignment Objects. 
82
83   ClassDef(AliTOFAlignment,2)   // TOF Alignment 
84 };
85
86 #endif