AliPhysics  2aaea23 (2aaea23)
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 
87  protected:
90  Bool_t fDoLightOutput; // switch for running light output, kFALSE -> normal mode, kTRUE -> light mode
93  AliVEvent* fInputEvent; //
94  AliMCEvent* fMCEvent; //
105  TClonesArray* fReaderGammas; //
123  UChar_t iCatPhoton;
124  UChar_t iPhotonMCInfo;
125  // 0: garbage,
126  // 1: background
127  // 2: secondary photon not from eta or k0s,
128  // 3: secondary photon from eta,
129  // 4: secondary photon from k0s,
130  // 5: dalitz
131  // 6: primary gamma
133  THnSparseF** sESDMotherInvMassPtZM;
143  THnSparseF** sPtRDeltaROpenAngle;
158  TH1F** fHistoMCPi0Pt;
162  TH1F** fHistoMCEtaPt;
233  vector<Int_t> vecDoubleCountTruePi0s;
234  vector<Int_t> vecDoubleCountTrueEtas;
239  map<Int_t,Int_t> mapMultipleCountTruePi0s;
240  map<Int_t,Int_t> mapMultipleCountTrueEtas;
242  TH1F** fHistoNEvents;
247  TH1F** fHistoVertexZ;
249  Int_t fDoCentralityFlat; //flag for centrality flattening
258  TProfile** fProfileEtaShift;
261  TProfile** fHistoEtaShift;
267  UChar_t iFlag;
268  UChar_t iMesonMCInfo;
269  // 0: garbage,
270  // 1: background
271  // 2: secondary meson not from eta or k0s,
272  // 3: secondary meson from eta,
273  // 4: secondary meson from k0s,
274  // 5: dalitz
275  // 6: primary meson gamma-gamma-channel
276  Double_t fEventPlaneAngle; // EventPlaneAngle
277  TRandom3 fRandom; //
279  Double_t* fUnsmearedPx; //[fnGammaCandidates]
280  Double_t* fUnsmearedPy; //[fnGammaCandidates]
281  Double_t* fUnsmearedPz; //[fnGammaCandidates]
282  Double_t* fUnsmearedE; //[fnGammaCandidates]
283  Int_t* fMCEventPos; //[fnGammaCandidates]
284  Int_t* fMCEventNeg; //[fnGammaCandidates]
285  Int_t* fESDArrayPos; //[fnGammaCandidates]
286  Int_t* fESDArrayNeg; //[fnGammaCandidates]
298  Bool_t fDoTHnSparse; // flag for using THnSparses for background estimation
299  Double_t fWeightJetJetMC; // weight for Jet-Jet MC
300  Double_t* fWeightCentrality; //[fnCuts], weight for centrality flattening
301  Bool_t fEnableClusterCutsForTrigger; //enables ClusterCuts for Trigger
303  TTree* tBrokenFiles; // tree for keeping track of broken files
304  TObjString* fFileNameBroken; // string object for broken file name
305 
306  private:
307 
308  AliAnalysisTaskGammaConvV1(const AliAnalysisTaskGammaConvV1&); // Prevent copy-construction
309  AliAnalysisTaskGammaConvV1 &operator=(const AliAnalysisTaskGammaConvV1&); // Prevent assignment
310  ClassDef(AliAnalysisTaskGammaConvV1, 42);
311 };
312 
313 #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
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