AliPhysics  6f1d526 (6f1d526)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskSELc2pK0sfromAODtracks.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKSELC2PK0SFROMAODTRACKS_H
2 #define ALIANALYSISTASKSELC2PK0SFROMAODTRACKS_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 "TVector.h"
23 #include "TSystem.h"
24 
25 #include "AliAnalysisTaskSE.h"
26 #include "AliAODEvent.h"
27 #include "AliPID.h"
29 
31 
32 class THnSparse;
33 class TH1F;
34 class TH2F;
35 class TH3F;
36 class TClonesArray;
38 class AliESDVertex;
39 class AliAODMCParticle;
40 class AliEventPoolManager;
42 
44 {
45  public:
47  AliAnalysisTaskSELc2pK0sfromAODtracks(const Char_t* name, AliRDHFCutsLctopK0sfromAODtracks* cuts, Bool_t writeVariableTree=kTRUE);
49 
51  virtual void UserCreateOutputObjects();
52  virtual void Init();
53  virtual void LocalInit() {Init();}
54  virtual void UserExec(Option_t *option);
55  virtual void Terminate(Option_t *option);
56 
57  void FillROOTObjects(AliAODRecoCascadeHF *lcobj, AliAODv0 *v0, AliAODTrack *trk, AliAODTrack *trkpid, AliAODEvent *aod, TClonesArray *mcarray);
58  void FillMixROOTObjects(TLorentzVector *pt, TLorentzVector *ev, TVector *tinfo, TVector *vinfo);
59  Bool_t MakeMCAnalysis(TClonesArray *mcArray);
60  void MakeAnalysis(AliAODEvent *aod, TClonesArray *mcArray);
61  void FillProtonROOTObjects(AliAODTrack *trk, TClonesArray *mcArray);
62  void FillMCROOTObjects(AliAODMCParticle *part, AliAODMCParticle *mcepart, AliAODMCParticle *mcv0part, Int_t decaytype);
63  void FillV0ROOTObjects(AliAODv0 *v0, TClonesArray *mcArray);
64  void FillMCProtonROOTObjects(AliAODMCParticle *mcepart, TClonesArray *mcArray);
65  void FillMCV0ROOTObjects(AliAODMCParticle *mcv0part, TClonesArray *mcArray);
66  void SelectV0( const AliVEvent *event,Int_t nV0,Int_t &nSeleV0, Bool_t *seleV0Flags, TClonesArray *mcArray);
67  void SelectTrack( const AliVEvent *event, Int_t trkEntries, Int_t &nSeleTrks,Int_t *seleFlags, TClonesArray *mcArray);
68  Int_t MatchToMC(AliAODRecoCascadeHF *elobj, TClonesArray *mcArray, Int_t *pdgarray_pr, Int_t *pdgarray_v0, Int_t *labelarray_pr, Int_t *labelarray_v0, Int_t &ngen_pr, Int_t &ngen_v0);
69 
70 
72  void SetMC(Bool_t theMCon) {fUseMCInfo = theMCon;}
73  Bool_t GetMC() const {return fUseMCInfo;}
74  void SetUseCentralityV0M(Bool_t centon) {fUseCentralityV0M = centon;}
76 
78 
79  AliAODRecoCascadeHF* MakeCascadeHF(AliAODv0 *casc, AliAODTrack *trk, AliAODTrack *trkpid, AliAODEvent *aod, AliAODVertex *vert);
80  AliAODVertex* ReconstructSecondaryVertex(AliAODv0 *casc, AliAODTrack *trk, AliAODEvent *aod);
81 
82  void StoreGlobalTrackReference(AliAODTrack *track, Int_t);
84 
89  void SetPoolPVzBinLimits(Int_t Nzvtxbins,const Double_t *ZvtxBins){
90  fNzVtxBins = Nzvtxbins;
91  for(int ix = 0;ix<fNzVtxBins+1;ix++){fZvtxBins[ix] = ZvtxBins[ix];}
92  }
93  void SetPoolCentBinLimits(Int_t Ncentbins,const Double_t *CentBins){
94  fNCentBins = Ncentbins;
95  for(int ix = 0;ix<fNCentBins+1;ix++){fCentBins[ix] = CentBins[ix];}
96  }
97  void SetPoolRPBinLimits(Int_t Nrpbins,const Double_t *rpbins){
98  fNRPBins = Nrpbins;
99  for(int ix = 0;ix<fNRPBins+1;ix++){fRPBins[ix] = rpbins[ix];}
100  }
101  void DoEventMixingWithPools(Int_t index);
102  void ResetPool(Int_t poolIndex);
103  Int_t GetPoolIndex(Double_t zvert, Double_t mult, Double_t rp);
104 
105  private:
106 
109 
110  void DefineTreeVariables();
112  void DefineV0TreeVariables();
113  void DefineMCTreeVariables();
118 
119  AliAODVertex *CallPrimaryVertex(AliAODv0 *v0, AliAODTrack *trk, AliAODEvent *evt);
120  AliAODVertex* PrimaryVertex(const TObjArray *trkArray,AliVEvent *event);
121 
126  TH1F *fCEvents;
127  TH1F *fHTrigger;
128  TH1F *fHCentrality;
153  AliAODVertex *fVtx1;
154  AliESDVertex *fV1;
164 
165  //--------------------- My histograms ------------------
169 
170  THnSparse* fHistoLcMCGen;
171  THnSparse* fHistoLcK0SpMass;
172  THnSparse* fHistoLcK0SpMassMix;
178  THnSparse* fHistoLcK0SpMassMCS;
180  THnSparse* fHistoLcKPluspMass;
181  THnSparse* fHistoLcKMinuspMass;
184 
194  TH1F* fHistod0Bach;
195  TH1F* fHistod0V0;
196  TH1F* fHistod0d0;
203 
207 
208  // Store pointers to global tracks for pid and dca
209  AliAODTrack **fGTI;
212 
213  //Mixing
217  Double_t fZvtxBins[100]; // [fNzVtxBinsDim]
219  Double_t fCentBins[100]; // [fNCentBinsDim]
221  Double_t fRPBins[100]; // [fNRPBinsDim]
224  TObjString *fEventInfo;
229 
230 
233 };
235 #endif
236 
TTree * fMCVariablesTree
! tree of the candidate variables after track selection on output slot 7
void FillProtonROOTObjects(AliAODTrack *trk, TClonesArray *mcArray)
double Double_t
Definition: External.C:58
Definition: External.C:260
Int_t MatchToMC(AliAODRecoCascadeHF *elobj, TClonesArray *mcArray, Int_t *pdgarray_pr, Int_t *pdgarray_v0, Int_t *labelarray_pr, Int_t *labelarray_v0, Int_t &ngen_pr, Int_t &ngen_v0)
Definition: External.C:236
TH2F * fHistoBachPtMCGen
! Bachelor pT histogram (efficiency denominator)
TObjArray * fProtonTracks
unique event id for mixed event check
void SelectTrack(const AliVEvent *event, Int_t trkEntries, Int_t &nSeleTrks, Int_t *seleFlags, TClonesArray *mcArray)
AliAODVertex * PrimaryVertex(const TObjArray *trkArray, AliVEvent *event)
TH1F * fHistoProbProton
! Probability to be proton histogram
TH1F * fHReactionPlane
! Histogram to check Reaction plane
char Char_t
Definition: External.C:18
Float_t * fCandidateProtonVariables
! variables to be written to the tree
void SetPoolPVzBinLimits(Int_t Nzvtxbins, const Double_t *ZvtxBins)
TTree * fVariablesTree
flag to decide whether to write the candidate variables on a tree variables
void SetPoolRPBinLimits(Int_t Nrpbins, const Double_t *rpbins)
TH2F * fHistoKaonPtMCGen
! Kaon pT histogram (efficiency denominator)
TH2F * fHistoKaonPtMCS
! Kaon pT histogram (efficiency numerator)
Float_t * fCandidateV0Variables
! variables to be written to the tree
AliAnalysisTaskSELc2pK0sfromAODtracks & operator=(const AliAnalysisTaskSELc2pK0sfromAODtracks &source)
TH1F * fHCentrality
! Histogram to check Centrality
TTree * fMCProtonVariablesTree
! tree of the candidate variables after track selection on output slot 9
int Int_t
Definition: External.C:63
TTree * fMCV0VariablesTree
! tree of the candidate variables after track selection on output slot 10
const UShort_t fTrackBuffSize
Array of integers to keep the index of tpc only track.
float Float_t
Definition: External.C:68
AliAODRecoCascadeHF * MakeCascadeHF(AliAODv0 *casc, AliAODTrack *trk, AliAODTrack *trkpid, AliAODEvent *aod, AliAODVertex *vert)
TTree * fProtonVariablesTree
! tree of the candidate variables after track selection on output slot 5
virtual void UserCreateOutputObjects()
Implementation of interface methods.
void MakeAnalysis(AliAODEvent *aod, TClonesArray *mcArray)
Definition: External.C:228
TH2F * fHistoBachPtMCS
! Bachelor pT histogram (efficiency numerator)
TObjArray * fV0CutVarsArray
array of RDHF cut information
void FillMCV0ROOTObjects(AliAODMCParticle *mcv0part, TClonesArray *mcArray)
Bool_t fWriteMCVariableTree
flag to decide whether to write the candidate variables on a tree variables
Bool_t fWriteEachVariableTree
flag to decide whether to write the candidate variables on a tree variables
Int_t GetPoolIndex(Double_t zvert, Double_t mult, Double_t rp)
void SelectV0(const AliVEvent *event, Int_t nV0, Int_t &nSeleV0, Bool_t *seleV0Flags, TClonesArray *mcArray)
void FillROOTObjects(AliAODRecoCascadeHF *lcobj, AliAODv0 *v0, AliAODTrack *trk, AliAODTrack *trkpid, AliAODEvent *aod, TClonesArray *mcarray)
TTree * fV0VariablesTree
! tree of the candidate variables after track selection on output slot 6
Int_t fNzVtxBins
maximum number of events to be used in event mixing
void FillV0ROOTObjects(AliAODv0 *v0, TClonesArray *mcArray)
Float_t * fCandidateMCVariables
! variables to be written to the tree
void FillMixROOTObjects(TLorentzVector *pt, TLorentzVector *ev, TVector *tinfo, TVector *vinfo)
void FillMCROOTObjects(AliAODMCParticle *part, AliAODMCParticle *mcepart, AliAODMCParticle *mcv0part, Int_t decaytype)
Bool_t fIsMB
Reconstruct primary vertex excluding candidate tracks.
TList * fOutputAll
! User Output slot 3 //analysis histograms
Float_t * fCandidateMCV0Variables
! variables to be written to the tree
unsigned short UShort_t
Definition: External.C:28
TH1F * fCEvents
! Histogram to check selected events
const char Option_t
Definition: External.C:48
Float_t * fCandidateMCProtonVariables
! variables to be written to the tree
void FillMCProtonROOTObjects(AliAODMCParticle *mcepart, TClonesArray *mcArray)
bool Bool_t
Definition: External.C:53
Double_t fCentBins[100]
number of centrality bins
AliNormalizationCounter * fCounter
EvNumber counter.
AliAODVertex * CallPrimaryVertex(AliAODv0 *v0, AliAODTrack *trk, AliAODEvent *evt)
TObjArray * fV0Tracks
array of electron-compatible tracks
Int_t * fGTIndex
Array of pointers, just nicely sorted according to the id.
void SetPoolCentBinLimits(Int_t Ncentbins, const Double_t *CentBins)
AliAODVertex * ReconstructSecondaryVertex(AliAODv0 *casc, AliAODTrack *trk, AliAODEvent *aod)
Int_t fDoEventMixing
Size of the above array, ~12000 for PbPb.
TH1F * fHistoV0CosPA
! V0 cosine pointing angle to primary vertex
TObjArray * fProtonCutVarsArray
array of lambda-compatible tracks