]>
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 | **************************************************************************/ | |
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 | ||
26 | class TList; | |
27 | class AliVParticle; | |
722347d8 | 28 | class AliMCParticle; |
29 | ||
30 | struct AliHFEpidObject{ | |
31 | typedef enum{ | |
32 | kESDanalysis, | |
33 | kAODanalysis | |
34 | }AnalysisType_t; | |
50685501 | 35 | AliVParticle *fRecTrack; // Reconstructed track |
36 | AliVParticle *fMCtrack; // Monte Carlo track | |
37 | UChar_t fAnalysisType; // Analysis Mode (ESD or AOD) | |
722347d8 | 38 | AliHFEpidObject():fRecTrack(NULL), fMCtrack(NULL), fAnalysisType(kESDanalysis){} |
39 | }; | |
809a4336 | 40 | |
41 | class AliHFEpidBase : public TNamed{ | |
809a4336 | 42 | public: |
43 | AliHFEpidBase(const Char_t *name); | |
44 | AliHFEpidBase(const AliHFEpidBase &c); | |
45 | AliHFEpidBase &operator=(const AliHFEpidBase &c); | |
46 | virtual ~AliHFEpidBase() {}; | |
47 | // Framework functions that have to be implemented by the detector PID classes | |
48 | virtual Bool_t InitializePID() = 0; | |
722347d8 | 49 | virtual Int_t IsSelected(AliHFEpidObject *track) = 0; |
809a4336 | 50 | virtual Bool_t HasQAhistos() const = 0; |
51 | ||
52 | Int_t GetDebugLevel() const { return fDebugLevel; }; | |
53 | Bool_t IsQAon() const { return TestBit(kQAon);}; | |
54 | Bool_t HasMCData() const { return TestBit(kHasMCData); }; | |
55 | ||
56 | void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel; }; | |
57 | inline void SetQAOn(TList *fQAlist); | |
58 | void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData,hasMCdata); }; | |
809a4336 | 59 | |
60 | protected: | |
61 | void Copy(TObject &ref) const; | |
62 | virtual void AddQAhistograms(TList *){}; | |
809a4336 | 63 | private: |
50685501 | 64 | enum{ |
65 | kQAon = BIT(14), | |
66 | kHasMCData = BIT(15) | |
67 | }; | |
68 | ||
722347d8 | 69 | Int_t fDebugLevel; // Debug Level |
809a4336 | 70 | |
722347d8 | 71 | ClassDef(AliHFEpidBase, 1) // Base class for detector Electron ID |
809a4336 | 72 | }; |
73 | ||
74 | //___________________________________________________________________ | |
75 | void AliHFEpidBase::SetQAOn(TList *qaList){ | |
76 | // | |
77 | // Initialize QA for Detector PID class | |
78 | // | |
79 | if(HasQAhistos()){ | |
80 | SetBit(kQAon, kTRUE); | |
81 | AddQAhistograms(qaList); | |
82 | } | |
83 | } | |
84 | #endif |