Belle II Software
release-05-01-25
CDCDedxWireGain.h
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2015 - Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Jake Bennett *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#pragma once
12
13
#include <framework/logging/Logger.h>
14
15
#include <TObject.h>
16
17
namespace
Belle2
{
27
class
CDCDedxWireGain:
public
TObject {
28
29
public
:
30
34
CDCDedxWireGain
():
m_wiregains
() {};
35
39
explicit
CDCDedxWireGain
(
const
std::vector<double>& wiregains):
m_wiregains
(wiregains) {};
40
44
~CDCDedxWireGain
() {};
45
49
CDCDedxWireGain
&
operator*=
(
CDCDedxWireGain
const
& rhs)
50
{
51
for
(
unsigned
int
bin = 0; bin <
m_wiregains
.size(); ++bin) {
52
m_wiregains
[bin] *= rhs.getWireGain(bin);
53
}
54
return
*
this
;
55
}
56
60
void
setWireGain
(
int
wire,
double
gain)
61
{
62
if
(wire < 0 || (
unsigned
)wire >=
m_wiregains
.size())
63
B2WARNING(
"Asking for a CDC Wire that is not found!"
);
64
else
m_wiregains
[wire] = gain;
65
}
66
70
float
getWireGain
(
int
wire)
const
71
{
72
if
(wire < 0 || (
unsigned
)wire >=
m_wiregains
.size()) {
73
B2WARNING(
"Asking for a CDC Wire that is not found!"
);
74
return
1.0;
75
}
76
double
gain =
m_wiregains
[wire];
77
return
gain;
78
};
79
80
private
:
85
std::vector<double>
m_wiregains
;
88
ClassDef
(
CDCDedxWireGain
, 5);
89
};
91
}
// end namespace Belle2
Belle2::CDCDedxWireGain::ClassDef
ClassDef(CDCDedxWireGain, 5)
ClassDef.
Belle2::CDCDedxWireGain::getWireGain
float getWireGain(int wire) const
Return wire gain.
Definition:
CDCDedxWireGain.h:78
Belle2::CDCDedxWireGain::m_wiregains
std::vector< double > m_wiregains
Note, we are using dense packed wire number (0-14336) defined as follows: const int iwire = (superlay...
Definition:
CDCDedxWireGain.h:86
Belle2::CDCDedxWireGain::setWireGain
void setWireGain(int wire, double gain)
Set wire gain.
Definition:
CDCDedxWireGain.h:68
Belle2::CDCDedxWireGain::operator*=
CDCDedxWireGain & operator*=(CDCDedxWireGain const &rhs)
Combine payloads.
Definition:
CDCDedxWireGain.h:57
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::CDCDedxWireGain::CDCDedxWireGain
CDCDedxWireGain()
Default constructor.
Definition:
CDCDedxWireGain.h:42
Belle2::CDCDedxWireGain::~CDCDedxWireGain
~CDCDedxWireGain()
Destructor.
Definition:
CDCDedxWireGain.h:52
Belle2::CDCDedxWireGain
dE/dx wire gain calibration constants
Definition:
CDCDedxWireGain.h:35
reconstruction
dbobjects
include
CDCDedxWireGain.h
Generated on Fri Nov 5 2021 03:57:00 for Belle II Software by
1.8.17