From ae28996b4de6d1d1d084b8173830146043b3ae82 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 10 May 2023 15:02:05 +0200 Subject: [PATCH 1/3] Adding basic AO2D task for asynchronous QC on MFT tracks --- DPG/Tasks/CMakeLists.txt | 1 + DPG/Tasks/MFT/CMakeLists.txt | 15 ++++++ DPG/Tasks/MFT/aQCMFTTracks.cxx | 92 ++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 DPG/Tasks/MFT/CMakeLists.txt create mode 100644 DPG/Tasks/MFT/aQCMFTTracks.cxx diff --git a/DPG/Tasks/CMakeLists.txt b/DPG/Tasks/CMakeLists.txt index f67ff0fbf51..fba7aae0174 100644 --- a/DPG/Tasks/CMakeLists.txt +++ b/DPG/Tasks/CMakeLists.txt @@ -13,4 +13,5 @@ add_subdirectory(AOTTrack) add_subdirectory(TPC) add_subdirectory(TOF) add_subdirectory(FDD) +add_subdirectory(MFT) add_subdirectory(Monitor) diff --git a/DPG/Tasks/MFT/CMakeLists.txt b/DPG/Tasks/MFT/CMakeLists.txt new file mode 100644 index 00000000000..67b23e7e09f --- /dev/null +++ b/DPG/Tasks/MFT/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(aqc-mft-tracks + SOURCES aQCMFTTracks.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase + COMPONENT_NAME Analysis) diff --git a/DPG/Tasks/MFT/aQCMFTTracks.cxx b/DPG/Tasks/MFT/aQCMFTTracks.cxx new file mode 100644 index 00000000000..8b264102150 --- /dev/null +++ b/DPG/Tasks/MFT/aQCMFTTracks.cxx @@ -0,0 +1,92 @@ +// 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 aQCMFTTracks.cxx +/// \brief This task runs over AO2Ds and fills some basic objects +/// needed in the asynchronous QC checks on MFT tracks. +/// \author David Grund +/// \since + +#include "CCDB/BasicCCDBManager.h" +#include "Framework/runDataProcessing.h" +#include "Framework/AnalysisTask.h" +#include "Framework/AnalysisDataModel.h" +#include "Framework/ASoAHelpers.h" + +#include "Framework/DataTypes.h" +#include "Common/DataModel/Multiplicity.h" +#include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Centrality.h" +#include "CommonConstants/LHCConstants.h" +#include "Framework/TimingInfo.h" +#include "DataFormatsITSMFT/ROFRecord.h" + +#include +#include + +using namespace o2; +using namespace o2::framework; +using namespace o2::aod; + +struct CheckMFT { + HistogramRegistry registry{"registry", + {// 2d histograms + {"mMFTTrackEtaPhi_5_MinClusters", "Track #eta , #phi (NCls >= 5); #eta; #phi", {HistType::kTH2F, {{50, -4, -2}, {100, -3.2, 3.2}}}}, + {"mMFTTrackXY_5_MinClusters", "Track Position (NCls >= 5); x; y", {HistType::kTH2F, {{320, -16, 16}, {320, -16, 16}}}}, + {"mMFTTrackEtaPhi_7_MinClusters", "Track #eta , #phi (NCls >= 7); #eta; #phi", {HistType::kTH2F, {{50, -4, -2}, {100, -3.2, 3.2}}}}, + {"mMFTTrackXY_7_MinClusters", "Track Position (NCls >= 7); x; y", {HistType::kTH2F, {{320, -16, 16}, {320, -16, 16}}}}, + {"mMFTTrackEtaPhi_8_MinClusters", "Track #eta , #phi (NCls >= 8); #eta; #phi", {HistType::kTH2F, {{50, -4, -2}, {100, -3.2, 3.2}}}}, + {"mMFTTrackXY_8_MinClusters", "Track Position (NCls >= 8); x; y", {HistType::kTH2F, {{320, -16, 16}, {320, -16, 16}}}}, + // 1d histograms + {"mMFTTrackEta", "Track #eta; #eta; # entries", {HistType::kTH1F, {{50, -4, -2}}}}, + {"mMFTTrackNumberOfClusters", "Number Of Clusters Per Track; # clusters; # entries", {HistType::kTH1F, {{10, 0.5, 10.5}}}}, + {"mMFTTrackPhi", "Track #phi; #phi; # entries", {HistType::kTH1F, {{100, -3.2, 3.2}}}}, + {"mMFTTrackTanl", "Track tan #lambda; tan #lambda; # entries", {HistType::kTH1F, {{100, -25, 0}}}}, + {"mMFTTrackInvQPt", "Track q/p_{T}; q/p_{T} [1/GeV]; # entries", {HistType::kTH1F, {{250, -10, 10}}}}}}; + + void process(aod::MFTTracks const& mfttracks) + { + for (auto& track : mfttracks) { + // 2d histograms + float x = track.x(); + float y = track.y(); + float eta = track.eta(); + float phi = track.phi(); + float nCls = track.nClusters(); + if (nCls >= 5) { + registry.fill(HIST("mMFTTrackXY_5_MinClusters"), x, y); + registry.fill(HIST("mMFTTrackEtaPhi_5_MinClusters"), eta, phi); + if (nCls >= 7) { + registry.fill(HIST("mMFTTrackXY_7_MinClusters"), x, y); + registry.fill(HIST("mMFTTrackEtaPhi_7_MinClusters"), eta, phi); + if (nCls >= 8) { + registry.fill(HIST("mMFTTrackXY_8_MinClusters"), x, y); + registry.fill(HIST("mMFTTrackEtaPhi_8_MinClusters"), eta, phi); + } + } + } + // 1d histograms + registry.fill(HIST("mMFTTrackEta"), eta); + registry.fill(HIST("mMFTTrackNumberOfClusters"), nCls); + registry.fill(HIST("mMFTTrackPhi"), phi); + registry.fill(HIST("mMFTTrackTanl"), track.tgl()); + registry.fill(HIST("mMFTTrackInvQPt"), track.signed1Pt()); + } + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{ + adaptAnalysisTask(cfgc), + }; +} From eb680c5f920c4c0876c7ccc1f1ac32106dbb9599 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 13 May 2023 17:58:44 +0200 Subject: [PATCH 2/3] DPG/MFT: trying to initiate system checks for the existing PR --- DPG/Tasks/MFT/aQCMFTTracks.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/DPG/Tasks/MFT/aQCMFTTracks.cxx b/DPG/Tasks/MFT/aQCMFTTracks.cxx index 8b264102150..1a86ba5ef83 100644 --- a/DPG/Tasks/MFT/aQCMFTTracks.cxx +++ b/DPG/Tasks/MFT/aQCMFTTracks.cxx @@ -90,3 +90,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) adaptAnalysisTask(cfgc), }; } + From a80be88d7350795b233f85fb9063b3c231a107e6 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 13 May 2023 18:05:23 +0200 Subject: [PATCH 3/3] Running clang-format on the .cxx source file --- DPG/Tasks/MFT/aQCMFTTracks.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/DPG/Tasks/MFT/aQCMFTTracks.cxx b/DPG/Tasks/MFT/aQCMFTTracks.cxx index 1a86ba5ef83..8b264102150 100644 --- a/DPG/Tasks/MFT/aQCMFTTracks.cxx +++ b/DPG/Tasks/MFT/aQCMFTTracks.cxx @@ -90,4 +90,3 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) adaptAnalysisTask(cfgc), }; } -