Adding Laser Aging Task with adjustable amplitude cut#1990
Adding Laser Aging Task with adjustable amplitude cut#1990sandor-lokos wants to merge 4 commits into
Conversation
…bility to cut on amplitudes from config
| unsigned int costumAmplCut = 0; | ||
| for (const auto& cutAmpl : mSetAmpCut) { | ||
| costumAmplCut = cutAmpl; | ||
| } |
There was a problem hiding this comment.
I think some change is needed here, either the amp cut is channel wise or it is not?
knopers8
left a comment
There was a problem hiding this comment.
I have only some suggestions regarding adherence to the O2 coding guidelines and removing the leftovers from the class skeleton.
| #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" |
There was a problem hiding this comment.
| #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> |
| // granted to it by virtue of its status as an Intergovernmental Organization | ||
| // or submit itself to any jurisdiction. | ||
| /// \file LaserAgingFT0Task.cxx | ||
| /// \author My Name |
There was a problem hiding this comment.
| /// \author My Name | |
| /// \author Sandor Lokos |
| // 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. |
There was a problem hiding this comment.
| // 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
| for (auto& entry : mMapHistAmpVsBCADC0) | ||
| entry.second->Reset(); | ||
| for (auto& entry : mMapHistAmpVsBCADC1) | ||
| entry.second->Reset(); |
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
| // THUS FUNCTION BODY IS AN EXAMPLE. PLEASE REMOVE EVERYTHING YOU DO NOT NEED. |
| 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)); |
There was a problem hiding this comment.
| 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)); | |
| } |
| // THUS FUNCTION BODY IS AN EXAMPLE. PLEASE REMOVE EVERYTHING YOU DO NOT NEED. | ||
|
|
||
| // clean all the monitor objects here | ||
|
|
There was a problem hiding this comment.
| // 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; |
There was a problem hiding this comment.
| 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; |
There was a problem hiding this comment.
| // ILOG(Warning)<<histo->GetName()<<" entries: "<< bc_projection->GetEntries()<<" channel: "<<channel<<" ibc: "<<ibc<<" ibc_max: "<<ibc_max<<ENDM; |
| if (stdv < 0.5) | ||
| stdv = 0.5; |
There was a problem hiding this comment.
| if (stdv < 0.5) | |
| stdv = 0.5; | |
| if (stdv < 0.5) { | |
| stdv = 0.5; | |
| } |
|
No need to merge yet. We noticed more changes are needed, I will take care of these, including Piotr's points. |
|
Closing as the functionality was included in: #2130 |
Aging monitoring task is implemented with an additional configurable parameter that perform cut on the amplitude.