AliPhysics  8b695ca (8b695ca)
AliAnalysisTaskGammaConvV1.h
Go to the documentation of this file.
1 #ifndef ALIANLYSISTASKGAMMACONVV1_cxx
2 #define ALIANLYSISTASKGAMMACONVV1_cxx
3 
4 #include "AliAnalysisTaskSE.h"
5 #include "AliESDtrack.h"
6 #include "AliV0ReaderV1.h"
7 #include "AliCaloPhotonCuts.h"
8 #include "AliConvEventCuts.h"
12 #include "AliConversionMesonCuts.h"
13 #include "AliAnalysisManager.h"
14 #include "TProfile2D.h"
15 #include "TH3.h"
16 #include "TH3F.h"
17 #include <vector>
18 #include <map>
19 
21 
22  public:
24  AliAnalysisTaskGammaConvV1(const char *name);
26 
27  virtual void UserCreateOutputObjects();
28  virtual Bool_t Notify();
29  virtual void UserExec(Option_t *);
30  virtual void Terminate(const Option_t*);
31  void InitBack();
32 
33  void SetV0ReaderName(TString name){fV0ReaderName=name; return;}
34  void SetLightOutput(Bool_t flag ){fDoLightOutput = flag;}
35 
36  void SetIsHeavyIon(Int_t flag) { fIsHeavyIon = flag ;}
37  void SetIsMC(Int_t isMC) { fIsMC = isMC ;}
39  void SetDoMesonQA(Int_t flag) { fDoMesonQA = flag ;}
40  void SetDoPhotonQA(Int_t flag) { fDoPhotonQA = flag ;}
44  void SetDoTHnSparse(Bool_t flag) { fDoTHnSparse = flag ;}
47  void ProcessClusters();
49  void CalculateBackground();
50  void CalculateBackgroundRP();
51  void ProcessMCParticles();
52  void ProcessAODMCParticles();
54  void ProcessTruePhotonCandidates( AliAODConversionPhoton* TruePhotonCandidate);
55  void ProcessTruePhotonCandidatesAOD( AliAODConversionPhoton* TruePhotonCandidate);
56  void ProcessTrueMesonCandidates( AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
57  void ProcessTrueMesonCandidatesAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1);
59  void RotateParticleAccordingToEP(AliAODConversionPhoton *gamma, Double_t previousEventEP, Double_t thisEventEP);
60  void SetEventCutList(Int_t nCuts, TList *CutArray) { fnCuts = nCuts ;
61  fEventCutArray = CutArray ;}
62  void SetConversionCutList(Int_t nCuts, TList *CutArray) { fnCuts = nCuts ;
63  fCutArray = CutArray ;}
64 
65  void SetMesonCutList(Int_t nCuts, TList *CutArray) { fnCuts = nCuts ;
66  fMesonCutArray = CutArray ;}
67  void SetClusterCutList(Int_t nCuts, TList *CutArray) { fnCuts = nCuts ;
68  fClusterCutArray = CutArray ;}
69 
71 
72  // BG HandlerSettings
74  void FillPhotonCombinatorialBackgroundHist(AliAODConversionPhoton *TruePhotonCandidate, Int_t pdgCode[], Double_t PhiParticle[]);
75  void FillPhotonCombinatorialMothersHistESD(TParticle *daughter,TParticle *mother);
76  void FillPhotonCombinatorialMothersHistAOD(AliAODMCParticle *daughter, AliAODMCParticle* motherCombPart);
79  void SetLogBinningXTH2(TH2* histoRebin);
80  Int_t GetSourceClassification(Int_t daughter, Int_t pdgCode);
81 
82  // Additional functions
83  Bool_t CheckVectorForDoubleCount(vector<Int_t> &vec, Int_t tobechecked);
84  void FillMultipleCountMap(map<Int_t,Int_t> &ma, Int_t tobechecked);
85  void FillMultipleCountHistoAndClear(map<Int_t,Int_t> &ma, TH1F* hist);
86  Double_t GetOriginalInvMass(const AliConversionPhotonBase * photon, AliVEvent * event) const;
87 
88  protected:
91  Bool_t fDoLightOutput; // switch for running light output, kFALSE -> normal mode, kTRUE -> light mode
94  AliVEvent* fInputEvent; //
95  AliMCEvent* fMCEvent; //
104  TClonesArray* fReaderGammas; //
124  UChar_t iCatPhoton;
125  UChar_t iPhotonMCInfo;
126  // 0: garbage,
127  // 1: background
128  // 2: secondary photon not from eta or k0s,
129  // 3: secondary photon from eta,
130  // 4: secondary photon from k0s,
131  // 5: dalitz
132  // 6: primary gamma
134  THnSparseF** sESDMotherInvMassPtZM;
144  THnSparseF** sPtRDeltaROpenAngle;
159  TH1F** fHistoMCPi0Pt;
163  TH1F** fHistoMCEtaPt;
236  vector<Int_t> vecDoubleCountTruePi0s;
237  vector<Int_t> vecDoubleCountTrueEtas;
242  map<Int_t,Int_t> mapMultipleCountTruePi0s;
243  map<Int_t,Int_t> mapMultipleCountTrueEtas;
245  TH1F** fHistoNEvents;
250  TH1F** fHistoVertexZ;
252  Int_t fDoCentralityFlat; //flag for centrality flattening
261  TProfile** fProfileEtaShift;
264  TProfile** fHistoEtaShift;
270  UChar_t iFlag;
271  UChar_t iMesonMCInfo;
272  // 0: garbage,
273  // 1: background
274  // 2: secondary meson not from eta or k0s,
275  // 3: secondary meson from eta,
276  // 4: secondary meson from k0s,
277  // 5: dalitz
278  // 6: primary meson gamma-gamma-channel
279  Double_t fEventPlaneAngle; // EventPlaneAngle
280  TRandom3 fRandom; //
282  Double_t* fUnsmearedPx; //[fnGammaCandidates]
283  Double_t* fUnsmearedPy; //[fnGammaCandidates]
284  Double_t* fUnsmearedPz; //[fnGammaCandidates]
285  Double_t* fUnsmearedE; //[fnGammaCandidates]
286  Int_t* fMCEventPos; //[fnGammaCandidates]
287  Int_t* fMCEventNeg; //[fnGammaCandidates]
288  Int_t* fESDArrayPos; //[fnGammaCandidates]
289  Int_t* fESDArrayNeg; //[fnGammaCandidates]
301  Bool_t fDoTHnSparse; // flag for using THnSparses for background estimation
302  Double_t fWeightJetJetMC; // weight for Jet-Jet MC
303  Double_t* fWeightCentrality; //[fnCuts], weight for centrality flattening
304  Bool_t fEnableClusterCutsForTrigger; //enables ClusterCuts for Trigger
306  TTree* tBrokenFiles; // tree for keeping track of broken files
307  TObjString* fFileNameBroken; // string object for broken file name
308 
309  private:
310 
311  AliAnalysisTaskGammaConvV1(const AliAnalysisTaskGammaConvV1&); // Prevent copy-construction
312  AliAnalysisTaskGammaConvV1 &operator=(const AliAnalysisTaskGammaConvV1&); // Prevent assignment
313  ClassDef(AliAnalysisTaskGammaConvV1, 43);
314 };
315 
316 #endif
void RotateParticleAccordingToEP(AliAODConversionPhoton *gamma, Double_t previousEventEP, Double_t thisEventEP)
TH1F ** fHistoMCPi0WOEvtWeightPt
array of histos with unweighted pi0, pT
Int_t GetSourceClassification(Int_t daughter, Int_t pdgCode)
double Double_t
Definition: External.C:58
Definition: External.C:260
Definition: External.C:236
TH2F ** fHistoDoubleCountTrueEtaInvMassPt
array of histos with double counted pi0s, invMass, pT
void RotateParticle(AliAODConversionPhoton *gamma)
vector< Int_t > vecDoubleCountTrueConvGammas
vector containing labels of validated eta
void ProcessTruePhotonCandidatesAOD(AliAODConversionPhoton *TruePhotonCandidate)
void FillPhotonCombinatorialMothersHistAOD(AliAODMCParticle *daughter, AliAODMCParticle *motherCombPart)
map< Int_t, Int_t > mapMultipleCountTrueEtas
map containing pi0 labels that are counted at least twice
AliAnalysisTaskGammaConvV1 & operator=(const AliAnalysisTaskGammaConvV1 &)
void ProcessTruePhotonCandidates(AliAODConversionPhoton *TruePhotonCandidate)
map< Int_t, Int_t > mapMultipleCountTrueConvGammas
map containing eta labels that are counted at least twice
void SetEventCutList(Int_t nCuts, TList *CutArray)
TH2F ** fHistoDoubleCountTrueConvGammaRPt
array of histos with double counted etas, invMass, pT
void SetClusterCutList(Int_t nCuts, TList *CutArray)
TProfile ** fProfileJetJetXSection
array of profiles with eta shift
TH1F ** fHistoMultipleCountTrueEta
array of histos how often TruePi0s are counted
TH1F ** fHistoNGoodESDTracks
array of histos with event information without event weights
vector< Int_t > vecDoubleCountTruePi0s
array of histos with double counted photons, R, pT
void FillMultipleCountHistoAndClear(map< Int_t, Int_t > &ma, TH1F *hist)
AliConversionAODBGHandlerRP ** fBGHandlerRP
TH1F ** fHistoMCEtaWOEvtWeightPt
array of histos without event weights pi0, pT
void SetMoveParticleAccordingToVertex(Bool_t flag)
AliGammaConversionAODBGHandler ** fBGHandler
void ProcessTrueMesonCandidatesAOD(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
void FillMultipleCountMap(map< Int_t, Int_t > &ma, Int_t tobechecked)
TH1F ** fHistoMultipleCountTrueConvGamma
array of histos how often TrueEtas are counted
void SetConversionCutList(Int_t nCuts, TList *CutArray)
int Int_t
Definition: External.C:63
Double_t GetOriginalInvMass(const AliConversionPhotonBase *photon, AliVEvent *event) const
void SetDoMaterialBudgetWeightingOfGammasForTrueMesons(Bool_t flag)
Definition: External.C:204
float Float_t
Definition: External.C:68
vector< Int_t > vecDoubleCountTrueEtas
vector containing labels of validated pi0
virtual void Terminate(const Option_t *)
void ProcessTrueMesonCandidates(AliAODConversionMother *Pi0Candidate, AliAODConversionPhoton *TrueGammaCandidate0, AliAODConversionPhoton *TrueGammaCandidate1)
TProfile ** fHistoEtaShift
array of histos with ntrials for jetjet
TH2F ** fHistoMCEtaPtJetPt
array of histos with weighted pi0, pT, hardest jet pt
void FillPhotonCombinatorialBackgroundHist(AliAODConversionPhoton *TruePhotonCandidate, Int_t pdgCode[], Double_t PhiParticle[])
Int_t mode
Definition: anaM.C:41
TH1F ** fHistoNV0Tracks
correlation V=Mult vs number TPC out Tracks
TH1F ** fHistoMCEtaPt
array of histos without event weights eta, pT
void SetDoClusterSelectionForTriggerNorm(Bool_t flag)
TH1F ** fhJetJetNTrials
array of profiles with xsection for jetjet
Bool_t isMC
TH1F ** fHistoMCPhysicalPrimariesPt
array of histos with weighted eta, pT, hardest jet pt
Definition: External.C:220
void FillPhotonCombinatorialMothersHistESD(TParticle *daughter, TParticle *mother)
void MoveParticleAccordingToVertex(AliAODConversionPhoton *particle, const AliGammaConversionAODBGHandler::GammaConversionVertex *vertex)
const char Option_t
Definition: External.C:48
TH1F ** fHistoNEvents
map containing photon labels that are counted at least twice
bool Bool_t
Definition: External.C:53
void SetMesonCutList(Int_t nCuts, TList *CutArray)
map< Int_t, Int_t > mapMultipleCountTruePi0s
array of histos how often TrueConvGammass are counted
TH2F ** fHistoV0MultVsNumberTPCoutTracks
array of histos with SPD tracklets vs SPD clusters for background rejection
Bool_t CheckVectorForDoubleCount(vector< Int_t > &vec, Int_t tobechecked)
TH1F ** fHistoMultipleCountTruePi0
vector containing labels of validated photons