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
36 changes: 21 additions & 15 deletions Modules/MFT/include/MFT/QcMFTClusterTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
/// \author Guillermo Contreras
/// \author Katarina Krizkova Gajdosova
/// \author Diana Maria Krupova
/// \author David Grund
///

#ifndef QC_MFT_CLUSTER_TASK_H
#define QC_MFT_CLUSTER_TASK_H

#include <TH1F.h>
#include <TH2F.h>
#include <DataFormatsITSMFT/TopologyDictionary.h>
Expand All @@ -28,8 +30,11 @@

// Quality Control
#include "QualityControl/TaskInterface.h"
#include "Common/TH1Ratio.h"
#include "Common/TH2Ratio.h"

using namespace o2::quality_control::core;
using namespace o2::quality_control_modules::common;

namespace o2::quality_control_modules::mft
{
Expand Down Expand Up @@ -59,28 +64,29 @@ class QcMFTClusterTask /*final*/ : public TaskInterface // todo add back the "fi
}

private:
std::unique_ptr<TH1F> mClusterLayerIndexH0 = nullptr;
std::unique_ptr<TH1F> mClusterLayerIndexH1 = nullptr;
std::unique_ptr<TH1F> mClusterDiskIndex = nullptr;
std::unique_ptr<TH1FRatio> mClusterLayerIndexH0 = nullptr;
std::unique_ptr<TH1FRatio> mClusterLayerIndexH1 = nullptr;

std::unique_ptr<TH1F> mClusterOccupancy = nullptr;
std::unique_ptr<TH1F> mClusterPatternIndex = nullptr;
std::unique_ptr<TH1F> mClusterSizeSummary = nullptr;
std::unique_ptr<TH1F> mGroupedClusterSizeSummary = nullptr;
std::unique_ptr<TH2F> mClusterOccupancySummary = nullptr;
std::unique_ptr<TH1FRatio> mClusterOccupancy = nullptr;
std::unique_ptr<TH1FRatio> mClusterPatternIndex = nullptr;
std::unique_ptr<TH1FRatio> mClusterSizeSummary = nullptr;
std::unique_ptr<TH1FRatio> mGroupedClusterSizeSummary = nullptr;
std::unique_ptr<TH2FRatio> mClusterOccupancySummary = nullptr;

std::unique_ptr<TH2F> mClusterPatternSensorIndices = nullptr;
std::vector<std::unique_ptr<TH2F>> mClusterChipOccupancyMap;
std::unique_ptr<TH2FRatio> mClusterPatternSensorIndices = nullptr;
std::vector<std::unique_ptr<TH2FRatio>> mClusterChipOccupancyMap;

std::unique_ptr<TH1F> mClusterZ = nullptr;
std::vector<std::unique_ptr<TH2F>> mClusterXYinLayer;
std::vector<std::unique_ptr<TH1F>> mClusterRinLayer;
std::unique_ptr<TH1FRatio> mClusterZ = nullptr;
std::vector<std::unique_ptr<TH2FRatio>> mClusterXYinLayer;
std::vector<std::unique_ptr<TH1FRatio>> mClusterRinLayer;

std::unique_ptr<TH1F> mClustersROFSize = nullptr;
std::unique_ptr<TH1F> mClustersBC = nullptr;
std::unique_ptr<TH1FRatio> mClustersROFSize = nullptr;
std::unique_ptr<TH1FRatio> mClustersBC = nullptr;

std::vector<o2::BaseCluster<float>> mClustersGlobal;

int mOnlineQC;

// needed to construct the name and path of some histograms
int mHalf[936] = { 0 };
int mDisk[936] = { 0 };
Expand Down
16 changes: 10 additions & 6 deletions Modules/MFT/include/MFT/QcMFTDigitTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
/// \author Guillermo Contreras
/// \author Katarina Krizkova Gajdosova
/// \author Diana Maria Krupova
/// \author David Grund
///

#ifndef QC_MFT_DIGIT_TASK_H
Expand All @@ -29,8 +30,11 @@
#include <CommonConstants/LHCConstants.h>
// Quality Control
#include "QualityControl/TaskInterface.h"
#include "Common/TH1Ratio.h"
#include "Common/TH2Ratio.h"

using namespace o2::quality_control::core;
using namespace o2::quality_control_modules::common;

namespace o2::quality_control_modules::mft
{
Expand Down Expand Up @@ -90,15 +94,15 @@ class QcMFTDigitTask final : public TaskInterface
float mY[936] = { 0 };

std::unique_ptr<TH1F> mMergerTest = nullptr;
std::unique_ptr<TH1F> mDigitChipOccupancy = nullptr;
std::unique_ptr<TH1FRatio> mDigitChipOccupancy = nullptr;
std::unique_ptr<TH1F> mDigitChipStdDev = nullptr;
std::unique_ptr<TH2F> mDigitOccupancySummary = nullptr;
std::unique_ptr<TH2F> mDigitDoubleColumnSensorIndices = nullptr;
std::unique_ptr<TH2FRatio> mDigitOccupancySummary = nullptr;
std::unique_ptr<TH2FRatio> mDigitDoubleColumnSensorIndices = nullptr;

std::unique_ptr<TH1F> mDigitsROFSize = nullptr;
std::unique_ptr<TH1F> mDigitsBC = nullptr;
std::unique_ptr<TH1FRatio> mDigitsROFSize = nullptr;
std::unique_ptr<TH1FRatio> mDigitsBC = nullptr;

std::vector<std::unique_ptr<TH2F>> mDigitChipOccupancyMap;
std::vector<std::unique_ptr<TH2FRatio>> mDigitChipOccupancyMap;
std::vector<std::unique_ptr<TH2F>> mDigitPixelOccupancyMap;

// reference orbit used in relative time calculation
Expand Down
11 changes: 6 additions & 5 deletions Modules/MFT/include/MFT/QcMFTTrackTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/// \author Diana Maria Krupova
/// \author Katarina Krizkova Gajdosova
/// \author David Grund
///

#ifndef QC_MFT_TRACK_TASK_H
#define QC_MFT_TRACK_TASK_H
Expand Down Expand Up @@ -71,10 +72,10 @@ class QcMFTTrackTask /*final*/ : public TaskInterface // todo add back the "fina
std::unique_ptr<TH1FRatio> mPositiveTrackPhi = nullptr;
std::unique_ptr<TH1FRatio> mNegativeTrackPhi = nullptr;
std::unique_ptr<TH1FRatio> mTrackEta = nullptr;
std::array<unique_ptr<TH1FRatio>, 7> mTrackEtaNCls = { nullptr };
std::array<unique_ptr<TH1FRatio>, 7> mTrackPhiNCls = { nullptr };
std::array<unique_ptr<TH2FRatio>, 7> mTrackXYNCls = { nullptr };
std::array<unique_ptr<TH2FRatio>, 7> mTrackEtaPhiNCls = { nullptr };
std::array<unique_ptr<TH1FRatio>, 6> mTrackEtaNCls = { nullptr };
std::array<unique_ptr<TH1FRatio>, 6> mTrackPhiNCls = { nullptr };
std::array<unique_ptr<TH2FRatio>, 6> mTrackXYNCls = { nullptr };
std::array<unique_ptr<TH2FRatio>, 6> mTrackEtaPhiNCls = { nullptr };
std::unique_ptr<TH1FRatio> mCATrackEta = nullptr;
std::unique_ptr<TH1FRatio> mLTFTrackEta = nullptr;
std::unique_ptr<TH1FRatio> mCATrackPt = nullptr;
Expand All @@ -85,7 +86,7 @@ class QcMFTTrackTask /*final*/ : public TaskInterface // todo add back the "fina
std::unique_ptr<TH1FRatio> mAssociatedClusterFraction = nullptr;
std::unique_ptr<TH2FRatio> mClusterRatioVsBunchCrossing = nullptr;

static constexpr array<short, 7> sMinNClustersList = { 4, 5, 6, 7, 8, 9, 10 };
static constexpr array<short, 6> sMinNClustersList = { 5, 6, 7, 8, 9, 10 };
};

} // namespace o2::quality_control_modules::mft
Expand Down
13 changes: 12 additions & 1 deletion Modules/MFT/mft-clusters.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"url" : ""
},
"conditionDB" : {
"url" : "ccdb-test.cern.ch:8080"
"url" : "http://alice-ccdb.cern.ch"
}
},
"tasks" : {
Expand All @@ -36,11 +36,22 @@
},
"taskParameters" : {
"myOwnKey" : "myOwnValue",
"onlineQC" : "1",
"maxClusterROFSize" : "5000",
"maxDuration" : "60000",
"timeBinSize" : "0.1",
"ROFLengthInBC" : "198"
},
"grpGeomRequest" : {
"geomRequest": "None",
"askGRPECS": "true",
"askGRPLHCIF": "false",
"askGRPMagField": "false",
"askMatLUT": "false",
"askTime": "false",
"askOnceAllButField": "false",
"needPropagatorD": "false"
},
"location" : "remote"
}
},
Expand Down
12 changes: 11 additions & 1 deletion Modules/MFT/mft-digits.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"url" : ""
},
"conditionDB" : {
"url" : "ccdb-test.cern.ch:8080"
"url" : "http://alice-ccdb.cern.ch"
}
},
"tasks" : {
Expand All @@ -42,6 +42,16 @@
"timeBinSize" : "0.1",
"ROFLengthInBC" : "198"
},
"grpGeomRequest" : {
"geomRequest": "None",
"askGRPECS": "true",
"askGRPLHCIF": "false",
"askGRPMagField": "false",
"askMatLUT": "false",
"askTime": "false",
"askOnceAllButField": "false",
"needPropagatorD": "false"
},
"location" : "remote"
}
},
Expand Down
2 changes: 1 addition & 1 deletion Modules/MFT/mft-tracks.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"url" : ""
},
"conditionDB" : {
"url" : "ccdb-test.cern.ch:8080"
"url" : "http://alice-ccdb.cern.ch"
}
},
"tasks" : {
Expand Down
37 changes: 3 additions & 34 deletions Modules/MFT/src/QcMFTClusterCheck.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
/// \author Guillermo Contreras
/// \author Katarina Krizkova Gajdosova
/// \author Diana Maria Krupova
/// \author David Grund
///

// C++
#include <string>
Expand Down Expand Up @@ -79,15 +81,10 @@ Quality QcMFTClusterCheck::check(std::map<std::string, std::shared_ptr<MonitorOb
return Quality::Null;
}

float den = hClusterOccupancy->GetBinContent(0); // normalisation stored in the uderflow bin

for (int iBin = 0; iBin < hClusterOccupancy->GetNbinsX(); iBin++) {
if (hClusterOccupancy->GetBinContent(iBin + 1) == 0) {
hClusterOccupancy->Fill(937); // number of chips with zero clusters stored in the overflow bin
}
float num = hClusterOccupancy->GetBinContent(iBin + 1);
float ratio = (den > 0) ? (num / den) : 0.0;
hClusterOccupancy->SetBinContent(iBin + 1, ratio);
}
}

Expand All @@ -97,14 +94,6 @@ Quality QcMFTClusterCheck::check(std::map<std::string, std::shared_ptr<MonitorOb
ILOG(Error, Support) << "Could not cast mClusterPatternIndex to TH1F." << ENDM;
return Quality::Null;
}

float den = hClusterPatternIndex->GetBinContent(0); // normalisation stored in the uderflow bin

for (int iBin = 0; iBin < hClusterPatternIndex->GetNbinsX(); iBin++) {
float num = hClusterPatternIndex->GetBinContent(iBin + 1);
float ratio = (den > 0) ? (num / den) : 0.0;
hClusterPatternIndex->SetBinContent(iBin + 1, ratio);
}
}

if (mo->getName() == "mClusterSizeSummary") {
Expand All @@ -113,14 +102,6 @@ Quality QcMFTClusterCheck::check(std::map<std::string, std::shared_ptr<MonitorOb
ILOG(Error, Support) << "Could not cast hClusterSizeSummary to TH1F." << ENDM;
return Quality::Null;
}

float den = hClusterSizeSummary->GetBinContent(0); // normalisation stored in the uderflow bin

for (int iBin = 0; iBin < hClusterSizeSummary->GetNbinsX(); iBin++) {
float num = hClusterSizeSummary->GetBinContent(iBin + 1);
float ratio = (den > 0) ? (num / den) : 0.0;
hClusterSizeSummary->SetBinContent(iBin + 1, ratio);
}
}

if (mo->getName() == "mGroupedClusterSizeSummary") {
Expand All @@ -129,14 +110,6 @@ Quality QcMFTClusterCheck::check(std::map<std::string, std::shared_ptr<MonitorOb
ILOG(Error, Support) << "Could not cast hGroupedClusterSizeSummary to TH1F." << ENDM;
return Quality::Null;
}

float den = hGroupedClusterSizeSummary->GetBinContent(0); // normalisation stored in the uderflow bin

for (int iBin = 0; iBin < hGroupedClusterSizeSummary->GetNbinsX(); iBin++) {
float num = hGroupedClusterSizeSummary->GetBinContent(iBin + 1);
float ratio = (den > 0) ? (num / den) : 0.0;
hGroupedClusterSizeSummary->SetBinContent(iBin + 1, ratio);
}
}

if (mo->getName() == "mClusterOccupancySummary") {
Expand All @@ -146,14 +119,10 @@ Quality QcMFTClusterCheck::check(std::map<std::string, std::shared_ptr<MonitorOb
return Quality::Null;
}

float den = hClusterOccupancySummary->GetBinContent(0, 0); // normalisation stored in the uderflow bin
float nEmptyBins = 0; // number of empty zones stored here
float nEmptyBins = 0; // number of empty zones

for (int iBinX = 0; iBinX < hClusterOccupancySummary->GetNbinsX(); iBinX++) {
for (int iBinY = 0; iBinY < hClusterOccupancySummary->GetNbinsY(); iBinY++) {
float num = hClusterOccupancySummary->GetBinContent(iBinX + 1, iBinY + 1);
float ratio = (den > 0) ? (num / den) : 0.0;
hClusterOccupancySummary->SetBinContent(iBinX + 1, iBinY + 1, ratio);
if ((hClusterOccupancySummary->GetBinContent(iBinX + 1, iBinY + 1)) == 0) {
nEmptyBins = nEmptyBins + 1;
}
Expand Down
Loading