From bd998a5673a575e6006d875f85d191ba98db0d99 Mon Sep 17 00:00:00 2001 From: abilandz Date: Wed, 13 Jul 2022 13:14:51 +0200 Subject: [PATCH 1/5] skeleton for O2 analysis with multiparticle correlations --- .../MuPa-Configurables.h | 4 + .../MuPa-DataMembers.h | 43 +++ PWGCF/MultiparticleCorrelations/MuPa-Enums.h | 4 + .../MuPa-GlobalConstants.h | 1 + .../MuPa-MemberFunctions.h | 328 ++++++++++++++++++ PWGCF/Tasks/CMakeLists.txt | 5 + PWGCF/Tasks/multiparticle-correlations-ab.cxx | 127 +++++++ 7 files changed, 512 insertions(+) create mode 100644 PWGCF/MultiparticleCorrelations/MuPa-Configurables.h create mode 100644 PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h create mode 100644 PWGCF/MultiparticleCorrelations/MuPa-Enums.h create mode 100644 PWGCF/MultiparticleCorrelations/MuPa-GlobalConstants.h create mode 100644 PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h create mode 100644 PWGCF/Tasks/multiparticle-correlations-ab.cxx diff --git a/PWGCF/MultiparticleCorrelations/MuPa-Configurables.h b/PWGCF/MultiparticleCorrelations/MuPa-Configurables.h new file mode 100644 index 00000000000..7fc1ff21ffc --- /dev/null +++ b/PWGCF/MultiparticleCorrelations/MuPa-Configurables.h @@ -0,0 +1,4 @@ +Configurable Vz_min{"Vz_min", -10.0, "minimum vertex z range [cm]"}; +Configurable Vz_max{"Vz_max", 10.0, "maximum vertex z range [cm]"}; +Configurable pt_min{"pt_min", 0.2, "minimum track pt value [GeV/c]"}; +Configurable pt_max{"pt_max", 5.0, "maximum track pt value [GeV/c]"}; diff --git a/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h b/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h new file mode 100644 index 00000000000..e7f20742943 --- /dev/null +++ b/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h @@ -0,0 +1,43 @@ +// Remarks: +// 0. Starting with C++11, it's possible to initialize data members at declaration, so I do it here +// 1. Use //! fBaseList{"Task => ...", OutputObjHandlingPolicy::AnalysisObject, OutputObjSourceType::OutputObjSource}; +TProfile *fBasePro = NULL; //!SetOwner(kTRUE); + fBaseList.setObject(temp); + + // ... + fBasePro = new TProfile("fBasePro","flags for the whole analysis",15,0.,15.); + fBasePro->SetStats(kFALSE); + fBasePro->SetLineColor(COLOR); + fBasePro->SetFillColor(FILLCOLOR); + // ... + fBaseList->Add(fBasePro); + + return; + +} // void BookBaseList() + +//============================================================ + +void BookAndNestAllLists() +{ + // *) QA; + // *) Control event histograms; + // *) Particle weights; + // *) Results. + + //if(fVerbose){Green(__PRETTY_FUNCTION__);} + + // *) QA: + fQAList = new TList(); + fQAList->SetName("QA"); + fQAList->SetOwner(kTRUE); + fBaseList->Add(fQAList); + + // *) Control event histograms: + fControlEventHistogramsList = new TList(); + fControlEventHistogramsList->SetName("ControlEventHistograms"); + fControlEventHistogramsList->SetOwner(kTRUE); + fBaseList->Add(fControlEventHistogramsList); + + // *) Particle weights: + fWeightsList = new TList(); + fWeightsList->SetName("Weights"); + fWeightsList->SetOwner(kTRUE); + fBaseList->Add(fWeightsList); + + // *) Results: + fResultsList = new TList(); + fResultsList->SetName("Results"); + fResultsList->SetOwner(kTRUE); + fBaseList->Add(fResultsList); + + return; + +} // void BookAndNestAllLists() + +//============================================================ + +void BookControlEventHistograms() +{ + // Book all control event histograms. + + // a) Book the profile holding flags; + // *) ... + + //if(fVerbose){Green(__PRETTY_FUNCTION__);} + + + // a) Book the profile holding flags: + fControlEventHistogramsPro = new TProfile("fControlEventHistogramsPro","flags for control event histograms",25,0.,25.); + fControlEventHistogramsPro->SetStats(kFALSE); + fControlEventHistogramsPro->SetLineColor(COLOR); + fControlEventHistogramsPro->SetFillColor(FILLCOLOR); + // ... + fControlEventHistogramsList->Add(fControlEventHistogramsPro); + + + Int_t fBeforeAfterColor[2] = { kRed, kGreen }; //! [0 = kRed,1 = kGreen] TBI 20220713 only temporarily here + + + // *) + for(Int_t ba=0;ba<2;ba++) // before/after cuts + { + //ceh_a.fMultiplicityHist[ba] = new TH1D(Form("fMultiplicityHist[%d]",ba),Form("%s, %s",fRunNumber.Data(),sba[ba].Data()),(Int_t)fMultiplicityBins[0],fMultiplicityBins[1],fMultiplicityBins[2]); + ceh_a.fMultiplicityHist[ba] = new TH1D(Form("fMultiplicityHist[%d]",ba),"...",5000,0.,5000.); + ceh_a.fMultiplicityHist[ba]->SetStats(kFALSE); + ceh_a.fMultiplicityHist[ba]->SetLineColor(fBeforeAfterColor[ba]); + ceh_a.fMultiplicityHist[ba]->SetFillColor(fBeforeAfterColor[ba]-10); + ceh_a.fMultiplicityHist[ba]->GetXaxis()->SetTitle("..."); + fControlEventHistogramsList->Add(ceh_a.fMultiplicityHist[ba]); + } + + return; + +} // void BookControlEventHistograms() + +//============================================================ + +void BookWeightsHistograms() +{ + // Book all objects for particle weights. + + // a) Book the profile holding flags; + // b) Common local labels; + // c) Histograms. + + //if(fVerbose){Green(__PRETTY_FUNCTION__);} + + // a) Book the profile holding flags: + fWeightsFlagsPro = new TProfile("fWeightsFlagsPro","flags for particle weights",3,0.,3.); + fWeightsFlagsPro->SetStats(kFALSE); + fWeightsFlagsPro->SetLineColor(COLOR); + fWeightsFlagsPro->SetFillColor(FILLCOLOR); + fWeightsFlagsPro->GetXaxis()->SetLabelSize(0.05); + fWeightsFlagsPro->GetXaxis()->SetBinLabel(1,"w_{#varphi}"); + fWeightsFlagsPro->GetXaxis()->SetBinLabel(2,"w_{p_{t}}"); + fWeightsFlagsPro->GetXaxis()->SetBinLabel(3,"w_{#eta}"); + /* + for(Int_t w=0;wFill(w+0.5,1.); + } + */ + fWeightsList->Add(fWeightsFlagsPro); + + // b) Common local labels: TBI 20220713 book before + TString sVariable[gWeights] = {"#varphi","p_{t}","#eta"}; // [phi,pt,eta,rapidity] + TString sWeights[gWeights] = {"w_{#varphi}","w_{p_{t}}","w_{#eta}"}; + + // c) Histograms: + for(Int_t w=0;wSetTitle(Form("Particle weights for %s",sWeights[w].Data())); + pw_a.fWeightsHist[w]->SetStats(kFALSE); + pw_a.fWeightsHist[w]->GetXaxis()->SetTitle(sVariable[w].Data()); + pw_a.fWeightsHist[w]->SetFillColor(FILLCOLOR); + pw_a.fWeightsHist[w]->SetLineColor(COLOR); + } + fWeightsList->Add(pw_a.fWeightsHist[w]); + } // for(Int_t w=0;wSetStats(kFALSE); + fResultsFlagsPro->SetLineColor(COLOR); + fResultsFlagsPro->SetFillColor(FILLCOLOR); + // ... + fResultsList->Add(fResultsFlagsPro); + + + // *) + fResultsHist = new TH1D("fResultsHist","...",10000,-500,500.); + fResultsList->Add(fResultsHist); + + return; + +} // void BookResultsHistograms() + + + +//============================================================ + +Bool_t EventCuts(aod::Collision const& collision) +{ + // ... + + if( (collision.posZ() < Vz_min) || (collision.posZ() > Vz_max) ) { return kFALSE; } + // ... + + return kTRUE; + +} // void EventCuts(aod::Collision const& collision) + +//============================================================ + +Bool_t ParticleCuts(aod::Track const& track) +{ + // ... + if( (track.pt() < pt_min) || (track.pt() > pt_max) ) { return kFALSE; } + + return kTRUE; + +} // void ParticleCuts(aod::Track const& tracks) + +//============================================================ + +void SetWeightsHist(TH1D* const hist, const char *variable) +{ + + // Copy histogram holding weights from an external file to the corresponding data member. + + // Basic protection: + if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta"))){cout<<__LINE__<SetDirectory(0); + pw_a.fWeightsHist[ppe] = (TH1D*)hist->Clone(); // use eventually this line + //fWeightsHist = (TH1D*)hist->Clone(); + if(!pw_a.fWeightsHist[ppe]){cout<<__LINE__<AccessPathName(filePath,kFileExists)) + { + //Red(Form("if(gSystem->AccessPathName(filePath,kFileExists)), filePath = %s",filePath)); // use eventually + cout<<__LINE__<Getenv("USER"), "",""); + if(!alien){cout<<__LINE__<Get("phi_Task=>0.0-5.0_clone_96")); + + //hist = (TH1D*)(weightsFile->Get(Form("%s_%s",variable,fTaskName.Data()))); // 20220712 this was the original line, instead of thew one above, which is there temporarily + + if(!hist){hist = (TH1D*)(weightsFile->Get(Form("%s",variable)));} // yes, for some simple tests I can have only histogram named e.g. 'phi' + //if(!hist){Red(Form("%s_%s",variable,fTaskName.Data())); cout<<__LINE__<SetDirectory(0); + hist->SetTitle(filePath); + + // e) Close the external ROOT file: + weightsFile->Close(); delete weightsFile; weightsFile = NULL; + + return hist; + +} // TH1D* GetHistogramWithWeights(const char *filePath, const char *variable) + +//============================================================ + + + + + diff --git a/PWGCF/Tasks/CMakeLists.txt b/PWGCF/Tasks/CMakeLists.txt index c7122c6ef70..884ec1f6523 100644 --- a/PWGCF/Tasks/CMakeLists.txt +++ b/PWGCF/Tasks/CMakeLists.txt @@ -14,6 +14,11 @@ o2physics_add_dpl_workflow(dptdptcorrelations PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(multiparticle-correlations-ab + SOURCES multiparticle-correlations-ab.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore + COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(dptdpt-filter-qa SOURCES dptdptfilterqa.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore diff --git a/PWGCF/Tasks/multiparticle-correlations-ab.cxx b/PWGCF/Tasks/multiparticle-correlations-ab.cxx new file mode 100644 index 00000000000..baa9c304f70 --- /dev/null +++ b/PWGCF/Tasks/multiparticle-correlations-ab.cxx @@ -0,0 +1,127 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// O2: +#include "Framework/runDataProcessing.h" +#include "Framework/AnalysisTask.h" +using namespace o2; +using namespace o2::framework; + +// ROOT: +#include "TList.h" +#include "TSystem.h" +#include "TFile.h" +#include "TH1D.h" +#include "TGrid.h" +#include "Riostream.h" +#include "TRandom3.h" +using namespace std; + +// *) Global constants: +#include "PWGCF/MultiparticleCorrelations/MuPa-GlobalConstants.h" + +// *) Enums: +#include "PWGCF/MultiparticleCorrelations/MuPa-Enums.h" + + +// *) Main task: +struct MultiparticleCorrelationsAB // this name is used in lower-case format to name the TDirectoryFile in AnalysisResults.root +{ + + // *) Data members: + #include "PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h" + + // *) Member functions: + #include "PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h" + + // *) Configurables (cuts): + #include "PWGCF/MultiparticleCorrelations/MuPa-Configurables.h" + + // ------------------------------------------- + + // *) Initialize and book all objects: + void init(InitContext const&) + { + // *) Trick to avoid name clashes, part 1; + // *) Book base list; + // *) Configure the task with setters and getters; + // *) Book random generator; + // *) Book all remaining objects; + // ... + // *) Trick to avoid name clashes, part 2; + + + // *) Trick to avoid name clashes, part 1: + Bool_t oldHistAddStatus = TH1::AddDirectoryStatus(); + TH1::AddDirectory(kFALSE); + + + // *) Book base list: + BookBaseList(); + + + // *) Configure the task with setters and getters: + //TH1D *phiWeights = task->GetHistogramWithWeights(Form("%s/%s/weights.root",directoryWeights.Data(),runNumber.Data()),"phi"); // original line + TH1D *phiWeights = GetHistogramWithWeights("/alice/cern.ch/user/a/abilandz/weights.root","phi"); // both relative and abs path shell be fine + SetWeightsHist(phiWeights,"phi"); + + + // *) Book random generator: + delete gRandom; + gRandom = new TRandom3(fRandomSeed); // if uiSeed is 0, the seed is determined uniquely in space and time via TUUID + + + // *) Book all remaining objects; + BookAndNestAllLists(); + BookControlEventHistograms(); + BookWeightsHistograms(); + BookResultsHistograms(); + + + // *) Trick to avoid name clashes, part 2: + TH1::AddDirectory(oldHistAddStatus); + + } // void init(InitContext const&) + + // ------------------------------------------- + + // *) Process the data: + void process(aod::Collision const& collision, aod::Tracks const& tracks) // called once per collision found in the time frame + { + // *) Event cuts: + ceh_a.fMultiplicityHist[BEFORE]->Fill(tracks.size()); // TBI 20220713 -> member function + if(!EventCuts(collision)){return;} + ceh_a.fMultiplicityHist[AFTER]->Fill(tracks.size()); // TBI 20220713 -> member function + + // *) Main loop over particles: + for(auto& track : tracks) + { + + if(!ParticleCuts(track)){continue;} + fResultsHist->Fill(pw_a.fWeightsHist[wPHI]->GetBinContent(pw_a.fWeightsHist[wPHI]->FindBin(track.phi()))); // TBI 20220713 meaningless, only temporarily here to check if this is feasible + + } // for (auto& track : tracks) + + } // void process(...) + +}; // struct MultiparticleCorrelationsAB + +// ------------------------------------------- + +// *) ... +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec { + adaptAnalysisTask(cfgc), + }; +} // WorkflowSpec... + + From 0e6c4bc42c2d63d5b598e78ccb61f340a4ed42cc Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Wed, 13 Jul 2022 11:32:57 +0000 Subject: [PATCH 2/5] Please consider the following formatting changes --- .../MuPa-DataMembers.h | 44 +- PWGCF/MultiparticleCorrelations/MuPa-Enums.h | 13 +- .../MuPa-MemberFunctions.h | 423 +++++++++--------- PWGCF/Tasks/multiparticle-correlations-ab.cxx | 122 +++-- 4 files changed, 308 insertions(+), 294 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h b/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h index e7f20742943..2c1fd80ae1a 100644 --- a/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h +++ b/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h @@ -2,42 +2,34 @@ // 0. Starting with C++11, it's possible to initialize data members at declaration, so I do it here // 1. Use //! fBaseList{"Task => ...", OutputObjHandlingPolicy::AnalysisObject, OutputObjSourceType::OutputObjSource}; -TProfile *fBasePro = NULL; //!SetOwner(kTRUE); - fBaseList.setObject(temp); + // ... + TList* temp = new TList(); + temp->SetOwner(kTRUE); + fBaseList.setObject(temp); - // ... - fBasePro = new TProfile("fBasePro","flags for the whole analysis",15,0.,15.); - fBasePro->SetStats(kFALSE); - fBasePro->SetLineColor(COLOR); - fBasePro->SetFillColor(FILLCOLOR); - // ... - fBaseList->Add(fBasePro); + // ... + fBasePro = new TProfile("fBasePro", "flags for the whole analysis", 15, 0., 15.); + fBasePro->SetStats(kFALSE); + fBasePro->SetLineColor(COLOR); + fBasePro->SetFillColor(FILLCOLOR); + // ... + fBaseList->Add(fBasePro); - return; + return; } // void BookBaseList() @@ -36,38 +36,38 @@ void BookBaseList() void BookAndNestAllLists() { - // *) QA; - // *) Control event histograms; - // *) Particle weights; - // *) Results. - - //if(fVerbose){Green(__PRETTY_FUNCTION__);} - - // *) QA: - fQAList = new TList(); - fQAList->SetName("QA"); - fQAList->SetOwner(kTRUE); - fBaseList->Add(fQAList); - - // *) Control event histograms: - fControlEventHistogramsList = new TList(); - fControlEventHistogramsList->SetName("ControlEventHistograms"); - fControlEventHistogramsList->SetOwner(kTRUE); - fBaseList->Add(fControlEventHistogramsList); - - // *) Particle weights: - fWeightsList = new TList(); - fWeightsList->SetName("Weights"); - fWeightsList->SetOwner(kTRUE); - fBaseList->Add(fWeightsList); - - // *) Results: - fResultsList = new TList(); - fResultsList->SetName("Results"); - fResultsList->SetOwner(kTRUE); - fBaseList->Add(fResultsList); - - return; + // *) QA; + // *) Control event histograms; + // *) Particle weights; + // *) Results. + + //if(fVerbose){Green(__PRETTY_FUNCTION__);} + + // *) QA: + fQAList = new TList(); + fQAList->SetName("QA"); + fQAList->SetOwner(kTRUE); + fBaseList->Add(fQAList); + + // *) Control event histograms: + fControlEventHistogramsList = new TList(); + fControlEventHistogramsList->SetName("ControlEventHistograms"); + fControlEventHistogramsList->SetOwner(kTRUE); + fBaseList->Add(fControlEventHistogramsList); + + // *) Particle weights: + fWeightsList = new TList(); + fWeightsList->SetName("Weights"); + fWeightsList->SetOwner(kTRUE); + fBaseList->Add(fWeightsList); + + // *) Results: + fResultsList = new TList(); + fResultsList->SetName("Results"); + fResultsList->SetOwner(kTRUE); + fBaseList->Add(fResultsList); + + return; } // void BookAndNestAllLists() @@ -75,39 +75,36 @@ void BookAndNestAllLists() void BookControlEventHistograms() { - // Book all control event histograms. + // Book all control event histograms. - // a) Book the profile holding flags; - // *) ... - - //if(fVerbose){Green(__PRETTY_FUNCTION__);} + // a) Book the profile holding flags; + // *) ... + //if(fVerbose){Green(__PRETTY_FUNCTION__);} - // a) Book the profile holding flags: - fControlEventHistogramsPro = new TProfile("fControlEventHistogramsPro","flags for control event histograms",25,0.,25.); - fControlEventHistogramsPro->SetStats(kFALSE); - fControlEventHistogramsPro->SetLineColor(COLOR); - fControlEventHistogramsPro->SetFillColor(FILLCOLOR); - // ... - fControlEventHistogramsList->Add(fControlEventHistogramsPro); + // a) Book the profile holding flags: + fControlEventHistogramsPro = new TProfile("fControlEventHistogramsPro", "flags for control event histograms", 25, 0., 25.); + fControlEventHistogramsPro->SetStats(kFALSE); + fControlEventHistogramsPro->SetLineColor(COLOR); + fControlEventHistogramsPro->SetFillColor(FILLCOLOR); + // ... + fControlEventHistogramsList->Add(fControlEventHistogramsPro); + Int_t fBeforeAfterColor[2] = {kRed, kGreen}; //! [0 = kRed,1 = kGreen] TBI 20220713 only temporarily here - Int_t fBeforeAfterColor[2] = { kRed, kGreen }; //! [0 = kRed,1 = kGreen] TBI 20220713 only temporarily here - - - // *) - for(Int_t ba=0;ba<2;ba++) // before/after cuts - { - //ceh_a.fMultiplicityHist[ba] = new TH1D(Form("fMultiplicityHist[%d]",ba),Form("%s, %s",fRunNumber.Data(),sba[ba].Data()),(Int_t)fMultiplicityBins[0],fMultiplicityBins[1],fMultiplicityBins[2]); - ceh_a.fMultiplicityHist[ba] = new TH1D(Form("fMultiplicityHist[%d]",ba),"...",5000,0.,5000.); - ceh_a.fMultiplicityHist[ba]->SetStats(kFALSE); - ceh_a.fMultiplicityHist[ba]->SetLineColor(fBeforeAfterColor[ba]); - ceh_a.fMultiplicityHist[ba]->SetFillColor(fBeforeAfterColor[ba]-10); - ceh_a.fMultiplicityHist[ba]->GetXaxis()->SetTitle("..."); - fControlEventHistogramsList->Add(ceh_a.fMultiplicityHist[ba]); - } + // *) + for (Int_t ba = 0; ba < 2; ba++) // before/after cuts + { + //ceh_a.fMultiplicityHist[ba] = new TH1D(Form("fMultiplicityHist[%d]",ba),Form("%s, %s",fRunNumber.Data(),sba[ba].Data()),(Int_t)fMultiplicityBins[0],fMultiplicityBins[1],fMultiplicityBins[2]); + ceh_a.fMultiplicityHist[ba] = new TH1D(Form("fMultiplicityHist[%d]", ba), "...", 5000, 0., 5000.); + ceh_a.fMultiplicityHist[ba]->SetStats(kFALSE); + ceh_a.fMultiplicityHist[ba]->SetLineColor(fBeforeAfterColor[ba]); + ceh_a.fMultiplicityHist[ba]->SetFillColor(fBeforeAfterColor[ba] - 10); + ceh_a.fMultiplicityHist[ba]->GetXaxis()->SetTitle("..."); + fControlEventHistogramsList->Add(ceh_a.fMultiplicityHist[ba]); + } - return; + return; } // void BookControlEventHistograms() @@ -115,179 +112,200 @@ void BookControlEventHistograms() void BookWeightsHistograms() { - // Book all objects for particle weights. - - // a) Book the profile holding flags; - // b) Common local labels; - // c) Histograms. - - //if(fVerbose){Green(__PRETTY_FUNCTION__);} - - // a) Book the profile holding flags: - fWeightsFlagsPro = new TProfile("fWeightsFlagsPro","flags for particle weights",3,0.,3.); - fWeightsFlagsPro->SetStats(kFALSE); - fWeightsFlagsPro->SetLineColor(COLOR); - fWeightsFlagsPro->SetFillColor(FILLCOLOR); - fWeightsFlagsPro->GetXaxis()->SetLabelSize(0.05); - fWeightsFlagsPro->GetXaxis()->SetBinLabel(1,"w_{#varphi}"); - fWeightsFlagsPro->GetXaxis()->SetBinLabel(2,"w_{p_{t}}"); - fWeightsFlagsPro->GetXaxis()->SetBinLabel(3,"w_{#eta}"); - /* + // Book all objects for particle weights. + + // a) Book the profile holding flags; + // b) Common local labels; + // c) Histograms. + + //if(fVerbose){Green(__PRETTY_FUNCTION__);} + + // a) Book the profile holding flags: + fWeightsFlagsPro = new TProfile("fWeightsFlagsPro", "flags for particle weights", 3, 0., 3.); + fWeightsFlagsPro->SetStats(kFALSE); + fWeightsFlagsPro->SetLineColor(COLOR); + fWeightsFlagsPro->SetFillColor(FILLCOLOR); + fWeightsFlagsPro->GetXaxis()->SetLabelSize(0.05); + fWeightsFlagsPro->GetXaxis()->SetBinLabel(1, "w_{#varphi}"); + fWeightsFlagsPro->GetXaxis()->SetBinLabel(2, "w_{p_{t}}"); + fWeightsFlagsPro->GetXaxis()->SetBinLabel(3, "w_{#eta}"); + /* for(Int_t w=0;wFill(w+0.5,1.); } */ - fWeightsList->Add(fWeightsFlagsPro); + fWeightsList->Add(fWeightsFlagsPro); - // b) Common local labels: TBI 20220713 book before - TString sVariable[gWeights] = {"#varphi","p_{t}","#eta"}; // [phi,pt,eta,rapidity] - TString sWeights[gWeights] = {"w_{#varphi}","w_{p_{t}}","w_{#eta}"}; + // b) Common local labels: TBI 20220713 book before + TString sVariable[gWeights] = {"#varphi", "p_{t}", "#eta"}; // [phi,pt,eta,rapidity] + TString sWeights[gWeights] = {"w_{#varphi}", "w_{p_{t}}", "w_{#eta}"}; - // c) Histograms: - for(Int_t w=0;wSetTitle(Form("Particle weights for %s",sWeights[w].Data())); - pw_a.fWeightsHist[w]->SetStats(kFALSE); - pw_a.fWeightsHist[w]->GetXaxis()->SetTitle(sVariable[w].Data()); - pw_a.fWeightsHist[w]->SetFillColor(FILLCOLOR); - pw_a.fWeightsHist[w]->SetLineColor(COLOR); - } - fWeightsList->Add(pw_a.fWeightsHist[w]); - } // for(Int_t w=0;wSetTitle(Form("Particle weights for %s", sWeights[w].Data())); + pw_a.fWeightsHist[w]->SetStats(kFALSE); + pw_a.fWeightsHist[w]->GetXaxis()->SetTitle(sVariable[w].Data()); + pw_a.fWeightsHist[w]->SetFillColor(FILLCOLOR); + pw_a.fWeightsHist[w]->SetLineColor(COLOR); + } + fWeightsList->Add(pw_a.fWeightsHist[w]); + } // for(Int_t w=0;wSetStats(kFALSE); - fResultsFlagsPro->SetLineColor(COLOR); - fResultsFlagsPro->SetFillColor(FILLCOLOR); - // ... - fResultsList->Add(fResultsFlagsPro); + //if(fVerbose){Green(__PRETTY_FUNCTION__);} + // a) Book the profile holding flags: + fResultsFlagsPro = new TProfile("fResultsFlagsPro", "flags for results histograms", 1, 0., 1.); + fResultsFlagsPro->SetStats(kFALSE); + fResultsFlagsPro->SetLineColor(COLOR); + fResultsFlagsPro->SetFillColor(FILLCOLOR); + // ... + fResultsList->Add(fResultsFlagsPro); - // *) - fResultsHist = new TH1D("fResultsHist","...",10000,-500,500.); - fResultsList->Add(fResultsHist); + // *) + fResultsHist = new TH1D("fResultsHist", "...", 10000, -500, 500.); + fResultsList->Add(fResultsHist); - return; + return; } // void BookResultsHistograms() - - //============================================================ Bool_t EventCuts(aod::Collision const& collision) -{ - // ... +{ + // ... - if( (collision.posZ() < Vz_min) || (collision.posZ() > Vz_max) ) { return kFALSE; } - // ... + if ((collision.posZ() < Vz_min) || (collision.posZ() > Vz_max)) { + return kFALSE; + } + // ... - return kTRUE; + return kTRUE; } // void EventCuts(aod::Collision const& collision) //============================================================ Bool_t ParticleCuts(aod::Track const& track) -{ - // ... - if( (track.pt() < pt_min) || (track.pt() > pt_max) ) { return kFALSE; } +{ + // ... + if ((track.pt() < pt_min) || (track.pt() > pt_max)) { + return kFALSE; + } - return kTRUE; + return kTRUE; } // void ParticleCuts(aod::Track const& tracks) //============================================================ -void SetWeightsHist(TH1D* const hist, const char *variable) +void SetWeightsHist(TH1D* const hist, const char* variable) { - // Copy histogram holding weights from an external file to the corresponding data member. - - // Basic protection: - if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta"))){cout<<__LINE__<SetDirectory(0); - pw_a.fWeightsHist[ppe] = (TH1D*)hist->Clone(); // use eventually this line - //fWeightsHist = (TH1D*)hist->Clone(); - if(!pw_a.fWeightsHist[ppe]){cout<<__LINE__<SetDirectory(0); + pw_a.fWeightsHist[ppe] = (TH1D*)hist->Clone(); // use eventually this line + //fWeightsHist = (TH1D*)hist->Clone(); + if (!pw_a.fWeightsHist[ppe]) { + cout << __LINE__ << endl; + exit(1); + } // use eventually this line - // Flag: - // fUseWeights[ppe] = kTRUE; // use eventually this line + // Flag: + // fUseWeights[ppe] = kTRUE; // use eventually this line } // void SetWeightsHist(TH1D* const hist, const char *variable) - + //============================================================ -TH1D* GetWeightsHist(const char *variable) +TH1D* GetWeightsHist(const char* variable) { - // The standard getter. - - // Basic protection: - if(!(TString(variable).EqualTo("phi") || TString(variable).EqualTo("pt") || TString(variable).EqualTo("eta"))){cout<<__LINE__<AccessPathName(filePath,kFileExists)) { //Red(Form("if(gSystem->AccessPathName(filePath,kFileExists)), filePath = %s",filePath)); // use eventually @@ -296,33 +314,38 @@ TH1D* GetHistogramWithWeights(const char *filePath, const char *variable) } */ - // d) Access the external ROOT file and fetch the desired histogram with weights: - //TFile *weightsFile = TFile::Open(filePath,"READ"); - TGrid *alien = TGrid::Connect("alien", gSystem->Getenv("USER"), "",""); - if(!alien){cout<<__LINE__<Getenv("USER"), "", ""); + if (!alien) { + cout << __LINE__ << endl; + exit(1); + } + TFile* weightsFile = TFile::Open(Form("alien://%s", filePath), "READ"); - if(!weightsFile){cout<<__LINE__<Get("phi_Task=>0.0-5.0_clone_96")); + hist = (TH1D*)(weightsFile->Get("phi_Task=>0.0-5.0_clone_96")); - //hist = (TH1D*)(weightsFile->Get(Form("%s_%s",variable,fTaskName.Data()))); // 20220712 this was the original line, instead of thew one above, which is there temporarily + //hist = (TH1D*)(weightsFile->Get(Form("%s_%s",variable,fTaskName.Data()))); // 20220712 this was the original line, instead of thew one above, which is there temporarily - if(!hist){hist = (TH1D*)(weightsFile->Get(Form("%s",variable)));} // yes, for some simple tests I can have only histogram named e.g. 'phi' - //if(!hist){Red(Form("%s_%s",variable,fTaskName.Data())); cout<<__LINE__<SetDirectory(0); - hist->SetTitle(filePath); + if (!hist) { + hist = (TH1D*)(weightsFile->Get(Form("%s", variable))); + } // yes, for some simple tests I can have only histogram named e.g. 'phi' + //if(!hist){Red(Form("%s_%s",variable,fTaskName.Data())); cout<<__LINE__<SetDirectory(0); + hist->SetTitle(filePath); - // e) Close the external ROOT file: - weightsFile->Close(); delete weightsFile; weightsFile = NULL; + // e) Close the external ROOT file: + weightsFile->Close(); + delete weightsFile; + weightsFile = NULL; - return hist; + return hist; } // TH1D* GetHistogramWithWeights(const char *filePath, const char *variable) //============================================================ - - - - - diff --git a/PWGCF/Tasks/multiparticle-correlations-ab.cxx b/PWGCF/Tasks/multiparticle-correlations-ab.cxx index baa9c304f70..2f8c37dcda1 100644 --- a/PWGCF/Tasks/multiparticle-correlations-ab.cxx +++ b/PWGCF/Tasks/multiparticle-correlations-ab.cxx @@ -31,97 +31,91 @@ using namespace std; // *) Enums: #include "PWGCF/MultiparticleCorrelations/MuPa-Enums.h" - // *) Main task: struct MultiparticleCorrelationsAB // this name is used in lower-case format to name the TDirectoryFile in AnalysisResults.root { - // *) Data members: - #include "PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h" - - // *) Member functions: - #include "PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h" - - // *) Configurables (cuts): - #include "PWGCF/MultiparticleCorrelations/MuPa-Configurables.h" +// *) Data members: +#include "PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h" - // ------------------------------------------- +// *) Member functions: +#include "PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h" - // *) Initialize and book all objects: - void init(InitContext const&) - { - // *) Trick to avoid name clashes, part 1; - // *) Book base list; - // *) Configure the task with setters and getters; - // *) Book random generator; - // *) Book all remaining objects; - // ... - // *) Trick to avoid name clashes, part 2; +// *) Configurables (cuts): +#include "PWGCF/MultiparticleCorrelations/MuPa-Configurables.h" + // ------------------------------------------- - // *) Trick to avoid name clashes, part 1: - Bool_t oldHistAddStatus = TH1::AddDirectoryStatus(); - TH1::AddDirectory(kFALSE); - + // *) Initialize and book all objects: + void init(InitContext const&) + { + // *) Trick to avoid name clashes, part 1; + // *) Book base list; + // *) Configure the task with setters and getters; + // *) Book random generator; + // *) Book all remaining objects; + // ... + // *) Trick to avoid name clashes, part 2; - // *) Book base list: - BookBaseList(); + // *) Trick to avoid name clashes, part 1: + Bool_t oldHistAddStatus = TH1::AddDirectoryStatus(); + TH1::AddDirectory(kFALSE); + // *) Book base list: + BookBaseList(); - // *) Configure the task with setters and getters: - //TH1D *phiWeights = task->GetHistogramWithWeights(Form("%s/%s/weights.root",directoryWeights.Data(),runNumber.Data()),"phi"); // original line - TH1D *phiWeights = GetHistogramWithWeights("/alice/cern.ch/user/a/abilandz/weights.root","phi"); // both relative and abs path shell be fine - SetWeightsHist(phiWeights,"phi"); + // *) Configure the task with setters and getters: + //TH1D *phiWeights = task->GetHistogramWithWeights(Form("%s/%s/weights.root",directoryWeights.Data(),runNumber.Data()),"phi"); // original line + TH1D* phiWeights = GetHistogramWithWeights("/alice/cern.ch/user/a/abilandz/weights.root", "phi"); // both relative and abs path shell be fine + SetWeightsHist(phiWeights, "phi"); + // *) Book random generator: + delete gRandom; + gRandom = new TRandom3(fRandomSeed); // if uiSeed is 0, the seed is determined uniquely in space and time via TUUID - // *) Book random generator: - delete gRandom; - gRandom = new TRandom3(fRandomSeed); // if uiSeed is 0, the seed is determined uniquely in space and time via TUUID + // *) Book all remaining objects; + BookAndNestAllLists(); + BookControlEventHistograms(); + BookWeightsHistograms(); + BookResultsHistograms(); + // *) Trick to avoid name clashes, part 2: + TH1::AddDirectory(oldHistAddStatus); - // *) Book all remaining objects; - BookAndNestAllLists(); - BookControlEventHistograms(); - BookWeightsHistograms(); - BookResultsHistograms(); - + } // void init(InitContext const&) - // *) Trick to avoid name clashes, part 2: - TH1::AddDirectory(oldHistAddStatus); + // ------------------------------------------- - } // void init(InitContext const&) - - // ------------------------------------------- + // *) Process the data: + void process(aod::Collision const& collision, aod::Tracks const& tracks) // called once per collision found in the time frame + { + // *) Event cuts: + ceh_a.fMultiplicityHist[BEFORE]->Fill(tracks.size()); // TBI 20220713 -> member function + if (!EventCuts(collision)) { + return; + } + ceh_a.fMultiplicityHist[AFTER]->Fill(tracks.size()); // TBI 20220713 -> member function - // *) Process the data: - void process(aod::Collision const& collision, aod::Tracks const& tracks) // called once per collision found in the time frame - { - // *) Event cuts: - ceh_a.fMultiplicityHist[BEFORE]->Fill(tracks.size()); // TBI 20220713 -> member function - if(!EventCuts(collision)){return;} - ceh_a.fMultiplicityHist[AFTER]->Fill(tracks.size()); // TBI 20220713 -> member function + // *) Main loop over particles: + for (auto& track : tracks) { - // *) Main loop over particles: - for(auto& track : tracks) - { + if (!ParticleCuts(track)) { + continue; + } + fResultsHist->Fill(pw_a.fWeightsHist[wPHI]->GetBinContent(pw_a.fWeightsHist[wPHI]->FindBin(track.phi()))); // TBI 20220713 meaningless, only temporarily here to check if this is feasible - if(!ParticleCuts(track)){continue;} - fResultsHist->Fill(pw_a.fWeightsHist[wPHI]->GetBinContent(pw_a.fWeightsHist[wPHI]->FindBin(track.phi()))); // TBI 20220713 meaningless, only temporarily here to check if this is feasible - - } // for (auto& track : tracks) + } // for (auto& track : tracks) - } // void process(...) + } // void process(...) }; // struct MultiparticleCorrelationsAB -// ------------------------------------------- +// ------------------------------------------- // *) ... WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec { + return WorkflowSpec{ adaptAnalysisTask(cfgc), - }; + }; } // WorkflowSpec... - - From f806b5c9924546e2968c4378dc9957b8cff34641 Mon Sep 17 00:00:00 2001 From: abilandz Date: Wed, 13 Jul 2022 14:11:49 +0200 Subject: [PATCH 3/5] added copyright notice --- PWGCF/MultiparticleCorrelations/MuPa-Configurables.h | 11 +++++++++++ PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h | 11 +++++++++++ PWGCF/MultiparticleCorrelations/MuPa-Enums.h | 11 +++++++++++ .../MultiparticleCorrelations/MuPa-GlobalConstants.h | 11 +++++++++++ .../MultiparticleCorrelations/MuPa-MemberFunctions.h | 11 +++++++++++ 5 files changed, 55 insertions(+) diff --git a/PWGCF/MultiparticleCorrelations/MuPa-Configurables.h b/PWGCF/MultiparticleCorrelations/MuPa-Configurables.h index 7fc1ff21ffc..5a4f8f97d45 100644 --- a/PWGCF/MultiparticleCorrelations/MuPa-Configurables.h +++ b/PWGCF/MultiparticleCorrelations/MuPa-Configurables.h @@ -1,3 +1,14 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + Configurable Vz_min{"Vz_min", -10.0, "minimum vertex z range [cm]"}; Configurable Vz_max{"Vz_max", 10.0, "maximum vertex z range [cm]"}; Configurable pt_min{"pt_min", 0.2, "minimum track pt value [GeV/c]"}; diff --git a/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h b/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h index 2c1fd80ae1a..d926e0f1fef 100644 --- a/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h +++ b/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h @@ -1,3 +1,14 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + // Remarks: // 0. Starting with C++11, it's possible to initialize data members at declaration, so I do it here // 1. Use //! Date: Wed, 13 Jul 2022 14:28:47 +0200 Subject: [PATCH 4/5] removed 2 trailing spaces, for formatting check to go through --- PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h | 2 +- PWGCF/Tasks/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h b/PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h index ffc5422ea6b..e7ac3ee3a92 100644 --- a/PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h +++ b/PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h @@ -142,7 +142,7 @@ void BookWeightsHistograms() fWeightsFlagsPro->GetXaxis()->SetBinLabel(3, "w_{#eta}"); /* for(Int_t w=0;wFill(w+0.5,1.); } */ diff --git a/PWGCF/Tasks/CMakeLists.txt b/PWGCF/Tasks/CMakeLists.txt index 884ec1f6523..fdfb8945ad4 100644 --- a/PWGCF/Tasks/CMakeLists.txt +++ b/PWGCF/Tasks/CMakeLists.txt @@ -37,4 +37,4 @@ o2physics_add_dpl_workflow(correlations o2physics_add_dpl_workflow(flow-generic-framework SOURCES flowGenericFramework.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::GFWCore - COMPONENT_NAME Analysis) + COMPONENT_NAME Analysis) From 3341854c3ab9426335e334a0505a300e12a531f9 Mon Sep 17 00:00:00 2001 From: abilandz Date: Wed, 13 Jul 2022 19:23:36 +0200 Subject: [PATCH 5/5] change of subdirectory structure --- PWGCF/CMakeLists.txt | 1 + PWGCF/MultiparticleCorrelations/CMakeLists.txt | 16 ++++++++++++++++ .../Core/CMakeLists.txt | 10 ++++++++++ .../{ => Core}/MuPa-Configurables.h | 0 .../{ => Core}/MuPa-DataMembers.h | 0 .../{ => Core}/MuPa-Enums.h | 0 .../{ => Core}/MuPa-GlobalConstants.h | 0 .../{ => Core}/MuPa-MemberFunctions.h | 0 .../DataModel/CMakeLists.txt | 10 ++++++++++ .../TableProducer/CMakeLists.txt | 10 ++++++++++ .../Tasks/CMakeLists.txt | 15 +++++++++++++++ .../Tasks/multiparticle-correlations-ab.cxx | 10 +++++----- PWGCF/Tasks/CMakeLists.txt | 5 ----- 13 files changed, 67 insertions(+), 10 deletions(-) create mode 100644 PWGCF/MultiparticleCorrelations/CMakeLists.txt create mode 100644 PWGCF/MultiparticleCorrelations/Core/CMakeLists.txt rename PWGCF/MultiparticleCorrelations/{ => Core}/MuPa-Configurables.h (100%) rename PWGCF/MultiparticleCorrelations/{ => Core}/MuPa-DataMembers.h (100%) rename PWGCF/MultiparticleCorrelations/{ => Core}/MuPa-Enums.h (100%) rename PWGCF/MultiparticleCorrelations/{ => Core}/MuPa-GlobalConstants.h (100%) rename PWGCF/MultiparticleCorrelations/{ => Core}/MuPa-MemberFunctions.h (100%) create mode 100644 PWGCF/MultiparticleCorrelations/DataModel/CMakeLists.txt create mode 100644 PWGCF/MultiparticleCorrelations/TableProducer/CMakeLists.txt create mode 100644 PWGCF/MultiparticleCorrelations/Tasks/CMakeLists.txt rename PWGCF/{ => MultiparticleCorrelations}/Tasks/multiparticle-correlations-ab.cxx (91%) diff --git a/PWGCF/CMakeLists.txt b/PWGCF/CMakeLists.txt index 14d8860d467..e810577ed49 100644 --- a/PWGCF/CMakeLists.txt +++ b/PWGCF/CMakeLists.txt @@ -13,6 +13,7 @@ add_subdirectory(Core) # add_subdirectory(DataModel) add_subdirectory(GenericFramework) add_subdirectory(FemtoDream) +add_subdirectory(MultiparticleCorrelations) add_subdirectory(Tasks) add_subdirectory(TableProducer) diff --git a/PWGCF/MultiparticleCorrelations/CMakeLists.txt b/PWGCF/MultiparticleCorrelations/CMakeLists.txt new file mode 100644 index 00000000000..14a98889a2c --- /dev/null +++ b/PWGCF/MultiparticleCorrelations/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright 2019-2020 CERN and copyright holders of ALICE O2. +# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +# All rights not expressly granted are reserved. +# +# This software is distributed under the terms of the GNU General Public +# License v3 (GPL Version 3), copied verbatim in the file "COPYING". +# +# In applying this license CERN does not waive the privileges and immunities +# granted to it by virtue of its status as an Intergovernmental Organization +# or submit itself to any jurisdiction. + +add_subdirectory(Core) +add_subdirectory(DataModel) +add_subdirectory(TableProducer) +add_subdirectory(Tasks) + diff --git a/PWGCF/MultiparticleCorrelations/Core/CMakeLists.txt b/PWGCF/MultiparticleCorrelations/Core/CMakeLists.txt new file mode 100644 index 00000000000..bbfd7adac2b --- /dev/null +++ b/PWGCF/MultiparticleCorrelations/Core/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright 2019-2020 CERN and copyright holders of ALICE O2. +# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +# All rights not expressly granted are reserved. +# +# This software is distributed under the terms of the GNU General Public +# License v3 (GPL Version 3), copied verbatim in the file "COPYING". +# +# In applying this license CERN does not waive the privileges and immunities +# granted to it by virtue of its status as an Intergovernmental Organization +# or submit itself to any jurisdiction. diff --git a/PWGCF/MultiparticleCorrelations/MuPa-Configurables.h b/PWGCF/MultiparticleCorrelations/Core/MuPa-Configurables.h similarity index 100% rename from PWGCF/MultiparticleCorrelations/MuPa-Configurables.h rename to PWGCF/MultiparticleCorrelations/Core/MuPa-Configurables.h diff --git a/PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h b/PWGCF/MultiparticleCorrelations/Core/MuPa-DataMembers.h similarity index 100% rename from PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h rename to PWGCF/MultiparticleCorrelations/Core/MuPa-DataMembers.h diff --git a/PWGCF/MultiparticleCorrelations/MuPa-Enums.h b/PWGCF/MultiparticleCorrelations/Core/MuPa-Enums.h similarity index 100% rename from PWGCF/MultiparticleCorrelations/MuPa-Enums.h rename to PWGCF/MultiparticleCorrelations/Core/MuPa-Enums.h diff --git a/PWGCF/MultiparticleCorrelations/MuPa-GlobalConstants.h b/PWGCF/MultiparticleCorrelations/Core/MuPa-GlobalConstants.h similarity index 100% rename from PWGCF/MultiparticleCorrelations/MuPa-GlobalConstants.h rename to PWGCF/MultiparticleCorrelations/Core/MuPa-GlobalConstants.h diff --git a/PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h b/PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h similarity index 100% rename from PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h rename to PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h diff --git a/PWGCF/MultiparticleCorrelations/DataModel/CMakeLists.txt b/PWGCF/MultiparticleCorrelations/DataModel/CMakeLists.txt new file mode 100644 index 00000000000..bbfd7adac2b --- /dev/null +++ b/PWGCF/MultiparticleCorrelations/DataModel/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright 2019-2020 CERN and copyright holders of ALICE O2. +# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +# All rights not expressly granted are reserved. +# +# This software is distributed under the terms of the GNU General Public +# License v3 (GPL Version 3), copied verbatim in the file "COPYING". +# +# In applying this license CERN does not waive the privileges and immunities +# granted to it by virtue of its status as an Intergovernmental Organization +# or submit itself to any jurisdiction. diff --git a/PWGCF/MultiparticleCorrelations/TableProducer/CMakeLists.txt b/PWGCF/MultiparticleCorrelations/TableProducer/CMakeLists.txt new file mode 100644 index 00000000000..bbfd7adac2b --- /dev/null +++ b/PWGCF/MultiparticleCorrelations/TableProducer/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright 2019-2020 CERN and copyright holders of ALICE O2. +# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +# All rights not expressly granted are reserved. +# +# This software is distributed under the terms of the GNU General Public +# License v3 (GPL Version 3), copied verbatim in the file "COPYING". +# +# In applying this license CERN does not waive the privileges and immunities +# granted to it by virtue of its status as an Intergovernmental Organization +# or submit itself to any jurisdiction. diff --git a/PWGCF/MultiparticleCorrelations/Tasks/CMakeLists.txt b/PWGCF/MultiparticleCorrelations/Tasks/CMakeLists.txt new file mode 100644 index 00000000000..89e39cc12cd --- /dev/null +++ b/PWGCF/MultiparticleCorrelations/Tasks/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright 2019-2020 CERN and copyright holders of ALICE O2. +# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +# All rights not expressly granted are reserved. +# +# This software is distributed under the terms of the GNU General Public +# License v3 (GPL Version 3), copied verbatim in the file "COPYING". +# +# In applying this license CERN does not waive the privileges and immunities +# granted to it by virtue of its status as an Intergovernmental Organization +# or submit itself to any jurisdiction. + +o2physics_add_dpl_workflow(multiparticle-correlations-ab + SOURCES multiparticle-correlations-ab.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore + COMPONENT_NAME Analysis) diff --git a/PWGCF/Tasks/multiparticle-correlations-ab.cxx b/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ab.cxx similarity index 91% rename from PWGCF/Tasks/multiparticle-correlations-ab.cxx rename to PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ab.cxx index 2f8c37dcda1..59c5dd52a7c 100644 --- a/PWGCF/Tasks/multiparticle-correlations-ab.cxx +++ b/PWGCF/MultiparticleCorrelations/Tasks/multiparticle-correlations-ab.cxx @@ -26,23 +26,23 @@ using namespace o2::framework; using namespace std; // *) Global constants: -#include "PWGCF/MultiparticleCorrelations/MuPa-GlobalConstants.h" +#include "PWGCF/MultiparticleCorrelations/Core/MuPa-GlobalConstants.h" // *) Enums: -#include "PWGCF/MultiparticleCorrelations/MuPa-Enums.h" +#include "PWGCF/MultiparticleCorrelations/Core/MuPa-Enums.h" // *) Main task: struct MultiparticleCorrelationsAB // this name is used in lower-case format to name the TDirectoryFile in AnalysisResults.root { // *) Data members: -#include "PWGCF/MultiparticleCorrelations/MuPa-DataMembers.h" +#include "PWGCF/MultiparticleCorrelations/Core/MuPa-DataMembers.h" // *) Member functions: -#include "PWGCF/MultiparticleCorrelations/MuPa-MemberFunctions.h" +#include "PWGCF/MultiparticleCorrelations/Core/MuPa-MemberFunctions.h" // *) Configurables (cuts): -#include "PWGCF/MultiparticleCorrelations/MuPa-Configurables.h" +#include "PWGCF/MultiparticleCorrelations/Core/MuPa-Configurables.h" // ------------------------------------------- diff --git a/PWGCF/Tasks/CMakeLists.txt b/PWGCF/Tasks/CMakeLists.txt index fdfb8945ad4..e1bf473ab31 100644 --- a/PWGCF/Tasks/CMakeLists.txt +++ b/PWGCF/Tasks/CMakeLists.txt @@ -14,11 +14,6 @@ o2physics_add_dpl_workflow(dptdptcorrelations PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore COMPONENT_NAME Analysis) -o2physics_add_dpl_workflow(multiparticle-correlations-ab - SOURCES multiparticle-correlations-ab.cxx - PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore - COMPONENT_NAME Analysis) - o2physics_add_dpl_workflow(dptdpt-filter-qa SOURCES dptdptfilterqa.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore