00001 #ifndef ALIFMDALIGNFAKER_H
00002 #define ALIFMDALIGNFAKER_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ROOT_TTask
00016 # include <TTask.h>
00017 #endif
00018 #ifndef ROOT_TVector3
00019 # include <TVector3.h>
00020 #endif
00021 class TClonesArray;
00022 class TString;
00023
00033 class AliFMDAlignFaker : public TTask
00034 {
00035 public:
00037 enum EWhat {
00039 kSensors = 1,
00041 kHalves
00042 };
00043 enum {
00045 kAll = (1<<kHalves|1<<kSensors)
00046 };
00051 AliFMDAlignFaker(Int_t mask=kAll,
00052 const char* geo="geometry.root",
00053 const char* loc="local://cdb");
00055 virtual ~AliFMDAlignFaker() {}
00058 void AddAlign(EWhat w) { SETBIT(fMask, w); }
00061 void RemoveAlign(EWhat w) { CLRBIT(fMask, w); }
00064 void SetAlign(Int_t mask) { fMask = mask; }
00074 void SetSensorDisplacement(Double_t x1=0, Double_t y1=0, Double_t z1=0,
00075 Double_t x2=.01, Double_t y2=.01, Double_t z2=0);
00084 void SetSensorRotation(Double_t x1=0, Double_t y1=0, Double_t z1=0,
00085 Double_t x2=.5, Double_t y2=.5, Double_t z2=.5);
00095 void SetHalfDisplacement(Double_t x1=0, Double_t y1=0, Double_t z1=0,
00096 Double_t x2=.05, Double_t y2=.05, Double_t z2=.05);
00105 void SetHalfRotation(Double_t x1=0, Double_t y1=0, Double_t z1=0,
00106 Double_t x2=0, Double_t y2=0, Double_t z2=0);
00109 void SetOutput(const char* file) { SetTitle(file); }
00112 void SetGeometryFile(const char* file) { SetName(file); }
00115 void Exec(Option_t* option="");
00116 protected:
00127 Bool_t MakeAlign(const TString& path, Int_t volID,
00128 Double_t transX, Double_t transY, Double_t transZ,
00129 Double_t rotX, Double_t rotY, Double_t rotZ);
00133 Bool_t MakeAlignSensor(const TString& path, Int_t id);
00137 Bool_t MakeAlignHalf(const TString& path, Int_t id);
00139 void WriteToCDB();
00141 void WriteToFile();
00142
00143 Long_t fMask;
00144 TVector3 fSensorTransMin;
00145 TVector3 fSensorTransMax;
00146 TVector3 fSensorRotMin;
00147 TVector3 fSensorRotMax;
00148 TVector3 fHalfTransMin;
00149 TVector3 fHalfTransMax;
00150 TVector3 fHalfRotMin;
00151 TVector3 fHalfRotMax;
00152 Int_t fRunMin;
00153 Int_t fRunMax;
00154 TClonesArray* fArray;
00155
00156 ClassDef(AliFMDAlignFaker,0)
00157 };
00158
00159 #endif
00160
00161
00162
00163
00164
00165
00166
00167
00168