Added classes to make fake calibration constants, and alignment data.
[u/mrichter/AliRoot.git] / FMD / AliFMDAlignFaker.h
CommitLineData
20345ac5 1#ifndef ALIFMDALIGNFAKER_H
2#define ALIFMDALIGNFAKER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4 * reserved.
5 *
6 * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
7 *
8 * See cxx source for full Copyright notice
9 */
10
11//____________________________________________________________________
12//
13// Class to make fake alignration parameters
14//
15#ifndef ROOT_TTask
16# include <TTask.h>
17#endif
18#ifndef ROOT_TVector3
19# include <TVector3.h>
20#endif
21class TClonesArray;
22class TString;
23
24class AliFMDAlignFaker : public TTask
25{
26public:
27 enum EWhat {
28 kSensors = 1,
29 kHalves,
30 };
31 enum {
32 kAll = (1<<kHalves|1<<kSensors)
33 };
34 AliFMDAlignFaker(Int_t mask=kAll,
35 const char* geo="geometry.root",
36 const char* loc="local://cdb");
37 virtual ~AliFMDAlignFaker() {}
38 void AddAlign(EWhat w) { SETBIT(fMask, w); }
39 void RemoveAlign(EWhat w) { SETBIT(fMask, w); }
40 void SetAlign(Int_t mask) { fMask = mask; }
41 void SetSensorDisplacement(Double_t x1=0, Double_t y1=0, Double_t z1=0,
42 Double_t x2=.01, Double_t y2=.01, Double_t z2=0);
43 void SetSensorRotation(Double_t x1=0, Double_t y1=0, Double_t z1=0,
44 Double_t x2=.5, Double_t y2=.5, Double_t z2=.5);
45 void SetHalfDisplacement(Double_t x1=0, Double_t y1=0, Double_t z1=0,
46 Double_t x2=.05, Double_t y2=.05, Double_t z2=.05);
47 void SetHalfRotation(Double_t x1=0, Double_t y1=0, Double_t z1=0,
48 Double_t x2=0, Double_t y2=0, Double_t z2=0);
49 void SetOutput(const char* file) { SetTitle(file); }
50 void SetGeometryFile(const char* file) { SetName(file); }
51 void Exec(Option_t* option="");
52protected:
53 Bool_t MakeAlign(const TString& path, Int_t volID,
54 Double_t transX, Double_t transY, Double_t transZ,
55 Double_t rotX, Double_t rotY, Double_t rotZ);
56 Bool_t MakeAlignSensor(const TString& path, Int_t id);
57 Bool_t MakeAlignHalf(const TString& path, Int_t id);
58 void WriteToCDB();
59 void WriteToFile();
60
61 Long_t fMask; // What to write
62 TVector3 fSensorTransMin;
63 TVector3 fSensorTransMax;
64 TVector3 fSensorRotMin;
65 TVector3 fSensorRotMax;
66 TVector3 fHalfTransMin;
67 TVector3 fHalfTransMax;
68 TVector3 fHalfRotMin;
69 TVector3 fHalfRotMax;
70 Int_t fRunMin;
71 Int_t fRunMax;
72 TClonesArray* fArray;
73
74 ClassDef(AliFMDAlignFaker,0)
75};
76
77#endif
78//____________________________________________________________________
79//
80// Local Variables:
81// mode: C++
82// End:
83//
84// EOF
85//
86