]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/AliMUONGeometryMisAligner.h
Bug fix for loading the LUT for chambers 1 to 6. (Indra)
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryMisAligner.h
... / ...
CommitLineData
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// Authors: Bruce Becker, Javier Castillo
11
12
13#ifndef ALI_MUON_GEOMETRY_MIS_ALIGNER_H
14#define ALI_MUON_GEOMETRY_MIS_ALIGNER_H
15
16#include <TObject.h>
17
18class AliMUONGeometryTransformer;
19
20class TGeoCombiTrans;
21class TClonesArray;
22
23class AliMUONGeometryMisAligner:public TObject
24{
25 public:
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);
29 AliMUONGeometryMisAligner();
30 virtual ~AliMUONGeometryMisAligner();
31
32 //_________________________________________________________________
33 // methods
34
35 // return a misaligned geometry obtained from the existing one.
36 AliMUONGeometryTransformer* MisAlign(const AliMUONGeometryTransformer* transformer,
37 Bool_t verbose = kFALSE);
38
39 /// Set cartesian displacement parameters different along x, y
40 void SetCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean = 0., Double_t zwidth = 0.)
41 {fDetElemMisAlig[0][0] = xmean; fDetElemMisAlig[0][1] = xwidth; fDetElemMisAlig[1][0] = ymean; fDetElemMisAlig[1][1] = ywidth; fDetElemMisAlig[2][0] = zmean; fDetElemMisAlig[2][1] = zwidth; }
42
43 /// Set cartesian displacement parameters, the same along x, y
44 void SetCartMisAlig(Double_t mean, Double_t width)
45 {fDetElemMisAlig[0][0] = mean; fDetElemMisAlig[0][1] = width; fDetElemMisAlig[1][0] = mean; fDetElemMisAlig[1][1] = width;}
46
47 /// Set angular displacement
48 void SetAngMisAlig(Double_t zmean, Double_t zwidth, Double_t xmean = 0., Double_t xwidth = 0., Double_t ymean = 0., Double_t ywidth = 0.)
49 {fDetElemMisAlig[3][0] = xmean; fDetElemMisAlig[3][1] = xwidth; fDetElemMisAlig[4][0] = ymean; fDetElemMisAlig[4][1] = ywidth; fDetElemMisAlig[5][0] = zmean; fDetElemMisAlig[5][1] = zwidth;}
50
51 /// Set cartesian displacement (Kept for backward compatibility)
52 void SetMaxCartMisAlig(Double_t width)
53 {fDetElemMisAlig[0][0] = 0.0; fDetElemMisAlig[0][1] = width; fDetElemMisAlig[1][0] = 0.0; fDetElemMisAlig[1][1] = width;}
54
55 /// Set angular displacement (Kept for backward compatibility)
56 void SetMaxAngMisAlig(Double_t width)
57 {fDetElemMisAlig[5][0] = 0.0; fDetElemMisAlig[5][1] = width;}
58
59 void SetXYAngMisAligFactor(Double_t factor);
60
61 void SetZCartMisAligFactor(Double_t factor);
62
63 /// Set option for gaussian distribution
64 void SetUseGaus(Bool_t usegaus)
65 {fUseGaus=usegaus; fUseUni=!usegaus;}
66
67 /// Set option for uniform distribution
68 void SetUseUni(Bool_t useuni)
69 {fUseGaus=!useuni; fUseUni=useuni;}
70
71 /// Set module (half chambers) cartesian displacement parameters
72 void SetModuleCartMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
73 {fModuleMisAlig[0][0] = xmean; fModuleMisAlig[0][1] = xwidth; fModuleMisAlig[1][0] = ymean; fModuleMisAlig[1][1] = ywidth; fModuleMisAlig[2][0] = zmean; fModuleMisAlig[2][1] = zwidth;}
74
75 /// Set module (half chambers) cartesian displacement parameters
76 void SetModuleAngMisAlig(Double_t xmean, Double_t xwidth, Double_t ymean, Double_t ywidth, Double_t zmean, Double_t zwidth)
77 {fModuleMisAlig[3][0] = xmean; fModuleMisAlig[3][1] = xwidth; fModuleMisAlig[4][0] = ymean; fModuleMisAlig[4][1] = ywidth; fModuleMisAlig[5][0] = zmean; fModuleMisAlig[5][1] = zwidth;}
78
79 /// Set alignment resolution to misalign objects to be stored in CDB
80 void SetAlignmentResolution(const TClonesArray* misAlignArray, Int_t chId=-1, Double_t chResX=-1., Double_t chResY=-1., Double_t deResX=-1., Double_t deResY=-1.);
81
82 protected:
83 /// Not implemented
84 AliMUONGeometryMisAligner(const AliMUONGeometryMisAligner & right);
85 /// Not implemented
86 AliMUONGeometryMisAligner & operator =(const AliMUONGeometryMisAligner &right);
87
88
89 private:
90 // return a misaligned transformation
91 TGeoCombiTrans MisAlignDetElem(const TGeoCombiTrans& transform) const;
92 TGeoCombiTrans MisAlignModule(const TGeoCombiTrans& transform) const;
93 void GetUniMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3], const Double_t lParMisAlig[6][2]) const;
94 void GetGausMisAlign(Double_t cartMisAlig[3], Double_t angMisAlig[3], const Double_t lParMisAlig[6][2]) const;
95
96 Bool_t fUseUni; ///< use uniform distribution for misaligmnets
97 Bool_t fUseGaus; ///< use gaussian distribution for misaligmnets
98 Double_t fDetElemMisAlig[6][2]; ///< Mean and width of the displacements of the detection elements along x,y,z (translations) and about x,y,z (rotations)
99 Double_t fModuleMisAlig[6][2]; ///< Mean and width of the displacements of the modules along x,y,z (translations) and about x,y,z (rotations)
100
101 Double_t fXYAngMisAligFactor; ///< factor (<1) to apply to angular misalignment range since range of motion is restricted out of the xy plane
102 Double_t fZCartMisAligFactor; ///< factor (<1) to apply to cartetian misalignment range since range of motion is restricted in z direction
103
104
105 ClassDef(AliMUONGeometryMisAligner,4) // Geometry parametrisation
106};
107
108#endif //ALI_MUON_GEOMETRY_MIS_ALIGNER_H
109
110
111
112