AliPhysics  2c6b7ad (2c6b7ad)
AliAnalysisTaskSELc2V0bachelorTMVA.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSELC2V0BACHELORTMVA_H
2 #define ALIANALYSISTASKSELC2V0BACHELORTMVA_H
3 /**************************************************************************
4  * Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5  * *
6  * Author: The ALICE Off-line Project. *
7  * Contributors are mentioned in the code where appropriate. *
8  * *
9  * Permission to use, copy, modify and distribute this software and its *
10  * documentation strictly for non-commercial purposes is hereby granted *
11  * without fee, provided that the above copyright notice appears in all *
12  * copies and that both the copyright notice and this permission notice *
13  * appear in the supporting documentation. The authors make no claims *
14  * about the suitability of this software for any purpose. It is *
15  * provided "as is" without express or implied warranty. *
16  **************************************************************************/
17 
18 /* $Id: AliAnalysisTaskSELc2V0bachelorTMVA.h 61835 2013-04-05 23:07:23Z fprino $ */
19 
20 #include "TROOT.h"
21 #include "TSystem.h"
22 
23 #include "AliAnalysisTaskSE.h"
24 #include "AliAODEvent.h"
25 #include "AliAODMCHeader.h"
26 #include "AliPID.h"
27 #include "AliAODTrack.h"
28 #include "AliAODVertex.h"
29 #include "AliAODRecoDecay.h"
30 #include "AliPIDResponse.h"
31 #include "AliPIDCombined.h"
32 #include "AliTPCPIDResponse.h"
33 #include "AliRDHFCutsLctoV0.h"
35 #include "AliVertexingHFUtils.h"
36 #include "AliAODRecoCascadeHF.h"
37 
39 
40 class TH1F;
41 class TH1D;
42 
44 {
45 
46  public:
47 
48  enum EBachelor {
50  kBachFake = 0,
56 
57  enum EK0S {
59  kK0SFake = 0,
60  kK0SNoK0S = 1,
63  kK0Primary = 4,
67 
68  enum EAnalysisType {
69  kpPb2013 = 0,
70  kpPb2016 = 1,
71  kpp2016 = 2,
72  kpp2010 = 3};
73 
76  Bool_t useOnTheFly=kFALSE);
78 
80  virtual void UserCreateOutputObjects();
81  virtual void Init();
82  virtual void LocalInit() {Init();}
83  virtual void UserExec(Option_t *option);
84  virtual void Terminate(Option_t *option);
85 
88  Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal,
89  TClonesArray *mcArray, Int_t iLctopK0s);
90 
91  void MakeAnalysisForLc2prK0S(TClonesArray *arrayLctopK0s,
92  TClonesArray *mcArray,
93  Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal,
94  TClonesArray *array3Prong, AliAODMCHeader *aodheader);
95 
97  void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
98  Bool_t GetMC() const {return fUseMCInfo;}
99 
102 
105 
106  void SetIspA(Bool_t a) { fIspA=a; }
107  Bool_t GetIspA() { return fIspA; }
108 
111 
114 
117 
120 
123 
126 
129 
132 
133  void SetTriggerMask(ULong64_t c) { fTriggerMask = c;}
134 
135  void SetMCNchHisto(TH1F* h){
136  if(fHistoMCNch) delete fHistoMCNch;
137  fHistoMCNch = new TH1F(*h);
138  }
139 
142  }
143 
144 
145  void SetMultVsZProfileLHC13b(TProfile* hprof){
146  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
147  fMultEstimatorAvg[0]=new TProfile(*hprof);
148  }
149  void SetMultVsZProfileLHC13c(TProfile* hprof){
150  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
151  fMultEstimatorAvg[1]=new TProfile(*hprof);
152  }
153 
154  void SetMultVsZProfileLHC16qt1stBunch(TProfile* hprof){
155  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
156  fMultEstimatorAvg[0]=new TProfile(*hprof);
157  }
158  void SetMultVsZProfileLHC16qt2ndBunch(TProfile* hprof){
159  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
160  fMultEstimatorAvg[1]=new TProfile(*hprof);
161  }
162  void SetMultVsZProfileLHC16qt3rdBunch(TProfile* hprof){
163  if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2];
164  fMultEstimatorAvg[2]=new TProfile(*hprof);
165  }
166  void SetMultVsZProfileLHC16qt4thBunch(TProfile* hprof){
167  if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3];
168  fMultEstimatorAvg[3]=new TProfile(*hprof);
169  }
170 
171  void SetMultVsZProfileLHC16j(TProfile* hprof){
172  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
173  fMultEstimatorAvg[0]=new TProfile(*hprof);
174  }
175  void SetMultVsZProfileLHC16k(TProfile* hprof){
176  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
177  fMultEstimatorAvg[1]=new TProfile(*hprof);
178  }
179  void SetMultVsZProfileLHC16l(TProfile* hprof){
180  if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2];
181  fMultEstimatorAvg[2]=new TProfile(*hprof);
182  }
183 
184  void SetMultVsZProfileLHC10b(TProfile* hprof){
185  if(fMultEstimatorAvg[0]) delete fMultEstimatorAvg[0];
186  fMultEstimatorAvg[0]=new TProfile(*hprof);
187  }
188  void SetMultVsZProfileLHC10c(TProfile* hprof){
189  if(fMultEstimatorAvg[1]) delete fMultEstimatorAvg[1];
190  fMultEstimatorAvg[1]=new TProfile(*hprof);
191  }
192  void SetMultVsZProfileLHC10d(TProfile* hprof){
193  if(fMultEstimatorAvg[2]) delete fMultEstimatorAvg[2];
194  fMultEstimatorAvg[2]=new TProfile(*hprof);
195  }
196  void SetMultVsZProfileLHC10e(TProfile* hprof){
197  if(fMultEstimatorAvg[3]) delete fMultEstimatorAvg[3];
198  fMultEstimatorAvg[3]=new TProfile(*hprof);
199  }
200 
201 
203 
204 
205 
206 
207  private:
208 
209  EBachelor CheckBachelor(AliAODRecoCascadeHF *part, AliAODTrack* bachelor, TClonesArray *mcArray);
210  EK0S CheckK0S(AliAODRecoCascadeHF *part, AliAODv0* v0part, TClonesArray *mcArray);
211  //EK0S CheckK0S(AliAODRecoCascadeHF *part, AliAODTrack* v0part, TClonesArray *mcArray );
212  Int_t FindV0Label(AliAODRecoDecay* v0part, TClonesArray *mcArray) const;
213  Int_t FindLcLabel(AliAODRecoCascadeHF* cascade, TClonesArray *mcArray) const;
214  Int_t CallKFVertexing(AliAODRecoCascadeHF *cascade, AliAODv0* v0part, AliAODTrack* bach, TClonesArray *mcArray,
215  Double_t* V0KF, Double_t* errV0KF, Double_t* LcKF, Double_t* errLcKF,
216  Double_t* distances, Double_t* armPolKF);
217 
218  void FillMCHisto(TClonesArray *mcArray);
219 
222  TProfile* GetEstimatorHistogram(const AliVEvent *event);
223 
226 
227  // define the histograms
228  TH1F *fCEvents;
229  AliPIDResponse *fPIDResponse;
230  AliPIDCombined *fPIDCombined;
240 
244 
246 
247  TH1F* fHistoEvents;
248  TH1F* fHistoLc;
256  AliAODVertex *fVtx1;
257 
261 
265 
269 
273 
277 
279 
283 
285 
289 
293 
295 
299 
303 
308 
312 
316 
320 
324 
329 
331 
347 
348  ULong64_t fTriggerMask;
349 
353  TH1F* fHistoMCNch;
354 
357  TProfile* fMultEstimatorAvg[4];
359 
363 
368 
372 
373 
375  ClassDef(AliAnalysisTaskSELc2V0bachelorTMVA, 12);
376 };
378 
379 #endif
380 
Float_t fCutKFDeviationFromVtxV0
cut for KF on distance to primary vtx
TH1D * fHistoDistanceV0ToLc
! KF: distance V0 vertex from Lc vertex
TH2D * fHistoArmenterosPodolanskiV0KFSgn
! KF: Armeteros-Podolanski plot for V0 from signal Lc from KF
double Double_t
Definition: External.C:58
TH1D * fHistoKFV0
! KF: V0 code from KF (mass, decaylength, lifetime considered)
TH1D * fHistoDecayLengthLcTrue
! KF: decay length for true cascades reconstructed with KF
Definition: External.C:236
TH1F * fHistoLc
! histogram with number of Lc
TH1F * fHistNtrCorrEvWithCand
! hist. of ntracklets for evnts with a candidate
TList * fListMultiplicityHistograms
reference multiplicity
TH2D * fHistoLifeTimeKFLc
! KF: life time vs life time error for Lc from KF
AliPIDCombined * fPIDCombined
! combined PID response object
TH1F * fHistNtrUnCorrEvWithCand
! hist. of ntracklets for evnts with a candidate
TH2D * fHistoArmenterosPodolanskiV0AODSgn
! KF: AOD Armeteros-Podolanski plot for V0 from signal Lc from KF
TH1D * fHistoVtxV0ResidualToPrimVtx
! KF: residual wrt MC of distance V0 vertex from primary vertex (MC - KF)
TH1F * fHistoLcpKpiBeforeCuts
! histogram number of true Lc–>pKpi (3 prong) before any cut
Bool_t fKeepingOnlyPYTHIABkg
magnetic field of current event
AliNormalizationCounter * fCounterC
!Counter for normalization, corrected multiplicity
char Char_t
Definition: External.C:18
TH1D * fHistoDecayLengthV0All
! KF: decay length for all V0 reconstructed with KF
virtual void UserCreateOutputObjects()
Implementation of interface methods.
TCanvas * c
Definition: TestFitELoss.C:172
TH1D * fHistoDecayLengthLcAll
! KF: decay length for all Lc reconstructed with KF
Bool_t fKeepingOnlyHIJINGBkg
flag to decide whether to call or not KF
TH1D * fHistoLifeTimeV0All
! KF: life time for all V0 reconstructed with KF
AliNormalizationCounter * fCounterU
!Counter for normalization, uncorrected multiplicity
Float_t * fCandidateVariables
! variables to be written to the tree
TH1D * fHistoMassV0TrueK0S
! KF: mass for true V0 which are really K0S reconstructed with KF
TH2D * fHistoDecayLengthKFLc
! KF: decay length vs decay length error for Lc from KF
TList * fOutputKF
! User output1: list of histograms from KF
TF1 * fFuncWeightFONLL5overLHC13d3
! weight function for FONLL vs pPb prod.
AliNormalizationCounter * fCounter
switch between Lpi and K0sp
Bool_t fIsEventSelected
flag to analyze also on-the-fly V0 candidates
TF1 * fFuncWeightFONLL5overLHC13d3Lc
! weight function for FONLL vs pPb prod.
TH1D * fHistoDecayLengthV0fromLcAll
! KF: decay length of V0 for all cascades reconstructed with KF
TH1D * fHistoMassV0TrueK0SFromAOD
! KF: AOD mass for true V0 which are really K0S reconstructed with KF
TH2F * fHistNtrCorrVsZvtx
! hist of corrected ntracklets vs. z_vtx
TH1F * fHistoLcOnTheFly
! histogram with number of Lc with on-the-fly V0
TH1D * fHistoLifeTimeLcTrue
! KF: life time for true cascades reconstructed with KF
TH1D * fHistoKFLc
! KF: Lc code from KF (mass, decaylength, lifetime considered)
TH2D * fHistoKF
! KF: V0 code vs Lc code from KF (mass, decaylength, lifetime considered)
Int_t CallKFVertexing(AliAODRecoCascadeHF *cascade, AliAODv0 *v0part, AliAODTrack *bach, TClonesArray *mcArray, Double_t *V0KF, Double_t *errV0KF, Double_t *LcKF, Double_t *errLcKF, Double_t *distances, Double_t *armPolKF)
TH1D * fHistoLifeTimeLcSgn
! KF: life time of signal Lc reconstructed with KF
TH1F * fHistoMCNch
! histogram with Nch distribution from MC production
TH1D * fHistoDistanceV0ToPrimVtx
! KF: distance V0 vertex from primary vertex
TH1D * fHistoMassLcSgnFromAOD
! KF: AOD mass of signal Lc reconstructed with KF
int Int_t
Definition: External.C:63
TH2F * fHistNtrVsZvtx
! hist of ntracklets vs. z_vtx
Bool_t fUseOnTheFlyV0
list of profiles for z-vtx correction of multiplicity
Int_t fNTracklets
switch to change system/year in use for loading of mult. estimators
float Float_t
Definition: External.C:68
TH1D * fHistoMassLcAll
! KF: mass for all Lc reconstructed with KF
TH1D * fHistoDistanceV0ToLcSgn
! KF: distance for signal Lc of V0 vertex from Lc vertex
TH1D * fHistoMassV0fromLcAll
! KF: mass of V0 for all cascades reconstructed with KF
TH1D * fHistoDecayLengthLcSgn
! KF: decay length of signal Lc reconstructed with KF
TH1F * fHistoMCLcK0SpGenAcc
! histo with MC Lc –> K0S + p
TH1D * fHistoMassLcTrueFromAOD
! KF: AOD mass for true cascades reconstructed with KF
TH1D * fHistoMassV0fromLcSgn
! KF: mass of V0 for signal Lc reconstructed with KF
Definition: External.C:228
Definition: External.C:212
Int_t FindLcLabel(AliAODRecoCascadeHF *cascade, TClonesArray *mcArray) const
TH1D * fHistoLifeTimeV0fromLcAll
! KF: life time of V0 for all cascades reconstructed with KF
TH2D * fHistoLifeTimeKFV0
! KF: life time vs life time error for V0 from KF
TH1D * fHistoMassV0TrueFromAOD
! KF: AOD mass for true V0 reconstructed with KF
Double_t fBField
current event number - for debug purposes
TH2D * fHistoDecayLengthKFV0
! KF: decay length vs decay length error for V0 from KF
Int_t mode
Definition: anaM.C:41
TH1D * fHistoDecayLengthV0True
! KF: decay length for true V0 reconstructed with KF
TH1F * fHistoFiducialAcceptance
! histogram to check FiducialAcceptance cut
TH2F * fHistoCodesBkg
! histogram with codes for bachelor and V0 for background
TH1D * fHistoLifeTimeV0fromLcTrue
! KF: life time of V0 for true cascades reconstructed with KF
AliVertexingHFUtils * fUtils
flag to fill bkg with only candidates that have daughters generated by HIJING (to be used for enriche...
EBachelor CheckBachelor(AliAODRecoCascadeHF *part, AliAODTrack *bachelor, TClonesArray *mcArray)
TH1D * fHistoDecayLengthV0fromLcSgn
! KF: decay length of V0 for signal Lc reconstructed with KF
void MakeAnalysisForLc2prK0S(TClonesArray *arrayLctopK0s, TClonesArray *mcArray, Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *array3Prong, AliAODMCHeader *aodheader)
TH1F * fHistoLcBeforeCuts
flag to fill only signal (speeding up processing)
TH1D * fHistoDecayLengthV0TrueK0S
! KF: decay length for true V0 which are really K0S reconstructed with KF
TH1D * fHistoLifeTimeLcAll
! KF: life time for all Lc reconstructed with KF
TH1D * fHistoMassV0All
! KF: mass for all V0 reconstructed with KF
TProfile * GetEstimatorHistogram(const AliVEvent *event)
TH1D * fHistoMassLcTrue
! KF: mass for true cascades reconstructed with KF
TH1D * fHistoLifeTimeV0True
! KF: life time for true V0 reconstructed with KF
TH1F * fHistoMCLcK0SpGenLimAcc
! histo with MC Lc –> K0S + p
TH2D * fHistoArmenterosPodolanskiV0AOD
! KF: AOD Armeteros-Podolanski plot for all V0 from KF
TH1D * fHistoVtxV0ResidualToLc
! KF: residual wrt MC of distance V0 vertex from Lc vertex (MC - KF)
TH1D * fHistoDistanceV0ToPrimVtxSgn
! KF: distance for signal Lc of V0 vertex from primary vertex
TF1 * fFuncWeightPythia
mask to the trigger word returned by the physics selection
TH2D * fHistoArmenterosPodolanskiV0KF
! KF: Armeteros-Podolanski plot for all V0 from KF
TH1D * fHistoDecayLengthV0fromLcTrue
! KF: decay length of V0 for true cascades reconstructed with KF
const char Option_t
Definition: External.C:48
AliAnalysisTaskSELc2V0bachelorTMVA & operator=(const AliAnalysisTaskSELc2V0bachelorTMVA &source)
Double_t fRefMult
TProfile with mult vs. Z per period.
TH1F * fHistNtrUnCorrEvSel
! hist. of ntracklets for selected events
enum for setting analysis system/year (for loading profile histograms for multiplicity correction) ...
AliNormalizationCounter * fCounterCandidates
!Counter for normalization, corrected multiplicity for candidates
TH1D * fHistoLifeTimeV0fromLcSgn
! KF: life time of V0 for signal Lc reconstructed with KF
bool Bool_t
Definition: External.C:53
TTree * fVariablesTreeBkg
! tree of the candidate variables after track selection (Background)
TH1D * fHistoDistanceLcToPrimVtxSgn
! KF: distance of signal Lc vertex from primary vertex
AliPIDResponse * fPIDResponse
! PID response object
TProfile * fMultEstimatorAvg[4]
tracklet multiplicity in event
TList * fListCuts
Cuts - sent to output slot 5.
EK0S CheckK0S(AliAODRecoCascadeHF *part, AliAODv0 *v0part, TClonesArray *mcArray)
TH1D * fHistoLifeTimeV0TrueK0S
! KF: life time for true V0 which are really K0S reconstructed with KF
TH1F * fHistoMCLcK0SpGen
flag to allow to use only PYTHIA tracks for background
TH2D * fHistoMassKFLc
! KF: mass vs mass error for Lc from KF
Bool_t fCallKFVertexing
flag to use topological constraints in KF
Int_t fCurrentEvent
cut for KF on distance to primary vtx for V0
void FillLc2pK0Sspectrum(AliAODRecoCascadeHF *part, Int_t isLc, Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t iLctopK0s)
histos
TH1F * fCEvents
! Histogram to check selected events
TH1D * fHistoVtxLcResidualToPrimVtx
! KF: residual wrt MC of distance Lc vertex from primary vertex (MC - KF)
TH1D * fHistoMassV0True
! KF: mass for true V0 reconstructed with KF
TH2D * fHistoMassKFV0
! KF: mass vs mass error for V0 from KF
TH1F * fHistNtrCorrEvSel
! hist. of ntracklets for selected events
Int_t FindV0Label(AliAODRecoDecay *v0part, TClonesArray *mcArray) const
TH1D * fHistoMassLcSgn
! KF: mass of signal Lc reconstructed with KF
TH2F * fHistoCodesSgn
! histogram with codes for bachelor and V0 for signal
TH1D * fHistoMassV0fromLcTrue
! KF: mass of V0 for true cascades reconstructed with KF
Class with functions useful for different D2H analyses //.
TH1F * fHistoBackground
AliVertexingHFUtils used to check the generator of a specific candidate.