12 #include "larevt/CalibrationDBI/Interface/DetPedestalProvider.h" 13 #include "larevt/CalibrationDBI/Interface/DetPedestalService.h" 33 void Draw(
const std::string&,
float,
float)
override;
70 fMinimum = std::numeric_limits<float>::max();
71 fMaximum = std::numeric_limits<float>::lowest();
76 event->getByLabel(rawDataLabel, rawDigitVecHandle);
78 if (!rawDigitVecHandle.
isValid())
continue;
80 for (
size_t rawDigitIdx = 0; rawDigitIdx < rawDigitVecHandle->size(); rawDigitIdx++) {
83 if (rawDigit->
Channel() != channel)
continue;
86 const lariov::DetPedestalProvider& pedestalRetrievalAlg =
92 if (rawOpt->
fPedestalOption == 0) { pedestal = pedestalRetrievalAlg.PedMean(channel); }
102 <<
". Pedestals not subtracted.";
105 std::vector<short> uncompressed(rawDigit->
Samples());
110 for (
size_t idx = 0; idx < uncompressed.size(); idx++) {
111 float signalVal = float(uncompressed[idx]) - pedestal;
113 histPtr->Fill(
float(idx) + 0.5, signalVal);
116 short minimumVal = *std::min_element(uncompressed.begin(), uncompressed.end());
117 short maximumVal = *std::max_element(uncompressed.begin(), uncompressed.end());
119 fMinimum = float(minimumVal) - pedestal;
120 fMaximum = float(maximumVal) - pedestal;
122 histPtr->SetLineColor(kBlack);
135 histPtr->SetMaximum(maxHiVal);
136 histPtr->SetMinimum(maxLowVal);
138 histPtr->Draw(options.c_str());
153 int numBins = numTicks;
156 "fRAWQHisto",
";t [ticks];q [ADC]", numBins, startTick, startTick + numTicks);
160 histPtr->SetMaximum(cst->
fRawQHigh[(
size_t)sigType]);
161 histPtr->SetMinimum(cst->
fRawQLow[(
size_t)sigType]);
163 histPtr->SetLineColor(kBlack);
164 histPtr->SetLineWidth(1);
166 histPtr->GetXaxis()->SetLabelSize(0.10);
167 histPtr->GetXaxis()->SetLabelOffset(0.01);
168 histPtr->GetXaxis()->SetTitleSize(0.10);
169 histPtr->GetXaxis()->SetTitleOffset(0.60);
171 histPtr->GetYaxis()->SetLabelSize(0.10);
172 histPtr->GetYaxis()->SetLabelOffset(0.002);
173 histPtr->GetYaxis()->SetTitleSize(0.10);
174 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.
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
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.
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 ...
Event finding and building.