Skip to content
Closed
3 changes: 2 additions & 1 deletion PWGDQ/DataModel/ReducedInfoTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
// basic event information
DECLARE_SOA_INDEX_COLUMN(Collision, collision); //!
DECLARE_SOA_BITMAP_COLUMN(Tag, tag, 64); //! Bit-field for storing event information (e.g. high level info, cut decisions)
DECLARE_SOA_COLUMN(MCPosX, mcPosX, float); //! MC event position X

Check failure on line 71 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(MCPosY, mcPosY, float); //! MC event position Y

Check failure on line 72 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(MCPosZ, mcPosZ, float); //! MC event position Z

Check failure on line 73 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(NTPCoccupContribLongA, nTPCoccupContribLongA, int); //! TPC pileup occupancy on A side (long time range)
DECLARE_SOA_COLUMN(NTPCoccupContribLongC, nTPCoccupContribLongC, int); //! TPC pileup occupancy on C side (long time range)
DECLARE_SOA_COLUMN(NTPCoccupMeanTimeLongA, nTPCoccupMeanTimeLongA, float); //! TPC pileup mean time on A side (long time range)
Expand All @@ -95,13 +95,13 @@
DECLARE_SOA_COLUMN(NTrkBNeg, nTrkBNeg, int);
DECLARE_SOA_COLUMN(NTrkBAll, nTrkBAll, int);

DECLARE_SOA_COLUMN(Q1ZNAX, q1znax, float); //! Q-vector x component, evaluated with ZNA (harmonic 1 and power 1)

Check failure on line 98 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Q1ZNAY, q1znay, float); //! Q-vector y component, evaluated with ZNA (harmonic 1 and power 1)

Check failure on line 99 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Q1ZNCX, q1zncx, float); //! Q-vector x component, evaluated with ZNC (harmonic 1 and power 1)

Check failure on line 100 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Q1ZNCY, q1zncy, float); //! Q-vector y component, evaluated with ZNC (harmonic 1 and power 1)

Check failure on line 101 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Q1X0A, q1x0a, float); //! Q-vector x component, with event eta gap A (harmonic 1 and power 1)

Check failure on line 102 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Q1Y0A, q1y0a, float); //! Q-vector y component, with event eta gap A (harmonic 1 and power 1)

Check failure on line 103 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Q1X0B, q1x0b, float); //! Q-vector x component, with event eta gap B (harmonic 1 and power 1)

Check failure on line 104 in PWGDQ/DataModel/ReducedInfoTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Q1Y0B, q1y0b, float); //! Q-vector y component, with event eta gap B (harmonic 1 and power 1)
DECLARE_SOA_COLUMN(Q1X0C, q1x0c, float); //! Q-vector x component, with event eta gap C (harmonic 1 and power 1)
DECLARE_SOA_COLUMN(Q1Y0C, q1y0c, float); //! Q-vector y component, with event eta gap C (harmonic 1 and power 1)
Expand Down Expand Up @@ -218,7 +218,8 @@
// There is no explicit accounting for MC events which were not reconstructed!!!
// However, for analysis which will require these events, a special skimming process function
// can be constructed and the same data model could be used
DECLARE_SOA_TABLE(ReducedMCEvents, "AOD", "REDUCEDMCEVENT", //! Event level MC truth information

DECLARE_SOA_TABLE(ReducedMCEvents_000, "AOD", "REDUCEDMCEVENT", //! Event level MC truth information
o2::soa::Index<>,
mccollision::GeneratorsID, reducedevent::MCPosX, reducedevent::MCPosY, reducedevent::MCPosZ,
mccollision::T, mccollision::Weight, mccollision::ImpactParameter, cent::CentFT0C,
Expand Down
5 changes: 5 additions & 0 deletions PWGDQ/Tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ o2physics_add_dpl_workflow(model-converter-event-extended
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::PWGDQCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(model-converter-mc-reduced-event
SOURCES ModelConverterReducedMCEvents.cxx
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::PWGDQCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(tag-and-probe
SOURCES TagAndProbe.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2::DetectorsBase O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::PWGDQCore
Expand Down
52 changes: 52 additions & 0 deletions PWGDQ/Tasks/ModelConverterReducedMCEvents.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// 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.
//
// Contact: iarsene@cern.ch, i.c.arsene@fys.uio.no
//
// Task used to convert the data model from the old format to the new format. To avoid
// the conflict with the old data model.

// other includes
#include "PWGDQ/DataModel/ReducedInfoTables.h"

#include "DataFormatsParameters/GRPObject.h"
#include "Framework/ASoAHelpers.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"

#include <THashList.h>
#include <TList.h>
#include <TString.h>

using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;
using namespace o2::aod;

struct reducedMCeventConverter000_001 {
Produces<aod::ReducedMCEvents_001> reducedMCevent_001;

void process(aod::ReducedMCEvents_000 const& events)
{
for (const auto& event : events) {
reducedMCevent_001(event.generatorsID(), event.mcPosX(), event.mcPosY(), event.mcPosZ(),
event.t(), event.weight(), event.impactParameter(),
-1.0f, -1.0f, -1.0f, -1.0f);
}
}
};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<reducedMCeventConverter000_001>(cfgc)};
}
Loading