//$Id$ ///\file "B2/.README" ///\brief Example B2 README page /*! \page ExampleB2 Example B2 This example simulates a simplified fixed target experiment. \section B2_s1 GEOMETRY DEFINITION The setup consists of a target followed by six chambers of increasing transverse size at defined instances from the target. These chambers are located in a region called the Tracker region. Their shape are cylinders, constructed as simple cylinders (in B2aDetectorConstruction) and as parametrised volumes (in B2bDetectorConstruction), see also B2bChamberParameterisation class. In addition, a global, uniform, and transverse magnetic field can be applied (see B2MagneticField and B2aDetectorMessenger, B2bDetectorMessenger classes) and set via interactive commands. For example: \verbatim /B2/det/setField 0.2 tesla \endverbatim An instance of the B2TrackerSD class is created and associated with each logical chamber volume (in B2a) and with the one G4LogicalVolume associated with G4PVParameterised (in B2b). One can change the materials of the target and the chambers interactively via the commands defined in B2aDetectorMessenger (or B2bDetectorMessenger). For example: \verbatim /B2/det/setTargetMaterial G4_WATER /B2/det/setChamberMaterial G4_Ar \endverbatim \section B2_s2 PHYSICS LIST The particle's type and the physic processes which will be available in this example are set in the FTFP_BERT physics list. This physics list requires data files for electromagnetic and hadronic processes. See more on installation of the datasets in Geant4 Installation Guide, Chapter 3.3: Note On Geant4 Datasets . The following datasets: G4LEDATA, G4LEVELGAMMADATA and G4SAIDXSDATA are mandatory for this example. In addition, the build-in interactive command: \verbatim /process/(in)activate processName \endverbatim allows the user to activate/inactivate the processes one by one. \section B2_s3 PRIMARY GENERATOR The primary generator action class employs the G4ParticleGun. The primary kinematics consists of a single particle which hits the target perpendicular to the entrance face. The type of the particle and its energy can be changed via the G4 built-in commands of the G4ParticleGun class. \section B2_s4 RUNS and EVENTS A run is a set of events. The user has control: - at Begin and End of each run (class B2RunAction) - at Begin and End of each event (class B2EventAction) - at Begin and End of each track (class TrackingAction, not used here) - at End of each step (class SteppingAction, not used here) The event number is written to the log file every requested number of events in B2EventAction::BeginOfEventAction() and B2EventAction::EndOfEventAction(). Moreover, for the first 100 events and every 100 events thereafter information about the number of stored trajectories in the event is printed as well as the number of hits stored in the G4VHitsCollection. The run number is printed at B2RunAction::BeginOfRunAction(), where the G4RunManager is also informed how to SetRandomNumberStore for storing initial random number seeds per run or per event. \section B2_s5 USER LIMITS This example also illustrates how to introduce tracking constraints like maximum step length, minimum kinetic energy etc. via the G4UserLimits class and associated G4StepLimiter and G4UserSpecialCuts processes. See B2aDetectorConstruction (or B2bDetectorConstruction). The maximum step limit in the tracker region can be set by the interactive command (see B2aDetectorMessenger, B2bDetectorMessenger classes). For example: \verbatim /B2/det/stepMax 1.0 mm \endverbatim \section B2_s6 DETECTOR RESPONSE A HIT is a step per step record of all the information needed to simulate and analyse the detector response. In this example the Tracker chambers are considered to be the detector. Therefore, the chambers are declared 'sensitive detectors' (SD) in the B2aDetectorConstruction (or B2bDetectorConstruction) class. They are associated with an instance of the B2TrackerSD class. Then, a Hit is defined as a set of 4 informations per step, inside the chambers, namely: - the track identifier (an integer), - the chamber number, - the total energy deposit in this step, and - the position of the energy deposit. A given hit is an instance of the class B2TrackerHit which is created during the tracking of a particle, step by step, in the method B2TrackerSD::ProcessHits(). This hit is inserted in a HitsCollection. The HitsCollection is printed at the end of each event (via the method B2TrackerSD::EndOfEvent()), under the control of the command: \verbatim /hits/verbose 2 \endverbatim