
///\file "optical/OpNovice2/.README.txt"
///\brief Example AnaEx01 README page

/*! \page ExampleOpNovice2 Example OpNovice2 

Investigate optical properties and parameters. Details of optical
photon boundary interactions on a surface are recorded. Details 
of optical photon generation and transport are recorded.

	
\section OpNovice2_s1 GEOMETRY DEFINITION

 The geometry consists of a cube "box" with a side of 2 m inside 
 the world cube of side 20 m. Optical properties of the box, the world, 
 and the surface may be set interactively via the commands defined 
 in the DetectorMessenger class.

 Material properties may be added using the macro commands:
 - for the box:
\verbatim
/opnovice2/boxProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
/opnovice2/boxConstProperty NAME VALUE
\endverbatim
 - for the world:
\verbatim
 /opnovice2/worldProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
 /opnovice2/worldConstProperty NAME VALUE
\endverbatim
 - for the surface:
\verbatim
 /opnovice2/surfaceProperty NAME EN1 V1 EN2 V2 [ .. ENn Vn]
\endverbatim

 Multiple energy and value pairs may be specified for the energy-dependent
 properties.

 Values are in Geant4 internal units. Energy is in MeV.

 Example:
\verbatim
/opnovice2/boxProperty RINDEX 0.000002 1.3 0.000005 1.32 0.000008 1.34
\endverbatim
 sets the refractive index of the box to 1.3 at 2 eV, 1.32 at 5 eV, and
 1.34 at 8 eV.

\section OpNovice2_s2 PHYSICS LIST

 The FTFP_BERT physics list is used, with electromagnetic option 
 EMZ (option4) and G4OpticalPhysics for the optical physics.
 	 
\section OpNovice2_s3 AN EVENT : THE PRIMARY GENERATOR
 
 The primary kinematic consists of a single particle. The type of 
 the particle, its energy, position, and direction, are set 
 in the PrimaryGeneratorAction class, and can be changed via the G4 
 build-in commands of G4ParticleGun class (see the macros provided with 
 this example).
	
\section OpNovice2_s4 VISUALIZATION
 
 The Visualization Manager is set in the main().
 The initialisation of the drawing is done via the commands
 /vis/... in the macro vis.mac. To get visualisation:
\verbatim 
> /control/execute vis.mac
\endverbatim
 or run the program with no command line arguments:
\verbatim 
$ ./OpNovice2
\endverbatim
 	
\section OpNovice2_s5 HOW TO START ?
 
 - Execute OpNovice2 in 'batch' mode from macro files
\verbatim
% OpNovice2 surface.mac
\endverbatim
 		
 - Execute OpNovice2 in 'interactive mode' with visualization
\verbatim
% OpNovice2
....
Idle> type your commands
....
Idle> exit
\endverbatim

\section OpNovice2_s6 RESULTS

 A table of optical photon events is printed at the end of the run.	
     	
\section OpNovice2_s7 HISTOGRAMS
 
   OpNovice2 has several predefined 1D histograms : 
   -  1 :  Cerenkov spectrum
   -  2 :  scintillation spectrum
   -  3 :  boundary process status
   -  4 :  X momentum dir of scattered photons with px < 0
   -  5 :  Y momentum dir of scattered photons with px < 0
   -  6 :  Z momentum dir of scattered photons with px < 0
   -  7 :  X momentum dir of scattered photons with px >= 0
   -  8 :  Y momentum dir of scattered photons with px >= 0
   -  9 :  Z momentum dir of scattered photons with px >= 0
   - 10 :  X momentum dir of Fresnel-refracted photons
   - 11 :  Y momentum dir of Fresnel-refracted photons
   - 12 :  Z momentum dir of Fresnel-refracted photons

   Histograms 4-12 are recorded for photons scattered from the +X
   surface of the cube. Only the first interaction is recorded.  
 
   The histograms are managed by G4Analysis classes. 
   The histos can be individually activated with the command :
\verbatim
/analysis/h1/set id nbBins  valMin valMax unit 
\endverbatim
   where unit is the desired unit for the histo (MeV or keV, deg or mrad, etc..)
   
   One can control the name of the histograms file with the command:
\verbatim
/analysis/setFileName  name  (default opnovice2)
\endverbatim
   
   It is possible to choose the format of the histogram file : root (default),
   hbook, xml, csv, by using namespace in HistoManager.hh    
   
   It is also possible to print selected histograms on an ascii file:
\verbatim
/analysis/h1/setAscii id
\endverbatim
   All selected histos will be written on a file name.ascii  (default opnovice2) 

*/
