AliRoot Core  edcc906 (edcc906)
AliFMDAlignFaker.h
Go to the documentation of this file.
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  */
16 //____________________________________________________________________
17 //
18 // Class
19 // to
20 // make
21 // fake
22 // alignment
23 // parameters
24 //
25 #ifndef ROOT_TTask
26 # include <TTask.h>
27 #endif
28 #ifndef ROOT_TVector3
29 # include <TVector3.h>
30 #endif
31 class TClonesArray;
32 class TString;
33 
47 class AliFMDAlignFaker : public TTask
48 {
49 public:
53  enum EWhat {
55  kSensors = 1,
58  };
59  enum {
61  kAll = (1<<kHalves|1<<kSensors)
62  };
69  AliFMDAlignFaker(Int_t mask=kAll,
70  const char* geo="geometry.root",
71  const char* loc="");
75  virtual ~AliFMDAlignFaker() {}
80  void AddAlign(EWhat w) { SETBIT(fMask, w); }
85  void RemoveAlign(EWhat w) { CLRBIT(fMask, w); }
90  void SetAlign(Int_t mask) { fMask = mask; }
102  void SetSensorDisplacement(Double_t x1=0, Double_t y1=0, Double_t z1=0,
103  Double_t x2=.01, Double_t y2=.01, Double_t z2=0);
114  void SetSensorRotation(Double_t x1=0, Double_t y1=0, Double_t z1=0,
115  Double_t x2=.5, Double_t y2=.5, Double_t z2=.5);
127  void SetHalfDisplacement(Double_t x1=0, Double_t y1=0, Double_t z1=0,
128  Double_t x2=.05, Double_t y2=.05, Double_t z2=.05);
139  void SetHalfRotation(Double_t x1=0, Double_t y1=0, Double_t z1=0,
140  Double_t x2=0, Double_t y2=0, Double_t z2=0);
145  void SetOutput(const char* file) { SetTitle(file); }
150  void SetGeometryFile(const char* file) { SetName(file); }
154  void SetComment(const Char_t* comment="dummy data") { fComment = comment; }
159  void Exec(Option_t* option="");
168  static Bool_t GetGeometry(Bool_t toCdb=kFALSE,
169  const TString& storage=TString());
170 protected:
177  : TTask(o),
178  fMask(0),
179  fSensorTransMin(0,0,0),
180  fSensorTransMax(0,0,0),
181  fSensorRotMin(0,0,0),
182  fSensorRotMax(0,0,0),
183  fHalfTransMin(0,0,0),
184  fHalfTransMax(0,0,0),
185  fHalfRotMin(0,0,0),
186  fHalfRotMax(0,0,0),
187  fRunMin(0),
188  fRunMax(0),
189  fArray(0),
190  fComment("")
191  {}
198  AliFMDAlignFaker& operator=(const AliFMDAlignFaker&) { return *this; }
199 
212  Bool_t MakeAlign(const TString& path, Int_t volID,
213  Double_t transX, Double_t transY, Double_t transZ,
214  Double_t rotX, Double_t rotY, Double_t rotZ);
220  Bool_t MakeAlignSensor(const TString& path, Int_t id);
226  Bool_t MakeAlignHalf(const TString& path, Int_t id);
230  void WriteToCDB();
234  void WriteToFile();
235  Long_t fMask; // What to write
236  TVector3 fSensorTransMin; // Minimum translations of a sensor
237  TVector3 fSensorTransMax; // Maximum translations of a sensor
238  TVector3 fSensorRotMin; // Minimum rotation of a sensor
239  TVector3 fSensorRotMax; // Maximum rotation of a sensor
240  TVector3 fHalfTransMin; // Minimum translations of a half-ring
241  TVector3 fHalfTransMax; // Maximum translations of a half-ring
242  TVector3 fHalfRotMin; // Minimum rotation of a half-ring
243  TVector3 fHalfRotMax; // Maximum rotation of a half-ring
244  Int_t fRunMin; // Run validity start
245  Int_t fRunMax; // Run validity end
246  TClonesArray* fArray; // Cache
247  TString fComment; // Comment on data
248 
249  ClassDef(AliFMDAlignFaker,0)
250 };
251 
252 #endif
253 //____________________________________________________________________
254 //
255 // Local Variables:
256 // mode: C++
257 // End:
258 //
259 // EOF
260 //
261 
virtual ~AliFMDAlignFaker()
void AddAlign(EWhat w)
void SetOutput(const char *file)
void Exec(Option_t *option="")
AliFMDAlignFaker(const AliFMDAlignFaker &o)
AliFMDAlignFaker & operator=(const AliFMDAlignFaker &)
const char * path
static TString comment
Definition: ConfigCosmic.C:131
AliFMDAlignFaker(Int_t mask=kAll, const char *geo="geometry.root", const char *loc="")
void RemoveAlign(EWhat w)
void SetGeometryFile(const char *file)
Bool_t MakeAlignHalf(const TString &path, Int_t id)
void SetComment(const Char_t *comment="dummy data")
static Bool_t GetGeometry(Bool_t toCdb=kFALSE, const TString &storage=TString())
This task creates fake alignment.
void SetHalfDisplacement(Double_t x1=0, Double_t y1=0, Double_t z1=0, Double_t x2=.05, Double_t y2=.05, Double_t z2=.05)
void SetSensorRotation(Double_t x1=0, Double_t y1=0, Double_t z1=0, Double_t x2=.5, Double_t y2=.5, Double_t z2=.5)
void SetAlign(Int_t mask)
void SetHalfRotation(Double_t x1=0, Double_t y1=0, Double_t z1=0, Double_t x2=0, Double_t y2=0, Double_t z2=0)
Bool_t MakeAlignSensor(const TString &path, Int_t id)
void SetSensorDisplacement(Double_t x1=0, Double_t y1=0, Double_t z1=0, Double_t x2=.01, Double_t y2=.01, Double_t z2=0)
TClonesArray * fArray
Bool_t MakeAlign(const TString &path, Int_t volID, Double_t transX, Double_t transY, Double_t transZ, Double_t rotX, Double_t rotY, Double_t rotZ)