AliPhysics  29d4213 (29d4213)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
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 
43 class AliAnalysisTaskSELc2V0bachelorTMVA : public AliAnalysisTaskSE
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 
69  AliAnalysisTaskSELc2V0bachelorTMVA(const Char_t* name, AliRDHFCutsLctoV0* cutsA,
70  Bool_t useOnTheFly=kFALSE);
72 
74  virtual void UserCreateOutputObjects();
75  virtual void Init();
76  virtual void LocalInit() {Init();}
77  virtual void UserExec(Option_t *option);
78  virtual void Terminate(Option_t *option);
79 
81  void FillLc2pK0Sspectrum(AliAODRecoCascadeHF *part, Int_t isLc,
82  Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal,
83  TClonesArray *mcArray, Int_t iLctopK0s);
84 
85  void MakeAnalysisForLc2prK0S(TClonesArray *arrayLctopK0s,
86  TClonesArray *mcArray,
87  Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal,
88  TClonesArray *array3Prong, AliAODMCHeader *aodheader);
89 
91  void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
92  Bool_t GetMC() const {return fUseMCInfo;}
93 
94  void SetK0sAnalysis(Bool_t a) {fIsK0sAnalysis=a;}
95  Bool_t GetK0sAnalysis() const {return fIsK0sAnalysis;}
96 
97  void SetUseOnTheFlyV0(Bool_t a) { fUseOnTheFlyV0=a; }
98  Bool_t GetUseOnTheFlyV0() { return fUseOnTheFlyV0; }
99 
100  void SetIspA(Bool_t a) { fIspA=a; }
101  Bool_t GetIspA() { return fIspA; }
102 
103  void SetFillOnlySgn(Bool_t a) { fFillOnlySgn=a; }
104  Bool_t GetFillOnlySgn() { return fFillOnlySgn; }
105 
106  void SetTopoConstraint(Bool_t a) { ftopoConstraint=a; }
107  Bool_t GetTopoConstraint() { return ftopoConstraint; }
108 
109  void SetCallKFVertexing(Bool_t a) { fCallKFVertexing=a; }
111 
114 
115  void SetKFCutChi2NDF(Float_t a) {fCutKFChi2NDF = a;}
116  Float_t GetKFCutChi2NDF() {return fCutKFChi2NDF;}
117 
120 
123 
126 
127  void SetTriggerMask(ULong64_t c) { fTriggerMask = c;}
128 
129  private:
130 
131  EBachelor CheckBachelor(AliAODRecoCascadeHF *part, AliAODTrack* bachelor, TClonesArray *mcArray);
132  EK0S CheckK0S(AliAODRecoCascadeHF *part, AliAODv0* v0part, TClonesArray *mcArray);
133  //EK0S CheckK0S(AliAODRecoCascadeHF *part, AliAODTrack* v0part, TClonesArray *mcArray );
134  Int_t FindV0Label(AliAODRecoDecay* v0part, TClonesArray *mcArray) const;
135  Int_t FindLcLabel(AliAODRecoCascadeHF* cascade, TClonesArray *mcArray) const;
136  Int_t CallKFVertexing(AliAODRecoCascadeHF *cascade, AliAODv0* v0part, AliAODTrack* bach, TClonesArray *mcArray,
137  Double_t* V0KF, Double_t* errV0KF, Double_t* LcKF, Double_t* errLcKF,
138  Double_t* distances, Double_t* armPolKF);
139 
140  void FillMCHisto(TClonesArray *mcArray);
141 
144 
145  Bool_t fUseMCInfo;
146  TList *fOutput;
147 
148  // define the histograms
149  TH1F *fCEvents;
150  AliPIDResponse *fPIDResponse;
151  AliPIDCombined *fPIDCombined;
152  Bool_t fIsK0sAnalysis;
155  TList *fListCuts;
156  Bool_t fUseOnTheFlyV0;
158 
162 
163  Bool_t fIspA;
164 
165  TH1F* fHistoEvents;
166  TH1F* fHistoLc;
168  Bool_t fFillOnlySgn;
174  AliAODVertex *fVtx1;
175 
179 
183 
187 
191 
195 
197 
201 
203 
207 
211 
213 
217 
221 
226 
230 
231  TH2D* fHistoKF;
232  TH1D* fHistoKFV0;
233  TH1D* fHistoKFLc;
234 
238 
242 
247 
248  TList *fOutputKF;
249 
250  Int_t fmcLabelLc;
256  Float_t fCutKFChi2NDF;
260  Double_t fBField;
265 
266  ULong64_t fTriggerMask;
267 
270 };
272 
273 #endif
274 
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
TH1D * fHistoKFV0
! KF: V0 code from KF (mass, decaylength, lifetime considered)
TH1D * fHistoDecayLengthLcTrue
! KF: decay length for true cascades reconstructed with KF
TH1F * fHistoLc
! histogram with number of Lc
TH2D * fHistoLifeTimeKFLc
! KF: life time vs life time error for Lc from KF
AliPIDCombined * fPIDCombined
! combined PID response object
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
TH1D * fHistoDecayLengthV0All
! KF: decay length for all V0 reconstructed with KF
virtual void UserCreateOutputObjects()
Implementation of interface methods.
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
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
AliNormalizationCounter * fCounter
switch between Lpi and K0sp
Bool_t fIsEventSelected
flag to analyze also on-the-fly V0 candidates
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
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
TH1D * fHistoDistanceV0ToPrimVtx
! KF: distance V0 vertex from primary vertex
TH1D * fHistoMassLcSgnFromAOD
! KF: AOD mass of signal Lc reconstructed with KF
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
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
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
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
TH2D * fHistoArmenterosPodolanskiV0KF
! KF: Armeteros-Podolanski plot for all V0 from KF
TH1D * fHistoDecayLengthV0fromLcTrue
! KF: decay length of V0 for true cascades reconstructed with KF
AliAnalysisTaskSELc2V0bachelorTMVA & operator=(const AliAnalysisTaskSELc2V0bachelorTMVA &source)
TH1D * fHistoLifeTimeV0fromLcSgn
! KF: life time of V0 for signal Lc reconstructed with KF
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
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
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.