Skip to content

Commit dedd44e

Browse files
wpierozakWiktor Pierozak
authored andcommitted
FT0 laser ageing postproc qc - implemented amplitude cut (#2669)
* Implemented amplitude cut * fix: added missing assigment of maxValue in loop that searches for max bin * Renamed amplitude cut parameter to ageing post proc task. Changed implementaion of finding amplitude maximum above cut * Changed default amplitude cut to 0 in aging post proc * Removed white spaces --------- Co-authored-by: Wiktor Pierozak <wpieroza@alifitlab010.dyndns.cern.ch>
1 parent 894e4e4 commit dedd44e

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

Modules/FIT/FT0/include/FT0/AgingLaserPostProcTask.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ class AgingLaserPostProcTask final : public quality_control::postprocessing::Pos
6565
double mFracWindowA = 0.25; ///< low fractional window parameter a
6666
double mFracWindowB = 0.25; ///< high fractional window parameter b
6767

68+
/// Amplitude cut
69+
int mDetectorAmpCut = 0;
70+
const int mAmplLimit = 4096;
6871
std::unique_ptr<TH1F> mAmpVsChNormWeightedMeanA;
6972
std::unique_ptr<TH1F> mAmpVsChNormWeightedMeanC;
7073
std::unique_ptr<TH1F> mAmpVsChNormWeightedMeanAfterLastCorrA;
@@ -77,4 +80,4 @@ class AgingLaserPostProcTask final : public quality_control::postprocessing::Pos
7780

7881
} // namespace o2::quality_control_modules::ft0
7982

80-
#endif // QC_MODULE_FT0_AGINGLASERPOSTPROC_H
83+
#endif // QC_MODULE_FT0_AGINGLASERPOSTPROC_H

Modules/FIT/FT0/src/AgingLaserPostProcTask.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ void AgingLaserPostProcTask::configure(const boost::property_tree::ptree& cfg)
4545
mAgingLaserPath = o2::quality_control_modules::common::getFromConfig<std::string>(mCustomParameters, "agingLaserTaskPath", mAgingLaserPath);
4646
mAgingLaserPostProcPath = o2::quality_control_modules::common::getFromConfig<std::string>(mCustomParameters, "agingLaserPostProcPath", mAgingLaserPostProcPath);
4747

48+
mDetectorAmpCut = o2::quality_control_modules::common::getFromConfig<double>(mCustomParameters, "detectorAmpCut", mDetectorAmpCut);
49+
4850
mDetectorChIDs.resize(208);
4951
std::iota(mDetectorChIDs.begin(), mDetectorChIDs.end(), 0);
5052
const std::string detSkip =
@@ -248,8 +250,8 @@ void AgingLaserPostProcTask::update(Trigger t, framework::ServiceRegistryRef srv
248250
auto processChannel = [&](uint8_t chId) {
249251
auto h1 = std::unique_ptr<TH1>(h2AmpPerChannel->ProjectionY(
250252
Form("proj_%d", chId), chId + 1, chId + 1));
251-
252253
// global maximum
254+
h1->GetXaxis()->SetRangeUser(mDetectorAmpCut, mAmplLimit);
253255
const int binMax = h1->GetMaximumBin();
254256
const double xMax = h1->GetBinCenter(binMax);
255257
const double winLo = TMath::Max(0., (1. - mFracWindowA) * xMax);
@@ -304,4 +306,4 @@ void AgingLaserPostProcTask::finalize(Trigger, framework::ServiceRegistryRef)
304306
ILOG(Debug, Devel) << "finalize AgingLaserPostProcTask" << ENDM;
305307
}
306308

307-
} // namespace o2::quality_control_modules::ft0
309+
} // namespace o2::quality_control_modules::ft0

0 commit comments

Comments
 (0)