|
| 1 | +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. |
| 2 | +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. |
| 3 | +// All rights not expressly granted are reserved. |
| 4 | +// |
| 5 | +// This software is distributed under the terms of the GNU General Public |
| 6 | +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". |
| 7 | +// |
| 8 | +// In applying this license CERN does not waive the privileges and immunities |
| 9 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 10 | +// or submit itself to any jurisdiction. |
| 11 | + |
| 12 | +/// |
| 13 | +/// \file PulseHeightTrackMatch.h |
| 14 | +/// \author Vikash Sumberia |
| 15 | +/// |
| 16 | + |
| 17 | +#ifndef QC_MODULE_TRD_TRDPULSEHEIGHTTRACKMATCH_H |
| 18 | +#define QC_MODULE_TRD_TRDPULSEHEIGHTTRACKMATCH_H |
| 19 | + |
| 20 | +#include "QualityControl/TaskInterface.h" |
| 21 | +#include <array> |
| 22 | +#include "DataFormatsTRD/NoiseCalibration.h" |
| 23 | +#include "DataFormatsTRD/Digit.h" |
| 24 | +#include "DataFormatsTRD/Constants.h" |
| 25 | +#include "TRDQC/StatusHelper.h" |
| 26 | + |
| 27 | +class TH1F; |
| 28 | +class TH2F; |
| 29 | +class TH1D; |
| 30 | +class TH2D; |
| 31 | +class TLine; |
| 32 | +class TProfile; |
| 33 | +class TProfile2D; |
| 34 | + |
| 35 | +using namespace o2::quality_control::core; |
| 36 | + |
| 37 | +namespace o2::quality_control_modules::trd |
| 38 | +{ |
| 39 | + |
| 40 | +/// \brief Example Quality Control DPL Task |
| 41 | +/// \author My Name |
| 42 | +class PulseHeightTrackMatch final : public TaskInterface |
| 43 | +{ |
| 44 | + public: |
| 45 | + /// \brief Constructor |
| 46 | + PulseHeightTrackMatch() = default; |
| 47 | + /// Destructor |
| 48 | + ~PulseHeightTrackMatch() override; |
| 49 | + |
| 50 | + // Definition of the methods for the template method pattern |
| 51 | + void initialize(o2::framework::InitContext& ctx) override; |
| 52 | + void startOfActivity(Activity& activity) override; |
| 53 | + void startOfCycle() override; |
| 54 | + void monitorData(o2::framework::ProcessingContext& ctx) override; |
| 55 | + void endOfCycle() override; |
| 56 | + void endOfActivity(Activity& activity) override; |
| 57 | + void reset() override; |
| 58 | + void buildHistograms(); |
| 59 | + void drawLinesMCM(TH2F* histo); |
| 60 | + void drawTrdLayersGrid(TH2F* hist); |
| 61 | + void retrieveCCDBSettings(); |
| 62 | + void drawLinesOnPulseHeight(TH1F* h); |
| 63 | + void fillLinesOnHistsPerLayer(int iLayer); |
| 64 | + void drawHashOnLayers(int layer, int hcid, int col, int rowstart, int rowend); |
| 65 | + void buildChamberIgnoreBP(); |
| 66 | + bool isChamberToBeIgnored(unsigned int sm, unsigned int stack, unsigned int layer); |
| 67 | + |
| 68 | + private: |
| 69 | + // limits |
| 70 | + bool mSkipSharedDigits; |
| 71 | + unsigned int mPulseHeightThreshold; |
| 72 | + std::pair<float, float> mDriftRegion; |
| 73 | + std::pair<float, float> mPulseHeightPeakRegion; |
| 74 | + long int mTimestamp; |
| 75 | + std::shared_ptr<TH1F> mParsingTimePerTF; |
| 76 | + std::shared_ptr<TH1F> mDigitsPerEvent; |
| 77 | + std::shared_ptr<TH1F> mTrackletsPerEvent; |
| 78 | + std::shared_ptr<TH1F> mTracksPerEvent; |
| 79 | + std::shared_ptr<TH1F> mTrackletsPerMatchedTrack; |
| 80 | + std::shared_ptr<TH1F> mTriggerPerTF; |
| 81 | + std::shared_ptr<TH1F> mTriggerWDigitPerTF; |
| 82 | + std::shared_ptr<TProfile> mPulseHeightpro = nullptr; |
| 83 | + std::shared_ptr<TProfile2D> mPulseHeightperchamber = nullptr; |
| 84 | + std::vector<TH2F*> mLayers; |
| 85 | + |
| 86 | + // information pulled from ccdb |
| 87 | + o2::trd::NoiseStatusMCM* mNoiseMap = nullptr; |
| 88 | + o2::trd::HalfChamberStatusQC* mChamberStatus = nullptr; |
| 89 | + std::string mChambersToIgnore; |
| 90 | + std::bitset<o2::trd::constants::MAXCHAMBER> mChambersToIgnoreBP; |
| 91 | +}; |
| 92 | + |
| 93 | +} // namespace o2::quality_control_modules::trd |
| 94 | + |
| 95 | +#endif // QC_MODULE_TRD_TRDPULSEHEIGHTTRACKMATCH_H |
0 commit comments