Changeset 1337 for trunk/examples/extended/analysis
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- Location:
- trunk/examples/extended/analysis
- Files:
-
- 67 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/analysis/A01/History
r807 r1337 1 $Id: History,v 1. 43 2007/05/17 09:55:13 dunsExp $1 $Id: History,v 1.50 2010/06/06 04:21:04 perl Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 11 11 12 12 --------------------------------------------------------------------------- 13 14 4 June 2010 Joseph Perl (exampleA01-V09-03-00) 15 - Updated vis usage. 16 17 2 Dec 2009 Joseph Perl (exampleA01-V09-02-02) 18 - A01MuonPhysics: change hMultipleScattering to MuMultipleScattering. 19 20 20 Mov 2009 Joseph Perl (exampleA01-V09-02-01) 21 - A01DetectorConstruction, A01MagneticField: improve handing of field. 22 Resolves bug 1012. 23 - A01Trajectory: removed. Example uses G4Trajectory. 24 - Update to new multiple scattering classes. 25 - README: General update. 26 Remove references to obsolete SLAC Geant4 tutorial CD. 27 28 14 Mov 2009 John Allison (exampleA01-V09-02-00) 29 - A01app.cc: Introduced G4UIExecutive. 30 31 5 March 2009 Guy Barrand 32 - GNUmakefile : remove the G4ANALYSIS_USE logic found in this file, since 33 it is handled already in the config/analysis.gmk. 34 This avoids a duplication in the compilation and link commands 35 of the aida-config options. 36 13 37 17 May 2007 - Mark Donszelmann (exampleA01-V08-03-01) 14 38 - Fixed memory leak for plotter -
trunk/examples/extended/analysis/A01/README
r807 r1337 1 $Id: README,v 1. 9 2005/06/01 18:10:15 dunsExp $1 $Id: README,v 1.10 2009/11/21 00:22:55 perl Exp $ 2 2 3 3 ========================================================= … … 10 10 Example A01 implements a double-arm spectrometer with wire chambers, 11 11 hodoscopes and calorimeters. Event simulation and collection are 12 enabled, as well as event display and analysis. This example is 13 extensively documented on the Geant4 Workshop Tutorial CD available at: 14 http://geant4.slac.stanford.edu/g4cd/Welcome.html 12 enabled, as well as event display and analysis. 15 13 16 14 … … 72 70 73 71 74 75 76 72 3. EVENT: 77 73 … … 130 126 5. VISUALIZATION: 131 127 132 Simulated events can be displayed on top of a representation of 133 the spectrometer. 128 Simulated events can be displayed on top of a representation of the spectrometer. 134 129 135 vis.mac outputs HepRep version 1 files suitable for viewing in WIRED.130 vis.mac outputs HepRep version 1 files suitable for viewing in HepRApp or WIRED4. 136 131 Change the /vis/open line from HepRepFile to DAWNFILE to instead 137 132 make .prim files suitable for viewing in DAWN. 138 133 139 134 heprep2-000-gz.mac outputs a series of gzipped HepRep version 2 files 140 each containing a single event, suitable for viewing in WIRED (there 141 is no need to ungzip them since WIRED can do this itself). 135 each containing a single event, suitable for viewing in HepRApp or WIRED4 142 136 143 137 heprep2zip.mac outputs a single zip file that unzips to a series of 144 138 HepRep version 2 files, each each containing a single event (unzip 145 the single file by hand, then view the resulting individial HepRep 146 files in WIRED 3). 139 the single file by hand, then view the resulting individial HepRep files). 147 140 148 141 heprep2-000-zip.mac outputs a series of zipped HepRep version 2 files 149 each containing a single event (not yet viewable in WIREDunless you142 each containing a single event (not yet viewable unless you 150 143 explicitly unzip them before viewing). 151 144 152 145 heprep2.mac outputs a HepRep version 2 file with multiple events 153 appended to a single file in an experimental manner (not yet viewable 154 in WIRED). 146 appended to a single file in an experimental manner 155 147 156 148 heprep2gz.mac outputs a HepRep version 2 file with multiple events 157 appended to a single file in an experimental manner (not yet viewable 158 in WIRED). 149 appended to a single file in an experimental manner 159 150 160 151 Any of the heprep mac files above with the name bheprep (for instance 161 bheprep2zip.mac) will write a Binary HepRep version 2 file, readable 162 by WIRED 4. 163 164 WIRED 4 can read Binary HepRep and XML HepRep version 2 files without 165 the need for manual unzipping. 152 bheprep2zip.mac) will write a Binary HepRep version 2 file, readable only 153 by WIRED4 (not by HepRApp). 166 154 167 For more information on visualization with this A01 example,168 see the visualization tutorials on the Geant4 Workshop Tutorial CD169 available at:170 http://geant4.slac.stanford.edu/g4cd/Welcome.html171 155 172 156 6. ANALYSIS: 173 157 174 158 This example implements an AIDA-compliant analysis system which 175 creates histograms, ntuples and plotters. At the completion of a 176 simulation run a file A01.aida is produced which contains these 177 data structures. This file can be used as an input to the Java 178 Analysis Studio (JAS) which allows the histograms and ntuples to 179 examined, manipulated, saved and printed. For further details, 180 see README.JAIDA. 181 182 183 7. GETTING STARTED: 184 185 Build the A01 executable: 186 187 cd to A01 188 gmake clean 189 gmake 190 191 gmake will create tmp and bin directories in your work directory. 192 The executable, named A01app, will be in /bin/$G4SYSTEM/ 193 194 While in directory A01, run the executable: 195 196 ../bin/$G4SYSTEM/A01app 197 198 which will bring up the interactive prompt: 199 200 Idle> 201 202 To run 10 events you can now enter: 203 204 /run/beamOn 10 205 206 If all goes well, a JAS window will appear containing two histograms 207 and three scatterplots. 208 209 To terminate the job, at the prompt enter: 210 211 exit 212 213 Currently you must also close the JAS-AIDA window to get the job to stop. 214 215 216 In the A01 directory will be a file A01.aida which contains the plots. 217 To examine them 218 219 /usr/local.bin/jas3 & or jas3 & 159 creates histograms, ntuples and plotters. If you have built Geant4 with 160 the option to use anlaysis (answering yes to the appropriate question in 161 ./Configure -build), then at the completion of a simulation run, 162 a file A01.aida is produced which contains these data structures. 163 This file can be used as an input to the Java Analysis Studio (JAS) which allows 164 the histograms and ntuples to examined, manipulated, saved and printed. 165 For further details, see README.JAIDA. -
trunk/examples/extended/analysis/A01/include/A01DetectorConstruction.hh
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01DetectorConstruction.hh,v 1. 5 2006/06/29 16:30:50 gunterExp $26 // $Id: A01DetectorConstruction.hh,v 1.6 2009/11/21 00:22:55 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 34 34 #include "G4VUserDetectorConstruction.hh" 35 35 #include "G4RotationMatrix.hh" 36 #include "G4FieldManager.hh" 36 37 37 38 class G4VPhysicalVolume; … … 61 62 A01DetectorConstMessenger* messenger; 62 63 A01MagneticField* magneticField; 64 G4FieldManager* fieldMgr; 63 65 64 66 G4Material* air; -
trunk/examples/extended/analysis/A01/include/A01EMPhysics.hh
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01EMPhysics.hh,v 1. 6 2006/06/29 16:30:58 gunterExp $26 // $Id: A01EMPhysics.hh,v 1.7 2009/11/21 01:00:19 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 41 41 #include "G4ComptonScattering.hh" 42 42 #include "G4GammaConversion.hh" 43 #include "G4 MultipleScattering.hh"43 #include "G4eMultipleScattering.hh" 44 44 #include "G4eIonisation.hh" 45 45 #include "G4eBremsstrahlung.hh" -
trunk/examples/extended/analysis/A01/include/A01HadronPhysics.hh
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01HadronPhysics.hh,v 1. 6 2006/06/29 16:31:14 gunterExp $26 // $Id: A01HadronPhysics.hh,v 1.7 2009/11/21 01:00:19 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 36 36 37 37 #include "G4VPhysicsConstructor.hh" 38 #include "G4 MultipleScattering.hh"38 #include "G4hMultipleScattering.hh" 39 39 #include "G4hIonisation.hh" 40 40 -
trunk/examples/extended/analysis/A01/include/A01IonPhysics.hh
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01IonPhysics.hh,v 1. 7 2006/06/29 16:31:22 gunterExp $26 // $Id: A01IonPhysics.hh,v 1.8 2009/11/21 01:00:19 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // 05-Jan-2004 Add G4ionIonisation T. Koi … … 51 51 #include "G4hIonisation.hh" 52 52 #include "G4ionIonisation.hh" 53 #include "G4 MultipleScattering.hh"53 #include "G4hMultipleScattering.hh" 54 54 55 55 class A01IonPhysics : public G4VPhysicsConstructor -
trunk/examples/extended/analysis/A01/include/A01MagneticField.hh
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01MagneticField.hh,v 1. 4 2006/06/29 16:31:27 gunterExp $26 // $Id: A01MagneticField.hh,v 1.5 2009/11/21 00:22:55 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 41 41 ~A01MagneticField(); 42 42 43 virtual void GetFieldValue( const double Point[3], 44 double *Bfield ) const; 43 virtual void GetFieldValue(const G4double Point[4],double *Bfield ) const; 45 44 46 45 private: 47 46 A01MagneticFieldMessenger* messenger; 48 47 G4double By; 49 G4double rmax_sq; 50 G4double ymax; 51 48 52 49 public: 53 50 inline void SetField(G4double val) { By = val; } -
trunk/examples/extended/analysis/A01/include/A01MuonPhysics.hh
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01MuonPhysics.hh,v 1. 6 2006/06/29 16:31:31 gunterExp $26 // $Id: A01MuonPhysics.hh,v 1.8 2009/12/02 22:45:09 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 37 37 38 38 #include "G4VPhysicsConstructor.hh" 39 #include "G4Mu ltipleScattering.hh"39 #include "G4MuMultipleScattering.hh" 40 40 #include "G4MuBremsstrahlung.hh" 41 41 #include "G4MuPairProduction.hh" -
trunk/examples/extended/analysis/A01/opengl.mac
r807 r1337 11 11 # /vis/viewer/create 12 12 # 13 /vis/open OGL IX13 /vis/open OGL 14 14 # 15 15 # Create a scene. One could use /vis/drawVolume, which is equivalent to: -
trunk/examples/extended/analysis/A01/src/A01DetectorConstruction.cc
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01DetectorConstruction.cc,v 1. 9 2006/06/29 16:32:22 gunterExp $26 // $Id: A01DetectorConstruction.cc,v 1.10 2009/11/21 00:22:55 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 32 32 #include "G4FieldManager.hh" 33 33 #include "G4TransportationManager.hh" 34 #include "G4Mag_UsualEqRhs.hh" 34 35 35 36 #include "G4Material.hh" 36 37 #include "G4Element.hh" 37 38 #include "G4MaterialTable.hh" 39 #include "G4NistManager.hh" 38 40 39 41 #include "G4VSolid.hh" … … 76 78 messenger = new A01DetectorConstMessenger(this); 77 79 magneticField = new A01MagneticField(); 80 fieldMgr = new G4FieldManager(); 78 81 armRotation = new G4RotationMatrix(); 79 82 armRotation->rotateY(armAngle); … … 84 87 delete armRotation; 85 88 delete magneticField; 89 delete fieldMgr; 86 90 delete messenger; 87 91 … … 111 115 G4VSensitiveDetector* HadCalorimeter; 112 116 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 113 114 117 ConstructMaterials(); 115 118 116 // Magnetic field ----------------------------------------------------------119 // Local Magnetic Field 117 120 static G4bool fieldIsInitialized = false; 121 118 122 if(!fieldIsInitialized) 119 123 { 120 G4FieldManager* fieldMgr121 = G4TransportationManager::GetTransportationManager()->GetFieldManager();122 124 fieldMgr->SetDetectorField(magneticField); 123 125 fieldMgr->CreateChordFinder(magneticField); … … 133 135 = new G4PVPlacement(0,G4ThreeVector(),worldLogical,"worldPhysical",0,0,0); 134 136 135 // magnetic field region 137 // Tube with Local Magnetic field 138 136 139 G4VSolid* magneticSolid = new G4Tubs("magneticTubs",0.,1.*m,1.*m,0.,360.*deg); 137 G4LogicalVolume* magneticLogical 138 = new G4LogicalVolume(magneticSolid,air,"magneticLogical",0,0,0); 140 G4NistManager* man = G4NistManager::Instance(); 141 G4Material* G4_Galactic = man->FindOrBuildMaterial("G4_Galactic"); 142 143 G4LogicalVolume* magneticLogical 144 = new G4LogicalVolume(magneticSolid,G4_Galactic,"magneticLogical",fieldMgr,0,0); 145 // ******** 146 147 // placement of Tube 148 139 149 G4RotationMatrix* fieldRot = new G4RotationMatrix(); 140 150 fieldRot->rotateX(90.*deg); -
trunk/examples/extended/analysis/A01/src/A01EMPhysics.cc
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01EMPhysics.cc,v 1. 8 2006/06/29 16:32:30 gunterExp $26 // $Id: A01EMPhysics.cc,v 1.9 2009/11/21 01:00:19 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 73 73 //Electorn 74 74 pManager = G4Electron::Electron()->GetProcessManager(); 75 G4VProcess* theeminusMultipleScattering = new G4 MultipleScattering();75 G4VProcess* theeminusMultipleScattering = new G4eMultipleScattering(); 76 76 G4VProcess* theeminusIonisation = new G4eIonisation(); 77 77 G4VProcess* theeminusBremsstrahlung = new G4eBremsstrahlung(); … … 94 94 //Positron 95 95 pManager = G4Positron::Positron()->GetProcessManager(); 96 G4VProcess* theeplusMultipleScattering = new G4 MultipleScattering();96 G4VProcess* theeplusMultipleScattering = new G4eMultipleScattering(); 97 97 G4VProcess* theeplusIonisation = new G4eIonisation(); 98 98 G4VProcess* theeplusBremsstrahlung = new G4eBremsstrahlung(); -
trunk/examples/extended/analysis/A01/src/A01HadronPhysics.cc
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01HadronPhysics.cc,v 1. 8 2006/06/29 16:32:48 gunterExp $26 // $Id: A01HadronPhysics.cc,v 1.9 2009/11/21 01:00:19 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 74 74 pManager->AddDiscreteProcess(thePionPlusInelasticProcess); 75 75 76 G4VProcess* theppMultipleScattering = new G4 MultipleScattering();76 G4VProcess* theppMultipleScattering = new G4hMultipleScattering(); 77 77 G4VProcess* theppIonisation = new G4hIonisation(); 78 78 // … … 107 107 pManager->AddDiscreteProcess(thePionMinusInelasticProcess); 108 108 109 G4VProcess* thepmMultipleScattering = new G4 MultipleScattering();109 G4VProcess* thepmMultipleScattering = new G4hMultipleScattering(); 110 110 G4VProcess* thepmIonisation = new G4hIonisation(); 111 111 // … … 141 141 pManager->AddDiscreteProcess(theKaonPlusInelasticProcess); 142 142 143 G4VProcess* thekpMultipleScattering = new G4 MultipleScattering();143 G4VProcess* thekpMultipleScattering = new G4hMultipleScattering(); 144 144 G4VProcess* thekpIonisation = new G4hIonisation(); 145 145 // … … 176 176 pManager->AddDiscreteProcess(theKaonMinusInelasticProcess); 177 177 178 G4VProcess* thekmMultipleScattering = new G4 MultipleScattering();178 G4VProcess* thekmMultipleScattering = new G4hMultipleScattering(); 179 179 G4VProcess* thekmIonisation = new G4hIonisation(); 180 180 … … 248 248 pManager->AddDiscreteProcess(theProtonInelasticProcess); 249 249 250 G4VProcess* thepMultipleScattering = new G4 MultipleScattering();250 G4VProcess* thepMultipleScattering = new G4hMultipleScattering(); 251 251 G4VProcess* thepIonisation = new G4hIonisation(); 252 252 … … 286 286 pManager->AddRestProcess(theAntiProtonAnnihilation); 287 287 288 G4VProcess* theapMultipleScattering = new G4 MultipleScattering();288 G4VProcess* theapMultipleScattering = new G4hMultipleScattering(); 289 289 G4VProcess* theapIonisation = new G4hIonisation(); 290 290 … … 417 417 pManager->AddDiscreteProcess(theSigmaPlusInelasticProcess); 418 418 419 G4VProcess* thespMultipleScattering = new G4 MultipleScattering();419 G4VProcess* thespMultipleScattering = new G4hMultipleScattering(); 420 420 G4VProcess* thespIonisation = new G4hIonisation(); 421 421 … … 451 451 pManager->AddDiscreteProcess(theAntiSigmaPlusInelasticProcess); 452 452 453 G4VProcess* theaspMultipleScattering = new G4 MultipleScattering();453 G4VProcess* theaspMultipleScattering = new G4hMultipleScattering(); 454 454 G4VProcess* theaspIonisation = new G4hIonisation(); 455 455 … … 485 485 pManager->AddDiscreteProcess(theSigmaMinusInelasticProcess); 486 486 487 G4VProcess* thesmMultipleScattering = new G4 MultipleScattering();487 G4VProcess* thesmMultipleScattering = new G4hMultipleScattering(); 488 488 G4VProcess* thesmIonisation = new G4hIonisation(); 489 489 … … 519 519 pManager->AddDiscreteProcess(theAntiSigmaMinusInelasticProcess); 520 520 521 G4VProcess* theasmMultipleScattering = new G4 MultipleScattering();521 G4VProcess* theasmMultipleScattering = new G4hMultipleScattering(); 522 522 G4VProcess* theasmIonisation = new G4hIonisation(); 523 523 … … 593 593 pManager->AddDiscreteProcess(theXiMinusInelasticProcess); 594 594 595 G4VProcess* thexmMultipleScattering = new G4 MultipleScattering();595 G4VProcess* thexmMultipleScattering = new G4hMultipleScattering(); 596 596 G4VProcess* thexmIonisation = new G4hIonisation(); 597 597 … … 627 627 pManager->AddDiscreteProcess(theAntiXiMinusInelasticProcess); 628 628 629 G4VProcess* theaxmMultipleScattering = new G4 MultipleScattering();629 G4VProcess* theaxmMultipleScattering = new G4hMultipleScattering(); 630 630 G4VProcess* theaxmIonisation = new G4hIonisation(); 631 631 … … 661 661 pManager->AddDiscreteProcess(theOmegaMinusInelasticProcess); 662 662 663 G4VProcess* theomMultipleScattering = new G4 MultipleScattering();663 G4VProcess* theomMultipleScattering = new G4hMultipleScattering(); 664 664 G4VProcess* theomIonisation = new G4hIonisation(); 665 665 … … 695 695 pManager->AddDiscreteProcess(theAntiOmegaMinusInelasticProcess); 696 696 697 G4VProcess* theaomMultipleScattering = new G4 MultipleScattering();697 G4VProcess* theaomMultipleScattering = new G4hMultipleScattering(); 698 698 G4VProcess* theaomIonisation = new G4hIonisation(); 699 699 -
trunk/examples/extended/analysis/A01/src/A01IonPhysics.cc
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01IonPhysics.cc,v 1. 9 2006/06/29 16:32:55 gunterExp $26 // $Id: A01IonPhysics.cc,v 1.10 2009/11/21 01:00:19 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 62 62 63 63 // add process 64 G4VProcess* thegionMultipleScattering = new G4 MultipleScattering();64 G4VProcess* thegionMultipleScattering = new G4hMultipleScattering(); 65 65 // 66 66 // G4hIonization may be not able to use for Geanric Ion in future … … 100 100 pManager->AddDiscreteProcess(theDeuteronInelasticProcess); 101 101 102 G4VProcess* thedueMultipleScattering = new G4 MultipleScattering();102 G4VProcess* thedueMultipleScattering = new G4hMultipleScattering(); 103 103 G4VProcess* thedueIonisation = new G4hIonisation(); 104 104 // … … 132 132 pManager->AddDiscreteProcess(theTritonInelasticProcess); 133 133 134 G4VProcess* thetriMultipleScattering = new G4 MultipleScattering();134 G4VProcess* thetriMultipleScattering = new G4hMultipleScattering(); 135 135 G4VProcess* thetriIonisation = new G4hIonisation(); 136 136 // … … 164 164 pManager->AddDiscreteProcess(theAlphaInelasticProcess); 165 165 166 G4VProcess* thealpMultipleScattering = new G4 MultipleScattering();166 G4VProcess* thealpMultipleScattering = new G4hMultipleScattering(); 167 167 G4VProcess* thealpIonisation = new G4hIonisation(); 168 168 // … … 189 189 pManager->AddDiscreteProcess(thehe3ElasticProcess); 190 190 191 G4VProcess* thehe3MultipleScattering = new G4 MultipleScattering();191 G4VProcess* thehe3MultipleScattering = new G4hMultipleScattering(); 192 192 G4VProcess* thehe3Ionisation = new G4hIonisation(); 193 193 // -
trunk/examples/extended/analysis/A01/src/A01MagneticField.cc
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01MagneticField.cc,v 1. 6 2006/06/29 16:32:57 gunterExp $26 // $Id: A01MagneticField.cc,v 1.7 2009/11/21 00:22:55 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 30 30 #include "A01MagneticField.hh" 31 31 #include "A01MagneticFieldMessenger.hh" 32 #include "globals.hh" 32 33 33 34 A01MagneticField::A01MagneticField() … … 35 36 messenger = new A01MagneticFieldMessenger(this); 36 37 By = 1.0*tesla; 37 rmax_sq = sqr(1.*m); 38 ymax = 100.*cm; 38 39 39 } 40 40 … … 42 42 { delete messenger; } 43 43 44 void A01MagneticField::GetFieldValue(const double Point[3],double *Bfield) const44 void A01MagneticField::GetFieldValue(const G4double [4],double *Bfield) const 45 45 { 46 46 Bfield[0] = 0.; 47 47 Bfield[2] = 0.; 48 if(std::abs(Point[1])<ymax && (sqr(Point[0])+sqr(Point[2]))<rmax_sq) 49 { Bfield[1] = By; } 50 else 51 { Bfield[1] = 0.; } 48 Bfield[1] = By; 49 52 50 } 53 51 -
trunk/examples/extended/analysis/A01/src/A01MuonPhysics.cc
r807 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01MuonPhysics.cc,v 1. 8 2006/06/29 16:33:01 gunterExp $26 // $Id: A01MuonPhysics.cc,v 1.10 2009/12/02 22:45:09 perl Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 62 62 //Muon+ 63 63 pManager = G4MuonPlus::MuonPlus()->GetProcessManager(); 64 G4VProcess* thempMultipleScattering = new G4Mu ltipleScattering();64 G4VProcess* thempMultipleScattering = new G4MuMultipleScattering(); 65 65 G4VProcess* thempBremsstrahlung = new G4MuBremsstrahlung(); 66 66 G4VProcess* thempPairProduction = new G4MuPairProduction(); … … 87 87 //Muon- 88 88 pManager = G4MuonMinus::MuonMinus()->GetProcessManager(); 89 G4VProcess* themmMultipleScattering = new G4Mu ltipleScattering();89 G4VProcess* themmMultipleScattering = new G4MuMultipleScattering(); 90 90 G4VProcess* themmBremsstrahlung = new G4MuBremsstrahlung(); 91 91 G4VProcess* themmPairProduction = new G4MuPairProduction(); … … 111 111 // Tau+ Physics 112 112 pManager = G4TauPlus::TauPlus()->GetProcessManager(); 113 G4VProcess* thetpMultipleScattering = new G4Mu ltipleScattering();113 G4VProcess* thetpMultipleScattering = new G4MuMultipleScattering(); 114 114 G4VProcess* thetpIonisation = new G4hIonisation(); 115 115 // … … 128 128 // Tau- Physics 129 129 pManager = G4TauMinus::TauMinus()->GetProcessManager(); 130 G4VProcess* thetmMultipleScattering = new G4Mu ltipleScattering();130 G4VProcess* thetmMultipleScattering = new G4MuMultipleScattering(); 131 131 G4VProcess* thetmIonisation = new G4hIonisation(); 132 132 // -
trunk/examples/extended/analysis/A01/test.out
r807 r1337 1 1 2 2 ************************************************************* 3 Geant4 version $Name: $ (25-June-2004)3 Geant4 version $Name: geant4-09-04-beta-01 $ (25-June-2004) 4 4 Copyright : Geant4 Collaboration 5 5 Reference : NIM A 506 (2003), 250-303 -
trunk/examples/extended/analysis/A01/vis.mac
r807 r1337 5 5 # 6 6 /control/verbose 2 7 # /vis/verbose confirmations8 7 # 9 # Create a scene handler and viewer for HepRep 8 # Use this open statement to create an OpenGL view: 9 /vis/open OGL 600x600-0+0 10 10 # 11 /vis/open HepRepFile 11 # Use this open statement to create a .prim file suitable for 12 # viewing in DAWN: 12 13 #/vis/open DAWNFILE 13 14 # 14 # Draw detector 15 # Use this open statement to create a .heprep file suitable for 16 # viewing in HepRApp: 17 #/vis/open HepRepFile 15 18 # 19 # Use this open statement to create a .wrl file suitable for 20 # viewing in a VRML viewer: 21 #/vis/open VRML2FILE 22 # 23 # Disable auto refresh and quieten vis messages whilst scene and 24 # trajectories are established: 25 /vis/viewer/set/autoRefresh false 26 /vis/verbose errors 27 # 28 # Draw geometry: 16 29 /vis/drawVolume 17 30 # 18 # Declare that trajectories and hits should be added to the scene 31 # Specify view angle: 32 #/vis/viewer/set/viewpointThetaPhi 90. 0. 19 33 # 20 /vis/scene/add/trajectories 21 /vis/ scene/add/hits34 # Specify zoom value: 35 /vis/viewer/zoom 1.6 22 36 # 23 # Execute the visualization via the /vis/viewer/flush that comes 24 # automatically at the end of each /run. 37 # Specify style (surface or wireframe): 38 #/vis/viewer/set/style wireframe 39 # 40 # Draw coordinate axes: 41 #/vis/scene/add/axes 0 0 0 1 m 42 # 43 # Draw smooth trajectories at end of event, showing trajectory points 44 # as markers 2 pixels wide: 45 /vis/scene/add/trajectories smooth 46 /vis/modeling/trajectories/create/drawByCharge 47 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 48 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 49 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 50 # 51 # Draw hits at end of event: 52 #/vis/scene/add/hits 53 # 54 # To draw only gammas: 55 #/vis/filtering/trajectories/create/particleFilter 56 #/vis/filtering/trajectories/particleFilter-0/add gamma 57 # 58 # To invert the above, drawing all particles except gammas, 59 # keep the above two lines but also add: 60 #/vis/filtering/trajectories/particleFilter-0/invert true 61 # 62 # Many other options are available with /vis/modeling and /vis/filtering. 63 # For example, to select colour by particle ID: 64 #/vis/modeling/trajectories/create/drawByParticleID 65 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 66 # 67 # To superimpose all of the events from a given run: 68 #/vis/scene/endOfEventAction accumulate 69 # 70 # Re-establish auto refreshing and verbosity: 71 /vis/viewer/set/autoRefresh true 72 /vis/verbose warnings 73 # 74 # For file-based drivers, use this to create an empty detector view: 75 #/vis/viewer/flush 25 76 # 26 77 /mydet/armAngle 60. deg -
trunk/examples/extended/analysis/AnaEx01/AnaEx01.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01.cc,v 1.14 2006/06/29 16:33:13 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/History
r807 r1337 1 $Id: History,v 1.1 5 2006/08/16 15:43:44 gcosmoExp $1 $Id: History,v 1.18 2009/05/13 08:46:37 gbarrand Exp $ 2 2 -------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 13 May 2009 Guy Barrand (AnaEx01-V09-02-00) 19 - Tagged all changes. 20 21 13 May 2009 Guy Barrand 22 - update the README. 23 - remove the content of the analysis/[Falsetto,jas,Lab] directories. 24 In fact the analysis directory should not be distributed anymore. 25 - have a run.mac in the main example directory. 26 - AnaEx01AnalysisManager : arrange to have histo and tuple name 27 as interger in case of hbook file format. 28 29 5 March 2009 Guy Barrand 30 - GNUmakefile : remove the G4ANALYSIS_USE logic found in this file, since 31 it is handled already in the config/analysis.gmk. 32 This avoids a duplication in the compilation and link commands 33 of the aida-config options. 17 34 18 35 16th August 2006 Gabriele Cosmo (AnaEx01-V08-01-00) -
trunk/examples/extended/analysis/AnaEx01/README
r807 r1337 1 $Id: README,v 1.1 5 2006/08/16 15:42:16 gcosmoExp $1 $Id: README,v 1.16 2009/05/13 08:32:36 gbarrand Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 11 11 This example shows the usage of histogram and tuple manipulations using 12 12 an AIDA compliant system. In this example, all analysis manipulations 13 (hooking an AIDA implementation, histo booking, filling, etc...) are 14 concentrated in one class : AnaEx01AnalysisManager. 13 (attaching an AIDA implementation, histo booking, filling, saving 14 histos in a file, etc...) are concentrated in one class : 15 AnaEx01AnalysisManager. 15 16 16 To use an AIDA compliant analysis system with this example, the environment 17 variables : 17 To include the analysis code, the environment variable 18 18 G4ANALYSIS_USE 19 G4ANALYSIS_AIDA_CONFIG_CFLAGS 20 G4ANALYSIS_AIDA_CONFIG_LIBS 21 must be properly set. 19 must be defined before doing "make". If not, at run time, no 20 histograms and file will be created. 22 21 23 The first one permits to validate/devalidate the AIDA analysis code 24 in the example code. The two others permit to give the compilation 25 and link flags of the AIDA compliant system used. 22 For example, a typical session from a UNIX csh flavoured shell is : 23 csh> source <aida tool>/aida-setup.csh 24 csh> setenv G4ANALYSIS_USE 1 25 csh> make 26 csh> ${G4BIN}/${G4SYSTEM}/AnaEx01 27 After execution, a file AnaEx01.aida should have been created. 28 Someone can change the default file format by changing the 29 value of the std::string variable format in the AnaEx01AnalysisManager 30 constructor : 31 // File format : 32 std::string format("xml"); 33 //std::string format("hbook"); 34 //std::string format("root"); 35 36 Working with the OpenScientist packages : 37 --------------------------------------- 38 To create the analysis file, you can install the light "osc_batch" 39 binary kit (See http://OpenScientist.lal.in2p3.fr ). For example 40 from a UNIX sh flavoured shell : 41 sh> cd /usr/local 42 sh> <arrange to be su> 43 sh> <get an osc_batch binary kit> 44 sh> unzip -q osc_batch<platform>.zip 45 sh> cd osc_batch/<version> 46 sh> ./install 47 48 Then you build the example with : 49 <create another terminal> 50 csh> source /usr/local/osc_batch/<version>/aida-setup.csh 51 csh> <source setup Geant4> 52 csh> setenv G4ANALYSIS_USE 1 53 csh> cd <G4_install_path>/examples/extended/analysis/AnaEx01 54 csh> make 55 csh> ${G4BIN}/${G4SYSTEM}/AnaEx01 56 57 Depending of the file format, you can visualize the produced 58 file with various interactive tools (CERN/PAW, CERN/ROOT, jas). 59 But if installing also an OpenScientist osc_vis binary kit, 60 you shall be able to visualize all formats by using 61 the osc-plot program. To install an osc_vis kit : 62 sh> cd /usr/local 63 sh> <arrange to be su> 64 sh> <get an osc_vis binary kit> 65 sh> unzip -q osc_vis<platform>.zip 66 sh> cd osc_vis/<version> 67 sh> ./install 68 Then to browse the AnaEx01.<format> file (for exa from an UNIX sh shell) : 69 <create another terminal> 70 sh> . /usr/local/osc_vis/<version>/setup.sh 71 sh> <setenv DISPLAY if needed> 72 sh> osc-plot AnaEx01.[aida,root,hbook] 26 73 27 The variable G4ANALYSIS_USE must be defined in the environment, and the 28 the system properly configured to use one of the AIDA compliant analysis 29 tools (i.e. path set to retrieve the 'aida-config' command). 74 The OpenScientist URL is : 75 http://OpenScientist.lal.in2p3.fr. 30 76 31 Working with the OpenScientist/Lab package : 32 ------------------------------------------ 33 To reconstruct this example by using the OpenScientist/Lab 34 package (assuming that OpenScientist is installed ! ) you have 35 first to "setup" the environment of the Lab package and Geant4. 36 The Lab package (and all OpenScientist packages) being handled 37 by the CMT tools, you may have to setup the environment 38 variable "CMTSITE" to execute site specific things in the chain 39 of setup files of the OpenScientist packages. Then for example at CERN : 40 csh> setenv CMTSITE CERN 41 (DOS> set CMTSITE=CERN_WIN32 (for Windows)) 42 When done then do : 43 csh> source <some directory>/Lab/<version>/cmt/setup.csh 44 csh> source <your Geant4 setup script>.csh 45 csh> setenv G4ANALYSIS_USE 1 46 csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01 47 csh> gmake 77 Note that OpenScientist is installed on CERN/lxplus under : 78 /afs/cern.ch/sw/contrib/[osc_batch,osc_vis]. 48 79 49 To run :50 csh> cd analyis/Lab51 csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx0152 80 53 It must produce an AnaEx01.aida file that contains some histograms54 and a tuple.55 56 To plot some histograms, spawn the Lab interactive tool with :57 csh> onx58 (DOS> onx (for Windows))59 click in 'File/Open AIDA file...' to map a file chooser,60 then choose AnaEx01.aida. The file name should appear in the left61 tree widget beside the plotting area. Use the tree widget to browse62 the file. You can visualize histos by selecting them with the mouse.63 64 If the OpenScientist/OnX and Lab Python drivers had been65 reconstructed at installation of OpenScientist, then66 you can also work with the OpenScientist/Lab/AIDA Python API.67 You can execute AnaEx01.py by doing :68 OS> python AnaEx01.py69 or :70 OS> python71 (>>> import AIDA)72 >>> import AnaEx0173 The AnaEx01 file contains a Python script that74 does some analysis over the AnaEx01.aida file by using the AIDA interfaces.75 This script gets an histo (EAbs) and plots it in a first drawing region.76 Then it gets the 'AnaEx01' tuple, books and fills another histo77 from the tuple colum 'EAbs' and plots it a secon drawing region.78 79 If exporting a AnaEx01.root file (see src/AnaEx01AnalysisManager.cc),80 the AnaEx01.C file could also be used, within the ROOT tool.81 To see a projection of the first column of the tuple contained82 in the AnaEx01.root file. For example :83 csh> root84 root[0] .X AnaEx01.C85 86 The OpenScientist URL is : http://OpenScientist.lal.in2p3.fr.87 OpenScientist is installed at CERN under /afs/cern.ch/sw/contrib.88 89 Working with the Falsetto package :90 ---------------------------------91 Falsetto is a little package containing a dummy92 AIDA analysis factory. It permits to check compilation93 and link of some user AIDA code without embarquing a94 full analysis system.95 96 To reconstruct this example by using the Falsetto97 package (assuming that it is installed !), do :98 csh> source <your Geant4 setup script>.csh99 csh> source <some directory>/Falsetto/<version>/cmt/setup.csh100 csh> setenv G4ANALYSIS_USE 1101 csh> cd $G4INSTALL/examples/extended/analysis/AnaEx01102 csh> gmake103 104 To run :105 csh> cd analyis/Falsetto106 csh> $G4WORKDIR/bin/$G4SYSTEM/AnaEx01107 At the beginning of output ;should appear :108 AIDA analysis factory not found.109 110 The Falsetto URL is : http://www.lal.in2p3.fr/SI/Falsetto111 Falsetto is installed at CERN under /afs/cern.ch/sw/contrib.112 -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01AnalysisManager.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01AnalysisManager.hh,v 1.9 2006/06/29 16:33:15 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01CalorHit.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01CalorHit.hh,v 1.4 2006/06/29 16:33:17 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01CalorimeterSD.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01CalorimeterSD.hh,v 1.4 2006/06/29 16:33:19 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01DetectorConstruction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01DetectorConstruction.hh,v 1.4 2006/06/29 16:33:22 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01DetectorMessenger.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01DetectorMessenger.hh,v 1.4 2006/06/29 16:33:25 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01EventAction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01EventAction.hh,v 1.6 2006/06/29 16:33:27 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01PhysicsList.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PhysicsList.hh,v 1.4 2006/06/29 16:33:29 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01PrimaryGeneratorAction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PrimaryGeneratorAction.hh,v 1.4 2006/06/29 16:33:31 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01PrimaryGeneratorMessenger.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PrimaryGeneratorMessenger.hh,v 1.4 2006/06/29 16:33:33 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01RunAction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01RunAction.hh,v 1.6 2006/06/29 16:33:36 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01SteppingAction.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01SteppingAction.hh,v 1.6 2006/06/29 16:33:38 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/include/AnaEx01SteppingVerbose.hh
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01SteppingVerbose.hh,v 1.4 2006/06/29 16:33:40 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01AnalysisManager.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01AnalysisManager.cc,v 1.18 2009/05/13 08:33:17 gbarrand Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01CalorHit.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01CalorHit.cc,v 1.6 2006/06/29 16:33:44 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01CalorimeterSD.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01CalorimeterSD.cc,v 1.5 2006/06/29 16:33:46 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01DetectorConstruction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01DetectorConstruction.cc,v 1.5 2006/06/29 16:33:49 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01DetectorMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01DetectorMessenger.cc,v 1.5 2006/06/29 16:33:51 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01EventAction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01EventAction.cc,v 1.6 2006/06/29 16:33:53 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01PhysicsList.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PhysicsList.cc,v 1.5 2006/06/29 16:33:55 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01PrimaryGeneratorAction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PrimaryGeneratorAction.cc,v 1.5 2006/06/29 16:33:57 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01PrimaryGeneratorMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01PrimaryGeneratorMessenger.cc,v 1.5 2006/06/29 16:33:59 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01RunAction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01RunAction.cc,v 1.7 2006/06/29 16:34:01 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01SteppingAction.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01SteppingAction.cc,v 1.7 2006/06/29 16:34:03 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/AnaEx01/src/AnaEx01SteppingVerbose.cc
r1230 r1337 26 26 // 27 27 // $Id: AnaEx01SteppingVerbose.cc,v 1.7 2006/06/29 16:34:05 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/GNUmakefile
r807 r1337 1 # $Id: GNUmakefile,v 1. 1 2007/05/26 00:18:27 tkoiExp $1 # $Id: GNUmakefile,v 1.2 2010/01/11 16:22:59 gcosmo Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for examples module. Gabriele Cosmo, 06/04/98. … … 9 9 10 10 ifndef G4INSTALL 11 G4INSTALL = ../../.. 11 G4INSTALL = ../../../.. 12 12 endif 13 13 -
trunk/examples/extended/analysis/N03Con/History
r807 r1337 15 15 ---------------------------------------------------------- 16 16 17 12-05-10 J. Allison exampleN03Con-V09-03-01 18 - Introduced G4UIExecutive. 19 20 31-03-10 T. Koi exampleN03Con-V09-03-00 21 Update Physics list corresponding to the "exampleN03-V09-03-01" 22 include/ExN03PhysicsList.hh 23 src/ExN03PhysicsList.cc 24 17 25 25-05-07 T. Koi exampleN03Con-V08-03-01 18 26 -
trunk/examples/extended/analysis/N03Con/exampleN03Con.cc
r1230 r1337 25 25 // 26 26 // 27 // $Id: exampleN03Con.cc,v 1. 2 2007/05/26 00:24:09 tkoiExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: exampleN03Con.cc,v 1.4 2010/05/12 12:45:06 allison Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // … … 34 34 #include "G4RunManager.hh" 35 35 #include "G4UImanager.hh" 36 #include "G4UIterminal.hh"37 #include "G4UItcsh.hh"38 39 #ifdef G4UI_USE_XM40 #include "G4UIXm.hh"41 #endif42 43 #ifdef G4UI_USE_WIN3244 #include "G4UIWin32.hh"45 #endif46 36 47 37 #include "Randomize.hh" … … 49 39 #ifdef G4VIS_USE 50 40 #include "G4VisExecutive.hh" 41 #endif 42 43 #ifdef G4UI_USE 44 #include "G4UIExecutive.hh" 51 45 #endif 52 46 … … 84 78 runManager->SetUserInitialization(physics); 85 79 86 G4UIsession* session=0;87 88 if (argc==1) // Define UI session for interactive mode.89 {90 // G4UIterminal is a (dumb) terminal91 //92 #if defined(G4UI_USE_XM)93 session = new G4UIXm(argc,argv);94 #elif defined(G4UI_USE_WIN32)95 session = new G4UIWin32();96 #elif defined(G4UI_USE_TCSH)97 session = new G4UIterminal(new G4UItcsh);98 #else99 session = new G4UIterminal();100 #endif101 }102 103 #ifdef G4VIS_USE104 // Visualization manager105 //106 G4VisManager* visManager = new G4VisExecutive;107 visManager->Initialize();108 #endif109 110 80 // Set user action classes 111 81 // … … 127 97 runManager->Initialize(); 128 98 99 #ifdef G4VIS_USE 100 // Visualization manager 101 // 102 G4VisManager* visManager = new G4VisExecutive; 103 visManager->Initialize(); 104 #endif 105 129 106 // Get the pointer to the User Interface manager 130 107 // 131 G4UImanager* UI = G4UImanager::GetUIpointer();108 G4UImanager* UImanager = G4UImanager::GetUIpointer(); 132 109 133 if ( session) // Define UI session for interactivemode110 if (argc!=1) // batch mode 134 111 { 135 // G4UIterminal is a (dumb) terminal136 //137 // UI->ApplyCommand("/control/execute vis.mac");138 #if defined(G4UI_USE_XM) || defined(G4UI_USE_WIN32)139 // Customize the G4UIXm,Win32 menubar with a macro file140 //141 // UI->ApplyCommand("/control/execute visTutor/gui.mac");142 #endif143 session->SessionStart();144 delete session;145 }146 else // Batch mode147 {148 112 #ifdef G4VIS_USE 149 113 visManager->SetVerboseLevel("quiet"); … … 151 115 G4String command = "/control/execute "; 152 116 G4String fileName = argv[1]; 153 UI->ApplyCommand(command+fileName); 117 UImanager->ApplyCommand(command+fileName); 118 } 119 else 120 { // interactive mode : define UI session 121 #ifdef G4UI_USE 122 G4UIExecutive* ui = new G4UIExecutive(argc, argv); 123 ui->SessionStart(); 124 delete ui; 125 #endif 154 126 } 155 127 -
trunk/examples/extended/analysis/N03Con/include/ExN03DetectorConstruction.hh
r1230 r1337 26 26 // 27 27 // $Id: ExN03DetectorConstruction.hh,v 1.1 2007/05/26 00:18:27 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/include/ExN03DetectorMessenger.hh
r1230 r1337 26 26 // 27 27 // $Id: ExN03DetectorMessenger.hh,v 1.1 2007/05/26 00:18:27 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/include/ExN03EventAction.hh
r1230 r1337 26 26 // 27 27 // $Id: ExN03EventAction.hh,v 1.1 2007/05/26 00:18:27 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/include/ExN03EventActionMessenger.hh
r1230 r1337 26 26 // 27 27 // $Id: ExN03EventActionMessenger.hh,v 1.1 2007/05/26 00:18:27 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/include/ExN03PhysicsList.hh
r1230 r1337 25 25 // 26 26 // 27 // $Id: ExN03PhysicsList.hh,v 1. 1 2007/05/26 00:18:27tkoi Exp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: ExN03PhysicsList.hh,v 1.2 2010/03/31 21:43:48 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // … … 43 43 class ExN03PhysicsList: public G4VUserPhysicsList 44 44 { 45 46 47 ~ExN03PhysicsList();45 public: 46 ExN03PhysicsList(); 47 virtual ~ExN03PhysicsList(); 48 48 49 protected: 50 // Construct particle and physics 51 void ConstructParticle(); 52 void ConstructProcess(); 49 // Construct particle and physics 50 void ConstructParticle(); 51 void ConstructProcess(); 53 52 54 void SetCuts(); 53 void SetCuts(); 54 55 private: 55 56 56 57 protected: 58 // these methods Construct particles 59 void ConstructBosons(); 60 void ConstructLeptons(); 61 void ConstructMesons(); 62 void ConstructBaryons(); 63 64 protected: 65 // these methods Construct physics processes and register them 66 void ConstructGeneral(); 67 void ConstructEM(); 57 // these methods Construct physics processes and register them 58 void ConstructDecay(); 59 void ConstructEM(); 68 60 }; 69 61 -
trunk/examples/extended/analysis/N03Con/include/ExN03PrimaryGeneratorAction.hh
r1230 r1337 26 26 // 27 27 // $Id: ExN03PrimaryGeneratorAction.hh,v 1.1 2007/05/26 00:18:27 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/include/ExN03PrimaryGeneratorMessenger.hh
r1230 r1337 26 26 // 27 27 // $Id: ExN03PrimaryGeneratorMessenger.hh,v 1.1 2007/05/26 00:18:27 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/include/ExN03RunAction.hh
r1230 r1337 26 26 // 27 27 // $Id: ExN03RunAction.hh,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/include/ExN03SteppingAction.hh
r1230 r1337 26 26 // 27 27 // $Id: ExN03SteppingAction.hh,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/include/ExN03SteppingVerbose.hh
r1230 r1337 26 26 // 27 27 // $Id: ExN03SteppingVerbose.hh,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/src/ExN03DetectorConstruction.cc
r1230 r1337 26 26 // 27 27 // $Id: ExN03DetectorConstruction.cc,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/src/ExN03DetectorMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: ExN03DetectorMessenger.cc,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/src/ExN03EventAction.cc
r1230 r1337 26 26 // 27 27 // $Id: ExN03EventAction.cc,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/src/ExN03EventActionMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: ExN03EventActionMessenger.cc,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/src/ExN03PhysicsList.cc
r1230 r1337 25 25 // 26 26 // 27 // $Id: ExN03PhysicsList.cc,v 1. 1 2007/05/26 00:18:28 tkoi Exp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: ExN03PhysicsList.cc,v 1.2 2010/03/31 21:43:48 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // … … 36 36 37 37 #include "G4ProcessManager.hh" 38 #include "G4ParticleTypes.hh" 38 39 #include "G4BosonConstructor.hh" 40 #include "G4LeptonConstructor.hh" 41 #include "G4MesonConstructor.hh" 42 #include "G4BosonConstructor.hh" 43 #include "G4BaryonConstructor.hh" 44 #include "G4IonConstructor.hh" 39 45 40 46 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 42 48 ExN03PhysicsList::ExN03PhysicsList(): G4VUserPhysicsList() 43 49 { 44 defaultCutValue = 1.0*mm;45 SetVerboseLevel(1);50 defaultCutValue = 1.0*mm; 51 SetVerboseLevel(1); 46 52 } 47 53 … … 60 66 // created in the program. 61 67 62 ConstructBosons(); 63 ConstructLeptons(); 64 ConstructMesons(); 65 ConstructBaryons(); 66 } 67 68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 69 70 void ExN03PhysicsList::ConstructBosons() 71 { 72 // pseudo-particles 73 G4Geantino::GeantinoDefinition(); 74 G4ChargedGeantino::ChargedGeantinoDefinition(); 75 76 // gamma 77 G4Gamma::GammaDefinition(); 78 79 // optical photon 80 G4OpticalPhoton::OpticalPhotonDefinition(); 81 } 82 83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 84 85 void ExN03PhysicsList::ConstructLeptons() 86 { 87 // leptons 88 G4Electron::ElectronDefinition(); 89 G4Positron::PositronDefinition(); 90 G4MuonPlus::MuonPlusDefinition(); 91 G4MuonMinus::MuonMinusDefinition(); 92 93 G4NeutrinoE::NeutrinoEDefinition(); 94 G4AntiNeutrinoE::AntiNeutrinoEDefinition(); 95 G4NeutrinoMu::NeutrinoMuDefinition(); 96 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); 97 } 98 99 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 100 101 void ExN03PhysicsList::ConstructMesons() 102 { 103 // mesons 104 G4PionPlus::PionPlusDefinition(); 105 G4PionMinus::PionMinusDefinition(); 106 G4PionZero::PionZeroDefinition(); 107 G4Eta::EtaDefinition(); 108 G4EtaPrime::EtaPrimeDefinition(); 109 G4KaonPlus::KaonPlusDefinition(); 110 G4KaonMinus::KaonMinusDefinition(); 111 G4KaonZero::KaonZeroDefinition(); 112 G4AntiKaonZero::AntiKaonZeroDefinition(); 113 G4KaonZeroLong::KaonZeroLongDefinition(); 114 G4KaonZeroShort::KaonZeroShortDefinition(); 115 } 116 117 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 118 119 void ExN03PhysicsList::ConstructBaryons() 120 { 121 // barions 122 G4Proton::ProtonDefinition(); 123 G4AntiProton::AntiProtonDefinition(); 124 G4Neutron::NeutronDefinition(); 125 G4AntiNeutron::AntiNeutronDefinition(); 126 } 127 68 G4BosonConstructor pBosonConstructor; 69 pBosonConstructor.ConstructParticle(); 70 71 G4LeptonConstructor pLeptonConstructor; 72 pLeptonConstructor.ConstructParticle(); 73 74 G4MesonConstructor pMesonConstructor; 75 pMesonConstructor.ConstructParticle(); 76 77 G4BaryonConstructor pBaryonConstructor; 78 pBaryonConstructor.ConstructParticle(); 79 80 G4IonConstructor pIonConstructor; 81 pIonConstructor.ConstructParticle(); 82 } 128 83 129 84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 133 88 AddTransportation(); 134 89 ConstructEM(); 135 Construct General();90 ConstructDecay(); 136 91 } 137 92 … … 142 97 #include "G4PhotoElectricEffect.hh" 143 98 144 #include "G4MultipleScattering.hh" 145 99 #include "G4eMultipleScattering.hh" 146 100 #include "G4eIonisation.hh" 147 101 #include "G4eBremsstrahlung.hh" 148 102 #include "G4eplusAnnihilation.hh" 149 103 104 #include "G4MuMultipleScattering.hh" 150 105 #include "G4MuIonisation.hh" 151 106 #include "G4MuBremsstrahlung.hh" 152 107 #include "G4MuPairProduction.hh" 153 108 109 #include "G4hMultipleScattering.hh" 154 110 #include "G4hIonisation.hh" 111 #include "G4hBremsstrahlung.hh" 112 #include "G4hPairProduction.hh" 113 114 #include "G4ionIonisation.hh" 155 115 156 116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 172 132 } else if (particleName == "e-") { 173 133 //electron 174 pmanager->AddProcess(new G4 MultipleScattering,-1, 1,1);175 pmanager->AddProcess(new G4eIonisation, -1, 2,2);176 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);134 pmanager->AddProcess(new G4eMultipleScattering,-1, 1, 1); 135 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 136 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); 177 137 178 138 } else if (particleName == "e+") { 179 139 //positron 180 pmanager->AddProcess(new G4 MultipleScattering,-1, 1,1);181 pmanager->AddProcess(new G4eIonisation, -1, 2,2);182 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3,3);183 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1,4);184 140 pmanager->AddProcess(new G4eMultipleScattering,-1, 1, 1); 141 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 142 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); 143 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); 144 185 145 } else if( particleName == "mu+" || 186 146 particleName == "mu-" ) { 187 147 //muon 188 pmanager->AddProcess(new G4MultipleScattering,-1, 1,1); 189 pmanager->AddProcess(new G4MuIonisation, -1, 2,2); 190 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3,3); 191 pmanager->AddProcess(new G4MuPairProduction, -1, 4,4); 148 pmanager->AddProcess(new G4MuMultipleScattering,-1, 1, 1); 149 pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); 150 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); 151 pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4); 152 153 } else if( particleName == "proton" || 154 particleName == "pi-" || 155 particleName == "pi+" ) { 156 //proton 157 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 158 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 159 pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3); 160 pmanager->AddProcess(new G4hPairProduction, -1, 4, 4); 192 161 193 } else if ((!particle->IsShortLived()) && 162 } else if( particleName == "alpha" || 163 particleName == "He3" ) { 164 //alpha 165 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 166 pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); 167 168 } else if( particleName == "GenericIon" ) { 169 //Ions 170 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 171 pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); 172 173 } else if ((!particle->IsShortLived()) && 194 174 (particle->GetPDGCharge() != 0.0) && 195 175 (particle->GetParticleName() != "chargedgeantino")) { 196 176 //all others charged particles except geantino 197 pmanager->AddProcess(new G4 MultipleScattering,-1, 1,1);198 pmanager->AddProcess(new G4hIonisation, -1, 2,2);199 } 177 pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1); 178 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 179 } 200 180 } 201 181 } … … 205 185 #include "G4Decay.hh" 206 186 207 void ExN03PhysicsList::Construct General()187 void ExN03PhysicsList::ConstructDecay() 208 188 { 209 189 // Add Decay Process 210 190 G4Decay* theDecayProcess = new G4Decay(); 211 191 theParticleIterator->reset(); 212 192 while( (*theParticleIterator)() ){ … … 237 217 SetCutValue(defaultCutValue, "e-"); 238 218 SetCutValue(defaultCutValue, "e+"); 219 SetCutValue(defaultCutValue, "proton"); 239 220 240 221 if (verboseLevel>0) DumpCutValuesTable(); -
trunk/examples/extended/analysis/N03Con/src/ExN03PrimaryGeneratorAction.cc
r1230 r1337 26 26 // 27 27 // $Id: ExN03PrimaryGeneratorAction.cc,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/src/ExN03PrimaryGeneratorMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: ExN03PrimaryGeneratorMessenger.cc,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/src/ExN03RunAction.cc
r1230 r1337 26 26 // 27 27 // $Id: ExN03RunAction.cc,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/analysis/N03Con/src/ExN03SteppingAction.cc
r1230 r1337 26 26 // 27 27 // $Id: ExN03SteppingAction.cc,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/analysis/N03Con/src/ExN03SteppingVerbose.cc
r1230 r1337 26 26 // 27 27 // $Id: ExN03SteppingVerbose.cc,v 1.1 2007/05/26 00:18:28 tkoi Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset
for help on using the changeset viewer.