10 #include "nuevdb/EventDisplayBase/EventHolder.h" 11 #include "nuevdb/EventDisplayBase/View2D.h" 34 void writeErrMsg(
const char* fcn,
38 <<
" failed with message:\n" 49 , fcurvetype(curvetype)
54 this->
Pad()->SetBit(kCannotPick);
55 this->
Pad()->SetBit(TPad::kCannotMove);
56 this->
Pad()->SetFillColor(kWhite);
57 this->
Pad()->SetLeftMargin(0.10);
58 this->
Pad()->SetRightMargin (0.025);
59 this->
Pad()->SetTopMargin (0.025);
60 this->
Pad()->SetBottomMargin (0.10);
72 fView =
new evdb::View2D();
100 this->
Pad()->Clear();
109 const art::Event *
evt = evdb::EventHolder::Instance()->GetEvent();
119 if(
fcurvetype==1) writeErrMsg(
"Draw->DrawDeDx",e);
120 else if (
fcurvetype==0) writeErrMsg(
"Draw->DrawKineticEnergy",e);
121 else if (
fcurvetype==2) writeErrMsg(
"Draw->CalorShower",e);
174 TH1F*
h = this->
Pad()->DrawFrame(0.0,0.0,25.0,ymax);
175 h->GetXaxis()->SetLabelSize(0.04);
176 h->GetXaxis()->SetTitleSize(0.04);
177 h->GetXaxis()->CenterTitle();
178 h->GetYaxis()->SetLabelSize(0.04);
179 h->GetYaxis()->SetTitleSize(0.04);
180 h->GetYaxis()->CenterTitle();
183 h->GetXaxis()->SetTitle(
"Residual Range (cm)");
184 h->GetYaxis()->SetTitle(
"dE/dx (MeV/cm)");
186 h->GetXaxis()->SetTitle(
"Total Range (cm)");
187 h->GetYaxis()->SetTitle(
"T (MeV)");
194 throw cet::exception(
"Chi2ParticleID") <<
"cannot find the root template file: \n" 196 <<
"\n bail ungracefully.\n";
221 ke_range_ka = (TGraph*)file->Get(
"kinen_range_ka");
222 ke_range_pi = (TGraph*)file->Get(
"kinen_range_pi");
223 ke_range_mu = (TGraph*)file->Get(
"kinen_range_mu");
AnalysisBaseDrawer * AnalysisBaseDraw()
void DrawDeDx(const art::Event &evt, evdb::View2D *view)
void Draw(const char *opt=0)
TGraph * ke_range_pi
pion template
evdb::View2D * fView
Collection of graphics objects to render; text labels.
TGraph * dedx_range_pi
pion template
std::string fCalorTemplateFileName
files that have calorimetry template curves
CalorPad(const char *name, const char *title, double x1, double y1, double x2, double y2, int curvetype)
Base class for event display drawing pads.
TGraph * ke_range_ka
kaon template
TGraph * ke_range_pro
proton template
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::string find_file(std::string const &filename) const
TPad * fPad
The ROOT graphics pad.
TGraph * dedx_range_ka
kaon template
void CalorShower(const art::Event &evt, evdb::View2D *view)
TGraph * ke_range_mu
muon template
TGraph * dedx_range_mu
muon template
void DrawKineticEnergy(const art::Event &evt, evdb::View2D *view)
TGraph * dedx_range_pro
proton template
cet::coded_exception< error, detail::translate > exception