Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions 5 Modules/ITS/include/ITS/ITSThresholdCalibrationTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ITSThresholdCalibrationTask : public TaskInterface
float THR;
float Noise;
float NoiseRMS;
int status;
float status;
};
struct CalibrationResStructPixel {
int Layer;
Expand Down Expand Up @@ -118,12 +118,11 @@ class ITSThresholdCalibrationTask : public TaskInterface
TH2D* hCalibrationDColChipAverage[3];
TH2D* hCalibrationPixelpAverage[3][3];

TH1F* hSuccessRate;
TH2F* hUnsuccess[3];
TH1F *hCalibrationLayer[7][3], *hCalibrationRMSLayer[7][3];
TH1F *hCalibrationThrNoiseLayer[7], *hCalibrationThrNoiseRMSLayer[7];

o2::itsmft::ChipMappingITS mp;
Int_t SuccessStatus[7], TotalStatus[7];
};
} // namespace o2::quality_control_modules::its

Expand Down
38 changes: 14 additions & 24 deletions 38 Modules/ITS/src/ITSThresholdCalibrationTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ ITSThresholdCalibrationTask::ITSThresholdCalibrationTask() : TaskInterface()

ITSThresholdCalibrationTask::~ITSThresholdCalibrationTask()
{
delete hSuccessRate;

for (int iScan = 0; iScan < 3; iScan++) {
for (int iLayer = 0; iLayer < 7; iLayer++) {
delete hCalibrationLayer[iLayer][iScan];
Expand All @@ -60,6 +58,7 @@ ITSThresholdCalibrationTask::~ITSThresholdCalibrationTask()
delete hCalibrationThrNoiseChipAverage[iBarrel];
delete hCalibrationThrNoiseRMSChipAverage[iBarrel];
delete hCalibrationChipDone[iBarrel];
delete hUnsuccess[iBarrel];

delete hCalibrationDColChipAverage[iBarrel];
for (int iPixelScanType = 0; iPixelScanType < 3; iPixelScanType++)
Expand Down Expand Up @@ -175,18 +174,11 @@ void ITSThresholdCalibrationTask::doAnalysisTHR(string inString, int iScan)
hCalibrationChipAverage[iScan][iBarrel]->SetBinContent(currentChip, currentStave, calibrationValue);
hCalibrationRMSChipAverage[iScan][iBarrel]->SetBinContent(currentChip, currentStave, result.RMS);

if (result.status == 1)
SuccessStatus[result.Layer]++;
TotalStatus[result.Layer]++;
// -------------- Fill percentage of unsuccess
hUnsuccess[iBarrel]->SetBinContent(currentChip, currentStave, result.status);
}
}

//---------------------SuccessRate plots:
for (int iLayer; iLayer < 7; iLayer++) {
if (TotalStatus[iLayer] > 0)
hSuccessRate->SetBinContent(iLayer + 1, SuccessStatus[iLayer] / TotalStatus[iLayer]);
}

//------------------ 1D summary plots per layer
for (int iLayer = 0; iLayer < 7; iLayer++) { // TH1 plots per layer

Expand Down Expand Up @@ -324,7 +316,7 @@ ITSThresholdCalibrationTask::CalibrationResStructTHR ITSThresholdCalibrationTask
} else if (name == "Rms") {
result.RMS = std::stof(data);
} else if (name == "Status") {
result.status = std::stod(data);
result.status = std::stof(data);
} else if (name == "Noise") {
result.Noise = std::stof(data);
} else if (name == "NoiseRms") {
Expand Down Expand Up @@ -352,7 +344,6 @@ void ITSThresholdCalibrationTask::endOfActivity(Activity& /*activity*/)
void ITSThresholdCalibrationTask::reset()
{
ILOG(Info, Support) << "Resetting the histogram" << ENDM;
hSuccessRate->Reset();

for (int iScan = 0; iScan < 3; iScan++) {
for (int iLayer = 0; iLayer < 7; iLayer++) {
Expand All @@ -372,6 +363,7 @@ void ITSThresholdCalibrationTask::reset()

for (int iBarrel = 0; iBarrel < 3; iBarrel++) {

hUnsuccess[iBarrel]->Reset();
hCalibrationThrNoiseChipAverage[iBarrel]->Reset();
hCalibrationThrNoiseRMSChipAverage[iBarrel]->Reset();
hCalibrationChipDone[iBarrel]->Reset();
Expand Down Expand Up @@ -444,6 +436,15 @@ void ITSThresholdCalibrationTask::createAllHistos()

formatLayers(hCalibrationChipDone[iBarrel], iBarrel);
addObject(hCalibrationChipDone[iBarrel]);

hUnsuccess[iBarrel] = new TH2F(Form("ChipUnsuccess%s", sBarrelType[iBarrel].Data()), Form("Percentage of unsuccess %s", sBarrelType[iBarrel].Data()), nChips[iBarrel], -0.5, nChips[iBarrel] - 0.5, nStaves[iBarrel], -0.5, nStaves[iBarrel] - 0.5);
hUnsuccess[iBarrel]->SetStats(0);
hUnsuccess[iBarrel]->SetMinimum(0);
hUnsuccess[iBarrel]->SetMaximum(100);
if (iBarrel != 0)
formatAxes(hUnsuccess[iBarrel], "Chip", "", 1, 1.10);
formatLayers(hUnsuccess[iBarrel], iBarrel);
addObject(hUnsuccess[iBarrel]);
}
for (int iLayer = 0; iLayer < 7; iLayer++) {
hCalibrationThrNoiseLayer[iLayer] = new TH1F(Form("ThrNoiseLayer%d", iLayer), Form("Threshold Noise for Layer%d", iLayer), 10, -0.5, 9.5);
Expand All @@ -457,17 +458,6 @@ void ITSThresholdCalibrationTask::createAllHistos()
addObject(hCalibrationThrNoiseRMSLayer[iLayer]);
}

hSuccessRate = new TH1F("SuccessRate", "Success Rate", 7, -0.5, 6.5);
hSuccessRate->SetStats(0);
hSuccessRate->SetBit(TH1::kIsAverage);
formatAxes(hSuccessRate, "Layer", "Rate", 1, 1.10);
addObject(hSuccessRate);

for (int iLayer; iLayer < 7; iLayer++) {
SuccessStatus[iLayer] = 0;
TotalStatus[iLayer] = 0;
}

for (int iBarrel = 0; iBarrel < 3; iBarrel++) {

for (int iType = 0; iType < 3; iType++) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.