From ed8bc1ca25108670896b2507f905a3598333fea9 Mon Sep 17 00:00:00 2001 From: fbock Date: Mon, 8 Sep 2014 14:31:44 +0200 Subject: [PATCH] - separated Pi0 and Eta for all calo related histograms in the MC routines - fixed omega task for mode 1 - acceptance - added addtasks for pp --- PWGGA/GammaConv/AliAnalysisTaskGammaCalo.cxx | 334 +++++++++++------- PWGGA/GammaConv/AliAnalysisTaskGammaCalo.h | 37 +- .../AliAnalysisTaskGammaConvCalo.cxx | 309 ++++++++++------ .../GammaConv/AliAnalysisTaskGammaConvCalo.h | 34 +- ...alysisTaskNeutralMesonToPiPlPiMiPiZero.cxx | 2 +- PWGGA/GammaConv/macros/AddTask_GammaCalo_pp.C | 228 ++++++++++++ .../macros/AddTask_GammaConvCalo_pp.C | 118 +++++-- .../GammaConv/macros/AddTask_GammaConvV1_pp.C | 39 +- .../macros/AddTask_GammaConvV1_pp2.C | 2 + 9 files changed, 811 insertions(+), 292 deletions(-) create mode 100644 PWGGA/GammaConv/macros/AddTask_GammaCalo_pp.C diff --git a/PWGGA/GammaConv/AliAnalysisTaskGammaCalo.cxx b/PWGGA/GammaConv/AliAnalysisTaskGammaCalo.cxx index 9b0a35da8cf..d31d7f3628a 100644 --- a/PWGGA/GammaConv/AliAnalysisTaskGammaCalo.cxx +++ b/PWGGA/GammaConv/AliAnalysisTaskGammaCalo.cxx @@ -119,26 +119,35 @@ AliAnalysisTaskGammaCalo::AliAnalysisTaskGammaCalo(): AliAnalysisTaskSE(), fHistoMCSecPi0Source(NULL), fHistoMCSecEtaPt(NULL), fHistoMCSecEtaSource(NULL), - fHistoTrueMotherInvMassPt(NULL), - fHistoTrueMotherCaloPhotonInvMassPt(NULL), - fHistoTrueMotherCaloConvertedPhotonInvMassPt(NULL), - fHistoTrueMotherCaloMixedPhotonConvPhotonInvMassPt(NULL), + fHistoTruePi0InvMassPt(NULL), + fHistoTrueEtaInvMassPt(NULL), + fHistoTruePi0CaloPhotonInvMassPt(NULL), + fHistoTrueEtaCaloPhotonInvMassPt(NULL), fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL), fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL), - fHistoTrueMotherCaloElectronInvMassPt(NULL), - fHistoTrueMotherCaloMergedClusterInvMassPt(NULL), - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt(NULL), - fHistoTruePrimaryMotherInvMassPt(NULL), - fHistoTruePrimaryMotherW0WeightingInvMassPt(NULL), - fProfileTruePrimaryMotherWeightsInvMassPt(NULL), + fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt(NULL), + fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt(NULL), + fHistoTruePi0CaloElectronInvMassPt(NULL), + fHistoTrueEtaCaloElectronInvMassPt(NULL), + fHistoTruePi0CaloMergedClusterInvMassPt(NULL), + fHistoTrueEtaCaloMergedClusterInvMassPt(NULL), + fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL), + fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL), + fHistoTruePrimaryPi0InvMassPt(NULL), + fHistoTruePrimaryEtaInvMassPt(NULL), + fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL), + fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL), + fProfileTruePrimaryPi0WeightsInvMassPt(NULL), + fProfileTruePrimaryEtaWeightsInvMassPt(NULL), fHistoTruePrimaryPi0MCPtResolPt(NULL), fHistoTruePrimaryEtaMCPtResolPt(NULL), - fHistoTrueSecondaryMotherInvMassPt(NULL), - fHistoTrueSecondaryMotherFromK0sInvMassPt(NULL), + fHistoTrueSecondaryPi0InvMassPt(NULL), + fHistoTrueSecondaryEtaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL), fHistoTrueK0sWithPi0DaughterMCPt(NULL), - fHistoTrueSecondaryMotherFromEtaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL), fHistoTrueEtaWithPi0DaughterMCPt(NULL), - fHistoTrueSecondaryMotherFromLambdaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL), fHistoTrueLambdaWithPi0DaughterMCPt(NULL), fHistoTrueBckGGInvMassPt(NULL), fHistoTrueBckContInvMassPt(NULL), @@ -261,26 +270,35 @@ AliAnalysisTaskGammaCalo::AliAnalysisTaskGammaCalo(const char *name): fHistoMCSecPi0Source(NULL), fHistoMCSecEtaPt(NULL), fHistoMCSecEtaSource(NULL), - fHistoTrueMotherInvMassPt(NULL), - fHistoTrueMotherCaloPhotonInvMassPt(NULL), - fHistoTrueMotherCaloConvertedPhotonInvMassPt(NULL), - fHistoTrueMotherCaloMixedPhotonConvPhotonInvMassPt(NULL), + fHistoTruePi0InvMassPt(NULL), + fHistoTrueEtaInvMassPt(NULL), + fHistoTruePi0CaloPhotonInvMassPt(NULL), + fHistoTrueEtaCaloPhotonInvMassPt(NULL), fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL), fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL), - fHistoTrueMotherCaloElectronInvMassPt(NULL), - fHistoTrueMotherCaloMergedClusterInvMassPt(NULL), - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt(NULL), - fHistoTruePrimaryMotherInvMassPt(NULL), - fHistoTruePrimaryMotherW0WeightingInvMassPt(NULL), - fProfileTruePrimaryMotherWeightsInvMassPt(NULL), + fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt(NULL), + fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt(NULL), + fHistoTruePi0CaloElectronInvMassPt(NULL), + fHistoTrueEtaCaloElectronInvMassPt(NULL), + fHistoTruePi0CaloMergedClusterInvMassPt(NULL), + fHistoTrueEtaCaloMergedClusterInvMassPt(NULL), + fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL), + fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL), + fHistoTruePrimaryPi0InvMassPt(NULL), + fHistoTruePrimaryEtaInvMassPt(NULL), + fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL), + fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL), + fProfileTruePrimaryPi0WeightsInvMassPt(NULL), + fProfileTruePrimaryEtaWeightsInvMassPt(NULL), fHistoTruePrimaryPi0MCPtResolPt(NULL), fHistoTruePrimaryEtaMCPtResolPt(NULL), - fHistoTrueSecondaryMotherInvMassPt(NULL), - fHistoTrueSecondaryMotherFromK0sInvMassPt(NULL), + fHistoTrueSecondaryPi0InvMassPt(NULL), + fHistoTrueSecondaryEtaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL), fHistoTrueK0sWithPi0DaughterMCPt(NULL), - fHistoTrueSecondaryMotherFromEtaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL), fHistoTrueEtaWithPi0DaughterMCPt(NULL), - fHistoTrueSecondaryMotherFromLambdaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL), fHistoTrueLambdaWithPi0DaughterMCPt(NULL), fHistoTrueBckGGInvMassPt(NULL), fHistoTrueBckContInvMassPt(NULL), @@ -626,14 +644,19 @@ void AliAnalysisTaskGammaCalo::UserCreateOutputObjects(){ fHistoMCPi0InAccPt = new TH1F*[fnCuts]; fHistoMCEtaInAccPt = new TH1F*[fnCuts]; - fHistoTrueMotherInvMassPt = new TH2F*[fnCuts]; - fHistoTruePrimaryMotherInvMassPt = new TH2F*[fnCuts]; - fHistoTruePrimaryMotherW0WeightingInvMassPt = new TH2F*[fnCuts]; - fProfileTruePrimaryMotherWeightsInvMassPt = new TProfile2D*[fnCuts]; - fHistoTrueSecondaryMotherInvMassPt = new TH2F*[fnCuts]; - fHistoTrueSecondaryMotherFromK0sInvMassPt = new TH2F*[fnCuts]; - fHistoTrueSecondaryMotherFromEtaInvMassPt = new TH2F*[fnCuts]; - fHistoTrueSecondaryMotherFromLambdaInvMassPt = new TH2F*[fnCuts]; + fHistoTruePi0InvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaInvMassPt = new TH2F*[fnCuts]; + fHistoTruePrimaryPi0InvMassPt = new TH2F*[fnCuts]; + fHistoTruePrimaryEtaInvMassPt = new TH2F*[fnCuts]; + fHistoTruePrimaryPi0W0WeightingInvMassPt = new TH2F*[fnCuts]; + fHistoTruePrimaryEtaW0WeightingInvMassPt = new TH2F*[fnCuts]; + fProfileTruePrimaryPi0WeightsInvMassPt = new TProfile2D*[fnCuts]; + fProfileTruePrimaryEtaWeightsInvMassPt = new TProfile2D*[fnCuts]; + fHistoTrueSecondaryPi0InvMassPt = new TH2F*[fnCuts]; + fHistoTrueSecondaryEtaInvMassPt = new TH2F*[fnCuts]; + fHistoTrueSecondaryPi0FromK0sInvMassPt = new TH2F*[fnCuts]; + fHistoTrueSecondaryPi0FromEtaInvMassPt = new TH2F*[fnCuts]; + fHistoTrueSecondaryPi0FromLambdaInvMassPt = new TH2F*[fnCuts]; if (fDoMesonQA > 0){ fHistoMCPi0PtY = new TH2F*[fnCuts]; fHistoMCEtaPtY = new TH2F*[fnCuts]; @@ -644,14 +667,18 @@ void AliAnalysisTaskGammaCalo::UserCreateOutputObjects(){ fHistoMCSecPi0Source = new TH1F*[fnCuts]; fHistoMCSecEtaPt = new TH1F*[fnCuts]; fHistoMCSecEtaSource = new TH1F*[fnCuts]; - fHistoTrueMotherCaloPhotonInvMassPt = new TH2F*[fnCuts]; - fHistoTrueMotherCaloConvertedPhotonInvMassPt= new TH2F*[fnCuts]; - fHistoTrueMotherCaloMixedPhotonConvPhotonInvMassPt= new TH2F*[fnCuts]; + fHistoTruePi0CaloPhotonInvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaCaloPhotonInvMassPt = new TH2F*[fnCuts]; + fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt= new TH2F*[fnCuts]; + fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt= new TH2F*[fnCuts]; fHistoTruePi0CaloConvertedPhotonInvMassPt = new TH2F*[fnCuts]; fHistoTrueEtaCaloConvertedPhotonInvMassPt = new TH2F*[fnCuts]; - fHistoTrueMotherCaloElectronInvMassPt = new TH2F*[fnCuts]; - fHistoTrueMotherCaloMergedClusterInvMassPt = new TH2F*[fnCuts]; - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt = new TH2F*[fnCuts]; + fHistoTruePi0CaloElectronInvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaCaloElectronInvMassPt = new TH2F*[fnCuts]; + fHistoTruePi0CaloMergedClusterInvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaCaloMergedClusterInvMassPt = new TH2F*[fnCuts]; + fHistoTruePi0CaloMergedClusterPartConvInvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaCaloMergedClusterPartConvInvMassPt = new TH2F*[fnCuts]; fHistoTruePrimaryPi0MCPtResolPt = new TH2F*[fnCuts]; fHistoTruePrimaryEtaMCPtResolPt = new TH2F*[fnCuts]; fHistoTrueK0sWithPi0DaughterMCPt = new TH1F*[fnCuts]; @@ -845,47 +872,77 @@ void AliAnalysisTaskGammaCalo::UserCreateOutputObjects(){ } if(fDoMesonAnalysis){ - fHistoTrueMotherInvMassPt[iCut] = new TH2F("ESD_TrueMother_InvMass_Pt","ESD_TrueMother_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherInvMassPt[iCut]); - fHistoTruePrimaryMotherInvMassPt[iCut] = new TH2F("ESD_TruePrimaryMother_InvMass_Pt", "ESD_TruePrimaryMother_InvMass_Pt", 800,0,0.8,250,0,25); - fHistoTruePrimaryMotherInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fHistoTruePrimaryMotherInvMassPt[iCut]); - fHistoTruePrimaryMotherW0WeightingInvMassPt[iCut] = new TH2F("ESD_TruePrimaryMotherW0Weights_InvMass_Pt", "ESD_TruePrimaryMotherW0Weights_InvMass_Pt", 800,0,0.8,250,0,25); - fHistoTruePrimaryMotherW0WeightingInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fHistoTruePrimaryMotherW0WeightingInvMassPt[iCut]); - fProfileTruePrimaryMotherWeightsInvMassPt[iCut] = new TProfile2D("ESD_TruePrimaryMotherWeights_InvMass_Pt", "ESD_TruePrimaryMotherWeights_InvMass_Pt", 800,0,0.8,250,0,25); - fProfileTruePrimaryMotherWeightsInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fProfileTruePrimaryMotherWeightsInvMassPt[iCut]); - fHistoTrueSecondaryMotherInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryMother_InvMass_Pt", "ESD_TrueSecondaryMother_InvMass_Pt", 800,0,0.8,250,0,25); - fHistoTrueSecondaryMotherInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fHistoTrueSecondaryMotherInvMassPt[iCut]); - fHistoTrueSecondaryMotherFromK0sInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryMotherFromK0s_InvMass_Pt","ESD_TrueSecondaryMotherFromK0s_InvMass_Pt",800,0,0.8,250,0,25); - fHistoTrueSecondaryMotherFromK0sInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fHistoTrueSecondaryMotherFromK0sInvMassPt[iCut]); - fHistoTrueSecondaryMotherFromEtaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryMotherFromEta_InvMass_Pt","ESD_TrueSecondaryMotherFromEta_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueSecondaryMotherFromEtaInvMassPt[iCut]); - fHistoTrueSecondaryMotherFromLambdaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryMotherFromLambda_InvMass_Pt","ESD_TrueSecondaryMotherFromLambda_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueSecondaryMotherFromLambdaInvMassPt[iCut]); + fHistoTruePi0InvMassPt[iCut] = new TH2F("ESD_TruePi0_InvMass_Pt","ESD_TruePi0_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0InvMassPt[iCut]); + fHistoTrueEtaInvMassPt[iCut] = new TH2F("ESD_TrueEta_InvMass_Pt","ESD_TrueEta_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaInvMassPt[iCut]); + + fHistoTruePrimaryPi0InvMassPt[iCut] = new TH2F("ESD_TruePrimaryPi0_InvMass_Pt", "ESD_TruePrimaryPi0_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTruePrimaryPi0InvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTruePrimaryPi0InvMassPt[iCut]); + fHistoTruePrimaryEtaInvMassPt[iCut] = new TH2F("ESD_TruePrimaryEta_InvMass_Pt", "ESD_TruePrimaryEta_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTruePrimaryEtaInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTruePrimaryEtaInvMassPt[iCut]); + + fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut] = new TH2F("ESD_TruePrimaryPi0W0Weights_InvMass_Pt", "ESD_TruePrimaryPi0W0Weights_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut]); + fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut] = new TH2F("ESD_TruePrimaryEtaW0Weights_InvMass_Pt", "ESD_TruePrimaryEtaW0Weights_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut]); + + fProfileTruePrimaryPi0WeightsInvMassPt[iCut] = new TProfile2D("ESD_TruePrimaryPi0Weights_InvMass_Pt", "ESD_TruePrimaryPi0Weights_InvMass_Pt", 800,0,0.8,250,0,25); + fProfileTruePrimaryPi0WeightsInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fProfileTruePrimaryPi0WeightsInvMassPt[iCut]); + fProfileTruePrimaryEtaWeightsInvMassPt[iCut] = new TProfile2D("ESD_TruePrimaryEtaWeights_InvMass_Pt", "ESD_TruePrimaryEtaWeights_InvMass_Pt", 800,0,0.8,250,0,25); + fProfileTruePrimaryEtaWeightsInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fProfileTruePrimaryEtaWeightsInvMassPt[iCut]); + + fHistoTrueSecondaryPi0InvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0_InvMass_Pt", "ESD_TrueSecondaryPi0_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTrueSecondaryPi0InvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTrueSecondaryPi0InvMassPt[iCut]); + fHistoTrueSecondaryEtaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryEta_InvMass_Pt", "ESD_TrueSecondaryEta_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTrueSecondaryEtaInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTrueSecondaryEtaInvMassPt[iCut]); + + fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromK0s_InvMass_Pt","ESD_TrueSecondaryPi0FromK0s_InvMass_Pt",800,0,0.8,250,0,25); + fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut]); + fHistoTrueSecondaryPi0FromEtaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromEta_InvMass_Pt","ESD_TrueSecondaryPi0FromEta_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueSecondaryPi0FromEtaInvMassPt[iCut]); + fHistoTrueSecondaryPi0FromLambdaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromLambda_InvMass_Pt","ESD_TrueSecondaryPi0FromLambda_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueSecondaryPi0FromLambdaInvMassPt[iCut]); if (fDoMesonQA > 0){ - fHistoTrueMotherCaloPhotonInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloPhoton_InvMass_Pt","ESD_TrueMotherCaloPhoton_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloPhotonInvMassPt[iCut]); - fHistoTrueMotherCaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloConvertedPhoton_InvMass_Pt","ESD_TrueMotherCaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloConvertedPhotonInvMassPt[iCut]); - fHistoTrueMotherCaloMixedPhotonConvPhotonInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloMixedPhotonConvertedPhoton_InvMass_Pt","ESD_TrueMotherCaloMixedPhotonConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloMixedPhotonConvPhotonInvMassPt[iCut]); + fHistoTruePi0CaloPhotonInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloPhoton_InvMass_Pt","ESD_TruePi0CaloPhoton_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0CaloPhotonInvMassPt[iCut]); + fHistoTrueEtaCaloPhotonInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloPhoton_InvMass_Pt","ESD_TrueEtaCaloPhoton_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaCaloPhotonInvMassPt[iCut]); + + fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloMixedPhotonConvertedPhoton_InvMass_Pt","ESD_TruePi0CaloMixedPhotonConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt[iCut]); + fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloMixedPhotonConvertedPhoton_InvMass_Pt","ESD_TrueEtaCaloMixedPhotonConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt[iCut]); fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloConvertedPhoton_InvMass_Pt","ESD_TruePi0CaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25); fTrueList[iCut]->Add(fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut]); - fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloConvertedPhoton_InvMass_Pt","ESD_TrueEtaCaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25); fTrueList[iCut]->Add(fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut]); - fHistoTrueMotherCaloElectronInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloElectron_InvMass_Pt","ESD_TrueMotherCaloElectron_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloElectronInvMassPt[iCut]); - fHistoTrueMotherCaloMergedClusterInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloMergedCluster_InvMass_Pt","ESD_TrueMotherCaloMergedCluster_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloMergedClusterInvMassPt[iCut]); - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloMergedClusterPartConv_InvMass_Pt","ESD_TrueMotherCaloMergedClusterPartConv_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloMergedClusterPartConvInvMassPt[iCut]); + fHistoTruePi0CaloElectronInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloElectron_InvMass_Pt","ESD_TruePi0CaloElectron_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0CaloElectronInvMassPt[iCut]); + fHistoTrueEtaCaloElectronInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloElectron_InvMass_Pt","ESD_TrueEtaCaloElectron_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaCaloElectronInvMassPt[iCut]); + + fHistoTruePi0CaloMergedClusterInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloMergedCluster_InvMass_Pt","ESD_TruePi0CaloMergedCluster_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0CaloMergedClusterInvMassPt[iCut]); + fHistoTrueEtaCaloMergedClusterInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloMergedCluster_InvMass_Pt","ESD_TrueEtaCaloMergedCluster_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaCaloMergedClusterInvMassPt[iCut]); + + fHistoTruePi0CaloMergedClusterPartConvInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloMergedClusterPartConv_InvMass_Pt","ESD_TruePi0CaloMergedClusterPartConv_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0CaloMergedClusterPartConvInvMassPt[iCut]); + fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloMergedClusterPartConv_InvMass_Pt","ESD_TrueEtaCaloMergedClusterPartConv_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[iCut]); + fHistoTruePrimaryPi0MCPtResolPt[iCut] = new TH2F("ESD_TruePrimaryPi0_MCPt_ResolPt","ESD_TruePrimaryPi0_ResolPt_MCPt",500,0.03,25,1000,-1.,1.); fHistoTruePrimaryPi0MCPtResolPt[iCut]->Sumw2(); @@ -1767,32 +1824,41 @@ void AliAnalysisTaskGammaCalo::ProcessTrueMesonCandidates(AliAODConversionMother } if(isTruePi0 || isTrueEta){// True Pion or Eta - fHistoTrueMotherInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTruePi0) fHistoTruePi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (fDoMesonQA > 0){ // both gammas are real gammas - if (TrueGammaCandidate0->IsLargestComponentPhoton() && TrueGammaCandidate1->IsLargestComponentPhoton()) - fHistoTrueMotherCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate0->IsLargestComponentPhoton() && TrueGammaCandidate1->IsLargestComponentPhoton()) { + if (isTruePi0) fHistoTruePi0CaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } // both particles are electrons - if (TrueGammaCandidate0->IsLargestComponentElectron() && TrueGammaCandidate1->IsLargestComponentElectron() ) - fHistoTrueMotherCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate0->IsLargestComponentElectron() && TrueGammaCandidate1->IsLargestComponentElectron() ) { + if (isTruePi0) fHistoTruePi0CaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } // both particles are converted electrons if ((TrueGammaCandidate0->IsLargestComponentElectron() && TrueGammaCandidate0->IsConversion()) && (TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion()) ){ - fHistoTrueMotherCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (isTruePi0 )fHistoTruePi0CaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (isTrueEta )fHistoTrueEtaCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); } // 1 gamma is converted the other one is normals if ( (TrueGammaCandidate0->IsLargestComponentPhoton() && TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion()) || (TrueGammaCandidate1->IsLargestComponentPhoton() && TrueGammaCandidate0->IsLargestComponentElectron() && TrueGammaCandidate0->IsConversion()) - ) - fHistoTrueMotherCaloMixedPhotonConvPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - + ) { + if (isTruePi0) fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } // at least one of the photon is merged - if (TrueGammaCandidate0->IsMerged() || TrueGammaCandidate0->IsMergedPartConv() || TrueGammaCandidate0->IsDalitzMerged() || TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged() ) - fHistoTrueMotherCaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate0->IsMerged() || TrueGammaCandidate0->IsMergedPartConv() || TrueGammaCandidate0->IsDalitzMerged() || TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged() ){ + if (isTruePi0) fHistoTruePi0CaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTruePi0CaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } // at least one of the photon is merged and part conv - if (TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate0->IsMergedPartConv()) - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate0->IsMergedPartConv()) { + if (isTruePi0) fHistoTruePi0CaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } } if (fDoMesonQA > 0){ @@ -1818,18 +1884,19 @@ void AliAnalysisTaskGammaCalo::ProcessTrueMesonCandidates(AliAODConversionMother weightedSec= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),secMotherLabel, fMCStack, fInputEvent)/2.; //invariant mass is additive thus the weight for the daughters has to be devide by two for the K0s at a certain pt //cout << "MC input \t"<Pt()<<"\t"<Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if (isTruePi0) fHistoTrueSecondaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if (isTrueEta) fHistoTrueSecondaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (secMotherLabel >-1){ - if(MCStack->Particle(secMotherLabel)->GetPdgCode()==310){ - fHistoTrueSecondaryMotherFromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if(MCStack->Particle(secMotherLabel)->GetPdgCode()==310 && isTruePi0){ + fHistoTrueSecondaryPi0FromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueK0sWithPi0DaughterMCPt[fiCut]->Fill(MCStack->Particle(secMotherLabel)->Pt()); } - if(MCStack->Particle(secMotherLabel)->GetPdgCode()==221){ - fHistoTrueSecondaryMotherFromEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if(MCStack->Particle(secMotherLabel)->GetPdgCode()==221 && isTruePi0){ + fHistoTrueSecondaryPi0FromEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueEtaWithPi0DaughterMCPt[fiCut]->Fill(MCStack->Particle(secMotherLabel)->Pt()); } - if(MCStack->Particle(secMotherLabel)->GetPdgCode()==3122){ - fHistoTrueSecondaryMotherFromLambdaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if(MCStack->Particle(secMotherLabel)->GetPdgCode()==3122 && isTruePi0){ + fHistoTrueSecondaryPi0FromLambdaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueLambdaWithPi0DaughterMCPt[fiCut]->Fill(MCStack->Particle(secMotherLabel)->Pt()); } } @@ -1841,9 +1908,15 @@ void AliAnalysisTaskGammaCalo::ProcessTrueMesonCandidates(AliAODConversionMother // cout << "rec \t " <Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); - fHistoTruePrimaryMotherW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - fProfileTruePrimaryMotherWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + if (isTruePi0){ + fHistoTruePrimaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + fHistoTruePrimaryPi0W0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + fProfileTruePrimaryPi0WeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + } else if (isTrueEta){ + fHistoTruePrimaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + fHistoTruePrimaryEtaW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + fProfileTruePrimaryEtaWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + } if (fDoMesonQA > 0){ if(isTruePi0){ // Only primary pi0 for resolution @@ -1924,32 +1997,41 @@ void AliAnalysisTaskGammaCalo::ProcessTrueMesonCandidatesAOD(AliAODConversionMot } if(isTruePi0 || isTrueEta){// True Pion or Eta - fHistoTrueMotherInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTruePi0)fHistoTruePi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta)fHistoTrueEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (fDoMesonQA > 0){ // both gammas are real gammas - if (TrueGammaCandidate0->IsLargestComponentPhoton() && TrueGammaCandidate1->IsLargestComponentPhoton()) - fHistoTrueMotherCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate0->IsLargestComponentPhoton() && TrueGammaCandidate1->IsLargestComponentPhoton()) { + if (isTruePi0)fHistoTruePi0CaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta)fHistoTrueEtaCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } // both particles are electrons - if (TrueGammaCandidate0->IsLargestComponentElectron() && TrueGammaCandidate1->IsLargestComponentElectron() ) - fHistoTrueMotherCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate0->IsLargestComponentElectron() && TrueGammaCandidate1->IsLargestComponentElectron() ) { + if (isTruePi0) fHistoTruePi0CaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } // both particles are converted electrons if ((TrueGammaCandidate0->IsLargestComponentElectron() && TrueGammaCandidate0->IsConversion()) && (TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion()) ){ - fHistoTrueMotherCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (isTruePi0 )fHistoTruePi0CaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (isTrueEta )fHistoTrueEtaCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); } // 1 gamma is converted the other one is normals if ( (TrueGammaCandidate0->IsLargestComponentPhoton() && TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion()) || (TrueGammaCandidate1->IsLargestComponentPhoton() && TrueGammaCandidate0->IsLargestComponentElectron() && TrueGammaCandidate0->IsConversion()) - ) - fHistoTrueMotherCaloMixedPhotonConvPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - + ) { + if (isTruePi0) fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } // at least one of the photon is merged - if (TrueGammaCandidate0->IsMerged() || TrueGammaCandidate0->IsMergedPartConv() || TrueGammaCandidate0->IsDalitzMerged() || TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged() ) - fHistoTrueMotherCaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate0->IsMerged() || TrueGammaCandidate0->IsMergedPartConv() || TrueGammaCandidate0->IsDalitzMerged() || TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged() ){ + if (isTruePi0) fHistoTruePi0CaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } // at least one of the photon is merged and part conv - if (TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate0->IsMergedPartConv()) - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate0->IsMergedPartConv()) { + if (isTruePi0)fHistoTruePi0CaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta)fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } } if (fDoMesonQA > 0){ @@ -1974,18 +2056,19 @@ void AliAnalysisTaskGammaCalo::ProcessTrueMesonCandidatesAOD(AliAODConversionMot weightedSec= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),secMotherLabel, 0x0, fInputEvent)/2.; //invariant mass is additive thus the weight for the daughters has to be devide by two for the K0s at a certain pt //cout << "MC input \t"<Pt()<<"\t"<Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if (isTruePi0) fHistoTrueSecondaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if (isTrueEta) fHistoTrueSecondaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (secMotherLabel >-1){ - if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310){ - fHistoTrueSecondaryMotherFromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310 && isTruePi0 ){ + fHistoTrueSecondaryPi0FromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueK0sWithPi0DaughterMCPt[fiCut]->Fill(static_cast(AODMCTrackArray->At(secMotherLabel))->Pt()); } - if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==221){ - fHistoTrueSecondaryMotherFromEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==221 && isTruePi0){ + fHistoTrueSecondaryPi0FromEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueEtaWithPi0DaughterMCPt[fiCut]->Fill(static_cast(AODMCTrackArray->At(secMotherLabel))->Pt()); } - if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==3122){ - fHistoTrueSecondaryMotherFromLambdaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==3122 && isTruePi0){ + fHistoTrueSecondaryPi0FromLambdaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueLambdaWithPi0DaughterMCPt[fiCut]->Fill(static_cast(AODMCTrackArray->At(secMotherLabel))->Pt()); } } @@ -1997,10 +2080,15 @@ void AliAnalysisTaskGammaCalo::ProcessTrueMesonCandidatesAOD(AliAODConversionMot // cout << "rec \t " <Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); - fHistoTruePrimaryMotherW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - fProfileTruePrimaryMotherWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); - + if (isTruePi0){ + fHistoTruePrimaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + fHistoTruePrimaryPi0W0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + fProfileTruePrimaryPi0WeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + } else if (isTrueEta){ + fHistoTruePrimaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + fHistoTruePrimaryEtaW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + fProfileTruePrimaryEtaWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + } if (fDoMesonQA > 0){ if(isTruePi0){ // Only primary pi0 for resolution fHistoTruePrimaryPi0MCPtResolPt[fiCut]->Fill(static_cast(AODMCTrackArray->At(gamma1MotherLabel))->Pt(), diff --git a/PWGGA/GammaConv/AliAnalysisTaskGammaCalo.h b/PWGGA/GammaConv/AliAnalysisTaskGammaCalo.h index bbdbec920c7..44101a025b5 100644 --- a/PWGGA/GammaConv/AliAnalysisTaskGammaCalo.h +++ b/PWGGA/GammaConv/AliAnalysisTaskGammaCalo.h @@ -149,26 +149,35 @@ class AliAnalysisTaskGammaCalo : public AliAnalysisTaskSE { TH1F **fHistoMCSecEtaPt; //! array of histos with secondary eta, pT TH1F **fHistoMCSecEtaSource; //! array of histos with secondary eta, source // MC validated reconstructed quantities mesons - TH2F **fHistoTrueMotherInvMassPt; //! array of histos with validated mothers, invMass, pt - TH2F **fHistoTrueMotherCaloPhotonInvMassPt; //! array of histos with validated mothers, photon leading, invMass, pt - TH2F **fHistoTrueMotherCaloConvertedPhotonInvMassPt; //! array of histos with validated mothers, converted photon leading, invMass, pt - TH2F **fHistoTrueMotherCaloMixedPhotonConvPhotonInvMassPt; //! array of histos with validated mothers, converted photon leading, invMass, pt + TH2F **fHistoTruePi0InvMassPt; //! array of histos with validated mothers, invMass, pt + TH2F **fHistoTrueEtaInvMassPt; //! array of histos with validated mothers, invMass, pt + TH2F **fHistoTruePi0CaloPhotonInvMassPt; //! array of histos with validated mothers, photon leading, invMass, pt + TH2F **fHistoTrueEtaCaloPhotonInvMassPt; //! array of histos with validated mothers, photon leading, invMass, pt TH2F **fHistoTruePi0CaloConvertedPhotonInvMassPt; //! array of histos with validated pi0, converted photon leading, invMass, pt TH2F **fHistoTrueEtaCaloConvertedPhotonInvMassPt; //! array of histos with validated eta, converted photon leading, invMass, pt - TH2F **fHistoTrueMotherCaloElectronInvMassPt; //! array of histos with validated mothers, electron leading, invMass, pt - TH2F **fHistoTrueMotherCaloMergedClusterInvMassPt; //! array of histos with validated mothers, merged cluster invMass, pt - TH2F **fHistoTrueMotherCaloMergedClusterPartConvInvMassPt; //! array of histos with validated mothers, merged cluster part conv, invMass, pt - TH2F **fHistoTruePrimaryMotherInvMassPt; //! array of histos with validated weighted primary mothers, invMass, pt - TH2F **fHistoTruePrimaryMotherW0WeightingInvMassPt; //! array of histos with validated unweighted primary mothers, invMass, pt - TProfile2D **fProfileTruePrimaryMotherWeightsInvMassPt; //! array of profiles with weights for validated primary mothers, invMass, pt + TH2F **fHistoTruePi0CaloMixedPhotonConvPhotonInvMassPt; //! array of histos with validated mothers, converted photon leading, invMass, pt + TH2F **fHistoTrueEtaCaloMixedPhotonConvPhotonInvMassPt; //! array of histos with validated mothers, converted photon leading, invMass, pt + TH2F **fHistoTruePi0CaloElectronInvMassPt; //! array of histos with validated mothers, electron leading, invMass, pt + TH2F **fHistoTrueEtaCaloElectronInvMassPt; //! array of histos with validated mothers, electron leading, invMass, pt + TH2F **fHistoTruePi0CaloMergedClusterInvMassPt; //! array of histos with validated mothers, merged cluster invMass, pt + TH2F **fHistoTrueEtaCaloMergedClusterInvMassPt; //! array of histos with validated mothers, merged cluster invMass, pt + TH2F **fHistoTruePi0CaloMergedClusterPartConvInvMassPt; //! array of histos with validated mothers, merged cluster part conv, invMass, pt + TH2F **fHistoTrueEtaCaloMergedClusterPartConvInvMassPt; //! array of histos with validated mothers, merged cluster part conv, invMass, pt + TH2F **fHistoTruePrimaryPi0InvMassPt; //! array of histos with validated weighted primary mothers, invMass, pt + TH2F **fHistoTruePrimaryEtaInvMassPt; //! array of histos with validated weighted primary mothers, invMass, pt + TH2F **fHistoTruePrimaryPi0W0WeightingInvMassPt; //! array of histos with validated unweighted primary mothers, invMass, pt + TH2F **fHistoTruePrimaryEtaW0WeightingInvMassPt; //! array of histos with validated unweighted primary mothers, invMass, pt + TProfile2D **fProfileTruePrimaryPi0WeightsInvMassPt; //! array of profiles with weights for validated primary mothers, invMass, pt + TProfile2D **fProfileTruePrimaryEtaWeightsInvMassPt; //! array of profiles with weights for validated primary mothers, invMass, pt TH2F **fHistoTruePrimaryPi0MCPtResolPt; //! array of histos with validated weighted primary pi0, MCpt, resol pt TH2F **fHistoTruePrimaryEtaMCPtResolPt; //! array of histos with validated weighted primary eta, MCpt, resol pt - TH2F **fHistoTrueSecondaryMotherInvMassPt; //! array of histos with validated secondary mothers, invMass, pt - TH2F **fHistoTrueSecondaryMotherFromK0sInvMassPt; //! array of histos with validated secondary mothers from K0s, invMass, pt + TH2F **fHistoTrueSecondaryPi0InvMassPt; //! array of histos with validated secondary mothers, invMass, pt + TH2F **fHistoTrueSecondaryEtaInvMassPt; //! array of histos with validated secondary mothers, invMass, pt + TH2F **fHistoTrueSecondaryPi0FromK0sInvMassPt; //! array of histos with validated secondary mothers from K0s, invMass, pt TH1F **fHistoTrueK0sWithPi0DaughterMCPt; //! array of histos with K0s with reconstructed pi0 as daughter, pt - TH2F **fHistoTrueSecondaryMotherFromEtaInvMassPt; //! array of histos with validated secondary mothers from eta, invMass, pt + TH2F **fHistoTrueSecondaryPi0FromEtaInvMassPt; //! array of histos with validated secondary mothers from eta, invMass, pt TH1F **fHistoTrueEtaWithPi0DaughterMCPt; //! array of histos with eta with reconstructed pi0 as daughter, pt - TH2F **fHistoTrueSecondaryMotherFromLambdaInvMassPt; //! array of histos with validated secondary mothers from Lambda, invMass, pt + TH2F **fHistoTrueSecondaryPi0FromLambdaInvMassPt; //! array of histos with validated secondary mothers from Lambda, invMass, pt TH1F **fHistoTrueLambdaWithPi0DaughterMCPt; //! array of histos with lambda with reconstructed pi0 as daughter, pt TH2F **fHistoTrueBckGGInvMassPt; //! array of histos with pure gamma gamma combinatorial BG, invMass, pt TH2F **fHistoTrueBckContInvMassPt; //! array of histos with contamination BG, invMass, pt diff --git a/PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx b/PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx index da015d86114..69e506b8984 100644 --- a/PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx +++ b/PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx @@ -157,28 +157,36 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(): AliAnalysisTaskSE( fHistoMCSecPi0Source(NULL), fHistoMCSecEtaPt(NULL), fHistoMCSecEtaSource(NULL), - fHistoTrueMotherInvMassPt(NULL), - fHistoTrueMotherCaloPhotonInvMassPt(NULL), - fHistoTrueMotherCaloConvertedPhotonInvMassPt(NULL), + fHistoTruePi0InvMassPt(NULL), + fHistoTrueEtaInvMassPt(NULL), + fHistoTruePi0CaloPhotonInvMassPt(NULL), + fHistoTrueEtaCaloPhotonInvMassPt(NULL), fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL), fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL), fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL), fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL), - fHistoTrueMotherCaloElectronInvMassPt(NULL), - fHistoTrueMotherCaloMergedClusterInvMassPt(NULL), + fHistoTruePi0CaloElectronInvMassPt(NULL), + fHistoTrueEtaCaloElectronInvMassPt(NULL), + fHistoTruePi0CaloMergedClusterInvMassPt(NULL), + fHistoTrueEtaCaloMergedClusterInvMassPt(NULL), fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL), - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt(NULL), - fHistoTruePrimaryMotherInvMassPt(NULL), - fHistoTruePrimaryMotherW0WeightingInvMassPt(NULL), - fProfileTruePrimaryMotherWeightsInvMassPt(NULL), + fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL), + fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL), + fHistoTruePrimaryPi0InvMassPt(NULL), + fHistoTruePrimaryEtaInvMassPt(NULL), + fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL), + fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL), + fProfileTruePrimaryPi0WeightsInvMassPt(NULL), + fProfileTruePrimaryEtaWeightsInvMassPt(NULL), fHistoTruePrimaryPi0MCPtResolPt(NULL), fHistoTruePrimaryEtaMCPtResolPt(NULL), - fHistoTrueSecondaryMotherInvMassPt(NULL), - fHistoTrueSecondaryMotherFromK0sInvMassPt(NULL), + fHistoTrueSecondaryPi0InvMassPt(NULL), + fHistoTrueSecondaryEtaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL), fHistoTrueK0sWithPi0DaughterMCPt(NULL), - fHistoTrueSecondaryMotherFromEtaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL), fHistoTrueEtaWithPi0DaughterMCPt(NULL), - fHistoTrueSecondaryMotherFromLambdaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL), fHistoTrueLambdaWithPi0DaughterMCPt(NULL), fHistoTrueBckGGInvMassPt(NULL), fHistoTrueBckContInvMassPt(NULL), @@ -346,28 +354,36 @@ AliAnalysisTaskGammaConvCalo::AliAnalysisTaskGammaConvCalo(const char *name): fHistoMCSecPi0Source(NULL), fHistoMCSecEtaPt(NULL), fHistoMCSecEtaSource(NULL), - fHistoTrueMotherInvMassPt(NULL), - fHistoTrueMotherCaloPhotonInvMassPt(NULL), - fHistoTrueMotherCaloConvertedPhotonInvMassPt(NULL), + fHistoTruePi0InvMassPt(NULL), + fHistoTrueEtaInvMassPt(NULL), + fHistoTruePi0CaloPhotonInvMassPt(NULL), + fHistoTrueEtaCaloPhotonInvMassPt(NULL), fHistoTruePi0CaloConvertedPhotonInvMassPt(NULL), fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt(NULL), fHistoTrueEtaCaloConvertedPhotonInvMassPt(NULL), fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt(NULL), - fHistoTrueMotherCaloElectronInvMassPt(NULL), - fHistoTrueMotherCaloMergedClusterInvMassPt(NULL), + fHistoTruePi0CaloElectronInvMassPt(NULL), + fHistoTrueEtaCaloElectronInvMassPt(NULL), + fHistoTruePi0CaloMergedClusterInvMassPt(NULL), + fHistoTrueEtaCaloMergedClusterInvMassPt(NULL), fHistoTrueMotherCaloEMNonLeadingInvMassPt(NULL), - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt(NULL), - fHistoTruePrimaryMotherInvMassPt(NULL), - fHistoTruePrimaryMotherW0WeightingInvMassPt(NULL), - fProfileTruePrimaryMotherWeightsInvMassPt(NULL), + fHistoTruePi0CaloMergedClusterPartConvInvMassPt(NULL), + fHistoTrueEtaCaloMergedClusterPartConvInvMassPt(NULL), + fHistoTruePrimaryPi0InvMassPt(NULL), + fHistoTruePrimaryEtaInvMassPt(NULL), + fHistoTruePrimaryPi0W0WeightingInvMassPt(NULL), + fHistoTruePrimaryEtaW0WeightingInvMassPt(NULL), + fProfileTruePrimaryPi0WeightsInvMassPt(NULL), + fProfileTruePrimaryEtaWeightsInvMassPt(NULL), fHistoTruePrimaryPi0MCPtResolPt(NULL), fHistoTruePrimaryEtaMCPtResolPt(NULL), - fHistoTrueSecondaryMotherInvMassPt(NULL), - fHistoTrueSecondaryMotherFromK0sInvMassPt(NULL), + fHistoTrueSecondaryPi0InvMassPt(NULL), + fHistoTrueSecondaryEtaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromK0sInvMassPt(NULL), fHistoTrueK0sWithPi0DaughterMCPt(NULL), - fHistoTrueSecondaryMotherFromEtaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromEtaInvMassPt(NULL), fHistoTrueEtaWithPi0DaughterMCPt(NULL), - fHistoTrueSecondaryMotherFromLambdaInvMassPt(NULL), + fHistoTrueSecondaryPi0FromLambdaInvMassPt(NULL), fHistoTrueLambdaWithPi0DaughterMCPt(NULL), fHistoTrueBckGGInvMassPt(NULL), fHistoTrueBckContInvMassPt(NULL), @@ -871,14 +887,19 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){ fHistoMCPi0InAccPt = new TH1F*[fnCuts]; fHistoMCEtaInAccPt = new TH1F*[fnCuts]; - fHistoTrueMotherInvMassPt = new TH2F*[fnCuts]; - fHistoTruePrimaryMotherInvMassPt = new TH2F*[fnCuts]; - fHistoTruePrimaryMotherW0WeightingInvMassPt = new TH2F*[fnCuts]; - fProfileTruePrimaryMotherWeightsInvMassPt = new TProfile2D*[fnCuts]; - fHistoTrueSecondaryMotherInvMassPt = new TH2F*[fnCuts]; - fHistoTrueSecondaryMotherFromK0sInvMassPt = new TH2F*[fnCuts]; - fHistoTrueSecondaryMotherFromEtaInvMassPt = new TH2F*[fnCuts]; - fHistoTrueSecondaryMotherFromLambdaInvMassPt = new TH2F*[fnCuts]; + fHistoTruePi0InvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaInvMassPt = new TH2F*[fnCuts]; + fHistoTruePrimaryPi0InvMassPt = new TH2F*[fnCuts]; + fHistoTruePrimaryEtaInvMassPt = new TH2F*[fnCuts]; + fHistoTruePrimaryPi0W0WeightingInvMassPt = new TH2F*[fnCuts]; + fHistoTruePrimaryEtaW0WeightingInvMassPt = new TH2F*[fnCuts]; + fProfileTruePrimaryPi0WeightsInvMassPt = new TProfile2D*[fnCuts]; + fProfileTruePrimaryEtaWeightsInvMassPt = new TProfile2D*[fnCuts]; + fHistoTrueSecondaryPi0InvMassPt = new TH2F*[fnCuts]; + fHistoTrueSecondaryEtaInvMassPt = new TH2F*[fnCuts]; + fHistoTrueSecondaryPi0FromK0sInvMassPt = new TH2F*[fnCuts]; + fHistoTrueSecondaryPi0FromEtaInvMassPt = new TH2F*[fnCuts]; + fHistoTrueSecondaryPi0FromLambdaInvMassPt = new TH2F*[fnCuts]; if (fDoMesonQA > 0){ fHistoMCPi0PtY = new TH2F*[fnCuts]; fHistoMCEtaPtY = new TH2F*[fnCuts]; @@ -889,15 +910,18 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){ fHistoMCSecPi0Source = new TH1F*[fnCuts]; fHistoMCSecEtaPt = new TH1F*[fnCuts]; fHistoMCSecEtaSource = new TH1F*[fnCuts]; - fHistoTrueMotherCaloPhotonInvMassPt = new TH2F*[fnCuts]; - fHistoTrueMotherCaloConvertedPhotonInvMassPt= new TH2F*[fnCuts]; + fHistoTruePi0CaloPhotonInvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaCaloPhotonInvMassPt = new TH2F*[fnCuts]; fHistoTruePi0CaloConvertedPhotonInvMassPt = new TH2F*[fnCuts]; fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt = new TH2F*[fnCuts]; fHistoTrueEtaCaloConvertedPhotonInvMassPt = new TH2F*[fnCuts]; fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt = new TH2F*[fnCuts]; - fHistoTrueMotherCaloElectronInvMassPt = new TH2F*[fnCuts]; - fHistoTrueMotherCaloMergedClusterInvMassPt = new TH2F*[fnCuts]; - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt = new TH2F*[fnCuts]; + fHistoTruePi0CaloElectronInvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaCaloElectronInvMassPt = new TH2F*[fnCuts]; + fHistoTruePi0CaloMergedClusterInvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaCaloMergedClusterInvMassPt = new TH2F*[fnCuts]; + fHistoTruePi0CaloMergedClusterPartConvInvMassPt = new TH2F*[fnCuts]; + fHistoTrueEtaCaloMergedClusterPartConvInvMassPt = new TH2F*[fnCuts]; fHistoTrueMotherCaloEMNonLeadingInvMassPt = new TH2F*[fnCuts]; fHistoTruePrimaryPi0MCPtResolPt = new TH2F*[fnCuts]; fHistoTruePrimaryEtaMCPtResolPt = new TH2F*[fnCuts]; @@ -1100,51 +1124,76 @@ void AliAnalysisTaskGammaConvCalo::UserCreateOutputObjects(){ } if(fDoMesonAnalysis){ - fHistoTrueMotherInvMassPt[iCut] = new TH2F("ESD_TrueMother_InvMass_Pt","ESD_TrueMother_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherInvMassPt[iCut]); - fHistoTruePrimaryMotherInvMassPt[iCut] = new TH2F("ESD_TruePrimaryMother_InvMass_Pt", "ESD_TruePrimaryMother_InvMass_Pt", 800,0,0.8,250,0,25); - fHistoTruePrimaryMotherInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fHistoTruePrimaryMotherInvMassPt[iCut]); - fHistoTruePrimaryMotherW0WeightingInvMassPt[iCut] = new TH2F("ESD_TruePrimaryMotherW0Weights_InvMass_Pt", "ESD_TruePrimaryMotherW0Weights_InvMass_Pt", 800,0,0.8,250,0,25); - fHistoTruePrimaryMotherW0WeightingInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fHistoTruePrimaryMotherW0WeightingInvMassPt[iCut]); - fProfileTruePrimaryMotherWeightsInvMassPt[iCut] = new TProfile2D("ESD_TruePrimaryMotherWeights_InvMass_Pt", "ESD_TruePrimaryMotherWeights_InvMass_Pt", 800,0,0.8,250,0,25); - fProfileTruePrimaryMotherWeightsInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fProfileTruePrimaryMotherWeightsInvMassPt[iCut]); - fHistoTrueSecondaryMotherInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryMother_InvMass_Pt", "ESD_TrueSecondaryMother_InvMass_Pt", 800,0,0.8,250,0,25); - fHistoTrueSecondaryMotherInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fHistoTrueSecondaryMotherInvMassPt[iCut]); - fHistoTrueSecondaryMotherFromK0sInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryMotherFromK0s_InvMass_Pt","ESD_TrueSecondaryMotherFromK0s_InvMass_Pt",800,0,0.8,250,0,25); - fHistoTrueSecondaryMotherFromK0sInvMassPt[iCut]->Sumw2(); - fTrueList[iCut]->Add(fHistoTrueSecondaryMotherFromK0sInvMassPt[iCut]); - fHistoTrueSecondaryMotherFromEtaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryMotherFromEta_InvMass_Pt","ESD_TrueSecondaryMotherFromEta_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueSecondaryMotherFromEtaInvMassPt[iCut]); - fHistoTrueSecondaryMotherFromLambdaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryMotherFromLambda_InvMass_Pt","ESD_TrueSecondaryMotherFromLambda_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueSecondaryMotherFromLambdaInvMassPt[iCut]); - if (fDoMesonQA > 0){ - fHistoTrueMotherCaloPhotonInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloPhoton_InvMass_Pt","ESD_TrueMotherCaloPhoton_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloPhotonInvMassPt[iCut]); - fHistoTrueMotherCaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloConvertedPhoton_InvMass_Pt","ESD_TrueMotherCaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloConvertedPhotonInvMassPt[iCut]); + fHistoTruePi0InvMassPt[iCut] = new TH2F("ESD_TruePi0_InvMass_Pt","ESD_TruePi0_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0InvMassPt[iCut]); + fHistoTrueEtaInvMassPt[iCut] = new TH2F("ESD_TrueEta_InvMass_Pt","ESD_TrueEta_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaInvMassPt[iCut]); + + fHistoTruePrimaryPi0InvMassPt[iCut] = new TH2F("ESD_TruePrimaryPi0_InvMass_Pt", "ESD_TruePrimaryPi0_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTruePrimaryPi0InvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTruePrimaryPi0InvMassPt[iCut]); + fHistoTruePrimaryEtaInvMassPt[iCut] = new TH2F("ESD_TruePrimaryEta_InvMass_Pt", "ESD_TruePrimaryEta_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTruePrimaryEtaInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTruePrimaryEtaInvMassPt[iCut]); + + fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut] = new TH2F("ESD_TruePrimaryPi0W0Weights_InvMass_Pt", "ESD_TruePrimaryPi0W0Weights_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTruePrimaryPi0W0WeightingInvMassPt[iCut]); + fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut] = new TH2F("ESD_TruePrimaryEtaW0Weights_InvMass_Pt", "ESD_TruePrimaryEtaW0Weights_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTruePrimaryEtaW0WeightingInvMassPt[iCut]); + + fProfileTruePrimaryPi0WeightsInvMassPt[iCut] = new TProfile2D("ESD_TruePrimaryPi0Weights_InvMass_Pt", "ESD_TruePrimaryPi0Weights_InvMass_Pt", 800,0,0.8,250,0,25); + fProfileTruePrimaryPi0WeightsInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fProfileTruePrimaryPi0WeightsInvMassPt[iCut]); + fProfileTruePrimaryEtaWeightsInvMassPt[iCut] = new TProfile2D("ESD_TruePrimaryEtaWeights_InvMass_Pt", "ESD_TruePrimaryEtaWeights_InvMass_Pt", 800,0,0.8,250,0,25); + fProfileTruePrimaryEtaWeightsInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fProfileTruePrimaryEtaWeightsInvMassPt[iCut]); + fHistoTrueSecondaryPi0InvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0_InvMass_Pt", "ESD_TrueSecondaryPi0_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTrueSecondaryPi0InvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTrueSecondaryPi0InvMassPt[iCut]); + fHistoTrueSecondaryEtaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryEta_InvMass_Pt", "ESD_TrueSecondaryEta_InvMass_Pt", 800,0,0.8,250,0,25); + fHistoTrueSecondaryEtaInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTrueSecondaryEtaInvMassPt[iCut]); + + fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromK0s_InvMass_Pt","ESD_TrueSecondaryPi0FromK0s_InvMass_Pt",800,0,0.8,250,0,25); + fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut]->Sumw2(); + fTrueList[iCut]->Add(fHistoTrueSecondaryPi0FromK0sInvMassPt[iCut]); + fHistoTrueSecondaryPi0FromEtaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromEta_InvMass_Pt","ESD_TrueSecondaryPi0FromEta_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueSecondaryPi0FromEtaInvMassPt[iCut]); + fHistoTrueSecondaryPi0FromLambdaInvMassPt[iCut] = new TH2F("ESD_TrueSecondaryPi0FromLambda_InvMass_Pt","ESD_TrueSecondaryPi0FromLambda_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueSecondaryPi0FromLambdaInvMassPt[iCut]); + if (fDoMesonQA > 0){ + fHistoTruePi0CaloPhotonInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloPhoton_InvMass_Pt","ESD_TruePi0CaloPhoton_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0CaloPhotonInvMassPt[iCut]); + fHistoTrueEtaCaloPhotonInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloPhoton_InvMass_Pt","ESD_TrueEtaCaloPhoton_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaCaloPhotonInvMassPt[iCut]); fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloConvertedPhoton_InvMass_Pt","ESD_TruePi0CaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25); fTrueList[iCut]->Add(fHistoTruePi0CaloConvertedPhotonInvMassPt[iCut]); fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloConvertedPhotonMatched_InvMass_Pt","ESD_TruePi0CaloConvertedPhotonMatched_InvMass_Pt",800,0,0.8,250,0,25); fTrueList[iCut]->Add(fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt[iCut]); - fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloConvertedPhoton_InvMass_Pt","ESD_TrueEtaCaloConvertedPhoton_InvMass_Pt",800,0,0.8,250,0,25); fTrueList[iCut]->Add(fHistoTrueEtaCaloConvertedPhotonInvMassPt[iCut]); fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloConvertedPhotonMatched_InvMass_Pt","ESD_TrueEtaCaloConvertedPhotonMatched_InvMass_Pt",800,0,0.8,250,0,25); fTrueList[iCut]->Add(fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[iCut]); - fHistoTrueMotherCaloElectronInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloElectron_InvMass_Pt","ESD_TrueMotherCaloElectron_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloElectronInvMassPt[iCut]); - fHistoTrueMotherCaloMergedClusterInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloMergedCluster_InvMass_Pt","ESD_TrueMotherCaloMergedCluster_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloMergedClusterInvMassPt[iCut]); + fHistoTruePi0CaloElectronInvMassPt[iCut] = new TH2F("ESD_TruePi0rCaloElectron_InvMass_Pt","ESD_TruePi0CaloElectron_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0CaloElectronInvMassPt[iCut]); + fHistoTrueEtaCaloElectronInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloElectron_InvMass_Pt","ESD_TrueEtaCaloElectron_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaCaloElectronInvMassPt[iCut]); + + fHistoTruePi0CaloMergedClusterInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloMergedCluster_InvMass_Pt","ESD_TruePi0CaloMergedCluster_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0CaloMergedClusterInvMassPt[iCut]); + fHistoTrueEtaCaloMergedClusterInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloMergedCluster_InvMass_Pt","ESD_TrueEtaCaloMergedCluster_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaCaloMergedClusterInvMassPt[iCut]); + fHistoTrueMotherCaloEMNonLeadingInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloEMNonLeading_InvMass_Pt","ESD_TrueMotherCaloEMNonLeading_InvMass_Pt",800,0,0.8,250,0,25); fTrueList[iCut]->Add(fHistoTrueMotherCaloEMNonLeadingInvMassPt[iCut]); - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt[iCut] = new TH2F("ESD_TrueMotherCaloMergedClusterPartConv_InvMass_Pt","ESD_TrueMotherCaloMergedClusterPartConv_InvMass_Pt",800,0,0.8,250,0,25); - fTrueList[iCut]->Add(fHistoTrueMotherCaloMergedClusterPartConvInvMassPt[iCut]); + fHistoTruePi0CaloMergedClusterPartConvInvMassPt[iCut] = new TH2F("ESD_TruePi0CaloMergedClusterPartConv_InvMass_Pt","ESD_TruePi0CaloMergedClusterPartConv_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTruePi0CaloMergedClusterPartConvInvMassPt[iCut]); + fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[iCut] = new TH2F("ESD_TrueEtaCaloMergedClusterPartConv_InvMass_Pt","ESD_TrueEtaCaloMergedClusterPartConv_InvMass_Pt",800,0,0.8,250,0,25); + fTrueList[iCut]->Add(fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[iCut]); fHistoTruePrimaryPi0MCPtResolPt[iCut] = new TH2F("ESD_TruePrimaryPi0_MCPt_ResolPt","ESD_TruePrimaryPi0_ResolPt_MCPt",500,0.03,25,1000,-1.,1.); fHistoTruePrimaryPi0MCPtResolPt[iCut]->Sumw2(); @@ -2469,14 +2518,20 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo } if(isTruePi0 || isTrueEta){// True Pion or Eta - if (!matched)fHistoTrueMotherInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (!matched){ + if (isTruePi0)fHistoTruePi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta)fHistoTrueEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } if (fDoMesonQA > 0){ - if (TrueGammaCandidate1->IsLargestComponentPhoton() && !matched) - fHistoTrueMotherCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - if (TrueGammaCandidate1->IsLargestComponentElectron() && !matched) - fHistoTrueMotherCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate1->IsLargestComponentPhoton() && !matched){ + if(isTruePi0) fHistoTruePi0CaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if(isTrueEta) fHistoTrueEtaCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } + if (TrueGammaCandidate1->IsLargestComponentElectron() && !matched){ + if(isTruePi0) fHistoTruePi0CaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if(isTrueEta) fHistoTrueEtaCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } if (TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion() ){ - if (!matched)fHistoTrueMotherCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (isTruePi0 && !matched)fHistoTruePi0CaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (isTrueEta && !matched)fHistoTrueEtaCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if ((TrueGammaCandidate0->GetMCLabelPositive() == gamma1MCLabel || TrueGammaCandidate0->GetMCLabelNegative() == gamma1MCLabel) && isTruePi0){ @@ -2486,10 +2541,14 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); } } - if ((TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged()) && !matched ) - fHistoTrueMotherCaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - if (TrueGammaCandidate1->IsMergedPartConv() && !matched) - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if ((TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged()) && !matched ){ + if (isTruePi0 )fHistoTruePi0CaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta )fHistoTrueEtaCaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } + if (TrueGammaCandidate1->IsMergedPartConv() && !matched){ + if (isTruePi0) fHistoTruePi0CaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } } if (!matched){ if (fDoMesonQA > 0){ @@ -2515,22 +2574,23 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo weightedSec= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),secMotherLabel, fMCStack, fInputEvent)/2.; //invariant mass is additive thus the weight for the daughters has to be devide by two for the K0s at a certain pt //cout << "MC input \t"<Pt()<<"\t"<Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if (isTruePi0) fHistoTrueSecondaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if (isTrueEta) fHistoTrueSecondaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); fCharMesonMCInfo = 2; if (secMotherLabel >-1){ - if(MCStack->Particle(secMotherLabel)->GetPdgCode()==310){ + if(MCStack->Particle(secMotherLabel)->GetPdgCode()==310 && isTruePi0 ){ fCharMesonMCInfo = 4; - fHistoTrueSecondaryMotherFromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + fHistoTrueSecondaryPi0FromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueK0sWithPi0DaughterMCPt[fiCut]->Fill(MCStack->Particle(secMotherLabel)->Pt()); } - if(MCStack->Particle(secMotherLabel)->GetPdgCode()==221){ + if(MCStack->Particle(secMotherLabel)->GetPdgCode()==221 && isTruePi0){ fCharMesonMCInfo = 3; - fHistoTrueSecondaryMotherFromEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + fHistoTrueSecondaryPi0FromEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueEtaWithPi0DaughterMCPt[fiCut]->Fill(MCStack->Particle(secMotherLabel)->Pt()); } - if(MCStack->Particle(secMotherLabel)->GetPdgCode()==3122){ + if(MCStack->Particle(secMotherLabel)->GetPdgCode()==3122 && isTruePi0){ fCharMesonMCInfo = 7; - fHistoTrueSecondaryMotherFromLambdaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + fHistoTrueSecondaryPi0FromLambdaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueLambdaWithPi0DaughterMCPt[fiCut]->Fill(MCStack->Particle(secMotherLabel)->Pt()); } } @@ -2543,9 +2603,15 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidates(AliAODConversionMo // cout << "rec \t " <Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); - fHistoTruePrimaryMotherW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - fProfileTruePrimaryMotherWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + if (isTruePi0){ + fHistoTruePrimaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + fHistoTruePrimaryPi0W0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + fProfileTruePrimaryPi0WeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + } else if (isTrueEta) { + fHistoTruePrimaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + fHistoTruePrimaryEtaW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + fProfileTruePrimaryEtaWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + } if (fDoMesonQA > 0){ if(isTruePi0){ // Only primary pi0 for resolution @@ -2635,14 +2701,20 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidatesAOD(AliAODConversio } if(isTruePi0 || isTrueEta){// True Pion or Eta - if (!matched)fHistoTrueMotherInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (!matched){ + if (isTruePi0)fHistoTruePi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta)fHistoTrueEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } if (fDoMesonQA > 0){ - if (TrueGammaCandidate1->IsLargestComponentPhoton() && !matched) - fHistoTrueMotherCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - if (TrueGammaCandidate1->IsLargestComponentElectron() && !matched) - fHistoTrueMotherCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (TrueGammaCandidate1->IsLargestComponentPhoton() && !matched){ + if (isTruePi0) fHistoTruePi0CaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } + if (TrueGammaCandidate1->IsLargestComponentElectron() && !matched) { + if (isTruePi0) fHistoTruePi0CaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloElectronInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } if (TrueGammaCandidate1->IsLargestComponentElectron() && TrueGammaCandidate1->IsConversion()){ - if (!matched)fHistoTrueMotherCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (isTruePi0 && !matched)fHistoTruePi0CaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if (isTrueEta && !matched)fHistoTrueEtaCaloConvertedPhotonInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); if ((TrueGammaCandidate0->GetMCLabelPositive() == gamma1MCLabel || TrueGammaCandidate0->GetMCLabelNegative() == gamma1MCLabel) && isTruePi0) @@ -2650,10 +2722,14 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidatesAOD(AliAODConversio if ((TrueGammaCandidate0->GetMCLabelPositive() == gamma1MCLabel || TrueGammaCandidate0->GetMCLabelNegative() == gamma1MCLabel) && isTrueEta) fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); } - if ((TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged()) && !matched ) - fHistoTrueMotherCaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - if (TrueGammaCandidate1->IsMergedPartConv() && !matched) - fHistoTrueMotherCaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if ((TrueGammaCandidate1->IsMerged() || TrueGammaCandidate1->IsMergedPartConv() || TrueGammaCandidate1->IsDalitzMerged()) && !matched ){ + if (isTruePi0) fHistoTruePi0CaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloMergedClusterInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } + if (TrueGammaCandidate1->IsMergedPartConv() && !matched) { + if (isTruePi0) fHistoTruePi0CaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + if (isTrueEta) fHistoTrueEtaCaloMergedClusterPartConvInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + } } if ( !matched){ @@ -2679,22 +2755,24 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidatesAOD(AliAODConversio weightedSec= ((AliConvEventCuts*)fEventCutArray->At(fiCut))->GetWeightForMeson(fV0Reader->GetPeriodName(),secMotherLabel, 0x0, fInputEvent)/2.; //invariant mass is additive thus the weight for the daughters has to be devide by two for the K0s at a certain pt //cout << "MC input \t"<Pt()<<"\t"<Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if (isTruePi0) fHistoTrueSecondaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + if (isTrueEta) fHistoTrueSecondaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + fCharMesonMCInfo = 2; if (secMotherLabel >-1){ - if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310){ + if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==310 && isTruePi0){ fCharMesonMCInfo = 4; - fHistoTrueSecondaryMotherFromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + fHistoTrueSecondaryPi0FromK0sInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueK0sWithPi0DaughterMCPt[fiCut]->Fill(static_cast(AODMCTrackArray->At(secMotherLabel))->Pt()); } - if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==221){ + if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==221 && isTruePi0){ fCharMesonMCInfo = 3; - fHistoTrueSecondaryMotherFromEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + fHistoTrueSecondaryPi0FromEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueEtaWithPi0DaughterMCPt[fiCut]->Fill(static_cast(AODMCTrackArray->At(secMotherLabel))->Pt()); } - if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==3122){ + if(static_cast(AODMCTrackArray->At(secMotherLabel))->GetPdgCode()==3122 && isTruePi0){ fCharMesonMCInfo = 7; - fHistoTrueSecondaryMotherFromLambdaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); + fHistoTrueSecondaryPi0FromLambdaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weightedSec); if (fDoMesonQA > 0)fHistoTrueLambdaWithPi0DaughterMCPt[fiCut]->Fill(static_cast(AODMCTrackArray->At(secMotherLabel))->Pt()); } } @@ -2707,10 +2785,15 @@ void AliAnalysisTaskGammaConvCalo::ProcessTrueMesonCandidatesAOD(AliAODConversio // cout << "rec \t " <Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); - fHistoTruePrimaryMotherW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); - fProfileTruePrimaryMotherWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); - + if (isTruePi0){ + fHistoTruePrimaryPi0InvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + fHistoTruePrimaryPi0W0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + fProfileTruePrimaryPi0WeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + } else if (isTrueEta){ + fHistoTruePrimaryEtaInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + fHistoTruePrimaryEtaW0WeightingInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt()); + fProfileTruePrimaryEtaWeightsInvMassPt[fiCut]->Fill(Pi0Candidate->M(),Pi0Candidate->Pt(),weighted); + } if (fDoMesonQA > 0){ if(isTruePi0){ // Only primary pi0 for resolution fHistoTruePrimaryPi0MCPtResolPt[fiCut]->Fill(static_cast(AODMCTrackArray->At(gamma1MotherLabel))->Pt(), diff --git a/PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.h b/PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.h index c3c13d76d92..9173c4a765c 100644 --- a/PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.h +++ b/PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.h @@ -221,28 +221,36 @@ class AliAnalysisTaskGammaConvCalo : public AliAnalysisTaskSE { TH1F **fHistoMCSecEtaPt; //! array of histos with secondary eta, pT TH1F **fHistoMCSecEtaSource; //! array of histos with secondary eta, source // MC validated reconstructed quantities mesons - TH2F **fHistoTrueMotherInvMassPt; //! array of histos with validated mothers, invMass, pt - TH2F **fHistoTrueMotherCaloPhotonInvMassPt; //! array of histos with validated mothers, photon leading, invMass, pt - TH2F **fHistoTrueMotherCaloConvertedPhotonInvMassPt; //! array of histos with validated mothers, converted photon leading, invMass, pt + TH2F **fHistoTruePi0InvMassPt; //! array of histos with validated pi0, invMass, pt + TH2F **fHistoTrueEtaInvMassPt; //! array of histos with validated eta, invMass, pt + TH2F **fHistoTruePi0CaloPhotonInvMassPt; //! array of histos with validated pi0, photon leading, invMass, pt + TH2F **fHistoTrueEtaCaloPhotonInvMassPt; //! array of histos with validated eta, photon leading, invMass, pt TH2F **fHistoTruePi0CaloConvertedPhotonInvMassPt; //! array of histos with validated pi0, converted photon leading, invMass, pt TH2F **fHistoTruePi0CaloConvertedPhotonMatchedInvMassPt; //! array of histos with validated pi0 matched with conv photon, converted photon leading, invMass, pt TH2F **fHistoTrueEtaCaloConvertedPhotonInvMassPt; //! array of histos with validated eta, converted photon leading, invMass, pt TH2F **fHistoTrueEtaCaloConvertedPhotonMatchedInvMassPt; //! array of histos with validated eta matched with conv photon, converted photon leading, invMass, pt - TH2F **fHistoTrueMotherCaloElectronInvMassPt; //! array of histos with validated mothers, electron leading, invMass, pt - TH2F **fHistoTrueMotherCaloMergedClusterInvMassPt; //! array of histos with validated mothers, merged cluster invMass, pt + TH2F **fHistoTruePi0CaloElectronInvMassPt; //! array of histos with validated mothers, electron leading, invMass, pt + TH2F **fHistoTrueEtaCaloElectronInvMassPt; //! array of histos with validated mothers, electron leading, invMass, pt + TH2F **fHistoTruePi0CaloMergedClusterInvMassPt; //! array of histos with validated mothers, merged cluster invMass, pt + TH2F **fHistoTrueEtaCaloMergedClusterInvMassPt; //! array of histos with validated mothers, merged cluster invMass, pt TH2F **fHistoTrueMotherCaloEMNonLeadingInvMassPt; //! array of histos with validated mothers, EM non leading, invMass, pt - TH2F **fHistoTrueMotherCaloMergedClusterPartConvInvMassPt; //! array of histos with validated mothers, merged cluster part conv, invMass, pt - TH2F **fHistoTruePrimaryMotherInvMassPt; //! array of histos with validated weighted primary mothers, invMass, pt - TH2F **fHistoTruePrimaryMotherW0WeightingInvMassPt; //! array of histos with validated unweighted primary mothers, invMass, pt - TProfile2D **fProfileTruePrimaryMotherWeightsInvMassPt; //! array of profiles with weights for validated primary mothers, invMass, pt + TH2F **fHistoTruePi0CaloMergedClusterPartConvInvMassPt; //! array of histos with validated mothers, merged cluster part conv, invMass, pt + TH2F **fHistoTrueEtaCaloMergedClusterPartConvInvMassPt; //! array of histos with validated mothers, merged cluster part conv, invMass, pt + TH2F **fHistoTruePrimaryPi0InvMassPt; //! array of histos with validated weighted primary mothers, invMass, pt + TH2F **fHistoTruePrimaryEtaInvMassPt; //! array of histos with validated weighted primary mothers, invMass, pt + TH2F **fHistoTruePrimaryPi0W0WeightingInvMassPt; //! array of histos with validated unweighted primary mothers, invMass, pt + TH2F **fHistoTruePrimaryEtaW0WeightingInvMassPt; //! array of histos with validated unweighted primary mothers, invMass, pt + TProfile2D **fProfileTruePrimaryPi0WeightsInvMassPt; //! array of profiles with weights for validated primary mothers, invMass, pt + TProfile2D **fProfileTruePrimaryEtaWeightsInvMassPt; //! array of profiles with weights for validated primary mothers, invMass, pt TH2F **fHistoTruePrimaryPi0MCPtResolPt; //! array of histos with validated weighted primary pi0, MCpt, resol pt TH2F **fHistoTruePrimaryEtaMCPtResolPt; //! array of histos with validated weighted primary eta, MCpt, resol pt - TH2F **fHistoTrueSecondaryMotherInvMassPt; //! array of histos with validated secondary mothers, invMass, pt - TH2F **fHistoTrueSecondaryMotherFromK0sInvMassPt; //! array of histos with validated secondary mothers from K0s, invMass, pt + TH2F **fHistoTrueSecondaryPi0InvMassPt; //! array of histos with validated secondary mothers, invMass, pt + TH2F **fHistoTrueSecondaryEtaInvMassPt; //! array of histos with validated secondary mothers, invMass, pt + TH2F **fHistoTrueSecondaryPi0FromK0sInvMassPt; //! array of histos with validated secondary mothers from K0s, invMass, pt TH1F **fHistoTrueK0sWithPi0DaughterMCPt; //! array of histos with K0s with reconstructed pi0 as daughter, pt - TH2F **fHistoTrueSecondaryMotherFromEtaInvMassPt; //! array of histos with validated secondary mothers from eta, invMass, pt + TH2F **fHistoTrueSecondaryPi0FromEtaInvMassPt; //! array of histos with validated secondary mothers from eta, invMass, pt TH1F **fHistoTrueEtaWithPi0DaughterMCPt; //! array of histos with eta with reconstructed pi0 as daughter, pt - TH2F **fHistoTrueSecondaryMotherFromLambdaInvMassPt; //! array of histos with validated secondary mothers from Lambda, invMass, pt + TH2F **fHistoTrueSecondaryPi0FromLambdaInvMassPt; //! array of histos with validated secondary mothers from Lambda, invMass, pt TH1F **fHistoTrueLambdaWithPi0DaughterMCPt; //! array of histos with lambda with reconstructed pi0 as daughter, pt TH2F **fHistoTrueBckGGInvMassPt; //! array of histos with pure gamma gamma combinatorial BG, invMass, pt TH2F **fHistoTrueBckContInvMassPt; //! array of histos with contamination BG, invMass, pt diff --git a/PWGGA/GammaConv/AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero.cxx b/PWGGA/GammaConv/AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero.cxx index f8acd8046c9..d4a774437e9 100644 --- a/PWGGA/GammaConv/AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero.cxx +++ b/PWGGA/GammaConv/AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero.cxx @@ -1892,7 +1892,7 @@ void AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero::ProcessMCParticles(){ TParticle *neutPion = fMCStack->Particle(labelNeutPion); TParticle *gamma1 = fMCStack->Particle(neutPion->GetDaughter(0)); TParticle *gamma2 = fMCStack->Particle(neutPion->GetDaughter(1)); - if (fNeutralPionMode == 0){ + if (fNeutralPionMode < 2){ if( ((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->PhotonIsSelectedMC(gamma1,fMCStack,kFALSE) && // test first daugther of pi0 ((AliConversionPhotonCuts*)fGammaCutArray->At(fiCut))->PhotonIsSelectedMC(gamma2,fMCStack,kFALSE) && // test second daughter of pi0 diff --git a/PWGGA/GammaConv/macros/AddTask_GammaCalo_pp.C b/PWGGA/GammaConv/macros/AddTask_GammaCalo_pp.C new file mode 100644 index 00000000000..fcd7e5e5138 --- /dev/null +++ b/PWGGA/GammaConv/macros/AddTask_GammaCalo_pp.C @@ -0,0 +1,228 @@ +void AddTask_GammaCalo_pp( Int_t trainConfig = 1, //change different set of cuts + Bool_t isMC = kFALSE, //run MC + Int_t enableQAMesonTask = 0, //enable QA in AliAnalysisTaskGammaConvV1 + Int_t enableQAClusterTask = 0, // enable additional QA task + TString fileNameInputForWeighting = "MCSpectraInput.root", // path to file for weigting input + TString cutnumberAODBranch = "0000000060084000001500000" // cutnumber for AOD branch + ) { + + // ================= Load Librariers ================================= + gSystem->Load("libCore.so"); + gSystem->Load("libTree.so"); + gSystem->Load("libGeom.so"); + gSystem->Load("libVMC.so"); + gSystem->Load("libPhysics.so"); + gSystem->Load("libMinuit"); + gSystem->Load("libSTEERBase"); + gSystem->Load("libESD"); + gSystem->Load("libAOD"); + gSystem->Load("libANALYSIS"); + gSystem->Load("libANALYSISalice"); + gSystem->Load("libPWGGAGammaConv.so"); + gSystem->Load("libCDB.so"); + gSystem->Load("libSTEER.so"); + gSystem->Load("libSTEERBase.so"); + gSystem->Load("libTENDER.so"); + gSystem->Load("libTENDERSupplies.so"); + + Int_t isHeavyIon = 0; + + // ================== GetAnalysisManager =============================== + AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); + if (!mgr) { + Error(Form("AddTask_GammaConvV1_%i",trainConfig), "No analysis manager found."); + return ; + } + + // ================== GetInputEventHandler ============================= + AliVEventHandler *inputHandler=mgr->GetInputEventHandler(); + + //========= Add PID Reponse to ANALYSIS manager ==== + if(!(AliPIDResponse*)mgr->GetTask("PIDResponseTask")){ + gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C"); + AddTaskPIDResponse(isMC); + } + + Printf("here \n"); + + //========= Set Cutnumber for V0Reader ================================ + TString cutnumberPhoton = "060084001001500000000"; + TString cutnumberEvent = "0000000"; + Bool_t doEtaShift = kFALSE; + AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); + + //========= Add V0 Reader to ANALYSIS manager if not yet existent ===== + if( !(AliV0ReaderV1*)mgr->GetTask("V0ReaderV1") ){ + AliV0ReaderV1 *fV0ReaderV1 = new AliV0ReaderV1("V0ReaderV1"); + + fV0ReaderV1->SetUseOwnXYZCalculation(kTRUE); + fV0ReaderV1->SetCreateAODs(kFALSE);// AOD Output + fV0ReaderV1->SetUseAODConversionPhoton(kTRUE); + + if (!mgr) { + Error("AddTask_V0ReaderV1", "No analysis manager found."); + return; + } + AliConvEventCuts *fEventCuts=NULL; + if(cutnumberEvent!=""){ + fEventCuts= new AliConvEventCuts(cutnumberEvent.Data(),cutnumberEvent.Data()); + fEventCuts->SetPreSelectionCutFlag(kTRUE); + if(fEventCuts->InitializeCutsFromCutString(cutnumberEvent.Data())){ + fEventCuts->DoEtaShift(doEtaShift); + fV0ReaderV1->SetEventCuts(fEventCuts); + fEventCuts->SetFillCutHistograms("",kTRUE); + } + } + // Set AnalysisCut Number + AliConversionPhotonCuts *fCuts=NULL; + if(cutnumberPhoton!=""){ + fCuts= new AliConversionPhotonCuts(cutnumberPhoton.Data(),cutnumberPhoton.Data()); + fCuts->SetPreSelectionCutFlag(kTRUE); + fCuts->SetIsHeavyIon(isHeavyIon); + if(fCuts->InitializeCutsFromCutString(cutnumberPhoton.Data())){ + fV0ReaderV1->SetConversionCuts(fCuts); + fCuts->SetFillCutHistograms("",kTRUE); + } + } + if(inputHandler->IsA()==AliAODInputHandler::Class()){ + // AOD mode + fV0ReaderV1->SetDeltaAODBranchName(Form("GammaConv_%s_gamma",cutnumberAODBranch.Data())); + } + fV0ReaderV1->Init(); + + AliLog::SetGlobalLogLevel(AliLog::kFatal); + + //connect input V0Reader + mgr->AddTask(fV0ReaderV1); + mgr->ConnectInput(fV0ReaderV1,0,cinput); + } + + //================================================ + //========= Add task to the ANALYSIS manager ===== + //================================================ + AliAnalysisTaskGammaCalo *task=NULL; + task= new AliAnalysisTaskGammaCalo(Form("GammaCalo_%i",trainConfig)); + task->SetIsHeavyIon(isHeavyIon); + task->SetIsMC(isMC); + // Cut Numbers to use in Analysis + Int_t numberOfCuts = 4; + + TString *eventCutArray = new TString[numberOfCuts]; + TString *clusterCutArray = new TString[numberOfCuts]; + TString *mesonCutArray = new TString[numberOfCuts]; + + // cluster cuts + // 0 "ClusterType", 1 "EtaMin", 2 "EtaMax", 3 "PhiMin", 4 "PhiMax", 5 "DistanceToBadChannel", 6 "Timing", 7 "TrackMatching", 8 "ExoticCell", + // 9 "MinEnergy", 10 "MinNCells", 11 "MinM02", 12 "MaxM02", 13 "MinM20", 14 "MaxM20", 15 "MaximumDispersion", 16 "NLM" + if (trainConfig == 1){ // EMCAL clusters 2.76 TeV LHC11a, with SDD (0,1), kEMC1 (2,3) + eventCutArray[ 0] = "0002011"; clusterCutArray[0] = "10000040022030000"; mesonCutArray[0] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 1] = "0002011"; clusterCutArray[1] = "10000040052030000"; mesonCutArray[1] = "01631031009000"; // 300 MeV cluster min energy + eventCutArray[ 2] = "0005111"; clusterCutArray[2] = "10000040022030000"; mesonCutArray[2] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 3] = "0005111"; clusterCutArray[3] = "10000040052030000"; mesonCutArray[3] = "01631031009000"; // 300 MeV cluster min energy + } else if (trainConfig == 2){ // EMCAL clusters, EMCEGA triggers + eventCutArray[ 0] = "0008311"; clusterCutArray[0] = "10000040022030000"; mesonCutArray[0] = "01631031009000"; // EMCEG1, 100 MeV cluster min energy + eventCutArray[ 1] = "0008311"; clusterCutArray[1] = "10000040052030000"; mesonCutArray[1] = "01631031009000"; // EMCEG1, 300 MeV cluster min energy + eventCutArray[ 2] = "0008511"; clusterCutArray[2] = "10000040022030000"; mesonCutArray[2] = "01631031009000"; // EMCEG2, 100 MeV cluster min energy + eventCutArray[ 3] = "0008511"; clusterCutArray[3] = "10000040052030000"; mesonCutArray[3] = "01631031009000"; // EMCEG2, 300 MeV cluster min energy + } else if (trainConfig == 3){ // EMCAL clusters, EMCEJE triggers + eventCutArray[ 0] = "0009311"; clusterCutArray[0] = "10000040022030000"; mesonCutArray[0] = "01631031009000"; // EMCEJ1, 100 MeV cluster min energy + eventCutArray[ 1] = "0009311"; clusterCutArray[1] = "10000040052030000"; mesonCutArray[1] = "01631031009000"; // EMCEJ1, 300 MeV cluster min energy + eventCutArray[ 2] = "0009511"; clusterCutArray[2] = "10000040022030000"; mesonCutArray[2] = "01631031009000"; // EMCEJ2, 100 MeV cluster min energy + eventCutArray[ 3] = "0009511"; clusterCutArray[3] = "10000040052030000"; mesonCutArray[3] = "01631031009000"; // EMCEJ2, 300 MeV cluster min energy + } else if (trainConfig == 4){ // EMCAL clusters 2.76 TeV LHC11a, with SDD (0,1), kEMC1 (2,3), track matching 0.035 + eventCutArray[ 0] = "0002011"; clusterCutArray[0] = "10000042022030000"; mesonCutArray[0] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 1] = "0002011"; clusterCutArray[1] = "10000042052030000"; mesonCutArray[1] = "01631031009000"; // 300 MeV cluster min energy + eventCutArray[ 2] = "0005111"; clusterCutArray[2] = "10000042022030000"; mesonCutArray[2] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 3] = "0005111"; clusterCutArray[3] = "10000042052030000"; mesonCutArray[3] = "01631031009000"; // 300 MeV cluster min energy + } else if (trainConfig == 5){ // EMCAL clusters, EMCEGA triggers, track matching 0.035 + eventCutArray[ 0] = "0008311"; clusterCutArray[0] = "10000042022030000"; mesonCutArray[0] = "01631031009000"; // EMCEG1, 100 MeV cluster min energy + eventCutArray[ 1] = "0008311"; clusterCutArray[1] = "10000042052030000"; mesonCutArray[1] = "01631031009000"; // EMCEG1, 300 MeV cluster min energy + eventCutArray[ 2] = "0008511"; clusterCutArray[2] = "10000042022030000"; mesonCutArray[2] = "01631031009000"; // EMCEG2, 100 MeV cluster min energy + eventCutArray[ 3] = "0008511"; clusterCutArray[3] = "10000042052030000"; mesonCutArray[3] = "01631031009000"; // EMCEG2, 300 MeV cluster min energy + } else if (trainConfig == 6){ // EMCAL clusters, EMCEJE triggers, track matching 0.035 + eventCutArray[ 0] = "0009311"; clusterCutArray[0] = "10000042022030000"; mesonCutArray[0] = "01631031009000"; // EMCEJ1, 100 MeV cluster min energy + eventCutArray[ 1] = "0009311"; clusterCutArray[1] = "10000042052030000"; mesonCutArray[1] = "01631031009000"; // EMCEJ1, 300 MeV cluster min energy + eventCutArray[ 2] = "0009511"; clusterCutArray[2] = "10000042022030000"; mesonCutArray[2] = "01631031009000"; // EMCEJ2, 100 MeV cluster min energy + eventCutArray[ 3] = "0009511"; clusterCutArray[3] = "10000042052030000"; mesonCutArray[3] = "01631031009000"; // EMCEJ2, 300 MeV cluster min energy + } else if (trainConfig == 7){ // EMCAL clusters 2.76 TeV LHC11a, with SDD (0,1), kEMC1 (2,3), track matching 0.04 + eventCutArray[ 0] = "0002011"; clusterCutArray[0] = "10000043022030000"; mesonCutArray[0] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 1] = "0002011"; clusterCutArray[1] = "10000043052030000"; mesonCutArray[1] = "01631031009000"; // 300 MeV cluster min energy + eventCutArray[ 2] = "0005111"; clusterCutArray[2] = "10000043022030000"; mesonCutArray[2] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 3] = "0005111"; clusterCutArray[3] = "10000043052030000"; mesonCutArray[3] = "01631031009000"; // 300 MeV cluster min energy + } else if (trainConfig == 8){ // EMCAL clusters, EMCEGA triggers, track matching 0.04 + eventCutArray[ 0] = "0008311"; clusterCutArray[0] = "10000043022030000"; mesonCutArray[0] = "01631031009000"; // EMCEG1, 100 MeV cluster min energy + eventCutArray[ 1] = "0008311"; clusterCutArray[1] = "10000043052030000"; mesonCutArray[1] = "01631031009000"; // EMCEG1, 300 MeV cluster min energy + eventCutArray[ 2] = "0008511"; clusterCutArray[2] = "10000043022030000"; mesonCutArray[2] = "01631031009000"; // EMCEG2, 100 MeV cluster min energy + eventCutArray[ 3] = "0008511"; clusterCutArray[3] = "10000043052030000"; mesonCutArray[3] = "01631031009000"; // EMCEG2, 300 MeV cluster min energy + } else if (trainConfig == 9){ // EMCAL clusters, EMCEJE triggers, track matching 0.04 + eventCutArray[ 0] = "0009311"; clusterCutArray[0] = "10000043022030000"; mesonCutArray[0] = "01631031009000"; // EMCEJ1, 100 MeV cluster min energy + eventCutArray[ 1] = "0009311"; clusterCutArray[1] = "10000043052030000"; mesonCutArray[1] = "01631031009000"; // EMCEJ1, 300 MeV cluster min energy + eventCutArray[ 2] = "0009511"; clusterCutArray[2] = "10000043022030000"; mesonCutArray[2] = "01631031009000"; // EMCEJ2, 100 MeV cluster min energy + eventCutArray[ 3] = "0009511"; clusterCutArray[3] = "10000043052030000"; mesonCutArray[3] = "01631031009000"; // EMCEJ2, 300 MeV cluster min energy + } else if (trainConfig == 31) { //PHOS clusters + eventCutArray[ 0] = "0002011"; clusterCutArray[0] = "20000030022000000"; mesonCutArray[0] = "01631031009000"; //pp LHC11a with SDD, PHOS + eventCutArray[ 1] = "0000011"; clusterCutArray[1] = "20000030022000000"; mesonCutArray[1] = "01631031009000"; //pp LHC13g default MB + eventCutArray[ 2] = "0006111"; clusterCutArray[2] = "20000030022000000"; mesonCutArray[2] = "01631031009000"; //pp LHC11a PHI1 + eventCutArray[ 3] = "0006211"; clusterCutArray[3] = "20000030022000000"; mesonCutArray[3] = "01631031009000"; //pp LHC11a PHI7 + } else if (trainConfig == 32) { //PHOS clusters, track matching 0.035 + eventCutArray[ 0] = "0002011"; clusterCutArray[0] = "20000032022000000"; mesonCutArray[0] = "01631031009000"; //pp LHC11a with SDD, PHOS + eventCutArray[ 1] = "0000011"; clusterCutArray[1] = "20000032022000000"; mesonCutArray[1] = "01631031009000"; //pp LHC13g default MB + eventCutArray[ 2] = "0006111"; clusterCutArray[2] = "20000032022000000"; mesonCutArray[2] = "01631031009000"; //pp LHC11a PHI1 + eventCutArray[ 3] = "0006211"; clusterCutArray[3] = "20000032022000000"; mesonCutArray[3] = "01631031009000"; //pp LHC11a PHI7 + } else if (trainConfig == 32) { //PHOS clusters, track matching 0.04 + eventCutArray[ 0] = "0002011"; clusterCutArray[0] = "20000033022000000"; mesonCutArray[0] = "01631031009000"; //pp LHC11a with SDD, PHOS + eventCutArray[ 1] = "0000011"; clusterCutArray[1] = "20000033022000000"; mesonCutArray[1] = "01631031009000"; //pp LHC13g default MB + eventCutArray[ 2] = "0006111"; clusterCutArray[2] = "20000033022000000"; mesonCutArray[2] = "01631031009000"; //pp LHC11a PHI1 + eventCutArray[ 3] = "0006211"; clusterCutArray[3] = "20000033022000000"; mesonCutArray[3] = "01631031009000"; //pp LHC11a PHI7 + } else { + Error(Form("GammaCalo_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration"); + return; + } + + TList *EventCutList = new TList(); + TList *ClusterCutList = new TList(); + TList *MesonCutList = new TList(); + + + EventCutList->SetOwner(kTRUE); + AliConvEventCuts **analysisEventCuts = new AliConvEventCuts*[numberOfCuts]; + ClusterCutList->SetOwner(kTRUE); + AliCaloPhotonCuts **analysisClusterCuts = new AliCaloPhotonCuts*[numberOfCuts]; + MesonCutList->SetOwner(kTRUE); + AliConversionMesonCuts **analysisMesonCuts = new AliConversionMesonCuts*[numberOfCuts]; + + for(Int_t i = 0; iInitializeCutsFromCutString(eventCutArray[i].Data()); + EventCutList->Add(analysisEventCuts[i]); + analysisEventCuts[i]->SetFillCutHistograms("",kFALSE); + + analysisClusterCuts[i] = new AliCaloPhotonCuts(); + analysisClusterCuts[i]->InitializeCutsFromCutString(clusterCutArray[i].Data()); + ClusterCutList->Add(analysisClusterCuts[i]); + analysisClusterCuts[i]->SetFillCutHistograms(""); + + analysisMesonCuts[i] = new AliConversionMesonCuts(); + analysisMesonCuts[i]->InitializeCutsFromCutString(mesonCutArray[i].Data()); + MesonCutList->Add(analysisMesonCuts[i]); + analysisMesonCuts[i]->SetFillCutHistograms(""); + } + task->SetEventCutList(numberOfCuts,EventCutList); + task->SetCaloCutList(numberOfCuts,ClusterCutList); + task->SetMesonCutList(numberOfCuts,MesonCutList); + task->SetDoMesonAnalysis(kTRUE); + task->SetDoMesonQA(enableQAMesonTask); //Attention new switch for Pi0 QA + task->SetDoClusterQA(enableQAClusterTask); //Attention new switch small for Cluster QA + + //connect containers + AliAnalysisDataContainer *coutput = + mgr->CreateContainer(Form("GammaCalo_%i",trainConfig), TList::Class(), + AliAnalysisManager::kOutputContainer,Form("GammaCalo_%i.root",trainConfig)); + + mgr->AddTask(task); + mgr->ConnectInput(task,0,cinput); + mgr->ConnectOutput(task,1,coutput); + + return; + +} diff --git a/PWGGA/GammaConv/macros/AddTask_GammaConvCalo_pp.C b/PWGGA/GammaConv/macros/AddTask_GammaConvCalo_pp.C index 271f5b008aa..7d0947a54c7 100644 --- a/PWGGA/GammaConv/macros/AddTask_GammaConvCalo_pp.C +++ b/PWGGA/GammaConv/macros/AddTask_GammaConvCalo_pp.C @@ -43,9 +43,12 @@ void AddTask_GammaConvCalo_pp( Int_t trainConfig = 1, //change different set o AddTaskPIDResponse(isMC); } + Printf("here \n"); + //========= Set Cutnumber for V0Reader ================================ - TString cutnumberPhoton = "002084000002200000000"; + TString cutnumberPhoton = "060084001001500000000"; TString cutnumberEvent = "0000000"; + Bool_t doEtaShift = kFALSE; AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer(); //========= Add V0 Reader to ANALYSIS manager if not yet existent ===== @@ -66,12 +69,12 @@ void AddTask_GammaConvCalo_pp( Int_t trainConfig = 1, //change different set o fEventCuts= new AliConvEventCuts(cutnumberEvent.Data(),cutnumberEvent.Data()); fEventCuts->SetPreSelectionCutFlag(kTRUE); if(fEventCuts->InitializeCutsFromCutString(cutnumberEvent.Data())){ + fEventCuts->DoEtaShift(doEtaShift); fV0ReaderV1->SetEventCuts(fEventCuts); fEventCuts->SetFillCutHistograms("",kTRUE); } } - // Set AnalysisCut Number AliConversionPhotonCuts *fCuts=NULL; if(cutnumberPhoton!=""){ @@ -83,7 +86,6 @@ void AddTask_GammaConvCalo_pp( Int_t trainConfig = 1, //change different set o fCuts->SetFillCutHistograms("",kTRUE); } } - if(inputHandler->IsA()==AliAODInputHandler::Class()){ // AOD mode fV0ReaderV1->SetDeltaAODBranchName(Form("GammaConv_%s_gamma",cutnumberAODBranch.Data())); @@ -103,27 +105,80 @@ void AddTask_GammaConvCalo_pp( Int_t trainConfig = 1, //change different set o //================================================ AliAnalysisTaskGammaConvCalo *task=NULL; task= new AliAnalysisTaskGammaConvCalo(Form("GammaConvCalo_%i",trainConfig)); - task->SetIsHeavyIon(0); + task->SetIsHeavyIon(isHeavyIon); task->SetIsMC(isMC); // Cut Numbers to use in Analysis - Int_t numberOfCuts = 3; - + Int_t numberOfCuts = 4; + TString *eventCutArray = new TString[numberOfCuts]; TString *photonCutArray = new TString[numberOfCuts]; TString *clusterCutArray = new TString[numberOfCuts]; TString *mesonCutArray = new TString[numberOfCuts]; - // meson cuts - // meson type (Dalitz or not), BG scheme, pool depth, rotation degrees, rapidity cut, radius cut, alpha, chi2, shared electrons, reject to close v0, MC smearing, dca, dca, dca + // cluster cuts + // 0 "ClusterType", 1 "EtaMin", 2 "EtaMax", 3 "PhiMin", 4 "PhiMax", 5 "DistanceToBadChannel", 6 "Timing", 7 "TrackMatching", 8 "ExoticCell", + // 9 "MinEnergy", 10 "MinNCells", 11 "MinM02", 12 "MaxM02", 13 "MinM20", 14 "MaxM20", 15 "MaximumDispersion", 16 "NLM" - if (trainConfig == 1){ - eventCutArray[ 0] = "0000001"; photonCutArray[ 0] = "002092970028250400000"; clusterCutArray[0] = "10000040022030000"; mesonCutArray[0] = "01525065000000"; //standard cut LHC11h pp 2.76TeV, kMB // EMCAL clusters - eventCutArray[ 1] = "0005101"; photonCutArray[ 1] = "002092970028250400000"; clusterCutArray[1] = "10000040022030000"; mesonCutArray[1] = "01525065000000"; //standard cut LHC11h pp 2.76TeV, kEMC1 // EMCAL clusters - eventCutArray[ 2] = "0002001"; photonCutArray[ 2] = "002092970028250400000"; clusterCutArray[2] = "10000040022030000"; mesonCutArray[2] = "01525065000000"; //standard cut LHC11h pp 2.76TeV, SDD V0OR // EMCAL clusters - } else if (trainConfig == 2){ - eventCutArray[ 0] = "0000001"; photonCutArray[ 0] = "002092970028250400000"; clusterCutArray[0] = "20000030022000000"; mesonCutArray[0] = "01525065000000"; //standard cut LHC11h pp 2.76TeV, kMB // PHOS clusters - eventCutArray[ 1] = "0006101"; photonCutArray[ 1] = "002092970028250400000"; clusterCutArray[1] = "20000030022000000"; mesonCutArray[1] = "01525065000000"; //standard cut LHC11h pp 2.76TeV, kPHI1 // PHOS clusters - eventCutArray[ 2] = "0002001"; photonCutArray[ 2] = "002092970028250400000"; clusterCutArray[2] = "20000030022000000"; mesonCutArray[2] = "01525065000000"; //standard cut LHC11h pp 2.76TeV, SDD V0OR //PHOS clusters + if (trainConfig == 1){ // EMCAL clusters 2.76 TeV LHC11a, with SDD (0,1), kEMC1 (2,3) + eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "10000040022030000"; mesonCutArray[0] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 1] = "0002011"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "10000040052030000"; mesonCutArray[1] = "01631031009000"; // 300 MeV cluster min energy + eventCutArray[ 2] = "0005111"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "10000040022030000"; mesonCutArray[2] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 3] = "0005111"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "10000040052030000"; mesonCutArray[3] = "01631031009000"; // 300 MeV cluster min energy + } else if (trainConfig == 2){ // EMCAL clusters, EMCEGA triggers + eventCutArray[ 0] = "0008311"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "10000040022030000"; mesonCutArray[0] = "01631031009000"; // EMCEG1, 100 MeV cluster min energy + eventCutArray[ 1] = "0008311"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "10000040052030000"; mesonCutArray[1] = "01631031009000"; // EMCEG1, 300 MeV cluster min energy + eventCutArray[ 2] = "0008511"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "10000040022030000"; mesonCutArray[2] = "01631031009000"; // EMCEG2, 100 MeV cluster min energy + eventCutArray[ 3] = "0008511"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "10000040052030000"; mesonCutArray[3] = "01631031009000"; // EMCEG2, 300 MeV cluster min energy + } else if (trainConfig == 3){ // EMCAL clusters, EMCEJE triggers + eventCutArray[ 0] = "0009311"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "10000040022030000"; mesonCutArray[0] = "01631031009000"; // EMCEJ1, 100 MeV cluster min energy + eventCutArray[ 1] = "0009311"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "10000040052030000"; mesonCutArray[1] = "01631031009000"; // EMCEJ1, 300 MeV cluster min energy + eventCutArray[ 2] = "0009511"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "10000040022030000"; mesonCutArray[2] = "01631031009000"; // EMCEJ2, 100 MeV cluster min energy + eventCutArray[ 3] = "0009511"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "10000040052030000"; mesonCutArray[3] = "01631031009000"; // EMCEJ2, 300 MeV cluster min energy + } else if (trainConfig == 4){ // EMCAL clusters 2.76 TeV LHC11a, with SDD (0,1), kEMC1 (2,3), track matching 0.035 + eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "10000042022030000"; mesonCutArray[0] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 1] = "0002011"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "10000042052030000"; mesonCutArray[1] = "01631031009000"; // 300 MeV cluster min energy + eventCutArray[ 2] = "0005111"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "10000042022030000"; mesonCutArray[2] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 3] = "0005111"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "10000042052030000"; mesonCutArray[3] = "01631031009000"; // 300 MeV cluster min energy + } else if (trainConfig == 5){ // EMCAL clusters, EMCEGA triggers, track matching 0.035 + eventCutArray[ 0] = "0008311"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "10000042022030000"; mesonCutArray[0] = "01631031009000"; // EMCEG1, 100 MeV cluster min energy + eventCutArray[ 1] = "0008311"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "10000042052030000"; mesonCutArray[1] = "01631031009000"; // EMCEG1, 300 MeV cluster min energy + eventCutArray[ 2] = "0008511"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "10000042022030000"; mesonCutArray[2] = "01631031009000"; // EMCEG2, 100 MeV cluster min energy + eventCutArray[ 3] = "0008511"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "10000042052030000"; mesonCutArray[3] = "01631031009000"; // EMCEG2, 300 MeV cluster min energy + } else if (trainConfig == 6){ // EMCAL clusters, EMCEJE triggers, track matching 0.035 + eventCutArray[ 0] = "0009311"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "10000042022030000"; mesonCutArray[0] = "01631031009000"; // EMCEJ1, 100 MeV cluster min energy + eventCutArray[ 1] = "0009311"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "10000042052030000"; mesonCutArray[1] = "01631031009000"; // EMCEJ1, 300 MeV cluster min energy + eventCutArray[ 2] = "0009511"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "10000042022030000"; mesonCutArray[2] = "01631031009000"; // EMCEJ2, 100 MeV cluster min energy + eventCutArray[ 3] = "0009511"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "10000042052030000"; mesonCutArray[3] = "01631031009000"; // EMCEJ2, 300 MeV cluster min energy + } else if (trainConfig == 7){ // EMCAL clusters 2.76 TeV LHC11a, with SDD (0,1), kEMC1 (2,3), track matching 0.04 + eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "10000043022030000"; mesonCutArray[0] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 1] = "0002011"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "10000043052030000"; mesonCutArray[1] = "01631031009000"; // 300 MeV cluster min energy + eventCutArray[ 2] = "0005111"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "10000043022030000"; mesonCutArray[2] = "01631031009000"; // 100 MeV cluster min energy + eventCutArray[ 3] = "0005111"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "10000043052030000"; mesonCutArray[3] = "01631031009000"; // 300 MeV cluster min energy + } else if (trainConfig == 8){ // EMCAL clusters, EMCEGA triggers, track matching 0.04 + eventCutArray[ 0] = "0008311"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "10000043022030000"; mesonCutArray[0] = "01631031009000"; // EMCEG1, 100 MeV cluster min energy + eventCutArray[ 1] = "0008311"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "10000043052030000"; mesonCutArray[1] = "01631031009000"; // EMCEG1, 300 MeV cluster min energy + eventCutArray[ 2] = "0008511"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "10000043022030000"; mesonCutArray[2] = "01631031009000"; // EMCEG2, 100 MeV cluster min energy + eventCutArray[ 3] = "0008511"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "10000043052030000"; mesonCutArray[3] = "01631031009000"; // EMCEG2, 300 MeV cluster min energy + } else if (trainConfig == 9){ // EMCAL clusters, EMCEJE triggers, track matching 0.04 + eventCutArray[ 0] = "0009311"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "10000043022030000"; mesonCutArray[0] = "01631031009000"; // EMCEJ1, 100 MeV cluster min energy + eventCutArray[ 1] = "0009311"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "10000043052030000"; mesonCutArray[1] = "01631031009000"; // EMCEJ1, 300 MeV cluster min energy + eventCutArray[ 2] = "0009511"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "10000043022030000"; mesonCutArray[2] = "01631031009000"; // EMCEJ2, 100 MeV cluster min energy + eventCutArray[ 3] = "0009511"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "10000043052030000"; mesonCutArray[3] = "01631031009000"; // EMCEJ2, 300 MeV cluster min energy + } else if (trainConfig == 31) { //PHOS clusters + eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "20000030022000000"; mesonCutArray[0] = "01631031009000"; //pp LHC11a with SDD, PHOS + eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "20000030022000000"; mesonCutArray[1] = "01631031009000"; //pp LHC13g default MB + eventCutArray[ 2] = "0006111"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "20000030022000000"; mesonCutArray[2] = "01631031009000"; //pp LHC11a PHI1 + eventCutArray[ 3] = "0006211"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "20000030022000000"; mesonCutArray[3] = "01631031009000"; //pp LHC11a PHI7 + } else if (trainConfig == 32) { //PHOS clusters, track matching 0.035 + eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "20000032022000000"; mesonCutArray[0] = "01631031009000"; //pp LHC11a with SDD, PHOS + eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "20000032022000000"; mesonCutArray[1] = "01631031009000"; //pp LHC13g default MB + eventCutArray[ 2] = "0006111"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "20000032022000000"; mesonCutArray[2] = "01631031009000"; //pp LHC11a PHI1 + eventCutArray[ 3] = "0006211"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "20000032022000000"; mesonCutArray[3] = "01631031009000"; //pp LHC11a PHI7 + } else if (trainConfig == 32) { //PHOS clusters, track matching 0.04 + eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "002093663003800000000"; clusterCutArray[0] = "20000033022000000"; mesonCutArray[0] = "01631031009000"; //pp LHC11a with SDD, PHOS + eventCutArray[ 1] = "0000011"; photonCutArray[ 1] = "002093663003800000000"; clusterCutArray[1] = "20000033022000000"; mesonCutArray[1] = "01631031009000"; //pp LHC13g default MB + eventCutArray[ 2] = "0006111"; photonCutArray[ 2] = "002093663003800000000"; clusterCutArray[2] = "20000033022000000"; mesonCutArray[2] = "01631031009000"; //pp LHC11a PHI1 + eventCutArray[ 3] = "0006211"; photonCutArray[ 3] = "002093663003800000000"; clusterCutArray[3] = "20000033022000000"; mesonCutArray[3] = "01631031009000"; //pp LHC11a PHI7 } else { Error(Form("GammaConvCalo_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration"); return; @@ -134,9 +189,21 @@ void AddTask_GammaConvCalo_pp( Int_t trainConfig = 1, //change different set o TList *ClusterCutList = new TList(); TList *MesonCutList = new TList(); - TList *HeaderList = new TList(); - TObjString *Header1 = new TObjString("BOX"); - HeaderList->Add(Header1); +// TList *HeaderList = new TList(); +// if (doWeightingPart==1) { +// TObjString *Header1 = new TObjString("pi0_1"); +// HeaderList->Add(Header1); +// } +// if (doWeightingPart==2){ +// TObjString *Header3 = new TObjString("eta_2"); +// HeaderList->Add(Header3); +// } +// if (doWeightingPart==3) { +// TObjString *Header1 = new TObjString("pi0_1"); +// HeaderList->Add(Header1); +// TObjString *Header3 = new TObjString("eta_2"); +// HeaderList->Add(Header3); +// } EventCutList->SetOwner(kTRUE); AliConvEventCuts **analysisEventCuts = new AliConvEventCuts*[numberOfCuts]; @@ -148,26 +215,27 @@ void AddTask_GammaConvCalo_pp( Int_t trainConfig = 1, //change different set o AliConversionMesonCuts **analysisMesonCuts = new AliConversionMesonCuts*[numberOfCuts]; for(Int_t i = 0; iInitializeCutsFromCutString(eventCutArray[i].Data()); EventCutList->Add(analysisEventCuts[i]); analysisEventCuts[i]->SetFillCutHistograms("",kFALSE); - + analysisCuts[i] = new AliConversionPhotonCuts(); analysisCuts[i]->InitializeCutsFromCutString(photonCutArray[i].Data()); + analysisCuts[i]->SetIsHeavyIon(isHeavyIon); ConvCutList->Add(analysisCuts[i]); analysisCuts[i]->SetFillCutHistograms("",kFALSE); - + analysisClusterCuts[i] = new AliCaloPhotonCuts(); analysisClusterCuts[i]->InitializeCutsFromCutString(clusterCutArray[i].Data()); ClusterCutList->Add(analysisClusterCuts[i]); analysisClusterCuts[i]->SetFillCutHistograms(""); - + analysisMesonCuts[i] = new AliConversionMesonCuts(); analysisMesonCuts[i]->InitializeCutsFromCutString(mesonCutArray[i].Data()); MesonCutList->Add(analysisMesonCuts[i]); analysisMesonCuts[i]->SetFillCutHistograms(""); - analysisEventCuts[i]->SetAcceptedHeader(HeaderList); +// analysisEventCuts[i]->SetAcceptedHeader(HeaderList); } task->SetEventCutList(numberOfCuts,EventCutList); @@ -179,7 +247,7 @@ void AddTask_GammaConvCalo_pp( Int_t trainConfig = 1, //change different set o task->SetDoMesonQA(enableQAMesonTask); //Attention new switch for Pi0 QA task->SetDoPhotonQA(enableQAPhotonTask); //Attention new switch small for Photon QA task->SetDoClusterQA(1); //Attention new switch small for Cluster QA - + //connect containers AliAnalysisDataContainer *coutput = mgr->CreateContainer(Form("GammaConvCalo_%i",trainConfig), TList::Class(), diff --git a/PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp.C b/PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp.C index 9e8b32f88d3..ff468f5478b 100644 --- a/PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp.C +++ b/PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp.C @@ -330,9 +330,42 @@ void AddTask_GammaConvV1_pp( Int_t trainConfig = 1, // change differ eventCutArray[ 1] = "0009011"; photonCutArray[ 1] = "002092570028250400000"; mesonCutArray[1] = "01521065000000"; // trigger kEMCEJE with y 0.8 eventCutArray[ 2] = "0000011"; photonCutArray[ 2] = "002092570028250400000"; mesonCutArray[2] = "01521065000000"; // minimum bias with y 0.8 eventCutArray[ 3] = "0001111"; photonCutArray[ 3] = "002092570028250400000"; mesonCutArray[3] = "01521065000000"; // trigger kINT8 with y 0.8 - } - - else { + } else if (trainConfig == 45) { + eventCutArray[ 0] = "0004211"; photonCutArray[ 0] = "002092570028250400000"; mesonCutArray[0] = "01521065000000"; // trigger kTRD CINT8 HEE + eventCutArray[ 1] = "0004411"; photonCutArray[ 1] = "002092570028250400000"; mesonCutArray[1] = "01521065000000"; // trigger kTRD CINT8 HSE + eventCutArray[ 2] = "0004611"; photonCutArray[ 2] = "002092570028250400000"; mesonCutArray[2] = "01521065000000"; // trigger kTRD CINT8 HJE + eventCutArray[ 3] = "0004811"; photonCutArray[ 3] = "002092570028250400000"; mesonCutArray[3] = "01521065000000"; // trigger kTRD CINT8 HQU + } else if (trainConfig == 46) { + eventCutArray[ 0] = "0004111"; photonCutArray[ 0] = "002092570028250400000"; mesonCutArray[0] = "01521065000000"; // trigger kTRD CINT7 HEE + eventCutArray[ 1] = "0004311"; photonCutArray[ 1] = "002092570028250400000"; mesonCutArray[1] = "01521065000000"; // trigger kTRD CINT7 HSE + eventCutArray[ 2] = "0004511"; photonCutArray[ 2] = "002092570028250400000"; mesonCutArray[2] = "01521065000000"; // trigger kTRD CINT7 HJE + eventCutArray[ 3] = "0004711"; photonCutArray[ 3] = "002092570028250400000"; mesonCutArray[3] = "01521065000000"; // trigger kTRD CINT7 HQU + } else if (trainConfig == 47) { + eventCutArray[ 0] = "0005211"; photonCutArray[ 0] = "002092570028250400000"; mesonCutArray[0] = "01521065000000"; // trigger kEMC7 + eventCutArray[ 1] = "0005311"; photonCutArray[ 1] = "002092570028250400000"; mesonCutArray[1] = "01521065000000"; // trigger kEMC8 + eventCutArray[ 2] = "0006211"; photonCutArray[ 2] = "002092570028250400000"; mesonCutArray[2] = "01521065000000"; // trigger kPHI7 + eventCutArray[ 3] = "0006311"; photonCutArray[ 3] = "002092570028250400000"; mesonCutArray[3] = "01521065000000"; // trigger kPHI8 + } else if (trainConfig == 48) { + eventCutArray[ 0] = "0005111"; photonCutArray[ 0] = "002092570028250400000"; mesonCutArray[0] = "01521065000000"; // trigger kEMC1 + eventCutArray[ 1] = "0007111"; photonCutArray[ 1] = "002092570028250400000"; mesonCutArray[1] = "01521065000000"; // trigger kSHM1 + eventCutArray[ 2] = "0007211"; photonCutArray[ 2] = "002092570028250400000"; mesonCutArray[2] = "01521065000000"; // trigger kSHM7 + eventCutArray[ 3] = "0007311"; photonCutArray[ 3] = "002092570028250400000"; mesonCutArray[3] = "01521065000000"; // trigger kSHM8 + } else if (trainConfig == 49) { + eventCutArray[ 0] = "0008111"; photonCutArray[ 0] = "002092570028250400000"; mesonCutArray[0] = "01521065000000"; // trigger kEMCEGA + CINT7 + eventCutArray[ 1] = "0008211"; photonCutArray[ 1] = "002092570028250400000"; mesonCutArray[1] = "01521065000000"; // trigger kEMCEGA + CINT8 + eventCutArray[ 2] = "0008311"; photonCutArray[ 2] = "002092570028250400000"; mesonCutArray[2] = "01521065000000"; // trigger kEMCEG1 + CINT7 + eventCutArray[ 3] = "0008411"; photonCutArray[ 3] = "002092570028250400000"; mesonCutArray[3] = "01521065000000"; // trigger kEMCEG1 + CINT8 + } else if (trainConfig == 50) { + eventCutArray[ 0] = "0008511"; photonCutArray[ 0] = "002092570028250400000"; mesonCutArray[0] = "01521065000000"; // trigger kEMCEG2 + CINT7 + eventCutArray[ 1] = "0008611"; photonCutArray[ 1] = "002092570028250400000"; mesonCutArray[1] = "01521065000000"; // trigger kEMCEG2 + CINT8 + eventCutArray[ 2] = "0009111"; photonCutArray[ 2] = "002092570028250400000"; mesonCutArray[2] = "01521065000000"; // trigger kEMCEJE + CINT7 + eventCutArray[ 3] = "0009211"; photonCutArray[ 3] = "002092570028250400000"; mesonCutArray[3] = "01521065000000"; // trigger kEMCEJE + CINT8 + } else if (trainConfig == 51) { + eventCutArray[ 0] = "0009311"; photonCutArray[ 0] = "002092570028250400000"; mesonCutArray[0] = "01521065000000"; // trigger kEMCEJ1 + CINT7 + eventCutArray[ 1] = "0009411"; photonCutArray[ 1] = "002092570028250400000"; mesonCutArray[1] = "01521065000000"; // trigger kEMCEJ1 + CINT8 + eventCutArray[ 2] = "0009511"; photonCutArray[ 2] = "002092570028250400000"; mesonCutArray[2] = "01521065000000"; // trigger kEMCEJ2 + CINT7 + eventCutArray[ 3] = "0009611"; photonCutArray[ 3] = "002092570028250400000"; mesonCutArray[3] = "01521065000000"; // trigger kEMCEJ2 + CINT8 + } else { Error(Form("GammaConvV1_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration"); return; } diff --git a/PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp2.C b/PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp2.C index 9fd75cb1e6b..31aab34bb1d 100644 --- a/PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp2.C +++ b/PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp2.C @@ -140,6 +140,8 @@ void AddTask_GammaConvV1_pp2( Int_t trainConfig = 1, //change different set of eventCutArray[ 0] = "0002011"; photonCutArray[ 0] = "007093663003800000000"; mesonCutArray[0] = "01631031009000"; //standard cut Pi0 pp 2.76TeV with SDD , all photon qualities, min R = 35 cm } else if (trainConfig == 15) { eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002092970028250400000"; mesonCutArray[0] = "01525065000000"; //standard cut LHC11h pp 2.76TeV + } else if (trainConfig == 16) { + eventCutArray[ 0] = "0000011"; photonCutArray[ 0] = "002092570028250400000"; mesonCutArray[0] = "01521065000000"; //standard cut pp 8 TeV } else { Error(Form("GammaConvV1_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration"); return; -- 2.43.0