12 #include "larevt/CalibrationDBI/Interface/DetPedestalProvider.h" 13 #include "larevt/CalibrationDBI/Interface/DetPedestalService.h" 35 void Draw(
const std::string&,
float,
float)
override;
77 fMinimum = std::numeric_limits<float>::max();
78 fMaximum = std::numeric_limits<float>::lowest();
83 event->getByLabel(rawDataLabel, rawDigitVecHandle);
85 if (!rawDigitVecHandle.
isValid())
continue;
87 for (
size_t rawDigitIdx = 0; rawDigitIdx < rawDigitVecHandle->size(); rawDigitIdx++) {
90 if (rawDigit->
Channel() != channel)
continue;
93 const lariov::DetPedestalProvider& pedestalRetrievalAlg =
99 if (rawOpt->
fPedestalOption == 0) { pedestal = pedestalRetrievalAlg.PedMean(channel); }
109 <<
". Pedestals not subtracted.";
112 std::vector<short> uncompressed(rawDigit->
Samples());
117 for (
size_t idx = 0; idx < uncompressed.size(); idx++) {
118 float signalVal = float(uncompressed[idx]) - pedestal;
120 histPtr->Fill(
float(idx) + 0.5, signalVal);
123 short minimumVal = *std::min_element(uncompressed.begin(), uncompressed.end());
124 short maximumVal = *std::max_element(uncompressed.begin(), uncompressed.end());
126 fMinimum = float(minimumVal) - pedestal;
127 fMaximum = float(maximumVal) - pedestal;
129 histPtr->SetLineColor(kBlack);
144 histPtr->SetMaximum(maxHiVal);
145 histPtr->SetMinimum(maxLowVal);
147 histPtr->Draw(options.c_str());
164 int numBins = numTicks;
167 "fRAWQHisto",
";t [ticks];q [ADC]", numBins, startTick, startTick + numTicks);
171 histPtr->SetMaximum(cst->
fRawQHigh[(
size_t)sigType]);
172 histPtr->SetMinimum(cst->
fRawQLow[(
size_t)sigType]);
174 histPtr->SetLineColor(kBlack);
175 histPtr->SetLineWidth(1);
177 histPtr->GetXaxis()->SetLabelSize(0.10);
178 histPtr->GetXaxis()->SetLabelOffset(0.01);
179 histPtr->GetXaxis()->SetTitleSize(0.10);
180 histPtr->GetXaxis()->SetTitleOffset(0.60);
182 histPtr->GetYaxis()->SetLabelSize(0.10);
183 histPtr->GetYaxis()->SetLabelOffset(0.002);
184 histPtr->GetYaxis()->SetTitleSize(0.10);
185 histPtr->GetYaxis()->SetTitleOffset(0.16);
float GetPedestal() const
const ADCvector_t & ADCs() const
Reference to the compressed ADC count vector.
const art::Event * GetEvent() const
std::vector< double > fRawQLow
low edge of ADC values for drawing raw digits
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
ChannelID_t Channel() const
DAQ channel this raw data was read from.
Definition of basic raw digits.
Singleton to hold the current art::Event for the event display.
bool isValid() const noexcept
The color scales used by the event display.
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
static EventHolder * Instance()
Collect all the RawData header files together.
std::vector< double > fRawQHigh
high edge of ADC values for drawing raw digits
raw::Compress_t Compression() const
Compression algorithm used to store the ADC counts.
SigType_t SignalType(PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::vector< art::InputTag > fRawDataLabels
module label that made the raw digits, default is daq
unsigned int ChannelID_t
Type representing the ID of a readout channel.
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
int fPedestalOption
0: use DetPedestalService; 1: Use pedestal in raw::RawDigt; 2: no ped subtraction ...
Namespace collecting geometry-related classes utilities.
art framework interface to geometry description
Event finding and building.