Project
Loading...
Searching...
No Matches
PedestalChannel.cxx
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
12
#include "
MCHCalibration/PedestalChannel.h
"
13
#include <cmath>
14
#include <fmt/core.h>
15
#include <fmt/format.h>
16
#include <iostream>
17
18
namespace
o2::mch::calibration
19
20
{
21
double
PedestalChannel::getRms()
const
22
{
23
return
mEntries
> 0 ? std::sqrt(
mVariance
/
mEntries
) : std::numeric_limits<double>::max();
24
}
25
26
bool
PedestalChannel::isValid()
const
27
{
28
return
dsChannelId
.
isValid
();
29
}
30
31
std::string PedestalChannel::asString()
const
32
{
33
return
fmt::format(
"{} entries {:8d} mean {:7.2f} mVariance {:7.2f} rms {:7.2f}"
,
34
dsChannelId
.
asString
(),
mEntries
,
mPedestal
,
mVariance
,
getRms
());
35
}
36
37
std::ostream&
operator<<
(std::ostream& os,
const
PedestalChannel
&
c
)
38
{
39
os <<
c
.asString();
40
return
os;
41
}
42
43
}
// namespace o2::mch::calibration
PedestalChannel.h
c
uint32_t c
Definition
RawData.h:2
o2::mch::DsChannelId::asString
std::string asString() const
Definition
DsChannelId.cxx:18
o2::mch::DsChannelId::isValid
bool isValid() const
Definition
DsChannelId.h:57
o2::mch::calibration
Definition
BadChannelCalibrator.h:28
o2::operator<<
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)
Definition
InteractionRecord.cxx:23
o2::mch::calibration::PedestalChannel
Pedestal mean and sigma for one channel.
Definition
PedestalChannel.h:26
o2::mch::calibration::PedestalChannel::mVariance
double mVariance
variance
Definition
PedestalChannel.h:29
o2::mch::calibration::PedestalChannel::mEntries
int mEntries
number of entries used so far for the mean and variance
Definition
PedestalChannel.h:27
o2::mch::calibration::PedestalChannel::mPedestal
double mPedestal
mean
Definition
PedestalChannel.h:28
o2::mch::calibration::PedestalChannel::dsChannelId
DsChannelId dsChannelId
identifier of the channel
Definition
PedestalChannel.h:30
o2::mch::calibration::PedestalChannel::getRms
double getRms() const
Definition
PedestalChannel.cxx:21
Detectors
MUON
MCH
Calibration
src
PedestalChannel.cxx
Generated on Tue Nov 17 2026 08:58:26 for Project by
1.9.8