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 */
6 /* $Id: AliTRDtrackletMCM.h 27496 2008-07-22 08:35:45Z cblume $ */
8 //-----------------------------------
10 // TRD tracklet word (as from FEE)
11 // only 32-bit of information + detector ID
13 //----------------------------------
15 #include "AliTRDtrackletBase.h"
16 #include "AliTRDgeometry.h"
17 #include "AliTRDpadPlane.h"
19 class AliTRDtrackletMCM : public AliTRDtrackletBase {
21 AliTRDtrackletMCM(UInt_t trackletWord = 0);
22 AliTRDtrackletMCM(UInt_t trackletWword, Int_t hcid);
23 AliTRDtrackletMCM(UInt_t trackletWword, Int_t hcid, Int_t rob, Int_t mcm);
24 AliTRDtrackletMCM(const AliTRDtrackletMCM &rhs);
27 // ----- Getters for contents of tracklet word -----
28 Int_t GetYbin() const;
30 Int_t GetZbin() const { return ((fTrackletWord >> 20) & 0xf); }
31 Int_t GetPID() const { return ((fTrackletWord >> 24) & 0xff); }
33 // ----- Getters for MCM-tracklet information -----
34 Int_t GetMCM() const { return fMCM; }
35 Int_t GetROB() const { return fROB; }
36 Int_t GetLabel() const { return fLabel; }
38 // ----- Getters for offline corresponding values -----
39 Bool_t CookPID() { return kFALSE; }
40 Double_t GetPID(Int_t /* is */) const { return 0; }
41 Int_t GetDetector() const { return fHCId / 2; }
42 Int_t GetHCId() const { return fHCId; }
43 Float_t GetdYdX() const { return (GetdY() * 140e-4 / 3.); }
44 Float_t GetX() const { return fGeo->GetTime0((fHCId % 12) / 2); }
45 Float_t GetY() const { return (GetYbin() * 160e-4); }
46 Float_t GetZ() const { return fGeo->GetPadPlane((fHCId % 12) / 2, (fHCId / 12) % 5)->GetRowPos( 4 * (fROB / 2) + fMCM / 4); }
48 Int_t GetQ0() const { return fQ0; }
49 Int_t GetQ1() const { return fQ1; }
50 Int_t GetNHits() const { return fNHits; }
51 Int_t GetNHits0() const { return fNHits0; }
52 Int_t GetNHits1() const { return fNHits1; }
54 UInt_t GetTrackletWord() const { return fTrackletWord; }
55 void SetTrackletWord(UInt_t trackletWord) { fTrackletWord = trackletWord; }
57 void SetDetector(Int_t id) { fHCId = 2 * id + (GetYbin() < 0 ? 0 : 1); }
58 void SetHCId(Int_t id) { fHCId = id; }
59 void SetMCM(Int_t mcm) { fMCM = mcm; }
60 void SetROB(Int_t rob) { fROB = rob; }
61 void SetLabel(Int_t label) { fLabel = label; }
62 void SetQ0(Int_t charge) { fQ0 = charge; }
63 void SetQ1(Int_t charge) { fQ1 = charge; }
64 void SetNHits(Int_t nhits) { fNHits = nhits; }
65 void SetNHits0(Int_t nhits) { fNHits0 = nhits; }
66 void SetNHits1(Int_t nhits) { fNHits1 = nhits; }
69 AliTRDgeometry *fGeo; //! TRD geometry
71 Int_t fHCId; // half-chamber ID (only transient)
72 UInt_t fTrackletWord; // tracklet word: PID | Z | deflection length | Y
74 Int_t fMCM; // MCM no. in which the tracklet was found
75 Int_t fROB; // ROB no. on which the tracklet was found
77 Int_t fQ0; // accumulated charge in the first time window
78 Int_t fQ1; // accumulated charge in the second time window
80 Int_t fNHits; // no. of contributing clusters
81 Int_t fNHits0; // no. of contributing clusters in window 0
82 Int_t fNHits1; // no. of contributing clusters in window 1
84 Int_t fLabel; // label for MC track
87 AliTRDtrackletMCM& operator=(const AliTRDtrackletMCM &rhs); // not implemented
89 ClassDef(AliTRDtrackletMCM, 2);