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
4 changes: 2 additions & 2 deletions Modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ add_subdirectory(TRD)
add_subdirectory(HMPID)
add_subdirectory(CPV)
add_subdirectory(GLO)
add_subdirectory(FV0)
#add_subdirectory(FV0)
add_subdirectory(FDD)
add_subdirectory(ZDC)
add_subdirectory(CTP)
add_subdirectory(CTP)
1 change: 0 additions & 1 deletion Modules/FV0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ install(TARGETS O2QcFV0
add_root_dictionary(O2QcFV0
HEADERS
include/FV0/DigitQcTask.h
include/FV0/Helper.h
include/FV0/CFDEffCheck.h
include/FV0/BasicPPTask.h
include/FV0/OutOfBunchCollTask.h
Expand Down
6 changes: 2 additions & 4 deletions Modules/FV0/include/FV0/DigitQcTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <Framework/InputRecord.h>
#include "QualityControl/QcInfoLogger.h"
//#include "FT0Base/Constants.h"
#include "DataFormatsFV0/BCData.h"
#include "DataFormatsFV0/Digit.h"
#include "DataFormatsFV0/ChannelData.h"
#include "QualityControl/TaskInterface.h"
#include <memory>
Expand All @@ -31,15 +31,13 @@
#include "TH2.h"
#include "TList.h"
#include "Rtypes.h"
#include "FV0/Helper.h"

using namespace o2::quality_control::core;

namespace o2::quality_control_modules::fv0
{
namespace ch_data = helper::channel_data;
using ChannelData = o2::fv0::ChannelData;
using Digit = o2::fv0::BCData;
using Digit = o2::fv0::Digit;
/// \brief Quality Control DPL Task for FV0's digit visualization
/// \author Artur Furs afurs@cern.ch
class DigitQcTask final : public TaskInterface
Expand Down
86 changes: 0 additions & 86 deletions Modules/FV0/include/FV0/Helper.h

This file was deleted.

2 changes: 1 addition & 1 deletion Modules/FV0/include/FV0/OutOfBunchCollTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "FV0Base/Constants.h"
#include "DataFormatsFT0/Digit.h" // temp, for o2::ft0::Triggers::bitXYZ
#include "DataFormatsFV0/ChannelData.h"
#include "DataFormatsFV0/BCData.h"
#include "DataFormatsFV0/Digit.h"
#include "CCDB/CcdbApi.h"

#include "TList.h"
Expand Down
8 changes: 1 addition & 7 deletions Modules/FV0/include/FV0/TriggerQcTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@

#include "QualityControl/TaskInterface.h"
#include "QualityControl/QcInfoLogger.h"
#include "DataFormatsFV0/BCData.h"
#include "DataFormatsFV0/ChannelData.h"
#include "FV0/Helper.h"
#include "DataFormatsFV0/Digit.h"

#include "TH1.h"
#include "TH2.h"
Expand All @@ -30,9 +28,6 @@ using namespace o2::quality_control::core;

namespace o2::quality_control_modules::fv0
{
namespace ch_data = helper::channel_data;
using ChannelData = o2::fv0::ChannelData;
using Digit = o2::fv0::BCData;

/// \brief Task to verify in software triggers generated on FEE
/// \author Sebastian Bysiak sbysiak@cern.ch
Expand Down Expand Up @@ -72,7 +67,6 @@ class TriggerQcTask final : public TaskInterface
kNone,
kBoth
};

std::map<int, std::string> mMapDigitTrgNames;
std::map<int, bool> mMapTrgSoftware;

Expand Down
17 changes: 8 additions & 9 deletions Modules/FV0/src/CalibrationTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@

#include "QualityControl/QcInfoLogger.h"
#include "FV0/CalibrationTask.h"
//#include "DataFormatsFV0/Digit.h"
#include "DataFormatsFV0/BCData.h"
#include "DataFormatsFV0/Digit.h"
#include "DataFormatsFV0/ChannelData.h"
#include "FV0Base/Constants.h"
#include <Framework/InputRecord.h>
Expand Down Expand Up @@ -93,20 +92,20 @@ void CalibrationTask::monitorData(o2::framework::ProcessingContext& ctx)
if (mCurrentChannelTimeCalibrationObject) {
// mCalibratedChannelTimeHistogram->Fill(channel.time + mCurrentChannelTimeCalibrationObject->mTimeOffsets[channel.getChannelID()]);
// mCalibratedTimePerChannelHistogram->Fill(channel.getChannelID(), channel.time + mCurrentChannelTimeCalibrationObject->mTimeOffsets[channel.getChannelID()]);
mCalibratedChannelTimeHistogram->Fill(channel.time - mCurrentChannelTimeCalibrationObject->mTimeOffsets[channel.getChannelID()]);
mCalibratedTimePerChannelHistogram->Fill(channel.getChannelID(), channel.time - mCurrentChannelTimeCalibrationObject->mTimeOffsets[channel.getChannelID()]);

mCalibratedChannelTimeHistogram->Fill(channel.CFDTime - mCurrentChannelTimeCalibrationObject->mTimeOffsets[channel.getChannelID()]);
mCalibratedTimePerChannelHistogram->Fill(channel.getChannelID(), channel.CFDTime - mCurrentChannelTimeCalibrationObject->mTimeOffsets[channel.getChannelID()]);
} else {
mCalibratedChannelTimeHistogram->Fill(channel.time);
mCalibratedTimePerChannelHistogram->Fill(channel.getChannelID(), channel.time);
mCalibratedChannelTimeHistogram->Fill(channel.CFDTime);
mCalibratedTimePerChannelHistogram->Fill(channel.getChannelID(), channel.CFDTime);
}
mNotCalibratedChannelTimeHistogram->Fill(channel.time);
mNotCalibratedTimePerChannelHistogram->Fill(channel.getChannelID(), channel.time);
mNotCalibratedChannelTimeHistogram->Fill(channel.CFDTime);
mNotCalibratedTimePerChannelHistogram->Fill(channel.getChannelID(), channel.CFDTime);
// std::cout << "-------++++++++++++++++++++++----------++++++++++++++------------_+++++++++++++++++ " << std::endl;
// std::cout << channel.time << std::endl;
// std::cout << "-------++++++++++++++++++++++----------++++++++++++++------------_+++++++++++++++++ " << std::endl;
}
}

void CalibrationTask::endOfCycle()
{
ILOG(Info, Support) << "endOfCycle" << ENDM;
Expand Down
52 changes: 26 additions & 26 deletions Modules/FV0/src/DigitQcTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,12 @@ void DigitQcTask::monitorData(o2::framework::ProcessingContext& ctx)
for (auto& digit : digits) {
const auto& vecChData = digit.getBunchChannelData(channels);
bool isTCM = true;
mTimeCurNS = o2::InteractionRecord::bc2ns(digit.getIntRecord().bc, digit.getIntRecord().orbit);
mTimeCurNS = o2::InteractionRecord::bc2ns(digit.getBC(), digit.getOrbit());
if (mTimeMinNS < 0)
mTimeMinNS = mTimeCurNS;
/*
if (isFirst == true) {
//firstOrbit = digit.getIntRecord().orbit;
//firstOrbit = digit.getOrbit();
isFirst = false;
}
*/
Expand All @@ -359,72 +359,72 @@ void DigitQcTask::monitorData(o2::framework::ProcessingContext& ctx)
if (mTimeCurNS > curTfTimeMax)
curTfTimeMax = mTimeCurNS;
/*
if (digit.getTriggers().amplA == -5000 && digit.getTriggers().amplC == -5000 && digit.getTriggers().timeA == -5000 && digit.getTriggers().timeC == -5000)
if (digit.mTriggers.amplA == -5000 && digit.mTriggers.amplC == -5000 && digit.mTriggers.timeA == -5000 && digit.mTriggers.timeC == -5000)
isTCM = false;
*/
mHistOrbit2BC->Fill(digit.getIntRecord().orbit % sOrbitsPerTF, digit.getIntRecord().bc);
mHistBC->Fill(digit.getIntRecord().bc);
mHistBC->Fill(digit.getBC());

if (isTCM && !(digit.getTriggers().triggerSignals & (1 << sLaserBitPos))) {
if (isTCM && !digit.mTriggers.getLaserBit()) {
mHistNchA->Fill(digit.mTriggers.nChanA);
//mHistNchC->Fill(digit.mTriggers.nChanC);
mHistSumAmpA->Fill(digit.mTriggers.amplA);
//mHistSumAmpC->Fill(digit.mTriggers.amplC);
//mHistAverageTimeA->Fill(digit.mTriggers.timeA);
mHistAverageTimeA->Fill(digit.mTriggers.timeA);
//mHistAverageTimeC->Fill(digit.mTriggers.timeC);
//mHistTimeSum2Diff->Fill((digit.mTriggers.timeC - digit.mTriggers.timeA) * mCFDChannel2NS / 2, (digit.mTriggers.timeC + digit.mTriggers.timeA) * mCFDChannel2NS / 2);
for (const auto& entry : mMapDigitTrgNames) {
if (digit.getTriggers().triggerSignals & (1 << entry.first))
if (digit.mTriggers.triggersignals & (1 << entry.first))
mHistTriggers->Fill(static_cast<Double_t>(entry.first));
for (const auto& entry2 : mMapDigitTrgNames) {
if ((digit.getTriggers().triggerSignals & (1 << entry.first)) && (digit.getTriggers().triggerSignals & (1 << entry2.first)))
if ((digit.mTriggers.triggersignals & (1 << entry.first)) && (digit.mTriggers.triggersignals & (1 << entry2.first)))
mHistTriggersCorrelation->Fill(static_cast<Double_t>(entry.first), static_cast<Double_t>(entry2.first));
}
}
for (auto& entry : mMapTrgBcOrbit) {
if (digit.getTriggers().triggerSignals & (1 << entry.first)) {
if (digit.mTriggers.triggersignals & (1 << entry.first)) {
entry.second->Fill(digit.getIntRecord().orbit % sOrbitsPerTF, digit.getIntRecord().bc);
}
}
}

for (auto& entry : mMapPmModuleChannels) {
for (const auto& chData : vecChData) {
if (std::find(entry.second.begin(), entry.second.end(), ch_data::getChId(chData)) != entry.second.end()) {
if (std::find(entry.second.begin(), entry.second.end(), chData.ChId) != entry.second.end()) {
mMapPmModuleBcOrbit[entry.first]->Fill(digit.getIntRecord().orbit % sOrbitsPerTF, digit.getIntRecord().bc);
break;
}
}
if (entry.first == "TCM" && isTCM && (digit.getTriggers().triggerSignals & (1 << sDataIsValidBitPos))) {
if (entry.first == "TCM" && isTCM && (digit.getTriggers().triggersignals & (1 << sDataIsValidBitPos))) {
mMapPmModuleBcOrbit[entry.first]->Fill(digit.getIntRecord().orbit % sOrbitsPerTF, digit.getIntRecord().bc);
}
}

for (const auto& chData : vecChData) {
mHistTime2Ch->Fill(static_cast<Double_t>(ch_data::getChId(chData)), static_cast<Double_t>(chData.time));
mHistAmp2Ch->Fill(static_cast<Double_t>(ch_data::getChId(chData)), static_cast<Double_t>(ch_data::getCharge(chData)));
mHistEventDensity2Ch->Fill(static_cast<Double_t>(ch_data::getChId(chData)), static_cast<Double_t>(digit.getIntRecord().differenceInBC(mStateLastIR2Ch[ch_data::getChId(chData)])));
mStateLastIR2Ch[ch_data::getChId(chData)] = digit.getIntRecord();
mHistChannelID->Fill(ch_data::getChId(chData));
if (ch_data::getCharge(chData) > 0)
mHistNumADC->Fill(ch_data::getChId(chData));
mHistNumCFD->Fill(ch_data::getChId(chData));
if (mSetAllowedChIDs.find(static_cast<unsigned int>(ch_data::getChId(chData))) != mSetAllowedChIDs.end()) {
mMapHistAmp1D[ch_data::getChId(chData)]->Fill(ch_data::getCharge(chData));
mMapHistTime1D[ch_data::getChId(chData)]->Fill(chData.time);
mMapHistAmpVsTime[ch_data::getChId(chData)]->Fill(ch_data::getCharge(chData), chData.time);
mHistTime2Ch->Fill(static_cast<Double_t>(chData.ChId), static_cast<Double_t>(chData.CFDTime));
mHistAmp2Ch->Fill(static_cast<Double_t>(chData.ChId), static_cast<Double_t>(chData.QTCAmpl));
mHistEventDensity2Ch->Fill(static_cast<Double_t>(chData.ChId), static_cast<Double_t>(digit.mIntRecord.differenceInBC(mStateLastIR2Ch[chData.ChId])));
mStateLastIR2Ch[chData.ChId] = digit.mIntRecord;
mHistChannelID->Fill(chData.ChId);
if (chData.QTCAmpl > 0)
mHistNumADC->Fill(chData.ChId);
mHistNumCFD->Fill(chData.ChId);
if (mSetAllowedChIDs.find(static_cast<unsigned int>(chData.ChId)) != mSetAllowedChIDs.end()) {
mMapHistAmp1D[chData.ChId]->Fill(chData.QTCAmpl);
mMapHistTime1D[chData.ChId]->Fill(chData.CFDTime);
mMapHistAmpVsTime[chData.ChId]->Fill(chData.QTCAmpl, chData.CFDTime);
/*
for (const auto& entry : mMapChTrgNames) {
if ((ch_data::getCharge(chData) & (1 << entry.first))) {
mMapHistPMbits[ch_data::getChId(chData)]->Fill(entry.first);
if ((chData.ChainQTC & (1 << entry.first))) {
mMapHistPMbits[chData.ChId]->Fill(entry.first);
}
}
*/
}
/*
for (const auto& entry : mMapChTrgNames) {
if ((chData.ChainQTC & (1 << entry.first))) {
mHistChDataBits->Fill(ch_data::getChId(chData), entry.first);
mHistChDataBits->Fill(chData.ChId, entry.first);
}
}
*/
Expand Down
17 changes: 9 additions & 8 deletions Modules/FV0/src/TriggerQcTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ void TriggerQcTask::startOfCycle()

void TriggerQcTask::monitorData(o2::framework::ProcessingContext& ctx)
{
auto channels = ctx.inputs().get<gsl::span<ChannelData>>("channels");
auto digits = ctx.inputs().get<gsl::span<Digit>>("digits");
auto channels = ctx.inputs().get<gsl::span<o2::fv0::ChannelData>>("channels");
auto digits = ctx.inputs().get<gsl::span<o2::fv0::Digit>>("digits");

for (auto& digit : digits) {
const auto& vecChData = digit.getBunchChannelData(channels);
Expand All @@ -134,17 +134,18 @@ void TriggerQcTask::monitorData(o2::framework::ProcessingContext& ctx)
int nFiredChannelsInner = 0;
int nFiredChannelsOuter = 0;
for (const auto& chData : vecChData) {
if (ch_data::getCharge(chData) <= 0)
if (chData.QTCAmpl <= 0)
continue;
if (ch_data::getChId(chData) >= sNCHANNELS_PM) { // skip reference PMT

if (chData.ChId >= sNCHANNELS_PM) { // skip reference PMT
continue;
}

if (ch_data::getChId(chData) < sNCHANNELS_PM_INNER) {
sumAmplInner += ch_data::getCharge(chData);
if (chData.ChId < sNCHANNELS_PM_INNER) {
sumAmplInner += chData.QTCAmpl;
nFiredChannelsInner++;
} else {
sumAmplOuter += ch_data::getCharge(chData);
sumAmplOuter += chData.QTCAmpl;
nFiredChannelsOuter++;
}
}
Expand All @@ -166,7 +167,7 @@ void TriggerQcTask::monitorData(o2::framework::ProcessingContext& ctx)
mHistTriggersSw->Fill(entry.first);

for (const auto& entry : mMapTrgSoftware) {
bool isTCMFired = digit.mTriggers.triggerSignals & (1 << entry.first);
bool isTCMFired = digit.mTriggers.triggersignals & (1 << entry.first);
bool isSwFired = entry.second;
if (!isTCMFired && isSwFired)
mHistTriggersSoftwareVsTCM->Fill(entry.first, ComparisonResult::kSWonly);
Expand Down