From dd61afb7aa242b5a203bf5eaea569a9aaa9ec7a5 Mon Sep 17 00:00:00 2001 From: JianLIUhep Date: Fri, 22 Oct 2021 00:48:31 +0200 Subject: [PATCH 01/10] ClusterTask: solved bugs, new histo, added checks; TrackTask: added checks --- Modules/ITS/include/ITS/ITSClusterTask.h | 51 +++- Modules/ITS/itsCluster.json | 3 +- Modules/ITS/src/ITSClusterCheck.cxx | 97 +++++-- Modules/ITS/src/ITSClusterTask.cxx | 324 +++++++++++++++++++---- Modules/ITS/src/ITSTrackCheck.cxx | 157 +++++++++-- Modules/ITS/src/ITSTrackTask.cxx | 50 ++-- 6 files changed, 543 insertions(+), 139 deletions(-) diff --git a/Modules/ITS/include/ITS/ITSClusterTask.h b/Modules/ITS/include/ITS/ITSClusterTask.h index 4eb8af91ee..8fad50b2d0 100644 --- a/Modules/ITS/include/ITS/ITSClusterTask.h +++ b/Modules/ITS/include/ITS/ITSClusterTask.h @@ -1,13 +1,13 @@ -// 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. +// Copyright CERN and copyright holders of ALICE O2. This software is +// // distributed under the terms of the GNU General Public License v3 (GPL +// // Version 3), copied verbatim in the file "COPYING". +// // +// // See http://alice-o2.web.cern.ch/license for full licensing information. +// // +// // 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. // -// 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 ITSClusterTask.h @@ -20,9 +20,11 @@ #include "QualityControl/TaskInterface.h" #include #include +#include + #include #include - +#include class TH1D; class TH2D; @@ -48,29 +50,50 @@ class ITSClusterTask : public TaskInterface private: void publishHistos(); + void getStavePoint(int layer, int stave, double* px, double* py); void formatAxes(TH1* h, const char* xTitle, const char* yTitle, float xOffset = 1., float yOffset = 1.); void addObject(TObject* aObject); void getJsonParameters(); void createAllHistos(); + void updateOccMonitorPlots(); static constexpr int NLayer = 7; static constexpr int NLayerIB = 3; std::vector mPublishedObjects; TH1D* hClusterSizeIB[7][48][9]; + TH1D* hClusterSizeIBmonitor[7][48][9]; + TH1D* hAverageClusterSummary[7]; + + + TH1D* hClusterTopologyIB[7][48][9]; TH2D* hOccupancyIB[7]; + TH2D* hOccupancyIBmonitor[7]; //will be used in online data monitoring, showing occupation for the last N ROFs TH2D* hAverageClusterIB[7]; - Int_t mClasterOccupancyIB[7][48][9]; + TH2D* hAverageClusterIBmonitor[7]; + + Int_t mClusterOccupancyIB[7][48][9]; + Int_t mClusterOccupancyIBmonitor[7][48][9]; TH1D* hClusterSizeOB[7][48][14]; + TH1D* hClusterSizeOBmonitor[7][48][14]; TH1D* hClusterTopologyOB[7][48][14]; TH2D* hOccupancyOB[7]; + TH2D* hOccupancyOBmonitor[7]; //will be used in online data monitoring, showing occupation for the last N ROFs TH2D* hAverageClusterOB[7]; - Int_t mClasterOccupancyOB[7][48][14]; + TH2D* hAverageClusterOBmonitor[7]; + + +// THnSparseD *sClustersSize[7]; + TH2Poly *mGeneralOccupancy; + Int_t mClusterOccupancyOB[7][48][14]; + Int_t mClusterOccupancyOBmonitor[7][48][14]; + const int mOccUpdateFrequency = 100000; int mNThreads = 1; int mNRofs = 0; + int mNRofsMonitor = 0; std::string mDictPath; std::string mRunNumberPath; std::string mGeomPath; @@ -79,6 +102,10 @@ class ITSClusterTask : public TaskInterface const int mNStaves[7] = { 12, 16, 20, 24, 30, 42, 48 }; const int mNHicPerStave[NLayer] = { 1, 1, 1, 8, 8, 14, 14 }; const int mNChipsPerHic[NLayer] = { 9, 9, 9, 14, 14, 14, 14 }; + const int StaveBoundary[NLayer + 1] = { 0, 12, 28, 48, 72, 102, 144, 192 }; + const float MidPointRad[7] = { 23.49, 31.586, 39.341, 197.598, 246.944, 345.348, 394.883 }; + const float StartAngle[7] = { 16.997 / 360 * (TMath::Pi() * 2.), 17.504 / 360 * (TMath::Pi() * 2.), 17.337 / 360 * (TMath::Pi() * 2.), 8.75 / 360 * (TMath::Pi() * 2.), 7 / 360 * (TMath::Pi() * 2.), 5.27 / 360 * (TMath::Pi() * 2.), 4.61 / 360 * (TMath::Pi() * 2.) }; //start angle of first stave in each layer + // int mEnableLayers[7]; o2::itsmft::TopologyDictionary mDict; o2::its::GeometryTGeo* mGeom; diff --git a/Modules/ITS/itsCluster.json b/Modules/ITS/itsCluster.json index aedf9e0c9e..507da6a491 100644 --- a/Modules/ITS/itsCluster.json +++ b/Modules/ITS/itsCluster.json @@ -56,7 +56,8 @@ "dataSource": [{ "type": "Task", "name": "ITSClusterTask", - "MOs": ["Layer0/AverageClusterSize"] + "MOs": ["Layer0/AverageClusterSize","Layer1/AverageClusterSize","Layer2/AverageClusterSize","Layer3/AverageClusterSize","Layer4/AverageClusterSize","Layer5/AverageClusterSize","Layer6/AverageClusterSize", "Layer0/ClusterOccupation","Layer1/ClusterOccupation","Layer2/ClusterOccupation","Layer3/ClusterOccupation","Layer4/ClusterOccupation", "Layer5/ClusterOccupation"] + }] } } diff --git a/Modules/ITS/src/ITSClusterCheck.cxx b/Modules/ITS/src/ITSClusterCheck.cxx index 7907f1abce..1c4fed0fae 100644 --- a/Modules/ITS/src/ITSClusterCheck.cxx +++ b/Modules/ITS/src/ITSClusterCheck.cxx @@ -1,9 +1,8 @@ -// 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. +// Copyright CERN and copyright holders of ALICE O2. This software is +// distributed under the terms of the GNU General Public License v3 (GPL +// Version 3), copied verbatim in the file "COPYING". // -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// See http://alice-o2.web.cern.ch/license for full licensing information. // // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization @@ -24,6 +23,8 @@ #include #include #include +#include + namespace o2::quality_control_modules::its { @@ -35,14 +36,45 @@ Quality ITSClusterCheck::check(std::map>::iterator iter; for (iter = moMap->begin(); iter != moMap->end(); ++iter) { - if (iter->second->getName() == "Layer0/AverageClusterSize") { + + + if (iter->second->getName().find("AverageClusterSize") != std::string::npos) { auto* h = dynamic_cast(iter->second->getObject()); - if (h->GetMaximum() > 30) { - result = Quality::Bad; + if (h->GetMaximum() > 20) { + result = Quality::Medium; } else { result = Quality::Good; } + } + + if (iter->second->getName().find("ClusterOccupation") != std::string::npos) { + auto* h = dynamic_cast(iter->second->getObject()); + + if ( iter->second->getName().find("Layer0") != std::string::npos && h->GetMaximum() > 40) result = Quality::Bad; + else result = Quality::Good; + + if ( iter->second->getName().find("Layer1") != std::string::npos && h->GetMaximum() > 30) result = Quality::Bad; + else result = Quality::Good; + + if ( iter->second->getName().find("Layer2") != std::string::npos && h->GetMaximum() > 20) result = Quality::Bad; + else result = Quality::Good; + + if ( iter->second->getName().find("Layer3") != std::string::npos && h->GetMaximum() > 30) result = Quality::Bad; + else result = Quality::Good; + + if ( iter->second->getName().find("Layer4") != std::string::npos && h->GetMaximum() > 25) result = Quality::Bad; + else result = Quality::Good; + + if ( iter->second->getName().find("Layer5") != std::string::npos && h->GetMaximum() > 10) result = Quality::Bad; + else result = Quality::Good; + + } + + + + + } return result; } @@ -51,19 +83,42 @@ std::string ITSClusterCheck::getAcceptedType() { return "TH2D"; } void ITSClusterCheck::beautify(std::shared_ptr mo, Quality checkResult) { - auto* h = dynamic_cast(mo->getObject()); - auto* tInfo = new TText(); - - if (checkResult == Quality::Good) { - tInfo->SetText(0.1, 0.8, "Quality::GOOD"); - tInfo->SetTextColor(kGreen); - } else if (checkResult == Quality::Bad) { - tInfo->SetText(0.1, 0.8, "Quality::BAD"); - tInfo->SetTextColor(kRed); - } - tInfo->SetTextSize(17); - tInfo->SetNDC(); - h->GetListOfFunctions()->Add(tInfo); + + if (mo->getName().find("AverageClusterSize") != std::string::npos) { + auto* h = dynamic_cast(mo->getObject()); + auto* tInfo = new TText(); + + if (checkResult == Quality::Medium) { + tInfo->SetText(0.1, 0.8, "Info: large clusters - do not call expert"); + tInfo->SetTextColor(kOrange); + }else if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } + + + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } + if (mo->getName().find("ClusterOccupation") != std::string::npos) { + auto* h = dynamic_cast(mo->getObject()); + auto* tInfo = new TText(); + + if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: large cluster occupancy, call expert"); + tInfo->SetTextColor(kRed); + }else if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } + + + } } // namespace o2::quality_control_modules::its diff --git a/Modules/ITS/src/ITSClusterTask.cxx b/Modules/ITS/src/ITSClusterTask.cxx index 2c2d697c9c..e583ce8b8f 100644 --- a/Modules/ITS/src/ITSClusterTask.cxx +++ b/Modules/ITS/src/ITSClusterTask.cxx @@ -1,13 +1,13 @@ -// 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. +// Copyright CERN and copyright holders of ALICE O2. This software is +// // distributed under the terms of the GNU General Public License v3 (GPL +// // Version 3), copied verbatim in the file "COPYING". +// // +// // See http://alice-o2.web.cern.ch/license for full licensing information. +// // +// // 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. // -// 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 ITSClusterTask.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #ifdef WITH_OPENMP #include @@ -43,32 +44,43 @@ ITSClusterTask::ITSClusterTask() : TaskInterface() {} ITSClusterTask::~ITSClusterTask() { + + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) continue; + //delete sClustersSize[iLayer]; + delete hAverageClusterSummary[iLayer]; + if (iLayer < 3) { delete hOccupancyIB[iLayer]; + delete hOccupancyIBmonitor[iLayer]; delete hAverageClusterIB[iLayer]; + delete hAverageClusterIBmonitor[iLayer]; for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { delete hClusterSizeIB[iLayer][iStave][iChip]; + delete hClusterSizeIBmonitor[iLayer][iStave][iChip]; delete hClusterTopologyIB[iLayer][iStave][iChip]; } } } else { delete hOccupancyOB[iLayer]; + delete hOccupancyOBmonitor[iLayer]; delete hAverageClusterOB[iLayer]; + delete hAverageClusterOBmonitor[iLayer]; for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { delete hClusterSizeOB[iLayer][iStave][iHic]; + delete hClusterSizeOBmonitor[iLayer][iStave][iHic]; delete hClusterTopologyOB[iLayer][iStave][iHic]; } } @@ -79,7 +91,7 @@ ITSClusterTask::~ITSClusterTask() void ITSClusterTask::initialize(o2::framework::InitContext& /*ctx*/) { - ILOG(Info, Support) << "initialize ITSClusterTask" << ENDM; + QcInfoLogger::GetInstance() << "initialize ITSClusterTask" << AliceO2::InfoLogger::InfoLogger::endm; getJsonParameters(); @@ -88,26 +100,46 @@ void ITSClusterTask::initialize(o2::framework::InitContext& /*ctx*/) createAllHistos(); + mGeneralOccupancy = new TH2Poly(); + mGeneralOccupancy->SetTitle("General Occupancy;mm;mm"); + mGeneralOccupancy->SetName("General/General_Occupancy"); + + + for (int iLayer = 0; iLayer < 7; iLayer++) { + for (int iStave = 0; iStave < mNStaves[iLayer]; iStave++) { + double* px = new double[4]; + double* py = new double[4]; + getStavePoint(iLayer, iStave, px, py); + mGeneralOccupancy->AddBin(4, px, py); + } + } + + addObject(mGeneralOccupancy); + + publishHistos(); - //std::string dictfile = o2::base::NameConf::getAlpideClusterDictionaryFileName(o2::detectors::DetID::ITS, "", ".bin"); + //std::string dictfile = o2::base::NameConf::getDictionaryFileName(o2::detectors::DetID::ITS, "", ".bin"); std::ifstream file(mDictPath.c_str()); if (file.good()) { - LOG(info) << "Running with dictionary: " << mDictPath; mDict.readBinaryFile(mDictPath); + LOG(INFO) << "Running with dictionary: " << mDictPath<< " with size: "<>("compclus"); auto clusRofArr = ctx.inputs().get>("clustersrof"); int dictSize = mDict.getSize(); + #ifdef WITH_OPENMP omp_set_num_threads(mNThreads); #pragma omp parallel for schedule(dynamic) @@ -131,63 +164,133 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) for (unsigned int iROF = 0; iROF < clusRofArr.size(); iROF++) { const auto& ROF = clusRofArr[iROF]; - for (int icl = ROF.getFirstEntry(); icl < ROF.getFirstEntry() + ROF.getNEntries(); icl++) { auto& cluster = clusArr[icl]; + auto ChipID = cluster.getSensorID(); int ClusterID = cluster.getPatternID(); int lay, sta, ssta, mod, chip; + mGeom->getChipId(ChipID, lay, sta, ssta, mod, chip); mod = mod + (ssta * (mNHicPerStave[lay] / 2)); + if (lay < 3) { - mClasterOccupancyIB[lay][sta][chip]++; + + mClusterOccupancyIB[lay][sta][chip]++; + mClusterOccupancyIBmonitor[lay][sta][chip]++; if (ClusterID < dictSize) { + + //Double_t ClusterSizeFill[3] = {1.*sta, 1.*chip,1.* mDict.getNpixels(ClusterID)}; + //sClustersSize[lay]->Fill(ClusterSizeFill, 1.); + hClusterTopologyIB[lay][sta][chip]->Fill(ClusterID); hClusterSizeIB[lay][sta][chip]->Fill(mDict.getNpixels(ClusterID)); + hAverageClusterSummary[lay]->Fill(mDict.getNpixels(ClusterID)); + hClusterSizeIBmonitor[lay][sta][chip]->Fill(mDict.getNpixels(ClusterID)); } - } else { - mClasterOccupancyOB[lay][sta][mod]++; + } + else { + + mClusterOccupancyOB[lay][sta][mod]++; + mClusterOccupancyOBmonitor[lay][sta][mod]++; if (ClusterID < dictSize) { + //Double_t ClusterSizeFill[3] = {1.*sta, 1.*mod, 1.*mDict.getNpixels(ClusterID)}; + //sClustersSize[lay]->Fill(ClusterSizeFill, 1.); + hClusterSizeOB[lay][sta][mod]->Fill(mDict.getNpixels(ClusterID)); hClusterTopologyOB[lay][sta][mod]->Fill(ClusterID); + hClusterSizeOBmonitor[lay][sta][mod]->Fill(mDict.getNpixels(ClusterID)); + hAverageClusterSummary[lay]->Fill(mDict.getNpixels(ClusterID)); } } + } } - mNRofs += clusRofArr.size(); - if (mNRofs >= mOccUpdateFrequency) { - for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { + mNRofs += clusRofArr.size(); //USED to calculate occupancy for the whole run + mNRofsMonitor+= clusRofArr.size(); // Occupancy in the last N ROFs + + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { - if (!mEnableLayers[iLayer]) - continue; - if (iLayer < 3) { - for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { - for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { + if (!mEnableLayers[iLayer]) continue; - hOccupancyIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClasterOccupancyIB[iLayer][iStave][iChip] / mNRofs); - mClasterOccupancyIB[iLayer][iStave][iChip] = 0; - hAverageClusterIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeIB[iLayer][iStave][iChip]->GetMean()); - } - } - } else { - for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { - for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { - hOccupancyOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClasterOccupancyOB[iLayer][iStave][iHic] / mNRofs); - mClasterOccupancyOB[iLayer][iStave][iHic] = 0; - hAverageClusterOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOB[iLayer][iStave][iHic]->GetMean()); + for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { + + if (iLayer < 3) { + for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { + hOccupancyIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIB[iLayer][iStave][iChip] / mNRofs); + hAverageClusterIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeIB[iLayer][iStave][iChip]->GetMean()); + } + mGeneralOccupancy->SetBinContent(iStave + 1 + StaveBoundary[iLayer], *(std::max_element(mClusterOccupancyIB[iLayer][iStave],mClusterOccupancyIB[iLayer][iStave] + mNChipsPerHic[iLayer]))/ mNRofs); + }else{ + + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { + hOccupancyOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOB[iLayer][iStave][iHic] / mNRofs / 14); //14 To have occupation per chip and HIC has 14 chips + hAverageClusterOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOB[iLayer][iStave][iHic]->GetMean()); + } + + mGeneralOccupancy->SetBinContent(iStave + 1 + StaveBoundary[iLayer], *(std::max_element(mClusterOccupancyOB[iLayer][iStave],mClusterOccupancyOBmonitor[iLayer][iStave] + mNHicPerStave[iLayer]))/ mNRofs / 14); + } - } - } - } - mNRofs = 0; + } + } + + + if (mNRofsMonitor >= mOccUpdateFrequency){ + updateOccMonitorPlots(); + mNRofsMonitor=0; + memset(mClusterOccupancyIBmonitor, 0, sizeof(mClusterOccupancyIBmonitor)); + memset(mClusterOccupancyOBmonitor, 0, sizeof(mClusterOccupancyOBmonitor)); + + + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { + if (!mEnableLayers[iLayer]) continue; + for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++){ + + if (iLayer < 3) for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) hClusterSizeIBmonitor[iLayer][iStave][iChip]->Reset(); + + else for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) hClusterSizeOBmonitor[iLayer][iStave][iHic]->Reset(); + + } + } + + + } + + + end = std::chrono::high_resolution_clock::now(); difference = std::chrono::duration_cast(end - start).count(); ILOG(Info) << "Time in QC Cluster Task: " << difference << ENDM; } +void ITSClusterTask:: updateOccMonitorPlots(){ + + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { + + if (!mEnableLayers[iLayer]) continue; + + for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) + if (iLayer < 3) { + + for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++){ + hOccupancyIBmonitor[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIBmonitor[iLayer][iStave][iChip] / mNRofsMonitor); + hAverageClusterIBmonitor[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeIBmonitor[iLayer][iStave][iChip]->GetMean()); + } + } else{ + + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++){ + hOccupancyOBmonitor[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOBmonitor[iLayer][iStave][iHic] / mNRofsMonitor/14); //14 To have occupation per chip and HIC has 14 chips + hAverageClusterOBmonitor[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOBmonitor[iLayer][iStave][iHic]->GetMean()); + } + } + + } + +} + void ITSClusterTask::endOfCycle() { @@ -200,24 +303,31 @@ void ITSClusterTask::endOfCycle() getObjectsManager()->addMetadata(mPublishedObjects.at(iObj)->GetName(), "Run", runNumber); mRunNumber = runNumber; } - ILOG(Info, Support) << "endOfCycle" << ENDM; + QcInfoLogger::GetInstance() << "endOfCycle" << AliceO2::InfoLogger::InfoLogger::endm; } } void ITSClusterTask::endOfActivity(Activity& /*activity*/) { - ILOG(Info, Support) << "endOfActivity" << ENDM; + QcInfoLogger::GetInstance() << "endOfActivity" << AliceO2::InfoLogger::InfoLogger::endm; } void ITSClusterTask::reset() { - ILOG(Info, Support) << "Resetting the histogram" << ENDM; + QcInfoLogger::GetInstance() << "Resetting the histogram" << AliceO2::InfoLogger::InfoLogger::endm; + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) continue; + // sClustersSize[iLayer]->Reset(); + hAverageClusterSummary[iLayer]->Reset(); + if (iLayer < 3) { hOccupancyIB[iLayer]->Reset(); + hOccupancyIBmonitor[iLayer]->Reset(); hAverageClusterIB[iLayer]->Reset(); + hAverageClusterIBmonitor[iLayer]->Reset(); + //hAverageClusterIBsummary[iLayer]->Reset(); for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { hClusterSizeIB[iLayer][iStave][iChip]->Reset(); @@ -227,6 +337,9 @@ void ITSClusterTask::reset() } else { hOccupancyOB[iLayer]->Reset(); hAverageClusterOB[iLayer]->Reset(); + hOccupancyOBmonitor[iLayer]->Reset(); + hAverageClusterOBmonitor[iLayer]->Reset(); + //hAverageClusterOBsummary[iLayer]->Reset(); for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { hClusterSizeOB[iLayer][iStave][iHic]->Reset(); @@ -240,15 +353,46 @@ void ITSClusterTask::reset() void ITSClusterTask::createAllHistos() { + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) continue; + + + hAverageClusterSummary[iLayer] = new TH1D(Form("Layer%d/AverageClusterSizeSummary", iLayer), Form("Layer%dAverageClusterSizeSummary", iLayer), 50, 0, 50); + hAverageClusterSummary[iLayer]->SetTitle(Form("Summary of average Cluster on one Layer %d", iLayer)); + addObject(hAverageClusterSummary[iLayer]); + formatAxes(hAverageClusterSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10); + hAverageClusterSummary[iLayer]->SetStats(0); + + + + if (iLayer < 3) { +/* + Int_t bins[3]= {mNStaves[iLayer],mNChipsPerHic[iLayer],50}; + Double_t xmin[3] = {0., 0., 0.}; + Double_t xmax[3] = {1.*mNStaves[iLayer],1.* mNChipsPerHic[iLayer],50.}; + sClustersSize[iLayer] = new THnSparseD( Form("Layer%d/THnSparseClusterSize", iLayer), Form("Layer%d/THnSparseClusterSize", iLayer),3, bins, xmin, xmax); + addObject(sClustersSize[iLayer]); +*/ + hOccupancyIB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupation", iLayer), Form("Layer%dClusterOccupancy", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); hOccupancyIB[iLayer]->SetTitle(Form("Cluster Occupancy on Layer %d", iLayer)); addObject(hOccupancyIB[iLayer]); formatAxes(hOccupancyIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); hOccupancyIB[iLayer]->SetStats(0); + + + hOccupancyIBmonitor[iLayer] = new TH2D(Form("Layer%d/ClusterOccupationForLastNROFS", iLayer), Form("Layer%dClusterOccupancyForLastNROFS", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hOccupancyIBmonitor[iLayer]->SetTitle(Form("Cluster Occupancy for the last NROFs on Layer %d", iLayer)); + addObject(hOccupancyIBmonitor[iLayer]); + formatAxes(hOccupancyIBmonitor[iLayer], "Chip Number", "Stave Number", 1, 1.10); + hOccupancyIBmonitor[iLayer]->SetStats(0); + + + + hAverageClusterIB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSize", iLayer), Form("Layer%dAverageClusterSize", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); hAverageClusterIB[iLayer]->SetTitle(Form("Average Cluster Size on Layer %d", iLayer)); @@ -256,12 +400,24 @@ void ITSClusterTask::createAllHistos() formatAxes(hAverageClusterIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); hAverageClusterIB[iLayer]->SetStats(0); + hAverageClusterIBmonitor[iLayer] = new TH2D(Form("Layer%d/AverageClusterSizeForLastNROFS", iLayer), Form("Layer%dAverageClusterSizeForLastNROFS", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterIBmonitor[iLayer]->SetTitle(Form("Average Cluster Size for the last NROFs on Layer %d", iLayer)); + addObject(hAverageClusterIBmonitor[iLayer]); + formatAxes(hAverageClusterIBmonitor[iLayer], "Chip Number", "Stave Number", 1, 1.10); + hAverageClusterIBmonitor[iLayer]->SetStats(0); + + for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { hClusterSizeIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSize", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSize", iLayer, iStave, iChip), 50, 0, 50); hClusterSizeIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Size on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); addObject(hClusterSizeIB[iLayer][iStave][iChip]); formatAxes(hClusterSizeIB[iLayer][iStave][iChip], "Cluster size (Pixel)", "Counts", 1, 1.10); + + hClusterSizeIBmonitor[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSizeMonitor", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSizeMonitor", iLayer, iStave, iChip), 50, 0, 50); + + + hClusterTopologyIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterTopology", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterTopology", iLayer, iStave, iChip), 300, 0, 300); hClusterTopologyIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Toplogy on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); @@ -270,26 +426,53 @@ void ITSClusterTask::createAllHistos() } } } else { + /* + Int_t bins[3]= {mNStaves[iLayer], mNHicPerStave[iLayer],50}; + Double_t xmin[3] = {0., 0., 0.}; + Double_t xmax[3] = {1.*mNStaves[iLayer], 1.*mNHicPerStave[iLayer],50.}; + sClustersSize[iLayer] = new THnSparseD( Form("Layer%d/THnSparseClusterSize", iLayer), Form("Layer%d/THnSparseClusterSize", iLayer),3, bins, xmin, xmax); + addObject(sClustersSize[iLayer]); +*/ + + + hOccupancyOB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupation", iLayer), Form("Layer%dClusterOccupancy", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); - hOccupancyOB[iLayer]->SetTitle(Form("Cluster Occupancy on Layer %d", iLayer)); + hOccupancyOB[iLayer]->SetTitle(Form("ClusterOccupancyInLastNROFS %d", iLayer)); addObject(hOccupancyOB[iLayer]); formatAxes(hOccupancyOB[iLayer], "HIC Number", "Stave Number", 1, 1.10); hOccupancyOB[iLayer]->SetStats(0); + hOccupancyOBmonitor[iLayer] = new TH2D(Form("Layer%d/ClusterOccupationForLastNROFS", iLayer), Form("Layer%dClusterOccupancyForLastNROFS", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hOccupancyOBmonitor[iLayer]->SetTitle(Form("Cluster Occupancy in last NROFS on Layer %d", iLayer)); + addObject(hOccupancyOBmonitor[iLayer]); + formatAxes(hOccupancyOBmonitor[iLayer], "HIC Number", "Stave Number", 1, 1.10); + hOccupancyOBmonitor[iLayer]->SetStats(0); + + + hAverageClusterOB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSize", iLayer), Form("Layer%dAverageClusterSize", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); hAverageClusterOB[iLayer]->SetTitle(Form("Average Cluster Size on Layer %d", iLayer)); addObject(hAverageClusterOB[iLayer]); formatAxes(hAverageClusterOB[iLayer], "Chip Number", "Stave Number", 1, 1.10); hAverageClusterOB[iLayer]->SetStats(0); - for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { + hAverageClusterOBmonitor[iLayer] = new TH2D(Form("Layer%d/AverageClusterSizeForLastNROFS", iLayer), Form("Layer%dAverageClusterSizeForLastNROFS", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterOBmonitor[iLayer]->SetTitle(Form("Average Cluster Size for the last NROFs on Layer %d", iLayer)); + addObject(hAverageClusterOBmonitor[iLayer]); + formatAxes(hAverageClusterOBmonitor[iLayer], "Chip Number", "Stave Number", 1, 1.10); + hAverageClusterOBmonitor[iLayer]->SetStats(0); + + for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { hClusterSizeOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSize", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSize", iLayer, iStave, iHic), 50, 0, 50); hClusterSizeOB[iLayer][iStave][iHic]->SetTitle(Form("Cluster Size on Layer %d Stave %d HIC %d", iLayer, iStave, iHic)); addObject(hClusterSizeOB[iLayer][iStave][iHic]); formatAxes(hClusterSizeOB[iLayer][iStave][iHic], "Cluster size (Pixel)", "Counts", 1, 1.10); - hClusterTopologyOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterTopology", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterTopology", iLayer, iStave, iHic), 300, 0, 300); + hClusterSizeOBmonitor[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSizeMonitor", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSizeMonitor", iLayer, iStave, iHic), 50, 0, 50); + + + hClusterTopologyOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterTopology", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterTopology", iLayer, iStave, iHic), 300, 0, 300); hClusterTopologyOB[iLayer][iStave][iHic]->SetTitle(Form("Cluster Toplogy on Layer %d Stave %d HIC %d", iLayer, iStave, iHic)); addObject(hClusterTopologyOB[iLayer][iStave][iHic]); formatAxes(hClusterTopologyOB[iLayer][iStave][iHic], "Cluster toplogy (ID)", "Counts", 1, 1.10); @@ -299,18 +482,53 @@ void ITSClusterTask::createAllHistos() } } +void ITSClusterTask::getStavePoint(int layer, int stave, double* px, double* py) +{ + + + + float stepAngle = TMath::Pi() * 2 / mNStaves[layer]; //the angle between to stave + float midAngle = StartAngle[layer] + (stave * stepAngle); //mid point angle + float staveRotateAngle = TMath::Pi() / 2 - (stave * stepAngle); //how many angle this stave rotate(compare with first stave) + px[1] = MidPointRad[layer] * TMath::Cos(midAngle); //there are 4 point to decide this TH2Poly bin + //0:left point in this stave; + //1:mid point in this stave; + //2:right point in this stave; + //3:higher point int this stave; + py[1] = MidPointRad[layer] * TMath::Sin(midAngle); //4 point calculated accord the blueprint + //roughly calculate + if (layer < NLayerIB) { + px[0] = 7.7 * TMath::Cos(staveRotateAngle) + px[1]; + py[0] = -7.7 * TMath::Sin(staveRotateAngle) + py[1]; + px[2] = -7.7 * TMath::Cos(staveRotateAngle) + px[1]; + py[2] = 7.7 * TMath::Sin(staveRotateAngle) + py[1]; + px[3] = 5.623 * TMath::Sin(staveRotateAngle) + px[1]; + py[3] = 5.623 * TMath::Cos(staveRotateAngle) + py[1]; + } else { + px[0] = 21 * TMath::Cos(staveRotateAngle) + px[1]; + py[0] = -21 * TMath::Sin(staveRotateAngle) + py[1]; + px[2] = -21 * TMath::Cos(staveRotateAngle) + px[1]; + py[2] = 21 * TMath::Sin(staveRotateAngle) + py[1]; + px[3] = 40 * TMath::Sin(staveRotateAngle) + px[1]; + py[3] = 40 * TMath::Cos(staveRotateAngle) + py[1]; + } +} + + + + void ITSClusterTask::getJsonParameters() { mDictPath = mCustomParameters["clusterDictionaryPath"]; mRunNumberPath = mCustomParameters["runNumberPath"]; mGeomPath = mCustomParameters["geomPath"]; mNThreads = stoi(mCustomParameters.find("nThreads")->second); - LOG(info) << "#################### mNThreads : " << mNThreads; + LOG(INFO) << "#################### mNThreads : " << mNThreads; for (int ilayer = 0; ilayer < NLayer; ilayer++) { if (mCustomParameters["layer"][ilayer] != '0') { mEnableLayers[ilayer] = 1; - LOG(info) << "enable layer : " << ilayer; + LOG(INFO) << "enable layer : " << ilayer; } else { mEnableLayers[ilayer] = 0; } @@ -320,7 +538,7 @@ void ITSClusterTask::getJsonParameters() void ITSClusterTask::addObject(TObject* aObject) { if (!aObject) { - LOG(info) << " ERROR: trying to add non-existent object "; + LOG(INFO) << " ERROR: trying to add non-existent object "; return; } else mPublishedObjects.push_back(aObject); @@ -338,7 +556,7 @@ void ITSClusterTask::publishHistos() { for (unsigned int iObj = 0; iObj < mPublishedObjects.size(); iObj++) { getObjectsManager()->startPublishing(mPublishedObjects.at(iObj)); - LOG(info) << " Object will be published: " << mPublishedObjects.at(iObj)->GetName(); + //LOG(INFO) << " Object will be published: " << mPublishedObjects.at(iObj)->GetName(); } } diff --git a/Modules/ITS/src/ITSTrackCheck.cxx b/Modules/ITS/src/ITSTrackCheck.cxx index 6e68b1d8fe..c0412af9e4 100644 --- a/Modules/ITS/src/ITSTrackCheck.cxx +++ b/Modules/ITS/src/ITSTrackCheck.cxx @@ -1,9 +1,8 @@ -// 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. +// Copyright CERN and copyright holders of ALICE O2. This software is +// distributed under the terms of the GNU General Public License v3 (GPL +// Version 3), copied verbatim in the file "COPYING". // -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// See http://alice-o2.web.cern.ch/license for full licensing information. // // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization @@ -21,7 +20,11 @@ #include #include +#include #include +#include "TMath.h" + +#include namespace o2::quality_control_modules::its { @@ -33,14 +36,52 @@ Quality ITSTrackCheck::check(std::map>::iterator iter; for (iter = moMap->begin(); iter != moMap->end(); ++iter) { + if (iter->second->getName() == "NClusters") { auto* h = dynamic_cast(iter->second->getObject()); - if (h->GetMean() > 8) { - result = Quality::Bad; - } else { - result = Quality::Good; - } + if (h->GetMean() <= 10) result = Quality::Good; + else if (h->GetMean() > 10 && h->GetMean() < 15) result = Quality::Medium; + else if (h->GetMean() >= 15) result = Quality::Bad; + + } + + + if (iter->second->getName() == "PhiDistribution") { + auto* h = dynamic_cast(iter->second->getObject()); + Double_t ratio = abs ( h->Integral(h->FindBin(0),h->FindBin(TMath::Pi())) / h->Integral(h->FindBin(TMath::Pi()),h->FindBin(TMath::TwoPi())) -1 ); + + + if (ratio > 0.3) result = Quality::Bad; + else result = Quality::Good; + } + + if (iter->second->getName() == "AngularDistribution") { + auto* hAngluar = dynamic_cast(iter->second->getObject()); + TH1D* projectPhi = hAngluar->ProjectionY("hAngluar", hAngluar->FindBin(-1.5), hAngluar->FindBin(1.5)); + Double_t ratio = abs ( projectPhi->Integral(projectPhi->FindBin(0),projectPhi->FindBin(TMath::Pi())) / projectPhi->Integral(projectPhi->FindBin(TMath::Pi()),projectPhi->FindBin(TMath::TwoPi())) -1); + + if (ratio > 0.3) result = Quality::Bad; + else result = Quality::Good; + } + + if (iter->second->getName() == "ClusterUsage") { + auto* h = dynamic_cast(iter->second->getObject()); + if (h->GetMaximum() < 0.1) result = Quality::Bad; + else result = Quality::Good; + + } + + if (iter->second->getName() == "EtaDistribution") { + auto* h = dynamic_cast(iter->second->getObject()); + if ( abs( h->GetBinCenter( h->FindBin(h->GetMaximum()))) > 0.5) result = Quality::Bad; + else result = Quality::Good; + } + + + + + } return result; } @@ -49,19 +90,89 @@ std::string ITSTrackCheck::getAcceptedType() { return "TH1D"; } void ITSTrackCheck::beautify(std::shared_ptr mo, Quality checkResult) { - auto* h = dynamic_cast(mo->getObject()); - auto* tInfo = new TText(); - - if (checkResult == Quality::Good) { - tInfo->SetText(0.1, 0.8, "Quality::GOOD"); - tInfo->SetTextColor(kGreen); - } else if (checkResult == Quality::Bad) { - tInfo->SetText(0.1, 0.8, "Quality::BAD"); - tInfo->SetTextColor(kRed); - } - tInfo->SetTextSize(17); - tInfo->SetNDC(); - h->GetListOfFunctions()->Add(tInfo); + auto* tInfo = new TText(); + + + if (mo->getName() == "NClusters") { + auto* h = dynamic_cast(mo->getObject()); + if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Medium) { + tInfo->SetText(0.1, 0.8, "Info: a track(s) has between 10 and 15 clusters, inform expert on MM"); + tInfo->SetTextColor(kOrange); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: a track(s) has more than 15 clusters, call expert"); + tInfo->SetTextColor(kRed); + } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + + + } + + if (mo->getName() == "PhiDistribution") { + auto* h = dynamic_cast(mo->getObject()); + if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: distribution asymmetric in phi, call expert"); + tInfo->SetTextColor(kRed); + } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } + + if (mo->getName() == "AngularDistribution") { + auto* h = dynamic_cast(mo->getObject()); + if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: distribution asymmetric in phi, call expert"); + tInfo->SetTextColor(kRed); + } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + + + } + + + + if (mo->getName() == "ClusterUsage") { + auto* h = dynamic_cast(mo->getObject()); + if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: fraction of clusters below 0.1, call expert"); + tInfo->SetTextColor(kRed); + } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + + } + if (mo->getName() == "EtaDistribution") { + auto* h = dynamic_cast(mo->getObject()); + if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: distribution asymmetric in eta, call expert"); + tInfo->SetTextColor(kRed); + } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + + } + } } // namespace o2::quality_control_modules::its diff --git a/Modules/ITS/src/ITSTrackTask.cxx b/Modules/ITS/src/ITSTrackTask.cxx index dcee3c64a8..a53035913a 100644 --- a/Modules/ITS/src/ITSTrackTask.cxx +++ b/Modules/ITS/src/ITSTrackTask.cxx @@ -1,13 +1,13 @@ -// 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. +// Copyright CERN and copyright holders of ALICE O2. This software is +// // distributed under the terms of the GNU General Public License v3 (GPL +// // Version 3), copied verbatim in the file "COPYING". +// // +// // See http://alice-o2.web.cern.ch/license for full licensing information. +// // +// // 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. // -// 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 ITSTrackTask.cxx @@ -46,36 +46,27 @@ ITSTrackTask::~ITSTrackTask() void ITSTrackTask::initialize(o2::framework::InitContext& /*ctx*/) { - ILOG(Info, Support) << "initialize ITSTrackTask" << AliceO2::InfoLogger::InfoLogger::endm; + QcInfoLogger::GetInstance() << "initialize ITSTrackTask" << AliceO2::InfoLogger::InfoLogger::endm; mRunNumberPath = mCustomParameters["runNumberPath"]; publishHistos(); - std::string dictfile = o2::base::NameConf::getAlpideClusterDictionaryFileName(o2::detectors::DetID::ITS, "", ".bin"); - std::ifstream file(dictfile.c_str()); - - if (file.good()) { - LOG(info) << "Running with dictionary: " << dictfile.c_str(); - mDict.readBinaryFile(dictfile); - } else { - LOG(info) << "Running without dictionary !"; - } -} + } void ITSTrackTask::startOfActivity(Activity& /*activity*/) { - ILOG(Info, Support) << "startOfActivity" << AliceO2::InfoLogger::InfoLogger::endm; + QcInfoLogger::GetInstance() << "startOfActivity" << AliceO2::InfoLogger::InfoLogger::endm; } void ITSTrackTask::startOfCycle() { - ILOG(Info, Support) << "startOfCycle" << AliceO2::InfoLogger::InfoLogger::endm; + QcInfoLogger::GetInstance() << "startOfCycle" << AliceO2::InfoLogger::InfoLogger::endm; } void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx) { - ILOG(Info, Support) << "START DOING QC General" << AliceO2::InfoLogger::InfoLogger::endm; + QcInfoLogger::GetInstance() << "START DOING QC General" << AliceO2::InfoLogger::InfoLogger::endm; auto trackArr = ctx.inputs().get>("tracks"); auto rofArr = ctx.inputs().get>("rofs"); auto clusArr = ctx.inputs().get>("compclus"); @@ -93,7 +84,8 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx) hNClusters->Fill(track.getNumberOfClusters()); mNClustersInTracks += track.getNumberOfClusters(); - } + + } } mNTracks += trackArr.size(); @@ -124,18 +116,18 @@ void ITSTrackTask::endOfCycle() getObjectsManager()->addMetadata(mPublishedObjects.at(iObj)->GetName(), "Run", runNumber); mRunNumber = runNumber; } - ILOG(Info, Support) << "endOfCycle" << AliceO2::InfoLogger::InfoLogger::endm; + QcInfoLogger::GetInstance() << "endOfCycle" << AliceO2::InfoLogger::InfoLogger::endm; } } void ITSTrackTask::endOfActivity(Activity& /*activity*/) { - ILOG(Info, Support) << "endOfActivity" << AliceO2::InfoLogger::InfoLogger::endm; + QcInfoLogger::GetInstance() << "endOfActivity" << AliceO2::InfoLogger::InfoLogger::endm; } void ITSTrackTask::reset() { - ILOG(Info, Support) << "Resetting the histogram" << AliceO2::InfoLogger::InfoLogger::endm; + QcInfoLogger::GetInstance() << "Resetting the histogram" << AliceO2::InfoLogger::InfoLogger::endm; hAngularDistribution->Reset(); hNClusters->Reset(); hTrackPhi->Reset(); @@ -182,7 +174,7 @@ void ITSTrackTask::createAllHistos() void ITSTrackTask::addObject(TObject* aObject) { if (!aObject) { - LOG(info) << " ERROR: trying to add non-existent object "; + LOG(INFO) << " ERROR: trying to add non-existent object "; return; } else { mPublishedObjects.push_back(aObject); @@ -201,7 +193,7 @@ void ITSTrackTask::publishHistos() { for (unsigned int iObj = 0; iObj < mPublishedObjects.size(); iObj++) { getObjectsManager()->startPublishing(mPublishedObjects.at(iObj)); - LOG(info) << " Object will be published: " << mPublishedObjects.at(iObj)->GetName(); + LOG(INFO) << " Object will be published: " << mPublishedObjects.at(iObj)->GetName(); } } From 383dfbe6fb1dca4a1999c6005e94d3719b12818c Mon Sep 17 00:00:00 2001 From: JianLIUhep Date: Fri, 22 Oct 2021 16:18:39 +0200 Subject: [PATCH 02/10] Fixed cluster check of L5 and L6, fixed itsTrack.json and itsEPN.json --- Modules/ITS/itsCluster.json | 2 +- Modules/ITS/itsEPN.json | 8 ++------ Modules/ITS/itsTrack.json | 2 +- Modules/ITS/src/ITSClusterCheck.cxx | 5 ++++- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Modules/ITS/itsCluster.json b/Modules/ITS/itsCluster.json index 507da6a491..ddfb479d39 100644 --- a/Modules/ITS/itsCluster.json +++ b/Modules/ITS/itsCluster.json @@ -56,7 +56,7 @@ "dataSource": [{ "type": "Task", "name": "ITSClusterTask", - "MOs": ["Layer0/AverageClusterSize","Layer1/AverageClusterSize","Layer2/AverageClusterSize","Layer3/AverageClusterSize","Layer4/AverageClusterSize","Layer5/AverageClusterSize","Layer6/AverageClusterSize", "Layer0/ClusterOccupation","Layer1/ClusterOccupation","Layer2/ClusterOccupation","Layer3/ClusterOccupation","Layer4/ClusterOccupation", "Layer5/ClusterOccupation"] + "MOs": ["Layer0/AverageClusterSize","Layer1/AverageClusterSize","Layer2/AverageClusterSize","Layer3/AverageClusterSize","Layer4/AverageClusterSize","Layer5/AverageClusterSize","Layer6/AverageClusterSize", "Layer0/ClusterOccupation","Layer1/ClusterOccupation","Layer2/ClusterOccupation","Layer3/ClusterOccupation","Layer4/ClusterOccupation", "Layer5/ClusterOccupation", "Layer6/ClusterOccupation"] }] } diff --git a/Modules/ITS/itsEPN.json b/Modules/ITS/itsEPN.json index 9f71bf2e2c..6398e6afef 100644 --- a/Modules/ITS/itsEPN.json +++ b/Modules/ITS/itsEPN.json @@ -70,9 +70,7 @@ { "type": "Task", "name": "ITSClusterTask", - "MOs": [ - "Layer0/AverageClusterSize" - ] + "MOs": ["Layer0/AverageClusterSize","Layer1/AverageClusterSize","Layer2/AverageClusterSize","Layer3/AverageClusterSize","Layer4/AverageClusterSize","Layer5/AverageClusterSize","Layer6/AverageClusterSize", "Layer0/ClusterOccupation","Layer1/ClusterOccupation","Layer2/ClusterOccupation","Layer3/ClusterOccupation","Layer4/ClusterOccupation", "Layer5/ClusterOccupation", "Layer6/ClusterOccupation"] } ] }, @@ -86,9 +84,7 @@ { "type": "Task", "name": "ITSTrackTask", - "MOs": [ - "NClusters" - ] + "MOs" : ["NClusters","PhiDistribution","AngularDistribution","ClusterUsage","EtaDistribution"] } ] } diff --git a/Modules/ITS/itsTrack.json b/Modules/ITS/itsTrack.json index ea5c9d9979..1b3a0f84ce 100644 --- a/Modules/ITS/itsTrack.json +++ b/Modules/ITS/itsTrack.json @@ -52,7 +52,7 @@ "dataSource" : [ { "type" : "Task", "name" : "ITSTrackTask", - "MOs" : ["NClusters"] + "MOs" : ["NClusters","PhiDistribution","AngularDistribution","ClusterUsage","EtaDistribution"] } ] } } diff --git a/Modules/ITS/src/ITSClusterCheck.cxx b/Modules/ITS/src/ITSClusterCheck.cxx index 1c4fed0fae..173fe3a435 100644 --- a/Modules/ITS/src/ITSClusterCheck.cxx +++ b/Modules/ITS/src/ITSClusterCheck.cxx @@ -66,8 +66,11 @@ Quality ITSClusterCheck::check(std::mapsecond->getName().find("Layer4") != std::string::npos && h->GetMaximum() > 25) result = Quality::Bad; else result = Quality::Good; - if ( iter->second->getName().find("Layer5") != std::string::npos && h->GetMaximum() > 10) result = Quality::Bad; + if ( iter->second->getName().find("Layer5") != std::string::npos && h->GetMaximum() > 15) result = Quality::Bad; else result = Quality::Good; + + if ( iter->second->getName().find("Layer6") != std::string::npos && h->GetMaximum() > 14) result = Quality::Bad; + else result = Quality::Good; } From 24a72eca029d5e7e5df880c6c2c1e1bd721d03aa Mon Sep 17 00:00:00 2001 From: IsakovAD Date: Mon, 25 Oct 2021 13:46:58 +0200 Subject: [PATCH 03/10] Clang format changes --- Modules/CMakeLists.txt | 2 +- Modules/ITS/include/ITS/ITSClusterTask.h | 14 +- Modules/ITS/src/ITSClusterCheck.cxx | 119 ++++++------- Modules/ITS/src/ITSClusterTask.cxx | 209 ++++++++++------------- Modules/ITS/src/ITSTrackCheck.cxx | 179 +++++++++---------- Modules/ITS/src/ITSTrackTask.cxx | 5 +- 6 files changed, 240 insertions(+), 288 deletions(-) diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt index 47779d0f27..8b3884c475 100644 --- a/Modules/CMakeLists.txt +++ b/Modules/CMakeLists.txt @@ -9,7 +9,7 @@ add_subdirectory(TOF) add_subdirectory(EMCAL) add_subdirectory(MUON) add_subdirectory(TPC) -add_subdirectory(ITS) +#add_subdirectory(ITS) add_subdirectory(MFT) add_subdirectory(PHOS) add_subdirectory(FT0) diff --git a/Modules/ITS/include/ITS/ITSClusterTask.h b/Modules/ITS/include/ITS/ITSClusterTask.h index 8fad50b2d0..427dfa5e41 100644 --- a/Modules/ITS/include/ITS/ITSClusterTask.h +++ b/Modules/ITS/include/ITS/ITSClusterTask.h @@ -65,11 +65,9 @@ class ITSClusterTask : public TaskInterface TH1D* hClusterSizeIBmonitor[7][48][9]; TH1D* hAverageClusterSummary[7]; - - TH1D* hClusterTopologyIB[7][48][9]; TH2D* hOccupancyIB[7]; - TH2D* hOccupancyIBmonitor[7]; //will be used in online data monitoring, showing occupation for the last N ROFs + TH2D* hOccupancyIBmonitor[7]; //will be used in online data monitoring, showing occupation for the last N ROFs TH2D* hAverageClusterIB[7]; TH2D* hAverageClusterIBmonitor[7]; @@ -79,21 +77,19 @@ class ITSClusterTask : public TaskInterface TH1D* hClusterSizeOBmonitor[7][48][14]; TH1D* hClusterTopologyOB[7][48][14]; TH2D* hOccupancyOB[7]; - TH2D* hOccupancyOBmonitor[7]; //will be used in online data monitoring, showing occupation for the last N ROFs + TH2D* hOccupancyOBmonitor[7]; //will be used in online data monitoring, showing occupation for the last N ROFs TH2D* hAverageClusterOB[7]; TH2D* hAverageClusterOBmonitor[7]; - -// THnSparseD *sClustersSize[7]; - TH2Poly *mGeneralOccupancy; + // THnSparseD *sClustersSize[7]; + TH2Poly* mGeneralOccupancy; Int_t mClusterOccupancyOB[7][48][14]; Int_t mClusterOccupancyOBmonitor[7][48][14]; - const int mOccUpdateFrequency = 100000; int mNThreads = 1; int mNRofs = 0; - int mNRofsMonitor = 0; + int mNRofsMonitor = 0; std::string mDictPath; std::string mRunNumberPath; std::string mGeomPath; diff --git a/Modules/ITS/src/ITSClusterCheck.cxx b/Modules/ITS/src/ITSClusterCheck.cxx index 173fe3a435..ecfeacd586 100644 --- a/Modules/ITS/src/ITSClusterCheck.cxx +++ b/Modules/ITS/src/ITSClusterCheck.cxx @@ -25,7 +25,6 @@ #include #include - namespace o2::quality_control_modules::its { @@ -37,47 +36,53 @@ Quality ITSClusterCheck::check(std::map>::iterator iter; for (iter = moMap->begin(); iter != moMap->end(); ++iter) { - - if (iter->second->getName().find("AverageClusterSize") != std::string::npos) { + if (iter->second->getName().find("AverageClusterSize") != std::string::npos) { auto* h = dynamic_cast(iter->second->getObject()); if (h->GetMaximum() > 20) { result = Quality::Medium; } else { result = Quality::Good; } - } - if (iter->second->getName().find("ClusterOccupation") != std::string::npos) { + if (iter->second->getName().find("ClusterOccupation") != std::string::npos) { auto* h = dynamic_cast(iter->second->getObject()); - - if ( iter->second->getName().find("Layer0") != std::string::npos && h->GetMaximum() > 40) result = Quality::Bad; - else result = Quality::Good; - - if ( iter->second->getName().find("Layer1") != std::string::npos && h->GetMaximum() > 30) result = Quality::Bad; - else result = Quality::Good; - - if ( iter->second->getName().find("Layer2") != std::string::npos && h->GetMaximum() > 20) result = Quality::Bad; - else result = Quality::Good; - - if ( iter->second->getName().find("Layer3") != std::string::npos && h->GetMaximum() > 30) result = Quality::Bad; - else result = Quality::Good; - if ( iter->second->getName().find("Layer4") != std::string::npos && h->GetMaximum() > 25) result = Quality::Bad; - else result = Quality::Good; - - if ( iter->second->getName().find("Layer5") != std::string::npos && h->GetMaximum() > 15) result = Quality::Bad; - else result = Quality::Good; + if (iter->second->getName().find("Layer0") != std::string::npos && h->GetMaximum() > 40) + result = Quality::Bad; + else + result = Quality::Good; - if ( iter->second->getName().find("Layer6") != std::string::npos && h->GetMaximum() > 14) result = Quality::Bad; - else result = Quality::Good; - - } + if (iter->second->getName().find("Layer1") != std::string::npos && h->GetMaximum() > 30) + result = Quality::Bad; + else + result = Quality::Good; + if (iter->second->getName().find("Layer2") != std::string::npos && h->GetMaximum() > 20) + result = Quality::Bad; + else + result = Quality::Good; + if (iter->second->getName().find("Layer3") != std::string::npos && h->GetMaximum() > 30) + result = Quality::Bad; + else + result = Quality::Good; + if (iter->second->getName().find("Layer4") != std::string::npos && h->GetMaximum() > 25) + result = Quality::Bad; + else + result = Quality::Good; + if (iter->second->getName().find("Layer5") != std::string::npos && h->GetMaximum() > 15) + result = Quality::Bad; + else + result = Quality::Good; + if (iter->second->getName().find("Layer6") != std::string::npos && h->GetMaximum() > 14) + result = Quality::Bad; + else + result = Quality::Good; + } } return result; } @@ -87,41 +92,37 @@ std::string ITSClusterCheck::getAcceptedType() { return "TH2D"; } void ITSClusterCheck::beautify(std::shared_ptr mo, Quality checkResult) { - if (mo->getName().find("AverageClusterSize") != std::string::npos) { - auto* h = dynamic_cast(mo->getObject()); - auto* tInfo = new TText(); - - if (checkResult == Quality::Medium) { - tInfo->SetText(0.1, 0.8, "Info: large clusters - do not call expert"); - tInfo->SetTextColor(kOrange); - }else if (checkResult == Quality::Good) { - tInfo->SetText(0.1, 0.8, "Quality::GOOD"); - tInfo->SetTextColor(kGreen); - } - - - tInfo->SetTextSize(17); - tInfo->SetNDC(); - h->GetListOfFunctions()->Add(tInfo); - } - if (mo->getName().find("ClusterOccupation") != std::string::npos) { - auto* h = dynamic_cast(mo->getObject()); - auto* tInfo = new TText(); - - if (checkResult == Quality::Bad) { - tInfo->SetText(0.1, 0.8, "Info: large cluster occupancy, call expert"); - tInfo->SetTextColor(kRed); - }else if (checkResult == Quality::Good) { - tInfo->SetText(0.1, 0.8, "Quality::GOOD"); - tInfo->SetTextColor(kGreen); - } - tInfo->SetTextSize(17); - tInfo->SetNDC(); - h->GetListOfFunctions()->Add(tInfo); - } - + if (mo->getName().find("AverageClusterSize") != std::string::npos) { + auto* h = dynamic_cast(mo->getObject()); + auto* tInfo = new TText(); + if (checkResult == Quality::Medium) { + tInfo->SetText(0.1, 0.8, "Info: large clusters - do not call expert"); + tInfo->SetTextColor(kOrange); + } else if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } + if (mo->getName().find("ClusterOccupation") != std::string::npos) { + auto* h = dynamic_cast(mo->getObject()); + auto* tInfo = new TText(); + + if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: large cluster occupancy, call expert"); + tInfo->SetTextColor(kRed); + } else if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } } } // namespace o2::quality_control_modules::its diff --git a/Modules/ITS/src/ITSClusterTask.cxx b/Modules/ITS/src/ITSClusterTask.cxx index e583ce8b8f..6526901e8b 100644 --- a/Modules/ITS/src/ITSClusterTask.cxx +++ b/Modules/ITS/src/ITSClusterTask.cxx @@ -44,8 +44,6 @@ ITSClusterTask::ITSClusterTask() : TaskInterface() {} ITSClusterTask::~ITSClusterTask() { - - for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) @@ -104,26 +102,24 @@ void ITSClusterTask::initialize(o2::framework::InitContext& /*ctx*/) mGeneralOccupancy->SetTitle("General Occupancy;mm;mm"); mGeneralOccupancy->SetName("General/General_Occupancy"); - for (int iLayer = 0; iLayer < 7; iLayer++) { - for (int iStave = 0; iStave < mNStaves[iLayer]; iStave++) { - double* px = new double[4]; - double* py = new double[4]; - getStavePoint(iLayer, iStave, px, py); - mGeneralOccupancy->AddBin(4, px, py); - } + for (int iStave = 0; iStave < mNStaves[iLayer]; iStave++) { + double* px = new double[4]; + double* py = new double[4]; + getStavePoint(iLayer, iStave, px, py); + mGeneralOccupancy->AddBin(4, px, py); + } } addObject(mGeneralOccupancy); - publishHistos(); //std::string dictfile = o2::base::NameConf::getDictionaryFileName(o2::detectors::DetID::ITS, "", ".bin"); std::ifstream file(mDictPath.c_str()); if (file.good()) { mDict.readBinaryFile(mDictPath); - LOG(INFO) << "Running with dictionary: " << mDictPath<< " with size: "<getChipId(ChipID, lay, sta, ssta, mod, chip); mod = mod + (ssta * (mNHicPerStave[lay] / 2)); - if (lay < 3) { - + mClusterOccupancyIB[lay][sta][chip]++; mClusterOccupancyIBmonitor[lay][sta][chip]++; if (ClusterID < dictSize) { @@ -189,106 +182,101 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) hAverageClusterSummary[lay]->Fill(mDict.getNpixels(ClusterID)); hClusterSizeIBmonitor[lay][sta][chip]->Fill(mDict.getNpixels(ClusterID)); } - } - else { - + } else { + mClusterOccupancyOB[lay][sta][mod]++; mClusterOccupancyOBmonitor[lay][sta][mod]++; if (ClusterID < dictSize) { //Double_t ClusterSizeFill[3] = {1.*sta, 1.*mod, 1.*mDict.getNpixels(ClusterID)}; //sClustersSize[lay]->Fill(ClusterSizeFill, 1.); - + hClusterSizeOB[lay][sta][mod]->Fill(mDict.getNpixels(ClusterID)); hClusterTopologyOB[lay][sta][mod]->Fill(ClusterID); hClusterSizeOBmonitor[lay][sta][mod]->Fill(mDict.getNpixels(ClusterID)); hAverageClusterSummary[lay]->Fill(mDict.getNpixels(ClusterID)); } } - } } - mNRofs += clusRofArr.size(); //USED to calculate occupancy for the whole run - mNRofsMonitor+= clusRofArr.size(); // Occupancy in the last N ROFs - + mNRofs += clusRofArr.size(); //USED to calculate occupancy for the whole run + mNRofsMonitor += clusRofArr.size(); // Occupancy in the last N ROFs + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { - if (!mEnableLayers[iLayer]) continue; + if (!mEnableLayers[iLayer]) + continue; + + for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { - for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { + if (iLayer < 3) { + for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { + hOccupancyIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIB[iLayer][iStave][iChip] / mNRofs); + hAverageClusterIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeIB[iLayer][iStave][iChip]->GetMean()); + } + mGeneralOccupancy->SetBinContent(iStave + 1 + StaveBoundary[iLayer], *(std::max_element(mClusterOccupancyIB[iLayer][iStave], mClusterOccupancyIB[iLayer][iStave] + mNChipsPerHic[iLayer])) / mNRofs); + } else { + + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { + hOccupancyOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOB[iLayer][iStave][iHic] / mNRofs / 14); //14 To have occupation per chip and HIC has 14 chips + hAverageClusterOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOB[iLayer][iStave][iHic]->GetMean()); + } - if (iLayer < 3) { - for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { - hOccupancyIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIB[iLayer][iStave][iChip] / mNRofs); - hAverageClusterIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeIB[iLayer][iStave][iChip]->GetMean()); - } - mGeneralOccupancy->SetBinContent(iStave + 1 + StaveBoundary[iLayer], *(std::max_element(mClusterOccupancyIB[iLayer][iStave],mClusterOccupancyIB[iLayer][iStave] + mNChipsPerHic[iLayer]))/ mNRofs); - }else{ - - for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { - hOccupancyOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOB[iLayer][iStave][iHic] / mNRofs / 14); //14 To have occupation per chip and HIC has 14 chips - hAverageClusterOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOB[iLayer][iStave][iHic]->GetMean()); - } - - mGeneralOccupancy->SetBinContent(iStave + 1 + StaveBoundary[iLayer], *(std::max_element(mClusterOccupancyOB[iLayer][iStave],mClusterOccupancyOBmonitor[iLayer][iStave] + mNHicPerStave[iLayer]))/ mNRofs / 14); - - } - } - } - - - if (mNRofsMonitor >= mOccUpdateFrequency){ - updateOccMonitorPlots(); - mNRofsMonitor=0; - memset(mClusterOccupancyIBmonitor, 0, sizeof(mClusterOccupancyIBmonitor)); - memset(mClusterOccupancyOBmonitor, 0, sizeof(mClusterOccupancyOBmonitor)); - - - for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { - if (!mEnableLayers[iLayer]) continue; - for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++){ - - if (iLayer < 3) for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) hClusterSizeIBmonitor[iLayer][iStave][iChip]->Reset(); - - else for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) hClusterSizeOBmonitor[iLayer][iStave][iHic]->Reset(); - - } - } - - - + mGeneralOccupancy->SetBinContent(iStave + 1 + StaveBoundary[iLayer], *(std::max_element(mClusterOccupancyOB[iLayer][iStave], mClusterOccupancyOBmonitor[iLayer][iStave] + mNHicPerStave[iLayer])) / mNRofs / 14); + } + } } - + if (mNRofsMonitor >= mOccUpdateFrequency) { + updateOccMonitorPlots(); + mNRofsMonitor = 0; + memset(mClusterOccupancyIBmonitor, 0, sizeof(mClusterOccupancyIBmonitor)); + memset(mClusterOccupancyOBmonitor, 0, sizeof(mClusterOccupancyOBmonitor)); + + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { + if (!mEnableLayers[iLayer]) + continue; + for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { + + if (iLayer < 3) + for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) + hClusterSizeIBmonitor[iLayer][iStave][iChip]->Reset(); + + else + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) + hClusterSizeOBmonitor[iLayer][iStave][iHic]->Reset(); + } + } + } end = std::chrono::high_resolution_clock::now(); difference = std::chrono::duration_cast(end - start).count(); ILOG(Info) << "Time in QC Cluster Task: " << difference << ENDM; } -void ITSClusterTask:: updateOccMonitorPlots(){ +void ITSClusterTask::updateOccMonitorPlots() +{ - for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { - if (!mEnableLayers[iLayer]) continue; + if (!mEnableLayers[iLayer]) + continue; - for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) - if (iLayer < 3) { + for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) + if (iLayer < 3) { - for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++){ - hOccupancyIBmonitor[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIBmonitor[iLayer][iStave][iChip] / mNRofsMonitor); - hAverageClusterIBmonitor[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeIBmonitor[iLayer][iStave][iChip]->GetMean()); - } - } else{ + for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { + hOccupancyIBmonitor[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIBmonitor[iLayer][iStave][iChip] / mNRofsMonitor); + hAverageClusterIBmonitor[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeIBmonitor[iLayer][iStave][iChip]->GetMean()); + } + } else { - for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++){ - hOccupancyOBmonitor[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOBmonitor[iLayer][iStave][iHic] / mNRofsMonitor/14); //14 To have occupation per chip and HIC has 14 chips - hAverageClusterOBmonitor[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOBmonitor[iLayer][iStave][iHic]->GetMean()); - } + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { + hOccupancyOBmonitor[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOBmonitor[iLayer][iStave][iHic] / mNRofsMonitor / 14); //14 To have occupation per chip and HIC has 14 chips + hAverageClusterOBmonitor[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOBmonitor[iLayer][iStave][iHic]->GetMean()); + } } - - } - + } } void ITSClusterTask::endOfCycle() @@ -319,7 +307,7 @@ void ITSClusterTask::reset() for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) continue; - // sClustersSize[iLayer]->Reset(); + // sClustersSize[iLayer]->Reset(); hAverageClusterSummary[iLayer]->Reset(); if (iLayer < 3) { @@ -339,7 +327,7 @@ void ITSClusterTask::reset() hAverageClusterOB[iLayer]->Reset(); hOccupancyOBmonitor[iLayer]->Reset(); hAverageClusterOBmonitor[iLayer]->Reset(); - //hAverageClusterOBsummary[iLayer]->Reset(); + //hAverageClusterOBsummary[iLayer]->Reset(); for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { hClusterSizeOB[iLayer][iStave][iHic]->Reset(); @@ -353,46 +341,37 @@ void ITSClusterTask::reset() void ITSClusterTask::createAllHistos() { - for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) continue; - hAverageClusterSummary[iLayer] = new TH1D(Form("Layer%d/AverageClusterSizeSummary", iLayer), Form("Layer%dAverageClusterSizeSummary", iLayer), 50, 0, 50); - hAverageClusterSummary[iLayer]->SetTitle(Form("Summary of average Cluster on one Layer %d", iLayer)); - addObject(hAverageClusterSummary[iLayer]); - formatAxes(hAverageClusterSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10); - hAverageClusterSummary[iLayer]->SetStats(0); - - - + hAverageClusterSummary[iLayer]->SetTitle(Form("Summary of average Cluster on one Layer %d", iLayer)); + addObject(hAverageClusterSummary[iLayer]); + formatAxes(hAverageClusterSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10); + hAverageClusterSummary[iLayer]->SetStats(0); if (iLayer < 3) { -/* + /* Int_t bins[3]= {mNStaves[iLayer],mNChipsPerHic[iLayer],50}; Double_t xmin[3] = {0., 0., 0.}; Double_t xmax[3] = {1.*mNStaves[iLayer],1.* mNChipsPerHic[iLayer],50.}; sClustersSize[iLayer] = new THnSparseD( Form("Layer%d/THnSparseClusterSize", iLayer), Form("Layer%d/THnSparseClusterSize", iLayer),3, bins, xmin, xmax); addObject(sClustersSize[iLayer]); */ - + hOccupancyIB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupation", iLayer), Form("Layer%dClusterOccupancy", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); hOccupancyIB[iLayer]->SetTitle(Form("Cluster Occupancy on Layer %d", iLayer)); addObject(hOccupancyIB[iLayer]); formatAxes(hOccupancyIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); hOccupancyIB[iLayer]->SetStats(0); - hOccupancyIBmonitor[iLayer] = new TH2D(Form("Layer%d/ClusterOccupationForLastNROFS", iLayer), Form("Layer%dClusterOccupancyForLastNROFS", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); hOccupancyIBmonitor[iLayer]->SetTitle(Form("Cluster Occupancy for the last NROFs on Layer %d", iLayer)); addObject(hOccupancyIBmonitor[iLayer]); formatAxes(hOccupancyIBmonitor[iLayer], "Chip Number", "Stave Number", 1, 1.10); hOccupancyIBmonitor[iLayer]->SetStats(0); - - - hAverageClusterIB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSize", iLayer), Form("Layer%dAverageClusterSize", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); hAverageClusterIB[iLayer]->SetTitle(Form("Average Cluster Size on Layer %d", iLayer)); @@ -400,24 +379,20 @@ void ITSClusterTask::createAllHistos() formatAxes(hAverageClusterIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); hAverageClusterIB[iLayer]->SetStats(0); - hAverageClusterIBmonitor[iLayer] = new TH2D(Form("Layer%d/AverageClusterSizeForLastNROFS", iLayer), Form("Layer%dAverageClusterSizeForLastNROFS", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterIBmonitor[iLayer] = new TH2D(Form("Layer%d/AverageClusterSizeForLastNROFS", iLayer), Form("Layer%dAverageClusterSizeForLastNROFS", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); hAverageClusterIBmonitor[iLayer]->SetTitle(Form("Average Cluster Size for the last NROFs on Layer %d", iLayer)); addObject(hAverageClusterIBmonitor[iLayer]); formatAxes(hAverageClusterIBmonitor[iLayer], "Chip Number", "Stave Number", 1, 1.10); hAverageClusterIBmonitor[iLayer]->SetStats(0); - for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { hClusterSizeIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSize", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSize", iLayer, iStave, iChip), 50, 0, 50); hClusterSizeIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Size on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); addObject(hClusterSizeIB[iLayer][iStave][iChip]); formatAxes(hClusterSizeIB[iLayer][iStave][iChip], "Cluster size (Pixel)", "Counts", 1, 1.10); - - hClusterSizeIBmonitor[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSizeMonitor", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSizeMonitor", iLayer, iStave, iChip), 50, 0, 50); - - + hClusterSizeIBmonitor[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSizeMonitor", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSizeMonitor", iLayer, iStave, iChip), 50, 0, 50); hClusterTopologyIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterTopology", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterTopology", iLayer, iStave, iChip), 300, 0, 300); hClusterTopologyIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Toplogy on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); @@ -426,7 +401,7 @@ void ITSClusterTask::createAllHistos() } } } else { - /* + /* Int_t bins[3]= {mNStaves[iLayer], mNHicPerStave[iLayer],50}; Double_t xmin[3] = {0., 0., 0.}; Double_t xmax[3] = {1.*mNStaves[iLayer], 1.*mNHicPerStave[iLayer],50.}; @@ -434,8 +409,6 @@ void ITSClusterTask::createAllHistos() addObject(sClustersSize[iLayer]); */ - - hOccupancyOB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupation", iLayer), Form("Layer%dClusterOccupancy", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); hOccupancyOB[iLayer]->SetTitle(Form("ClusterOccupancyInLastNROFS %d", iLayer)); addObject(hOccupancyOB[iLayer]); @@ -448,8 +421,6 @@ void ITSClusterTask::createAllHistos() formatAxes(hOccupancyOBmonitor[iLayer], "HIC Number", "Stave Number", 1, 1.10); hOccupancyOBmonitor[iLayer]->SetStats(0); - - hAverageClusterOB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSize", iLayer), Form("Layer%dAverageClusterSize", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); hAverageClusterOB[iLayer]->SetTitle(Form("Average Cluster Size on Layer %d", iLayer)); addObject(hAverageClusterOB[iLayer]); @@ -462,7 +433,7 @@ void ITSClusterTask::createAllHistos() formatAxes(hAverageClusterOBmonitor[iLayer], "Chip Number", "Stave Number", 1, 1.10); hAverageClusterOBmonitor[iLayer]->SetStats(0); - for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { + for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { hClusterSizeOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSize", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSize", iLayer, iStave, iHic), 50, 0, 50); hClusterSizeOB[iLayer][iStave][iHic]->SetTitle(Form("Cluster Size on Layer %d Stave %d HIC %d", iLayer, iStave, iHic)); @@ -470,9 +441,8 @@ void ITSClusterTask::createAllHistos() formatAxes(hClusterSizeOB[iLayer][iStave][iHic], "Cluster size (Pixel)", "Counts", 1, 1.10); hClusterSizeOBmonitor[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSizeMonitor", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSizeMonitor", iLayer, iStave, iHic), 50, 0, 50); - - hClusterTopologyOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterTopology", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterTopology", iLayer, iStave, iHic), 300, 0, 300); + hClusterTopologyOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterTopology", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterTopology", iLayer, iStave, iHic), 300, 0, 300); hClusterTopologyOB[iLayer][iStave][iHic]->SetTitle(Form("Cluster Toplogy on Layer %d Stave %d HIC %d", iLayer, iStave, iHic)); addObject(hClusterTopologyOB[iLayer][iStave][iHic]); formatAxes(hClusterTopologyOB[iLayer][iStave][iHic], "Cluster toplogy (ID)", "Counts", 1, 1.10); @@ -482,12 +452,10 @@ void ITSClusterTask::createAllHistos() } } -void ITSClusterTask::getStavePoint(int layer, int stave, double* px, double* py) +void ITSClusterTask::getStavePoint(int layer, int stave, double* px, double* py) { - - - float stepAngle = TMath::Pi() * 2 / mNStaves[layer]; //the angle between to stave + float stepAngle = TMath::Pi() * 2 / mNStaves[layer]; //the angle between to stave float midAngle = StartAngle[layer] + (stave * stepAngle); //mid point angle float staveRotateAngle = TMath::Pi() / 2 - (stave * stepAngle); //how many angle this stave rotate(compare with first stave) px[1] = MidPointRad[layer] * TMath::Cos(midAngle); //there are 4 point to decide this TH2Poly bin @@ -514,9 +482,6 @@ void ITSClusterTask::getStavePoint(int layer, int stave, double* px, double* py } } - - - void ITSClusterTask::getJsonParameters() { mDictPath = mCustomParameters["clusterDictionaryPath"]; diff --git a/Modules/ITS/src/ITSTrackCheck.cxx b/Modules/ITS/src/ITSTrackCheck.cxx index c0412af9e4..c3f6bea63b 100644 --- a/Modules/ITS/src/ITSTrackCheck.cxx +++ b/Modules/ITS/src/ITSTrackCheck.cxx @@ -39,49 +39,50 @@ Quality ITSTrackCheck::check(std::mapsecond->getName() == "NClusters") { auto* h = dynamic_cast(iter->second->getObject()); - if (h->GetMean() <= 10) result = Quality::Good; - else if (h->GetMean() > 10 && h->GetMean() < 15) result = Quality::Medium; - else if (h->GetMean() >= 15) result = Quality::Bad; - + if (h->GetMean() <= 10) + result = Quality::Good; + else if (h->GetMean() > 10 && h->GetMean() < 15) + result = Quality::Medium; + else if (h->GetMean() >= 15) + result = Quality::Bad; } - if (iter->second->getName() == "PhiDistribution") { auto* h = dynamic_cast(iter->second->getObject()); - Double_t ratio = abs ( h->Integral(h->FindBin(0),h->FindBin(TMath::Pi())) / h->Integral(h->FindBin(TMath::Pi()),h->FindBin(TMath::TwoPi())) -1 ); - + Double_t ratio = abs(h->Integral(h->FindBin(0), h->FindBin(TMath::Pi())) / h->Integral(h->FindBin(TMath::Pi()), h->FindBin(TMath::TwoPi())) - 1); - if (ratio > 0.3) result = Quality::Bad; - else result = Quality::Good; + if (ratio > 0.3) + result = Quality::Bad; + else + result = Quality::Good; } if (iter->second->getName() == "AngularDistribution") { auto* hAngluar = dynamic_cast(iter->second->getObject()); TH1D* projectPhi = hAngluar->ProjectionY("hAngluar", hAngluar->FindBin(-1.5), hAngluar->FindBin(1.5)); - Double_t ratio = abs ( projectPhi->Integral(projectPhi->FindBin(0),projectPhi->FindBin(TMath::Pi())) / projectPhi->Integral(projectPhi->FindBin(TMath::Pi()),projectPhi->FindBin(TMath::TwoPi())) -1); + Double_t ratio = abs(projectPhi->Integral(projectPhi->FindBin(0), projectPhi->FindBin(TMath::Pi())) / projectPhi->Integral(projectPhi->FindBin(TMath::Pi()), projectPhi->FindBin(TMath::TwoPi())) - 1); - if (ratio > 0.3) result = Quality::Bad; - else result = Quality::Good; + if (ratio > 0.3) + result = Quality::Bad; + else + result = Quality::Good; } if (iter->second->getName() == "ClusterUsage") { auto* h = dynamic_cast(iter->second->getObject()); - if (h->GetMaximum() < 0.1) result = Quality::Bad; - else result = Quality::Good; - + if (h->GetMaximum() < 0.1) + result = Quality::Bad; + else + result = Quality::Good; } if (iter->second->getName() == "EtaDistribution") { auto* h = dynamic_cast(iter->second->getObject()); - if ( abs( h->GetBinCenter( h->FindBin(h->GetMaximum()))) > 0.5) result = Quality::Bad; - else result = Quality::Good; - + if (abs(h->GetBinCenter(h->FindBin(h->GetMaximum()))) > 0.5) + result = Quality::Bad; + else + result = Quality::Good; } - - - - - } return result; } @@ -90,89 +91,79 @@ std::string ITSTrackCheck::getAcceptedType() { return "TH1D"; } void ITSTrackCheck::beautify(std::shared_ptr mo, Quality checkResult) { - auto* tInfo = new TText(); - + auto* tInfo = new TText(); if (mo->getName() == "NClusters") { - auto* h = dynamic_cast(mo->getObject()); - if (checkResult == Quality::Good) { - tInfo->SetText(0.1, 0.8, "Quality::GOOD"); - tInfo->SetTextColor(kGreen); - } else if (checkResult == Quality::Medium) { - tInfo->SetText(0.1, 0.8, "Info: a track(s) has between 10 and 15 clusters, inform expert on MM"); - tInfo->SetTextColor(kOrange); - } else if (checkResult == Quality::Bad) { - tInfo->SetText(0.1, 0.8, "Info: a track(s) has more than 15 clusters, call expert"); - tInfo->SetTextColor(kRed); - } - tInfo->SetTextSize(17); - tInfo->SetNDC(); - h->GetListOfFunctions()->Add(tInfo); - - - } - - if (mo->getName() == "PhiDistribution") { - auto* h = dynamic_cast(mo->getObject()); - if (checkResult == Quality::Good) { - tInfo->SetText(0.1, 0.8, "Quality::GOOD"); - tInfo->SetTextColor(kGreen); - } else if (checkResult == Quality::Bad) { - tInfo->SetText(0.1, 0.8, "Info: distribution asymmetric in phi, call expert"); - tInfo->SetTextColor(kRed); - } - tInfo->SetTextSize(17); - tInfo->SetNDC(); - h->GetListOfFunctions()->Add(tInfo); + auto* h = dynamic_cast(mo->getObject()); + if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Medium) { + tInfo->SetText(0.1, 0.8, "Info: a track(s) has between 10 and 15 clusters, inform expert on MM"); + tInfo->SetTextColor(kOrange); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: a track(s) has more than 15 clusters, call expert"); + tInfo->SetTextColor(kRed); } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } - if (mo->getName() == "AngularDistribution") { - auto* h = dynamic_cast(mo->getObject()); - if (checkResult == Quality::Good) { - tInfo->SetText(0.1, 0.8, "Quality::GOOD"); - tInfo->SetTextColor(kGreen); - } else if (checkResult == Quality::Bad) { - tInfo->SetText(0.1, 0.8, "Info: distribution asymmetric in phi, call expert"); - tInfo->SetTextColor(kRed); - } - tInfo->SetTextSize(17); - tInfo->SetNDC(); - h->GetListOfFunctions()->Add(tInfo); - - + if (mo->getName() == "PhiDistribution") { + auto* h = dynamic_cast(mo->getObject()); + if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: distribution asymmetric in phi, call expert"); + tInfo->SetTextColor(kRed); } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } + if (mo->getName() == "AngularDistribution") { + auto* h = dynamic_cast(mo->getObject()); + if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: distribution asymmetric in phi, call expert"); + tInfo->SetTextColor(kRed); + } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } - - if (mo->getName() == "ClusterUsage") { + if (mo->getName() == "ClusterUsage") { auto* h = dynamic_cast(mo->getObject()); - if (checkResult == Quality::Good) { - tInfo->SetText(0.1, 0.8, "Quality::GOOD"); - tInfo->SetTextColor(kGreen); - } else if (checkResult == Quality::Bad) { - tInfo->SetText(0.1, 0.8, "Info: fraction of clusters below 0.1, call expert"); - tInfo->SetTextColor(kRed); - } - tInfo->SetTextSize(17); - tInfo->SetNDC(); - h->GetListOfFunctions()->Add(tInfo); - + if (checkResult == Quality::Good) { + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: fraction of clusters below 0.1, call expert"); + tInfo->SetTextColor(kRed); } + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } if (mo->getName() == "EtaDistribution") { - auto* h = dynamic_cast(mo->getObject()); + auto* h = dynamic_cast(mo->getObject()); if (checkResult == Quality::Good) { - tInfo->SetText(0.1, 0.8, "Quality::GOOD"); - tInfo->SetTextColor(kGreen); - } else if (checkResult == Quality::Bad) { - tInfo->SetText(0.1, 0.8, "Info: distribution asymmetric in eta, call expert"); - tInfo->SetTextColor(kRed); - } - tInfo->SetTextSize(17); - tInfo->SetNDC(); - h->GetListOfFunctions()->Add(tInfo); - + tInfo->SetText(0.1, 0.8, "Quality::GOOD"); + tInfo->SetTextColor(kGreen); + } else if (checkResult == Quality::Bad) { + tInfo->SetText(0.1, 0.8, "Info: distribution asymmetric in eta, call expert"); + tInfo->SetTextColor(kRed); } - + tInfo->SetTextSize(17); + tInfo->SetNDC(); + h->GetListOfFunctions()->Add(tInfo); + } } } // namespace o2::quality_control_modules::its diff --git a/Modules/ITS/src/ITSTrackTask.cxx b/Modules/ITS/src/ITSTrackTask.cxx index a53035913a..380833339b 100644 --- a/Modules/ITS/src/ITSTrackTask.cxx +++ b/Modules/ITS/src/ITSTrackTask.cxx @@ -51,7 +51,7 @@ void ITSTrackTask::initialize(o2::framework::InitContext& /*ctx*/) mRunNumberPath = mCustomParameters["runNumberPath"]; publishHistos(); - } +} void ITSTrackTask::startOfActivity(Activity& /*activity*/) { @@ -84,8 +84,7 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx) hNClusters->Fill(track.getNumberOfClusters()); mNClustersInTracks += track.getNumberOfClusters(); - - } + } } mNTracks += trackArr.size(); From 59d2da4d0fa7929150b3ee38f073abe1fc10f8b2 Mon Sep 17 00:00:00 2001 From: IsakovAD Date: Mon, 25 Oct 2021 13:50:11 +0200 Subject: [PATCH 04/10] Clang format changes v2 --- Modules/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt index 8b3884c475..47779d0f27 100644 --- a/Modules/CMakeLists.txt +++ b/Modules/CMakeLists.txt @@ -9,7 +9,7 @@ add_subdirectory(TOF) add_subdirectory(EMCAL) add_subdirectory(MUON) add_subdirectory(TPC) -#add_subdirectory(ITS) +add_subdirectory(ITS) add_subdirectory(MFT) add_subdirectory(PHOS) add_subdirectory(FT0) From c22c1ca6f6072f5ecbf4483a2ade16eab000608b Mon Sep 17 00:00:00 2001 From: IsakovAD Date: Tue, 11 Jan 2022 09:05:32 +0100 Subject: [PATCH 05/10] Added grouped clusters topologies, BunchCrossing histo, new histograms naming in ClusterTask --- Modules/ITS/include/ITS/ITSClusterTask.h | 41 ++- Modules/ITS/itsCluster.json | 8 +- Modules/ITS/src/.ITSClusterTask.cxx.swo | Bin 0 -> 20480 bytes Modules/ITS/src/ITSClusterTask.cxx | 345 ++++++++++++++--------- 4 files changed, 244 insertions(+), 150 deletions(-) create mode 100644 Modules/ITS/src/.ITSClusterTask.cxx.swo diff --git a/Modules/ITS/include/ITS/ITSClusterTask.h b/Modules/ITS/include/ITS/ITSClusterTask.h index bdbf0ab087..50f90fee4b 100644 --- a/Modules/ITS/include/ITS/ITSClusterTask.h +++ b/Modules/ITS/include/ITS/ITSClusterTask.h @@ -61,25 +61,36 @@ class ITSClusterTask : public TaskInterface static constexpr int NLayerIB = 3; std::vector mPublishedObjects; - TH1D* hClusterSizeIB[7][48][9]; - TH1D* hClusterSizeIBmonitor[7][48][9]; - TH1D* hAverageClusterSummary[7]; + TH2D* hClusterVsBunchCrossing; - TH1D* hClusterTopologyIB[7][48][9]; - TH2D* hOccupancyIB[7]; - TH2D* hOccupancyIBmonitor[7]; // will be used in online data monitoring, showing occupation for the last N ROFs - TH2D* hAverageClusterIB[7]; - TH2D* hAverageClusterIBmonitor[7]; + TH1D* hClusterTopologySummaryIB[7][48][9]; + TH1D* hClusterSizeSummaryIB[7][48][9]; + TH1D* hGroupedClusterSizeSummaryIB[7][48][9]; + TH1D* hClusterSizeMonitorIB[7][48][9]; + + TH1D* hClusterSizeLayerSummary[7]; + TH1D* hGroupedClusterSizeLayerSummary[7]; + + TH2D* hAverageClusterOccupancySummaryIB[7]; + TH2D* hAverageClusterOccupancyMonitorIB[7]; // will be used in online data monitoring, showing occupation for the last N ROFs + TH2D* hAverageClusterSizeSummaryIB[7]; + TH2D* hAverageClusterSizeMonitorIB[7]; Int_t mClusterOccupancyIB[7][48][9]; Int_t mClusterOccupancyIBmonitor[7][48][9]; - TH1D* hClusterSizeOB[7][48][14]; - TH1D* hClusterSizeOBmonitor[7][48][14]; - TH1D* hClusterTopologyOB[7][48][14]; - TH2D* hOccupancyOB[7]; - TH2D* hOccupancyOBmonitor[7]; // will be used in online data monitoring, showing occupation for the last N ROFs - TH2D* hAverageClusterOB[7]; - TH2D* hAverageClusterOBmonitor[7]; + + TH1D* hClusterSizeOB[7][48][14]; //used to calculate hAverageClusterSizeSummaryIB + TH1D* hClusterSizeMonitorOB[7][48][14]; //used to calculate hAverageClusterSizeMonitorIB + + TH1D* hGroupedClusterSizeSummaryOB[7][48]; + TH1D* hClusterSizeSummaryOB[7][48]; + TH1D* hClusterTopologySummaryOB[7][48]; + + + TH2D* hAverageClusterOccupancySummaryOB[7]; + TH2D* hAverageClusterOccupancyMonitorOB[7]; // will be used in online data monitoring, showing occupation for the last N ROFs + TH2D* hAverageClusterSizeSummaryOB[7]; + TH2D* hAverageClusterSizeMonitorOB[7]; // THnSparseD *sClustersSize[7]; TH2Poly* mGeneralOccupancy; diff --git a/Modules/ITS/itsCluster.json b/Modules/ITS/itsCluster.json index 4dcf074043..3640f83247 100644 --- a/Modules/ITS/itsCluster.json +++ b/Modules/ITS/itsCluster.json @@ -4,7 +4,7 @@ "config": { "database": { "implementation": "CCDB", - "host": "ccdb-test.cern.ch:8080", + "host": "188.184.2.55:8080", "username": "not_applicable", "password": "not_applicable", "name": "not_applicable" @@ -20,7 +20,7 @@ "url": "" }, "conditionDB": { - "url": "ccdb-test.cern.ch:8080" + "url": "188.184.2.55:8080" } }, "tasks": { @@ -41,7 +41,7 @@ "layer": "1111111", "clusterDictionaryPath": "/home/its/aisakov/workdir/ITSdictionary.bin", "geomPath": "./o2sim_geometry.root", - "nThreads": "4" + "nThreads": "1" } } @@ -68,7 +68,7 @@ "id": "compclus", "active": "true", "machines": [], - "query": "compclus:ITS/COMPCLUSTERS/0;clustersrof:ITS/CLUSTERSROF/0", + "query": "compclus:ITS/COMPCLUSTERS/0;clustersrof:ITS/CLUSTERSROF/0;patterns:ITS/PATTERNS/0", "samplingConditions": [ { "condition": "random", diff --git a/Modules/ITS/src/.ITSClusterTask.cxx.swo b/Modules/ITS/src/.ITSClusterTask.cxx.swo new file mode 100644 index 0000000000000000000000000000000000000000..6b5c5fdf938c7ca1c5eea61cf961edf7c5538151 GIT binary patch literal 20480 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 literal 0 HcmV?d00001 diff --git a/Modules/ITS/src/ITSClusterTask.cxx b/Modules/ITS/src/ITSClusterTask.cxx index 0b60276886..e6fc39b9e9 100644 --- a/Modules/ITS/src/ITSClusterTask.cxx +++ b/Modules/ITS/src/ITSClusterTask.cxx @@ -42,43 +42,49 @@ ITSClusterTask::ITSClusterTask() : TaskInterface() {} ITSClusterTask::~ITSClusterTask() { - + delete hClusterVsBunchCrossing; for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) continue; // delete sClustersSize[iLayer]; - delete hAverageClusterSummary[iLayer]; + delete hClusterSizeLayerSummary[iLayer]; + delete hGroupedClusterSizeLayerSummary[iLayer]; if (iLayer < 3) { - delete hOccupancyIB[iLayer]; - delete hOccupancyIBmonitor[iLayer]; - delete hAverageClusterIB[iLayer]; - delete hAverageClusterIBmonitor[iLayer]; + delete hAverageClusterOccupancySummaryIB[iLayer]; + delete hAverageClusterOccupancyMonitorIB[iLayer]; + delete hAverageClusterSizeSummaryIB[iLayer]; + delete hAverageClusterSizeMonitorIB[iLayer]; for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { - delete hClusterSizeIB[iLayer][iStave][iChip]; - delete hClusterSizeIBmonitor[iLayer][iStave][iChip]; - delete hClusterTopologyIB[iLayer][iStave][iChip]; + delete hClusterSizeSummaryIB[iLayer][iStave][iChip]; + delete hClusterSizeMonitorIB[iLayer][iStave][iChip]; + delete hClusterTopologySummaryIB[iLayer][iStave][iChip]; + delete hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip]; } } } else { - delete hOccupancyOB[iLayer]; - delete hOccupancyOBmonitor[iLayer]; - delete hAverageClusterOB[iLayer]; - delete hAverageClusterOBmonitor[iLayer]; + delete hAverageClusterOccupancySummaryOB[iLayer]; + delete hAverageClusterOccupancyMonitorOB[iLayer]; + delete hAverageClusterSizeSummaryOB[iLayer]; + delete hAverageClusterSizeMonitorOB[iLayer]; for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { - for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { + delete hClusterSizeSummaryOB[iLayer][iStave]; + delete hClusterTopologySummaryOB[iLayer][iStave]; + delete hGroupedClusterSizeSummaryOB[iLayer][iStave]; + + + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { delete hClusterSizeOB[iLayer][iStave][iHic]; - delete hClusterSizeOBmonitor[iLayer][iStave][iHic]; - delete hClusterTopologyOB[iLayer][iStave][iHic]; + delete hClusterSizeMonitorOB[iLayer][iStave][iHic]; } } } @@ -145,8 +151,12 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) ILOG(Info, Support) << "START DOING QC General" << ENDM; auto clusArr = ctx.inputs().get>("compclus"); auto clusRofArr = ctx.inputs().get>("clustersrof"); - + auto clusPatternArr = ctx.inputs().get< gsl::span >("patterns"); + auto pattIt = clusPatternArr.begin(); int dictSize = mDict.getSize(); + + int iPattern = 0; + std::cout<< " Inputs clusArr: "< Fill(bcdata.bc,ROF.getNEntries()); //we count only the number of clusters, not their sizes for (int icl = ROF.getFirstEntry(); icl < ROF.getFirstEntry() + ROF.getNEntries(); icl++) { + auto& cluster = clusArr[icl]; - auto ChipID = cluster.getSensorID(); - int ClusterID = cluster.getPatternID(); + int ClusterID = cluster.getPatternID(); //used for normal (frequent) cluster shapes int lay, sta, ssta, mod, chip; - + + mGeom->getChipId(ChipID, lay, sta, ssta, mod, chip); mod = mod + (ssta * (mNHicPerStave[lay] / 2)); - + int npix = -1; + int isGrouped = -1; + if (ClusterID != o2::itsmft::CompCluster::InvalidPatternID && !mDict.isGroup(ClusterID)) { // Normal (frequent) cluster shapes + npix = mDict.getNpixels(ClusterID); + isGrouped = 0; + } else { + + o2::itsmft::ClusterPattern patt(pattIt); + npix = patt.getNPixels(); + isGrouped =1; + } + if (lay < 3) { mClusterOccupancyIB[lay][sta][chip]++; @@ -175,10 +200,16 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) // Double_t ClusterSizeFill[3] = {1.*sta, 1.*chip,1.* mDict.getNpixels(ClusterID)}; // sClustersSize[lay]->Fill(ClusterSizeFill, 1.); - hClusterTopologyIB[lay][sta][chip]->Fill(ClusterID); - hClusterSizeIB[lay][sta][chip]->Fill(mDict.getNpixels(ClusterID)); - hAverageClusterSummary[lay]->Fill(mDict.getNpixels(ClusterID)); - hClusterSizeIBmonitor[lay][sta][chip]->Fill(mDict.getNpixels(ClusterID)); + hClusterTopologySummaryIB[lay][sta][chip]->Fill(ClusterID); + hClusterSizeSummaryIB[lay][sta][chip]->Fill(npix); + + hClusterSizeLayerSummary[lay]->Fill(npix); + + hClusterSizeMonitorIB[lay][sta][chip]->Fill(npix); + if (isGrouped) { + hGroupedClusterSizeSummaryIB[lay][sta][chip]->Fill(npix); + hGroupedClusterSizeLayerSummary[lay]->Fill(npix); + } } } else { @@ -188,10 +219,17 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) // Double_t ClusterSizeFill[3] = {1.*sta, 1.*mod, 1.*mDict.getNpixels(ClusterID)}; // sClustersSize[lay]->Fill(ClusterSizeFill, 1.); - hClusterSizeOB[lay][sta][mod]->Fill(mDict.getNpixels(ClusterID)); - hClusterTopologyOB[lay][sta][mod]->Fill(ClusterID); - hClusterSizeOBmonitor[lay][sta][mod]->Fill(mDict.getNpixels(ClusterID)); - hAverageClusterSummary[lay]->Fill(mDict.getNpixels(ClusterID)); + hClusterSizeOB[lay][sta][mod]->Fill(npix); + hClusterSizeMonitorOB[lay][sta][mod]->Fill(npix); + + hClusterTopologySummaryOB[lay][sta]->Fill(ClusterID); + hClusterSizeSummaryOB[lay][sta]->Fill(npix); + hClusterSizeLayerSummary[lay]->Fill(npix); + + if (isGrouped){ + hGroupedClusterSizeSummaryOB[lay][sta]->Fill(npix); + hGroupedClusterSizeLayerSummary[lay]->Fill(npix); + } } } } @@ -210,15 +248,15 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) if (iLayer < 3) { for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { - hOccupancyIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIB[iLayer][iStave][iChip] / mNRofs); - hAverageClusterIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeIB[iLayer][iStave][iChip]->GetMean()); + hAverageClusterOccupancySummaryIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIB[iLayer][iStave][iChip] / mNRofs); + hAverageClusterSizeSummaryIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeSummaryIB[iLayer][iStave][iChip]->GetMean()); } mGeneralOccupancy->SetBinContent(iStave + 1 + StaveBoundary[iLayer], *(std::max_element(mClusterOccupancyIB[iLayer][iStave], mClusterOccupancyIB[iLayer][iStave] + mNChipsPerHic[iLayer])) / mNRofs); } else { for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { - hOccupancyOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOB[iLayer][iStave][iHic] / mNRofs / 14); // 14 To have occupation per chip and HIC has 14 chips - hAverageClusterOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOB[iLayer][iStave][iHic]->GetMean()); + hAverageClusterOccupancySummaryOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOB[iLayer][iStave][iHic] / mNRofs / 14); // 14 To have occupation per chip and HIC has 14 chips + hAverageClusterSizeSummaryOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOB[iLayer][iStave][iHic]->GetMean()); } mGeneralOccupancy->SetBinContent(iStave + 1 + StaveBoundary[iLayer], *(std::max_element(mClusterOccupancyOB[iLayer][iStave], mClusterOccupancyOBmonitor[iLayer][iStave] + mNHicPerStave[iLayer])) / mNRofs / 14); @@ -240,11 +278,11 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) if (iLayer < 3) for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) - hClusterSizeIBmonitor[iLayer][iStave][iChip]->Reset(); + hClusterSizeMonitorIB[iLayer][iStave][iChip]->Reset(); else for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) - hClusterSizeOBmonitor[iLayer][iStave][iHic]->Reset(); + hClusterSizeMonitorOB[iLayer][iStave][iHic]->Reset(); } } } @@ -252,6 +290,15 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) end = std::chrono::high_resolution_clock::now(); difference = std::chrono::duration_cast(end - start).count(); ILOG(Info, Support) << "Time in QC Cluster Task: " << difference << ENDM; + + std::ofstream outfile; + + outfile.open("aid_cluster_times.txt", std::ios_base::app); // append instead of overwrite + outfile << difference<SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIBmonitor[iLayer][iStave][iChip] / mNRofsMonitor); - hAverageClusterIBmonitor[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeIBmonitor[iLayer][iStave][iChip]->GetMean()); + hAverageClusterOccupancyMonitorIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, 1. * mClusterOccupancyIBmonitor[iLayer][iStave][iChip] / mNRofsMonitor); + hAverageClusterSizeMonitorIB[iLayer]->SetBinContent(iChip + 1, iStave + 1, hClusterSizeMonitorIB[iLayer][iStave][iChip]->GetMean()); } } else { for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { - hOccupancyOBmonitor[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOBmonitor[iLayer][iStave][iHic] / mNRofsMonitor / 14); // 14 To have occupation per chip and HIC has 14 chips - hAverageClusterOBmonitor[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeOBmonitor[iLayer][iStave][iHic]->GetMean()); + hAverageClusterOccupancyMonitorOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, 1. * mClusterOccupancyOBmonitor[iLayer][iStave][iHic] / mNRofsMonitor / 14); // 14 To have occupation per chip and HIC has 14 chips + hAverageClusterSizeMonitorOB[iLayer]->SetBinContent(iHic + 1, iStave + 1, hClusterSizeMonitorOB[iLayer][iStave][iHic]->GetMean()); } } } @@ -303,35 +350,41 @@ void ITSClusterTask::endOfActivity(Activity& /*activity*/) void ITSClusterTask::reset() { ILOG(Info, Support) << "Resetting the histogram" << ENDM; + hClusterVsBunchCrossing->Reset(); for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) continue; // sClustersSize[iLayer]->Reset(); - hAverageClusterSummary[iLayer]->Reset(); + hClusterSizeLayerSummary[iLayer]->Reset(); + hGroupedClusterSizeLayerSummary[iLayer]->Reset(); if (iLayer < 3) { - hOccupancyIB[iLayer]->Reset(); - hOccupancyIBmonitor[iLayer]->Reset(); - hAverageClusterIB[iLayer]->Reset(); - hAverageClusterIBmonitor[iLayer]->Reset(); + hAverageClusterOccupancySummaryIB[iLayer]->Reset(); + hAverageClusterOccupancyMonitorIB[iLayer]->Reset(); + hAverageClusterSizeSummaryIB[iLayer]->Reset(); + hAverageClusterSizeMonitorIB[iLayer]->Reset(); // hAverageClusterIBsummary[iLayer]->Reset(); for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { - hClusterSizeIB[iLayer][iStave][iChip]->Reset(); - hClusterTopologyIB[iLayer][iStave][iChip]->Reset(); + hClusterSizeSummaryIB[iLayer][iStave][iChip]->Reset(); + hClusterTopologySummaryIB[iLayer][iStave][iChip]->Reset(); + hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip]->Reset(); } } } else { - hOccupancyOB[iLayer]->Reset(); - hAverageClusterOB[iLayer]->Reset(); - hOccupancyOBmonitor[iLayer]->Reset(); - hAverageClusterOBmonitor[iLayer]->Reset(); + hAverageClusterOccupancySummaryOB[iLayer]->Reset(); + hAverageClusterSizeSummaryOB[iLayer]->Reset(); + hAverageClusterOccupancyMonitorOB[iLayer]->Reset(); + hAverageClusterSizeMonitorOB[iLayer]->Reset(); // hAverageClusterOBsummary[iLayer]->Reset(); for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { + + hClusterTopologySummaryOB[iLayer][iStave]->Reset(); + hGroupedClusterSizeSummaryOB[iLayer][iStave]->Reset(); + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { hClusterSizeOB[iLayer][iStave][iHic]->Reset(); - hClusterTopologyOB[iLayer][iStave][iHic]->Reset(); } } } @@ -341,15 +394,31 @@ void ITSClusterTask::reset() void ITSClusterTask::createAllHistos() { + + hClusterVsBunchCrossing= new TH2D("BunchCrossingIDvsClusterSize", "BunchCrossingIDvsClusterSize", 4096, 0, 4095, 100, 0, 100); + hClusterVsBunchCrossing->SetTitle("Bunch Crossing ID vs Cluster Size"); + addObject(hClusterVsBunchCrossing); + formatAxes(hClusterVsBunchCrossing, "Bunch Crossing ID", "Cluster size (pixels)", 1, 1.10); + hClusterVsBunchCrossing->SetStats(0); + + for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) continue; - hAverageClusterSummary[iLayer] = new TH1D(Form("Layer%d/AverageClusterSizeSummary", iLayer), Form("Layer%dAverageClusterSizeSummary", iLayer), 50, 0, 50); - hAverageClusterSummary[iLayer]->SetTitle(Form("Summary of average Cluster on one Layer %d", iLayer)); - addObject(hAverageClusterSummary[iLayer]); - formatAxes(hAverageClusterSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10); - hAverageClusterSummary[iLayer]->SetStats(0); + hClusterSizeLayerSummary[iLayer] = new TH1D(Form("Layer%d/AverageClusterSizeSummary", iLayer), Form("Layer%dAverageClusterSizeSummary", iLayer), 100, 0, 100); + hClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for %d Layer", iLayer)); + addObject(hClusterSizeLayerSummary[iLayer]); + formatAxes(hClusterSizeLayerSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10); + hClusterSizeLayerSummary[iLayer]->SetStats(0); + + hGroupedClusterSizeLayerSummary[iLayer] = new TH1D(Form("Layer%d/AverageGroupedClusterSizeSummary", iLayer), Form("Layer%dAverageGroupedClusterSizeSummary", iLayer), 100, 0, 100); + hGroupedClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for %d Layer", iLayer)); + addObject(hGroupedClusterSizeLayerSummary[iLayer]); + formatAxes(hGroupedClusterSizeLayerSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10); + hGroupedClusterSizeLayerSummary[iLayer]->SetStats(0); + + if (iLayer < 3) { /* @@ -360,48 +429,53 @@ void ITSClusterTask::createAllHistos() addObject(sClustersSize[iLayer]); */ - hOccupancyIB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupation", iLayer), Form("Layer%dClusterOccupancy", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); - hOccupancyIB[iLayer]->SetTitle(Form("Cluster Occupancy on Layer %d", iLayer)); - addObject(hOccupancyIB[iLayer]); - formatAxes(hOccupancyIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); - hOccupancyIB[iLayer]->SetStats(0); - hOccupancyIB[iLayer]->SetBit(TH1::kIsAverage); - - hOccupancyIBmonitor[iLayer] = new TH2D(Form("Layer%d/ClusterOccupationForLastNROFS", iLayer), Form("Layer%dClusterOccupancyForLastNROFS", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); - hOccupancyIBmonitor[iLayer]->SetTitle(Form("Cluster Occupancy for the last NROFs on Layer %d", iLayer)); - addObject(hOccupancyIBmonitor[iLayer]); - formatAxes(hOccupancyIBmonitor[iLayer], "Chip Number", "Stave Number", 1, 1.10); - hOccupancyIBmonitor[iLayer]->SetStats(0); - hOccupancyIBmonitor[iLayer]->SetBit(TH1::kIsAverage); - - hAverageClusterIB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSize", iLayer), Form("Layer%dAverageClusterSize", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); - - hAverageClusterIB[iLayer]->SetTitle(Form("Average Cluster Size on Layer %d", iLayer)); - addObject(hAverageClusterIB[iLayer]); - formatAxes(hAverageClusterIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); - hAverageClusterIB[iLayer]->SetStats(0); - hAverageClusterIB[iLayer]->SetBit(TH1::kIsAverage); - - hAverageClusterIBmonitor[iLayer] = new TH2D(Form("Layer%d/AverageClusterSizeForLastNROFS", iLayer), Form("Layer%dAverageClusterSizeForLastNROFS", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); - hAverageClusterIBmonitor[iLayer]->SetTitle(Form("Average Cluster Size for the last NROFs on Layer %d", iLayer)); - addObject(hAverageClusterIBmonitor[iLayer]); - formatAxes(hAverageClusterIBmonitor[iLayer], "Chip Number", "Stave Number", 1, 1.10); - hAverageClusterIBmonitor[iLayer]->SetStats(0); - hAverageClusterIBmonitor[iLayer]->SetBit(TH1::kIsAverage); + hAverageClusterOccupancySummaryIB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupation", iLayer), Form("Layer%dClusterOccupancy", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterOccupancySummaryIB[iLayer]->SetTitle(Form("Cluster Occupancy on Layer %d", iLayer)); + addObject(hAverageClusterOccupancySummaryIB[iLayer]); + formatAxes(hAverageClusterOccupancySummaryIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); + hAverageClusterOccupancySummaryIB[iLayer]->SetStats(0); + hAverageClusterOccupancySummaryIB[iLayer]->SetBit(TH1::kIsAverage); + + hAverageClusterOccupancyMonitorIB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupationForLastNROFS", iLayer), Form("Layer%dClusterOccupancyForLastNROFS", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterOccupancyMonitorIB[iLayer]->SetTitle(Form("Cluster Occupancy for the last NROFs on Layer %d", iLayer)); + addObject(hAverageClusterOccupancyMonitorIB[iLayer]); + formatAxes(hAverageClusterOccupancyMonitorIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); + hAverageClusterOccupancyMonitorIB[iLayer]->SetStats(0); + hAverageClusterOccupancyMonitorIB[iLayer]->SetBit(TH1::kIsAverage); + + hAverageClusterSizeSummaryIB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSize", iLayer), Form("Layer%dAverageClusterSize", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterSizeSummaryIB[iLayer]->SetTitle(Form("Average Cluster Size on Layer %d", iLayer)); + addObject(hAverageClusterSizeSummaryIB[iLayer]); + formatAxes(hAverageClusterSizeSummaryIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); + hAverageClusterSizeSummaryIB[iLayer]->SetStats(0); + hAverageClusterSizeSummaryIB[iLayer]->SetBit(TH1::kIsAverage); + + hAverageClusterSizeMonitorIB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSizeForLastNROFS", iLayer), Form("Layer%dAverageClusterSizeForLastNROFS", iLayer), mNChipsPerHic[iLayer], 0, mNChipsPerHic[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterSizeMonitorIB[iLayer]->SetTitle(Form("Average Cluster Size for the last NROFs on Layer %d", iLayer)); + addObject(hAverageClusterSizeMonitorIB[iLayer]); + formatAxes(hAverageClusterSizeMonitorIB[iLayer], "Chip Number", "Stave Number", 1, 1.10); + hAverageClusterSizeMonitorIB[iLayer]->SetStats(0); + hAverageClusterSizeMonitorIB[iLayer]->SetBit(TH1::kIsAverage); for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { for (Int_t iChip = 0; iChip < mNChipsPerHic[iLayer]; iChip++) { - hClusterSizeIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSize", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSize", iLayer, iStave, iChip), 50, 0, 50); - hClusterSizeIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Size on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); - addObject(hClusterSizeIB[iLayer][iStave][iChip]); - formatAxes(hClusterSizeIB[iLayer][iStave][iChip], "Cluster size (Pixel)", "Counts", 1, 1.10); + hClusterSizeSummaryIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSize", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSize", iLayer, iStave, iChip), 100, 0, 100); + hClusterSizeSummaryIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Size on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); + addObject(hClusterSizeSummaryIB[iLayer][iStave][iChip]); + formatAxes(hClusterSizeSummaryIB[iLayer][iStave][iChip], "Cluster size (Pixel)", "Counts", 1, 1.10); + + hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSizeGrouped", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSizeGroped", iLayer, iStave, iChip), 100, 0, 100); + hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Size for grouped topologies on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); + addObject(hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip]); + formatAxes(hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip], "Cluster size (Pixel)", "Counts", 1, 1.10); - hClusterSizeIBmonitor[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSizeMonitor", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSizeMonitor", iLayer, iStave, iChip), 50, 0, 50); - hClusterTopologyIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterTopology", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterTopology", iLayer, iStave, iChip), 300, 0, 300); - hClusterTopologyIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Toplogy on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); - addObject(hClusterTopologyIB[iLayer][iStave][iChip]); - formatAxes(hClusterTopologyIB[iLayer][iStave][iChip], "Cluster toplogy (ID)", "Counts", 1, 1.10); + hClusterSizeMonitorIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSizeMonitor", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSizeMonitor", iLayer, iStave, iChip), 100, 0, 100); + + hClusterTopologySummaryIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterTopology", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterTopology", iLayer, iStave, iChip), 300, 0, 300); + hClusterTopologySummaryIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Topology on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); + addObject(hClusterTopologySummaryIB[iLayer][iStave][iChip]); + formatAxes(hClusterTopologySummaryIB[iLayer][iStave][iChip], "Cluster topology (ID)", "Counts", 1, 1.10); } } } else { @@ -413,48 +487,57 @@ void ITSClusterTask::createAllHistos() addObject(sClustersSize[iLayer]); */ - hOccupancyOB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupation", iLayer), Form("Layer%dClusterOccupancy", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); - hOccupancyOB[iLayer]->SetTitle(Form("Cluster Occupancy on Layer %d", iLayer)); - addObject(hOccupancyOB[iLayer]); - formatAxes(hOccupancyOB[iLayer], "HIC Number", "Stave Number", 1, 1.10); - hOccupancyOB[iLayer]->SetStats(0); - hOccupancyOB[iLayer]->SetBit(TH1::kIsAverage); - - hOccupancyOBmonitor[iLayer] = new TH2D(Form("Layer%d/ClusterOccupationForLastNROFS", iLayer), Form("Layer%dClusterOccupancyForLastNROFS", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); - hOccupancyOBmonitor[iLayer]->SetTitle(Form("Cluster Occupancy in last NROFS on Layer %d", iLayer)); - addObject(hOccupancyOBmonitor[iLayer]); - formatAxes(hOccupancyOBmonitor[iLayer], "HIC Number", "Stave Number", 1, 1.10); - hOccupancyOBmonitor[iLayer]->SetStats(0); - hOccupancyOBmonitor[iLayer]->SetBit(TH1::kIsAverage); - - hAverageClusterOB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSize", iLayer), Form("Layer%dAverageClusterSize", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); - hAverageClusterOB[iLayer]->SetTitle(Form("Average Cluster Size on Layer %d", iLayer)); - addObject(hAverageClusterOB[iLayer]); - formatAxes(hAverageClusterOB[iLayer], "HIC Number", "Stave Number", 1, 1.10); - hAverageClusterOB[iLayer]->SetStats(0); - hAverageClusterOB[iLayer]->SetBit(TH1::kIsAverage); - - hAverageClusterOBmonitor[iLayer] = new TH2D(Form("Layer%d/AverageClusterSizeForLastNROFS", iLayer), Form("Layer%dAverageClusterSizeForLastNROFS", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); - hAverageClusterOBmonitor[iLayer]->SetTitle(Form("Average Cluster Size for the last NROFs on Layer %d", iLayer)); - addObject(hAverageClusterOBmonitor[iLayer]); - formatAxes(hAverageClusterOBmonitor[iLayer], "HIC Number", "Stave Number", 1, 1.10); - hAverageClusterOBmonitor[iLayer]->SetStats(0); - hAverageClusterOBmonitor[iLayer]->SetBit(TH1::kIsAverage); + hAverageClusterOccupancySummaryOB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupation", iLayer), Form("Layer%dClusterOccupancy", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterOccupancySummaryOB[iLayer]->SetTitle(Form("Cluster Occupancy on Layer %d", iLayer)); + addObject(hAverageClusterOccupancySummaryOB[iLayer]); + formatAxes(hAverageClusterOccupancySummaryOB[iLayer], "HIC Number", "Stave Number", 1, 1.10); + hAverageClusterOccupancySummaryOB[iLayer]->SetStats(0); + hAverageClusterOccupancySummaryOB[iLayer]->SetBit(TH1::kIsAverage); + + hAverageClusterOccupancyMonitorOB[iLayer] = new TH2D(Form("Layer%d/ClusterOccupationForLastNROFS", iLayer), Form("Layer%dClusterOccupancyForLastNROFS", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterOccupancyMonitorOB[iLayer]->SetTitle(Form("Cluster Occupancy in last NROFS on Layer %d", iLayer)); + addObject(hAverageClusterOccupancyMonitorOB[iLayer]); + formatAxes(hAverageClusterOccupancyMonitorOB[iLayer], "HIC Number", "Stave Number", 1, 1.10); + hAverageClusterOccupancyMonitorOB[iLayer]->SetStats(0); + hAverageClusterOccupancyMonitorOB[iLayer]->SetBit(TH1::kIsAverage); + + hAverageClusterSizeSummaryOB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSize", iLayer), Form("Layer%dAverageClusterSize", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterSizeSummaryOB[iLayer]->SetTitle(Form("Average Cluster Size on Layer %d", iLayer)); + addObject(hAverageClusterSizeSummaryOB[iLayer]); + formatAxes(hAverageClusterSizeSummaryOB[iLayer], "HIC Number", "Stave Number", 1, 1.10); + hAverageClusterSizeSummaryOB[iLayer]->SetStats(0); + hAverageClusterSizeSummaryOB[iLayer]->SetBit(TH1::kIsAverage); + + hAverageClusterSizeMonitorOB[iLayer] = new TH2D(Form("Layer%d/AverageClusterSizeForLastNROFS", iLayer), Form("Layer%dAverageClusterSizeForLastNROFS", iLayer), mNHicPerStave[iLayer], 0, mNHicPerStave[iLayer], mNStaves[iLayer], 0, mNStaves[iLayer]); + hAverageClusterSizeMonitorOB[iLayer]->SetTitle(Form("Average Cluster Size for the last NROFs on Layer %d", iLayer)); + addObject(hAverageClusterSizeMonitorOB[iLayer]); + formatAxes(hAverageClusterSizeMonitorOB[iLayer], "HIC Number", "Stave Number", 1, 1.10); + hAverageClusterSizeMonitorOB[iLayer]->SetStats(0); + hAverageClusterSizeMonitorOB[iLayer]->SetBit(TH1::kIsAverage); for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { - for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { - hClusterSizeOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSize", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSize", iLayer, iStave, iHic), 50, 0, 50); - hClusterSizeOB[iLayer][iStave][iHic]->SetTitle(Form("Cluster Size on Layer %d Stave %d HIC %d", iLayer, iStave, iHic)); - addObject(hClusterSizeOB[iLayer][iStave][iHic]); - formatAxes(hClusterSizeOB[iLayer][iStave][iHic], "Cluster size (Pixel)", "Counts", 1, 1.10); + - hClusterSizeOBmonitor[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSizeMonitor", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSizeMonitor", iLayer, iStave, iHic), 50, 0, 50); + hClusterSizeSummaryOB[iLayer][iStave] = new TH1D(Form("Layer%d/Stave%d/ClusterSize", iLayer, iStave), Form("Layer%dStave%dClusterSize", iLayer, iStave), 100, 0, 100); + hClusterSizeSummaryOB[iLayer][iStave]->SetTitle(Form("Cluster Size summary for Layer %d Stave %d", iLayer, iStave)); + addObject(hClusterSizeSummaryOB[iLayer][iStave]); + formatAxes(hClusterSizeSummaryOB[iLayer][iStave], "Cluster size (Pixel)", "Counts", 1, 1.10); - hClusterTopologyOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterTopology", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterTopology", iLayer, iStave, iHic), 300, 0, 300); - hClusterTopologyOB[iLayer][iStave][iHic]->SetTitle(Form("Cluster Toplogy on Layer %d Stave %d HIC %d", iLayer, iStave, iHic)); - addObject(hClusterTopologyOB[iLayer][iStave][iHic]); - formatAxes(hClusterTopologyOB[iLayer][iStave][iHic], "Cluster toplogy (ID)", "Counts", 1, 1.10); - } + hGroupedClusterSizeSummaryOB[iLayer][iStave] = new TH1D(Form("Layer%d/Stave%d/GroupedClusterSize", iLayer, iStave), Form("Layer%dStave%dGroupedClusterSize", iLayer, iStave), 100, 0, 100); + hGroupedClusterSizeSummaryOB[iLayer][iStave]->SetTitle(Form("Grouped Cluster Size summary for Layer %d Stave %d", iLayer, iStave)); + addObject(hGroupedClusterSizeSummaryOB[iLayer][iStave]); + formatAxes(hGroupedClusterSizeSummaryOB[iLayer][iStave], "Cluster size (Pixel)", "Counts", 1, 1.10); + + hClusterTopologySummaryOB[iLayer][iStave]= new TH1D(Form("Layer%d/Stave%d/ClusterTopology", iLayer, iStave), Form("Layer%dStave%dClusterTopology", iLayer, iStave), 300, 0, 300); + hClusterTopologySummaryOB[iLayer][iStave]->SetTitle(Form("Cluster Toplogy summary for Layer %d Stave %d", iLayer, iStave)); + addObject(hClusterTopologySummaryOB[iLayer][iStave]); + formatAxes(hClusterTopologySummaryOB[iLayer][iStave], "Cluster toplogy (ID)", "Counts", 1, 1.10); + + + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { //are used in TH2 construction, no need to keep on ccdb + hClusterSizeOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSize", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSize", iLayer, iStave, iHic), 100, 0, 100); + hClusterSizeMonitorOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSizeMonitor", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSizeMonitor", iLayer, iStave, iHic), 100, 0, 100); + } } } } From dcf3932481bfcb65df13e9d10d51d3ab051dd22e Mon Sep 17 00:00:00 2001 From: IsakovAD Date: Thu, 13 Jan 2022 13:42:52 +0100 Subject: [PATCH 06/10] Modified Histogram titles --- Modules/ITS/src/ITSClusterTask.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/ITS/src/ITSClusterTask.cxx b/Modules/ITS/src/ITSClusterTask.cxx index e6fc39b9e9..a271f286ce 100644 --- a/Modules/ITS/src/ITSClusterTask.cxx +++ b/Modules/ITS/src/ITSClusterTask.cxx @@ -398,7 +398,7 @@ void ITSClusterTask::createAllHistos() hClusterVsBunchCrossing= new TH2D("BunchCrossingIDvsClusterSize", "BunchCrossingIDvsClusterSize", 4096, 0, 4095, 100, 0, 100); hClusterVsBunchCrossing->SetTitle("Bunch Crossing ID vs Cluster Size"); addObject(hClusterVsBunchCrossing); - formatAxes(hClusterVsBunchCrossing, "Bunch Crossing ID", "Cluster size (pixels)", 1, 1.10); + formatAxes(hClusterVsBunchCrossing, "Bunch Crossing ID", "Number of clusters in ROF", 1, 1.10); hClusterVsBunchCrossing->SetStats(0); @@ -415,7 +415,7 @@ void ITSClusterTask::createAllHistos() hGroupedClusterSizeLayerSummary[iLayer] = new TH1D(Form("Layer%d/AverageGroupedClusterSizeSummary", iLayer), Form("Layer%dAverageGroupedClusterSizeSummary", iLayer), 100, 0, 100); hGroupedClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for %d Layer", iLayer)); addObject(hGroupedClusterSizeLayerSummary[iLayer]); - formatAxes(hGroupedClusterSizeLayerSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10); + formatAxes(hGroupedClusterSizeLayerSummary[iLayer], "Grouped Cluster Size (pixels)", "counts", 1, 1.10); hGroupedClusterSizeLayerSummary[iLayer]->SetStats(0); From 8ce298260bc66f3019273aacc088bceaa6bb6727 Mon Sep 17 00:00:00 2001 From: IsakovAD Date: Thu, 13 Jan 2022 16:58:28 +0100 Subject: [PATCH 07/10] clang format --- Modules/ITS/include/ITS/ITSClusterTask.h | 13 ++- Modules/ITS/src/ITSClusterTask.cxx | 102 ++++++++++------------- 2 files changed, 50 insertions(+), 65 deletions(-) diff --git a/Modules/ITS/include/ITS/ITSClusterTask.h b/Modules/ITS/include/ITS/ITSClusterTask.h index 50f90fee4b..ddb75c9d6f 100644 --- a/Modules/ITS/include/ITS/ITSClusterTask.h +++ b/Modules/ITS/include/ITS/ITSClusterTask.h @@ -59,14 +59,12 @@ class ITSClusterTask : public TaskInterface static constexpr int NLayer = 7; static constexpr int NLayerIB = 3; - - std::vector mPublishedObjects; TH2D* hClusterVsBunchCrossing; - - TH1D* hClusterTopologySummaryIB[7][48][9]; + std::vector mPublishedObjects; TH1D* hClusterSizeSummaryIB[7][48][9]; - TH1D* hGroupedClusterSizeSummaryIB[7][48][9]; TH1D* hClusterSizeMonitorIB[7][48][9]; + TH1D* hClusterTopologySummaryIB[7][48][9]; + TH1D* hGroupedClusterSizeSummaryIB[7][48][9]; TH1D* hClusterSizeLayerSummary[7]; TH1D* hGroupedClusterSizeLayerSummary[7]; @@ -79,14 +77,13 @@ class ITSClusterTask : public TaskInterface Int_t mClusterOccupancyIB[7][48][9]; Int_t mClusterOccupancyIBmonitor[7][48][9]; - TH1D* hClusterSizeOB[7][48][14]; //used to calculate hAverageClusterSizeSummaryIB - TH1D* hClusterSizeMonitorOB[7][48][14]; //used to calculate hAverageClusterSizeMonitorIB + TH1D* hClusterSizeOB[7][48][14]; // used to calculate hAverageClusterSizeSummaryIB + TH1D* hClusterSizeMonitorOB[7][48][14]; // used to calculate hAverageClusterSizeMonitorIB TH1D* hGroupedClusterSizeSummaryOB[7][48]; TH1D* hClusterSizeSummaryOB[7][48]; TH1D* hClusterTopologySummaryOB[7][48]; - TH2D* hAverageClusterOccupancySummaryOB[7]; TH2D* hAverageClusterOccupancyMonitorOB[7]; // will be used in online data monitoring, showing occupation for the last N ROFs TH2D* hAverageClusterSizeSummaryOB[7]; diff --git a/Modules/ITS/src/ITSClusterTask.cxx b/Modules/ITS/src/ITSClusterTask.cxx index a271f286ce..8f63661ef4 100644 --- a/Modules/ITS/src/ITSClusterTask.cxx +++ b/Modules/ITS/src/ITSClusterTask.cxx @@ -81,7 +81,6 @@ ITSClusterTask::~ITSClusterTask() delete hClusterTopologySummaryOB[iLayer][iStave]; delete hGroupedClusterSizeSummaryOB[iLayer][iStave]; - for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { delete hClusterSizeOB[iLayer][iStave][iHic]; delete hClusterSizeMonitorOB[iLayer][iStave][iHic]; @@ -151,12 +150,12 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) ILOG(Info, Support) << "START DOING QC General" << ENDM; auto clusArr = ctx.inputs().get>("compclus"); auto clusRofArr = ctx.inputs().get>("clustersrof"); - auto clusPatternArr = ctx.inputs().get< gsl::span >("patterns"); + auto clusPatternArr = ctx.inputs().get>("patterns"); auto pattIt = clusPatternArr.begin(); int dictSize = mDict.getSize(); - + int iPattern = 0; - std::cout<< " Inputs clusArr: "< Fill(bcdata.bc,ROF.getNEntries()); //we count only the number of clusters, not their sizes + hClusterVsBunchCrossing->Fill(bcdata.bc, ROF.getNEntries()); // we count only the number of clusters, not their sizes for (int icl = ROF.getFirstEntry(); icl < ROF.getFirstEntry() + ROF.getNEntries(); icl++) { - + auto& cluster = clusArr[icl]; auto ChipID = cluster.getSensorID(); - int ClusterID = cluster.getPatternID(); //used for normal (frequent) cluster shapes + int ClusterID = cluster.getPatternID(); // used for normal (frequent) cluster shapes int lay, sta, ssta, mod, chip; - - + mGeom->getChipId(ChipID, lay, sta, ssta, mod, chip); mod = mod + (ssta * (mNHicPerStave[lay] / 2)); int npix = -1; int isGrouped = -1; - if (ClusterID != o2::itsmft::CompCluster::InvalidPatternID && !mDict.isGroup(ClusterID)) { // Normal (frequent) cluster shapes + if (ClusterID != o2::itsmft::CompCluster::InvalidPatternID && !mDict.isGroup(ClusterID)) { // Normal (frequent) cluster shapes npix = mDict.getNpixels(ClusterID); isGrouped = 0; } else { - + o2::itsmft::ClusterPattern patt(pattIt); npix = patt.getNPixels(); - isGrouped =1; + isGrouped = 1; } - + if (lay < 3) { mClusterOccupancyIB[lay][sta][chip]++; @@ -206,9 +204,9 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) hClusterSizeLayerSummary[lay]->Fill(npix); hClusterSizeMonitorIB[lay][sta][chip]->Fill(npix); - if (isGrouped) { - hGroupedClusterSizeSummaryIB[lay][sta][chip]->Fill(npix); - hGroupedClusterSizeLayerSummary[lay]->Fill(npix); + if (isGrouped) { + hGroupedClusterSizeSummaryIB[lay][sta][chip]->Fill(npix); + hGroupedClusterSizeLayerSummary[lay]->Fill(npix); } } } else { @@ -222,14 +220,14 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) hClusterSizeOB[lay][sta][mod]->Fill(npix); hClusterSizeMonitorOB[lay][sta][mod]->Fill(npix); - hClusterTopologySummaryOB[lay][sta]->Fill(ClusterID); - hClusterSizeSummaryOB[lay][sta]->Fill(npix); + hClusterTopologySummaryOB[lay][sta]->Fill(ClusterID); + hClusterSizeSummaryOB[lay][sta]->Fill(npix); hClusterSizeLayerSummary[lay]->Fill(npix); - if (isGrouped){ - hGroupedClusterSizeSummaryOB[lay][sta]->Fill(npix); - hGroupedClusterSizeLayerSummary[lay]->Fill(npix); - } + if (isGrouped) { + hGroupedClusterSizeSummaryOB[lay][sta]->Fill(npix); + hGroupedClusterSizeLayerSummary[lay]->Fill(npix); + } } } } @@ -290,15 +288,12 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) end = std::chrono::high_resolution_clock::now(); difference = std::chrono::duration_cast(end - start).count(); ILOG(Info, Support) << "Time in QC Cluster Task: " << difference << ENDM; - - std::ofstream outfile; - - outfile.open("aid_cluster_times.txt", std::ios_base::app); // append instead of overwrite - outfile << difference<Reset(); hClusterTopologySummaryIB[iLayer][iStave][iChip]->Reset(); - hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip]->Reset(); + hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip]->Reset(); } } } else { @@ -382,7 +377,7 @@ void ITSClusterTask::reset() hClusterTopologySummaryOB[iLayer][iStave]->Reset(); hGroupedClusterSizeSummaryOB[iLayer][iStave]->Reset(); - + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { hClusterSizeOB[iLayer][iStave][iHic]->Reset(); } @@ -394,14 +389,12 @@ void ITSClusterTask::reset() void ITSClusterTask::createAllHistos() { - - hClusterVsBunchCrossing= new TH2D("BunchCrossingIDvsClusterSize", "BunchCrossingIDvsClusterSize", 4096, 0, 4095, 100, 0, 100); + hClusterVsBunchCrossing = new TH2D("BunchCrossingIDvsClusterSize", "BunchCrossingIDvsClusterSize", 4096, 0, 4095, 100, 0, 100); hClusterVsBunchCrossing->SetTitle("Bunch Crossing ID vs Cluster Size"); addObject(hClusterVsBunchCrossing); formatAxes(hClusterVsBunchCrossing, "Bunch Crossing ID", "Number of clusters in ROF", 1, 1.10); hClusterVsBunchCrossing->SetStats(0); - for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { if (!mEnableLayers[iLayer]) continue; @@ -418,8 +411,6 @@ void ITSClusterTask::createAllHistos() formatAxes(hGroupedClusterSizeLayerSummary[iLayer], "Grouped Cluster Size (pixels)", "counts", 1, 1.10); hGroupedClusterSizeLayerSummary[iLayer]->SetStats(0); - - if (iLayer < 3) { /* Int_t bins[3]= {mNStaves[iLayer],mNChipsPerHic[iLayer],50}; @@ -467,8 +458,7 @@ void ITSClusterTask::createAllHistos() hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSizeGrouped", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSizeGroped", iLayer, iStave, iChip), 100, 0, 100); hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip]->SetTitle(Form("Cluster Size for grouped topologies on Layer %d Stave %d Chip %d", iLayer, iStave, iChip)); addObject(hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip]); - formatAxes(hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip], "Cluster size (Pixel)", "Counts", 1, 1.10); - + formatAxes(hGroupedClusterSizeSummaryIB[iLayer][iStave][iChip], "Cluster size (Pixel)", "Counts", 1, 1.10); hClusterSizeMonitorIB[iLayer][iStave][iChip] = new TH1D(Form("Layer%d/Stave%d/CHIP%d/ClusterSizeMonitor", iLayer, iStave, iChip), Form("Layer%dStave%dCHIP%dClusterSizeMonitor", iLayer, iStave, iChip), 100, 0, 100); @@ -516,28 +506,26 @@ void ITSClusterTask::createAllHistos() hAverageClusterSizeMonitorOB[iLayer]->SetBit(TH1::kIsAverage); for (Int_t iStave = 0; iStave < mNStaves[iLayer]; iStave++) { - - hClusterSizeSummaryOB[iLayer][iStave] = new TH1D(Form("Layer%d/Stave%d/ClusterSize", iLayer, iStave), Form("Layer%dStave%dClusterSize", iLayer, iStave), 100, 0, 100); - hClusterSizeSummaryOB[iLayer][iStave]->SetTitle(Form("Cluster Size summary for Layer %d Stave %d", iLayer, iStave)); - addObject(hClusterSizeSummaryOB[iLayer][iStave]); - formatAxes(hClusterSizeSummaryOB[iLayer][iStave], "Cluster size (Pixel)", "Counts", 1, 1.10); + hClusterSizeSummaryOB[iLayer][iStave] = new TH1D(Form("Layer%d/Stave%d/ClusterSize", iLayer, iStave), Form("Layer%dStave%dClusterSize", iLayer, iStave), 100, 0, 100); + hClusterSizeSummaryOB[iLayer][iStave]->SetTitle(Form("Cluster Size summary for Layer %d Stave %d", iLayer, iStave)); + addObject(hClusterSizeSummaryOB[iLayer][iStave]); + formatAxes(hClusterSizeSummaryOB[iLayer][iStave], "Cluster size (Pixel)", "Counts", 1, 1.10); - hGroupedClusterSizeSummaryOB[iLayer][iStave] = new TH1D(Form("Layer%d/Stave%d/GroupedClusterSize", iLayer, iStave), Form("Layer%dStave%dGroupedClusterSize", iLayer, iStave), 100, 0, 100); - hGroupedClusterSizeSummaryOB[iLayer][iStave]->SetTitle(Form("Grouped Cluster Size summary for Layer %d Stave %d", iLayer, iStave)); - addObject(hGroupedClusterSizeSummaryOB[iLayer][iStave]); - formatAxes(hGroupedClusterSizeSummaryOB[iLayer][iStave], "Cluster size (Pixel)", "Counts", 1, 1.10); + hGroupedClusterSizeSummaryOB[iLayer][iStave] = new TH1D(Form("Layer%d/Stave%d/GroupedClusterSize", iLayer, iStave), Form("Layer%dStave%dGroupedClusterSize", iLayer, iStave), 100, 0, 100); + hGroupedClusterSizeSummaryOB[iLayer][iStave]->SetTitle(Form("Grouped Cluster Size summary for Layer %d Stave %d", iLayer, iStave)); + addObject(hGroupedClusterSizeSummaryOB[iLayer][iStave]); + formatAxes(hGroupedClusterSizeSummaryOB[iLayer][iStave], "Cluster size (Pixel)", "Counts", 1, 1.10); - hClusterTopologySummaryOB[iLayer][iStave]= new TH1D(Form("Layer%d/Stave%d/ClusterTopology", iLayer, iStave), Form("Layer%dStave%dClusterTopology", iLayer, iStave), 300, 0, 300); - hClusterTopologySummaryOB[iLayer][iStave]->SetTitle(Form("Cluster Toplogy summary for Layer %d Stave %d", iLayer, iStave)); - addObject(hClusterTopologySummaryOB[iLayer][iStave]); - formatAxes(hClusterTopologySummaryOB[iLayer][iStave], "Cluster toplogy (ID)", "Counts", 1, 1.10); + hClusterTopologySummaryOB[iLayer][iStave] = new TH1D(Form("Layer%d/Stave%d/ClusterTopology", iLayer, iStave), Form("Layer%dStave%dClusterTopology", iLayer, iStave), 300, 0, 300); + hClusterTopologySummaryOB[iLayer][iStave]->SetTitle(Form("Cluster Toplogy summary for Layer %d Stave %d", iLayer, iStave)); + addObject(hClusterTopologySummaryOB[iLayer][iStave]); + formatAxes(hClusterTopologySummaryOB[iLayer][iStave], "Cluster toplogy (ID)", "Counts", 1, 1.10); - - for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { //are used in TH2 construction, no need to keep on ccdb - hClusterSizeOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSize", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSize", iLayer, iStave, iHic), 100, 0, 100); - hClusterSizeMonitorOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSizeMonitor", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSizeMonitor", iLayer, iStave, iHic), 100, 0, 100); - } + for (Int_t iHic = 0; iHic < mNHicPerStave[iLayer]; iHic++) { // are used in TH2 construction, no need to keep on ccdb + hClusterSizeOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSize", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSize", iLayer, iStave, iHic), 100, 0, 100); + hClusterSizeMonitorOB[iLayer][iStave][iHic] = new TH1D(Form("Layer%d/Stave%d/HIC%d/ClusterSizeMonitor", iLayer, iStave, iHic), Form("Layer%dStave%dHIC%dClusterSizeMonitor", iLayer, iStave, iHic), 100, 0, 100); + } } } } From 4c2b019aefd1591a6380c0bd7106ba540d8e1998 Mon Sep 17 00:00:00 2001 From: IsakovAD Date: Sun, 16 Jan 2022 14:46:40 +0100 Subject: [PATCH 08/10] Only large clusters to BunchCrossing histogram; code was cleared --- Modules/ITS/include/ITS/ITSClusterTask.h | 1 + Modules/ITS/src/ITSClusterTask.cxx | 35 ++++++++++++++---------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Modules/ITS/include/ITS/ITSClusterTask.h b/Modules/ITS/include/ITS/ITSClusterTask.h index ddb75c9d6f..18db5c1e4f 100644 --- a/Modules/ITS/include/ITS/ITSClusterTask.h +++ b/Modules/ITS/include/ITS/ITSClusterTask.h @@ -67,6 +67,7 @@ class ITSClusterTask : public TaskInterface TH1D* hGroupedClusterSizeSummaryIB[7][48][9]; TH1D* hClusterSizeLayerSummary[7]; + TH1D* hClusterTopologyLayerSummary[7]; TH1D* hGroupedClusterSizeLayerSummary[7]; TH2D* hAverageClusterOccupancySummaryIB[7]; diff --git a/Modules/ITS/src/ITSClusterTask.cxx b/Modules/ITS/src/ITSClusterTask.cxx index 8f63661ef4..9bc328e417 100644 --- a/Modules/ITS/src/ITSClusterTask.cxx +++ b/Modules/ITS/src/ITSClusterTask.cxx @@ -50,6 +50,7 @@ ITSClusterTask::~ITSClusterTask() // delete sClustersSize[iLayer]; delete hClusterSizeLayerSummary[iLayer]; + delete hClusterTopologyLayerSummary[iLayer]; delete hGroupedClusterSizeLayerSummary[iLayer]; if (iLayer < 3) { @@ -155,8 +156,7 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) int dictSize = mDict.getSize(); int iPattern = 0; - std::cout << " Inputs clusArr: " << clusArr.size() << " clusPatternArr " << clusPatternArr.size() << std::endl; - + int ChipIDprev = -1; #ifdef WITH_OPENMP omp_set_num_threads(mNThreads); #pragma omp parallel for schedule(dynamic) @@ -167,7 +167,7 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) const auto& ROF = clusRofArr[iROF]; const auto bcdata = ROF.getBCData(); - hClusterVsBunchCrossing->Fill(bcdata.bc, ROF.getNEntries()); // we count only the number of clusters, not their sizes + int nClustersForBunchCrossing = 0; for (int icl = ROF.getFirstEntry(); icl < ROF.getFirstEntry() + ROF.getNEntries(); icl++) { auto& cluster = clusArr[icl]; @@ -175,20 +175,24 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) int ClusterID = cluster.getPatternID(); // used for normal (frequent) cluster shapes int lay, sta, ssta, mod, chip; - mGeom->getChipId(ChipID, lay, sta, ssta, mod, chip); - mod = mod + (ssta * (mNHicPerStave[lay] / 2)); + if (ChipID != ChipIDprev) { + mGeom->getChipId(ChipID, lay, sta, ssta, mod, chip); + mod = mod + (ssta * (mNHicPerStave[lay] / 2)); + } int npix = -1; int isGrouped = -1; if (ClusterID != o2::itsmft::CompCluster::InvalidPatternID && !mDict.isGroup(ClusterID)) { // Normal (frequent) cluster shapes npix = mDict.getNpixels(ClusterID); isGrouped = 0; } else { - o2::itsmft::ClusterPattern patt(pattIt); npix = patt.getNPixels(); isGrouped = 1; } + if (npix > 2) + nClustersForBunchCrossing++; + if (lay < 3) { mClusterOccupancyIB[lay][sta][chip]++; @@ -202,6 +206,7 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) hClusterSizeSummaryIB[lay][sta][chip]->Fill(npix); hClusterSizeLayerSummary[lay]->Fill(npix); + hClusterTopologyLayerSummary[lay]->Fill(ClusterID); hClusterSizeMonitorIB[lay][sta][chip]->Fill(npix); if (isGrouped) { @@ -223,7 +228,7 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) hClusterTopologySummaryOB[lay][sta]->Fill(ClusterID); hClusterSizeSummaryOB[lay][sta]->Fill(npix); hClusterSizeLayerSummary[lay]->Fill(npix); - + hClusterTopologyLayerSummary[lay]->Fill(ClusterID); if (isGrouped) { hGroupedClusterSizeSummaryOB[lay][sta]->Fill(npix); hGroupedClusterSizeLayerSummary[lay]->Fill(npix); @@ -231,6 +236,7 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) } } } + hClusterVsBunchCrossing->Fill(bcdata.bc, nClustersForBunchCrossing); // we count only the number of clusters, not their sizes } mNRofs += clusRofArr.size(); // USED to calculate occupancy for the whole run @@ -288,12 +294,6 @@ void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx) end = std::chrono::high_resolution_clock::now(); difference = std::chrono::duration_cast(end - start).count(); ILOG(Info, Support) << "Time in QC Cluster Task: " << difference << ENDM; - - std::ofstream outfile; - - outfile.open("aid_cluster_times.txt", std::ios_base::app); // append instead of overwrite - outfile << difference << std::endl; - outfile.close(); } void ITSClusterTask::updateOccMonitorPlots() @@ -353,6 +353,7 @@ void ITSClusterTask::reset() // sClustersSize[iLayer]->Reset(); hClusterSizeLayerSummary[iLayer]->Reset(); hGroupedClusterSizeLayerSummary[iLayer]->Reset(); + hClusterTopologyLayerSummary[iLayer]->Reset(); if (iLayer < 3) { hAverageClusterOccupancySummaryIB[iLayer]->Reset(); @@ -389,7 +390,7 @@ void ITSClusterTask::reset() void ITSClusterTask::createAllHistos() { - hClusterVsBunchCrossing = new TH2D("BunchCrossingIDvsClusterSize", "BunchCrossingIDvsClusterSize", 4096, 0, 4095, 100, 0, 100); + hClusterVsBunchCrossing = new TH2D("BunchCrossingIDvsClusterSize", "BunchCrossingIDvsClusterSize", 4096, 0, 4095, 100, 0, 1000); hClusterVsBunchCrossing->SetTitle("Bunch Crossing ID vs Cluster Size"); addObject(hClusterVsBunchCrossing); formatAxes(hClusterVsBunchCrossing, "Bunch Crossing ID", "Number of clusters in ROF", 1, 1.10); @@ -411,6 +412,12 @@ void ITSClusterTask::createAllHistos() formatAxes(hGroupedClusterSizeLayerSummary[iLayer], "Grouped Cluster Size (pixels)", "counts", 1, 1.10); hGroupedClusterSizeLayerSummary[iLayer]->SetStats(0); + hClusterTopologyLayerSummary[iLayer] = new TH1D(Form("Layer%d/ClusterTopologySummary", iLayer), Form("Layer%dClusterTopologySummary", iLayer), 300, 0, 300); + hClusterTopologyLayerSummary[iLayer]->SetTitle(Form("Cluster topology summary for %d Layer", iLayer)); + addObject(hClusterTopologyLayerSummary[iLayer]); + formatAxes(hClusterTopologyLayerSummary[iLayer], "Cluster Topology (ID)", "counts", 1, 1.10); + hClusterTopologyLayerSummary[iLayer]->SetStats(0); + if (iLayer < 3) { /* Int_t bins[3]= {mNStaves[iLayer],mNChipsPerHic[iLayer],50}; From 6a3f8e1ca49dd187495d3d5383913267dd4226ec Mon Sep 17 00:00:00 2001 From: IsakovAD Date: Sun, 16 Jan 2022 14:53:04 +0100 Subject: [PATCH 09/10] removed .swo files --- Modules/ITS/src/.ITSClusterTask.cxx.swo | Bin 20480 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Modules/ITS/src/.ITSClusterTask.cxx.swo diff --git a/Modules/ITS/src/.ITSClusterTask.cxx.swo b/Modules/ITS/src/.ITSClusterTask.cxx.swo deleted file mode 100644 index 6b5c5fdf938c7ca1c5eea61cf961edf7c5538151..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20480 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 From b060d6d7b90de7af6c6f5c11e323c1e23c0c6779 Mon Sep 17 00:00:00 2001 From: IsakovAD Date: Tue, 18 Jan 2022 09:05:01 +0100 Subject: [PATCH 10/10] Updated Titles of some histograms --- Modules/ITS/src/ITSClusterTask.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/ITS/src/ITSClusterTask.cxx b/Modules/ITS/src/ITSClusterTask.cxx index 9bc328e417..b2c6ce7204 100644 --- a/Modules/ITS/src/ITSClusterTask.cxx +++ b/Modules/ITS/src/ITSClusterTask.cxx @@ -390,10 +390,10 @@ void ITSClusterTask::reset() void ITSClusterTask::createAllHistos() { - hClusterVsBunchCrossing = new TH2D("BunchCrossingIDvsClusterSize", "BunchCrossingIDvsClusterSize", 4096, 0, 4095, 100, 0, 1000); - hClusterVsBunchCrossing->SetTitle("Bunch Crossing ID vs Cluster Size"); + hClusterVsBunchCrossing = new TH2D("BunchCrossingIDvsClusters", "BunchCrossingIDvsClusters", 4096, 0, 4095, 100, 0, 1000); + hClusterVsBunchCrossing->SetTitle("#clusters vs BC id for clusters with #pix > 2"); addObject(hClusterVsBunchCrossing); - formatAxes(hClusterVsBunchCrossing, "Bunch Crossing ID", "Number of clusters in ROF", 1, 1.10); + formatAxes(hClusterVsBunchCrossing, "Bunch Crossing ID", "Number of clusters with #pix > 2 in ROF", 1, 1.10); hClusterVsBunchCrossing->SetStats(0); for (Int_t iLayer = 0; iLayer < NLayer; iLayer++) { @@ -401,19 +401,19 @@ void ITSClusterTask::createAllHistos() continue; hClusterSizeLayerSummary[iLayer] = new TH1D(Form("Layer%d/AverageClusterSizeSummary", iLayer), Form("Layer%dAverageClusterSizeSummary", iLayer), 100, 0, 100); - hClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for %d Layer", iLayer)); + hClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for Layer %d", iLayer)); addObject(hClusterSizeLayerSummary[iLayer]); formatAxes(hClusterSizeLayerSummary[iLayer], "Cluster Size (pixels)", "counts", 1, 1.10); hClusterSizeLayerSummary[iLayer]->SetStats(0); hGroupedClusterSizeLayerSummary[iLayer] = new TH1D(Form("Layer%d/AverageGroupedClusterSizeSummary", iLayer), Form("Layer%dAverageGroupedClusterSizeSummary", iLayer), 100, 0, 100); - hGroupedClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for %d Layer", iLayer)); + hGroupedClusterSizeLayerSummary[iLayer]->SetTitle(Form("Cluster size summary for Layer %d", iLayer)); addObject(hGroupedClusterSizeLayerSummary[iLayer]); formatAxes(hGroupedClusterSizeLayerSummary[iLayer], "Grouped Cluster Size (pixels)", "counts", 1, 1.10); hGroupedClusterSizeLayerSummary[iLayer]->SetStats(0); hClusterTopologyLayerSummary[iLayer] = new TH1D(Form("Layer%d/ClusterTopologySummary", iLayer), Form("Layer%dClusterTopologySummary", iLayer), 300, 0, 300); - hClusterTopologyLayerSummary[iLayer]->SetTitle(Form("Cluster topology summary for %d Layer", iLayer)); + hClusterTopologyLayerSummary[iLayer]->SetTitle(Form("Cluster topology summary for Layer %d", iLayer)); addObject(hClusterTopologyLayerSummary[iLayer]); formatAxes(hClusterTopologyLayerSummary[iLayer], "Cluster Topology (ID)", "counts", 1, 1.10); hClusterTopologyLayerSummary[iLayer]->SetStats(0);