]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGeometryMisAligner.h
Basic implementation of AliMUONVNDStore containers, using AliMpExMap
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryMisAligner.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5
6 /// \ingroup geometry
7 /// \class AliMUONGeometryMisAligner
8 /// \brief Class for misalignment of geometry transformations
9 ///
10 /// Author: Bruce Becker
11
12
13 #ifndef ALI_MUON_GEOMETRY_MIS_ALIGNER_H
14 #define ALI_MUON_GEOMETRY_MIS_ALIGNER_H
15
16 #include <TObject.h>
17 #include <TGeoMatrix.h>
18 class TRandom;
19
20 class AliMUONGeometryTransformer;
21
22 class AliMUONGeometryMisAligner:public TObject
23 {
24  public:
25   AliMUONGeometryMisAligner(Double_t cartMisAlig, Double_t angMisAlig);
26   AliMUONGeometryMisAligner();
27   virtual ~AliMUONGeometryMisAligner();
28   
29   //_________________________________________________________________
30   // methods
31   
32   // return a misaligned geometry obtained from the existing one.
33   AliMUONGeometryTransformer* MisAlign(const AliMUONGeometryTransformer* transformer, Bool_t verbose = kFALSE);
34   
35   // return a misaligned transformation
36   TGeoCombiTrans MisAlign(const TGeoCombiTrans& transform) const;
37
38   void SetMaxCartMisAlig(Double_t offset)
39     {fMaxCartMisAlig = offset ;}
40   
41   void SetMaxAngMisAlig(Double_t offset)
42     {fMaxAngMisAlig = offset;}
43   
44   void SetXYAngMisAligFactor(Double_t factor);
45   
46   
47  protected:
48   AliMUONGeometryMisAligner(const AliMUONGeometryMisAligner & right);
49   AliMUONGeometryMisAligner & operator =(const AliMUONGeometryMisAligner &right);
50   
51  private:
52   Double_t fMaxCartMisAlig;   // cartesian displacement range, set by SetMaxCartMisAlig (translations)
53   Double_t fMaxAngMisAlig;    // Angular displacement range (rotations)
54   Double_t fXYAngMisAligFactor; // factor (<1) to apply to angular misalignment range since range of motion is restricted out of the xy plane
55   TRandom *fDisplacementGenerator;  // random number generator for the displacements
56   
57   ClassDef(AliMUONGeometryMisAligner,2) // Geometry parametrisation
58 };
59
60 #endif //ALI_MUON_GEOMETRY_MIS_ALIGNER_H
61
62
63
64