]>
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 | // Steering class for electron identification | |
17 | // Combines detector PID objects | |
18 | // For more information please check the implementation file | |
19 | // | |
75d81601 | 20 | #ifndef ALIHFEPID_H |
21 | #define ALIHFEPID_H | |
809a4336 | 22 | |
e3fc062d | 23 | #ifndef ROOT_TNamed |
24 | #include <TNamed.h> | |
809a4336 | 25 | #endif |
26 | ||
722347d8 | 27 | #ifndef ALIHFEPIDBASE_H |
28 | #include "AliHFEpidBase.h" | |
29 | #endif | |
30 | ||
e3fc062d | 31 | #include <climits> |
32 | ||
3a72645a | 33 | class AliAODpidUtil; |
faee3b18 | 34 | class AliESDpid; |
3a72645a | 35 | class AliHFEcontainer; |
faee3b18 | 36 | class AliHFEpidBase; |
3a72645a | 37 | class AliHFEpidQAmanager; |
38 | class AliHFEvarManager; | |
809a4336 | 39 | class AliVParticle; |
722347d8 | 40 | class AliMCParticle; |
809a4336 | 41 | |
42 | class TList; | |
43 | ||
e3fc062d | 44 | class AliHFEpid : public TNamed{ |
50685501 | 45 | public: |
e3fc062d | 46 | enum{ |
47 | kUndefined = UINT_MAX | |
48 | }; | |
3a72645a | 49 | enum EDETtype_t { |
e3fc062d | 50 | kMCpid = 0, |
51 | kESDpid = 1, | |
52 | kITSpid = 2, | |
53 | kTPCpid = 3, | |
54 | kTRDpid = 4, | |
55 | kTOFpid = 5, | |
56 | kNdetectorPID = 6 | |
57 | }; | |
809a4336 | 58 | AliHFEpid(); |
e3fc062d | 59 | AliHFEpid(const Char_t *name); |
809a4336 | 60 | AliHFEpid(const AliHFEpid &c); |
61 | AliHFEpid &operator=(const AliHFEpid &c); | |
e3fc062d | 62 | void Copy(TObject &o) const; |
809a4336 | 63 | ~AliHFEpid(); |
64 | ||
3a72645a | 65 | Bool_t InitializePID(); |
66 | Bool_t IsSelected(AliHFEpidObject *track, AliHFEcontainer *cont = NULL, const Char_t *contname = "trackContainer", AliHFEpidQAmanager *qa = NULL); | |
809a4336 | 67 | |
809a4336 | 68 | Bool_t HasMCData() const { return TestBit(kHasMCData); }; |
3a72645a | 69 | |
70 | void AddDetector(TString detector, UInt_t position); | |
faee3b18 | 71 | void SetESDpid(AliESDpid *pid); |
3a72645a | 72 | void SetAODpid(AliAODpidUtil *pid); |
73 | void SetVarManager(AliHFEvarManager *vm) { fVarManager = vm; } | |
809a4336 | 74 | void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData, hasMCdata); }; |
3a72645a | 75 | |
76 | UInt_t GetNumberOfPIDdetectors() const { return fNPIDdetectors; } | |
77 | Bool_t HasDetector(EDETtype_t det) const { return IsDetectorOn(det); } | |
78 | AliHFEpidBase *GetDetPID(EDETtype_t det) const { return det < kNdetectorPID ? fDetectorPID[det] : NULL; } | |
79 | ||
e3fc062d | 80 | void PrintStatus() const; |
3a72645a | 81 | const Char_t *SortedDetectorName(Int_t det) const { |
82 | if(det < kNdetectorPID) return fgkDetectorName[fSortedOrder[det]]; | |
83 | else return fgkDetectorName[kNdetectorPID + 1]; | |
84 | } | |
85 | //-----Configure PID detectors with predefined stettings------ | |
86 | void ConfigureTPCasymmetric(Double_t pmin = 0.1, Double_t pmax = 20., Double_t sigmamin = -0.2, Double_t sigmamax = 5.); | |
87 | void ConfigureTPCrejectionSimple(); | |
88 | void ConfigureTPCrejection(); | |
89 | void ConfigureTPCstrategyParis(); | |
90 | //------------------------------------------------------------ | |
809a4336 | 91 | |
92 | protected: | |
722347d8 | 93 | Bool_t MakePidTpcTof(AliHFEpidObject *track); |
3a72645a | 94 | |
809a4336 | 95 | private: |
50685501 | 96 | enum{ |
3a72645a | 97 | kHasMCData = BIT(14) |
50685501 | 98 | }; |
50685501 | 99 | enum{ |
100 | kCombinedTPCTRD=0 | |
101 | }; | |
102 | enum{ | |
103 | kTRDSignal = 0, | |
104 | kITSSignal = 1 | |
105 | }; | |
faee3b18 | 106 | |
107 | void AddCommonObject(TObject * const o); | |
108 | void ClearCommonObjects(); | |
e3fc062d | 109 | //-----Switch on/off detectors in PID sequence------ |
110 | void SwitchOnDetector(UInt_t det){ | |
111 | if(det < kNdetectorPID) SETBIT(fEnabledDetectors, det); | |
112 | } | |
113 | void SwitchOffDetector(UInt_t det){ | |
114 | if(det < kNdetectorPID) CLRBIT(fEnabledDetectors, det); | |
115 | } | |
116 | Bool_t IsDetectorOn(UInt_t det) const { | |
117 | return det < kNdetectorPID ? TESTBIT(fEnabledDetectors, det): kFALSE; | |
118 | } | |
119 | //-------------------------------------------------- | |
faee3b18 | 120 | |
3a72645a | 121 | static const Char_t *fgkDetectorName[kNdetectorPID + 1]; // PID Detector Names |
122 | AliHFEpidBase *fDetectorPID[kNdetectorPID]; // Detector PID classes | |
123 | UInt_t fDetectorOrder[kNdetectorPID]; // Position requested by the user | |
124 | UInt_t fSortedOrder[kNdetectorPID]; // Sorted array of detectorIDs | |
125 | UInt_t fEnabledDetectors; // Enabled Detectors | |
126 | UInt_t fNPIDdetectors; // Number of PID detectors | |
127 | AliHFEvarManager *fVarManager; //! HFE Var Manager | |
128 | TObjArray *fCommonObjects; // Garbage Collector | |
809a4336 | 129 | |
130 | ClassDef(AliHFEpid, 1) // Steering class for Electron ID | |
131 | }; | |
132 | ||
133 | #endif |