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