Initial version, Compiler directive for selection of containers type: either STL...
[u/mrichter/AliRoot.git] / ITS / AliITSsegmentationSDD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSSEGMENTATIONSDD_H
2#define ALIITSSEGMENTATIONSDD_H
3
4
5#include "AliITSsegmentation.h"
b0f5e3fc 6
7// segmentation for SDD
8
1ca7869b 9class AliITSresponse;
b0f5e3fc 10class AliITSsegmentationSDD :
11public AliITSsegmentation {
12 public:
13
14
15 AliITSsegmentationSDD();
16 AliITSsegmentationSDD(AliITSgeom *gm, AliITSresponse *resp);
b0f5e3fc 17 virtual ~AliITSsegmentationSDD(){}
b0f5e3fc 18
19 // Set Detector Segmentation Parameters
20 //
21 // Detector size : x,z,y
ac74f489 22 virtual void SetDetSize(Float_t p1=35085.,Float_t p2=75264.,
23 Float_t p3=300.)
b0f5e3fc 24 {fDx=p1; fDz=p2; fDy=p3;}
25
26 // Cell size dz*dx
e8189707 27 virtual void SetPadSize(Float_t pitch=294., Float_t clock=40.)
b0f5e3fc 28 {fPitch=pitch;fTimeStep=1000./clock;}
29
30 // Maximum number of cells along the two coordinates z,x (anodes,samples)
e8189707 31 virtual void SetNPads(Int_t p1=256, Int_t p2=256)
b0f5e3fc 32 {fNanodes=2*p1;fNsamples=p2;}
5752a110 33 // Returns the maximum number of cells (digits) posible
3b9db792 34 virtual Int_t GetNPads(){return fNanodes*fNsamples;}
b0f5e3fc 35
36 // Transform from real local to cell coordinates
e8189707 37 virtual void GetPadIxz(Float_t x ,Float_t z ,Int_t &ix,Int_t &iz);
b0f5e3fc 38 // Transform from cell to real local coordinates
e8189707 39 virtual void GetPadCxz(Int_t ix,Int_t iz,Float_t &x ,Float_t &z );
b0f5e3fc 40 // Transform from real global to local coordinates
41 virtual void GetLocal(Int_t module,Float_t *g ,Float_t *l);
42 // Transform from real local to global coordinates
43 virtual void GetGlobal(Int_t module,Float_t *l ,Float_t *g);
e8189707 44 // Get anode and time bucket as floats - numbering from 0
45 virtual void GetPadTxz(Float_t &x ,Float_t &z);
5752a110 46 // Transformation from Geant cm detector center local coordinates
47 // to detector segmentation/cell coordiantes starting from (0,0).
48 virtual void LocalToDet(Float_t x,Float_t z,Int_t &ix,Int_t &iz);
49 // Transformation from detector segmentation/cell coordiantes starting
50 // from (0,0) to Geant cm detector center local coordinates.
51 virtual void DetToLocal(Int_t ix,Int_t iz,Float_t &x,Float_t &z);
b0f5e3fc 52 //
53 // Initialisation
54 virtual void Init();
55 //
56 // Get member data
57 //
58 // Detector type geometry
03898a57 59 AliITSgeom* Geometry() {return fGeom;}
b0f5e3fc 60 // Detector length
61 virtual Float_t Dx() {return fDx;}
5752a110 62 // Detector drift distance or detector active area half width
b0f5e3fc 63 virtual Float_t Dz() {return fDz;}
64 // Detector thickness
65 virtual Float_t Dy() {return fDy;}
66 // Cell size in x
ac74f489 67 virtual Float_t Dpx(Int_t) {return fTimeStep;}
b0f5e3fc 68 // Cell size in z
ac74f489 69 virtual Float_t Dpz(Int_t) {return fPitch;}
b0f5e3fc 70
71 // Maximum number of samples in x
72 virtual Int_t Npx() {return fNsamples;}
73 // Maximum number of anodes in z
74 virtual Int_t Npz() {return fNanodes;}
75
76 //
77 // Get next neighbours
ac74f489 78 virtual void Neighbours(Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10],
79 Int_t Zlist[10]);
b0f5e3fc 80
81 // Set cell position
ac74f489 82 virtual void SetPad(Int_t,Int_t) {}
b0f5e3fc 83 // Set hit position
ac74f489 84 virtual void SetHit(Float_t,Float_t) {}
b0f5e3fc 85
86 //
87 // Iterate over cells
88 // Initialiser
ac74f489 89 virtual void FirstPad(Float_t,Float_t,Float_t,Float_t){}
b0f5e3fc 90 // Stepper
e8189707 91 virtual void NextPad() {}
b0f5e3fc 92 // Condition
e8189707 93 virtual Int_t MorePads() {return 0;}
b0f5e3fc 94 //
95 // Current cell cursor during disintegration
96 // x-coordinate
97 virtual Int_t Ix() {return 0;}
98 // z-coordinate
99 virtual Int_t Iz() {return 0;}
100 //
101 // Signal Generation Condition during Stepping
ac74f489 102 virtual Int_t SigGenCond(Float_t,Float_t,Float_t){return 0;}
b0f5e3fc 103 // Initialise signal generation at coord (x,y,z)
ac74f489 104 virtual void SigGenInit(Float_t,Float_t,Float_t){}
b0f5e3fc 105 // Current integration limits
ac74f489 106 virtual void IntegrationLimits(Float_t&,Float_t&,Float_t&,Float_t&) {}
b0f5e3fc 107 // Test points for auto calibration
ac74f489 108 virtual void GiveTestPoints(Int_t &, Float_t *, Float_t *) {}
b0f5e3fc 109 // Function for systematic corrections
110 // Set the correction function
111 virtual void SetCorrFunc(Int_t, TF1*) {}
112 // Get the correction Function
113 virtual TF1* CorrFunc(Int_t) {return 0;}
f5d698b9 114 // Print Parameters
d8046757 115 virtual void Print(Option_t *opt="") const;
b0f5e3fc 116
03898a57 117 private:
118
119 AliITSsegmentationSDD(AliITSsegmentationSDD &source);
120 AliITSsegmentationSDD& operator=(AliITSsegmentationSDD &source);
121
b0f5e3fc 122 protected:
123
5752a110 124 Int_t fNsamples; // Number of time samples in x
125 Int_t fNanodes; // Summed # of anodes in the two det halves (z)
126 Float_t fPitch; // Anode pitch - microns
127 Float_t fTimeStep; // Sampling time - ns
128 Float_t fDx; // Drift distance of the 1/2detector (x axis)-microns
129 Float_t fDz; // Length of half-detector (z axis) - microns
130 Float_t fDy; // Full thickness of the detector (y axis) - microns
03898a57 131 Float_t fDriftSpeed; // Drift speed
b0f5e3fc 132
e8189707 133 AliITSgeom *fGeom; //! pointer to the geometry class
b0f5e3fc 134 TF1* fCorr; // correction function
135
03898a57 136 ClassDef(AliITSsegmentationSDD,2) // SDD segmentation
b0f5e3fc 137};
138
139#endif