]>
Commit | Line | Data |
---|---|---|
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 | ||
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // TRD cluster // | |
11 | // // | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include "AliCluster.h" | |
15 | ||
16 | class AliTRDcluster : public AliCluster { | |
17 | ||
18 | public: | |
19 | ||
20 | enum { kInChamber = BIT(1) | |
21 | , kShared = BIT(2) | |
22 | }; | |
23 | enum { kMaskedLeft = BIT(0) | |
24 | , kMaskedCenter= BIT(1) | |
25 | , kMaskedRight = BIT(2) | |
26 | }; | |
27 | ||
28 | AliTRDcluster(); | |
29 | AliTRDcluster(Int_t det, Float_t q, Float_t *pos, Float_t *sig | |
30 | , Int_t *tracks, Char_t npads, Short_t *signals | |
31 | , UChar_t col, UChar_t row, UChar_t time | |
32 | , Char_t timebin, Float_t center, UShort_t volid); | |
33 | AliTRDcluster(const AliTRDcluster &c); | |
34 | virtual ~AliTRDcluster() {}; | |
35 | ||
36 | virtual void AddTrackIndex(Int_t *i); | |
37 | ||
38 | Bool_t IsInChamber() const { return TestBit(kInChamber); } | |
39 | Bool_t IsMasked() const { return fClusterMasking ? kTRUE : kFALSE; } | |
40 | Bool_t IsShared() const { return TestBit(kShared); } | |
41 | Bool_t IsUsed() const { return (fQ < 0) ? kTRUE : kFALSE; } | |
42 | ||
43 | UChar_t GetPadMaskedPosition() const { return fClusterMasking & 7; } | |
44 | UChar_t GetPadMaskedStatus() const { return fClusterMasking >> 3; } | |
45 | Int_t GetDetector() const { return fDetector; } | |
46 | Int_t GetLocalTimeBin() const { return fLocalTimeBin; } | |
47 | Float_t GetQ() const { return fQ; } | |
48 | Int_t GetNPads() const { return fNPads; } | |
49 | Float_t GetCenter() const { return fCenter; } | |
50 | Int_t GetPadCol() const { return fPadCol; } | |
51 | Int_t GetPadRow() const { return fPadRow; } | |
52 | Int_t GetPadTime() const { return fPadTime; } | |
53 | Short_t *GetSignals() { return fSignals; } | |
54 | Float_t GetSumS() const; | |
55 | ||
56 | void SetLocalTimeBin(Char_t t) { fLocalTimeBin = t; } | |
57 | void SetInChamber(Bool_t in = kTRUE) { SetBit(kInChamber,in); } | |
58 | void SetPadMaskedPosition(UChar_t position); | |
59 | void SetPadMaskedStatus(UChar_t status); | |
60 | void SetShared(Bool_t sh = kTRUE) { SetBit(kShared,sh); } | |
61 | void Use(Int_t = 0) { fQ = -fQ; } | |
62 | ||
63 | protected: | |
64 | UChar_t fPadCol; // Central pad number in column direction | |
65 | UChar_t fPadRow; // Central pad number in row direction | |
66 | UChar_t fPadTime; // Uncalibrated time bin number | |
67 | Char_t fLocalTimeBin; // T0-calibrated time bin number | |
68 | UChar_t fNPads; // Number of pads in cluster | |
69 | UChar_t fClusterMasking; // Bit field containing cluster status information; | |
70 | Short_t fDetector; // TRD detector number | |
71 | Short_t fSignals[7]; // Signals in the cluster | |
72 | Float_t fQ; // Amplitude | |
73 | Float_t fCenter; // Center of the cluster relative to the pad | |
74 | ||
75 | ClassDef(AliTRDcluster, 6) // Cluster for the TRD | |
76 | }; | |
77 | #endif |