Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PWGLF/Tasks/Strangeness/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Use kebab-case for names of workflows and match the name of the workflow file.
# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
# All rights not expressly granted are reserved.
#
Expand All @@ -9,7 +9,7 @@
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

o2physics_add_dpl_workflow(hyperon-reco-test

Check failure on line 12 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name hyperon-reco-test does not match its file name hyperon-reco-test.cxx. (Matches hyperonRecoTest.cxx.)
SOURCES hyperon-reco-test.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -19,7 +19,7 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore O2Physics::AnalysisCCDB
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(lambdakzeroanalysis-mc

Check failure on line 22 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name lambdakzeroanalysis-mc does not match its file name lambdakzeroanalysisMC.cxx. (Matches lambdakzeroanalysisMc.cxx.)
SOURCES lambdakzeroanalysisMC.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -29,7 +29,7 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(cascadeanalysismc

Check failure on line 32 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name cascadeanalysismc does not match its file name cascadeanalysisMC.cxx. (Matches cascadeanalysismc.cxx.)
SOURCES cascadeanalysisMC.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -49,12 +49,12 @@
PUBLIC_LINK_LIBRARIES O2::Framework O2::ReconstructionDataFormats O2Physics::AnalysisCore O2::DetectorsBase O2::DetectorsVertexing O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(k0mixedevents

Check failure on line 52 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name k0mixedevents does not match its file name k0_mixed_events.cxx. (Matches k0mixedevents.cxx.)
SOURCES k0_mixed_events.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(vzero-cascade-absorption

Check failure on line 57 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name vzero-cascade-absorption does not match its file name vzero_cascade_absorption.cxx. (Matches vzeroCascadeAbsorption.cxx.)
SOURCES vzero_cascade_absorption.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
Expand All @@ -69,7 +69,7 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(hstrangecorrelation

Check failure on line 72 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name hstrangecorrelation does not match its file name hStrangeCorrelation.cxx. (Matches hstrangecorrelation.cxx.)
SOURCES hStrangeCorrelation.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)
Expand Down Expand Up @@ -133,10 +133,10 @@

o2physics_add_dpl_workflow(lambdalambda
SOURCES lambdalambda.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(lambdajetpolarization

Check failure on line 139 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name lambdajetpolarization does not match its file name lambdaJetpolarization.cxx. (Matches lambdajetpolarization.cxx.)
SOURCES lambdaJetpolarization.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGJECore FastJet::FastJet FastJet::Contrib O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)
Expand All @@ -151,12 +151,12 @@
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::EventFilteringUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(lambdatwopartpolarization

Check failure on line 154 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name lambdatwopartpolarization does not match its file name lambdaTwoPartPolarization.cxx. (Matches lambdatwopartpolarization.cxx.)
SOURCES lambdaTwoPartPolarization.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(cascadeanalysislightions

Check failure on line 159 in PWGLF/Tasks/Strangeness/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name cascadeanalysislightions does not match its file name cascadeAnalysisLightIonsDerivedData.cxx. (Matches cascadeanalysislightions.cxx.)
SOURCES cascadeAnalysisLightIonsDerivedData.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)
137 changes: 87 additions & 50 deletions PWGLF/Tasks/Strangeness/lambdalambda.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,51 +11,48 @@

/// \author Junlee Kim (jikim1290@gmail.com)

#include <cmath>
#include <array>
#include <cstdlib>
#include <chrono>
#include <string>
#include <vector>
#include "PWGLF/DataModel/LFStrangenessTables.h"

#include "TLorentzVector.h"
#include "TRandom3.h"
#include "TF1.h"
#include "TVector3.h"
#include "Math/Vector3D.h"
#include "Math/Vector4D.h"
#include "Math/GenVector/Boost.h"
#include <TMath.h>
#include "Common/Core/TrackSelection.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "EventFiltering/Zorro.h"
#include "EventFiltering/ZorroSummary.h"

#include "Framework/runDataProcessing.h"
#include "Framework/AnalysisTask.h"
#include "CCDB/BasicCCDBManager.h"
#include "CCDB/CcdbApi.h"
#include "CommonConstants/PhysicsConstants.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "DataFormatsParameters/GRPObject.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/StepTHn.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/StaticFor.h"

#include "Common/DataModel/PIDResponse.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/DataModel/EventSelection.h"

#include "Common/Core/trackUtilities.h"
#include "Common/Core/TrackSelection.h"

#include "CommonConstants/PhysicsConstants.h"

#include "Framework/StepTHn.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

#include "DataFormatsParameters/GRPObject.h"
#include "DataFormatsParameters/GRPMagField.h"

#include "CCDB/CcdbApi.h"
#include "CCDB/BasicCCDBManager.h"
#include "Math/GenVector/Boost.h"
#include "Math/Vector3D.h"
#include "Math/Vector4D.h"
#include "TF1.h"
#include "TLorentzVector.h"
#include "TRandom3.h"
#include "TVector3.h"
#include <TMath.h>

#include "PWGLF/DataModel/LFStrangenessTables.h"
#include <array>
#include <chrono>
#include <cmath>
#include <cstdlib>
#include <string>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand All @@ -68,6 +65,9 @@ struct lambdalambda {
using TrackCandidates = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTPCFullPr>;
using V0TrackCandidate = aod::V0Datas;

Zorro zorro;
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

HistogramRegistry histos{
"histos",
{},
Expand Down Expand Up @@ -136,6 +136,9 @@ struct lambdalambda {
Configurable<int> cfgNRotBkg{"cfgNRotBkg", 10, "the number of rotational backgrounds"};
Configurable<int> cfgNoMixedEvents{"cfgNoMixedEvents", 10, "Number of mixed events per event"};

Configurable<bool> cfgSkimmedProcessing{"cfgSkimmedProcessing", false, "Enable processing of skimmed data"};
Configurable<std::string> cfgTriggerName{"cfgTriggerName", "fLambdaLambda", "Software trigger name"};

ConfigurableAxis massAxis{"massAxis", {110, 2.22, 2.33}, "Invariant mass axis"};
ConfigurableAxis ptAxis{"ptAxis", {VARIABLE_WIDTH, 0.2, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.5, 8.0, 10.0, 100.0}, "Transverse momentum bins"};
ConfigurableAxis centAxis{"centAxis", {VARIABLE_WIDTH, 0, 10, 20, 50, 100}, "Centrality interval"};
Expand All @@ -157,8 +160,20 @@ struct lambdalambda {
bool IsTriggered;
bool IsSelected;

void initCCDB(aod::BCsWithTimestamps::iterator const& bc)
{
if (cfgSkimmedProcessing) {
zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), cfgTriggerName.value);
zorro.populateHistRegistry(histos, bc.runNumber());
}
}

void init(o2::framework::InitContext&)
{
if (cfgSkimmedProcessing) {
zorroSummary.setObject(zorro.getZorroSummary());
}

AxisSpec centQaAxis = {80, 0.0, 80.0};
AxisSpec PVzQaAxis = {300, -15.0, 15.0};
AxisSpec combAxis = {3, -0.5, 2.5};
Expand Down Expand Up @@ -506,8 +521,15 @@ struct lambdalambda {
histos.fill(HIST("QA/CentDist"), centrality, 1.0);
histos.fill(HIST("QA/PVzDist"), collision.posZ(), 1.0);

auto bc = collision.bc_as<aod::BCsWithTimestamps>();
if (cfgSkimmedProcessing) {
initCCDB(bc);
if (!zorro.isSelected(collision.template bc_as<aod::BCsWithTimestamps>().globalBC())) {
return;
}
}

if (cfgEffCor) {
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
EffMap = ccdb->getForTimeStamp<TProfile2D>(cfgEffCorPath.value, bc.timestamp());
}
FillHistograms(collision, collision, V0s, V0s);
Expand All @@ -520,31 +542,46 @@ struct lambdalambda {
PROCESS_SWITCH(lambdalambda, processDataSame, "Process Event for same data", true);

SliceCache cache;
using BinningTypeVertexContributor = ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentFT0M>;
using BinningType = ColumnBinningPolicy<aod::collision::PosZ, aod::cent::CentFT0M>;
BinningType colBinning{{vertexAxis, centAxis}, true};

Preslice<aod::V0Datas> tracksPerCollisionV0 = aod::v0data::collisionId;
void processDataMixed(EventCandidates const& collisions,
TrackCandidates const& /*tracks*/, aod::V0Datas const& V0s)
TrackCandidates const& /*tracks*/, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&)
{
auto tracksTuple = std::make_tuple(V0s);
BinningTypeVertexContributor binningOnPositions{{vertexAxis, centAxis}, true};
SameKindPair<EventCandidates, V0TrackCandidate, BinningTypeVertexContributor> pair{binningOnPositions, cfgNoMixedEvents, -1, collisions, tracksTuple, &cache};
for (auto& [c1, tracks1, c2, tracks2] : pair) {
if (cfgCentEst == 1) {
centrality = c1.centFT0C();
} else if (cfgCentEst == 2) {
centrality = c1.centFT0M();
int currentRun = -1;
for (auto& [c1, c2] : selfCombinations(colBinning, cfgNoMixedEvents, -1, collisions, collisions)) {
if (c1.index() == c2.index())
continue;

auto bc1 = c1.bc_as<aod::BCsWithTimestamps>();
auto bc2 = c2.bc_as<aod::BCsWithTimestamps>();

if (bc1.runNumber() != bc2.runNumber())
continue;

if (bc1.runNumber() != currentRun) {
if (cfgSkimmedProcessing) {
initCCDB(bc1);
if (!zorro.isSelected(bc1.globalBC()) || !zorro.isSelected(bc2.globalBC())) {
continue;
}
}
}

centrality = c1.centFT0M();
if (!eventSelected(c1))
continue;
if (!eventSelected(c2))
continue;
if (c1.bcId() == c2.bcId())
continue;

auto tracks1 = V0s.sliceBy(tracksPerCollisionV0, c1.globalIndex());
auto tracks2 = V0s.sliceBy(tracksPerCollisionV0, c2.globalIndex());

FillHistograms(c1, c2, tracks1, tracks2);
}
}
PROCESS_SWITCH(lambdalambda, processDataMixed, "Process Event for mixed data", true);
PROCESS_SWITCH(lambdalambda, processDataMixed, "Process Event for mixed data", false);
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down
Loading