]>
Commit | Line | Data |
---|---|---|
27de2dfb | 1 | #ifndef ALIHFEPID_H |
2 | #define ALIHFEPID_H | |
3 | ||
809a4336 | 4 | /************************************************************************** |
5 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
6 | * * | |
7 | * Author: The ALICE Off-line Project. * | |
8 | * Contributors are mentioned in the code where appropriate. * | |
9 | * * | |
10 | * Permission to use, copy, modify and distribute this software and its * | |
11 | * documentation strictly for non-commercial purposes is hereby granted * | |
12 | * without fee, provided that the above copyright notice appears in all * | |
13 | * copies and that both the copyright notice and this permission notice * | |
14 | * appear in the supporting documentation. The authors make no claims * | |
15 | * about the suitability of this software for any purpose. It is * | |
16 | * provided "as is" without express or implied warranty. * | |
17 | **************************************************************************/ | |
27de2dfb | 18 | |
19 | /* $Id$ */ | |
20 | ||
50685501 | 21 | // |
22 | // Steering class for electron identification | |
23 | // Combines detector PID objects | |
24 | // For more information please check the implementation file | |
25 | // | |
e3fc062d | 26 | #ifndef ROOT_TNamed |
27 | #include <TNamed.h> | |
809a4336 | 28 | #endif |
29 | ||
722347d8 | 30 | #ifndef ALIHFEPIDBASE_H |
31 | #include "AliHFEpidBase.h" | |
32 | #endif | |
33 | ||
e3fc062d | 34 | #include <climits> |
35 | ||
3a72645a | 36 | class AliAODpidUtil; |
faee3b18 | 37 | class AliESDpid; |
3a72645a | 38 | class AliHFEcontainer; |
faee3b18 | 39 | class AliHFEpidBase; |
3a72645a | 40 | class AliHFEpidQAmanager; |
41 | class AliHFEvarManager; | |
809a4336 | 42 | class AliVParticle; |
722347d8 | 43 | class AliMCParticle; |
809a4336 | 44 | |
45 | class TList; | |
46 | ||
e3fc062d | 47 | class AliHFEpid : public TNamed{ |
50685501 | 48 | public: |
e3fc062d | 49 | enum{ |
50 | kUndefined = UINT_MAX | |
51 | }; | |
3a72645a | 52 | enum EDETtype_t { |
e3fc062d | 53 | kMCpid = 0, |
54 | kESDpid = 1, | |
55 | kITSpid = 2, | |
56 | kTPCpid = 3, | |
57 | kTRDpid = 4, | |
58 | kTOFpid = 5, | |
e3ae862b | 59 | kEMCALpid = 6, |
60 | kNdetectorPID = 7 | |
e3fc062d | 61 | }; |
809a4336 | 62 | AliHFEpid(); |
e3fc062d | 63 | AliHFEpid(const Char_t *name); |
809a4336 | 64 | AliHFEpid(const AliHFEpid &c); |
65 | AliHFEpid &operator=(const AliHFEpid &c); | |
e3fc062d | 66 | void Copy(TObject &o) const; |
809a4336 | 67 | ~AliHFEpid(); |
68 | ||
3a72645a | 69 | Bool_t InitializePID(); |
70 | Bool_t IsSelected(AliHFEpidObject *track, AliHFEcontainer *cont = NULL, const Char_t *contname = "trackContainer", AliHFEpidQAmanager *qa = NULL); | |
809a4336 | 71 | |
809a4336 | 72 | Bool_t HasMCData() const { return TestBit(kHasMCData); }; |
3a72645a | 73 | |
74 | void AddDetector(TString detector, UInt_t position); | |
faee3b18 | 75 | void SetESDpid(AliESDpid *pid); |
3a72645a | 76 | void SetAODpid(AliAODpidUtil *pid); |
77 | void SetVarManager(AliHFEvarManager *vm) { fVarManager = vm; } | |
809a4336 | 78 | void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData, hasMCdata); }; |
3a72645a | 79 | |
80 | UInt_t GetNumberOfPIDdetectors() const { return fNPIDdetectors; } | |
81 | Bool_t HasDetector(EDETtype_t det) const { return IsDetectorOn(det); } | |
82 | AliHFEpidBase *GetDetPID(EDETtype_t det) const { return det < kNdetectorPID ? fDetectorPID[det] : NULL; } | |
83 | ||
e3fc062d | 84 | void PrintStatus() const; |
3a72645a | 85 | const Char_t *SortedDetectorName(Int_t det) const { |
86 | if(det < kNdetectorPID) return fgkDetectorName[fSortedOrder[det]]; | |
6555e2ad | 87 | else return fgkDetectorName[kNdetectorPID]; |
3a72645a | 88 | } |
89 | //-----Configure PID detectors with predefined stettings------ | |
90 | void ConfigureTPCasymmetric(Double_t pmin = 0.1, Double_t pmax = 20., Double_t sigmamin = -0.2, Double_t sigmamax = 5.); | |
91 | void ConfigureTPCrejectionSimple(); | |
e3ae862b | 92 | void ConfigureTPCrejection(const char *lowerCutParam = NULL, Double_t *params = NULL); |
3a72645a | 93 | void ConfigureTPCstrategyParis(); |
94 | //------------------------------------------------------------ | |
809a4336 | 95 | |
96 | protected: | |
722347d8 | 97 | Bool_t MakePidTpcTof(AliHFEpidObject *track); |
3a72645a | 98 | |
809a4336 | 99 | private: |
50685501 | 100 | enum{ |
3a72645a | 101 | kHasMCData = BIT(14) |
50685501 | 102 | }; |
50685501 | 103 | enum{ |
104 | kCombinedTPCTRD=0 | |
105 | }; | |
106 | enum{ | |
107 | kTRDSignal = 0, | |
108 | kITSSignal = 1 | |
109 | }; | |
faee3b18 | 110 | |
111 | void AddCommonObject(TObject * const o); | |
112 | void ClearCommonObjects(); | |
e3fc062d | 113 | //-----Switch on/off detectors in PID sequence------ |
114 | void SwitchOnDetector(UInt_t det){ | |
115 | if(det < kNdetectorPID) SETBIT(fEnabledDetectors, det); | |
116 | } | |
117 | void SwitchOffDetector(UInt_t det){ | |
118 | if(det < kNdetectorPID) CLRBIT(fEnabledDetectors, det); | |
119 | } | |
120 | Bool_t IsDetectorOn(UInt_t det) const { | |
121 | return det < kNdetectorPID ? TESTBIT(fEnabledDetectors, det): kFALSE; | |
122 | } | |
123 | //-------------------------------------------------- | |
faee3b18 | 124 | |
3a72645a | 125 | static const Char_t *fgkDetectorName[kNdetectorPID + 1]; // PID Detector Names |
126 | AliHFEpidBase *fDetectorPID[kNdetectorPID]; // Detector PID classes | |
127 | UInt_t fDetectorOrder[kNdetectorPID]; // Position requested by the user | |
128 | UInt_t fSortedOrder[kNdetectorPID]; // Sorted array of detectorIDs | |
129 | UInt_t fEnabledDetectors; // Enabled Detectors | |
130 | UInt_t fNPIDdetectors; // Number of PID detectors | |
131 | AliHFEvarManager *fVarManager; //! HFE Var Manager | |
132 | TObjArray *fCommonObjects; // Garbage Collector | |
809a4336 | 133 | |
134 | ClassDef(AliHFEpid, 1) // Steering class for Electron ID | |
135 | }; | |
136 | ||
137 | #endif |