]>
Commit | Line | Data |
---|---|---|
46d29e70 | 1 | #ifndef ALITRDCLUSTER_H |
2 | #define ALITRDCLUSTER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
5443e65e | 8 | |
9 | #include "AliCluster.h" | |
46d29e70 | 10 | |
11 | class AliTRDrecPoint; | |
12 | ||
5443e65e | 13 | class AliTRDcluster : public AliCluster { |
46d29e70 | 14 | |
15 | public: | |
16 | ||
bdb68f8c | 17 | AliTRDcluster(); |
a2b90f83 | 18 | AliTRDcluster(const AliTRDcluster &c); |
19 | AliTRDcluster(const AliTRDrecPoint &p); | |
a2b90f83 | 20 | |
5443e65e | 21 | virtual void AddTrackIndex(Int_t *i); |
a2b90f83 | 22 | |
a2b90f83 | 23 | |
5443e65e | 24 | Int_t IsUsed() const { return (fQ < 0) ? 1 : 0; } |
b8f166bb | 25 | void Use(Int_t = 0) { fQ = -fQ; } |
5443e65e | 26 | |
27 | Bool_t From2pad() const { return TestBit(k2pad); } | |
28 | Bool_t From3pad() const { return TestBit(k3pad); } | |
29 | Bool_t From4pad() const { return TestBit(k4pad); } | |
30 | Bool_t From5pad() const { return TestBit(k5pad); } | |
31 | Bool_t FromLarge() const { return TestBit(kLarge);} | |
32 | Bool_t Isolated() const { return (TestBit(k2pad) || TestBit(k3pad)); } | |
abaf1f1d | 33 | |
d13cd67b | 34 | virtual void SetDetector(Int_t d) { fDetector = d; } |
5443e65e | 35 | void SetLocalTimeBin(Int_t t) { fTimeBin = t; } |
36 | void SetQ(Float_t q) { fQ = q; } | |
d13cd67b | 37 | virtual void SetX(Float_t x) { fX = x; } |
bdb68f8c | 38 | void SetSignals(Short_t *signals); |
3551db50 | 39 | |
d13cd67b | 40 | virtual Int_t GetDetector() const { return fDetector; } |
5443e65e | 41 | Int_t GetLocalTimeBin() const { return fTimeBin; } |
42 | Float_t GetQ() const { return fQ; } | |
d13cd67b | 43 | virtual Float_t GetX() const { return fX; } |
5443e65e | 44 | |
4f1c04d3 | 45 | void Set2pad() { SetBit(k2pad); fNPads=2; } |
46 | void Set3pad() { SetBit(k3pad); fNPads=3; } | |
47 | void Set4pad() { SetBit(k4pad); fNPads=4; } | |
48 | void Set5pad() { SetBit(k5pad); fNPads=5; } | |
49 | void SetLarge() { SetBit(kLarge);fNPads=6; } | |
50 | Int_t GetNPads() const {return fNPads;} | |
54d12e2f | 51 | void SetCenter(Float_t center){fCenter =center;} |
52 | Float_t GetCenter() const {return fCenter;} | |
bdb68f8c | 53 | Float_t GetSumS() const; |
54 | Float_t GetCenterS() const; | |
46d29e70 | 55 | protected: |
56 | ||
a2b90f83 | 57 | enum { |
db30bf0f | 58 | k2pad = 0x00000001, // 2 pad cluster |
59 | k3pad = 0x00000002, // 3 pad cluster | |
60 | k4pad = 0x00000004, // 4 pad cluster | |
61 | k5pad = 0x00000008, // 5 pad cluster | |
62 | kLarge = 0x00000016 // Large cluster | |
a2b90f83 | 63 | }; |
5443e65e | 64 | |
bdb68f8c | 65 | Int_t fDetector; // TRD detector number |
88719a08 | 66 | Float_t fX; // local (in this detector) x pos (first order proportional to time bin (depends on local drift velocity!), (x=0 corresponds timebin=0, thus x increases TOWARDS interaction point ) |
bdb68f8c | 67 | Char_t fTimeBin; // Time bin number within the detector |
68 | Float_t fQ; // amplitude | |
69 | Char_t fNPads; // number of pads in cluster | |
70 | Float_t fCenter; // center of the cluster relative to the pad | |
71 | Short_t fSignals[7]; // signals in the cluster | |
3551db50 | 72 | |
73 | ClassDef(AliTRDcluster,3) // Cluster for the TRD | |
46d29e70 | 74 | |
75 | }; | |
76 | ||
bdb68f8c | 77 | |
46d29e70 | 78 | #endif |