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