]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSClusterFinder.h
update (alberto):
[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;
7d62fb64 22class AliITSgeom;
8ca6a9a5 23class AliITSdigit;
9355b256 24class AliITSRecPoint;
7d62fb64 25class AliITSDetTypeRec;
b0f5e3fc 26
9de0700b 27//----------------------------------------------------------------------
28class AliITSClusterFinder :public TObject{
aacedc3e 29 public:
28a570fd 30 AliITSClusterFinder(); // Default constructor
aacedc3e 31 // Standard Constructor
8ba39da9 32 AliITSClusterFinder(AliITSDetTypeRec* dettyp);
33 AliITSClusterFinder(AliITSDetTypeRec* dettyp,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 // Digit
46 virtual void SetDigits(TClonesArray *itsDigits) {// set digits
47 fDigits=itsDigits;fNdigits = fDigits->GetEntriesFast();}
48 virtual AliITSdigit* GetDigit(Int_t i){ // Returns ith digit
49 return (AliITSdigit*) fDigits->UncheckedAt(i);}
50 virtual TClonesArray* Digits(){return fDigits;}// Gets fDigits
51 virtual Int_t NDigits() const {return fNdigits;}// Get Number of Digits
aacedc3e 52 // clulsters
53 // Set fClusters up
54 virtual void SetClusters(TClonesArray *itsClusters){// set clusters
55 fClusters = itsClusters;fNRawClusters = fClusters->GetEntriesFast();}
56 // Get fCluters
57 virtual TClonesArray* Clusters(){return fClusters;}
58 // Get fCluter
59 virtual AliITSRawCluster* Cluster(Int_t i){
60 return (AliITSRawCluster*)(fClusters->At(i));}
61 // Returns the present number of enteries
62 virtual Int_t NClusters()const {return fClusters->GetEntriesFast();}
63 // returns fNRawClusters
64 virtual Int_t GetNRawClusters() const {return fNRawClusters;}
f8d9a5b8 65 // Determins if digit i has a neighbor and if so that neighor index is j.
aacedc3e 66 virtual void AddCluster(Int_t branch,AliITSRawCluster *c);
67 virtual void AddCluster(Int_t branch,AliITSRawCluster *c,
68 AliITSRecPoint &rp);
69 virtual void FillCluster(AliITSRawCluster *,Int_t) {}// fiil cluster
70 virtual void FillCluster(AliITSRawCluster *cluster) {// fill cluster
71 FillCluster(cluster,1);}
d2f55a22 72
aacedc3e 73 virtual void SetModule(Int_t module){fModule = module;}// Set module number
00a7cc50 74 virtual Int_t GetModule()const {return fModule;}// Returns module number
aacedc3e 75 //
76 // RecPoints
f8d9a5b8 77 // Given a cluster of digits, creates the nessesary RecPoint. May also
78 // do some peak separation.
ac74f489 79 virtual void CreateRecPoints(TObjArray *,Int_t){};
aacedc3e 80 // Others
81 virtual void SetMap(AliITSMap *m) {fMap=m;}// map
82 AliITSMap* Map(){return fMap;}// map
83 virtual Int_t GetNperMax() const {return fNperMax;}// returns fNperMax
84 // returns fDeclusterFlag
85 virtual Int_t GetDeclusterFlag()const{return fDeclusterFlag;}
86 // returns fClusterSize
87 virtual Int_t GetClusterSize() const {return fClusterSize;}
88 virtual Int_t GetNPeaks() const {return fNPeaks;}// returns fNPeaks
89 //
90 virtual Bool_t IsNeighbor(TObjArray *digs,Int_t i,Int_t j[]) const;
ac74f489 91 virtual void Decluster(AliITSRawCluster *) {}// Decluster
aacedc3e 92 // Set max. Number of cells per local cluster
93 virtual void SetNperMax(Int_t npermax=3) {fNperMax = npermax;}
94 //Decluster
95 virtual void SetDeclusterFlag(Int_t flag=1){fDeclusterFlag=flag;}
96 // Set max. cluster size ; bigger clusters will be rejected
97 virtual void SetClusterSize(Int_t clsize=3) {fClusterSize = clsize;}
98 virtual void CalibrateCOG() {}// Self Calibration of COG
99 virtual void CorrectCOG(){}// correct COG
100 virtual Bool_t Centered(AliITSRawCluster *) const {return kTRUE;}// cluster
101 //split by local maxima
102 virtual void SplitByLocalMaxima(AliITSRawCluster *){}
103 // IO functions
7d62fb64 104 void Print(ostream *os) const; // Class ascii print function
aacedc3e 105 void Read(istream *os); // Class ascii read function
d2f55a22 106 virtual void Print(Option_t *option="") const {TObject::Print(option);}
107 virtual Int_t Read(const char *name) {return TObject::Read(name);}
e8189707 108
7d62fb64 109 virtual void SetDetTypeRec(AliITSDetTypeRec* dtr) {fDetTypeRec=dtr;}
110 AliITSDetTypeRec* GetDetTypeRec() const {return fDetTypeRec;}
04366a57 111
7d62fb64 112 void InitGeometry();
04366a57 113
aacedc3e 114 protected:
04366a57 115 // methods
04366a57 116 AliITSClusterFinder(const AliITSClusterFinder &source); // copy constructor
117 // assignment operator
118 AliITSClusterFinder& operator=(const AliITSClusterFinder &source);
119 // data members
88cb7938 120
8ba39da9 121 Int_t fDebug; //! Debug flag/level
122 Int_t fModule; //! Module number to be reconstuctted
123 TClonesArray *fDigits; //! digits
124 Int_t fNdigits; //! num of digits
125
126 AliITSDetTypeRec* fDetTypeRec; //ITS object for reconstruction
127 TClonesArray *fClusters; //! Array of clusters
128 Int_t fNRawClusters; //! in case we split the cluster
129 // and want to keep track of
130 // the cluster which was splitted
9de0700b 131 AliITSMap *fMap; //! map
132 Int_t fNperMax; //! NperMax
133 Int_t fDeclusterFlag; //! DeclusterFlag
134 Int_t fClusterSize; //! ClusterSize
135 Int_t fNPeaks; //! NPeaks
04366a57 136 // Data members needed to fill AliCluster objects
137 Float_t fYshift[2200]; // y-shifts of detector local coor. systems
138 Float_t fZshift[2200]; // z-shifts of detector local coor. systems
139 Int_t fNdet[2200]; // detector index
140 Int_t fNlayer[2200]; // detector layer
aacedc3e 141
8ba39da9 142
143 ClassDef(AliITSClusterFinder,6) //Class for clustering and reconstruction of space points
9de0700b 144};
aacedc3e 145// Input and output functions for standard C++ input/output.
146ostream &operator<<(ostream &os,AliITSClusterFinder &source);
147istream &operator>>(istream &os,AliITSClusterFinder &source);
b0f5e3fc 148#endif