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