AliPhysics  608b256 (608b256)
AliAnalysisTaskSELc2V0bachelorTMVAApp.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSELC2V0BACHELORTMVAAPP_H
2 #define ALIANALYSISTASKSELC2V0BACHELORTMVAAPP_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: AliAnalysisTaskSELc2V0bachelorTMVAApp.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 IClassifierReader;
41 class ReadBDT_Default;
42 
43 class TH1F;
44 class TH1D;
45 
47 {
48 
49  public:
50 
51  enum EBachelor {
53  kBachFake = 0,
59 
60  enum EK0S {
62  kK0SFake = 0,
63  kK0SNoK0S = 1,
70 
71 
74  Bool_t useOnTheFly=kFALSE);
76 
78  virtual void UserCreateOutputObjects();
79  virtual void Init();
80  virtual void LocalInit() {Init();}
81  virtual void UserExec(Option_t *option);
82  virtual void Terminate(Option_t *option);
83 
86  Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal,
87  TClonesArray *mcArray, Int_t iLctopK0s);
88 
89  void MakeAnalysisForLc2prK0S(AliAODEvent *aodEvent,
90  TClonesArray *arrayLctopK0s,
91  TClonesArray *mcArray,
92  Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal,
93  TClonesArray *array3Prong, AliAODMCHeader *aodheader);
94 
97  void SetTMVAlibName(const char* libName) {fTMVAlibName = libName;}
99  void SetTMVAlibPtBin(const char* libPtBin) {fTMVAlibPtBin = libPtBin;}
103 
105  void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
106  Bool_t GetMC() const {return fUseMCInfo;}
107 
110 
113 
116 
119 
122 
125 
128 
131 
134 
137 
138  void SetTriggerMask(ULong64_t c) { fTriggerMask = c;}
139 
140  void SetFillTree(Bool_t a) { fFillTree = a;}
141 
142  void SetMCNchHisto(TH1F* h){
143  if(fHistoMCNch) delete fHistoMCNch;
144  fHistoMCNch = new TH1F(*h);
145  }
146 
149 
150  private:
151 
152  EBachelor CheckBachelor(AliAODRecoCascadeHF *part, AliAODTrack* bachelor, TClonesArray *mcArray);
153  EK0S CheckK0S(AliAODRecoCascadeHF *part, AliAODv0* v0part, TClonesArray *mcArray);
154  Int_t FindV0Label(AliAODRecoDecay* v0part, TClonesArray *mcArray) const;
155  Int_t FindLcLabel(AliAODRecoCascadeHF* cascade, TClonesArray *mcArray) const;
156  Int_t CallKFVertexing(AliAODRecoCascadeHF *cascade, AliAODv0* v0part, AliAODTrack* bach, TClonesArray *mcArray,
157  Double_t* V0KF, Double_t* errV0KF, Double_t* LcKF, Double_t* errLcKF,
158  Double_t* distances, Double_t* armPolKF);
159 
160  void FillMCHisto(TClonesArray *mcArray);
161 
164  /* TProfile* GetEstimatorHistogram(const AliVEvent *event); */
165 
168 
169  // define the histograms
170  TH1F *fCEvents;
171  AliPIDResponse *fPIDResponse;
172  AliPIDCombined *fPIDCombined;
182 
186 
188  TH1F* fHistoEvents;
193  TH1F* fHistoLc;
201  AliAODVertex *fVtx1;
202 
206 
210 
214 
218 
222 
224 
228 
230 
234 
238 
240 
244 
248 
253 
257 
261 
265 
269 
274 
276 
292 
293  ULong64_t fTriggerMask;
294 
298  TH1F* fHistoMCNch;
299 
303 
305 
322 
324 
327 };
329 
330 #endif
331 
TH1F * fHistoMCLcK0SpGenLimAcc
! histo with MC Lc –> K0S + p
TH2D * fHistoArmenterosPodolanskiV0AODSgn
! KF: AOD Armeteros-Podolanski plot for V0 from signal Lc from KF
Int_t fCurrentEvent
cut for KF on distance to primary vtx for V0
TH1D * fHistoVtxV0ResidualToLc
! KF: residual wrt MC of distance V0 vertex from Lc vertex (MC - KF)
TH2D * fHistoDecayLengthKFV0
! KF: decay length vs decay length error for V0 from KF
EBachelor CheckBachelor(AliAODRecoCascadeHF *part, AliAODTrack *bachelor, TClonesArray *mcArray)
double Double_t
Definition: External.C:58
Float_t fCentrality
tracklet multiplicity in event without eta cut
TH2D * fHistoArmenterosPodolanskiV0KFSgn
! KF: Armeteros-Podolanski plot for V0 from signal Lc from KF
Definition: External.C:236
Int_t fNTracklets_All
tracklet multiplicity in event in [-1. 1]
virtual void UserCreateOutputObjects()
Implementation of interface methods.
TH1D * fHistoDecayLengthLcTrue
! KF: decay length for true cascades reconstructed with KF
TH1F * fHistoMCNch
! histogram with Nch distribution from MC production
Int_t FindLcLabel(AliAODRecoCascadeHF *cascade, TClonesArray *mcArray) const
Int_t FindV0Label(AliAODRecoDecay *v0part, TClonesArray *mcArray) const
AliPIDCombined * fPIDCombined
! combined PID response object
TH2F * fHistoCodesBkg
! histogram with codes for bachelor and V0 for background
TH1D * fHistoMassV0TrueFromAOD
! KF: AOD mass for true V0 reconstructed with KF
TH1D * fHistoDistanceV0ToLc
! KF: distance V0 vertex from Lc vertex
TH2F * fHistoTracklets_All_cent
! histogram with number of tracklets in the event in eta [-999, 999] vs centrality ...
TH2D * fBDTHistoVsSignd0
! BDT classifier vs V0 proton signed d0
TH1D * fHistoMassV0fromLcTrue
! KF: mass of V0 for true cascades reconstructed with KF
TH1D * fHistoLifeTimeV0TrueK0S
! KF: life time for true V0 which are really K0S reconstructed with KF
TH1D * fHistoLifeTimeV0True
! KF: life time for true V0 reconstructed with KF
char Char_t
Definition: External.C:18
TH2D * fBDTHistoVsMassK0S
! BDT classifier vs mass (pi+pi-) pairs
TH1D * fHistoDistanceV0ToPrimVtx
! KF: distance V0 vertex from primary vertex
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)
TList * fOutputKF
! User output1: list of histograms from KF
TH1D * fHistoDecayLengthV0fromLcSgn
! KF: decay length of V0 for signal Lc reconstructed with KF
TH1D * fHistoMassV0fromLcAll
! KF: mass of V0 for all cascades reconstructed with KF
TCanvas * c
Definition: TestFitELoss.C:172
TH2D * fBDTHistoVsCosPAK0S
! BDT classifier vs V0 cosine of pointing angle
TH1D * fHistoMassV0All
! KF: mass for all V0 reconstructed with KF
TH1F * fCEvents
! Histogram to check selected events
TH2D * fHistoMassKFV0
! KF: mass vs mass error for V0 from KF
TH1F * fHistoEvents
! histogram with number of events analyzed
TH1D * fHistoDistanceLcToPrimVtxSgn
! KF: distance of signal Lc vertex from primary vertex
void FillLc2pK0Sspectrum(AliAODRecoCascadeHF *part, Int_t isLc, Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *mcArray, Int_t iLctopK0s)
histos
TH2D * fHistoMassKFLc
! KF: mass vs mass error for Lc from KF
TH2F * fHistoTracklets_1_cent
! histogram with number of tracklets in the event in eta [-1, 1] vs centrality
TH2D * fBDTHistoVsCombinedProtonProb
! BDT classifier vs combined proton probability
TH2F * fHistoCodesSgn
! histogram with codes for bachelor and V0 for signal
TH1F * fHistoCentrality
! histogram with centrality from AliRDHFCuts
void MakeAnalysisForLc2prK0S(AliAODEvent *aodEvent, TClonesArray *arrayLctopK0s, TClonesArray *mcArray, Int_t &nSelectedAnal, AliRDHFCutsLctoV0 *cutsAnal, TClonesArray *array3Prong, AliAODMCHeader *aodheader)
TH1D * fHistoMassLcTrue
! KF: mass for true cascades reconstructed with KF
TH2D * fBDTHistoVsCosThetaStar
! BDT classifier vs proton emission angle in pK0s pair rest frame
TH1D * fHistoDecayLengthV0All
! KF: decay length for all V0 reconstructed with KF
int Int_t
Definition: External.C:63
TH2D * fHistoLifeTimeKFV0
! KF: life time vs life time error for V0 from KF
TH1D * fHistoVtxLcResidualToPrimVtx
! KF: residual wrt MC of distance Lc vertex from primary vertex (MC - KF)
TH1D * fHistoLifeTimeV0All
! KF: life time for all V0 reconstructed with KF
TString fNamesTMVAVar
Pt bin that will be in the library to be loaded for the TMVA.
TH1D * fHistoKFV0
! KF: V0 code from KF (mass, decaylength, lifetime considered)
float Float_t
Definition: External.C:68
TH1D * fHistoMassV0True
! KF: mass for true V0 reconstructed with KF
TH1F * fHistoTracklets_All
! histogram with number of tracklets in the event in eta [-999, 999]
TF1 * fFuncWeightFONLL5overLHC13d3
! weight function for FONLL vs pPb prod.
TH1D * fHistoDecayLengthV0fromLcAll
! KF: decay length of V0 for all cascades reconstructed with KF
Double_t fBField
current event number - for debug purposes
TH1F * fHistoFiducialAcceptance
! histogram to check FiducialAcceptance cut
TTree * fVariablesTreeBkg
! tree of the candidate variables after track selection (Background)
Definition: External.C:228
Definition: External.C:212
TH1D * fHistoLifeTimeV0fromLcSgn
! KF: life time of V0 for signal Lc reconstructed with KF
TH2D * fHistoArmenterosPodolanskiV0KF
! KF: Armeteros-Podolanski plot for all V0 from KF
TH1D * fHistoMassV0TrueK0SFromAOD
! KF: AOD mass for true V0 which are really K0S reconstructed with KF
TH1D * fHistoMassV0fromLcSgn
! KF: mass of V0 for signal Lc reconstructed with KF
TH1F * fHistoLcpKpiBeforeCuts
! histogram number of true Lc–>pKpi (3 prong) before any cut
TH1F * fHistoBackground
AliVertexingHFUtils used to check the generator of a specific candidate.
TH1D * fHistoMassLcAll
! KF: mass for all Lc reconstructed with KF
TH1D * fHistoLifeTimeV0fromLcTrue
! KF: life time of V0 for true cascades reconstructed with KF
Bool_t fUseOnTheFlyV0
list of profiles for z-vtx correction of multiplicity
TF1 * fFuncWeightPythia
mask to the trigger word returned by the physics selection
TString fTMVAlibPtBin
Name of the library to load to have the TMVA weights.
TH1D * fHistoMassV0TrueK0S
! KF: mass for true V0 which are really K0S reconstructed with KF
TH1D * fHistoMassLcSgnFromAOD
! KF: AOD mass of signal Lc reconstructed with KF
TH1D * fHistoDecayLengthV0fromLcTrue
! KF: decay length of V0 for true cascades reconstructed with KF
TH1D * fHistoDecayLengthLcSgn
! KF: decay length of signal Lc reconstructed with KF
TH1D * fHistoDecayLengthV0TrueK0S
! KF: decay length for true V0 which are really K0S reconstructed with KF
AliAnalysisTaskSELc2V0bachelorTMVAApp & operator=(const AliAnalysisTaskSELc2V0bachelorTMVAApp &source)
AliVertexingHFUtils * fUtils
flag to fill bkg with only candidates that have daughters generated by HIJING (to be used for enriche...
TH2D * fHistoKF
! KF: V0 code vs Lc code from KF (mass, decaylength, lifetime considered)
TH2D * fHistoArmenterosPodolanskiV0AOD
! KF: AOD Armeteros-Podolanski plot for all V0 from KF
TH1D * fHistoKFLc
! KF: Lc code from KF (mass, decaylength, lifetime considered)
AliPIDResponse * fPIDResponse
! PID response object
TH1D * fHistoMassLcSgn
! KF: mass of signal Lc reconstructed with KF
Float_t fCutKFDeviationFromVtxV0
cut for KF on distance to primary vtx
Bool_t fIsEventSelected
flag to analyze also on-the-fly V0 candidates
AliNormalizationCounter * fCounter
switch between Lpi and K0sp
TH1F * fHistoMCLcK0SpGen
flag to allow to use only PYTHIA tracks for background
TH1D * fHistoMassLcTrueFromAOD
! KF: AOD mass for true cascades reconstructed with KF
Float_t * fCandidateVariables
! variables to be written to the tree
TH1D * fHistoDistanceV0ToLcSgn
! KF: distance for signal Lc of V0 vertex from Lc vertex
TH1D * fHistoLifeTimeLcSgn
! KF: life time of signal Lc reconstructed with KF
Bool_t fCallKFVertexing
flag to use topological constraints in KF
TH1D * fHistoLifeTimeLcAll
! KF: life time for all Lc reconstructed with KF
TF1 * fFuncWeightFONLL5overLHC13d3Lc
! weight function for FONLL vs pPb prod.
const char Option_t
Definition: External.C:48
TH1D * fHistoLifeTimeLcTrue
! KF: life time for true cascades reconstructed with KF
TH1F * fHistoLcOnTheFly
! histogram with number of Lc with on-the-fly V0
EK0S CheckK0S(AliAODRecoCascadeHF *part, AliAODv0 *v0part, TClonesArray *mcArray)
TH2D * fBDTHistoVstImpParBach
! BDT classifier vs proton d0
TH1D * fHistoDecayLengthV0True
! KF: decay length for true V0 reconstructed with KF
bool Bool_t
Definition: External.C:53
TH2D * fBDTHistoVsBachelorPt
! BDT classifier vs proton pT
TH1D * fHistoLifeTimeV0fromLcAll
! KF: life time of V0 for all cascades reconstructed with KF
TH1F * fHistoLcBeforeCuts
flag to fill only signal (speeding up processing)
Bool_t fKeepingOnlyPYTHIABkg
magnetic field of current event
TH2D * fHistoDecayLengthKFLc
! KF: decay length vs decay length error for Lc from KF
TH2D * fHistoLifeTimeKFLc
! KF: life time vs life time error for Lc from KF
Bool_t fKeepingOnlyHIJINGBkg
flag to decide whether to call or not KF
TH1F * fHistoMCLcK0SpGenAcc
! histo with MC Lc –> K0S + p
TH1F * fHistoTracklets_1
! histogram with number of tracklets in the event in eta [-1, 1]
TH1D * fHistoVtxV0ResidualToPrimVtx
! KF: residual wrt MC of distance V0 vertex from primary vertex (MC - KF)
TH2D * fBDTHisto
vector of the names of the input variables
TH1D * fHistoDistanceV0ToPrimVtxSgn
! KF: distance for signal Lc of V0 vertex from primary vertex
IClassifierReader * fBDTReader
flag to decide whether to fill the sgn and bkg trees
TH1D * fHistoDecayLengthLcAll
! KF: decay length for all Lc reconstructed with KF
Class with functions useful for different D2H analyses //.