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