]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtrackletMCM.h
Bug fix for like sign V0s
[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"
4cc89512 16#include "AliTRDgeometry.h"
17#include "AliTRDpadPlane.h"
52c19022 18
19class AliTRDtrackletMCM : public AliTRDtrackletBase {
20 public:
4cc89512 21 AliTRDtrackletMCM(UInt_t trackletWord = 0);
22 AliTRDtrackletMCM(UInt_t trackletWword, Int_t hcid);
52c19022 23 AliTRDtrackletMCM(const AliTRDtrackletMCM &rhs);
24 ~AliTRDtrackletMCM();
25
26 // ----- Getters for contents of tracklet word -----
27 Int_t GetYbin() const;
28 Int_t GetdY() const;
29 Int_t GetZbin() const { return ((fTrackletWord >> 20) & 0xf); }
30 Int_t GetPID() const { return ((fTrackletWord >> 24) & 0xff); }
31
32 // ----- Getters for MCM-tracklet information -----
33 Int_t GetMCM() const { return fMCM; }
34 Int_t GetROB() const { return fROB; }
4cc89512 35 Int_t GetLabel() const { return fLabel; }
52c19022 36
37 // ----- Getters for offline corresponding values -----
38 Bool_t CookPID() { return kFALSE; }
39 Double_t GetPID(Int_t /* is */) const { return 0; }
40 Int_t GetDetector() const { return fHCId / 2; }
41 Int_t GetHCId() const { return fHCId; }
42 Float_t GetdYdX() const { return (GetdY() * 140e-4 / 3.); }
4cc89512 43 Float_t GetX() const { return fGeo->GetTime0((fHCId % 12) / 2); }
52c19022 44 Float_t GetY() const { return (GetYbin() * 160e-4); }
4cc89512 45 Float_t GetZ() const { return fGeo->GetPadPlane((fHCId % 12) / 2, (fHCId / 12) % 5)->GetRowPos( 4 * (fROB / 2) + fMCM / 4); }
52c19022 46
47 UInt_t GetTrackletWord() const { return fTrackletWord; }
48 void SetTrackletWord(UInt_t trackletWord) { fTrackletWord = trackletWord; }
49
50 void SetDetector(Int_t id) { fHCId = 2 * id + (GetYbin() < 0 ? 0 : 1); }
51 void SetHCId(Int_t id) { fHCId = id; }
52 void SetMCM(Int_t mcm) { fMCM = mcm; }
53 void SetROB(Int_t rob) { fROB = rob; }
4cc89512 54 void SetLabel(Int_t label) { fLabel = label; }
52c19022 55
56 protected:
4cc89512 57 AliTRDgeometry *fGeo; //! TRD geometry
58
52c19022 59 Int_t fHCId; // half-chamber ID (only transient)
60 UInt_t fTrackletWord; // tracklet word: PID | Z | deflection length | Y
61 // bits: 12 4 7 13
4cc89512 62 Int_t fMCM; // MCM no. in which the tracklet was found
63 Int_t fROB; // ROB no. on which the tracklet was found
64
65 Int_t fLabel; // label for MC track
66
67 private:
68 AliTRDtrackletMCM& operator=(const AliTRDtrackletMCM &rhs); // not implemented
52c19022 69
70 ClassDef(AliTRDtrackletMCM, 1);
71};
72
73#endif