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