10 #include "art/Framework/Services/Registry/ServiceHandle.h"
11 #include "art/Utilities/make_tool.h"
12 #include "cetlib_except/exception.h"
21 #include "nuevdb/EventDisplayBase/EventHolder.h"
22 #include "nuevdb/EventDisplayBase/View2D.h"
32 static const int kQ = 0;
33 static const int kTQ = 1;
46 :
DrawingPad(nm, ti, x1, y1, x2, y2), fWire(wire), fPlane(plane), fFrameHist(0)
48 art::ServiceHandle<geo::Geometry const> geo;
49 unsigned int planes = geo->Nplanes();
53 this->
Pad()->SetLeftMargin(0.050);
54 this->
Pad()->SetRightMargin(0.050);
56 this->
Pad()->SetTopMargin(0.005);
57 this->
Pad()->SetBottomMargin(0.110);
61 if (planes == 2 &&
fPlane > 0) {
62 this->
Pad()->SetTopMargin(0.110);
63 this->
Pad()->SetBottomMargin(0.010);
65 else if (planes > 2) {
67 this->
Pad()->SetTopMargin(0.005);
68 this->
Pad()->SetBottomMargin(0.010);
71 this->
Pad()->SetTopMargin(0.110);
72 this->
Pad()->SetBottomMargin(0.010);
76 std::string opts(opt);
80 this->
Pad()->SetTopMargin(0);
81 this->
Pad()->SetBottomMargin(0.2);
83 if (opts ==
"Q") {
fTQ =
kQ; }
86 fView =
new evdb::View2D();
88 art::ServiceHandle<evd::RawDrawingOptions const> rawOptions;
89 art::ServiceHandle<evd::RecoDrawingOptions const> recoOptions;
91 fHitDrawerTool = art::make_tool<evdb_tool::IWFHitDrawer>(recoOptions->fHitDrawerParams);
93 art::make_tool<evdb_tool::IWaveformDrawer>(rawOptions->fRawDigitDrawerParams);
94 fWireDrawerTool = art::make_tool<evdb_tool::IWaveformDrawer>(recoOptions->fWireDrawerParams);
115 art::ServiceHandle<evd::RawDrawingOptions const> drawopt;
118 const art::Event*
evt = evdb::EventHolder::Instance()->GetEvent();
121 art::ServiceHandle<geo::Geometry const> geoSvc;
130 geoSvc->PlaneWireToChannel(
fPlane,
fWire, drawopt->fTPC, drawopt->fCryostat);
142 if (drawopt->fDrawRawDataOrCalibWires ==
kCALIB) {
147 if (maxLowVal < std::numeric_limits<float>::max())
151 if (maxHiVal > std::numeric_limits<float>::lowest())
161 static const std::string defaultDrawOptions =
"HIST same";
165 if (drawopt->fDrawRawDataOrCalibWires !=
kRAW) {
166 fWireDrawerTool->Draw(defaultDrawOptions.c_str(), maxLowVal, maxHiVal);
172 if (drawopt->fDrawRawDataOrCalibWires !=
kCALIB)
252 art::ServiceHandle<evd::ColorDrawingOptions const> cst;
253 art::ServiceHandle<evd::RawDrawingOptions const> drawopt;
258 art::ServiceHandle<geo::Geometry const> geo;
262 double qxloraw = cst->fRawQLow[(size_t)sigType];
263 double qxhiraw = cst->fRawQHigh[(size_t)sigType];
269 fFrameHist =
new TH1F(
"fFrameHist",
";t [ticks];[ADC]", 2, 0., 1.);
274 fFrameHist =
new TH1F(
"fFrameHist",
";t [ticks];q [ADC]", (
int)tqxhi, tqxlo, tqxhi + tqxlo);
276 default:
throw cet::exception(
"TQPad") << __func__ <<
": unexpected quantity #" <<
fTQ <<
"\n";
IWFHitDrawerPtr fHitDrawerTool
An instance of the tool to draw hits.
unsigned int fPlane
Which plane in the detector.
TH1F * fFrameHist
A dummy histogram to define the axes.
IWaveformDrawerPtr fWireDrawerTool
An instance of the tool to draw hits.
The data type to uniquely identify a Plane.
Drawing pad for time or charge histograms.
The color scales used by the event display.
evdb::View2D * fView
Superimpose scale on 1D histo.
RawDataDrawer * RawDataDraw()
enum geo::_plane_sigtype SigType_t
Base class for event display drawing pads.
double TotalClockTicks() const
Class to aid in the rendering of RawData objects.
IWaveformDrawerPtr fRawDigitDrawerTool
An instance of the tool to draw hits.
int fTQ
0 = plot shows charge only, 1 = plot shows charge vs time for a wire
TPad * fPad
The ROOT graphics pad.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
TQPad(const char *nm, const char *ti, double x1, double y1, double x2, double y2, const char *opt, unsigned int plane, unsigned int wire)
art framework interface to geometry description