47 this->
Pad()->SetLogy();
55 this->
Pad()->Connect(
"RangeChanged()",
56 "evd::TQPad",
this,
"RangeChanged()");
74 static int iloqlast = -1;
75 static int ihiqlast = -1;
76 static int ilotlast = -1;
77 static int ihitlast = -1;
79 int ilo =
fHisto->GetXaxis()->GetFirst();
80 int ihi =
fHisto->GetXaxis()->GetLast();
81 double lo =
fHisto->GetXaxis()->GetBinLowEdge(ilo);
82 double hi =
fHisto->GetXaxis()->GetBinUpEdge(ihi);
85 if ((ilo==ilotlast) && (ihi==ihitlast))
return;
103 if (
fTorQ == kQPAD) {
104 if ((ilo==iloqlast) && (ihi==ihiqlast))
return;
125 static const double kHistoFloor = 0.3;
126 static const double kColorScaleLevel = 0.6;
133 this->
Pad()->Clear();
145 if (
fTorQ == kTPAD) {
148 if (
fTorQ == kQPAD) {
154 if (
fTorQ == kTPAD) {
157 if (
fTorQ == kQPAD) {
165 fHisto->GetXaxis()->SetRangeUser(tmin*1
e-3-1, tmax*1
e-3+2);
169 this->
Pad()->Clear();
176 for (
int i=1;
i<=
fHisto->GetNbinsX(); ++
i) {
177 double hc =
fHisto->GetBinContent(
i);
178 if (hc>hmax) hmax = hc;
180 if (hmax>kHistoFloor){
181 this->
Pad()->SetLogy(kTRUE);
182 fHisto->SetMinimum(kHistoFloor);
183 fHisto->SetMaximum(2.0*hmax);
188 this->
Pad()->SetLogy(kFALSE);
191 this->
Pad()->SetLogx(kTRUE);
199 for (
int i=1;
i<=
fHisto->GetNbinsX(); ++
i) {
200 if (i<fHisto->
GetXaxis()->GetFirst())
continue;
201 if (
i>
fHisto->GetXaxis()->GetLast())
continue;
205 x2 = x1 +
fHisto->GetBinWidth(
i);
208 if (y2==0.0) y2 += kColorScaleLevel;
219 b.SetFillStyle(1001);
231 b.SetFillStyle(1001);
255 fHisto =
new TH1F(
"fRAWTHisto",
";t (#musec);hits",n,lo,hi);
262 fHisto =
new TH1F(
"fCALTHisto",
";t (#musec);hits",n,lo,hi);
269 fHisto =
new TH1F(
"fRAWQHisto",
";q (ADC);hits",n,lo,hi);
278 fHisto =
new TH1F(
"fCALQHisto",
";q (pe);hits",n,lo,hi);
284 fHisto->SetLabelSize (0.180,
"X");
285 fHisto->SetLabelOffset(0.002,
"X");
286 fHisto->SetTitleSize (0.200,
"X");
287 fHisto->SetTitleOffset(0.850,
"X");
289 fHisto->SetLabelSize (0.180,
"Y");
290 fHisto->SetLabelOffset(0.002,
"Y");
291 fHisto->SetTitleSize (0.200,
"Y");
292 fHisto->SetTitleOffset(0.230,
"Y");
std::vector< float > fTimeRange
T max(const caf::Proxy< T > &a, T b)
void FillTQHisto(art::Event const &evt, TH1F *thisto, TH1F *qhisto)
TSpline3 lo("lo", xlo, ylo, 12,"0")
const art::Event * GetEvent() const
Float_t y1[n_points_granero]
Float_t x1[n_points_granero]
Define a color scale for displaying numeric data.
Drawing pad for time or charge histograms.
static constexpr Double_t nm
A collection of drawable 2-D objects.
int GetColor(double x) const
Singleton to hold the current art::Event for the event display.
void GetTimeLimits(const art::Event *evt, double &tmin, double &tmax)
static const int kCOLOR_BY_TIME
evdb::View2D * fView
Superimpose scale on 1D histo.
TBox & AddBox(double x1, double y1, double x2, double y2)
TSpline3 hi("hi", xhi, yhi, 18,"0")
void SetBounds(double xlo, double xhi)
static const int kCAL_HITS
RawDataDrawer * RawDataDraw()
static EventHolder * Instance()
correl_xv GetXaxis() -> SetDecimals()
ColorScale & Scale(const std::string &nm)
Base class for event display drawing pads.
RecoBaseDrawer * RecoBaseDraw()
void FillTQHisto(const art::Event &evt, TH1F *thisto, TH1F *qhisto)
static const int kCOLOR_BY_CHARGE
SimulationDrawer * SimulationDraw()
TH1F * fHisto
1-D Histogram of time or charge
Class to aid in the rendering of RecoBase objects.
Class to aid in the rendering of RawData objects.
Render the objects from the Simulation package.
TQPad(const char *nm, const char *ti, double x1, double y1, double x2, double y2, const char *opt)
assert(nhit_max >=nhit_nbins)
Global drawing options that apply to all displays.
std::vector< float > fADCRange
int fTorQ
0 = plot shows time, 1 = plot shows charge
static const int kRAW_HITS