]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEpid.h
Update of the HFE package
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEpid.h
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 //
16 // Steering class for electron identification
17 // Combines detector PID objects
18 // For more information please check the implementation file
19 //
20 #ifndef ALIHFEPID_H
21 #define ALIHFEPID_H
22
23 #ifndef ROOT_TObject
24 #include <TObject.h>
25 #endif
26
27 #ifndef ALIHFEPIDBASE_H
28 #include "AliHFEpidBase.h"
29 #endif
30
31 class AliESDtrack;
32 class AliVParticle;
33 class AliMCParticle;
34
35 class TList;
36
37 class AliHFEpid : public TObject{
38  public:
39     AliHFEpid();
40     AliHFEpid(const AliHFEpid &c);
41     AliHFEpid &operator=(const AliHFEpid &c);
42     ~AliHFEpid();
43     
44     Bool_t InitializePID(TString argument);
45     Bool_t IsSelected(AliHFEpidObject *track);
46
47     Bool_t IsQAOn() const { return TestBit(kIsQAOn); };
48     Bool_t HasMCData() const { return TestBit(kHasMCData); };
49     void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel; }
50     void SetQAOn();
51     void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData, hasMCdata); };
52     TList *GetQAhistograms() const { return fQAlist; };
53
54     inline void SetTPCBetheBlochParameters(Double_t *pars);
55   protected:
56     Bool_t MakePidTpcTof(AliHFEpidObject *track);
57     Bool_t MakePidTpcTrd(AliHFEpidObject *track);
58     void MakePlotsItsTpc(AliHFEpidObject *track);
59
60     // Stratgies
61     void InitStrategy1();
62     void InitStrategy2();
63     void InitStrategy3();
64     void InitStrategy4();
65     void InitStrategy5();
66     void InitStrategy6();
67     Bool_t IdentifyStrategy1(AliHFEpidObject *track);
68     Bool_t IdentifyStrategy2(AliHFEpidObject *track);
69     Bool_t IdentifyStrategy3(AliHFEpidObject *track);
70     Bool_t IdentifyStrategy4(AliHFEpidObject *track);
71     Bool_t IdentifyStrategy5(AliHFEpidObject *track);
72     Bool_t IdentifyStrategy6(AliHFEpidObject *track);
73   private:
74     enum{
75       kIsQAOn = BIT(14),
76       kHasMCData = BIT(15)
77     };
78     enum{
79       kMCpid = 0,
80       kESDpid = 1,
81       kITSpid = 2,
82       kTPCpid = 3,
83       kTRDpid = 4,
84       kTOFpid = 5,
85       kNdetectorPID = 6
86     };
87     enum{
88       kCombinedTPCTRD=0
89     };
90     enum{
91       kTRDSignal = 0,
92       kITSSignal = 1
93     };
94     AliHFEpidBase *fDetectorPID[kNdetectorPID];     //! Detector PID classes
95     UInt_t fEnabledDetectors;                       //  Enabled Detectors
96     UInt_t fPIDstrategy;                            //  PID Strategy
97     Double_t fTPCBetheBlochParameters[5];           //  TPC Bethe-Bloch Parameters
98     TList *fQAlist;                                 //! QA histograms
99     Int_t fDebugLevel;                              //  Debug Level
100
101   ClassDef(AliHFEpid, 1)      // Steering class for Electron ID
102 };
103
104 void AliHFEpid::SetTPCBetheBlochParameters(Double_t *pars){
105   memcpy(fTPCBetheBlochParameters, pars, sizeof(Double_t)*5);
106 }
107
108 #endif