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
10 changes: 10 additions & 0 deletions Common/TableProducer/PID/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,55 @@
# or submit itself to any jurisdiction.

# ITS
o2physics_add_dpl_workflow(pid-its

Check failure on line 13 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-its does not match its file name pidITS.cxx. (Matches pidIts.cxx.)
SOURCES pidITS.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

# TOF
o2physics_add_dpl_workflow(pid-tof-base

Check failure on line 19 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-tof-base does not match its file name pidTOFBase.cxx. (Matches pidTofBase.cxx.)
SOURCES pidTOFBase.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::TOFBase
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(pid-tof

Check failure on line 24 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-tof does not match its file name pidTOF.cxx. (Matches pidTof.cxx.)
SOURCES pidTOF.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::TOFWorkflowUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(pid-tof-merge

Check failure on line 29 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-tof-merge does not match its file name pidTOFMerge.cxx. (Matches pidTofMerge.cxx.)
SOURCES pidTOFMerge.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::TOFWorkflowUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(pid-tof-beta

Check failure on line 34 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-tof-beta does not match its file name pidTOFbeta.cxx. (Matches pidTofBeta.cxx.)
SOURCES pidTOFbeta.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::TOFWorkflowUtils
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(pid-tof-full

Check failure on line 39 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-tof-full does not match its file name pidTOFFull.cxx. (Matches pidTofFull.cxx.)
SOURCES pidTOFFull.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::TOFWorkflowUtils
COMPONENT_NAME Analysis)

# TPC

o2physics_add_dpl_workflow(pid-tpc-service

Check failure on line 46 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-tpc-service does not match its file name pidTPCService.cxx. (Matches pidTpcService.cxx.)
SOURCES pidTPCService.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore O2Physics::AnalysisCCDB
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(pid-tpc-service-run2

Check failure on line 51 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-tpc-service-run2 does not match its file name pidTPCServiceRun2.cxx. (Matches pidTpcServiceRun2.cxx.)
SOURCES pidTPCServiceRun2.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore O2Physics::AnalysisCCDB
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(pid-tpc-service-run3

Check failure on line 56 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-tpc-service-run3 does not match its file name pidTPCServiceRun3.cxx. (Matches pidTpcServiceRun3.cxx.)
SOURCES pidTPCServiceRun3.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore O2Physics::AnalysisCCDB
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(pid-tpc-base

Check failure on line 61 in Common/TableProducer/PID/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-workflow]

Workflow name pid-tpc-base does not match its file name pidTPCBase.cxx. (Matches pidTpcBase.cxx.)
SOURCES pidTPCBase.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB
COMPONENT_NAME Analysis)
Expand Down
10 changes: 8 additions & 2 deletions Common/TableProducer/PID/pidTPCService.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
#include "MetadataHelper.h"
#include "TableHelper.h"
#include "pidTPCBase.h"
#include "pidTPCModule.h"

#include "Common/Core/PID/TPCPIDResponse.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponseTPC.h"
#include "Common/Tools/PID/pidTPCModule.h"
#include "Tools/ML/model.h"

#include "CCDB/BasicCCDBManager.h"
Expand Down Expand Up @@ -98,9 +98,15 @@ struct pidTpcService {
pidTPC.process(ccdb, ccdbApi, bcs, collisions, tracks, static_cast<TObject*>(nullptr), products);
}

void processTracksMCIU(soa::Join<aod::Collisions, aod::EvSels> const& collisions, soa::Join<aod::TracksIU, aod::TracksCovIU, aod::TracksExtra, aod::McTrackLabels> const& tracks, aod::BCsWithTimestamps const& bcs, aod::McParticles const&)
{
pidTPC.process(ccdb, ccdbApi, bcs, collisions, tracks, static_cast<TObject*>(nullptr), products);
}

PROCESS_SWITCH(pidTpcService, processTracks, "Process Tracks", false);
PROCESS_SWITCH(pidTpcService, processTracksMC, "Process Tracks in MC (enables tune-on-data)", false);
PROCESS_SWITCH(pidTpcService, processTracksIU, "Process TracksIU (experimental)", true);
PROCESS_SWITCH(pidTpcService, processTracksIU, "Process TracksIU (Run 3)", true);
PROCESS_SWITCH(pidTpcService, processTracksMCIU, "Process TracksIUMC (Run 3)", false);
};

//****************************************************************************************
Expand Down
112 changes: 112 additions & 0 deletions Common/TableProducer/PID/pidTPCServiceRun2.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
// 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.

/// \file trackPropagationTester.cxx
/// \brief testing ground for track propagation
/// \author ALICE

//===============================================================
//
// Modularized version of TPC PID task
//
//===============================================================

#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
// ROOT includes
#include "TFile.h"
#include "TRandom.h"
#include "TSystem.h"

// O2 includes
#include "MetadataHelper.h"
#include "TableHelper.h"
#include "pidTPCBase.h"

#include "Common/Core/PID/TPCPIDResponse.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponseTPC.h"
#include "Common/Tools/PID/pidTPCModule.h"
#include "Tools/ML/model.h"

#include "CCDB/BasicCCDBManager.h"
#include "CCDB/CcdbApi.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

using namespace o2;
using namespace o2::framework;

o2::common::core::MetadataHelper metadataInfo; // Metadata helper

struct pidTpcServiceRun2 {

// CCDB boilerplate declarations
o2::framework::Configurable<std::string> ccdburl{"ccdburl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Service<o2::ccdb::BasicCCDBManager> ccdb;
o2::ccdb::CcdbApi ccdbApi;

o2::aod::pid::pidTPCProducts products;
o2::aod::pid::pidTPCConfigurables pidTPCopts;
o2::aod::pid::pidTPCModule pidTPC;

void init(o2::framework::InitContext& initContext)
{
// CCDB boilerplate init
ccdb->setURL(ccdburl.value);
ccdb->setFatalWhenNull(false); // manual fallback in case ccdb entry empty
ccdb->setCaching(true);
ccdb->setLocalObjectValidityChecking();
ccdb->setCreatedNotAfter(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
ccdbApi.init(ccdburl.value);

// task-specific
pidTPC.init(ccdb, ccdbApi, initContext, pidTPCopts, metadataInfo);
}

void processTracks(soa::Join<aod::Collisions, aod::EvSels> const& collisions, soa::Join<aod::Tracks, aod::TracksExtra> const& tracks, aod::BCsWithTimestamps const& bcs)
{
pidTPC.process(ccdb, ccdbApi, bcs, collisions, tracks, static_cast<TObject*>(nullptr), products);
}
void processTracksWithTracksQA(soa::Join<aod::Collisions, aod::EvSels> const& collisions, soa::Join<aod::Tracks, aod::TracksExtra> const& tracks, aod::BCsWithTimestamps const& bcs, aod::TracksQA const& tracksQA)
{
pidTPC.process(ccdb, ccdbApi, bcs, collisions, tracks, tracksQA, products);
}

void processTracksMC(soa::Join<aod::Collisions, aod::EvSels> const& collisions, soa::Join<aod::Tracks, aod::TracksExtra, aod::McTrackLabels> const& tracks, aod::BCsWithTimestamps const& bcs, aod::McParticles const&)
{
pidTPC.process(ccdb, ccdbApi, bcs, collisions, tracks, static_cast<TObject*>(nullptr), products);
}

PROCESS_SWITCH(pidTpcServiceRun2, processTracks, "Process Tracks", true);
PROCESS_SWITCH(pidTpcServiceRun2, processTracksMC, "Process Tracks in MC (enables tune-on-data)", false);
};

//****************************************************************************************
/**
* Workflow definition.
*/
//****************************************************************************************
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
// Parse the metadata for later too
metadataInfo.initMetadata(cfgc);

WorkflowSpec workflow{adaptAnalysisTask<pidTpcServiceRun2>(cfgc)};
return workflow;
}
108 changes: 108 additions & 0 deletions Common/TableProducer/PID/pidTPCServiceRun3.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// 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.

/// \file trackPropagationTester.cxx
/// \brief testing ground for track propagation
/// \author ALICE

//===============================================================
//
// Modularized version of TPC PID task
//
//===============================================================

#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
// ROOT includes
#include "TFile.h"
#include "TRandom.h"
#include "TSystem.h"

// O2 includes
#include "MetadataHelper.h"
#include "TableHelper.h"
#include "pidTPCBase.h"

#include "Common/Core/PID/TPCPIDResponse.h"
#include "Common/DataModel/EventSelection.h"
#include "Common/DataModel/Multiplicity.h"
#include "Common/DataModel/PIDResponseTPC.h"
#include "Common/Tools/PID/pidTPCModule.h"
#include "Tools/ML/model.h"

#include "CCDB/BasicCCDBManager.h"
#include "CCDB/CcdbApi.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"

using namespace o2;
using namespace o2::framework;

o2::common::core::MetadataHelper metadataInfo; // Metadata helper

struct pidTpcServiceRun3 {

// CCDB boilerplate declarations
o2::framework::Configurable<std::string> ccdburl{"ccdburl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Service<o2::ccdb::BasicCCDBManager> ccdb;
o2::ccdb::CcdbApi ccdbApi;

o2::aod::pid::pidTPCProducts products;
o2::aod::pid::pidTPCConfigurables pidTPCopts;
o2::aod::pid::pidTPCModule pidTPC;

void init(o2::framework::InitContext& initContext)
{
// CCDB boilerplate init
ccdb->setURL(ccdburl.value);
ccdb->setFatalWhenNull(false); // manual fallback in case ccdb entry empty
ccdb->setCaching(true);
ccdb->setLocalObjectValidityChecking();
ccdb->setCreatedNotAfter(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
ccdbApi.init(ccdburl.value);

// task-specific
pidTPC.init(ccdb, ccdbApi, initContext, pidTPCopts, metadataInfo);
}

void processTracksIU(soa::Join<aod::Collisions, aod::EvSels> const& collisions, soa::Join<aod::TracksIU, aod::TracksCovIU, aod::TracksExtra> const& tracks, aod::BCsWithTimestamps const& bcs)
{
pidTPC.process(ccdb, ccdbApi, bcs, collisions, tracks, static_cast<TObject*>(nullptr), products);
}

void processTracksMCIU(soa::Join<aod::Collisions, aod::EvSels> const& collisions, soa::Join<aod::TracksIU, aod::TracksCovIU, aod::TracksExtra, aod::McTrackLabels> const& tracks, aod::BCsWithTimestamps const& bcs, aod::McParticles const&)
{
pidTPC.process(ccdb, ccdbApi, bcs, collisions, tracks, static_cast<TObject*>(nullptr), products);
}

PROCESS_SWITCH(pidTpcServiceRun3, processTracksIU, "Process TracksIU (Run 3)", true);
PROCESS_SWITCH(pidTpcServiceRun3, processTracksMCIU, "Process TracksIUMC (Run 3)", false);
};

//****************************************************************************************
/**
* Workflow definition.
*/
//****************************************************************************************
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
// Parse the metadata for later too
metadataInfo.initMetadata(cfgc);

WorkflowSpec workflow{adaptAnalysisTask<pidTpcServiceRun3>(cfgc)};
return workflow;
}
2 changes: 1 addition & 1 deletion Common/TableProducer/eventSelectionService.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/Tools/EventSelectionTools.h"
#include "Common/Tools/EventSelectionModule.h"
#include "Common/Tools/timestampModule.h"

#include "CCDB/BasicCCDBManager.h"
Expand Down
34 changes: 18 additions & 16 deletions Common/TableProducer/multCentTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,29 @@
//
//===============================================================

#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "MetadataHelper.h"

#include "Common/Core/trackUtilities.h"
#include "ReconstructionDataFormats/DCA.h"
#include "DetectorsBase/Propagator.h"
#include "DetectorsBase/GeometryManager.h"
#include "CommonUtils/NameConf.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Common/Tools/Multiplicity/MultModule.h"
#include "Common/Tools/StandardCCDBLoader.h"
#include "Common/Tools/TrackPropagationModule.h"

#include "CCDB/BasicCCDBManager.h"
#include "CCDB/CcdbApi.h"
#include "CommonConstants/GeomConstants.h"
#include "CommonUtils/NameConf.h"
#include "DataFormatsCalibration/MeanVertexObject.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "CCDB/BasicCCDBManager.h"
#include "DetectorsBase/GeometryManager.h"
#include "DetectorsBase/Propagator.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/HistogramRegistry.h"
#include "DataFormatsCalibration/MeanVertexObject.h"
#include "CommonConstants/GeomConstants.h"
#include "Common/Tools/TrackPropagationModule.h"
#include "Common/Tools/StandardCCDBLoader.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "MetadataHelper.h"
#include "Common/Tools/MultModule.h"
#include "Framework/RunningWorkflowInfo.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/DCA.h"

using namespace o2;
using namespace o2::framework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "Common/DataModel/Multiplicity.h"

#include <Framework/AnalysisDataModel.h>
#include <Framework/AnalysisHelpers.h>
#include <Framework/Configurable.h>
#include <Framework/HistogramSpec.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// O2 includes
#include "MetadataHelper.h"
#include "TableHelper.h"
#include "pidTPCBase.h"

#include "Common/CCDB/ctpRateFetcher.h"
#include "Common/Core/PID/TPCPIDResponse.h"
Expand All @@ -50,6 +49,7 @@
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/Track.h"
#include <Framework/AnalysisHelpers.h>

namespace o2::aod
{
Expand Down
Loading