31 #include "cetlib/search_path.h" 44 void writeErrMsg(
const char* fcn,
48 <<
" failed with message:\n" 59 , fcurvetype(curvetype)
64 this->
Pad()->SetBit(kCannotPick);
65 this->
Pad()->SetBit(TPad::kCannotMove);
66 this->
Pad()->SetFillColor(kWhite);
67 this->
Pad()->SetLeftMargin(0.10);
68 this->
Pad()->SetRightMargin (0.025);
69 this->
Pad()->SetTopMargin (0.025);
70 this->
Pad()->SetBottomMargin (0.10);
110 this->
Pad()->Clear();
128 mf::LogWarning(
"CalorPad::Draw") <<
" Cannot draw calorimetry view in interactive mode" 129 <<
" - no seeds specified. \n";
145 if(
fcurvetype==1) writeErrMsg(
"Draw->DrawDeDx",e);
146 else if (
fcurvetype==0) writeErrMsg(
"Draw->DrawKineticEnergy",e);
147 else if (
fcurvetype==2) writeErrMsg(
"Draw->CalorShower",e);
208 TH1F* h = this->
Pad()->DrawFrame(0.0,0.0,25.0,ymax);
209 h->GetXaxis()->SetLabelSize(0.04);
210 h->GetXaxis()->SetTitleSize(0.04);
211 h->GetXaxis()->CenterTitle();
212 h->GetYaxis()->SetLabelSize(0.04);
213 h->GetYaxis()->SetTitleSize(0.04);
214 h->GetYaxis()->CenterTitle();
217 h->GetXaxis()->SetTitle(
"Residual Range (cm)");
218 h->GetYaxis()->SetTitle(
"dE/dx (MeV/cm)");
220 h->GetXaxis()->SetTitle(
"Total Range (cm)");
221 h->GetYaxis()->SetTitle(
"T (MeV)");
226 cet::search_path sp(
"FW_SEARCH_PATH");
228 throw cet::exception(
"Chi2ParticleID") <<
"cannot find the root template file: \n" 230 <<
"\n bail ungracefully.\n";
255 ke_range_ka = (TGraph*)file->Get(
"kinen_range_ka");
256 ke_range_pi = (TGraph*)file->Get(
"kinen_range_pi");
257 ke_range_mu = (TGraph*)file->Get(
"kinen_range_mu");
AnalysisBaseDrawer * AnalysisBaseDraw()
void DrawDeDx(const art::Event &evt, evdb::View2D *view)
Class to aid in the rendering of AnalysisBase objects.
const art::Event * GetEvent() const
std::vector< art::Ptr< recob::Seed > > SeedVector
void Draw(const char *opt=0)
Float_t y1[n_points_granero]
TGraph * ke_range_pi
pion template
Float_t x1[n_points_granero]
evdb::View2D * fView
Collection of graphics objects to render; text labels.
TGraph * dedx_range_pi
pion template
void CalorInteractive(const art::Event &evt, evdb::View2D *view, trkf::BezierTrack BTrack, trkf::HitPtrVec Hits)
A collection of drawable 2-D objects.
Singleton to hold the current art::Event for the event display.
Float_t y2[n_points_geant4]
int fMakeSeeds
Draw two lines to make clusters if clicked.
std::string fCalorTemplateFileName
files that have calorimetry template curves
Class to perform operations needed to select hits and pass them to a cluster.
static EventHolder * Instance()
Drawing pad showing calorimetric particle ID information.
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
HitSelector * HitSelectorGet()
TPad * fPad
The ROOT graphics pad.
TGraph * dedx_range_ka
kaon template
void CalorShower(const art::Event &evt, evdb::View2D *view)
Float_t x2[n_points_geant4]
TGraph * ke_range_mu
muon template
TGraph * dedx_range_mu
muon template
void DrawKineticEnergy(const art::Event &evt, evdb::View2D *view)
trkf::HitPtrVec GetSelectedHitPtrs(unsigned int plane)
TGraph * dedx_range_pro
proton template
cet::coded_exception< error, detail::translate > exception