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
8 changes: 6 additions & 2 deletions Modules/GLO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

add_library(O2QcGLO)

target_sources(O2QcGLO PRIVATE src/VertexingQcTask.cxx )
target_sources(O2QcGLO PRIVATE src/VertexingQcTask.cxx src/ITSTPCMatchingTask.cxx)

target_include_directories(
O2QcGLO
Expand All @@ -13,7 +13,10 @@ target_include_directories(
target_link_libraries(O2QcGLO
PUBLIC
O2QualityControl
O2::Steer)
O2::Steer
O2::DataFormatsGlobalTracking
O2::DataFormatsITS
O2::GlobalTracking)

install(TARGETS O2QcGLO
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand All @@ -23,6 +26,7 @@ install(TARGETS O2QcGLO
add_root_dictionary(O2QcGLO
HEADERS
include/GLO/VertexingQcTask.h
include/GLO/ITSTPCMatchingTask.h
LINKDEF include/GLO/LinkDef.h
BASENAME O2QcGLO)

Expand Down
90 changes: 90 additions & 0 deletions Modules/GLO/ITSTPCmatchedTracks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"qc" : {
"config" : {
"database" : {
"implementation" : "CCDB",
"host" : "ccdb-test.cern.ch:8080",
"username" : "not_applicable",
"password" : "not_applicable",
"name" : "not_applicable"
},
"Activity" : {
"number" : "42",
"type" : "2"
},
"monitoring" : {
"url" : "infologger:///debug?qc"
},
"consul" : {
"url" : ""
},
"conditionDB" : {
"url" : "ccdb-test.cern.ch:8080"
},
"infologger" : { "" : "Configuration of the Infologger (optional).",
"filterDiscardDebug" : "false",
"" : "Set to true to discard debug and trace messages (default: false)",
"filterDiscardLevel" : "21",
"" : "Message at this level or above are discarded (default: 21 - Trace)" }
},
"tasks" : {
"MatchedTracksITSTPC" : {
"active" : "true",
"className" : "o2::quality_control_modules::glo::ITSTPCMatchingTask",
"moduleName" : "QcGLO",
"detectorName" : "GLO",
"cycleDurationSeconds" : "3600",
"maxNumberCycles" : "-1",
"dataSource" : {
"type" : "dataSamplingPolicy",
"name" : "ITSTPCmatchingSampling"
},
"taskParameters" : {
"GID" : "ITS-TPC,ITS",
"verbose" : "false",
"minPtCut" : "0.1f",
"etaCut" : "1.4f",
"minNTPCClustersCut" : "40",
"minDCACut" : "100.f",
"minDCACutY" : "10.f",
"grpFileName" : "o2sim_grp.root",
"geomFileName" : "o2sim_geometry.root"
},
"location" : "remote",
"saveObjectsToFile" : "ITSTPCmatched.root",
"" : "For debugging, path to the file where to save. If empty or missing it won't save."
}
},
"checks" : {
"QcCheck" : {
"active" : "false",
"className" : "o2::quality_control_modules::skeleton::SkeletonCheck",
"moduleName" : "QcSkeleton",
"policy" : "OnAny",
"detectorName" : "TOF",
"dataSource" : [ {
"type" : "Task",
"name" : "QcTask",
"MOs" : ["example"]
} ]
}
}
},
"dataSamplingPolicies" : [
{
"id" : "ITSTPCmatchingSampling",
"active" : "true",
"machines" : [],
"query_comment" : "checking every matched track",
"query" : "trackITSTPC:GLO/TPCITS/0;trackITSTPCABREFS:GLO/TPCITSAB_REFS/0;trackITSTPCABCLID:GLO/TPCITSAB_CLID/0;trackTPC:TPC/TRACKS;trackTPCClRefs:TPC/CLUSREFS",
"samplingConditions" : [
{
"condition" : "random",
"fraction" : "0.1",
"seed" : "1234"
}
],
"blocking" : "false"
}
]
}
42 changes: 42 additions & 0 deletions Modules/GLO/ITSTPCmatchedTracks_external.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"qc" : {
"config" : {
"database" : {
"implementation" : "CCDB",
"host" : "ccdb-test.cern.ch:8080",
"username" : "not_applicable",
"password" : "not_applicable",
"name" : "not_applicable"
},
"Activity" : {
"number" : "42",
"type" : "2"
},
"monitoring" : {
"url" : "infologger:///debug?qc"
},
"consul" : {
"url" : ""
},
"conditionDB" : {
"url" : "ccdb-test.cern.ch:8080"
},
"infologger" : { "" : "Configuration of the Infologger (optional).",
"filterDiscardDebug" : "false",
"" : "Set to true to discard debug and trace messages (default: false)",
"filterDiscardLevel" : "21",
"" : "Message at this level or above are discarded (default: 21 - Trace)" }
},
"tasks" : {},
"externalTasks" : {
"MatchedTracksITSTPC" : {
"active" : "true",
"query" : "ITSTPCMatchingQC1D:GLO/ITSTPCMATCHQC_1D/0;ITSTPCMatchingQC2D:GLO/ITSTPCMATCHQC_2D/0",
"" : "Use the task name as binding (encouraged)"
}
},
"checks" : {}
},
"dataSamplingPolicies" : [
]
}
55 changes: 55 additions & 0 deletions Modules/GLO/include/GLO/ITSTPCMatchingTask.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 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 ITSTPCMatchingTask.h
/// \author My Name
///

#ifndef QC_MODULE_GLO_ITSTPCMATCHINGTASK_H
#define QC_MODULE_GLO_ITSTPCMATCHINGTASK_H

#include "QualityControl/TaskInterface.h"
#include "GlobalTracking/MatchITSTPCQC.h"

class TH1F;

using namespace o2::quality_control::core;

namespace o2::quality_control_modules::glo
{

/// \brief Example Quality Control DPL Task
/// \author My Name
class ITSTPCMatchingTask final : public TaskInterface
{
public:
/// \brief Constructor
ITSTPCMatchingTask() = default;
/// Destructor
~ITSTPCMatchingTask() override;

// Definition of the methods for the template method pattern
void initialize(o2::framework::InitContext& ctx) override;
void startOfActivity(Activity& activity) override;
void startOfCycle() override;
void monitorData(o2::framework::ProcessingContext& ctx) override;
void endOfCycle() override;
void endOfActivity(Activity& activity) override;
void reset() override;

private:
o2::globaltracking::MatchITSTPCQC mMatchITSTPCQC;
};

} // namespace o2::quality_control_modules::glo

#endif // QC_MODULE_GLO_ITSTPCMATCHINGTASK_H
2 changes: 2 additions & 0 deletions Modules/GLO/include/GLO/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
#pragma link off all functions;

#pragma link C++ class o2::quality_control_modules::glo::VertexingQcTask + ;
#pragma link C++ class o2::quality_control_modules::glo::ITSTPCMatchingTask + ;

#endif
117 changes: 117 additions & 0 deletions Modules/GLO/src/ITSTPCMatchingTask.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// 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 ITSTPCMatchingTask.cxx
/// \author My Name
///

#include <TCanvas.h>
#include <TH1.h>

#include "QualityControl/QcInfoLogger.h"
#include "GLO/ITSTPCMatchingTask.h"
#include <Framework/InputRecord.h>
#include <Framework/InputRecordWalker.h>

namespace o2::quality_control_modules::glo
{

ITSTPCMatchingTask::~ITSTPCMatchingTask()
{
// mMatchITSTPCQC.deleteHistograms();
}

void ITSTPCMatchingTask::initialize(o2::framework::InitContext& /*ctx*/)
{
ILOG(Info, Support) << "initialize ITSTPCMatchingTask" << ENDM; // QcInfoLogger is used. FairMQ logs will go to there as well.

if (auto param = mCustomParameters.find("isMC"); param != mCustomParameters.end()) {
ILOG(Info, Devel) << "Custom parameter - isMC (= use of MC info): " << param->second << ENDM;
if (param->second == "true" || param->second == "True" || param->second == "TRUE") {
mMatchITSTPCQC.setUseMC(true);
}
}
if (auto param = mCustomParameters.find("minPtCut"); param != mCustomParameters.end()) {
ILOG(Info, Devel) << "Custom parameter - minPtCut (for track selection): " << param->second << ENDM;
mMatchITSTPCQC.setPtCut(atof(param->second.c_str()));
}
if (auto param = mCustomParameters.find("EtaCut"); param != mCustomParameters.end()) {
ILOG(Info, Devel) << "Custom parameter - EtaCut (for track selection): " << param->second << ENDM;
mMatchITSTPCQC.setEtaCut(atof(param->second.c_str()));
}
if (auto param = mCustomParameters.find("minNTPCClustersCut"); param != mCustomParameters.end()) {
ILOG(Info, Devel) << "Custom parameter - minNTPCClustersCut (for track selection): " << param->second << ENDM;
mMatchITSTPCQC.setMinNTPCClustersCut(atoi(param->second.c_str()));
}
if (auto param = mCustomParameters.find("minDCACut"); param != mCustomParameters.end()) {
ILOG(Info, Devel) << "Custom parameter - minDCACut (for track selection): " << param->second << ENDM;
mMatchITSTPCQC.setMinDCAtoBeamPipeDistanceCut(atof(param->second.c_str()));
}
if (auto param = mCustomParameters.find("minDCACutY"); param != mCustomParameters.end()) {
ILOG(Info, Devel) << "Custom parameter - minDCACutY (for track selection): " << param->second << ENDM;
mMatchITSTPCQC.setMinDCAtoBeamPipeYCut(atof(param->second.c_str()));
}
if (auto param = mCustomParameters.find("grpFileName"); param != mCustomParameters.end()) {
ILOG(Info, Devel) << "Custom parameter - GRP filename: " << param->second << ENDM;
mMatchITSTPCQC.setGRPFileName(param->second);
}
if (auto param = mCustomParameters.find("geomFileName"); param != mCustomParameters.end()) {
ILOG(Info, Devel) << "Custom parameter - geometry filename: " << param->second << ENDM;
mMatchITSTPCQC.setGeomFileName(param->second);
}

mMatchITSTPCQC.init();
getObjectsManager()->startPublishing(mMatchITSTPCQC.getHistoPtTPC());
getObjectsManager()->startPublishing(mMatchITSTPCQC.getHistoFractionITSTPCmatch());
getObjectsManager()->startPublishing(mMatchITSTPCQC.getHistoPt());
getObjectsManager()->startPublishing(mMatchITSTPCQC.getHistoEta());
getObjectsManager()->startPublishing(mMatchITSTPCQC.getHistoChi2Matching());
getObjectsManager()->startPublishing(mMatchITSTPCQC.getHistoChi2Refit());
getObjectsManager()->startPublishing(mMatchITSTPCQC.getHistoTimeResVsPt());
}

void ITSTPCMatchingTask::startOfActivity(Activity& activity)
{
ILOG(Info, Support) << "startOfActivity " << activity.mId << ENDM;
mMatchITSTPCQC.reset();
}

void ITSTPCMatchingTask::startOfCycle()
{
ILOG(Info, Support) << "startOfCycle" << ENDM;
}

void ITSTPCMatchingTask::monitorData(o2::framework::ProcessingContext& ctx)
{
mMatchITSTPCQC.run(ctx);
}

void ITSTPCMatchingTask::endOfCycle()
{
ILOG(Info, Support) << "endOfCycle" << ENDM;
mMatchITSTPCQC.finalize();
}

void ITSTPCMatchingTask::endOfActivity(Activity& /*activity*/)
{
ILOG(Info, Support) << "endOfActivity" << ENDM;
}

void ITSTPCMatchingTask::reset()
{
// clean all the monitor objects here

ILOG(Info, Support) << "Resetting the histograms" << ENDM;
mMatchITSTPCQC.reset();
}

} // namespace o2::quality_control_modules::glo