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