1 #ifndef ALIHFEPIDBASE_H
2 #define ALIHFEPIDBASE_H
4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
22 // Base Class for Detector PID Objects
23 // For more information see the implementation file
35 class AliHFEpidQAmanager;
37 class AliHFEpidObject{
45 fAnalysisType(kESDanalysis),
50 AliHFEpidObject(const AliHFEpidObject &ref):
51 fkRecTrack(ref.fkRecTrack),
52 fAnalysisType(ref.fAnalysisType),
53 fAbInitioPID(ref.fAbInitioPID),
54 fCentrality(ref.fCentrality)
57 AliHFEpidObject &operator=(const AliHFEpidObject &ref);
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; }
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); }
73 const AliVParticle *fkRecTrack; // Reconstructed track
74 UChar_t fAnalysisType; // Analysis Mode (ESD or AOD)
75 Int_t fAbInitioPID; // AbInitio PID
76 Float_t fCentrality; // Centrality Information
79 class AliHFEpidBase : public TNamed{
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;
88 virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa = NULL) const = 0;
90 Bool_t HasMCData() const { return TestBit(kHasMCData); };
92 void SetESDpid(AliESDpid * const pid) { fESDpid = pid; }
93 void SetAODpid(AliAODpidUtil * const pid) { fAODpid = pid; }
94 void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData,hasMCdata); };
96 AliESDpid *GetESDpid() const { return fESDpid; };
99 AliESDpid *fESDpid; //! ESD PID object
100 AliAODpidUtil *fAODpid; //! AOD PID object
101 void Copy(TObject &ref) const;
108 ClassDef(AliHFEpidBase, 2) // Base class for detector Electron ID