1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 // Steering class for electron identification
17 // Combines detector PID objects
18 // For more information please check the implementation file
27 #ifndef ALIHFEPIDBASE_H
28 #include "AliHFEpidBase.h"
35 class AliHFEcontainer;
36 class AliHFEvarManager;
42 class AliHFEpid : public TNamed{
58 AliHFEpid(const Char_t *name);
59 AliHFEpid(const AliHFEpid &c);
60 AliHFEpid &operator=(const AliHFEpid &c);
61 void Copy(TObject &o) const;
64 Bool_t InitializePID();
65 Bool_t IsSelected(const AliHFEpidObject * const track, AliHFEcontainer *cont = NULL, const Char_t *contname = "trackContainer", AliHFEpidQAmanager *qa = NULL);
67 Bool_t HasMCData() const { return TestBit(kHasMCData); };
69 void AddDetector(TString detector, UInt_t position);
70 void SetESDpid(AliESDpid *pid);
71 void SetAODpid(AliAODpidUtil *pid);
72 void SetVarManager(AliHFEvarManager *vm) { fVarManager = vm; }
73 void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData, hasMCdata); };
75 UInt_t GetNumberOfPIDdetectors() const { return fNPIDdetectors; }
76 Bool_t HasDetector(EDETtype_t det) const { return IsDetectorOn(det); }
77 AliHFEpidBase *GetDetPID(EDETtype_t det) const { return det < kNdetectorPID ? fDetectorPID[det] : NULL; }
79 void PrintStatus() const;
80 const Char_t *SortedDetectorName(Int_t det) const {
81 if(det < kNdetectorPID) return fgkDetectorName[fSortedOrder[det]];
82 else return fgkDetectorName[kNdetectorPID];
84 //-----Configure PID detectors with predefined stettings------
85 void ConfigureTOF(Float_t TOFcut = 3.);
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 ConfigureTPCcentralityCut(Int_t centralityBin, const char *lowerCutParam = NULL, const Double_t * const params = NULL, Float_t upperTPCCut=3.0);
89 void ConfigureTPCdefaultCut(const char *lowerCutParam = NULL, const Double_t * const params = NULL, Float_t upperTPCCut=3.0);
90 //------------------------------------------------------------
93 Bool_t MakePidTpcTof(AliHFEpidObject *track);
106 void AddCommonObject(TObject * const o);
107 void ClearCommonObjects();
108 //-----Switch on/off detectors in PID sequence------
109 void SwitchOnDetector(UInt_t det){
110 if(det < kNdetectorPID) SETBIT(fEnabledDetectors, det);
112 void SwitchOffDetector(UInt_t det){
113 if(det < kNdetectorPID) CLRBIT(fEnabledDetectors, det);
115 Bool_t IsDetectorOn(UInt_t det) const {
116 return det < kNdetectorPID ? TESTBIT(fEnabledDetectors, det): kFALSE;
118 //--------------------------------------------------
119 void ConfigureTPCcut(Int_t centralityBin, const char *lowerCutParam, const Double_t * const params, Float_t upperTPCCut);
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
130 ClassDef(AliHFEpid, 1) // Steering class for Electron ID