- Revised comments and adapted them for Doxygen
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryMisAligner.h
CommitLineData
21dd83fc 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
a9aad96e 9//
10// Authors: Bruce Becker, Javier Castillo
21dd83fc 11
12
13#ifndef ALI_MUON_GEOMETRY_MIS_ALIGNER_H
14#define ALI_MUON_GEOMETRY_MIS_ALIGNER_H
15
16#include <TObject.h>
21dd83fc 17
18class AliMUONGeometryTransformer;
19
ef79ed3a 20class TRandom;
328e160e 21class TGeoCombiTrans;
ef79ed3a 22
21dd83fc 23class AliMUONGeometryMisAligner:public TObject
24{
25 public:
328e160e 26 AliMUONGeometryMisAligner(Double_t cartXMisAligM, Double_t cartXMisAligW, Double_t cartYMisAligM, Double_t cartYMisAligW, Double_t angMisAligM, Double_t angMisAligW);
27 AliMUONGeometryMisAligner(Double_t cartMisAligM, Double_t cartMisAligW, Double_t angMisAligM, Double_t angMisAligW);
28 AliMUONGeometryMisAligner(Double_t cartMisAligW, Double_t angMisAligW);
21dd83fc 29 AliMUONGeometryMisAligner();
30 virtual ~AliMUONGeometryMisAligner();
31
32 //_________________________________________________________________
33 // methods
34
35 // return a misaligned geometry obtained from the existing one.
ef79ed3a 36 AliMUONGeometryTransformer* MisAlign(const AliMUONGeometryTransformer* transformer,
37 Bool_t verbose = kFALSE);
21dd83fc 38
a9aad96e 39 /// Set cartesian displacement parameters different along x, y
328e160e 40 void SetCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth)
41 {fCartXMisAligM = xmean; fCartXMisAligW = xwidth; fCartYMisAligM = ymean; fCartYMisAligW = ywidth;}
42
a9aad96e 43 /// Set cartesian displacement parameters, the same along x, y
328e160e 44 void SetCartMisAlig(Double_t mean, Double_t width)
45 {fCartXMisAligM = mean; fCartXMisAligW = width; fCartYMisAligM = mean; fCartYMisAligW = width;}
21dd83fc 46
a9aad96e 47 /// Set angular displacement
328e160e 48 void SetAngMisAlig(Double_t mean, Double_t width)
49 {fAngMisAligM = mean; fAngMisAligW = width;}
21dd83fc 50
a9aad96e 51 /// Set cartesian displacement (Kept for backward compatibility)
52 void SetMaxCartMisAlig(Double_t width)
328e160e 53 {fCartXMisAligM = 0.0; fCartXMisAligW = width; fCartYMisAligM = 0.0; fCartYMisAligW = width;}
21dd83fc 54
a9aad96e 55 /// Set angular displacement (Kept for backward compatibility)
56 void SetMaxAngMisAlig(Double_t width)
328e160e 57 {fAngMisAligM = 0.0; fAngMisAligW = width;}
58
59 void SetXYAngMisAligFactor(Double_t factor);
60
61 void SetZCartMisAligFactor(Double_t factor);
62
a9aad96e 63 /// Set option for gaussian distribution
328e160e 64 void SetUseGaus(Bool_t usegaus)
65 {fUseGaus=usegaus; fUseUni=!usegaus;}
66
a9aad96e 67 /// Set option for uniform distribution
328e160e 68 void SetUseUni(Bool_t useuni)
69 {fUseGaus=!useuni; fUseUni=useuni;}
21dd83fc 70
71 protected:
72 AliMUONGeometryMisAligner(const AliMUONGeometryMisAligner & right);
73 AliMUONGeometryMisAligner & operator =(const AliMUONGeometryMisAligner &right);
74
328e160e 75
21dd83fc 76 private:
ef79ed3a 77 // return a misaligned transformation
78 TGeoCombiTrans MisAlign(const TGeoCombiTrans& transform) const;
328e160e 79 void GetUniMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3]) const;
80 void GetGausMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3]) const;
ef79ed3a 81
829425a5 82 Bool_t fUseUni; ///< use uniform distribution for misaligmnets
83 Bool_t fUseGaus; ///< use gaussian distribution for misaligmnets
84 Double_t fCartXMisAligM; ///< cartesian displacement mean along x, (translations)
85 Double_t fCartXMisAligW; ///< cartesian displacement width along x, (translations)
86 Double_t fCartYMisAligM; ///< cartesian displacement mean along y, (translations)
87 Double_t fCartYMisAligW; ///< cartesian displacement width along y, (translations)
88 Double_t fAngMisAligM; ///< Angular displacement mean (rotations)
89 Double_t fAngMisAligW; ///< Angular displacement range (rotations)
90 Double_t fXYAngMisAligFactor; ///< factor (<1) to apply to angular misalignment range since range of motion is restricted out of the xy plane
91 Double_t fZCartMisAligFactor; ///< factor (<1) to apply to cartetian misalignment range since range of motion is restricted in z direction
92 TRandom *fDisplacementGenerator; ///< random number generator for the displacements
21dd83fc 93
328e160e 94 ClassDef(AliMUONGeometryMisAligner,3) // Geometry parametrisation
21dd83fc 95};
96
97#endif //ALI_MUON_GEOMETRY_MIS_ALIGNER_H
98
99
100
101