]>
Commit | Line | Data |
---|---|---|
1 | #ifndef AliMFTSegmentation_H | |
2 | #define AliMFTSegmentation_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | //==================================================================================================================================================== | |
8 | // | |
9 | // Segmentation class for the planes of the ALICE Muon Forward Tracker | |
10 | // | |
11 | // Contact author: antonio.uras@cern.ch | |
12 | // | |
13 | //==================================================================================================================================================== | |
14 | ||
15 | #include "TFile.h" | |
16 | #include "TNtuple.h" | |
17 | #include "TClonesArray.h" | |
18 | #include "TMath.h" | |
19 | #include "AliMFTPlane.h" | |
20 | #include "TMath.h" | |
21 | #include "AliMFTConstants.h" | |
22 | ||
23 | //==================================================================================================================================================== | |
24 | ||
25 | class AliMFTSegmentation : public TObject { | |
26 | ||
27 | public: | |
28 | ||
29 | AliMFTSegmentation(); | |
30 | AliMFTSegmentation(const Char_t *nameGeomFile); | |
31 | ||
32 | virtual ~AliMFTSegmentation(); | |
33 | virtual void Clear(const Option_t* /*opt*/); | |
34 | ||
35 | THnSparseC* GetDetElem(Int_t detElemID) const; | |
36 | ||
37 | Int_t GetDetElemGlobalID(Int_t plane, Int_t detElem) const { return fNMaxDetElemPerPlane*plane + detElem; } | |
38 | Int_t GetDetElemLocalID(Int_t detElem) const { return detElem%fNMaxDetElemPerPlane; } | |
39 | ||
40 | Bool_t Hit2PixelID(Double_t xHit, Double_t yHit, Int_t detElemID, Int_t &xPixel, Int_t &yPixel); | |
41 | ||
42 | Double_t GetPixelSizeX(Int_t detElemID) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(0)->GetBinWidth(1); } | |
43 | Double_t GetPixelSizeY(Int_t detElemID) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(1)->GetBinWidth(1); } | |
44 | Double_t GetPixelSizeZ(Int_t detElemID) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(2)->GetBinWidth(1); } | |
45 | ||
46 | Double_t GetPixelCenterX(Int_t detElemID, Int_t iPixel) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(0)->GetBinCenter(iPixel+1); } | |
47 | Double_t GetPixelCenterY(Int_t detElemID, Int_t iPixel) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(1)->GetBinCenter(iPixel+1); } | |
48 | Double_t GetPixelCenterZ(Int_t detElemID, Int_t iPixel) const { THnSparseC *detElem = GetDetElem(detElemID); return -1.*(detElem->GetAxis(2)->GetBinCenter(iPixel+1)); } | |
49 | ||
50 | Int_t GetNPlanes() const { return fMFTPlanes->GetEntries(); } | |
51 | ||
52 | AliMFTPlane* GetPlane(Int_t iPlane) const { if (iPlane>=0 && iPlane<fMFTPlanes->GetEntries()) return (AliMFTPlane*) fMFTPlanes->At(iPlane); else return NULL; } | |
53 | ||
54 | Bool_t DoesPixelExist(Int_t detElemID, Int_t xPixel, Int_t yPixel); | |
55 | ||
56 | protected: | |
57 | ||
58 | static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes; // max number of MFT planes | |
59 | static const Int_t fNMaxDetElemPerPlane = AliMFTConstants::fNMaxDetElemPerPlane; | |
60 | ||
61 | TClonesArray *fMFTPlanes; | |
62 | ||
63 | private: | |
64 | ||
65 | AliMFTSegmentation(const AliMFTSegmentation &source); | |
66 | AliMFTSegmentation& operator=(const AliMFTSegmentation &source); | |
67 | ||
68 | ClassDef(AliMFTSegmentation,1) | |
69 | ||
70 | }; | |
71 | ||
72 | //==================================================================================================================================================== | |
73 | ||
74 | #endif | |
75 |