Skip to content

Commit

Permalink
[MCH] added checker for ClustersTask output (#2276)
Browse files Browse the repository at this point in the history
The checker verifies that the clusters sizes and tracks-clusters
association are within configurable limits
  • Loading branch information
aferrero2707 authored May 7, 2024
1 parent 6ab7ac1 commit aee638c
Show file tree
Hide file tree
Showing 5 changed files with 387 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Modules/MUON/MCH/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ set(SRCS
src/DecodingCheck.cxx
src/DigitsCheck.cxx
src/PreclustersCheck.cxx
src/ClustersCheck.cxx
src/TracksTask.cxx
src/DecodingPostProcessing.cxx
src/DigitsPostProcessing.cxx
Expand Down Expand Up @@ -70,6 +71,7 @@ set(HEADERS
include/MCH/DecodingCheck.h
include/MCH/DigitsCheck.h
include/MCH/PreclustersCheck.h
include/MCH/ClustersCheck.h
include/MCH/TracksTask.h
include/MCH/DedodingPostProcessing.h
include/MCH/DigitsPostProcessing.h
Expand Down Expand Up @@ -150,6 +152,7 @@ add_root_dictionary(${MODULE_NAME}
include/MCH/PreclustersTask.h
include/MCH/DigitsCheck.h
include/MCH/PreclustersCheck.h
include/MCH/ClustersCheck.h
include/MCH/DecodingTask.h
include/MCH/DecodingCheck.h
include/MCH/ErrorTask.h
Expand Down
37 changes: 36 additions & 1 deletion Modules/MUON/MCH/etc/qc-mch-clusters.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,42 @@
"location": "remote"
}
},
"checks": {}
"checks": {
"ClustersCheck": {
"active": "true",
"className": "o2::quality_control_modules::muonchambers::ClustersCheck",
"moduleName": "QcMuonChambers",
"detectorName": "MCH",
"policy": "OnAll",
"extendedCheckParameters": {
"default": {
"default": {
"minClustersPerTrack": "9.5",
"maxClustersPerTrack": "11.5",
"minClustersPerChamber": "0.8",
"clustersPerChamberRangeMin": "0.6",
"clustersPerChamberRangeMax": "1.2",
"minClusterSize": "6",
"clusterSizeRangeMin": "0",
"clusterSizeRangeMax": "10",
"markerSize": "0.8"
}
}
},
"dataSource": [
{
"type": "Task",
"name": "MCHClusters",
"MOs" : "all"
"MOs" : [
"ClustersPerTrack",
"ClustersPerChamber",
"ClusterSizePerChamber"
]
}
]
}
}
},
"dataSamplingPolicies": []
}
Expand Down
74 changes: 74 additions & 0 deletions Modules/MUON/MCH/include/MCH/ClustersCheck.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// 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 ClustersCheck.h
/// \author Andrea Ferrero
///

#ifndef QC_MODULE_MCH_CLUSTERSCHECK_H
#define QC_MODULE_MCH_CLUSTERSCHECK_H

#include "QualityControl/CheckInterface.h"
#include "QualityControl/Quality.h"
#include <string>

namespace o2::quality_control::core
{
class MonitorObject;
}

namespace o2::quality_control_modules::muonchambers
{

/// \brief Check if the clusters sizes and tracks-clusters association is within expected limits
///
/// \author Andrea Ferrero
class ClustersCheck : public o2::quality_control::checker::CheckInterface
{
public:
/// Default constructor
ClustersCheck() = default;
/// Destructor
~ClustersCheck() override = default;

// Override interface
void configure() override;
void startOfActivity(const Activity& activity) override;
Quality check(std::map<std::string, std::shared_ptr<MonitorObject>>* moMap) override;
void beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult = Quality::Null) override;
std::string getAcceptedType() override;

private:
/// quality flag associated to each input plot
std::unordered_map<std::string, Quality> mQualities;
/// acceptable limits for the average number of clusters associated tracks
double mMinClustersPerTrack{ 9 };
double mMaxClustersPerTrack{ 11 };
/// minimum acceptale number of clusters per track in each chamber
double mMinClustersPerChamber{ 0.8 };
/// vertical range of the cluster per chamber plot
double mClustersPerChamberRangeMin{ 0.6 };
double mClustersPerChamberRangeMax{ 1.2 };
/// minimum acceptable value for the average cluster size per chamber
double mMinClusterSize{ 4 };
/// vertical range of the cluster size per chamber plot
double mClusterSizeRangeMin{ 0 };
double mClusterSizeRangeMax{ 10 };
/// size of the marker showing the average number of clusters
float mMarkerSize{ 1.2 };

ClassDefOverride(ClustersCheck, 1);
};

} // namespace o2::quality_control_modules::muonchambers

#endif // QC_MODULE_MCH_CLUSTERSCHECK_H
1 change: 1 addition & 0 deletions Modules/MUON/MCH/include/MCH/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#pragma link C++ class o2::quality_control_modules::muonchambers::DecodingCheck + ;
#pragma link C++ class o2::quality_control_modules::muonchambers::DigitsCheck + ;
#pragma link C++ class o2::quality_control_modules::muonchambers::PreclustersCheck + ;
#pragma link C++ class o2::quality_control_modules::muonchambers::ClustersCheck + ;
// Aggregators
// legacy tasks
#pragma link C++ class o2::quality_control_modules::muonchambers::PhysicsTaskDigits + ;
Expand Down
Loading

0 comments on commit aee638c

Please sign in to comment.