Geant4 Cross Reference |
1 README file for the Geant4 BlineTracer module 2 3 Author : Laurent Desorgher (desorgher@phim.uni 4 5 -------------------------------- 6 7 The BlineTracer module allows to trace and vis 8 lines in a Geant4 application where particle a 9 magnetic field (in future, these functionaliti 10 the Geant4 kernel). 11 To use the tracer, the user should copy the cl 12 his/her own application/example and create som 13 an instance of a G4BlineTracer object. 14 It can be anywhere (for example in the main co 15 defining the magnetic field): 16 17 #include "G4BlineTracer.hh" 18 G4BlineTracer* theBlineTool = new G4BlineTra 19 20 21 Design principles: 22 23 The core of the tool is the method ComputeBlin 24 In this method a bline is computed by tracking 25 defined magnetic field and by using a Bline eq 26 G4BlineEquation, motion along the field) inste 27 28 During the execution of this method : 29 30 -The user defined equations of motion assoc 31 global and local fields are replaced by in 32 associated to the same fields. 33 The G4BlineEquation class defines the diffe 34 magnetic field line. 35 36 -User defined ChordFinders are replaced by n 37 associated to the G4BlineEquation object. 38 39 -The user primary generator action, run acti 40 stepping action are replaced by instances o 41 G4BlinePrimaryGeneratorAction, G4BlineTrace 42 and G4BlineSteppingAction respectively. Oth 43 a NULL pointer. 44 45 After the execution of the method, the origina 46 of motions and chord-finders are restored. 47 48 In other words, the deafult run-action is temp 49 G4BlineTracer run-action using the same Geomet 50 but with a different equation of motion and us 51 52 The GeneratePrimaries() method of the G4Bline 53 call the GeneratePrimaries() method of the use 54 for defining the start position and start time 55 Start position for user application and for Bl 56 controlled by the same UI commands. 57 The type of particles to be tracked when traci 58 to Charged-Geantino. This allows to switch off 59 and hadronics physics when tracing field lines 60 61 62 The G4BlineEventAction class is responsible to 63 lines as a vector of Polylines and Polymarkers 64 These vectors can be drawn and reset at any ti 65 66 The stepping action does nothing in this imple 67 in future versions to limit field line tracing 68 by the user. For this purpose a G4BlineStackin 69 implemented. 70 71 User Manual: 72 73 General description: 74 75 The BlineTracer is controlled by the UI comman 76 /vis/blineTracer. By calling the command 'comp 77 lines passing through user defined start posit 78 Start positions are generated by the user prim 79 By doing so, the definition of start positions 80 tracking and magnetic field line tracking. 81 82 A magnetic field line is computed as a track o 83 along the field line. The user can define the 84 (only valid for Bline tracing purposes) by the 85 command. 86 By using small enough maximum step length, smo 87 obtained. By using the command 'stockLines' an 88 can decide to store the series of tracking ste 89 a magnetic field line as a Polyline object and 90 (circles) respectively. 91 These objects are stored in vectors of PolyLin 92 By using the command 'draw', these vectors are 93 of the visualisation manager, provided that a 94 visualisation driver have been properly create 95 The scene is visualised by invoking the vis co 96 Polyline objects are visualised as line segmen 97 step positions defining a line, while for a Po 98 (here circles), are drawn at each step positi 99 By using the 'setColour' the user defines the 100 that will be associated to the next computed m 101 By calling 'setPointSize' the user defines the 102 that will be associated to the next computed 103 The user can remove the vector of Polymarker a 104 by invoking 'resetMaterialToBeDrawn'. 105 When using small max step size and polymarkers 106 thickness of a smooth magnetic field line is o 107 Marker size parameter ('setPointSize') 108 109 Command description: 110 /vis/blineTracer/computeBline nb_of_lines : 111 Parameters: integer nb_of_lines 112 Description: Compute nb_of_lines different 113 114 /vis/blineTracer/setMaxStepLength max_step_l 115 Parameters: double max_step_length 116 Description: Set the maximum tracking step 117 magnetic field lines 118 119 /vis/blineTracer/setColour red green 120 Parameters: double red, green, blue 121 Description: Define the colour for visual 122 next computed magnetic field lines. 123 defined by a RGB code (red,green,bl 124 parameters smaller than 1. 125 126 /vis/blineTracer/stockLines aBool 127 Parameters: boolean aBool 128 Description: If true the next computed fie 129 as Polylines for further visualisa 130 /vis/blineTracer/stockLines aBool 131 Parameters: boolean aBool 132 Description: If true the next computed fie 133 as Polymarkers for further visuali 134 135 /vis/blineTracer/setPointSize point_size 136 Parameters: double point_size 137 DEscription: set the size of the visualisa 138 that will be associated with the ne 139 magnetic field lines 140 141 /vis/blineTracer/resetMaterialToBeDraw 142 Parameters: none 143 Description: The vector of Polyline and Po 144 magnetic field lines to be visualis 145 from memory 146 147 /tracking/storeTrajectory 1 : 148 If the storeTrajectory parameter is n 149 stored. 150 151 An example for Bline visualisation is provid 152 153 Current limitations & known problems: 154 155 The tool is working properly only for detect 156 field are defined. It is planned in th 157 field lines in regions where no fields are e