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 **************************************************************************/
23 // Does PID either on a x% electron efficiency basis or on dE/dx
24 // For more information please check the implementation file
26 #ifndef ALIHFEPIDBASE_H
27 #include "AliHFEpidBase.h"
31 class AliAODMCParticle;
33 class AliHFEcollection;
39 class AliHFEpidTRD : public AliHFEpidBase{
49 kHistTRDlikeBefore = 0,
50 kHistTRDlikeAfter = 1,
51 kHistTRDthresholds = 2,
54 kHistOverallSpecies = 5
57 AliHFEpidTRD(const Char_t *name);
58 AliHFEpidTRD(const AliHFEpidTRD &ref);
59 AliHFEpidTRD& operator=(const AliHFEpidTRD &ref);
60 virtual ~AliHFEpidTRD();
62 virtual Bool_t InitializePID();
63 virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const;
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;
68 Bool_t IsCalculateTRDSignals() const { return TestBit(kTRDsignals); }
69 void SetPIDMethod(PIDMethodTRD_t method) { fPIDMethod = method; };
70 void SetElectronEfficiency(Double_t electronEfficiency) { fElectronEfficiency = electronEfficiency; }
71 void SetThresholdParameters(Double_t electronEff, Double_t *params);
72 void SetMinP(Double_t p) { fMinP = p; }
73 void CalculateTRDSignals(Bool_t docalc) { SetBit(kTRDsignals, docalc); }
75 Double_t GetElectronLikelihood(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
76 void GetTRDmomenta(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType, Double_t *mom) const;
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;
82 kTRDsignals = BIT(16),
83 kTRDdefaultThresholds = BIT(17)
85 void Copy(TObject &ref) const;
86 void InitParameters();
87 void InitParameters1DLQ();
88 void GetParameters(Double_t electronEff, Double_t *parameters) const;
89 void SetUseDefaultParameters(Bool_t useDefault = kTRUE) { SetBit(kTRDdefaultThresholds, useDefault); }
90 Bool_t UseDefaultParameters() const { return TestBit(kTRDdefaultThresholds); }
93 static const Double_t fgkVerySmall; // Check for 0
94 Double_t fMinP; // Minimum momentum above which TRD PID is applied
95 Double_t fElectronEfficiency; // Cut on electron efficiency
96 PIDMethodTRD_t fPIDMethod; // PID Method: 2D Likelihood or Neural Network
97 Double_t fThreshParams[kThreshParams]; // Threshold parametrisation
98 ClassDef(AliHFEpidTRD, 1) // TRD electron ID class