]>
Commit | Line | Data |
---|---|---|
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 | |
9 | /// | |
328e160e | 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 | |
18 | class AliMUONGeometryTransformer; | |
19 | ||
ef79ed3a | 20 | class TRandom; |
328e160e | 21 | class TGeoCombiTrans; |
ef79ed3a | 22 | |
21dd83fc | 23 | class 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 | |
328e160e | 39 | void SetCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth) |
40 | {fCartXMisAligM = xmean; fCartXMisAligW = xwidth; fCartYMisAligM = ymean; fCartYMisAligW = ywidth;} | |
41 | ||
42 | void SetCartMisAlig(Double_t mean, Double_t width) | |
43 | {fCartXMisAligM = mean; fCartXMisAligW = width; fCartYMisAligM = mean; fCartYMisAligW = width;} | |
21dd83fc | 44 | |
328e160e | 45 | void SetAngMisAlig(Double_t mean, Double_t width) |
46 | {fAngMisAligM = mean; fAngMisAligW = width;} | |
21dd83fc | 47 | |
328e160e | 48 | void SetMaxCartMisAlig(Double_t width) // Kept for backward compatibility |
49 | {fCartXMisAligM = 0.0; fCartXMisAligW = width; fCartYMisAligM = 0.0; fCartYMisAligW = width;} | |
21dd83fc | 50 | |
328e160e | 51 | void SetMaxAngMisAlig(Double_t width) // Kept for backward compatibility |
52 | {fAngMisAligM = 0.0; fAngMisAligW = width;} | |
53 | ||
54 | void SetXYAngMisAligFactor(Double_t factor); | |
55 | ||
56 | void SetZCartMisAligFactor(Double_t factor); | |
57 | ||
58 | void SetUseGaus(Bool_t usegaus) | |
59 | {fUseGaus=usegaus; fUseUni=!usegaus;} | |
60 | ||
61 | void SetUseUni(Bool_t useuni) | |
62 | {fUseGaus=!useuni; fUseUni=useuni;} | |
21dd83fc | 63 | |
64 | protected: | |
65 | AliMUONGeometryMisAligner(const AliMUONGeometryMisAligner & right); | |
66 | AliMUONGeometryMisAligner & operator =(const AliMUONGeometryMisAligner &right); | |
67 | ||
328e160e | 68 | |
21dd83fc | 69 | private: |
ef79ed3a | 70 | // return a misaligned transformation |
71 | TGeoCombiTrans MisAlign(const TGeoCombiTrans& transform) const; | |
328e160e | 72 | void GetUniMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3]) const; |
73 | void GetGausMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3]) const; | |
ef79ed3a | 74 | |
829425a5 | 75 | Bool_t fUseUni; ///< use uniform distribution for misaligmnets |
76 | Bool_t fUseGaus; ///< use gaussian distribution for misaligmnets | |
77 | Double_t fCartXMisAligM; ///< cartesian displacement mean along x, (translations) | |
78 | Double_t fCartXMisAligW; ///< cartesian displacement width along x, (translations) | |
79 | Double_t fCartYMisAligM; ///< cartesian displacement mean along y, (translations) | |
80 | Double_t fCartYMisAligW; ///< cartesian displacement width along y, (translations) | |
81 | Double_t fAngMisAligM; ///< Angular displacement mean (rotations) | |
82 | Double_t fAngMisAligW; ///< Angular displacement range (rotations) | |
83 | Double_t fXYAngMisAligFactor; ///< factor (<1) to apply to angular misalignment range since range of motion is restricted out of the xy plane | |
84 | Double_t fZCartMisAligFactor; ///< factor (<1) to apply to cartetian misalignment range since range of motion is restricted in z direction | |
85 | TRandom *fDisplacementGenerator; ///< random number generator for the displacements | |
21dd83fc | 86 | |
328e160e | 87 | ClassDef(AliMUONGeometryMisAligner,3) // Geometry parametrisation |
21dd83fc | 88 | }; |
89 | ||
90 | #endif //ALI_MUON_GEOMETRY_MIS_ALIGNER_H | |
91 | ||
92 | ||
93 | ||
94 |