]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSClusterFinder.h
Allowing modularity of the MUON geometry during the generation (geant) phase with...
[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);}
84 virtual void FindCluster(Int_t,Int_t,AliITSRawCluster *) {}// find cluster
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
e8189707 119
04366a57 120 // Conversion from RecPoints to V2Clusters
121 void RecPoints2Clusters(const TClonesArray *points, Int_t idx, TClonesArray *clusters);
122
123
aacedc3e 124 protected:
04366a57 125 // methods
126 static void CheckLabels(Int_t lab[3]);
127 void Init();
128 AliITSClusterFinder(const AliITSClusterFinder &source); // copy constructor
129 // assignment operator
130 AliITSClusterFinder& operator=(const AliITSClusterFinder &source);
131 // data members
aacedc3e 132 Int_t fDebug; //! Debug flag/level
133 Int_t fModule; //! Module number to be reconstuctted
bf3f2830 134 TClonesArray *fDigits; //! digits
88cb7938 135 Int_t fNdigits; //! num of digits
136
9de0700b 137 AliITSresponse *fResponse; //! response
aacedc3e 138 AliITSsegmentation *fSegmentation; //! segmentation
139 TClonesArray *fClusters; //! Array of clusters
9de0700b 140 Int_t fNRawClusters; //! in case we split the cluster
141 // and want to keep track of
142 // the cluster which was splitted
143 AliITSMap *fMap; //! map
04366a57 144 AliITS *fITS; //! pointer to the ITS
9de0700b 145 Int_t fNperMax; //! NperMax
146 Int_t fDeclusterFlag; //! DeclusterFlag
147 Int_t fClusterSize; //! ClusterSize
148 Int_t fNPeaks; //! NPeaks
04366a57 149 // Data members needed to fill AliCluster objects
150 Float_t fYshift[2200]; // y-shifts of detector local coor. systems
151 Float_t fZshift[2200]; // z-shifts of detector local coor. systems
152 Int_t fNdet[2200]; // detector index
153 Int_t fNlayer[2200]; // detector layer
aacedc3e 154
04366a57 155 ClassDef(AliITSClusterFinder,4) //Class for clustering and reconstruction of space points
9de0700b 156};
aacedc3e 157// Input and output functions for standard C++ input/output.
158ostream &operator<<(ostream &os,AliITSClusterFinder &source);
159istream &operator>>(istream &os,AliITSClusterFinder &source);
b0f5e3fc 160#endif