Coding convention compliant version (by Raffaele)
[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
5843e420 14#include "AliCluster.h"
46d29e70 15
5443e65e 16class AliTRDcluster : public AliCluster {
5843e420 17public:
46d29e70 18
5843e420 19 enum ETRDclusterStatus {
20 kInChamber = BIT(16) // Out of fiducial volume of chamber (signal tails)
21 ,kFivePad = BIT(17) // Deconvoluted clusters
22 };
23 enum ETRDclusterMask {
24 kMaskedLeft = 0
25 ,kMaskedCenter = 1
26 ,kMaskedRight = 2
f5375dcb 27 };
0e09df31 28
bdb68f8c 29 AliTRDcluster();
203967fc 30 AliTRDcluster(
31 Int_t det, Float_t q, Float_t *pos, Float_t *sig,
32 Int_t *tracks, Char_t npads, Short_t *signals,
33 UChar_t col, UChar_t row, UChar_t time,
34 Char_t timebin, Float_t center, UShort_t volid);
a2b90f83 35 AliTRDcluster(const AliTRDcluster &c);
acc49af9 36 virtual ~AliTRDcluster() {};
a2b90f83 37
6d50f529 38 virtual void AddTrackIndex(Int_t *i);
203967fc 39 void Clear(Option_t *o="");
40
41 Bool_t IsEqual(const TObject *otherCluster) const;
42 Bool_t IsInChamber() const { return TestBit(kInChamber); }
43 Bool_t IsMasked() const { return fClusterMasking ? kTRUE : kFALSE; }
de777ccb 44 Bool_t IsShared() const { return IsClusterShared();}
45 Bool_t IsUsed() const { return IsClusterUsed(); }
5843e420 46 Bool_t IsFivePad() const { return TestBit(kFivePad);}
a2b90f83 47
203967fc 48 UChar_t GetPadMaskedPosition() const { return fClusterMasking & 7; }
49 UChar_t GetPadMaskedStatus() const { return fClusterMasking >> 3; }
50 Int_t GetDetector() const { return fDetector; }
51 Int_t GetLocalTimeBin() const { return fLocalTimeBin; }
52 Float_t GetQ() const { return fQ; }
53 Int_t GetNPads() const { return fNPads; }
54 Float_t GetCenter() const { return fCenter; }
55 Int_t GetPadCol() const { return fPadCol; }
56 Int_t GetPadRow() const { return fPadRow; }
57 Int_t GetPadTime() const { return fPadTime; }
58 Short_t *GetSignals() { return fSignals; }
59 Float_t GetSumS() const;
538f6383 60 static Float_t GetXcorr(Int_t tb);
61 static Float_t GetYcorr(Int_t ly, Float_t y);
834ac2c9 62 Float_t GetXloc(Double_t t0, Double_t vd, Double_t *const q=0x0, Double_t *const xq=0x0, Double_t z = 0.2);
63 Float_t GetYloc(Double_t s2, Double_t W, Double_t xd, Double_t wt, Double_t *const y1=0x0, Double_t *const y2=0x0);
5843e420 64
203967fc 65 void Print(Option_t* o="") const;
f5375dcb 66
203967fc 67 void SetLocalTimeBin(Char_t t) { fLocalTimeBin = t; }
68 void SetInChamber(Bool_t in = kTRUE) { SetBit(kInChamber,in); }
69 void SetPadMaskedPosition(UChar_t position);
70 void SetPadMaskedStatus(UChar_t status);
bee2b41e 71 void SetPadCol(UChar_t inPadCol){ fPadCol = inPadCol;}
72 void SetPadRow(UChar_t inPadRow){ fPadRow = inPadRow;}
73 void SetPadTime(UChar_t inPadTime){ fPadTime = inPadTime;}
74 void SetDetector(Short_t inDetector){ fDetector = inDetector;}
75 void SetQ(Float_t inQ){ fQ = inQ;}
76 void SetClusterMasking(UChar_t inClusterMasking){ fClusterMasking = inClusterMasking;}
de777ccb 77 void SetShared(Bool_t sh = kTRUE) { SetBit(AliCluster::kShared,sh); }
78 void Use(Int_t = 0) { SetBit(AliCluster::kUsed, kTRUE); }
5843e420 79 void SetFivePad(Bool_t b = kTRUE) { SetBit(kFivePad,b);}
af26ce80 80
5843e420 81protected:
82 UChar_t fPadCol; // Central pad number in column direction
83 UChar_t fPadRow; // Central pad number in row direction
84 UChar_t fPadTime; // Uncalibrated time bin number
85 Char_t fLocalTimeBin; // T0-calibrated time bin number
86 UChar_t fNPads; // Number of pads in cluster
87 UChar_t fClusterMasking; // Bit field containing cluster status information;
88 Short_t fDetector; // TRD detector number
89 Short_t fSignals[7]; // Signals in the cluster
90 Float_t fQ; // Amplitude
91 Float_t fCenter; // Center of the cluster relative to the pad
0e09df31 92
5843e420 93 ClassDef(AliTRDcluster, 6) // Cluster for the TRD
46d29e70 94};
46d29e70 95#endif