14 #include <type_traits> 20 #include "TMarker3DBox.h" 22 #include "TVirtualPad.h" 26 #include "nuevdb/EventDisplayBase/View3D.h" 27 #include "nuevdb/EventDisplayBase/EventHolder.h" 45 #include "cetlib_except/demangle.h" 47 #include "TPolyLine.h" 48 #include "TPolyLine3D.h" 56 void writeErrMsg(
const char* fcn,
60 <<
" failed with message:\n" 72 fEventTQHist = (TH1F*)
new TH1F(
"eventTQHist",
"ADC Sum vs Time, All Channels;time (ticks);ADC Sum",100,0,10000);
73 fDigitTQHist = (TH1F*)
new TH1F(
"digitTQHist",
"ADC Sum vs Time, One Channel;time (ticks);ADC Sum",100,0,10000);
87 uncompressed.resize(dig.
Samples());
90 for(
size_t t = 0;
t < uncompressed.size(); ++
t)
91 histo->Fill(
t, 1. * uncompressed[
t] - 1. * dig.
Pedestal());
106 auto fTime = gar::providerFrom<detinfo::DetectorClocksServiceGAr>();
107 auto detProp = gar::providerFrom<detinfo::DetectorPropertiesService>();
109 double driftVelocity = detProp->DriftVelocity(detProp->Efield(),
110 detProp->Temperature());
112 if(rawopt->fDrawRawOrReco > 0)
return;
114 std::vector<const raw::RawDigit*> rawhits;
123 for(
auto dig : rawhits){
126 if(dig->Channel() == rawopt->fChannel)
133 geom->ChannelToPosition((
unsigned int)dig->Channel(),
137 double chanposx = xyz[0];
152 uncompressed.resize(dig->Samples());
153 short ped = dig->Pedestal();
156 for(
size_t t = 0;
t < dig->Samples(); ++
t){
159 double driftdistance = fTime->TPCTick2Time(
t) * driftVelocity;
163 xyz[0] = chanposx + driftdistance;
167 xyz[0] = chanposx - driftdistance;
195 TPolyLine3D& rdpos = view->AddPolyLine3D(2,c2,w2,s2);
196 rdpos.SetPoint(0,xyz[2],xyz[0]-0.3,xyz[1]);
197 rdpos.SetPoint(1,xyz[2],xyz[0]+0.3,xyz[1]);
207 std::vector<const raw::RawDigit*> & digits)
213 std::vector<const raw::RawDigit*>
temp;
216 evt.
getView(rawopt->fRawDataLabel, temp);
217 for(
size_t t = 0;
t < temp.size(); ++
t){
218 digits.push_back(temp[
t]);
222 writeErrMsg(
"GetDigits", e);
std::vector< ADC_t > ADCvector_t
void RawDigit3D(art::Event const &evt, evdb::View3D *view)
Draws raw digit content in 2D wire plane representation.
void GetRawDigits(art::Event const &evt, std::vector< const raw::RawDigit * > &digits)
Makes sure raw::RawDigit's are available for the current settings.
gar::raw::Compress_t Compression() const
Compression algorithm selector.
TH1F * fDigitTQHist
Charge vs time for a single channel in an event.
TH1F * fEventTQHist
Charge vs time for all digits in an event.
double fMinSignal
minimum ADC count to display a time bin
const ADCvector_t & ADCs() const
Reference to the compressed ADC count vector.
General GArSoft Utilities.
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, std::vector< ELEMENT const * > &result) const
void Uncompress(const gar::raw::ADCvector_t &adc, gar::raw::ADCvector_t &uncompressed, gar::raw::Compress_t compress)
Uncompresses a raw data buffer.
void FillQHisto(gar::raw::RawDigit const &dig, TH1F *histo)
art framework interface to geometry description
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
Collection of charge vs time digitized from a single readout channel.
cet::coded_exception< error, detail::translate > exception