]>
Commit | Line | Data |
---|---|---|
27de2dfb | 1 | #ifndef ALIHFEPIDBASE_H |
2 | #define ALIHFEPIDBASE_H | |
3 | ||
809a4336 | 4 | /************************************************************************** |
5 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
6 | * * | |
7 | * Author: The ALICE Off-line Project. * | |
8 | * Contributors are mentioned in the code where appropriate. * | |
9 | * * | |
10 | * Permission to use, copy, modify and distribute this software and its * | |
11 | * documentation strictly for non-commercial purposes is hereby granted * | |
12 | * without fee, provided that the above copyright notice appears in all * | |
13 | * copies and that both the copyright notice and this permission notice * | |
14 | * appear in the supporting documentation. The authors make no claims * | |
15 | * about the suitability of this software for any purpose. It is * | |
16 | * provided "as is" without express or implied warranty. * | |
17 | **************************************************************************/ | |
27de2dfb | 18 | |
19 | /* $Id$ */ | |
20 | ||
50685501 | 21 | // |
22 | // Base Class for Detector PID Objects | |
23 | // For more information see the implementation file | |
24 | // | |
27de2dfb | 25 | |
809a4336 | 26 | #ifndef ROOT_TNamed |
27 | #include <TNamed.h> | |
28 | #endif | |
29 | ||
30 | class TList; | |
3a72645a | 31 | class AliAODpidUtil; |
faee3b18 | 32 | class AliESDpid; |
809a4336 | 33 | class AliVParticle; |
722347d8 | 34 | class AliMCParticle; |
3a72645a | 35 | class AliHFEpidQAmanager; |
722347d8 | 36 | |
3a72645a | 37 | class AliHFEpidObject{ |
38 | public: | |
722347d8 | 39 | typedef enum{ |
40 | kESDanalysis, | |
41 | kAODanalysis | |
42 | }AnalysisType_t; | |
3a72645a | 43 | AliHFEpidObject(): |
44 | fkRecTrack(NULL), | |
45 | fAnalysisType(kESDanalysis), | |
46 | fAbInitioPID(-1), | |
47 | fCentrality(99.) | |
48 | { | |
49 | } | |
50 | AliHFEpidObject(const AliHFEpidObject &ref): | |
51 | fkRecTrack(ref.fkRecTrack), | |
52 | fAnalysisType(ref.fAnalysisType), | |
53 | fAbInitioPID(ref.fAbInitioPID), | |
54 | fCentrality(ref.fCentrality) | |
55 | { | |
56 | } | |
57 | AliHFEpidObject &operator=(const AliHFEpidObject &ref); | |
58 | ~AliHFEpidObject(){}; | |
59 | ||
60 | void SetRecTrack(const AliVParticle * recTrack) {fkRecTrack = recTrack; } | |
61 | void SetMCTrack(const AliVParticle * mcTrack); | |
62 | void SetAnalysisType(AnalysisType_t type) { fAnalysisType = type; } | |
63 | void SetAbInitioPID(Int_t abInitioPID) { fAbInitioPID = abInitioPID; } | |
64 | void SetCentrality(Float_t centrality) { fCentrality = centrality; } | |
65 | ||
66 | const AliVParticle *GetRecTrack() const { return fkRecTrack; } | |
67 | Int_t GetAbInitioPID() const { return fAbInitioPID; } | |
68 | Float_t GetCentrality() const { return fCentrality; } | |
69 | Bool_t IsAODanalysis() const { return fAnalysisType == static_cast<UChar_t>(kAODanalysis); } | |
70 | Bool_t IsESDanalysis() const { return fAnalysisType == static_cast<UChar_t>(kESDanalysis); } | |
71 | ||
72 | private: | |
73 | const AliVParticle *fkRecTrack; // Reconstructed track | |
50685501 | 74 | UChar_t fAnalysisType; // Analysis Mode (ESD or AOD) |
3a72645a | 75 | Int_t fAbInitioPID; // AbInitio PID |
76 | Float_t fCentrality; // Centrality Information | |
722347d8 | 77 | }; |
809a4336 | 78 | |
79 | class AliHFEpidBase : public TNamed{ | |
809a4336 | 80 | public: |
faee3b18 | 81 | AliHFEpidBase(); |
809a4336 | 82 | AliHFEpidBase(const Char_t *name); |
83 | AliHFEpidBase(const AliHFEpidBase &c); | |
84 | AliHFEpidBase &operator=(const AliHFEpidBase &c); | |
85 | virtual ~AliHFEpidBase() {}; | |
86 | // Framework functions that have to be implemented by the detector PID classes | |
87 | virtual Bool_t InitializePID() = 0; | |
6555e2ad | 88 | virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa = NULL) const = 0; |
809a4336 | 89 | |
809a4336 | 90 | Bool_t HasMCData() const { return TestBit(kHasMCData); }; |
91 | ||
faee3b18 | 92 | void SetESDpid(AliESDpid * const pid) { fESDpid = pid; } |
3a72645a | 93 | void SetAODpid(AliAODpidUtil * const pid) { fAODpid = pid; } |
809a4336 | 94 | void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData,hasMCdata); }; |
809a4336 | 95 | |
6555e2ad | 96 | AliESDpid *GetESDpid() const { return fESDpid; }; |
97 | ||
809a4336 | 98 | protected: |
6555e2ad | 99 | AliESDpid *fESDpid; //! ESD PID object |
100 | AliAODpidUtil *fAODpid; //! AOD PID object | |
809a4336 | 101 | void Copy(TObject &ref) const; |
3a72645a | 102 | |
809a4336 | 103 | private: |
50685501 | 104 | enum{ |
3a72645a | 105 | kHasMCData = BIT(14) |
50685501 | 106 | }; |
107 | ||
3a72645a | 108 | ClassDef(AliHFEpidBase, 2) // Base class for detector Electron ID |
809a4336 | 109 | }; |
809a4336 | 110 | #endif |