19#include "TPolyLine3D.h"
20#include "TPolyMarker3D.h"
42 cout <<
"JMarkovPathDisplayer" <<
endl
43 <<
"Written by Martijn Jongen" <<
endl
45 cout <<
"Type '" <<
argv[0] <<
" -h!' to display the command-line options." <<
endl ;
49 string ofname =
"out.root" ;
62 catch(
const exception &error) {
74 reader.open(
it->c_str()) ;
75 if( !reader.is_open() ) {
76 cerr <<
"FATAL ERROR: unable to open input file '" << *
it <<
"'." <<
endl ;
91 cout <<
"Done reading paths." <<
endl ;
95 cerr <<
"FATAL ERROR: could not read any JPhotonPaths from the file(s)." <<
endl ;
103 double xmin = 1.0/0.0 ;
104 double xmax = -1.0/0.0 ;
105 double ymin = 1.0/0.0 ;
106 double ymax = -1.0/0.0 ;
107 double zmin = 1.0/0.0 ;
108 double zmax = -1.0/0.0 ;
125 pl->SetLineWidth(1) ;
130 double x =
paths[i][
j].getX() ;
131 double y =
paths[i][
j].getY() ;
132 double z =
paths[i][
j].getZ() ;
133 if( x>xmax ) xmax = x ;
135 if( x<xmin ) xmin = x ;
137 if( z<zmin ) zmin = z ;
138 if( z>zmax ) zmax = z ;
139 pl->SetPoint(
j, x, y, z ) ;
148 if( xmax-xmin > range ) range = xmax-xmin ;
150 if( zmax-zmin > range ) range = zmax-zmin ;
154 extra = 0.5*(range-xmax-xmin) ;
162 extra = 0.5*(range-zmax-zmin) ;
167 <<
"x = [ " << xmin <<
" , " << xmax <<
" ] [m]" <<
endl
168 <<
"y = [ " <<
ymin <<
" , " << xmax <<
" ] [m]" <<
endl
169 <<
"z = [ " << zmin <<
" , " << xmax <<
" ] [m]" <<
endl ;
173 cout <<
"Creating and filling TH3F" <<
endl ;
176 "Local path density;X [m];Y [m];Z [m]",
180 h3->SetOption(
"colz") ;
182 double z =
h3->GetZaxis()->GetBinCenter(
zbin) ;
186 h3->Fill(
it->getX(),
it->getY(),
it->getZ() ) ;
194 cout <<
"Creating and filling TH3F" <<
endl ;
196 "Local path density;X [m];Y [m];Z [m]",
200 h3X->SetOption(
"colz") ;
202 double x =
h3X->GetXaxis()->GetBinCenter(
xbin) ;
206 h3X->Fill(
it->getX(),
it->getY(),
it->getZ() ) ;
243 double csize = 2048 ;
259 pm->SetMarkerSize(2) ;
260 pm->SetMarkerColor(
kRed) ;
261 pm->SetMarkerStyle(20) ;
270 cout <<
"Output in 'display.png'." <<
endl ;
int main(int argc, char **argv)
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for position in three dimensions.
Template definition of a multi-dimensional oscillation probability interpolation table.
JReader & read(JReader &in) override final
Read from input.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).