CbmRoot
Loading...
Searching...
No Matches
BmonHitfindQa.h
Go to the documentation of this file.
1/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
12#include "PODVector.h"
13#include "PartitionedVector.h"
14#include "qa/QaTaskHeader.h"
16
17class CbmBmonDigi;
18
19namespace cbm::algo
20{
21 namespace qa
22 {
23 class H1D;
24 class H2D;
25 } // namespace qa
26
27 namespace bmon
28 {
29 class Hit;
30 }
31} // namespace cbm::algo
32
33namespace cbm::algo::bmon
34{
37 class HitfindQa : public qa::TaskHeader {
38 public:
42 HitfindQa(const std::unique_ptr<qa::Manager>& pManager, std::string_view name) : qa::TaskHeader(pManager, name) {}
43
45 HitfindQa() = default;
46
48 HitfindQa(const HitfindQa&) = delete;
49
51 HitfindQa(HitfindQa&&) = delete;
52
54 ~HitfindQa() = default;
55
57 HitfindQa& operator=(const HitfindQa&) = delete;
58
61
63 void Exec();
64
66 void Init();
67
69 void InitParameters(const CalibrateSetup& calSetup, const HitfindSetup& hitSetup)
70 {
71 fParameters = std::move(HitfindQaParameters(calSetup, hitSetup));
72 }
73
76 void RegisterDigis(const std::vector<CbmBmonDigi>* pDigis) { fpDigis = pDigis; }
77
80 void RegisterHits(const PartitionedVector<bmon::Hit>* pHits) { fpHits = pHits; }
81
84 void RegisterDigiIndices(const PODVector<int32_t>* pDigiIndices) { fpDigiIndices = pDigiIndices; }
85
86 private:
87 //* Constants
88 static constexpr int kChrgB = 150;
89 static constexpr double kChrgL = 0.;
90 static constexpr double kChrgU = 150.;
91 static constexpr int kDtimeB = 40;
92 static constexpr double kDtimeL = 0.;
93 static constexpr double kDtimeU = 2.0;
94
95 //* Parameters
97
98 //* Data samples
99 const std::vector<CbmBmonDigi>* fpDigis{nullptr};
102
103 //* Histograms
104 std::vector<qa::H1D*> fvphDigiOccupVsChan;
105 std::vector<qa::H2D*> fvphDigiChargeVsChan;
106 std::vector<qa::H1D*> fvphHitNofChan;
107 std::vector<qa::H1D*> fvphHitTimeDiff;
108 };
109} // namespace cbm::algo::bmon
A BMON hitfinder QA parameter configuration.
A header for a particular QA task, must be inherited by a given QA task.
Data class for a signal in the t-zero detector.
Definition CbmBmonDigi.h:31
A vector that is partitioned into multiple subvectors.
A QA module for the BMON hit-finder.
std::vector< qa::H1D * > fvphHitNofChan
Hit number of channels [diamond].
const std::vector< CbmBmonDigi > * fpDigis
Pointer to BMON digi sample.
static constexpr double kDtimeU
digi time difference: upper bound [ns]
HitfindQa & operator=(HitfindQa &&)=delete
Move assignment operator.
std::vector< qa::H1D * > fvphHitTimeDiff
Time difference of two digis in a hit [diamond].
HitfindQa(HitfindQa &&)=delete
Move constructor.
std::vector< qa::H1D * > fvphDigiOccupVsChan
Digi occupancy vs. channel [diamond].
void RegisterDigiIndices(const PODVector< int32_t > *pDigiIndices)
Registers a sample of digi indices, used by hits.
HitfindQa()=default
Constructor from the configuration object.
HitfindQa & operator=(const HitfindQa &)=delete
Copy assignment operator.
void Exec()
Executes the task, fills the histograms.
const PODVector< int32_t > * fpDigiIndices
Pointer to BMON digi indices, used by hits.
~HitfindQa()=default
Destructor.
void RegisterHits(const PartitionedVector< bmon::Hit > *pHits)
Registers a sample of hits.
void InitParameters(const CalibrateSetup &calSetup, const HitfindSetup &hitSetup)
Initialisation of the parameters.
static constexpr double kChrgU
charge scale: upper bound
static constexpr int kChrgB
charge scale: number of bins
const PartitionedVector< bmon::Hit > * fpHits
Pointer to BMON hit sample.
std::vector< qa::H2D * > fvphDigiChargeVsChan
Digi charge vs channel [diamond].
static constexpr double kChrgL
charge scale: lower bound
void RegisterDigis(const std::vector< CbmBmonDigi > *pDigis)
Registers a sample of digis.
static constexpr double kDtimeL
digi time difference: lower bound [ns]
HitfindQa(const std::unique_ptr< qa::Manager > &pManager, std::string_view name)
Constructor.
static constexpr int kDtimeB
digi time difference: number of bins
HitfindQaParameters fParameters
Parameters of the hit finder QA.
void Init()
Initialized the task.
HitfindQa(const HitfindQa &)=delete
Copy constructor.
An interface to the qa::Manager.
TaskHeader(const std::unique_ptr< Manager > &pManager, std::string_view name)
Constructor.
std::vector< T, PODAllocator< T > > PODVector
PODVector is a std::vector that doesn't initialize its elements.
Definition PODVector.h:17
BMON calibration per channel.
A structure to handle BMON QA parameters.
Parameters for the BMON hitfinder.