AliFMDAlignFaker.h

Go to the documentation of this file.
00001 #ifndef ALIFMDALIGNFAKER_H
00002 #define ALIFMDALIGNFAKER_H
00003 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
00004  * reserved. 
00005  *
00006  * Latest changes by Christian Holm Christensen <cholm@nbi.dk>
00007  *
00008  * See cxx source for full Copyright notice                               
00009  */
00010 
00011 //____________________________________________________________________
00012 //
00013 //  Class to make fake alignration parameters 
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;            // What to write 
00144   TVector3      fSensorTransMin;  // Minimum translations of a sensor
00145   TVector3      fSensorTransMax;  // Maximum translations of a sensor
00146   TVector3      fSensorRotMin;    // Minimum rotation of a sensor
00147   TVector3      fSensorRotMax;    // Maximum rotation of a sensor
00148   TVector3      fHalfTransMin;    // Minimum translations of a half-ring
00149   TVector3      fHalfTransMax;    // Maximum translations of a half-ring
00150   TVector3      fHalfRotMin;      // Minimum rotation of a half-ring    
00151   TVector3      fHalfRotMax;      // Maximum rotation of a half-ring 
00152   Int_t         fRunMin;          // Run validity start 
00153   Int_t         fRunMax;          // Run validity end
00154   TClonesArray* fArray;           // Cache
00155   
00156   ClassDef(AliFMDAlignFaker,0)
00157 };
00158 
00159 #endif
00160 //____________________________________________________________________
00161 //
00162 // Local Variables:
00163 //   mode: C++
00164 // End:
00165 //
00166 // EOF
00167 //
00168 

Generated on Fri Mar 24 17:11:21 2006 for ALICE FMD Off-line by  doxygen 1.4.6