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