LDMX Software
tracking::reco::TrackerPedestals Class Reference

Per-channel tracker pedestal conditions: the per-sample pedestal mean and RMS noise for every silicon-strip readout channel. More...

#include <TrackerPedestals.h>

Classes

struct  Channel
 Per-channel pedestal mean and RMS noise for the three APV25 samples. More...
 

Public Member Functions

void add (uint8_t feb, uint8_t hybrid, uint8_t apv, uint8_t channel, const Channel &ped)
 Insert the pedestal for one electronics channel.
 
const Channelfind (uint8_t feb, uint8_t hybrid, uint8_t apv, uint8_t channel) const
 Look up a channel; returns nullptr if the channel is not in the table.
 
float noise (uint8_t feb, uint8_t hybrid, uint8_t apv, uint8_t channel) const
 Scalar per-channel noise (mean of the three per-sample noises); 0 if the channel is absent.
 
std::size_t size () const
 Number of channels in the table.
 
- Public Member Functions inherited from framework::ConditionsObject
 ConditionsObject (const std::string &name)
 Class constructor.
 
virtual ~ConditionsObject ()
 Destructor.
 
std::string getName () const
 Get the name of this object.
 

Static Public Attributes

static const std::string CONDITIONS_NAME = "TrackerPedestals"
 Name of the conditions object (must match the python registration).
 

Private Attributes

std::unordered_map< uint32_t, Channelchannels_
 

Detailed Description

Per-channel tracker pedestal conditions: the per-sample pedestal mean and RMS noise for every silicon-strip readout channel.

This is a conditions object (a service), not event data: pedestals and noise are calibration constants delivered on demand via getCondition<>(), the same way Ecal/Hcal deliver their HGCROC pedestals/gains. Consumers (PedestalSubtractor, SiStripWaveformBuilder, ...) look up values by electronics address; nothing is persisted into the hit objects.

The object is filled by TrackerPedestalProvider, which reads the pedestal file produced by PedestalCalculator.

Definition at line 28 of file TrackerPedestals.h.

Constructor & Destructor Documentation

◆ TrackerPedestals()

tracking::reco::TrackerPedestals::TrackerPedestals ( )
inline

Definition at line 39 of file TrackerPedestals.h.

Base class for all conditions objects, very simple.
static const std::string CONDITIONS_NAME
Name of the conditions object (must match the python registration).

Member Function Documentation

◆ add()

void tracking::reco::TrackerPedestals::add ( uint8_t feb,
uint8_t hybrid,
uint8_t apv,
uint8_t channel,
const Channel & ped )
inline

Insert the pedestal for one electronics channel.

Definition at line 42 of file TrackerPedestals.h.

43 {
44 channels_[channelmap::channelId(feb, hybrid, apv, channel)] = ped;
45 }
constexpr uint32_t channelId(uint8_t feb, uint8_t hybrid, uint8_t apv, uint8_t channel)
Pack the full electronics address (feb, hybrid, apv, channel) into a single 32-bit id,...

References tracking::reco::channelmap::channelId().

◆ find()

const Channel * tracking::reco::TrackerPedestals::find ( uint8_t feb,
uint8_t hybrid,
uint8_t apv,
uint8_t channel ) const
inline

Look up a channel; returns nullptr if the channel is not in the table.

Definition at line 48 of file TrackerPedestals.h.

49 {
50 auto it = channels_.find(channelmap::channelId(feb, hybrid, apv, channel));
51 return it == channels_.end() ? nullptr : &it->second;
52 }

References tracking::reco::channelmap::channelId().

Referenced by noise().

◆ noise()

float tracking::reco::TrackerPedestals::noise ( uint8_t feb,
uint8_t hybrid,
uint8_t apv,
uint8_t channel ) const
inline

Scalar per-channel noise (mean of the three per-sample noises); 0 if the channel is absent.

Definition at line 56 of file TrackerPedestals.h.

56 {
57 const Channel* c = find(feb, hybrid, apv, channel);
58 if (!c) return 0.f;
59 const float sum =
60 std::accumulate(c->noise_.begin(), c->noise_.end(), 0.f);
61 return sum / static_cast<float>(c->noise_.size());
62 }
const Channel * find(uint8_t feb, uint8_t hybrid, uint8_t apv, uint8_t channel) const
Look up a channel; returns nullptr if the channel is not in the table.

References find().

◆ size()

std::size_t tracking::reco::TrackerPedestals::size ( ) const
inline

Number of channels in the table.

Definition at line 65 of file TrackerPedestals.h.

65{ return channels_.size(); }

Member Data Documentation

◆ channels_

std::unordered_map<uint32_t, Channel> tracking::reco::TrackerPedestals::channels_
private

Definition at line 68 of file TrackerPedestals.h.

◆ CONDITIONS_NAME

const std::string tracking::reco::TrackerPedestals::CONDITIONS_NAME = "TrackerPedestals"
static

Name of the conditions object (must match the python registration).

Definition at line 31 of file TrackerPedestals.h.

Referenced by tracking::reco::PedestalSubtractor::produce(), and tracking::reco::SiStripWaveformBuilder::produce().


The documentation for this class was generated from the following files: