AliPhysics  8d00e07 (8d00e07)
AliAnalysisTaskSEOmegac2eleOmegafromAODtracks.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSEOMEGAC2ELEOMEGAFROMAODTRACKS_H
2 #define ALIANALYSISTASKSEOMEGAC2ELEOMEGAFROMAODTRACKS_H
3 
4 /**************************************************************************
5  * Copyright(c) 1998-2009, 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 /* $Id$ */
20 
21 #include "TROOT.h"
22 #include "TSystem.h"
23 
24 #include "AliAnalysisTaskSE.h"
25 #include "AliAODEvent.h"
26 #include "AliPID.h"
28 
30 
31 class THnSparse;
32 class TH1F;
33 class TClonesArray;
35 class AliESDVertex;
36 class AliAODMCParticle;
37 class AliEventPoolManager;
39 
41 {
42  public:
46 
48  virtual void UserCreateOutputObjects();
49  virtual void Init();
50  virtual void LocalInit() {Init();}
51  virtual void UserExec(Option_t *option);
52  virtual void Terminate(Option_t *option);
53 
54  void FillROOTObjects(AliAODRecoCascadeHF *elobj, AliAODcascade *casc, AliAODTrack *trk, TClonesArray *mcArray, Bool_t mixing);
55  void FillElectronROOTObjects(AliAODTrack *trk, TClonesArray *mcArray);
56  void FillCascROOTObjects(AliAODcascade *casc, TClonesArray *mcArray);
57  void FillMCROOTObjects(AliAODMCParticle *part, AliAODMCParticle *mcepart, AliAODMCParticle *mcv0part, Int_t decaytype);
58  void MakeMCAnalysis(TClonesArray *mcArray);
59  void MakeAnalysis(AliAODEvent *aod, TClonesArray *mcArray);
60 
61  void SelectCascade( const AliVEvent *event,Int_t nCasc,Int_t &nSeleCasc, Bool_t *seleCascFlags, TClonesArray *mcArray);
62  void SelectTrack( const AliVEvent *event, Int_t trkEntries, Int_t &nSeleTrks,Bool_t *seleFlags, TClonesArray *mcArray);
63 
65  void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
66  Bool_t GetMC() const {return fUseMCInfo;}
67  void SetUseCentralityV0M(Bool_t centon) {fUseCentralityV0M = centon;}
73 
75 
76  AliAODRecoCascadeHF* MakeCascadeHF(AliAODcascade *casc, AliAODTrack *trk, AliAODEvent *aod, AliAODVertex *vert, Bool_t mixing);
77  AliAODVertex* ReconstructSecondaryVertex(AliAODcascade *casc, AliAODTrack *trk, AliAODEvent *aod);
78  Int_t MatchToMC(AliAODRecoCascadeHF *elobj, TClonesArray *mcArray, Int_t *pdgarray_ele, Int_t *pdgarray_casc, Int_t *labelarray_ele, Int_t *labelarray_casc, Int_t &ngen_ele, Int_t &ngen_casc);
79  Int_t MatchToMCCascade(AliAODcascade *theCascade, Int_t pdgabscasc, Int_t *pdgDgcasc, Int_t *pdgDgv0, TClonesArray *mcArray) const;
80 
81 
86  void SetPoolPVzBinLimits(Int_t Nzvtxbins,const Double_t *ZvtxBins){
87  fNzVtxBins = Nzvtxbins;
88  for(int ix = 0;ix<fNzVtxBins+1;ix++){fZvtxBins[ix] = ZvtxBins[ix];}
89  }
90  void SetPoolCentBinLimits(Int_t Ncentbins,const Double_t *CentBins){
91  fNCentBins = Ncentbins;
92  for(int ix = 0;ix<fNCentBins+1;ix++){fCentBins[ix] = CentBins[ix];}
93  }
94  void DoEventMixingWithPools(Int_t index,AliAODEvent *aodEvent, Bool_t *seleFlags);
95  void ResetPool(Int_t poolIndex);
96  Int_t GetPoolIndex(Double_t zvert, Double_t mult);
97 
98 
99  private:
100 
103 
104  void DefineTreeVariables();
105  void DefineEleTreeVariables();
107  void DefineMCTreeVariables();
110 
111  AliAODVertex *CallPrimaryVertex(AliAODcascade *casc, AliAODTrack *trk, AliAODEvent *evt);
112  AliAODVertex* PrimaryVertex(const TObjArray *trkArray,AliVEvent *event);
113 
118  TH1F *fCEvents;
119  TH1F *fHTrigger;
120  TH1F *fHCentrality;
121  AliRDHFCutsOmegactoeleOmegafromAODtracks *fAnalCuts;// Cuts - sent to output slot 2
122  Bool_t fIsEventSelected; // flag for event selected
123  Bool_t fWriteVariableTree; // flag to decide whether to write the candidate variables on a tree variables
130  Bool_t fReconstructPrimVert; // /Reconstruct primary vertex excluding candidate tracks
140  AliAODVertex *fVtx1;
141  AliESDVertex *fV1;
148 
149  //--------------------- My histograms ------------------
150  THnSparse* fHistoEleOmegaMass;
151  THnSparse* fHistoEleOmegaMassRS;
152  THnSparse* fHistoEleOmegaMassWS;
169 
170  THnSparse* fHistoElePtvsEtaRS;
171  THnSparse* fHistoElePtvsEtaWS;
174  THnSparse* fHistoElePtvsEtaMCS;
176 
183 
184  THnSparse* fHistoElePtvsd0RS;
185  THnSparse* fHistoElePtvsd0WS;
186  THnSparse* fHistoElePtvsd0RSMix;
187  THnSparse* fHistoElePtvsd0WSMix;
188  THnSparse* fHistoElePtvsd0MCS;
189 
190  TH1F* fHistoBachPt;
193  TH1F* fHistod0Bach;
205 
210 
211  //Mixing
215  Double_t fZvtxBins[100]; // [fNzVtxBinsDim]
217  Double_t fCentBins[100]; // [fNCentBinsDim]
220  TObjString *fEventInfo;
222 
223 
226 };
228 #endif
229 
THnSparse * fHistoEleOmegaMassRSMix
! e-Omega mass spectra (right-sign)
THnSparse * fHistoEleOmegaMassvsElePtWSMix
! e-Omega mass-ept spectra (wrong-sign)
THnSparse * fHistoEleOmegaMassRS
! e-Omega mass spectra (right-sign)
double Double_t
Definition: External.C:58
void FillCascROOTObjects(AliAODcascade *casc, TClonesArray *mcArray)
THnSparse * fHistoEleOmegaMassMCGen
! e-Omega mass spectra (Efficiency denominator)
THnSparse * fHistoElePtvsOmegaPtMCGen
! e-Omega spectra (wrong-sign) efficiency denominator
THnSparse * fHistoEleOmegaMassvsElePtMCGen
! e-Omega mass-ept spectra (Efficiency denominator)
Definition: External.C:236
TH2F * fHistoElectronTPCPIDSelTOFSmallEta
! TPC electron PID after TOF 3 sigma cut (|eta|<0.6)
AliNormalizationCounter * fCounter
!Counter for normalization
TH2F * fHistoElectronTPCPIDSelTOF
! TPC electron PID after TOF 3 sigma cut
char Char_t
Definition: External.C:18
AliAODVertex * CallPrimaryVertex(AliAODcascade *casc, AliAODTrack *trk, AliAODEvent *evt)
Int_t MatchToMCCascade(AliAODcascade *theCascade, Int_t pdgabscasc, Int_t *pdgDgcasc, Int_t *pdgDgv0, TClonesArray *mcArray) const
Int_t fNzVtxBins
maximum number of events to be used in event mixing
AliAODRecoCascadeHF * MakeCascadeHF(AliAODcascade *casc, AliAODTrack *trk, AliAODEvent *aod, AliAODVertex *vert, Bool_t mixing)
Bool_t fWriteMCVariableTree
flag to decide whether to write the candidate variables on a tree variables
TTree * fMCVariablesTree
! tree of the candidate variables after track selection on output slot 4
TString part
use mixed event to constrain combinatorial background
Definition: InvMassFit.C:52
void FillMCROOTObjects(AliAODMCParticle *part, AliAODMCParticle *mcepart, AliAODMCParticle *mcv0part, Int_t decaytype)
AliAODVertex * PrimaryVertex(const TObjArray *trkArray, AliVEvent *event)
THnSparse * fHistoEleOmegaMassvsElePtMCS
! e-Omega mass-ept spectra (Efficiency numerator)
void SetPoolPVzBinLimits(Int_t Nzvtxbins, const Double_t *ZvtxBins)
TTree * fEleVariablesTree
flag to decide whether to write the candidate variables on a tree variables
THnSparse * fHistoElePtvsEtaMCGen
! e spectra (wrong-sign) efficiency denominator
THnSparse * fHistoEleOmegaMassWSMix
! e-Omega mass spectra (wrong-sign)
Float_t * fCandidateEleVariables
! variables to be written to the tree
THnSparse * fHistoElePtvsOmegaPtRSMix
! e-Omega spectra (right-sign, mix)
Int_t MatchToMC(AliAODRecoCascadeHF *elobj, TClonesArray *mcArray, Int_t *pdgarray_ele, Int_t *pdgarray_casc, Int_t *labelarray_ele, Int_t *labelarray_casc, Int_t &ngen_ele, Int_t &ngen_casc)
void SelectCascade(const AliVEvent *event, Int_t nCasc, Int_t &nSeleCasc, Bool_t *seleCascFlags, TClonesArray *mcArray)
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
virtual void UserCreateOutputObjects()
Implementation of interface methods.
THnSparse * fHistoElePtvsEtaMCS
! e spectra (right-sign) efficiency numerator
THnSparse * fHistoEleOmegaMassMCS
! e-Omega mass spectra (Efficiency numerator)
THnSparse * fHistoElePtvsOmegaPtWSMix
! e-Omega spectra (wrong-sign, mix)
THnSparse * fHistoEleOmegaMassvsElePtWS
! e-Omega mass spectra (wrong-sign)
AliAnalysisTaskSEOmegac2eleOmegafromAODtracks & operator=(const AliAnalysisTaskSEOmegac2eleOmegafromAODtracks &source)
TObjArray * fElectronTracks
unique event id for mixed event check
Float_t * fCandidateCascVariables
! variables to be written to the tree
Float_t * fCandidateMCVariables
! variables to be written to the tree
void SelectTrack(const AliVEvent *event, Int_t trkEntries, Int_t &nSeleTrks, Bool_t *seleFlags, TClonesArray *mcArray)
TTree * fVariablesTree
! tree of the candidate variables after track selection on output slot 4
TH1F * fHistoBachPtMCGen
! Bachelor pT histogram (efficiency denominator)
THnSparse * fHistoEleOmegaMassWS
! e-Omega mass spectra (wrong-sign)
TH1F * fHistoBachPtMCS
! Bachelor pT histogram (efficiency numerator)
TTree * fCascVariablesTree
! tree of the candidate variables after track selection on output slot 4
TList * fOutputAll
! User Output slot 3 //analysis histograms
THnSparse * fHistoElePtvsOmegaPtMCS
! e-Omega spectra (right-sign) efficiency numerator
THnSparse * fHistoEleOmegaMassvsElePtRS
! e-Omega mass spectra (right-sign)
const char Option_t
Definition: External.C:48
void SetPoolCentBinLimits(Int_t Ncentbins, const Double_t *CentBins)
bool Bool_t
Definition: External.C:53
THnSparse * fHistoElePtvsd0WSMix
! e pt-d0 spectra (wrong-sign, mix)
THnSparse * fHistoElePtvsd0RSMix
! e pt-d0 spectra (right-sign, mix)
void FillROOTObjects(AliAODRecoCascadeHF *elobj, AliAODcascade *casc, AliAODTrack *trk, TClonesArray *mcArray, Bool_t mixing)
TH2F * fHistoElectronTPCPIDSelTOFLargeEta
! TPC electron PID after TOF 3 sigma cut (0.8>|eta|>0.6)
void DoEventMixingWithPools(Int_t index, AliAODEvent *aodEvent, Bool_t *seleFlags)
AliAODVertex * ReconstructSecondaryVertex(AliAODcascade *casc, AliAODTrack *trk, AliAODEvent *aod)
THnSparse * fHistoEleOmegaMassvsElePtRSMix
! e-Omega mass-ept spectra (right-sign)