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