CondFormats
SiPixelObjects
interface
SiPixelVCal.h
Go to the documentation of this file.
1
#ifndef SiPixelVCal_h
2
#define SiPixelVCal_h
3
#include <cstdint>
4
#include <iostream>
5
#include <map>
6
#include <vector>
7
#include "
CondFormats/Serialization/interface/Serializable.h
"
8
9
class
SiPixelVCal
{
10
public
:
11
SiPixelVCal
(){};
12
~SiPixelVCal
(){};
13
14
struct
VCal
{
15
float
slope
= 47.;
16
float
offset
= -60.;
17
COND_SERIALIZABLE
;
18
};
19
20
inline
void
putSlopeAndOffset
(std::map<unsigned int, VCal>& vcal) {
m_vcal
= vcal; }
21
inline
const
std::map<unsigned int, VCal>&
getSlopeAndOffset
()
const
{
return
m_vcal
; }
22
bool
putSlopeAndOffset
(
const
uint32_t&,
float
&,
float
&);
23
VCal
getSlopeAndOffset
(
const
uint32_t&)
const
;
24
float
getSlope
(
const
uint32_t&)
const
;
25
float
getOffset
(
const
uint32_t&)
const
;
26
// uint32_t is pixid, see CondTools/SiPixel/test/SiPixelVCalDB.h
27
28
private
:
29
// Convert VCal to #electrons, which changes with irradiation and varies
30
// between pixel layers & disks
31
// #electrons = slope * VCal + offset
32
// with
33
// slope ~ 47 (50 for L1)
34
// offset ~ -60 (-670 for L1)
35
std::map<unsigned int, VCal>
m_vcal
;
36
37
COND_SERIALIZABLE
;
38
};
39
40
#endif
SiPixelVCal::putSlopeAndOffset
void putSlopeAndOffset(std::map< unsigned int, VCal > &vcal)
Definition:
SiPixelVCal.h:20
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition:
Serializable.h:39
SiPixelVCal::getSlope
float getSlope(const uint32_t &) const
Definition:
SiPixelVCal.cc:26
SiPixelVCal::SiPixelVCal
SiPixelVCal()
Definition:
SiPixelVCal.h:11
SiPixelVCal
Definition:
SiPixelVCal.h:9
SiPixelVCal::m_vcal
std::map< unsigned int, VCal > m_vcal
Definition:
SiPixelVCal.h:35
SiPixelVCal::VCal
Definition:
SiPixelVCal.h:14
SiPixelVCal::getSlopeAndOffset
const std::map< unsigned int, VCal > & getSlopeAndOffset() const
Definition:
SiPixelVCal.h:21
Serializable.h
SiPixelVCal::getOffset
float getOffset(const uint32_t &) const
Definition:
SiPixelVCal.cc:35
SiPixelVCal::~SiPixelVCal
~SiPixelVCal()
Definition:
SiPixelVCal.h:12
SiPixelVCal::VCal::slope
float slope
Definition:
SiPixelVCal.h:15
SiPixelVCal::VCal::offset
float offset
Definition:
SiPixelVCal.h:16
Generated for CMSSW Reference Manual by
1.8.16