4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
22 // Steering class for electron identification
23 // Combines detector PID objects
24 // For more information please check the implementation file
30 #ifndef ALIHFEPIDBASE_H
31 #include "AliHFEpidBase.h"
38 class AliHFEcontainer;
40 class AliHFEpidQAmanager;
41 class AliHFEvarManager;
47 class AliHFEpid : public TNamed{
63 AliHFEpid(const Char_t *name);
64 AliHFEpid(const AliHFEpid &c);
65 AliHFEpid &operator=(const AliHFEpid &c);
66 void Copy(TObject &o) const;
69 Bool_t InitializePID();
70 Bool_t IsSelected(AliHFEpidObject *track, AliHFEcontainer *cont = NULL, const Char_t *contname = "trackContainer", AliHFEpidQAmanager *qa = NULL);
72 Bool_t HasMCData() const { return TestBit(kHasMCData); };
74 void AddDetector(TString detector, UInt_t position);
75 void SetESDpid(AliESDpid *pid);
76 void SetAODpid(AliAODpidUtil *pid);
77 void SetVarManager(AliHFEvarManager *vm) { fVarManager = vm; }
78 void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData, hasMCdata); };
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; }
84 void PrintStatus() const;
85 const Char_t *SortedDetectorName(Int_t det) const {
86 if(det < kNdetectorPID) return fgkDetectorName[fSortedOrder[det]];
87 else return fgkDetectorName[kNdetectorPID];
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();
92 void ConfigureTPCrejection(const char *lowerCutParam = NULL, Double_t *params = NULL);
93 void ConfigureTPCstrategyParis();
94 //------------------------------------------------------------
97 Bool_t MakePidTpcTof(AliHFEpidObject *track);
111 void AddCommonObject(TObject * const o);
112 void ClearCommonObjects();
113 //-----Switch on/off detectors in PID sequence------
114 void SwitchOnDetector(UInt_t det){
115 if(det < kNdetectorPID) SETBIT(fEnabledDetectors, det);
117 void SwitchOffDetector(UInt_t det){
118 if(det < kNdetectorPID) CLRBIT(fEnabledDetectors, det);
120 Bool_t IsDetectorOn(UInt_t det) const {
121 return det < kNdetectorPID ? TESTBIT(fEnabledDetectors, det): kFALSE;
123 //--------------------------------------------------
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
134 ClassDef(AliHFEpid, 1) // Steering class for Electron ID