new SDD preprocessor + removal of eff C++ warning (base) - E. Crescio
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderV2.h
CommitLineData
04366a57 1#ifndef ALIITSCLUSTERFINDERV2_H
2#define ALIITSCLUSTERFINDERV2_H
3////////////////////////////////////////////////////////////////////
4// ITS clusterer V2 //
5// //
6// //
7// //
8// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch //
9////////////////////////////////////////////////////////////////////
10#include "AliITSClusterFinder.h"
11
00a7cc50 12class AliITSRecPoint;
04366a57 13class AliRawReader;
7d62fb64 14class AliITSgeom;
04366a57 15
16class AliITSClusterFinderV2 : public AliITSClusterFinder {
17public:
8ba39da9 18 AliITSClusterFinderV2(AliITSDetTypeRec* dettyp);
04366a57 19 virtual ~AliITSClusterFinderV2() {;}
20
21 void SetEvent(Int_t event) { fEvent=event; }
7d62fb64 22 virtual void RawdataToClusters(AliRawReader* /*rawReader*/,TClonesArray** /*clusters*/) {
04366a57 23 Warning("RawdataToClusters","Method not implemented in this class ");}
7d62fb64 24
04366a57 25protected:
26 class Ali1Dcluster {
27 public:
28 void SetY(Float_t y) {fY=y;}
29 void SetQ(Float_t q) {fQ=q;}
30 void SetNd(Int_t n) {fNd=n;}
31 void SetLabels(Int_t *lab) {fLab[0]=lab[0];fLab[1]=lab[1];fLab[2]=lab[2];}
32 Float_t GetY() const {return fY;}
33 Float_t GetQ() const {return fQ;}
34 Int_t GetNd()const {return fNd;}
35 Int_t GetLabel(Int_t lab) const { return fLab[lab]; }
36 protected:
37 Float_t fY; //cluster position
38 Float_t fQ; //cluster charge
39 Int_t fNd; //number of digits
40 Int_t fLab[3]; //track label
41 };
42 class AliBin {
43 public:
e56160b8 44 AliBin():fIndex(0),fMask(0xFFFFFFFE),fQ(0){}
04366a57 45 void SetIndex(UInt_t idx) {fIndex=idx;}
46 void SetQ(UShort_t q) {fQ=q;}
47 void SetMask(UInt_t m) {fMask=m;}
48
49 void Use() {fMask&=0xFFFFFFFE;}
50 Bool_t IsNotUsed() const {return (fMask&1);}
51 Bool_t IsUsed() const {return !(IsNotUsed());}
52
53 UInt_t GetIndex() const {return fIndex;}
54 UShort_t GetQ() const {return fQ;}
55 UInt_t GetMask() const {return fMask;}
56 protected:
57 UInt_t fIndex; //digit index
58 UInt_t fMask; //peak mask
59 UShort_t fQ; //signal
60 };
00a7cc50 61 void MakeCluster(Int_t k,Int_t max,AliBin *bins,UInt_t m,AliITSRecPoint &c);
04366a57 62 static Bool_t IsMaximum(Int_t k, Int_t max, const AliBin *bins);
63 static void FindPeaks(Int_t k,Int_t m,AliBin*b,Int_t*idx,UInt_t*msk,Int_t&n);
64 static void MarkPeak(Int_t k, Int_t max, AliBin *bins, UInt_t m);
04366a57 65 static void FindCluster(Int_t k,Int_t maxz,AliBin *bins,Int_t &n,Int_t *idx);
66
67protected:
68 AliITSClusterFinderV2(const AliITSClusterFinderV2 &source); // copy constructor
69 // assignment operator
70 AliITSClusterFinderV2& operator=(const AliITSClusterFinderV2 &source);
71
72 static void CheckLabels2(Int_t lab[10]);
73 static void AddLabel(Int_t lab[10], Int_t label);
74
75 Int_t fNModules; // total number of modules
76 Int_t fEvent; //event number
77
78 ClassDef(AliITSClusterFinderV2,1) // ITS cluster finder V2
79};
80// Input and output functions for standard C++ input/output.
81ostream &operator<<(ostream &os,AliITSClusterFinderV2 &source);
82istream &operator>>(istream &os,AliITSClusterFinderV2 &source);
83#endif