]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/AliHFEelecbackground.h
reco update
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEelecbackground.h
CommitLineData
02524e30 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// Secondary vertexing construction Class
17// Construct secondary vertex from Beauty hadron with electron and
18// hadrons, then apply selection criteria
19//
20
c2690925 21#ifndef ALIHFEELECBACKGROUND_H
22#define ALIHFEELECBACKGROUND_H
23
02524e30 24#ifndef ROOT_TObject
25//#include <TObject.h>
26#endif
27
28class AliESDEvent;
70da6c5a 29class AliESDpid;
02524e30 30class AliESDVertex;
31class AliAODEvent;
32class AliESDtrack;
33class AliAODTrack;
34class AliMCEvent;
35
70da6c5a 36class AliHFEpid;
37
38
02524e30 39//________________________________________________________________
40class AliHFEelecbackground : public TObject {
70da6c5a 41 public:
42 AliHFEelecbackground();
43 AliHFEelecbackground(const AliHFEelecbackground &p);
44 AliHFEelecbackground &operator=(const AliHFEelecbackground &);
45 virtual ~AliHFEelecbackground();
02524e30 46 virtual Bool_t Load(const Char_t *filename);
70da6c5a 47 virtual Bool_t Load(TList * const outputlist);
02524e30 48
70da6c5a 49 void CreateHistograms(TList * const qaList);
d2af20c5 50 void Reset();
02524e30 51
70da6c5a 52 Bool_t HasMCData() const { return TestBit(kHasMCData); };
53 Bool_t IsAODanalysis() const { return TestBit(kAODanalysis); };
54 Bool_t IsESDanalysis() const { return !TestBit(kAODanalysis); };
55
56 void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData,hasMCdata); };
57 void SetAODAnalysis() { SetBit(kAODanalysis, kTRUE); };
58 void SetESDAnalysis() { SetBit(kAODanalysis, kFALSE); };
59 void SetEvent(AliESDEvent* const ESD);
60 void SetEventAOD(AliAODEvent* const AOD){fAOD1=AOD;};
61 void SetMCEvent(AliMCEvent* const mcEvent){fMCEvent=mcEvent;};
69ac0e6f 62
70da6c5a 63 void SetOpeningAngleCut(Double_t openingAngleCut){fOpeningAngleCut = openingAngleCut;};
69ac0e6f 64 void SetInvMassCut(Double_t invMassCut){fInvMassCut = invMassCut;};
65 void SetChi2NdfCut(Double_t chi2NdfCut){fChi2NdfCut = chi2NdfCut;};
66 void SetUseAliKFCode(Bool_t useAliKFCode){fUseAliKFCode = useAliKFCode;};
67 void SetSharedClusterCut(Bool_t sharedClusterCut){fSharedClusterCut = sharedClusterCut;};
68 void SetRequireITSStandalone(Short_t requireITSStandalone){fRequireITSStandalone = requireITSStandalone;};
69 void SetMinITSChi2(Double_t minITSChi2) {fMinITSChi2 = minITSChi2;};
70 void SetMinNbCls(Int_t minNbCls){fMinNbCls = minNbCls;};
71 void SetMinNbClsSDDSPD(Int_t minNbClsSDDSPD){fMinNbClsSDDSPD = minNbClsSDDSPD;};
72 void SetPIDPartner();
73 void SetPIDMethodPartner(AliHFEpid * const pid) {fPIDMethodPartner = pid;};
74 void SetPIDMethodPartnerITS(AliESDpid * const pid) {fPIDMethodPartnerITS = pid;};
75 void SetDebugLevel(Short_t debugLevel) { fDebugLevel = debugLevel;};
76
77 Double_t GetOpeningAngleCut() const { return fOpeningAngleCut; };
78 Double_t GetInvMassCut() const { return fInvMassCut; };
79 Double_t GetChi2NdfCut() const { return fChi2NdfCut; };
80 Bool_t GetUseAliKFCode() const { return fUseAliKFCode; };
81 Bool_t GetSharedClusterCut() const { return fSharedClusterCut; };
82 Short_t GetRequireITSStandalone() const { return fRequireITSStandalone; };
83 Int_t GetMinNbCls() const { return fMinNbCls;};
84 Double_t GetMinITSChi2() const { return fMinITSChi2; };
85 Int_t GetMinNbClsSDDSPD() const { return fMinNbClsSDDSPD;};
86 Bool_t GetPIDPartner() const { return fPIDPartner;};
87
88 TList *GetList() const { return fList; };
89 TList *GetListPostProcess() const { return fListPostProcess; };
90
c2690925 91 Bool_t SingleTrackCut(const AliESDtrack* const trackPart) const;
69ac0e6f 92 Bool_t ShareCluster(AliESDtrack * const track1,AliESDtrack * const track2);
93 Bool_t PIDTrackCut(AliESDtrack* const trackPart);
94 void PairAnalysis(AliESDtrack* const track, AliESDtrack* const trackpart);
c2690925 95 void FillOutput(const Double_t *results,const Double_t *resultsr, Int_t sign);
70da6c5a 96 void PostProcess();
69ac0e6f 97 void Plot() const;
98
02524e30 99 private:
70da6c5a 100 enum{
101 kHasMCData = BIT(15), // bitset for mc data usage
69ac0e6f 102 kAODanalysis = BIT(16) // bitset for aod analysis
103 };
104 enum {kDatai=0, kDatar=1, kDatadca=2, kDatachi2Ndf=3, kMCo=4, kMCr=5, kMCdca=6, kMCchi2Ndf=7, kMCe=8, kMCcutPart0=9, kMCcutPart1=10, kMCcutPart2=11, kMCcutPart3=12}; // In the fList Data/MC
105 enum {kOs=0, kPp=1, kNn=2, kR=3}; // In the last dimension Charge
106 enum {kOos=0, kOss=1, kOr=2, kOdiff=3}; // outputs
107 enum {kNOutput=4,kNMCInfo=5}; // Nb of outputs
108 enum{
109 kElectronFromBackground = 0,
110 kElectronFromGamma = 1,
111 kElectronFromPi0 = 2,
112 kElectronFromEta = 3,
113 kElectronFromC = 4,
114 kElectronFromB = 5
115 }; // MC: Origin
116 enum {kNotSplitted=0, kSplittedOs=1, kSplittedSs=2}; // MC: splitted
117
118 Bool_t CalculateMotherVariable(AliESDtrack* const track, AliESDtrack* const trackpart, Double_t *results);
119 void CalculateMotherVariableR(AliESDtrack* const track, AliESDtrack* const trackpart, Double_t *results);
120 Int_t IsMotherGamma(Int_t tr);
121 Int_t IsMotherPi0(Int_t tr);
122 Int_t IsMotherEta(Int_t tr);
123 Int_t IsMotherC(Int_t tr);
124 Int_t IsMotherB(Int_t tr);
125 Int_t GetPdg(Int_t tr);
126 Int_t GetLabMother(Int_t tr);
127
128 static Double_t BetheBlochElectronITS(const Double_t *x, const Double_t * /*par*/);
129 static Double_t BetheBlochMuonITS(const Double_t *x, const Double_t * /*par*/);
130 static Double_t BetheBlochPionITS(const Double_t *x, const Double_t * /*par*/);
131 static Double_t BetheBlochKaonITS(const Double_t *x, const Double_t * /*par*/);
132 static Double_t BetheBlochProtonITS(const Double_t *x, const Double_t * /*par*/);
133
134 static Double_t BetheBlochElectronTPC(const Double_t *x, const Double_t * /*par*/);
135 static Double_t BetheBlochMuonTPC(const Double_t *x, const Double_t * /*par*/);
136 static Double_t BetheBlochPionTPC(const Double_t *x, const Double_t * /*par*/);
137 static Double_t BetheBlochKaonTPC(const Double_t *x, const Double_t * /*par*/);
138 static Double_t BetheBlochProtonTPC(const Double_t *x, const Double_t * /*par*/);
139
140 THnSparseF *fhtmp; // Only to avoid coverity problem
141 TH2F *fhtmpf; // Only to avoid coverity problem
142 TH1F *fhtmpp; // Only to avoid coverity problem
143
70da6c5a 144 AliESDEvent* fESD1; //! ESD pointer
145 AliAODEvent* fAOD1; //! AOD pointer
146 AliMCEvent* fMCEvent; //! MC event
69ac0e6f 147 Double_t fBz; // Magnetic field
148 const AliESDVertex *fkVertex; //! Primary vertex
3ccf8f4c 149 static const Double_t fgkMe; //! Mass of the electron
69ac0e6f 150 Double_t fPtESD; //! pt of tagged electron
151 Int_t fIndexTrack; //! index track
152 Int_t fPdg; //! pdg code track
153 Int_t fLabMother; //! label first mother track
154 Int_t fIsFrom; //! is track from
155 Int_t fMotherGamma; //! Gamma, mother of track
156 Int_t fMotherPi0; //! Pi0, mother of track
157 Int_t fMotherC; //! C, mother of track
158 Int_t fMotherB; //! B, mother of track
159 Int_t fMotherEta; //! eta, mother of track
160 Bool_t fIsPartner; //! Are partners
161 Bool_t fIsSplittedTrack; //! Are splitted track
162
163 Double_t fOpeningAngleCut; //! Opening angle cut
164 Double_t fInvMassCut; //! Inv mass cut
165 Double_t fChi2NdfCut; //! chi2ndf cut for KF code
166
167 Bool_t fUseAliKFCode; //! Use AliKF code to calculate the pair properties
168
169 Bool_t fSharedClusterCut; //! Shared Cluster Cut
170 Short_t fRequireITSStandalone; //! ITS standalone: 1 and 2 (pureITSStandalone)
171 Int_t fMinNbCls; //! Min Nb of clusters ITS or TPC
172 Double_t fMinITSChi2; //! ITS chi2 min
173 Int_t fMinNbClsSDDSPD; //! Min Nb of clusters ITS SDD&SPD
174 Bool_t fPIDPartner; //! PID partner
175 AliHFEpid *fPIDMethodPartner; //! PID cuts
176 AliESDpid *fPIDMethodPartnerITS; //! PID cuts ITS
177
178 Short_t fDebugLevel; //! Debug Level
179
180 Bool_t fCuts[10]; //! Cut passed already
181
70da6c5a 182 TList *fList; //! list for outputs
69ac0e6f 183 TList *fListPostProcess; //! list for postprocess
184
185 static Bool_t fgUseMCPID; // flag to use MC PID for tagged electron
d2af20c5 186
187 ClassDef(AliHFEelecbackground,0);
02524e30 188};
189
190#endif