1 #ifndef ALIANALYSISTASKLAMBDANAOD_H
2 #define ALIANALYSISTASKLAMBDANAOD_H
5 /**************************************************************************
6 * Author : Nicole Alice Martin (nicole.alice.martin@cern.ch) *
8 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
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 //-----------------------------------------------------------------
33 class AliAODInputHandler;
38 class AliESDtrackCuts;
40 class AliESDInputHandler;
46 #include "AliAnalysisTaskSE.h"
47 #include "THnSparse.h"
49 #include "AliVTrack.h"
51 #define maxNofTracks 100000
53 class AliAnalysisTaskLambdaNAOD : public AliAnalysisTaskSE {
55 AliAnalysisTaskLambdaNAOD();
56 AliAnalysisTaskLambdaNAOD(const char *name);
57 virtual ~AliAnalysisTaskLambdaNAOD();// {}
59 virtual void UserCreateOutputObjects();
60 virtual void UserExec(Option_t *option);
61 virtual void Terminate(const Option_t*);
65 void SetAnalysisType (const char* analysisType = "ESD") { fAnalysisType = analysisType; }
68 /** Types of pdgCode */
81 kPDGAntiLambdaNeutron,
84 kPdgCodeMax // Number of enum entries
94 kMassMax // Number of enum entries
97 /** Array of types of pdgCodes */
98 static const Int_t fgkPdgCode[]; //! transient
100 /** Array of types of pdgCodes */
101 static const Double_t fgkMass[]; //! transient
106 TString fAnalysisType; // "ESD" or "AOD" analysis type
108 AliInputEventHandler *fEventHandler; //for ESDs or AODs
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
119 TH1F *fHistNumberOfEvents; //! histo to count the number of events
120 TH1F *fHistTriggerStat; //! Trigger statistics
121 TH1F *fHistLambdaNeutronPtGen; //! for MC
122 TH1F *fHistAntiLambdaNeutronPtGen; //! for MC
123 TH1F *fHistLambdaNeutronInvaMassGen; //! for MC
124 TH1F *fHistAntiLambdaNeutronInvaMassGen; //! for MC
125 TH1F *fHistLambdaNeutronDecayLengthGen; //! for MC
126 TH1F *fHistAntiLambdaNeutronDecayLengthGen; //! for MC
127 TH1F *fHistLambdaNeutronPtAso; //! for MC
128 TH1F *fHistLambdaNeutronPtAsoCuts; //! for MC
129 TH1F *fHistAntiLambdaNeutronPtAso; //! for MC
130 TH1F *fHistAntiLambdaNeutronPtAsoCuts; //! for MC
131 TH1F *fHistLambdaNeutronInvaMassAso; //! for MC
132 TH1F *fHistAntiLambdaNeutronInvaMassAso; //! for MC
133 TH1F *fHistLambdaNeutronDecayLengthAso; //! for MC
134 TH1F *fHistAntiLambdaNeutronDecayLengthAso; //! for MC
136 TH2F *fof; //! debug histo for OnTheFlyStatus
137 TH2F *fHistArmenterosPodolanskiDeuteronPion; //!
138 TH2F *fHistArmenterosPodolanskiAntiDeuteronPion;//!
140 TH3F *fHistDeDxQA; //! histo for a QA dE/dx
142 Int_t fNTriggers; //! N Triggers used
144 Bool_t fMCtrue; //! flag if real data or MC is processed
145 Bool_t fOnlyQA; //! flag if only QA histograms should be filled
146 Bool_t fTriggerFired[5]; //! TriggerFired 0: MB | 1: CE | 2: SC | 3: EJE | 4: EGA
151 //AliAODv0 *fV0object; //! Tree variable
152 Int_t fItrk; //! Tree variable
154 Int_t fV0finder[maxNofTracks]; //! Tree variable
155 Int_t fkMB[maxNofTracks]; //! Tree variable
156 Int_t fkCentral[maxNofTracks]; //! Tree variable
157 Int_t fkSemiCentral[maxNofTracks]; //! Tree variable
158 Int_t fkEMCEJE[maxNofTracks]; //! Tree variable
159 Int_t fkEMCEGA[maxNofTracks]; //! Tree variable
161 Double_t fPtotN[maxNofTracks]; //! Tree variable
162 Double_t fPtotP[maxNofTracks]; //! Tree variable
163 Double_t fMotherPt[maxNofTracks]; //! Tree variable
165 Double_t fdEdxN[maxNofTracks]; //! Tree variable
166 Double_t fdEdxP[maxNofTracks]; //! Tree variable
167 Double_t fSignN[maxNofTracks]; //! Tree variable
168 Double_t fSignP[maxNofTracks]; //! Tree variable
170 Float_t fDCAv0[maxNofTracks]; //! Tree variable
171 Float_t fCosinePAv0[maxNofTracks]; //! Tree variable
172 Float_t fDecayRadiusTree[maxNofTracks]; //! Tree variable
173 Double_t fInvaMassDeuteronPionTree[maxNofTracks]; //! Tree variable
174 Int_t fChargeComboDeuteronPionTree[maxNofTracks]; //! Tree variable
175 Bool_t fIsCorrectlyAssociated[maxNofTracks]; //! Tree variable
177 Double_t fAmenterosAlphaTree[maxNofTracks]; //! Tree variable
178 Double_t fAmenterosQtTree[maxNofTracks]; //! Tree variable
179 Int_t fRotationTree[maxNofTracks]; //! Tree variable
184 TObjArray *fOutputContainer; //! output data container for the histogramms
186 void BinLogAxis(const THnSparse *h, Int_t axisNumber); //define function for log axis for search for Anti-Alpha candidates
189 /** Check if event is triggred */
190 Bool_t IsTriggered();
191 Bool_t DeuteronPID(AliVTrack *trackP, AliVTrack *trackN, Double_t ptotP, Double_t ptotN, Int_t runNumber, Bool_t isDeuteron[3]);
192 Bool_t PionPID(AliVTrack *trackP, AliVTrack *trackN, Double_t ptotP, Double_t ptotN, Int_t runNumber, Bool_t isPion[2]);
193 Bool_t TrackCuts(AliVTrack *track, Bool_t testTrackCuts);
194 //Bool_t FilterBit(AliVTrack *track, Bool_t testFilterBit);
195 Double_t MomentumInnerParam(AliVTrack *track, Double_t ptot);
198 void MCGenerated(AliStack* stack); //! function to loop over the genrated particles
200 void MCTwoBodyDecay (AliStack* stack, const TParticle *tparticleMother, Long_t PDGMother, Long_t PDGFirstDaughter, Long_t PDGSecondDaughter, Double_t massFirstDaughter, Double_t massSecondDaughter); //! function to calculate the invariant mass of two daughters and the pt of the mother
201 //void RotateKFParticle(AliKFParticle * kfParticle,Double_t angle, const AliVEvent * const ev);
203 AliAnalysisTaskLambdaNAOD(const AliAnalysisTaskLambdaNAOD&); // not implemented
204 AliAnalysisTaskLambdaNAOD& operator=(const AliAnalysisTaskLambdaNAOD&); // not implemented
206 ClassDef(AliAnalysisTaskLambdaNAOD, 1); // example of analysis