Changes done in order to remove compilation warnings
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinder.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSCLUSTERFINDER_H
2#define ALIITSCLUSTERFINDER_H
9de0700b 3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
b0f5e3fc 8
9////////////////////////////////////////////////
e8189707 10// ITS Cluster Finder Class //
04366a57 11// //
12// //
b0f5e3fc 13////////////////////////////////////////////////
14
e8189707 15#include <TObject.h>
16#include <TClonesArray.h>
17
18class AliITSMap;
19class AliITSresponse;
20class AliITSsegmentation;
21class AliITSRawCluster;
22class AliITS;
8ca6a9a5 23class AliITSdigit;
9355b256 24class AliITSRecPoint;
b0f5e3fc 25
9de0700b 26//----------------------------------------------------------------------
27class AliITSClusterFinder :public TObject{
aacedc3e 28 public:
28a570fd 29 AliITSClusterFinder(); // Default constructor
aacedc3e 30 // Standard Constructor
31 AliITSClusterFinder(AliITSsegmentation *seg, AliITSresponse *resp);
9de0700b 32 AliITSClusterFinder(AliITSsegmentation *seg, AliITSresponse *resp,
aacedc3e 33 TClonesArray *digits);// Standard+ Constructor
28a570fd 34 virtual ~AliITSClusterFinder(); // Destructor
9de0700b 35 //
aacedc3e 36 // Do the Reconstruction.
f8d9a5b8 37 virtual void FindRawClusters(Int_t mod=0); // Finds cluster of digits.
04366a57 38 //
aacedc3e 39 // Sets the debug flag for debugging output
40 void SetDebug(Int_t level=1){fDebug=level;}
41 // Clears the debug flag so no debugging output will be generated
42 void SetNoDebug(){fDebug=0;}
43 // Returns the debug flag value
5d766c75 44 Bool_t GetDebug(Int_t level=1)const {return fDebug>=level;}
aacedc3e 45 //
46 // Setters and Getters
47 // segmentation
48 virtual void SetSegmentation(AliITSsegmentation *segmentation) {
49 fSegmentation=segmentation;}
50 //Returns fSegmentation
51 virtual AliITSsegmentation* GetSegmentation()const{return fSegmentation;}
52 // Digit
53 virtual void SetDigits(TClonesArray *itsDigits) {// set digits
54 fDigits=itsDigits;fNdigits = fDigits->GetEntriesFast();}
55 virtual AliITSdigit* GetDigit(Int_t i){ // Returns ith digit
56 return (AliITSdigit*) fDigits->UncheckedAt(i);}
57 virtual TClonesArray* Digits(){return fDigits;}// Gets fDigits
58 virtual Int_t NDigits() const {return fNdigits;}// Get Number of Digits
59 // Response
60 //Return Response
61 virtual AliITSresponse* GetResponse()const{return fResponse;}
62 virtual void SetResponse(AliITSresponse *response) {// set response
63 fResponse=response;}
64 // clulsters
65 // Set fClusters up
66 virtual void SetClusters(TClonesArray *itsClusters){// set clusters
67 fClusters = itsClusters;fNRawClusters = fClusters->GetEntriesFast();}
68 // Get fCluters
69 virtual TClonesArray* Clusters(){return fClusters;}
70 // Get fCluter
71 virtual AliITSRawCluster* Cluster(Int_t i){
72 return (AliITSRawCluster*)(fClusters->At(i));}
73 // Returns the present number of enteries
74 virtual Int_t NClusters()const {return fClusters->GetEntriesFast();}
75 // returns fNRawClusters
76 virtual Int_t GetNRawClusters() const {return fNRawClusters;}
f8d9a5b8 77 // Determins if digit i has a neighbor and if so that neighor index is j.
aacedc3e 78 virtual void AddCluster(Int_t branch,AliITSRawCluster *c);
79 virtual void AddCluster(Int_t branch,AliITSRawCluster *c,
80 AliITSRecPoint &rp);
81 virtual void FillCluster(AliITSRawCluster *,Int_t) {}// fiil cluster
82 virtual void FillCluster(AliITSRawCluster *cluster) {// fill cluster
83 FillCluster(cluster,1);}
d2f55a22 84
aacedc3e 85 //
86 virtual void SetModule(Int_t module){fModule = module;}// Set module number
87 virtual Int_t GetModule()const{return fModule;}// Returns module number
88 //
89 // RecPoints
f8d9a5b8 90 // Given a cluster of digits, creates the nessesary RecPoint. May also
91 // do some peak separation.
ac74f489 92 virtual void CreateRecPoints(TObjArray *,Int_t){};
aacedc3e 93 // Others
94 virtual void SetMap(AliITSMap *m) {fMap=m;}// map
95 AliITSMap* Map(){return fMap;}// map
96 virtual Int_t GetNperMax() const {return fNperMax;}// returns fNperMax
97 // returns fDeclusterFlag
98 virtual Int_t GetDeclusterFlag()const{return fDeclusterFlag;}
99 // returns fClusterSize
100 virtual Int_t GetClusterSize() const {return fClusterSize;}
101 virtual Int_t GetNPeaks() const {return fNPeaks;}// returns fNPeaks
102 //
103 virtual Bool_t IsNeighbor(TObjArray *digs,Int_t i,Int_t j[]) const;
ac74f489 104 virtual void Decluster(AliITSRawCluster *) {}// Decluster
aacedc3e 105 // Set max. Number of cells per local cluster
106 virtual void SetNperMax(Int_t npermax=3) {fNperMax = npermax;}
107 //Decluster
108 virtual void SetDeclusterFlag(Int_t flag=1){fDeclusterFlag=flag;}
109 // Set max. cluster size ; bigger clusters will be rejected
110 virtual void SetClusterSize(Int_t clsize=3) {fClusterSize = clsize;}
111 virtual void CalibrateCOG() {}// Self Calibration of COG
112 virtual void CorrectCOG(){}// correct COG
113 virtual Bool_t Centered(AliITSRawCluster *) const {return kTRUE;}// cluster
114 //split by local maxima
115 virtual void SplitByLocalMaxima(AliITSRawCluster *){}
116 // IO functions
117 void Print(ostream *os); // Class ascii print function
118 void Read(istream *os); // Class ascii read function
d2f55a22 119 virtual void Print(Option_t *option="") const {TObject::Print(option);}
120 virtual Int_t Read(const char *name) {return TObject::Read(name);}
e8189707 121
04366a57 122 // Conversion from RecPoints to V2Clusters
123 void RecPoints2Clusters(const TClonesArray *points, Int_t idx, TClonesArray *clusters);
124
125
aacedc3e 126 protected:
04366a57 127 // methods
128 static void CheckLabels(Int_t lab[3]);
129 void Init();
130 AliITSClusterFinder(const AliITSClusterFinder &source); // copy constructor
131 // assignment operator
132 AliITSClusterFinder& operator=(const AliITSClusterFinder &source);
133 // data members
aacedc3e 134 Int_t fDebug; //! Debug flag/level
135 Int_t fModule; //! Module number to be reconstuctted
bf3f2830 136 TClonesArray *fDigits; //! digits
88cb7938 137 Int_t fNdigits; //! num of digits
138
9de0700b 139 AliITSresponse *fResponse; //! response
aacedc3e 140 AliITSsegmentation *fSegmentation; //! segmentation
141 TClonesArray *fClusters; //! Array of clusters
9de0700b 142 Int_t fNRawClusters; //! in case we split the cluster
143 // and want to keep track of
144 // the cluster which was splitted
145 AliITSMap *fMap; //! map
04366a57 146 AliITS *fITS; //! pointer to the ITS
9de0700b 147 Int_t fNperMax; //! NperMax
148 Int_t fDeclusterFlag; //! DeclusterFlag
149 Int_t fClusterSize; //! ClusterSize
150 Int_t fNPeaks; //! NPeaks
04366a57 151 // Data members needed to fill AliCluster objects
152 Float_t fYshift[2200]; // y-shifts of detector local coor. systems
153 Float_t fZshift[2200]; // z-shifts of detector local coor. systems
154 Int_t fNdet[2200]; // detector index
155 Int_t fNlayer[2200]; // detector layer
aacedc3e 156
04366a57 157 ClassDef(AliITSClusterFinder,4) //Class for clustering and reconstruction of space points
9de0700b 158};
aacedc3e 159// Input and output functions for standard C++ input/output.
160ostream &operator<<(ostream &os,AliITSClusterFinder &source);
161istream &operator>>(istream &os,AliITSClusterFinder &source);
b0f5e3fc 162#endif