]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSAlignMille2Module.h
Corrections in the comments (M. Chojnacki).
[u/mrichter/AliRoot.git] / ITS / AliITSAlignMille2Module.h
CommitLineData
7b85e477 1#ifndef ALIITSALIGNMILLE2MODULE_H\r
2#define ALIITSALIGNMILLE2MODULE_H \r
3/* Copyright(c) 2007-2009 , ALICE Experiment at CERN, All rights reserved. * \r
4 * See cxx source for full Copyright notice */ \r
5 \r
6/// \ingroup rec \r
7/// \class AliITSAlignMille2Module\r
8/// \brief Class for alignment of ITS \r
9// \r
10// Authors: Marcello Lunardon \r
11//\r
12// RS Converted static arrays fSensVolVolumeID and fSensVolIndex\r
13// to TArrays in user transparent way.\r
14//\r
15/* $Id$ */ \r
16//#include <TString.h> \r
17//#include <TObject.h> \r
18#include <TNamed.h> \r
19#include <TArrayI.h> \r
20#include <TArrayS.h> \r
21class AliITSAlignMille2;\r
22\r
23class AliAlignObjParams; \r
24class TGeoHMatrix; \r
25\r
26class AliITSAlignMille2Module : public TNamed \r
27{ \r
28public: \r
29 AliITSAlignMille2Module(); \r
30 AliITSAlignMille2Module(UShort_t volid);\r
31 AliITSAlignMille2Module(Int_t index, UShort_t volid, char* symname, TGeoHMatrix *m, Int_t nsv=0, UShort_t *volidsv=NULL);\r
32 AliITSAlignMille2Module(const AliITSAlignMille2Module& rhs); // copy constructor\r
33 AliITSAlignMille2Module& operator=(const AliITSAlignMille2Module& rhs); \r
34 //\r
35 virtual ~AliITSAlignMille2Module(); \r
36 //\r
37 // geometry methods \r
38 Int_t GetIndex() const {return fIndex;} \r
39 UShort_t GetVolumeID() const {return fVolumeID;} \r
40 Int_t GetNSensitiveVolumes() const {return fNSensVol;} \r
41 Int_t GetSensVolIndex(Int_t at) const {return fSensVolIndex[at];}\r
42 Short_t GetSensVolVolumeID(Int_t at) const {return fSensVolVolumeID[at];}\r
43 TGeoHMatrix *GetMatrix() const {return fMatrix;}\r
44 void GetLocalMatrix(TGeoHMatrix& mat) const;\r
45 UShort_t *GetSensitiveVolumeVolumeID() const {return (UShort_t*)fSensVolVolumeID.GetArray();}\r
46 Float_t GetSigmaFactor(Int_t i) const {return fSigmaFactor[i];}\r
47 Float_t GetSigmaXFactor() const {return fSigmaFactor[0];}\r
48 Float_t GetSigmaYFactor() const {return fSigmaFactor[1];}\r
49 Float_t GetSigmaZFactor() const {return fSigmaFactor[2];}\r
50 Int_t GetNProcessedPoints() const {return fNProcPoints;}\r
51 Bool_t IsFreeDOF(Int_t dof) const {return TestBit(1<<dof);}\r
52 UInt_t GetFreePattern() const {return TestBits(0x3f);}\r
53 Bool_t AreSensorsProvided() const {return TestBit(1<<10);}\r
54 Bool_t IsIn(UShort_t volid) const;\r
55 Bool_t IsAlignable() const;\r
56 Bool_t BelongsTo(AliITSAlignMille2Module* parent) const;\r
57 AliITSAlignMille2Module* GetParent() const {return fParent;}\r
58 void Print(Option_t* opt="") const; \r
59 //\r
60 void SetSigmaFactor(Int_t i,Float_t v) {fSigmaFactor[i]=v;}\r
61 void SetSigmaXFactor(Float_t v) {fSigmaFactor[0]=v;}\r
62 void SetSigmaYFactor(Float_t v) {fSigmaFactor[1]=v;}\r
63 void SetSigmaZFactor(Float_t v) {fSigmaFactor[2]=v;}\r
64 void IncNProcessedPoints(Int_t step=1) {fNProcPoints += step;}\r
65 void SetNProcessedPoints(Int_t v) {fNProcPoints = v;}\r
66 void SetParent(AliITSAlignMille2Module* par) {fParent = par;}\r
67 void SetFreeDOF(Int_t dof,Bool_t free=kTRUE) {SetBit(1<<dof,free);}\r
68 void SetSensorsProvided(Bool_t v=kTRUE) {SetBit(1<<10,v);}\r
69 Int_t Set(Int_t index,UShort_t volid,char* symname,TGeoHMatrix *m,Int_t nsv=0,UShort_t *volidsv=0);\r
70 //\r
71 void AddSensitiveVolume(UShort_t volid);\r
72 void DelSensitiveVolume(Int_t at);\r
73 //\r
74 TGeoHMatrix *GetSensitiveVolumeMatrix(UShort_t voluid);\r
75 TGeoHMatrix *GetSensitiveVolumeOrigGlobalMatrix(UShort_t voluid);\r
76 TGeoHMatrix *GetSensitiveVolumeModifiedMatrix(UShort_t voluid, Double_t *delta,Bool_t local=kTRUE); \r
77 AliAlignObjParams *GetSensitiveVolumeMisalignment(UShort_t voluid, AliAlignObjParams *a); \r
78 AliAlignObjParams *GetSensitiveVolumeMisalignment(UShort_t voluid, Double_t *deltalocal); \r
79 //\r
80 // forse non serve...\r
81 AliAlignObjParams *GetSensitiveVolumeGlobalMisalignment(UShort_t voluid, Double_t *deltalocal); \r
82 // mo' proviamo questo\r
83 AliAlignObjParams *GetSensitiveVolumeTotalMisalignment(UShort_t voluid, Double_t *deltalocal); \r
84 //\r
85 static Int_t GetIndexFromVolumeID(UShort_t volid);\r
86 static UShort_t GetVolumeIDFromSymname(const Char_t *symname);\r
87 static UShort_t GetVolumeIDFromIndex(Int_t index);\r
88 //\r
89protected:\r
90 //\r
91 Int_t SensVolMatrix(UShort_t volid, TGeoHMatrix *m); \r
92 Int_t SensVolOrigGlobalMatrix(UShort_t volid, TGeoHMatrix *m); \r
93 //\r
94protected:\r
95 //\r
96 Int_t fNSensVol; // number of sensor it refers to\r
97 Int_t fIndex; // aliroot index\r
98 UShort_t fVolumeID; // aliroot volune ID\r
99 Int_t fNProcPoints; // number of processed points\r
100 Float_t fSigmaFactor[3]; // multiplicative factor for referred sensor X,Y,Z error\r
101 //\r
102 TArrayI fSensVolIndex; // aliroot indices for sensors\r
103 TArrayS fSensVolVolumeID; // aliroot indices for sensors volumes\r
104 TGeoHMatrix *fMatrix; // ideal TGeoHMatrix of the supermodule\r
105 TGeoHMatrix *fSensVolMatrix; // sensor's ideal matrices\r
106 TGeoHMatrix *fSensVolModifMatrix; // sensor's modified matrices\r
107 //\r
108 AliITSAlignMille2Module* fParent; // optional parent pointer\r
109 //\r
110 static AliAlignObjParams fgTempAlignObj; // temp.alignment object used as a buffer \r
111 //\r
112 ClassDef(AliITSAlignMille2Module, 0)\r
113}; \r
114\r
115#endif \r