]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/TRD/info/AliTRDpidInfo.h
Fixed compilation
[u/mrichter/AliRoot.git] / PWG1 / TRD / info / AliTRDpidInfo.h
CommitLineData
b91fdd71 1#ifndef ALITRDPIDINFO_H
2#define ALITRDPIDINFO_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7#ifndef ROOT_TObject
8#include "TObject.h"
9#endif
10
11class AliTRDpidInfo : public TObject
12{
13public:
a5a3321d 14 class AliTRDpidData {
15 public:
b91fdd71 16 AliTRDpidData();
17 virtual ~AliTRDpidData(){}
4826d5b1 18 Int_t Layer() const { return (fPLbin&0xf0)>>4;}
19 Int_t Momentum() const { return fPLbin&0xf;}
20
b91fdd71 21 UChar_t fPLbin; // momentum / layer bin
22 Float_t fdEdx[8]; // dEdx array
23 ClassDef(AliTRDpidData, 1) // PID layer representation
24 };
25
26 AliTRDpidInfo();
a5a3321d 27 AliTRDpidInfo(Int_t idx);
b91fdd71 28 virtual ~AliTRDpidInfo();
4826d5b1 29 inline AliTRDpidData const* GetData(Int_t itrklt) const;
30 AliTRDpidData const* GetDataInLayer(Int_t ily) const;
b91fdd71 31 Int_t GetNtracklets() const { return fNtracklets;}
4826d5b1 32 Char_t GetPID() const { return fPID;}
a5a3321d 33 void PushBack(Int_t ly, Int_t p, const Float_t *dedx);
b91fdd71 34 void Reset();
a5a3321d 35 void SetPID(Int_t idx) { fPID = idx;}
b91fdd71 36
37private:
4826d5b1 38 Char_t fPID; // reference PID
b91fdd71 39 Int_t fNtracklets; // number of tracklets
40 AliTRDpidData *fData; //[fNtracklets] PID data array
41
8c499dbf 42 AliTRDpidInfo(const AliTRDpidInfo& ref);
43 AliTRDpidInfo& operator=(const AliTRDpidInfo& ref);
b91fdd71 44
45 ClassDef(AliTRDpidInfo, 1) // track PID data representation
46};
47
4826d5b1 48
49//________________________________________________________________________
50AliTRDpidInfo::AliTRDpidData const* AliTRDpidInfo::GetData(Int_t itrklt) const
51{
52// Retrive itrklt-th tracklet independent of layer
53// For the layer specific getter see GetDataInLayer().
54
55 if(!fData) return NULL;
56 if(itrklt<0 || itrklt>=fNtracklets) return NULL;
57 return &fData[itrklt];
58}
59
b91fdd71 60#endif
61