Project
Loading...
Searching...
No Matches
NoiseCalibrator.h
Go to the documentation of this file.
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
13
14#ifndef O2_MFT_NOISECALIBRATOR
15#define O2_MFT_NOISECALIBRATOR
16
17#include <string>
18
23#include "gsl/span"
24
25namespace o2
26{
27
28namespace itsmft
29{
30class Digit;
31class ROFRecord;
32} // namespace itsmft
33
34namespace mft
35{
36
38{
39 public:
40 NoiseCalibrator() = default;
41 NoiseCalibrator(float prob, float relErr = 0.2) : mProbabilityThreshold(prob), mProbRelErr(relErr)
42 {
43 mMinROFs = 1.1 * o2::itsmft::NoiseMap::getMinROFs(prob, relErr);
44 LOGP(info, "Expect at least {} ROFs needed to apply threshold {} with relative error {}", mMinROFs, mProbabilityThreshold, mProbRelErr);
45 }
46 ~NoiseCalibrator() = default;
47
49 gsl::span<const o2::itsmft::Digit> const& digits,
50 gsl::span<const o2::itsmft::ROFRecord> const& rofs);
51
53 gsl::span<const o2::itsmft::CompClusterExt> const& clusters,
54 gsl::span<const unsigned char> const& patterns,
55 gsl::span<const o2::itsmft::ROFRecord> const& rofs);
56
57 void finalize();
58 void setMinROFs(long n) { mMinROFs = n; }
60
61 const o2::itsmft::NoiseMap& getNoiseMap() const { return mNoiseMap; }
62
63 private:
64 const o2::itsmft::TopologyDictionary* mDict = nullptr;
65 o2::itsmft::NoiseMap mNoiseMap{936};
66 float mProbabilityThreshold = 1e-6f;
67 float mProbRelErr = 0.2; // relative error on channel noise to apply the threshold
68 long mMinROFs = 0;
69 unsigned int mNumberOfStrobes = 0;
70};
71
72} // namespace mft
73} // namespace o2
74
75#endif /* O2_MFT_NOISECALIBRATOR */
Definition of the ClusterTopology class.
Definition of the ITSMFT NoiseMap.
NoiseMap class for the ITS and MFT.
Definition NoiseMap.h:39
static long getMinROFs(float t, float relErr)
Definition NoiseMap.h:197
NoiseCalibrator(float prob, float relErr=0.2)
bool processTimeFrame(calibration::TFType tf, gsl::span< const o2::itsmft::Digit > const &digits, gsl::span< const o2::itsmft::ROFRecord > const &rofs)
void setClusterDictionary(const o2::itsmft::TopologyDictionary *d)
const o2::itsmft::NoiseMap & getNoiseMap() const
GLdouble n
Definition glcorearb.h:1982
uint32_t TFType
Definition TimeSlot.h:29
o2::cpv::Digit Digit
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::unique_ptr< GPUReconstructionTimeframe > tf
std::vector< Cluster > clusters
std::vector< Digit > digits