]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGPP/TRD/info/AliTRDpidInfo.h
Moving PWG1 to PWGPP
[u/mrichter/AliRoot.git] / PWGPP / 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 */
61f6b45e 6////////////////////////////////////////////////////////////////////////////
7// //
8// TRD PID/Track summary info for performance //
9// //
10// Authors: //
11// Alexandru Bercuci <A.Bercuci@gsi.de> //
12// //
13////////////////////////////////////////////////////////////////////////////
b91fdd71 14
15#ifndef ROOT_TObject
16#include "TObject.h"
17#endif
18
19class AliTRDpidInfo : public TObject
20{
21public:
a5a3321d 22 class AliTRDpidData {
61f6b45e 23 friend class AliTRDpidInfo; // allow direct access
24 friend class AliTRDpidRefMakerLQ; // allow direct access
25 friend class AliTRDpidRefMakerNN; // allow direct access
a5a3321d 26 public:
b91fdd71 27 AliTRDpidData();
28 virtual ~AliTRDpidData(){}
4826d5b1 29 Int_t Layer() const { return (fPLbin&0xf0)>>4;}
30 Int_t Momentum() const { return fPLbin&0xf;}
61f6b45e 31 protected:
b91fdd71 32 UChar_t fPLbin; // momentum / layer bin
33 Float_t fdEdx[8]; // dEdx array
34 ClassDef(AliTRDpidData, 1) // PID layer representation
35 };
36
37 AliTRDpidInfo();
a5a3321d 38 AliTRDpidInfo(Int_t idx);
b91fdd71 39 virtual ~AliTRDpidInfo();
4826d5b1 40 inline AliTRDpidData const* GetData(Int_t itrklt) const;
41 AliTRDpidData const* GetDataInLayer(Int_t ily) const;
b91fdd71 42 Int_t GetNtracklets() const { return fNtracklets;}
4826d5b1 43 Char_t GetPID() const { return fPID;}
a5a3321d 44 void PushBack(Int_t ly, Int_t p, const Float_t *dedx);
b91fdd71 45 void Reset();
a5a3321d 46 void SetPID(Int_t idx) { fPID = idx;}
b91fdd71 47
48private:
4826d5b1 49 Char_t fPID; // reference PID
b91fdd71 50 Int_t fNtracklets; // number of tracklets
51 AliTRDpidData *fData; //[fNtracklets] PID data array
52
8c499dbf 53 AliTRDpidInfo(const AliTRDpidInfo& ref);
54 AliTRDpidInfo& operator=(const AliTRDpidInfo& ref);
b91fdd71 55
56 ClassDef(AliTRDpidInfo, 1) // track PID data representation
57};
58
4826d5b1 59
60//________________________________________________________________________
61AliTRDpidInfo::AliTRDpidData const* AliTRDpidInfo::GetData(Int_t itrklt) const
62{
63// Retrive itrklt-th tracklet independent of layer
64// For the layer specific getter see GetDataInLayer().
65
66 if(!fData) return NULL;
67 if(itrklt<0 || itrklt>=fNtracklets) return NULL;
68 return &fData[itrklt];
69}
70
b91fdd71 71#endif
72