]>
Commit | Line | Data |
---|---|---|
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 | 27 | class AliAODTrack; |
28 | class AliAODMCParticle; | |
75d81601 | 29 | class AliESDtrack; |
e3fc062d | 30 | class AliHFEcollection; |
722347d8 | 31 | class AliMCParticle; |
8c1c76e9 | 32 | class AliOADBContainer; |
809a4336 | 33 | class AliVParticle; |
59a8e853 | 34 | class AliVTrack; |
75d81601 | 35 | class TList; |
36 | class TH2F; | |
809a4336 | 37 | |
38 | class AliHFEpidTRD : public AliHFEpidBase{ | |
39 | public: | |
40 | typedef enum{ | |
41 | kLQ = 0, | |
42 | kNN = 1 | |
43 | } PIDMethodTRD_t; | |
dbe3abbe | 44 | enum{ |
8c1c76e9 | 45 | kThreshParams = 4 |
dbe3abbe | 46 | }; |
75d81601 | 47 | enum{ |
0792aa82 | 48 | kHistTRDlikeBefore = 0, |
49 | kHistTRDlikeAfter = 1, | |
50 | kHistTRDthresholds = 2, | |
51 | kHistTRDSigV1 = 3, | |
52 | kHistTRDSigV2 = 4, | |
53 | kHistOverallSpecies = 5 | |
75d81601 | 54 | }; |
faee3b18 | 55 | AliHFEpidTRD(); |
809a4336 | 56 | AliHFEpidTRD(const Char_t *name); |
57 | AliHFEpidTRD(const AliHFEpidTRD &ref); | |
58 | AliHFEpidTRD& operator=(const AliHFEpidTRD &ref); | |
59 | virtual ~AliHFEpidTRD(); | |
bf892a6a | 60 | |
8c1c76e9 | 61 | virtual Bool_t InitializePID(Int_t run); |
b593c849 | 62 | virtual Bool_t Initialize1D(Int_t run); |
63 | //virtual Bool_t Initialize2D(Int_t run); | |
64 | virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const; | |
65 | virtual Int_t IsSelected1D(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const; | |
66 | virtual Int_t IsSelected2D(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const; | |
75d81601 | 67 | |
bf892a6a | 68 | Double_t GetTRDSignalV1(const AliESDtrack *track, Float_t truncation = 0.7) const; |
69 | Double_t GetTRDSignalV2(const AliESDtrack *track, Float_t trucation = 0.7) const; | |
809a4336 | 70 | |
e3fc062d | 71 | Bool_t IsCalculateTRDSignals() const { return TestBit(kTRDsignals); } |
c2690925 | 72 | Bool_t IsRenormalizeElPi() const { return TestBit(kTRDrenormalize); } |
8c1c76e9 | 73 | void SelectCutOnTheFly(Bool_t onFly = kTRUE) { if(onFly) SetBit(kSelectCutOnTheFly, kTRUE); else SetBit(kSelectCutOnTheFly, kFALSE);} |
74 | void SetOADBThresholds(AliOADBContainer *cont) { fOADBThresholds = cont; } | |
e156c3bb | 75 | void SetTotalChargeInSlice0() { fTotalChargeInSlice0 = kTRUE; } |
b593c849 | 76 | void SetTRD2DPID() { fTRD2DPID = kTRUE; } |
c2690925 | 77 | void SetRenormalizeElPi(Bool_t doRenorm = kTRUE) { if(doRenorm) SetBit(kTRDrenormalize, kTRUE); else SetBit(kTRDrenormalize, kFALSE);} |
67fe7bd0 | 78 | void SetElectronEfficiency(Double_t electronEfficiency) { fElectronEfficiency = electronEfficiency; } |
8c1c76e9 | 79 | void SetNTracklets(Int_t nTracklets) { fNTracklets = nTracklets; } |
e17c1f86 | 80 | void SetCutNTracklets(Int_t nTracklets, Bool_t exact = kTRUE) { |
81 | fCutNTracklets = nTracklets; | |
82 | if(exact) SetBit(kExactTrackletCut, kTRUE); | |
83 | else SetBit(kExactTrackletCut, kFALSE); | |
84 | } | |
e3fc062d | 85 | void SetMinP(Double_t p) { fMinP = p; } |
86 | void CalculateTRDSignals(Bool_t docalc) { SetBit(kTRDsignals, docalc); } | |
70da6c5a | 87 | |
8c1c76e9 | 88 | Double_t GetElectronLikelihood(const AliVTrack *track, AliHFEpidObject::AnalysisType_t anaType) const; |
89 | Int_t GetNTracklets() const { return fNTracklets; } | |
90 | void GetTRDmomenta(const AliVTrack *track, Double_t *mom) const; | |
6555e2ad | 91 | Double_t GetP(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const; |
8c1c76e9 | 92 | Double_t GetTRDthresholds(Double_t p) const; |
93 | Double_t GetTRDthresholds(Double_t p, UInt_t nTracklets) const; | |
6555e2ad | 94 | Double_t GetChargeLayer(const AliVParticle *track, UInt_t layer, AliHFEpidObject::AnalysisType_t anatype) const; |
809a4336 | 95 | protected: |
e3fc062d | 96 | enum{ |
bf892a6a | 97 | kTRDsignals = BIT(16), |
8c1c76e9 | 98 | kThresholdsInitialized = BIT(17), |
99 | kTRDrenormalize = BIT(18), | |
e17c1f86 | 100 | kSelectCutOnTheFly = BIT(19), |
101 | kExactTrackletCut = BIT(20) | |
e3fc062d | 102 | }; |
809a4336 | 103 | void Copy(TObject &ref) const; |
8c1c76e9 | 104 | Bool_t InitParamsFromOADB(Int_t run); |
c2690925 | 105 | void RenormalizeElPi(const Double_t * const likein, Double_t * const likeout) const; |
75d81601 | 106 | |
809a4336 | 107 | private: |
8c1c76e9 | 108 | AliOADBContainer *fOADBThresholds; // OADBContainer with thresholds |
e3fc062d | 109 | Double_t fMinP; // Minimum momentum above which TRD PID is applied |
8c1c76e9 | 110 | Int_t fNTracklets; // Select cut for the number of tracklets |
e17c1f86 | 111 | Int_t fCutNTracklets; // Cut track based on the number of tracklets |
8c1c76e9 | 112 | Int_t fRunNumber; // Run number |
67fe7bd0 | 113 | Double_t fElectronEfficiency; // Cut on electron efficiency |
dbe3abbe | 114 | Double_t fThreshParams[kThreshParams]; // Threshold parametrisation |
b593c849 | 115 | Bool_t fTotalChargeInSlice0; // Flag for foreward/backward compatibility for the TRD total charge |
116 | Bool_t fTRD2DPID; // Flag for 2D PID | |
809a4336 | 117 | ClassDef(AliHFEpidTRD, 1) // TRD electron ID class |
118 | }; | |
809a4336 | 119 | #endif |
c2690925 | 120 |