Line data Source code
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:
25 :
26 : enum SurveyDataType_t { kSurvey = 0, //use real survey parameters
27 : kDummy = 1 //use dummy values for testing
28 : };
29 :
30 : AliEMCALSurvey();
31 : AliEMCALSurvey(const TString &txtFileName, const SurveyDataType_t dataType=kSurvey);
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 :
40 0 : void SetDataType(const SurveyDataType_t dataType) { fDataType = dataType; }
41 0 : Int_t GetDataType() const { return (Int_t)fDataType; }
42 :
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 :
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);
59 : void InitSuperModuleData(const TObjArray* surveypoints);
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 :
68 : Int_t fDataType; //! which date type (survey or dummy) to use
69 :
70 42 : ClassDef(AliEMCALSurvey, 2) //Survey data reader
71 : };
72 :
73 : #endif
|