12 #include "nuevdb/EventDisplayBase/View2D.h" 13 #include "nuevdb/EventDisplayBase/EventHolder.h" 26 #include "art_root_io/TFileService.h" 27 #include "art_root_io/TFileDirectory.h" 42 void writeErrMsg(
const char* fcn,
46 <<
" failed with message:\n" 58 , fcurvetype(curvetype)
63 this->
Pad()->SetBit(kCannotPick);
64 this->
Pad()->SetBit(TPad::kCannotMove);
65 this->
Pad()->SetFillColor(kWhite);
66 this->
Pad()->SetLeftMargin(0.10);
67 this->
Pad()->SetRightMargin (0.025);
68 this->
Pad()->SetTopMargin (0.025);
69 this->
Pad()->SetBottomMargin (0.10);
81 fView =
new evdb::View2D();
109 this->
Pad()->Clear();
118 const art::Event *
evt = evdb::EventHolder::Instance()->GetEvent();
128 if(
fcurvetype==1) writeErrMsg(
"Draw->DrawDeDx",e);
129 else if (
fcurvetype==0) writeErrMsg(
"Draw->DrawKineticEnergy",e);
130 else if (
fcurvetype==2) writeErrMsg(
"Draw->CalorShower",e);
189 TH1F*
h = this->
Pad()->DrawFrame(0.0,0.0,25.0,ymax);
190 h->GetXaxis()->SetLabelSize(0.04);
191 h->GetXaxis()->SetTitleSize(0.04);
192 h->GetXaxis()->CenterTitle();
193 h->GetYaxis()->SetLabelSize(0.04);
194 h->GetYaxis()->SetTitleSize(0.04);
195 h->GetYaxis()->CenterTitle();
198 h->GetXaxis()->SetTitle(
"Residual Range (cm)");
199 h->GetYaxis()->SetTitle(
"dE/dx (MeV/cm)");
201 h->GetXaxis()->SetTitle(
"Total Range (cm)");
202 h->GetYaxis()->SetTitle(
"T (MeV)");
209 throw cet::exception(
"Chi2ParticleID") <<
"cannot find the root template file: \n" 211 <<
"\n bail ungracefully.\n";
236 ke_range_ka = (TGraph*)file->Get(
"kinen_range_ka");
237 ke_range_pi = (TGraph*)file->Get(
"kinen_range_pi");
238 ke_range_mu = (TGraph*)file->Get(
"kinen_range_mu");
CalorPad(const char *name, const char *title, double x1, double y1, double x2, double y2, int curvetype)
TGraph * dedx_range_mu
muon template
TPad * fPad
The ROOT graphics pad.
TGraph * dedx_range_pro
proton template
TGraph * dedx_range_ka
kaon template
std::string fCalorTemplateFileName
files that have calorimetry template curves
void DrawDeDx(const art::Event &evt, evdb::View2D *view)
void DrawKineticEnergy(const art::Event &evt, evdb::View2D *view)
TGraph * ke_range_pro
proton template
TGraph * ke_range_pi
pion template
Base class for event display drawing pads.
AnalysisBaseDrawer * AnalysisBaseDraw()
TGraph * ke_range_ka
kaon template
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::string find_file(std::string const &filename) const
TGraph * dedx_range_pi
pion template
TGraph * ke_range_mu
muon template
void Draw(const char *opt=0)
cet::coded_exception< error, detail::translate > exception
evdb::View2D * fView
Collection of graphics objects to render; text labels.