]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MFT/AliMFTSegmentation.h
added some MC info
[u/mrichter/AliRoot.git] / MFT / AliMFTSegmentation.h
index c5c7d5f506c5dd161772de5d805f998b1865dd25..5072bae6e8b060ddc52a200cb1d97411fa9036d8 100644 (file)
@@ -18,6 +18,7 @@
 #include "TMath.h"
 #include "AliMFTPlane.h"
 #include "TMath.h"
+#include "AliMFTConstants.h"
 
 //====================================================================================================================================================
 
@@ -30,34 +31,36 @@ public:
 
   virtual ~AliMFTSegmentation() {}
 
-  THnSparseC* GetDetElem(Int_t detElemID);
+  THnSparseC* GetDetElem(Int_t detElemID) const;
 
-  Int_t GetDetElemID(Int_t plane, Int_t detElem) { return fNMaxDetElemPerPlane*plane + detElem; }
+  Int_t GetDetElemID(Int_t plane, Int_t detElem) const { return fNMaxDetElemPerPlane*plane + detElem; }
     
   Bool_t Hit2PixelID(Double_t xHit, Double_t yHit, Int_t detElemID, Int_t &xPixel, Int_t &yPixel);  
 
-  Double_t GetPixelSizeX(Int_t detElemID) { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(0)->GetBinWidth(1); }
-  Double_t GetPixelSizeY(Int_t detElemID) { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(1)->GetBinWidth(1); }
-  Double_t GetPixelSizeZ(Int_t detElemID) { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(2)->GetBinWidth(1); }
+  Double_t GetPixelSizeX(Int_t detElemID) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(0)->GetBinWidth(1); }
+  Double_t GetPixelSizeY(Int_t detElemID) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(1)->GetBinWidth(1); }
+  Double_t GetPixelSizeZ(Int_t detElemID) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(2)->GetBinWidth(1); }
 
-  Double_t GetPixelCenterX(Int_t detElemID, Int_t iPixel) { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(0)->GetBinCenter(iPixel+1); }
-  Double_t GetPixelCenterY(Int_t detElemID, Int_t iPixel) { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(1)->GetBinCenter(iPixel+1); }
-  Double_t GetPixelCenterZ(Int_t detElemID, Int_t iPixel) { THnSparseC *detElem = GetDetElem(detElemID); return -1.*(detElem->GetAxis(2)->GetBinCenter(iPixel+1)); }
+  Double_t GetPixelCenterX(Int_t detElemID, Int_t iPixel) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(0)->GetBinCenter(iPixel+1); }
+  Double_t GetPixelCenterY(Int_t detElemID, Int_t iPixel) const { THnSparseC *detElem = GetDetElem(detElemID); return detElem->GetAxis(1)->GetBinCenter(iPixel+1); }
+  Double_t GetPixelCenterZ(Int_t detElemID, Int_t iPixel) const { THnSparseC *detElem = GetDetElem(detElemID); return -1.*(detElem->GetAxis(2)->GetBinCenter(iPixel+1)); }
 
-  Int_t GetNPlanes() { return fMFTPlanes->GetEntries(); }
+  Int_t GetNPlanes() const { return fMFTPlanes->GetEntries(); }
 
-  AliMFTPlane* GetPlane(Int_t iPlane) { if (iPlane>=0 && iPlane<fMFTPlanes->GetEntries()) return (AliMFTPlane*) fMFTPlanes->At(iPlane); else return NULL; }
+  AliMFTPlane* GetPlane(Int_t iPlane) const { if (iPlane>=0 && iPlane<fMFTPlanes->GetEntries()) return (AliMFTPlane*) fMFTPlanes->At(iPlane); else return NULL; }
+
+  Bool_t DoesPixelExist(Int_t detElemID, Int_t xPixel, Int_t yPixel);
  
 protected:
 
-  static const Int_t fNMaxPlanes = 20;                // max number of MFT planes
-  static const Double_t fRadiusMin = 2.225;           // minimum radial distance of the MFT sensors. To be carefully coordinated with fDetElemSuperposition
-  static const Double_t fDetElemSuperposition = 0.05; // superposition between bands tasselling the MFT planes, for having a full acceptance coverage
-                                                      // even in case of 10 degrees inclined tracks
-  static const Double_t fHeightDetElem = 0.5;         // height of the active volume bands composing the planes
-  static const Double_t fSupportExtMargin = 0.3;      // minimum border size between the end of the support plane and the sensors
+  static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes;                // max number of MFT planes
+  static const Double_t fRadiusMin;             // minimum radial distance of the MFT sensors. To be carefully coordinated with fDetElemSuperposition
+  static const Double_t fDetElemSuperposition // superposition between bands tasselling the MFT planes, for having a full acceptance coverage
+                                                // even in case of 10 degrees inclined tracks
+  static const Double_t fHeightDetElem;         // height of the active volume bands composing the planes
+  static const Double_t fSupportExtMargin;      // minimum border size between the end of the support plane and the sensors
 
-  static const Int_t fNMaxDetElemPerPlane = 1000;
+  static const Int_t fNMaxDetElemPerPlane = AliMFTConstants::fNMaxDetElemPerPlane;
 
   TClonesArray *fMFTPlanes;