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