21 #include <TPolyMarker.h>
26 #include <TGeoVolume.h>
27 #include <TGeoManager.h>
29 #include <TGComboBox.h>
31 #include <TGButtonGroup.h>
32 #include <TGTextEntry.h>
38 extern JApplication *
japp;
57 TGLayoutHints *lhints =
new TGLayoutHints(kLHintsNormal, 2,2,2,2);
58 TGLayoutHints *chints =
new TGLayoutHints(kLHintsCenterY|kLHintsCenterX, 2,2,2,2);
59 TGHorizontalFrame *topframe =
new TGHorizontalFrame(
this, w, h);
60 TGHorizontalFrame *botframe =
new TGHorizontalFrame(
this, w, h);
61 AddFrame(topframe, lhints);
62 AddFrame(botframe, chints);
64 TGGroupFrame *hitdrawopts =
new TGGroupFrame(topframe,
"Extra Drawing Options", kVerticalFrame);
65 topframe->AddFrame(hitdrawopts, lhints);
67 checkbuttons[
"fdcintersection"] =
new TGCheckButton(hitdrawopts,
"FDC Intersection");
68 TGHorizontal3DLine *separator0 =
new TGHorizontal3DLine(hitdrawopts, 250);
69 checkbuttons[
"bcaltruth"] =
new TGCheckButton(hitdrawopts,
"BCALTruth");
70 checkbuttons[
"thrown_charged_bcal"] =
new TGCheckButton(hitdrawopts,
"Draw thrown charged track projections on BCAL");
71 checkbuttons[
"recon_charged_bcal"] =
new TGCheckButton(hitdrawopts,
"Draw reconstructed charged track projections on BCAL");
72 checkbuttons[
"thrown_photons_bcal"] =
new TGCheckButton(hitdrawopts,
"Draw thrown photon projections on BCAL");
73 checkbuttons[
"recon_photons_bcal"] =
new TGCheckButton(hitdrawopts,
"Draw reconstructed photon projections on BCAL");
74 TGHorizontal3DLine *separator1 =
new TGHorizontal3DLine(hitdrawopts, 250);
75 checkbuttons[
"fcaltruth"] =
new TGCheckButton(hitdrawopts,
"FCALTruth");
76 checkbuttons[
"thrown_charged_fcal"] =
new TGCheckButton(hitdrawopts,
"Draw thrown charged track projections on FCAL");
77 checkbuttons[
"recon_charged_fcal"] =
new TGCheckButton(hitdrawopts,
"Draw reconstructed charged track projections on FCAL");
78 checkbuttons[
"thrown_photons_fcal"] =
new TGCheckButton(hitdrawopts,
"Draw thrown photon projections on FCAL");
79 checkbuttons[
"recon_photons_fcal"] =
new TGCheckButton(hitdrawopts,
"Draw reconstructed photon projections on FCAL");
80 checkbuttons[
"recon_photons_ccal"] =
new TGCheckButton(hitdrawopts,
"Draw reconstructed photon projections on CCAL");
81 TGHorizontal3DLine *separator2 =
new TGHorizontal3DLine(hitdrawopts, 250);
82 checkbuttons[
"recon_photons_track_match"] =
new TGCheckButton(hitdrawopts,
"Draw reconstructed photons matched to charged tracks");
83 TGHorizontal3DLine *separator3 =
new TGHorizontal3DLine(hitdrawopts, 250);
84 checkbuttons[
"trajectories_photon"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw photon tracks");
85 checkbuttons[
"trajectories_electron"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw electron tracks");
86 checkbuttons[
"trajectories_positron"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw positron tracks");
87 checkbuttons[
"trajectories_proton"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw proton tracks");
88 checkbuttons[
"trajectories_neutron"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw neutron tracks");
89 checkbuttons[
"trajectories_piplus"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw piplus tracks");
90 checkbuttons[
"trajectories_piminus"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw piminus tracks");
91 checkbuttons[
"trajectories_other"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw all other tracks");
92 checkbuttons[
"trajectories_lines"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw lines between points");
93 checkbuttons[
"trajectories_colors"] =
new TGCheckButton(hitdrawopts,
"When drawing DMCTrajectoryPoint, draw color based on charge");
95 hitdrawopts->AddFrame(
checkbuttons[
"fdcintersection"], lhints);
96 hitdrawopts->AddFrame(separator0, chints);
97 hitdrawopts->AddFrame(
checkbuttons[
"bcaltruth"], lhints);
98 hitdrawopts->AddFrame(
checkbuttons[
"thrown_charged_bcal"], lhints);
99 hitdrawopts->AddFrame(
checkbuttons[
"recon_charged_bcal"], lhints);
100 hitdrawopts->AddFrame(
checkbuttons[
"thrown_photons_bcal"], lhints);
101 hitdrawopts->AddFrame(
checkbuttons[
"recon_photons_bcal"], lhints);
102 hitdrawopts->AddFrame(separator1, chints);
103 hitdrawopts->AddFrame(
checkbuttons[
"fcaltruth"], lhints);
104 hitdrawopts->AddFrame(
checkbuttons[
"thrown_charged_fcal"], lhints);
105 hitdrawopts->AddFrame(
checkbuttons[
"recon_charged_fcal"], lhints);
106 hitdrawopts->AddFrame(
checkbuttons[
"thrown_photons_fcal"], lhints);
107 hitdrawopts->AddFrame(
checkbuttons[
"recon_photons_fcal"], lhints);
108 hitdrawopts->AddFrame(separator2, chints);
109 hitdrawopts->AddFrame(
checkbuttons[
"recon_photons_ccal"], lhints);
110 hitdrawopts->AddFrame(separator2, chints);
111 hitdrawopts->AddFrame(
checkbuttons[
"recon_photons_track_match"], lhints);
112 hitdrawopts->AddFrame(separator3, chints);
113 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_photon"], lhints);
114 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_electron"], lhints);
115 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_positron"], lhints);
116 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_proton"], lhints);
117 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_neutron"], lhints);
118 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_piplus"], lhints);
119 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_piminus"], lhints);
120 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_other"], lhints);
121 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_lines"], lhints);
122 hitdrawopts->AddFrame(
checkbuttons[
"trajectories_colors"], lhints);
125 TGTextButton *done =
new TGTextButton(botframe,
"Done");
126 botframe->AddFrame(done, chints);
129 map<string, TGCheckButton*>::iterator iter =
checkbuttons.begin();
131 iter->second->Connect(
"Clicked()",
"hdv_mainframe", hdvmf,
"DoMyRedraw()");
138 SetWindowName(
"Hall-D Event Viewer Options");
139 SetIconName(
"HDView");
141 done->Connect(
"Clicked()",
"hdv_optionsframe",
this,
"DoDone()");
142 this->Connect(
"CloseWindow()",
"hdv_optionsframe",
this,
"DoDone()");
143 this->DontCallClose();
146 Resize(GetDefaultSize());
hdv_optionsframe(hdv_mainframe *hdvmf, const TGWindow *p, UInt_t w, UInt_t h)
map< string, TGCheckButton * > checkbuttons
void AddCheckButtons(map< string, TGCheckButton * > &checkbuttons)