]>
Commit | Line | Data |
---|---|---|
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 | **************************************************************************/ | |
15 | #ifndef __ALIHFEPIDBASE_H__ | |
16 | #define __ALIHFEPIDBASE_H__ | |
17 | ||
18 | #ifndef ROOT_TNamed | |
19 | #include <TNamed.h> | |
20 | #endif | |
21 | ||
22 | class TList; | |
23 | class AliVParticle; | |
24 | class AliMCEvent; | |
25 | ||
26 | class AliHFEpidBase : public TNamed{ | |
27 | enum{ | |
28 | kQAon = BIT(14), | |
29 | kHasMCData = BIT(15) | |
30 | }; | |
31 | public: | |
32 | AliHFEpidBase(const Char_t *name); | |
33 | AliHFEpidBase(const AliHFEpidBase &c); | |
34 | AliHFEpidBase &operator=(const AliHFEpidBase &c); | |
35 | virtual ~AliHFEpidBase() {}; | |
36 | // Framework functions that have to be implemented by the detector PID classes | |
37 | virtual Bool_t InitializePID() = 0; | |
38 | virtual Int_t IsSelected(AliVParticle *track) = 0; | |
39 | virtual Bool_t HasQAhistos() const = 0; | |
40 | ||
41 | Int_t GetDebugLevel() const { return fDebugLevel; }; | |
42 | Bool_t IsQAon() const { return TestBit(kQAon);}; | |
43 | Bool_t HasMCData() const { return TestBit(kHasMCData); }; | |
44 | ||
45 | void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel; }; | |
46 | inline void SetQAOn(TList *fQAlist); | |
47 | void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData,hasMCdata); }; | |
48 | void SetMCEvent(AliMCEvent *mcEvent) { fMCEvent = mcEvent; }; | |
49 | ||
50 | protected: | |
51 | void Copy(TObject &ref) const; | |
52 | virtual void AddQAhistograms(TList *){}; | |
53 | Int_t GetPdgCode(AliVParticle *track); | |
54 | private: | |
55 | AliMCEvent *fMCEvent; //! Monte Carlo Event | |
56 | Int_t fDebugLevel; // Debug Level | |
57 | ||
58 | ClassDef(AliHFEpidBase, 1) // Base class for detector Electron ID | |
59 | }; | |
60 | ||
61 | //___________________________________________________________________ | |
62 | void AliHFEpidBase::SetQAOn(TList *qaList){ | |
63 | // | |
64 | // Initialize QA for Detector PID class | |
65 | // | |
66 | if(HasQAhistos()){ | |
67 | SetBit(kQAon, kTRUE); | |
68 | AddQAhistograms(qaList); | |
69 | } | |
70 | } | |
71 | #endif |