The present commit corresponds to an important change in the way the
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackletWord.h
CommitLineData
52c19022 1#ifndef ALITRDTRACKLETWORD_H
2#define ALITRDTRACKLETWORD_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDtrackletWord.h 27496 2008-07-22 08:35:45Z cblume $ */
7
8//-----------------------------------
9//
10// TRD tracklet word (as from FEE)
11// only 32-bit of information + detector ID
12//
13//----------------------------------
14
15#include "AliTRDtrackletBase.h"
16
17class AliTRDtrackletWord : public AliTRDtrackletBase {
18 public:
4cc89512 19 AliTRDtrackletWord(UInt_t trackletWord = 0);
20 AliTRDtrackletWord(UInt_t trackletWord, Int_t hcid);
52c19022 21 AliTRDtrackletWord(const AliTRDtrackletWord &rhs);
22 ~AliTRDtrackletWord();
23
24 // ----- Getters for contents of tracklet word -----
25 Int_t GetYbin() const;
26 Int_t GetdY() const;
27 Int_t GetZbin() const { return ((fTrackletWord >> 20) & 0xf); }
28 Int_t GetPID() const { return ((fTrackletWord >> 24) & 0xff); }
29
30 // ----- Getters for offline corresponding values -----
31 Bool_t CookPID() { return kFALSE; }
32 Double_t GetPID(Int_t /* is */) const { return 0; }
33 Int_t GetDetector() const { return fHCId / 2; }
34 Int_t GetHCId() const { return fHCId; }
35 Float_t GetdYdX() const { return (GetdY() * 140e-4 / 3.); }
36 Float_t GetX() const { return 0; }
37 Float_t GetY() const { return (GetYbin() * 160e-4); }
38 Float_t GetZ() const { return 0; }
39
40 UInt_t GetTrackletWord() const { return fTrackletWord; }
41 void SetTrackletWord(UInt_t trackletWord) { fTrackletWord = trackletWord; }
42
43 void SetDetector(Int_t id) { fHCId = 2 * id + (GetYbin() < 0 ? 0 : 1); }
44 void SetHCId(Int_t id) { fHCId = id; }
45
46 protected:
47 Int_t fHCId; //! half-chamber ID (only transient)
48 UInt_t fTrackletWord; // tracklet word: PID | Z | deflection length | Y
49 // bits: 12 4 7 13
50
4cc89512 51 private:
52 AliTRDtrackletWord& operator=(const AliTRDtrackletWord &rhs); // not implemented
53
52c19022 54 ClassDef(AliTRDtrackletWord, 1);
55};
56
57#endif