]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/STRANGENESS/LambdaK0/AliAnalysisTaskExtractV0.h
875ead5782abf6236f2960e72bd2e857a933c7a2
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / LambdaK0 / AliAnalysisTaskExtractV0.h
1 #ifndef ALIANALYSISTASKEXTRACTV0_H
2 #define ALIANALYSISTASKEXTRACTV0_H
3
4 /**************************************************************************
5  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  *                                                                        *
7  * Author: The ALICE Off-line Project.                                    *
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 //      AliAnalysisTaskExtractV0 class
21 //      ------------------------------
22 //
23 //    Please see cxx file for more details.   
24 //             
25 //-----------------------------------------------------------------
26
27 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
28 //
29 // --- This version: 23rd March 2012 
30 //
31 // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
32
33 class TList;
34 class TH1F;
35 class TH2F;
36 class TH3F;
37 class TVector3;
38 class THnSparse;
39
40 class AliESDpid;
41 class AliESDtrackCuts;
42 class AliAnalysisUtils;
43 class AliESDEvent;
44 class AliPhysicsSelection;
45 class AliCFContainer;
46
47 //#include "TString.h"
48 //#include "AliESDtrackCuts.h"
49 #include "AliAnalysisTaskSE.h"
50
51 class AliAnalysisTaskExtractV0 : public AliAnalysisTaskSE {
52  public:
53         AliAnalysisTaskExtractV0();
54         AliAnalysisTaskExtractV0(const char *name);
55         virtual ~AliAnalysisTaskExtractV0();
56         
57         virtual void     UserCreateOutputObjects();
58         virtual void     UserExec(Option_t *option);
59         virtual void     Terminate(Option_t *);
60   void CheckChargeV0(AliESDv0 *thisv0);
61
62 //---------------------------------------------------------------------------------------
63   
64   void SetIsNuclear           (Bool_t lIsNuclear   = kTRUE ) { fkIsNuclear   = lIsNuclear;   }
65   void SetINT7Trigger         (Bool_t lSwitchINT7  = kTRUE ) { fkSwitchINT7  = lSwitchINT7; }
66   void SetUseOnTheFly         (Bool_t lUseOnTheFly = kTRUE ) { fkUseOnTheFly = lUseOnTheFly; }
67   void SetTakeAllTracks       (Bool_t lTakeAllTracks = kTRUE ) { fkTakeAllTracks = lTakeAllTracks; }
68   void SetCentralityEstimator (TString lCentralityEstimator = "V0M" ) { fCentralityEstimator = lCentralityEstimator; }
69   void SetLightWeightAnalysis (Bool_t lLightWeight = kTRUE) {fkLightWeight = lLightWeight;  }
70   void SetFastOnly (TString lFastOnly = "kFastOnly") {fkFastOnly = lFastOnly;  }
71   void SetpAVertexSelection   (Bool_t lpAVertexSelection = kTRUE) {fkpAVertexSelection = lpAVertexSelection;  }
72   void SetRunV0Vertexer ( Bool_t lRunV0Vertexer = kTRUE) { fkRunV0Vertexer = lRunV0Vertexer; }
73   void SetRejectPileup ( Bool_t lRejectPileup = kTRUE) { fkRejectPileup = lRejectPileup; }
74   void SetSpecialExecution ( Bool_t lSpecialExecution = kTRUE) { fkSpecialExecution = lSpecialExecution; }
75   void SetSkipTrigger ( Bool_t lSkipTrigger = kTRUE ){ fkSkipTrigger = lSkipTrigger; }
76   
77 //---------------------------------------------------------------------------------------
78 //Setters for the V0 Vertexer Parameters
79   void SetV0VertexerMaxChisquare   ( Double_t lParameter ){ fV0Sels[0] = lParameter; }
80   void SetV0VertexerDCAFirstToPV   ( Double_t lParameter ){ fV0Sels[1] = lParameter; }
81   void SetV0VertexerDCASecondtoPV  ( Double_t lParameter ){ fV0Sels[2] = lParameter; }
82   void SetV0VertexerDCAV0Daughters ( Double_t lParameter ){ fV0Sels[3] = lParameter; }
83   void SetV0VertexerCosinePA       ( Double_t lParameter ){ fV0Sels[4] = lParameter; }
84   void SetV0VertexerMinRadius      ( Double_t lParameter ){ fV0Sels[5] = lParameter; }
85   void SetV0VertexerMaxRadius      ( Double_t lParameter ){ fV0Sels[6] = lParameter; }
86 //---------------------------------------------------------------------------------------
87   
88   void SetTPCdEdxSelection ( Bool_t lTPCdEdxSelection = kTRUE ) { fTPCdEdxSelection = lTPCdEdxSelection; }
89   
90  private:
91                                 // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
92                                 // your data member object is created on the worker nodes and streaming is not needed.
93                                 // http://root.cern.ch/download/doc/11InputOutput.pdf, page 14
94         TList   *fListHistV0;   //! List of output objects
95         TTree   *fTree;                                                 //! Output Tree
96
97   AliPIDResponse *fPIDResponse;     // PID response object
98   AliESDtrackCuts *fESDtrackCuts;   // ESD track cuts used for primary track definition
99   AliAnalysisUtils *fUtils;         // analysis utils (for pA vertex selection)
100   
101   //Objects Controlling Task Behaviour 
102   
103   Bool_t fkIsNuclear;   // if true, replace multiplicity est. by centrality (default FALSE) 
104   Bool_t fkSwitchINT7; // if true, skip FASTOnly (default FALSE)
105   Bool_t fkUseOnTheFly; // if true, will use On-the-fly V0s instead of Offline V0s (default FALSE)
106   Bool_t fkTakeAllTracks; // if true, no TPC crossed rows and ratio cut
107   TString fCentralityEstimator; //Centrality Estimator String value (default V0M, DEPRECATED)
108   Bool_t fkLightWeight; // if true, analysis output will exclude some non-fundamental
109                         // debugging information. This creates smaller output.
110   TString fkFastOnly; //"" if no extra selection, "kFastOnly" -> without SDD, "NotkFastOnly" -> With SDD
111   Bool_t fkpAVertexSelection; //if true, select vertex with pPb Methods
112   Bool_t fkRunV0Vertexer; //if true, re-run vertexer with loose cuts. CARE MUST BE TAKEN in PbPb!
113   Bool_t fkRejectPileup; //Reject pileup or not
114   Bool_t fkSpecialExecution; //Special Debug / Exploratory mode
115   Bool_t fkSkipTrigger; //To be used with ::SetCollisionCandidates
116   
117   Double_t        fV0Sels[7];                     // Array to store the 7 values for the different selections V0 related
118
119   //Extra selections
120   Bool_t fTPCdEdxSelection; //Configuration to apply extra TPC dE/dx selection for better filling of tree
121
122   //Variables for Tree
123         Float_t fTreeVariableChi2V0;         //!
124         Float_t fTreeVariableDcaV0Daughters; //!
125         Float_t fTreeVariableDcaV0ToPrimVertex; //!
126         Float_t fTreeVariableDcaPosToPrimVertex; //!
127         Float_t fTreeVariableDcaNegToPrimVertex; //!
128         Float_t fTreeVariableV0CosineOfPointingAngle; //!
129         Float_t fTreeVariableV0Radius; //!
130         Float_t fTreeVariablePt; //!
131         Float_t fTreeVariableRapK0Short; //!
132         Float_t fTreeVariableRapLambda; //!
133         Float_t fTreeVariableInvMassK0s; //!
134         Float_t fTreeVariableInvMassLambda; //!
135         Float_t fTreeVariableInvMassAntiLambda; //!
136         Float_t fTreeVariableAlphaV0; //!
137         Float_t fTreeVariablePtArmV0;//!
138         Float_t fTreeVariableNegTotMomentum; //!        
139         Float_t fTreeVariablePosTotMomentum; //!
140         Float_t fTreeVariableNegdEdxSig; //!
141         Float_t fTreeVariablePosdEdxSig; //!
142         Float_t fTreeVariableNegEta; //!
143         Float_t fTreeVariablePosEta; //!
144
145         Float_t fTreeVariableNSigmasPosProton; //!
146         Float_t fTreeVariableNSigmasPosPion; //! 
147         Float_t fTreeVariableNSigmasNegProton; //!
148         Float_t fTreeVariableNSigmasNegPion; //! 
149         
150         Float_t fTreeVariableDistOverTotMom;//!
151         Int_t   fTreeVariableLeastNbrCrossedRows;//!
152         Float_t fTreeVariableLeastRatioCrossedRowsOverFindable;//!
153         Int_t   fTreeVariableMultiplicity ;//!
154   Int_t   fTreeVariableMultiplicityV0A ;//!
155   Int_t   fTreeVariableMultiplicityZNA ;//!
156   Int_t   fTreeVariableMultiplicityTRK ;//!
157   Int_t   fTreeVariableMultiplicitySPD ;//!
158
159   Int_t   fTreeVariableRunNumber; //! 
160   ULong64_t fTreeVariableEventNumber; //!
161
162   Float_t fTreeVariableV0x; //!
163   Float_t fTreeVariableV0y; //!
164   Float_t fTreeVariableV0z; //!
165
166   Float_t fTreeVariableV0Px; //!
167   Float_t fTreeVariableV0Py; //!
168   Float_t fTreeVariableV0Pz; //!
169
170   Float_t fTreeVariablePVx; //!
171   Float_t fTreeVariablePVy; //!
172   Float_t fTreeVariablePVz; //!
173   
174   //Decay Length issue debugging: ULong_t with track status
175   ULong64_t fTreeVariableNegTrackStatus; //!
176   ULong64_t fTreeVariablePosTrackStatus; //!
177   
178   //Special dEdx debug/plotting
179   Float_t fTreeVariableNegTPCSignal; //!
180   Float_t fTreeVariablePosTPCSignal; //!
181   Float_t fTreeVariableNegInnerP; //!
182   Float_t fTreeVariablePosInnerP; //!
183   
184   Float_t fTreeVariableNegPx; //!
185   Float_t fTreeVariableNegPy; //!
186   Float_t fTreeVariableNegPz; //!
187   Float_t fTreeVariablePosPx; //!
188   Float_t fTreeVariablePosPy; //!
189   Float_t fTreeVariablePosPz; //!
190   
191
192   
193 //Note: TDistOverTotMom needs a mass hypothesis to be converted to proper decaylength.
194
195 //---------------------------------------------------------------------------------------  
196   
197         TH1F    *fHistV0MultiplicityBeforeTrigSel;             //! V0 multiplicity distribution
198         TH1F    *fHistV0MultiplicityForTrigEvt;                //! V0 multiplicity distribution
199         TH1F    *fHistV0MultiplicityForSelEvt;                 //! V0 multiplicity distribution
200         TH1F    *fHistV0MultiplicityForSelEvtNoTPCOnly;        //! V0 multiplicity distribution
201         TH1F    *fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup;//! V0 multiplicity distribution
202
203         TH1F    *fHistMultiplicityBeforeTrigSel;                //! multiplicity distribution    
204         TH1F    *fHistMultiplicityForTrigEvt;                   //! multiplicity distribution
205         TH1F    *fHistMultiplicity;                                                     //! multiplicity distribution
206         TH1F    *fHistMultiplicityNoTPCOnly;                            //! multiplicity distribution
207         TH1F    *fHistMultiplicityNoTPCOnlyNoPileup;                    //! multiplicity distribution
208
209   //V0A Centrality
210   TH1F    *fHistMultiplicityV0ABeforeTrigSel;           //! multiplicity distribution
211         TH1F    *fHistMultiplicityV0AForTrigEvt;                        //! multiplicity distribution
212         TH1F    *fHistMultiplicityV0A;                                                  //! multiplicity distribution
213         TH1F    *fHistMultiplicityV0ANoTPCOnly;                         //! multiplicity distribution
214         TH1F    *fHistMultiplicityV0ANoTPCOnlyNoPileup;                 //! multiplicity distribution
215
216   //ZNA Centrality
217   TH1F    *fHistMultiplicityZNABeforeTrigSel;           //! multiplicity distribution
218         TH1F    *fHistMultiplicityZNAForTrigEvt;                        //! multiplicity distribution
219         TH1F    *fHistMultiplicityZNA;                                                  //! multiplicity distribution
220         TH1F    *fHistMultiplicityZNANoTPCOnly;                         //! multiplicity distribution
221         TH1F    *fHistMultiplicityZNANoTPCOnlyNoPileup;                 //! multiplicity distribution
222   
223   //TRK Centrality
224   TH1F    *fHistMultiplicityTRKBeforeTrigSel;           //! multiplicity distribution
225         TH1F    *fHistMultiplicityTRKForTrigEvt;                        //! multiplicity distribution
226         TH1F    *fHistMultiplicityTRK;                                                  //! multiplicity distribution
227         TH1F    *fHistMultiplicityTRKNoTPCOnly;                         //! multiplicity distribution
228         TH1F    *fHistMultiplicityTRKNoTPCOnlyNoPileup;                 //! multiplicity distribution
229   
230   //SPD Centrality
231   TH1F    *fHistMultiplicitySPDBeforeTrigSel;           //! multiplicity distribution
232         TH1F    *fHistMultiplicitySPDForTrigEvt;                        //! multiplicity distribution
233         TH1F    *fHistMultiplicitySPD;                                                  //! multiplicity distribution
234         TH1F    *fHistMultiplicitySPDNoTPCOnly;                         //! multiplicity distribution
235         TH1F    *fHistMultiplicitySPDNoTPCOnlyNoPileup;                 //! multiplicity distribution
236   
237 //---------------------------------------------------------------------------------------  
238   
239   //Raw Data for Vertex Z position estimator change
240         TH2F    *f2dHistMultiplicityVsVertexZBeforeTrigSel;             //! multiplicity distribution    
241         TH2F    *f2dHistMultiplicityVsVertexZForTrigEvt;                        //! multiplicity distribution
242         TH2F    *f2dHistMultiplicityVsVertexZ;                                                  //! multiplicity distribution
243         TH2F    *f2dHistMultiplicityVsVertexZNoTPCOnly;                         //! multiplicity distribution
244         TH2F    *f2dHistMultiplicityVsVertexZNoTPCOnlyNoPileup;                 //! multiplicity distribution
245
246         TH1F    *fHistPVx;                                              //! multiplicity distribution
247         TH1F    *fHistPVy;                                              //! multiplicity distribution
248         TH1F    *fHistPVz;                                              //! multiplicity distribution
249         TH1F    *fHistPVxAnalysis;                                              //! multiplicity distribution
250         TH1F    *fHistPVyAnalysis;                                              //! multiplicity distribution
251         TH1F    *fHistPVzAnalysis;                                              //! multiplicity distribution
252         TH1F    *fHistSwappedV0Counter;                                                 //! Swapped V0 Counter
253   
254    AliAnalysisTaskExtractV0(const AliAnalysisTaskExtractV0&);            // not implemented
255    AliAnalysisTaskExtractV0& operator=(const AliAnalysisTaskExtractV0&); // not implemented
256   
257    ClassDef(AliAnalysisTaskExtractV0, 11);
258 };
259
260 #endif