]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEpidTPC.h
Use folder in ouput file: savannah 57874 (Markus)
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEpidTPC.h
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 **************************************************************************/
15 //
16 // Class for TPC PID
17 // Does electron selection based on dE/dx
18 // For more information please check the implementation file
19 //
20 #ifndef ALIHFEPIDTPC_H
21 #define ALIHFEPIDTPC_H
22
23 #ifndef ALIHFEPIDBASE_H
24 #include "AliHFEpidBase.h"
25 #endif
26
27 #ifndef ALIPID_H
28 #include "AliPID.h"
29 #endif
30
31 class TList;
32 class AliAODTrack;
33 class AliAODMCParticle;
34 class AliESDtrack;
35 class AliMCParticle;
36 class AliTPCpidESD;
37 class AliVParticle;
38
39 class AliHFEpidTPC : public AliHFEpidBase{
40   public:
41     AliHFEpidTPC(const Char_t *name);
42     AliHFEpidTPC(const AliHFEpidTPC &ref);
43     AliHFEpidTPC &operator=(const AliHFEpidTPC &ref);
44     virtual ~AliHFEpidTPC();
45     
46     virtual Bool_t InitializePID();
47     virtual Int_t IsSelected(AliHFEpidObject *track);
48     virtual Bool_t HasQAhistos() const { return kTRUE; };
49
50     void AddTPCdEdxLineCrossing(Int_t species, Double_t sigma);
51     Bool_t HasAsymmetricSigmaCut() const { return TestBit(kAsymmetricSigmaCut);}
52     Bool_t HasParticleRejection() const { return TestBit(kRejection); }
53     void SetTPCnSigma(Short_t nSigma) { fNsigmaTPC = nSigma; };
54     inline void SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax);
55     inline void SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax);
56
57   protected:
58     void Copy(TObject &o) const;
59     void AddQAhistograms(TList *qaList);
60     void FillTPChistograms(const AliESDtrack *track, const AliMCParticle *mctrack);
61     Int_t MakePIDaod(AliAODTrack *aodTrack, AliAODMCParticle *mcTrack);
62     Int_t MakePIDesd(AliESDtrack *esdTrack, AliMCParticle *mcTrack);
63     Int_t Reject(AliESDtrack *track);
64     Double_t Likelihood(const AliESDtrack *track, Int_t species, Float_t rsig = 2.);
65     Double_t Suppression(const AliESDtrack *track, Int_t species);
66
67   private:
68     typedef enum{
69       kHistTPCelectron = 0,
70       kHistTPCpion = 1,
71       kHistTPCmuon = 2,
72       kHistTPCkaon = 3,
73       kHistTPCproton = 4,
74       kHistTPCothers = 5,
75       kHistTPCall = 6,
76       kHistTPCselected = 7,
77       kHistTPCprobEl = 8,
78       kHistTPCprobPi = 9,
79       kHistTPCprobMu = 10,
80       kHistTPCprobKa = 11,
81       kHistTPCprobPro = 12,
82       kHistTPCprobOth = 13,
83       kHistTPCprobAll = 14,
84       kHistTPCsuppressPi = 15,
85       kHistTPCsuppressMu = 16,
86       kHistTPCsuppressKa = 17,
87       kHistTPCsuppressPro = 18,
88       kHistTPCenhanceElPi = 19,
89       kHistTPCenhanceElMu = 20,
90       kHistTPCenhanceElKa = 21,
91       kHistTPCenhanceElPro = 22,
92       kHistTPCElprobPi = 23,
93       kHistTPCElprobMu = 24,
94       kHistTPCElprobKa = 25,
95       kHistTPCElprobPro = 26
96     } QAHist_t;
97     enum{
98       kAsymmetricSigmaCut = BIT(20),
99       kRejection = BIT(21)
100     };
101     Double_t fLineCrossingSigma[AliPID::kSPECIES];          // with of the exclusion point
102     UChar_t fLineCrossingsEnabled;                          // Bitmap showing which line crossing is set
103     Float_t fPAsigCut[2];                                   // Momentum region where to perform asymmetric sigma cut
104     Float_t fNAsigmaTPC[2];                                 // Asymmetric TPC Sigma band        
105     Short_t fNsigmaTPC;                                     // TPC sigma band
106     Float_t fRejection[4*AliPID::kSPECIES];                 // All informations for Particle Rejection, order pmin, sigmin, pmax, sigmax
107     UChar_t fRejectionEnabled;                              // Bitmap for enabled particle rejection
108     AliPID *fPID;                                           //! PID Object
109     AliTPCpidESD *fPIDtpcESD;                               //! TPC PID object
110     TList *fQAList;                                         //! QA histograms
111
112   ClassDef(AliHFEpidTPC, 1)   // TPC Electron ID class
113 };
114
115 inline void AliHFEpidTPC::SetAsymmetricTPCsigmaCut(Float_t pmin, Float_t pmax, Float_t sigmaMin, Float_t sigmaMax) { 
116   fPAsigCut[0] = pmin; 
117   fPAsigCut[1] = pmax; 
118   fNAsigmaTPC[0] = sigmaMin; 
119   fNAsigmaTPC[1] = sigmaMax; 
120   SetBit(kAsymmetricSigmaCut, kTRUE);
121 }
122
123 inline void AliHFEpidTPC::SetRejectParticle(Int_t species, Float_t pmin, Float_t sigmaMin, Float_t pmax, Float_t sigmaMax){
124   if(species < 0 || species >= AliPID::kSPECIES) return;
125   fRejection[4*species]   = pmin;
126   fRejection[4*species+1] = sigmaMin;
127   fRejection[4*species+2] = pmax;
128   fRejection[4*species+3] = sigmaMax;
129   SETBIT(fRejectionEnabled, species);
130   SetBit(kRejection, kTRUE);
131 }
132  
133 #endif