]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSsegmentation.h
- introduce IsBad() virtual method in AliITSCalibration to check the status
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentation.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSSEGMENTATION_H
2#define ALIITSSEGMENTATION_H
3
b0f5e3fc 4#include <TObject.h>
f6b6d58e 5#include "AliLog.h"
6#include "AliITSgeom.h"
b0f5e3fc 7
1ca7869b 8class TF1;
b0f5e3fc 9//----------------------------------------------
10//
11// ITS segmentation virtual base class
12//
13class AliITSsegmentation :
14public TObject {
15 public:
55d2c544 16 AliITSsegmentation();
f6b6d58e 17 AliITSsegmentation(AliITSgeom *geom);
55d2c544 18 AliITSsegmentation(const AliITSsegmentation& source);
19 virtual ~AliITSsegmentation();
20 AliITSsegmentation& operator=(const AliITSsegmentation &source);
b0f5e3fc 21 // Set Detector Segmentation Parameters
22 //
23 // Detector size
55d2c544 24 virtual void SetDetSize(Float_t p1,Float_t p2,Float_t p3)
25 {fDx=p1; fDz=p2; fDy=p3;}
b0f5e3fc 26 // Cell size
55d2c544 27 virtual void SetPadSize(Float_t,Float_t) {MayNotUse("SetPadSize");}
b0f5e3fc 28 // Maximum number of cells along the two coordinates
55d2c544 29 virtual void SetNPads(Int_t,Int_t) = 0;
5752a110 30 // Returns the maximum number of cells (digits) posible
55d2c544 31 virtual Int_t GetNPads() const = 0;
a244dbf6 32 // Set layer
55d2c544 33 virtual void SetLayer(Int_t) {MayNotUse("SetLayer");}
d24bc9d6 34 // Number of Chips
35 virtual Int_t GetNumberOfChips() const {MayNotUse("GetNumberOfChips"); return 0;}
36 // Chip number from local coordinates
37 virtual Int_t GetChipFromLocal(Float_t, Float_t) const {MayNotUse("GetChipFromLocal"); return 0;}
38 // Chip number from channel number
39 virtual Int_t GetChipFromChannel(Int_t, Int_t) const {MayNotUse("GetChipFromChannel"); return 0;}
40
b0f5e3fc 41 // Transform from real to cell coordinates
55d2c544 42 virtual void GetPadIxz(Float_t,Float_t,Int_t &,Int_t &) const = 0;
b0f5e3fc 43 // Transform from cell to real coordinates
55d2c544 44 virtual void GetPadCxz(Int_t,Int_t,Float_t &,Float_t &) const = 0;
d24bc9d6 45 // Local transformation of real local coordinates -
46 virtual void GetPadTxz(Float_t &,Float_t &) const = 0;
47 // Transformation from Geant cm detector center local coordinates
48 // to detector segmentation/cell coordiantes starting from (0,0).
49 virtual Bool_t LocalToDet(Float_t,Float_t,Int_t &,Int_t &) const = 0;
50 // Transformation from detector segmentation/cell coordiantes starting
51 // from (0,0) to Geant cm detector center local coordinates.
52 virtual void DetToLocal(Int_t,Int_t,Float_t &,Float_t &) const = 0;
f6b6d58e 53
b0f5e3fc 54 // Transform from real global to local coordinates
d24bc9d6 55 void GetLocal(Int_t module,Float_t *g ,Float_t *l, AliITSgeom *geom) const {
56 if(!geom) {
f6b6d58e 57 AliFatal("Pointer to ITS geometry class (AliITSgeom) is null\n");
58 return;
59 }
d24bc9d6 60 geom->GtoL(module,g,l);
f6b6d58e 61 }
b0f5e3fc 62 // Transform from real local to global coordinates
d24bc9d6 63 void GetGlobal(Int_t module,Float_t *l ,Float_t *g, AliITSgeom *geom) const {
64 if(!geom) {
f6b6d58e 65 AliFatal("Pointer to ITS geometry class (AliITSgeom) is null\n");
66 }
d24bc9d6 67 geom->LtoG(module,l,g);
f6b6d58e 68 }
d24bc9d6 69
b0f5e3fc 70 // Initialisation
55d2c544 71 virtual void Init() = 0;
b0f5e3fc 72 //
73 // Get member data
74 //
b0f5e3fc 75 // Detector length
55d2c544 76 virtual Float_t Dx() const {return fDx;}
b0f5e3fc 77 // Detector width
55d2c544 78 virtual Float_t Dz() const {return fDz;}
b0f5e3fc 79 // Detector thickness
a3da6340 80 virtual Float_t Dy() const {return fDy;}
b0f5e3fc 81 // Cell size in x
55d2c544 82 virtual Float_t Dpx(Int_t) const = 0;
b0f5e3fc 83 // Cell size in z
55d2c544 84 virtual Float_t Dpz(Int_t) const = 0;
b0f5e3fc 85 // Maximum number of Cells in x
55d2c544 86 virtual Int_t Npx() const = 0;
b0f5e3fc 87 // Maximum number of Cells in z
55d2c544 88 virtual Int_t Npz() const = 0;
a244dbf6 89 // Layer
55d2c544 90 virtual Int_t GetLayer() const {MayNotUse("GetLayer"); return 0;}
b0f5e3fc 91 // Set hit position
55d2c544 92 // virtual void SetHit(Float_t, Float_t) {}
93 // angles
94 virtual void Angles(Float_t& /* p */, Float_t& /* n */) const
95 {MayNotUse("Angles");}
96
b0f5e3fc 97 //
98 // Get next neighbours
55d2c544 99 virtual void Neighbours(Int_t,Int_t,Int_t*,Int_t[10],Int_t[10]) const
100 {MayNotUse("Neighbours");}
101
b0f5e3fc 102 // Function for systematic corrections
103 // Set the correction function
55d2c544 104 virtual void SetCorrFunc(TF1* fc) {fCorr = fc;}
b0f5e3fc 105 // Get the correction Function
55d2c544 106 virtual TF1* CorrFunc() {return fCorr;}
107 // Print Default parameters
108 virtual void PrintDefaultParameters() const = 0;
109
110 protected:
111
112 virtual void Copy(TObject &obj) const;
113
114 Float_t fDx; //SPD: Full width of the detector (x axis)- microns
115 //SDD: Drift distance of the 1/2detector (x axis)-microns
116 //SSD: Full length of the detector (x axis)- microns
117 Float_t fDz; //SPD: Full length of the detector (z axis)- microns
118 //SDD: Length of half-detector (z axis) - microns
119 //SSD: Full width of the detector (z axis)- microns
120 Float_t fDy; //SPD: Full thickness of the detector (y axis) -um
121 //SDD: Full thickness of the detector (y axis) - microns
122 //SSD: Full thickness of the detector (y axis) -um
55d2c544 123 TF1* fCorr; // correction function
124
125 ClassDef(AliITSsegmentation,2) //Segmentation virtual base class
b0f5e3fc 126};
b0f5e3fc 127#endif