]>
Commit | Line | Data |
---|---|---|
289cc8a7 | 1 | #ifndef ALIEMCALSURVEY_H |
2 | #define ALIEMCALSURVEY_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id: $ */ | |
8 | ||
9 | #include <TObject.h> | |
10 | #include <Rtypes.h> | |
11 | ||
12 | class TClonesArray; | |
13 | class TString; | |
14 | ||
15 | class AliEMCALGeometry; | |
16 | ||
17 | /* | |
18 | Objects of this class read txt file with survey data | |
19 | and convert the data into AliAlignObjParams of alignable EMCAL volumes. | |
20 | AliEMCALSurvey inherits TObject only to use AliLog "functions". | |
21 | */ | |
22 | ||
23 | class AliEMCALSurvey : public TObject { | |
24 | public: | |
54a4c3a6 | 25 | |
26 | enum SurveyDataType_t { kSurvey = 0, //use real survey parameters | |
27 | kDummy = 1 //use dummy values for testing | |
28 | }; | |
29 | ||
289cc8a7 | 30 | AliEMCALSurvey(); |
54a4c3a6 | 31 | AliEMCALSurvey(const TString &txtFileName, const SurveyDataType_t dataType=kSurvey); |
289cc8a7 | 32 | |
33 | virtual ~AliEMCALSurvey(); | |
34 | ||
35 | //Create AliAlignObjParams for strips. | |
36 | void CreateAliAlignObjParams(TClonesArray &array); | |
37 | //Create AliAlignObjParams with null shifts and rotations. | |
38 | void CreateNullObjects(TClonesArray &alObj, const AliEMCALGeometry *geom)const; | |
39 | ||
54a4c3a6 | 40 | void SetDataType(const SurveyDataType_t dataType) { fDataType = dataType; } |
41 | Int_t GetDataType() const { return (Int_t)fDataType; } | |
42 | ||
289cc8a7 | 43 | protected: |
44 | ||
45 | struct AliEMCALSuperModuleDelta { | |
46 | Float_t fXShift; //x shift | |
47 | Float_t fYShift; //y shift | |
48 | Float_t fZShift; //z shift | |
49 | Float_t fPsi; //psi | |
50 | Float_t fTheta; //theta | |
51 | Float_t fPhi; //phi | |
52 | }; | |
53 | ||
54 | Int_t fNSuperModule; // Number of supermodules. | |
55 | AliEMCALSuperModuleDelta *fSuperModuleData; // Supermodule transformation data | |
56 | ||
54a4c3a6 | 57 | void InitSuperModuleData(const Double_t *xReal, const Double_t *yReal, const Double_t *zReal, |
58 | const Double_t *psiReal, const Double_t *thetaReal, const Double_t *phiReal); | |
68711871 | 59 | void InitSuperModuleData(const TObjArray* surveypoints); |
289cc8a7 | 60 | |
61 | private: | |
62 | //Calculate shifts and rotations for supermodule. | |
63 | virtual AliEMCALSuperModuleDelta GetSuperModuleTransformation(Int_t smIndex) const; | |
64 | ||
65 | AliEMCALSurvey(const AliEMCALSurvey &); | |
66 | AliEMCALSurvey &operator = (const AliEMCALSurvey &); | |
67 | ||
54a4c3a6 | 68 | Int_t fDataType; //! which date type (survey or dummy) to use |
69 | ||
70 | ClassDef(AliEMCALSurvey, 2) //Survey data reader | |
289cc8a7 | 71 | }; |
72 | ||
73 | #endif |