AliPhysics  c7b8e89 (c7b8e89)
AliAnalysisTaskSEBPlustoD0Pi.h
Go to the documentation of this file.
1 #ifndef AliAnalysisTaskSEBPlustoD0Pi_H
2 #define AliAnalysisTaskSEBPlustoD0Pi_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 // Author Lennart van Doremalen
19 // Utrecht University - l.v.r.vandoremalen@uu.nl
20 //
21 // Several AliPhysics classes have been used as a basis for this code
22 //
24 
25 
26 /* $Id$ */
27 
29 
30 #include <vector>
31 #include <TH3F.h>
33 #include "AliAODVertex.h"
34 #include "AliAODMCHeader.h"
35 
36 #include "AliAnalysisTaskSE.h"
37 
39 
41 {
42 
43  public:
44 
48 
50  virtual void UserCreateOutputObjects();
51  virtual void Init();
52  virtual void LocalInit() {Init();}
53  virtual void UserExec(Option_t *option);
54  virtual void Terminate(Option_t *option);
55 
57  void DefineHistograms();
58 
59  //selection and reconstruction
60  void BPlustoD0PiSignalTracksInMC(TClonesArray * mcTrackArray,AliAODEvent* aodevent,TMatrix * BPlustoD0PiLabelMatrix, TList *listout);
61  Bool_t D0FirstDaughterSelection(AliAODTrack* aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray * mcTrackArray, TMatrix * B0toDStarPiLabelMatrix, AliAODMCHeader * header);
62  Bool_t D0SecondDaughterSelection(AliAODTrack* aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray * mcTrackArray, TMatrix * B0toDStarPiLabelMatrix, AliAODMCHeader * header);
63  void BPlusPionSelection(AliAODEvent* aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray * mcTrackArray, TMatrix * BPlustoD0PiLabelMatrix, AliAODMCHeader * header);
64 
65  void D0Selection(AliAODEvent* aodEvent, AliAODVertex *primaryVertex, Double_t bz,TClonesArray * mcTrackArray, TMatrix * BPlustoD0PiLabelMatrix, TClonesArray * D0TracksFromFriendFile, AliAODMCHeader * header);
66  void BPlusSelection(AliAODEvent* aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray * mcTrackArray, TMatrix * BPlustoD0PiLabelMatrix, TClonesArray * D0TracksFromFriendFile, AliAODMCHeader * header);
67  Int_t IsTrackInjected(AliAODTrack *part,AliAODMCHeader *header,TClonesArray *arrayMC);
68  Bool_t IsCandidateInjected(AliAODRecoDecayHF2Prong *part, AliAODMCHeader *header,TClonesArray *arrayMC);
69  void CutOptimizationLoop(Int_t variable, Int_t nVariables, Int_t nCuts, Int_t ptBin, Int_t fillNumber, Bool_t isDesiredCandidate);
71 
72  AliAODVertex* RecalculateVertex(const AliVVertex *primary,TObjArray *tracks,Double_t bField, Double_t dispersion);
73  void FillFinalTrackHistograms(AliAODRecoDecayHF2Prong * selectedBPlus, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate,TClonesArray * mcTrackArray);
74 
75  void FillD0Histograms(AliAODRecoDecayHF2Prong * selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType, Int_t pdgCodeMother = -1);
76  void FillBPlusHistograms(AliAODRecoDecayHF2Prong * selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType);
77  Int_t MatchCandidateToMonteCarlo(Int_t pdgabs, AliAODRecoDecayHF2Prong * candidate, TClonesArray *mcArray, TMatrix * B0toDStarPiLabelMatrix) const;
78 
79  void TwoTrackCombinationInfo(AliExternalTrackParam * firstTrack, AliExternalTrackParam * secondTrack, AliAODVertex * primaryVertex, Double_t bz, Bool_t isDesiredCandidate, TString histogram_name, UInt_t prongs[2]);
80  void ThreeTrackCombinationInfo(AliExternalTrackParam * firstTrack, AliExternalTrackParam * secondTrack, AliExternalTrackParam * thirdTrack, AliAODVertex * primaryVertex, Double_t bz, Bool_t isDesiredCandidate, TString histogram_name, UInt_t prongs[3]);
81 
83  void SetMC(Bool_t bUseMCInfo) {fUseMCInfo = bUseMCInfo;}
84  Bool_t GetMC() const {return fUseMCInfo;}
85 
87 
89  void SetGetCutInfo(Bool_t value){fGetCutInfo = value;}
90 
91  void SetShowMask(Bool_t bShowMask) {fShowMask = bShowMask;}
92  Bool_t GetShowMask() const {return fShowMask;}
93 
94  void SetShowRejection(Bool_t bShowRejection) {fShowRejection = bShowRejection;}
96 
97  // void SetUse3DHistograms(Bool_t bUse3DHistograms) {fUse3DHistograms = bUse3DHistograms;}
98  // Bool_t GetUse3DHistograms() const {return fUse3DHistograms;}
99 
100  // void SetUpgradeSetting(Int_t nUpgradeSetting) {fUpgradeSetting = nUpgradeSetting;}
101  // Int_t GetUpgradeSetting() const {return fUpgradeSetting;}
102 
105 
108 
111 
114 
115  void SetPerformCutOptimization(Bool_t bPerformCutOptimization) {fPerformCutOptimization = bPerformCutOptimization;}
117 
118  private:
119 
122 
124  Bool_t fUseMCInfo; // Use MC info
129  // Bool_t fUse3DHistograms; //
130  // Int_t fUpgradeSetting; //
136 
146 
147  AliRDHFCutsBPlustoD0Pi *fCuts; // Cuts - sent to output
148 
149  TH1F *fCEvents;
150 
151  std::vector<Int_t> * fBPlusPionTracks;
152  std::vector<Int_t> * fD0Tracks;
153 
161 
162 
163  TH1F* fDaughterHistogramArray[4][6][15];
166  TH1F* fMotherHistogramArray[6][99][60];
169 
171  ClassDef(AliAnalysisTaskSEBPlustoD0Pi,2);
172 };
174 
175 #endif
176 
Int_t IsTrackInjected(AliAODTrack *part, AliAODMCHeader *header, TClonesArray *arrayMC)
void SetShowRejection(Bool_t bShowRejection)
double Double_t
Definition: External.C:58
Double_t DeltaInvMassBPlusKpipi(AliAODRecoDecayHF2Prong *BPlus) const
Definition: External.C:236
Bool_t D0FirstDaughterSelection(AliAODTrack *aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, AliAODMCHeader *header)
Double_t bz
char Char_t
Definition: External.C:18
void BPlustoD0PiSignalTracksInMC(TClonesArray *mcTrackArray, AliAODEvent *aodevent, TMatrix *BPlustoD0PiLabelMatrix, TList *listout)
void SetPerformCutOptimization(Bool_t bPerformCutOptimization)
virtual void Terminate(Option_t *option)
AliAODVertex * RecalculateVertex(const AliVVertex *primary, TObjArray *tracks, Double_t bField, Double_t dispersion)
void BPlusPionSelection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *BPlustoD0PiLabelMatrix, AliAODMCHeader *header)
Bool_t D0SecondDaughterSelection(AliAODTrack *aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, AliAODMCHeader *header)
void TwoTrackCombinationInfo(AliExternalTrackParam *firstTrack, AliExternalTrackParam *secondTrack, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate, TString histogram_name, UInt_t prongs[2])
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
Int_t MatchCandidateToMonteCarlo(Int_t pdgabs, AliAODRecoDecayHF2Prong *candidate, TClonesArray *mcArray, TMatrix *B0toDStarPiLabelMatrix) const
AliAnalysisTaskSEBPlustoD0Pi & operator=(const AliAnalysisTaskSEBPlustoD0Pi &source)
void ThreeTrackCombinationInfo(AliExternalTrackParam *firstTrack, AliExternalTrackParam *secondTrack, AliExternalTrackParam *thirdTrack, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate, TString histogram_name, UInt_t prongs[3])
void CutOptimizationLoop(Int_t variable, Int_t nVariables, Int_t nCuts, Int_t ptBin, Int_t fillNumber, Bool_t isDesiredCandidate)
void SetMC(Bool_t bUseMCInfo)
set MC usage
Float_t fCutVariableValueArray[99]
[fnPtBinsD0forD0ptbinLimits]
virtual void UserCreateOutputObjects()
Implementation of interface methods.
void FillBPlusHistograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType)
void CutOptimizationVariableValues(AliAODRecoDecayHF2Prong *candidateBPlus, AliAODEvent *aod)
void FillD0Histograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType, Int_t pdgCodeMother=-1)
void FillFinalTrackHistograms(AliAODRecoDecayHF2Prong *selectedBPlus, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate, TClonesArray *mcTrackArray)
Bool_t IsCandidateInjected(AliAODRecoDecayHF2Prong *part, AliAODMCHeader *header, TClonesArray *arrayMC)
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
virtual void UserExec(Option_t *option)
void BPlusSelection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *BPlustoD0PiLabelMatrix, TClonesArray *D0TracksFromFriendFile, AliAODMCHeader *header)
void D0Selection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *BPlustoD0PiLabelMatrix, TClonesArray *D0TracksFromFriendFile, AliAODMCHeader *header)