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 */
8 ///////////////////////////////////////////////////////////////////////////////
12 ///////////////////////////////////////////////////////////////////////////////
14 #include "AliCluster.h"
18 class AliTRDcluster : public AliCluster {
23 AliTRDcluster(const AliTRDcluster &c);
24 AliTRDcluster(const AliTRDrecPoint &p);
26 virtual void AddTrackIndex(Int_t *i);
28 Int_t IsUsed() const { return (fQ < 0) ? 1 : 0; }
29 void Use(Int_t = 0) { fQ = -fQ; }
31 Bool_t From2pad() const { return TestBit(k2pad); }
32 Bool_t From3pad() const { return TestBit(k3pad); }
33 Bool_t From4pad() const { return TestBit(k4pad); }
34 Bool_t From5pad() const { return TestBit(k5pad); }
35 Bool_t FromLarge() const { return TestBit(kLarge); }
36 Bool_t Isolated() const { return (TestBit(k2pad) || TestBit(k3pad)); }
38 virtual void SetDetector(Int_t d) { fDetector = d; }
39 void SetLocalTimeBin(Int_t t) { fTimeBin = t; }
40 void SetQ(Float_t q) { fQ = q; }
41 virtual void SetX(Float_t x) { fX = x; }
42 void SetCenter(Float_t c) { fCenter = c; }
43 void SetSignals(Short_t *signals);
44 void Set2pad() { SetBit(k2pad); fNPads = 2; }
45 void Set3pad() { SetBit(k3pad); fNPads = 3; }
46 void Set4pad() { SetBit(k4pad); fNPads = 4; }
47 void Set5pad() { SetBit(k5pad); fNPads = 5; }
48 void SetLarge() { SetBit(kLarge); fNPads = 6; }
50 virtual Int_t GetDetector() const { return fDetector; }
51 Int_t GetLocalTimeBin() const { return fTimeBin; }
52 Float_t GetQ() const { return fQ; }
53 virtual Float_t GetX() const { return fX; }
54 Int_t GetNPads() const { return fNPads; }
55 Float_t GetCenter() const { return fCenter; }
56 Short_t *GetSignals() { return fSignals; }
57 Float_t GetSumS() const;
62 k2pad = 0x00000001, // 2 pad cluster
63 k3pad = 0x00000002, // 3 pad cluster
64 k4pad = 0x00000004, // 4 pad cluster
65 k5pad = 0x00000008, // 5 pad cluster
66 kLarge = 0x00000016 // Large cluster
69 Int_t fDetector; // TRD detector number
70 Float_t fX; // Local x position (first order proportional to time bin)
71 Char_t fTimeBin; // Time bin number within the detector
72 Float_t fQ; // Amplitude
73 Char_t fNPads; // Number of pads in cluster
74 Float_t fCenter; // Center of the cluster relative to the pad
75 Short_t fSignals[7]; // Signals in the cluster
77 ClassDef(AliTRDcluster,3) // Cluster for the TRD