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 <iostream>
16
17
namespace
o2::mch::calibration
18
19
{
20
double
PedestalChannel::getRms()
const
21
{
22
return
mEntries
> 0 ? std::sqrt(
mVariance
/
mEntries
) : std::numeric_limits<double>::max();
23
}
24
25
bool
PedestalChannel::isValid()
const
26
{
27
return
dsChannelId
.
isValid
();
28
}
29
30
std::string PedestalChannel::asString()
const
31
{
32
return
fmt::format(
"{} entries {:8d} mean {:7.2f} mVariance {:7.2f} rms {:7.2f}"
,
33
dsChannelId
.
asString
(),
mEntries
,
mPedestal
,
mVariance
,
getRms
());
34
}
35
36
std::ostream&
operator<<
(std::ostream& os,
const
PedestalChannel
&
c
)
37
{
38
os <<
c
.asString();
39
return
os;
40
}
41
42
}
// 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:17
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:25
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:20
Detectors
MUON
MCH
Calibration
src
PedestalChannel.cxx
Generated on Tue Feb 25 2025 23:16:22 for Project by
1.9.8