]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskLambdaNAOD.h
added snippets to save histos in header
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / Hypernuclei / AliAnalysisTaskLambdaNAOD.h
CommitLineData
f291255e 1#ifndef ALIANALYSISTASKLAMBDANAOD_H
2#define ALIANALYSISTASKLAMBDANAOD_H
3
4
e2d2636c 5/**************************************************************************
6 * Author : Nicole Alice Martin (nicole.alice.martin@cern.ch) *
7 * *
8 * Contributors are mentioned in the code where appropriate. *
9 * *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
18
19//-----------------------------------------------------------------
20// AliAnalysisTaskLambdaNAOD class
21// task for the investigation of (anti-)lambda-n bound state
22// uses the V0 finders, based on AODs or ESDS
23//-----------------------------------------------------------------
24
e2d2636c 25class TF1;
26class TH1F;
27class TH2F;
28class TH3F;
29class THnSparse;
30
31class TTree;
32
33class AliAODInputHandler;
34class AliAODEvent;
35class AliAODVertex;
36class AliAODv0;
37
38class AliESDtrackCuts;
39
40class AliESDInputHandler;
41class AliESDEvent;
42class AliESDVertex;
43class AliESDv0;
44
45#include <fstream>
46#include "AliAnalysisTaskSE.h"
47#include "THnSparse.h"
f291255e 48#include "AliStack.h"
49#include "AliVTrack.h"
e2d2636c 50
51#define maxNofTracks 100000
52
53class AliAnalysisTaskLambdaNAOD : public AliAnalysisTaskSE {
54 public:
55 AliAnalysisTaskLambdaNAOD();
56 AliAnalysisTaskLambdaNAOD(const char *name);
57 virtual ~AliAnalysisTaskLambdaNAOD();// {}
58
59 virtual void UserCreateOutputObjects();
60 virtual void UserExec(Option_t *option);
61 virtual void Terminate(const Option_t*);
62 Int_t Initialize();
63 Int_t SetupEvent();
64 void ResetEvent();
65 void SetAnalysisType (const char* analysisType = "ESD") { fAnalysisType = analysisType; }
66
67
68 /** Types of pdgCode */
69 enum PdgCodeType_t {
70 kPDGPionPlus,
71 kPDGPionMinus,
72 kPDGProton,
73 kPDGAntiProton,
74 kPDGDeuteron,
75 kPDGAntiDeuteron,
76 kPDGHelium3,
77 kPDGAntiHelium3,
78 kPDGLambda,
79 kPDGAntiLambda,
80 kPDGLambdaNeutron,
81 kPDGAntiLambdaNeutron,
82 kPDGHypertriton,
83 kPDGAntiHypertriton,
84 kPdgCodeMax // Number of enum entries
85 };
86
87 /** Types of Mass */
88 enum MassType_t {
89 kMassPion,
90 kMassProton,
91 kMassDeuteron,
92 kMassTriton,
93 kMassHelium3,
94 kMassMax // Number of enum entries
95 };
96
97 /** Array of types of pdgCodes */
98 static const Int_t fgkPdgCode[]; //! transient
99
100 /** Array of types of pdgCodes */
101 static const Double_t fgkMass[]; //! transient
102
103 private:
104
105
106 TString fAnalysisType; // "ESD" or "AOD" analysis type
107
108 AliInputEventHandler *fEventHandler; //for ESDs or AODs
109
110 AliESDtrackCuts *fESDtrackCutsV0; // basic cut variables for v0's
111 AliESDpid *fESDpid; // basic TPC object for n-sigma cuts
112 AliPIDResponse *fPIDResponse; //! PID response object
113
114 //
115
116
117 TTree *fTreeV0; //!
118
240b8622 119 TH1F *fHistCentralityClass10; //! histo to look at the centrality distribution
120 TH1F *fHistCentralityPercentile; //! histo to look at the centrality distribution
e2d2636c 121 TH1F *fHistTriggerStat; //! Trigger statistics
8bb06d05 122 TH1F *fHistTriggerStatAfterEventSelection; //! Trigger statistics
97c0f22b 123 TH1F *fHistLambdaNeutronPtGen; //! for MC
124 TH1F *fHistLambdaNeutronPtGenMinBias; //! for MC
125 TH1F *fHistLambdaNeutronPtGenCentral; //! for MC
126 TH1F *fHistLambdaNeutronPtGenSemiCentral; //! for MC
127 TH1F *fHistAntiLambdaNeutronPtGen; //! for MC
128 TH1F *fHistAntiLambdaNeutronPtGenMinBias; //! for MC
129 TH1F *fHistAntiLambdaNeutronPtGenCentral; //! for MC
130 TH1F *fHistAntiLambdaNeutronPtGenSemiCentral; //! for MC
e2d2636c 131 TH1F *fHistLambdaNeutronInvaMassGen; //! for MC
132 TH1F *fHistAntiLambdaNeutronInvaMassGen; //! for MC
133 TH1F *fHistLambdaNeutronDecayLengthGen; //! for MC
134 TH1F *fHistAntiLambdaNeutronDecayLengthGen; //! for MC
135 TH1F *fHistLambdaNeutronPtAso; //! for MC
136 TH1F *fHistLambdaNeutronPtAsoCuts; //! for MC
137 TH1F *fHistAntiLambdaNeutronPtAso; //! for MC
138 TH1F *fHistAntiLambdaNeutronPtAsoCuts; //! for MC
139 TH1F *fHistLambdaNeutronInvaMassAso; //! for MC
140 TH1F *fHistAntiLambdaNeutronInvaMassAso; //! for MC
141 TH1F *fHistLambdaNeutronDecayLengthAso; //! for MC
142 TH1F *fHistAntiLambdaNeutronDecayLengthAso; //! for MC
143
144 TH2F *fof; //! debug histo for OnTheFlyStatus
145 TH2F *fHistArmenterosPodolanskiDeuteronPion; //!
146 TH2F *fHistArmenterosPodolanskiAntiDeuteronPion;//!
147
148 TH3F *fHistDeDxQA; //! histo for a QA dE/dx
149
150 Int_t fNTriggers; //! N Triggers used
151
152 Bool_t fMCtrue; //! flag if real data or MC is processed
153 Bool_t fOnlyQA; //! flag if only QA histograms should be filled
154 Bool_t fTriggerFired[5]; //! TriggerFired 0: MB | 1: CE | 2: SC | 3: EJE | 4: EGA
155
156
157
158 //Tree variables
1d281cbe 159 //AliAODv0 *fV0object; //! Tree variable
e2d2636c 160 Int_t fItrk; //! Tree variable
161
162 Int_t fV0finder[maxNofTracks]; //! Tree variable
163 Int_t fkMB[maxNofTracks]; //! Tree variable
164 Int_t fkCentral[maxNofTracks]; //! Tree variable
165 Int_t fkSemiCentral[maxNofTracks]; //! Tree variable
233f521e 166 Int_t fkEMCEJE[maxNofTracks]; //! Tree variable
167 Int_t fkEMCEGA[maxNofTracks]; //! Tree variable
e2d2636c 168
678800fb 169 Int_t fCentralityClass10[maxNofTracks]; //! Tree variable
170 Int_t fCentralityPercentile[maxNofTracks]; //! Tree variable
85158d91 171 Int_t fMultiplicity[maxNofTracks]; //! Tree variable
678800fb 172 Int_t fRefMultiplicity[maxNofTracks]; //! Tree variable
173
e2d2636c 174 Double_t fPtotN[maxNofTracks]; //! Tree variable
175 Double_t fPtotP[maxNofTracks]; //! Tree variable
176 Double_t fMotherPt[maxNofTracks]; //! Tree variable
177
178 Double_t fdEdxN[maxNofTracks]; //! Tree variable
179 Double_t fdEdxP[maxNofTracks]; //! Tree variable
180 Double_t fSignN[maxNofTracks]; //! Tree variable
181 Double_t fSignP[maxNofTracks]; //! Tree variable
182
249c6465 183 Double_t fSigmadEdxPionPos[maxNofTracks]; //! Tree variable
184 Double_t fSigmadEdxPionNeg[maxNofTracks]; //! Tree variable
9674a7fc 185
e2d2636c 186 Float_t fDCAv0[maxNofTracks]; //! Tree variable
187 Float_t fCosinePAv0[maxNofTracks]; //! Tree variable
188 Float_t fDecayRadiusTree[maxNofTracks]; //! Tree variable
189 Double_t fInvaMassDeuteronPionTree[maxNofTracks]; //! Tree variable
190 Int_t fChargeComboDeuteronPionTree[maxNofTracks]; //! Tree variable
191 Bool_t fIsCorrectlyAssociated[maxNofTracks]; //! Tree variable
192
233f521e 193 Double_t fAmenterosAlphaTree[maxNofTracks]; //! Tree variable
194 Double_t fAmenterosQtTree[maxNofTracks]; //! Tree variable
97c0f22b 195 Int_t fRotationTree[maxNofTracks]; //! Tree variable
e2d2636c 196
97c0f22b 197 Double_t fImpactParameterDeuteronPos[maxNofTracks]; //! Tree variablen
198 Double_t fImpactParameterDeuteronNeg[maxNofTracks]; //! Tree variablen
199 Double_t fImpactParameterPionPos[maxNofTracks]; //! Tree variable
200 Double_t fImpactParameterPionNeg[maxNofTracks]; //! Tree variable
e2d2636c 201
97c0f22b 202 Double_t fImpactParameterDeuteronPosAliKF[maxNofTracks]; //! Tree variablen
203 Double_t fImpactParameterDeuteronNegAliKF[maxNofTracks]; //! Tree variablen
204 Double_t fImpactParameterPionPosAliKF[maxNofTracks]; //! Tree variable
205 Double_t fImpactParameterPionNegAliKF[maxNofTracks]; //! Tree variable
206
10f9a029 207 UShort_t fMinNClustersTPCPos[maxNofTracks]; //! Tree variable
208 UShort_t fMinNClustersTPCNeg[maxNofTracks]; //! Tree variable
97c0f22b 209
10f9a029 210 Double_t fMaxChi2PerClusterTPCPos[maxNofTracks]; //! Tree variable
211 Double_t fMaxChi2PerClusterTPCNeg[maxNofTracks]; //! Tree variable
e2d2636c 212
213 TObjArray *fOutputContainer; //! output data container for the histogramms
214 //
215 void BinLogAxis(const THnSparse *h, Int_t axisNumber); //define function for log axis for search for Anti-Alpha candidates
216 //
217
218 /** Check if event is triggred */
219 Bool_t IsTriggered();
220 Bool_t DeuteronPID(AliVTrack *trackP, AliVTrack *trackN, Double_t ptotP, Double_t ptotN, Int_t runNumber, Bool_t isDeuteron[3]);
221 Bool_t PionPID(AliVTrack *trackP, AliVTrack *trackN, Double_t ptotP, Double_t ptotN, Int_t runNumber, Bool_t isPion[2]);
222 Bool_t TrackCuts(AliVTrack *track, Bool_t testTrackCuts);
0cea21e4 223 //Bool_t FilterBit(AliVTrack *track, Bool_t testFilterBit);
e2d2636c 224 Double_t MomentumInnerParam(AliVTrack *track, Double_t ptot);
10f9a029 225 UShort_t TPCclusters(AliVTrack *track, UShort_t numberOfTPCclusters);
226 Double_t TPCchi2(AliVTrack *track, Double_t numberOfChi2clustersTPC, UShort_t numberOfTPCclusters);
97c0f22b 227 Double_t ImpactParameter(AliVTrack *track, Double_t dcaToVertex);
e2d2636c 228
229
97c0f22b 230 void MCGenerated(AliStack* stack, Int_t multiplicity); //! function to loop over the genrated particles
e2d2636c 231
97c0f22b 232 void MCTwoBodyDecay (AliStack* stack, const TParticle *tparticleMother, Long_t PDGMother, Long_t PDGFirstDaughter, Long_t PDGSecondDaughter, Double_t massFirstDaughter, Double_t massSecondDaughter, Int_t multiplicity); //! function to calculate the invariant mass of two daughters and the pt of the mother
233f521e 233 //void RotateKFParticle(AliKFParticle * kfParticle,Double_t angle, const AliVEvent * const ev);
234
97c0f22b 235
e2d2636c 236 AliAnalysisTaskLambdaNAOD(const AliAnalysisTaskLambdaNAOD&); // not implemented
237 AliAnalysisTaskLambdaNAOD& operator=(const AliAnalysisTaskLambdaNAOD&); // not implemented
238 //
239 ClassDef(AliAnalysisTaskLambdaNAOD, 1); // example of analysis
240};
241
242#endif