]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSRawCluster.h
The last particle in event marked using SetHighWaterMark
[u/mrichter/AliRoot.git] / ITS / AliITSRawCluster.h
1 #ifndef ALIITSRAWCLUSTER_H
2 #define ALIITSRAWCLUSTER_H 
3
4
5 ////////////////////////////////////////////////////
6 //  Cluster classes for set:ITS                   //
7 ////////////////////////////////////////////////////
8
9 #include <TObject.h>
10
11
12 class AliITSRawCluster : public TObject {
13   
14   // this class is subject to changes !!! - info used for declustering 
15   // and  eventual debugging
16   
17 public:
18   
19   AliITSRawCluster() {
20     fMultiplicity=0;
21   }
22   
23   virtual ~AliITSRawCluster() {
24     // destructor
25   }
26   virtual Bool_t IsSortable() const {
27     // is sortable
28     return kTRUE;
29   }
30   
31 public:
32
33   Int_t       fMultiplicity;        // cluster multiplicity
34   
35   ClassDef(AliITSRawCluster,1)  // AliITSRawCluster class
36     };
37
38 //---------------------------------------------
39 class AliITSRawClusterSPD : public AliITSRawCluster {
40   
41   // these classes are subject to changes - keep them temporarily for
42   // compatibility !!!
43   
44 public:
45   
46   AliITSRawClusterSPD() {
47     // constructor
48     fX=fZ=fQ=0;
49     fZStart=fZStop=0;
50     fNClZ=fNClX=fXStart=fXStop=fXStartf=fXStopf=fZend=fNTracks=0;
51     fTracks[0]=fTracks[1]=fTracks[2]=-3;
52        }
53   
54   AliITSRawClusterSPD(Float_t clz,Float_t clx,Float_t Charge,Int_t ClusterSizeZ,Int_t ClusterSizeX,Int_t xstart,Int_t xstop,Int_t xstartf,Int_t xstopf,Float_t zstart,Float_t zstop,Int_t zend);
55   virtual ~AliITSRawClusterSPD() {
56     // destructor
57   }
58   
59   void Add(AliITSRawClusterSPD* clJ); 
60   Bool_t Brother(AliITSRawClusterSPD* cluster,Float_t dz,Float_t dx);
61   void PrintInfo();
62   // Getters
63   Float_t Q() const {
64     // Q
65     return fQ ;
66   }
67   Float_t Z() const {
68     // Z
69     return fZ ;
70   }
71   Float_t X() const {
72     // X
73     return fX ;
74   }
75   //  Float_t NclZ() const {
76   Int_t NclZ() const {
77     // NclZ
78     return fNClZ ;
79   }
80   //  Float_t NclX() const {
81   Int_t NclX() const {
82     // NclX
83     return fNClX ;
84   }
85   Int_t   XStart() const {
86     //XStart
87     return fXStart;
88   }
89   Int_t   XStop() const {
90     //XStop
91     return fXStop;
92   }
93   Int_t   XStartf() const {
94     //XStartf
95     return fXStartf;
96   }
97   Int_t   XStopf() const {
98     //XStopf
99     return fXStopf;
100   }
101   Float_t ZStart() const {
102     //ZStart
103     return fZStart;
104   }
105   Float_t ZStop() const {
106     //ZStop
107     return fZStop;
108   }
109   Int_t   Zend() const {
110     //Zend
111     return fZend;
112   }
113   Int_t   NTracks() const {
114     //NTracks
115     return fNTracks;
116   }
117
118   void GetTracks(Int_t &track0,Int_t &track1,Int_t &track2) const {
119                // returns tracks created a cluster
120
121               track0=fTracks[0];
122               track1=fTracks[1];
123               track2=fTracks[2];
124               return;
125   };
126  
127   void   SetTracks(Int_t track0, Int_t track1, Int_t track2) {
128     // set tracks in cluster (not more than three ones)
129     fTracks[0]=track0;
130     fTracks[1]=track1;
131     fTracks[2]=track2;
132   }
133   void   SetNTracks(Int_t ntracks) {
134     // set ntracks
135     fNTracks=ntracks;
136   }
137   
138 protected:
139   
140   Float_t   fX;                 // X of cluster
141   Float_t   fZ;                 // Z of cluster
142   Float_t   fQ;                 // Q of cluster
143   Int_t     fNClZ;        // Cluster size in Z direction
144   Int_t     fNClX;        // Cluster size in X direction
145   Int_t     fXStart;      // number of first pixel in cluster
146   Int_t     fXStop;       // number of last pixel in cluster
147   Int_t     fXStartf;     // number of first pixel in full cluster
148   Int_t     fXStopf;      // number of last pixel in full cluster
149   Float_t   fZStart;      // number of first pixel in cluster
150   Float_t   fZStop;       // number of last pixel in cluster
151   Int_t     fZend;        // Zend
152   Int_t     fNTracks;     // number of tracks created a cluster
153   Int_t     fTracks[3];   // tracks created a cluster
154   
155   ClassDef(AliITSRawClusterSPD,1)  // AliITSRawCluster class for SPD
156
157     };
158
159 //---------------------------------------------
160 class AliITSRawClusterSDD : public AliITSRawCluster {
161   
162 public:
163   
164   AliITSRawClusterSDD() {
165     // constructor
166     fX=fZ=fQ=0;
167     fWing=fNsamples=0;
168     fNanodes=1;
169     fAnode=fTime=fPeakAmplitude=0;
170     fPeakPosition=-1;
171     fMultiplicity=0;
172   }
173   
174   AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time,Float_t Charge,
175                       Float_t PeakAmplitude,Int_t PeakPosition,Float_t Asigma, Float_t Tsigma,Float_t DriftPath, Float_t AnodeOffset,Int_t Samples);
176   virtual ~AliITSRawClusterSDD() {
177     // destructor
178   }
179   
180   void Add(AliITSRawClusterSDD* clJ); 
181   Bool_t Brother(AliITSRawClusterSDD* cluster,Float_t dz,Float_t dx);
182   void PrintInfo();
183   // Setters
184   void SetX(Float_t x) {fX=x;}
185   void SetZ(Float_t z) {fZ=z;}
186   void SetQ(Float_t q) {fQ=q;}
187   void SetAnode(Float_t anode) {fAnode=anode;}
188   void SetTime(Float_t time) {fTime=time;}
189   void SetWing(Int_t wing) {fWing=wing;}
190   void SetNanodes(Int_t na) {fNanodes=na;}
191   void SetNsamples(Int_t ns) {fNsamples=ns;}
192   void SetPeakAmpl(Float_t ampl) {fPeakAmplitude=ampl;}
193   void SetPeakPos(Int_t pos) {fPeakPosition=pos;}
194   // Getters
195   Float_t X() const {
196     //X
197     return fX ;
198   }
199   Float_t Z() const {
200     //Z
201     return fZ ;
202   }
203   Float_t Q() const {
204     //Q
205     return fQ ;
206   }
207   Float_t A() const {
208     //A
209     return fAnode ;
210   }
211   Float_t T() const {
212     //T
213     return fTime ;
214   }
215   Float_t W() const {
216     //W
217     return fWing ;
218   }
219   Int_t Anodes() const {
220     //Anodes
221     return fNanodes ;
222   }
223   Int_t Samples() const {
224     //Samples
225     return fNsamples ;
226   }
227   Float_t PeakAmpl() const {
228     //PeakAmpl
229     return fPeakAmplitude ;
230   }
231   Int_t PeakPos() {return fPeakPosition;}
232   
233 public:
234   
235   Float_t   fX;                 // X of cluster
236   Float_t   fZ;                 // Z of cluster
237   Float_t   fQ;                 // Q of cluster
238   Int_t     fWing;              // Wing number
239   Float_t   fAnode;             // Anode number
240   Float_t   fTime;              // Drift Time
241   Float_t   fPeakAmplitude;     // Peak Amplitude
242   Int_t     fPeakPosition;      // index of digit corresponding to peak
243   Int_t     fNanodes;           // N of anodes used for the cluster
244   Int_t     fNsamples;          // N of samples used for the cluster
245   
246   ClassDef(AliITSRawClusterSDD,1)  // AliITSRawCluster class for SDD
247     };
248
249 //-----------------------------------------
250 class AliITSRawClusterSSD : public AliITSRawCluster {
251     
252 public:
253   
254   AliITSRawClusterSSD() {
255     fMultiplicityN=0;
256     fQErr=0; 
257     fStatus=-1;
258     /*
259       for (int k=0;k<100;k++) {
260          fIndexMapN[k]=-1;
261       }
262       fProbability=0;
263       fChi2N=-1;
264     */
265   }
266   AliITSRawClusterSSD(Float_t Prob,Int_t Sp,Int_t Sn);
267   virtual ~AliITSRawClusterSSD() {
268     // destructor
269   }
270   
271   Int_t  GetStatus() const {
272     // get status
273     return fStatus;
274   }
275   void   SetStatus(Int_t status) {
276     // set status
277     fStatus=status;
278   }
279
280    
281 public:
282   Int_t   fMultiplicityN;  // The number of N side strips involved 
283                            // in this point calculations
284   Float_t fQErr;           // Total charge error
285   Int_t   fStatus;         // Flag status : 0 - real point
286                            //               1 - ghost 
287                            //               2 - EIC ? 
288                            //               3 - single side 
289   
290   // Float_t fProbability;    // The probability that this is a "real" point
291   // Int_t  fIndexMapN[100];  // indices of digits for Nside - the corresponding
292                                 // info for P side is carried in the base class
293   // Float_t fChi2N;
294   ClassDef(AliITSRawClusterSSD,1)  // AliITSRawCluster class for SSD
295
296 };
297
298
299 #endif