7#include "TApplication.h"
9#include "TRootCanvas.h"
12#include "TGeoManager.h"
13#include "TGeoMatrix.h"
14#include "TGeoMaterial.h"
15#include "TGeoMedium.h"
16#include "TGeoVolume.h"
53 const TGeoShape* shape,
54 const TGeoMedium* med = 0) :
55 TGeoVolume(name, shape, med)
68 if (event == kMouseEnter) {
71 p1->AddText(i->c_str());
76 }
else if (event == kMouseLeave) {
84 TGeoVolume::ExecuteEvent(event, px, py);
119 JParser<> zap(
"Auxiliary program to draw a given module in 3D.");
127 catch(
const exception &error) {
128 FATAL(error.what() << endl);
145 FATAL(
"Empty detector.");
151 if (moduleID == -1) {
153 module = detector.front();
160 FATAL(
"Missing module " << moduleID <<
endl);
162 module = router.getModule(moduleID);
166 module -= module.getPosition();
178 ((
TRootCanvas *)
c1->GetCanvasImp())->
Connect(
"CloseWindow()",
"TApplication", tp,
"Terminate()");
183 p1->SetBorderSize(0);
184 p1->SetTextSize(0.03);
202 const double dz = 3.0;
203 const double R1 = 2.0;
204 const double R2 = 4.0;
209 for (
unsigned int tdc = 0; tdc !=
module.size(); ++tdc) {
212 const int index = address.
ring -
'A';
217 os[1] <<
"TDC " <<
setw(2) << tdc;
224 for (
int i = 0; i !=
sizeof(os)/
sizeof(os[0]); ++i) {
225 pTube->AddText(os[i].str());
226 pCone->AddText(os[i].str());
235 const JPMT& pmt =
module.getPMT(tdc);
249 <<
setw(2) << tdc <<
" "
250 <<
FIXED(3,0) << x <<
" [cm] "
251 <<
FIXED(3,0) << y <<
" [cm] "
252 <<
FIXED(3,0) << z <<
" [cm] "
253 <<
FIXED(4,0) << theta <<
" [deg] "
254 <<
FIXED(4,0) << phi <<
" [deg] "
270 c1->GetView()->ShowAxis();
Data structure for detector geometry and calibration.
int main(int argc, char **argv)
TCanvas * c1
Global variables to handle mouse events.
General purpose messaging.
#define DEBUG(A)
Message macros.
Direct access to module in detector data structure.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
Lookup table for PMT addresses in detector.
Lookup table for PMT addresses in optical module.
Router for direct addressing of module data in detector data structure.
bool hasModule(const JObjectID &id) const
Has module.
Data structure for a composite optical module.
char ring
ring number ['A','F']
int position
position within ring [1,6]
Data structure for PMT geometry, calibration and status.
double getY() const
Get y position.
double getZ() const
Get z position.
double getX() const
Get x position.
double getTheta() const
Get theta angle.
double getPhi() const
Get phi angle.
void AddText(const std::string &text)
Add text to buffer.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Mouse events.
JGeoVolume(const char *name, const TGeoShape *shape, const TGeoMedium *med=0)
Constructor.
std::vector< std::string > buffer
int getID() const
Get identifier.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Data structure to translate PMT physical to readout address.