Skip to content

Adding Laser Aging Task with adjustable amplitude cut#1990

Closed
sandor-lokos wants to merge 4 commits into
AliceO2Group:masterfrom
sandor-lokos:master
Closed

Adding Laser Aging Task with adjustable amplitude cut#1990
sandor-lokos wants to merge 4 commits into
AliceO2Group:masterfrom
sandor-lokos:master

Conversation

@sandor-lokos
Copy link
Copy Markdown
Contributor

Aging monitoring task is implemented with an additional configurable parameter that perform cut on the amplitude.

Comment on lines +120 to +123
unsigned int costumAmplCut = 0;
for (const auto& cutAmpl : mSetAmpCut) {
costumAmplCut = cutAmpl;
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think some change is needed here, either the amp cut is channel wise or it is not?

Copy link
Copy Markdown
Collaborator

@knopers8 knopers8 left a comment

Choose a reason for hiding this comment

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

I have only some suggestions regarding adherence to the O2 coding guidelines and removing the leftovers from the class skeleton.

Comment on lines +28 to +45
#include "TH1.h"
#include "TH2.h"
#include "TList.h"
#include "Rtypes.h"

#include <Framework/InputRecord.h>
#include "CommonConstants/LHCConstants.h"
#include "QualityControl/TaskInterface.h"
#include "QualityControl/QcInfoLogger.h"
#include "FT0Base/Constants.h"
#include "FT0Base/Geometry.h"
#include "DataFormatsFT0/Digit.h"
#include "DataFormatsFT0/ChannelData.h"

#include "TH1.h"
#include "TH2.h"
#include "TList.h"
#include "Rtypes.h"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#include "TH1.h"
#include "TH2.h"
#include "TList.h"
#include "Rtypes.h"
#include <Framework/InputRecord.h>
#include "CommonConstants/LHCConstants.h"
#include "QualityControl/TaskInterface.h"
#include "QualityControl/QcInfoLogger.h"
#include "FT0Base/Constants.h"
#include "FT0Base/Geometry.h"
#include "DataFormatsFT0/Digit.h"
#include "DataFormatsFT0/ChannelData.h"
#include "TH1.h"
#include "TH2.h"
#include "TList.h"
#include "Rtypes.h"
#include <Framework/InputRecord.h>
#include <CommonConstants/LHCConstants.h>
#include "QualityControl/TaskInterface.h"
#include "QualityControl/QcInfoLogger.h"
#include <FT0Base/Constants.h>
#include <FT0Base/Geometry.h>
#include <DataFormatsFT0/Digit.h>
#include <DataFormatsFT0/ChannelData.h>
#include <TH1.h>
#include <TH2.h>
#include <TList.h>
#include <Rtypes.h>

https://rawgit.com/AliceO2Group/CodingGuidelines/master/coding_guidelines.html?showone=Names_and_Order_of_Includes#Names_and_Order_of_Includes

// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file LaserAgingFT0Task.cxx
/// \author My Name
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// \author My Name
/// \author Sandor Lokos

Comment on lines +36 to +39
// THUS FUNCTION BODY IS AN EXAMPLE. PLEASE REMOVE EVERYTHING YOU DO NOT NEED.
ILOG(Debug, Devel) << "initialize LaserAgingFT0Task" << ENDM; // QcInfoLogger is used. FairMQ logs will go to there as well.
ILOG(Debug, Support) << "Debug" << ENDM; // QcInfoLogger is used. FairMQ logs will go to there as well.
ILOG(Info, Support) << "Info" << ENDM; // QcInfoLogger is used. FairMQ logs will go to there as well.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// THUS FUNCTION BODY IS AN EXAMPLE. PLEASE REMOVE EVERYTHING YOU DO NOT NEED.
ILOG(Debug, Devel) << "initialize LaserAgingFT0Task" << ENDM; // QcInfoLogger is used. FairMQ logs will go to there as well.
ILOG(Debug, Support) << "Debug" << ENDM; // QcInfoLogger is used. FairMQ logs will go to there as well.
ILOG(Info, Support) << "Info" << ENDM; // QcInfoLogger is used. FairMQ logs will go to there as well.
ILOG(Debug, Devel) << "initialize LaserAgingFT0Task" << ENDM;

from all of this, you probably need just that

Comment on lines +106 to +109
for (auto& entry : mMapHistAmpVsBCADC0)
entry.second->Reset();
for (auto& entry : mMapHistAmpVsBCADC1)
entry.second->Reset();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
for (auto& entry : mMapHistAmpVsBCADC0)
entry.second->Reset();
for (auto& entry : mMapHistAmpVsBCADC1)
entry.second->Reset();
for (auto& entry : mMapHistAmpVsBCADC0) {
entry.second->Reset();
}
for (auto& entry : mMapHistAmpVsBCADC1) {
entry.second->Reset();
}

https://rawgit.com/AliceO2Group/CodingGuidelines/master/naming_formatting.html?showone=Braces#Braces


void LaserAgingFT0Task::startOfActivity(const Activity& activity)
{
// THUS FUNCTION BODY IS AN EXAMPLE. PLEASE REMOVE EVERYTHING YOU DO NOT NEED.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// THUS FUNCTION BODY IS AN EXAMPLE. PLEASE REMOVE EVERYTHING YOU DO NOT NEED.

Comment on lines +130 to +133
if (chData.getFlag(o2::ft0::ChannelData::kNumberADC))
mHistAmp2ADC1->Fill(static_cast<Double_t>(chData.ChId), static_cast<Double_t>(chData.QTCAmpl));
else
mHistAmp2ADC0->Fill(static_cast<Double_t>(chData.ChId), static_cast<Double_t>(chData.QTCAmpl));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (chData.getFlag(o2::ft0::ChannelData::kNumberADC))
mHistAmp2ADC1->Fill(static_cast<Double_t>(chData.ChId), static_cast<Double_t>(chData.QTCAmpl));
else
mHistAmp2ADC0->Fill(static_cast<Double_t>(chData.ChId), static_cast<Double_t>(chData.QTCAmpl));
if (chData.getFlag(o2::ft0::ChannelData::kNumberADC)) {
mHistAmp2ADC1->Fill(static_cast<Double_t>(chData.ChId), static_cast<Double_t>(chData.QTCAmpl));
}
else {
mHistAmp2ADC0->Fill(static_cast<Double_t>(chData.ChId), static_cast<Double_t>(chData.QTCAmpl));
}

Comment on lines +161 to +164
// THUS FUNCTION BODY IS AN EXAMPLE. PLEASE REMOVE EVERYTHING YOU DO NOT NEED.

// clean all the monitor objects here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// THUS FUNCTION BODY IS AN EXAMPLE. PLEASE REMOVE EVERYTHING YOU DO NOT NEED.
// clean all the monitor objects here

if (auto histo = dynamic_cast<TH2F*>(obj)) {
int channel = -1;
sscanf(histo->GetName(), "%*[^0-9]%d", &channel);
std::cerr << histo << std::endl;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
std::cerr << histo << std::endl;

Please avoid using directly stderr, this will be anyway redirected to infologger, but as warnings.

}
}
} // namespace o2::quality_control_modules::ft0
// ILOG(Warning)<<histo->GetName()<<" entries: "<< bc_projection->GetEntries()<<" channel: "<<channel<<" ibc: "<<ibc<<" ibc_max: "<<ibc_max<<ENDM;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// ILOG(Warning)<<histo->GetName()<<" entries: "<< bc_projection->GetEntries()<<" channel: "<<channel<<" ibc: "<<ibc<<" ibc_max: "<<ibc_max<<ENDM;

Comment on lines +52 to +53
if (stdv < 0.5)
stdv = 0.5;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (stdv < 0.5)
stdv = 0.5;
if (stdv < 0.5) {
stdv = 0.5;
}

@andreasmolander
Copy link
Copy Markdown
Collaborator

No need to merge yet. We noticed more changes are needed, I will take care of these, including Piotr's points.

@andreasmolander
Copy link
Copy Markdown
Collaborator

Closing as the functionality was included in: #2130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants