]>
Commit | Line | Data |
---|---|---|
27de2dfb | 1 | #ifndef ALIHFEPIDTRD_H |
2 | #define ALIHFEPIDTRD_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 | // TRD PID Class | |
23 | // Does PID either on a x% electron efficiency basis or on dE/dx | |
24 | // For more information please check the implementation file | |
25 | // | |
75d81601 | 26 | #ifndef ALIHFEPIDBASE_H |
809a4336 | 27 | #include "AliHFEpidBase.h" |
28 | #endif | |
29 | ||
722347d8 | 30 | class AliAODTrack; |
31 | class AliAODMCParticle; | |
75d81601 | 32 | class AliESDtrack; |
e3fc062d | 33 | class AliHFEcollection; |
722347d8 | 34 | class AliMCParticle; |
809a4336 | 35 | class AliVParticle; |
75d81601 | 36 | class TList; |
37 | class TH2F; | |
809a4336 | 38 | |
39 | class AliHFEpidTRD : public AliHFEpidBase{ | |
40 | public: | |
41 | typedef enum{ | |
42 | kLQ = 0, | |
43 | kNN = 1 | |
44 | } PIDMethodTRD_t; | |
dbe3abbe | 45 | enum{ |
46 | kThreshParams = 24 | |
47 | }; | |
75d81601 | 48 | enum{ |
0792aa82 | 49 | kHistTRDlikeBefore = 0, |
50 | kHistTRDlikeAfter = 1, | |
51 | kHistTRDthresholds = 2, | |
52 | kHistTRDSigV1 = 3, | |
53 | kHistTRDSigV2 = 4, | |
54 | kHistOverallSpecies = 5 | |
75d81601 | 55 | }; |
faee3b18 | 56 | AliHFEpidTRD(); |
809a4336 | 57 | AliHFEpidTRD(const Char_t *name); |
58 | AliHFEpidTRD(const AliHFEpidTRD &ref); | |
59 | AliHFEpidTRD& operator=(const AliHFEpidTRD &ref); | |
60 | virtual ~AliHFEpidTRD(); | |
bf892a6a | 61 | |
809a4336 | 62 | virtual Bool_t InitializePID(); |
6555e2ad | 63 | virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const; |
75d81601 | 64 | |
bf892a6a | 65 | Double_t GetTRDSignalV1(const AliESDtrack *track, Float_t truncation = 0.7) const; |
66 | Double_t GetTRDSignalV2(const AliESDtrack *track, Float_t trucation = 0.7) const; | |
809a4336 | 67 | |
e3fc062d | 68 | Bool_t IsCalculateTRDSignals() const { return TestBit(kTRDsignals); } |
809a4336 | 69 | void SetPIDMethod(PIDMethodTRD_t method) { fPIDMethod = method; }; |
67fe7bd0 | 70 | void SetElectronEfficiency(Double_t electronEfficiency) { fElectronEfficiency = electronEfficiency; } |
bf892a6a | 71 | void SetThresholdParameters(Double_t electronEff, Double_t *params); |
e3fc062d | 72 | void SetMinP(Double_t p) { fMinP = p; } |
73 | void CalculateTRDSignals(Bool_t docalc) { SetBit(kTRDsignals, docalc); } | |
70da6c5a | 74 | |
6555e2ad | 75 | Double_t GetElectronLikelihood(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const; |
bf892a6a | 76 | void GetTRDmomenta(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType, Double_t *mom) const; |
6555e2ad | 77 | Double_t GetP(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const; |
78 | Double_t GetTRDthresholds(Double_t electronEff, Double_t p) const; | |
79 | Double_t GetChargeLayer(const AliVParticle *track, UInt_t layer, AliHFEpidObject::AnalysisType_t anatype) const; | |
809a4336 | 80 | protected: |
e3fc062d | 81 | enum{ |
bf892a6a | 82 | kTRDsignals = BIT(16), |
83 | kTRDdefaultThresholds = BIT(17) | |
e3fc062d | 84 | }; |
809a4336 | 85 | void Copy(TObject &ref) const; |
dbe3abbe | 86 | void InitParameters(); |
e3fc062d | 87 | void InitParameters1DLQ(); |
6555e2ad | 88 | void GetParameters(Double_t electronEff, Double_t *parameters) const; |
bf892a6a | 89 | void SetUseDefaultParameters(Bool_t useDefault = kTRUE) { SetBit(kTRDdefaultThresholds, useDefault); } |
90 | Bool_t UseDefaultParameters() const { return TestBit(kTRDdefaultThresholds); } | |
75d81601 | 91 | |
809a4336 | 92 | private: |
75d81601 | 93 | static const Double_t fgkVerySmall; // Check for 0 |
e3fc062d | 94 | Double_t fMinP; // Minimum momentum above which TRD PID is applied |
67fe7bd0 | 95 | Double_t fElectronEfficiency; // Cut on electron efficiency |
809a4336 | 96 | PIDMethodTRD_t fPIDMethod; // PID Method: 2D Likelihood or Neural Network |
dbe3abbe | 97 | Double_t fThreshParams[kThreshParams]; // Threshold parametrisation |
809a4336 | 98 | ClassDef(AliHFEpidTRD, 1) // TRD electron ID class |
99 | }; | |
100 | ||
101 | #endif |