Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Demo1.h

Go to the documentation of this file.
00001 // Demonstration of a gismo detector:  Demo1
00002 
00003 #include "gismo/Detector.h"
00004 #include "gismo/World.h"
00005 #include "geometry/Box.h"
00006 #include "gismo/Field.h"
00007 #include "gismo/TowerArray.h"
00008 #include "gismo/MCParticle.h"
00009 #include "gismo/SimpleDetector.h"
00010 
00011 
00012 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00013 //                      class Demo1
00014 //  This is a subclass of world that creates a simple detector in the
00015 //  constructor
00016 class Demo1 : public World
00017 {
00018 public:
00019 Demo1()
00020   :World(150)
00021   {
00022         setMaxStep(500.); // so steps exit
00023         Medium* child; // pointer to children as we add them
00024 
00025         //---------------------------------------------
00026         // define the calorimeter: a meter of liquid argon in a magnetic field
00027         //      with transverse tower readout
00028         TowerArray* tower = new TowerArray(10,10,50,50,50 ,0);
00029         tower->s_display_scale = 1/0.01; //10 MeV per cm
00030 
00031         child= new Medium(this, new Box(50,50,100), "ArLiq", tower );
00032         child->setTitle("calorimeter");
00033         child->setMaxStep(1.0);           //less than segmentation
00034         child->setField(new Field(0,0.4,0));
00035         child->moveZ(10);
00036 
00037         //---------------------------------------------
00038         // put a preradiator (1 cm of Pb) in from of the calorimeter
00039         child =  new Medium(this,  new Box(50,50,1)     ,  "Pb" );
00040         child->setTitle("preradiator");
00041         child->moveZ(-55);
00042         
00043         //---------------------------------------------
00044         // define the tracker between preradiator and a calorimeter
00045         child = new Medium(this, new Box(50.,50.,1.0),"vacuum", new SimpleDetector("tracker"));
00046         child->setTitle("tracker");
00047         child->moveZ(-50);
00048 
00049   }
00050 };
00051 

Generated at Wed Nov 21 12:20:25 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000