]>
Commit | Line | Data |
---|---|---|
b0f5e3fc | 1 | #ifndef ALIITSSEGMENTATIONSDD_H |
2 | #define ALIITSSEGMENTATIONSDD_H | |
3 | ||
4 | ||
5 | #include "AliITSsegmentation.h" | |
b0f5e3fc | 6 | |
fcf95fc7 | 7 | ////////////////////////////////////////////////////// |
8 | // Segmentation class for SDD // | |
9 | // // | |
10 | ////////////////////////////////////////////////////// | |
b0f5e3fc | 11 | class AliITSsegmentationSDD : |
12 | public AliITSsegmentation { | |
13 | public: | |
14 | ||
15 | ||
c9649d1e | 16 | AliITSsegmentationSDD(Option_t *opt=""); |
55d2c544 | 17 | AliITSsegmentationSDD(const AliITSsegmentationSDD &source); |
18 | AliITSsegmentationSDD& operator=(const AliITSsegmentationSDD &source); | |
b0f5e3fc | 19 | virtual ~AliITSsegmentationSDD(){} |
b0f5e3fc | 20 | |
21 | // Set Detector Segmentation Parameters | |
22 | // | |
023ae34b | 23 | // get the drift speed used for this segmentation |
24 | virtual Float_t GetDriftSpeed()const{return fDriftSpeed;} | |
25 | // Set the drift speed needed for this segmentation | |
4952f440 | 26 | virtual void SetDriftSpeed(Float_t ds){ |
27 | fDriftSpeed = ds; | |
28 | fSetDriftSpeed=kTRUE; | |
29 | } | |
b0f5e3fc | 30 | // Cell size dz*dx |
55d2c544 | 31 | virtual void SetPadSize(Float_t pitch, Float_t clock) |
b0f5e3fc | 32 | {fPitch=pitch;fTimeStep=1000./clock;} |
33 | ||
34 | // Maximum number of cells along the two coordinates z,x (anodes,samples) | |
55d2c544 | 35 | virtual void SetNPads(Int_t p1, Int_t p2) |
b0f5e3fc | 36 | {fNanodes=2*p1;fNsamples=p2;} |
5752a110 | 37 | // Returns the maximum number of cells (digits) posible |
55d2c544 | 38 | virtual Int_t GetNPads() const {return fNanodes*fNsamples;} |
b0f5e3fc | 39 | |
40 | // Transform from real local to cell coordinates | |
55d2c544 | 41 | virtual void GetPadIxz(Float_t x ,Float_t z ,Int_t &ix,Int_t &iz) const; |
b0f5e3fc | 42 | // Transform from cell to real local coordinates |
f6b6d58e | 43 | virtual void GetPadCxz(Int_t ix,Int_t iz,Float_t &x ,Float_t &z ) const; |
44 | ||
e8189707 | 45 | // Get anode and time bucket as floats - numbering from 0 |
55d2c544 | 46 | virtual void GetPadTxz(Float_t &x ,Float_t &z) const; |
5752a110 | 47 | // Transformation from Geant cm detector center local coordinates |
48 | // to detector segmentation/cell coordiantes starting from (0,0). | |
aacedc3e | 49 | virtual Bool_t LocalToDet(Float_t x,Float_t z,Int_t &ix,Int_t &iz) const; |
5752a110 | 50 | // Transformation from detector segmentation/cell coordiantes starting |
51 | // from (0,0) to Geant cm detector center local coordinates. | |
55d2c544 | 52 | virtual void DetToLocal(Int_t ix,Int_t iz,Float_t &x,Float_t &z) const; |
b0f5e3fc | 53 | // |
f6b6d58e | 54 | virtual Float_t GetAnodeFromLocal(Float_t x,Float_t z) const; |
c9a38d3d | 55 | virtual Int_t GetSideFromLocalX(Float_t xloc) const { |
56 | if(xloc>0) return 0; // left side (channel 0) positive xloc | |
57 | else return 1; // right side (channel 1) negative xloc | |
58 | } | |
f6b6d58e | 59 | virtual Float_t GetLocalZFromAnode(Int_t nAnode) const; |
60 | virtual Float_t GetLocalZFromAnode(Float_t zAnode) const; | |
61 | virtual Float_t GetDriftTimeFromTb(Int_t tb) const { | |
62 | Float_t xtb=(Float_t)tb+0.5; | |
63 | return GetDriftTimeFromTb(xtb); | |
64 | } | |
65 | virtual Float_t GetDriftTimeFromTb(Float_t xtb) const { | |
66 | return xtb*fTimeStep; | |
67 | } | |
d24bc9d6 | 68 | virtual Int_t GetNumberOfChips() const { |
69 | return fgkNchipsPerHybrid; | |
70 | } | |
23197852 | 71 | virtual Int_t GetMaximumChipIndex() const{ |
72 | return fgkNchipsPerHybrid*2-1; | |
73 | } | |
d24bc9d6 | 74 | virtual Int_t GetChipFromLocal(Float_t xloc, Float_t zloc) const; |
23197852 | 75 | virtual Int_t GetChipsInLocalWindow(Int_t* array, Float_t zmin, Float_t zmax, Float_t xmin, Float_t xmax) const; |
76 | ||
77 | ||
d24bc9d6 | 78 | virtual Int_t GetChipFromChannel(Int_t ix, Int_t iz) const; |
79 | ||
b0f5e3fc | 80 | // Initialisation |
81 | virtual void Init(); | |
fa4f0f62 | 82 | |
b0f5e3fc | 83 | // |
84 | // Get member data | |
85 | // | |
b0f5e3fc | 86 | // Cell size in x |
55d2c544 | 87 | virtual Float_t Dpx(Int_t) const {return fTimeStep;} |
b0f5e3fc | 88 | // Cell size in z |
55d2c544 | 89 | virtual Float_t Dpz(Int_t) const {return fPitch;} |
b0f5e3fc | 90 | |
91 | // Maximum number of samples in x | |
55d2c544 | 92 | virtual Int_t Npx() const {return fNsamples;} |
b0f5e3fc | 93 | // Maximum number of anodes in z |
55d2c544 | 94 | virtual Int_t Npz() const {return fNanodes;} |
4952f440 | 95 | // Maximum number of anodes in z |
96 | virtual Int_t NpzHalf() const {return fNanodes/2;} | |
b0f5e3fc | 97 | |
98 | // | |
99 | // Get next neighbours | |
ac74f489 | 100 | virtual void Neighbours(Int_t iX,Int_t iZ,Int_t* Nlist,Int_t Xlist[10], |
55d2c544 | 101 | Int_t Zlist[10]) const; |
b0f5e3fc | 102 | |
b0f5e3fc | 103 | // Current integration limits |
ac74f489 | 104 | virtual void IntegrationLimits(Float_t&,Float_t&,Float_t&,Float_t&) {} |
f5d698b9 | 105 | // Print Parameters |
d8046757 | 106 | virtual void Print(Option_t *opt="") const; |
55d2c544 | 107 | // Print default parameters (static const data members, if any) |
108 | virtual void PrintDefaultParameters() const; | |
03898a57 | 109 | |
d6cc2277 | 110 | static Int_t GetNAnodesPerHybrid() { return fgkHalfNanodesDefault;} |
b0f5e3fc | 111 | protected: |
112 | ||
55d2c544 | 113 | virtual void Copy(TObject &obj) const; |
114 | ||
5752a110 | 115 | Int_t fNsamples; // Number of time samples in x |
116 | Int_t fNanodes; // Summed # of anodes in the two det halves (z) | |
117 | Float_t fPitch; // Anode pitch - microns | |
118 | Float_t fTimeStep; // Sampling time - ns | |
03898a57 | 119 | Float_t fDriftSpeed; // Drift speed |
4952f440 | 120 | Bool_t fSetDriftSpeed; // flag for usage of drift speed |
55d2c544 | 121 | static const Float_t fgkDxDefault; // Default value for fDx |
122 | static const Float_t fgkDzDefault; // Default value for fDz | |
123 | static const Float_t fgkDyDefault; // Default value for fDy | |
124 | static const Float_t fgkPitchDefault; //Default value for fPitch | |
125 | static const Float_t fgkClockDefault; //Default value for the clock freq. | |
126 | static const Int_t fgkHalfNanodesDefault; //Default value for fNanodes/2 | |
127 | static const Int_t fgkNsamplesDefault; //Default value for fNsamples | |
d24bc9d6 | 128 | static const Int_t fgkNchipsPerHybrid; //number of chips per hybrid |
129 | static const Int_t fgkNanodesPerChip; //number of chips per hybrid | |
c9a38d3d | 130 | static const Float_t fgkCm2Micron; // conversion from cm to micron |
131 | static const Float_t fgkMicron2Cm; // conversion from micron to cm | |
d24bc9d6 | 132 | ClassDef(AliITSsegmentationSDD,6) // SDD segmentation |
b0f5e3fc | 133 | }; |
134 | ||
135 | #endif |