Add Jochens GTU simulation code
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackletMCM.h
CommitLineData
52c19022 1#ifndef ALITRDTRACKLETMCM_H
2#define ALITRDTRACKLETMCM_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliTRDtrackletMCM.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 AliTRDtrackletMCM : public AliTRDtrackletBase {
18 public:
19 AliTRDtrackletMCM(UInt_t tracklet_word = 0);
20 AliTRDtrackletMCM(UInt_t tracklet_word, Int_t hcid);
21 AliTRDtrackletMCM(const AliTRDtrackletMCM &rhs);
22 ~AliTRDtrackletMCM();
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 MCM-tracklet information -----
31 Int_t GetMCM() const { return fMCM; }
32 Int_t GetROB() const { return fROB; }
33
34 // ----- Getters for offline corresponding values -----
35 Bool_t CookPID() { return kFALSE; }
36 Double_t GetPID(Int_t /* is */) const { return 0; }
37 Int_t GetDetector() const { return fHCId / 2; }
38 Int_t GetHCId() const { return fHCId; }
39 Float_t GetdYdX() const { return (GetdY() * 140e-4 / 3.); }
40 Float_t GetX() const { return 0; }
41 Float_t GetY() const { return (GetYbin() * 160e-4); }
42 Float_t GetZ() const { return 0; }
43
44 UInt_t GetTrackletWord() const { return fTrackletWord; }
45 void SetTrackletWord(UInt_t trackletWord) { fTrackletWord = trackletWord; }
46
47 void SetDetector(Int_t id) { fHCId = 2 * id + (GetYbin() < 0 ? 0 : 1); }
48 void SetHCId(Int_t id) { fHCId = id; }
49 void SetMCM(Int_t mcm) { fMCM = mcm; }
50 void SetROB(Int_t rob) { fROB = rob; }
51
52 protected:
53 Int_t fHCId; // half-chamber ID (only transient)
54 UInt_t fTrackletWord; // tracklet word: PID | Z | deflection length | Y
55 // bits: 12 4 7 13
56 Int_t fMCM;
57 Int_t fROB;
58
59 ClassDef(AliTRDtrackletMCM, 1);
60};
61
62#endif