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: 7 additions & 1 deletion Modules/TRD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

add_library(O2QcTRD)

target_sources(O2QcTRD PRIVATE src/DigitsTask.cxx
target_sources(O2QcTRD PRIVATE src/TrackletsCheck.cxx src/TrackletsTask.cxx src/PulseHeightCheck.cxx src/Noise.cxx src/PulseHeight.cxx src/RawData.cxx src/DigitsTask.cxx
src/DigitsCheck.cxx)

target_include_directories(
Expand All @@ -20,6 +20,12 @@ install(TARGETS O2QcTRD

add_root_dictionary(O2QcTRD
HEADERS
include/TRD/TrackletsCheck.h
include/TRD/TrackletsTask.h
include/TRD/PulseHeightCheck.h
include/TRD/Noise.h
include/TRD/PulseHeight.h
include/TRD/RawData.h
include/TRD/DigitsTask.h
include/TRD/DigitsCheck.h
LINKDEF include/TRD/LinkDef.h
Expand Down
66 changes: 66 additions & 0 deletions Modules/TRD/RawData.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"qc": {
"config": {
"database": {
"implementation": "CCDB",
"host": "ccdb-test.cern.ch:8080",
"username": "not_applicable",
"password": "not_applicable",
"name": "not_applicable"
},
"Activity": {
"number": "504419",
"type": "2",
"periodName": "", "": "Period name - e.g. LHC22c, LHC22c1b_test",
"passName": "", "": "Pass type - e.g. spass, cpass1",
"provenance": "qc", "": "Provenance - qc or qc_mc depending whether it is normal data or monte carlo data"
},
"monitoring": {
"url": "infologger:///debug?qc"
},
"consul": {
"url": "http://consul-test.cern.ch:8500"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this default consul instance. It is not used anymore. Just leave it blank.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, done. The actual working json file is in my home directory on the epn. Should the current json files reside in the git repo?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the json file in git is usually the one you use to test locally your code.

},
"conditionDB": {
"url": "ccdb-test.cern.ch:8080"
}
},
"tasks": {
"RawDataTask": {
"active": "true",
"className": "o2::quality_control_modules::trd::RawData",
"moduleName": "QcTRD",
"detectorName": "TRD",
"cycleDurationSeconds": "1",
"maxNumberCycles": "-1",
"dataSource_comment": "no comment",
"dataSource": {
"type": "direct",
"query": "digits:TRD/DIGITS;tracklets:TRD/TRACKLETS;triggers:TRD/TRKTRGRD;rawstats:TRD/RAWSTATS"
},
"taskParameters": {
"myOwnKey": "emptyfornow"
},
"location": "remote",
"saveObjectsToFile":"qcrootobjects.root"
}
},
"checks": {
"QcCheck": {
"active": "false",
"className": "o2::quality_control_modules::trd::RawDataCheck",
"moduleName": "QcTRD",
"policy": "OnAny",
"detectorName": "TRD",
"dataSource": [{
"type": "Task",
"name": "RawDataTask",
"MOs": ["trackletsperevent"]
}]
}
}
},
"dataSamplingPolicies": [
]
}

42 changes: 41 additions & 1 deletion Modules/TRD/include/TRD/DigitsTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "QualityControl/TaskInterface.h"

class TH1F;
class TH2F;

using namespace o2::quality_control::core;

Expand All @@ -45,9 +46,48 @@ class DigitsTask final : public TaskInterface
void endOfCycle() override;
void endOfActivity(Activity& activity) override;
void reset() override;
void buildHistograms();
void drawLinesMCM(TH2F* histo);

private:
TH1F* mADC = nullptr;
//limits
std::pair<float, float> mDriftRegion;
std::pair<float, float> mPulseHeightPeakRegion;

std::shared_ptr<TH1F> mDigitsPerEvent = nullptr;
std::shared_ptr<TH1F> mTotalChargevsTimeBin = nullptr; //
std::shared_ptr<TH1F> mDigitHCID = nullptr;
std::shared_ptr<TH1F> mParsingErrors = nullptr;

std::array<std::shared_ptr<TH1F>, 540> mClusterAmplitudeChamber;
std::array<std::shared_ptr<TH2F>, 6> mNClsLayer; ///[layer]->Fill(sm - 0.5 + col / 144., startRow[istack]+row);
std::shared_ptr<TH1D> mADCvalue; //->Fill(value);
std::array<std::shared_ptr<TH1F>, 18> mADC; //[sm]->Fill(value);
std::array<std::shared_ptr<TH2F>, 18> mADCTB; //[sm]->Fill(time, value);
std::array<std::shared_ptr<TH2F>, 18> mADCTBfull; //[sm]->Fill(time, value);
std::shared_ptr<TH1F> mNCls; //->Fill(sm);
std::array<std::shared_ptr<TH2F>, 18> mHCMCM; //[sm]->Fill(sum);
std::array<std::shared_ptr<TH1F>, 18> mClsSM; //[sm]->Fill(sum);
std::array<std::shared_ptr<TH2F>, 18> mcLStBsm; //[SM]->fILL(TIme, sum);
std::shared_ptr<TH2F> mClsTb; //->Fill(time, sum);
std::shared_ptr<TH2F> mClsChargeFirst; //->Fill(sum, (1.*sum/sumU) -1.);
std::shared_ptr<TH1F> mClsChargeTb; //->Fill(time, sum);
std::shared_ptr<TH1F> mClsChargeTbCycle; //->Fill(time, sum);
std::shared_ptr<TH1F> mClsNTb; //->Fill(time);
std::shared_ptr<TH1F> mClsAmp; //->Fill(sum);
std::shared_ptr<TH1F> mClsAmpDrift; //->Fill(sum);
std::shared_ptr<TH1F> mClsAmpTb; //, "ClsAmpTb", "ClsAmpTb", 30, -0.5, 29.5);
std::shared_ptr<TH1F> mClsAmpCh; //
std::array<std::shared_ptr<TH2F>, 18> mClsDetAmp; //[sm]->Fill(detLoc, sum);
std::array<std::shared_ptr<TH1F>, 540> mClsAmpChamber; //[iChamber]->Fill(sum);
std::shared_ptr<TH2F> mClsSector; //, "ClsSector", "ClsSector", nSMs, -0.5, 17.5, 500, -0.5, 999.5);
std::shared_ptr<TH2F> mClsStack; //, "ClsStack", "ClsStack", 5, -0.5, 4.5, 500, -0.5, 999.5);
std::array<std::shared_ptr<TH2F>, 18> mClsDetTime; //[sm]->Fill(detLoc, time, sum);
std::array<std::shared_ptr<TH1F>, 10> mClsChargeTbTigg; //[trgg]->Fill(time, sum);
std::shared_ptr<TH2F> mClsChargeTbTrigHM; //->Fill(time, sum);
std::shared_ptr<TH2F> mClsChargeTbTrigMinBias; //->Fill(time, sum);
std::shared_ptr<TH2F> mClsChargeTbTrigTRDL1; //->Fill(time, sum);
std::array<std::shared_ptr<TH2F>, 18> mClsTbSM;
};

} // namespace o2::quality_control_modules::trd
Expand Down
6 changes: 6 additions & 0 deletions Modules/TRD/include/TRD/LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@
#pragma link C++ class o2::quality_control_modules::trd::DigitsTask+;
#pragma link C++ class o2::quality_control_modules::trd::DigitsCheck+;

#pragma link C++ class o2::quality_control_modules::trd::RawData + ;
#pragma link C++ class o2::quality_control_modules::trd::PulseHeight + ;
#pragma link C++ class o2::quality_control_modules::trd::Noise + ;
#pragma link C++ class o2::quality_control_modules::trd::PulseHeightCheck + ;
#pragma link C++ class o2::quality_control_modules::trd::TrackletsTask + ;
#pragma link C++ class o2::quality_control_modules::trd::TrackletsCheck + ;
#endif
54 changes: 54 additions & 0 deletions Modules/TRD/include/TRD/Noise.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// 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 Noise.h
/// \author My Name
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add your name ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file removed, but name fixed in the other files

///

#ifndef QC_MODULE_TRD_TRDNOISE_H
#define QC_MODULE_TRD_TRDNOISE_H

#include "QualityControl/TaskInterface.h"

class TH1F;

using namespace o2::quality_control::core;

namespace o2::quality_control_modules::trd
{

/// \brief Example Quality Control DPL Task
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and update the description ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just removed Noise.* and updated the descriptions in the other files.

/// \author My Name
class Noise final : public TaskInterface
{
public:
/// \brief Constructor
Noise() = default;
/// Destructor
~Noise() 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:
TH1F* mHistogram = nullptr;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems that the class Noise is just the default skeleton. What is its purpose ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ja it was supposed to be removed, it will be used to do the noise analysis, which is still outstanding, we have a basic one via another mechanism. Its to monitor the noise calibration.

};

} // namespace o2::quality_control_modules::trd

#endif // QC_MODULE_TRD_TRDNOISE_H
71 changes: 71 additions & 0 deletions Modules/TRD/include/TRD/PulseHeight.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// 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 PulseHeight.h
/// \author My Name
///

#ifndef QC_MODULE_TRD_TRDPULSEHEIGHT_H
#define QC_MODULE_TRD_TRDPULSEHEIGHT_H

#include "QualityControl/TaskInterface.h"
#include <array>

class TH1F;
class TH1D;
class TH2F;
class TH2D;

using namespace o2::quality_control::core;

namespace o2::quality_control_modules::trd
{

/// \brief Example Quality Control DPL Task
/// \author My Name
class PulseHeight final : public TaskInterface
{
public:
/// \brief Constructor
PulseHeight() = default;
/// Destructor
~PulseHeight() 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;
void buildHistograms();

private:
std::shared_ptr<TH1F> mPulseHeight = nullptr;
std::shared_ptr<TH1F> mPulseHeightScaled = nullptr;
std::shared_ptr<TH2F> mTotalPulseHeight2D = nullptr;
std::array<std::shared_ptr<TH1F>, 18> mPulseHeight2DperSM; //ph2DSM;
std::shared_ptr<TH1F> mPulseHeight2 = nullptr;
std::shared_ptr<TH1F> mPulseHeightScaled2 = nullptr;
std::shared_ptr<TH2F> mTotalPulseHeight2D2 = nullptr;
std::array<std::shared_ptr<TH1F>, 18> mPulseHeight2DperSM2; //ph2DSM;
std::pair<float, float> mDriftRegion;
std::pair<float, float> mPulseHeightPeakRegion;
std::shared_ptr<TH1F> mPulseHeightDuration;
std::shared_ptr<TH1F> mPulseHeightDuration1;
std::shared_ptr<TH1F> mPulseHeightDurationDiff;
};

} // namespace o2::quality_control_modules::trd

#endif // QC_MODULE_TRD_TRDPULSEHEIGHT_H
46 changes: 46 additions & 0 deletions Modules/TRD/include/TRD/PulseHeightCheck.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// 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 PulseHeightCheck.h
/// \author My Name
///

#ifndef QC_MODULE_TRD_TRDPULSEHEIGHTCHECK_H
#define QC_MODULE_TRD_TRDPULSEHEIGHTCHECK_H

#include "QualityControl/CheckInterface.h"

namespace o2::quality_control_modules::trd
{

/// \brief Example QC Check
/// \author My Name
class PulseHeightCheck : public o2::quality_control::checker::CheckInterface
{
public:
/// Default constructor
PulseHeightCheck() = default;
/// Destructor
~PulseHeightCheck() override = default;

// Override interface
void configure(std::string name) 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;

ClassDefOverride(PulseHeightCheck, 1);
};

} // namespace o2::quality_control_modules::trd

#endif // QC_MODULE_TRD_TRDPULSEHEIGHTCHECK_H
Loading