]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/AliHFEpidTRD.h
update AddTask
[u/mrichter/AliRoot.git] / PWGHF / 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;
8c1c76e9 32class AliOADBContainer;
809a4336 33class AliVParticle;
59a8e853 34class AliVTrack;
93f99c26 35class AliTRDPIDResponse;
75d81601 36class TList;
37class TH2F;
809a4336 38
39class AliHFEpidTRD : public AliHFEpidBase{
40 public:
41 typedef enum{
42 kLQ = 0,
43 kNN = 1
44 } PIDMethodTRD_t;
dbe3abbe 45 enum{
8c1c76e9 46 kThreshParams = 4
dbe3abbe 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
8c1c76e9 62 virtual Bool_t InitializePID(Int_t run);
b593c849 63 virtual Bool_t Initialize1D(Int_t run);
64 //virtual Bool_t Initialize2D(Int_t run);
65 virtual Int_t IsSelected(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const;
66 virtual Int_t IsSelected1D(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const;
93f99c26 67 virtual Int_t IsSelectedTRDPID(const AliHFEpidObject *track, AliHFEpidQAmanager *pidqa) const;
75d81601 68
bf892a6a 69 Double_t GetTRDSignalV1(const AliESDtrack *track, Float_t truncation = 0.7) const;
70 Double_t GetTRDSignalV2(const AliESDtrack *track, Float_t trucation = 0.7) const;
809a4336 71
e3fc062d 72 Bool_t IsCalculateTRDSignals() const { return TestBit(kTRDsignals); }
c2690925 73 Bool_t IsRenormalizeElPi() const { return TestBit(kTRDrenormalize); }
8c1c76e9 74 void SelectCutOnTheFly(Bool_t onFly = kTRUE) { if(onFly) SetBit(kSelectCutOnTheFly, kTRUE); else SetBit(kSelectCutOnTheFly, kFALSE);}
75 void SetOADBThresholds(AliOADBContainer *cont) { fOADBThresholds = cont; }
e156c3bb 76 void SetTotalChargeInSlice0() { fTotalChargeInSlice0 = kTRUE; }
93f99c26 77 void SetTRDOldPIDMethod() { fTRDOldPIDMethod = kTRUE; }
b593c849 78 void SetTRD2DPID() { fTRD2DPID = kTRUE; }
c2690925 79 void SetRenormalizeElPi(Bool_t doRenorm = kTRUE) { if(doRenorm) SetBit(kTRDrenormalize, kTRUE); else SetBit(kTRDrenormalize, kFALSE);}
67fe7bd0 80 void SetElectronEfficiency(Double_t electronEfficiency) { fElectronEfficiency = electronEfficiency; }
8c1c76e9 81 void SetNTracklets(Int_t nTracklets) { fNTracklets = nTracklets; }
e17c1f86 82 void SetCutNTracklets(Int_t nTracklets, Bool_t exact = kTRUE) {
83 fCutNTracklets = nTracklets;
84 if(exact) SetBit(kExactTrackletCut, kTRUE);
85 else SetBit(kExactTrackletCut, kFALSE);
86 }
e3fc062d 87 void SetMinP(Double_t p) { fMinP = p; }
88 void CalculateTRDSignals(Bool_t docalc) { SetBit(kTRDsignals, docalc); }
70da6c5a 89
8c1c76e9 90 Double_t GetElectronLikelihood(const AliVTrack *track, AliHFEpidObject::AnalysisType_t anaType) const;
91 Int_t GetNTracklets() const { return fNTracklets; }
92 void GetTRDmomenta(const AliVTrack *track, Double_t *mom) const;
6555e2ad 93 Double_t GetP(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType) const;
8c1c76e9 94 Double_t GetTRDthresholds(Double_t p) const;
95 Double_t GetTRDthresholds(Double_t p, UInt_t nTracklets) const;
6555e2ad 96 Double_t GetChargeLayer(const AliVParticle *track, UInt_t layer, AliHFEpidObject::AnalysisType_t anatype) const;
809a4336 97 protected:
e3fc062d 98 enum{
bf892a6a 99 kTRDsignals = BIT(16),
8c1c76e9 100 kThresholdsInitialized = BIT(17),
101 kTRDrenormalize = BIT(18),
e17c1f86 102 kSelectCutOnTheFly = BIT(19),
103 kExactTrackletCut = BIT(20)
e3fc062d 104 };
809a4336 105 void Copy(TObject &ref) const;
8c1c76e9 106 Bool_t InitParamsFromOADB(Int_t run);
c2690925 107 void RenormalizeElPi(const Double_t * const likein, Double_t * const likeout) const;
75d81601 108
809a4336 109 private:
8c1c76e9 110 AliOADBContainer *fOADBThresholds; // OADBContainer with thresholds
e3fc062d 111 Double_t fMinP; // Minimum momentum above which TRD PID is applied
8c1c76e9 112 Int_t fNTracklets; // Select cut for the number of tracklets
e17c1f86 113 Int_t fCutNTracklets; // Cut track based on the number of tracklets
8c1c76e9 114 Int_t fRunNumber; // Run number
67fe7bd0 115 Double_t fElectronEfficiency; // Cut on electron efficiency
dbe3abbe 116 Double_t fThreshParams[kThreshParams]; // Threshold parametrisation
b593c849 117 Bool_t fTotalChargeInSlice0; // Flag for foreward/backward compatibility for the TRD total charge
93f99c26 118 Bool_t fTRDOldPIDMethod; // Flag for old 1D PID method
b593c849 119 Bool_t fTRD2DPID; // Flag for 2D PID
809a4336 120 ClassDef(AliHFEpidTRD, 1) // TRD electron ID class
121};
809a4336 122#endif
c2690925 123