Change wrong directory data name from EmcGainPedestals to Data
[u/mrichter/AliRoot.git] / TRD / AliTRDcluster.h
CommitLineData
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
6d50f529 8///////////////////////////////////////////////////////////////////////////////
9// //
10// TRD cluster //
11// //
12///////////////////////////////////////////////////////////////////////////////
5443e65e 13
14#include "AliCluster.h"
46d29e70 15
5443e65e 16class AliTRDcluster : public AliCluster {
46d29e70 17
18 public:
19
bdb68f8c 20 AliTRDcluster();
a2b90f83 21 AliTRDcluster(const AliTRDcluster &c);
a2b90f83 22
6d50f529 23 virtual void AddTrackIndex(Int_t *i);
a2b90f83 24
6d50f529 25 Int_t IsUsed() const { return (fQ < 0) ? 1 : 0; }
26 void Use(Int_t = 0) { fQ = -fQ; }
5443e65e 27
6d50f529 28 Bool_t From2pad() const { return TestBit(k2pad); }
29 Bool_t From3pad() const { return TestBit(k3pad); }
30 Bool_t From4pad() const { return TestBit(k4pad); }
31 Bool_t From5pad() const { return TestBit(k5pad); }
32 Bool_t FromLarge() const { return TestBit(kLarge); }
33 Bool_t Isolated() const { return (TestBit(k2pad) || TestBit(k3pad)); }
abaf1f1d 34
6d50f529 35 virtual void SetDetector(Int_t d) { fDetector = d; }
36 void SetLocalTimeBin(Int_t t) { fTimeBin = t; }
37 void SetQ(Float_t q) { fQ = q; }
6d50f529 38 void SetCenter(Float_t c) { fCenter = c; }
524fc8fa 39 void SetPad(UChar_t pad) { fPad = pad; }
6d50f529 40 void SetSignals(Short_t *signals);
41 void Set2pad() { SetBit(k2pad); fNPads = 2; }
42 void Set3pad() { SetBit(k3pad); fNPads = 3; }
43 void Set4pad() { SetBit(k4pad); fNPads = 4; }
44 void Set5pad() { SetBit(k5pad); fNPads = 5; }
45 void SetLarge() { SetBit(kLarge); fNPads = 6; }
3551db50 46
6d50f529 47 virtual Int_t GetDetector() const { return fDetector; }
48 Int_t GetLocalTimeBin() const { return fTimeBin; }
49 Float_t GetQ() const { return fQ; }
6d50f529 50 Int_t GetNPads() const { return fNPads; }
51 Float_t GetCenter() const { return fCenter; }
524fc8fa 52 Int_t GetPad() const { return fPad; }
77566f2a 53 Short_t *GetSignals() { return fSignals; }
6d50f529 54 Float_t GetSumS() const;
5443e65e 55
46d29e70 56 protected:
57
6d50f529 58 enum {
59 k2pad = 0x00000001, // 2 pad cluster
60 k3pad = 0x00000002, // 3 pad cluster
61 k4pad = 0x00000004, // 4 pad cluster
62 k5pad = 0x00000008, // 5 pad cluster
63 kLarge = 0x00000016 // Large cluster
64 };
5443e65e 65
6d50f529 66 Int_t fDetector; // TRD detector number
6d50f529 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
524fc8fa 71 UChar_t fPad; // Central pad number
6d50f529 72 Short_t fSignals[7]; // Signals in the cluster
3551db50 73
524fc8fa 74 ClassDef(AliTRDcluster,4) // Cluster for the TRD
46d29e70 75
76};
77
bdb68f8c 78
46d29e70 79#endif