ROOT logo
#ifndef ALIMUONSURVEYUTIL_H
#define ALIMUONSURVEYUTIL_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/// \ingroup geometry 
/// \class AliMUONSurveyUtil
/// \brief Utility class for survey of muon spectrometer
//
// Authors: Javier Castillo

class AliMUONGeometryTransformer;
class TGeoCombiTrans;
class TClonesArray;

class AliMUONSurveyUtil:public TObject
{

 public:
  /// Destructor
  virtual ~AliMUONSurveyUtil();

  static AliMUONSurveyUtil *Instance();

  static Bool_t MatrixToAngles(const Double_t *rot, Double_t *angles);
  static void AnglesToMatrix(const Double_t *angles, Double_t *rot);

  Double_t XpCenter(const Double_t *x, const Double_t *par) const;
  Double_t XnCenter(const Double_t *x, const Double_t *par) const;
  Double_t YpCenter(const Double_t *x, const Double_t *par) const;
  Double_t YnCenter(const Double_t *x, const Double_t *par) const;
  Double_t ZpCenter(const Double_t *x, const Double_t *par) const;
  Double_t ZnCenter(const Double_t *x, const Double_t *par) const;
  Double_t PhiXpp(const Double_t *x, const Double_t *par) const;
  Double_t PhiXpn(const Double_t *x, const Double_t *par) const;
  Double_t PhiXnp(const Double_t *x, const Double_t *par) const;
  Double_t PhiXnn(const Double_t *x, const Double_t *par) const;
  Double_t PhiYpp(const Double_t *x, const Double_t *par) const;
  Double_t PhiYpn(const Double_t *x, const Double_t *par) const;
  Double_t PhiYnp(const Double_t *x, const Double_t *par) const;
  Double_t PhiYnn(const Double_t *x, const Double_t *par) const;
  
  static AliMUONGeometryTransformer *ReAlign(const AliMUONGeometryTransformer * transformer, 
					     int rMod, int rNDetElems, int rDetElemToDetElemId[], TGeoCombiTrans deltaDetElemTransf[], Bool_t verbose);

  static  void SetAlignmentResolution(const TClonesArray* misAlignArray, Int_t chId, Double_t chResX, Double_t chResY, Double_t deResX, Double_t deResY);
  
 protected:   
  /// Default constructor
  AliMUONSurveyUtil() : TObject() {}

 private:
  /// Not implemented
  AliMUONSurveyUtil(const AliMUONSurveyUtil& right);
  /// Not implemented
  AliMUONSurveyUtil&  operator = (const AliMUONSurveyUtil& right);


  static int fgNDetElemCh[10];  ///< Numbers of detection elements per chamber
  static AliMUONSurveyUtil *fgInstance;   ///< Singleton instance 

ClassDef(AliMUONSurveyUtil, 0) //Class for alignment of muon spectrometer
};

#endif
 AliMUONSurveyUtil.h:1
 AliMUONSurveyUtil.h:2
 AliMUONSurveyUtil.h:3
 AliMUONSurveyUtil.h:4
 AliMUONSurveyUtil.h:5
 AliMUONSurveyUtil.h:6
 AliMUONSurveyUtil.h:7
 AliMUONSurveyUtil.h:8
 AliMUONSurveyUtil.h:9
 AliMUONSurveyUtil.h:10
 AliMUONSurveyUtil.h:11
 AliMUONSurveyUtil.h:12
 AliMUONSurveyUtil.h:13
 AliMUONSurveyUtil.h:14
 AliMUONSurveyUtil.h:15
 AliMUONSurveyUtil.h:16
 AliMUONSurveyUtil.h:17
 AliMUONSurveyUtil.h:18
 AliMUONSurveyUtil.h:19
 AliMUONSurveyUtil.h:20
 AliMUONSurveyUtil.h:21
 AliMUONSurveyUtil.h:22
 AliMUONSurveyUtil.h:23
 AliMUONSurveyUtil.h:24
 AliMUONSurveyUtil.h:25
 AliMUONSurveyUtil.h:26
 AliMUONSurveyUtil.h:27
 AliMUONSurveyUtil.h:28
 AliMUONSurveyUtil.h:29
 AliMUONSurveyUtil.h:30
 AliMUONSurveyUtil.h:31
 AliMUONSurveyUtil.h:32
 AliMUONSurveyUtil.h:33
 AliMUONSurveyUtil.h:34
 AliMUONSurveyUtil.h:35
 AliMUONSurveyUtil.h:36
 AliMUONSurveyUtil.h:37
 AliMUONSurveyUtil.h:38
 AliMUONSurveyUtil.h:39
 AliMUONSurveyUtil.h:40
 AliMUONSurveyUtil.h:41
 AliMUONSurveyUtil.h:42
 AliMUONSurveyUtil.h:43
 AliMUONSurveyUtil.h:44
 AliMUONSurveyUtil.h:45
 AliMUONSurveyUtil.h:46
 AliMUONSurveyUtil.h:47
 AliMUONSurveyUtil.h:48
 AliMUONSurveyUtil.h:49
 AliMUONSurveyUtil.h:50
 AliMUONSurveyUtil.h:51
 AliMUONSurveyUtil.h:52
 AliMUONSurveyUtil.h:53
 AliMUONSurveyUtil.h:54
 AliMUONSurveyUtil.h:55
 AliMUONSurveyUtil.h:56
 AliMUONSurveyUtil.h:57
 AliMUONSurveyUtil.h:58
 AliMUONSurveyUtil.h:59
 AliMUONSurveyUtil.h:60
 AliMUONSurveyUtil.h:61
 AliMUONSurveyUtil.h:62
 AliMUONSurveyUtil.h:63
 AliMUONSurveyUtil.h:64
 AliMUONSurveyUtil.h:65