]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSclusterSSD.h
Inheritance from TObject. Automatic streamers.
[u/mrichter/AliRoot.git] / ITS / AliITSclusterSSD.h
1 #ifndef ALIITSCLUSTERSSD_H
2 #define ALIITSCLUSTERSSD_H
3
4 #include "TObject.h"
5 #include "TArrayI.h"
6 #include "TClonesArray.h"
7
8 class AliITSdigitSSD;
9
10 class AliITSclusterSSD : public TObject
11 {
12
13
14 //Piotr Krzysztof Skowronski
15 //Warsaw University of Technology
16 //skowron@if.pw.edu.pl
17 //
18 // Describes set of neighbouring digits on one side of detector,
19 // that are supposed to be generated by one particle.
20 // includes information about clusters on other side that it crosses with
21
22 public:
23
24   AliITSclusterSSD();    //Default Constructor
25   virtual ~AliITSclusterSSD();
26   AliITSclusterSSD(Int_t ndigits, Int_t *DigitIndexes, TObjArray *Digits, Bool_t side);         
27   AliITSclusterSSD(const AliITSclusterSSD &source); 
28   AliITSclusterSSD&  operator=( const AliITSclusterSSD & source);
29                 
30   void            AddDigit(Int_t index){
31                                        // //adds on digit
32                                        (*fDigitsIndex)[fNDigits++]=index;
33                                        } 
34   TObjArray*      GetPointer2Digits(){
35                                      // comment to be written 
36                                      return fDigits;
37                                      }
38
39 //  TArrayI*        GetDigitsIndexes(Int_t &ndigits);   
40 //  void            SetDigitIndex(Int_t index);
41
42   void            SetPointer2Digits(TObjArray *digits){
43                                                       // comment to be written
44                                                       fDigits = digits;
45                                                       }
46   Int_t           GetNumOfDigits(){
47                                   //Returns number of digits that creates this cluster
48                                   return fNDigits;
49                                   }
50   Int_t           GetDigitSignal(Int_t digit);      
51
52   
53   AliITSdigitSSD *GetDigit(Int_t idx) {
54                                       // comment to be written
55                                       return (AliITSdigitSSD *)((*fDigits)[GetDigitIndex(idx)]);
56                                       }
57   Int_t           GetDigitIndex (Int_t digit) {
58                                               // comment to be written
59                                               return (*fDigitsIndex)[digit];
60                                               }
61   Int_t           GetDigitStripNo(Int_t digit);
62   Int_t           GetFirstDigitStripNo(){
63                                         // comment to be written
64                                         return GetDigitStripNo(0);
65                                         }
66   Int_t           GetLastDigitStripNo(){
67                                        // comment to be written
68                                        return GetDigitStripNo(fNDigits-1);
69                                        }
70   Int_t           SplitCluster(Int_t where,Int_t *outdigits); //splits this one side cluster for two
71   void            AddCross(Int_t clIndex);  //Add index of cluster that it crosses with
72   Int_t           GetCross(Int_t crIndex);  //return index of cluster that it crosses with
73   Int_t           GetCrossNo() {
74                                // Returns number of crosses
75                                return fNCrosses;
76                                } 
77   void            DelCross(Int_t index);
78   
79   Double_t        GetPosition();
80   Double_t        GetPositionError();
81   Float_t         GetTotalSignal();  
82   Float_t         GetTotalSignalError();
83   void            CutTotalSignal(Float_t sx) {
84     // comment to be written
85     if (fTotalSignal>sx) fTotalSignal-=sx;
86   }
87   
88   Bool_t          GetRightNeighbour() const {
89                                             // comment to be written
90                                             return fRightNeighbour;
91                                             }
92   Bool_t          GetLeftNeighbour() const {
93                                            // comment to be written
94                                            return fLeftNeighbour;
95                                            }
96   void            SetRightNeighbour(Bool_t nei) {
97                                            // comment to be written
98                                            fRightNeighbour=nei;
99                                            }
100   void            SetLeftNeighbour(Bool_t nei) {
101                                            // comment to be written
102                                            fLeftNeighbour=nei;
103                                            }
104
105   void   SetNTracks(Int_t ntracks) {
106     // set ntracks
107     fNTracks=ntracks;
108   }
109
110
111   Int_t          GetNTracks(){
112                            // comment to be written
113                            return fNTracks;
114                            }
115
116   Bool_t          GetSide(){
117                            // comment to be written
118                            return fSide;
119                            }
120   Int_t           CheckSatus(Int_t *tracks){
121                                            //check if digits comes from the same track
122                                            return 0;
123                                            }  
124   Int_t          *GetTracks(Int_t &nt);
125   void            Consume(){
126                            // comment
127                            fConsumed = kTRUE;
128                            }
129   Bool_t          IsConsumed() const{ 
130                                     // comment
131                                     return fConsumed;
132                                     }
133   Bool_t          IsCrossingWith(Int_t idx);
134   
135 protected:
136
137   Bool_t          fSide;           //True if P
138   TObjArray      *fDigits;         //Pointer to List of Digitsbelonging to AliITS
139                 
140   Int_t           fNDigits;        //Number of digits that make up that cluster 
141   TArrayI        *fDigitsIndex;    // Digit indexes in fDigits array
142                 
143   Int_t           fNCrosses;       //Number of crossed one side clusters on the other siede 
144                                    //   (max 8 : it is not aribtrary)
145   TArrayI        *fCrossedClusterIndexes; //Array of inedexes of crossed clusters (in TClonesArray)
146                                           // not in TArrayI in package
147
148   Bool_t          fLeftNeighbour;   // comment to be written
149   Bool_t          fRightNeighbour;  // comment to be written 
150   Bool_t          fConsumed;        // comment to be written
151   
152   Float_t         fTotalSignal;     // comment to be written
153   Int_t           fTrack[10];       // comment to be written
154   Int_t           fNTracks;         // comment to be written
155
156   Double_t        CentrOfGravity();
157   Double_t        EtaAlgorithm();
158
159 private:
160                                                                 
161 /*************************************/
162 /*************************************/                                         
163   ClassDef(AliITSclusterSSD,1)          // Cluster class for reconstructing SSD
164 };
165
166 #endif