diff --git a/geant4/LEMuSR/GNUmakefile b/geant4/LEMuSR/GNUmakefile new file mode 100644 index 0000000..ab55435 --- /dev/null +++ b/geant4/LEMuSR/GNUmakefile @@ -0,0 +1,71 @@ +# $Id$ +# -------------------------------------------------------------- +# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98. +# -------------------------------------------------------------- + +name := LEMuSR +G4TARGET := $(name) +G4EXLIB := true + +ifndef G4INSTALL + G4INSTALL = ../ +endif + +.PHONY: all +all: lib bin + +include $(G4INSTALL)/config/architecture.gmk + +include $(G4INSTALL)/config/binmake.gmk + +########################### TRIUMF ############################### +#CPPFLAGS += -I$(G4INSTALL)/spintest/triumf/spintest/include + +########################### ROOT ################################# +ifdef ROOTSYS +ifndef G4UI_USE_ROOT +CPPFLAGS += -DG4ANALYSIS_USE_ROOT $(shell $(ROOTSYS)/bin/root-config --cflags) +ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --nonew --glibs) -lMinuit -lHtml +ROOTLIBS := $(filter-out -lNew,$(ROOTLIBS)) +ROOTLIBS := $(filter-out -lThread,$(ROOTLIBS)) +ROOTLIBS := $(filter-out -lpthread,$(ROOTLIBS)) +LDLIBS += $(ROOTLIBS) +endif +endif + + +ifdef ASYM_USE_LEMU +CPPFLAGS += -DASYM_USE_LEMU +endif + +ifdef LEMU_TEST_ASYM +CPPFLAGS += -DLEMU_TEST_ASYM +endif + +ifdef LEMU_TEST_FIELD +CPPFLAGS += -DLEMU_TEST_FIELD +endif + +ifdef LEMU_TEST_CFOIL +CPPFLAGS += -DLEMU_TEST_CFOIL +endif + +ifdef LEMU_TEST_FOCAL_LENGTH +CPPFLAGS += -DLEMU_TEST_FOCAL_LENGTH +endif + +ifdef G4SRVERBOSE +CPPFLAGS += -DG4SRVERBOSE +endif + +ifdef DEBUG_INTERPOLATING_FIELD +CPPFLAGS += -DDEBUG_INTERPOLATING_FIELD +endif + +ifdef NO_CFOIL +CPPFLAGS += -DNO_CFOIL +endif + +ifdef LEMU_GET_NEWMAPS +CPPFLAGS += -DLEMU_GET_NEWMAPS +endif diff --git a/geant4/LEMuSR/LEMuSR.cc b/geant4/LEMuSR/LEMuSR.cc new file mode 100644 index 0000000..6c09256 --- /dev/null +++ b/geant4/LEMuSR/LEMuSR.cc @@ -0,0 +1,179 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION +// ID : LEMuSR.cc , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-06-24 09:57 + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + +// G4 CLASSES +#include "G4RunManager.hh" +#include "G4UImanager.hh" +#include "G4UIterminal.hh" +#include "G4UItcsh.hh" + +#include "G4ios.hh" +#include + +// LEMuSR CLASSES +#include "LEMuSRDetectorConstruction.hh" + +#include "LEMuSRPhysicsList.hh" +#include "PhysicsList.hh" + +#include "LEMuSRPrimaryGeneratorAction.hh" + +#include "LEMuSRRunAction.hh" +#include "LEMuSREventAction.hh" +#include "LEMuSRSteppingAction.hh" +#include "LEMuSRStackingAction.hh" +#include "LEMuSRTrackingAction.hh" + +// DUMMY PLANES STEPPING ACTIONS +#include "AsymCheck.hh" +#include "FieldCheck.hh" +#include "TDCheck.hh" +#include "FocalLengthTest.hh" + + +// LEMuSR VISUALIZATION CLASS +#include "LEMuSRVisManager.hh" + +// Interactive root xwindow +#ifdef G4UI_USE_ROOT +#include "G4UIRoot.hh" +#endif + + +int main(int argc,char** argv)//argc:: defines the user interface +{ + + // random numbers + time_t myseed; + time(&myseed); + RanecuEngine *theRanGenerator = new RanecuEngine; + theRanGenerator->setSeed(myseed); + HepRandom::setTheEngine(theRanGenerator); + + + // 1 The run manager construction + G4RunManager* runManager = new G4RunManager; + + // 2 The three mandatory classes + + // 2.1 LEMuSR Initialization classes + LEMuSRDetectorConstruction* lemuDetector = new LEMuSRDetectorConstruction(); + + LEMuSRPhysicsList* lemuPhysicsList = new LEMuSRPhysicsList(); + + // 2.2 LEMuSR Action class + LEMuSRPrimaryGeneratorAction* lemuPGA = new LEMuSRPrimaryGeneratorAction(); + + + // 2.3 Setting the mandatory Initialization classes + runManager ->SetUserInitialization( lemuDetector ); + + runManager ->SetUserInitialization( lemuPhysicsList ); + + + // 2.4 Setting the mandatory Action class + runManager ->SetUserAction( lemuPGA ); + + // 3 The optionnal classes + runManager ->SetUserAction( new LEMuSRRunAction()); + //#ifndef LEMU_TEST_FOCAL_LENGTH + runManager ->SetUserAction( new LEMuSREventAction());// scintillators, sensitive detectors + //#endif + + + // optionnal stepping action: enable one at once + +#if defined LEMU_TEST_ASYM + runManager ->SetUserAction( new AsymCheck()); +#elif defined LEMU_TEST_FIELD + runManager ->SetUserAction( new FieldCheck()); +#elif defined LEMU_TEST_CFOIL + runManager ->SetUserAction( new TDCheck()); +#elif defined LEMU_TEST_FOCAL_LENGTH + runManager ->SetUserAction( new FocalLengthTest()); +#else + runManager ->SetUserAction( new LEMuSRSteppingAction());// fur debugging +#endif + + + + // 4 The visualization manager construction and initialization + // ! will be initialize only if the env variable G4VIS_USE=1 ! +#ifdef G4VIS_USE + LEMuSRVisManager* lemuVisManager = new LEMuSRVisManager; + lemuVisManager -> Initialize(); +#endif + + // 5 Initialize G4 kernel + runManager -> Initialize(); + + + // Configuration of the User Interface manager + G4UImanager* UI = G4UImanager::GetUIpointer(); + + G4UIsession* session = 0; + + + +#if defined G4UI_USE_ROOT + // G4UIRoot is a ROOT based GUI + session = new G4UIRoot( argc, argv); +#elif defined G4UI_USE_TCSH + session = new G4UIterminal(new G4UItcsh); + G4cout<<"\n G4UI_USE_TCSH! \n"<ApplyCommand("/control/execute visual.mac"); + UI->ApplyCommand("/run/verbose 2"); + + // UI->ApplyCommand("/Detector/MagneticField on"); + // UI->ApplyCommand("/run/beamOn 1"); +#if defined LEMU_TEST_ASYM + // UI->ApplyCommand("/Detector/ElectricField off"); + UI->ApplyCommand("/Detector/MagneticField 50"); + UI->ApplyCommand("/Detector/AsymCheck on"); + UI->ApplyCommand("/lemuGun/gunPosition 0 0 0"); + UI->ApplyCommand("/lemuGun/energy/defined 0"); + G4cout<<"\n READY TO TEST ASYMETRY! "; +#endif + + + session->SessionStart(); + + // JOB TERMINATION + + delete session; + +#if defined G4VIS_USE + delete lemuVisManager; +#endif + + + delete runManager; + return 0; +} + + diff --git a/geant4/LEMuSR/MEYER/M10.eps b/geant4/LEMuSR/MEYER/M10.eps new file mode 100644 index 0000000..dc500bb --- /dev/null +++ b/geant4/LEMuSR/MEYER/M10.eps @@ -0,0 +1,734 @@ +%!PS-Adobe-2.0 +%%Title: M10.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Mon Apr 11 19:41:32 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +6248 0 V +1.000 UL +LTb +714 420 M +63 0 V +6185 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 865 M +6248 0 V +1.000 UL +LTb +714 865 M +63 0 V +6185 0 R +-63 0 V +630 865 M +( 0.1) Rshow +1.000 UL +LTa +714 1310 M +6248 0 V +1.000 UL +LTb +714 1310 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.2) Rshow +1.000 UL +LTa +714 1756 M +6248 0 V +1.000 UL +LTb +714 1756 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.3) Rshow +1.000 UL +LTa +714 2201 M +6248 0 V +1.000 UL +LTb +714 2201 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.4) Rshow +1.000 UL +LTa +714 2646 M +6248 0 V +1.000 UL +LTb +714 2646 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.5) Rshow +1.000 UL +LTa +714 3091 M +6248 0 V +1.000 UL +LTb +714 3091 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.6) Rshow +1.000 UL +LTa +714 3536 M +6248 0 V +1.000 UL +LTb +714 3536 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.7) Rshow +1.000 UL +LTa +714 3982 M +6248 0 V +1.000 UL +LTb +714 3982 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.8) Rshow +1.000 UL +LTa +714 4427 M +6248 0 V +1.000 UL +LTb +714 4427 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.9) Rshow +1.000 UL +LTa +714 4872 M +6248 0 V +1.000 UL +LTb +714 4872 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 1) Rshow +1.000 UL +LTa +714 420 M +0 4452 V +1.000 UL +LTb +714 420 M +0 63 V +0 4389 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +1408 420 M +0 4452 V +1.000 UL +LTb +1408 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 5) Cshow +1.000 UL +LTa +2102 420 M +0 4452 V +1.000 UL +LTb +2102 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 10) Cshow +1.000 UL +LTa +2797 420 M +0 4452 V +1.000 UL +LTb +2797 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 15) Cshow +1.000 UL +LTa +3491 420 M +0 4452 V +1.000 UL +LTb +3491 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 20) Cshow +1.000 UL +LTa +4185 420 M +0 4452 V +1.000 UL +LTb +4185 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 25) Cshow +1.000 UL +LTa +4879 420 M +0 4452 V +1.000 UL +LTb +4879 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 30) Cshow +1.000 UL +LTa +5574 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +5574 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 35) Cshow +1.000 UL +LTa +6268 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +6268 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 40) Cshow +1.000 UL +LTa +6962 420 M +0 4452 V +1.000 UL +LTb +6962 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 45) Cshow +1.000 UL +LTb +714 420 M +6248 0 V +0 4452 V +-6248 0 V +714 420 L +140 2646 M +currentpoint gsave translate 90 rotate 0 0 M +(Meyer's distribution) Cshow +grestore +3838 70 M +(scatt. angle [deg]) Cshow +1.000 UP +1.000 UL +LT0 +6311 4739 M +('M10.keV' us 1:2) Rshow +783 4872 Pls +853 4843 Pls +922 4814 Pls +992 4785 Pls +1061 4756 Pls +1131 4712 Pls +1200 4619 Pls +1269 4527 Pls +1339 4434 Pls +1408 4342 Pls +1478 4238 Pls +1547 4121 Pls +1616 4003 Pls +1686 3869 Pls +1755 3734 Pls +1825 3601 Pls +1894 3467 Pls +1964 3334 Pls +2033 3201 Pls +2102 3067 Pls +2172 2939 Pls +2241 2811 Pls +2311 2682 Pls +2380 2554 Pls +2450 2430 Pls +2519 2323 Pls +2588 2215 Pls +2658 2108 Pls +2727 2001 Pls +2797 1903 Pls +2866 1818 Pls +2936 1733 Pls +3005 1648 Pls +3074 1563 Pls +3144 1489 Pls +3213 1420 Pls +3283 1354 Pls +3352 1297 Pls +3421 1239 Pls +3491 1193 Pls +3560 1147 Pls +3630 1101 Pls +3699 1055 Pls +3769 1011 Pls +3838 978 Pls +3907 945 Pls +3977 912 Pls +4046 879 Pls +4116 850 Pls +4185 826 Pls +4255 802 Pls +4324 778 Pls +4393 755 Pls +4463 735 Pls +4532 717 Pls +4602 700 Pls +4671 682 Pls +4740 665 Pls +4810 652 Pls +4879 640 Pls +4949 629 Pls +5018 617 Pls +5088 605 Pls +5157 596 Pls +5226 587 Pls +5296 578 Pls +5365 569 Pls +5435 560 Pls +5504 554 Pls +5574 547 Pls +5643 540 Pls +5712 534 Pls +5782 529 Pls +5851 524 Pls +5921 520 Pls +5990 516 Pls +6060 512 Pls +6129 508 Pls +6198 504 Pls +6268 500 Pls +6337 496 Pls +6407 492 Pls +6476 488 Pls +6545 483 Pls +6615 481 Pls +6684 479 Pls +6754 477 Pls +6823 474 Pls +6893 472 Pls +6962 470 Pls +6594 4739 Pls +1.000 UL +LT1 +6311 4599 M +(exp\(-x*x/200.\)) Rshow +6395 4599 M +399 0 V +714 4872 M +63 -5 V +63 -13 V +63 -23 V +63 -32 V +64 -41 V +63 -49 V +63 -57 V +63 -65 V +63 -72 V +63 -80 V +63 -86 V +63 -92 V +63 -98 V +64 -103 V +63 -107 V +63 -112 V +63 -114 V +63 -117 V +63 -120 V +63 -121 V +63 -122 V +63 -123 V +64 -122 V +63 -123 V +63 -121 V +63 -120 V +63 -118 V +63 -115 V +63 -114 V +63 -110 V +63 -107 V +64 -104 V +63 -101 V +63 -96 V +63 -93 V +63 -89 V +63 -85 V +63 -80 V +63 -77 V +63 -72 V +64 -69 V +63 -64 V +63 -61 V +63 -56 V +63 -53 V +63 -50 V +63 -46 V +63 -42 V +63 -39 V +64 -37 V +63 -33 V +63 -30 V +63 -28 V +63 -26 V +63 -23 V +63 -22 V +63 -19 V +63 -17 V +64 -16 V +63 -14 V +63 -13 V +63 -11 V +63 -10 V +63 -9 V +63 -8 V +63 -8 V +63 -6 V +64 -6 V +63 -4 V +63 -5 V +63 -4 V +63 -3 V +63 -3 V +63 -2 V +63 -3 V +63 -2 V +64 -1 V +63 -2 V +63 -1 V +63 -1 V +63 -1 V +63 -1 V +63 0 V +63 -1 V +63 0 V +64 -1 V +63 0 V +63 -1 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 -1 V +64 0 V +63 0 V +63 0 V +63 0 V +63 0 V +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/MEYER/M10.keV b/geant4/LEMuSR/MEYER/M10.keV new file mode 100644 index 0000000..a5743d4 --- /dev/null +++ b/geant4/LEMuSR/MEYER/M10.keV @@ -0,0 +1,167 @@ +0.5 1 0 +1 0.99351 0.0357481 +1.5 0.98702 0.0710264 +2 0.98053 0.105832 +2.5 0.974041 0.140163 +3 0.964167 0.173408 +3.5 0.943389 0.203577 +4 0.922611 0.232237 +4.5 0.901832 0.259387 +5 0.881054 0.285026 +5.5 0.857766 0.30825 +6 0.83169 0.328679 +6.5 0.805237 0.347053 +7 0.775073 0.361776 +7.5 0.744909 0.374314 +8 0.714917 0.384761 +8.5 0.684995 0.39308 +9 0.655074 0.399237 +9.5 0.625152 0.403233 +10 0.595231 0.405073 +10.5 0.566391 0.405532 +11 0.537611 0.403961 +11.5 0.508832 0.400324 +12 0.480052 0.394622 +12.5 0.452135 0.387601 +13 0.428038 0.381995 +13.5 0.403941 0.374666 +14 0.379845 0.36562 +14.5 0.355748 0.354859 +15 0.333765 0.344571 +15.5 0.314688 0.335826 +16 0.295611 0.32573 +16.5 0.276534 0.314285 +17 0.257457 0.301498 +17.5 0.240716 0.290187 +18 0.225189 0.279208 +18.5 0.21038 0.268056 +19 0.19745 0.258329 +19.5 0.18452 0.247699 +20 0.173957 0.239428 +20.5 0.163673 0.230816 +21 0.153388 0.22149 +21.5 0.143103 0.211455 +22 0.133193 0.201278 +22.5 0.125753 0.194237 +23 0.118313 0.186686 +23.5 0.110873 0.178626 +24 0.103433 0.170059 +24.5 0.0967697 0.16229 +25 0.0914364 0.156345 +25.5 0.086103 0.150039 +26 0.0807697 0.143374 +26.5 0.0754364 0.136352 +27 0.0709517 0.130535 +27.5 0.0670204 0.125456 +28 0.063089 0.120115 +28.5 0.0591577 0.114514 +29 0.0552264 0.108655 +29.5 0.0523566 0.10466 +30 0.0496858 0.100881 +30.5 0.0470149 0.0969269 +31 0.0443441 0.0927989 +31.5 0.041722 0.0886018 +32 0.0396678 0.0854598 +32.5 0.0376137 0.0821853 +33 0.0355596 0.0787792 +33.5 0.0335055 0.0752425 +34 0.0316272 0.0719762 +34.5 0.0301299 0.0694702 +35 0.0286327 0.0668695 +35.5 0.0271354 0.064175 +36 0.0256381 0.0613873 +36.5 0.0244597 0.0592799 +37 0.0235393 0.0577323 +37.5 0.0226189 0.0561271 +38 0.0216985 0.0544646 +38.5 0.0207781 0.0527455 +39 0.0198577 0.0509702 +39.5 0.0189373 0.0491392 +40 0.0180169 0.0472529 +40.5 0.0170965 0.045312 +41 0.0161761 0.0433168 +41.5 0.0152557 0.041268 +42 0.0143353 0.0391661 +42.5 0.013698 0.0377927 +43 0.0132167 0.0368168 +43.5 0.0127354 0.0358126 +44 0.0122542 0.0347803 +44.5 0.0117729 0.0337203 +45 0.0112916 0.0326328 +45.5 0.0108103 0.0315181 +46 0.010329 0.0303765 +46.5 0.00984769 0.0292083 +47 0.00936639 0.0280139 +47.5 0.0088851 0.0267934 +48 0.00840381 0.0255473 +48.5 0.00807864 0.0247543 +49 0.00780923 0.0241159 +49.5 0.00753982 0.0234628 +50 0.00727041 0.0227952 +50.5 0.007001 0.0221132 +51 0.00673158 0.0214171 +51.5 0.00646217 0.0207071 +52 0.00619276 0.0199833 +52.5 0.00592335 0.0192459 +53 0.00565394 0.0184951 +53.5 0.00538453 0.0177311 +54 0.00511512 0.016954 +54.5 0.00493893 0.0164751 +55 0.00478199 0.0160521 +55.5 0.00462504 0.0156214 +56 0.0044681 0.0151829 +56.5 0.00431115 0.0147369 +57 0.00415421 0.0142835 +57.5 0.00399726 0.0138227 +58 0.00384032 0.0133547 +58.5 0.00368337 0.0128797 +59 0.00352643 0.0123976 +59.5 0.00336948 0.0119088 +60 0.00321254 0.0114132 +60.5 0.00307638 0.0109852 +61 0.00294201 0.0105579 +61.5 0.00280764 0.0101251 +62 0.00267327 0.00968679 +62.5 0.0025389 0.00924312 +63 0.00240453 0.00879422 +63.5 0.00227016 0.00834018 +64 0.00213579 0.00788111 +64.5 0.00200142 0.00741713 +65 0.00186704 0.00694834 +65.5 0.00173267 0.00647487 +66 0.0015983 0.00599681 +66.5 0.00146393 0.00551429 +67 0.00132956 0.00502741 +67.5 0.00119519 0.0045363 +68 0.00106082 0.00404106 +68.5 0.000926448 0.00354181 +69 0.000792077 0.00303867 +69.5 0.000657706 0.00253176 +70 0.000523335 0.00202119 +70.5 0.000388965 0.00150707 +71 0.000254594 0.000989538 +71.5 0.000120223 0.0004687 +72 0 0 +72.5 0 0 +73 0 0 +73.5 0 0 +74 0 0 +74.5 0 0 +75 0 0 +75.5 0 0 +76 0 0 +76.5 0 0 +77 0 0 +77.5 0 0 +78 0 0 +78.5 0 0 +79 0 0 +79.5 0 0 +80 0 0 +80.5 0 0 +81 0 0 +81.5 0 0 +82 0 0 +82.5 0 0 +83 0 0 +83.5 0 0 diff --git a/geant4/LEMuSR/MEYER/M10.pdf b/geant4/LEMuSR/MEYER/M10.pdf new file mode 100644 index 0000000..635131d Binary files /dev/null and b/geant4/LEMuSR/MEYER/M10.pdf differ diff --git a/geant4/LEMuSR/MEYER/M10sin.eps b/geant4/LEMuSR/MEYER/M10sin.eps new file mode 100644 index 0000000..859b971 --- /dev/null +++ b/geant4/LEMuSR/MEYER/M10sin.eps @@ -0,0 +1,805 @@ +%!PS-Adobe-2.0 +%%Title: Ma10sin.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Mon Apr 11 19:49:42 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +6248 0 V +1.000 UL +LTb +714 420 M +63 0 V +6185 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 915 M +6248 0 V +1.000 UL +LTb +714 915 M +63 0 V +6185 0 R +-63 0 V +630 915 M +( 0.1) Rshow +1.000 UL +LTa +714 1409 M +6248 0 V +1.000 UL +LTb +714 1409 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.2) Rshow +1.000 UL +LTa +714 1904 M +6248 0 V +1.000 UL +LTb +714 1904 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.3) Rshow +1.000 UL +LTa +714 2399 M +6248 0 V +1.000 UL +LTb +714 2399 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.4) Rshow +1.000 UL +LTa +714 2893 M +6248 0 V +1.000 UL +LTb +714 2893 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.5) Rshow +1.000 UL +LTa +714 3388 M +6248 0 V +1.000 UL +LTb +714 3388 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.6) Rshow +1.000 UL +LTa +714 3883 M +6248 0 V +1.000 UL +LTb +714 3883 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.7) Rshow +1.000 UL +LTa +714 4377 M +6248 0 V +1.000 UL +LTb +714 4377 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.8) Rshow +1.000 UL +LTa +714 4872 M +6248 0 V +1.000 UL +LTb +714 4872 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.9) Rshow +1.000 UL +LTa +714 420 M +0 4452 V +1.000 UL +LTb +714 420 M +0 63 V +0 4389 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +1408 420 M +0 4452 V +1.000 UL +LTb +1408 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 5) Cshow +1.000 UL +LTa +2102 420 M +0 4452 V +1.000 UL +LTb +2102 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 10) Cshow +1.000 UL +LTa +2797 420 M +0 4452 V +1.000 UL +LTb +2797 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 15) Cshow +1.000 UL +LTa +3491 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +3491 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 20) Cshow +1.000 UL +LTa +4185 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +4185 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 25) Cshow +1.000 UL +LTa +4879 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +4879 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 30) Cshow +1.000 UL +LTa +5574 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +5574 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 35) Cshow +1.000 UL +LTa +6268 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +6268 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 40) Cshow +1.000 UL +LTa +6962 420 M +0 4452 V +1.000 UL +LTb +6962 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 45) Cshow +1.000 UL +LTb +714 420 M +6248 0 V +0 4452 V +-6248 0 V +714 420 L +140 2646 M +currentpoint gsave translate 90 rotate 0 0 M +(distribution) Cshow +grestore +3838 70 M +([deg]) Cshow +1.000 UP +1.000 UL +LT0 +6311 4739 M +('M20.keV' us 1:3) Rshow +749 420 Pls +783 773 Pls +818 1122 Pls +853 1466 Pls +888 1806 Pls +922 2135 Pls +957 2433 Pls +992 2717 Pls +1026 2986 Pls +1061 3240 Pls +1096 3470 Pls +1131 3673 Pls +1165 3856 Pls +1200 4003 Pls +1235 4128 Pls +1269 4232 Pls +1304 4316 Pls +1339 4379 Pls +1374 4420 Pls +1408 4439 Pls +1443 4446 Pls +1478 4432 Pls +1512 4398 Pls +1547 4343 Pls +1582 4275 Pls +1616 4221 Pls +1651 4150 Pls +1686 4062 Pls +1721 3957 Pls +1755 3856 Pls +1790 3771 Pls +1825 3672 Pls +1859 3560 Pls +1894 3435 Pls +1929 3323 Pls +1964 3215 Pls +1998 3105 Pls +2033 3010 Pls +2068 2905 Pls +2102 2824 Pls +2137 2739 Pls +2172 2648 Pls +2207 2549 Pls +2241 2447 Pls +2276 2378 Pls +2311 2304 Pls +2345 2224 Pls +2380 2140 Pls +2415 2062 Pls +2450 2003 Pls +2484 1941 Pls +2519 1875 Pls +2554 1805 Pls +2588 1747 Pls +2623 1697 Pls +2658 1644 Pls +2693 1589 Pls +2727 1530 Pls +2762 1490 Pls +2797 1453 Pls +2831 1413 Pls +2866 1372 Pls +2901 1330 Pls +2936 1299 Pls +2970 1266 Pls +3005 1232 Pls +3040 1197 Pls +3074 1164 Pls +3109 1139 Pls +3144 1113 Pls +3178 1086 Pls +3213 1058 Pls +3248 1037 Pls +3283 1022 Pls +3317 1006 Pls +3352 989 Pls +3387 972 Pls +3421 955 Pls +3456 936 Pls +3491 917 Pls +3526 898 Pls +3560 877 Pls +3595 856 Pls +3630 835 Pls +3664 821 Pls +3699 811 Pls +3734 801 Pls +3769 791 Pls +3803 780 Pls +3838 769 Pls +3873 758 Pls +3907 746 Pls +3942 734 Pls +3977 722 Pls +4012 709 Pls +4046 697 Pls +4081 688 Pls +4116 682 Pls +4150 675 Pls +4185 669 Pls +4220 662 Pls +4255 654 Pls +4289 647 Pls +4324 640 Pls +4359 632 Pls +4393 624 Pls +4428 616 Pls +4463 608 Pls +4498 603 Pls +4532 599 Pls +4567 594 Pls +4602 590 Pls +4636 585 Pls +4671 581 Pls +4706 576 Pls +4740 571 Pls +4775 566 Pls +4810 561 Pls +4845 556 Pls +4879 550 Pls +4914 546 Pls +4949 541 Pls +4983 536 Pls +5018 532 Pls +5053 527 Pls +5088 522 Pls +5122 517 Pls +5157 512 Pls +5192 507 Pls +5226 502 Pls +5261 496 Pls +5296 491 Pls +5331 485 Pls +5365 480 Pls +5400 474 Pls +5435 468 Pls +5469 463 Pls +5504 457 Pls +5539 451 Pls +5574 445 Pls +5608 439 Pls +5643 432 Pls +5678 426 Pls +5712 420 Pls +5747 420 Pls +5782 420 Pls +5817 420 Pls +5851 420 Pls +5886 420 Pls +5921 420 Pls +5955 420 Pls +5990 420 Pls +6025 420 Pls +6060 420 Pls +6094 420 Pls +6129 420 Pls +6164 420 Pls +6198 420 Pls +6233 420 Pls +6268 420 Pls +6302 420 Pls +6337 420 Pls +6372 420 Pls +6407 420 Pls +6441 420 Pls +6476 420 Pls +6511 420 Pls +6594 4739 Pls +1.000 UL +LT1 +6311 4599 M +(exp\(-x*x/55.\)*sin\(x/180*3.14\)*14.7) Rshow +6395 4599 M +399 0 V +749 737 M +58 525 V +58 509 V +58 484 V +59 449 V +58 408 V +58 359 V +58 306 V +58 250 V +59 192 V +58 133 V +58 76 V +58 21 V +58 -30 V +59 -77 V +58 -118 V +58 -153 V +58 -181 V +58 -205 V +59 -220 V +58 -232 V +58 -236 V +58 -237 V +58 -232 V +59 -225 V +58 -215 V +58 -202 V +58 -187 V +58 -172 V +59 -156 V +58 -140 V +58 -125 V +58 -110 V +58 -96 V +59 -83 V +58 -70 V +58 -61 V +58 -50 V +58 -42 V +59 -35 V +58 -29 V +58 -23 V +58 -19 V +58 -15 V +59 -12 V +58 -10 V +58 -7 V +58 -6 V +58 -5 V +59 -3 V +58 -3 V +58 -2 V +58 -1 V +58 -1 V +59 -1 V +58 -1 V +58 0 V +58 0 V +58 0 V +59 -1 V +58 0 V +58 0 V +58 0 V +58 0 V +59 0 V +58 0 V +58 0 V +58 0 V +58 0 V +59 0 V +58 0 V +58 0 V +58 0 V +58 0 V +59 0 V +58 0 V +58 0 V +58 0 V +59 0 V +58 0 V +58 0 V +58 0 V +58 0 V +59 0 V +58 0 V +58 0 V +58 0 V +58 0 V +59 0 V +58 0 V +58 0 V +58 0 V +58 0 V +59 0 V +58 0 V +58 0 V +58 0 V +58 0 V +59 0 V +58 0 V +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/MEYER/M10sin.pdf b/geant4/LEMuSR/MEYER/M10sin.pdf new file mode 100644 index 0000000..baa7f15 Binary files /dev/null and b/geant4/LEMuSR/MEYER/M10sin.pdf differ diff --git a/geant4/LEMuSR/MEYER/M20.keV b/geant4/LEMuSR/MEYER/M20.keV new file mode 100644 index 0000000..6a4c7db --- /dev/null +++ b/geant4/LEMuSR/MEYER/M20.keV @@ -0,0 +1,167 @@ +0.25 1 0 +0.5 0.993513 0.0714331 +0.75 0.987026 0.141932 +1 0.980539 0.211496 +1.25 0.974052 0.280122 +1.5 0.964213 0.346606 +1.75 0.943444 0.406954 +2 0.922675 0.464309 +2.25 0.901907 0.51867 +2.5 0.881138 0.570036 +2.75 0.857883 0.61662 +3 0.831818 0.65763 +3.25 0.805398 0.694578 +3.5 0.775248 0.724233 +3.75 0.745097 0.749546 +4 0.715117 0.770701 +4.25 0.685209 0.787622 +4.5 0.655301 0.800238 +4.75 0.625393 0.808549 +5 0.595485 0.812558 +5.25 0.566648 0.813804 +5.5 0.537881 0.811008 +5.75 0.509114 0.804079 +6 0.480348 0.793016 +6.25 0.452393 0.779221 +6.5 0.428307 0.768354 +6.75 0.404221 0.754029 +7 0.380135 0.736248 +7.25 0.356049 0.715014 +7.5 0.334012 0.694589 +7.75 0.314943 0.677392 +8 0.295875 0.657464 +8.25 0.276806 0.634807 +8.5 0.257738 0.609422 +8.75 0.240951 0.58687 +9 0.225432 0.565096 +9.25 0.210588 0.542846 +9.5 0.197664 0.523563 +9.75 0.18474 0.502434 +10 0.174136 0.485941 +10.25 0.163856 0.46886 +10.5 0.153576 0.450315 +10.75 0.143296 0.430307 +11 0.133336 0.40982 +11.25 0.125899 0.395852 +11.5 0.118463 0.380827 +11.75 0.111026 0.364747 +12 0.10359 0.347611 +12.25 0.096884 0.331926 +12.5 0.0915531 0.320098 +12.75 0.0862222 0.307515 +13 0.0808912 0.294177 +13.25 0.0755603 0.280086 +13.5 0.0710447 0.268323 +13.75 0.0671152 0.258176 +14 0.0631856 0.247475 +14.25 0.0592561 0.236221 +14.5 0.0553265 0.224414 +14.75 0.0524258 0.216299 +15 0.0497562 0.208746 +15.25 0.0470865 0.200818 +15.5 0.0444169 0.192515 +15.75 0.0417789 0.183978 +16 0.0397257 0.177687 +16.25 0.0376725 0.171109 +16.5 0.0356193 0.164243 +16.75 0.033566 0.157091 +17 0.031672 0.150409 +17.25 0.0301754 0.145378 +17.5 0.0286788 0.140138 +17.75 0.0271822 0.13469 +18 0.0256856 0.129035 +18.25 0.0244893 0.124701 +18.5 0.0235693 0.121626 +18.75 0.0226493 0.118424 +19 0.0217293 0.115095 +19.25 0.0208093 0.111638 +19.5 0.0198893 0.108053 +19.75 0.0189694 0.104342 +20 0.0180494 0.100504 +20.25 0.0171294 0.0965393 +20.5 0.0162094 0.0924486 +20.75 0.0152894 0.0882321 +21 0.0143694 0.08389 +21.25 0.0137161 0.0809972 +21.5 0.013235 0.0790439 +21.75 0.0127539 0.0770247 +22 0.0122729 0.0749396 +22.25 0.0117918 0.0727889 +22.5 0.0113107 0.0705726 +22.75 0.0108296 0.068291 +23 0.0103485 0.0659441 +23.25 0.00986747 0.0635322 +23.5 0.00938639 0.0610554 +23.75 0.00890531 0.0585139 +24 0.00842423 0.0559078 +24.25 0.0080902 0.0542229 +24.5 0.00782091 0.0529312 +24.75 0.00755161 0.0516032 +25 0.00728232 0.050239 +25.25 0.00701303 0.0488387 +25.5 0.00674374 0.0474024 +25.75 0.00647445 0.0459301 +26 0.00620516 0.044422 +26.25 0.00593587 0.0428782 +26.5 0.00566658 0.0412987 +26.75 0.00539729 0.0396838 +27 0.00512799 0.0380334 +27.25 0.00494651 0.0370046 +27.5 0.00478963 0.0361375 +27.75 0.00463276 0.0352497 +28 0.00447588 0.0343412 +28.25 0.00431901 0.0334121 +28.5 0.00416213 0.0324624 +28.75 0.00400526 0.0314922 +29 0.00384838 0.0305016 +29.25 0.00369151 0.0294907 +29.5 0.00353463 0.0284594 +29.75 0.00337775 0.027408 +30 0.00322088 0.0263364 +30.25 0.00308359 0.025406 +30.5 0.00294928 0.0244828 +30.75 0.00281497 0.0235425 +31 0.00268065 0.022585 +31.25 0.00254634 0.0216106 +31.5 0.00241203 0.0206192 +31.75 0.00227772 0.0196108 +32 0.00214341 0.0185857 +32.25 0.0020091 0.0175437 +32.5 0.00187479 0.016485 +32.75 0.00174048 0.0154097 +33 0.00160617 0.0143178 +33.25 0.00147186 0.0132094 +33.5 0.00133755 0.0120846 +33.75 0.00120323 0.0109433 +34 0.00106892 0.00978579 +34.25 0.000934612 0.00861199 +34.5 0.000800302 0.00742201 +34.75 0.000665991 0.00621593 +35 0.00053168 0.00499382 +35.25 0.000397369 0.00375574 +35.5 0.000263058 0.00250177 +35.75 0.000128747 0.00123197 +36 0 0 +36.25 0 0 +36.5 0 0 +36.75 0 0 +37 0 0 +37.25 0 0 +37.5 0 0 +37.75 0 0 +38 0 0 +38.25 0 0 +38.5 0 0 +38.75 0 0 +39 0 0 +39.25 0 0 +39.5 0 0 +39.75 0 0 +40 0 0 +40.25 0 0 +40.5 0 0 +40.75 0 0 +41 0 0 +41.25 0 0 +41.5 0 0 +41.75 0 0 diff --git a/geant4/LEMuSR/MEYER/M20sin.eps b/geant4/LEMuSR/MEYER/M20sin.eps new file mode 100644 index 0000000..7cc6f40 --- /dev/null +++ b/geant4/LEMuSR/MEYER/M20sin.eps @@ -0,0 +1,805 @@ +%!PS-Adobe-2.0 +%%Title: M20sin.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Tue Apr 12 08:56:48 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +6248 0 V +1.000 UL +LTb +714 420 M +63 0 V +6185 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 915 M +6248 0 V +1.000 UL +LTb +714 915 M +63 0 V +6185 0 R +-63 0 V +630 915 M +( 0.1) Rshow +1.000 UL +LTa +714 1409 M +6248 0 V +1.000 UL +LTb +714 1409 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.2) Rshow +1.000 UL +LTa +714 1904 M +6248 0 V +1.000 UL +LTb +714 1904 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.3) Rshow +1.000 UL +LTa +714 2399 M +6248 0 V +1.000 UL +LTb +714 2399 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.4) Rshow +1.000 UL +LTa +714 2893 M +6248 0 V +1.000 UL +LTb +714 2893 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.5) Rshow +1.000 UL +LTa +714 3388 M +6248 0 V +1.000 UL +LTb +714 3388 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.6) Rshow +1.000 UL +LTa +714 3883 M +6248 0 V +1.000 UL +LTb +714 3883 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.7) Rshow +1.000 UL +LTa +714 4377 M +6248 0 V +1.000 UL +LTb +714 4377 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.8) Rshow +1.000 UL +LTa +714 4872 M +6248 0 V +1.000 UL +LTb +714 4872 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.9) Rshow +1.000 UL +LTa +714 420 M +0 4452 V +1.000 UL +LTb +714 420 M +0 63 V +0 4389 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +1408 420 M +0 4452 V +1.000 UL +LTb +1408 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 5) Cshow +1.000 UL +LTa +2102 420 M +0 4452 V +1.000 UL +LTb +2102 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 10) Cshow +1.000 UL +LTa +2797 420 M +0 4452 V +1.000 UL +LTb +2797 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 15) Cshow +1.000 UL +LTa +3491 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +3491 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 20) Cshow +1.000 UL +LTa +4185 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +4185 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 25) Cshow +1.000 UL +LTa +4879 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +4879 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 30) Cshow +1.000 UL +LTa +5574 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +5574 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 35) Cshow +1.000 UL +LTa +6268 420 M +0 4109 V +0 280 R +0 63 V +1.000 UL +LTb +6268 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 40) Cshow +1.000 UL +LTa +6962 420 M +0 4452 V +1.000 UL +LTb +6962 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 45) Cshow +1.000 UL +LTb +714 420 M +6248 0 V +0 4452 V +-6248 0 V +714 420 L +140 2646 M +currentpoint gsave translate 90 rotate 0 0 M +(distribution) Cshow +grestore +3838 70 M +([deg]) Cshow +1.000 UP +1.000 UL +LT0 +6311 4739 M +('M20.keV' us 1:3) Rshow +749 420 Pls +783 773 Pls +818 1122 Pls +853 1466 Pls +888 1806 Pls +922 2135 Pls +957 2433 Pls +992 2717 Pls +1026 2986 Pls +1061 3240 Pls +1096 3470 Pls +1131 3673 Pls +1165 3856 Pls +1200 4003 Pls +1235 4128 Pls +1269 4232 Pls +1304 4316 Pls +1339 4379 Pls +1374 4420 Pls +1408 4439 Pls +1443 4446 Pls +1478 4432 Pls +1512 4398 Pls +1547 4343 Pls +1582 4275 Pls +1616 4221 Pls +1651 4150 Pls +1686 4062 Pls +1721 3957 Pls +1755 3856 Pls +1790 3771 Pls +1825 3672 Pls +1859 3560 Pls +1894 3435 Pls +1929 3323 Pls +1964 3215 Pls +1998 3105 Pls +2033 3010 Pls +2068 2905 Pls +2102 2824 Pls +2137 2739 Pls +2172 2648 Pls +2207 2549 Pls +2241 2447 Pls +2276 2378 Pls +2311 2304 Pls +2345 2224 Pls +2380 2140 Pls +2415 2062 Pls +2450 2003 Pls +2484 1941 Pls +2519 1875 Pls +2554 1805 Pls +2588 1747 Pls +2623 1697 Pls +2658 1644 Pls +2693 1589 Pls +2727 1530 Pls +2762 1490 Pls +2797 1453 Pls +2831 1413 Pls +2866 1372 Pls +2901 1330 Pls +2936 1299 Pls +2970 1266 Pls +3005 1232 Pls +3040 1197 Pls +3074 1164 Pls +3109 1139 Pls +3144 1113 Pls +3178 1086 Pls +3213 1058 Pls +3248 1037 Pls +3283 1022 Pls +3317 1006 Pls +3352 989 Pls +3387 972 Pls +3421 955 Pls +3456 936 Pls +3491 917 Pls +3526 898 Pls +3560 877 Pls +3595 856 Pls +3630 835 Pls +3664 821 Pls +3699 811 Pls +3734 801 Pls +3769 791 Pls +3803 780 Pls +3838 769 Pls +3873 758 Pls +3907 746 Pls +3942 734 Pls +3977 722 Pls +4012 709 Pls +4046 697 Pls +4081 688 Pls +4116 682 Pls +4150 675 Pls +4185 669 Pls +4220 662 Pls +4255 654 Pls +4289 647 Pls +4324 640 Pls +4359 632 Pls +4393 624 Pls +4428 616 Pls +4463 608 Pls +4498 603 Pls +4532 599 Pls +4567 594 Pls +4602 590 Pls +4636 585 Pls +4671 581 Pls +4706 576 Pls +4740 571 Pls +4775 566 Pls +4810 561 Pls +4845 556 Pls +4879 550 Pls +4914 546 Pls +4949 541 Pls +4983 536 Pls +5018 532 Pls +5053 527 Pls +5088 522 Pls +5122 517 Pls +5157 512 Pls +5192 507 Pls +5226 502 Pls +5261 496 Pls +5296 491 Pls +5331 485 Pls +5365 480 Pls +5400 474 Pls +5435 468 Pls +5469 463 Pls +5504 457 Pls +5539 451 Pls +5574 445 Pls +5608 439 Pls +5643 432 Pls +5678 426 Pls +5712 420 Pls +5747 420 Pls +5782 420 Pls +5817 420 Pls +5851 420 Pls +5886 420 Pls +5921 420 Pls +5955 420 Pls +5990 420 Pls +6025 420 Pls +6060 420 Pls +6094 420 Pls +6129 420 Pls +6164 420 Pls +6198 420 Pls +6233 420 Pls +6268 420 Pls +6302 420 Pls +6337 420 Pls +6372 420 Pls +6407 420 Pls +6441 420 Pls +6476 420 Pls +6511 420 Pls +6594 4739 Pls +1.000 UL +LT1 +6311 4599 M +(exp\(-x*x/55.\)*sin\(x/180*3.14\)*14.7) Rshow +6395 4599 M +399 0 V +714 420 M +63 574 V +63 562 V +63 536 V +63 499 V +64 453 V +63 397 V +63 335 V +63 269 V +63 200 V +63 131 V +63 65 V +63 1 V +63 -56 V +64 -108 V +63 -152 V +63 -189 V +63 -217 V +63 -238 V +63 -250 V +63 -256 V +63 -257 V +63 -250 V +64 -241 V +63 -228 V +63 -211 V +63 -194 V +63 -176 V +63 -157 V +63 -138 V +63 -121 V +63 -104 V +64 -89 V +63 -75 V +63 -63 V +63 -52 V +63 -43 V +63 -34 V +63 -28 V +63 -22 V +63 -17 V +64 -14 V +63 -11 V +63 -8 V +63 -6 V +63 -4 V +63 -4 V +63 -2 V +63 -2 V +63 -2 V +64 -1 V +63 0 V +63 -1 V +63 0 V +63 0 V +63 -1 V +63 0 V +63 0 V +63 0 V +64 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +64 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +64 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +64 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +63 0 V +64 0 V +63 0 V +63 0 V +63 0 V +63 0 V +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/MEYER/M30.keV b/geant4/LEMuSR/MEYER/M30.keV new file mode 100644 index 0000000..b92bacc --- /dev/null +++ b/geant4/LEMuSR/MEYER/M30.keV @@ -0,0 +1,111 @@ +0.25 1 0 +0.5 0.990251 0.160806 +0.75 0.980502 0.318444 +1 0.970753 0.472909 +1.25 0.943207 0.612639 +1.5 0.911995 0.740436 +1.75 0.880783 0.858084 +2 0.84433 0.959627 +2.25 0.804711 1.0452 +2.5 0.759399 1.10958 +2.75 0.714265 1.15953 +3 0.669317 1.19514 +3.25 0.62437 1.21614 +3.5 0.579965 1.22369 +3.75 0.536733 1.21948 +4 0.493501 1.20124 +4.25 0.451294 1.17162 +4.5 0.415097 1.14488 +4.75 0.378899 1.10639 +5 0.342701 1.05616 +5.25 0.313856 1.01805 +5.5 0.285199 0.971222 +5.75 0.256542 0.91511 +6 0.232174 0.865709 +6.25 0.209704 0.815799 +6.5 0.190281 0.770961 +6.75 0.173374 0.730441 +7 0.157925 0.690826 +7.25 0.142476 0.646215 +7.5 0.129003 0.605895 +7.75 0.117827 0.572379 +8 0.106651 0.535254 +8.25 0.0963976 0.499303 +8.5 0.088386 0.472015 +8.75 0.0803744 0.442142 +9 0.0726174 0.411129 +9.25 0.0667118 0.388398 +9.5 0.0608063 0.363766 +9.75 0.0549008 0.337233 +10 0.0507941 0.32014 +10.25 0.046782 0.302337 +10.5 0.04277 0.283246 +10.75 0.0394798 0.267763 +11 0.0363941 0.252644 +11.25 0.0333085 0.236535 +11.5 0.0307317 0.223133 +11.75 0.0284825 0.211337 +12 0.0262334 0.198821 +12.25 0.0243634 0.18852 +12.5 0.0229808 0.181471 +12.75 0.0215982 0.173979 +13 0.0202156 0.166045 +13.25 0.018833 0.15767 +13.5 0.0174504 0.148854 +13.75 0.0160678 0.139599 +14 0.0146852 0.129905 +14.25 0.0136393 0.122803 +14.5 0.0129163 0.118327 +14.75 0.0121933 0.113622 +15 0.0114703 0.108687 +15.25 0.0107473 0.103523 +15.5 0.0100243 0.0981307 +15.75 0.00930134 0.0925096 +16 0.00857836 0.0866604 +16.25 0.00804106 0.0824885 +16.5 0.00763635 0.0795281 +16.75 0.00723165 0.0764401 +17 0.00682694 0.0732246 +17.25 0.00642224 0.0698818 +17.5 0.00601753 0.0664119 +17.75 0.00561283 0.0628153 +18 0.00520812 0.0590922 +18.25 0.0049143 0.0565179 +18.5 0.00467854 0.0545286 +18.75 0.00444278 0.0524655 +19 0.00420702 0.0503287 +19.25 0.00397126 0.0481185 +19.5 0.0037355 0.045835 +19.75 0.00349974 0.0434784 +20 0.00326398 0.0410487 +20.25 0.00305295 0.038861 +20.5 0.0028511 0.0367263 +20.75 0.00264925 0.0345295 +21 0.0024474 0.0322706 +21.25 0.00224555 0.0299498 +21.5 0.0020437 0.0275673 +21.75 0.00184185 0.0251231 +22 0.00164 0.0226174 +22.25 0.00143816 0.0200504 +22.5 0.00123631 0.0174223 +22.75 0.00103446 0.0147331 +23 0.000832607 0.0119831 +23.25 0.000630758 0.0091724 +23.5 0.000428908 0.00630118 +23.75 0.000227059 0.00336962 +24 2.52097e-05 0.00037787 +24.25 0 0 +24.5 0 0 +24.75 0 0 +25 0 0 +25.25 0 0 +25.5 0 0 +25.75 0 0 +26 0 0 +26.25 0 0 +26.5 0 0 +26.75 0 0 +27 0 0 +27.25 0 0 +27.5 0 0 +27.75 0 0 diff --git a/geant4/LEMuSR/MEYER/M5.keV b/geant4/LEMuSR/MEYER/M5.keV new file mode 100644 index 0000000..0fbb5c9 --- /dev/null +++ b/geant4/LEMuSR/MEYER/M5.keV @@ -0,0 +1,203 @@ +0.5 1 0 +1 0.996752 0.00898079 +1.5 0.993505 0.0179024 +2 0.990257 0.0267641 +2.5 0.98701 0.0355652 +3 0.983762 0.0443052 +3.5 0.980515 0.0529833 +4 0.977267 0.061599 +4.5 0.974019 0.0701516 +5 0.970772 0.0786404 +5.5 0.964082 0.0867551 +6 0.953685 0.0943763 +6.5 0.943287 0.101804 +7 0.93289 0.109037 +7.5 0.922492 0.116076 +8 0.912095 0.12292 +8.5 0.901697 0.129569 +9 0.8913 0.136023 +9.5 0.880902 0.14228 +10 0.870505 0.148342 +10.5 0.857554 0.153751 +11 0.844505 0.158899 +11.5 0.831456 0.163804 +12 0.818407 0.168465 +12.5 0.804942 0.172794 +13 0.789848 0.176508 +13.5 0.774753 0.179944 +14 0.759659 0.1831 +14.5 0.744565 0.185979 +15 0.729524 0.188593 +15.5 0.714551 0.190948 +16 0.699579 0.193028 +16.5 0.684606 0.194834 +17 0.669633 0.196365 +17.5 0.65466 0.197622 +18 0.639687 0.198607 +18.5 0.624714 0.199319 +19 0.609741 0.199759 +19.5 0.594768 0.199928 +20 0.580324 0.20001 +20.5 0.565922 0.199845 +21 0.551521 0.199422 +21.5 0.537119 0.19874 +22 0.522718 0.197801 +22.5 0.508316 0.196605 +23 0.493915 0.195154 +23.5 0.479513 0.193448 +24 0.465111 0.191488 +24.5 0.451664 0.189677 +25 0.439606 0.188224 +25.5 0.427548 0.18656 +26 0.415489 0.184684 +26.5 0.403431 0.182598 +27 0.391373 0.180303 +27.5 0.379315 0.1778 +28 0.367257 0.17509 +28.5 0.355198 0.172173 +29 0.34314 0.169052 +29.5 0.333314 0.166844 +30 0.323768 0.164611 +30.5 0.314222 0.162215 +31 0.304675 0.159658 +31.5 0.295129 0.156941 +32 0.285583 0.154064 +32.5 0.276037 0.151029 +33 0.26649 0.147837 +33.5 0.256944 0.144488 +34 0.248055 0.141359 +34.5 0.240286 0.138731 +35 0.232516 0.135977 +35.5 0.224747 0.133098 +36 0.216977 0.130093 +36.5 0.210001 0.127446 +37 0.203531 0.124998 +37.5 0.197061 0.122447 +38 0.19059 0.119794 +38.5 0.18412 0.117038 +39 0.178777 0.114907 +39.5 0.173631 0.112819 +40 0.168484 0.110651 +40.5 0.163338 0.108402 +41 0.158191 0.106075 +41.5 0.153045 0.103668 +42 0.147898 0.101184 +42.5 0.142752 0.0986228 +43 0.137605 0.095985 +43.5 0.132933 0.0936053 +44 0.12921 0.0918317 +44.5 0.125487 0.0900024 +45 0.121764 0.0881181 +45.5 0.118041 0.0861791 +46 0.114318 0.0841862 +46.5 0.110595 0.0821398 +47 0.106872 0.0800406 +47.5 0.103149 0.0778891 +48 0.0994258 0.0756859 +48.5 0.0965613 0.0740903 +49 0.0938924 0.0726059 +49.5 0.0912236 0.0710841 +50 0.0885548 0.0695253 +50.5 0.0858859 0.0679299 +51 0.0832171 0.0662985 +51.5 0.0805483 0.0646314 +52 0.0778794 0.0629292 +52.5 0.0752106 0.0611922 +53 0.0727493 0.059591 +53.5 0.070782 0.0583656 +54 0.0688148 0.0571144 +54.5 0.0668475 0.0558378 +55 0.0648803 0.0545361 +55.5 0.062913 0.0532096 +56 0.0609458 0.0518588 +56.5 0.0589785 0.0504839 +57 0.0570113 0.0490854 +57.5 0.055044 0.0476636 +58 0.053567 0.0466457 +58.5 0.0522305 0.045733 +59 0.050894 0.0448041 +59.5 0.0495575 0.0438591 +60 0.048221 0.0428984 +60.5 0.0468845 0.0419223 +61 0.045548 0.0409309 +61.5 0.0442115 0.0399245 +62 0.042875 0.0389034 +62.5 0.0416183 0.0379406 +63 0.0405904 0.0371738 +63.5 0.0395625 0.0363957 +64 0.0385346 0.0356063 +64.5 0.0375067 0.034806 +65 0.0364788 0.0339949 +65.5 0.0354509 0.0331733 +66 0.034423 0.0323413 +66.5 0.0333951 0.0314991 +67 0.0323672 0.030647 +67.5 0.0315455 0.0299812 +68 0.0307963 0.0293764 +68.5 0.0300471 0.0287642 +69 0.0292978 0.0281448 +69.5 0.0285486 0.0275183 +70 0.0277993 0.0268848 +70.5 0.0270501 0.0262446 +71 0.0263008 0.0255977 +71.5 0.0255516 0.0249444 +72 0.0248663 0.0243474 +72.5 0.0244057 0.0239653 +73 0.0239451 0.0235788 +73.5 0.0234846 0.023188 +74 0.023024 0.0227931 +74.5 0.0225634 0.022394 +75 0.0221029 0.0219909 +75.5 0.0216423 0.021584 +76 0.0211817 0.0211733 +76.5 0.0207211 0.0207588 +77 0.0202606 0.0203408 +77.5 0.0198 0.0199193 +78 0.0193394 0.0194944 +78.5 0.0188788 0.0190662 +79 0.0184183 0.0186349 +79.5 0.0179577 0.0182005 +80 0.0174971 0.0177631 +80.5 0.0170366 0.0173228 +81 0.016576 0.0168798 +81.5 0.0161154 0.0164341 +82 0.0156548 0.0159859 +82.5 0.0151943 0.0155352 +83 0.0147337 0.0150822 +83.5 0.0142731 0.014627 +84 0.013906 0.0142654 +84.5 0.0136651 0.0140318 +85 0.0134243 0.0137966 +85.5 0.0131834 0.0135599 +86 0.0129426 0.0133219 +86.5 0.0127017 0.0130825 +87 0.0124609 0.0128417 +87.5 0.0122201 0.0125998 +88 0.0119792 0.0123566 +88.5 0.0117384 0.0121124 +89 0.0114975 0.011867 +89.5 0.0112567 0.0116206 +90 0.0110159 0.0113733 +90.5 0.010775 0.0111251 +91 0.0105342 0.010876 +91.5 0.0102933 0.0106261 +92 0.0100525 0.0103755 +92.5 0.00981164 0.0101242 +93 0.0095708 0.00987233 +93.5 0.00932995 0.00961987 +94 0.00908911 0.0093669 +94.5 0.00884827 0.00911348 +95 0.00860743 0.00885967 +95.5 0.00836658 0.00860553 +96 0.0081924 0.00841962 +96.5 0.00805759 0.00827379 +97 0.00792277 0.00812758 +97.5 0.00778795 0.00798104 +98 0.00765314 0.00783418 +98.5 0.00751832 0.00768704 +99 0.00738351 0.00753965 +99.5 0.00724869 0.00739205 +100 0.00711388 0.00724426 +100.5 0.00697906 0.00709633 +101 0.00684425 0.00694827 +101.5 1.96893e-305 -1.98021 diff --git a/geant4/LEMuSR/MEYER/M50.keV b/geant4/LEMuSR/MEYER/M50.keV new file mode 100644 index 0000000..245f489 --- /dev/null +++ b/geant4/LEMuSR/MEYER/M50.keV @@ -0,0 +1,134 @@ +0.125 1 0 +0.25 0.991892 0.222817 +0.375 0.983784 0.44199 +0.5 0.975677 0.657519 +0.625 0.964224 0.866397 +0.75 0.938266 1.05383 +0.875 0.912308 1.2296 +1 0.88635 1.3937 +1.125 0.857911 1.54168 +1.25 0.825333 1.66851 +1.375 0.790363 1.77532 +1.5 0.752679 1.85971 +1.625 0.715166 1.92763 +1.75 0.677784 1.97907 +1.875 0.640403 2.01372 +2 0.603022 2.03157 +2.125 0.56671 2.03646 +2.25 0.530755 2.02641 +2.375 0.4948 2.00021 +2.5 0.458846 1.95785 +2.625 0.428372 1.92397 +2.75 0.398268 1.87813 +2.875 0.368163 1.81878 +3 0.338838 1.74993 +3.125 0.315005 1.69752 +3.25 0.291172 1.6344 +3.375 0.267339 1.56058 +3.5 0.244888 1.48444 +3.625 0.22549 1.41743 +3.75 0.207408 1.35026 +3.875 0.191254 1.28797 +4 0.176749 1.22991 +4.125 0.1639 1.17723 +4.25 0.151052 1.11879 +4.375 0.138203 1.05459 +4.5 0.127794 1.00378 +4.625 0.118499 0.957314 +4.75 0.109204 0.906678 +4.875 0.0999093 0.851876 +5 0.0929137 0.813026 +5.125 0.0862508 0.774027 +5.25 0.0795878 0.732041 +5.375 0.0730317 0.688077 +5.5 0.0681202 0.65704 +5.625 0.0632088 0.623803 +5.75 0.0582974 0.588367 +5.875 0.0537771 0.554767 +6 0.0504404 0.531618 +6.125 0.0471037 0.506975 +6.25 0.043767 0.480839 +6.375 0.040766 0.456974 +6.5 0.0381998 0.436736 +6.625 0.0356336 0.415351 +6.75 0.0330673 0.392818 +6.875 0.0309346 0.374384 +7 0.029064 0.358228 +7.125 0.0271935 0.341237 +7.25 0.0253229 0.32341 +7.375 0.0240364 0.312337 +7.5 0.0228866 0.302494 +7.625 0.0217367 0.292138 +7.75 0.0205869 0.281269 +7.875 0.019437 0.269886 +8 0.0182872 0.25799 +8.125 0.0171373 0.245581 +8.25 0.0159874 0.232659 +8.375 0.0148376 0.219225 +8.5 0.0138407 0.207572 +8.625 0.0132394 0.201497 +8.75 0.0126381 0.195153 +8.875 0.0120368 0.188541 +9 0.0114356 0.181661 +9.125 0.0108343 0.174514 +9.25 0.010233 0.167098 +9.375 0.00963171 0.159416 +9.5 0.00903042 0.151466 +9.625 0.00842914 0.143248 +9.75 0.00802566 0.138169 +9.875 0.00768908 0.134077 +10 0.0073525 0.129836 +10.125 0.00701592 0.125445 +10.25 0.00667934 0.120904 +10.375 0.00634277 0.116214 +10.5 0.00600619 0.111374 +10.625 0.00566961 0.106386 +10.75 0.00533303 0.101248 +10.875 0.00502675 0.0965427 +11 0.00483068 0.0938429 +11.125 0.00463461 0.0910561 +11.25 0.00443854 0.0881824 +11.375 0.00424246 0.0852218 +11.5 0.00404639 0.0821744 +11.625 0.00385032 0.0790403 +11.75 0.00365424 0.0758195 +11.875 0.00345817 0.0725121 +12 0.0032621 0.069118 +12.125 0.00308532 0.0660504 +12.25 0.00291745 0.0630975 +12.375 0.00274958 0.0600706 +12.5 0.0025817 0.0569697 +12.625 0.00241383 0.0537949 +12.75 0.00224596 0.0505462 +12.875 0.00207809 0.0472236 +13 0.00191022 0.0438273 +13.125 0.00174235 0.0403572 +13.25 0.00157448 0.0368134 +13.375 0.00140661 0.033196 +13.5 0.00123874 0.0295051 +13.625 0.00107087 0.0257406 +13.75 0.000902998 0.0219027 +13.875 0.000735128 0.0179913 +14 0.000567257 0.0140066 +14.125 0.000399386 0.00994868 +14.25 0.000231516 0.00581749 +14.375 6.36452e-05 0.00161313 +14.5 0 0 +14.625 0 0 +14.75 0 0 +14.875 0 0 +15 0 0 +15.125 0 0 +15.25 0 0 +15.375 0 0 +15.5 0 0 +15.625 0 0 +15.75 0 0 +15.875 0 0 +16 0 0 +16.125 0 0 +16.25 0 0 +16.375 0 0 +16.5 0 0 +16.625 0 0 +16.75 0 0 diff --git a/geant4/LEMuSR/MEYER/Mall.eps b/geant4/LEMuSR/MEYER/Mall.eps new file mode 100644 index 0000000..622ca0d --- /dev/null +++ b/geant4/LEMuSR/MEYER/Mall.eps @@ -0,0 +1,1129 @@ +%!PS-Adobe-2.0 +%%Title: Mall.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Mon Apr 11 19:40:19 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +6248 0 V +1.000 UL +LTb +714 420 M +63 0 V +6185 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 1310 M +6248 0 V +1.000 UL +LTb +714 1310 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.2) Rshow +1.000 UL +LTa +714 2201 M +6248 0 V +1.000 UL +LTb +714 2201 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.4) Rshow +1.000 UL +LTa +714 3091 M +6248 0 V +1.000 UL +LTb +714 3091 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.6) Rshow +1.000 UL +LTa +714 3982 M +6248 0 V +1.000 UL +LTb +714 3982 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.8) Rshow +1.000 UL +LTa +714 4872 M +6248 0 V +1.000 UL +LTb +714 4872 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 1) Rshow +1.000 UL +LTa +714 420 M +0 4452 V +1.000 UL +LTb +714 420 M +0 63 V +0 4389 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +1755 420 M +0 4452 V +1.000 UL +LTb +1755 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 20) Cshow +1.000 UL +LTa +2797 420 M +0 4452 V +1.000 UL +LTb +2797 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 40) Cshow +1.000 UL +LTa +3838 420 M +0 4452 V +1.000 UL +LTb +3838 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 60) Cshow +1.000 UL +LTa +4879 420 M +0 4452 V +1.000 UL +LTb +4879 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 80) Cshow +1.000 UL +LTa +5921 420 M +0 3829 V +0 560 R +0 63 V +1.000 UL +LTb +5921 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 100) Cshow +1.000 UL +LTa +6962 420 M +0 4452 V +1.000 UL +LTb +6962 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 120) Cshow +1.000 UL +LTb +714 420 M +6248 0 V +0 4452 V +-6248 0 V +714 420 L +140 2646 M +currentpoint gsave translate 90 rotate 0 0 M +(Meyer's distribution) Cshow +grestore +3838 70 M +(scatt. angle [deg]) Cshow +1.000 UP +1.000 UL +LT0 +6311 4739 M +('M5.keV') Rshow +740 4872 Pls +766 4858 Pls +792 4843 Pls +818 4829 Pls +844 4814 Pls +870 4800 Pls +896 4785 Pls +922 4771 Pls +948 4756 Pls +974 4742 Pls +1000 4712 Pls +1026 4666 Pls +1052 4620 Pls +1078 4573 Pls +1105 4527 Pls +1131 4481 Pls +1157 4434 Pls +1183 4388 Pls +1209 4342 Pls +1235 4296 Pls +1261 4238 Pls +1287 4180 Pls +1313 4122 Pls +1339 4064 Pls +1365 4004 Pls +1391 3937 Pls +1417 3869 Pls +1443 3802 Pls +1469 3735 Pls +1495 3668 Pls +1521 3601 Pls +1547 3535 Pls +1573 3468 Pls +1599 3401 Pls +1625 3335 Pls +1651 3268 Pls +1677 3201 Pls +1703 3135 Pls +1729 3068 Pls +1755 3004 Pls +1781 2940 Pls +1807 2876 Pls +1833 2811 Pls +1859 2747 Pls +1886 2683 Pls +1912 2619 Pls +1938 2555 Pls +1964 2491 Pls +1990 2431 Pls +2016 2377 Pls +2042 2324 Pls +2068 2270 Pls +2094 2216 Pls +2120 2163 Pls +2146 2109 Pls +2172 2055 Pls +2198 2002 Pls +2224 1948 Pls +2250 1904 Pls +2276 1862 Pls +2302 1819 Pls +2328 1777 Pls +2354 1734 Pls +2380 1692 Pls +2406 1649 Pls +2432 1607 Pls +2458 1564 Pls +2484 1525 Pls +2510 1490 Pls +2536 1455 Pls +2562 1421 Pls +2588 1386 Pls +2614 1355 Pls +2640 1326 Pls +2667 1297 Pls +2693 1269 Pls +2719 1240 Pls +2745 1216 Pls +2771 1193 Pls +2797 1170 Pls +2823 1147 Pls +2849 1124 Pls +2875 1102 Pls +2901 1079 Pls +2927 1056 Pls +2953 1033 Pls +2979 1012 Pls +3005 995 Pls +3031 979 Pls +3057 962 Pls +3083 946 Pls +3109 929 Pls +3135 912 Pls +3161 896 Pls +3187 879 Pls +3213 863 Pls +3239 850 Pls +3265 838 Pls +3291 826 Pls +3317 814 Pls +3343 802 Pls +3369 791 Pls +3395 779 Pls +3421 767 Pls +3448 755 Pls +3474 744 Pls +3500 735 Pls +3526 726 Pls +3552 718 Pls +3578 709 Pls +3604 700 Pls +3630 691 Pls +3656 683 Pls +3682 674 Pls +3708 665 Pls +3734 659 Pls +3760 653 Pls +3786 647 Pls +3812 641 Pls +3838 635 Pls +3864 629 Pls +3890 623 Pls +3916 617 Pls +3942 611 Pls +3968 605 Pls +3994 601 Pls +4020 596 Pls +4046 592 Pls +4072 587 Pls +4098 582 Pls +4124 578 Pls +4150 573 Pls +4176 569 Pls +4202 564 Pls +4229 560 Pls +4255 557 Pls +4281 554 Pls +4307 550 Pls +4333 547 Pls +4359 544 Pls +4385 540 Pls +4411 537 Pls +4437 534 Pls +4463 531 Pls +4489 529 Pls +4515 527 Pls +4541 525 Pls +4567 523 Pls +4593 520 Pls +4619 518 Pls +4645 516 Pls +4671 514 Pls +4697 512 Pls +4723 510 Pls +4749 508 Pls +4775 506 Pls +4801 504 Pls +4827 502 Pls +4853 500 Pls +4879 498 Pls +4905 496 Pls +4931 494 Pls +4957 492 Pls +4983 490 Pls +5010 488 Pls +5036 486 Pls +5062 484 Pls +5088 482 Pls +5114 481 Pls +5140 480 Pls +5166 479 Pls +5192 478 Pls +5218 477 Pls +5244 475 Pls +5270 474 Pls +5296 473 Pls +5322 472 Pls +5348 471 Pls +5374 470 Pls +5400 469 Pls +5426 468 Pls +5452 467 Pls +5478 466 Pls +5504 465 Pls +5530 464 Pls +5556 463 Pls +5582 462 Pls +5608 460 Pls +5634 459 Pls +5660 458 Pls +5686 457 Pls +5712 456 Pls +5738 456 Pls +5764 455 Pls +5791 455 Pls +5817 454 Pls +5843 453 Pls +5869 453 Pls +5895 452 Pls +5921 452 Pls +5947 451 Pls +5973 450 Pls +5999 420 Pls +6594 4739 Pls +1.000 UP +1.000 UL +LT1 +6311 4599 M +('M10.keV') Rshow +740 4872 Crs +766 4843 Crs +792 4814 Crs +818 4785 Crs +844 4756 Crs +870 4712 Crs +896 4619 Crs +922 4527 Crs +948 4434 Crs +974 4342 Crs +1000 4238 Crs +1026 4121 Crs +1052 4003 Crs +1078 3869 Crs +1105 3734 Crs +1131 3601 Crs +1157 3467 Crs +1183 3334 Crs +1209 3201 Crs +1235 3067 Crs +1261 2939 Crs +1287 2811 Crs +1313 2682 Crs +1339 2554 Crs +1365 2430 Crs +1391 2323 Crs +1417 2215 Crs +1443 2108 Crs +1469 2001 Crs +1495 1903 Crs +1521 1818 Crs +1547 1733 Crs +1573 1648 Crs +1599 1563 Crs +1625 1489 Crs +1651 1420 Crs +1677 1354 Crs +1703 1297 Crs +1729 1239 Crs +1755 1193 Crs +1781 1147 Crs +1807 1101 Crs +1833 1055 Crs +1859 1011 Crs +1886 978 Crs +1912 945 Crs +1938 912 Crs +1964 879 Crs +1990 850 Crs +2016 826 Crs +2042 802 Crs +2068 778 Crs +2094 755 Crs +2120 735 Crs +2146 717 Crs +2172 700 Crs +2198 682 Crs +2224 665 Crs +2250 652 Crs +2276 640 Crs +2302 629 Crs +2328 617 Crs +2354 605 Crs +2380 596 Crs +2406 587 Crs +2432 578 Crs +2458 569 Crs +2484 560 Crs +2510 554 Crs +2536 547 Crs +2562 540 Crs +2588 534 Crs +2614 529 Crs +2640 524 Crs +2667 520 Crs +2693 516 Crs +2719 512 Crs +2745 508 Crs +2771 504 Crs +2797 500 Crs +2823 496 Crs +2849 492 Crs +2875 488 Crs +2901 483 Crs +2927 481 Crs +2953 479 Crs +2979 477 Crs +3005 474 Crs +3031 472 Crs +3057 470 Crs +3083 468 Crs +3109 466 Crs +3135 464 Crs +3161 461 Crs +3187 459 Crs +3213 457 Crs +3239 456 Crs +3265 455 Crs +3291 453 Crs +3317 452 Crs +3343 451 Crs +3369 450 Crs +3395 449 Crs +3421 447 Crs +3448 446 Crs +3474 445 Crs +3500 444 Crs +3526 443 Crs +3552 442 Crs +3578 441 Crs +3604 441 Crs +3630 440 Crs +3656 439 Crs +3682 438 Crs +3708 438 Crs +3734 437 Crs +3760 436 Crs +3786 436 Crs +3812 435 Crs +3838 434 Crs +3864 434 Crs +3890 433 Crs +3916 432 Crs +3942 432 Crs +3968 431 Crs +3994 431 Crs +4020 430 Crs +4046 429 Crs +4072 429 Crs +4098 428 Crs +4124 428 Crs +4150 427 Crs +4176 426 Crs +4202 426 Crs +4229 425 Crs +4255 425 Crs +4281 424 Crs +4307 423 Crs +4333 423 Crs +4359 422 Crs +4385 422 Crs +4411 421 Crs +4437 420 Crs +4463 420 Crs +4489 420 Crs +4515 420 Crs +4541 420 Crs +4567 420 Crs +4593 420 Crs +4619 420 Crs +4645 420 Crs +4671 420 Crs +4697 420 Crs +4723 420 Crs +4749 420 Crs +4775 420 Crs +4801 420 Crs +4827 420 Crs +4853 420 Crs +4879 420 Crs +4905 420 Crs +4931 420 Crs +4957 420 Crs +4983 420 Crs +5010 420 Crs +5036 420 Crs +5062 420 Crs +6594 4599 Crs +1.000 UP +1.000 UL +LT2 +6311 4459 M +('M20.keV') Rshow +727 4872 Star +740 4843 Star +753 4814 Star +766 4785 Star +779 4757 Star +792 4713 Star +805 4620 Star +818 4528 Star +831 4436 Star +844 4343 Star +857 4240 Star +870 4124 Star +883 4006 Star +896 3872 Star +909 3738 Star +922 3605 Star +935 3472 Star +948 3338 Star +961 3205 Star +974 3072 Star +987 2944 Star +1000 2816 Star +1013 2688 Star +1026 2560 Star +1039 2435 Star +1052 2328 Star +1065 2221 Star +1078 2114 Star +1091 2007 Star +1105 1908 Star +1118 1823 Star +1131 1738 Star +1144 1654 Star +1157 1569 Star +1170 1494 Star +1183 1425 Star +1196 1359 Star +1209 1301 Star +1222 1244 Star +1235 1196 Star +1248 1150 Star +1261 1105 Star +1274 1059 Star +1287 1014 Star +1300 981 Star +1313 948 Star +1326 915 Star +1339 882 Star +1352 852 Star +1365 828 Star +1378 804 Star +1391 781 Star +1404 757 Star +1417 737 Star +1430 719 Star +1443 702 Star +1456 684 Star +1469 667 Star +1482 654 Star +1495 642 Star +1508 630 Star +1521 618 Star +1534 606 Star +1547 597 Star +1560 588 Star +1573 579 Star +1586 570 Star +1599 561 Star +1612 555 Star +1625 548 Star +1638 541 Star +1651 535 Star +1664 529 Star +1677 525 Star +1690 521 Star +1703 517 Star +1716 513 Star +1729 509 Star +1742 505 Star +1755 501 Star +1768 496 Star +1781 492 Star +1794 488 Star +1807 484 Star +1820 481 Star +1833 479 Star +1846 477 Star +1859 475 Star +1872 473 Star +1886 470 Star +1899 468 Star +1912 466 Star +1925 464 Star +1938 462 Star +1951 460 Star +1964 458 Star +1977 456 Star +1990 455 Star +2003 454 Star +2016 452 Star +2029 451 Star +2042 450 Star +2055 449 Star +2068 448 Star +2081 446 Star +2094 445 Star +2107 444 Star +2120 443 Star +2133 442 Star +2146 441 Star +2159 441 Star +2172 440 Star +2185 439 Star +2198 439 Star +2211 438 Star +2224 437 Star +2237 436 Star +2250 436 Star +2263 435 Star +2276 434 Star +2289 434 Star +2302 433 Star +2315 433 Star +2328 432 Star +2341 431 Star +2354 431 Star +2367 430 Star +2380 430 Star +2393 429 Star +2406 428 Star +2419 428 Star +2432 427 Star +2445 427 Star +2458 426 Star +2471 425 Star +2484 425 Star +2497 424 Star +2510 424 Star +2523 423 Star +2536 422 Star +2549 422 Star +2562 421 Star +2575 421 Star +2588 420 Star +2601 420 Star +2614 420 Star +2627 420 Star +2640 420 Star +2653 420 Star +2667 420 Star +2680 420 Star +2693 420 Star +2706 420 Star +2719 420 Star +2732 420 Star +2745 420 Star +2758 420 Star +2771 420 Star +2784 420 Star +2797 420 Star +2810 420 Star +2823 420 Star +2836 420 Star +2849 420 Star +2862 420 Star +2875 420 Star +2888 420 Star +6594 4459 Star +1.000 UP +1.000 UL +LT3 +6311 4319 M +('M50.keV') Rshow +721 4872 Box +727 4836 Box +734 4800 Box +740 4764 Box +747 4713 Box +753 4597 Box +760 4482 Box +766 4366 Box +773 4240 Box +779 4095 Box +786 3939 Box +792 3771 Box +799 3604 Box +805 3438 Box +812 3271 Box +818 3105 Box +825 2943 Box +831 2783 Box +838 2623 Box +844 2463 Box +851 2327 Box +857 2193 Box +864 2059 Box +870 1929 Box +877 1823 Box +883 1717 Box +890 1611 Box +896 1511 Box +903 1424 Box +909 1344 Box +916 1272 Box +922 1207 Box +929 1150 Box +935 1093 Box +942 1036 Box +948 989 Box +955 948 Box +961 906 Box +968 865 Box +974 834 Box +981 804 Box +987 774 Box +994 745 Box +1000 723 Box +1007 702 Box +1013 680 Box +1020 660 Box +1026 645 Box +1033 630 Box +1039 615 Box +1046 602 Box +1052 590 Box +1059 579 Box +1065 567 Box +1072 558 Box +1078 549 Box +1085 541 Box +1091 533 Box +1098 527 Box +1105 522 Box +1111 517 Box +1118 512 Box +1124 507 Box +1131 501 Box +1137 496 Box +1144 491 Box +1150 486 Box +1157 482 Box +1163 479 Box +1170 476 Box +1176 474 Box +1183 471 Box +1189 468 Box +1196 466 Box +1202 463 Box +1209 460 Box +1215 458 Box +1222 456 Box +1228 454 Box +1235 453 Box +1241 451 Box +1248 450 Box +1254 448 Box +1261 447 Box +1267 445 Box +1274 444 Box +1280 442 Box +1287 442 Box +1293 441 Box +1300 440 Box +1306 439 Box +1313 438 Box +1319 437 Box +1326 436 Box +1332 435 Box +1339 435 Box +1345 434 Box +1352 433 Box +1358 432 Box +1365 432 Box +1371 431 Box +1378 430 Box +1384 429 Box +1391 429 Box +1397 428 Box +1404 427 Box +1410 426 Box +1417 426 Box +1423 425 Box +1430 424 Box +1436 423 Box +1443 423 Box +1449 422 Box +1456 421 Box +1462 420 Box +1469 420 Box +1475 420 Box +1482 420 Box +1488 420 Box +1495 420 Box +1502 420 Box +1508 420 Box +1515 420 Box +1521 420 Box +1528 420 Box +1534 420 Box +1541 420 Box +1547 420 Box +1554 420 Box +1560 420 Box +1567 420 Box +1573 420 Box +1580 420 Box +1586 420 Box +6594 4319 Box +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/MEYER/Mall.pdf b/geant4/LEMuSR/MEYER/Mall.pdf new file mode 100644 index 0000000..e5f2d66 Binary files /dev/null and b/geant4/LEMuSR/MEYER/Mall.pdf differ diff --git a/geant4/LEMuSR/MEYER/Mall2.eps b/geant4/LEMuSR/MEYER/Mall2.eps new file mode 100644 index 0000000..1b3c6ba --- /dev/null +++ b/geant4/LEMuSR/MEYER/Mall2.eps @@ -0,0 +1,977 @@ +%!PS-Adobe-2.0 +%%Title: Mall2.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Mon Apr 11 19:39:42 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +6248 0 V +1.000 UL +LTb +714 420 M +63 0 V +6185 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 1310 M +6248 0 V +1.000 UL +LTb +714 1310 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.2) Rshow +1.000 UL +LTa +714 2201 M +6248 0 V +1.000 UL +LTb +714 2201 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.4) Rshow +1.000 UL +LTa +714 3091 M +6248 0 V +1.000 UL +LTb +714 3091 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.6) Rshow +1.000 UL +LTa +714 3982 M +6248 0 V +1.000 UL +LTb +714 3982 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.8) Rshow +1.000 UL +LTa +714 4872 M +6248 0 V +1.000 UL +LTb +714 4872 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 1) Rshow +1.000 UL +LTa +714 420 M +0 4452 V +1.000 UL +LTb +714 420 M +0 63 V +0 4389 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +1408 420 M +0 4452 V +1.000 UL +LTb +1408 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 5) Cshow +1.000 UL +LTa +2102 420 M +0 4452 V +1.000 UL +LTb +2102 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 10) Cshow +1.000 UL +LTa +2797 420 M +0 4452 V +1.000 UL +LTb +2797 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 15) Cshow +1.000 UL +LTa +3491 420 M +0 4452 V +1.000 UL +LTb +3491 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 20) Cshow +1.000 UL +LTa +4185 420 M +0 4452 V +1.000 UL +LTb +4185 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 25) Cshow +1.000 UL +LTa +4879 420 M +0 4452 V +1.000 UL +LTb +4879 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 30) Cshow +1.000 UL +LTa +5574 420 M +0 3829 V +0 560 R +0 63 V +1.000 UL +LTb +5574 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 35) Cshow +1.000 UL +LTa +6268 420 M +0 3829 V +0 560 R +0 63 V +1.000 UL +LTb +6268 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 40) Cshow +1.000 UL +LTa +6962 420 M +0 4452 V +1.000 UL +LTb +6962 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 45) Cshow +1.000 UL +LTb +714 420 M +6248 0 V +0 4452 V +-6248 0 V +714 420 L +140 2646 M +currentpoint gsave translate 90 rotate 0 0 M +(Meyer's distribution) Cshow +grestore +3838 70 M +(scatt. angle [deg]) Cshow +1.000 UP +1.000 UL +LT0 +6311 4739 M +('M5.keV') Rshow +783 4872 Pls +853 4858 Pls +922 4843 Pls +992 4829 Pls +1061 4814 Pls +1131 4800 Pls +1200 4785 Pls +1269 4771 Pls +1339 4756 Pls +1408 4742 Pls +1478 4712 Pls +1547 4666 Pls +1616 4620 Pls +1686 4573 Pls +1755 4527 Pls +1825 4481 Pls +1894 4434 Pls +1964 4388 Pls +2033 4342 Pls +2102 4296 Pls +2172 4238 Pls +2241 4180 Pls +2311 4122 Pls +2380 4064 Pls +2450 4004 Pls +2519 3937 Pls +2588 3869 Pls +2658 3802 Pls +2727 3735 Pls +2797 3668 Pls +2866 3601 Pls +2936 3535 Pls +3005 3468 Pls +3074 3401 Pls +3144 3335 Pls +3213 3268 Pls +3283 3201 Pls +3352 3135 Pls +3421 3068 Pls +3491 3004 Pls +3560 2940 Pls +3630 2876 Pls +3699 2811 Pls +3769 2747 Pls +3838 2683 Pls +3907 2619 Pls +3977 2555 Pls +4046 2491 Pls +4116 2431 Pls +4185 2377 Pls +4255 2324 Pls +4324 2270 Pls +4393 2216 Pls +4463 2163 Pls +4532 2109 Pls +4602 2055 Pls +4671 2002 Pls +4740 1948 Pls +4810 1904 Pls +4879 1862 Pls +4949 1819 Pls +5018 1777 Pls +5088 1734 Pls +5157 1692 Pls +5226 1649 Pls +5296 1607 Pls +5365 1564 Pls +5435 1525 Pls +5504 1490 Pls +5574 1455 Pls +5643 1421 Pls +5712 1386 Pls +5782 1355 Pls +5851 1326 Pls +5921 1297 Pls +5990 1269 Pls +6060 1240 Pls +6129 1216 Pls +6198 1193 Pls +6268 1170 Pls +6337 1147 Pls +6407 1124 Pls +6476 1102 Pls +6545 1079 Pls +6615 1056 Pls +6684 1033 Pls +6754 1012 Pls +6823 995 Pls +6893 979 Pls +6962 962 Pls +6594 4739 Pls +1.000 UP +1.000 UL +LT1 +6311 4599 M +('M10.keV') Rshow +783 4872 Crs +853 4843 Crs +922 4814 Crs +992 4785 Crs +1061 4756 Crs +1131 4712 Crs +1200 4619 Crs +1269 4527 Crs +1339 4434 Crs +1408 4342 Crs +1478 4238 Crs +1547 4121 Crs +1616 4003 Crs +1686 3869 Crs +1755 3734 Crs +1825 3601 Crs +1894 3467 Crs +1964 3334 Crs +2033 3201 Crs +2102 3067 Crs +2172 2939 Crs +2241 2811 Crs +2311 2682 Crs +2380 2554 Crs +2450 2430 Crs +2519 2323 Crs +2588 2215 Crs +2658 2108 Crs +2727 2001 Crs +2797 1903 Crs +2866 1818 Crs +2936 1733 Crs +3005 1648 Crs +3074 1563 Crs +3144 1489 Crs +3213 1420 Crs +3283 1354 Crs +3352 1297 Crs +3421 1239 Crs +3491 1193 Crs +3560 1147 Crs +3630 1101 Crs +3699 1055 Crs +3769 1011 Crs +3838 978 Crs +3907 945 Crs +3977 912 Crs +4046 879 Crs +4116 850 Crs +4185 826 Crs +4255 802 Crs +4324 778 Crs +4393 755 Crs +4463 735 Crs +4532 717 Crs +4602 700 Crs +4671 682 Crs +4740 665 Crs +4810 652 Crs +4879 640 Crs +4949 629 Crs +5018 617 Crs +5088 605 Crs +5157 596 Crs +5226 587 Crs +5296 578 Crs +5365 569 Crs +5435 560 Crs +5504 554 Crs +5574 547 Crs +5643 540 Crs +5712 534 Crs +5782 529 Crs +5851 524 Crs +5921 520 Crs +5990 516 Crs +6060 512 Crs +6129 508 Crs +6198 504 Crs +6268 500 Crs +6337 496 Crs +6407 492 Crs +6476 488 Crs +6545 483 Crs +6615 481 Crs +6684 479 Crs +6754 477 Crs +6823 474 Crs +6893 472 Crs +6962 470 Crs +6594 4599 Crs +1.000 UP +1.000 UL +LT2 +6311 4459 M +('M20.keV') Rshow +749 4872 Star +783 4843 Star +818 4814 Star +853 4785 Star +888 4757 Star +922 4713 Star +957 4620 Star +992 4528 Star +1026 4436 Star +1061 4343 Star +1096 4240 Star +1131 4124 Star +1165 4006 Star +1200 3872 Star +1235 3738 Star +1269 3605 Star +1304 3472 Star +1339 3338 Star +1374 3205 Star +1408 3072 Star +1443 2944 Star +1478 2816 Star +1512 2688 Star +1547 2560 Star +1582 2435 Star +1616 2328 Star +1651 2221 Star +1686 2114 Star +1721 2007 Star +1755 1908 Star +1790 1823 Star +1825 1738 Star +1859 1654 Star +1894 1569 Star +1929 1494 Star +1964 1425 Star +1998 1359 Star +2033 1301 Star +2068 1244 Star +2102 1196 Star +2137 1150 Star +2172 1105 Star +2207 1059 Star +2241 1014 Star +2276 981 Star +2311 948 Star +2345 915 Star +2380 882 Star +2415 852 Star +2450 828 Star +2484 804 Star +2519 781 Star +2554 757 Star +2588 737 Star +2623 719 Star +2658 702 Star +2693 684 Star +2727 667 Star +2762 654 Star +2797 642 Star +2831 630 Star +2866 618 Star +2901 606 Star +2936 597 Star +2970 588 Star +3005 579 Star +3040 570 Star +3074 561 Star +3109 555 Star +3144 548 Star +3178 541 Star +3213 535 Star +3248 529 Star +3283 525 Star +3317 521 Star +3352 517 Star +3387 513 Star +3421 509 Star +3456 505 Star +3491 501 Star +3526 496 Star +3560 492 Star +3595 488 Star +3630 484 Star +3664 481 Star +3699 479 Star +3734 477 Star +3769 475 Star +3803 473 Star +3838 470 Star +3873 468 Star +3907 466 Star +3942 464 Star +3977 462 Star +4012 460 Star +4046 458 Star +4081 456 Star +4116 455 Star +4150 454 Star +4185 452 Star +4220 451 Star +4255 450 Star +4289 449 Star +4324 448 Star +4359 446 Star +4393 445 Star +4428 444 Star +4463 443 Star +4498 442 Star +4532 441 Star +4567 441 Star +4602 440 Star +4636 439 Star +4671 439 Star +4706 438 Star +4740 437 Star +4775 436 Star +4810 436 Star +4845 435 Star +4879 434 Star +4914 434 Star +4949 433 Star +4983 433 Star +5018 432 Star +5053 431 Star +5088 431 Star +5122 430 Star +5157 430 Star +5192 429 Star +5226 428 Star +5261 428 Star +5296 427 Star +5331 427 Star +5365 426 Star +5400 425 Star +5435 425 Star +5469 424 Star +5504 424 Star +5539 423 Star +5574 422 Star +5608 422 Star +5643 421 Star +5678 421 Star +5712 420 Star +5747 420 Star +5782 420 Star +5817 420 Star +5851 420 Star +5886 420 Star +5921 420 Star +5955 420 Star +5990 420 Star +6025 420 Star +6060 420 Star +6094 420 Star +6129 420 Star +6164 420 Star +6198 420 Star +6233 420 Star +6268 420 Star +6302 420 Star +6337 420 Star +6372 420 Star +6407 420 Star +6441 420 Star +6476 420 Star +6511 420 Star +6594 4459 Star +1.000 UP +1.000 UL +LT3 +6311 4319 M +('M50.keV') Rshow +731 4872 Box +749 4836 Box +766 4800 Box +783 4764 Box +801 4713 Box +818 4597 Box +835 4482 Box +853 4366 Box +870 4240 Box +888 4095 Box +905 3939 Box +922 3771 Box +940 3604 Box +957 3438 Box +974 3271 Box +992 3105 Box +1009 2943 Box +1026 2783 Box +1044 2623 Box +1061 2463 Box +1078 2327 Box +1096 2193 Box +1113 2059 Box +1131 1929 Box +1148 1823 Box +1165 1717 Box +1183 1611 Box +1200 1511 Box +1217 1424 Box +1235 1344 Box +1252 1272 Box +1269 1207 Box +1287 1150 Box +1304 1093 Box +1321 1036 Box +1339 989 Box +1356 948 Box +1374 906 Box +1391 865 Box +1408 834 Box +1426 804 Box +1443 774 Box +1460 745 Box +1478 723 Box +1495 702 Box +1512 680 Box +1530 660 Box +1547 645 Box +1564 630 Box +1582 615 Box +1599 602 Box +1616 590 Box +1634 579 Box +1651 567 Box +1669 558 Box +1686 549 Box +1703 541 Box +1721 533 Box +1738 527 Box +1755 522 Box +1773 517 Box +1790 512 Box +1807 507 Box +1825 501 Box +1842 496 Box +1859 491 Box +1877 486 Box +1894 482 Box +1912 479 Box +1929 476 Box +1946 474 Box +1964 471 Box +1981 468 Box +1998 466 Box +2016 463 Box +2033 460 Box +2050 458 Box +2068 456 Box +2085 454 Box +2102 453 Box +2120 451 Box +2137 450 Box +2155 448 Box +2172 447 Box +2189 445 Box +2207 444 Box +2224 442 Box +2241 442 Box +2259 441 Box +2276 440 Box +2293 439 Box +2311 438 Box +2328 437 Box +2345 436 Box +2363 435 Box +2380 435 Box +2397 434 Box +2415 433 Box +2432 432 Box +2450 432 Box +2467 431 Box +2484 430 Box +2502 429 Box +2519 429 Box +2536 428 Box +2554 427 Box +2571 426 Box +2588 426 Box +2606 425 Box +2623 424 Box +2640 423 Box +2658 423 Box +2675 422 Box +2693 421 Box +2710 420 Box +2727 420 Box +2745 420 Box +2762 420 Box +2779 420 Box +2797 420 Box +2814 420 Box +2831 420 Box +2849 420 Box +2866 420 Box +2883 420 Box +2901 420 Box +2918 420 Box +2936 420 Box +2953 420 Box +2970 420 Box +2988 420 Box +3005 420 Box +3022 420 Box +3040 420 Box +6594 4319 Box +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/MEYER/Mall2.pdf b/geant4/LEMuSR/MEYER/Mall2.pdf new file mode 100644 index 0000000..7c45894 Binary files /dev/null and b/geant4/LEMuSR/MEYER/Mall2.pdf differ diff --git a/geant4/LEMuSR/MEYER/Mallsin.eps b/geant4/LEMuSR/MEYER/Mallsin.eps new file mode 100644 index 0000000..db30591 --- /dev/null +++ b/geant4/LEMuSR/MEYER/Mallsin.eps @@ -0,0 +1,978 @@ +%!PS-Adobe-2.0 +%%Title: Mallsin.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Tue Apr 12 08:59:12 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +6248 0 V +1.000 UL +LTb +714 420 M +63 0 V +6185 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 1056 M +6248 0 V +1.000 UL +LTb +714 1056 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.2) Rshow +1.000 UL +LTa +714 1692 M +6248 0 V +1.000 UL +LTb +714 1692 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.4) Rshow +1.000 UL +LTa +714 2328 M +6248 0 V +1.000 UL +LTb +714 2328 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.6) Rshow +1.000 UL +LTa +714 2964 M +6248 0 V +1.000 UL +LTb +714 2964 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.8) Rshow +1.000 UL +LTa +714 3600 M +6248 0 V +1.000 UL +LTb +714 3600 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 1) Rshow +1.000 UL +LTa +714 4236 M +6248 0 V +1.000 UL +LTb +714 4236 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 1.2) Rshow +1.000 UL +LTa +714 4872 M +6248 0 V +1.000 UL +LTb +714 4872 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 1.4) Rshow +1.000 UL +LTa +714 420 M +0 4452 V +1.000 UL +LTb +714 420 M +0 63 V +0 4389 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +1408 420 M +0 4452 V +1.000 UL +LTb +1408 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 5) Cshow +1.000 UL +LTa +2102 420 M +0 4452 V +1.000 UL +LTb +2102 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 10) Cshow +1.000 UL +LTa +2797 420 M +0 4452 V +1.000 UL +LTb +2797 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 15) Cshow +1.000 UL +LTa +3491 420 M +0 4452 V +1.000 UL +LTb +3491 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 20) Cshow +1.000 UL +LTa +4185 420 M +0 4452 V +1.000 UL +LTb +4185 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 25) Cshow +1.000 UL +LTa +4879 420 M +0 4452 V +1.000 UL +LTb +4879 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 30) Cshow +1.000 UL +LTa +5574 420 M +0 3829 V +0 560 R +0 63 V +1.000 UL +LTb +5574 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 35) Cshow +1.000 UL +LTa +6268 420 M +0 3829 V +0 560 R +0 63 V +1.000 UL +LTb +6268 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 40) Cshow +1.000 UL +LTa +6962 420 M +0 4452 V +1.000 UL +LTb +6962 420 M +0 63 V +0 4389 R +0 -63 V +0 -4529 R +( 45) Cshow +1.000 UL +LTb +714 420 M +6248 0 V +0 4452 V +-6248 0 V +714 420 L +140 2646 M +currentpoint gsave translate 90 rotate 0 0 M +(distribution) Cshow +grestore +3838 70 M +([deg]) Cshow +1.000 UP +1.000 UL +LT0 +6311 4739 M +('M5.keV' us 1:3) Rshow +783 420 Pls +853 449 Pls +922 477 Pls +992 505 Pls +1061 533 Pls +1131 561 Pls +1200 588 Pls +1269 616 Pls +1339 643 Pls +1408 670 Pls +1478 696 Pls +1547 720 Pls +1616 744 Pls +1686 767 Pls +1755 789 Pls +1825 811 Pls +1894 832 Pls +1964 853 Pls +2033 872 Pls +2102 892 Pls +2172 909 Pls +2241 925 Pls +2311 941 Pls +2380 956 Pls +2450 969 Pls +2519 981 Pls +2588 992 Pls +2658 1002 Pls +2727 1011 Pls +2797 1020 Pls +2866 1027 Pls +2936 1034 Pls +3005 1040 Pls +3074 1044 Pls +3144 1048 Pls +3213 1052 Pls +3283 1054 Pls +3352 1055 Pls +3421 1056 Pls +3491 1056 Pls +3560 1056 Pls +3630 1054 Pls +3699 1052 Pls +3769 1049 Pls +3838 1045 Pls +3907 1041 Pls +3977 1035 Pls +4046 1029 Pls +4116 1023 Pls +4185 1019 Pls +4255 1013 Pls +4324 1007 Pls +4393 1001 Pls +4463 993 Pls +4532 985 Pls +4602 977 Pls +4671 968 Pls +4740 958 Pls +4810 951 Pls +4879 943 Pls +4949 936 Pls +5018 928 Pls +5088 919 Pls +5157 910 Pls +5226 900 Pls +5296 890 Pls +5365 879 Pls +5435 870 Pls +5504 861 Pls +5574 852 Pls +5643 843 Pls +5712 834 Pls +5782 825 Pls +5851 817 Pls +5921 809 Pls +5990 801 Pls +6060 792 Pls +6129 785 Pls +6198 779 Pls +6268 772 Pls +6337 765 Pls +6407 757 Pls +6476 750 Pls +6545 742 Pls +6615 734 Pls +6684 725 Pls +6754 718 Pls +6823 712 Pls +6893 706 Pls +6962 700 Pls +6594 4739 Pls +1.000 UP +1.000 UL +LT1 +6311 4599 M +('M10.keV' us 1:3) Rshow +783 420 Crs +853 534 Crs +922 646 Crs +992 757 Crs +1061 866 Crs +1131 971 Crs +1200 1067 Crs +1269 1159 Crs +1339 1245 Crs +1408 1326 Crs +1478 1400 Crs +1547 1465 Crs +1616 1524 Crs +1686 1570 Crs +1755 1610 Crs +1825 1644 Crs +1894 1670 Crs +1964 1690 Crs +2033 1702 Crs +2102 1708 Crs +2172 1710 Crs +2241 1705 Crs +2311 1693 Crs +2380 1675 Crs +2450 1653 Crs +2519 1635 Crs +2588 1611 Crs +2658 1583 Crs +2727 1548 Crs +2797 1516 Crs +2866 1488 Crs +2936 1456 Crs +3005 1419 Crs +3074 1379 Crs +3144 1343 Crs +3213 1308 Crs +3283 1272 Crs +3352 1241 Crs +3421 1208 Crs +3491 1181 Crs +3560 1154 Crs +3630 1124 Crs +3699 1092 Crs +3769 1060 Crs +3838 1038 Crs +3907 1014 Crs +3977 988 Crs +4046 961 Crs +4116 936 Crs +4185 917 Crs +4255 897 Crs +4324 876 Crs +4393 854 Crs +4463 835 Crs +4532 819 Crs +4602 802 Crs +4671 784 Crs +4740 766 Crs +4810 753 Crs +4879 741 Crs +4949 728 Crs +5018 715 Crs +5088 702 Crs +5157 692 Crs +5226 681 Crs +5296 671 Crs +5365 659 Crs +5435 649 Crs +5504 641 Crs +5574 633 Crs +5643 624 Crs +5712 615 Crs +5782 609 Crs +5851 604 Crs +5921 598 Crs +5990 593 Crs +6060 588 Crs +6129 582 Crs +6198 576 Crs +6268 570 Crs +6337 564 Crs +6407 558 Crs +6476 551 Crs +6545 545 Crs +6615 540 Crs +6684 537 Crs +6754 534 Crs +6823 531 Crs +6893 527 Crs +6962 524 Crs +6594 4599 Crs +1.000 UP +1.000 UL +LT2 +6311 4459 M +('M20.keV'us 1:3) Rshow +749 420 Star +783 647 Star +818 871 Star +853 1093 Star +888 1311 Star +922 1522 Star +957 1714 Star +992 1897 Star +1026 2069 Star +1061 2233 Star +1096 2381 Star +1131 2511 Star +1165 2629 Star +1200 2723 Star +1235 2804 Star +1269 2871 Star +1304 2925 Star +1339 2965 Star +1374 2991 Star +1408 3004 Star +1443 3008 Star +1478 2999 Star +1512 2977 Star +1547 2942 Star +1582 2898 Star +1616 2863 Star +1651 2818 Star +1686 2761 Star +1721 2694 Star +1755 2629 Star +1790 2574 Star +1825 2511 Star +1859 2439 Star +1894 2358 Star +1929 2286 Star +1964 2217 Star +1998 2146 Star +2033 2085 Star +2068 2018 Star +2102 1965 Star +2137 1911 Star +2172 1852 Star +2207 1788 Star +2241 1723 Star +2276 1679 Star +2311 1631 Star +2345 1580 Star +2380 1525 Star +2415 1476 Star +2450 1438 Star +2484 1398 Star +2519 1355 Star +2554 1311 Star +2588 1273 Star +2623 1241 Star +2658 1207 Star +2693 1171 Star +2727 1134 Star +2762 1108 Star +2797 1084 Star +2831 1059 Star +2866 1032 Star +2901 1005 Star +2936 985 Star +2970 964 Star +3005 942 Star +3040 920 Star +3074 898 Star +3109 882 Star +3144 866 Star +3178 848 Star +3213 830 Star +3248 817 Star +3283 807 Star +3317 797 Star +3352 786 Star +3387 775 Star +3421 764 Star +3456 752 Star +3491 740 Star +3526 727 Star +3560 714 Star +3595 701 Star +3630 687 Star +3664 678 Star +3699 671 Star +3734 665 Star +3769 658 Star +3803 651 Star +3838 644 Star +3873 637 Star +3907 630 Star +3942 622 Star +3977 614 Star +4012 606 Star +4046 598 Star +4081 592 Star +4116 588 Star +4150 584 Star +4185 580 Star +4220 575 Star +4255 571 Star +4289 566 Star +4324 561 Star +4359 556 Star +4393 551 Star +4428 546 Star +4463 541 Star +4498 538 Star +4532 535 Star +4567 532 Star +4602 529 Star +4636 526 Star +4671 523 Star +4706 520 Star +4740 517 Star +4775 514 Star +4810 511 Star +4845 507 Star +4879 504 Star +4914 501 Star +4949 498 Star +4983 495 Star +5018 492 Star +5053 489 Star +5088 486 Star +5122 482 Star +5157 479 Star +5192 476 Star +5226 472 Star +5261 469 Star +5296 466 Star +5331 462 Star +5365 458 Star +5400 455 Star +5435 451 Star +5469 447 Star +5504 444 Star +5539 440 Star +5574 436 Star +5608 432 Star +5643 428 Star +5678 424 Star +5712 420 Star +5747 420 Star +5782 420 Star +5817 420 Star +5851 420 Star +5886 420 Star +5921 420 Star +5955 420 Star +5990 420 Star +6025 420 Star +6060 420 Star +6094 420 Star +6129 420 Star +6164 420 Star +6198 420 Star +6233 420 Star +6268 420 Star +6302 420 Star +6337 420 Star +6372 420 Star +6407 420 Star +6441 420 Star +6476 420 Star +6511 420 Star +6594 4459 Star +1.000 UP +1.000 UL +LT3 +6311 4319 M +('M30.keV' us 1:3) Rshow +749 420 Box +783 931 Box +818 1433 Box +853 1924 Box +888 2368 Box +922 2775 Box +957 3149 Box +992 3472 Box +1026 3744 Box +1061 3948 Box +1096 4107 Box +1131 4221 Box +1165 4287 Box +1200 4311 Box +1235 4298 Box +1269 4240 Box +1304 4146 Box +1339 4061 Box +1374 3938 Box +1408 3779 Box +1443 3657 Box +1478 3508 Box +1512 3330 Box +1547 3173 Box +1582 3014 Box +1616 2872 Box +1651 2743 Box +1686 2617 Box +1721 2475 Box +1755 2347 Box +1790 2240 Box +1825 2122 Box +1859 2008 Box +1894 1921 Box +1929 1826 Box +1964 1727 Box +1998 1655 Box +2033 1577 Box +2068 1492 Box +2102 1438 Box +2137 1381 Box +2172 1321 Box +2207 1271 Box +2241 1223 Box +2276 1172 Box +2311 1130 Box +2345 1092 Box +2380 1052 Box +2415 1019 Box +2450 997 Box +2484 973 Box +2519 948 Box +2554 921 Box +2588 893 Box +2623 864 Box +2658 833 Box +2693 811 Box +2727 796 Box +2762 781 Box +2797 766 Box +2831 749 Box +2866 732 Box +2901 714 Box +2936 696 Box +2970 682 Box +3005 673 Box +3040 663 Box +3074 653 Box +3109 642 Box +3144 631 Box +3178 620 Box +3213 608 Box +3248 600 Box +3283 593 Box +3317 587 Box +3352 580 Box +3387 573 Box +3421 566 Box +3456 558 Box +3491 551 Box +3526 544 Box +3560 537 Box +3595 530 Box +3630 523 Box +3664 515 Box +3699 508 Box +3734 500 Box +3769 492 Box +3803 484 Box +3838 475 Box +3873 467 Box +3907 458 Box +3942 449 Box +3977 440 Box +4012 431 Box +4046 421 Box +4081 420 Box +4116 420 Box +4150 420 Box +4185 420 Box +4220 420 Box +4255 420 Box +4289 420 Box +4324 420 Box +4359 420 Box +4393 420 Box +4428 420 Box +4463 420 Box +4498 420 Box +4532 420 Box +4567 420 Box +6594 4319 Box +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/MEYER/Mallsin.pdf b/geant4/LEMuSR/MEYER/Mallsin.pdf new file mode 100644 index 0000000..cc44613 Binary files /dev/null and b/geant4/LEMuSR/MEYER/Mallsin.pdf differ diff --git a/geant4/LEMuSR/MEYER/a.out b/geant4/LEMuSR/MEYER/a.out new file mode 100755 index 0000000..26b5f42 Binary files /dev/null and b/geant4/LEMuSR/MEYER/a.out differ diff --git a/geant4/LEMuSR/MEYER/g b/geant4/LEMuSR/MEYER/g new file mode 100644 index 0000000..4c82428 --- /dev/null +++ b/geant4/LEMuSR/MEYER/g @@ -0,0 +1,2 @@ +gnuplot + diff --git a/geant4/LEMuSR/MEYER/gplmac b/geant4/LEMuSR/MEYER/gplmac new file mode 100644 index 0000000..8ce815d --- /dev/null +++ b/geant4/LEMuSR/MEYER/gplmac @@ -0,0 +1,6 @@ +set term post col +set outp "Mall2.eps" +set grid +pl [0:45] 'testmeyer.out' us 1:2, exp(-x*x/200.) +set xlabel "[deg]" +set ylab "distribution" \ No newline at end of file diff --git a/geant4/LEMuSR/MEYER/gplmac~ b/geant4/LEMuSR/MEYER/gplmac~ new file mode 100644 index 0000000..6e042ba --- /dev/null +++ b/geant4/LEMuSR/MEYER/gplmac~ @@ -0,0 +1,6 @@ +set term post col +set outp "testmeyer.eps" +set grid +pl [0:15] 'testmeyer.out', exp(-x*x/1.)*61.5 +set outp "testmeyer2.eps" +pl [0:15] 'testmeyer.out', exp(-x*x/1.)*61.5 \ No newline at end of file diff --git a/geant4/LEMuSR/MEYER/meyer.cc b/geant4/LEMuSR/MEYER/meyer.cc new file mode 100644 index 0000000..3ed9bea --- /dev/null +++ b/geant4/LEMuSR/MEYER/meyer.cc @@ -0,0 +1,888 @@ +/* + fIRST IMPLEMENTATION BY ANLSEM,H. IN FORTRAN + C++ CONVERSION T.K.PARAISO 04-2005 + + !!! IMPORTANT !!! + + Notice: + Tables definition changes between FORTRAN and C++: + 1/ Fortran indices start at 1 and C++ indices start at 0 + 2/ Tables are defined as table[column][row] in Fortran + table[row][column] in c++ + + usefull reference + http://gershwin.ens.fr/vdaniel/Doc-Locale/Langages-Program-Scientific/Fortran/Tutorial/arrays.htm + +*/ + +#include "meyer.h" +#include +#include +#include +#include +#include +using namespace std; + + +meyer::meyer() +{;} + +meyer::~meyer() +{;} + + +void meyer::GFunctions(double* g1,double* g2, double tau) + +{ + + //Diese Routine gibt in Abhaengigkeit von der reduzierten Dicke 'tau' + //Funktionswerte fuer g1 und g2 zurueck. g1 und g2 sind dabei die von + //Meyer angegebenen tabellierten Funktionen fuer die Berechnung von Halbwerts- + //breiten von Streuwinkelverteilungen. (L.Meyer, phys.stat.sol. (b) 44, 253 + //(1971)) + + + double help; + + int i; + + + double tau_[] = {0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, + 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 9.0, + 10.0, 12.0, 14.0, 16.0, 18.0, 20.0 }; + + double g1_[] = {0.050,0.115,0.183,0.245,0.305,0.363,0.419,0.473,0.525,0.575, + 0.689,0.799,0.905,1.010,1.100,1.190,1.370,1.540,1.700,1.850, + 1.990,2.270,2.540,2.800,3.050,3.290 }; + + double g2_[] = {0.00,1.25,0.91,0.79,0.73,0.69,0.65,0.63,0.61,0.59, + 0.56,0.53,0.50,0.47,0.45,0.43,0.40,0.37,0.34,0.32, + 0.30,0.26,0.22,0.18,0.15,0.13 }; + + + if (tau kann ich nicht ... => STOP"< Tabelle A + thetaSchlangeMax = 4.0; + } + else if (tau<=8.) + { + //! => Tabelle B + thetaSchlangeMax = 7.0; + } + else if (tau<=20.) + { + //! => Tabelle C + thetaSchlangeMax = 20.0; + } + else + { + std::cout<< "Subroutine ''Get_F_Function_Meyer'':"< kann ich nicht ... => STOP"<50.) + { + thetaStep = .5; + } + + else if (thetaMax>25) + { + thetaStep = .25; + } + else if (thetaMax>12.5) + { + thetaStep = .125; + } + else + { + thetaStep = .0625; + } + + + //Tabelle der F-Werte erstellen: + + nBin = 0; + std::cout<<"thetamax = "<nBinMax) + { + std::cout<< "nBin > nBinMax => EXIT"; + break; + } + + value[nBin] = sin(theta)*F; + + fValues[nBin+1] = F; // ! fuer Testzwecke + fValuesFolded[nBin+1] = sin(theta/180*M_PI)*F;// ! fuer Testzwecke + + + }// end of do loop + + + //Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + + bigtheta:for( i = 1;i<= nBin; i++) + { + area[i] = (value[i]+value[i-1])/2.* thetaStep; + integ[i] = integ[i-1] + area[i]; + } + + + //Normiere totale Flaeche auf 1: + + rHelp = integ[nBin]; + for( i = 1; i<=nBin; i++) + { + value[i] = value[i] / rHelp; + area[i] = area[i] / rHelp; + integ[i] = integ[i] / rHelp; + } + + + //vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + //! Berechne die Werte fuer theta=0: + + F_Functions_Meyer(tau,0.,&f1,&f2); + F = Meyer_faktor4*Meyer_faktor4 * Ekin*Ekin /2 /M_PI * (f1 - Meyer_faktor3*f2);// TAO, Anselm was: Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2); + fValues[1] = F; + fValuesFolded[1] = 0.; + + //! Gib die Werte in das Tabellenfile aus: + + ofstream Mprint("tkm.out"); + theta = thetaStep; + if (!Mprint.is_open()) exit(8); + for( i = 1; i<=nBin+1;i++) + { + Mprint << theta<< " "<< fValues[i]/fValues[1]<<" " << fValuesFolded[i]< Reihe mit hoeherem Index + //iColumn = 2 => Reihe mit kleinerem Index + + + iColumn = 1; + + // 5 continue; + do{ + + if (column_<=8) + { + //! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Werte aus 1. Tabelle: 0.2 <= tau <= 1.8 + + column = column_; + // std::cout<<"thetaSchlange = "< +#include +#include +#include +#include +using namespace std; + + +meyer::meyer() +{;} + +meyer::~meyer() +{;} + + +void meyer::GFunctions(double* g1,double* g2, double tau) + +{ + + //Diese Routine gibt in Abhaengigkeit von der reduzierten Dicke 'tau' + //Funktionswerte fuer g1 und g2 zurueck. g1 und g2 sind dabei die von + //Meyer angegebenen tabellierten Funktionen fuer die Berechnung von Halbwerts- + //breiten von Streuwinkelverteilungen. (L.Meyer, phys.stat.sol. (b) 44, 253 + //(1971)) + + + double help; + + int i; + + + double tau_[] = {0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, + 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 9.0, + 10.0, 12.0, 14.0, 16.0, 18.0, 20.0 }; + + double g1_[] = {0.050,0.115,0.183,0.245,0.305,0.363,0.419,0.473,0.525,0.575, + 0.689,0.799,0.905,1.010,1.100,1.190,1.370,1.540,1.700,1.850, + 1.990,2.270,2.540,2.800,3.050,3.290 }; + + double g2_[] = {0.00,1.25,0.91,0.79,0.73,0.69,0.65,0.63,0.61,0.59, + 0.56,0.53,0.50,0.47,0.45,0.43,0.40,0.37,0.34,0.32, + 0.30,0.26,0.22,0.18,0.15,0.13 }; + + + if (tau kann ich nicht ... => STOP"< Tabelle A + thetaSchlangeMax = 4.0; + } + else if (tau<=8.) + { + //! => Tabelle B + thetaSchlangeMax = 7.0; + } + else if (tau<=20.) + { + //! => Tabelle C + thetaSchlangeMax = 20.0; + } + else + { + std::cout<< "Subroutine ''Get_F_Function_Meyer'':"< kann ich nicht ... => STOP"<50.) + { + thetaStep = .5; + } + + else if (thetaMax>25) + { + thetaStep = .25; + } + else if (thetaMax>12.5) + { + thetaStep = .125; + } + else + { + thetaStep = .0625; + } + + + //Tabelle der F-Werte erstellen: + + nBin = 0; + std::cout<<"thetamax = "<nBinMax) + { + std::cout<< "nBin > nBinMax => EXIT"; + break; + } + + value[nBin] = sin(theta)*F; + + fValues[nBin+1] = F; // ! fuer Testzwecke + fValuesFolded[nBin+1] = sin(theta/180*M_PI)*F;// ! fuer Testzwecke + + + }// end of do loop + + + //Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + + bigtheta:for( i = 1;i<= nBin; i++) + { + area[i] = (value[i]+value[i-1])/2.* thetaStep; + integ[i] = integ[i-1] + area[i]; + } + + + //Normiere totale Flaeche auf 1: + + rHelp = integ[nBin]; + for( i = 1; i<=nBin; i++) + { + value[i] = value[i] / rHelp; + area[i] = area[i] / rHelp; + integ[i] = integ[i] / rHelp; + } + + + //vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + //! Berechne die Werte fuer theta=0: + + F_Functions_Meyer(tau,0.,&f1,&f2); + F = Meyer_faktor4*Meyer_faktor4 * Ekin*Ekin /2 /M_PI * (f1 - Meyer_faktor3*f2);// TAO, Anselm was: Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2); + fValues[1] = F; + fValuesFolded[1] = 0.; + + //! Gib die Werte in das Tabellenfile aus: + + ofstream Mprint("tkm.out"); + theta = thetaStep; + if (!Mprint.is_open()) exit(8); + for( i = 1; i<=nBin+1;i++) + { + Mprint << theta<< " "<< fValues[i]/fValues[1]<<" " << fValuesFolded[i]< Reihe mit hoeherem Index + //iColumn = 2 => Reihe mit kleinerem Index + + + iColumn = 1; + + // 5 continue; + do{ + + if (column_<=8) + { + //! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Werte aus 1. Tabelle: 0.2 <= tau <= 1.8 + + column = column_; + // std::cout<<"thetaSchlange = "<> 20*(a/r0)^(4/3) sein muss. Fuer Protonen auf +c Graphit ist laut Referenz a/r0 gleich 0.26 (mit Dichte von 3.5 g/ccm habe +c ich einen Wert von 0.29 abgeschaetzt). Fuer Myonen hat man den selben +c Wert zu nehmen. Damit ergibt sich die Forderung, dass n >> 3.5 sein muss. +c +c (2) unabhaengig von (1) n >> 5 sein muss, was (1) also mit einschliesst. +c +c Mit n = Pi*r0*r0*Teilchen/Flaeche ergibt sich fuer eine Foliendicke von +c 3 ug/cm^2 als Abschaetzung fuer n ein Wert von 37. (r0 ueber r0 = 0.5 N^(1/3) +c und 3.5 g/ccm zu 8.9e-9 cm abgeschaetzt). D.h., dass die Bedingungen in +c unserem Fall gut erfuellt sind. +c In dem Paper wird eine Formel fuer Halbwertsbreiten angegeben. Ich habe nicht +c kontrolliert, in wie weit die Form der Verteilung tatsaechlich einer Gauss- +c verteilung entspricht. Zumindest im Bereich der Vorwaertsstreuung sollte +c die in diesem Programm verwendete Gaussverteilung aber eine sehr gute +c Naeherung abgeben. Abweichungen bei groesseren Winkeln koennten jedoch u. U. +c die absolute Streuintensitaet in Vorwaertsrichtung verfaelschen. + +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +c HIER GEHT DER PROGRAMMTEXT RICHTIG LOS +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz + + + + + +c=============================================================================== + + options /extend_source + + subroutine Get_F_Function_Meyer(tau,Ekin) +c ========================================= + + implicit none + + real tau + real Ekin + + real thetaSchlange,thetaSchlangeMax + real theta,thetaMax,thetaStep + real f1,f2,F + + +c------------------------------------ +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target +c real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + + real Pi ! die Kreiszahl + +c parameter (a0 = 5.29E-9) + parameter (Z1 = 1, Z2 = 6, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10) + parameter (Pi = 3.141592654) + + real Meyer_Faktor3 + real Meyer_Faktor4 + real zzz ! 'Hilfsparameter' + real Meyer_Faktor5 + + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + parameter (Meyer_faktor4 = screeningPar / (2.*Z1*Z2*eSquare) * Pi/180.) + parameter (zzz = screeningPar / (2.*Z1*Z2*eSquare)) + parameter (Meyer_faktor5 = zzz*zzz / (8*Pi*Pi)) + +c------------------------------------ + + integer nBin,nBinMax + parameter (nBinMax=201) + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + integer i + real rhelp + + integer HB_memsize + parameter(HB_memsize=500000) + real memory(HB_memsize) + COMMON /PAWC/ memory + + +c nur noch fuer Testzwecke: + + real fValues(203) + real fValuesFolded(203) + + integer idh + parameter (idh = 50) + + INCLUDE 'mutrack$sourcedirectory:COM_DIRS.INC' + character filename*20 ! Name der Ausgabe-Dateien + COMMON /filename/ filename + +c------------------------------------------------------------------------------- + +c Festlegen des maximalen Theta-Wertes sowie der Schrittweite: + + if (tau.LT.0.2) then + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist kleiner als 0.2 => kann ich nicht ... => STOP' + call exit + elseif (tau.LE.2.) then + ! => Tabelle A + thetaSchlangeMax = 4.0 + elseif (tau.LE.8.) then + ! => Tabelle B + thetaSchlangeMax = 7.0 + elseif (tau.LE.20.) then + ! => Tabelle C + thetaSchlangeMax = 20.0 + else + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist groesser als 20 => kann ich nicht ... => STOP' + call exit + endif + + thetaMax = thetaSchlangeMax / Meyer_Faktor4 / Ekin + if (thetaMax.GT.50) then + thetaStep = .5 + elseif (thetaMax.GT.25) then + thetaStep = .25 + elseif (thetaMax.GT.12.5) then + thetaStep = .125 + else + thetaStep = .0625 + endif + + +c Tabelle der F-Werte erstellen: + + nBin = 0 + do theta = thetaStep, thetaMax, thetaStep + + ! Berechne aus theta das 'reduzierte' thetaSchlange (dabei gleich + ! noch von degree bei theta in Radiant bei thetaSchlange umrechnen): + + thetaSchlange = Meyer_faktor4 * Ekin * theta + + ! Auslesen der Tabellenwerte fuer die f-Funktionen: + + call F_Functions_Meyer(tau,thetaSchlange,f1,f2) + if (thetaSchlange.EQ.-1) then + ! wir sind jenseits von thetaSchlangeMax + goto 10 + endif + + ! Berechnen der Streuintensitaet: + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + + nBin = nBin + 1 + if (nBin.GT.nBinMax) then + write(*,*) 'nBin > nBinMax => EXIT' + call exit + endif + value(nBin) = sind(theta)*F + + fValues(nBin+1) = F ! fuer Testzwecke + fValuesFolded(nBin+1) = sind(theta)*F ! fuer Testzwecke + + enddo + + +c Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + +10 do i = 1, nBin + area(i) = (value(i)+value(i-1))/2. * thetaStep + integ(i) = integ(i-1) + area(i) + enddo + + +c Normiere totale Flaeche auf 1: + + rHelp = integ(nBin) + do i = 1, nBin + value(i) = value(i) / rHelp + area(i) = area(i) / rHelp + integ(i) = integ(i) / rHelp + enddo + + +c vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + ! Berechne die Werte fuer theta=0: + + call F_Functions_Meyer(tau,0.,f1,f2) + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + fValues(1) = F + fValuesFolded(1) = 0. + + ! Gib die Werte in das Tabellenfile aus: + +c theta = 0. +c open (10,file=outDir//':'//filename//'.TAB',status='NEW') +c do i = 1, nBin+1 +c write(10,*) theta, fValues(i), fValuesFolded(i) +c theta = theta + thetaStep +c enddo +c close (10) + + + ! Buchen und Fuellen der Histogramme: + + call HBOOK1(idh,'F',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh,fValues) + call HRPUT(idh,outDir//':'//filename//'.RZ','N') + call HDELET(idh) + + call HBOOK1(idh+1,'F*sin([q])',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh+1,fValuesFolded) + call HRPUT(idh+1,outDir//':'//filename//'.RZ','U') + call HDELET(idh+1) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine throwMeyerAngle (theta) +c ================================== + + implicit none + + real lowerbound,y1,y2,f,root,radiant,fraction + integer bin,nBin + integer nBinMax + parameter (nBinMax=201) + + real theta,thetaStep + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + real rhelp + + real random + integer seed + common /seed/ seed + + +c bin: Nummer des Bins, innerhalb dessen das Integral den Wert von +c random erreicht oder ueberschreitet: + + random = ran(seed) + + bin = 1 + do while (random.GT.integ(bin)) + bin = bin + 1 + if (bin.GT.nBin) then + write(*,*) 'error 1' + call exit + endif + enddo + + fraction = (random-integ(bin-1)) / (integ(bin)-integ(bin-1)) + y1 = value(bin-1) + y2 = value(bin) + f = thetaStep / (y2-y1) + rHelp = y1*f + + radiant = rHelp*rHelp + fraction*thetaStep*(y1+y2)*f + root = SQRT(radiant) + lowerBound = real(bin-1)*thetaStep + if (f.GT.0) then + theta = lowerBound - rHelp + root + else + theta = lowerBound - rHelp - root + endif + + + END + + +c=============================================================================== + + options /extend_source + + subroutine F_Functions_Meyer(tau,thetaSchlange,f1,f2) +c ===================================================== + + implicit none + +c Diese Routine gibt in Abhaengigkeit von 'thetaSchlange' und 'tau' +c Funktionswerte fuer f1 und f2 zurueck. f1 und f2 entsprechen dabei den +c bei Meyer angegebenen Funktion gleichen Namens. Die in dieser Routine +c verwendeten Tabellen sind eben dieser Referenz entnommen: +c L.Meyer, phys.stat.sol. (b) 44, 253 (1971) + + real tau,thetaSchlange + real f1, f2, f1_(2), f2_(2) + + integer column_,column,row + + integer iColumn + real weightCol, weightRow + +c------------------------------------------------------------------------------- diff --git a/geant4/LEMuSR/MEYER/meyer.for~ b/geant4/LEMuSR/MEYER/meyer.for~ new file mode 100644 index 0000000..116b88d --- /dev/null +++ b/geant4/LEMuSR/MEYER/meyer.for~ @@ -0,0 +1,367 @@ +;; This buffer is for notes you don't want to save, and for Lisp evaluation. +;; If you want to create a file, visit that file with C-x C-f, +;; then enter the text in that file's own buffer. + +c------------------------------------------------------------------------------- +c Konstanten und Variable fuer Berechnung der Winkelaufstreuung in Triggerfolie +c mittels Meyer-Formel (L.Meyer, phys.stat.sol. (b) 44, 253 (1971)): + + real g1, g2 ! Tabellierte Funktionen der Referenz + real effRedThick ! effektive reduzierte Dicke ('tau' der Referenz) + + +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target + real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + real HWHM2sigma ! Umrechnungsfaktor von (halber!) Halbwertsbreite + ! nach Sigma der Gaussfunktion + + real Na ! die Avogadrokonstante + real mMolC ! molare Masse von C in ug + real Pi ! die Kreiszahl + + parameter (Z1 = 1, Z2 = 6, a0 = 5.29E-9, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10, HWHM2sigma = 1./1.17741) + parameter (Na = 6.022e23, mMolC = 12.011e6, Pi = 3.141592654) + + +c - Bei der Berechnung von Sigma auftretende Vorfaktoren. +c (Meyer_faktor 1 wird benoetigt fuer Berechnung der reduzierten Dicke aus der +c 'ug/cm2'-Angabe der Foliendicke. Meyer_faktor2 und Meyer_faktor3 werden +c direkt fuer die Berechnung von sigma aus den beiden tabellierten Funktionen +c g1 und g2 verwendet): + + real Meyer_Faktor1, Meyer_Faktor2, Meyer_Faktor3 + + parameter (Meyer_faktor1 = Pi*screeningPar*screeningPar * Na/mMolC) + ! Na/mMolC = 1/m(C-Atom) + parameter (Meyer_faktor2 = (2*Z1*Z2 * eSquare)/ScreeningPar * 180./Pi + + * HWHM2sigma) + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + + +c------------------------------------------------------------------------------- +c Kommentar zur Berechnung der Winkelaufstreuung nach Meyer: +c +c Als Bedingung fuer die Gueltigkeit der Rechnung wird verlangt, dass +c +c (1) die Anzahl n der Stoesse >> 20*(a/r0)^(4/3) sein muss. Fuer Protonen auf +c Graphit ist laut Referenz a/r0 gleich 0.26 (mit Dichte von 3.5 g/ccm habe +c ich einen Wert von 0.29 abgeschaetzt). Fuer Myonen hat man den selben +c Wert zu nehmen. Damit ergibt sich die Forderung, dass n >> 3.5 sein muss. +c +c (2) unabhaengig von (1) n >> 5 sein muss, was (1) also mit einschliesst. +c +c Mit n = Pi*r0*r0*Teilchen/Flaeche ergibt sich fuer eine Foliendicke von +c 3 ug/cm^2 als Abschaetzung fuer n ein Wert von 37. (r0 ueber r0 = 0.5 N^(1/3) +c und 3.5 g/ccm zu 8.9e-9 cm abgeschaetzt). D.h., dass die Bedingungen in +c unserem Fall gut erfuellt sind. +c In dem Paper wird eine Formel fuer Halbwertsbreiten angegeben. Ich habe nicht +c kontrolliert, in wie weit die Form der Verteilung tatsaechlich einer Gauss- +c verteilung entspricht. Zumindest im Bereich der Vorwaertsstreuung sollte +c die in diesem Programm verwendete Gaussverteilung aber eine sehr gute +c Naeherung abgeben. Abweichungen bei groesseren Winkeln koennten jedoch u. U. +c die absolute Streuintensitaet in Vorwaertsrichtung verfaelschen. + +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +c HIER GEHT DER PROGRAMMTEXT RICHTIG LOS +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz + + + + + +c=============================================================================== + + options /extend_source + + subroutine Get_F_Function_Meyer(tau,Ekin) +c ========================================= + + implicit none + + real tau + real Ekin + + real thetaSchlange,thetaSchlangeMax + real theta,thetaMax,thetaStep + real f1,f2,F + + +c------------------------------------ +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target +c real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + + real Pi ! die Kreiszahl + +c parameter (a0 = 5.29E-9) + parameter (Z1 = 1, Z2 = 6, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10) + parameter (Pi = 3.141592654) + + real Meyer_Faktor3 + real Meyer_Faktor4 + real zzz ! 'Hilfsparameter' + real Meyer_Faktor5 + + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + parameter (Meyer_faktor4 = screeningPar / (2.*Z1*Z2*eSquare) * Pi/180.) + parameter (zzz = screeningPar / (2.*Z1*Z2*eSquare)) + parameter (Meyer_faktor5 = zzz*zzz / (8*Pi*Pi)) + +c------------------------------------ + + integer nBin,nBinMax + parameter (nBinMax=201) + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + integer i + real rhelp + + integer HB_memsize + parameter(HB_memsize=500000) + real memory(HB_memsize) + COMMON /PAWC/ memory + + +c nur noch fuer Testzwecke: + + real fValues(203) + real fValuesFolded(203) + + integer idh + parameter (idh = 50) + + INCLUDE 'mutrack$sourcedirectory:COM_DIRS.INC' + character filename*20 ! Name der Ausgabe-Dateien + COMMON /filename/ filename + +c------------------------------------------------------------------------------- + +c Festlegen des maximalen Theta-Wertes sowie der Schrittweite: + + if (tau.LT.0.2) then + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist kleiner als 0.2 => kann ich nicht ... => STOP' + call exit + elseif (tau.LE.2.) then + ! => Tabelle A + thetaSchlangeMax = 4.0 + elseif (tau.LE.8.) then + ! => Tabelle B + thetaSchlangeMax = 7.0 + elseif (tau.LE.20.) then + ! => Tabelle C + thetaSchlangeMax = 20.0 + else + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist groesser als 20 => kann ich nicht ... => STOP' + call exit + endif + + thetaMax = thetaSchlangeMax / Meyer_Faktor4 / Ekin + if (thetaMax.GT.50) then + thetaStep = .5 + elseif (thetaMax.GT.25) then + thetaStep = .25 + elseif (thetaMax.GT.12.5) then + thetaStep = .125 + else + thetaStep = .0625 + endif + + +c Tabelle der F-Werte erstellen: + + nBin = 0 + do theta = thetaStep, thetaMax, thetaStep + + ! Berechne aus theta das 'reduzierte' thetaSchlange (dabei gleich + ! noch von degree bei theta in Radiant bei thetaSchlange umrechnen): + + thetaSchlange = Meyer_faktor4 * Ekin * theta + + ! Auslesen der Tabellenwerte fuer die f-Funktionen: + + call F_Functions_Meyer(tau,thetaSchlange,f1,f2) + if (thetaSchlange.EQ.-1) then + ! wir sind jenseits von thetaSchlangeMax + goto 10 + endif + + ! Berechnen der Streuintensitaet: + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + + nBin = nBin + 1 + if (nBin.GT.nBinMax) then + write(*,*) 'nBin > nBinMax => EXIT' + call exit + endif + value(nBin) = sind(theta)*F + + fValues(nBin+1) = F ! fuer Testzwecke + fValuesFolded(nBin+1) = sind(theta)*F ! fuer Testzwecke + + enddo + + +c Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + +10 do i = 1, nBin + area(i) = (value(i)+value(i-1))/2. * thetaStep + integ(i) = integ(i-1) + area(i) + enddo + + +c Normiere totale Flaeche auf 1: + + rHelp = integ(nBin) + do i = 1, nBin + value(i) = value(i) / rHelp + area(i) = area(i) / rHelp + integ(i) = integ(i) / rHelp + enddo + + +c vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + ! Berechne die Werte fuer theta=0: + + call F_Functions_Meyer(tau,0.,f1,f2) + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + fValues(1) = F + fValuesFolded(1) = 0. + + ! Gib die Werte in das Tabellenfile aus: + +c theta = 0. +c open (10,file=outDir//':'//filename//'.TAB',status='NEW') +c do i = 1, nBin+1 +c write(10,*) theta, fValues(i), fValuesFolded(i) +c theta = theta + thetaStep +c enddo +c close (10) + + + ! Buchen und Fuellen der Histogramme: + + call HBOOK1(idh,'F',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh,fValues) + call HRPUT(idh,outDir//':'//filename//'.RZ','N') + call HDELET(idh) + + call HBOOK1(idh+1,'F*sin([q])',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh+1,fValuesFolded) + call HRPUT(idh+1,outDir//':'//filename//'.RZ','U') + call HDELET(idh+1) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine throwMeyerAngle (theta) +c ================================== + + implicit none + + real lowerbound,y1,y2,f,root,radiant,fraction + integer bin,nBin + integer nBinMax + parameter (nBinMax=201) + + real theta,thetaStep + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + real rhelp + + real random + integer seed + common /seed/ seed + + +c bin: Nummer des Bins, innerhalb dessen das Integral den Wert von +c random erreicht oder ueberschreitet: + + random = ran(seed) + + bin = 1 + do while (random.GT.integ(bin)) + bin = bin + 1 + if (bin.GT.nBin) then + write(*,*) 'error 1' + call exit + endif + enddo + + fraction = (random-integ(bin-1)) / (integ(bin)-integ(bin-1)) + y1 = value(bin-1) + y2 = value(bin) + f = thetaStep / (y2-y1) + rHelp = y1*f + + radiant = rHelp*rHelp + fraction*thetaStep*(y1+y2)*f + root = SQRT(radiant) + lowerBound = real(bin-1)*thetaStep + if (f.GT.0) then + theta = lowerBound - rHelp + root + else + theta = lowerBound - rHelp - root + endif + + + END + + +c=============================================================================== + + options /extend_source + + subroutine F_Functions_Meyer(tau,thetaSchlange,f1,f2) +c ===================================================== + + implicit none + +c Diese Routine gibt in Abhaengigkeit von 'thetaSchlange' und 'tau' +c Funktionswerte fuer f1 und f2 zurueck. f1 und f2 entsprechen dabei den +c bei Meyer angegebenen Funktion gleichen Namens. Die in dieser Routine +c verwendeten Tabellen sind eben dieser Referenz entnommen: +c L.Meyer, phys.stat.sol. (b) 44, 253 (1971) + + real tau,thetaSchlange + real f1, f2, f1_(2), f2_(2) + + integer column_,column,row + + integer iColumn + real weightCol, weightRow + +c------------------------------------------------------------------------------- diff --git a/geant4/LEMuSR/MEYER/meyer.h b/geant4/LEMuSR/MEYER/meyer.h new file mode 100644 index 0000000..351da12 --- /dev/null +++ b/geant4/LEMuSR/MEYER/meyer.h @@ -0,0 +1,27 @@ +#ifndef meyer_h +#define meyer_h 1 + +#include +#include +#include +#include +#include +#include +#include + + +class meyer +{ + public: + meyer(); + ~meyer(); + + + void GFunctions(double*, double*, double); + void Get_F_Function_Meyer(double tau, double Ekin, double Z1, double Z2, double m1, double m2); + void F_Functions_Meyer( double tau,double thetaSchlange,double *f1,double *f2); + + +}; + +#endif diff --git a/geant4/LEMuSR/MEYER/meyer.h~ b/geant4/LEMuSR/MEYER/meyer.h~ new file mode 100644 index 0000000..af560b9 --- /dev/null +++ b/geant4/LEMuSR/MEYER/meyer.h~ @@ -0,0 +1,27 @@ +#ifndef meyer_h +#define meyer_h 1 + +#include +#include +#include +#include +#include +#include +#include + + +class meyer +{ + public: + meyer(); + ~meyer(); + + + void GFunctions(double*, double*, double); + void Get_F_Function_Meyer(double tau, double Ekin); + void F_Functions_Meyer( double tau,double thetaSchlange,double *f1,double *f2); + + +}; + +#endif diff --git a/geant4/LEMuSR/MEYER/mk.sh b/geant4/LEMuSR/MEYER/mk.sh new file mode 100644 index 0000000..064470f --- /dev/null +++ b/geant4/LEMuSR/MEYER/mk.sh @@ -0,0 +1 @@ +g++ testmeyer.cc meyer.cc diff --git a/geant4/LEMuSR/MEYER/mtest.for b/geant4/LEMuSR/MEYER/mtest.for new file mode 100644 index 0000000..494d82a --- /dev/null +++ b/geant4/LEMuSR/MEYER/mtest.for @@ -0,0 +1,698 @@ + PROGRAM mtest + IMPLICIT NONE + + + write(*,*)'SUBROUTINE G_Functions:' + + + SUBROUTINE G_Functions(G1,G2,tau) +c ================================= + +c Diese Routine gibt in Abhaengigkeit von der reduzierten Dicke 'tau' +c Funktionswerte fuer g1 und g2 zurueck. g1 und g2 sind dabei die von +c Meyer angegebenen tabellierten Funktionen fuer die Berechnung von Halbwerts- +c breiten von Streuwinkelverteilungen. (L.Meyer, phys.stat.sol. (b) 44, 253 +c (1971)) + + IMPLICIT NONE + + real tau,g1,g2 + real tau_(26),g1_(26),g2_(26) + real help + + integer i + + DATA tau_ /0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, + + 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 9.0, + + 10.0, 12.0, 14.0, 16.0, 18.0, 20.0 / + + DATA g1_ /0.050,0.115,0.183,0.245,0.305,0.363,0.419,0.473,0.525,0.575, + + 0.689,0.799,0.905,1.010,1.100,1.190,1.370,1.540,1.700,1.850, + + 1.990,2.270,2.540,2.800,3.050,3.290 / + DATA g2_ / 0.00,1.25,0.91,0.79,0.73,0.69,0.65,0.63,0.61,0.59, + + 0.56,0.53,0.50,0.47,0.45,0.43,0.40,0.37,0.34,0.32, + + 0.30,0.26,0.22,0.18,0.15,0.13 / + + if (tau.LT.tau_(1)) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist kleiner als kleinster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(1) = ',tau_(1) + write(*,*) + STOP + endif + + i = 1 + + 10 i = i + 1 + if (i.EQ.27) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist groesser als groesster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(26) = ',tau_(26) + write(*,*) + STOP + elseif (tau.gt.tau_(i)) then + goto 10 + endif + + +c lineare Interpolation zwischen Tabellenwerten: + + help = (tau-tau_(i-1))/(tau_(i)-tau_(i-1)) + + g1 = g1_(i-1) + help*(g1_(i)-g1_(i-1)) + g2 = g2_(i-1) + help*(g2_(i)-g2_(i-1)) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine Get_F_Function_Meyer(tau,Ekin) +c ========================================= + + implicit none + + real tau + real Ekin + + real thetaSchlange,thetaSchlangeMax + real theta,thetaMax,thetaStep + real f1,f2,F + + +c------------------------------------ +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target +c real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + + real Pi ! die Kreiszahl + +c parameter (a0 = 5.29E-9) + parameter (Z1 = 1, Z2 = 6, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10) + parameter (Pi = 3.141592654) + + real Meyer_Faktor3 + real Meyer_Faktor4 + real zzz ! 'Hilfsparameter' + real Meyer_Faktor5 + + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + parameter (Meyer_faktor4 = screeningPar / (2.*Z1*Z2*eSquare) * Pi/180.) + parameter (zzz = screeningPar / (2.*Z1*Z2*eSquare)) + parameter (Meyer_faktor5 = zzz*zzz / (8*Pi*Pi)) + +c------------------------------------ + + integer nBin,nBinMax + parameter (nBinMax=201) + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + integer i + real rhelp + + integer HB_memsize + parameter(HB_memsize=500000) + real memory(HB_memsize) + COMMON /PAWC/ memory + + +c nur noch fuer Testzwecke: + + real fValues(203) + real fValuesFolded(203) + + integer idh + parameter (idh = 50) + + INCLUDE 'mutrack$sourcedirectory:COM_DIRS.INC' + character filename*20 ! Name der Ausgabe-Dateien + COMMON /filename/ filename + +c------------------------------------------------------------------------------- + +c Festlegen des maximalen Theta-Wertes sowie der Schrittweite: + + if (tau.LT.0.2) then + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist kleiner als 0.2 => kann ich nicht ... => STOP' + call exit + elseif (tau.LE.2.) then + ! => Tabelle A + thetaSchlangeMax = 4.0 + elseif (tau.LE.8.) then + ! => Tabelle B + thetaSchlangeMax = 7.0 + elseif (tau.LE.20.) then + ! => Tabelle C + thetaSchlangeMax = 20.0 + else + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist groesser als 20 => kann ich nicht ... => STOP' + call exit + endif + + thetaMax = thetaSchlangeMax / Meyer_Faktor4 / Ekin + if (thetaMax.GT.50) then + thetaStep = .5 + elseif (thetaMax.GT.25) then + thetaStep = .25 + elseif (thetaMax.GT.12.5) then + thetaStep = .125 + else + thetaStep = .0625 + endif + + +c Tabelle der F-Werte erstellen: + + nBin = 0 + do theta = thetaStep, thetaMax, thetaStep + + ! Berechne aus theta das 'reduzierte' thetaSchlange (dabei gleich + ! noch von degree bei theta in Radiant bei thetaSchlange umrechnen): + + thetaSchlange = Meyer_faktor4 * Ekin * theta + + ! Auslesen der Tabellenwerte fuer die f-Funktionen: + + call F_Functions_Meyer(tau,thetaSchlange,f1,f2) + if (thetaSchlange.EQ.-1) then + ! wir sind jenseits von thetaSchlangeMax + goto 10 + endif + + ! Berechnen der Streuintensitaet: + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + + nBin = nBin + 1 + if (nBin.GT.nBinMax) then + write(*,*) 'nBin > nBinMax => EXIT' + call exit + endif + value(nBin) = sind(theta)*F + + fValues(nBin+1) = F ! fuer Testzwecke + fValuesFolded(nBin+1) = sind(theta)*F ! fuer Testzwecke + + enddo + + +c Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + + 10 do i = 1, nBin + area(i) = (value(i)+value(i-1))/2. * thetaStep + integ(i) = integ(i-1) + area(i) + enddo + + +c Normiere totale Flaeche auf 1: + + rHelp = integ(nBin) + do i = 1, nBin + value(i) = value(i) / rHelp + area(i) = area(i) / rHelp + integ(i) = integ(i) / rHelp + enddo + + +c vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + ! Berechne die Werte fuer theta=0: + + call F_Functions_Meyer(tau,0.,f1,f2) + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + fValues(1) = F + fValuesFolded(1) = 0. + + ! Gib die Werte in das Tabellenfile aus: + +c theta = 0. +c open (10,file=outDir//':'//filename//'.TAB',status='NEW') +c do i = 1, nBin+1 +c write(10,*) theta, fValues(i), fValuesFolded(i) +c theta = theta + thetaStep +c enddo +c close (10) + + + ! Buchen und Fuellen der Histogramme: + + call HBOOK1(idh,'F',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh,fValues) + call HRPUT(idh,outDir//':'//filename//'.RZ','N') + call HDELET(idh) + + call HBOOK1(idh+1,'F*sin([q])',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh+1,fValuesFolded) + call HRPUT(idh+1,outDir//':'//filename//'.RZ','U') + call HDELET(idh+1) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine throwMeyerAngle (theta) +c ================================== + + implicit none + + real lowerbound,y1,y2,f,root,radiant,fraction + integer bin,nBin + integer nBinMax + parameter (nBinMax=201) + + real theta,thetaStep + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + real rhelp + + real random + integer seed + common /seed/ seed + + +c bin: Nummer des Bins, innerhalb dessen das Integral den Wert von +c random erreicht oder ueberschreitet: + + random = ran(seed) + + bin = 1 + do while (random.GT.integ(bin)) + bin = bin + 1 + if (bin.GT.nBin) then + write(*,*) 'error 1' + call exit + endif + enddo + + fraction = (random-integ(bin-1)) / (integ(bin)-integ(bin-1)) + y1 = value(bin-1) + y2 = value(bin) + f = thetaStep / (y2-y1) + rHelp = y1*f + + radiant = rHelp*rHelp + fraction*thetaStep*(y1+y2)*f + root = SQRT(radiant) + lowerBound = real(bin-1)*thetaStep + if (f.GT.0) then + theta = lowerBound - rHelp + root + else + theta = lowerBound - rHelp - root + endif + + + END + + +c=============================================================================== + + options /extend_source + + subroutine F_Functions_Meyer(tau,thetaSchlange,f1,f2) +c ===================================================== + + implicit none + +c Diese Routine gibt in Abhaengigkeit von 'thetaSchlange' und 'tau' +c Funktionswerte fuer f1 und f2 zurueck. f1 und f2 entsprechen dabei den +c bei Meyer angegebenen Funktion gleichen Namens. Die in dieser Routine +c verwendeten Tabellen sind eben dieser Referenz entnommen: +c L.Meyer, phys.stat.sol. (b) 44, 253 (1971) + + real tau,thetaSchlange + real f1, f2, f1_(2), f2_(2) + + integer column_,column,row + + integer iColumn + real weightCol, weightRow + +c------------------------------------------------------------------------------- + +c die Tabellendaten der Referenz (Tabellen 2 und 3): + + integer nColumn + parameter (nColumn = 25) + real tau_(nColumn) / + + 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, + + 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10., 12., 14., 16., 18., 20. / + + integer nRowA + parameter (nRowA = 25) + real thetaSchlangeA(nRowA) / + + .00, .05, .10, .15, .20, .25, .30, .35, .40, .45, .50, .60, + + .70, .80, .90, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, 3.5, 4.0 / + + integer nRowB + parameter (nRowB = 24) + real thetaSchlangeB(nRowB) / + + 0.0, 0.2, 0.4, 0.5, 0.6, 0.8, 1.0, 1.2, 1.4, 1.5, 1.6, 1.8, + + 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0 / + + integer nRowC + parameter (nRowC = 24) + real thetaSchlangeC(nRowC) / + + 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, + + 7.0, 8.0, 9.0, 10., 11., 12., 13., 14., 15., 16., 18., 20. / + + + real f1_A(9,nRowA) + + /1.69E+2,4.55E+1,2.11E+1,1.25E+1,8.48E+0,6.21E+0,4.80E+0,3.86E+0,3.20E+0, + + 9.82E+1,3.72E+1,1.97E+1,1.20E+1,8.27E+0,6.11E+0,4.74E+0,3.83E+0,3.17E+0, + + 3.96E+1,2.58E+1,1.65E+1,1.09E+1,7.73E+0,5.82E+0,4.58E+0,3.72E+0,3.10E+0, + + 1.76E+1,1.58E+1,1.27E+1,9.26E+0,6.93E+0,5.38E+0,4.31E+0,3.55E+0,2.99E+0, + + 8.62E+0,1.01E+1,9.45E+0,7.58E+0,6.02E+0,4.85E+0,3.98E+0,3.33E+0,2.84E+0, + + 4.65E+0,6.55E+0,6.91E+0,6.06E+0,5.11E+0,4.28E+0,3.62E+0,3.08E+0,2.66E+0, + + 2.74E+0,4.45E+0,5.03E+0,4.78E+0,4.27E+0,3.72E+0,3.23E+0,2.82E+0,2.47E+0, + + 1.77E+0,3.02E+0,3.71E+0,3.76E+0,3.53E+0,3.20E+0,2.86E+0,2.55E+0,2.27E+0, + + 1.22E+0,2.19E+0,2.78E+0,2.96E+0,2.91E+0,2.73E+0,2.51E+0,2.28E+0,2.07E+0, + + 8.82E-1,1.59E+0,2.12E+0,2.35E+0,2.39E+0,2.32E+0,2.19E+0,2.03E+0,1.87E+0, + + 6.55E-1,1.20E+0,1.64E+0,1.88E+0,1.97E+0,1.96E+0,1.90E+0,1.79E+0,1.68E+0, + + 3.80E-1,7.15E-1,1.01E+0,1.22E+0,1.35E+0,1.40E+0,1.41E+0,1.39E+0,1.34E+0, + + 2.26E-1,4.45E-1,6.44E-1,8.08E-1,9.28E-1,1.01E+0,1.05E+0,1.06E+0,1.05E+0, + + 1.39E-1,2.80E-1,4.21E-1,5.45E-1,6.46E-1,7.22E-1,7.75E-1,8.07E-1,8.21E-1, + + 8.22E-2,1.76E-1,2.78E-1,3.71E-1,4.53E-1,5.21E-1,5.74E-1,6.12E-1,6.37E-1, + + 5.04E-2,1.11E-1,1.86E-1,2.57E-1,3.22E-1,3.79E-1,4.27E-1,4.65E-1,4.94E-1, + + 2.51E-2,5.60E-2,9.24E-2,1.31E-1,1.69E-1,2.02E-1,2.40E-1,2.71E-1,2.97E-1, + + 1.52E-2,3.20E-2,5.08E-2,7.23E-2,9.51E-2,1.18E-1,1.41E-1,1.63E-1,1.83E-1, + + 1.03E-2,2.05E-2,3.22E-2,4.55E-2,6.01E-2,7.53E-2,9.02E-2,1.05E-1,1.19E-1, + + 8.80E-3,1.48E-2,2.25E-2,3.13E-2,4.01E-2,5.03E-2,6.01E-2,7.01E-2,8.01E-2, + + 6.10E-3,1.15E-2,1.71E-2,2.28E-2,2.89E-2,3.52E-2,4.18E-2,4.86E-2,5.55E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,1.71E-2,1.98E-2,2.28E-2,2.58E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.90E-3,1.02E-2,1.16E-2,1.31E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,4.90E-3,5.70E-3,6.40E-3,7.20E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.90E-3,3.40E-3,3.90E-3,4.30E-3/ + + real f1_B(9,nRowB) + + /2.71E+0,1.92E+0,1.46E+0,1.16E+0,9.52E-1,8.03E-1,6.90E-1,5.32E-1,4.28E-1, + + 2.45E+0,1.79E+0,1.39E+0,1.12E+0,9.23E-1,7.82E-1,6.75E-1,5.23E-1,4.23E-1, + + 1.87E+0,1.48E+0,1.20E+0,9.96E-1,8.42E-1,7.24E-1,6.32E-1,4.98E-1,4.07E-1, + + 1.56E+0,1.30E+0,1.09E+0,9.19E-1,7.89E-1,6.86E-1,6.03E-1,4.80E-1,3.95E-1, + + 1.28E+0,1.11E+0,9.62E-1,8.33E-1,7.27E-1,6.40E-1,5.69E-1,4.59E-1,3.81E-1, + + 8.23E-1,7.90E-1,7.29E-1,6.64E-1,6.01E-1,5.44E-1,4.94E-1,4.12E-1,3.49E-1, + + 5.14E-1,5.36E-1,5.29E-1,5.07E-1,4.78E-1,4.47E-1,4.16E-1,3.60E-1,3.13E-1, + + 3.19E-1,3.58E-1,3.76E-1,3.78E-1,3.70E-1,3.57E-1,3.45E-1,3.08E-1,2.76E-1, + + 2.02E-1,2.40E-1,2.64E-1,2.77E-1,2.82E-1,2.80E-1,2.65E-1,2.59E-1,2.39E-1, + + 1.67E-1,1.96E-1,2.20E-1,2.36E-1,2.44E-1,2.47E-1,2.45E-1,2.35E-1,2.21E-1, + + 1.33E-1,1.61E-1,1.85E-1,2.02E-1,2.12E-1,2.18E-1,2.18E-1,2.14E-1,2.03E-1, + + 8.99E-2,1.12E-1,1.32E-1,1.48E-1,1.59E-1,1.67E-1,1.68E-1,1.75E-1,1.72E-1, + + 6.24E-2,7.94E-2,9.50E-2,1.09E-1,1.20E-1,1.29E-1,1.35E-1,1.42E-1,1.43E-1, + + 4.55E-2,5.74E-2,6.98E-2,8.11E-2,9.09E-2,9.92E-2,1.06E-1,1.15E-1,1.19E-1, + + 3.35E-2,4.22E-2,5.19E-2,6.11E-2,6.95E-2,7.69E-2,8.33E-2,9.28E-2,9.85E-2, + + 2.50E-2,3.16E-2,3.92E-2,4.66E-2,5.35E-2,6.00E-2,6.57E-2,7.49E-2,8.13E-2, + + 1.90E-2,2.40E-2,2.99E-2,3.58E-2,4.16E-2,4.70E-2,5.20E-2,6.05E-2,6.70E-2, + + 1.47E-2,1.86E-2,2.32E-2,2.79E-2,3.25E-2,3.70E-2,4.12E-2,4.89E-2,5.51E-2, + + 8.10E-3,1.04E-2,1.30E-2,1.57E-2,1.84E-2,2.12E-2,2.40E-2,2.93E-2,3.42E-2, + + 4.80E-3,6.20E-3,7.70E-3,9.30E-3,1.09E-2,1.26E-2,1.44E-2,1.79E-2,2.14E-2, + + 2.80E-3,3.80E-3,4.70E-3,5.70E-3,6.70E-3,7.50E-3,8.90E-3,1.13E-2,1.36E-2, + + 1.70E-3,2.30E-3,2.90E-3,3.60E-3,4.20E-3,4.90E-3,5.60E-3,7.20E-3,8.80E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.00E-3,2.80E-3,3.50E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.80E-4,1.20E-3,1.60E-3/ + + real f1_C(7,nRowC) + + /3.65E-1,2.62E-1,2.05E-1,1.67E-1,1.41E-1,1.21E-1,1.05E-1, + + 3.33E-1,2.50E-1,1.95E-1,1.61E-1,1.36E-1,1.18E-1,1.03E-1, + + 2.75E-1,2.18E-1,1.76E-1,1.48E-1,1.27E-1,1.11E-1,9.80E-2, + + 2.04E-1,1.75E-1,1.50E-1,1.29E-1,1.13E-1,1.01E-1,9.00E-2, + + 1.41E-1,1.31E-1,1.19E-1,1.08E-1,9.71E-2,8.88E-2,8.01E-2, + + 9.32E-2,9.42E-2,9.10E-2,8.75E-2,8.00E-2,7.44E-2,6.91E-2, + + 5.98E-2,6.52E-2,6.72E-2,6.62E-2,6.40E-2,6.12E-2,5.82E-2, + + 3.83E-2,4.45E-2,4.80E-2,4.96E-2,4.98E-2,4.90E-2,4.77E-2, + + 2.46E-2,3.01E-2,3.40E-2,3.65E-2,3.79E-2,3.84E-2,3.83E-2, + + 1.59E-2,2.03E-2,2.39E-2,2.66E-2,2.85E-2,2.97E-2,3.04E-2, + + 1.04E-2,1.37E-2,1.66E-2,1.92E-2,2.12E-2,2.27E-2,2.37E-2, + + 4.39E-3,6.26E-3,8.26E-3,9.96E-3,1.15E-2,1.29E-2,1.41E-2, + + 2.06E-3,3.02E-3,4.24E-3,5.28E-3,6.32E-3,7.32E-3,8.26E-3, + + 1.21E-3,1.69E-3,2.24E-3,2.85E-3,3.50E-3,4.16E-3,4.82E-3, + + 8.50E-4,1.10E-3,1.38E-3,1.65E-3,2.03E-3,2.45E-3,2.88E-3, + + 5.90E-4,7.40E-4,8.50E-4,9.90E-4,1.23E-3,1.49E-3,1.71E-3, + + 3.90E-4,4.60E-4,5.20E-4,6.30E-4,7.65E-4,9.65E-4,1.12E-3, + + 2.40E-4,2.70E-4,3.10E-4,3.98E-4,4.97E-4,6.03E-4,7.18E-4, + + 1.50E-4,1.70E-4,2.15E-4,2.70E-4,3.35E-4,4.35E-4,5.00E-4, + + 1.00E-4,1.20E-4,1.46E-4,1.90E-4,2.40E-4,2.88E-4,3.43E-4, + + 0.00 ,0.00 ,1.04E-4,1.41E-4,1.80E-4,2.10E-4,2.50E-4, + + 0.00 ,0.00 ,8.20E-5,1.06E-4,1.38E-4,1.58E-4,1.85E-4, + + 0.00 ,0.00 ,5.40E-5,7.00E-5,8.60E-5,1.03E-4,1.20E-4, + + 0.00 ,0.00 ,4.20E-5,5.40E-5,6.50E-5,7.70E-5,8.80E-5/ + + real f2_A(9,nRowA) + + / 3.52E+3, 3.27E+2, 9.08E+1, 3.85E+1, 2.00E+1, 1.18E+1, 7.55E+0, 5.16E+0, 3.71E+0, + + 2.58E+2, 1.63E+2, 7.30E+1, 3.42E+1, 1.85E+1, 1.11E+1, 7.18E+0, 4.96E+0, 3.59E+0, + + -1.12E+2, 4.84E+0, 3.56E+1, 2.34E+1, 1.45E+1, 9.33E+0, 6.37E+0, 4.51E+0, 3.32E+0, + + -5.60E+1,-1.12E+1, 9.87E+0, 1.24E+1, 9.59E+0, 7.01E+0, 5.16E+0, 3.83E+0, 2.91E+0, + + -2.13E+1,-1.22E+1,-2.23E+0, 3.88E+0, 5.15E+0, 4.65E+0, 3.87E+0, 3.12E+0, 2.45E+0, + + -8.25E+0,-9.58E+0,-5.59E+0,-1.40E+0, 1.76E+0, 2.71E+0, 2.71E+0, 2.35E+0, 1.95E+0, + + -3.22E+0,-6.12E+0,-5.28E+0,-2.87E+0,-1.92E-1, 1.32E+0, 1.69E+0, 1.74E+0, 1.48E+0, + + -1.11E+0,-3.40E+0,-4.12E+0,-3.08E+0,-6.30E-1, 3.60E-1, 9.20E-1, 1.03E+0, 1.04E+0, + + -2.27E-1,-2.00E+0,-2.93E+0,-2.69E+0,-1.48E+0,-3.14E-1, 2.69E-1, 5.28E-1, 6.09E-1, + + 1.54E-1,-1.09E+0,-2.10E+0,-2.15E+0,-1.47E+0,-6.77E-1,-1.80E-1, 1.08E-1, 2.70E-1, + + 3.28E-1,-6.30E-1,-1.50E+0,-1.68E+0,-1.34E+0,-8.43E-1,-4.60E-1,-1.85E-1,-4.67E-3, + + 3.32E-1,-2.06E-1,-7.32E-1,-9.90E-1,-9.42E-1,-8.20E-1,-6.06E-1,-4.51E-1,-3.01E-1, + + 2.72E-1,-3.34E-2,-3.49E-1,-5.65E-1,-6.03E-1,-5.79E-1,-5.05E-1,-4.31E-1,-3.45E-1, + + 2.02E-1, 2.80E-2,-1.54E-1,-3.00E-1,-3.59E-1,-3.76E-1,-4.60E-1,-3.40E-1,-3.08E-1, + + 1.38E-1, 4.84E-2,-5.56E-2,-1.44E-1,-2.04E-1,-2.39E-1,-2.54E-1,-2.49E-1,-2.48E-1, + + 9.47E-2, 4.86E-2,-1.08E-2,-6.44E-2,-1.02E-1,-1.34E-1,-1.62E-1,-1.79E-1,-1.87E-1, + + 5.33E-2, 3.71E-2, 1.85E-2, 1.63E-3,-1.69E-2,-3.69E-2,-5.66E-2,-7.78E-2,-9.33E-2, + + 3.38E-2, 2.40E-2, 1.62E-2, 9.90E-3, 3.76E-3,-4.93E-3,-1.66E-2,-3.05E-2,-4.22E-2, + + 2.12E-2, 1.56E-2, 1.05E-2, 7.80E-3, 7.92E-3, 6.30E-3, 3.20E-4,-8.50E-3,-1.66E-2, + + 1.40E-2, 9.20E-3, 5.30E-3, 4.70E-3, 6.31E-3, 8.40E-3, 5.30E-3, 8.80E-4,-3.30E-3, + + 9.20E-3, 4.70E-3, 1.70E-3, 2.60E-3, 4.49E-3, 6.60E-3, 6.00E-3, 4.70E-3, 2.80E-3, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + real f2_B(9,nRowB) + + / 2.75E+0, 1.94E+0, 9.13E-1, 6.06E-1, 4.26E-1, 3.14E-1, 2.40E-1, 1.51E-1, 1.03E-1, + + 1.94E+0, 1.16E+0, 7.56E-1, 5.26E-1, 3.81E-1, 2.87E-1, 2.23E-1, 1.43E-1, 9.78E-2, + + 5.85E-1, 5.04E-1, 4.10E-1, 3.30E-1, 2.69E-1, 2.17E-1, 1.78E-1, 1.22E-1, 8.71E-2, + + 7.83E-2, 2.00E-1, 2.35E-1, 2.19E-1, 1.97E-1, 1.73E-1, 1.48E-1, 1.08E-1, 7.93E-2, + + -1.82E-1, 1.56E-2, 1.04E-1, 1.36E-1, 1.38E-1, 1.31E-1, 1.19E-1, 9.46E-2, 7.19E-2, + + -2.71E-1,-1.66E-1,-7.29E-2,-4.74E-3, 3.60E-2, 5.50E-2, 6.28E-2, 5.98E-2, 5.09E-2, + + -1.87E-1,-1.58E-1,-1.09E-1,-5.80E-2,-2.03E-2, 2.48E-3, 1.99E-2, 3.36E-2, 3.27E-2, + + -1.01E-1,-1.05E-1,-8.95E-2,-6.63E-2,-3.93E-2,-2.38E-2,-9.22E-3, 8.47E-3, 1.52E-2, + + -5.19E-2,-6.47E-2,-6.51E-2,-5.62E-2,-4.51E-2,-3.49E-2,-2.45E-2,-8.19E-3, 2.05E-3, + + -3.68E-2,-4.89E-2,-5.36E-2,-5.06E-2,-4.27E-2,-3.65E-2,-2.80E-2,-1.33E-2,-3.47E-3, + + -2.33E-2,-3.69E-2,-4.41E-2,-4.38E-2,-3.97E-2,-3.50E-2,-2.88E-2,-1.60E-2,-6.68E-3, + + -8.76E-3,-2.07E-2,-2.90E-2,-3.17E-2,-3.09E-2,-2.92E-2,-2.63E-2,-1.79E-2,-1.03E-2, + + -1.20E-3,-1.11E-2,-1.90E-2,-2.20E-2,-2.32E-2,-2.24E-2,-2.10E-2,-1.66E-2,-1.11E-2, + + 1.72E-3,-4.82E-3,-1.02E-2,-1.42E-2,-1.65E-2,-1.66E-2,-1.60E-2,-1.39E-2,-1.09E-2, + + 2.68E-3,-1.18E-3,-5.19E-3,-8.30E-5,-1.01E-2,-1.14E-2,-1.16E-2,-1.16E-2,-9.99E-3, + + 2.81E-3, 8.21E-4,-1.96E-3,-3.99E-3,-5.89E-3,-7.13E-3,-8.15E-3,-9.05E-3,-8.60E-3, + + 2.61E-3, 1.35E-3,-2.99E-4,-1.79E-3,-3.12E-3,-4.44E-3,-5.61E-3,-7.01E-3,-7.27E-3, + + 2.06E-3, 1.45E-3, 4.64E-4,-5.97E-4,-1.71E-3,-2.79E-3,-3.84E-3,-5.29E-3,-5.90E-3, + + 1.07E-3, 9.39E-4, 8.22E-4, 3.58E-4,-1.15E-4,-6.60E-4,-1.18E-3,-2.15E-3,-2.88E-3, + + 4.97E-4, 5.46E-4, 6.15E-4, 5.56E-4, 3.14E-4, 9.80E-5,-1.30E-4,-5.98E-4,-1.07E-4, + + 1.85E-4, 3.11E-4, 4.25E-4, 4.08E-4, 3.63E-4, 3.04E-4, 2.24E-4, 2.80E-5,-2.10E-4, + + 4.80E-5, 1.48E-4, 2.44E-4, 2.80E-4, 3.01E-4, 3.11E-4, 3.13E-4, 2.40E-4, 1.10E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 1.39E-4, 1.80E-4, 1.80E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 4.38E-5, 7.30E-5, 8.40E-5/ + + real f2_C(7,nRowC) + + / 7.36E-2, 4.21E-2, 2.69E-2, 1.83E-2, 1.34E-2, 1.01E-2, 7.88E-3, + + 5.79E-2, 3.61E-2, 2.34E-2, 1.64E-2, 1.21E-2, 9.26E-3, 7.28E-3, + + 2.94E-2, 2.17E-2, 1.60E-2, 1.23E-2, 9.49E-3, 7.45E-3, 5.95E-3, + + 2.30E-3, 7.07E-3, 7.76E-3, 7.02E-3, 6.13E-3, 5.17E-3, 4.34E-3, + + -7.50E-3,-2.00E-3, 9.93E-4, 2.36E-3, 2.82E-3, 2.86E-3, 2.72E-3, + + -8.27E-3,-5.37E-3,-2.58E-3,-7.96E-4, 3.75E-4, 9.71E-4, 1.28E-3, + + -5.79E-3,-5.12E-3,-3.86E-3,-2.46E-3,-1.20E-3,-3.74E-4, 1.74E-4, + + -3.26E-3,-3.43E-3,-3.26E-3,-2.68E-3,-1.84E-3,-1.12E-3,-4.54E-4, + + -1.46E-3,-1.49E-3,-2.20E-3,-2.18E-3,-1.85E-3,-1.40E-3,-8.15E-4, + + -4.29E-4,-9.44E-4,-1.29E-3,-1.50E-3,-1.51E-3,-1.36E-3,-9.57E-4, + + -3.30E-5,-3.66E-4,-6.78E-4,-9.38E-4,-1.09E-3,-1.09E-3,-9.56E-4, + + 1.50E-4, 3.10E-5,-1.38E-4,-3.06E-4,-4.67E-4,-5.48E-4,-6.08E-4, + + 1.00E-4, 8.50E-5, 2.30E-5,-6.60E-5,-1.58E-4,-2.40E-4,-3.05E-4, + + 5.40E-5, 6.50E-5, 4.90E-5, 1.20E-5,-3.60E-5,-8.90E-5,-1.31E-4, + + 2.90E-5, 4.30E-5, 4.40E-5, 2.90E-5, 5.10E-6,-2.20E-5,-4.80E-5, + + 1.40E-5, 2.40E-5, 2.80E-5, 2.60E-5, 1.90E-5, 7.50E-6,-1.10E-5, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + +c=============================================================================== + +c Bestimme, welche Reihen der Tabellen fuer Interpolation benoetigt werden: + + if (tau.LT.tau_(1)) then + write(*,*) 'tau is less than the lowest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'minimum = ',tau_(1) + call exit + elseif (tau.GT.tau_(nColumn)) then + write(*,*) 'tau is greater than the highest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'maximum = ',tau_(nColumn) + call exit + endif + + column_ = 2 + do while (tau.GT.tau_(column_)) + column_ = column_ + 1 + enddo + ! Das Gewicht der Reihe zu groesserem Tau: + weightCol = (tau-tau_(column_-1)) / (tau_(column_)-tau_(column_-1)) + + +c Besorge fuer gegebenes 'thetaSchlange' die interpolierten f1- und f2 -Werte +c der beiden relevanten Reihen: +c iColumn = 1 => Reihe mit hoeherem Index +c iColumn = 2 => Reihe mit kleinerem Index + + + iColumn = 1 + + + 5 continue + + if (column_.LE.9) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 1. Tabelle: 0.2 <= tau <= 1.8 + + column = column_ + + if (thetaSchlange.LT.thetaSchlangeA(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeA(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeA(nRowA)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeA(nRowA) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeA(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeA(row-1)) / + + (thetaSchlangeA(row)-thetaSchlangeA(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_A(column,row-1) + + + weightRow * f1_A(column,row) + f2_(iColumn) = (1.-weightRow) * f2_A(column,row-1) + + + weightRow * f2_A(column,row) + + + elseif (column_.LE.18) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 2. Tabelle: 2.0 <= tau <= 7.0 + + column = column_ - 9 + + if (thetaSchlange.LT.thetaSchlangeB(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeB(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeB(nRowB)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeB(nRowB) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeB(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeB(row-1)) / + + (thetaSchlangeB(row)-thetaSchlangeB(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_B(column,row-1) + + + weightRow * f1_B(column,row) + f2_(iColumn) = (1.-weightRow) * f2_B(column,row-1) + + + weightRow * f2_B(column,row) + + + else ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 3. Tabelle: 8.0 <= tau <= 20. + + column = column_ - 18 + + if (thetaSchlange.LT.thetaSchlangeC(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeC(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeC(nRowC)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeC(nRowC) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeC(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeC(row-1)) / + + (thetaSchlangeC(row)-thetaSchlangeC(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_C(column,row-1) + + + weightRow * f1_C(column,row) + f2_(iColumn) = (1.-weightRow) * f2_C(column,row-1) + + + weightRow * f2_C(column,row) + + + endif ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + if (iColumn.EQ.1) then + column_ = column_ - 1 + iColumn = 2 + goto 5 + endif + + f1 = weightCol*f1_(1) + (1.-weightCol)*f1_(2) + f2 = weightCol*f2_(1) + (1.-weightCol)*f2_(2) + + + END + + +c=============================================================================== + END PROGRAM mtest diff --git a/geant4/LEMuSR/MEYER/mtest.for~ b/geant4/LEMuSR/MEYER/mtest.for~ new file mode 100644 index 0000000..3c070a0 --- /dev/null +++ b/geant4/LEMuSR/MEYER/mtest.for~ @@ -0,0 +1,691 @@ + SUBROUTINE G_Functions(G1,G2,tau) +c ================================= + +c Diese Routine gibt in Abhaengigkeit von der reduzierten Dicke 'tau' +c Funktionswerte fuer g1 und g2 zurueck. g1 und g2 sind dabei die von +c Meyer angegebenen tabellierten Funktionen fuer die Berechnung von Halbwerts- +c breiten von Streuwinkelverteilungen. (L.Meyer, phys.stat.sol. (b) 44, 253 +c (1971)) + + IMPLICIT NONE + + real tau,g1,g2 + real tau_(26),g1_(26),g2_(26) + real help + + integer i + + DATA tau_ /0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, + + 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 9.0, + + 10.0, 12.0, 14.0, 16.0, 18.0, 20.0 / + + DATA g1_ /0.050,0.115,0.183,0.245,0.305,0.363,0.419,0.473,0.525,0.575, + + 0.689,0.799,0.905,1.010,1.100,1.190,1.370,1.540,1.700,1.850, + + 1.990,2.270,2.540,2.800,3.050,3.290 / + DATA g2_ / 0.00,1.25,0.91,0.79,0.73,0.69,0.65,0.63,0.61,0.59, + + 0.56,0.53,0.50,0.47,0.45,0.43,0.40,0.37,0.34,0.32, + + 0.30,0.26,0.22,0.18,0.15,0.13 / + + if (tau.LT.tau_(1)) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist kleiner als kleinster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(1) = ',tau_(1) + write(*,*) + STOP + endif + + i = 1 + +10 i = i + 1 + if (i.EQ.27) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist groesser als groesster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(26) = ',tau_(26) + write(*,*) + STOP + elseif (tau.gt.tau_(i)) then + goto 10 + endif + + +c lineare Interpolation zwischen Tabellenwerten: + + help = (tau-tau_(i-1))/(tau_(i)-tau_(i-1)) + + g1 = g1_(i-1) + help*(g1_(i)-g1_(i-1)) + g2 = g2_(i-1) + help*(g2_(i)-g2_(i-1)) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine Get_F_Function_Meyer(tau,Ekin) +c ========================================= + + implicit none + + real tau + real Ekin + + real thetaSchlange,thetaSchlangeMax + real theta,thetaMax,thetaStep + real f1,f2,F + + +c------------------------------------ +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target +c real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + + real Pi ! die Kreiszahl + +c parameter (a0 = 5.29E-9) + parameter (Z1 = 1, Z2 = 6, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10) + parameter (Pi = 3.141592654) + + real Meyer_Faktor3 + real Meyer_Faktor4 + real zzz ! 'Hilfsparameter' + real Meyer_Faktor5 + + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + parameter (Meyer_faktor4 = screeningPar / (2.*Z1*Z2*eSquare) * Pi/180.) + parameter (zzz = screeningPar / (2.*Z1*Z2*eSquare)) + parameter (Meyer_faktor5 = zzz*zzz / (8*Pi*Pi)) + +c------------------------------------ + + integer nBin,nBinMax + parameter (nBinMax=201) + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + integer i + real rhelp + + integer HB_memsize + parameter(HB_memsize=500000) + real memory(HB_memsize) + COMMON /PAWC/ memory + + +c nur noch fuer Testzwecke: + + real fValues(203) + real fValuesFolded(203) + + integer idh + parameter (idh = 50) + + INCLUDE 'mutrack$sourcedirectory:COM_DIRS.INC' + character filename*20 ! Name der Ausgabe-Dateien + COMMON /filename/ filename + +c------------------------------------------------------------------------------- + +c Festlegen des maximalen Theta-Wertes sowie der Schrittweite: + + if (tau.LT.0.2) then + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist kleiner als 0.2 => kann ich nicht ... => STOP' + call exit + elseif (tau.LE.2.) then + ! => Tabelle A + thetaSchlangeMax = 4.0 + elseif (tau.LE.8.) then + ! => Tabelle B + thetaSchlangeMax = 7.0 + elseif (tau.LE.20.) then + ! => Tabelle C + thetaSchlangeMax = 20.0 + else + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist groesser als 20 => kann ich nicht ... => STOP' + call exit + endif + + thetaMax = thetaSchlangeMax / Meyer_Faktor4 / Ekin + if (thetaMax.GT.50) then + thetaStep = .5 + elseif (thetaMax.GT.25) then + thetaStep = .25 + elseif (thetaMax.GT.12.5) then + thetaStep = .125 + else + thetaStep = .0625 + endif + + +c Tabelle der F-Werte erstellen: + + nBin = 0 + do theta = thetaStep, thetaMax, thetaStep + + ! Berechne aus theta das 'reduzierte' thetaSchlange (dabei gleich + ! noch von degree bei theta in Radiant bei thetaSchlange umrechnen): + + thetaSchlange = Meyer_faktor4 * Ekin * theta + + ! Auslesen der Tabellenwerte fuer die f-Funktionen: + + call F_Functions_Meyer(tau,thetaSchlange,f1,f2) + if (thetaSchlange.EQ.-1) then + ! wir sind jenseits von thetaSchlangeMax + goto 10 + endif + + ! Berechnen der Streuintensitaet: + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + + nBin = nBin + 1 + if (nBin.GT.nBinMax) then + write(*,*) 'nBin > nBinMax => EXIT' + call exit + endif + value(nBin) = sind(theta)*F + + fValues(nBin+1) = F ! fuer Testzwecke + fValuesFolded(nBin+1) = sind(theta)*F ! fuer Testzwecke + + enddo + + +c Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + +10 do i = 1, nBin + area(i) = (value(i)+value(i-1))/2. * thetaStep + integ(i) = integ(i-1) + area(i) + enddo + + +c Normiere totale Flaeche auf 1: + + rHelp = integ(nBin) + do i = 1, nBin + value(i) = value(i) / rHelp + area(i) = area(i) / rHelp + integ(i) = integ(i) / rHelp + enddo + + +c vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + ! Berechne die Werte fuer theta=0: + + call F_Functions_Meyer(tau,0.,f1,f2) + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + fValues(1) = F + fValuesFolded(1) = 0. + + ! Gib die Werte in das Tabellenfile aus: + +c theta = 0. +c open (10,file=outDir//':'//filename//'.TAB',status='NEW') +c do i = 1, nBin+1 +c write(10,*) theta, fValues(i), fValuesFolded(i) +c theta = theta + thetaStep +c enddo +c close (10) + + + ! Buchen und Fuellen der Histogramme: + + call HBOOK1(idh,'F',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh,fValues) + call HRPUT(idh,outDir//':'//filename//'.RZ','N') + call HDELET(idh) + + call HBOOK1(idh+1,'F*sin([q])',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh+1,fValuesFolded) + call HRPUT(idh+1,outDir//':'//filename//'.RZ','U') + call HDELET(idh+1) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine throwMeyerAngle (theta) +c ================================== + + implicit none + + real lowerbound,y1,y2,f,root,radiant,fraction + integer bin,nBin + integer nBinMax + parameter (nBinMax=201) + + real theta,thetaStep + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + real rhelp + + real random + integer seed + common /seed/ seed + + +c bin: Nummer des Bins, innerhalb dessen das Integral den Wert von +c random erreicht oder ueberschreitet: + + random = ran(seed) + + bin = 1 + do while (random.GT.integ(bin)) + bin = bin + 1 + if (bin.GT.nBin) then + write(*,*) 'error 1' + call exit + endif + enddo + + fraction = (random-integ(bin-1)) / (integ(bin)-integ(bin-1)) + y1 = value(bin-1) + y2 = value(bin) + f = thetaStep / (y2-y1) + rHelp = y1*f + + radiant = rHelp*rHelp + fraction*thetaStep*(y1+y2)*f + root = SQRT(radiant) + lowerBound = real(bin-1)*thetaStep + if (f.GT.0) then + theta = lowerBound - rHelp + root + else + theta = lowerBound - rHelp - root + endif + + + END + + +c=============================================================================== + + options /extend_source + + subroutine F_Functions_Meyer(tau,thetaSchlange,f1,f2) +c ===================================================== + + implicit none + +c Diese Routine gibt in Abhaengigkeit von 'thetaSchlange' und 'tau' +c Funktionswerte fuer f1 und f2 zurueck. f1 und f2 entsprechen dabei den +c bei Meyer angegebenen Funktion gleichen Namens. Die in dieser Routine +c verwendeten Tabellen sind eben dieser Referenz entnommen: +c L.Meyer, phys.stat.sol. (b) 44, 253 (1971) + + real tau,thetaSchlange + real f1, f2, f1_(2), f2_(2) + + integer column_,column,row + + integer iColumn + real weightCol, weightRow + +c------------------------------------------------------------------------------- + +c die Tabellendaten der Referenz (Tabellen 2 und 3): + + integer nColumn + parameter (nColumn = 25) + real tau_(nColumn) / + + 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, + + 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10., 12., 14., 16., 18., 20. / + + integer nRowA + parameter (nRowA = 25) + real thetaSchlangeA(nRowA) / + + .00, .05, .10, .15, .20, .25, .30, .35, .40, .45, .50, .60, + + .70, .80, .90, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, 3.5, 4.0 / + + integer nRowB + parameter (nRowB = 24) + real thetaSchlangeB(nRowB) / + + 0.0, 0.2, 0.4, 0.5, 0.6, 0.8, 1.0, 1.2, 1.4, 1.5, 1.6, 1.8, + + 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0 / + + integer nRowC + parameter (nRowC = 24) + real thetaSchlangeC(nRowC) / + + 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, + + 7.0, 8.0, 9.0, 10., 11., 12., 13., 14., 15., 16., 18., 20. / + + + real f1_A(9,nRowA) + + /1.69E+2,4.55E+1,2.11E+1,1.25E+1,8.48E+0,6.21E+0,4.80E+0,3.86E+0,3.20E+0, + + 9.82E+1,3.72E+1,1.97E+1,1.20E+1,8.27E+0,6.11E+0,4.74E+0,3.83E+0,3.17E+0, + + 3.96E+1,2.58E+1,1.65E+1,1.09E+1,7.73E+0,5.82E+0,4.58E+0,3.72E+0,3.10E+0, + + 1.76E+1,1.58E+1,1.27E+1,9.26E+0,6.93E+0,5.38E+0,4.31E+0,3.55E+0,2.99E+0, + + 8.62E+0,1.01E+1,9.45E+0,7.58E+0,6.02E+0,4.85E+0,3.98E+0,3.33E+0,2.84E+0, + + 4.65E+0,6.55E+0,6.91E+0,6.06E+0,5.11E+0,4.28E+0,3.62E+0,3.08E+0,2.66E+0, + + 2.74E+0,4.45E+0,5.03E+0,4.78E+0,4.27E+0,3.72E+0,3.23E+0,2.82E+0,2.47E+0, + + 1.77E+0,3.02E+0,3.71E+0,3.76E+0,3.53E+0,3.20E+0,2.86E+0,2.55E+0,2.27E+0, + + 1.22E+0,2.19E+0,2.78E+0,2.96E+0,2.91E+0,2.73E+0,2.51E+0,2.28E+0,2.07E+0, + + 8.82E-1,1.59E+0,2.12E+0,2.35E+0,2.39E+0,2.32E+0,2.19E+0,2.03E+0,1.87E+0, + + 6.55E-1,1.20E+0,1.64E+0,1.88E+0,1.97E+0,1.96E+0,1.90E+0,1.79E+0,1.68E+0, + + 3.80E-1,7.15E-1,1.01E+0,1.22E+0,1.35E+0,1.40E+0,1.41E+0,1.39E+0,1.34E+0, + + 2.26E-1,4.45E-1,6.44E-1,8.08E-1,9.28E-1,1.01E+0,1.05E+0,1.06E+0,1.05E+0, + + 1.39E-1,2.80E-1,4.21E-1,5.45E-1,6.46E-1,7.22E-1,7.75E-1,8.07E-1,8.21E-1, + + 8.22E-2,1.76E-1,2.78E-1,3.71E-1,4.53E-1,5.21E-1,5.74E-1,6.12E-1,6.37E-1, + + 5.04E-2,1.11E-1,1.86E-1,2.57E-1,3.22E-1,3.79E-1,4.27E-1,4.65E-1,4.94E-1, + + 2.51E-2,5.60E-2,9.24E-2,1.31E-1,1.69E-1,2.02E-1,2.40E-1,2.71E-1,2.97E-1, + + 1.52E-2,3.20E-2,5.08E-2,7.23E-2,9.51E-2,1.18E-1,1.41E-1,1.63E-1,1.83E-1, + + 1.03E-2,2.05E-2,3.22E-2,4.55E-2,6.01E-2,7.53E-2,9.02E-2,1.05E-1,1.19E-1, + + 8.80E-3,1.48E-2,2.25E-2,3.13E-2,4.01E-2,5.03E-2,6.01E-2,7.01E-2,8.01E-2, + + 6.10E-3,1.15E-2,1.71E-2,2.28E-2,2.89E-2,3.52E-2,4.18E-2,4.86E-2,5.55E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,1.71E-2,1.98E-2,2.28E-2,2.58E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.90E-3,1.02E-2,1.16E-2,1.31E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,4.90E-3,5.70E-3,6.40E-3,7.20E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.90E-3,3.40E-3,3.90E-3,4.30E-3/ + + real f1_B(9,nRowB) + + /2.71E+0,1.92E+0,1.46E+0,1.16E+0,9.52E-1,8.03E-1,6.90E-1,5.32E-1,4.28E-1, + + 2.45E+0,1.79E+0,1.39E+0,1.12E+0,9.23E-1,7.82E-1,6.75E-1,5.23E-1,4.23E-1, + + 1.87E+0,1.48E+0,1.20E+0,9.96E-1,8.42E-1,7.24E-1,6.32E-1,4.98E-1,4.07E-1, + + 1.56E+0,1.30E+0,1.09E+0,9.19E-1,7.89E-1,6.86E-1,6.03E-1,4.80E-1,3.95E-1, + + 1.28E+0,1.11E+0,9.62E-1,8.33E-1,7.27E-1,6.40E-1,5.69E-1,4.59E-1,3.81E-1, + + 8.23E-1,7.90E-1,7.29E-1,6.64E-1,6.01E-1,5.44E-1,4.94E-1,4.12E-1,3.49E-1, + + 5.14E-1,5.36E-1,5.29E-1,5.07E-1,4.78E-1,4.47E-1,4.16E-1,3.60E-1,3.13E-1, + + 3.19E-1,3.58E-1,3.76E-1,3.78E-1,3.70E-1,3.57E-1,3.45E-1,3.08E-1,2.76E-1, + + 2.02E-1,2.40E-1,2.64E-1,2.77E-1,2.82E-1,2.80E-1,2.65E-1,2.59E-1,2.39E-1, + + 1.67E-1,1.96E-1,2.20E-1,2.36E-1,2.44E-1,2.47E-1,2.45E-1,2.35E-1,2.21E-1, + + 1.33E-1,1.61E-1,1.85E-1,2.02E-1,2.12E-1,2.18E-1,2.18E-1,2.14E-1,2.03E-1, + + 8.99E-2,1.12E-1,1.32E-1,1.48E-1,1.59E-1,1.67E-1,1.68E-1,1.75E-1,1.72E-1, + + 6.24E-2,7.94E-2,9.50E-2,1.09E-1,1.20E-1,1.29E-1,1.35E-1,1.42E-1,1.43E-1, + + 4.55E-2,5.74E-2,6.98E-2,8.11E-2,9.09E-2,9.92E-2,1.06E-1,1.15E-1,1.19E-1, + + 3.35E-2,4.22E-2,5.19E-2,6.11E-2,6.95E-2,7.69E-2,8.33E-2,9.28E-2,9.85E-2, + + 2.50E-2,3.16E-2,3.92E-2,4.66E-2,5.35E-2,6.00E-2,6.57E-2,7.49E-2,8.13E-2, + + 1.90E-2,2.40E-2,2.99E-2,3.58E-2,4.16E-2,4.70E-2,5.20E-2,6.05E-2,6.70E-2, + + 1.47E-2,1.86E-2,2.32E-2,2.79E-2,3.25E-2,3.70E-2,4.12E-2,4.89E-2,5.51E-2, + + 8.10E-3,1.04E-2,1.30E-2,1.57E-2,1.84E-2,2.12E-2,2.40E-2,2.93E-2,3.42E-2, + + 4.80E-3,6.20E-3,7.70E-3,9.30E-3,1.09E-2,1.26E-2,1.44E-2,1.79E-2,2.14E-2, + + 2.80E-3,3.80E-3,4.70E-3,5.70E-3,6.70E-3,7.50E-3,8.90E-3,1.13E-2,1.36E-2, + + 1.70E-3,2.30E-3,2.90E-3,3.60E-3,4.20E-3,4.90E-3,5.60E-3,7.20E-3,8.80E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.00E-3,2.80E-3,3.50E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.80E-4,1.20E-3,1.60E-3/ + + real f1_C(7,nRowC) + + /3.65E-1,2.62E-1,2.05E-1,1.67E-1,1.41E-1,1.21E-1,1.05E-1, + + 3.33E-1,2.50E-1,1.95E-1,1.61E-1,1.36E-1,1.18E-1,1.03E-1, + + 2.75E-1,2.18E-1,1.76E-1,1.48E-1,1.27E-1,1.11E-1,9.80E-2, + + 2.04E-1,1.75E-1,1.50E-1,1.29E-1,1.13E-1,1.01E-1,9.00E-2, + + 1.41E-1,1.31E-1,1.19E-1,1.08E-1,9.71E-2,8.88E-2,8.01E-2, + + 9.32E-2,9.42E-2,9.10E-2,8.75E-2,8.00E-2,7.44E-2,6.91E-2, + + 5.98E-2,6.52E-2,6.72E-2,6.62E-2,6.40E-2,6.12E-2,5.82E-2, + + 3.83E-2,4.45E-2,4.80E-2,4.96E-2,4.98E-2,4.90E-2,4.77E-2, + + 2.46E-2,3.01E-2,3.40E-2,3.65E-2,3.79E-2,3.84E-2,3.83E-2, + + 1.59E-2,2.03E-2,2.39E-2,2.66E-2,2.85E-2,2.97E-2,3.04E-2, + + 1.04E-2,1.37E-2,1.66E-2,1.92E-2,2.12E-2,2.27E-2,2.37E-2, + + 4.39E-3,6.26E-3,8.26E-3,9.96E-3,1.15E-2,1.29E-2,1.41E-2, + + 2.06E-3,3.02E-3,4.24E-3,5.28E-3,6.32E-3,7.32E-3,8.26E-3, + + 1.21E-3,1.69E-3,2.24E-3,2.85E-3,3.50E-3,4.16E-3,4.82E-3, + + 8.50E-4,1.10E-3,1.38E-3,1.65E-3,2.03E-3,2.45E-3,2.88E-3, + + 5.90E-4,7.40E-4,8.50E-4,9.90E-4,1.23E-3,1.49E-3,1.71E-3, + + 3.90E-4,4.60E-4,5.20E-4,6.30E-4,7.65E-4,9.65E-4,1.12E-3, + + 2.40E-4,2.70E-4,3.10E-4,3.98E-4,4.97E-4,6.03E-4,7.18E-4, + + 1.50E-4,1.70E-4,2.15E-4,2.70E-4,3.35E-4,4.35E-4,5.00E-4, + + 1.00E-4,1.20E-4,1.46E-4,1.90E-4,2.40E-4,2.88E-4,3.43E-4, + + 0.00 ,0.00 ,1.04E-4,1.41E-4,1.80E-4,2.10E-4,2.50E-4, + + 0.00 ,0.00 ,8.20E-5,1.06E-4,1.38E-4,1.58E-4,1.85E-4, + + 0.00 ,0.00 ,5.40E-5,7.00E-5,8.60E-5,1.03E-4,1.20E-4, + + 0.00 ,0.00 ,4.20E-5,5.40E-5,6.50E-5,7.70E-5,8.80E-5/ + + real f2_A(9,nRowA) + + / 3.52E+3, 3.27E+2, 9.08E+1, 3.85E+1, 2.00E+1, 1.18E+1, 7.55E+0, 5.16E+0, 3.71E+0, + + 2.58E+2, 1.63E+2, 7.30E+1, 3.42E+1, 1.85E+1, 1.11E+1, 7.18E+0, 4.96E+0, 3.59E+0, + + -1.12E+2, 4.84E+0, 3.56E+1, 2.34E+1, 1.45E+1, 9.33E+0, 6.37E+0, 4.51E+0, 3.32E+0, + + -5.60E+1,-1.12E+1, 9.87E+0, 1.24E+1, 9.59E+0, 7.01E+0, 5.16E+0, 3.83E+0, 2.91E+0, + + -2.13E+1,-1.22E+1,-2.23E+0, 3.88E+0, 5.15E+0, 4.65E+0, 3.87E+0, 3.12E+0, 2.45E+0, + + -8.25E+0,-9.58E+0,-5.59E+0,-1.40E+0, 1.76E+0, 2.71E+0, 2.71E+0, 2.35E+0, 1.95E+0, + + -3.22E+0,-6.12E+0,-5.28E+0,-2.87E+0,-1.92E-1, 1.32E+0, 1.69E+0, 1.74E+0, 1.48E+0, + + -1.11E+0,-3.40E+0,-4.12E+0,-3.08E+0,-6.30E-1, 3.60E-1, 9.20E-1, 1.03E+0, 1.04E+0, + + -2.27E-1,-2.00E+0,-2.93E+0,-2.69E+0,-1.48E+0,-3.14E-1, 2.69E-1, 5.28E-1, 6.09E-1, + + 1.54E-1,-1.09E+0,-2.10E+0,-2.15E+0,-1.47E+0,-6.77E-1,-1.80E-1, 1.08E-1, 2.70E-1, + + 3.28E-1,-6.30E-1,-1.50E+0,-1.68E+0,-1.34E+0,-8.43E-1,-4.60E-1,-1.85E-1,-4.67E-3, + + 3.32E-1,-2.06E-1,-7.32E-1,-9.90E-1,-9.42E-1,-8.20E-1,-6.06E-1,-4.51E-1,-3.01E-1, + + 2.72E-1,-3.34E-2,-3.49E-1,-5.65E-1,-6.03E-1,-5.79E-1,-5.05E-1,-4.31E-1,-3.45E-1, + + 2.02E-1, 2.80E-2,-1.54E-1,-3.00E-1,-3.59E-1,-3.76E-1,-4.60E-1,-3.40E-1,-3.08E-1, + + 1.38E-1, 4.84E-2,-5.56E-2,-1.44E-1,-2.04E-1,-2.39E-1,-2.54E-1,-2.49E-1,-2.48E-1, + + 9.47E-2, 4.86E-2,-1.08E-2,-6.44E-2,-1.02E-1,-1.34E-1,-1.62E-1,-1.79E-1,-1.87E-1, + + 5.33E-2, 3.71E-2, 1.85E-2, 1.63E-3,-1.69E-2,-3.69E-2,-5.66E-2,-7.78E-2,-9.33E-2, + + 3.38E-2, 2.40E-2, 1.62E-2, 9.90E-3, 3.76E-3,-4.93E-3,-1.66E-2,-3.05E-2,-4.22E-2, + + 2.12E-2, 1.56E-2, 1.05E-2, 7.80E-3, 7.92E-3, 6.30E-3, 3.20E-4,-8.50E-3,-1.66E-2, + + 1.40E-2, 9.20E-3, 5.30E-3, 4.70E-3, 6.31E-3, 8.40E-3, 5.30E-3, 8.80E-4,-3.30E-3, + + 9.20E-3, 4.70E-3, 1.70E-3, 2.60E-3, 4.49E-3, 6.60E-3, 6.00E-3, 4.70E-3, 2.80E-3, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + real f2_B(9,nRowB) + + / 2.75E+0, 1.94E+0, 9.13E-1, 6.06E-1, 4.26E-1, 3.14E-1, 2.40E-1, 1.51E-1, 1.03E-1, + + 1.94E+0, 1.16E+0, 7.56E-1, 5.26E-1, 3.81E-1, 2.87E-1, 2.23E-1, 1.43E-1, 9.78E-2, + + 5.85E-1, 5.04E-1, 4.10E-1, 3.30E-1, 2.69E-1, 2.17E-1, 1.78E-1, 1.22E-1, 8.71E-2, + + 7.83E-2, 2.00E-1, 2.35E-1, 2.19E-1, 1.97E-1, 1.73E-1, 1.48E-1, 1.08E-1, 7.93E-2, + + -1.82E-1, 1.56E-2, 1.04E-1, 1.36E-1, 1.38E-1, 1.31E-1, 1.19E-1, 9.46E-2, 7.19E-2, + + -2.71E-1,-1.66E-1,-7.29E-2,-4.74E-3, 3.60E-2, 5.50E-2, 6.28E-2, 5.98E-2, 5.09E-2, + + -1.87E-1,-1.58E-1,-1.09E-1,-5.80E-2,-2.03E-2, 2.48E-3, 1.99E-2, 3.36E-2, 3.27E-2, + + -1.01E-1,-1.05E-1,-8.95E-2,-6.63E-2,-3.93E-2,-2.38E-2,-9.22E-3, 8.47E-3, 1.52E-2, + + -5.19E-2,-6.47E-2,-6.51E-2,-5.62E-2,-4.51E-2,-3.49E-2,-2.45E-2,-8.19E-3, 2.05E-3, + + -3.68E-2,-4.89E-2,-5.36E-2,-5.06E-2,-4.27E-2,-3.65E-2,-2.80E-2,-1.33E-2,-3.47E-3, + + -2.33E-2,-3.69E-2,-4.41E-2,-4.38E-2,-3.97E-2,-3.50E-2,-2.88E-2,-1.60E-2,-6.68E-3, + + -8.76E-3,-2.07E-2,-2.90E-2,-3.17E-2,-3.09E-2,-2.92E-2,-2.63E-2,-1.79E-2,-1.03E-2, + + -1.20E-3,-1.11E-2,-1.90E-2,-2.20E-2,-2.32E-2,-2.24E-2,-2.10E-2,-1.66E-2,-1.11E-2, + + 1.72E-3,-4.82E-3,-1.02E-2,-1.42E-2,-1.65E-2,-1.66E-2,-1.60E-2,-1.39E-2,-1.09E-2, + + 2.68E-3,-1.18E-3,-5.19E-3,-8.30E-5,-1.01E-2,-1.14E-2,-1.16E-2,-1.16E-2,-9.99E-3, + + 2.81E-3, 8.21E-4,-1.96E-3,-3.99E-3,-5.89E-3,-7.13E-3,-8.15E-3,-9.05E-3,-8.60E-3, + + 2.61E-3, 1.35E-3,-2.99E-4,-1.79E-3,-3.12E-3,-4.44E-3,-5.61E-3,-7.01E-3,-7.27E-3, + + 2.06E-3, 1.45E-3, 4.64E-4,-5.97E-4,-1.71E-3,-2.79E-3,-3.84E-3,-5.29E-3,-5.90E-3, + + 1.07E-3, 9.39E-4, 8.22E-4, 3.58E-4,-1.15E-4,-6.60E-4,-1.18E-3,-2.15E-3,-2.88E-3, + + 4.97E-4, 5.46E-4, 6.15E-4, 5.56E-4, 3.14E-4, 9.80E-5,-1.30E-4,-5.98E-4,-1.07E-4, + + 1.85E-4, 3.11E-4, 4.25E-4, 4.08E-4, 3.63E-4, 3.04E-4, 2.24E-4, 2.80E-5,-2.10E-4, + + 4.80E-5, 1.48E-4, 2.44E-4, 2.80E-4, 3.01E-4, 3.11E-4, 3.13E-4, 2.40E-4, 1.10E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 1.39E-4, 1.80E-4, 1.80E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 4.38E-5, 7.30E-5, 8.40E-5/ + + real f2_C(7,nRowC) + + / 7.36E-2, 4.21E-2, 2.69E-2, 1.83E-2, 1.34E-2, 1.01E-2, 7.88E-3, + + 5.79E-2, 3.61E-2, 2.34E-2, 1.64E-2, 1.21E-2, 9.26E-3, 7.28E-3, + + 2.94E-2, 2.17E-2, 1.60E-2, 1.23E-2, 9.49E-3, 7.45E-3, 5.95E-3, + + 2.30E-3, 7.07E-3, 7.76E-3, 7.02E-3, 6.13E-3, 5.17E-3, 4.34E-3, + + -7.50E-3,-2.00E-3, 9.93E-4, 2.36E-3, 2.82E-3, 2.86E-3, 2.72E-3, + + -8.27E-3,-5.37E-3,-2.58E-3,-7.96E-4, 3.75E-4, 9.71E-4, 1.28E-3, + + -5.79E-3,-5.12E-3,-3.86E-3,-2.46E-3,-1.20E-3,-3.74E-4, 1.74E-4, + + -3.26E-3,-3.43E-3,-3.26E-3,-2.68E-3,-1.84E-3,-1.12E-3,-4.54E-4, + + -1.46E-3,-1.49E-3,-2.20E-3,-2.18E-3,-1.85E-3,-1.40E-3,-8.15E-4, + + -4.29E-4,-9.44E-4,-1.29E-3,-1.50E-3,-1.51E-3,-1.36E-3,-9.57E-4, + + -3.30E-5,-3.66E-4,-6.78E-4,-9.38E-4,-1.09E-3,-1.09E-3,-9.56E-4, + + 1.50E-4, 3.10E-5,-1.38E-4,-3.06E-4,-4.67E-4,-5.48E-4,-6.08E-4, + + 1.00E-4, 8.50E-5, 2.30E-5,-6.60E-5,-1.58E-4,-2.40E-4,-3.05E-4, + + 5.40E-5, 6.50E-5, 4.90E-5, 1.20E-5,-3.60E-5,-8.90E-5,-1.31E-4, + + 2.90E-5, 4.30E-5, 4.40E-5, 2.90E-5, 5.10E-6,-2.20E-5,-4.80E-5, + + 1.40E-5, 2.40E-5, 2.80E-5, 2.60E-5, 1.90E-5, 7.50E-6,-1.10E-5, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + +c=============================================================================== + +c Bestimme, welche Reihen der Tabellen fuer Interpolation benoetigt werden: + + if (tau.LT.tau_(1)) then + write(*,*) 'tau is less than the lowest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'minimum = ',tau_(1) + call exit + elseif (tau.GT.tau_(nColumn)) then + write(*,*) 'tau is greater than the highest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'maximum = ',tau_(nColumn) + call exit + endif + + column_ = 2 + do while (tau.GT.tau_(column_)) + column_ = column_ + 1 + enddo + ! Das Gewicht der Reihe zu groesserem Tau: + weightCol = (tau-tau_(column_-1)) / (tau_(column_)-tau_(column_-1)) + + +c Besorge fuer gegebenes 'thetaSchlange' die interpolierten f1- und f2 -Werte +c der beiden relevanten Reihen: +c iColumn = 1 => Reihe mit hoeherem Index +c iColumn = 2 => Reihe mit kleinerem Index + + + iColumn = 1 + + +5 continue + + if (column_.LE.9) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 1. Tabelle: 0.2 <= tau <= 1.8 + + column = column_ + + if (thetaSchlange.LT.thetaSchlangeA(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeA(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeA(nRowA)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeA(nRowA) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeA(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeA(row-1)) / + + (thetaSchlangeA(row)-thetaSchlangeA(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_A(column,row-1) + + + weightRow * f1_A(column,row) + f2_(iColumn) = (1.-weightRow) * f2_A(column,row-1) + + + weightRow * f2_A(column,row) + + + elseif (column_.LE.18) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 2. Tabelle: 2.0 <= tau <= 7.0 + + column = column_ - 9 + + if (thetaSchlange.LT.thetaSchlangeB(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeB(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeB(nRowB)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeB(nRowB) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeB(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeB(row-1)) / + + (thetaSchlangeB(row)-thetaSchlangeB(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_B(column,row-1) + + + weightRow * f1_B(column,row) + f2_(iColumn) = (1.-weightRow) * f2_B(column,row-1) + + + weightRow * f2_B(column,row) + + + else ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 3. Tabelle: 8.0 <= tau <= 20. + + column = column_ - 18 + + if (thetaSchlange.LT.thetaSchlangeC(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeC(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeC(nRowC)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeC(nRowC) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeC(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeC(row-1)) / + + (thetaSchlangeC(row)-thetaSchlangeC(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_C(column,row-1) + + + weightRow * f1_C(column,row) + f2_(iColumn) = (1.-weightRow) * f2_C(column,row-1) + + + weightRow * f2_C(column,row) + + + endif ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + if (iColumn.EQ.1) then + column_ = column_ - 1 + iColumn = 2 + goto 5 + endif + + f1 = weightCol*f1_(1) + (1.-weightCol)*f1_(2) + f2 = weightCol*f2_(1) + (1.-weightCol)*f2_(2) + + + END + + +c=============================================================================== + diff --git a/geant4/LEMuSR/MEYER/mutrack.for b/geant4/LEMuSR/MEYER/mutrack.for new file mode 100644 index 0000000..5e8635e --- /dev/null +++ b/geant4/LEMuSR/MEYER/mutrack.for @@ -0,0 +1,5466 @@ +c +c------------------------------------------------------------------------------ +c +c Changes starting on 17-Oct-2000, TP, PSI +c +c - add position of muons at TD foil and position of +c foil electrons when hitting MCP3 to NTuple +c - start changes for migration to NT and Unix; avoid using +c logicals or environment variables; cancel OPTIONS/EXTEND_SOURCE; +c use lower case filenames always +c +c****************************************************************************** +c* ... MUTRACK.FOR (Stand: Februar '96) * +c* * +c* Dieses Programm integriert Teilchenbahnen in der UHV-Kammer der NEMU- * +c* Apparatur. Startpunkte koennen zwischen der Moderatorfolie und dem MCP2 * +c* frei gewaehlt werden, Endpunkt der Berechnungen ist (sofern die Teilchen * +c* nicht vorher schon ausscheiden) die Ebene des MCP2. Bis jetzt koennen * +c* also nur Bewegungen in Strahlrichtung, nicht entgegen derselben berechnet * +c* werden. * +c* Das Programm selbst rechnet den zweistufigen Beschleuniger als ideal, * +c* bietet aber die Moeglichkeit Simulationen von TP oder AH (Programm 'Accel')* +c* mit realem Beschleuniger einzulesen. Die Integration der Teilchenbahnen * +c* erstreckt sich bei diesen Simulationen bis etwa zum He-Schild, MUTRACK * +c* rechnet dann von dort aus weiter. * +c* Verschiedene Einstellungen koennen in ineinandergreifenden Schleifen in * +c* aequidistanten Schritten variiert werden (z.B. Spannungen des Transport- * +c* Systems, Startgroessen der Teilchen, Masse und Ladung ...). Ein Teil dieser* +c* Groessen kann aber auch alternativ nach verschiedenen frei waehlbaren * +c* Zufallsverteilungen gewurfelt werden. * +c* Die Integrationsergebnisse koennen in der Form von NTupeln abgespeichert * +c* werden, was sie der Darstellung und Auswertung mit dem CERN-Programm PAW * +c* zugaenglich macht. * +c* Neben der reinen Integrationsarbeit fuehrt Mutrack Statistiken ueber * +c* verschiedene Groessen (z.Z. verschiedene Flugzeiten und Ortsverteilungen) * +c* die Mittelwerte und Standandartabweichungen sowie Minimal- und Maximalwerte* +c* umfassen. * +c* Diese Groessen koennen einfach ausgegeben oder in einem Tabellenfile abge- * +c* speichert werden, welches von PHYSICA mittels der Fortran-Routine * +c* 'READ_DATA' eingelesen werden kann. Verschiedene PHYSICA-Makros * +c* (.PCM-files) ermoeglichen dann die Darstellung dieser statistischen * +c* Groessen in Form von 2D- und 3D-Graphiken. (z.B. Abhaengigkeit der Trans- * +c* mission von HV-Settings des Transportsystems). * +c* Die momentan vorhandenen Routinen heissen * +c* * +c* MUINIT.PCM * +c* HELP.PCM * +c* MUPLOT_1DIM.PCM * +c* MUPLOT_2DIM.PCM * +c* TYPE_LOGHEADER.PCM * +c* TYPE_PARAMS_GRAPHIC.PCM * +c* TYPE_PARAMS_TEXT.PCM * +c* * +c* Nach dem Start (von dem Directory aus, in dem obige Routinen abgelegt sind)* +c* muss PHYSICA mit dem Befehl '@MUINIT' initialisiert werden. Danach koennen * +c* obige Routinen ueber Aliasse angesprochen werden. Weitere Informationen * +c* hierzu erhaelt man, indem man in PHYSICA nach der Initialisierung 'MUHELP' * +c* eingibt. * +c* Der Sourcecode fuer Mutrack ist ueber verschiedene .FOR-Dateien verteilt, * +c* die jeweils zu einem Problembereich gehoerige Subroutinen enthalten. Die * +c* zur Zeit vorhandenen Files und die darin enthaltenen Routinen sind: +c* +c* MUTRACK.FOR +c* SUB_ARTLIST.FOR +c* SUB_OUTPUT.FOR +c* SUB_INPUT.FOR +c* SUB_INTEGR_FO.FOR +c* SUB_INTEGR_L1.FOR +c* SUB_INTEGR_L3.FOR +c* SUB_INTEGR_M2.FOR +c* SUB_PICTURE.FOR +c* SUB_TRIGGER.FOR +c* +c* +c* Includefiles mit COMMON-Blöcken: +c* +c* COM_DIRS.INC +c* COM_KAMMER.INC +c* COM_LUNS.INC +c* COM_MUTRACK.INC +c* COM_OUTPUT.INC +c* COM_TD_EXT.INC +c* COM_TD_INT.INC +c* COM_WINKEL.INC +c* GEO_KAMMER.INPUT +c* GEO_TRIGGER.INC +c* +c* +c* Icludefile mit Defaultwerten fuer eine Reihe benutzerdefinierbarer und Programm- +c* interner Groessen: +c* +c* INITIALIZE.INC +c* +c* +c* Includefiles fuer die Potentialmappen: +c* +c* MAP_DEF_FO.INC +c* MAP_DEF_L1.INC +c* MAP_DEF_L3.INC +c* MAP_DEF_M2.INC +c* +c* READ_MAP.INC +c* +c* +c* Benoetigte Eingabfiles: +c* +c* MUTRACK.INPUT (fuer die Integrationen zu verwendende Einstellungen) +c* kammer_geo.INPUT (Spezifizierung der Kammergeometrie) +c* mappenName.INFO (Dateien mit Angaben ueber zugehoerige Potentialmappen) +c* mappenName.MAPPE (die Potentialmappen) +c* MUTRACK_NR.DAT (zuletzt vergebene Nummern der Ausgabedateien, wird +c* von Mutrack verwaltet). +c* +c* +c* Fuer die Erstellung der Potentialmappen mit dem Triumf-Programm stehen folgende +c* Hilfsmittel zur Verfuegung: +c* +c* BESCHL-INIT.FOR +c* LENSE-INIT.FOR +c* +c* Diese Boundary-Routinen stellen folgende Moeglichkeiten zur Verfuegung: +c* +c* Initialisierung von Scratch, von 2D und von 3D-Mappen. Kontrollmoeglichkeiten +c* ueber die Ausgabe der Potentialbereiche. +c* +c* Die Mappen koennen von PHYSICA aus mittels der FORTRAN-Routine ' ' +c* und den .PCM-Makros ' ' ... angeschaut und ausgegeben werden. +c* +c* +c* +c* Liste der moeglichen Ausgabefiles: +c* +c* MU_nnnn.LOG +c* MU_nnnn.GEO +c* MU_nnnn.PHYSICA +c* MU_nnnn.NTP +c* MU_nnnn._tab +c* +c* Diese Version von MUTRACK enthaelt nur noch rudimentaere Anteile des ursprueng- +c* lichen Programmes von Thomas Wutzke. Hauptunterschiede und Erweiterungen sind: +c* +c* # Ersetzen der Euler-Integration durch ein schrittweitenkontrolliertes +c* Runge-Kutta Verfahren. Der dieser Implementation zugrundeliegende Algo- +c* rythmus entstammt dabei dem Buch 'NUMERICAL RECIPES, The Art of Scientific +c* Computing' (Fortran Version) von Press, Flannery, Teukolsky und Vetterling, +c* Cambridge University Press (1989). +c* +c* # Verbesserter Algorythmus zur Berechnung der Feldstaerken aus den Potential- +c* Mappen. +c* +c* # Implementierung des gesamten Statistikaparates. (Zuvor waren PAW-Ntupel die +c* einzige Ausgabeform abgesehen von den Debuginformationen). +c* +c* # Uebersichtlichere Gestalltung der Ein- und Ausgabe, sowie der Debug-Infos. +c* +c* # Implementierung der Moeglichkeit, verschiedenen Parameter in Schleifen zu +c* durchlaufen. +c* +c* # Implementierung der fuer die graphische Darstellung mit PHYSICA notwendigen +c* Routinen. +c* +c* # Implementierung des Triggerdetektors. +c* +c* # Implementierung der Graphikausgabe der Teilchenbahnen (diese Routinen wurden +c* in ihrer ersten Fassung von Michael Birke geschrieben). +c* +c* # Umstellen der Potentialmappen auf 'unformattiert' und Einschraenken der +c* Mappen auf den wirklich benoetigten Bereich (d.h. z.B. Ausnutzen der +c* Symmetrie der Linsen, wodurch die Mappengroesse bei den Linsen mehr als +c* halbiert werden konnte. +c* +c* # Implementierung der Moeglichkeit, die Kammergeometrie (d.h. die Positionen +c* der verwendeten Elemente) sowie die Potentialmappen (z.B. fuer unter- +c* schiedliche Linsenkonfigurationen) ueber ein .INPUT-Eingabefile ohne +c* Umschreiben des Sourcecodes aendern zu koennen. +c* +c* Das Programm verwendet fuer Graphikdarstellung und NTupel-Erzeugung Routinen der +c* zum PAW-Komplex gehoerenden CERN-Bibliotheken 'HPLOT' und 'HBOOK'. +c* +c* Am Anfang der Deatei 'COM_MUTRACK.INC' findet sich eine Liste der wichtigsten +c* Aenderungen ueber die verschiedenen Versionen ab 1.4.1. +c* +c* Gruss, Anselm Hofer +c****************************************************************************** +c + +C =============== + program MUTRACK +C =============== + +c Deklarationen: + + Implicit None + + INCLUDE 'com_mutrack.inc' + INCLUDE 'com_dirs.inc' + INCLUDE 'com_td_ext.inc' + INCLUDE 'com_winkel.inc' + INCLUDE 'com_kammer.inc' + INCLUDE 'geo_trigger.inc' + + +c die SCHLEIFENVARIABLEN fuer die 'do 200 ...'-Schleifenund und damit +c zusammenhaengendes (Common-Bloecke werden fuer die NTupel-Ausgabe benoetigt): + +c - 'virtuelle' Flugstreckenverlaengerungen: + + real delta_L1,delta_L2 + +c - Energieverlust in der Triggerfolie und Dicke derselben: + + real E_loss + +c - Drehwinkel: +c (alfaTgt, alfaSp, alfaTD und ihre Winkelfunktionen werden in 'COM_WINKEL.INC' +c erledigt: COMMON /ANGELS/) + + real y_intersectSP ! Benoetigt fuer Schnittpkt. der Trajektorie + real yUppLeft, yLowLeft ! mit forderer Spiegelebene + + real x_intersectTD ! Benoetigt fuer Schnittpkt. der Trajektorie + ! mit TD-Folie + real x_intersectTDMap ! ... mit TD-Mappe + common /x_intersectTD/ x_intersectTD,x_intersectTDMap + +c - Masse und Ladung: + + real m, m_ ! Masse, Laufvariable fuer Massen-Schleife + real q, q_ ! Ladung, Laufvariable fuer Ladungs-Schleife + integer qInt + COMMON /charge/ qInt ! fuer 'NTP_charge' + + integer nNeutral,nCharged ! fuer Ausgabe des gewuerfelten neutralen anteils + COMMON /nNeutral/ nNeutral,nCharged + +c - MCP2: + + real U_MCP2 ! Spannung am MCP2 + + +c - Triggerdetektor: U_F, U_V, U_H und U_MCP3 werden in 'COM_TD_EXT.INC' +c erledigt. (COMMON /TRIGGERSETTINGS/) + +c - Transportsystem: + + real U_Tgt ! Target-Spannung + real U_Gua ! Spannung am Guardring + real U_G1 ! Spannung am ersten Gitter + real U_L1 ! Spannung an Linse 1 + real U_Sp ! Spiegelspannung + real U_L2 ! Spannung an Linse 2 + real U_L3 ! Spannung an Linse 3 + + COMMON /U_L2/ U_L2 ! fuer die Addition der 'L2andFo'-Mappe + + real last_U_L2 / -1.E10 / ! fuer die Addition der 'L2andFo'-Mappe + real last_U_F / -1.E10 / + +c - Magnetfeldstaerken: + + real B_Helm ! Magnetfeld der Helmholtzspulen + real B_TD ! Magnetfeld der Kompensationsspule am TD + +c - Startparameter: + + integer randomloop_ ! Laufvariable fuer zufallsverteilte Starts + real E0_ ! Laufvariable fuer Startenergie_Schleife + real theta0_ ! Laufvarialbe fuer Startwinkel-Schleife + real Sin_theta0, Cos_theta0 ! Startwinkel gegen x-Achse + real phi0_ ! Laufvariable fuer Startwinkel-Schleife + real Sin_phi0, Cos_phi0 ! azimuthaler Startwinkel (phi0=0: y-Achse) + real y0_ ! Laufvariable fuer Startpositions_Schleife + real z0_ ! Laufvariable fuer Startpositions_Schleife + real r0 ! Radius beim Wuerfeln der Startposition + real phi_r0 ! Winkel beim Wuerfeln der Startposition + + ! x0(3),v0(3),E0,theta0,phi0 werden in 'COM_MUTRACK.INC' declariert + + +c allgemeine Trajektoriengroessen + + real dt ! zeitl. Aenderung + real v_xy ! Geschwindigkeit in x/y-Ebene + real v_square, v0_Betrag, v_Betrag + real Ekin ! kinetische Energie + real a1,a2 ! Beschleunigung in 1. bzw. 2. Beschl.Stufe + real aFoil ! Beschleunigung zwischen Massegitter und Folie + real radiusQuad ! RadiusQuadrat + real radiusQuad_ ! RadiusQuadrat + real radius + + real S1xM2 ! Zeit vom Start bis zur MCP2-Ebene + real S1M2 ! Zeit vom Start bis zum MCP2 (Treffer voarausgesetzt) + real S1Fo ! Zeit vom Start bis zur Folie + real S1FoOnly ! Zeit vom Start bis zur Folie + real FoM2 ! Zeit zwischen Folie und MCP2 + real FoM2Only ! wie FoM2, falls keine anderen TOFs verlangt + real S1M3 ! Zeit vom Start bis Eintreffen der FE auf MCP3 + real M3M2 ! Zeit vom Eintreffen der FE auf MCP3 bis MCP2 + + real alfa ! Bahnwinkel gegen die Triggerfolienebene + real E_Verlust /0./ ! Energieverlust in der Folie + real delta_E_Verlust ! Streuung des Energieverlustes in der Folie + real thetaAufstreu ! Ablenkung aus vorheriger Richtung in der Folie + real phiAufstreu ! azimuthaler Winkel der Ablenkung gegenueber Horiz. + COMMON /FOLIE/ E_Verlust,thetaAufstreu,phiAufstreu + + real Beschl_Faktor ! Faktor bei Berechn. der Beschleunigung im EFeld + COMMON /BESCHL_FAKTOR/ Beschl_Faktor + + real length1 ! = d_Folie_Achse + MappenLaenge_FO + real length2 ! = xTD - d_Folie_Achse - MappenLaenge_FO ! = xTD-length1 + + +c Groessen der Folienelektronen ('FE'): + + integer nFE ! jeweilige Anzahl an FE (2 <= nFE <= 5) + real E0FE ! Startenergie der Folienelektronen + real ct0,st0,cf0,sf0 ! die Winkelfunktionen der Startwinkel der FE + real f0 ! 'phi0' fuer die FE + real x0FE(3) ! Startort der Folienelektronen auf der TD-Folie + real xFE(3),vFE(3) ! Ort und Geschw. der FE + real tFE ! Zeit + real tFE_min ! kuerzeste gueltige FE-Flugzeit je Projektil + integer tFE_(5) /-1,-1,-1,-1,-1/ ! Flugzeit jedes FE in ps (fuer NTP) +c +c---------------- +c +c-TP-10/2000 add variables to have position information of muons at +c TD and FE at MCP3 in NTuple; up to 5 electrons possible +c + real xFE_MCP(5), yFE_MCP(5), zFE_MCP(5) + common /TrigDet/ x0FE, xFE_MCP, yFE_MCP, zFE_MCP +c +c---------------- +c + COMMON /S1xM2/ S1xM2 ! fuer NTupel + COMMON /TIMES/ S1M2,S1Fo,FoM2,S1M3,M3M2,tFE_ ! fuer NTupel + common /FoM2Only/ FoM2Only + COMMON /S1FoOnly/ S1FoOnly + +c Variablen fuer den allgemeinen Programmablauf: + + integer qIndxMu + common /qIndxMu/ qIndxMu + + integer ntpid(1) ! fuer das Einlesen des NTupels von ACCEL oder von + integer ntpnr ! FoilFile + + integer firstEventNr + external firstEventNr + + logical NTPalreadyWritten + + real Spiegel_Faktor ! Faktor bei Berechn. der Reflektionszeit im Spiegel + + integer bis_Spiegel ! verschiedene Label + integer bis_L3_Mappe, bis_MCP2_Mappe, MCP2_Mappe + + character uhrzeit*8 + + integer percent_done + logical fill_NTP + + real radiusQuad_HeShield + real radiusQuad_LNShield + real radiusQuad_L1 + real radiusQuad_L2 + real radiusQuad_L3 + real radiusQuad_Blende + real radiusQuad_Rohr + real radiusQuad_MCP2 ! Radiusquadrat des MCP2 + real radiusQuad_MCP2active ! Radiusquadrat der aktiven Flaeche des MCP2 + real radiusQuad_Sp ! Radiusquadrat der Spiegeldraehte + real rWires_Sp ! Radius der Spiegeldraehte + + logical check_Blende /.false./ + + real xChangeKoord ! legt den Ort nach dem Spiegel fest, bei + parameter (xChangeKoord = 75.) ! dem das Koordinatensystem gewechselt wird + + integer n_return ! die Returnvariable fuer Aufruf von 'TD_CALC' + integer zaehler ! Zaehler fuer Monitoring der Trajektorie in den + ! Gebieten, in denen stepwise integriert werden + ! muss + logical flag, flag_ok + integer okStepsCounter + + integer i, k ! integer-Hilfsvariablen + real help1, help2 ! real-Hilfsvariablen + real help3, help4 ! real-Hilfsvariablen + + real YieldPlus,YieldNeutral ! Ladungsanteile nach TD-Foliendurchgang + + integer startLabel ! das Einsprunglabel beim Teilchenstart + + character helpChar*7, ant*1 + character HistogramTitle*32 /'Schnitt bei x = (i. Teil)'/ + +d real dtmin_L1, dtmin_Sp, dtmin_L2andFo, dtmin_FO, dtmin_L3, dtmin_M2 +d real dtmax_L1, dtmax_Sp, dtmax_L2andFo, dtmax_FO, dtmax_L3, dtmax_M2 +d real x_dtmin_L1(3), x_dtmax_L1(3), x_dtmin_FO(3), x_dtmax_FO(3) +d real x_dtmin_L2andFo(3), x_dtmax_L2andFo(3) +d real x_dtmin_L3(3), x_dtmax_L3(3), x_dtmin_M2(3), x_dtmax_M2(3) +d real x_dtmin_Sp(3), x_dtmax_Sp(3) +d +d ! /ntp_steps/ enthaelt auch 'steps' (ueber COM-MUTRACK.INC) +d COMMON /ntp_steps/ dtmin_L1, x_dtmin_L1, dtmax_L1, x_dtmax_L1, +d + dtmin_Sp, x_dtmin_Sp, dtmax_Sp, x_dtmax_Sp, +d + dtmin_L2andFo, x_dtmin_L2andFo, dtmax_L2andFo, x_dtmax_L2andFo, +d + dtmin_FO, x_dtmin_FO, dtmax_FO, x_dtmax_FO, +d + dtmin_L3, x_dtmin_L3, dtmax_L3, x_dtmax_L3, +d + dtmin_M2, x_dtmin_M2, dtmax_M2, x_dtmax_M2 + + real x40(2:3),v40(3),t40,E40 ! Speicher fuer Trajektoriengroessen bei x=40mm + COMMON /NTP_40mm/ x40,v40,t40,E40 + +cMBc logical writeTraj2File +cMBc common /writeTraj2File/ writeTraj2File + + +c Variablen fuer Test ob Draht getroffen wurde: + + real distToWire(2) + integer DrahtNr + logical WireHit + + real WireRadiusQuad_G1,WireRadiusQuad_G2 + real WireRadiusQuad_Sp + + +c Variablen fuer die Graphikausgabe: + + real xKoord(1000),xKoord_(1000) ! Koordinatenfelder fuer die + real yKoord(1000),yKoord_(1000) ! Graphikausgabe + real zKoord(1000),zKoord_(1000) ! +cMBc real tKoord(1000),tKoord_(1000) ! + integer nKoord,nKoordSave ! Anzahl der Koordinaten + +cMBc COMMON /GRAPHIX/ xKoord,yKoord,zKoord,nKoord,tKoord + COMMON /GRAPHIX/ xKoord,yKoord,zKoord,nKoord + + +c Variablen fuer HBOOK und PAW: + + integer istat ! fuer HBOOK-Fehlermeldungen + + integer HB_memsize + parameter(HB_memsize=1000000) + real memory(HB_memsize) + + common /pawc/ memory ! Der Arbeitsbereich fuer HBOOK + + +c Konstanten: + + real c ! Lichtgeschwindigkeit in mm/ns + real meanLifeTime ! mittlere Myon-Lebensdauer in ns + + parameter (c = 299.7925, meanLifeTime = 2197) + +c------------------------------------------------------------------------------- +c Konstanten und Variable fuer Berechnung der Winkelaufstreuung in Triggerfolie +c mittels Meyer-Formel (L.Meyer, phys.stat.sol. (b) 44, 253 (1971)): + + real g1, g2 ! Tabellierte Funktionen der Referenz + real effRedThick ! effektive reduzierte Dicke ('tau' der Referenz) + + +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target + real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + real HWHM2sigma ! Umrechnungsfaktor von (halber!) Halbwertsbreite + ! nach Sigma der Gaussfunktion + + real Na ! die Avogadrokonstante + real mMolC ! molare Masse von C in ug + real Pi ! die Kreiszahl + + parameter (Z1 = 1, Z2 = 6, a0 = 5.29E-9, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10, HWHM2sigma = 1./1.17741) + parameter (Na = 6.022e23, mMolC = 12.011e6, Pi = 3.141592654) + + +c - Bei der Berechnung von Sigma auftretende Vorfaktoren. +c (Meyer_faktor 1 wird benoetigt fuer Berechnung der reduzierten Dicke aus der +c 'ug/cm2'-Angabe der Foliendicke. Meyer_faktor2 und Meyer_faktor3 werden +c direkt fuer die Berechnung von sigma aus den beiden tabellierten Funktionen +c g1 und g2 verwendet): + + real Meyer_Faktor1, Meyer_Faktor2, Meyer_Faktor3 + + parameter (Meyer_faktor1 = Pi*screeningPar*screeningPar * Na/mMolC) + ! Na/mMolC = 1/m(C-Atom) + parameter (Meyer_faktor2 = (2*Z1*Z2 * eSquare)/ScreeningPar * 180./Pi + + * HWHM2sigma) + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + + +c------------------------------------------------------------------------------- +c Kommentar zur Berechnung der Winkelaufstreuung nach Meyer: +c +c Als Bedingung fuer die Gueltigkeit der Rechnung wird verlangt, dass +c +c (1) die Anzahl n der Stoesse >> 20*(a/r0)^(4/3) sein muss. Fuer Protonen auf +c Graphit ist laut Referenz a/r0 gleich 0.26 (mit Dichte von 3.5 g/ccm habe +c ich einen Wert von 0.29 abgeschaetzt). Fuer Myonen hat man den selben +c Wert zu nehmen. Damit ergibt sich die Forderung, dass n >> 3.5 sein muss. +c +c (2) unabhaengig von (1) n >> 5 sein muss, was (1) also mit einschliesst. +c +c Mit n = Pi*r0*r0*Teilchen/Flaeche ergibt sich fuer eine Foliendicke von +c 3 ug/cm^2 als Abschaetzung fuer n ein Wert von 37. (r0 ueber r0 = 0.5 N^(1/3) +c und 3.5 g/ccm zu 8.9e-9 cm abgeschaetzt). D.h., dass die Bedingungen in +c unserem Fall gut erfuellt sind. +c In dem Paper wird eine Formel fuer Halbwertsbreiten angegeben. Ich habe nicht +c kontrolliert, in wie weit die Form der Verteilung tatsaechlich einer Gauss- +c verteilung entspricht. Zumindest im Bereich der Vorwaertsstreuung sollte +c die in diesem Programm verwendete Gaussverteilung aber eine sehr gute +c Naeherung abgeben. Abweichungen bei groesseren Winkeln koennten jedoch u. U. +c die absolute Streuintensitaet in Vorwaertsrichtung verfaelschen. + +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +c HIER GEHT DER PROGRAMMTEXT RICHTIG LOS +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz + +c Initialisierungen: + + INCLUDE 'initialize.inc' + + +c Einlesen der Parameter aus 'MUTRACK.INPUT' und Setzen der entsprechenden +c Voreinstellungen. Einlesen der Kammergeometrie sowie der INFO-files der +c Feldmappen: + + call read_inputFile + + +c Berechnen der RadiusQuadrate: + + radiusQuad_HeShield = rHeShield*rHeShield + radiusQuad_LNShield = rLNShield*rLNShield + radiusQuad_Rohr = radius_Rohr*radius_Rohr + radiusQuad_L1 = iRadiusCyl_L1*iRadiusCyl_L1 + radiusQuad_L2 = iRadiusCyl_L2*iRadiusCyl_L2 + radiusQuad_L3 = iRadiusCyl_L3*iRadiusCyl_L3 + radiusQuad_Blende = radius_Blende*radius_Blende + radiusQuad_MCP2 = radius_MCP2*radius_MCP2 + radiusQuad_MCP2active = radius_MCP2active*radius_MCP2active + WireRadiusQuad_G1 = dWires_G1/2. * dWires_G1/2. + WireRadiusQuad_G2 = dWires_G2/2. * dWires_G2/2. + WireRadiusQuad_Sp = dWires_Sp/2. * dWires_Sp/2. + rWires_Sp = dWires_Sp/2. + radiusQuad_Sp = rWires_Sp * rWires_Sp + + +c Einlesen der Feldmappen: + + write(*,*)'----------------------------------------'// + + '----------------------------------------' + if (.NOT.(par(1,UL1).EQ.0. .AND. n_par(UL1).LE.1)) call READ_MAP_L1 + + if (.NOT.(idealMirror .OR. (par(1,USp).EQ.0. .AND. n_par(USp).LE.1))) then + call read_Map_SP_1 + call read_Map_SP_2 + call read_Map_SP_3 + endif + + if (TriggerInBeam .AND. .NOT.lense2 .AND. + ! 'lense2' muss noch in sub_input richtig gesetzt werden! (-> foilfile) + + .NOT.(par(1,UFolie).EQ.0. .AND. n_par(UFolie).LE.1) ) then + call READ_MAP_FO + endif + + if (.NOT.(par(1,UL3).EQ.0. .AND. n_par(UL3).LE.1)) then + if (.NOT.(par(1,UMCP2).EQ.0. .AND. n_par(UMCP2).LE.1)) then + if (xLeaveMap_L3.GT.xEnterMap_M2) then + write(*,*) + write(*,*)' Potentialmappen von Linse 3 und MCP2 ueberlappen!' + write(*,*)' Dies ist in der aktuellen Implementierung des Programmes' + write(*,*)' nicht vorgesehen!' + write(*,*) + write(*,*)' -> STOP' + write(*,*) + STOP + endif + endif + call READ_MAP_L3 + endif + + if (.NOT.(par(1,UMCP2).EQ.0. .AND. n_par(UMCP2).LE.1)) call READ_MAP_M2 + + +c Eingelesene Simulationsparameter auf Schirm geben und bestaetigen lassen. +c Die Ausgabefiles initialisieren: + + call initialize_output + + +c falls ein 'FoilFile' erstellt werden soll, schreibe das .INFO-files: + + if (createFoilFile) call make_INFOFile + if (Use_MUTRACK) Use_ACCEL = .false. + + +c Defaultwert fuer 'fill_NTP' setzen (wird weiter unten ueberschrieben, falls +c fuer das Fuellen des NTupels spezielle Triggerbedingung verlangt ist): + + if (createNTP) then + fill_NTP = .true. + else + fill_NTP = .false. + endif + + +c CERN-Pakete initialisieren (Groesse des COMMONblocks PAWC uebermitteln): + + if (.NOT.fromScratch.OR.Graphics.OR.createNTP.OR.createFoilFile) call HLIMIT(HB_memsize) + + +c Graphikausgabe initialisieren: + + if (GRAPHICS) then + call masstab_setzen + CALL HPLSET ('VSIZ',.6) ! AXIS VALUES SIZE + write(HistogramTitle(17:22),'(F6.1)') schnitt_x + write(HistogramTitle(25:25),'(I1)') schnitt_p + CALL HPLSET ('TSIZ',.7) ! HISTOGRAM TITLE SIZE + CALL HBOOK2 (50,HistogramTitle,100,-30.,30.,100,-30.,30.,20.) + endif + + +c falls fruehere Simulation fortgefuehrt werden soll, oeffne entsprechende Datei: + + if (.NOT.fromScratch) then + if (use_ACCEL) then + call HROPEN(lunREAD,'ACCEL',ACCEL_Dir//':'//fileName_ACCEL//'.NTP', + + ' ',1024,istat) + else + call HROPEN(lunREAD,'MUread',outDir//':'//fileName_MUTRACK//'.NTP', + + ' ',1024,istat) + endif + + call HRIN(0,99999,0) + call HIDALL(ntpid,ntpNr) + call HDELET(ntpid(1)) + i = NTP_read - ntpid(1) + call HRIN(NTP_read-i,9999,i) ! NTP_read = NTP_write+1 + call HBNAME(NTP_read,' ',0,'$CLEAR') ! alles resetten + + ! fuer die benoetigten Bloecke des CWN die entsprechenden Speicher- + ! lokalisationen uebermitteln: + + if (random_E0) call HBNAME(NTP_read,'E0',E0,'$SET') + if (random_pos) call HBNAME(NTP_read,'x0',x0,'$SET') + if (random_angle) call HBNAME(NTP_read,'angle0',theta0,'$SET') ! theta0,phi0 + if (UseDecay_prevSim) call HBNAME(NTP_read,'lifetime',lifetime,'$SET') + + if (smearS1Fo .AND. use_MUTRACK) then + call HBNAME(NTP_read,'S1FoS',S1FoOnly,'$SET') + endif + + call HBNAME(NTP_read,'dest',gebiet,'$SET') ! gebiet,destiny + call HBNAME(NTP_read,'Traj',t,'$SET') ! t,x,v + + endif + + +c NTP-relevante Befehle: + +c BAD LUCK!!! Das Packen der Real-Variablen im folgenden hat KEINERLEI VER- +c KLEINERUNG DER FILEGROESSE bewirkt!!!! (fuer die Integers habe ich noch +c keinen Test gemacht). -> wohl besser wieder herausnehmen. Ich verliere +c u.U. nur Genauigkeit und habe nur einen eingeschraenkten Wertebereich zur +c Verfuegung! + + if (createNtp.OR.createFoilFile) then + + !c Datei fuer NTupelausgabe oeffnen: + call HROPEN(lunNTP,'MUwrite',outDir//':'//filename//'.NTP', + + 'N',1024,istat) + if (istat.NE.0) then + write(*,*) + write(*,*)'error ',istat,' opening HBOOK-file' + write(*,*) + STOP + endif + + call HBNT(NTP_write,filename,'D') ! D: Disk resident CWN buchen + + !c die Bloecke des CWN definieren: + + if (.NOT.OneLoop) call HBNAME(NTP_write,'LOOP',schleifenNr,'loop[1,1000]:u') + if (M2_triggered .OR. Fo_triggered.AND.upToTDFoilOnly) then + ! -> Gebiet und Destiny stehen hier sowieso fest, nimm + ! diese Groessen daher erst gar nicht mehr in das NTupel auf! + else + call HBNAME(NTP_write,'DEST',gebiet,'Gebiet[0,20]:u,dest[-10,10]:i') + endif + if (NTP_Start .OR. createFoilFile.AND.random_pos) then + call HBNAME(NTP_write,'X0',x0,'x0,y0,z0') + endif + if (NTP_Start) call HBNAME(NTP_write,'V0',v0,'vx0,vy0,vz0') + if (NTP_Start .OR. createFoilFile.AND.random_E0) then + call HBNAME(NTP_write,'E0',E0,'E0') + endif + if (NTP_Start .OR. createFoilFile.AND.random_angle) then + call HBNAME(NTP_write,'ANGLE0',theta0,'theta0,phi0') + endif + if (NTP_lifetime .OR. createFoilFile.AND.UseDecay) then + call HBNAME(NTP_write,'LIFETIME',lifetime,'lifetime:r') + endif + if (NTP_40mm) call HBNAME(NTP_write,'X=40MM',x40, + + 'y40,z40,vx40,vy40,vz40,t40,E40') + if (NTP_S1xM2) call HBNAME(NTP_write,'S1xM2',S1xM2,'S1xM2') + if (NTP_Times) then + if (TriggerInBeam) then + if (generate_FE) then + call HBNAME(NTP_write,'TIMES',S1M2, + + 'S1M2,S1Fo,FoM2,S1M3,M3M2:r,TFE(5):i') + else + call HBNAME(NTP_write,'TIMES',S1M2, + + 'S1M2,S1Fo,FoM2') + endif + else + call HBNAME(NTP_write,'TIMES',S1M2, + + 'S1M2') + endif + endif + if (NTP_FoM2Only) then + call HBNAME(NTP_write,'FoM2',FoM2Only,'FoM2') + endif + if (NTP_Folie) then + call HBNAME(NTP_write,'FOLIE',E_Verlust, + + 'ELoss,thetStreu,phiStreu') +c +c-------------------------- +c +c-TP-10/2000 add position at foil and MCP3 (FE) +c + call HBNAME(NTP_write, 'TrigDet', x0FE, + + 'x0FE,y0FE,z0FE,xFE(5),yFE(5),zFE(5)') +c +c-------------------------- +c + endif + if (NTP_charge) call HBNAME(NTP_write,'CHARGE',qInt,'q[-5,5]:i') + if (NTP_stop.OR.createFoilFile) then + call HBNAME(NTP_write,'TRAJ',t,'t,x,y,z,vx,vy,vz') + endif +c if (createFoilFile .AND. smearS1Fo .AND. .NOT.NTP_times) then + if (smearS1Fo) then + call HBNAME(NTP_write,'S1FoS',S1FoOnly,'S1FoS') + endif + if (NTP_stop) then + call HBNAME(NTP_write,'EKIN',Ekin,'Ekin') + endif +d if (NTP_steps) then +d call HBNAME(NTP_write,'STEP',steps,'steps[1,100000]:u,'// +d + 'dtminL1, xdtminL1, ydtminL1, zdtminL1,'// +d + 'dtmaxL1, xdtmaxL1, ydtmaxL1, zdtmaxL1,'// +d + 'dtminL2, xdtminL2, ydtminL2, zdtminL2,'// +d + 'dtmaxL2, xdtmaxL2, ydtmaxL2, zdtmaxL2,'// +d + 'dtminFO, xdtminFO, ydtminFO, zdtminFO,'// +d + 'dtmaxFO, xdtmaxFO, ydtmaxFO, zdtmaxFO,'// +d + 'dtminL3, xdtminL3, ydtminL3, zdtminL3,'// +d + 'dtmaxL3, xdtmaxL3, ydtmaxL3, zdtmaxL3,'// +d + 'dtminM2, xdtminM2, ydtminM2, zdtminM2,'// +d + 'dtmaxM2, xdtmaxM2, ydtmaxM2, zdtmaxM2') +d endif + endif + + +c die Label definieren: + + assign 7 to bis_Spiegel + assign 14 to bis_L3_Mappe + assign 16 to bis_MCP2_Mappe + assign 17 to MCP2_Mappe + + +c die Einsprungposition fuer den Beginn der Trajektorienberechnungen setzen: + + if (Use_MUTRACK) then + assign 113 to startLabel + elseif (Use_ACCEL) then + assign 3 to startLabel + elseif (Gebiet0.EQ.target .OR. Gebiet0.EQ.upToGrid1) then + assign 1 to startLabel + elseif (Gebiet0.EQ.upToGrid2) then + assign 2 to startLabel + elseif (Gebiet0.EQ.upToHeShield) then + assign 3 to startLabel + elseif (Gebiet0.EQ.upToLNShield) then + assign 4 to startLabel + elseif (Gebiet0.EQ.upToL1Map) then + assign 5 to startLabel + elseif (Gebiet0.EQ.upToExL1) then + assign 6 to startLabel + elseif (Gebiet0.EQ.upToEnSp) then + assign 7 to startLabel + elseif (Gebiet0.EQ.upToExSp) then + assign 8 to startLabel + elseif (Gebiet0.EQ.upToChKoord) then + assign 9 to startLabel + elseif (Gebiet0.EQ.upToEnTD) then + assign 10 to startLabel + elseif (Gebiet0.EQ.upToExTD) then + if (log_alpha0_KS) then + assign 111 to startLabel + else + assign 112 to startLabel + endif + elseif (Gebiet0.EQ.upToL2andFoMap) then +c assign 12 to startLabel + elseif (Gebiet0.EQ.upToExL2) then +c assign 13 to startLabel + elseif (Gebiet0.EQ.upToL3Map) then + assign 12 to startLabel + elseif (Gebiet0.EQ.upToExL3) then + assign 13 to startLabel + elseif (Gebiet0.EQ.upToM2Map) then + assign 14 to startLabel + elseif (Gebiet0.EQ.upToMCP2) then + assign 15 to startLabel + endif + + +c Abkuerzungen 'Length1' und 'length2' setzen: + + length1 = d_Folie_Achse + MappenLaenge_FO + length2 = xTD - d_Folie_Achse - MappenLaenge_FO + + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c ab hier beginnen die Schleifen: +c (Bemerkung: eine Laufvariable darf kein Feldelement sein!) +c +c Besonderheit der Massen- und der Ladungsschleife: +c Wurde im INPUT-File in der Variablen 'artList' eine Teilchenart spezifi- +c ziert (-> 'artList_defined'), so werden die Parameter Masse und Ladung nicht +c entsprechend den Inhalten von par(n,mass) bzw. par(n,charge) eingestellt, +c sondern entsprechend den zu den Teilchenarten gehoerenden Werten fuer diese +c Groessen. In diesem Fall besteht die Massenschleife aus genau einem (Leer-) +c Durchlauf, waehrend die Ladungsschleife fuer jede Teilchenart einen Durchlauf +c macht, in welcher dann die Einstellung von Ladung UND Masse stattfindet. +c +c Bei Aenderungen in der Abfolge der Schleifen muss die Anweisungszeile +c 'DATA reihenfolge /.../' in 'INITIALIZE.INC' entsprechend editiert werden! +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +c zusaetliche Flugstrecken vor TD und MCP2 (gehen NUR in t, NICHT in x ein!!): +c ---------------------------------------------------------------------------- + + do 200 Delta_L1 = par(1,DeltaL1),par(2,DeltaL1),par(3,DeltaL1) + parWert(DeltaL1) = Delta_L1 + do 200 Delta_L2 = par(1,DeltaL2),par(2,DeltaL2),par(3,DeltaL2) + parWert(DeltaL2) = Delta_L2 + +c Foliendicke und Energieverlust: +c ------------------------------- + + do 200 E_loss = par(1,Eloss),par(2,Eloss),par(3,Eloss) ! Eloss + parWert(Eloss) = E_loss + mean_E_Verlust = E_loss + + do 200 Thickness = par(1,Thickn),par(2,Thickn),par(3,Thickn)! Thickness + parWert(Thickn) = Thickness + +c MCP2: +c ----- + + do 200 U_MCP2 = par(1,UMCP2),par(2,UMCP2),par(3,UMCP2) ! U(MCP2) + parWert(UMCP2) = U_MCP2 + +c Winkel: +c ------- + + do 200 alfaTgt = par(1,alfTgt),par(2,alfTgt),par(3,alfTgt) ! ALPHA(TARGET) + parWert(alfTgt) = alfaTgt + Sin_alfaTgt= sind(alfaTgt) + Cos_alfaTgt= cosd(alfaTgt) + + do 200 alfaSp = par(1,alfSp),par(2,alfSp),par(3,alfSp) ! ALPHA(SPIEGEL) + parWert(alfSp) = alfaSp + Sin_alfaSp = sind(alfaSp) + Cos_alfaSp = cosd(alfaSp) + Tan_alfaSp = tand(alfaSp) + help1 = dSpiegel/2.+DreharmLaenge + ! Berechne die y-Werte der 'oberen linken' (yUppLeft) und der + ! 'unteren linken' (yLowLeft) Spiegelecke: + if (idealMirror) then + yUppLeft = + bSpiegel/2. * Sin_alfaSp + + + help1 * Cos_alfaSp + yLowLeft = - bSpiegel/2. * Sin_alfaSp + + + help1 * Cos_alfaSp + endif + ! Berechne Schnittpunkt y_intersectSp der vorderen Spiegelebene bzw. + ! der vorderen Mappenkante mit der Geraden x = xSpiegel: + if (.NOT.idealMirror) help1 = help1 + xSpGrid1 + y_intersectSp = help1/Cos_alfaSp + + do 200 alfaTD = par(1,alfTD),par(2,alfTD),par(3,alfTD) ! ALPHA(TRIGGERDETEKTOR) + parWert(alfTD) = alfaTD + Sin_alfaTD = sind(alfaTD) + Cos_alfaTD = cosd(alfaTD) + Tan_alfaTD = tand(alfaTD) + ! Berechne Schnittpunkt 'x_intersectTD' der x-Achse mit der Folien- + ! ebene bzw im Fall von 'GridInFrontOfFoil' mit dem Gitter vor der + ! Triggerfolie: + help1 = d_Folie_Achse + if (gridInFrontOfFoil) help1 = help1 + d_Grid_Folie + x_intersectTD = xTD - help1/Cos_alfaTD + help1 = d_Folie_Achse + mappenLaenge_Fo + x_intersectTDMap = xTD - help1/Cos_alfaTD + +c TriggerDetektor: +c ---------------- + + do 200 U_V = par(1,UVorne),par(2,UVorne),par(3,UVorne) ! U(VORNE) + parWert(UVorne) = U_V + do 200 U_H = par(1,UHinten),par(2,UHinten),par(3,UHinten) ! U(HINTEN) + parWert(UHinten) = U_H + do 200 U_MCP3 = par(1,UMCP3),par(2,UMCP3),par(3,UMCP3) ! U(MCP3) + parWert(UMCP3) = U_MCP3 + do 200 U_F = par(1,UFolie),par(2,UFolie),par(3,UFolie) ! U(FOLIE) + parWert(UFolie) = U_F + +c Transportsystem: +c ---------------- + + do 200 U_L2 = par(1,UL2),par(2,UL2),par(3,UL2) ! U(Linse 2) + parWert(UL2) = U_L2 + +c gegebenenfalls die Mappe 'L2andFo' zusammenbauen: + if (lense2) then + if ( .NOT.(par(1,UL2).EQ.0. .AND. n_par(UL2).LE.1) .OR. + + .NOT.(par(1,UFolie).EQ.0. .AND. n_par(UFolie).LE.1) ) then + ! Addiere die Mappen nur erneut, falls die jetztige Konfiguration + ! nicht mit der letzten uebereinstimmt: + if (U_L2.NE.last_U_L2 .OR. U_F.NE.last_U_F) then + call ADD_MAP_L2andFo + last_U_L2 = U_L2 + last_U_F = U_F + endif + endif + endif + + do 200 U_Sp = par(1,USp),par(2,USp),par(3,USp) ! U(SPIEGEL) + parWert(USp) = U_Sp + + do 200 U_L1 = par(1,UL1),par(2,UL1),par(3,UL1) ! U(Linse 1) + parWert(UL1) = U_L1 + + do 200 U_L3 = par(1,UL3),par(2,UL3),par(3,UL3) ! U(Linse 3) + parWert(UL3) = U_L3 + +c die Magnetfelder: +c ----------------- + + do 200 B_Helm = par(1,BHelm),par(2,BHelm),par(3,BHelm) ! Helmholtzsp. + parWert(BHelm) = B_Helm + + do 200 B_TD = par(1,BTD),par(2,BTD),par(3,BTD) ! TD-Spule + parWert(BTD) = B_TD + +c Masse und Ladung: +c ----------------- + + do 200 m_ = par(1,mass),par(2,mass),par(3,mass) ! MASSE + if (.NOT.artList_defined) then + m = m_ + parWert(mass) = m + endif + + do 200 q_ = par(1,charge),par(2,charge),par(3,charge) ! LADUNG + if (.NOT.artList_defined) then + q = q_ + parWert(charge) = q + else + qIndxMu = q_ ! fuer Verwendung in function firstEventNr! + ArtNr = Art_Nr(q_) + m = Art_Masse(ArtNr) + q = Art_Ladung(ArtNr) + parWert(mass) = m + parWert(charge) = q + endif + ! gegebenenfalls ein Flag fuer die Beruecksichtigung des Myonen- + ! zerfalles setzen: + if (useDecay) then ! 'useDecay' setzt 'artList_defined' voraus + if (ArtNr.LE.4) then! es ist ein Myon involviert + useDecay_ = .true. + else ! kein Myon involviert + useDecay_ = .false. + endif + endif + + +c Beschleuniger: +c -------------- + + do 200 U_Tgt = par(1,UTgt),par(2,UTgt),par(3,UTgt) ! U(TARGET) + parWert(UTgt) = U_Tgt + do 200 U_Gua = par(1,UGua),par(2,UGua),par(3,UGua) ! U(GUARD) + parWert(UGua) = U_Gua + do 200 U_G1 = par(1,UG1),par(2,UG1),par(3,UG1) ! U(GITTER) + parWert(UG1) = U_G1 + parIndx(5) = parIndx(5) + 1 + + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c haeufig benoetigte Faktoren, die von der aktuellen Masse, Ladung und Hoch- +c spannungen abhaengen: +c (bei Linse 2 wird die Spannung direkt auf die Potentialmappe aufmultipliziert. +c Daher wird dort 'Beschl_Faktor' verwendet und kein 'Beschl_Faktor_L2' benoetigt) + + Energie_Faktor = m / (2.*c*c) + Beschl_Faktor = q / m * c*c + Beschl_Faktor_L1 = Beschl_Faktor * U_L1 + Beschl_Faktor_Sp = Beschl_Faktor * U_Sp + Beschl_Faktor_FO = Beschl_Faktor * U_F + Beschl_Faktor_L3 = Beschl_Faktor * U_L3 + Beschl_Faktor_M2 = Beschl_Faktor * U_MCP2 + + aFoil = - Beschl_Faktor * U_F / d_Grid_Folie + if (U_Sp.EQ.0. .OR. q.EQ.0.) then + Spiegel_Faktor = 0 + else + Spiegel_Faktor = 2.*dspiegel / (Beschl_Faktor * U_Sp) !<-- pruefen! + endif + + ! Die Beschleunigungen in den beiden (idealen) Beschleunigerstufen: + a1 = Beschl_Faktor * (U_Tgt - U_G1) / (XGrid1 - XTarget) + a2 = Beschl_Faktor * U_G1 / (XGrid2 - xGrid1) + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c Falls 'fromScratch': +c Die in den ab hier beginnenden Startparameter-Schleifen gesetzten Werte +c werden gegebenenfalls weiter unten durch zufallsverteilte Offsets modi- +c fiziert. (-> 'Zufallschleife': 'do 100 randomloop_ = 1, n_par(0)) +c Andernfalls: +c Wurden waehrend ACCEL oder 'foilfile' fuer die Startparameter Zufalls- +c verteilungen verwendet, so werden die entsprechenden Groessen aus dem +c betreffenden NTupel eingelesen. +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +c Startparameter: +c --------------- + + do 200 E0_ = par(1,ener),par(2,ener),par(3,ener) ! E0 + if (.NOT.random_E0) then + E0 = E0_ + v0_Betrag = sqrt(E0/Energie_Faktor) + endif + + if (E0InterFromFile) then + lowerE0 = E0Low(nInt(E0_)) + upperE0 = E0Low(nint(E0_+1)) + endif + + +c falls Energieverlustberechnung aus ICRU-Tabelle verlangt ist und mittlerer +c Energieverlust nicht fuer jedes Teilchen extra berechnet werden soll (sinnvoll +c wenn alle Teilchen gleiche Startenergie haben oder Streuung der Startenergien +c klein ist, so dass die Streuung des mittleren Energieverlustes vernachlaessigt +c werden kann): + + if (log_E_Verlust_ICRU .AND. .NOT.calculate_each) then + if (random_E0_equal) then + Ekin = E0_ + (upperE0+lowerE0)/2. + else + Ekin = E0_ + endif + if (Gebiet0.EQ.target .OR. Gebiet0.EQ.upToGrid1) then + Ekin = Ekin + q*(U_Tgt - U_F) + elseif (Gebiet0.EQ.upToGrid2) then + Ekin = Ekin + q*(U_G1 - U_F) + endif + call CALC_ELOSS_ICRU(Ekin,q,m,Thickness,mean_E_Verlust) + endif + + if (log_Meyer_F_Function) then + if (random_E0_equal) then + Ekin = E0_ + (upperE0+lowerE0)/2. + else + Ekin = E0_ + endif + if (Gebiet0.EQ.target .OR. Gebiet0.EQ.upToGrid1) then + Ekin = Ekin + q*(U_Tgt - U_F) + elseif (Gebiet0.EQ.upToGrid2) then + Ekin = Ekin + q*(U_G1 - U_F) + endif + effRedThick = Meyer_Faktor1 * Thickness + call Get_F_Function_Meyer(effRedThick,Ekin) + endif + + do 200 theta0_ = par(1,thetAng),par(2,thetAng),par(3,thetAng) ! theta0 + if (.NOT.random_angle) then + theta0 = theta0_ + Cos_theta0 = cosd(theta0) + Sin_theta0 = sind(theta0) + endif + do 200 phi0_ = par(1,phiAng),par(2,phiAng),par(3,phiAng) ! phi0 + if (.NOT.random_angle) then + phi0 = phi0_ + Cos_phi0 = cosd(phi0) + Sin_phi0 = sind(phi0) + endif + + do 200 y0_ = par(1,yPos),par(2,yPos),par(3,yPos) ! y0 + if (.NOT.random_pos) then + x0(2) = y0_ + endif + + do 200 z0_ = par(1,zPos),par(2,zPos),par(3,zPos) ! z0 + if (.NOT.random_pos) then + x0(3) = z0_ + endif + +c die folgenden parWert(n) werden u.U. in der 'Zufallsschleife' weiter unten +c abgeaendert. Hier werden sie in jedem Fall fuer Tabellenausgaben, Debug- +c angelegenheiten u.s.w. erst einmal mit den aktuellen Werten der +c entsprechenden Schleifen gefuellt: + + parWert(ener) = E0_ + parWert(thetAng) = theta0_ + parWert(phiAng) = phi0_ + parWert(yPos) = y0_ + parWert(zPos) = z0_ + + +c falls fruehere Simulation fortgefuehrt wird: +c Berechne diejenige Eventnummer in NTP_read, ab welcher die relevanten +c Simulationsparameter von ACCEL bzw. des 'FoilFiles' mit den gegenwaertigen +c MUTRACK-(Schleifen)-Parametern uebereinstimmen: + + if (.NOT.fromScratch) eventNr = firstEventNr() + + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c Hier folgen die Befehle, die zu Beginn jeder neuen Schleife faellig sind: +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + SchleifenNr = SchleifenNr + 1 ! Schleifen zaehlen + okStepsCounter = 0 ! 'okStepsCounter' dient der Bestimmung + ! der mittleren Anzahl von Integrations- + ! schritten bis zum Ziel + nNeutral = 0 ! noch wurden keine Teilchen in der TD-Folie + nCharged = 0 ! neutralisiert + +c Die Statistikspeicher resetten: +c Falls nur ein Teilchenstart pro Schleife erfolgt, nimm die Statistik ueber +c alle Schleifen. (Dann erfolgt der Reset nur bei der ersten Schleife): + + flag_ok = (.NOT.(OneStartPerLoop .AND. SchleifenNr.GT.1)) + + if (flag_ok) call reset_statistics + + +c Die Kammer zeichnen: +c Wird pro Schleife nur ein Teilchen gestartet ('OneStartPerLoop'; d.h. kein +c oder genau ein 'Zufallsstart'), so trage alle Trajektorien in die gleiche +c Graphik ein. Zeichne die Kammer dann also nur bei der ersten Schleife. + + if (GRAPHICS .AND. flag_ok) then + CALL IZPICT ('CHAM_1','M') ! ERZEUGEN VON BILDERN IM PAWC-COMM-BLOCK + CALL IZPICT ('CHAM_2','M') + CALL IZPICT ('HISTO','M') + CALL IZPICT ('TEXT','M') + call plot_chamber(schnitt_p) + call Graphics_Text ! Text fuer Textwindow erstellen + call text_plot ! Ausgabe des Textes + endif + + +c Ausgabe der aktuellen Settings: +c Auch dies im Falle von 'OneStartPerLoop' nur bei der ersten Schleife: + + if ((n_outWhere.NE.0 .OR. smallLogFile) .AND. flag_ok) then + call output_new_loop(q_) ! (q_) wegen der neutral fractions + endif + + +c Ausgabe der Prozentzahl schon gerechneten Trajektorien vorbereiten: + + if (log_percent) then + call time(uhrzeit) + percent_done = 0 + write(*,1001)Uhrzeit,' %: 0' + endif +1001 format ($,6x,A,A) + + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c bei 'fromScratch': +c Hier wird gegebenenfalls bei Zufallsverteilung von Startparametern ein ent- +c sprechend gewuerfelter Offset auf den aktuellen Wert aufgeschlagen. +c Ansonsten: +c Lies bei Zufallsverteilungen die entsprechenden Startwerte aus dem NTupel +c ein. +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + do 100 randomloop_ = 1, n_par(0) + + if (.NOT.fromScratch) then + + eventNr = eventNr + 1 ! Eventnummer im NTP + + if (smearS1Fo.AND.use_MUTRACK) call HGNTB(NTP_read,'S1FoS',eventNr,istat) + if (istat.NE.0) then + write(*,*) + write(*,*)' error executing ''call HGNTB(',NTP_read,',''S1FoS'',eventNr,istat)''' + write(*,*)' eventNr = ',eventNr + write(*,*)' -> STOP' + write(*,*) + call exit + endif + + ! Einlesen von 'Gebiet' und 'destiny': + call HGNTB(NTP_read,'dest',eventNr,istat) + ! gegebenenfallsvon freuher verwendete Gebietskodierung + ! (ohne Linse2) aktualisieren + if (gebiet.GE.10 .AND. MutrackVersionIndx.LE.1) gebiet = gebiet+2 + +c if (istat.NE.0) then +c write(*,*) +c write(*,*)' error executing ''call HGNTB(',NTP_read,',''dest'',eventNr,istat)''' +c write(*,*)' eventNr = ',eventNr +c write(*,*)' -> STOP' +c write(*,*) +c call exit +c endif + ! Einlesen der Trajektoriendaten 't,x(3),v(3)': + call HGNTB(NTP_read,'Traj',eventNr,istat) +c if (istat.NE.0) then +c write(*,*) +c write(*,*)' error executing ''call HGNTB(',NTP_read,',''Traj'',eventNr,istat)''' +c write(*,*)' eventNr = ',eventNr +c write(*,*)' -> STOP' +c write(*,*) +c call exit +c endif + + if (Use_Accel) then + ! Uebersetzen der von ACCEL verwendeten code_Nummern fuer die + ! moeglichen Teilchenschicksale in von MUTRACK verwendete + ! code_Nummern: + if (destiny.EQ.-5) then + destiny = code_frontOfMapAc + elseif (destiny.EQ.-4) then + destiny = code_leftMapAc + elseif (destiny.EQ.-3) then + gebiet = upToGrid2 + destiny = code_grid + elseif (destiny.EQ.-2) then + gebiet = upToGrid1 + destiny = code_grid + elseif (destiny.EQ.-1) then + destiny = code_hit_TgtHolder + elseif (destiny.EQ.code_ok) then + Gebiet = upToHeShield + elseif (destiny.EQ.+1) then + destiny = code_decay + elseif (destiny.EQ.+2) then + destiny = code_reflektiert + elseif (destiny.EQ.+3) then + destiny = code_wand + elseif (destiny.EQ.+4) then + destiny = code_lost + elseif (destiny.EQ.+5) then + destiny = code_dtsmall + else + write(*,*)'UNKNOWN ACCEL-CODE-NR: destiny = ',destiny + call exit + endif + + ! Auf xGrid2 zurueckrechnen, damit unabhaengiger Test auf + ! Treffer des He-Fensters gemacht werden kann (nur, falls + ! Teilchen nicht schon anderweitig gestorben ist). Auch + ! notwendig fuer Graphikausgabe. + + if (destiny.EQ.0) then + dt = (xGrid2-x(1))/v(1) ! < 0. + t = t + dt + x(1) = xGrid2 + x(2) = x(2)+v(2)*dt + x(3) = x(3)+v(3)*dt + endif + + ! falls Kryo verdreht ist, rechne in Kammerkoordinaten um: + + if (alfaTgt.NE.0.) then + if (alfaTgtVertically) then + help1 = x(1) + x(1) = help1 * Cos_alfaTgt - x(3) * Sin_alfaTgt + x(3) = help1 * Sin_alfaTgt + x(3) * Cos_alfaTgt + help1 = v(1) + v(1) = help1 * Cos_alfaTgt - v(3) * Sin_alfaTgt + v(3) = help1 * Sin_alfaTgt + v(3) * Cos_alfaTgt + else + help1 = x(1) + x(1) = help1 * Cos_alfaTgt - x(2) * Sin_alfaTgt + x(2) = help1 * Sin_alfaTgt + x(2) * Cos_alfaTgt + help1 = v(1) + v(1) = help1 * Cos_alfaTgt - v(2) * Sin_alfaTgt + v(2) = help1 * Sin_alfaTgt + v(2) * Cos_alfaTgt + endif + endif + + endif + + endif + + if (random_E0) then ! random_ENERGIE + if (fromScratch) then + if (random_E0_equal) then ! -> gleichverteilt +300 E0 = E0_ + lowerE0 + (upperE0 - lowerE0)*ran(seed) + if (E0.LT.0) goto 300 + elseif (random_E0_gauss) then ! -> gaussverteilt +310 call Gauss_Verteilung(sigmaE0,help1) + E0 = E0_ + help1 + if (E0.LT.0) goto 310 + endif + else + ! Einlesen von 'E0' aus NTP: + call HGNTB(NTP_read,'E0',eventNr,istat) +c if (istat.NE.0) then +c write(*,*) +c write(*,*)' error executing ''call HGNTB(NTP_read,''E0'',eventNr,istat)''' +c write(*,*)' eventNr = ',eventNr +c write(*,*)' -> STOP' +c write(*,*) +c call exit +c endif + endif + parWert(ener) = E0 + v0_Betrag = sqrt(E0/Energie_Faktor) + endif + + if (random_pos) then ! random_POSITION + if (fromScratch) then + if (random_y0z0_equal) then ! -> rechteckig, gleichverteilt + x0(2) = StartBreite * (ran(seed)-.5) + x0(3) = StartHoehe * (ran(seed)-.5) + elseif (random_y0z0_Gauss) then ! -> rechteckig, Gaussverteilt +320 r0 = abs(sigmaPosition*sqrt(-2.*log(1.-ran(seed)))) + phi_r0= 360.*ran(seed) + x0(2) = r0 * cosd(phi_r0) + if (abs(x0(2)).GT.StartBreite/2.) goto 320 + x0(3) = r0 * sind(phi_r0) + if (abs(x0(3)).GT.StartHoehe/2.) goto 320 + elseif (random_r0_equal) then ! -> rund, gleichverteilt + r0 = StartRadius * sqrt(ran(seed)) + phi_r0= 360. * ran(seed) + x0(2) = r0 * cosd(phi_r0) + x0(3) = r0 * sind(phi_r0) + elseif (random_r0_Gauss) then ! -> rund, Gaussverteilt +330 r0 = abs(sigmaPosition*sqrt(-2.*log(1.-ran(seed)))) + if (r0.GT.StartRadius) goto 330 + phi_r0= 360.*ran(seed) + x0(2) = r0 * cosd(phi_r0) + x0(3) = r0 * sind(phi_r0) + endif + x0(2) = y0_ + x0(2) + x0(3) = z0_ + x0(3) + else + ! Einlesen von 'x0(3)' aus NTP: + call HGNTB(NTP_read,'x0',eventNr,istat) +c if (istat.NE.0) then +c write(*,*) +c write(*,*)' error executing ''call HGNTB(',NTP_read,',''x0'',eventNr,istat)''' +c write(*,*)' eventNr = ',eventNr +c write(*,*)' -> STOP' +c write(*,*) +c call exit +c endif + endif + parWert(yPos) = x0(2) + parWert(zPos) = x0(3) + endif + + if (random_angle) then ! random_WINKEL + if (fromScratch) then +340 if (random_lambert) then ! -> Lambert-verteilt + call lambert_verteilung(StartLambertOrd, + + Cos_theta0,Sin_theta0) + theta0 = acosd(Cos_theta0) + elseif (random_gauss) then + call Gauss_Verteilung_theta(sigmaWinkel,theta0) + Cos_theta0 = cosd(theta0) + Sin_theta0 = sind(theta0) + endif + + phi0 = 360.*ran(seed) + Cos_phi0 = cosd(phi0) + Sin_phi0 = sind(phi0) + + if (angle_offset) then + +c -> Es soll aus gewuerfelter Startrichtung (theta0,phi0) und durch die Winkel- +c schleifen vorgegebenen Startrichtung (theta0_,phi0_) die tatsaechliche +c Startrichtung berechnet werden. Dafuer werden die gewuerfelten Winkel als +c 'Streuwinkel' betrachtet. +c Vorgehensweise: +c Es werden die Komponenten eines Geschwindigkeitsvektors mit Betrag=1 und durch +c theta0_,phi0_ bestimmter Richtung berechnet. Danach werden die Komponenten des +c mit theta0,phi0 gestreuten Geschwindigkeitsvektors und die zugehoerigen Winkel +c gewonnen, die dann als neuetheta0,phi0 als die tatsaechlichen Startwinkel +c verwendet werden. Das alles geschieht vollkommen analog zur Winkelaufstreuung +c in der Triggerfolie. +c v wird als Hilfsvariable missbraucht. + + ! Berechnung der 'Geschwindigkeitskomponenten': + v(1) = cosd(theta0_) + help1 = sind(theta0_) + v(2) = help1 * cosd(phi0_) + v(3) = help1 * sind(phi0_) + ! v_xy ist stets groesser 0 ausser wenn die Zentralrichtung + ! senkrecht nach oben oder unten gerichtet ist. Diese Wahl ist + ! aber sowieso wenig sinnvoll: + v_xy = SQRT(v(1)*v(1) + v(2)*v(2)) + if (v_xy.EQ.0.) then + write(*,*) + write(*,*)' Bei Zufallsverteilung fuer Startwinkel darf die durch die Winkelschleifen' + write(*,*)' vorgegebene Zentralrichtung nicht senkrecht nach oben oder nach unten weisen!' + write(*,*)' -> STOP' + STOP + endif + ! berechne neue 'Geschwindigkeitskomponenten': + help1 = v(1) + help2 = v(2) + help3 = Sin_theta0*Cos_phi0/v_xy + help4 = Sin_theta0*Sin_phi0 + v(1) = Cos_theta0*help1 - help3*help2 - help4*help1*v(3)/v_xy + if (v(1).LT.0.) goto 340 + v(2) = Cos_theta0*help2 + help3*help1 - help4*help2*v(3)/v_xy + v(3) = Cos_theta0*v(3) + help4*v_xy + ! Berechne tatsaechlichen Startwinkel: + if (v(2).EQ.0. .AND. v(3).EQ.0.) then + if (v(1).GE.0) then + theta0 = 0. + else + theta0 = 180. + endif + phi0 = 0. + else + theta0 = acosd(v(1)) + phi0 = atan2d(v(3),v(2)) + if (phi0.LT.0) phi0 = phi0+360. + endif + Cos_theta0 = cosd(theta0) + Sin_theta0 = sind(theta0) + Cos_phi0 = cosd(phi0) + Sin_phi0 = sind(phi0) + endif + + if (theta0.GT.90.) goto 340 + + else + + ! Einlesen von 'theta0' und 'phi0' aus NTP: + call HGNTB(NTP_read,'angle0',eventNr,istat) +c if (istat.NE.0) then +c write(*,*) +c write(*,*)' error executing ''call HGNTB(',NTP_read,',''angle0'',eventNr,istat)''' +c write(*,*)' eventNr = ',eventNr +c write(*,*)' -> STOP' +c write(*,*) +c call exit +c endif + + endif + + parWert(thetAng) = theta0 + parWert(phiAng) = phi0 + + endif + + ! Berechnung der Start-Geschwindigkeitskomponenten: + v0(1) = v0_Betrag * Cos_theta0 + v0(2) = v0_Betrag * Sin_theta0 * Cos_phi0 + v0(3) = v0_Betrag * Sin_theta0 * Sin_phi0 + + if (fromScratch) then + ! den Zeit-Speicher resetten: + t = 0. + ! Startparameter in Koordinatenspeicher uebergeben: + do i = 1, 3 + x(i) = x0(i) + v(i) = v0(i) + enddo + endif + + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c Hier folgen die restl. Vorbereitungen zum Start des individuellen Projektils: +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +c n_dtsmall resetten: + + n_dtsmall = 0 + + +c Aufstreuwinkel resetten: + + thetaAufstreu = 0. + phiAufstreu = 0. + + +c x-Komponente der Startgeschwindigkeit ueberpruefen: + + if (v0(1).LT.0) then + write(*,*) + write(*,*) ' >>>> v(x) beim Start negativ!' + write(*,*) + call exit + endif + + +c die Lebensdauer wuerfeln: +c (wird eine fruehere Simulation fortgefuehrt und wurde dort bereits der Myonen- +c zerfall beruecksichtigt, so verwende die dort gewuerfelten Lebenszeiten) + + if (UseDecay_) then + if (.NOT.UseDecay_prevSim) then +350 lifeTime = -meanlifeTime * Log(Ran(seed) + 1.0E-37) + if (lifeTime.LE.0.) goto 350 + elseif (.NOT.fromScratch) then + call HGNTB(NTP_read,'lifetime',eventNr,istat) +c if (istat.NE.0) then +c write(*,*) +c write(*,*)' error executing ''call HGNTB(',NTP_read,',''lifetime'',eventNr,istat)''' +c write(*,*)' eventNr = ', eventNr +c write(*,*)' -> STOP' +c write(*,*) +c call exit +c endif + endif + endif + + +c die Ladung resetten (falls in der Folie Neutralisierung stattgefunden hat): +c ('qInt' wird fuer 'NTP_charge' benoetigt) + + q = parWert(charge) + qInt = int(q) + + +c Ausgabe der Prozentzahl schon gerechneter Trajektorien: + + if (log_percent) then + if (100.*real(start_nr(1))/real(n_par(0)) + + .GE.percent_done+5) then + percent_done = percent_done + 5 + write(*,1002) percent_done + endif + endif +1002 format ($,'+',I3) + + +c andere Variablen auf den richtigen Stand bringen: + + if (fromScratch) then + destiny = code_ok ! bis jetzt ist dem Teilchen noch nichts zugestossen + Gebiet = Gebiet0 + endif + + start_nr(1) = start_nr(1) + 1 ! Projektil-Startnummer erhoehen + steps = 0 ! es wurden noch keine Integrationsschritte durchgefuehrt + NTPalreadyWritten = .false. ! fuer 'createFoilFile' + + +c die DEBUG-Daten ausgeben: + + if (Debug .AND. start_Nr(1).LE.DEBUG_Anzahl) then + Debug_ = .true. + call output_new_particle + call Output_Debug + else + Debug_ = .false. + endif + + +c StartKoordinaten fuer Graphikausgabe sichern: + + if (graphics .AND. (start_Nr(1).LE.graphics_Anzahl .OR. OneStartPerLoop)) then + graphics_ = .true. + if (Use_ACCEL) then + nKoord = 1 + xKoord(1) = x0(1) + yKoord(1) = x0(2) + zKoord(1) = x0(3) + else + nKoord = 0 + endif + if (.NOT.(Use_MUTRACK.OR.Gebiet0.EQ.upToExTD)) call Save_Graphics_Koord + else + graphics_ = .false. + endif + + +c gegebenenfalls 'fill_NTP' resetten: + + if (Fo_triggered.OR.M2_triggered.OR.xM2_triggered) fill_NTP = .false. + + +c Falls Schrittweiteninformationen im NTupel verlangt sind: Speicher resetten +c und Startkoordinaten sichern: + +d if (NTP_steps) then +d dtmin_L1 = +1.e10 +d x_dtmin_L1(1) = 0 +d x_dtmin_L1(2) = 0 +d x_dtmin_L1(3) = 0 +d dtmax_L1 = -1.e10 +d x_dtmax_L1(1) = 0 +d x_dtmax_L1(2) = 0 +d x_dtmax_L1(3) = 0 +d +d dtmin_L2andFo = +1.e10 +d x_dtmin_L2andFo(1) = 0 +d x_dtmin_L2andFo(2) = 0 +d x_dtmin_L2andFo(3) = 0 +d dtmax_L2andFo = -1.e10 +d x_dtmax_L2andFo(1) = 0 +d x_dtmax_L2andFo(2) = 0 +d x_dtmax_L2andFo(3) = 0 +d +d dtmin_FO = +1.e10 +d x_dtmin_FO(1) = 0 +d x_dtmin_FO(2) = 0 +d x_dtmin_FO(3) = 0 +d dtmax_FO = -1.e10 +d x_dtmax_FO(1) = 0 +d x_dtmax_FO(2) = 0 +d x_dtmax_FO(3) = 0 +d +d dtmin_L3 = +1.e10 +d x_dtmin_L3(1) = 0 +d x_dtmin_L3(2) = 0 +d x_dtmin_L3(3) = 0 +d dtmax_L3 = -1.e10 +d x_dtmax_L3(1) = 0 +d x_dtmax_L3(2) = 0 +d x_dtmax_L3(3) = 0 +d +d dtmin_M2 = +1.e10 +d x_dtmin_M2(1) = 0 +d x_dtmin_M2(2) = 0 +d x_dtmin_M2(3) = 0 +d dtmax_M2 = -1.e10 +d x_dtmax_M2(1) = 0 +d x_dtmax_M2(2) = 0 +d x_dtmax_M2(3) = 0 +d endif + + if (NTP_40mm) then + x40(2) = 0. + x40(3) = 0. + v40(1) = 0. + v40(2) = 0. + v40(3) = 0. + t40 = 0. + E40 = 0. + endif + + +c Die Flugzeiten resetten: + + S1xM2 = 0. + S1M2 = 0. + S1Fo = 0. + FoM2 = 0. + S1M3 = 0. + M3M2 = 0. + + +c Falls das Teilchen schon nicht mehr existiert, gehe gleich zur Ausgabe: + + if (destiny.NE.code_ok) goto 555 ! (nur bei '.NOT.fromScratch' moeglich) + + +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +c hier starten die Projektile: +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz + + goto startLabel ! StartLabel = Gebiet0 als label + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c erste Beschleunigerstufe: (homogenes Feld) + +1 Gebiet = upToGrid1 + steps = Steps + 1 + + if (a1.NE.0.) then + help1 = v(1)*v(1) + 2.*a1*(xGrid1-x(1)) + if (help1.LT.0) then ! Reflektion noch vor 1. Gitter + dt = -2*v(1)/a1 + t = t + dt + !x(1) bleibt unveraendert + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + v(1) = -v(1) + !v(2) bleibt unveraendert + !v(3) bleibt unveraendert + destiny = code_reflektiert + goto 555 + endif + dt = (sqrt(help1) - v(1))/a1 + ! (ergibt sich aus x=v*t+1/2*a*t**2 mit richtiger V.Z.-Wahl ('+')) + v(1) = v(1) + a1*dt + else + if (v(1).EQ.0) then + write(*,*) + write(*,*)'ERROR: v(x) beim Start = 0. und '// + + 'Beschleunigung = 0' + write(*,*) + STOP + endif + dt = (xGrid1-xTarget) / v(1) + endif + + t = t + dt + !v(2) bleibt unveraendert + !v(3) bleibt unveraendert + x(1) = xGrid1 + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + +c - Aufgeschlagen? + + if (Abs(x(2)).gt.dygrid1/2. .OR. + + Abs(x(3)).gt.dzgrid1/2.) then + flag = .true. + destiny = code_wand + else + flag = .false. + endif + +c - Gitterstab getroffen? + + if (testOnWireHit) then + DrahtNr = nInt(x(2)/dist_Wires_G1) + distToWire(1) = 0. + distToWire(2) = x(2) - DrahtNr * dist_Wires_G1 + call Test_WireHit(distToWire,WireRadiusQuad_G1,v(1),v(2),WireHit) + if (WireHit) then + flag = .true. + destiny = code_grid + endif + endif + +c - Koordinatentransformation in Kammersystem: + + if (alfaTgt.NE.0.) then + if (alfaTgtVertically) then + help1 = x(3) + help2 = v(1) + help3 = v(3) + x(1) = xgrid1 * Cos_alfaTgt - help1 * Sin_alfaTgt + x(3) = xgrid1 * Sin_alfaTgt + help1 * Cos_alfaTgt + v(1) = help2 * Cos_alfaTgt - help3 * Sin_alfaTgt + v(3) = help2 * Sin_alfaTgt + help3 * Cos_alfaTgt + else + help1 = x(2) + help2 = v(1) + help3 = v(2) + x(1) = xgrid1 * Cos_alfaTgt - help1 * Sin_alfaTgt + x(2) = xgrid1 * Sin_alfaTgt + help1 * Cos_alfaTgt + v(1) = help2 * Cos_alfaTgt - help3 * Sin_alfaTgt + v(2) = help2 * Sin_alfaTgt + help3 * Cos_alfaTgt + endif + endif + +c - zerfallen? + + if (useDecay_) call Decay_Test(*555) + +c - falls aufgeschlagen: + + if (flag) goto 555 + +c - Koordinatentransformation zurueck in Beschleunigersystem: + + if (alfaTgt.NE.0.) then + if (alfaTgtVertically) then + x(1) = xGrid1 + x(3) = help1 + v(1) = help2 + v(3) = help3 + else + x(1) = xGrid1 + x(2) = help1 + v(1) = help2 + v(2) = help3 + endif + endif + +c - Datenausgabe: + + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c zweite Beschleunigerstufe: (homogenes Feld) + +2 Gebiet = upToGrid2 + steps = Steps + 1 + + if (a2.NE.0.) then + help1 = v(1)*v(1) + 2.*a2*(XGrid2-XGrid1) + if (help1.LT.0) then ! Reflektion noch vor 2. Gitter + dt = -2*v(1)/a2 + t = t + dt + !x(1) bleibt unveraendert + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + v(1) = -v(1) + !v(2) bleibt unveraendert + !v(3) bleibt unveraendert + destiny = code_reflektiert + goto 555 + endif + dt = (sqrt(help1) - v(1))/a2 + v(1) = v(1) + a2*dt + else + if (v(1).EQ.0) then ! (kann nur bei Start in 2. Stufe passieren) + write(*,*) + write(*,*)'ERROR: v(x) beim Start = 0. und '// + + 'Beschleunigung = 0' + write(*,*) + STOP + endif + dt = (XGrid2-XGrid1) / v(1) + endif + + t = t + dt + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + +c - Aufgeschlagen? + + if (Abs(x(2)).gt.dygrid2/2. .OR. + + Abs(x(3)).gt.dzgrid2/2.) then + flag = .true. + destiny = code_wand + else + flag = .false. ! <- noetig, falls Start auf 1. Gitter + endif + +c - Gitterstab getroffen? + + if (testOnWireHit) then + DrahtNr = nInt(x(2)/dist_Wires_G2) + distToWire(1) = 0 + distToWire(2) = x(2) - DrahtNr * dist_Wires_G2 + call Test_WireHit(distToWire,WireRadiusQuad_G2,v(1),v(2),WireHit) + if (WireHit) then + flag = .true. + destiny = code_grid + endif + endif + +c - Koordinatentransformation in Kammersystem: + + if (alfaTgt.NE.0.) then + if (alfaTgtVertically) then + x(1) = xgrid2 * Cos_alfaTgt - x(3) * Sin_alfaTgt + x(3) = xgrid2 * Sin_alfaTgt + x(3) * Cos_alfaTgt + help1 = v(1) + v(1) = help1 * Cos_alfaTgt - v(3) * Sin_alfaTgt + v(3) = help1 * Sin_alfaTgt + v(3) * Cos_alfaTgt + else + x(1) = xgrid2 * Cos_alfaTgt - x(2) * Sin_alfaTgt + x(2) = xgrid2 * Sin_alfaTgt + x(2) * Cos_alfaTgt + help1 = v(1) + v(1) = help1 * Cos_alfaTgt - v(2) * Sin_alfaTgt + v(2) = help1 * Sin_alfaTgt + v(2) * Cos_alfaTgt + endif + else + x(1) = xgrid2 + endif + +c - zerfallen? + + if (useDecay_) call Decay_Test(*555) + +c - falls aufgeschlagen: + + if (flag) goto 555 + +c - Datenausgabe: + + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c zwischen zweitem Gitter und He-Shield: (feldfrei) + +3 Gebiet = upToHeShield + Steps = Steps + 1 + + radiusQuad = x(1)*x(1) + x(2)*x(2) + help1 = v(1)*v(1)+v(2)*v(2) + help2 = x(1)*v(1)+x(2)*v(2) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_HeShield))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) ! den Ort berechnen, an dem + x(2) = x(2) + dt*v(2) ! das Teilchen das Schild + x(3) = x(3) + dt*v(3) ! durchquert + + if (useDecay_) call Decay_Test(*555) + if (Abs(x(2)).gt.DYHESHIELD/2. .OR. + + Abs(x(3)).gt.DZHESHIELD/2.) then + destiny = code_wand + goto 555 + endif + if (Debug_) call Output_Debug + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c Groessen bei x=40 mm berechnen: + + if (NTP_40mm) then + dt = (40-x(1))/v(1) + x40(2) = x(2)+v(2)*dt + x40(3) = x(3)+v(3)*dt + v40(1) = v(1) + v40(2) = v(2) + v40(3) = v(3) + t40 = t + dt + ! help1 = v(1)*v(1)+v(2)*v(2) noch bekannt von 'upToHeShield' + v_square = help1 + v(3)*v(3) + E40 = v_square * Energie_Faktor + endif + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c zwischen He-Shield und LN-Shield: (feldfrei) + +4 Gebiet = upToLNShield + Steps = Steps + 1 + + radiusQuad = x(1)*x(1) + x(2)*x(2) + ! help1 = v(1)*v(1)+v(2)*v(2) ! noch bekannt von 'upToHeShield' + help2 = x(1)*v(1)+x(2)*v(2) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_LNShield))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) ! den Ort berechnen, an dem + x(2) = x(2) + dt*v(2) ! das Teilchen das Schild + x(3) = x(3) + dt*v(3) ! durchquert + + if (useDecay_) call Decay_Test(*555) + if (abs(x(2)).gt.dyLNShield/2. .OR. + + Abs(x(3)).gt.dzLNShield/2.) then + destiny = code_wand + goto 555 + endif + if (Debug_) call Output_Debug + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c zwischen LN-Shield und Beginn der L1-Mappe: (feldfrei) + +5 Gebiet = upToL1Map + Steps = Steps + 1 + + dt = (xEnterMap_L1 - x(1)) / v(1) + + t = t + dt + x(1) = xEnterMap_L1 + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then + help1 = v(2)*v(2)+v(3)*v(3) + help2 = x(2)*v(2)+x(3)*v(3) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_Rohr))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) ! den Ort berechnen, an dem + x(2) = x(2) + dt*v(2) ! das Teilchen auf das Rohr + x(3) = x(3) + dt*v(3) ! aufschlaegt + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + destiny = code_wand + goto 555 + endif + if (useDecay_) call Decay_Test(*555) + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + if (radiusQuad.GT.radiusQuad_L1) then ! Teilchen fliegt an L1 vorbei + destiny = code_vorbei + goto 555 + endif + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c innerhalb L1: (inhom. Felder -> Integrationen) + +6 Gebiet = upToExL1 ! GebietsNummer fuer L1 setzen + +c Teste, ob das Teilchen ueberhaupt eine Beschleunigung erfaehrt (Spannung=0?, +c Ladung=0?). Falls nicht, steppe gleich bis zum Mappenende: + + if (Beschl_Faktor_L1.EQ.0) then +d dtmax_L1 = 0. +d dtmin_L1 = 0. + dt = (xLeaveMap_L1 - x(1)) / v(1) ! Zeit bis zum Mappenende + x(1) = xLeaveMap_L1 + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + goto 5106 + endif + +c............................................................................... +c Das Teilchen spuert eine Beschleunigung, es muss also integriert werden. +c Gehe als ersten Versuch 0.5 mm in das Gebiet hinein: + + dt = .5/v(1) + zaehler = 0 + +c............................................................................... +c hierher wird zurueckgesprungen, solange die Integration in der L1 bleibt + +5006 call INTEGRATIONSSTEP_RUNGE_KUTTA_L1(dt) +d if (NTP_steps) then +d if (dt.LT.dtmin_L1) then +d dtmin_L1 = dt +d x_dtmin_L1(1) = x(1) +d x_dtmin_L1(2) = x(2) +d x_dtmin_L1(3) = x(3) +d endif +d if (dt.GT.dtmax_L1) then +d dtmax_L1 = dt +d x_dtmax_L1(1) = x(1) +d x_dtmax_L1(2) = x(2) +d x_dtmax_L1(3) = x(3) +d endif +d endif + +c............................................................................... +5106 Steps = Steps + 1 ! neuer Ort, Zeit und Geschwindigkeit sind festgelegt + +c do some tests: + + if (destiny.EQ.code_dtSmall) then ! n_dtsmall>maxBelowDtSmall + goto 555 + elseif (destiny.EQ.code_wand) then ! aufgeschlagen + radiusQuad = x(2)*x(2) + x(3)*x(3) ! -> den Ort berechnen, an + help1 = v(2)*v(2)+v(3)*v(3) ! dem das Teilchen auf- + help2 = x(2)*v(2)+x(3)*v(3) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_L1))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) + x(2) = x(2) + dt*v(2) + x(3) = x(3) + dt*v(3) + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + goto 555 +c elseif (destiny.NE.code_ok) then ! voruebergehend fuer Testzwecke +c write(*,*) +c write(*,*)'L1-1: ''destiny.NE.code_ok'' where it should -> STOP' +c write(*,*)' destiny = ',destiny,': ',code_text(destiny) +c write(*,*) +c STOP + elseif (useDecay_) then ! zerfallen? + call Decay_Test(*555) + endif + + if (x(1).LT.xEnterMap_L1) then + if (v(1).LT.0) then ! reflektiert? + destiny = code_reflektiert + goto 555 + else ! darf nicht sein! + write(*,*) + write(*,*)' L1: x(1).LT.xEnterMap .AND. v(1).GE.0. -> STOP' + write(*,*) + STOP + endif + elseif (Steps.GE.MaxStep) then ! Teilchen verloren + destiny = code_lost + goto 555 + elseif (x(1).GE.xLeaveMap_L1) then ! Verlasse L1 + dt = (xLeaveMap_L1 - x(1))/v(1) ! rechne zurueck auf exaktes + t = t + dt ! Mappenende + x(1) = xLeaveMap_L1 + x(2) = x(2) + dt*v(2) + x(3) = x(3) + dt*v(3) + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + goto bis_Spiegel ! -> Mache bei upToEnSp weiter +c elseif (destiny.NE.code_ok) then ! voruebergehend fuer Testzwecke +c write(*,*) +c write(*,*)'L1-2: ''destiny.NE.code_ok'' where it should -> STOP' +c write(*,*)' destiny = ',destiny,': ',code_text(destiny) +c write(*,*) +c STOP + endif + + +c verarbeite alle 'imonitor' Schritte die Koordinaten fuer GRAPHICS und DEBUG: + + if (GRAPHICS_.or.Debug_) then + zaehler = zaehler + 1 + if (zaehler.EQ.iMonitor) then + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + zaehler = 0 + endif + endif + + goto 5006 ! naechster Integrationsschritt in L1-Mappe + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c zwischen Linse 1 und Spiegel: (feldfrei) + +7 Gebiet = upToEnSp + Steps = Steps + 1 + +c - berechne Schnittpunkt mit forderer Spiegelebene: + + help2 = v(2)/v(1) ! Steigung der Bahn in der x-y-Ebene + + if (help2.GE.Tan_alfaSp) then + ! Teilchen fliegt am Spiegel vorbei + dt = (600-x(1))/v(1) + t = t + dt + x(1) = x(1) + v(1)*dt + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + if (useDecay_) call Decay_Test(*555) + destiny = code_vorbei + goto 555 + else + ! help1 == neues x(1) + help1 = (x(2) - y_intersectSP + xSpiegel*Tan_alfaSp + + - xLeaveMap_L1*help2) / (Tan_alfaSp - help2) + + dt = (help1-x(1)) / v(1) + t = t + dt + x(1) = help1 + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + endif + + if (useDecay_) call Decay_Test(*555) + if (Debug_) call Output_Debug + + +c Berechnung der Trajektorie bei idealem Spiegel: + + if (idealMirror) then ! ~~~ 40: if ~~~~~~~~~~~ + +c - pruefe, ob das Teilchen die ForderSEITE des Spiegels trifft: + + if ( x(2).GT.yUppLeft .OR. x(2).LT.yLowLeft .OR. + + abs(x(3)).GT.HSpiegel/2.) then + ! -> Teilchen fliegt am Spiegel vorbei + dt = (600-x(1))/v(1) + t = t + dt + x(1) = x(1) + v(1)*dt + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + destiny = code_vorbei + goto 555 + endif + + +c - pruefe, ob das Teilchen einen Gitterstab des Spiegels trifft: + + if (testOnWireHit) then + help1 = x(2)-yLowLeft ! Abstand zum Bezugspunkt + DrahtNr = nInt(help1/(Sin_alfaSp*dist_Wires_Sp)) + distToWire(2) = help1 - DrahtNr * Sin_alfaSp*dist_Wires_Sp + distToWire(1) = distToWire(2)/Tan_alfaSp + call Test_WireHit(distToWire,WireRadiusQuad_Sp,v(1),v(2),WireHit) + if (WireHit) then + destiny = code_grid + goto 555 + endif + endif + + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c im Spiegel: (homogenes Feld) + +8 Gebiet = upToExSp + Steps = Steps + 1 + +c - pruefe, ob Teilchen nicht zuviel Energie senkrecht zum Spiegel hat: + + if (Spiegel_Faktor.EQ.0.) then ! Spannung=0. oder q=0 + dt = (600-x(1))/v(1) + t = t + dt + x(1) = x(1) + v(1)*dt + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + destiny = code_durchSpiegel + goto 555 + endif + + ! help1 == Winkel in xy-Ebene zwischen Bewegungsrichtung und Spiegelfront + + help1 = alfaSp - atand(v(2)/v(1)) + + ! help2 = Geschw.Komponente senkrecht auf den Spiegel gerichtet + ! help3 = Geschw.Komponente parallel zum Spiegel, zu positiven y hin + + v_xy = sqrt( v(1)*v(1) + v(2)*v(2) ) + help2 = sind(help1) * v_xy + help3 = cosd(help1) * v_xy + + if (help2*help2*Energie_Faktor.GE.q*U_Sp) then + ! Teilchen tritt durch Spiegel durch + dt = (600-x(1))/v(1) + t = t + dt + x(1) = x(1) + v(1)*dt + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + destiny = code_durchSpiegel + goto 555 + endif + + if (Graphics_) call Save_Graphics_Koord + + +c - berechne Zeit, bis Teilchen wieder auf Spiegelforderseite ist: + + dt = help2 * Spiegel_Faktor ! Spiegel_Faktor == 2 / a + t = t + dt + +c - berechne Versetzung in xy-Ebene, parallel zur Spiegelebene, +c in 'positiver y-Richtung' (speichere in 'help1'): + + help1 = help3*dt + +c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +c falls Graphikausgabe verlangt ist: +c Um die Teilchenbahn im Innern des Spiegels anzudeuten, berechne die Orte bei +c t+dt/4, t+td/2 und t+3dt/4. Bestimme dafuer erst die jeweilige Versetzung +c senkrecht zur Spiegelebene aus dx = vx * t + 1/2 * a * t**2. +c (speichere in help4): + + if (Graphics_) then + + help4 = help2*dt*.25 - (dt*dt*.0625)/Spiegel_faktor + nKoord = nKoord + 1 + xKoord(nKoord) = x(1)+help4*Sin_alfaSp+help1*.25*Cos_alfaSp + yKoord(nKoord) = x(2)-help4*Cos_alfaSp+help1*.25*Sin_alfaSp + zKoord(nKoord) = x(3) + v(3)*dt*.25 + + help4 = help2*dt*.50 - (dt*dt*.2500)/Spiegel_faktor + nKoord = nKoord + 1 + xKoord(nKoord) = x(1)+help4*Sin_alfaSp+help1*.50*Cos_alfaSp + yKoord(nKoord) = x(2)-help4*Cos_alfaSp+help1*.50*Sin_alfaSp + zKoord(nKoord) = x(3)+v(3)*dt*.50 + + help4 = help2*dt*.75 - (dt*dt*.5625)/Spiegel_faktor + nKoord = nKoord + 1 + xKoord(nKoord) = x(1)+help4*Sin_alfaSp+help1*.75*Cos_alfaSp + yKoord(nKoord) = x(2)-help4*Cos_alfaSp+help1*.75*Sin_alfaSp + zKoord(nKoord) = x(3)+v(3)*dt*.75 + + endif +c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + +c - berechne Austrittsort: + + x(1) = x(1) + help1 * Cos_alfaSp + x(2) = x(2) + help1 * Sin_alfaSp + x(3) = x(3) + v(3)*dt + + +c - berechne Austrittsgeschwindigkeit (help2 geht bei Spiegelung in -help2 ueber): + + v(1) = help3 * Cos_alfaSp - help2 * Sin_alfaSp + v(2) = help2 * Cos_alfaSp + help3 * Sin_alfaSp + + if (v(2).LE.0) then + write(*,*) + write(*,*)'ERROR: nach Spiegel ist v(y) <= 0.' + write(*,*) + STOP + endif + + if (useDecay_) call Decay_Test(*555) + + +c - pruefe, ob Austrittspunkt auf forderer Spiegelflaeche liegt: + + if (x(2).GT.yUppLeft .OR. x(2).LT.yLowLeft .OR. + + abs(x(3)).GT.hSpiegel/2.) then + ! Teilchen trifft auf Spiegelwand + destiny = code_wand + goto 555 + endif + + +c - pruefe, ob das Teilchen einen Gitterstab des Spiegels trifft: + + if (testOnWireHit) then + help1 = x(2)-yLowLeft ! Abstand zum Bezugspunkt + DrahtNr = nInt(help1/(Sin_alfaSp*dist_Wires_Sp)) + distToWire(2) = help1 - DrahtNr * Sin_alfaSp*dist_Wires_Sp + distToWire(1) = distToWire(2)/Tan_alfaSp + call Test_WireHit(distToWire,WireRadiusQuad_Sp,v(1),v(2),WireHit) + if (WireHit) then + destiny = code_grid + goto 555 + endif + endif + + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + + goto 9 + + endif ! ~~~ 40: endif ~~~~ + + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c innerhalb der Spiegelmappe (dx = 0.050 mm, dy = 0.050 mm) + + Gebiet = upToExSp + nKoordSave = nKoord + +c Die Anweisungen dieses Abschnitts verlaufen analog zu denen +c von Linse 1. -> Fuer Kommentare siehe dort! + + if (Beschl_Faktor_Sp.EQ.0. .OR. q.EQ.0) then +d dtmax_Sp = 0. +d dtmin_Sp = 0. + dt = (600-x(1))/v(1) + t = t + dt + x(1) = x(1) + v(1)*dt + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + destiny = code_durchSpiegel + goto 555 + endif + + dt = 0.5/v(1) + + reachedEndOfMap = .false. + zaehler = 0 + + +c Rechne in Spiegelmappen-Koordinaten um: +c Im Spiegelmappensystem: x-Achse verlaueft entlang der forderen Mappenkante, +c y-Achse aus dem Spiegel heraus. (entgegen der Richtung zunehmender Mappen- +c j-indizierung!) + + +5008 help1= x(1) - xSpiegel + x(1) = - x(2)*Cos_alfaSp + help1*Sin_alfaSp + + + (dSpiegel/2.+DreharmLaenge+xSpGrid1) + x(2) = x(2)*Sin_alfaSP + help1*Cos_alfaSP + help1= v(1) + v(1) = - v(2)*Cos_alfaSp + help1*Sin_alfaSp + v(2) = v(2)*Sin_alfaSP + help1*Cos_alfaSP + + +c mache Integrationsschritt: + + call INTEGRATIONSSTEP_RUNGE_KUTTA_Sp(dt) ! setzt u.U. auch 'destiny' + + Steps = Steps + 1 + + +c do some tests: + + if (Steps.GE.MaxStep) destiny = code_lost ! Teilchen verloren + + +c - Potentialmappe nach Reflektion wieder verlasssen? + + if (x(1).LT.0) then + reachedEndOfMap = .true. + +c - Spiegelrahmen getroffen? + + elseif (x(1).GE.xSpGrid1 .AND. + + (abs(x(2)).GT.bSpiegel/2. .OR. abs(x(3)).GT.hSpiegel/2.)) then + destiny = code_wand + +c - Gitterstab getroffen? + + else + help1 = min(abs(x(1)-xSpGrid1),abs(x(1)-xSpGrid1)) + if (help1.LE.rWires_Sp) then + DrahtNr = nInt(x(2)/dist_Wires_Sp) + distToWire(2) = x(2) - DrahtNr * dist_Wires_Sp + if ( (help1*help1 + distToWire(2)*distToWire(2)).LE. + + radiusQuad_Sp) destiny = code_grid + endif + + endif + +c if (destiny.NE.code_ok) then +c if (x(1).LT.xSpGrid1) then +c if (v(1).GT.0) then +c gebiet = UpToGrid +c else +c gebiet = upToExMap +c endif +c else +c gebiet = RetToGrid +c endif +c endif + + +c Rechne in Kammerkoordinaten zurueck: + + help1= x(1)-(dSpiegel/2.+DreharmLaenge+xSpGrid1) + x(1) = help1*Sin_alfaSP + x(2)*Cos_alfaSP + xSpiegel + x(2) = - help1*Cos_alfaSP + x(2)*Sin_alfaSP + help1= v(1) + v(1) = help1*Sin_alfaSP + v(2)*Cos_alfaSP + v(2) = - help1*Cos_alfaSP + v(2)*Sin_alfaSP + +d if (NTP_steps) then +d if (dt.LT.dtmin_Sp) then +d dtmin_Sp = dt +d x_dtmin_Sp(1) = x(1) +d x_dtmin_Sp(2) = x(2) +d x_dtmin_Sp(3) = x(3) +d endif +d if (dt.GT.dtmax_Sp) then +d dtmax_Sp = dt +d x_dtmax_Sp(1) = x(1) +d x_dtmax_Sp(2) = x(2) +d x_dtmax_Sp(3) = x(3) +d endif +d endif + + +c zerfallen? + + if (useDecay_) call Decay_Test(*555) + + +c Bahnberechnung abgebrochen? + + if (destiny.NE.code_ok) goto 555 + + +c verarbeite alle 'imonitor' Schritte die Koordinaten fuer GRAPHICS und DEBUG: + + if (GRAPHICS_.or.Debug_) then + zaehler = zaehler + 1 + if (zaehler.EQ.iMonitor) then + if (GRAPHICS_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + zaehler = 0 + endif + endif + + if (.NOT.reachedEndOfMap) goto 5008 ! naechster Integrationsschritt + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c zwischen Spiegel und Koordinatenwechsel-Ebene y=xChangeKoord: (feldfrei) + +9 Gebiet = upToChKoord + Steps = Steps + 1 + + if (x(2).LT.xChangeKoord) then + ! gegebenenfalls flag fuer Graphikausgabe des Punktes setzen + flag = .true. + else + flag = .false. + endif + + dt = (xChangeKoord - x(2)) / v(2) + t = t + dt + x(1) = x(1) + v(1)*dt + x(2) = xChangeKoord + x(3) = x(3) + v(3)*dt + + help4 = x(1)-xSpiegel + radiusQuad = help4*help4 + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then + help1 = v(1)*v(1)+v(3)*v(3) + help2 = help4*v(1)+x(3)*v(3) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_Rohr))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) ! den Ort berechnen, an dem + x(2) = x(2) + dt*v(2) ! das Teilchen auf das Rohr + x(3) = x(3) + dt*v(3) ! aufschlaegt + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + destiny = code_wand + goto 555 + endif + if (useDecay_) call Decay_Test(*555) + if (Graphics_.AND.flag) call Save_Graphics_Koord + if (Debug_) call Output_Debug + + +c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +c falls Graphikausgabe verlangt ist: Gib jetzt die Trajektorie im 'horizontalen' +c Teil der Kammer aus und resette nKoord: + + if (Graphics_) then + + call plot_horizontal + if (schnitt_p.eq.1) call schnitt ! Schnittebene + + ! die letzten Koordinaten fuer Plot der Trajektorie im 2. Kammerteil + ! uebernehmen (in neues KoordinatenSystem transformiert): + + k = nKoord + + if (idealMirror) then + nKoord = 7 + else + if (nKoord.LT.nKoordSave) then + ! => ein 'turn over' fand statt waehrend das Teilchen in der + ! Spiegelmappe war => x(999) -> x(1), x(1000) -> x(2) + nKoord = nKoord + (999-nKoordSave) + else + nKoord = nKoord - nKoordSave + 1 + endif + nKoord = nKoord-2 + endif + + do i = nKoord, 1, -1 + xKoord_(i) = yKoord(k) + yKoord_(i) = xSpiegel - xKoord(k) + zKoord_(i) = zKoord(k) + k = k - 1 + if (k.EQ.0) then + k = 998 + endif + enddo + do i = 1, nKoord + xKoord(i) = xKoord_(i) + yKoord(i) = yKoord_(i) + zKoord(i) = zKoord_(i) + enddo + endif + + +c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . +c - Vollziehe Koordinatenwechsel: neuer Ursprung in der Spiegelaufhaengung, +c x-Richtung in bisherige y-Richtung (also wiederum entlang Strahlachse), +c y-Richtung in bisheriger negativer x-Richtung. z-Richtung bleibt gleich. + + help1 = x(2) + x(2) = xSpiegel - x(1) + x(1) = help1 + help1 = v(1) + v(1) = v(2) + v(2) = - help1 + + if (Debug_) then + write (lun(1),*) 'KOORDINATENWECHSEL:' + call Output_Debug + endif + + +c Beruecksichtige gegebenenfalls die Flugzeit in 'delta_L1', welches 'vor dem +c Triggerdetektor' eingeschoben werden kann: + + dt = Delta_L1 / v(1) + x(1) = x(1)+v(1)*dt + x(2) = x(2)+v(2)*dt + x(3) = x(3)+v(3)*dt + t = t + dt + + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + + if (lense2) then ! ~~~~~~~~~~~~~~ ******* ~~~~~~~~~~~~~~~ + +c Bei 'lense2' wird fuer das Feld der Linse 2 und das Feld der TD-Folie eine +c gemeinsame Mappe verwendet. Hierbei ist allerdings der Triggerwinkel auf 0 +c Grad festgelegt. Da es in Zukunft in der Praxis wohl kaum noch vorkommen wird, +c dass der Triggerdetektor verdreht wird, sollte diese Einschraenkung jedoch +c keine grossen Auswirkungen haben. +c Ist der Triggerdetektor nicht im Strahl, so wird der Anteil der Triggerfolie +c gleich Null gesetzt. + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c zwischen KOORDINATENWECHSEL und Beginn der L2andFo-Mappe: (feldfrei) + +10 Gebiet = upToL2andFoMap + Steps = Steps + 1 + + dt = (xEnterMap_L2andFo - x(1)) / v(1) + t = t + dt + x(1) = xEnterMap_L2andFo + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then + help1 = v(2)*v(2)+v(3)*v(3) + help2 = x(2)*v(2)+x(3)*v(3) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_Rohr))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) ! den Ort berechnen, an dem + x(2) = x(2) + dt*v(2) ! das Teilchen auf das Rohr + x(3) = x(3) + dt*v(3) ! aufschlaegt + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + destiny = code_wand + goto 555 + endif + + if (useDecay_) call Decay_Test(*555) + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + + if (radiusQuad.GT.radiusQuad_L2) then ! Teilchen fliegt an L2 vorbei + destiny = code_vorbei + goto 555 + endif + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c innerhalb der gemeinsamen Mappe von Linse 2 und dem Feld vor der Trigger- +c Detektor-Folie: + +11 Gebiet = upToExL2 ! Gebietsnummer fuer L2 setzen + +c Die Anweisungen dieses Abschnitts verlaufen analog zu denen +c von Linse 1. -> Fuer Kommentare siehe dort! + + if (Beschl_Faktor.EQ.0. .OR. (U_L2.EQ.0. AND. U_F.EQ.0.)) then +c WRITE(*,*) 'HALLOHALLO!' +d dtmax_L2andFo = 0. +d dtmin_L2andFo = 0. + dt = (xEndLense_L2 - x(1)) / v(1) ! Zeit bis zum Linsenende + x(1) = xEndLense_L2 + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_L2) then + destiny = code_wand + radiusQuad_ = radiusQuad_L2 + goto 5111 + endif + if (TriggerInBeam) then + Gebiet = upToEnTD ! Gebietsnummer fuer upToTD setzen + ! Zeit bis zum Mappenende (falls TD im Strahl: bis Triggerfolie) + dt = (xLeaveMap_L2andFo - xEndLense_L2) / v(1) + x(1) = xLeaveMap_L2andFo + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then + destiny = code_wand + radiusQuad_ = radiusQuad_Rohr + endif + endif + goto 5111 + endif + + dt = .5/v(1) + zaehler = 0 + reachedEndOfMap = .false. + + +c die Integrationsroutine will x bereits relativ zum Mappenanfang geliefert +c bekommen: + +5011 x(1) = x(1) - xEnterMap_L2andFo + call INTEGRATIONSSTEP_RUNGE_KUTTA_L2(dt) + x(1) = x(1) + xEnterMap_L2andFo + +d if (NTP_steps) then +d if (dt.LT.dtmin_L2andFo) then +d dtmin_L2andFo = dt +d x_dtmin_L2andFo(1) = x(1) +d x_dtmin_L2andFo(2) = x(2) +d x_dtmin_L2andFo(3) = x(3) +d endif +d if (dt.GT.dtmax_L2andFo) then +d dtmax_L2andFo = dt +d x_dtmax_L2andFo(1) = x(1) +d x_dtmax_L2andFo(2) = x(2) +d x_dtmax_L2andFo(3) = x(3) +d endif +d endif + +5111 Steps = Steps + 1 + + if (destiny.EQ.code_dtSmall) then ! n_dtsmall>maxBelowDtSmall + goto 555 + elseif (destiny.EQ.code_wand) then ! aufgeschlagen + radiusQuad = x(2)*x(2) + x(3)*x(3) ! -> den Ort berechnen, an + help1 = v(2)*v(2)+v(3)*v(3) ! dem das Teilchen auf- + help2 = x(2)*v(2)+x(3)*v(3) ! schlaegt + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_))-help2)/help1 + t = t + dt + x(1) = x(1) + dt*v(1) + x(2) = x(2) + dt*v(2) + x(3) = x(3) + dt*v(3) + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + goto 555 + elseif (useDecay_) then ! zerfallen? + call Decay_Test(*555) + endif + + if (Gebiet.EQ.upToExL2) then ! ----> noch innerhalb von Linse 2 + + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_L2) then + destiny = code_wand + radiusQuad_ = radiusQuad_L2 + goto 5111 + endif + + if (x(1).LT.xEnterMap_L2andFo) then + if (v(1).LT.0) then ! reflektiert + destiny = code_reflektiert + goto 555 + else ! darf nicht sein! + write(*,*) + write(*,*)' L2: x(1).LT.xEnterMap .AND. v(1).GE.0. -> STOP' + write(*,*) + call exit + endif + elseif (x(1).GT.xEndLense_L2) then ! Verlasse L2 + Gebiet = upToEnTD + endif + + else ! ----> zw. Linse 2 und TD-Folie: + +c if (x(1).EQ.xLeaveMap_L2andFo) then ! Verlasse Mappe + if (reachedEndOfMap) then ! Verlasse Mappe + +c WRITE(*,*) 'HALLO: x(1).EQ.xLeaveMap_L2andFo !!' + ! ==================================================== + ! muss in Integrationsroutine richtig abgestimmt sein! + ! ==================================================== + + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + if (TriggerInBeam) then + ! rechne in Triggerkoordinaten um (Folie == x=0) + x(1) = 0 + goto 112 + else + goto bis_L3_Mappe + endif + endif + + if (radiusQuad.GT.radiusQuad_Rohr) then + destiny = code_wand + radiusQuad_ = radiusQuad_Rohr + goto 5111 + endif + + endif + + if (Steps.GE.MaxStep) then ! Teilchen verloren + destiny = code_lost + goto 555 + endif + + if (GRAPHICS_.or.Debug_) then + zaehler = zaehler + 1 + if (zaehler.EQ.iMonitor) then + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + zaehler = 0 + endif + endif + + goto 5011 ! naechster Integrationsschritt in gleicher Feldmappe + + endif ! if (lense2) then.... ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + + if (.NOT.TriggerInBeam) goto bis_L3_Mappe + + +c zwischen Koordinatenwechselebene und Triggerfolie: (feldfrei) +12 Gebiet = upToEnTD + +c Die Anweisungen dieses Abschnitts verlaufen in weiten Teilen parallel zu denen +c von Linse 1. -> Fuer Kommentare zu diesen Bereichen siehe dort! + + if (Beschl_Faktor_FO.EQ.0. .OR. gridInFrontOfFoil) then + ! => keine Integration in der Folienmappe + Steps = Steps + 1 + help1 = v(2)/v(1) ! Steigung der Bahn in der x-y-Ebene +d dtmin_FO = 0. +d dtmax_FO = 0. + +c - berechne Schnittpunkt der Trajektorie mit Ebene der Triggerfolie bzw. bei +c 'GridInFrontOfFoil' mit Ebene des Gitters vor der Triggerfolie: +c Folienebene : y'= (x_intersectTD - x') / Tan_alfaTD +c Trajektorie : y'= y + v(2)/v(1)*(x'-x) = y + help1*(x'-x) +c => Schnittpunkt: x'= (x_intersectTD/Tan_alfaTD - y + help1*x)/(help1 + 1/Tan_alfaTD) +c = (x_intersectTD + Tan_alfaTD*(help1*x-y))/(1+help1*Tan_alfaTD) +c (erste Gleichung hat Probleme bei Tan_alfaTD = 0!) + + if (atand(help1).EQ.alfaTD-90) then ! ueberpruefen<<<<<<<<<<<<<<<<<< + ! Teilchen fliegt parallel zur Folie => fliegt an TD vorbei + destiny = code_vorbei + goto 555 + else ! help2 == neues x(1) + if (Tan_alfaTD.EQ.0) then + dt = (x_intersectTD-x(1)) / v(1) + x(1) = x_intersectTD + else + help2 = (x_intersectTD+Tan_alfaTD* + + (help1*xChangeKoord-x(2)))/(1+help1*Tan_alfaTD) + if (help2.LT.xChangeKoord) then + ! Teilchen fliegt 'steiler' als Folienebene + ! -> kein Schnittpunkt mit dt.gt.0 => fliegt an TD vorbei + destiny = code_vorbei + goto 555 + else ! Bahntangente kreuzt Folienebene + dt = (help2-x(1)) / v(1) + x(1) = help2 + endif + endif + endif + +c -> Teilchenort in Folienebene bzw. bei 'GridInFrontOfFoil' in Ebene des +c geerdeten Gitters vor der Triggerfolie: + + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then + help1 = v(2)*v(2)+v(3)*v(3) + help2 = x(2)*v(2)+x(3)*v(3) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_Rohr))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) ! den Ort berechnen, an dem + x(2) = x(2) + dt*v(2) ! das Teilchen auf das Rohr + x(3) = x(3) + dt*v(3) ! aufschlaegt + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + destiny = code_wand + goto 555 + endif + + if (useDecay_) call Decay_Test(*555) + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + + +c Koordinatentransformation vom Kammersystem in das System des Triggerdetektors: +c (Ursprung in Folienmitte, x-Achse senkrecht zur Folie, y-Achse parallel zur +c Folie. Wenn der TD nicht verdreht ist, verlaufen die Achsen parallel zu +c denen des Kammersystems): + + if (alfaTD.NE.0) then + x(2) = (xTD-x(1))*Sin_alfaTD + x(2)*Cos_alfaTD + help1= v(1) ! zur Zwischenspeicherung + v(1) = help1*Cos_alfaTD + v(2)*Sin_alfaTD + v(2) = -help1*Sin_alfaTD + v(2)*Cos_alfaTD + endif + + if (.NOT.GridInFrontOfFoil) then + x(1) = 0 + else + ! -> berechne Schnittpunkt der Trajektorie mit Folienebene unter + ! der Annahme einer idealen Potentialrampe: + + if (aFoil.NE.0.) then + help1 = v(1)*v(1) + 2.*aFoil*(d_Grid_Folie) + if (help1.LT.0) then ! Reflektion noch vor Folie + dt = -2*v(1)/aFoil + t = t + dt + x(1) = - d_Grid_Folie + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + v(1) = -v(1) + destiny = code_reflektiert + goto 555 + endif + dt = (sqrt(help1) - v(1))/aFoil + ! (ergibt sich aus x=v*t+1/2*a*t**2 mit richtiger V.Z.-Wahl ('+')) + v(1) = v(1) + aFoil*dt + else + dt = d_Grid_Folie / v(1) + endif + + t = t + dt + x(1) = 0 ! im Triggersystem + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + + endif ! if (GridInFrontOfFoil) ... + + goto 112 + +c............................................................................... + else ! (if Beschl_Faktor_FO.EQ.0 .OR. GridInFrontOfFoil) then ... + + ! => Integration in der Folienmappe: + ! alte Version: ab xChangeKoord wurde integriert, wobei das EFeld im + ! Bereich vor der Mappe als 0 zurueckgegeben wurde. + ! Ab Version 1.2.9: Bis Schnittpunkt der Trajektorie mit Beginn der + ! Potentialmappe wird extrapoliert, dann erst integriert: + + +c Einschub ab Version 1.2.9: *************************************************** + + Steps = Steps + 1 + help1 = v(2)/v(1) ! Steigung der Bahn in der x-y-Ebene + +c - berechne Schnittpunkt der Trajektorie mit Beginn der Potentialmappe: +c Mappenebene : y'= (x_intersectTDMap - x') / Tan_alfaTD +c Trajektorie : y'= y + v(2)/v(1)*(x'-x) = y + help1*(x'-x) +c => Schnittpunkt: x'= (x_intersectTDMap/Tan_alfaTD - y + help1*x)/(help1 + 1/Tan_alfaTD) +c = (x_intersectTDMap + Tan_alfaTD*(help1*x-y))/(1+help1*Tan_alfaTD) +c (erste Gleichung hat Probleme bei Tan_alfaTD = 0!) + + if (atand(help1).EQ.alfaTD-90) then ! ueberpruefen<<<<<<<<<<<<<<<<<< + ! Teilchen fliegt parallel zur Mappe => fliegt an TD vorbei + destiny = code_vorbei + goto 555 + + ! stimmt so u.U. noch nicht ganz. Kommt aber eigentlich eh nie vor! + ! (stimmt bis jetzt wohl nur fuer positive alpha(TD) + + else + if (Tan_alfaTD.EQ.0) then + dt = (x_intersectTDMap-x(1)) / v(1) + x(1) = x_intersectTDMap + else + ! help2 == neues x(1): + help2 = (x_intersectTDMap+Tan_alfaTD* + + (help1*xChangeKoord-x(2)))/(1+help1*Tan_alfaTD) + ! folgendes herauskommentiert, da es teilweise passierte, dass + ! der Mappenanfang ueber xChangekoord hinausreichte und die + ! Trajektorien dann faelschlicherweise abgebrochen worden sind. + +c if (help2.LT.xChangeKoord) then +c ! Teilchen fliegt 'steiler' als Mappenebene +c ! -> kein Schnittpunkt mit dt.gt.0 => fliegt an TD vorbei +c destiny = code_vorbei +c goto 555 +c else ! Bahntangente kreuzt Mappenebene + dt = (help2-x(1)) / v(1) + x(1) = help2 +c endif + endif + endif + +c -> Teilchenort in Mappenebene: + + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then + help1 = v(2)*v(2)+v(3)*v(3) + help2 = x(2)*v(2)+x(3)*v(3) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_Rohr))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) ! den Ort berechnen, an dem + x(2) = x(2) + dt*v(2) ! das Teilchen auf das Rohr + x(3) = x(3) + dt*v(3) ! aufschlaegt + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + destiny = code_wand + goto 555 + endif + + if (useDecay_) call Decay_Test(*555) + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + +c Ende des Einschubes ab Version 1.2.9: **************************************** +c => Jetzt erfolgt Start in die Folienmappe: + + reachedEndOfMap = .false. ! Folienebene wurde noch nicht erreicht + dt = .5/v(1) ! 1. Testschritt 0.5 mm in x-Richtung + zaehler = 0 + + +c Rechne in Folienmappen-Koordinaten um: + +5012 if (alfaTD.NE.0) then + help1= x(1)-xTD + x(1) = help1*Cos_alfaTD + x(2)*Sin_alfaTD + length1 + x(2) = -help1*Sin_alfaTD + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD + v(2)*Sin_alfaTd + v(2) = -help1*Sin_alfaTD + v(2)*Cos_alfaTd + else + x(1) = x(1) - length2 + endif + + +c mache Integrationssschritt: + + call INTEGRATIONSSTEP_RUNGE_KUTTA_FO(dt) + +d if (NTP_steps) then +d if (dt.LT.dtmin_FO) then +d dtmin_FO = dt +d x_dtmin_FO(1) = x(1) +d x_dtmin_FO(2) = x(2) +d x_dtmin_FO(3) = x(3) +d endif +d if (dt.GT.dtmax_FO) then +d dtmax_FO = dt +d x_dtmax_FO(1) = x(1) +d x_dtmax_FO(2) = x(2) +d x_dtmax_FO(3) = x(3) +d endif +d endif + + +c Rechne in Kammerkoordinaten zurueck: + + if (alfaTD.NE.0) then + help1= x(1)-length1 + x(1) = help1*Cos_alfaTD - x(2)*Sin_alfaTD + xTD + x(2) = help1*Sin_alfaTD + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + length2 + endif + + Steps = Steps + 1 ! neuer Ort, Zeit und Geschwindigkeit sind festgelegt + +c do some tests: + + if (destiny.EQ.code_dtSmall) then ! n_dtSmall>maxBelowDtSmall + goto 555 + endif + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then ! aufgeschlagen + help1 = v(2)*v(2)+v(3)*v(3) ! -> den Ort berechnen, an + help2 = x(2)*v(2)+x(3)*v(3) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_Rohr))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) + x(2) = x(2) + dt*v(2) + x(3) = x(3) + dt*v(3) + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + destiny = code_wand + goto 555 + elseif (useDecay_) then ! zerfallen? + call Decay_Test(*555) + endif + + if (destiny.EQ.code_reflektiert) then ! reflektiert + goto 555 +c elseif (destiny.NE.code_ok) then ! voruebergehend fuer Testzwecke +c write(*,*) +c write(*,*)'FO-1: ''destiny.NE.code_ok'' where it should -> STOP' +c write(*,*)' destiny = ',destiny,': ',code_text(destiny) +c write(*,*) +c STOP + elseif (Steps.GE.MaxStep) then ! Teilchen verloren + destiny = code_lost + goto 555 + endif + if (reachedEndOfMap) then ! Folienebene erreicht + ! rechne in Triggerkoordinaten um (Folie == x=0) + if (alfaTD.NE.0) then + x(2) = (xTD-x(1))*Sin_alfaTD + x(2)*Cos_alfaTD + help1= v(1) ! zur Zwischenspeicherung + v(1) = help1*Cos_alfaTD + v(2)*Sin_alfaTD + v(2) = -help1*Sin_alfaTD + v(2)*Cos_alfaTD + endif + x(1) = 0 + goto 112 + endif + +c verarbeite alle 'imonitor' Schritte die Koordinaten fuer GRAPHICS und DEBUG: + + if (GRAPHICS_.or.Debug_) then + zaehler = zaehler + 1 + if (zaehler.EQ.iMonitor) then + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + zaehler = 0 + endif + endif + + goto 5012 ! naechster Integrationsschritt in FELD VOR FOLIE + +c............................................................................... + endif ! (if Beschl_Faktor_FO.EQ.0) then ... + +c Einsprunglabel fuer Starts auf der Triggerfolie mit Startwinkelangaben +c im Kammersystem => transformiere Geschwindigkeitsvektor in das Triggersystem: + +111 if (alfaTD.NE.0) then + help1= v(1) ! zur Zwischenspeicherung + v(1) = help1*Cos_alfaTD + v(2)*Sin_alfaTD + v(2) = -help1*Sin_alfaTD + v(2)*Cos_alfaTD + endif + + +c - pruefe, ob das Projektil die Folie trifft: + +112 radiusQuad = x(2)*x(2) + x(3)*x(3) + If (radiusQuad.GT.radiusQuad_Folie) then + ! zurueckrechnen in das Kammersystem: + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + + destiny = code_vorbei + goto 555 + endif + + +c So verlangt, schreibe die aktuellen Trajektoriengroessen in das 'FoilFile': +c (hier ist sichergestellt, dass die Folie getroffen worden ist, Wechsel- +c wirkungen mit der Folie wurden aber noch nicht beruecksichtigt). +c HIER WERDEN 'X' UND 'V' IM TRIGGERSYSTEM ABGESPEICHERT! + + if (createFoilFile) then + ! falls die Flugzeit bis zur Triggerfolie verschmiert in das + ! NTupel aufgenommen werden soll: + if (smearS1Fo) then + call Gauss_Verteilung(sigmaS1Fo,help4) + S1FoOnly = t + help4 + endif + if (NTP_stop) then + Ekin=(v(1)*v(1)+v(2)*v(2)+v(3)*v(3))*Energie_Faktor + endif + call HFNT(NTP_write) + NTPalreadyWritten = .true. + endif + + +c - Zeitpunkt bei Erreichen der Folie sichern: + +113 S1Fo = t + if (createNTP.AND.Fo_triggered) fill_NTP = .true. + if (statNeeded(Nr_S1Fo)) call fill_statMem(S1Fo,Nr_S1Fo) + + + +c - Speichern der Koordinaten fuer die Statistiken: + + if (statNeeded(Nr_y_Fo)) then + call fill_statMem( x(2),Nr_y_Fo) + endif + if (statNeeded(Nr_z_Fo)) then + call fill_statMem( x(3),Nr_z_Fo) + endif + if (statNeeded(Nr_r_Fo)) then + radius = SQRT(x(2)*x(2) + x(3)*x(3)) + call fill_statMem(radius,Nr_r_Fo) + endif + + +c - speichere Auftreffort des Projektils fuer die Berechnung der Folienelektronen: + + if (generate_FE) then + x0FE(1) = x(1) + x0FE(2) = x(2) + x0FE(3) = x(3) + endif + + +c - falls nur bis zur Folie gerechnet werden soll, beende hier die Integration: + + if (upToTDFoilOnly) then + ! zurueckrechnen in das Kammersystem: + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + if (generate_FE) Gebiet = UpToExTD + goto 555 + endif + + +c - pruefe, ob das Projektil auf das Stuetzgitter aufschlaegt: + + if (testOnWireHit .AND. ran(seed).GT.TransTDFoil) then + destiny = code_Stuetzgitter + ! zurueckrechnen in das Kammersystem: + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + goto 555 + endif + + +c - Energieverlust und Winkelaufstreuung: + + if (log_E_Verlust .OR. log_Aufstreu) then + if (Debug_) then + Steps = Steps + 1 + call Output_Debug + endif + v_square = v(1)*v(1) + v(2)*v(2) + v(3)*v(3) + v_Betrag = SQRT(v_square) + Ekin = v_square * Energie_Faktor + endif + +c -- Energieverlust (vorerst nur Gaussverteilt): + + if (log_E_Verlust_defined.OR.log_Meyer_Gauss) then + ! Berechne Bahnwinkel relativ zur Folienebene fuer effektive Folien- + ! dicke: + alfa = atand(SQRT(v(2)*v(2)+v(3)*v(3))/v(1)) + endif + + if (log_E_Verlust) then + if (calculate_each) then + call CALC_ELOSS_ICRU(Ekin,q,m,Thickness,E_Verlust) + else + E_Verlust = mean_E_Verlust + endif + if (log_E_Verlust_defined) E_Verlust = E_Verlust / cosd(alfa) + if (debug_) write (lunLOG,*) ' mittlerer Energieverlust: ',E_Verlust + + ! Now we have the mean energy loss. We still have to modify it + ! according to the distribution of energy losses, i.e. + ! E_Verlust -> E_Verlust + delta_E_Verlust: + + delta_E_Verlust = 0. + if (log_E_Straggling_sigma) then +400 call Gauss_Verteilung(sigmaE,delta_E_Verlust) + if (debug_) write (lunLOG,*) ' sigmaE,delta_E_Verlust: ',sigmaE,delta_E_Verlust + if (E_Verlust+delta_E_Verlust.LT.0.) goto 400 + elseif (log_E_Straggling_equal) then +410 delta_E_Verlust = lowerE + (upperE - lowerE)*ran(seed) + if (E_Verlust+delta_E_Verlust.LT.0) goto 410 + elseif (log_E_Straggling_Lindhard) then + ! Streuung in Abhaengigkeit von mittlerer Energie in Folie: + call E_Straggling_Lindhard(Ekin-0.5*E_Verlust,m,sigmaE) +420 call Gauss_Verteilung(sigmaE,delta_E_Verlust) + if (debug_) write (lunLOG,*) ' sigmaE,delta_E_Verlust: ',sigmaE,delta_E_Verlust + if (E_Verlust+delta_E_Verlust.LT.0.) goto 420 + elseif (log_E_Straggling_Yang) then + ! Streuung in Abhaengigkeit von mittlerer Energie in Folie! + call E_Straggling_Yang(Ekin-0.5*E_Verlust,m,sigmaE) +430 call Gauss_Verteilung(sigmaE,delta_E_Verlust) + if (debug_) write (lunLOG,*) ' sigmaE,delta_E_Verlust: ',sigmaE,delta_E_Verlust + if (E_Verlust+delta_E_Verlust.LT.0.) goto 430 + endif + + if (E_Verlust+delta_E_Verlust.GE.Ekin) then + destiny = code_stopped_in_foil + goto 555 + endif + E_Verlust = E_Verlust + delta_E_Verlust + + ! help1 == Reduzierungsfaktor fuer Geschw.Betrag + help1 = sqrt( (Ekin - E_Verlust)/Ekin ) + v(1) = help1 * v(1) + v(2) = help1 * v(2) + v(3) = help1 * v(3) + v_Betrag = help1 * v_Betrag + if (debug_) write (lunLOG,*) ' Energieverlust: ',E_Verlust + endif + +c -- Winkelaufstreuung (vorerst nur Gaussverteilt): + + if (log_aufstreu) then + if (log_Meyer_F_Function) then + call throwMeyerAngle(thetaAufstreu) + else + if (log_Meyer_Gauss) then + if (log_E_Verlust) Ekin = Ekin - .5 * E_Verlust ! mittlere Energie + effRedThick = Meyer_Faktor1 * Thickness / cosd(alfa) + call g_Functions(g1,g2,effRedThick) + sigmaAufstreu = Meyer_Faktor2 / Ekin * (g1 + Meyer_Faktor3*g2) + if (debug_) then + write (lunLOG,*) ' effekt. red. Dicke: ',effRedThick + write (lunLOG,*) ' Sigma(Streuwinkel): ',sigmaAufstreu + endif + endif + + call Gauss_Verteilung_theta(sigmaAufstreu,thetaAufstreu) + endif + + st0 = sind(thetaAufstreu) + ct0 = cosd(thetaAufstreu) + phiAufstreu = 360.*ran(seed) + + v_xy = SQRT(v(1)*v(1) + v(2)*v(2)) ! v_xy stets groesser 0 + ! wegen v(1)>0 + + help1 = v(1) + help2 = v(2) + help3 = v_Betrag*st0*cosd(phiAufstreu)/v_xy + help4 = st0*sind(phiAufstreu) + + v(1) = ct0*help1 - help3*help2 - help4*help1*v(3)/v_xy + v(2) = ct0*help2 + help3*help1 - help4*help2*v(3)/v_xy + v(3) = ct0*v(3) + help4*v_xy + if (debug_) write (lunLOG,*) ' Aufstreuung: theta, phi =', + + thetaAufstreu,phiAufstreu + endif + + if (Debug_ .AND. (log_E_Verlust .OR. log_Aufstreu)) then + call Output_Debug + endif + + +c - Neutralisierung in der Folie? + + if (log_neutralize) then + if (neutral_fract(q_).EQ.-1.0) then + v_square = v(1)*v(1) + v(2)*v(2) + v(3)*v(3) + Ekin = v_square * Energie_Faktor + call chargeStateYields(Ekin,m,YieldPlus,YieldNeutral) + YieldNeutral = 100. * YieldNeutral + else + YieldNeutral = neutral_fract(q_) + endif + if (100.*ran(seed).LE.YieldNeutral) then + q = 0. + qInt = 0 + if (debug_) then + write (lunLOG,*) ' Teilchen wurde neutralisiert' + endif + nNeutral = nNeutral + 1 + else + nCharged = nCharged + 1 + endif + endif + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c im TriggerDetektor: (homogene Felder) + + +13 Gebiet = upToExTD + Steps = Steps + 1 + +c der Weg des Projektils innerhalb der Triggerkammer: + + call TRIGGER(m,q,t,x,v,Debug_,graphics_,n_return) + + +c Koordinatentransformation vom System des Triggerdetektors in das Kammersystem: +c ('d_Achse_Ground' == Abstand zwischen TD-Achse und 'Ground'-Gitter) + + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + + +c Was ist im TD mit dem Teilchen passiert? + + if (n_return.NE.0) then ! -->> das Projektil kam nicht bei GROUND an + if (n_return.GT.100 .AND. n_return.LE.120) then ! -> abgebrochen + statTD(1,n_return-100) = statTD(1,n_return-100)+1 ! Grund notieren + destiny = code_lostInTD ! im TD verloren + elseif (n_return.GT.0..AND.n_return.LE.75) then ! -> pfosten getroffen! + pfostenHit(n_return,1) = pfostenHit(n_return,1)+1 + destiny = code_wand + elseif (n_return.EQ.-5) then ! -> im TD auf Gitterstab + statTD(1,17) = statTD(1,17)+1 ! + destiny = code_grid + elseif (n_return.EQ.-9) then ! -> NICHT im MCP3 registriert + statTD(1,18) = statTD(1,18)+1 ! + destiny = code_notRegInM3 + elseif (n_return.EQ.-10) then ! -> im MCP3 registriert + statTD(1,16) = statTD(1,16)+1 ! '16' zaehlt MCP3-Treffer + destiny = code_wand + endif + goto 555 ! naechstes Projektil + else ! -->> das Projektil kam bei GROUND an + statTD(1,15) = statTD(1,15)+1 ! '15' zaehlt GROUND-Treffer + endif + + if (useDecay_) call Decay_Test(*555) + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c zwischen KOORDINATENWECHSEL BZW. GROUND-GITTER und Beginn der L3-Mappe: +c (feldfrei) + +14 Gebiet = upToL3Map + Steps = Steps + 1 + + dt = (xEnterMap_L3 - x(1)) / V(1) + t = t + dt + x(1) = xEnterMap_L3 + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then + help1 = v(2)*v(2)+v(3)*v(3) + help2 = x(2)*v(2)+x(3)*v(3) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_Rohr))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) ! den Ort berechnen, an dem + x(2) = x(2) + dt*v(2) ! das Teilchen auf das Rohr + x(3) = x(3) + dt*v(3) ! aufschlaegt + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + destiny = code_wand + goto 555 + endif + + if (useDecay_) call Decay_Test(*555) + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + + if (radiusQuad.GT.radiusQuad_L3) then ! Teilchen fliegt an L3 vorbei + destiny = code_vorbei + goto 555 + endif + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c innerhalb L3: (inhom. Felder -> Integrationen) + + +15 Gebiet = upToExL3 ! Gebietsnummer fuer L3 setzen + +c Die Anweisungen dieses Abschnitts verlaufen analog zu denen +c von Linse 1. -> Fuer Kommentare siehe dort! + + if (Beschl_Faktor_L3.EQ.0. .OR. q.EQ.0) then ! q=0 -> in Folie neutralisiert +d dtmax_L3 = 0. +d dtmin_L3 = 0. + dt = (xLeaveMap_L3 - x(1)) / v(1) ! Zeit bis zum Mappenende + x(1) = xLeaveMap_L3 + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_L3) destiny = code_wand + goto 5115 + endif + + dt = .5/v(1) + zaehler = 0 + +5015 call INTEGRATIONSSTEP_RUNGE_KUTTA_L3(dt) +d if (NTP_steps) then +d if (dt.LT.dtmin_L3) then +d dtmin_L3 = dt +d x_dtmin_L3(1) = x(1) +d x_dtmin_L3(2) = x(2) +d x_dtmin_L3(3) = x(3) +d endif +d if (dt.GT.dtmax_L3) then +d dtmax_L3 = dt +d x_dtmax_L3(1) = x(1) +d x_dtmax_L3(2) = x(2) +d x_dtmax_L3(3) = x(3) +d endif +d endif + +5115 Steps = Steps + 1 + + if (destiny.EQ.code_dtSmall) then ! n_dtsmall>maxBelowDtSmall + goto 555 + elseif (destiny.EQ.code_wand) then ! aufgeschlagen + radiusQuad = x(2)*x(2) + x(3)*x(3) ! -> den Ort berechnen, an + help1 = v(2)*v(2)+v(3)*v(3) ! dem das Teilchen auf- + help2 = x(2)*v(2)+x(3)*v(3) ! schlaegt + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_L3))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) + x(2) = x(2) + dt*v(2) + x(3) = x(3) + dt*v(3) + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + goto 555 +c elseif (destiny.NE.code_ok) then ! voruebergehend fuer Testzwecke +c write(*,*) +c write(*,*)'L3-1: ''destiny.NE.code_ok'' where it should -> STOP' +c write(*,*)' destiny = ',destiny,': ',code_text(destiny) +c write(*,*) +c STOP + elseif (useDecay_) then ! zerfallen? + call Decay_Test(*555) + endif + + if (x(1).LT.xEnterMap_L3) then + if (v(1).LT.0) then ! reflektiert? + destiny = code_reflektiert + goto 555 + else ! darf nicht sein! + write(*,*) + write(*,*)' L3: x(1).LT.xEnterMap .AND. v(1).GE.0. -> STOP' + write(*,*) + STOP + endif + elseif (Steps.GE.MaxStep) then ! Teilchen verloren + destiny = code_lost + goto 555 + elseif (x(1).GE.xLeaveMap_L3) then ! Verlasse L3 + dt = (xLeaveMap_L3 - x(1))/v(1) ! rechne zurueck auf exaktes + t = t + dt ! Mappenende + x(1) = xLeaveMap_L3 + x(2) = x(2) + dt*v(2) + x(3) = x(3) + dt*v(3) + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + goto bis_MCP2_Mappe +c elseif (destiny.NE.code_ok) then ! voruebergehend fuer Testzwecke +c write(*,*) +c write(*,*)'L3-2: ''destiny.NE.code_ok'' where it should -> STOP' +c write(*,*)' destiny = ',destiny,': ',code_text(destiny) +c write(*,*) +c STOP + endif + + if (GRAPHICS_.or.Debug_) then + zaehler = zaehler + 1 + if (zaehler.EQ.iMonitor) then + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + zaehler = 0 + endif + endif + + goto 5015 ! naechster Integrationsschritt in gleicher Feldmappe + + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c zwischen L3-Mappe und MCP2-Mappe (feldfrei) + + +16 Gebiet = upToM2Map + + if (x(1).EQ.xEnterMap_M2) goto MCP2_Mappe + Steps = Steps + 1 + + dt = (xEnterMap_M2 - x(1)) / v(1) + + t = t + dt + x(1) = xEnterMap_M2 + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then + help1 = v(2)*v(2)+v(3)*v(3) + help2 = x(2)*v(2)+x(3)*v(3) + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_Rohr))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) ! den Ort berechnen, an dem + x(2) = x(2) + dt*v(2) ! das Teilchen auf das Rohr + x(3) = x(3) + dt*v(3) ! aufschlaegt + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + destiny = code_wand + goto 555 + endif + if (useDecay_) call Decay_Test(*555) + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +c vor MCP2: (inhom. Felder -> Integrationen) + +17 Gebiet = upToMCP2 + +c Beruecksichtige gegebenenfalls die Flugzeit in 'delta_L2', welches 'vor dem +c MCP2' eingeschoben werden kann. Addiert wird vorerst nur die Flugzeit in +c dieser zusaetzlichen Flugstrecke. Korrekterweise muessten alle nachfolgenden +c Positionen um 'delta_L2' verschoben werden. Dies zu implementieren ist +c allerdings momentan aus Zeitgruenden nicht moeglich. + + dt = Delta_L2 / v(1) + t = t + dt + + +c Die Anweisungen dieses Abschnitts verlaufen analog zu denen +c von Linse 1. -> Fuer Kommentare siehe dort! + + if (Beschl_Faktor_M2.EQ.0. .OR. q.EQ.0) then ! q=0 -> in Folie neutralisiert +d dtmax_M2 = 0. +d dtmin_M2 = 0. + if (xBlende.GT.x(1)) then + dt = (xBlende - x(1)) / v(1) ! Zeit bis zur Blende + x(1) = xBlende + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) then + destiny = code_wand + elseif (radiusQuad.GE.radiusQuad_Blende) then + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + destiny = code_hitBlende + goto 555 + endif + endif + dt = (xMCP2 - x(1)) / v(1) ! Zeit bis MCP2 + x(1) = xMCP2 + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GT.radiusQuad_Rohr) destiny = code_wand + reachedEndOfMap = .true. + goto 5117 + endif + + dt = .5/v(1) + + reachedEndOfMap = .false. + zaehler = 0 + if (xBlende.GT.0) check_Blende = .true. + +5017 call INTEGRATIONSSTEP_RUNGE_KUTTA_M2(dt) +d if (NTP_steps) then +d if (dt.LT.dtmin_M2) then +d dtmin_M2 = dt +d x_dtmin_M2(1) = x(1) +d x_dtmin_M2(2) = x(2) +d x_dtmin_M2(3) = x(3) +d endif +d if (dt.GT.dtmax_M2) then +d dtmax_M2 = dt +d x_dtmax_M2(1) = x(1) +d x_dtmax_M2(2) = x(2) +d x_dtmax_M2(3) = x(3) +d endif +d endif + +5117 Steps = Steps + 1 + + if (destiny.EQ.code_dtSmall) then ! n_dtsmall>maxBelowDtSmall + goto 555 + elseif (check_Blende.AND.x(1).GE.xBlende) then + dt = (xBlende - x(1)) / v(1) ! zurueck zur Blende ... + x(1) = xBlende + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + radiusQuad = x(2)*x(2) + x(3)*x(3) + if (radiusQuad.GE.radiusQuad_Blende) then + destiny = code_hitBlende + goto 555 + endif + dt = -dt ! ... wieder zum aktuellen Ort + x(1) = xBlende + v(1)*dt + x(2) = x(2) + v(2)*dt + x(3) = x(3) + v(3)*dt + t = t + dt + check_Blende = .false. + elseif (destiny.EQ.code_wand) then + radiusQuad = x(2)*x(2) + x(3)*x(3) ! -> den Ort berechnen, an + help1 = v(2)*v(2)+v(3)*v(3) ! dem das Teilchen auf- + help2 = x(2)*v(2)+x(3)*v(3) ! schlaegt + dt = (SQRT(help2*help2-help1*(radiusQuad-radiusQuad_Rohr))-help2) + + /help1 + t = t + dt + x(1) = x(1) + dt*v(1) + x(2) = x(2) + dt*v(2) + x(3) = x(3) + dt*v(3) + if (useDecay_) call Decay_Test(*555) ! vor Aufschlag zerfallen? + goto 555 + elseif (useDecay_) then ! zerfallen? + call Decay_Test(*555) + endif + + if (destiny.EQ.code_reflektiert) then ! reflektiert + goto 555 + elseif (reachedEndOfMap) then ! MCP2-Ebene erreicht +c if (destiny.NE.code_ok) then ! voruebergehend fuer Testzwecke +c write(*,*) +c write(*,*)'M2 ''destiny.NE.code_ok'' where it should -> STOP' +c write(*,*)' destiny = ',destiny,': ',code_text(destiny) +c write(*,*) +c STOP +c endif + if (createNTP.AND.xM2_triggered) fill_NTP = .true. + S1xM2 = t + if (statNeeded(Nr_S1xM2))call fill_statMem(S1xM2,Nr_S1xM2) + radiusQuad = x(2)*x(2) + x(3)*x(3) + radius = SQRT(radiusQuad) + if (statNeeded(Nr_y_xM2)) call fill_statMem( x(2),Nr_y_xM2) + if (statNeeded(Nr_z_xM2)) call fill_statMem( x(3),Nr_z_xM2) + if (statNeeded(Nr_r_xM2)) call fill_statMem(radius,Nr_r_xM2) + if (radiusQuad.LE.radiusQuad_MCP2active) then + S1M2 = t ! Zeiten werden sowohl fuer Statistiken + FoM2 = t - S1Fo ! als auch fuer NTupel benoetigt + if (statNeeded(Nr_S1M2)) call fill_statMem(S1M2,Nr_S1M2) + if (statNeeded(Nr_FoM2)) call fill_statMem(FoM2,Nr_FoM2) + if (createNTP.AND.M2_triggered) fill_NTP = .true. + if (statNeeded(Nr_y_M2)) call fill_statMem( x(2),Nr_y_M2) + if (statNeeded(Nr_z_M2)) call fill_statMem( x(3),Nr_z_M2) + if (statNeeded(Nr_r_M2)) call fill_statMem(radius,Nr_r_M2) + else ! am MCP2 vorbei + if (radiusQuad.LE.radiusQuad_MCP2) then + destiny = code_hitMCP2inactive + else + destiny = code_vorbei + if (Graphics_) then ! Damit diese Trajektorie 40mm ueber die + nKoord = nKoord + 1 ! MCP2-Ebene hinausgezeichnet wird + dt = 40./v(1) + t = t + dt + xKoord(nKoord) = x(1)+40. + yKoord(nKoord) = x(2)+v(2)*dt + zKoord(nKoord) = x(3)+v(3)*dt + goto 556 + endif + endif + endif + + goto 555 + elseif (Steps.GE.MaxStep) then ! Teilchen verloren + destiny = code_lost + goto 555 + endif + + if (GRAPHICS_.or.Debug_) then + zaehler = zaehler + 1 + if (zaehler.EQ.iMonitor) then + if (Graphics_) call Save_Graphics_Koord + if (Debug_) call Output_Debug + zaehler = 0 + endif + endif + + goto 5017 ! naechster Integrationsschritt im Feld vor MCP2 + + +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +c HIER IST DER PROGRAMMKODE FUER DIE TRAJEKTORIENBERECHNUNG +c DER PROJEKTILE BEENDET! +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz + +555 if (Graphics_) call Save_Graphics_Koord +556 if (Debug_) call Output_Debug + + +c Gib Trajektorie in Graphikfenster aus: + + if (Graphics_) then + if (Gebiet.LE.upToChKoord) then ! Bahnberechnung wurde vor + call plot_horizontal ! Koordinatenwechsel abgebrochen + if (schnitt_p.eq.1) call schnitt + else + call plot_vertikal + if (schnitt_p.eq.2) call schnitt + endif + nKoord = 0 + endif + + +c Pruefe, ob Teilchen reflektiert wurde: + + if ((Gebiet.EQ.upToExL1 .OR. Gebiet.EQ.upToEnTD .OR. + + Gebiet.EQ.upToExL3 .OR. Gebiet.EQ.upToMCP2) .AND. + + v(1).LE.0.) then + destiny = code_reflektiert + endif + + +c Zaehle mit, bei wie vielen Teilchen trotz dtMaxStep abgebrochen werden: + + if (destiny.EQ.code_lostInTD) then + lostInTD_counter = lostInTD_counter + 1 + elseif (destiny.EQ.code_lost) then + lost_counter = lost_counter + 1 + endif + + +c bei DEBUG: Ausgabe des Teilchenschicksals und des aktuellen Gebiets: + + if (debug_) then + indx = index(code_text(destiny),':') + if (indx.EQ.0) then + write(lun(1),*) 'destiny : ',code_text(destiny) + else + write(lun(1),*) 'destiny : ',code_text(destiny)(1:indx-1) + endif + indx = index(Gebiet_text(Gebiet),':') + if (indx.EQ.0) then + write(lun(1),*) 'Gebiet : ',Gebiet_text(Gebiet) + else + write(lun(1),*) 'Gebiet : ',Gebiet_text(Gebiet)(1:indx-1) + endif + endif + + +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +c HIER STARTEN DIE FOLIENELEKTRONEN +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz + + if (generate_FE) then ! ~~~ 1: if ~~~~~~~~~~~~ + if (Gebiet.GE.UpToExTD) then ! ~~~ 2: if ~~~~~~~~~~~~ + +c sekundaerelektronen + nFE = int(4.*ran(seed))+2 ! Anzahl wuerfeln: [2,5] + tFE_min = 0. ! tFE_min: kuerzeste FE-Flugzeit: + ! bekam noch keinen Wert zugewiesen + +c - die Laufzeiten der Folienelektronen: +c +c---------------------------------------- +c +c-TP-10/2000 reset of end positions of electrons +c + do k = 1, 3 + xFE_MCP(k) = 0. + yFE_MCP(k) = 0. + zFE_MCP(k) = 0. + enddo +c +c---------------------------------------- +c + + do 450, k = 1, nFE + + xFE(1) = x0FE(1) + xFE(2) = x0FE(2) + xFE(3) = x0FE(3) + + E0FE = 0.003*ran(seed) ! Start-Energie wuerfeln: [0,3) eV + v_Betrag = sqrt(2.*E0FE/511.015)*c ! Startgeschwindigkeit + call Lambert_Verteilung(1.,ct0,st0) ! Startwinkel wuerfeln + f0 = 360.*ran(seed) + cf0 = cosd(f0) + sf0 = sind(f0) + vFE(1) = v_Betrag * ct0 ! Geschwindigkeitskomponenten + vFE(2) = v_Betrag * st0*cf0 + vFE(3) = v_Betrag * st0*sf0 + + tFE = 0. + + nKoord = 0 + start_nr(2) = start_nr(2) + 1 ! (2): FE + call TRIGGER(511.015,-1.,tFE,xFE,vFE,DEBUG_FE.AND.Debug_, + + plot_FE,n_return) + if (plot_FE) call plot_vertikal + + if (n_return.NE.-10) then +C - das FE kam nicht am MCP3 an -> + if (n_return.GT.100 .AND. n_return.LE.120) then ! -> abgebrochen + statTD(2,n_return-100) = statTD(2,n_return-100)+1 ! Grund notieren + elseif (n_return.GT.0 .AND. n_return.LE.75) then ! -> pfosten getroffen! + pfostenHit(n_return,2) = pfostenHit(n_return,2)+1 + elseif (n_return.EQ.0) then ! -> GROUND getroffen + statTD(2,15) = statTD(2,15)+1 ! '15' zaehlt GROUND-Treffer + elseif (n_return.EQ.-5) then ! -> im TD auf Gitterstab + statTD(2,17) = statTD(2,17)+1 + elseif (n_return.EQ.-9) then ! -> NICHT im MCP3 registriert + statTD(2,18) = statTD(2,18)+1 + endif + tFE_(k) = -1 ! -1: FE kam nicht bei MCP3 an +c +c--------------------------------------- +c +c-TP-10/2000 +c + xFE_MCP(k) = -100. + yFE_MCP(k) = -100. + zFE_MCP(k) = -100. +c +c--------------------------------------- +c + goto 450 ! naechstes FE + + endif + +c - das FE kam beim MCP3 an -> + + statTD(2,16) = statTD(2,16)+1 ! '16' zaehlt MCP3-Treffer + tFE_(k)=int(1000.*tFE) ! tFE in ps. (braucht als Integer + ! weniger Speicherplatz) +c +c--------------------------------------- +c +c-TP-10/2000 +c + xFE_MCP(k) = xFE(1) + yFE_MCP(k) = xFE(2) + zFE_MCP(k) = xFE(3) +c +c--------------------------------------- +c + + + +c fuer die Statistik: die Flugzeiten saemtlicher das MCP3 erreichender FE abspeichern: + + if (statNeeded(Nr_t_FE)) call fill_statMem(tFE,Nr_t_FE) + + +c kuerzeste Elektronenflugzeit fuer das aktuelle Projektilteilchen notieren: + + if (tFE_min.EQ.0. .OR. tFE.LT.tFE_min) tFE_min = tFE + + +450 continue ! -> naechstes Folienelektron + + +c die Flugzeiten der nicht gestartenen Folienelektronen (nFE+1 bis 5) auf 0. setzen: + + do while (nFE.LT.5) + nFE = nFE + 1 + tFE_(nFE) = 0. + enddo + + +c Jetzt sind die Folienelektronen durchgelaufen. + +c Fuelle Statistiken fuer die 'gemessenen' Teilchenflugzeiten (mit Beruecksichti- +c gung der Flugzeiten der Folienelektronen). M3M2 aber nur, wenn MCP2 auch +c getroffen wurde: + + if (tFE_min.NE.0.) then + S1M3 = S1Fo + tFE_min ! +, da Stop verzoegert + if (statNeeded(Nr_S1M3)) then + call fill_statMem(S1M3,Nr_S1M3) + endif + if (destiny.EQ.code_ok) then + M3M2 = FoM2 - tFE_min ! -, da Start verzoegert + if (statNeeded(Nr_M3M2)) call fill_statMem(M3M2,Nr_M3M2) + endif + endif + + else ! ~~~ 2: else ~~~~~~~~~~ + + do k= 1, 5 + tFE_(k) = 0. ! nicht gestartet + enddo + + endif ! ~~~ 2: endif ~~~~~~~~~ + endif ! ~~~ 1: endif~~~~~~~~~~ + +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +c ES FOLGEN DATENAUSGABE, SPRUNG IN NEUE SCHLEIFE UND PROGRAMMENDE +czzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz + +c trage das NTupel ein: + +c So verlangt, schreibe die aktuellen Trajektoriengroessen in das NTupel: +c (falls bei 'createFoilFile' 'NTPalreadyWritten' nicht gesetzt ist schied +c dieses Teilchen schon vor der Triggerfolie aus. Ist es dagegen gesetzt wurden +c die Trajektoriendaten mit dem Erreichen der Triggerfolie abgespeichert um sie +c in den im Triggersystem gueltigen Werten zu haben): + + if (fill_NTP .OR. createFoilFile) then + if (NTPalreadyWritten) then + NTPalreadyWritten = .false. + else + if (NTP_stop) then + Ekin=(v(1)*v(1)+v(2)*v(2)+v(3)*v(3))*Energie_Faktor + endif + if (smearS1Fo .AND. .NOT.use_MUTRACK) then + if (s1fo.NE.0) then + call Gauss_Verteilung(sigmaS1Fo,help4) + S1FoOnly = S1Fo + help4 + else + S1FoOnly = 0. + endif + endif + FoM2Only = FoM2 + call HFNT(NTP_write) + endif + endif + + +c Nimm das Schicksal des Teilchens in den zugehoerigen Statistikspeicher auf: + + if (destiny.GT.0) destiny = destiny + (Gebiet-1)*highest_code_Nr + statDestiny(destiny) = statDestiny(destiny) + 1 + + if (destiny.EQ.code_ok) okStepsCounter = okStepsCounter + steps + + +c -> das naechste Projektil kann kommen +100 continue + + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +c Jetzt sind alle Projektile dieser Schleife abgearbeitet! + +c Mittlere Anzahl an Integrationsschritten fuer Trajektorien mit destiny = +c 'code_ok' ausgeben: + + if (statDestiny(code_ok).NE.0) then + write(*,'(6x,A,F7.2)')'Mittlere Anzahl an Integrationsschritten bis zum Ziel: ', + + real(okStepsCounter)/real(statDestiny(code_ok)) + endif + +c das Summary ausgeben und die Werte in die Tabellen schreiben: +c Falls nur ein Teilchenstart pro Schleife erfolgt, werte die Statistiken +c erst nach der letzten Schleife aus: + + NotLastLoop = .NOT.(SchleifenNr.EQ.SchleifenZahl) + flag_ok = .NOT.(OneStartPerLoop.AND.NotLastLoop) + + if (flag_ok) then + call eval_statistics + if (n_outWhere.GT.0 .OR. smallLogFile) call Summary + if (createTabellen .or. createPhysTab) call output_tabellen + endif + + +c das PostScript-file erstellen: + +c Wird pro Schleife nur ein Teilchen gestartet ('OneStartPerLoop'; d.h. kein +c oder genau ein 'Zufallsstart'), so trage alle Trajektorien in die gleiche +c Graphik ein. Das Postskript braucht dann also erst bei der letzten Schleife +c erstellt zu werden: + + if (GRAPHICS .AND. flag_ok) then + call schnitt_plot ! Ausgabe der Graphik der Schnittebene + + if (n_postSkript.LE.0) then + goto 620 + elseif (n_postSkript.EQ.1) then + if (n_outWhere.LT.2) then + write(*,*)'.....................................'// + + '.........................................' + write(*,'(2X,A18,I3,A,I3)')'Schleife ', + + SchleifenNr,' von ',SchleifenZahl + endif + write(*,1003)'(P) Ps-file erstellen', + + '(R) Restliche ps-files erstellen' + write(*,1003)'(N) ps-file Nicht erstellen', + + '(K) Keine ps-files mehr erstellen' + write(*,1003)'(G) Graphikausgabe beenden', + + '(A) programm Abbrechen' +1003 format(T6,A,T40,A) + + helpChar = 'n' +600 write(*,1004)' [RETURN] = (N) -> ' +1004 format($,x,A) + read(*,'(A)') helpChar + + do i = 1,7 ! bis zu sechs blanks werden akzeptiert + ant = helpChar(i:i) + if (ant.NE.' ') goto 610 + enddo + ant = 'N' + +610 write(*,*)'==========================='// + + '=====================================================' + + call str$upcase(ant,ant) + if (ant.EQ.'N') then + goto 620 + elseif (ant.EQ.'R') then + n_postSkript = 2 + elseif (ant.EQ.'K') then + n_postSkript = 0 + goto 620 + elseif (ant.EQ.'G') then + call HPLEND + GRAPHICS = .false. + goto 200 + elseif (ant.EQ.'A') then + call HPLEND + call TERMINATE_OUTPUT + STOP + elseif (ant.NE.'P') then + goto 600 + endif + endif + + write (helpChar(1:7),'(''_'',I6)') SchleifenNr + if (filename.NE.' ') then + call MAKE_PS(filename//helpChar) + else + call MAKE_PS('MUTRACK'//helpChar) + endif + + +620 continue + + CALL IZPICT ('CHAM_1','S') ! LOESCHEN DER BILDER IM PAWC-COMMON-BLOCK + CALL IZPICT ('CHAM_2','S') + CALL IZPICT ('HISTO','S') + CALL IZPICT ('TEXT','S') + + call iclrwk (1,flag_ok) ! CLEAREN DER WORKSTATIONS + call iclrwk (3,flag_ok) + call iclrwk (4,flag_ok) + call iclrwk (5,flag_ok) + + CALL HRESET (50,' ') ! RESETTEN DES HISTOGRAMMS + + endif + +c -> das gleiche von vorne mit neuen Settings (d.h. neue Schleife) + +200 continue +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +c Jetzt sind alle Schleifen abgearbeitet -> fertigmachen zum Programmende: + +c - HIGZ-Graphikbibliothek schliessen: + + if (Graphics) call HPLEND + +c - HBOOK-Datei schliessen: + + if (.NOT.fromScratch) then + if (use_ACCEL) then + call HREND('ACCEL') + elseif (Use_MUTRACK) then + call HREND('MUread') + endif + close (lunRead) + endif + + call TERMINATE_OUTPUT + + + END + + +C=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE Lambert_Verteilung(n_Lambert,cos_theta,sin_theta) +c ============================================================ + + IMPLICIT NONE + + real cos_theta,sin_theta + + real n_Lambert ! Ordnung der Lambert-Verteilung + real randomVar + integer seed + common /seed/ seed + + randomVar = ran(seed) + + if (n_Lambert.EQ.0.) then + cos_theta = (1.-randomVar) + sin_theta = sqrt(1.-cos_theta*cos_theta) + elseif (n_Lambert.EQ.1.) then + cos_theta = sqrt(1.-randomVar) + sin_theta = sqrt(randomVar) + else + cos_theta = (1.-randomVar)**(1./(n_Lambert + 1)) + sin_theta = sqrt(1.-cos_theta*cos_theta) + endif + + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE Gauss_Verteilung(sigma,wert) +c ======================================= + + IMPLICIT NONE + + real sigma ! Breite der Gaussverteilung + real wert ! gewuerfelte Returnvariable + real radius,phi + + integer seed + common /seed/ seed + + real zwoPi + parameter (zwoPi = 2.*3.1415927) + +c Da die eindimensionale Gaussfunktion nicht integrierbar ist, wird erst +c ein Punkt in der Ebene mit der entsprechenden zweidimensionalen Gaussfunktion +c gewuerfelt. Von diesem Punkt wird dann die x-Komponente zurueckgegeben, die +c eindimensional Gaussverteilt ist: + + radius = sigma*Sqrt(-2.*log(1.-ran(seed))) + phi = zwoPi * ran(seed) + wert = radius * cos(phi) + + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE Gauss_Verteilung_theta(sigma,theta) +c ============================================== + + IMPLICIT NONE + + real sigma,theta + real radius,phi,ratio + + integer i, seed + common /seed/ seed + +c Man beachte, dass hier Winkel gewuerfelt werden! D.h., dass die Variable +c 'radius' einen Radius in einer 2dimensionalen 'Winkel'-Ebene darstellt. +c Es wird angenommen, dass sigma in degree angegeben wird (daher die sind()- +c Funktion in der Zuweisung fuer 'ratio' anstelle der sin()-Fkt.). + + i = 1 + +1 radius = sigma*Sqrt(-2.*log(1.-ran(seed))) + phi = 360.*ran(seed) + theta = abs(radius * cosd(phi)) + ! nur theta zwischen 0 und 90 deg sollen eine Chance haben: + if (theta.GT.90) then + i = i + 1 + if (i.LE.10000) then + goto 1 + else + write(*,*) + write(*,*) 'SUBROUTINE Gauss_Verteilung_theta:' + write(*,*) ' Nach 10000 Versuchen noch keinen Winkel < 90 degree gewuerfelt.' + write(*,*) ' Vorgegebenes Sigma der Winkelverteilung: ',sigma + write(*,*) + STOP + endif + endif + +c Zitat aus TP's 'TESTSEED.FOR', aus welchem diese Routine abgeschrieben +c ist: +c +c Now we habe a GAUSSIAN, but we need for multiple scattering +c GAUSSIAN*SIN(x) =: g(x). This is not integrateable analytically, but +c we can choose the VON NEUMANN REJECTION to get what we want. +c As auxiliary function we choose the GAUSSIAN =: f(x), because it +c satisfies g(x) <= f(x) for all x. +c We must build the ratio g(x)/f(x) = sin(x) and compare it to +c another random number: + + ratio = sind(theta) + if (ran(seed).GT.ratio) goto 1 ! Verteilung zurechtbiegen + + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE G_Functions(G1,G2,tau) +c ================================= + +c Diese Routine gibt in Abhaengigkeit von der reduzierten Dicke 'tau' +c Funktionswerte fuer g1 und g2 zurueck. g1 und g2 sind dabei die von +c Meyer angegebenen tabellierten Funktionen fuer die Berechnung von Halbwerts- +c breiten von Streuwinkelverteilungen. (L.Meyer, phys.stat.sol. (b) 44, 253 +c (1971)) + + IMPLICIT NONE + + real tau,g1,g2 + real tau_(26),g1_(26),g2_(26) + real help + + integer i + + DATA tau_ /0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, + + 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 9.0, + + 10.0, 12.0, 14.0, 16.0, 18.0, 20.0 / + + DATA g1_ /0.050,0.115,0.183,0.245,0.305,0.363,0.419,0.473,0.525,0.575, + + 0.689,0.799,0.905,1.010,1.100,1.190,1.370,1.540,1.700,1.850, + + 1.990,2.270,2.540,2.800,3.050,3.290 / + DATA g2_ / 0.00,1.25,0.91,0.79,0.73,0.69,0.65,0.63,0.61,0.59, + + 0.56,0.53,0.50,0.47,0.45,0.43,0.40,0.37,0.34,0.32, + + 0.30,0.26,0.22,0.18,0.15,0.13 / + + if (tau.LT.tau_(1)) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist kleiner als kleinster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(1) = ',tau_(1) + write(*,*) + STOP + endif + + i = 1 + +10 i = i + 1 + if (i.EQ.27) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist groesser als groesster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(26) = ',tau_(26) + write(*,*) + STOP + elseif (tau.gt.tau_(i)) then + goto 10 + endif + + +c lineare Interpolation zwischen Tabellenwerten: + + help = (tau-tau_(i-1))/(tau_(i)-tau_(i-1)) + + g1 = g1_(i-1) + help*(g1_(i)-g1_(i-1)) + g2 = g2_(i-1) + help*(g2_(i)-g2_(i-1)) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine Get_F_Function_Meyer(tau,Ekin) +c ========================================= + + implicit none + + real tau + real Ekin + + real thetaSchlange,thetaSchlangeMax + real theta,thetaMax,thetaStep + real f1,f2,F + + +c------------------------------------ +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target +c real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + + real Pi ! die Kreiszahl + +c parameter (a0 = 5.29E-9) + parameter (Z1 = 1, Z2 = 6, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10) + parameter (Pi = 3.141592654) + + real Meyer_Faktor3 + real Meyer_Faktor4 + real zzz ! 'Hilfsparameter' + real Meyer_Faktor5 + + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + parameter (Meyer_faktor4 = screeningPar / (2.*Z1*Z2*eSquare) * Pi/180.) + parameter (zzz = screeningPar / (2.*Z1*Z2*eSquare)) + parameter (Meyer_faktor5 = zzz*zzz / (8*Pi*Pi)) + +c------------------------------------ + + integer nBin,nBinMax + parameter (nBinMax=201) + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + integer i + real rhelp + + integer HB_memsize + parameter(HB_memsize=500000) + real memory(HB_memsize) + COMMON /PAWC/ memory + + +c nur noch fuer Testzwecke: + + real fValues(203) + real fValuesFolded(203) + + integer idh + parameter (idh = 50) + + INCLUDE 'mutrack$sourcedirectory:COM_DIRS.INC' + character filename*20 ! Name der Ausgabe-Dateien + COMMON /filename/ filename + +c------------------------------------------------------------------------------- + +c Festlegen des maximalen Theta-Wertes sowie der Schrittweite: + + if (tau.LT.0.2) then + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist kleiner als 0.2 => kann ich nicht ... => STOP' + call exit + elseif (tau.LE.2.) then + ! => Tabelle A + thetaSchlangeMax = 4.0 + elseif (tau.LE.8.) then + ! => Tabelle B + thetaSchlangeMax = 7.0 + elseif (tau.LE.20.) then + ! => Tabelle C + thetaSchlangeMax = 20.0 + else + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist groesser als 20 => kann ich nicht ... => STOP' + call exit + endif + + thetaMax = thetaSchlangeMax / Meyer_Faktor4 / Ekin + if (thetaMax.GT.50) then + thetaStep = .5 + elseif (thetaMax.GT.25) then + thetaStep = .25 + elseif (thetaMax.GT.12.5) then + thetaStep = .125 + else + thetaStep = .0625 + endif + + +c Tabelle der F-Werte erstellen: + + nBin = 0 + do theta = thetaStep, thetaMax, thetaStep + + ! Berechne aus theta das 'reduzierte' thetaSchlange (dabei gleich + ! noch von degree bei theta in Radiant bei thetaSchlange umrechnen): + + thetaSchlange = Meyer_faktor4 * Ekin * theta + + ! Auslesen der Tabellenwerte fuer die f-Funktionen: + + call F_Functions_Meyer(tau,thetaSchlange,f1,f2) + if (thetaSchlange.EQ.-1) then + ! wir sind jenseits von thetaSchlangeMax + goto 10 + endif + + ! Berechnen der Streuintensitaet: + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + + nBin = nBin + 1 + if (nBin.GT.nBinMax) then + write(*,*) 'nBin > nBinMax => EXIT' + call exit + endif + value(nBin) = sind(theta)*F + + fValues(nBin+1) = F ! fuer Testzwecke + fValuesFolded(nBin+1) = sind(theta)*F ! fuer Testzwecke + + enddo + + +c Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + +10 do i = 1, nBin + area(i) = (value(i)+value(i-1))/2. * thetaStep + integ(i) = integ(i-1) + area(i) + enddo + + +c Normiere totale Flaeche auf 1: + + rHelp = integ(nBin) + do i = 1, nBin + value(i) = value(i) / rHelp + area(i) = area(i) / rHelp + integ(i) = integ(i) / rHelp + enddo + + +c vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + ! Berechne die Werte fuer theta=0: + + call F_Functions_Meyer(tau,0.,f1,f2) + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + fValues(1) = F + fValuesFolded(1) = 0. + + ! Gib die Werte in das Tabellenfile aus: + +c theta = 0. +c open (10,file=outDir//':'//filename//'.TAB',status='NEW') +c do i = 1, nBin+1 +c write(10,*) theta, fValues(i), fValuesFolded(i) +c theta = theta + thetaStep +c enddo +c close (10) + + + ! Buchen und Fuellen der Histogramme: + + call HBOOK1(idh,'F',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh,fValues) + call HRPUT(idh,outDir//':'//filename//'.RZ','N') + call HDELET(idh) + + call HBOOK1(idh+1,'F*sin([q])',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh+1,fValuesFolded) + call HRPUT(idh+1,outDir//':'//filename//'.RZ','U') + call HDELET(idh+1) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine throwMeyerAngle (theta) +c ================================== + + implicit none + + real lowerbound,y1,y2,f,root,radiant,fraction + integer bin,nBin + integer nBinMax + parameter (nBinMax=201) + + real theta,thetaStep + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + real rhelp + + real random + integer seed + common /seed/ seed + + +c bin: Nummer des Bins, innerhalb dessen das Integral den Wert von +c random erreicht oder ueberschreitet: + + random = ran(seed) + + bin = 1 + do while (random.GT.integ(bin)) + bin = bin + 1 + if (bin.GT.nBin) then + write(*,*) 'error 1' + call exit + endif + enddo + + fraction = (random-integ(bin-1)) / (integ(bin)-integ(bin-1)) + y1 = value(bin-1) + y2 = value(bin) + f = thetaStep / (y2-y1) + rHelp = y1*f + + radiant = rHelp*rHelp + fraction*thetaStep*(y1+y2)*f + root = SQRT(radiant) + lowerBound = real(bin-1)*thetaStep + if (f.GT.0) then + theta = lowerBound - rHelp + root + else + theta = lowerBound - rHelp - root + endif + + + END + + +c=============================================================================== + + options /extend_source + + subroutine F_Functions_Meyer(tau,thetaSchlange,f1,f2) +c ===================================================== + + implicit none + +c Diese Routine gibt in Abhaengigkeit von 'thetaSchlange' und 'tau' +c Funktionswerte fuer f1 und f2 zurueck. f1 und f2 entsprechen dabei den +c bei Meyer angegebenen Funktion gleichen Namens. Die in dieser Routine +c verwendeten Tabellen sind eben dieser Referenz entnommen: +c L.Meyer, phys.stat.sol. (b) 44, 253 (1971) + + real tau,thetaSchlange + real f1, f2, f1_(2), f2_(2) + + integer column_,column,row + + integer iColumn + real weightCol, weightRow + +c------------------------------------------------------------------------------- + +c die Tabellendaten der Referenz (Tabellen 2 und 3): + + integer nColumn + parameter (nColumn = 25) + real tau_(nColumn) / + + 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, + + 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10., 12., 14., 16., 18., 20. / + + integer nRowA + parameter (nRowA = 25) + real thetaSchlangeA(nRowA) / + + .00, .05, .10, .15, .20, .25, .30, .35, .40, .45, .50, .60, + + .70, .80, .90, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, 3.5, 4.0 / + + integer nRowB + parameter (nRowB = 24) + real thetaSchlangeB(nRowB) / + + 0.0, 0.2, 0.4, 0.5, 0.6, 0.8, 1.0, 1.2, 1.4, 1.5, 1.6, 1.8, + + 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0 / + + integer nRowC + parameter (nRowC = 24) + real thetaSchlangeC(nRowC) / + + 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, + + 7.0, 8.0, 9.0, 10., 11., 12., 13., 14., 15., 16., 18., 20. / + + + real f1_A(9,nRowA) + + /1.69E+2,4.55E+1,2.11E+1,1.25E+1,8.48E+0,6.21E+0,4.80E+0,3.86E+0,3.20E+0, + + 9.82E+1,3.72E+1,1.97E+1,1.20E+1,8.27E+0,6.11E+0,4.74E+0,3.83E+0,3.17E+0, + + 3.96E+1,2.58E+1,1.65E+1,1.09E+1,7.73E+0,5.82E+0,4.58E+0,3.72E+0,3.10E+0, + + 1.76E+1,1.58E+1,1.27E+1,9.26E+0,6.93E+0,5.38E+0,4.31E+0,3.55E+0,2.99E+0, + + 8.62E+0,1.01E+1,9.45E+0,7.58E+0,6.02E+0,4.85E+0,3.98E+0,3.33E+0,2.84E+0, + + 4.65E+0,6.55E+0,6.91E+0,6.06E+0,5.11E+0,4.28E+0,3.62E+0,3.08E+0,2.66E+0, + + 2.74E+0,4.45E+0,5.03E+0,4.78E+0,4.27E+0,3.72E+0,3.23E+0,2.82E+0,2.47E+0, + + 1.77E+0,3.02E+0,3.71E+0,3.76E+0,3.53E+0,3.20E+0,2.86E+0,2.55E+0,2.27E+0, + + 1.22E+0,2.19E+0,2.78E+0,2.96E+0,2.91E+0,2.73E+0,2.51E+0,2.28E+0,2.07E+0, + + 8.82E-1,1.59E+0,2.12E+0,2.35E+0,2.39E+0,2.32E+0,2.19E+0,2.03E+0,1.87E+0, + + 6.55E-1,1.20E+0,1.64E+0,1.88E+0,1.97E+0,1.96E+0,1.90E+0,1.79E+0,1.68E+0, + + 3.80E-1,7.15E-1,1.01E+0,1.22E+0,1.35E+0,1.40E+0,1.41E+0,1.39E+0,1.34E+0, + + 2.26E-1,4.45E-1,6.44E-1,8.08E-1,9.28E-1,1.01E+0,1.05E+0,1.06E+0,1.05E+0, + + 1.39E-1,2.80E-1,4.21E-1,5.45E-1,6.46E-1,7.22E-1,7.75E-1,8.07E-1,8.21E-1, + + 8.22E-2,1.76E-1,2.78E-1,3.71E-1,4.53E-1,5.21E-1,5.74E-1,6.12E-1,6.37E-1, + + 5.04E-2,1.11E-1,1.86E-1,2.57E-1,3.22E-1,3.79E-1,4.27E-1,4.65E-1,4.94E-1, + + 2.51E-2,5.60E-2,9.24E-2,1.31E-1,1.69E-1,2.02E-1,2.40E-1,2.71E-1,2.97E-1, + + 1.52E-2,3.20E-2,5.08E-2,7.23E-2,9.51E-2,1.18E-1,1.41E-1,1.63E-1,1.83E-1, + + 1.03E-2,2.05E-2,3.22E-2,4.55E-2,6.01E-2,7.53E-2,9.02E-2,1.05E-1,1.19E-1, + + 8.80E-3,1.48E-2,2.25E-2,3.13E-2,4.01E-2,5.03E-2,6.01E-2,7.01E-2,8.01E-2, + + 6.10E-3,1.15E-2,1.71E-2,2.28E-2,2.89E-2,3.52E-2,4.18E-2,4.86E-2,5.55E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,1.71E-2,1.98E-2,2.28E-2,2.58E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.90E-3,1.02E-2,1.16E-2,1.31E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,4.90E-3,5.70E-3,6.40E-3,7.20E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.90E-3,3.40E-3,3.90E-3,4.30E-3/ + + real f1_B(9,nRowB) + + /2.71E+0,1.92E+0,1.46E+0,1.16E+0,9.52E-1,8.03E-1,6.90E-1,5.32E-1,4.28E-1, + + 2.45E+0,1.79E+0,1.39E+0,1.12E+0,9.23E-1,7.82E-1,6.75E-1,5.23E-1,4.23E-1, + + 1.87E+0,1.48E+0,1.20E+0,9.96E-1,8.42E-1,7.24E-1,6.32E-1,4.98E-1,4.07E-1, + + 1.56E+0,1.30E+0,1.09E+0,9.19E-1,7.89E-1,6.86E-1,6.03E-1,4.80E-1,3.95E-1, + + 1.28E+0,1.11E+0,9.62E-1,8.33E-1,7.27E-1,6.40E-1,5.69E-1,4.59E-1,3.81E-1, + + 8.23E-1,7.90E-1,7.29E-1,6.64E-1,6.01E-1,5.44E-1,4.94E-1,4.12E-1,3.49E-1, + + 5.14E-1,5.36E-1,5.29E-1,5.07E-1,4.78E-1,4.47E-1,4.16E-1,3.60E-1,3.13E-1, + + 3.19E-1,3.58E-1,3.76E-1,3.78E-1,3.70E-1,3.57E-1,3.45E-1,3.08E-1,2.76E-1, + + 2.02E-1,2.40E-1,2.64E-1,2.77E-1,2.82E-1,2.80E-1,2.65E-1,2.59E-1,2.39E-1, + + 1.67E-1,1.96E-1,2.20E-1,2.36E-1,2.44E-1,2.47E-1,2.45E-1,2.35E-1,2.21E-1, + + 1.33E-1,1.61E-1,1.85E-1,2.02E-1,2.12E-1,2.18E-1,2.18E-1,2.14E-1,2.03E-1, + + 8.99E-2,1.12E-1,1.32E-1,1.48E-1,1.59E-1,1.67E-1,1.68E-1,1.75E-1,1.72E-1, + + 6.24E-2,7.94E-2,9.50E-2,1.09E-1,1.20E-1,1.29E-1,1.35E-1,1.42E-1,1.43E-1, + + 4.55E-2,5.74E-2,6.98E-2,8.11E-2,9.09E-2,9.92E-2,1.06E-1,1.15E-1,1.19E-1, + + 3.35E-2,4.22E-2,5.19E-2,6.11E-2,6.95E-2,7.69E-2,8.33E-2,9.28E-2,9.85E-2, + + 2.50E-2,3.16E-2,3.92E-2,4.66E-2,5.35E-2,6.00E-2,6.57E-2,7.49E-2,8.13E-2, + + 1.90E-2,2.40E-2,2.99E-2,3.58E-2,4.16E-2,4.70E-2,5.20E-2,6.05E-2,6.70E-2, + + 1.47E-2,1.86E-2,2.32E-2,2.79E-2,3.25E-2,3.70E-2,4.12E-2,4.89E-2,5.51E-2, + + 8.10E-3,1.04E-2,1.30E-2,1.57E-2,1.84E-2,2.12E-2,2.40E-2,2.93E-2,3.42E-2, + + 4.80E-3,6.20E-3,7.70E-3,9.30E-3,1.09E-2,1.26E-2,1.44E-2,1.79E-2,2.14E-2, + + 2.80E-3,3.80E-3,4.70E-3,5.70E-3,6.70E-3,7.50E-3,8.90E-3,1.13E-2,1.36E-2, + + 1.70E-3,2.30E-3,2.90E-3,3.60E-3,4.20E-3,4.90E-3,5.60E-3,7.20E-3,8.80E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.00E-3,2.80E-3,3.50E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.80E-4,1.20E-3,1.60E-3/ + + real f1_C(7,nRowC) + + /3.65E-1,2.62E-1,2.05E-1,1.67E-1,1.41E-1,1.21E-1,1.05E-1, + + 3.33E-1,2.50E-1,1.95E-1,1.61E-1,1.36E-1,1.18E-1,1.03E-1, + + 2.75E-1,2.18E-1,1.76E-1,1.48E-1,1.27E-1,1.11E-1,9.80E-2, + + 2.04E-1,1.75E-1,1.50E-1,1.29E-1,1.13E-1,1.01E-1,9.00E-2, + + 1.41E-1,1.31E-1,1.19E-1,1.08E-1,9.71E-2,8.88E-2,8.01E-2, + + 9.32E-2,9.42E-2,9.10E-2,8.75E-2,8.00E-2,7.44E-2,6.91E-2, + + 5.98E-2,6.52E-2,6.72E-2,6.62E-2,6.40E-2,6.12E-2,5.82E-2, + + 3.83E-2,4.45E-2,4.80E-2,4.96E-2,4.98E-2,4.90E-2,4.77E-2, + + 2.46E-2,3.01E-2,3.40E-2,3.65E-2,3.79E-2,3.84E-2,3.83E-2, + + 1.59E-2,2.03E-2,2.39E-2,2.66E-2,2.85E-2,2.97E-2,3.04E-2, + + 1.04E-2,1.37E-2,1.66E-2,1.92E-2,2.12E-2,2.27E-2,2.37E-2, + + 4.39E-3,6.26E-3,8.26E-3,9.96E-3,1.15E-2,1.29E-2,1.41E-2, + + 2.06E-3,3.02E-3,4.24E-3,5.28E-3,6.32E-3,7.32E-3,8.26E-3, + + 1.21E-3,1.69E-3,2.24E-3,2.85E-3,3.50E-3,4.16E-3,4.82E-3, + + 8.50E-4,1.10E-3,1.38E-3,1.65E-3,2.03E-3,2.45E-3,2.88E-3, + + 5.90E-4,7.40E-4,8.50E-4,9.90E-4,1.23E-3,1.49E-3,1.71E-3, + + 3.90E-4,4.60E-4,5.20E-4,6.30E-4,7.65E-4,9.65E-4,1.12E-3, + + 2.40E-4,2.70E-4,3.10E-4,3.98E-4,4.97E-4,6.03E-4,7.18E-4, + + 1.50E-4,1.70E-4,2.15E-4,2.70E-4,3.35E-4,4.35E-4,5.00E-4, + + 1.00E-4,1.20E-4,1.46E-4,1.90E-4,2.40E-4,2.88E-4,3.43E-4, + + 0.00 ,0.00 ,1.04E-4,1.41E-4,1.80E-4,2.10E-4,2.50E-4, + + 0.00 ,0.00 ,8.20E-5,1.06E-4,1.38E-4,1.58E-4,1.85E-4, + + 0.00 ,0.00 ,5.40E-5,7.00E-5,8.60E-5,1.03E-4,1.20E-4, + + 0.00 ,0.00 ,4.20E-5,5.40E-5,6.50E-5,7.70E-5,8.80E-5/ + + real f2_A(9,nRowA) + + / 3.52E+3, 3.27E+2, 9.08E+1, 3.85E+1, 2.00E+1, 1.18E+1, 7.55E+0, 5.16E+0, 3.71E+0, + + 2.58E+2, 1.63E+2, 7.30E+1, 3.42E+1, 1.85E+1, 1.11E+1, 7.18E+0, 4.96E+0, 3.59E+0, + + -1.12E+2, 4.84E+0, 3.56E+1, 2.34E+1, 1.45E+1, 9.33E+0, 6.37E+0, 4.51E+0, 3.32E+0, + + -5.60E+1,-1.12E+1, 9.87E+0, 1.24E+1, 9.59E+0, 7.01E+0, 5.16E+0, 3.83E+0, 2.91E+0, + + -2.13E+1,-1.22E+1,-2.23E+0, 3.88E+0, 5.15E+0, 4.65E+0, 3.87E+0, 3.12E+0, 2.45E+0, + + -8.25E+0,-9.58E+0,-5.59E+0,-1.40E+0, 1.76E+0, 2.71E+0, 2.71E+0, 2.35E+0, 1.95E+0, + + -3.22E+0,-6.12E+0,-5.28E+0,-2.87E+0,-1.92E-1, 1.32E+0, 1.69E+0, 1.74E+0, 1.48E+0, + + -1.11E+0,-3.40E+0,-4.12E+0,-3.08E+0,-6.30E-1, 3.60E-1, 9.20E-1, 1.03E+0, 1.04E+0, + + -2.27E-1,-2.00E+0,-2.93E+0,-2.69E+0,-1.48E+0,-3.14E-1, 2.69E-1, 5.28E-1, 6.09E-1, + + 1.54E-1,-1.09E+0,-2.10E+0,-2.15E+0,-1.47E+0,-6.77E-1,-1.80E-1, 1.08E-1, 2.70E-1, + + 3.28E-1,-6.30E-1,-1.50E+0,-1.68E+0,-1.34E+0,-8.43E-1,-4.60E-1,-1.85E-1,-4.67E-3, + + 3.32E-1,-2.06E-1,-7.32E-1,-9.90E-1,-9.42E-1,-8.20E-1,-6.06E-1,-4.51E-1,-3.01E-1, + + 2.72E-1,-3.34E-2,-3.49E-1,-5.65E-1,-6.03E-1,-5.79E-1,-5.05E-1,-4.31E-1,-3.45E-1, + + 2.02E-1, 2.80E-2,-1.54E-1,-3.00E-1,-3.59E-1,-3.76E-1,-4.60E-1,-3.40E-1,-3.08E-1, + + 1.38E-1, 4.84E-2,-5.56E-2,-1.44E-1,-2.04E-1,-2.39E-1,-2.54E-1,-2.49E-1,-2.48E-1, + + 9.47E-2, 4.86E-2,-1.08E-2,-6.44E-2,-1.02E-1,-1.34E-1,-1.62E-1,-1.79E-1,-1.87E-1, + + 5.33E-2, 3.71E-2, 1.85E-2, 1.63E-3,-1.69E-2,-3.69E-2,-5.66E-2,-7.78E-2,-9.33E-2, + + 3.38E-2, 2.40E-2, 1.62E-2, 9.90E-3, 3.76E-3,-4.93E-3,-1.66E-2,-3.05E-2,-4.22E-2, + + 2.12E-2, 1.56E-2, 1.05E-2, 7.80E-3, 7.92E-3, 6.30E-3, 3.20E-4,-8.50E-3,-1.66E-2, + + 1.40E-2, 9.20E-3, 5.30E-3, 4.70E-3, 6.31E-3, 8.40E-3, 5.30E-3, 8.80E-4,-3.30E-3, + + 9.20E-3, 4.70E-3, 1.70E-3, 2.60E-3, 4.49E-3, 6.60E-3, 6.00E-3, 4.70E-3, 2.80E-3, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + real f2_B(9,nRowB) + + / 2.75E+0, 1.94E+0, 9.13E-1, 6.06E-1, 4.26E-1, 3.14E-1, 2.40E-1, 1.51E-1, 1.03E-1, + + 1.94E+0, 1.16E+0, 7.56E-1, 5.26E-1, 3.81E-1, 2.87E-1, 2.23E-1, 1.43E-1, 9.78E-2, + + 5.85E-1, 5.04E-1, 4.10E-1, 3.30E-1, 2.69E-1, 2.17E-1, 1.78E-1, 1.22E-1, 8.71E-2, + + 7.83E-2, 2.00E-1, 2.35E-1, 2.19E-1, 1.97E-1, 1.73E-1, 1.48E-1, 1.08E-1, 7.93E-2, + + -1.82E-1, 1.56E-2, 1.04E-1, 1.36E-1, 1.38E-1, 1.31E-1, 1.19E-1, 9.46E-2, 7.19E-2, + + -2.71E-1,-1.66E-1,-7.29E-2,-4.74E-3, 3.60E-2, 5.50E-2, 6.28E-2, 5.98E-2, 5.09E-2, + + -1.87E-1,-1.58E-1,-1.09E-1,-5.80E-2,-2.03E-2, 2.48E-3, 1.99E-2, 3.36E-2, 3.27E-2, + + -1.01E-1,-1.05E-1,-8.95E-2,-6.63E-2,-3.93E-2,-2.38E-2,-9.22E-3, 8.47E-3, 1.52E-2, + + -5.19E-2,-6.47E-2,-6.51E-2,-5.62E-2,-4.51E-2,-3.49E-2,-2.45E-2,-8.19E-3, 2.05E-3, + + -3.68E-2,-4.89E-2,-5.36E-2,-5.06E-2,-4.27E-2,-3.65E-2,-2.80E-2,-1.33E-2,-3.47E-3, + + -2.33E-2,-3.69E-2,-4.41E-2,-4.38E-2,-3.97E-2,-3.50E-2,-2.88E-2,-1.60E-2,-6.68E-3, + + -8.76E-3,-2.07E-2,-2.90E-2,-3.17E-2,-3.09E-2,-2.92E-2,-2.63E-2,-1.79E-2,-1.03E-2, + + -1.20E-3,-1.11E-2,-1.90E-2,-2.20E-2,-2.32E-2,-2.24E-2,-2.10E-2,-1.66E-2,-1.11E-2, + + 1.72E-3,-4.82E-3,-1.02E-2,-1.42E-2,-1.65E-2,-1.66E-2,-1.60E-2,-1.39E-2,-1.09E-2, + + 2.68E-3,-1.18E-3,-5.19E-3,-8.30E-5,-1.01E-2,-1.14E-2,-1.16E-2,-1.16E-2,-9.99E-3, + + 2.81E-3, 8.21E-4,-1.96E-3,-3.99E-3,-5.89E-3,-7.13E-3,-8.15E-3,-9.05E-3,-8.60E-3, + + 2.61E-3, 1.35E-3,-2.99E-4,-1.79E-3,-3.12E-3,-4.44E-3,-5.61E-3,-7.01E-3,-7.27E-3, + + 2.06E-3, 1.45E-3, 4.64E-4,-5.97E-4,-1.71E-3,-2.79E-3,-3.84E-3,-5.29E-3,-5.90E-3, + + 1.07E-3, 9.39E-4, 8.22E-4, 3.58E-4,-1.15E-4,-6.60E-4,-1.18E-3,-2.15E-3,-2.88E-3, + + 4.97E-4, 5.46E-4, 6.15E-4, 5.56E-4, 3.14E-4, 9.80E-5,-1.30E-4,-5.98E-4,-1.07E-4, + + 1.85E-4, 3.11E-4, 4.25E-4, 4.08E-4, 3.63E-4, 3.04E-4, 2.24E-4, 2.80E-5,-2.10E-4, + + 4.80E-5, 1.48E-4, 2.44E-4, 2.80E-4, 3.01E-4, 3.11E-4, 3.13E-4, 2.40E-4, 1.10E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 1.39E-4, 1.80E-4, 1.80E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 4.38E-5, 7.30E-5, 8.40E-5/ + + real f2_C(7,nRowC) + + / 7.36E-2, 4.21E-2, 2.69E-2, 1.83E-2, 1.34E-2, 1.01E-2, 7.88E-3, + + 5.79E-2, 3.61E-2, 2.34E-2, 1.64E-2, 1.21E-2, 9.26E-3, 7.28E-3, + + 2.94E-2, 2.17E-2, 1.60E-2, 1.23E-2, 9.49E-3, 7.45E-3, 5.95E-3, + + 2.30E-3, 7.07E-3, 7.76E-3, 7.02E-3, 6.13E-3, 5.17E-3, 4.34E-3, + + -7.50E-3,-2.00E-3, 9.93E-4, 2.36E-3, 2.82E-3, 2.86E-3, 2.72E-3, + + -8.27E-3,-5.37E-3,-2.58E-3,-7.96E-4, 3.75E-4, 9.71E-4, 1.28E-3, + + -5.79E-3,-5.12E-3,-3.86E-3,-2.46E-3,-1.20E-3,-3.74E-4, 1.74E-4, + + -3.26E-3,-3.43E-3,-3.26E-3,-2.68E-3,-1.84E-3,-1.12E-3,-4.54E-4, + + -1.46E-3,-1.49E-3,-2.20E-3,-2.18E-3,-1.85E-3,-1.40E-3,-8.15E-4, + + -4.29E-4,-9.44E-4,-1.29E-3,-1.50E-3,-1.51E-3,-1.36E-3,-9.57E-4, + + -3.30E-5,-3.66E-4,-6.78E-4,-9.38E-4,-1.09E-3,-1.09E-3,-9.56E-4, + + 1.50E-4, 3.10E-5,-1.38E-4,-3.06E-4,-4.67E-4,-5.48E-4,-6.08E-4, + + 1.00E-4, 8.50E-5, 2.30E-5,-6.60E-5,-1.58E-4,-2.40E-4,-3.05E-4, + + 5.40E-5, 6.50E-5, 4.90E-5, 1.20E-5,-3.60E-5,-8.90E-5,-1.31E-4, + + 2.90E-5, 4.30E-5, 4.40E-5, 2.90E-5, 5.10E-6,-2.20E-5,-4.80E-5, + + 1.40E-5, 2.40E-5, 2.80E-5, 2.60E-5, 1.90E-5, 7.50E-6,-1.10E-5, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + +c=============================================================================== + +c Bestimme, welche Reihen der Tabellen fuer Interpolation benoetigt werden: + + if (tau.LT.tau_(1)) then + write(*,*) 'tau is less than the lowest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'minimum = ',tau_(1) + call exit + elseif (tau.GT.tau_(nColumn)) then + write(*,*) 'tau is greater than the highest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'maximum = ',tau_(nColumn) + call exit + endif + + column_ = 2 + do while (tau.GT.tau_(column_)) + column_ = column_ + 1 + enddo + ! Das Gewicht der Reihe zu groesserem Tau: + weightCol = (tau-tau_(column_-1)) / (tau_(column_)-tau_(column_-1)) + + +c Besorge fuer gegebenes 'thetaSchlange' die interpolierten f1- und f2 -Werte +c der beiden relevanten Reihen: +c iColumn = 1 => Reihe mit hoeherem Index +c iColumn = 2 => Reihe mit kleinerem Index + + + iColumn = 1 + + +5 continue + + if (column_.LE.9) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 1. Tabelle: 0.2 <= tau <= 1.8 + + column = column_ + + if (thetaSchlange.LT.thetaSchlangeA(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeA(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeA(nRowA)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeA(nRowA) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeA(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeA(row-1)) / + + (thetaSchlangeA(row)-thetaSchlangeA(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_A(column,row-1) + + + weightRow * f1_A(column,row) + f2_(iColumn) = (1.-weightRow) * f2_A(column,row-1) + + + weightRow * f2_A(column,row) + + + elseif (column_.LE.18) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 2. Tabelle: 2.0 <= tau <= 7.0 + + column = column_ - 9 + + if (thetaSchlange.LT.thetaSchlangeB(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeB(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeB(nRowB)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeB(nRowB) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeB(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeB(row-1)) / + + (thetaSchlangeB(row)-thetaSchlangeB(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_B(column,row-1) + + + weightRow * f1_B(column,row) + f2_(iColumn) = (1.-weightRow) * f2_B(column,row-1) + + + weightRow * f2_B(column,row) + + + else ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 3. Tabelle: 8.0 <= tau <= 20. + + column = column_ - 18 + + if (thetaSchlange.LT.thetaSchlangeC(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeC(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeC(nRowC)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeC(nRowC) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeC(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeC(row-1)) / + + (thetaSchlangeC(row)-thetaSchlangeC(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_C(column,row-1) + + + weightRow * f1_C(column,row) + f2_(iColumn) = (1.-weightRow) * f2_C(column,row-1) + + + weightRow * f2_C(column,row) + + + endif ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + if (iColumn.EQ.1) then + column_ = column_ - 1 + iColumn = 2 + goto 5 + endif + + f1 = weightCol*f1_(1) + (1.-weightCol)*f1_(2) + f2 = weightCol*f2_(1) + (1.-weightCol)*f2_(2) + + + END + + +c=============================================================================== + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE reset_statistics +c =========================== + + IMPLICIT NONE + + integer Nr,n,k + + INCLUDE 'mutrack$sourcedirectory:COM_MUTRACK.INC' + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c der allgemeine Statistikspeicher: (*) : braucht nicht resettet zu werden +c --------------------------------- +c +c statMem(1,Nr): 1. Wert: x(1) (*) +c statMem(2,Nr): Summe_ueber_i( x(i)-x(1) ) +c statMem(3,Nr): Summe_ueber_i( (x(i)-x(1))**2. ) +c statMem(4,Nr): kleinster Wert +c statMem(5,Nr): groesster Wert +c statMem(6,Nr): Mittelwert (*) +c statMem(7,Nr): Varianz (*) +c statMem(8,Nr): Anzahl der Werte +c statMem(9,Nr): Anzahl der Werte in Prozent von 'StartsProSchleife' (*) +c ('StartsProSchleife' == n_par(0)) +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +c Ergebnis-Statistik-Speicher resetten: + + do Nr = 1, stat_Anzahl + statMem(2,Nr) = 0. ! Summe der Werte + statMem(3,Nr) = 0. ! Summe der Quadrate + statMem(4,Nr) = 1.e10 ! Minimalwert + statMem(5,Nr) = -1.e10 ! Maximalwert + statMem(8,Nr) = 0. ! Anzahl + enddo + +c die Scaler fuer den Returncode des TDs und die Pfostenhits sowie die +c StartZaehler resetten: + + do n = 1, 2 ! (1: Projektile, 2: FolienElektronen) + start_nr(n) = 0 + do k = 1, 18 + statTD(n,k) = 0. + enddo + do k = 1, 75 + pfostenHit(k,n) = 0. + enddo + enddo + + +c der Statistikspeicher fuer das Teilchen-Schicksal: + + do k = smallest_code_Nr, Gebiete_Anzahl*highest_code_Nr + statDestiny(k) = 0 + enddo + + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE fill_statMem(wert,Nr) +c ================================ + + IMPLICIT NONE + + INCLUDE 'mutrack$sourcedirectory:COM_MUTRACK.INC' + + real wert + integer Nr + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c Wird die Varianz der Verteilung einer Groesse x gemaess der Formel +c +c Var(x) = SQRT( - **2 ) , < > -> Erwartungswert +c +c mit +c = 1/n * Summe_ueber_i( x(i) ) +c = 1/n * Summe_ueber_i( x(i)**2 ) +c +c berechnet, so tritt manchmal aufgrund der beschraenkten Genauigkeit der +c numerischen Speicher das Problem auf, dass bei grossen Werten x(i) und +c kleiner Streuung der Ausdruck unter der Wurzel negativ wird, was erstens +c unphysikalisch ist und zweitens zum Programmabbruch fuehrt. +c +c Dieses Problem liesse sich vermeiden, wenn man die Groessen x(i) relativ +c zu ihrem Erwartungswert angeben wuerde, der aber erst im nachhinein bekannt +c ist. +c +c Als Naeherungsloesung verwende ich daher fuer die Berechnung der Varianz die +c x(i) relativ zu x(1), also zum ersten Wert gemessen, der gerade bei kleiner +c Streuung, bei der das numerische Problem auftritt, nahe am Erwartungswert +c liegen sollte. +c +c statMem(1,Nr): 1. Wert: x(1) +c statMem(2,Nr): Summe_ueber_i( x(i)-x(1) ) +c statMem(3,Nr): Summe_ueber_i( (x(i)-x(1))**2. ) +c statMem(4,Nr): kleinster Wert +c statMem(5,Nr): groesster Wert +c statMem(6,Nr): Mittelwert (*) +c statMem(7,Nr): Varianz (*) +c statMem(8,Nr): Anzahl der Werte +c statMem(9,Nr): Anzahl der Werte in Prozent von 'StartsProSchleife' (*) +c ('StartsProSchleife' == n_par(0)) +c +c (*): wird im SUB 'eval_statistics' berechnet. +c +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +c Zaehle mit: + + statMem(8,Nr) = statMem(8,Nr) + 1. + + +c Speichere den ersten Wert: + + if (statMem(8,Nr).EQ.1) statMem(1,Nr) = wert + + +c Summiere die Abweichungen vom ersten Wert: + + statMem(2,Nr) = statMem(2,Nr) + (wert-statMem(1,Nr)) + + +c Summiere die Quadratischen Abweichungen vom ersten Wert: + + statMem(3,Nr) = statMem(3,Nr) + (wert-statMem(1,Nr))**2. + + +c Speichere den kleinsten Wert (wurde noch kein Wert aufgenommen, so ist +c statMem(4,Nr) = 1.e10): + + if (statMem(4,Nr).GT.wert) statMem(4,Nr) = wert + + +c Speichere den groessten Wert (wurde noch kein Wert aufgenommen, so ist +c statMem(5,Nr) = -1.e10): + + if (statMem(5,Nr).LT.wert) statMem(5,Nr) = wert + + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE eval_statistics +c ========================== + + IMPLICIT NONE + +c statMem(1,Nr): 1. Wert: x(1) +c statMem(2,Nr): Summe_ueber_i( x(i)-x(1) ) +c statMem(3,Nr): Summe_ueber_i( (x(i)-x(1))**2. ) +c statMem(4,Nr): kleinster Wert +c statMem(5,Nr): groesster Wert +c statMem(6,Nr): Mittelwert +c statMem(7,Nr): Varianz +c statMem(8,Nr): Anzahl der Werte +c statMem(9,Nr): Anzahl der Werte in Prozent von 'StartsProSchleife' +c ('StartsProSchleife' == n_par(0)) + + + INCLUDE 'mutrack$sourcedirectory:COM_MUTRACK.INC' + + real n ! Anzahl der Werte, == statMem(8,Nr) + real radiant + + integer Nr,l + + + do Nr = 1, Stat_Anzahl + if (statNeeded(Nr)) then + n = statMem(8,Nr) + if (n.ne.0.) then + + !c Berechne Mittelwert: + statMem(6,Nr) = statMem(2,Nr)/n + statMem(1,Nr) + + !c Berechne Varianz: + radiant = ( statMem(3,Nr) - (statMem(2,Nr)**2. )/n)/n + statMem(7,Nr) = sqrt(radiant) + + !c Berechne Anteil an allen gestarteten in Prozent + statMem(9,Nr) = 100.*n/real(n_par(0)) + + else + + do l = 1, 9 + statMem(l,Nr) = 0. + enddo + + endif + endif + enddo + + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE SAVE_GRAPHICS_KOORD +c ============================== + + IMPLICIT NONE + + INCLUDE 'mutrack$sourcedirectory:COM_MUTRACK.INC' + INCLUDE 'mutrack$sourcedirectory:COM_WINKEL.INC' + INCLUDE 'mutrack$sourcedirectory:COM_KAMMER.INC' + +c Variablen fuer die Graphikausgabe: + + real xKoord(1000) ! Koordinatenfelder fuer die + real yKoord(1000) ! Graphikausgabe + real zKoord(1000) ! +cMBc real tKoord(1000) ! + integer nKoord ! Anzahl der Koordinaten + +cMBc COMMON /GRAPHIX/ xKoord,yKoord,zKoord,nKoord,tKoord ! fuer Graphikaufruf + COMMON /GRAPHIX/ xKoord,yKoord,zKoord,nKoord ! fuer Graphikaufruf + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + nKoord = nKoord + 1 + + xKoord(nKoord) = x(1) + yKoord(nKoord) = x(2) + zKoord(nKoord) = x(3) +cMBc tKoord(nKoord) = t + + if (nKoord.EQ.1000) then + if (Gebiet.LE.upToChKoord) then ! Bahnberechnung wurde vor + call plot_horizontal ! Koordinatenwechsel abgebrochen + else + call plot_vertikal + endif + xKoord(1) = xKoord( 999) ! die letzten beiden uebernehmen, + yKoord(1) = yKoord( 999) ! damit gegebenenfalls der Richtungs- + zKoord(1) = zKoord( 999) ! pfeil gezeichnet werden kann. +cMBc tKoord(1) = tKoord( 999) + xKoord(2) = xKoord(1000) + yKoord(2) = yKoord(1000) + zKoord(2) = zKoord(1000) +cMBc tKoord(2) = tKoord(1000) + nKoord = 2 + endif + + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE Output_Debug +c ======================= + + IMPLICIT NONE + + INCLUDE 'mutrack$sourcedirectory:COM_MUTRACK.INC' + INCLUDE 'mutrack$sourcedirectory:COM_WINKEL.INC' + INCLUDE 'mutrack$sourcedirectory:COM_KAMMER.INC' + + real Ekin, temp1, temp2 + + Ekin = (v(1)*v(1) + v(2)*v(2) + v(3)*v(3)) * Energie_Faktor + + if (Gebiet.EQ.1 .AND. alfaTgt.NE.0) then + if (alfaTgtVertically) then + temp1 = xGrid1*Cos_alfaTgt - x(3)*Sin_alfaTgt + temp2 = xGrid1*Sin_alfaTgt + x(3)*Cos_alfaTgt + write(lun(1),1) steps,Gebiet,t,temp1,x(2),temp2,v,Ekin + else + temp1 = xGrid1*Cos_alfaTgt - x(2)*Sin_alfaTgt + temp2 = xGrid1*Sin_alfaTgt + x(2)*Cos_alfaTgt + write(lun(1),1) steps,Gebiet,t,temp1,temp2,x(3),v,Ekin + endif + else + write(lun(1),1) steps,Gebiet,t,x,v,Ekin + endif + +1 format(X,I4,X,I2,4X,F6.1,2X,F7.2,X,F6.2,X,F6.2,2X,F6.2,X, + + F6.2,X,F6.2,2X,G13.6) + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE Decay_Test(*) +c ======================== + + IMPLICIT NONE + + INCLUDE 'mutrack$sourcedirectory:COM_MUTRACK.INC' + + real dt + + if (t.GT.lifeTime) then ! Teilchen zerfallen + dt = t - lifeTime + t = lifeTime + x(1) = x(1) - dt*v(1) + x(2) = x(2) - dt*v(2) + x(3) = x(3) - dt*v(3) + destiny = code_decay + RETURN 1 + endif + + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE chargeStateYields(E,masse,Yield_plus,Yield_zero) +c =========================================================== + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c Die Funktion sowie die Parameter sind uebernommen aus: +c +c M.Gonin, R.Kallenbach, P.Bochsler: 'Charge exchange of hydrogen atoms +c in carbon foils at 0.4 - 120 keV', Rev.Sci.Instrum. 65 (3), March 1994 +c +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + IMPLICIT NONE + + real E ! kinetische Energie in keV + real masse ! in keV / c**2 + + real a_zero,a_minus + real k_Fermi,k_zero,k_minus + real zwo_k_Fermi + real k_Fermi_Quad,k_zero_Quad,k_minus_Quad + real vc_minus,vc_plus,v_Bohr,v_rel + + parameter ( a_zero = 0.953, a_minus = 0.029 ) + parameter ( k_Fermi = 1.178 ) ! [v_Bohr] + parameter ( k_Fermi_Quad = k_Fermi * k_Fermi ) + parameter ( zwo_k_fermi = 2. * k_Fermi ) + parameter ( k_zero = 0.991*k_Fermi ) ! [v_Bohr] + parameter ( k_zero_Quad = k_zero * k_zero ) + parameter ( k_minus = 0.989*k_Fermi ) ! [v_Bohr] + parameter ( k_minus_Quad = k_minus * k_minus ) + parameter ( vc_minus = 0.284, vc_plus = 0.193 ) ! [v_Bohr] + parameter ( v_Bohr = 7.2974E-3 ) ! [c] + + real Q_zero,Q_minus,D + real Yield_minus,Yield_zero,Yield_plus + + real help1,help2,help3 + + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + if (E.LT.0) then + write(*,*) + write(*,*) 'error in subroutine ''chargeStateYields'':' + write(*,*) 'E = ',E,' < 0!' + write(*,*) '-> STOP' + write(*,*) + STOP + endif + + +c Energie in Geschwindigkeit umrechnen (in Einheiten von v_Bohr): + +c - klassisch: + + v_rel = SQRT(2.*E/masse) / v_Bohr + +c - relativistisch: + +c help1 = 1. + E/masse +c v_rel = SQRT(1. - 1./(help1*help1)) / v_Bohr + + +c Die geladenen Anteile berechnen (vgl. obige Referenz): + + help1 = v_rel*v_rel + help2 = zwo_k_Fermi*v_rel + Q_zero = 1. + (k_zero_Quad - k_Fermi_Quad - help1) / help2 + Q_minus = 1. + (k_minus_Quad - k_Fermi_Quad - help1) / help2 + + + help1 = a_zero * Q_zero + help2 = a_minus * Q_minus + help3 = (1.-Q_zero)*(1.-Q_minus) + D = help1*(help2 + (1.-Q_minus)) + help3 + + Yield_minus = help1*help2 / D + Yield_plus = help3 / D + + Yield_minus = Yield_minus * exp(-vc_minus/v_rel) + Yield_plus = Yield_plus * exp(-vc_plus /v_rel) + + Yield_zero = 1. - (Yield_minus + Yield_plus) + +c write(6,*) 'E vrel Neutral Plus Minus' +c write(6,*) E, v_rel, yield_zero, yield_plus, yield_minus + + END + + +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE test_wireHit(distToWire,WireRadiusQuad,v_x,v_y,WireHit) +c ================================================================== + +c Diese Routine ueberprueft, ob bei gegebenem Abstandsvektor 'distToWire' +c zwischen Teilchen und Draht und gegebener Geschwindigkeit v eines Teilchens +c bei geradliniger Bewegung und Drahtradius 'WireRadius' ein Schnittpunkt +c von Teilchenbahn und Drahtumfang existiert, ob also der Draht getroffen wird. +c Dafuer genuegt es zu pruefen, ob der Radiant der 'Mitternachtsformel' fuer die +c entsprechende quadratische Gleichung groesser oder gleich Null ist: + + IMPLICIT NONE + + real DistToWire(2),WireRadiusQuad,v_x,v_y + logical WireHit + + real steigung, help, radiant + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + if (abs(v_x).GT.abs(v_y)) then + steigung = v_y/v_x + help = distToWire(2) - distToWire(1) * steigung + radiant = (1+steigung*steigung)*WireRadiusQuad - help*help + else + steigung = v_x/v_y + help = distToWire(1) - distToWire(2) * steigung + radiant = (1+steigung*steigung)*WireRadiusQuad - help*help + endif + + if (radiant.ge.0) then + wireHit = .true. + else + wireHit = .false. + endif + + + END + + +c=============================================================================== diff --git a/geant4/LEMuSR/MEYER/testmeyer.cc b/geant4/LEMuSR/MEYER/testmeyer.cc new file mode 100644 index 0000000..822201d --- /dev/null +++ b/geant4/LEMuSR/MEYER/testmeyer.cc @@ -0,0 +1,195 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include"meyer.h" + +void GFunctions(double*,double*, const double tau); + + + + meyer GET; + +int main() +{ + + + // DECLARATION OF MEYER's PARAMETERS + + /* Meyer's p255: "We consider a beam of initially parallel particles + with mass m1 and atomic number Z1 which penetrates a material + layer of thickness t with N atoms per unit volume of mass m2 and + atomic number Z2. We assume that each scattering centre will be + effective according to the scattering cross section + dsigma/dÅ‹=¶a²f(Å‹)/ŋ² within a spherical volume of radius r0 + */ + + + double a, a0, N; // screnqing parameter a + double Z1, Z2, D; // charges numbers Z + double epsilon, b; // reduced energy epsilon + double mass1, mass2; // masses of incident & target particles + double v; // velocity of incident particle + double eta, theta; // eta = epsilon*sin(theta/2), (theta, scatt. angle) + // cross section variable by Lindhard, Nielsen and Scharff + double eSquare = 1.44E-10; // squared electric charge of electron in keV*cm + + double tau,thetaSchlange, thick; + double Energy; + + std::cout<< "thickness? in µm/cm²" << std::endl; + std::cin>>thick; + thick=thick*1.0e-6/2;// density= 2g/cm³, + // we want the conversion of thick in centimeter! + + std::cout<<"Enter energy in keV: "; + std::cin>>Energy; + + + + // meyer's functions + double g1,g2; + double f1,f2; + + + + // EXPRESSION OF MEYER's PARAMETERS + + // The screening parameter + // (Z1 = 1, Z2 = 6, ScreeningPar = 2.5764E-9) + Z1 = 1; Z2 = 6; + a0=0.529e-8;//unit centimeter + D= exp(2/3*log(Z1))+exp(2/3*log(Z2)); + a=0.885*a0/sqrt(D);//the screening parameter + + // The reduced energy + mass1=1/9; + mass2=12; + // b= 2*Z1*Z2*eSquare*(mass1+mass2)/(mass1*mass2*v*v); + //b= Z1*Z2 * e²[keV*cm] * (m1+m2)/m2 * 1/Energy[keV] + b= Z1*Z2*eSquare*(mass1+mass2)/(mass2*Energy); + epsilon = a/b; + std::cout<<"\n€: "<>thetaSchlange; + + + GET.GFunctions(&g1,&g2,tau); + + std::cout<< "g1("< +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include"meyer.h" + +void GFunctions(double*,double*, const double tau); + + + + meyer GET; + +int main() +{ + + + // DECLARATION OF MEYER's PARAMETERS + + /* Meyer's p255: "We consider a beam of initially parallel particles + with mass m1 and atomic number Z1 which penetrates a material + layer of thickness t with N atoms per unit volume of mass m2 and + atomic number Z2. We assume that each scattering centre will be + effective according to the scattering cross section + dsigma/dÅ‹=¶a²f(Å‹)/ŋ² within a spherical volume of radius r0 + */ + + + double a, a0, N; // screnqing parameter a + double Z1, Z2, D; // charges numbers Z + double epsilon, b; // reduced energy epsilon + double mass1, mass2; // masses of incident & target particles + double v; // velocity of incident particle + double eta, theta; // eta = epsilon*sin(theta/2), (theta, scatt. angle) + // cross section variable by Lindhard, Nielsen and Scharff + double eSquare = 1.44E-10; // squared electric charge of electron in keV*cm + + double tau,thetaSchlange, thick; + double Energy; + + std::cout<< "thickness? in µm" << std::endl; + std::cin>>thick; + thick=thick*1.0e-6; + + std::cout<<"Enter energy in keV: "; + std::cin>>Energy; + + + + // meyer's functions + double g1,g2; + double f1,f2; + + + + // EXPRESSION OF MEYER's PARAMETERS + + // The screening parameter + // (Z1 = 1, Z2 = 6, ScreeningPar = 2.5764E-9) + Z1 = 1; Z2 = 6; + a0=0.529e-8;//unit centimeter + D= exp(2/3*log(Z1))+exp(2/3*log(Z2)); + a=0.885*a0/sqrt(D);//the screening parameter + + // The reduced energy + mass1=1/9; + mass2=12; + // b= 2*Z1*Z2*eSquare*(mass1+mass2)/(mass1*mass2*v*v); + //b= Z1*Z2 * e²[keV*cm] * (m1+m2)/m2 * 1/Energy[keV] + b= Z1*Z2*eSquare*(mass1+mass2)/(mass2*Energy); + epsilon = a/b; + std::cout<<"\n€: "<>thetaSchlange; + + + GET.GFunctions(&g1,&g2,tau); + + std::cout<< "g1("<> 20*(a/r0)^(4/3) sein muss. Fuer Protonen auf +c Graphit ist laut Referenz a/r0 gleich 0.26 (mit Dichte von 3.5 g/ccm habe +c ich einen Wert von 0.29 abgeschaetzt). Fuer Myonen hat man den selben +c Wert zu nehmen. Damit ergibt sich die Forderung, dass n >> 3.5 sein muss. +c +c (2) unabhaengig von (1) n >> 5 sein muss, was (1) also mit einschliesst. +c +c Mit n = Pi*r0*r0*Teilchen/Flaeche ergibt sich fuer eine Foliendicke von +c 3 ug/cm^2 als Abschaetzung fuer n ein Wert von 37. (r0 ueber r0 = 0.5 N^(1/3) +c und 3.5 g/ccm zu 8.9e-9 cm abgeschaetzt). D.h., dass die Bedingungen in +c unserem Fall gut erfuellt sind. +c In dem Paper wird eine Formel fuer Halbwertsbreiten angegeben. Ich habe nicht +c kontrolliert, in wie weit die Form der Verteilung tatsaechlich einer Gauss- +c verteilung entspricht. Zumindest im Bereich der Vorwaertsstreuung sollte +c die in diesem Programm verwendete Gaussverteilung aber eine sehr gute +c Naeherung abgeben. Abweichungen bei groesseren Winkeln koennten jedoch u. U. +c die absolute Streuintensitaet in Vorwaertsrichtung verfaelschen. + + + + + +c (...) + + +c 1071 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c Falls 'fromScratch': +c Die in den ab hier beginnenden Startparameter-Schleifen gesetzten Werte +c werden gegebenenfalls weiter unten durch zufallsverteilte Offsets modi- +c fiziert. (-> 'Zufallschleife': 'do 100 randomloop_ = 1, n_par(0)) +c Andernfalls: +c Wurden waehrend ACCEL oder 'foilfile' fuer die Startparameter Zufalls- +c verteilungen verwendet, so werden die entsprechenden Groessen aus dem +c betreffenden NTupel eingelesen. +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +c Startparameter: +c --------------- + + do 200 E0_ = par(1,ener),par(2,ener),par(3,ener) ! E0 + if (.NOT.random_E0) then + E0 = E0_ + v0_Betrag = sqrt(E0/Energie_Faktor) + endif + + if (E0InterFromFile) then + lowerE0 = E0Low(nInt(E0_)) + upperE0 = E0Low(nint(E0_+1)) + endif + + +c falls Energieverlustberechnung aus ICRU-Tabelle verlangt ist und mittlerer +c Energieverlust nicht fuer jedes Teilchen extra berechnet werden soll (sinnvoll +c wenn alle Teilchen gleiche Startenergie haben oder Streuung der Startenergien +c klein ist, so dass die Streuung des mittleren Energieverlustes vernachlaessigt +c werden kann): + + if (log_E_Verlust_ICRU .AND. .NOT.calculate_each) then + if (random_E0_equal) then + Ekin = E0_ + (upperE0+lowerE0)/2. + else + Ekin = E0_ + endif + if (Gebiet0.EQ.target .OR. Gebiet0.EQ.upToGrid1) then + Ekin = Ekin + q*(U_Tgt - U_F) + elseif (Gebiet0.EQ.upToGrid2) then + Ekin = Ekin + q*(U_G1 - U_F) + endif + call CALC_ELOSS_ICRU(Ekin,q,m,Thickness,mean_E_Verlust) + endif + + if (log_Meyer_F_Function) then + if (random_E0_equal) then + Ekin = E0_ + (upperE0+lowerE0)/2. + else + Ekin = E0_ + endif + if (Gebiet0.EQ.target .OR. Gebiet0.EQ.upToGrid1) then + Ekin = Ekin + q*(U_Tgt - U_F) + elseif (Gebiet0.EQ.upToGrid2) then + Ekin = Ekin + q*(U_G1 - U_F) + endif + effRedThick = Meyer_Faktor1 * Thickness + call Get_F_Function_Meyer(effRedThick,Ekin) + endif + + do 200 theta0_ = par(1,thetAng),par(2,thetAng),par(3,thetAng) ! theta0 + if (.NOT.random_angle) then + theta0 = theta0_ + Cos_theta0 = cosd(theta0) + Sin_theta0 = sind(theta0) + endif + do 200 phi0_ = par(1,phiAng),par(2,phiAng),par(3,phiAng) ! phi0 + if (.NOT.random_angle) then + phi0 = phi0_ + Cos_phi0 = cosd(phi0) + Sin_phi0 = sind(phi0) + endif + + do 200 y0_ = par(1,yPos),par(2,yPos),par(3,yPos) ! y0 + if (.NOT.random_pos) then + x0(2) = y0_ + endif + + do 200 z0_ = par(1,zPos),par(2,zPos),par(3,zPos) ! z0 + if (.NOT.random_pos) then + x0(3) = z0_ + endif + +c die folgenden parWert(n) werden u.U. in der 'Zufallsschleife' weiter unten +c abgeaendert. Hier werden sie in jedem Fall fuer Tabellenausgaben, Debug- +c angelegenheiten u.s.w. erst einmal mit den aktuellen Werten der +c entsprechenden Schleifen gefuellt: + + parWert(ener) = E0_ + parWert(thetAng) = theta0_ + parWert(phiAng) = phi0_ + parWert(yPos) = y0_ + parWert(zPos) = z0_ + + +c falls fruehere Simulation fortgefuehrt wird: +c Berechne diejenige Eventnummer in NTP_read, ab welcher die relevanten +c Simulationsparameter von ACCEL bzw. des 'FoilFiles' mit den gegenwaertigen +c MUTRACK-(Schleifen)-Parametern uebereinstimmen: + + if (.NOT.fromScratch) eventNr = firstEventNr() + + + + + + +c (...) + + + + + +c 3106 +c Einsprunglabel fuer Starts auf der Triggerfolie mit Startwinkelangaben +c im Kammersystem => transformiere Geschwindigkeitsvektor in das Triggersystem: + +111 if (alfaTD.NE.0) then + help1= v(1) ! zur Zwischenspeicherung + v(1) = help1*Cos_alfaTD + v(2)*Sin_alfaTD + v(2) = -help1*Sin_alfaTD + v(2)*Cos_alfaTD + endif + + +c - pruefe, ob das Projektil die Folie trifft: + +112 radiusQuad = x(2)*x(2) + x(3)*x(3) + If (radiusQuad.GT.radiusQuad_Folie) then + ! zurueckrechnen in das Kammersystem: + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + + destiny = code_vorbei + goto 555 + endif + + +c So verlangt, schreibe die aktuellen Trajektoriengroessen in das 'FoilFile': +c (hier ist sichergestellt, dass die Folie getroffen worden ist, Wechsel- +c wirkungen mit der Folie wurden aber noch nicht beruecksichtigt). +c HIER WERDEN 'X' UND 'V' IM TRIGGERSYSTEM ABGESPEICHERT! + + if (createFoilFile) then + ! falls die Flugzeit bis zur Triggerfolie verschmiert in das + ! NTupel aufgenommen werden soll: + if (smearS1Fo) then + call Gauss_Verteilung(sigmaS1Fo,help4) + S1FoOnly = t + help4 + endif + if (NTP_stop) then + Ekin=(v(1)*v(1)+v(2)*v(2)+v(3)*v(3))*Energie_Faktor + endif + call HFNT(NTP_write) + NTPalreadyWritten = .true. + endif + + +c - Zeitpunkt bei Erreichen der Folie sichern: + +113 S1Fo = t + if (createNTP.AND.Fo_triggered) fill_NTP = .true. + if (statNeeded(Nr_S1Fo)) call fill_statMem(S1Fo,Nr_S1Fo) + + + +c - Speichern der Koordinaten fuer die Statistiken: + + if (statNeeded(Nr_y_Fo)) then + call fill_statMem( x(2),Nr_y_Fo) + endif + if (statNeeded(Nr_z_Fo)) then + call fill_statMem( x(3),Nr_z_Fo) + endif + if (statNeeded(Nr_r_Fo)) then + radius = SQRT(x(2)*x(2) + x(3)*x(3)) + call fill_statMem(radius,Nr_r_Fo) + endif + + +c - speichere Auftreffort des Projektils fuer die Berechnung der Folienelektronen: + + if (generate_FE) then + x0FE(1) = x(1) + x0FE(2) = x(2) + x0FE(3) = x(3) + endif + + +c - falls nur bis zur Folie gerechnet werden soll, beende hier die Integration: + + if (upToTDFoilOnly) then + ! zurueckrechnen in das Kammersystem: + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + if (generate_FE) Gebiet = UpToExTD + goto 555 + endif + + +c - pruefe, ob das Projektil auf das Stuetzgitter aufschlaegt: + + if (testOnWireHit .AND. ran(seed).GT.TransTDFoil) then + destiny = code_Stuetzgitter + ! zurueckrechnen in das Kammersystem: + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + goto 555 + endif + + +c - Energieverlust und Winkelaufstreuung: + + if (log_E_Verlust .OR. log_Aufstreu) then + if (Debug_) then + Steps = Steps + 1 + call Output_Debug + endif + v_square = v(1)*v(1) + v(2)*v(2) + v(3)*v(3) + v_Betrag = SQRT(v_square) + Ekin = v_square * Energie_Faktor + endif + +c -- Energieverlust (vorerst nur Gaussverteilt): + + if (log_E_Verlust_defined.OR.log_Meyer_Gauss) then + ! Berechne Bahnwinkel relativ zur Folienebene fuer effektive Folien- + ! dicke: + alfa = atand(SQRT(v(2)*v(2)+v(3)*v(3))/v(1)) + endif + + if (log_E_Verlust) then + if (calculate_each) then + call CALC_ELOSS_ICRU(Ekin,q,m,Thickness,E_Verlust) + else + E_Verlust = mean_E_Verlust + endif + if (log_E_Verlust_defined) E_Verlust = E_Verlust / cosd(alfa) + if (debug_) write (lunLOG,*) ' mittlerer Energieverlust: ',E_Verlust + + ! Now we have the mean energy loss. We still have to modify it + ! according to the distribution of energy losses, i.e. + ! E_Verlust -> E_Verlust + delta_E_Verlust: + + delta_E_Verlust = 0. + if (log_E_Straggling_sigma) then +400 call Gauss_Verteilung(sigmaE,delta_E_Verlust) + if (debug_) write (lunLOG,*) ' sigmaE,delta_E_Verlust: ',sigmaE,delta_E_Verlust + if (E_Verlust+delta_E_Verlust.LT.0.) goto 400 + elseif (log_E_Straggling_equal) then +410 delta_E_Verlust = lowerE + (upperE - lowerE)*ran(seed) + if (E_Verlust+delta_E_Verlust.LT.0) goto 410 + elseif (log_E_Straggling_Lindhard) then + ! Streuung in Abhaengigkeit von mittlerer Energie in Folie: + call E_Straggling_Lindhard(Ekin-0.5*E_Verlust,m,sigmaE) +420 call Gauss_Verteilung(sigmaE,delta_E_Verlust) + if (debug_) write (lunLOG,*) ' sigmaE,delta_E_Verlust: ',sigmaE,delta_E_Verlust + if (E_Verlust+delta_E_Verlust.LT.0.) goto 420 + elseif (log_E_Straggling_Yang) then + ! Streuung in Abhaengigkeit von mittlerer Energie in Folie! + call E_Straggling_Yang(Ekin-0.5*E_Verlust,m,sigmaE) +430 call Gauss_Verteilung(sigmaE,delta_E_Verlust) + if (debug_) write (lunLOG,*) ' sigmaE,delta_E_Verlust: ',sigmaE,delta_E_Verlust + if (E_Verlust+delta_E_Verlust.LT.0.) goto 430 + endif + + if (E_Verlust+delta_E_Verlust.GE.Ekin) then + destiny = code_stopped_in_foil + goto 555 + endif + E_Verlust = E_Verlust + delta_E_Verlust + + ! help1 == Reduzierungsfaktor fuer Geschw.Betrag + help1 = sqrt( (Ekin - E_Verlust)/Ekin ) + v(1) = help1 * v(1) + v(2) = help1 * v(2) + v(3) = help1 * v(3) + v_Betrag = help1 * v_Betrag + if (debug_) write (lunLOG,*) ' Energieverlust: ',E_Verlust + endif + +c -- Winkelaufstreuung (vorerst nur Gaussverteilt): + + if (log_aufstreu) then + if (log_Meyer_F_Function) then + call throwMeyerAngle(thetaAufstreu) + else + if (log_Meyer_Gauss) then + if (log_E_Verlust) Ekin = Ekin - .5 * E_Verlust ! mittlere Energie + effRedThick = Meyer_Faktor1 * Thickness / cosd(alfa) + call g_Functions(g1,g2,effRedThick) + sigmaAufstreu = Meyer_Faktor2 / Ekin * (g1 + Meyer_Faktor3*g2) + if (debug_) then + write (lunLOG,*) ' effekt. red. Dicke: ',effRedThick + write (lunLOG,*) ' Sigma(Streuwinkel): ',sigmaAufstreu + endif + endif + + call Gauss_Verteilung_theta(sigmaAufstreu,thetaAufstreu) + endif + + st0 = sind(thetaAufstreu) + ct0 = cosd(thetaAufstreu) + phiAufstreu = 360.*ran(seed) + + v_xy = SQRT(v(1)*v(1) + v(2)*v(2)) ! v_xy stets groesser 0 + ! wegen v(1)>0 + + help1 = v(1) + help2 = v(2) + help3 = v_Betrag*st0*cosd(phiAufstreu)/v_xy + help4 = st0*sind(phiAufstreu) + + v(1) = ct0*help1 - help3*help2 - help4*help1*v(3)/v_xy + v(2) = ct0*help2 + help3*help1 - help4*help2*v(3)/v_xy + v(3) = ct0*v(3) + help4*v_xy + if (debug_) write (lunLOG,*) ' Aufstreuung: theta, phi =', + + thetaAufstreu,phiAufstreu + endif + + if (Debug_ .AND. (log_E_Verlust .OR. log_Aufstreu)) then + call Output_Debug + endif + + +c - Neutralisierung in der Folie? + + if (log_neutralize) then + if (neutral_fract(q_).EQ.-1.0) then + v_square = v(1)*v(1) + v(2)*v(2) + v(3)*v(3) + Ekin = v_square * Energie_Faktor + call chargeStateYields(Ekin,m,YieldPlus,YieldNeutral) + YieldNeutral = 100. * YieldNeutral + else + YieldNeutral = neutral_fract(q_) + endif + if (100.*ran(seed).LE.YieldNeutral) then + q = 0. + qInt = 0 + if (debug_) then + write (lunLOG,*) ' Teilchen wurde neutralisiert' + endif + nNeutral = nNeutral + 1 + else + nCharged = nCharged + 1 + endif + endif + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + + +c (...) +c4300 +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE G_Functions(G1,G2,tau) +c ================================= + +c Diese Routine gibt in Abhaengigkeit von der reduzierten Dicke 'tau' +c Funktionswerte fuer g1 und g2 zurueck. g1 und g2 sind dabei die von +c Meyer angegebenen tabellierten Funktionen fuer die Berechnung von Halbwerts- +c breiten von Streuwinkelverteilungen. (L.Meyer, phys.stat.sol. (b) 44, 253 +c (1971)) + + IMPLICIT NONE + + real tau,g1,g2 + real tau_(26),g1_(26),g2_(26) + real help + + integer i + + DATA tau_ /0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, + + 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 9.0, + + 10.0, 12.0, 14.0, 16.0, 18.0, 20.0 / + + DATA g1_ /0.050,0.115,0.183,0.245,0.305,0.363,0.419,0.473,0.525,0.575, + + 0.689,0.799,0.905,1.010,1.100,1.190,1.370,1.540,1.700,1.850, + + 1.990,2.270,2.540,2.800,3.050,3.290 / + DATA g2_ / 0.00,1.25,0.91,0.79,0.73,0.69,0.65,0.63,0.61,0.59, + + 0.56,0.53,0.50,0.47,0.45,0.43,0.40,0.37,0.34,0.32, + + 0.30,0.26,0.22,0.18,0.15,0.13 / + + if (tau.LT.tau_(1)) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist kleiner als kleinster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(1) = ',tau_(1) + write(*,*) + STOP + endif + + i = 1 + +10 i = i + 1 + if (i.EQ.27) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist groesser als groesster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(26) = ',tau_(26) + write(*,*) + STOP + elseif (tau.gt.tau_(i)) then + goto 10 + endif + + +c lineare Interpolation zwischen Tabellenwerten: + + help = (tau-tau_(i-1))/(tau_(i)-tau_(i-1)) + + g1 = g1_(i-1) + help*(g1_(i)-g1_(i-1)) + g2 = g2_(i-1) + help*(g2_(i)-g2_(i-1)) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine Get_F_Function_Meyer(tau,Ekin) +c ========================================= + + implicit none + + real tau + real Ekin + + real thetaSchlange,thetaSchlangeMax + real theta,thetaMax,thetaStep + real f1,f2,F + + +c------------------------------------ +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target +c real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + + real Pi ! die Kreiszahl + +c parameter (a0 = 5.29E-9) + parameter (Z1 = 1, Z2 = 6, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10) + parameter (Pi = 3.141592654) + + real Meyer_Faktor3 + real Meyer_Faktor4 + real zzz ! 'Hilfsparameter' + real Meyer_Faktor5 + + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + parameter (Meyer_faktor4 = screeningPar / (2.*Z1*Z2*eSquare) * Pi/180.) + parameter (zzz = screeningPar / (2.*Z1*Z2*eSquare)) + parameter (Meyer_faktor5 = zzz*zzz / (8*Pi*Pi)) + +c------------------------------------ + + integer nBin,nBinMax + parameter (nBinMax=201) + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + integer i + real rhelp + + integer HB_memsize + parameter(HB_memsize=500000) + real memory(HB_memsize) + COMMON /PAWC/ memory + + +c nur noch fuer Testzwecke: + + real fValues(203) + real fValuesFolded(203) + + integer idh + parameter (idh = 50) + + INCLUDE 'mutrack$sourcedirectory:COM_DIRS.INC' + character filename*20 ! Name der Ausgabe-Dateien + COMMON /filename/ filename + +c------------------------------------------------------------------------------- + +c Festlegen des maximalen Theta-Wertes sowie der Schrittweite: + + if (tau.LT.0.2) then + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist kleiner als 0.2 => kann ich nicht ... => STOP' + call exit + elseif (tau.LE.2.) then + ! => Tabelle A + thetaSchlangeMax = 4.0 + elseif (tau.LE.8.) then + ! => Tabelle B + thetaSchlangeMax = 7.0 + elseif (tau.LE.20.) then + ! => Tabelle C + thetaSchlangeMax = 20.0 + else + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist groesser als 20 => kann ich nicht ... => STOP' + call exit + endif + + thetaMax = thetaSchlangeMax / Meyer_Faktor4 / Ekin + if (thetaMax.GT.50) then + thetaStep = .5 + elseif (thetaMax.GT.25) then + thetaStep = .25 + elseif (thetaMax.GT.12.5) then + thetaStep = .125 + else + thetaStep = .0625 + endif + + +c Tabelle der F-Werte erstellen: + + nBin = 0 + do theta = thetaStep, thetaMax, thetaStep + + ! Berechne aus theta das 'reduzierte' thetaSchlange (dabei gleich + ! noch von degree bei theta in Radiant bei thetaSchlange umrechnen): + + thetaSchlange = Meyer_faktor4 * Ekin * theta + + ! Auslesen der Tabellenwerte fuer die f-Funktionen: + + call F_Functions_Meyer(tau,thetaSchlange,f1,f2) + if (thetaSchlange.EQ.-1) then + ! wir sind jenseits von thetaSchlangeMax + goto 10 + endif + + ! Berechnen der Streuintensitaet: + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + + nBin = nBin + 1 + if (nBin.GT.nBinMax) then + write(*,*) 'nBin > nBinMax => EXIT' + call exit + endif + value(nBin) = sind(theta)*F + + fValues(nBin+1) = F ! fuer Testzwecke + fValuesFolded(nBin+1) = sind(theta)*F ! fuer Testzwecke + + enddo + + +c Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + +10 do i = 1, nBin + area(i) = (value(i)+value(i-1))/2. * thetaStep + integ(i) = integ(i-1) + area(i) + enddo + + +c Normiere totale Flaeche auf 1: + + rHelp = integ(nBin) + do i = 1, nBin + value(i) = value(i) / rHelp + area(i) = area(i) / rHelp + integ(i) = integ(i) / rHelp + enddo + + +c vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + ! Berechne die Werte fuer theta=0: + + call F_Functions_Meyer(tau,0.,f1,f2) + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + fValues(1) = F + fValuesFolded(1) = 0. + + ! Gib die Werte in das Tabellenfile aus: + +c theta = 0. +c open (10,file=outDir//':'//filename//'.TAB',status='NEW') +c do i = 1, nBin+1 +c write(10,*) theta, fValues(i), fValuesFolded(i) +c theta = theta + thetaStep +c enddo +c close (10) + + + ! Buchen und Fuellen der Histogramme: + + call HBOOK1(idh,'F',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh,fValues) + call HRPUT(idh,outDir//':'//filename//'.RZ','N') + call HDELET(idh) + + call HBOOK1(idh+1,'F*sin([q])',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh+1,fValuesFolded) + call HRPUT(idh+1,outDir//':'//filename//'.RZ','U') + call HDELET(idh+1) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine throwMeyerAngle (theta) +c ================================== + + implicit none + + real lowerbound,y1,y2,f,root,radiant,fraction + integer bin,nBin + integer nBinMax + parameter (nBinMax=201) + + real theta,thetaStep + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + real rhelp + + real random + integer seed + common /seed/ seed + + +c bin: Nummer des Bins, innerhalb dessen das Integral den Wert von +c random erreicht oder ueberschreitet: + + random = ran(seed) + + bin = 1 + do while (random.GT.integ(bin)) + bin = bin + 1 + if (bin.GT.nBin) then + write(*,*) 'error 1' + call exit + endif + enddo + + fraction = (random-integ(bin-1)) / (integ(bin)-integ(bin-1)) + y1 = value(bin-1) + y2 = value(bin) + f = thetaStep / (y2-y1) + rHelp = y1*f + + radiant = rHelp*rHelp + fraction*thetaStep*(y1+y2)*f + root = SQRT(radiant) + lowerBound = real(bin-1)*thetaStep + if (f.GT.0) then + theta = lowerBound - rHelp + root + else + theta = lowerBound - rHelp - root + endif + + + END + + +c=============================================================================== + + options /extend_source + + subroutine F_Functions_Meyer(tau,thetaSchlange,f1,f2) +c ===================================================== + + implicit none + +c Diese Routine gibt in Abhaengigkeit von 'thetaSchlange' und 'tau' +c Funktionswerte fuer f1 und f2 zurueck. f1 und f2 entsprechen dabei den +c bei Meyer angegebenen Funktion gleichen Namens. Die in dieser Routine +c verwendeten Tabellen sind eben dieser Referenz entnommen: +c L.Meyer, phys.stat.sol. (b) 44, 253 (1971) + + real tau,thetaSchlange + real f1, f2, f1_(2), f2_(2) + + integer column_,column,row + + integer iColumn + real weightCol, weightRow + +c------------------------------------------------------------------------------- + +c die Tabellendaten der Referenz (Tabellen 2 und 3): + + integer nColumn + parameter (nColumn = 25) + real tau_(nColumn) / + + 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, + + 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10., 12., 14., 16., 18., 20. / + + integer nRowA + parameter (nRowA = 25) + real thetaSchlangeA(nRowA) / + + .00, .05, .10, .15, .20, .25, .30, .35, .40, .45, .50, .60, + + .70, .80, .90, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, 3.5, 4.0 / + + integer nRowB + parameter (nRowB = 24) + real thetaSchlangeB(nRowB) / + + 0.0, 0.2, 0.4, 0.5, 0.6, 0.8, 1.0, 1.2, 1.4, 1.5, 1.6, 1.8, + + 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0 / + + integer nRowC + parameter (nRowC = 24) + real thetaSchlangeC(nRowC) / + + 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, + + 7.0, 8.0, 9.0, 10., 11., 12., 13., 14., 15., 16., 18., 20. / + + + real f1_A(9,nRowA) + + /1.69E+2,4.55E+1,2.11E+1,1.25E+1,8.48E+0,6.21E+0,4.80E+0,3.86E+0,3.20E+0, + + 9.82E+1,3.72E+1,1.97E+1,1.20E+1,8.27E+0,6.11E+0,4.74E+0,3.83E+0,3.17E+0, + + 3.96E+1,2.58E+1,1.65E+1,1.09E+1,7.73E+0,5.82E+0,4.58E+0,3.72E+0,3.10E+0, + + 1.76E+1,1.58E+1,1.27E+1,9.26E+0,6.93E+0,5.38E+0,4.31E+0,3.55E+0,2.99E+0, + + 8.62E+0,1.01E+1,9.45E+0,7.58E+0,6.02E+0,4.85E+0,3.98E+0,3.33E+0,2.84E+0, + + 4.65E+0,6.55E+0,6.91E+0,6.06E+0,5.11E+0,4.28E+0,3.62E+0,3.08E+0,2.66E+0, + + 2.74E+0,4.45E+0,5.03E+0,4.78E+0,4.27E+0,3.72E+0,3.23E+0,2.82E+0,2.47E+0, + + 1.77E+0,3.02E+0,3.71E+0,3.76E+0,3.53E+0,3.20E+0,2.86E+0,2.55E+0,2.27E+0, + + 1.22E+0,2.19E+0,2.78E+0,2.96E+0,2.91E+0,2.73E+0,2.51E+0,2.28E+0,2.07E+0, + + 8.82E-1,1.59E+0,2.12E+0,2.35E+0,2.39E+0,2.32E+0,2.19E+0,2.03E+0,1.87E+0, + + 6.55E-1,1.20E+0,1.64E+0,1.88E+0,1.97E+0,1.96E+0,1.90E+0,1.79E+0,1.68E+0, + + 3.80E-1,7.15E-1,1.01E+0,1.22E+0,1.35E+0,1.40E+0,1.41E+0,1.39E+0,1.34E+0, + + 2.26E-1,4.45E-1,6.44E-1,8.08E-1,9.28E-1,1.01E+0,1.05E+0,1.06E+0,1.05E+0, + + 1.39E-1,2.80E-1,4.21E-1,5.45E-1,6.46E-1,7.22E-1,7.75E-1,8.07E-1,8.21E-1, + + 8.22E-2,1.76E-1,2.78E-1,3.71E-1,4.53E-1,5.21E-1,5.74E-1,6.12E-1,6.37E-1, + + 5.04E-2,1.11E-1,1.86E-1,2.57E-1,3.22E-1,3.79E-1,4.27E-1,4.65E-1,4.94E-1, + + 2.51E-2,5.60E-2,9.24E-2,1.31E-1,1.69E-1,2.02E-1,2.40E-1,2.71E-1,2.97E-1, + + 1.52E-2,3.20E-2,5.08E-2,7.23E-2,9.51E-2,1.18E-1,1.41E-1,1.63E-1,1.83E-1, + + 1.03E-2,2.05E-2,3.22E-2,4.55E-2,6.01E-2,7.53E-2,9.02E-2,1.05E-1,1.19E-1, + + 8.80E-3,1.48E-2,2.25E-2,3.13E-2,4.01E-2,5.03E-2,6.01E-2,7.01E-2,8.01E-2, + + 6.10E-3,1.15E-2,1.71E-2,2.28E-2,2.89E-2,3.52E-2,4.18E-2,4.86E-2,5.55E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,1.71E-2,1.98E-2,2.28E-2,2.58E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.90E-3,1.02E-2,1.16E-2,1.31E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,4.90E-3,5.70E-3,6.40E-3,7.20E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.90E-3,3.40E-3,3.90E-3,4.30E-3/ + + real f1_B(9,nRowB) + + /2.71E+0,1.92E+0,1.46E+0,1.16E+0,9.52E-1,8.03E-1,6.90E-1,5.32E-1,4.28E-1, + + 2.45E+0,1.79E+0,1.39E+0,1.12E+0,9.23E-1,7.82E-1,6.75E-1,5.23E-1,4.23E-1, + + 1.87E+0,1.48E+0,1.20E+0,9.96E-1,8.42E-1,7.24E-1,6.32E-1,4.98E-1,4.07E-1, + + 1.56E+0,1.30E+0,1.09E+0,9.19E-1,7.89E-1,6.86E-1,6.03E-1,4.80E-1,3.95E-1, + + 1.28E+0,1.11E+0,9.62E-1,8.33E-1,7.27E-1,6.40E-1,5.69E-1,4.59E-1,3.81E-1, + + 8.23E-1,7.90E-1,7.29E-1,6.64E-1,6.01E-1,5.44E-1,4.94E-1,4.12E-1,3.49E-1, + + 5.14E-1,5.36E-1,5.29E-1,5.07E-1,4.78E-1,4.47E-1,4.16E-1,3.60E-1,3.13E-1, + + 3.19E-1,3.58E-1,3.76E-1,3.78E-1,3.70E-1,3.57E-1,3.45E-1,3.08E-1,2.76E-1, + + 2.02E-1,2.40E-1,2.64E-1,2.77E-1,2.82E-1,2.80E-1,2.65E-1,2.59E-1,2.39E-1, + + 1.67E-1,1.96E-1,2.20E-1,2.36E-1,2.44E-1,2.47E-1,2.45E-1,2.35E-1,2.21E-1, + + 1.33E-1,1.61E-1,1.85E-1,2.02E-1,2.12E-1,2.18E-1,2.18E-1,2.14E-1,2.03E-1, + + 8.99E-2,1.12E-1,1.32E-1,1.48E-1,1.59E-1,1.67E-1,1.68E-1,1.75E-1,1.72E-1, + + 6.24E-2,7.94E-2,9.50E-2,1.09E-1,1.20E-1,1.29E-1,1.35E-1,1.42E-1,1.43E-1, + + 4.55E-2,5.74E-2,6.98E-2,8.11E-2,9.09E-2,9.92E-2,1.06E-1,1.15E-1,1.19E-1, + + 3.35E-2,4.22E-2,5.19E-2,6.11E-2,6.95E-2,7.69E-2,8.33E-2,9.28E-2,9.85E-2, + + 2.50E-2,3.16E-2,3.92E-2,4.66E-2,5.35E-2,6.00E-2,6.57E-2,7.49E-2,8.13E-2, + + 1.90E-2,2.40E-2,2.99E-2,3.58E-2,4.16E-2,4.70E-2,5.20E-2,6.05E-2,6.70E-2, + + 1.47E-2,1.86E-2,2.32E-2,2.79E-2,3.25E-2,3.70E-2,4.12E-2,4.89E-2,5.51E-2, + + 8.10E-3,1.04E-2,1.30E-2,1.57E-2,1.84E-2,2.12E-2,2.40E-2,2.93E-2,3.42E-2, + + 4.80E-3,6.20E-3,7.70E-3,9.30E-3,1.09E-2,1.26E-2,1.44E-2,1.79E-2,2.14E-2, + + 2.80E-3,3.80E-3,4.70E-3,5.70E-3,6.70E-3,7.50E-3,8.90E-3,1.13E-2,1.36E-2, + + 1.70E-3,2.30E-3,2.90E-3,3.60E-3,4.20E-3,4.90E-3,5.60E-3,7.20E-3,8.80E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.00E-3,2.80E-3,3.50E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.80E-4,1.20E-3,1.60E-3/ + + real f1_C(7,nRowC) + + /3.65E-1,2.62E-1,2.05E-1,1.67E-1,1.41E-1,1.21E-1,1.05E-1, + + 3.33E-1,2.50E-1,1.95E-1,1.61E-1,1.36E-1,1.18E-1,1.03E-1, + + 2.75E-1,2.18E-1,1.76E-1,1.48E-1,1.27E-1,1.11E-1,9.80E-2, + + 2.04E-1,1.75E-1,1.50E-1,1.29E-1,1.13E-1,1.01E-1,9.00E-2, + + 1.41E-1,1.31E-1,1.19E-1,1.08E-1,9.71E-2,8.88E-2,8.01E-2, + + 9.32E-2,9.42E-2,9.10E-2,8.75E-2,8.00E-2,7.44E-2,6.91E-2, + + 5.98E-2,6.52E-2,6.72E-2,6.62E-2,6.40E-2,6.12E-2,5.82E-2, + + 3.83E-2,4.45E-2,4.80E-2,4.96E-2,4.98E-2,4.90E-2,4.77E-2, + + 2.46E-2,3.01E-2,3.40E-2,3.65E-2,3.79E-2,3.84E-2,3.83E-2, + + 1.59E-2,2.03E-2,2.39E-2,2.66E-2,2.85E-2,2.97E-2,3.04E-2, + + 1.04E-2,1.37E-2,1.66E-2,1.92E-2,2.12E-2,2.27E-2,2.37E-2, + + 4.39E-3,6.26E-3,8.26E-3,9.96E-3,1.15E-2,1.29E-2,1.41E-2, + + 2.06E-3,3.02E-3,4.24E-3,5.28E-3,6.32E-3,7.32E-3,8.26E-3, + + 1.21E-3,1.69E-3,2.24E-3,2.85E-3,3.50E-3,4.16E-3,4.82E-3, + + 8.50E-4,1.10E-3,1.38E-3,1.65E-3,2.03E-3,2.45E-3,2.88E-3, + + 5.90E-4,7.40E-4,8.50E-4,9.90E-4,1.23E-3,1.49E-3,1.71E-3, + + 3.90E-4,4.60E-4,5.20E-4,6.30E-4,7.65E-4,9.65E-4,1.12E-3, + + 2.40E-4,2.70E-4,3.10E-4,3.98E-4,4.97E-4,6.03E-4,7.18E-4, + + 1.50E-4,1.70E-4,2.15E-4,2.70E-4,3.35E-4,4.35E-4,5.00E-4, + + 1.00E-4,1.20E-4,1.46E-4,1.90E-4,2.40E-4,2.88E-4,3.43E-4, + + 0.00 ,0.00 ,1.04E-4,1.41E-4,1.80E-4,2.10E-4,2.50E-4, + + 0.00 ,0.00 ,8.20E-5,1.06E-4,1.38E-4,1.58E-4,1.85E-4, + + 0.00 ,0.00 ,5.40E-5,7.00E-5,8.60E-5,1.03E-4,1.20E-4, + + 0.00 ,0.00 ,4.20E-5,5.40E-5,6.50E-5,7.70E-5,8.80E-5/ + + real f2_A(9,nRowA) + + / 3.52E+3, 3.27E+2, 9.08E+1, 3.85E+1, 2.00E+1, 1.18E+1, 7.55E+0, 5.16E+0, 3.71E+0, + + 2.58E+2, 1.63E+2, 7.30E+1, 3.42E+1, 1.85E+1, 1.11E+1, 7.18E+0, 4.96E+0, 3.59E+0, + + -1.12E+2, 4.84E+0, 3.56E+1, 2.34E+1, 1.45E+1, 9.33E+0, 6.37E+0, 4.51E+0, 3.32E+0, + + -5.60E+1,-1.12E+1, 9.87E+0, 1.24E+1, 9.59E+0, 7.01E+0, 5.16E+0, 3.83E+0, 2.91E+0, + + -2.13E+1,-1.22E+1,-2.23E+0, 3.88E+0, 5.15E+0, 4.65E+0, 3.87E+0, 3.12E+0, 2.45E+0, + + -8.25E+0,-9.58E+0,-5.59E+0,-1.40E+0, 1.76E+0, 2.71E+0, 2.71E+0, 2.35E+0, 1.95E+0, + + -3.22E+0,-6.12E+0,-5.28E+0,-2.87E+0,-1.92E-1, 1.32E+0, 1.69E+0, 1.74E+0, 1.48E+0, + + -1.11E+0,-3.40E+0,-4.12E+0,-3.08E+0,-6.30E-1, 3.60E-1, 9.20E-1, 1.03E+0, 1.04E+0, + + -2.27E-1,-2.00E+0,-2.93E+0,-2.69E+0,-1.48E+0,-3.14E-1, 2.69E-1, 5.28E-1, 6.09E-1, + + 1.54E-1,-1.09E+0,-2.10E+0,-2.15E+0,-1.47E+0,-6.77E-1,-1.80E-1, 1.08E-1, 2.70E-1, + + 3.28E-1,-6.30E-1,-1.50E+0,-1.68E+0,-1.34E+0,-8.43E-1,-4.60E-1,-1.85E-1,-4.67E-3, + + 3.32E-1,-2.06E-1,-7.32E-1,-9.90E-1,-9.42E-1,-8.20E-1,-6.06E-1,-4.51E-1,-3.01E-1, + + 2.72E-1,-3.34E-2,-3.49E-1,-5.65E-1,-6.03E-1,-5.79E-1,-5.05E-1,-4.31E-1,-3.45E-1, + + 2.02E-1, 2.80E-2,-1.54E-1,-3.00E-1,-3.59E-1,-3.76E-1,-4.60E-1,-3.40E-1,-3.08E-1, + + 1.38E-1, 4.84E-2,-5.56E-2,-1.44E-1,-2.04E-1,-2.39E-1,-2.54E-1,-2.49E-1,-2.48E-1, + + 9.47E-2, 4.86E-2,-1.08E-2,-6.44E-2,-1.02E-1,-1.34E-1,-1.62E-1,-1.79E-1,-1.87E-1, + + 5.33E-2, 3.71E-2, 1.85E-2, 1.63E-3,-1.69E-2,-3.69E-2,-5.66E-2,-7.78E-2,-9.33E-2, + + 3.38E-2, 2.40E-2, 1.62E-2, 9.90E-3, 3.76E-3,-4.93E-3,-1.66E-2,-3.05E-2,-4.22E-2, + + 2.12E-2, 1.56E-2, 1.05E-2, 7.80E-3, 7.92E-3, 6.30E-3, 3.20E-4,-8.50E-3,-1.66E-2, + + 1.40E-2, 9.20E-3, 5.30E-3, 4.70E-3, 6.31E-3, 8.40E-3, 5.30E-3, 8.80E-4,-3.30E-3, + + 9.20E-3, 4.70E-3, 1.70E-3, 2.60E-3, 4.49E-3, 6.60E-3, 6.00E-3, 4.70E-3, 2.80E-3, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + real f2_B(9,nRowB) + + / 2.75E+0, 1.94E+0, 9.13E-1, 6.06E-1, 4.26E-1, 3.14E-1, 2.40E-1, 1.51E-1, 1.03E-1, + + 1.94E+0, 1.16E+0, 7.56E-1, 5.26E-1, 3.81E-1, 2.87E-1, 2.23E-1, 1.43E-1, 9.78E-2, + + 5.85E-1, 5.04E-1, 4.10E-1, 3.30E-1, 2.69E-1, 2.17E-1, 1.78E-1, 1.22E-1, 8.71E-2, + + 7.83E-2, 2.00E-1, 2.35E-1, 2.19E-1, 1.97E-1, 1.73E-1, 1.48E-1, 1.08E-1, 7.93E-2, + + -1.82E-1, 1.56E-2, 1.04E-1, 1.36E-1, 1.38E-1, 1.31E-1, 1.19E-1, 9.46E-2, 7.19E-2, + + -2.71E-1,-1.66E-1,-7.29E-2,-4.74E-3, 3.60E-2, 5.50E-2, 6.28E-2, 5.98E-2, 5.09E-2, + + -1.87E-1,-1.58E-1,-1.09E-1,-5.80E-2,-2.03E-2, 2.48E-3, 1.99E-2, 3.36E-2, 3.27E-2, + + -1.01E-1,-1.05E-1,-8.95E-2,-6.63E-2,-3.93E-2,-2.38E-2,-9.22E-3, 8.47E-3, 1.52E-2, + + -5.19E-2,-6.47E-2,-6.51E-2,-5.62E-2,-4.51E-2,-3.49E-2,-2.45E-2,-8.19E-3, 2.05E-3, + + -3.68E-2,-4.89E-2,-5.36E-2,-5.06E-2,-4.27E-2,-3.65E-2,-2.80E-2,-1.33E-2,-3.47E-3, + + -2.33E-2,-3.69E-2,-4.41E-2,-4.38E-2,-3.97E-2,-3.50E-2,-2.88E-2,-1.60E-2,-6.68E-3, + + -8.76E-3,-2.07E-2,-2.90E-2,-3.17E-2,-3.09E-2,-2.92E-2,-2.63E-2,-1.79E-2,-1.03E-2, + + -1.20E-3,-1.11E-2,-1.90E-2,-2.20E-2,-2.32E-2,-2.24E-2,-2.10E-2,-1.66E-2,-1.11E-2, + + 1.72E-3,-4.82E-3,-1.02E-2,-1.42E-2,-1.65E-2,-1.66E-2,-1.60E-2,-1.39E-2,-1.09E-2, + + 2.68E-3,-1.18E-3,-5.19E-3,-8.30E-5,-1.01E-2,-1.14E-2,-1.16E-2,-1.16E-2,-9.99E-3, + + 2.81E-3, 8.21E-4,-1.96E-3,-3.99E-3,-5.89E-3,-7.13E-3,-8.15E-3,-9.05E-3,-8.60E-3, + + 2.61E-3, 1.35E-3,-2.99E-4,-1.79E-3,-3.12E-3,-4.44E-3,-5.61E-3,-7.01E-3,-7.27E-3, + + 2.06E-3, 1.45E-3, 4.64E-4,-5.97E-4,-1.71E-3,-2.79E-3,-3.84E-3,-5.29E-3,-5.90E-3, + + 1.07E-3, 9.39E-4, 8.22E-4, 3.58E-4,-1.15E-4,-6.60E-4,-1.18E-3,-2.15E-3,-2.88E-3, + + 4.97E-4, 5.46E-4, 6.15E-4, 5.56E-4, 3.14E-4, 9.80E-5,-1.30E-4,-5.98E-4,-1.07E-4, + + 1.85E-4, 3.11E-4, 4.25E-4, 4.08E-4, 3.63E-4, 3.04E-4, 2.24E-4, 2.80E-5,-2.10E-4, + + 4.80E-5, 1.48E-4, 2.44E-4, 2.80E-4, 3.01E-4, 3.11E-4, 3.13E-4, 2.40E-4, 1.10E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 1.39E-4, 1.80E-4, 1.80E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 4.38E-5, 7.30E-5, 8.40E-5/ + + real f2_C(7,nRowC) + + / 7.36E-2, 4.21E-2, 2.69E-2, 1.83E-2, 1.34E-2, 1.01E-2, 7.88E-3, + + 5.79E-2, 3.61E-2, 2.34E-2, 1.64E-2, 1.21E-2, 9.26E-3, 7.28E-3, + + 2.94E-2, 2.17E-2, 1.60E-2, 1.23E-2, 9.49E-3, 7.45E-3, 5.95E-3, + + 2.30E-3, 7.07E-3, 7.76E-3, 7.02E-3, 6.13E-3, 5.17E-3, 4.34E-3, + + -7.50E-3,-2.00E-3, 9.93E-4, 2.36E-3, 2.82E-3, 2.86E-3, 2.72E-3, + + -8.27E-3,-5.37E-3,-2.58E-3,-7.96E-4, 3.75E-4, 9.71E-4, 1.28E-3, + + -5.79E-3,-5.12E-3,-3.86E-3,-2.46E-3,-1.20E-3,-3.74E-4, 1.74E-4, + + -3.26E-3,-3.43E-3,-3.26E-3,-2.68E-3,-1.84E-3,-1.12E-3,-4.54E-4, + + -1.46E-3,-1.49E-3,-2.20E-3,-2.18E-3,-1.85E-3,-1.40E-3,-8.15E-4, + + -4.29E-4,-9.44E-4,-1.29E-3,-1.50E-3,-1.51E-3,-1.36E-3,-9.57E-4, + + -3.30E-5,-3.66E-4,-6.78E-4,-9.38E-4,-1.09E-3,-1.09E-3,-9.56E-4, + + 1.50E-4, 3.10E-5,-1.38E-4,-3.06E-4,-4.67E-4,-5.48E-4,-6.08E-4, + + 1.00E-4, 8.50E-5, 2.30E-5,-6.60E-5,-1.58E-4,-2.40E-4,-3.05E-4, + + 5.40E-5, 6.50E-5, 4.90E-5, 1.20E-5,-3.60E-5,-8.90E-5,-1.31E-4, + + 2.90E-5, 4.30E-5, 4.40E-5, 2.90E-5, 5.10E-6,-2.20E-5,-4.80E-5, + + 1.40E-5, 2.40E-5, 2.80E-5, 2.60E-5, 1.90E-5, 7.50E-6,-1.10E-5, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + +c=============================================================================== + +c Bestimme, welche Reihen der Tabellen fuer Interpolation benoetigt werden: + + if (tau.LT.tau_(1)) then + write(*,*) 'tau is less than the lowest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'minimum = ',tau_(1) + call exit + elseif (tau.GT.tau_(nColumn)) then + write(*,*) 'tau is greater than the highest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'maximum = ',tau_(nColumn) + call exit + endif + + column_ = 2 + do while (tau.GT.tau_(column_)) + column_ = column_ + 1 + enddo + ! Das Gewicht der Reihe zu groesserem Tau: + weightCol = (tau-tau_(column_-1)) / (tau_(column_)-tau_(column_-1)) + + +c Besorge fuer gegebenes 'thetaSchlange' die interpolierten f1- und f2 -Werte +c der beiden relevanten Reihen: +c iColumn = 1 => Reihe mit hoeherem Index +c iColumn = 2 => Reihe mit kleinerem Index + + + iColumn = 1 + + +5 continue + + if (column_.LE.9) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 1. Tabelle: 0.2 <= tau <= 1.8 + + column = column_ + + if (thetaSchlange.LT.thetaSchlangeA(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeA(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeA(nRowA)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeA(nRowA) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeA(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeA(row-1)) / + + (thetaSchlangeA(row)-thetaSchlangeA(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_A(column,row-1) + + + weightRow * f1_A(column,row) + f2_(iColumn) = (1.-weightRow) * f2_A(column,row-1) + + + weightRow * f2_A(column,row) + + + elseif (column_.LE.18) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 2. Tabelle: 2.0 <= tau <= 7.0 + + column = column_ - 9 + + if (thetaSchlange.LT.thetaSchlangeB(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeB(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeB(nRowB)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeB(nRowB) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeB(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeB(row-1)) / + + (thetaSchlangeB(row)-thetaSchlangeB(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_B(column,row-1) + + + weightRow * f1_B(column,row) + f2_(iColumn) = (1.-weightRow) * f2_B(column,row-1) + + + weightRow * f2_B(column,row) + + + else ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 3. Tabelle: 8.0 <= tau <= 20. + + column = column_ - 18 + + if (thetaSchlange.LT.thetaSchlangeC(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeC(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeC(nRowC)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeC(nRowC) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeC(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeC(row-1)) / + + (thetaSchlangeC(row)-thetaSchlangeC(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_C(column,row-1) + + + weightRow * f1_C(column,row) + f2_(iColumn) = (1.-weightRow) * f2_C(column,row-1) + + + weightRow * f2_C(column,row) + + + endif ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + if (iColumn.EQ.1) then + column_ = column_ - 1 + iColumn = 2 + goto 5 + endif + + f1 = weightCol*f1_(1) + (1.-weightCol)*f1_(2) + f2 = weightCol*f2_(1) + (1.-weightCol)*f2_(2) + + + END + + +c=============================================================================== + diff --git a/geant4/LEMuSR/MEYER/txt.for~ b/geant4/LEMuSR/MEYER/txt.for~ new file mode 100644 index 0000000..2f741fe --- /dev/null +++ b/geant4/LEMuSR/MEYER/txt.for~ @@ -0,0 +1,1156 @@ +c 462 ------------------------------------------------------------------------------- +c Konstanten und Variable fuer Berechnung der Winkelaufstreuung in Triggerfolie +c mittels Meyer-Formel (L.Meyer, phys.stat.sol. (b) 44, 253 (1971)): + + real g1, g2 ! Tabellierte Funktionen der Referenz + real effRedThick ! effektive reduzierte Dicke ('tau' der Referenz) + + +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target + real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + real HWHM2sigma ! Umrechnungsfaktor von (halber!) Halbwertsbreite + ! nach Sigma der Gaussfunktion + + real Na ! die Avogadrokonstante + real mMolC ! molare Masse von C in ug + real Pi ! die Kreiszahl + + parameter (Z1 = 1, Z2 = 6, a0 = 5.29E-9, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10, HWHM2sigma = 1./1.17741) + parameter (Na = 6.022e23, mMolC = 12.011e6, Pi = 3.141592654) + + +c - Bei der Berechnung von Sigma auftretende Vorfaktoren. +c (Meyer_faktor 1 wird benoetigt fuer Berechnung der reduzierten Dicke aus der +c 'ug/cm2'-Angabe der Foliendicke. Meyer_faktor2 und Meyer_faktor3 werden +c direkt fuer die Berechnung von sigma aus den beiden tabellierten Funktionen +c g1 und g2 verwendet): + + real Meyer_Faktor1, Meyer_Faktor2, Meyer_Faktor3 + + parameter (Meyer_faktor1 = Pi*screeningPar*screeningPar * Na/mMolC) + ! Na/mMolC = 1/m(C-Atom) + parameter (Meyer_faktor2 = (2*Z1*Z2 * eSquare)/ScreeningPar * 180./Pi + + * HWHM2sigma) + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + + +c------------------------------------------------------------------------------- +c Kommentar zur Berechnung der Winkelaufstreuung nach Meyer: +c +c Als Bedingung fuer die Gueltigkeit der Rechnung wird verlangt, dass +c +c (1) die Anzahl n der Stoesse >> 20*(a/r0)^(4/3) sein muss. Fuer Protonen auf +c Graphit ist laut Referenz a/r0 gleich 0.26 (mit Dichte von 3.5 g/ccm habe +c ich einen Wert von 0.29 abgeschaetzt). Fuer Myonen hat man den selben +c Wert zu nehmen. Damit ergibt sich die Forderung, dass n >> 3.5 sein muss. +c +c (2) unabhaengig von (1) n >> 5 sein muss, was (1) also mit einschliesst. +c +c Mit n = Pi*r0*r0*Teilchen/Flaeche ergibt sich fuer eine Foliendicke von +c 3 ug/cm^2 als Abschaetzung fuer n ein Wert von 37. (r0 ueber r0 = 0.5 N^(1/3) +c und 3.5 g/ccm zu 8.9e-9 cm abgeschaetzt). D.h., dass die Bedingungen in +c unserem Fall gut erfuellt sind. +c In dem Paper wird eine Formel fuer Halbwertsbreiten angegeben. Ich habe nicht +c kontrolliert, in wie weit die Form der Verteilung tatsaechlich einer Gauss- +c verteilung entspricht. Zumindest im Bereich der Vorwaertsstreuung sollte +c die in diesem Programm verwendete Gaussverteilung aber eine sehr gute +c Naeherung abgeben. Abweichungen bei groesseren Winkeln koennten jedoch u. U. +c die absolute Streuintensitaet in Vorwaertsrichtung verfaelschen. + + + + + +c (...) + + +c 1071 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c Falls 'fromScratch': +c Die in den ab hier beginnenden Startparameter-Schleifen gesetzten Werte +c werden gegebenenfalls weiter unten durch zufallsverteilte Offsets modi- +c fiziert. (-> 'Zufallschleife': 'do 100 randomloop_ = 1, n_par(0)) +c Andernfalls: +c Wurden waehrend ACCEL oder 'foilfile' fuer die Startparameter Zufalls- +c verteilungen verwendet, so werden die entsprechenden Groessen aus dem +c betreffenden NTupel eingelesen. +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +c Startparameter: +c --------------- + + do 200 E0_ = par(1,ener),par(2,ener),par(3,ener) ! E0 + if (.NOT.random_E0) then + E0 = E0_ + v0_Betrag = sqrt(E0/Energie_Faktor) + endif + + if (E0InterFromFile) then + lowerE0 = E0Low(nInt(E0_)) + upperE0 = E0Low(nint(E0_+1)) + endif + + +c falls Energieverlustberechnung aus ICRU-Tabelle verlangt ist und mittlerer +c Energieverlust nicht fuer jedes Teilchen extra berechnet werden soll (sinnvoll +c wenn alle Teilchen gleiche Startenergie haben oder Streuung der Startenergien +c klein ist, so dass die Streuung des mittleren Energieverlustes vernachlaessigt +c werden kann): + + if (log_E_Verlust_ICRU .AND. .NOT.calculate_each) then + if (random_E0_equal) then + Ekin = E0_ + (upperE0+lowerE0)/2. + else + Ekin = E0_ + endif + if (Gebiet0.EQ.target .OR. Gebiet0.EQ.upToGrid1) then + Ekin = Ekin + q*(U_Tgt - U_F) + elseif (Gebiet0.EQ.upToGrid2) then + Ekin = Ekin + q*(U_G1 - U_F) + endif + call CALC_ELOSS_ICRU(Ekin,q,m,Thickness,mean_E_Verlust) + endif + + if (log_Meyer_F_Function) then + if (random_E0_equal) then + Ekin = E0_ + (upperE0+lowerE0)/2. + else + Ekin = E0_ + endif + if (Gebiet0.EQ.target .OR. Gebiet0.EQ.upToGrid1) then + Ekin = Ekin + q*(U_Tgt - U_F) + elseif (Gebiet0.EQ.upToGrid2) then + Ekin = Ekin + q*(U_G1 - U_F) + endif + effRedThick = Meyer_Faktor1 * Thickness + call Get_F_Function_Meyer(effRedThick,Ekin) + endif + + do 200 theta0_ = par(1,thetAng),par(2,thetAng),par(3,thetAng) ! theta0 + if (.NOT.random_angle) then + theta0 = theta0_ + Cos_theta0 = cosd(theta0) + Sin_theta0 = sind(theta0) + endif + do 200 phi0_ = par(1,phiAng),par(2,phiAng),par(3,phiAng) ! phi0 + if (.NOT.random_angle) then + phi0 = phi0_ + Cos_phi0 = cosd(phi0) + Sin_phi0 = sind(phi0) + endif + + do 200 y0_ = par(1,yPos),par(2,yPos),par(3,yPos) ! y0 + if (.NOT.random_pos) then + x0(2) = y0_ + endif + + do 200 z0_ = par(1,zPos),par(2,zPos),par(3,zPos) ! z0 + if (.NOT.random_pos) then + x0(3) = z0_ + endif + +c die folgenden parWert(n) werden u.U. in der 'Zufallsschleife' weiter unten +c abgeaendert. Hier werden sie in jedem Fall fuer Tabellenausgaben, Debug- +c angelegenheiten u.s.w. erst einmal mit den aktuellen Werten der +c entsprechenden Schleifen gefuellt: + + parWert(ener) = E0_ + parWert(thetAng) = theta0_ + parWert(phiAng) = phi0_ + parWert(yPos) = y0_ + parWert(zPos) = z0_ + + +c falls fruehere Simulation fortgefuehrt wird: +c Berechne diejenige Eventnummer in NTP_read, ab welcher die relevanten +c Simulationsparameter von ACCEL bzw. des 'FoilFiles' mit den gegenwaertigen +c MUTRACK-(Schleifen)-Parametern uebereinstimmen: + + if (.NOT.fromScratch) eventNr = firstEventNr() + + + + + + +c (...) + + + + + +c 3106 +c Einsprunglabel fuer Starts auf der Triggerfolie mit Startwinkelangaben +c im Kammersystem => transformiere Geschwindigkeitsvektor in das Triggersystem: + +111 if (alfaTD.NE.0) then + help1= v(1) ! zur Zwischenspeicherung + v(1) = help1*Cos_alfaTD + v(2)*Sin_alfaTD + v(2) = -help1*Sin_alfaTD + v(2)*Cos_alfaTD + endif + + +c - pruefe, ob das Projektil die Folie trifft: + +112 radiusQuad = x(2)*x(2) + x(3)*x(3) + If (radiusQuad.GT.radiusQuad_Folie) then + ! zurueckrechnen in das Kammersystem: + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + + destiny = code_vorbei + goto 555 + endif + + +c So verlangt, schreibe die aktuellen Trajektoriengroessen in das 'FoilFile': +c (hier ist sichergestellt, dass die Folie getroffen worden ist, Wechsel- +c wirkungen mit der Folie wurden aber noch nicht beruecksichtigt). +c HIER WERDEN 'X' UND 'V' IM TRIGGERSYSTEM ABGESPEICHERT! + + if (createFoilFile) then + ! falls die Flugzeit bis zur Triggerfolie verschmiert in das + ! NTupel aufgenommen werden soll: + if (smearS1Fo) then + call Gauss_Verteilung(sigmaS1Fo,help4) + S1FoOnly = t + help4 + endif + if (NTP_stop) then + Ekin=(v(1)*v(1)+v(2)*v(2)+v(3)*v(3))*Energie_Faktor + endif + call HFNT(NTP_write) + NTPalreadyWritten = .true. + endif + + +c - Zeitpunkt bei Erreichen der Folie sichern: + +113 S1Fo = t + if (createNTP.AND.Fo_triggered) fill_NTP = .true. + if (statNeeded(Nr_S1Fo)) call fill_statMem(S1Fo,Nr_S1Fo) + + + +c - Speichern der Koordinaten fuer die Statistiken: + + if (statNeeded(Nr_y_Fo)) then + call fill_statMem( x(2),Nr_y_Fo) + endif + if (statNeeded(Nr_z_Fo)) then + call fill_statMem( x(3),Nr_z_Fo) + endif + if (statNeeded(Nr_r_Fo)) then + radius = SQRT(x(2)*x(2) + x(3)*x(3)) + call fill_statMem(radius,Nr_r_Fo) + endif + + +c - speichere Auftreffort des Projektils fuer die Berechnung der Folienelektronen: + + if (generate_FE) then + x0FE(1) = x(1) + x0FE(2) = x(2) + x0FE(3) = x(3) + endif + + +c - falls nur bis zur Folie gerechnet werden soll, beende hier die Integration: + + if (upToTDFoilOnly) then + ! zurueckrechnen in das Kammersystem: + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + if (generate_FE) Gebiet = UpToExTD + goto 555 + endif + + +c - pruefe, ob das Projektil auf das Stuetzgitter aufschlaegt: + + if (testOnWireHit .AND. ran(seed).GT.TransTDFoil) then + destiny = code_Stuetzgitter + ! zurueckrechnen in das Kammersystem: + if (alfaTD.NE.0) then + help1= x(1) + x(1) = (help1-d_Folie_Achse)*Cos_alfaTD - + + x(2)*Sin_alfaTD + xTD + x(2) = (help1-d_Folie_Achse)*Sin_alfaTD + + + x(2)*Cos_alfaTD + help1= v(1) + v(1) = help1*Cos_alfaTD - v(2)*Sin_alfaTD + v(2) = help1*Sin_alfaTD + v(2)*Cos_alfaTD + else + x(1) = x(1) + xTD - d_Folie_Achse + endif + goto 555 + endif + + +c - Energieverlust und Winkelaufstreuung: + + if (log_E_Verlust .OR. log_Aufstreu) then + if (Debug_) then + Steps = Steps + 1 + call Output_Debug + endif + v_square = v(1)*v(1) + v(2)*v(2) + v(3)*v(3) + v_Betrag = SQRT(v_square) + Ekin = v_square * Energie_Faktor + endif + +c -- Energieverlust (vorerst nur Gaussverteilt): + + if (log_E_Verlust_defined.OR.log_Meyer_Gauss) then + ! Berechne Bahnwinkel relativ zur Folienebene fuer effektive Folien- + ! dicke: + alfa = atand(SQRT(v(2)*v(2)+v(3)*v(3))/v(1)) + endif + + if (log_E_Verlust) then + if (calculate_each) then + call CALC_ELOSS_ICRU(Ekin,q,m,Thickness,E_Verlust) + else + E_Verlust = mean_E_Verlust + endif + if (log_E_Verlust_defined) E_Verlust = E_Verlust / cosd(alfa) + if (debug_) write (lunLOG,*) ' mittlerer Energieverlust: ',E_Verlust + + ! Now we have the mean energy loss. We still have to modify it + ! according to the distribution of energy losses, i.e. + ! E_Verlust -> E_Verlust + delta_E_Verlust: + + delta_E_Verlust = 0. + if (log_E_Straggling_sigma) then +400 call Gauss_Verteilung(sigmaE,delta_E_Verlust) + if (debug_) write (lunLOG,*) ' sigmaE,delta_E_Verlust: ',sigmaE,delta_E_Verlust + if (E_Verlust+delta_E_Verlust.LT.0.) goto 400 + elseif (log_E_Straggling_equal) then +410 delta_E_Verlust = lowerE + (upperE - lowerE)*ran(seed) + if (E_Verlust+delta_E_Verlust.LT.0) goto 410 + elseif (log_E_Straggling_Lindhard) then + ! Streuung in Abhaengigkeit von mittlerer Energie in Folie: + call E_Straggling_Lindhard(Ekin-0.5*E_Verlust,m,sigmaE) +420 call Gauss_Verteilung(sigmaE,delta_E_Verlust) + if (debug_) write (lunLOG,*) ' sigmaE,delta_E_Verlust: ',sigmaE,delta_E_Verlust + if (E_Verlust+delta_E_Verlust.LT.0.) goto 420 + elseif (log_E_Straggling_Yang) then + ! Streuung in Abhaengigkeit von mittlerer Energie in Folie! + call E_Straggling_Yang(Ekin-0.5*E_Verlust,m,sigmaE) +430 call Gauss_Verteilung(sigmaE,delta_E_Verlust) + if (debug_) write (lunLOG,*) ' sigmaE,delta_E_Verlust: ',sigmaE,delta_E_Verlust + if (E_Verlust+delta_E_Verlust.LT.0.) goto 430 + endif + + if (E_Verlust+delta_E_Verlust.GE.Ekin) then + destiny = code_stopped_in_foil + goto 555 + endif + E_Verlust = E_Verlust + delta_E_Verlust + + ! help1 == Reduzierungsfaktor fuer Geschw.Betrag + help1 = sqrt( (Ekin - E_Verlust)/Ekin ) + v(1) = help1 * v(1) + v(2) = help1 * v(2) + v(3) = help1 * v(3) + v_Betrag = help1 * v_Betrag + if (debug_) write (lunLOG,*) ' Energieverlust: ',E_Verlust + endif + +c -- Winkelaufstreuung (vorerst nur Gaussverteilt): + + if (log_aufstreu) then + if (log_Meyer_F_Function) then + call throwMeyerAngle(thetaAufstreu) + else + if (log_Meyer_Gauss) then + if (log_E_Verlust) Ekin = Ekin - .5 * E_Verlust ! mittlere Energie + effRedThick = Meyer_Faktor1 * Thickness / cosd(alfa) + call g_Functions(g1,g2,effRedThick) + sigmaAufstreu = Meyer_Faktor2 / Ekin * (g1 + Meyer_Faktor3*g2) + if (debug_) then + write (lunLOG,*) ' effekt. red. Dicke: ',effRedThick + write (lunLOG,*) ' Sigma(Streuwinkel): ',sigmaAufstreu + endif + endif + + call Gauss_Verteilung_theta(sigmaAufstreu,thetaAufstreu) + endif + + st0 = sind(thetaAufstreu) + ct0 = cosd(thetaAufstreu) + phiAufstreu = 360.*ran(seed) + + v_xy = SQRT(v(1)*v(1) + v(2)*v(2)) ! v_xy stets groesser 0 + ! wegen v(1)>0 + + help1 = v(1) + help2 = v(2) + help3 = v_Betrag*st0*cosd(phiAufstreu)/v_xy + help4 = st0*sind(phiAufstreu) + + v(1) = ct0*help1 - help3*help2 - help4*help1*v(3)/v_xy + v(2) = ct0*help2 + help3*help1 - help4*help2*v(3)/v_xy + v(3) = ct0*v(3) + help4*v_xy + if (debug_) write (lunLOG,*) ' Aufstreuung: theta, phi =', + + thetaAufstreu,phiAufstreu + endif + + if (Debug_ .AND. (log_E_Verlust .OR. log_Aufstreu)) then + call Output_Debug + endif + + +c - Neutralisierung in der Folie? + + if (log_neutralize) then + if (neutral_fract(q_).EQ.-1.0) then + v_square = v(1)*v(1) + v(2)*v(2) + v(3)*v(3) + Ekin = v_square * Energie_Faktor + call chargeStateYields(Ekin,m,YieldPlus,YieldNeutral) + YieldNeutral = 100. * YieldNeutral + else + YieldNeutral = neutral_fract(q_) + endif + if (100.*ran(seed).LE.YieldNeutral) then + q = 0. + qInt = 0 + if (debug_) then + write (lunLOG,*) ' Teilchen wurde neutralisiert' + endif + nNeutral = nNeutral + 1 + else + nCharged = nCharged + 1 + endif + endif + +c::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + + +c (...) +c4300 +c=============================================================================== + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE G_Functions(G1,G2,tau) +c ================================= + +c Diese Routine gibt in Abhaengigkeit von der reduzierten Dicke 'tau' +c Funktionswerte fuer g1 und g2 zurueck. g1 und g2 sind dabei die von +c Meyer angegebenen tabellierten Funktionen fuer die Berechnung von Halbwerts- +c breiten von Streuwinkelverteilungen. (L.Meyer, phys.stat.sol. (b) 44, 253 +c (1971)) + + IMPLICIT NONE + + real tau,g1,g2 + real tau_(26),g1_(26),g2_(26) + real help + + integer i + + DATA tau_ /0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, + + 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 9.0, + + 10.0, 12.0, 14.0, 16.0, 18.0, 20.0 / + + DATA g1_ /0.050,0.115,0.183,0.245,0.305,0.363,0.419,0.473,0.525,0.575, + + 0.689,0.799,0.905,1.010,1.100,1.190,1.370,1.540,1.700,1.850, + + 1.990,2.270,2.540,2.800,3.050,3.290 / + DATA g2_ / 0.00,1.25,0.91,0.79,0.73,0.69,0.65,0.63,0.61,0.59, + + 0.56,0.53,0.50,0.47,0.45,0.43,0.40,0.37,0.34,0.32, + + 0.30,0.26,0.22,0.18,0.15,0.13 / + + if (tau.LT.tau_(1)) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist kleiner als kleinster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(1) = ',tau_(1) + write(*,*) + STOP + endif + + i = 1 + +10 i = i + 1 + if (i.EQ.27) then + write(*,*) + write(*,*)'SUBROUTINE G_Functions:' + write(*,*)' Fehler bei Berechnung der g-Funktionen fuer Winkelaufstreuung:' + write(*,*)' aktuelles tau ist groesser als groesster Tabellenwert:' + write(*,*)' tau = ',tau + write(*,*)' tau_(26) = ',tau_(26) + write(*,*) + STOP + elseif (tau.gt.tau_(i)) then + goto 10 + endif + + +c lineare Interpolation zwischen Tabellenwerten: + + help = (tau-tau_(i-1))/(tau_(i)-tau_(i-1)) + + g1 = g1_(i-1) + help*(g1_(i)-g1_(i-1)) + g2 = g2_(i-1) + help*(g2_(i)-g2_(i-1)) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine Get_F_Function_Meyer(tau,Ekin) +c ========================================= + + implicit none + + real tau + real Ekin + + real thetaSchlange,thetaSchlangeMax + real theta,thetaMax,thetaStep + real f1,f2,F + + +c------------------------------------ +c - Parameter: + + real Z1, Z2 ! die atomaren Nummern von Projektil und Target +c real a0 ! Bohrscher Radius in cm + real screeningPar ! Screeningparameter 'a' in cm fuer Teilchen der + ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + ! bei Streichung von Z1 (vgl. Referenz, S. 268) + + real r0Meyer ! r0(C) berechnet aus dem screeningParameter 'a' + ! und dem ebenfalls bei Meyer angegebenem + ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + real eSquare ! elektrische Ladung zum Quadrat in keV*cm + + real Pi ! die Kreiszahl + +c parameter (a0 = 5.29E-9) + parameter (Z1 = 1, Z2 = 6, ScreeningPar = 2.5764E-9) + parameter (r0Meyer = 9.909E-9, eSquare = 1.44E-10) + parameter (Pi = 3.141592654) + + real Meyer_Faktor3 + real Meyer_Faktor4 + real zzz ! 'Hilfsparameter' + real Meyer_Faktor5 + + parameter (Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer)) + parameter (Meyer_faktor4 = screeningPar / (2.*Z1*Z2*eSquare) * Pi/180.) + parameter (zzz = screeningPar / (2.*Z1*Z2*eSquare)) + parameter (Meyer_faktor5 = zzz*zzz / (8*Pi*Pi)) + +c------------------------------------ + + integer nBin,nBinMax + parameter (nBinMax=201) + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + integer i + real rhelp + + integer HB_memsize + parameter(HB_memsize=500000) + real memory(HB_memsize) + COMMON /PAWC/ memory + + +c nur noch fuer Testzwecke: + + real fValues(203) + real fValuesFolded(203) + + integer idh + parameter (idh = 50) + + INCLUDE 'mutrack$sourcedirectory:COM_DIRS.INC' + character filename*20 ! Name der Ausgabe-Dateien + COMMON /filename/ filename + +c------------------------------------------------------------------------------- + +c Festlegen des maximalen Theta-Wertes sowie der Schrittweite: + + if (tau.LT.0.2) then + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist kleiner als 0.2 => kann ich nicht ... => STOP' + call exit + elseif (tau.LE.2.) then + ! => Tabelle A + thetaSchlangeMax = 4.0 + elseif (tau.LE.8.) then + ! => Tabelle B + thetaSchlangeMax = 7.0 + elseif (tau.LE.20.) then + ! => Tabelle C + thetaSchlangeMax = 20.0 + else + write(*,*) 'Subroutine ''Get_F_Function_Meyer'':' + write(*,*) 'Effektive Dicke ist groesser als 20 => kann ich nicht ... => STOP' + call exit + endif + + thetaMax = thetaSchlangeMax / Meyer_Faktor4 / Ekin + if (thetaMax.GT.50) then + thetaStep = .5 + elseif (thetaMax.GT.25) then + thetaStep = .25 + elseif (thetaMax.GT.12.5) then + thetaStep = .125 + else + thetaStep = .0625 + endif + + +c Tabelle der F-Werte erstellen: + + nBin = 0 + do theta = thetaStep, thetaMax, thetaStep + + ! Berechne aus theta das 'reduzierte' thetaSchlange (dabei gleich + ! noch von degree bei theta in Radiant bei thetaSchlange umrechnen): + + thetaSchlange = Meyer_faktor4 * Ekin * theta + + ! Auslesen der Tabellenwerte fuer die f-Funktionen: + + call F_Functions_Meyer(tau,thetaSchlange,f1,f2) + if (thetaSchlange.EQ.-1) then + ! wir sind jenseits von thetaSchlangeMax + goto 10 + endif + + ! Berechnen der Streuintensitaet: + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + + nBin = nBin + 1 + if (nBin.GT.nBinMax) then + write(*,*) 'nBin > nBinMax => EXIT' + call exit + endif + value(nBin) = sind(theta)*F + + fValues(nBin+1) = F ! fuer Testzwecke + fValuesFolded(nBin+1) = sind(theta)*F ! fuer Testzwecke + + enddo + + +c Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + +10 do i = 1, nBin + area(i) = (value(i)+value(i-1))/2. * thetaStep + integ(i) = integ(i-1) + area(i) + enddo + + +c Normiere totale Flaeche auf 1: + + rHelp = integ(nBin) + do i = 1, nBin + value(i) = value(i) / rHelp + area(i) = area(i) / rHelp + integ(i) = integ(i) / rHelp + enddo + + +c vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + ! Berechne die Werte fuer theta=0: + + call F_Functions_Meyer(tau,0.,f1,f2) + F = Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2) + fValues(1) = F + fValuesFolded(1) = 0. + + ! Gib die Werte in das Tabellenfile aus: + +c theta = 0. +c open (10,file=outDir//':'//filename//'.TAB',status='NEW') +c do i = 1, nBin+1 +c write(10,*) theta, fValues(i), fValuesFolded(i) +c theta = theta + thetaStep +c enddo +c close (10) + + + ! Buchen und Fuellen der Histogramme: + + call HBOOK1(idh,'F',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh,fValues) + call HRPUT(idh,outDir//':'//filename//'.RZ','N') + call HDELET(idh) + + call HBOOK1(idh+1,'F*sin([q])',nBin+1,-0.5*thetaStep,(real(nBin)+0.5)*thetaStep,0.) + call HPAK(idh+1,fValuesFolded) + call HRPUT(idh+1,outDir//':'//filename//'.RZ','U') + call HDELET(idh+1) + + + END + + +c=============================================================================== + + options /extend_source + + subroutine throwMeyerAngle (theta) +c ================================== + + implicit none + + real lowerbound,y1,y2,f,root,radiant,fraction + integer bin,nBin + integer nBinMax + parameter (nBinMax=201) + + real theta,thetaStep + real value(0:nBinMax) /0.,nBinMax*0./ + real area(nBinMax) / nBinMax*0./ + real integ(0:nBinMax) /0.,nBinMax*0./ + common /MeyerTable/ value,area,integ,thetaStep,nBin + + real rhelp + + real random + integer seed + common /seed/ seed + + +c bin: Nummer des Bins, innerhalb dessen das Integral den Wert von +c random erreicht oder ueberschreitet: + + random = ran(seed) + + bin = 1 + do while (random.GT.integ(bin)) + bin = bin + 1 + if (bin.GT.nBin) then + write(*,*) 'error 1' + call exit + endif + enddo + + fraction = (random-integ(bin-1)) / (integ(bin)-integ(bin-1)) + y1 = value(bin-1) + y2 = value(bin) + f = thetaStep / (y2-y1) + rHelp = y1*f + + radiant = rHelp*rHelp + fraction*thetaStep*(y1+y2)*f + root = SQRT(radiant) + lowerBound = real(bin-1)*thetaStep + if (f.GT.0) then + theta = lowerBound - rHelp + root + else + theta = lowerBound - rHelp - root + endif + + + END + + +c=============================================================================== + + options /extend_source + + subroutine F_Functions_Meyer(tau,thetaSchlange,f1,f2) +c ===================================================== + + implicit none + +c Diese Routine gibt in Abhaengigkeit von 'thetaSchlange' und 'tau' +c Funktionswerte fuer f1 und f2 zurueck. f1 und f2 entsprechen dabei den +c bei Meyer angegebenen Funktion gleichen Namens. Die in dieser Routine +c verwendeten Tabellen sind eben dieser Referenz entnommen: +c L.Meyer, phys.stat.sol. (b) 44, 253 (1971) + + real tau,thetaSchlange + real f1, f2, f1_(2), f2_(2) + + integer column_,column,row + + integer iColumn + real weightCol, weightRow + +c------------------------------------------------------------------------------- + +c die Tabellendaten der Referenz (Tabellen 2 und 3): + + integer nColumn + parameter (nColumn = 25) + real tau_(nColumn) / + + 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, + + 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10., 12., 14., 16., 18., 20. / + + integer nRowA + parameter (nRowA = 25) + real thetaSchlangeA(nRowA) / + + .00, .05, .10, .15, .20, .25, .30, .35, .40, .45, .50, .60, + + .70, .80, .90, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, 3.5, 4.0 / + + integer nRowB + parameter (nRowB = 24) + real thetaSchlangeB(nRowB) / + + 0.0, 0.2, 0.4, 0.5, 0.6, 0.8, 1.0, 1.2, 1.4, 1.5, 1.6, 1.8, + + 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0 / + + integer nRowC + parameter (nRowC = 24) + real thetaSchlangeC(nRowC) / + + 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, + + 7.0, 8.0, 9.0, 10., 11., 12., 13., 14., 15., 16., 18., 20. / + + + real f1_A(9,nRowA) + + /1.69E+2,4.55E+1,2.11E+1,1.25E+1,8.48E+0,6.21E+0,4.80E+0,3.86E+0,3.20E+0, + + 9.82E+1,3.72E+1,1.97E+1,1.20E+1,8.27E+0,6.11E+0,4.74E+0,3.83E+0,3.17E+0, + + 3.96E+1,2.58E+1,1.65E+1,1.09E+1,7.73E+0,5.82E+0,4.58E+0,3.72E+0,3.10E+0, + + 1.76E+1,1.58E+1,1.27E+1,9.26E+0,6.93E+0,5.38E+0,4.31E+0,3.55E+0,2.99E+0, + + 8.62E+0,1.01E+1,9.45E+0,7.58E+0,6.02E+0,4.85E+0,3.98E+0,3.33E+0,2.84E+0, + + 4.65E+0,6.55E+0,6.91E+0,6.06E+0,5.11E+0,4.28E+0,3.62E+0,3.08E+0,2.66E+0, + + 2.74E+0,4.45E+0,5.03E+0,4.78E+0,4.27E+0,3.72E+0,3.23E+0,2.82E+0,2.47E+0, + + 1.77E+0,3.02E+0,3.71E+0,3.76E+0,3.53E+0,3.20E+0,2.86E+0,2.55E+0,2.27E+0, + + 1.22E+0,2.19E+0,2.78E+0,2.96E+0,2.91E+0,2.73E+0,2.51E+0,2.28E+0,2.07E+0, + + 8.82E-1,1.59E+0,2.12E+0,2.35E+0,2.39E+0,2.32E+0,2.19E+0,2.03E+0,1.87E+0, + + 6.55E-1,1.20E+0,1.64E+0,1.88E+0,1.97E+0,1.96E+0,1.90E+0,1.79E+0,1.68E+0, + + 3.80E-1,7.15E-1,1.01E+0,1.22E+0,1.35E+0,1.40E+0,1.41E+0,1.39E+0,1.34E+0, + + 2.26E-1,4.45E-1,6.44E-1,8.08E-1,9.28E-1,1.01E+0,1.05E+0,1.06E+0,1.05E+0, + + 1.39E-1,2.80E-1,4.21E-1,5.45E-1,6.46E-1,7.22E-1,7.75E-1,8.07E-1,8.21E-1, + + 8.22E-2,1.76E-1,2.78E-1,3.71E-1,4.53E-1,5.21E-1,5.74E-1,6.12E-1,6.37E-1, + + 5.04E-2,1.11E-1,1.86E-1,2.57E-1,3.22E-1,3.79E-1,4.27E-1,4.65E-1,4.94E-1, + + 2.51E-2,5.60E-2,9.24E-2,1.31E-1,1.69E-1,2.02E-1,2.40E-1,2.71E-1,2.97E-1, + + 1.52E-2,3.20E-2,5.08E-2,7.23E-2,9.51E-2,1.18E-1,1.41E-1,1.63E-1,1.83E-1, + + 1.03E-2,2.05E-2,3.22E-2,4.55E-2,6.01E-2,7.53E-2,9.02E-2,1.05E-1,1.19E-1, + + 8.80E-3,1.48E-2,2.25E-2,3.13E-2,4.01E-2,5.03E-2,6.01E-2,7.01E-2,8.01E-2, + + 6.10E-3,1.15E-2,1.71E-2,2.28E-2,2.89E-2,3.52E-2,4.18E-2,4.86E-2,5.55E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,1.71E-2,1.98E-2,2.28E-2,2.58E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.90E-3,1.02E-2,1.16E-2,1.31E-2, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,4.90E-3,5.70E-3,6.40E-3,7.20E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.90E-3,3.40E-3,3.90E-3,4.30E-3/ + + real f1_B(9,nRowB) + + /2.71E+0,1.92E+0,1.46E+0,1.16E+0,9.52E-1,8.03E-1,6.90E-1,5.32E-1,4.28E-1, + + 2.45E+0,1.79E+0,1.39E+0,1.12E+0,9.23E-1,7.82E-1,6.75E-1,5.23E-1,4.23E-1, + + 1.87E+0,1.48E+0,1.20E+0,9.96E-1,8.42E-1,7.24E-1,6.32E-1,4.98E-1,4.07E-1, + + 1.56E+0,1.30E+0,1.09E+0,9.19E-1,7.89E-1,6.86E-1,6.03E-1,4.80E-1,3.95E-1, + + 1.28E+0,1.11E+0,9.62E-1,8.33E-1,7.27E-1,6.40E-1,5.69E-1,4.59E-1,3.81E-1, + + 8.23E-1,7.90E-1,7.29E-1,6.64E-1,6.01E-1,5.44E-1,4.94E-1,4.12E-1,3.49E-1, + + 5.14E-1,5.36E-1,5.29E-1,5.07E-1,4.78E-1,4.47E-1,4.16E-1,3.60E-1,3.13E-1, + + 3.19E-1,3.58E-1,3.76E-1,3.78E-1,3.70E-1,3.57E-1,3.45E-1,3.08E-1,2.76E-1, + + 2.02E-1,2.40E-1,2.64E-1,2.77E-1,2.82E-1,2.80E-1,2.65E-1,2.59E-1,2.39E-1, + + 1.67E-1,1.96E-1,2.20E-1,2.36E-1,2.44E-1,2.47E-1,2.45E-1,2.35E-1,2.21E-1, + + 1.33E-1,1.61E-1,1.85E-1,2.02E-1,2.12E-1,2.18E-1,2.18E-1,2.14E-1,2.03E-1, + + 8.99E-2,1.12E-1,1.32E-1,1.48E-1,1.59E-1,1.67E-1,1.68E-1,1.75E-1,1.72E-1, + + 6.24E-2,7.94E-2,9.50E-2,1.09E-1,1.20E-1,1.29E-1,1.35E-1,1.42E-1,1.43E-1, + + 4.55E-2,5.74E-2,6.98E-2,8.11E-2,9.09E-2,9.92E-2,1.06E-1,1.15E-1,1.19E-1, + + 3.35E-2,4.22E-2,5.19E-2,6.11E-2,6.95E-2,7.69E-2,8.33E-2,9.28E-2,9.85E-2, + + 2.50E-2,3.16E-2,3.92E-2,4.66E-2,5.35E-2,6.00E-2,6.57E-2,7.49E-2,8.13E-2, + + 1.90E-2,2.40E-2,2.99E-2,3.58E-2,4.16E-2,4.70E-2,5.20E-2,6.05E-2,6.70E-2, + + 1.47E-2,1.86E-2,2.32E-2,2.79E-2,3.25E-2,3.70E-2,4.12E-2,4.89E-2,5.51E-2, + + 8.10E-3,1.04E-2,1.30E-2,1.57E-2,1.84E-2,2.12E-2,2.40E-2,2.93E-2,3.42E-2, + + 4.80E-3,6.20E-3,7.70E-3,9.30E-3,1.09E-2,1.26E-2,1.44E-2,1.79E-2,2.14E-2, + + 2.80E-3,3.80E-3,4.70E-3,5.70E-3,6.70E-3,7.50E-3,8.90E-3,1.13E-2,1.36E-2, + + 1.70E-3,2.30E-3,2.90E-3,3.60E-3,4.20E-3,4.90E-3,5.60E-3,7.20E-3,8.80E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,2.00E-3,2.80E-3,3.50E-3, + + 0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,0.00 ,8.80E-4,1.20E-3,1.60E-3/ + + real f1_C(7,nRowC) + + /3.65E-1,2.62E-1,2.05E-1,1.67E-1,1.41E-1,1.21E-1,1.05E-1, + + 3.33E-1,2.50E-1,1.95E-1,1.61E-1,1.36E-1,1.18E-1,1.03E-1, + + 2.75E-1,2.18E-1,1.76E-1,1.48E-1,1.27E-1,1.11E-1,9.80E-2, + + 2.04E-1,1.75E-1,1.50E-1,1.29E-1,1.13E-1,1.01E-1,9.00E-2, + + 1.41E-1,1.31E-1,1.19E-1,1.08E-1,9.71E-2,8.88E-2,8.01E-2, + + 9.32E-2,9.42E-2,9.10E-2,8.75E-2,8.00E-2,7.44E-2,6.91E-2, + + 5.98E-2,6.52E-2,6.72E-2,6.62E-2,6.40E-2,6.12E-2,5.82E-2, + + 3.83E-2,4.45E-2,4.80E-2,4.96E-2,4.98E-2,4.90E-2,4.77E-2, + + 2.46E-2,3.01E-2,3.40E-2,3.65E-2,3.79E-2,3.84E-2,3.83E-2, + + 1.59E-2,2.03E-2,2.39E-2,2.66E-2,2.85E-2,2.97E-2,3.04E-2, + + 1.04E-2,1.37E-2,1.66E-2,1.92E-2,2.12E-2,2.27E-2,2.37E-2, + + 4.39E-3,6.26E-3,8.26E-3,9.96E-3,1.15E-2,1.29E-2,1.41E-2, + + 2.06E-3,3.02E-3,4.24E-3,5.28E-3,6.32E-3,7.32E-3,8.26E-3, + + 1.21E-3,1.69E-3,2.24E-3,2.85E-3,3.50E-3,4.16E-3,4.82E-3, + + 8.50E-4,1.10E-3,1.38E-3,1.65E-3,2.03E-3,2.45E-3,2.88E-3, + + 5.90E-4,7.40E-4,8.50E-4,9.90E-4,1.23E-3,1.49E-3,1.71E-3, + + 3.90E-4,4.60E-4,5.20E-4,6.30E-4,7.65E-4,9.65E-4,1.12E-3, + + 2.40E-4,2.70E-4,3.10E-4,3.98E-4,4.97E-4,6.03E-4,7.18E-4, + + 1.50E-4,1.70E-4,2.15E-4,2.70E-4,3.35E-4,4.35E-4,5.00E-4, + + 1.00E-4,1.20E-4,1.46E-4,1.90E-4,2.40E-4,2.88E-4,3.43E-4, + + 0.00 ,0.00 ,1.04E-4,1.41E-4,1.80E-4,2.10E-4,2.50E-4, + + 0.00 ,0.00 ,8.20E-5,1.06E-4,1.38E-4,1.58E-4,1.85E-4, + + 0.00 ,0.00 ,5.40E-5,7.00E-5,8.60E-5,1.03E-4,1.20E-4, + + 0.00 ,0.00 ,4.20E-5,5.40E-5,6.50E-5,7.70E-5,8.80E-5/ + + real f2_A(9,nRowA) + + / 3.52E+3, 3.27E+2, 9.08E+1, 3.85E+1, 2.00E+1, 1.18E+1, 7.55E+0, 5.16E+0, 3.71E+0, + + 2.58E+2, 1.63E+2, 7.30E+1, 3.42E+1, 1.85E+1, 1.11E+1, 7.18E+0, 4.96E+0, 3.59E+0, + + -1.12E+2, 4.84E+0, 3.56E+1, 2.34E+1, 1.45E+1, 9.33E+0, 6.37E+0, 4.51E+0, 3.32E+0, + + -5.60E+1,-1.12E+1, 9.87E+0, 1.24E+1, 9.59E+0, 7.01E+0, 5.16E+0, 3.83E+0, 2.91E+0, + + -2.13E+1,-1.22E+1,-2.23E+0, 3.88E+0, 5.15E+0, 4.65E+0, 3.87E+0, 3.12E+0, 2.45E+0, + + -8.25E+0,-9.58E+0,-5.59E+0,-1.40E+0, 1.76E+0, 2.71E+0, 2.71E+0, 2.35E+0, 1.95E+0, + + -3.22E+0,-6.12E+0,-5.28E+0,-2.87E+0,-1.92E-1, 1.32E+0, 1.69E+0, 1.74E+0, 1.48E+0, + + -1.11E+0,-3.40E+0,-4.12E+0,-3.08E+0,-6.30E-1, 3.60E-1, 9.20E-1, 1.03E+0, 1.04E+0, + + -2.27E-1,-2.00E+0,-2.93E+0,-2.69E+0,-1.48E+0,-3.14E-1, 2.69E-1, 5.28E-1, 6.09E-1, + + 1.54E-1,-1.09E+0,-2.10E+0,-2.15E+0,-1.47E+0,-6.77E-1,-1.80E-1, 1.08E-1, 2.70E-1, + + 3.28E-1,-6.30E-1,-1.50E+0,-1.68E+0,-1.34E+0,-8.43E-1,-4.60E-1,-1.85E-1,-4.67E-3, + + 3.32E-1,-2.06E-1,-7.32E-1,-9.90E-1,-9.42E-1,-8.20E-1,-6.06E-1,-4.51E-1,-3.01E-1, + + 2.72E-1,-3.34E-2,-3.49E-1,-5.65E-1,-6.03E-1,-5.79E-1,-5.05E-1,-4.31E-1,-3.45E-1, + + 2.02E-1, 2.80E-2,-1.54E-1,-3.00E-1,-3.59E-1,-3.76E-1,-4.60E-1,-3.40E-1,-3.08E-1, + + 1.38E-1, 4.84E-2,-5.56E-2,-1.44E-1,-2.04E-1,-2.39E-1,-2.54E-1,-2.49E-1,-2.48E-1, + + 9.47E-2, 4.86E-2,-1.08E-2,-6.44E-2,-1.02E-1,-1.34E-1,-1.62E-1,-1.79E-1,-1.87E-1, + + 5.33E-2, 3.71E-2, 1.85E-2, 1.63E-3,-1.69E-2,-3.69E-2,-5.66E-2,-7.78E-2,-9.33E-2, + + 3.38E-2, 2.40E-2, 1.62E-2, 9.90E-3, 3.76E-3,-4.93E-3,-1.66E-2,-3.05E-2,-4.22E-2, + + 2.12E-2, 1.56E-2, 1.05E-2, 7.80E-3, 7.92E-3, 6.30E-3, 3.20E-4,-8.50E-3,-1.66E-2, + + 1.40E-2, 9.20E-3, 5.30E-3, 4.70E-3, 6.31E-3, 8.40E-3, 5.30E-3, 8.80E-4,-3.30E-3, + + 9.20E-3, 4.70E-3, 1.70E-3, 2.60E-3, 4.49E-3, 6.60E-3, 6.00E-3, 4.70E-3, 2.80E-3, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + real f2_B(9,nRowB) + + / 2.75E+0, 1.94E+0, 9.13E-1, 6.06E-1, 4.26E-1, 3.14E-1, 2.40E-1, 1.51E-1, 1.03E-1, + + 1.94E+0, 1.16E+0, 7.56E-1, 5.26E-1, 3.81E-1, 2.87E-1, 2.23E-1, 1.43E-1, 9.78E-2, + + 5.85E-1, 5.04E-1, 4.10E-1, 3.30E-1, 2.69E-1, 2.17E-1, 1.78E-1, 1.22E-1, 8.71E-2, + + 7.83E-2, 2.00E-1, 2.35E-1, 2.19E-1, 1.97E-1, 1.73E-1, 1.48E-1, 1.08E-1, 7.93E-2, + + -1.82E-1, 1.56E-2, 1.04E-1, 1.36E-1, 1.38E-1, 1.31E-1, 1.19E-1, 9.46E-2, 7.19E-2, + + -2.71E-1,-1.66E-1,-7.29E-2,-4.74E-3, 3.60E-2, 5.50E-2, 6.28E-2, 5.98E-2, 5.09E-2, + + -1.87E-1,-1.58E-1,-1.09E-1,-5.80E-2,-2.03E-2, 2.48E-3, 1.99E-2, 3.36E-2, 3.27E-2, + + -1.01E-1,-1.05E-1,-8.95E-2,-6.63E-2,-3.93E-2,-2.38E-2,-9.22E-3, 8.47E-3, 1.52E-2, + + -5.19E-2,-6.47E-2,-6.51E-2,-5.62E-2,-4.51E-2,-3.49E-2,-2.45E-2,-8.19E-3, 2.05E-3, + + -3.68E-2,-4.89E-2,-5.36E-2,-5.06E-2,-4.27E-2,-3.65E-2,-2.80E-2,-1.33E-2,-3.47E-3, + + -2.33E-2,-3.69E-2,-4.41E-2,-4.38E-2,-3.97E-2,-3.50E-2,-2.88E-2,-1.60E-2,-6.68E-3, + + -8.76E-3,-2.07E-2,-2.90E-2,-3.17E-2,-3.09E-2,-2.92E-2,-2.63E-2,-1.79E-2,-1.03E-2, + + -1.20E-3,-1.11E-2,-1.90E-2,-2.20E-2,-2.32E-2,-2.24E-2,-2.10E-2,-1.66E-2,-1.11E-2, + + 1.72E-3,-4.82E-3,-1.02E-2,-1.42E-2,-1.65E-2,-1.66E-2,-1.60E-2,-1.39E-2,-1.09E-2, + + 2.68E-3,-1.18E-3,-5.19E-3,-8.30E-5,-1.01E-2,-1.14E-2,-1.16E-2,-1.16E-2,-9.99E-3, + + 2.81E-3, 8.21E-4,-1.96E-3,-3.99E-3,-5.89E-3,-7.13E-3,-8.15E-3,-9.05E-3,-8.60E-3, + + 2.61E-3, 1.35E-3,-2.99E-4,-1.79E-3,-3.12E-3,-4.44E-3,-5.61E-3,-7.01E-3,-7.27E-3, + + 2.06E-3, 1.45E-3, 4.64E-4,-5.97E-4,-1.71E-3,-2.79E-3,-3.84E-3,-5.29E-3,-5.90E-3, + + 1.07E-3, 9.39E-4, 8.22E-4, 3.58E-4,-1.15E-4,-6.60E-4,-1.18E-3,-2.15E-3,-2.88E-3, + + 4.97E-4, 5.46E-4, 6.15E-4, 5.56E-4, 3.14E-4, 9.80E-5,-1.30E-4,-5.98E-4,-1.07E-4, + + 1.85E-4, 3.11E-4, 4.25E-4, 4.08E-4, 3.63E-4, 3.04E-4, 2.24E-4, 2.80E-5,-2.10E-4, + + 4.80E-5, 1.48E-4, 2.44E-4, 2.80E-4, 3.01E-4, 3.11E-4, 3.13E-4, 2.40E-4, 1.10E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 1.39E-4, 1.80E-4, 1.80E-4, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 4.38E-5, 7.30E-5, 8.40E-5/ + + real f2_C(7,nRowC) + + / 7.36E-2, 4.21E-2, 2.69E-2, 1.83E-2, 1.34E-2, 1.01E-2, 7.88E-3, + + 5.79E-2, 3.61E-2, 2.34E-2, 1.64E-2, 1.21E-2, 9.26E-3, 7.28E-3, + + 2.94E-2, 2.17E-2, 1.60E-2, 1.23E-2, 9.49E-3, 7.45E-3, 5.95E-3, + + 2.30E-3, 7.07E-3, 7.76E-3, 7.02E-3, 6.13E-3, 5.17E-3, 4.34E-3, + + -7.50E-3,-2.00E-3, 9.93E-4, 2.36E-3, 2.82E-3, 2.86E-3, 2.72E-3, + + -8.27E-3,-5.37E-3,-2.58E-3,-7.96E-4, 3.75E-4, 9.71E-4, 1.28E-3, + + -5.79E-3,-5.12E-3,-3.86E-3,-2.46E-3,-1.20E-3,-3.74E-4, 1.74E-4, + + -3.26E-3,-3.43E-3,-3.26E-3,-2.68E-3,-1.84E-3,-1.12E-3,-4.54E-4, + + -1.46E-3,-1.49E-3,-2.20E-3,-2.18E-3,-1.85E-3,-1.40E-3,-8.15E-4, + + -4.29E-4,-9.44E-4,-1.29E-3,-1.50E-3,-1.51E-3,-1.36E-3,-9.57E-4, + + -3.30E-5,-3.66E-4,-6.78E-4,-9.38E-4,-1.09E-3,-1.09E-3,-9.56E-4, + + 1.50E-4, 3.10E-5,-1.38E-4,-3.06E-4,-4.67E-4,-5.48E-4,-6.08E-4, + + 1.00E-4, 8.50E-5, 2.30E-5,-6.60E-5,-1.58E-4,-2.40E-4,-3.05E-4, + + 5.40E-5, 6.50E-5, 4.90E-5, 1.20E-5,-3.60E-5,-8.90E-5,-1.31E-4, + + 2.90E-5, 4.30E-5, 4.40E-5, 2.90E-5, 5.10E-6,-2.20E-5,-4.80E-5, + + 1.40E-5, 2.40E-5, 2.80E-5, 2.60E-5, 1.90E-5, 7.50E-6,-1.10E-5, + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , + + 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 , 0.00 / + + +c=============================================================================== + +c Bestimme, welche Reihen der Tabellen fuer Interpolation benoetigt werden: + + if (tau.LT.tau_(1)) then + write(*,*) 'tau is less than the lowest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'minimum = ',tau_(1) + call exit + elseif (tau.GT.tau_(nColumn)) then + write(*,*) 'tau is greater than the highest tabulated value:' + write(*,*) 'tau = ',tau + write(*,*) 'maximum = ',tau_(nColumn) + call exit + endif + + column_ = 2 + do while (tau.GT.tau_(column_)) + column_ = column_ + 1 + enddo + ! Das Gewicht der Reihe zu groesserem Tau: + weightCol = (tau-tau_(column_-1)) / (tau_(column_)-tau_(column_-1)) + + +c Besorge fuer gegebenes 'thetaSchlange' die interpolierten f1- und f2 -Werte +c der beiden relevanten Reihen: +c iColumn = 1 => Reihe mit hoeherem Index +c iColumn = 2 => Reihe mit kleinerem Index + + + iColumn = 1 + + +5 continue + + if (column_.LE.9) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 1. Tabelle: 0.2 <= tau <= 1.8 + + column = column_ + + if (thetaSchlange.LT.thetaSchlangeA(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeA(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeA(nRowA)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeA(nRowA) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeA(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeA(row-1)) / + + (thetaSchlangeA(row)-thetaSchlangeA(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_A(column,row-1) + + + weightRow * f1_A(column,row) + f2_(iColumn) = (1.-weightRow) * f2_A(column,row-1) + + + weightRow * f2_A(column,row) + + + elseif (column_.LE.18) then ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 2. Tabelle: 2.0 <= tau <= 7.0 + + column = column_ - 9 + + if (thetaSchlange.LT.thetaSchlangeB(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeB(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeB(nRowB)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeB(nRowB) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeB(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeB(row-1)) / + + (thetaSchlangeB(row)-thetaSchlangeB(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_B(column,row-1) + + + weightRow * f1_B(column,row) + f2_(iColumn) = (1.-weightRow) * f2_B(column,row-1) + + + weightRow * f2_B(column,row) + + + else ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ! Werte aus 3. Tabelle: 8.0 <= tau <= 20. + + column = column_ - 18 + + if (thetaSchlange.LT.thetaSchlangeC(1)) then + write(*,*) 'thetaSchlange is less than the lowest tabulated value in table 1:' + write(*,*) 'thetaSchlange = ',thetaSchlange + write(*,*) 'minimum = ',thetaSchlangeC(1) + call exit + elseif (thetaSchlange.GT.thetaSchlangeC(nRowC)) then +c write(*,*) 'thetaSchlange is greater than the highest tabulated value in table 1:' +c write(*,*) 'thetaSchlange = ',thetaSchlange +c write(*,*) 'maximum = ',thetaSchlangeC(nRowC) +c call exit + thetaSchlange = -1. + RETURN + endif + + row = 2 + do while (thetaSchlange.GT.thetaSchlangeC(row)) + row = row + 1 + enddo + ! Gewicht des Tabellenwertes zu groesseren ThetaSchlange: + weightRow = (thetaSchlange-thetaSchlangeC(row-1)) / + + (thetaSchlangeC(row)-thetaSchlangeC(row-1)) + + f1_(iColumn) = (1.-weightRow) * f1_C(column,row-1) + + + weightRow * f1_C(column,row) + f2_(iColumn) = (1.-weightRow) * f2_C(column,row-1) + + + weightRow * f2_C(column,row) + + + endif ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + if (iColumn.EQ.1) then + column_ = column_ - 1 + iColumn = 2 + goto 5 + endif + + f1 = weightCol*f1_(1) + (1.-weightCol)*f1_(2) + f2 = weightCol*f2_(1) + (1.-weightCol)*f2_(2) + + + END + + +c=============================================================================== + diff --git a/geant4/LEMuSR/YIELDS/GNUmakefile b/geant4/LEMuSR/YIELDS/GNUmakefile new file mode 100644 index 0000000..49e40cd --- /dev/null +++ b/geant4/LEMuSR/YIELDS/GNUmakefile @@ -0,0 +1,67 @@ +# $Id$ +# -------------------------------------------------------------- +# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98. +# -------------------------------------------------------------- + +name := YIELDS +G4TARGET := $(name) +G4EXLIB := true + +ifndef G4INSTALL + G4INSTALL = ../ +endif + +.PHONY: all +all: lib bin + +include $(G4INSTALL)/config/architecture.gmk + +include $(G4INSTALL)/config/binmake.gmk + +########################### TRIUMF ############################### +#CPPFLAGS += -I$(G4INSTALL)/spintest/triumf/spintest/include + +########################### ROOT ################################# +ifdef ROOTSYS +ifndef G4UI_USE_ROOT +CPPFLAGS += -DG4ANALYSIS_USE_ROOT $(shell $(ROOTSYS)/bin/root-config --cflags) +ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --nonew --glibs) -lMinuit -lHtml +ROOTLIBS := $(filter-out -lNew,$(ROOTLIBS)) +ROOTLIBS := $(filter-out -lThread,$(ROOTLIBS)) +ROOTLIBS := $(filter-out -lpthread,$(ROOTLIBS)) +LDLIBS += $(ROOTLIBS) +endif +endif + + +ifdef ASYM_USE_LEMU +CPPFLAGS += -DASYM_USE_LEMU +endif + +ifdef LEMU_TEST_ASYM +CPPFLAGS += -DLEMU_TEST_ASYM +endif + +ifdef LEMU_TEST_FIELD +CPPFLAGS += -DLEMU_TEST_FIELD +endif + +ifdef LEMU_TEST_CFOIL +CPPFLAGS += -DLEMU_TEST_CFOIL +endif + +ifdef LEMU_TEST_FOCAL_LENGTH +CPPFLAGS += -DLEMU_TEST_FOCAL_LENGTH +endif + +ifdef G4SRVERBOSE +CPPFLAGS += -DG4SRVERBOSE +endif + +ifdef DEBUG_INTERPOLATING_FIELD +CPPFLAGS += -DDEBUG_INTERPOLATING_FIELD +endif + +ifdef NO_CFOIL +CPPFLAGS += -DNO_CFOIL +endif diff --git a/geant4/LEMuSR/YIELDS/a.out b/geant4/LEMuSR/YIELDS/a.out new file mode 100755 index 0000000..c4a1c62 Binary files /dev/null and b/geant4/LEMuSR/YIELDS/a.out differ diff --git a/geant4/LEMuSR/YIELDS/fig.eps b/geant4/LEMuSR/YIELDS/fig.eps new file mode 100644 index 0000000..a574687 --- /dev/null +++ b/geant4/LEMuSR/YIELDS/fig.eps @@ -0,0 +1,768 @@ +%!PS-Adobe-2.0 +%%Title: fig.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Thu Jul 21 10:48:26 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Portrait +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +4088 0 V +1.000 UL +LTb +714 420 M +63 0 V +4025 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 1056 M +4088 0 V +1.000 UL +LTb +714 1056 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.1) Rshow +1.000 UL +LTa +714 1692 M +4088 0 V +1.000 UL +LTb +714 1692 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.2) Rshow +1.000 UL +LTa +714 2328 M +4088 0 V +1.000 UL +LTb +714 2328 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.3) Rshow +1.000 UL +LTa +714 2964 M +4088 0 V +1.000 UL +LTb +714 2964 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.4) Rshow +1.000 UL +LTa +714 3600 M +4088 0 V +1.000 UL +LTb +714 3600 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.5) Rshow +1.000 UL +LTa +714 4236 M +4088 0 V +1.000 UL +LTb +714 4236 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.6) Rshow +1.000 UL +LTa +714 4872 M +4088 0 V +1.000 UL +LTb +714 4872 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.7) Rshow +1.000 UL +LTa +714 5508 M +4088 0 V +1.000 UL +LTb +714 5508 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.8) Rshow +1.000 UL +LTa +714 6144 M +4088 0 V +1.000 UL +LTb +714 6144 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.9) Rshow +1.000 UL +LTa +714 6780 M +4088 0 V +1.000 UL +LTb +714 6780 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 1) Rshow +1.000 UL +LTa +714 420 M +0 6360 V +1.000 UL +LTb +714 420 M +0 63 V +0 6297 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +1643 420 M +0 6360 V +1.000 UL +LTb +1643 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 0.5) Cshow +1.000 UL +LTa +2572 420 M +0 6360 V +1.000 UL +LTb +2572 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 1) Cshow +1.000 UL +LTa +3501 420 M +0 6360 V +1.000 UL +LTb +3501 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 1.5) Cshow +1.000 UL +LTa +4430 420 M +0 6017 V +0 280 R +0 63 V +1.000 UL +LTb +4430 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 2) Cshow +1.000 UL +LTb +714 420 M +4088 0 V +0 6360 V +-4088 0 V +714 420 L +140 3600 M +currentpoint gsave translate 90 rotate 0 0 M +(Yields) Cshow +grestore +2758 70 M +(Energy [keV] in power of 10) Cshow +2758 6990 M +(Muonium production yields in Trigger Detector's Carbon Foil) Cshow +1.000 UP +1.000 UL +LT0 +4151 6647 M +(mu+) Rshow +4235 6647 M +399 0 V +1368 924 M +560 284 V +327 235 V +232 204 V +180 184 V +147 169 V +125 156 V +108 145 V +95 138 V +85 130 V +77 125 V +70 119 V +64 114 V +60 109 V +56 106 V +52 103 V +49 99 V +46 96 V +44 94 V +41 91 V +39 89 V +38 86 V +36 85 V +34 82 V +33 81 V +32 79 V +30 78 V +30 76 V +28 74 V +27 74 V +27 72 V +25 70 V +25 70 V +24 68 V +24 68 V +22 66 V +22 65 V +22 65 V +21 63 V +20 63 V +20 61 V +20 61 V +19 60 V +18 60 V +18 58 V +18 58 V +17 57 V +17 57 V +17 55 V +16 56 V +16 54 V +16 54 V +15 54 V +16 53 V +14 52 V +15 52 V +14 51 V +14 51 V +14 50 V +14 50 V +13 49 V +13 27 V +13 4 V +13 4 V +12 4 V +12 3 V +13 4 V +12 3 V +11 4 V +12 3 V +5 1 V +1368 924 Pls +1928 1208 Pls +2255 1443 Pls +2487 1647 Pls +2667 1831 Pls +2814 2000 Pls +2939 2156 Pls +3047 2301 Pls +3142 2439 Pls +3227 2569 Pls +3304 2694 Pls +3374 2813 Pls +3438 2927 Pls +3498 3036 Pls +3554 3142 Pls +3606 3245 Pls +3655 3344 Pls +3701 3440 Pls +3745 3534 Pls +3786 3625 Pls +3825 3714 Pls +3863 3800 Pls +3899 3885 Pls +3933 3967 Pls +3966 4048 Pls +3998 4127 Pls +4028 4205 Pls +4058 4281 Pls +4086 4355 Pls +4113 4429 Pls +4140 4501 Pls +4165 4571 Pls +4190 4641 Pls +4214 4709 Pls +4238 4777 Pls +4260 4843 Pls +4282 4908 Pls +4304 4973 Pls +4325 5036 Pls +4345 5099 Pls +4365 5160 Pls +4385 5221 Pls +4404 5281 Pls +4422 5341 Pls +4440 5399 Pls +4458 5457 Pls +4475 5514 Pls +4492 5571 Pls +4509 5626 Pls +4525 5682 Pls +4541 5736 Pls +4557 5790 Pls +4572 5844 Pls +4588 5897 Pls +4602 5949 Pls +4617 6001 Pls +4631 6052 Pls +4645 6103 Pls +4659 6153 Pls +4673 6203 Pls +4686 6252 Pls +4699 6279 Pls +4712 6283 Pls +4725 6287 Pls +4737 6291 Pls +4749 6294 Pls +4762 6298 Pls +4774 6301 Pls +4785 6305 Pls +4797 6308 Pls +4434 6647 Pls +1.000 UP +1.000 UL +LT2 +4151 6507 M +(mu0) Rshow +4235 6507 M +399 0 V +1368 6017 M +560 -282 V +327 -209 V +232 -179 V +180 -161 V +147 -149 V +125 -139 V +108 -132 V +95 -124 V +85 -120 V +77 -114 V +70 -110 V +64 -107 V +60 -102 V +56 -100 V +52 -97 V +49 -94 V +46 -91 V +44 -89 V +41 -87 V +39 -86 V +38 -83 V +36 -81 V +34 -80 V +33 -78 V +32 -77 V +30 -75 V +30 -74 V +28 -73 V +27 -71 V +27 -71 V +25 -69 V +25 -68 V +24 -67 V +24 -66 V +22 -65 V +22 -65 V +22 -63 V +21 -63 V +20 -61 V +20 -61 V +20 -61 V +19 -59 V +18 -59 V +18 -58 V +18 -57 V +17 -57 V +17 -56 V +17 -55 V +16 -55 V +16 -55 V +16 -53 V +15 -54 V +16 -52 V +14 -52 V +15 -52 V +14 -51 V +14 -51 V +14 -50 V +14 -50 V +13 -49 V +13 -27 V +13 -4 V +13 -4 V +12 -4 V +12 -3 V +13 -4 V +12 -4 V +11 -3 V +12 -3 V +5 -2 V +1368 6017 Star +1928 5735 Star +2255 5526 Star +2487 5347 Star +2667 5186 Star +2814 5037 Star +2939 4898 Star +3047 4766 Star +3142 4642 Star +3227 4522 Star +3304 4408 Star +3374 4298 Star +3438 4191 Star +3498 4089 Star +3554 3989 Star +3606 3892 Star +3655 3798 Star +3701 3707 Star +3745 3618 Star +3786 3531 Star +3825 3445 Star +3863 3362 Star +3899 3281 Star +3933 3201 Star +3966 3123 Star +3998 3046 Star +4028 2971 Star +4058 2897 Star +4086 2824 Star +4113 2753 Star +4140 2682 Star +4165 2613 Star +4190 2545 Star +4214 2478 Star +4238 2412 Star +4260 2347 Star +4282 2282 Star +4304 2219 Star +4325 2156 Star +4345 2095 Star +4365 2034 Star +4385 1973 Star +4404 1914 Star +4422 1855 Star +4440 1797 Star +4458 1740 Star +4475 1683 Star +4492 1627 Star +4509 1572 Star +4525 1517 Star +4541 1462 Star +4557 1409 Star +4572 1355 Star +4588 1303 Star +4602 1251 Star +4617 1199 Star +4631 1148 Star +4645 1097 Star +4659 1047 Star +4673 997 Star +4686 948 Star +4699 921 Star +4712 917 Star +4725 913 Star +4737 909 Star +4749 906 Star +4762 902 Star +4774 898 Star +4785 895 Star +4797 892 Star +4434 6507 Star +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/YIELDS/fig.gif b/geant4/LEMuSR/YIELDS/fig.gif new file mode 100644 index 0000000..73da2e9 --- /dev/null +++ b/geant4/LEMuSR/YIELDS/fig.gif @@ -0,0 +1,768 @@ +%!PS-Adobe-2.0 +%%Title: fig.gif +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Thu Jul 21 10:48:48 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Portrait +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +4088 0 V +1.000 UL +LTb +714 420 M +63 0 V +4025 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 1056 M +4088 0 V +1.000 UL +LTb +714 1056 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.1) Rshow +1.000 UL +LTa +714 1692 M +4088 0 V +1.000 UL +LTb +714 1692 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.2) Rshow +1.000 UL +LTa +714 2328 M +4088 0 V +1.000 UL +LTb +714 2328 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.3) Rshow +1.000 UL +LTa +714 2964 M +4088 0 V +1.000 UL +LTb +714 2964 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.4) Rshow +1.000 UL +LTa +714 3600 M +4088 0 V +1.000 UL +LTb +714 3600 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.5) Rshow +1.000 UL +LTa +714 4236 M +4088 0 V +1.000 UL +LTb +714 4236 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.6) Rshow +1.000 UL +LTa +714 4872 M +4088 0 V +1.000 UL +LTb +714 4872 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.7) Rshow +1.000 UL +LTa +714 5508 M +4088 0 V +1.000 UL +LTb +714 5508 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.8) Rshow +1.000 UL +LTa +714 6144 M +4088 0 V +1.000 UL +LTb +714 6144 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.9) Rshow +1.000 UL +LTa +714 6780 M +4088 0 V +1.000 UL +LTb +714 6780 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 1) Rshow +1.000 UL +LTa +714 420 M +0 6360 V +1.000 UL +LTb +714 420 M +0 63 V +0 6297 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +1643 420 M +0 6360 V +1.000 UL +LTb +1643 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 0.5) Cshow +1.000 UL +LTa +2572 420 M +0 6360 V +1.000 UL +LTb +2572 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 1) Cshow +1.000 UL +LTa +3501 420 M +0 6360 V +1.000 UL +LTb +3501 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 1.5) Cshow +1.000 UL +LTa +4430 420 M +0 6017 V +0 280 R +0 63 V +1.000 UL +LTb +4430 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 2) Cshow +1.000 UL +LTb +714 420 M +4088 0 V +0 6360 V +-4088 0 V +714 420 L +140 3600 M +currentpoint gsave translate 90 rotate 0 0 M +(Yields) Cshow +grestore +2758 70 M +(Energy [keV] in power of 10) Cshow +2758 6990 M +(Muonium production yields in Trigger Detector's Carbon Foil) Cshow +1.000 UP +1.000 UL +LT0 +4151 6647 M +(mu+) Rshow +4235 6647 M +399 0 V +1368 924 M +560 284 V +327 235 V +232 204 V +180 184 V +147 169 V +125 156 V +108 145 V +95 138 V +85 130 V +77 125 V +70 119 V +64 114 V +60 109 V +56 106 V +52 103 V +49 99 V +46 96 V +44 94 V +41 91 V +39 89 V +38 86 V +36 85 V +34 82 V +33 81 V +32 79 V +30 78 V +30 76 V +28 74 V +27 74 V +27 72 V +25 70 V +25 70 V +24 68 V +24 68 V +22 66 V +22 65 V +22 65 V +21 63 V +20 63 V +20 61 V +20 61 V +19 60 V +18 60 V +18 58 V +18 58 V +17 57 V +17 57 V +17 55 V +16 56 V +16 54 V +16 54 V +15 54 V +16 53 V +14 52 V +15 52 V +14 51 V +14 51 V +14 50 V +14 50 V +13 49 V +13 27 V +13 4 V +13 4 V +12 4 V +12 3 V +13 4 V +12 3 V +11 4 V +12 3 V +5 1 V +1368 924 Pls +1928 1208 Pls +2255 1443 Pls +2487 1647 Pls +2667 1831 Pls +2814 2000 Pls +2939 2156 Pls +3047 2301 Pls +3142 2439 Pls +3227 2569 Pls +3304 2694 Pls +3374 2813 Pls +3438 2927 Pls +3498 3036 Pls +3554 3142 Pls +3606 3245 Pls +3655 3344 Pls +3701 3440 Pls +3745 3534 Pls +3786 3625 Pls +3825 3714 Pls +3863 3800 Pls +3899 3885 Pls +3933 3967 Pls +3966 4048 Pls +3998 4127 Pls +4028 4205 Pls +4058 4281 Pls +4086 4355 Pls +4113 4429 Pls +4140 4501 Pls +4165 4571 Pls +4190 4641 Pls +4214 4709 Pls +4238 4777 Pls +4260 4843 Pls +4282 4908 Pls +4304 4973 Pls +4325 5036 Pls +4345 5099 Pls +4365 5160 Pls +4385 5221 Pls +4404 5281 Pls +4422 5341 Pls +4440 5399 Pls +4458 5457 Pls +4475 5514 Pls +4492 5571 Pls +4509 5626 Pls +4525 5682 Pls +4541 5736 Pls +4557 5790 Pls +4572 5844 Pls +4588 5897 Pls +4602 5949 Pls +4617 6001 Pls +4631 6052 Pls +4645 6103 Pls +4659 6153 Pls +4673 6203 Pls +4686 6252 Pls +4699 6279 Pls +4712 6283 Pls +4725 6287 Pls +4737 6291 Pls +4749 6294 Pls +4762 6298 Pls +4774 6301 Pls +4785 6305 Pls +4797 6308 Pls +4434 6647 Pls +1.000 UP +1.000 UL +LT2 +4151 6507 M +(mu0) Rshow +4235 6507 M +399 0 V +1368 6017 M +560 -282 V +327 -209 V +232 -179 V +180 -161 V +147 -149 V +125 -139 V +108 -132 V +95 -124 V +85 -120 V +77 -114 V +70 -110 V +64 -107 V +60 -102 V +56 -100 V +52 -97 V +49 -94 V +46 -91 V +44 -89 V +41 -87 V +39 -86 V +38 -83 V +36 -81 V +34 -80 V +33 -78 V +32 -77 V +30 -75 V +30 -74 V +28 -73 V +27 -71 V +27 -71 V +25 -69 V +25 -68 V +24 -67 V +24 -66 V +22 -65 V +22 -65 V +22 -63 V +21 -63 V +20 -61 V +20 -61 V +20 -61 V +19 -59 V +18 -59 V +18 -58 V +18 -57 V +17 -57 V +17 -56 V +17 -55 V +16 -55 V +16 -55 V +16 -53 V +15 -54 V +16 -52 V +14 -52 V +15 -52 V +14 -51 V +14 -51 V +14 -50 V +14 -50 V +13 -49 V +13 -27 V +13 -4 V +13 -4 V +12 -4 V +12 -3 V +13 -4 V +12 -4 V +11 -3 V +12 -3 V +5 -2 V +1368 6017 Star +1928 5735 Star +2255 5526 Star +2487 5347 Star +2667 5186 Star +2814 5037 Star +2939 4898 Star +3047 4766 Star +3142 4642 Star +3227 4522 Star +3304 4408 Star +3374 4298 Star +3438 4191 Star +3498 4089 Star +3554 3989 Star +3606 3892 Star +3655 3798 Star +3701 3707 Star +3745 3618 Star +3786 3531 Star +3825 3445 Star +3863 3362 Star +3899 3281 Star +3933 3201 Star +3966 3123 Star +3998 3046 Star +4028 2971 Star +4058 2897 Star +4086 2824 Star +4113 2753 Star +4140 2682 Star +4165 2613 Star +4190 2545 Star +4214 2478 Star +4238 2412 Star +4260 2347 Star +4282 2282 Star +4304 2219 Star +4325 2156 Star +4345 2095 Star +4365 2034 Star +4385 1973 Star +4404 1914 Star +4422 1855 Star +4440 1797 Star +4458 1740 Star +4475 1683 Star +4492 1627 Star +4509 1572 Star +4525 1517 Star +4541 1462 Star +4557 1409 Star +4572 1355 Star +4588 1303 Star +4602 1251 Star +4617 1199 Star +4631 1148 Star +4645 1097 Star +4659 1047 Star +4673 997 Star +4686 948 Star +4699 921 Star +4712 917 Star +4725 913 Star +4737 909 Star +4749 906 Star +4762 902 Star +4774 898 Star +4785 895 Star +4797 892 Star +4434 6507 Star +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/YIELDS/fig.pdf b/geant4/LEMuSR/YIELDS/fig.pdf new file mode 100644 index 0000000..9a85997 Binary files /dev/null and b/geant4/LEMuSR/YIELDS/fig.pdf differ diff --git a/geant4/LEMuSR/YIELDS/gonin b/geant4/LEMuSR/YIELDS/gonin new file mode 100755 index 0000000..585bbfb Binary files /dev/null and b/geant4/LEMuSR/YIELDS/gonin differ diff --git a/geant4/LEMuSR/YIELDS/gonin$ b/geant4/LEMuSR/YIELDS/gonin$ new file mode 100755 index 0000000..0f19d1b Binary files /dev/null and b/geant4/LEMuSR/YIELDS/gonin$ differ diff --git a/geant4/LEMuSR/YIELDS/gonin.cc b/geant4/LEMuSR/YIELDS/gonin.cc new file mode 100644 index 0000000..ebec310 --- /dev/null +++ b/geant4/LEMuSR/YIELDS/gonin.cc @@ -0,0 +1,91 @@ +#include +#include +#include +#include +#include +#include +#include +#include "yields.h" + +using namespace std; + +void Draw(double mass); +std::string flt2string( double& number); + + Yields Gonin; + + +int main() +{ + double Energy, Mass; + double yvector[3]; + // Yields Gonin; + + /* std::cout<<"Enter energy in keV: "; + std::cin>>Energy; + + std::cout<<"Enter mass in MeV/c²: "; + std::cin>>Mass; + + + + // calculate yields + //Yields(Energy,Mass*1000); + + // std::cout<<"Yield+: "<< Yield_plus< +#include +#include +#include +#include +#include +#include +#include "yields.h" + +using namespace std; + +void Draw(double mass); +std::string flt2string( double& number); + + Yields Gonin; + + +int main() +{ + double Energy, Mass; + double yvector[3]; + // Yields Gonin; + + std::cout<<"Enter energy in keV: "; + std::cin>>Energy; + + std::cout<<"Enter mass in MeV/c²: "; + std::cin>>Mass; + + + + // calculate yields + //Yields(Energy,Mass*1000); + + // std::cout<<"Yield+: "<< Yield_plus< +#include +#include +#include + +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Die Funktion sowie die Parameter sind uebernommen aus: + + M.Gonin, R.Kallenbach, P.Bochsler: 'Charge exchange of hydrogen atoms + in carbon foils at 0.4 - 120 keV', Rev.Sci.Instrum. 65 (3), March 1994 + + +fIRST IMPLEMENTATION BY ANLSEM,H. IN FORTRAN +C++ CONVERSION T.K.PARAISO 04-2005 +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +Yields::Yields(){;} +Yields::~Yields(){;} + +void Yields::GetYields( + double E, // kinetische Energie in keV + double masse,// in keV / c**2 + double yvector[3])// pointer to yields table +{ + + // YIELDS FUNCTIONS PRAMETERS + double a_zero,a_minus; + double k_Fermi,k_zero,k_minus; + double zwo_k_Fermi; + double k_Fermi_Quad,k_zero_Quad,k_minus_Quad; + double vc_minus,vc_plus,v_Bohr,v_rel; + + + // YIELDS FUNCTIONS PARAMETERs VALUES + a_zero = 0.953 ; + a_minus = 0.029 ; + k_Fermi = 1.178 ;// ! [v_Bohr] + k_Fermi_Quad = k_Fermi * k_Fermi ; + zwo_k_Fermi = 2. * k_Fermi ; + k_zero = 0.991*k_Fermi ; //! [v_Bohr] + k_zero_Quad = k_zero * k_zero ; + k_minus = 0.989*k_Fermi ; // [v_Bohr] + k_minus_Quad = k_minus * k_minus ; + vc_minus = 0.284 ; + vc_plus = 0.193 ; // [v_Bohr] + v_Bohr = 7.2974E-3 ; // [c] + + + + + // ABORT IF ENERGY NEGaTIVE------------------------------------- + if (E < 0) + { + std::cout<< "Error in method ''Yields'':"< ABORT!"< exp(-vc_minus/v_rel)) Yield_minus=exp(-vc_minus/v_rel); + if(Yield_plus > exp(-vc_plus/v_rel)) Yield_plus=exp(-vc_plus/v_rel); + + Yield_zero = 1. - (Yield_minus + Yield_plus); + + yvector[0]=Yield_plus; + yvector[1]=Yield_zero; + yvector[2]=Yield_minus; + + + + +} + diff --git a/geant4/LEMuSR/YIELDS/yields.cc~ b/geant4/LEMuSR/YIELDS/yields.cc~ new file mode 100644 index 0000000..285e30d --- /dev/null +++ b/geant4/LEMuSR/YIELDS/yields.cc~ @@ -0,0 +1,103 @@ +#include "yields.h" +#include +#include +#include +#include + +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Die Funktion sowie die Parameter sind uebernommen aus: + + M.Gonin, R.Kallenbach, P.Bochsler: 'Charge exchange of hydrogen atoms + in carbon foils at 0.4 - 120 keV', Rev.Sci.Instrum. 65 (3), March 1994 + + +fIRST IMPLEMENTATION BY ANLSEM,H. IN FORTRAN +C++ CONVERSION T.K.PARAISO 04-2005 +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +Yields::Yields(){;} +Yields::~Yields(){;} + +void Yields::GetYields( + double E, // kinetische Energie in keV + double masse,// in keV / c**2 + double yvector[3])// pointer to yields table +{ + + // YIELDS FUNCTIONS PRAMETERS + double a_zero,a_minus; + double k_Fermi,k_zero,k_minus; + double zwo_k_Fermi; + double k_Fermi_Quad,k_zero_Quad,k_minus_Quad; + double vc_minus,vc_plus,v_Bohr,v_rel; + + + // YIELDS FUNCTIONS PARAMETERs VALUES + a_zero = 0.953, a_minus = 0.029 ; + k_Fermi = 1.178 ;// ! [v_Bohr] + k_Fermi_Quad = k_Fermi * k_Fermi ; + zwo_k_Fermi = 2. * k_Fermi ; + k_zero = 0.991*k_Fermi ; //! [v_Bohr] + k_zero_Quad = k_zero * k_zero ; + k_minus = 0.989*k_Fermi ; // [v_Bohr] + k_minus_Quad = k_minus * k_minus ; + vc_minus = 0.284, vc_plus = 0.193 ; // [v_Bohr] + v_Bohr = 7.2974E-3 ; // [c] + + + + + // ABORT IF ENERGY NEGaTIVE------------------------------------- + if (E < 0) + { + std::cout<< "Error in method ''Yields'':"< ABORT!"<1) Yield_minus=1; + if(Yield_minus<0) Yield_minus=0; + if(Yield_zero>1) Yield_zero=1; + if(Yield_zero<0) Yield_zero=0; + if(Yield_plus>1) Yield_plus=1; + if(Yield_plus<0) Yield_plus=0; + + yvector[0]=Yield_plus; + yvector[1]=Yield_zero; + yvector[2]=Yield_minus; + + + + +} + diff --git a/geant4/LEMuSR/YIELDS/yields.eps b/geant4/LEMuSR/YIELDS/yields.eps new file mode 100644 index 0000000..72863c8 --- /dev/null +++ b/geant4/LEMuSR/YIELDS/yields.eps @@ -0,0 +1,274 @@ +%!PS-Adobe-1.0 +%%BoundingBox: 0 0 720 504 +%%BoundingBox: 0 0 595 842 +%%Creator: KDE 3.1.3-6.10 Red Hat +%%CreationDate: Thu Jul 21 10:56:35 2005 +%%Orientation: Portrait +%%Pages: 1 +%%DocumentFonts: + +%%EndComments +%%BeginProlog +% Prolog copyright 1994-2003 Trolltech. You may copy this prolog in any way +% that is directly related to this document. For other use of this prolog, +% see your licensing agreement for Qt. +/d/def load def/D{bind d}bind d/d2{dup dup}D/B{0 d2}D/W{255 d2}D/ED{exch d}D +/D0{0 ED}D/LT{lineto}D/MT{moveto}D/S{stroke}D/F{setfont}D/SW{setlinewidth}D +/CP{closepath}D/RL{rlineto}D/NP{newpath}D/CM{currentmatrix}D/SM{setmatrix}D +/TR{translate}D/SD{setdash}D/SC{aload pop setrgbcolor}D/CR{currentfile read +pop}D/i{index}D/bs{bitshift}D/scs{setcolorspace}D/DB{dict dup begin}D/DE{end +d}D/ie{ifelse}D/sp{astore pop}D/BSt 0 d/LWi 1 d/PSt 1 d/Cx 0 d/Cy 0 d/WFi +false d/OMo false d/BCol[1 1 1]d/PCol[0 0 0]d/BkCol[1 1 1]d/BDArr[0.94 0.88 +0.63 0.50 0.37 0.12 0.06]d/defM matrix d/nS 0 d/GPS{PSt 1 ge PSt 5 le and{{ +LArr PSt 1 sub 2 mul get}{LArr PSt 2 mul 1 sub get}ie}{[]}ie}D/QS{PSt 0 ne{ +LWi SW gsave PCol SC true GPS 0 SD S OMo PSt 1 ne and grestore{BkCol SC +false GPS dup 0 get SD S}if}if}D/r28{{CR dup 32 gt{exit}if pop}loop 3{CR} +repeat 0 4{7 bs exch dup 128 gt{84 sub}if 42 sub 127 and add}repeat}D/rA 0 d +/rL 0 d/rB{rL 0 eq{/rA r28 d/rL 28 d}if dup rL gt{rA exch rL sub rL exch/rA +0 d/rL 0 d rB exch bs add}{dup rA 16#fffffff 3 -1 roll bs not and exch dup +rL exch sub/rL ED neg rA exch bs/rA ED}ie}D/uc{/rL 0 d 0{dup 2 i length ge{ +exit}if 1 rB 1 eq{3 rB dup 3 ge{1 add dup rB 1 i 5 ge{1 i 6 ge{1 i 7 ge{1 i +8 ge{128 add}if 64 add}if 32 add}if 16 add}if 3 add exch pop}if 3 add exch +10 rB 1 add{dup 3 i lt{dup}{2 i}ie 4 i 3 i 3 i sub 2 i getinterval 5 i 4 i 3 +-1 roll putinterval dup 4 -1 roll add 3 1 roll 4 -1 roll exch sub dup 0 eq{ +exit}if 3 1 roll}loop pop pop}{3 rB 1 add{2 copy 8 rB put 1 add}repeat}ie} +loop pop}D/sl D0/QCIgray D0/QCIcolor D0/QCIindex D0/QCI{/colorimage where{ +pop false 3 colorimage}{exec/QCIcolor ED/QCIgray QCIcolor length 3 idiv +string d 0 1 QCIcolor length 3 idiv 1 sub{/QCIindex ED/x QCIindex 3 mul d +QCIgray QCIindex QCIcolor x get 0.30 mul QCIcolor x 1 add get 0.59 mul +QCIcolor x 2 add get 0.11 mul add add cvi put}for QCIgray image}ie}D/di{ +gsave TR dup false ne{/languagelevel where{pop languagelevel 3 ge}{false}ie} +{false}ie{/ma ED 8 eq{/dc[0 1]d/DeviceGray}{/dc[0 1 0 1 0 1]d/DeviceRGB}ie +scs/im ED/mt ED/h ED/w ED/id 7 DB/ImageType 1 d/Width w d/Height h d +/ImageMatrix mt d/DataSource im d/BitsPerComponent 8 d/Decode dc d DE/md 7 +DB/ImageType 1 d/Width w d/Height h d/ImageMatrix mt d/DataSource ma d +/BitsPerComponent 1 d/Decode[0 1]d DE 4 DB/ImageType 3 d/DataDict id d +/MaskDict md d/InterleaveType 3 d end image}{pop dup 1 eq{pop false 3 1 roll +imagemask}{8 4 1 roll 8 eq{image}{QCI}ie}ie}ie grestore}d/BF{gsave BSt 1 eq{ +BCol SC WFi{fill}{eofill}ie}if BSt 2 ge BSt 8 le and{BDArr BSt 2 sub get/sc +ED BCol{1. exch sub sc mul 1. exch sub}forall 3 array astore SC WFi{fill}{ +eofill}ie}if BSt 9 ge BSt 14 le and{WFi{clip}{eoclip}ie defM SM pathbbox 3 i +3 i TR 4 2 roll 3 2 roll exch sub/h ED sub/w ED OMo{NP 0 0 MT 0 h RL w 0 RL +0 h neg RL CP BkCol SC fill}if BCol SC 0.3 SW NP BSt 9 eq BSt 11 eq or{0 4 h +{dup 0 exch MT w exch LT}for}if BSt 10 eq BSt 11 eq or{0 4 w{dup 0 MT h LT} +for}if BSt 12 eq BSt 14 eq or{w h gt{0 6 w h add{dup 0 MT h sub h LT}for}{0 +6 w h add{dup 0 exch MT w sub w exch LT}for}ie}if BSt 13 eq BSt 14 eq or{w h +gt{0 6 w h add{dup h MT h sub 0 LT}for}{0 6 w h add{dup w exch MT w sub 0 +exch LT}for}ie}if S}if BSt 24 eq{}if grestore}D/mat matrix d/ang1 D0/ang2 D0 +/w D0/h D0/x D0/y D0/ARC{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED mat CM pop x w +2 div add y h 2 div add TR 1 h w div neg scale ang2 0 ge{0 0 w 2 div ang1 +ang1 ang2 add arc}{0 0 w 2 div ang1 ang1 ang2 add arcn}ie mat SM}D/C D0/P{NP +MT 0.5 0.5 rmoveto 0 -1 RL -1 0 RL 0 1 RL CP PCol SC fill}D/M{/Cy ED/Cx ED}D +/L{NP Cx Cy MT/Cy ED/Cx ED Cx Cy LT QS}D/DL{NP MT LT QS}D/HL{1 i DL}D/VL{2 i +exch DL}D/R{/h ED/w ED/y ED/x ED NP x y MT 0 h RL w 0 RL 0 h neg RL CP BF QS +}D/ACR{/h ED/w ED/y ED/x ED x y MT 0 h RL w 0 RL 0 h neg RL CP}D/xr D0/yr D0 +/rx D0/ry D0/rx2 D0/ry2 D0/RR{/yr ED/xr ED/h ED/w ED/y ED/x ED xr 0 le yr 0 +le or{x y w h R}{xr 100 ge yr 100 ge or{x y w h E}{/rx xr w mul 200 div d/ry +yr h mul 200 div d/rx2 rx 2 mul d/ry2 ry 2 mul d NP x rx add y MT x y rx2 +ry2 180 -90 x y h add ry2 sub rx2 ry2 270 -90 x w add rx2 sub y h add ry2 +sub rx2 ry2 0 -90 x w add rx2 sub y rx2 ry2 90 -90 ARC ARC ARC ARC CP BF QS} +ie}ie}D/E{/h ED/w ED/y ED/x ED mat CM pop x w 2 div add y h 2 div add TR 1 h +w div scale NP 0 0 w 2 div 0 360 arc mat SM BF QS}D/A{16 div exch 16 div +exch NP ARC QS}D/PIE{/ang2 ED/ang1 ED/h ED/w ED/y ED/x ED NP x w 2 div add y +h 2 div add MT x y w h ang1 16 div ang2 16 div ARC CP BF QS}D/CH{16 div exch +16 div exch NP ARC CP BF QS}D/BZ{curveto QS}D/CRGB{255 div 3 1 roll 255 div +3 1 roll 255 div 3 1 roll}D/BC{CRGB BkCol sp}D/BR{CRGB BCol sp/BSt ED}D/WB{1 +W BR}D/NB{0 B BR}D/PE{setlinejoin setlinecap CRGB PCol sp/LWi ED/PSt ED LWi +0 eq{0.25/LWi ED}if}D/P1{1 0 5 2 roll 0 0 PE}D/ST{defM SM concat}D/MF{true +exch true exch{exch pop exch pop dup 0 get dup findfont dup/FontName get 3 +-1 roll eq{exit}if}forall exch dup 1 get/fxscale ED 2 get/fslant ED exch +/fencoding ED[fxscale 0 fslant 1 0 0]makefont fencoding false eq{}{dup +maxlength dict begin{1 i/FID ne{def}{pop pop}ifelse}forall/Encoding +fencoding d currentdict end}ie definefont pop}D/MFEmb{findfont dup length +dict begin{1 i/FID ne{d}{pop pop}ifelse}forall/Encoding ED currentdict end +definefont pop}D/DF{findfont/fs 3 -1 roll d[fs 0 0 fs -1 mul 0 0]makefont d} +D/ty 0 d/Y{/ty ED}D/Tl{gsave SW PCol SC NP 1 i exch MT 1 i 0 RL S grestore}D +/T{PCol SC ty MT 1 i dup length 2 div exch stringwidth pop 3 -1 roll exch +sub exch div exch 0 exch ashow}D/QI{/C save d pageinit/Cx 0 d/Cy 0 d/OMo +false d}D/QP{C restore showpage}D/SPD{/setpagedevice where{1 DB 3 1 roll d +end setpagedevice}{pop pop}ie}D/SV{BSt LWi PSt Cx Cy WFi OMo BCol PCol BkCol +/nS nS 1 add d gsave}D/RS{nS 0 gt{grestore/BkCol ED/PCol ED/BCol ED/OMo ED +/WFi ED/Cy ED/Cx ED/PSt ED/LWi ED/BSt ED/nS nS 1 sub d}if}D/CLSTART{/clipTmp +matrix CM d defM SM NP}D/CLEND{clip NP clipTmp SM}D/CLO{grestore gsave defM +SM}D + +/LArr[ [] [] [ 11.944 3.583 ] [ 3.583 11.944 ] [ 3.583 3.583 ] [ 3.583 3.583 ] [ 5.972 3.583 3.583 3.583 ] [ 3.583 5.972 3.583 3.583 ] [ 5.972 3.583 3.583 3.583 3.583 ] [ 3.583 5.972 3.583 3.583 3.583 3.583 ] ] d +/pageinit { +36 23.4419 translate +% 185*281mm (portrait) +0 795.349 translate 0.837209 -0.837209 scale/defM matrix CM d } d +%%EndProlog +%%BeginSetup +%%EndSetup +%%Page: 1 1 +%%BeginPageSetup +QI +%%EndPageSetup +[1 0 0 1 -36 316]ST +B P1 +NB +W BC +/sl 60480 string uc +Þýù1¾õ½¼íýúÜý÷»ýñùüåõûÍíùIÝõ½¼íýúÜý÷»ýñùüåõûÍíùIÝõ½¼íýúÜý÷»ýñùüåõûÍíùIÝõ½¼»6 +E,*¾Á1¶X.çÙLðǶÃ-Q>îî5X´Þ/*â@5åÞ:×=â=@å1;ËSÚMÈ-UÆÜÑüÌåPH»C×L´;ÆV9ÐDÁºåð,¸2F3¿¸¾+À-?¶³/AHîZ4ÌFà+çÛëÂ=˹¶5AÄîLIìîÞßLFØß±ù¶Ñ<Õ±ïòMìZßO±ÚUÀ=N·@>Å +ºðÈ:ìâM8ò¶>01*îÊF8;àùÀ¾5è¸L*19î*äìöêG/ÚæÁUÔ¹N.ÅEïVWÍëà¿÷ÛDÆ51¶Ò2õ0CÍåH½Å-ض +/µÁîXWÌÃÞ7FF6ÆM+BP»0Iå³ñP6X7ßGLúW5¶ÎÅ»ï×Aò×,îX;0/ðýê=ʶä11±î*>X>ßGÐFØÄ-Þ¶T2Q +0ï8¼Ìéä-úê*¾-2¶,,µZîÞý8²ÞO/FçÁES¶O.õ½÷ü@X¿ï?óÛTÂÁê¶Ô0µúï²@ÌGÞ/9FTÂES·;,1;ñü± +ÍKãWìºÎÍ»++QÜõè*X;Y¶ÞëåÜêÀ;ÀEöö-QÄïî@X>àS8ÚSÂÉEºä+µIE¿+>9ÚâÀEä¶Õ.QÆðVRXÈM4Ú +·¹+Õäð08XÚß;ݺY2¶,±1L¶,ÎJîæâÌ:YËÞÓ4ÚZرS¶Â11úôX=ìößÛWÚRÂM3·¸;ALî,2ÌÓßGLFÇÀU1 +¶ð8µÖîâMÌOãÛØÚ6¿Uµ¶>8õÆñèÄÌ×àCëFÁÁUÁ÷K1ZKE¹óùÏÂÉ1öü7ZE¼ê8ÍGÂBǶð*í½*Ô±ÆGà×ñ +21<ïâ+Üý+ºýñùüåõûÍíùIÝõ½¼íýúÜý÷»ýñùüåõûÍíùIÝPÆ1*îûÑY=å0*öüIÙÉEùû½´MÉôùQÝXÔËõ +ý×ëºEåH5*ºý*æ1úÖçåôϲµ0/úYEøüIùû½´EËëùýêÚ°Ð5åôñ»ô¼XЯÈòû½ôàXЯÈòû½ôàXðûÝKIJ¶ +ÝÕýíÙÏõý×ëºM9ä±I°Ä¾U½á±½âľUµ*:@ÎJî¾/аÁõý×7ô×10*ú½OÍû;CðÀ°Ñ÷V¶?O*ú-Íû;Eðú±± +îçÑ´æ4ÒøüIEýåH;¿ÊêôÅâÆÑÍ/ÕÜÎåüÆ7·õ×/*µVÎÓRóû½´EÑTÅ@çÑWʼýêQÙ;íý±Ù÷ÄHÊå¼Ñ6 ++Q,*ÜÌåüÐ7CÊ7,öüIÙ¿Iùಱ÷¿úàÙíIùO°.F·-*¯+/,Q6:ÉCFKÀYï×Y°Mè¯á*¾ýVI¹2ÚCRóû½´´Í +»¯*Ǻ´ïóG,F:¾ÑBö2HùO°N°Í»Ì0õýøâ+æÓUüU*øû±ÝâÄFýêE=Æá6XÎõãáH3¾õý×Wò׿×ñ×3·ô3@ú +4ÍûÑæÜèë/ÐôÅ÷V¶ó,*ðÄÁËÜN +UPÞüPùÛÊ,Ú4+ÆHÀù»û±Í¾Ó¿´ÙìæDÑÄXÛ¸³+¶ÖçɲÊ/ú.Í»ÏØ·ÓçØEЯ´>×Ò¿U1*:·FVÆI,*L+8SÞ76êÅAD:;ð,ëµð-ðÈýêC¹ú·ÑåÜRY²6ôF8+¸ðâÇI +°M3Oë-ûê-ÒûO´>Çå0æä91E»ÇÃøLÁóà/æ0-F:¾Ý<*îè/*º?Íë/7+Qt°Q*HÅ7Û0W*:û㼹ͻ¿Øîâ9× +ÏÁÍ?ÕX»AÍë5ËG,ö?L>ÇåÄ*ú@Íë47CË/Q¼Æ7Ûàê-*öVI¹Bù4²ýÆåÄæìKMøû±ÙÀ±å°É±íÊôù¶*¶?JÙ +ÃVܯHÙSD°JùÃêRZ@ÚØÁÄú¾ÍG-BÑûEH5XG*¾1ñ×GÁ;7-ØGð×;ØÛâð7ñ×ËÑ;òâÇ=ÛÐ;ëï×+ØA´òû¼ô +3+¾=;*¿*IßÄÞÓ-*¶·MÍâ±¹2MÞÇ×ê4ëÍ:*îT´M׺ẴE³âÎôUÖÏMÍÛÁĺÆÍ/QX*JÁ²N=º´¾ôë7û< +ÍëO63ÉG+ö2*:Bùà±ÙÆãEä±ESMè°ù+²ùàÄÞÓ-*¶ºMíõ±1±½À7¿U;ØCêæ5÷êüà2¶Ð?°Ù/HEJÙÕVܯH +ÙåD°ùÐë5E4Ê»ò×¹æÆ1ø×Þý7æ0.VBµEàÄÞÓ-*ÆíÄHÃå´Fľ=;*12Î×-*XÃæ´AɵÊåôÚÄÊãÀ=UôêÄÖ +ÏæV¶?í7»ÝÍGÐÛ°å´Ãå@+NºMÍß±Ù8MÞÇ-*æèä+Õ8*J¹×ºáº´í³.F3Ðë>7×áåÄæP¼MÝõ±á°M²AºØëî +×+Ø·íæ¹öêìáÆ<ëÌ0¾ÞêÑÍëL@íBÍëÃ7KQÌFç?7×ÓãÜ*¾³êæùûê@ÜϾêÙÊë6Í/*,*8OÞÇ/61êÅAÜ.L +Ö=QúI3/R,æÏ+*ÕT*¸Äã1ZÍKL5»´¹´âÆ@Fç=7×Êå0ä0+VæÄôò×APùÈ-XãJU0°áºÔ÷½ðâÇXçÆËZ´/Þ +д²UÍ»>3Õ°ù2/ÜÒ-Âä8+²RäÂâHåêÛRòäHù²0øâ*ø±MP±ßÇHçÆËºÔÚ¸³YEȯ*%%% +d +720 84[1 0 0 1 0 0]sl 8 false 0 84 di +/sl 60480 string uc +Þ½Ø***ì:ÞZÞ3.FÞ¾-+B?öD4Z+@ÀQ*FïýN>J¹0ÆÛ¸/ÞÓO³à¿**ýÙ+¾LÂ=ǶA4ùïõ¯2îâ3+òã*¾U1 +*Z±ÓÖÎåÌLÚÆÂÁKìBÍëÕ7KQÌFç?7×¾æXìÄôò×Q:ïå»ô;êôÝ7ÃãôÏå0àÜ;ëÁÎæB¿êÚ6+QT*,+ø8*ÞÓ +4¾Û+ÞPßׯHÙ¹E>÷»ô8¼ÎíIÙÙE,Ì.*²Ò7¿Uç¯ô8Dð±½ô¶´2J9ë2Ú¸**Iè±ÙEM@Î×E@Á¾êêB¹7JæõÍë +ë7+QP*Ð9ëûì2ÚT+Öä7ûêÍ7Ç»J*ýû±ÙGM8Êô0¶¹¿Ê»+*ùNļýê¼í2¶<,î*+DãÄðÚêG²â=ýê-Ð/Qøâ +Äà°ßÓÍó×»Í;Ǹô°Í*XÓ*V?*øû±¹¼MÞÇ-*æ;E,Õ,±Á*´¸Míú±Ãý=KØ7°Mîè/*ºVÍë÷63ÉË´²µø.·X +ôHÌÎíIÙ÷EÐNÙC´>@5Xãù×¹æÆÍü×ÅVE?êìò±Q*üÔåü,63Ê/Q0+DJ*ÞÓºC¹7UæõÍû0DÞ;éXWMÀ°ßÓK¾ËíæðH¹2îR0X*ÞÊÞéR¾äZ;º,Þ3**À*ÔÅ5 +ô4¾UüÅ*@ëC1,*úí0*4;8:Þ;/FÈ¿Q¸*ôâ3ýQ´R5ðèÓ7àL´4ÛÉåÌLFÆÂ¼øêÍÏ;îâ+*êìÄÞÓ5*Öú7ëç +±YJLSÞÅûê<ë7ìæ@@ÙCHE,ùIJ9RÞ76êÅAüBL.åÀ=Ù±/¶Ó,Zý*ÖS¶´Êå¼77SË7ÑÛØ7¿U¿×K*éÝÏõý× +õLù´õó×ËZMûü×½.MÞÇ2¾J¾û**Ú¸**5àÂÅð×ÍNMêÇ=*Ìê3=´Á×¹ÖÏõý×ÕEùJ*Ô±×M*Yì±½3Äê1±é +±U²ù**øû±IÇÄÎ=Q*VR²ßÓ/Wô8´òû½ô³å<ýQ*.,V0±U*üÚåü?63лJ*É2ëÌ2ʼýêåÐ;îN/Þ0@¹.ZM +ÍÛÁ7»ýÍËäÄæÇ=QÔ:2Ã×ýì±ý4ÄÂä8+êÞ±µ²×7*ßëõ×ÝOMÔÞ×îè+*êVMôÞBEWÐÄCÙÄ3â¼×;¶Ð,:½*V +4±ýÊåü?63ÈW,¶ð*縴.JÍֺŽôÍç2¶°NEUå@äXé±õZMíý±±Ù;¶<*:UH¾UéØêQñ×½0MıÁ*<ûê8°÷ +ÌüêYÑ;×´@Ú¸**éêÆGBP8Û**@:6Yö±ßÇ4¾>KE,ÎO´>GF6åì¾BDäêü6Ä.ãH:¾¯¾Ê@¹B¹µÍÛQ.=*ü+² +æåüG7+QL*,+ð÷ê×êÛ»ô8´òû½´ÔE,QT²Ñ÷êÛSô°Iù¾±¹ñ±Ý8ľ=A*:3äÔ*²@ÉíSPEä±½ÍÄNÀ×AL¹í +7×-áòÃɲÊ<û+E4Ì/QÐïê2¾ÌùV*î0*ôû<9ð7T±1²YÑ´Nô++ò@ÉI?ë=.ÖIY²6ô²6»óÃ7?âܯëÁÍÛãã +ìßÄðùêO2áYüê5ÓWÏ»÷×Ùòê9ñ×I2MÞÇ5*¶Å×1,εÔÐíIù3³âGäÜ2ëPæÆGBä/X6<>,VøODPÇDäê@½M +ß×îâOåÄ*²ßåÄãÄ*N/.ÕÒîæ4DäêÜ:ÄÒäÄç@-Êã8äìñ±A9ß1GE0îÆ,ÌãÞ¸ºÏ¯Öѯò³áE4Ã»ÞØ-+îT. +J5ëRX¶**ì*JL¶ï-Iú±YÒÔF·°6*XëÓ±µ÷×·ôMµ»ôMàÆæê;*¶ó**¸2S@õ×;*A±Î¯×ѯò³íE4Ë7/Öì +ãìßÄо-% +d +720 84[1 0 0 1 0 0]sl 8 false 0 168 di +/sl 60480 string uc +ÞýC*J***ö1îX.8°JëÞ+:Ê,Â@ÚÈÁ<¾C¿ÕÏ*»åLü.¾=üÍ*¶/*ÚèMÍDÐÈ6*P50+<+ÀE.¶ó+ŰîM9*F· +R*7>*÷»ô3+â,ÜQRùдEä±ýÐľU;*îN/J5ëæÌHùÀ1È,H÷åÀU¿*òâÇ=7Ð;¹öV*:Êî4SÍ1ß3çÌ.ÚÈÀÄ +CÙÅÂ;îT+J²´3J1;O¼îºÇÒUñÃÄßÌÄÏÕ¼×;·óè>Þ¸C¹1EÈ;8Ôî5ýø±ßÓ2¾îê4¾ÌúêÛÝâåºÁ¿êB¾¯¾3 +WïýNË´2Jé.JXî6J**8*ÞüºÏ¯ÖѯòÓU´òä°í:Þ¿æôË7ë>ÓHóåÜòê,ëôùêÃÒUáÊë1à2¶ó,*ì¯ô¿*òË +ÓNô×*ÞDPدHù1³âÛãH3WïýN1²â86ñN²µý<7ÑN7±´¹Ý;¶?,îÒ±M*,+X>JÝ»ôDJÙ¯äôùZâJ´6ÞëåÔâ +ÔèXͱµ4ß*J+Þ8»Ï¯ÖѯòÓ?´>¿ãHLW·ðâØE°1Ä·ç×ɽÇÄSÐÄCÙý´@Ì7ËG,ÖòÄ꿯ì³ô@îÓ¯äôóZ. +Ú¸+*÷´áÆOXîÚÄäää57ÁG7MYë¯M×Vô¶´/ÞFJÉêR°Íë*A×ô׳ÊJôÉ7¿U3»ôÂôZô¿èôÕåô¾Éúŵ2Ë/ +Õ°±ÀæV¶ÐÏVÜÁIùë²NJôV´¸ÍÛGåìßÄÜýåäö×÷S´³´/ÞHE°1Ä×ç<»Ø8*ÕÐòê*ë:ë@°÷¼üêIÑ;îè+*N +ç×=ØA8Î?´òû½´¸EÈ<±íÇôÌFùáºôÍ߯æV¶?óCÎ=Q̲8ɵòå¼C7CÉË÷±M±Å*ÔÕ;¹ZÊË@SáÊWá.°ÑêR +F´äÈ»>ØÉéÆGBäPÉòçD*Ú4+ÆÝ±U*,+P+DÁãùù±ÝÉľUUîê-ÈWÒë/EøüIEÇ7¿U1*Z3ÃJQÌF×ÒÄ꿯´ +ØNÝô*ÞÓ2¾»²ô2JYֺɽôYçÆÞ곺´ÃôHüZAEøüIEÅ7Ëãìá±ßÇ4¾J¾1õ×Ý.MôL×1FùJ±5³E¿ãùú±½Ç +ÄÖU*XÛØÐOÎ=QÌò¿7»ýÍ»ý×éèê;¾¼úV*:*î4-XßÞ¼ºïÓ;,Ú¸+*É4ëHÎÊû¾ñ.´¹»ô=ç2·óèÐD,ÌÚ2¾ +J¾ãíæÀHùV¯+¾åù×òè?ýÉøêÀê-+æÄÍ»<3Ï×»ò×I.MÞÓ5-Ö@+Î=QÌêV>°Óæ»»ôË.ÚL¿8S¾åÏ;Å>¹Y7 +3ËW,Öú7Wë±+¾ÉÍ»+*ñ,YM+ØÁÃÞÓ<¾ëãLZôèAñJ*¾ýë*J;à+,Ê,ÚDÃûöàAE.¸óèÓûÛ,FS+2.B/Öô* +Væ±í>ôS<µÊåü673ÊG,ÖÞ7?ãÌ*VúÄôò×Õ:;+/º1¿ºÖPËK:QB¹ÁELQÌF×ø7WƯ*¾*¾R¾=7¶/-ùïÃAÄ +2îT.Þ<+:D¹.ZÉß¶HÏûæ57ÁGGµMîTZ´2Þ@µ²3ËÛÁĺýÍ/üU¯9Sô4µ.ÌÚ2¾J¾1ô×Y,MİY¸ôôDÎ:UÌ +FSÏÛñ*òùå¼37¯Õúݸ³ãEDÎÛó7»ýÍ»Û×UÚÏæê;¾9ô×ý+MÞÓ5*Ö¯µÒäP8Øýã±IÂÄNZ×Eê2¶ðL*,+ô¹ +MÍý±-±µû×=ØàýÇ4ëåó×Ý+MÞÓ×êC¾»5J¾ôÄ+ÎíIù;²NLÇÛâľ=A*ZÝEøöIE3åìñÄà°Q*üÔå¼.6KÕX +Ûè*öRË/Qà±ñ?ëíð×ÝJM,±Å*¸ÞÄä°Q³A¹MYü±1²¹ßÄÞÇ5*öÖHù5ZNZ´LÍÛU8NÈ×é¶À¼ýêQÎ;±×3»ô +TE=×+*ñ*É5¾¼ýêììÆGZôܵ>BUÌF×Ý7ûêÍ7ÊëY +Í»+*Wò×*J*Þ¯/Ê0êÅAÜ6L¾U±×±*ËO*Ã×1.ZY+Ö9¶ÌÞܾÂоMÒæBÍëç7×ÅâXúÄÞÇE+Ö×7Wæ±YJô// +Ò1FÈ¿X8âÛÒçÔ.*XëÁ±õ¼M;×ðâÇ>FÙEHùV<Øæ±EBM诵Ð×ÙåÁæê;¾ËÓàðHU**¶IÙë++7Ú;=×Éçêëí +æ²@F××7O+1%% +d +720 84[1 0 0 1 0 0]sl 8 false 0 252 di +/sl 60480 string uc +Þ½Ø***ì:Þ;1ÚÆ¿5*22öE.ZO@°Õ*Ú¸Óû,ÂÌ*¶<*J**2,ÖÐQ7Së0*4;XOà;/êÅAÜÇK¾UA*Î÷ð,Ì6+Æ +=Qä+´?*5øêSÂ-Ò»SÙ7ñ×ûÙ;EØê8ÖÏ*ë»ëæÌHù,DP:ù@M +L±-+¸;ZȱQ*Ô.*E/åÄ÷êÔëÆ³OôüµÒ@E*ZSEøÃI5XWɱÙÞÄÀ°Y¹ôÅ÷ê´ãÆÃ³´9V,F·+*Gäð7ñ×7Ø; +/×¹éêHÖ;¶7×Óæ4ýQÀ+@°M»ý×ËÇ;±×5úê¼îê+W¶<6ÎÕVܯHÙ?E,X?ã@,²é7ÃáÔæìáÄHíåHæê0Ü +Ïæê;¾Gêæ-öê´âÆÃ´´±êà²@F30æR@íBÍëÂ7×êäôÂ7/ä0*.-N¼Mýô±é¯AÙ×W¯MïÖ?Ø÷ìæYöêìáÆÇêë +´´µ.M²ô2JM׺Ẵõ³ÂÛðýèÓPçÆÛÄÔö½<6:ã7ûÛÍ/Õ8*JŲâXG¹J5Ì.-âµMíß±ù8MÔÊ×ë¿6ïÖ?Øûâ +ð7ñ×GÕ;Á×K*˼MÏ×M*çëæñûêçêR¾8çÆOÅÔö½<×7û2Íë³6·Î×W½*¿×+*ß*Wâð7ñ×»Ô;ÙíêôÖ϶ê4ë +º´ò÷¼ôôEÙQ´>D¹.îߺ´½¯âüEÙUâ;D5úÍ*ú@ÍëP7·ÏÖ»Î×W°MK×-*5LÓHXÐû°å°HÙ1DÙQ´>:¹L¹17 +çõÍëP63Çë/Ëë@ö*Q8*Þµ÷êHè2¶ó,*DNMø,²Å²Å+@ÀTGÛNÉãÌWêRMV´áêæR@F3ÑÛ5Tóñ<³=Â6ä0+º +4+2Ë/QøÅãEä±ERMP±M+¸NMøÁ±Y*¾ö½°1ÒèëOØUôN½Mîè¿ä¼7EØ,åHJÓãZR*Þ¯/Ê0êÅAøB;Ø.±ÙPK +İ1²±Íæ/·´6Þ?/FLÃÄ÷êÌçÆ¼çêÌ×Ïæê;¾âïZIû¶+×A>ÎHîR0¸OÇØ/MøO±¹QèP±ßÇòïZIû¶<3ûò×ë +À×îè1ÇÏ=12Ê7*20ÆÛLµó×ã+Wò×»Ï;A2ù*±½Ä7GÊØ¶ê4ëÚïZIû¶@3*Þ?å80>+..º1,*ÕP+L±É-H/5 +Oî,Ï×M*·Èß¿**ýÙ+¾LÂ5ǶB4ùïÃPG.¶?B5X»6<Èä0ıM+ðÔæÛºô>à¿NÚ.ðÄ÷êÄæÆÎê;¾ý¯MõÑ0Ì6 +æÄ,êý±YJàãQú5±¹Ä×YáÄXQWJô´ð¶Ö8æÜ:뿾ؾ=BÖ9Y²QL>äÜùêå°+îâ/*2ýQ<ËæãH¹áÒ½=ZôFÞ +õÖϺд@UÌöÍÒ±ýÙåÜÞêǾݯM3Oë¿ääè×7ý×7¾×îèYBÎWæKäÌëöÍÛùÄâÁ×IßÄ<ÊD¶ð**Âý=SáßPYÐ +¯È²ãËûN´>åÒ/ãÈ=QL+ÜÅåXF±ßÓIZIÙоêöêFGÙïI¹ç7Ç8±Ý¾7ãF³á×ÇÈôùøV¶?Ûäü*Eȼè0±ßÇZ +¾ÚïZÑAçæ5¶¯ÖC°ôÕCÀÞê*¾Z¾Ýï×ùêÆ°ê²CÙéµ²=SUÏËH8´ø<7ÑN¹ùV¸óèÓ9°MU÷ê-*:üÍN71E»ÇP +ä¾Îê<¾8õÌÛÁMÈÌëöÍÛáÄÊâÀUIâÄÔ=³¯×+*×áßPYЯȲUÊG0öH´²KS¹Þ×K*SáßPYйCî,±Q,ØØ¸DL +IP±Q*ÜÃåìVMà°ßÓA°MUÉØÎê+¾âïZÑAçBOØ2äü;EØÝÒËæä91E»Çô6¿ãZôíï-¶ð,*Âý=Íà±AÒ;Uàêô +ÛϳPWRÔF·<4îW»´V@ÚØ5Lòî7ë²è,°á±±ðêÄýêãZ´Ù¸Pí¿ã¶´2ÞÑöê³²âðBÙSµ²åS¹Þ×K*Iç±AÅ×Ë +¸MÙÌD¶ðL*ÜÂåPEÖEãêõ=4+×îN*Jô2ìõóÍä±á°õÆ×»¶MË:³á×K*àýÇÒïZÑAçBOÈà±µ·×û¶Më:³C·´ +á½´ÔT2É/ÕØîX¸÷Wà°-*ÐÅî¼YýáÉW-æ97çBEè4SEÌËIJÝÄåH¯êËX´ýëRÁNëZô.Þµöêâ>5XÛß¾XÁɼ +ÕÈÎê+¾ê;Úëéýʰ9¾JE²NáêRáNë+å0+º;ÍGÈ/ÕøNMDäÄDPèXÇ@öI+ÖNá**+*ÅBî60ôá5UNÂHÎêŲ8 +¯×+*CNòÀFE0î6-8ãÞ¸º¯½óí6ÈëNEèBS¹ê×ñ×é²ÊKÂ5Ä/*,*XäJí>çR@Úè=7çBEèBSÉL²9*ÞHIùR< +Dç±YV´éÊâñ÷2¶°NE4:-ôöå8ãÀUÛð;7±ûëÔ;+×ï×åGE1á*%% +d +720 84[1 0 0 1 0 0]sl 8 false 0 336 di +/sl 60480 string uc +Þ½Ø***ì:ÞË0FÇ¿5*22æ1,*Õ,*ØàJÌÄJµÖR9ô-F·**,ÞÇU>¶:*Þý´*Î2ïP<ÌÇ༺¯;»BÈ/ÕDÁKÜÔ¾ +6å4ýQ<ÎæÛºô>LõºôSãôÄXõÇ7ÛGÚÄÙÏÖê*¾7Däºô;N²ÆåÜÒêÙCçW±éB¿êAE¸Þ×K*5²6*:*:4î,-Ìß +Þ¼º;¹ãÀUéÅÅŵ81FE.îXLEà×õáÕQAE3¹í´MDäÄDPèô³Mîâ¾´>JJJ-½ôR´<ÉÛWôòÌ7³ÊÒWéÄ0°Í+J +á¼´XÈûÛ·îP°9Ü@Fç2åÜ4äH*¾PçóX×ÏÄÇØëëæGâÐ=QúÅ*2*Q¸áO´LØEUÐÄCÙÄ3â¼×Ïîéá*æ7A×Ç;N +ø×9E4ÀXõHØ7ñ×éëÆÄ×ÏÄÇØÓëæÇæH¹ëô¶ÇÄSÐÄCÙŰMµ6ùâ+.¾=ûï<íÝ3ôÃ3ðâÇ×ë°¾ô¶ôÄSý/Eßù +Ø;¶°ÑÄ÷üIÙ9´ÒíIùÙ±NݽôµíÆõý×½ø±½¹Äòùåüô7÷üIùQ½ôµåƼýêíÜ;íý±ýòåüô6çõÍûëEðû½ôÍ +üêíÌ;ûü×Ý»MÜýåüçÍûëCÐíIùÙµâùýêIû×ÝGMøû±½ùĺýÍûµH5*.*Úè¾Ó÷àL´ðû½ôTFE0îÈ-´ä5Eß +Çõý×É¿ÆCëU8æËOèB±ùøHù4?Üýå¼ýÍûÁIùû-JIîáLIùûMJݰP+÷6ÞùA¾8üê:¾õI*W6ØMØí½*Üý÷»ý +ñùüåõûÍíùIÝõ½¼éÜ0*:*α:°<ÎORÐI4°PòTÇøáÄøÂæÌØN6JåJâRJÑòRáJNÉÂN·W6Jé.ÞÆNÁºý;² +È×óÆÂÚÀÆH×ÏE.æB-æ=A·/;Ûðü»<;9÷±M*¸ÁNì¾NÉöRáêRVNÅJâ×ÇÚK¾X÷êP×Ðä÷êH×ÏP·ó¹?·Á*G +-;Iâ±ùNOøQ±YÖâ6JÑJNOÞ+/²ÄÈòÅÀFðÎH×Ï8ðê¸Ç:¾¼¿ÆÐ¾1ð×»°MGâ×ÁMWLÅ/;K*?+GðOûð×Û°M +ã:,*¾ä¾ÆõI:íýúÜý÷»ýñùüåõûÍíùIÝõ½¼íýúÜý÷»ýñùüåõûÍíùIÝõ½¼íýúø5S*¾-*Æô5¾ýÁW¶¿1Õ +6;çPN°6Q>îä@´°4½ü±±ýÀɱ¶°ÌDZLX=·ÞÖÙÐÃõý×·½ô+¸äÌ3CË.*2*¶M5íI²µ¯ÅÃÅÃÄÅ6î,/L+è- +Ì»ô×>Føä5ʶ,1QFî8@88Þ;³ÚÏÀEÔ¶á=Å2îû9JäÍ»<ͱ*ÞýëµÜ¶¾-DRYR-¶=ÚA;îè±Y·Þ¿1F²¾É4¶ +B/Õºð:+Üý+âú×ÅZùLLYÃòÓ/FCå-½»æÊåÒîT9X·J7ö37ÒKIÓÄÙS¶A,åÎðûIÞF5¿UÊöü5Z;Í»»*ÅIùV48÷J0Í»î+ +ÕBï<,8ïàÃ>Úüêõí×÷½ô/*2ý*T-XÂÞC/F¾¾EY¶M-µÐîæ1X»ôC1F3Ã5X¶J1Q°îæ3ì¾ÞçåÜÀÄõÝ*U5í +ÙÍËÅ4<*ÂõY*ÛN×Iï±+%% +d +720 84[1 0 0 1 0 0]sl 8 false 0 420 di + +QP +%%Trailer +%%Pages: 1 +%%DocumentFonts: +%%EOF diff --git a/geant4/LEMuSR/YIELDS/yields.for b/geant4/LEMuSR/YIELDS/yields.for new file mode 100644 index 0000000..d59d080 --- /dev/null +++ b/geant4/LEMuSR/YIELDS/yields.for @@ -0,0 +1,95 @@ + + + + OPTIONS /EXTEND_SOURCE + + SUBROUTINE chargeStateYields(E,masse,Yield_plus,Yield_zero) +c =========================================================== + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +c Die Funktion sowie die Parameter sind uebernommen aus: +c +c M.Gonin, R.Kallenbach, P.Bochsler: 'Charge exchange of hydrogen atoms +c in carbon foils at 0.4 - 120 keV', Rev.Sci.Instrum. 65 (3), March 1994 +c +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + IMPLICIT NONE + + real E ! kinetische Energie in keV + real masse ! in keV / c**2 + + real a_zero,a_minus + real k_Fermi,k_zero,k_minus + real zwo_k_Fermi + real k_Fermi_Quad,k_zero_Quad,k_minus_Quad + real vc_minus,vc_plus,v_Bohr,v_rel + + parameter ( a_zero = 0.953, a_minus = 0.029 ) + parameter ( k_Fermi = 1.178 ) ! [v_Bohr] + parameter ( k_Fermi_Quad = k_Fermi * k_Fermi ) + parameter ( zwo_k_fermi = 2. * k_Fermi ) + parameter ( k_zero = 0.991*k_Fermi ) ! [v_Bohr] + parameter ( k_zero_Quad = k_zero * k_zero ) + parameter ( k_minus = 0.989*k_Fermi ) ! [v_Bohr] + parameter ( k_minus_Quad = k_minus * k_minus ) + parameter ( vc_minus = 0.284, vc_plus = 0.193 ) ! [v_Bohr] + parameter ( v_Bohr = 7.2974E-3 ) ! [c] + + real Q_zero,Q_minus,D + real Yield_minus,Yield_zero,Yield_plus + + real help1,help2,help3 + + +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + if (E.LT.0) then + write(*,*) + write(*,*) 'error in subroutine ''chargeStateYields'':' + write(*,*) 'E = ',E,' < 0!' + write(*,*) '-> STOP' + write(*,*) + STOP + endif + + +c Energie in Geschwindigkeit umrechnen (in Einheiten von v_Bohr): + +c - klassisch: + + v_rel = SQRT(2.*E/masse) / v_Bohr + +c - relativistisch: + +c help1 = 1. + E/masse +c v_rel = SQRT(1. - 1./(help1*help1)) / v_Bohr + + +c Die geladenen Anteile berechnen (vgl. obige Referenz): + + help1 = v_rel*v_rel + help2 = zwo_k_Fermi*v_rel + Q_zero = 1. + (k_zero_Quad - k_Fermi_Quad - help1) / help2 + Q_minus = 1. + (k_minus_Quad - k_Fermi_Quad - help1) / help2 + + + help1 = a_zero * Q_zero + help2 = a_minus * Q_minus + help3 = (1.-Q_zero)*(1.-Q_minus) + D = help1*(help2 + (1.-Q_minus)) + help3 + + Yield_minus = help1*help2 / D + Yield_plus = help3 / D + + Yield_minus = Yield_minus * exp(-vc_minus/v_rel) + Yield_plus = Yield_plus * exp(-vc_plus /v_rel) + + Yield_zero = 1. - (Yield_minus + Yield_plus) + +c write(6,*) 'E vrel Neutral Plus Minus' +c write(6,*) E, v_rel, yield_zero, yield_plus, yield_minus + + END + + diff --git a/geant4/LEMuSR/YIELDS/yields.h b/geant4/LEMuSR/YIELDS/yields.h new file mode 100644 index 0000000..bf45ebe --- /dev/null +++ b/geant4/LEMuSR/YIELDS/yields.h @@ -0,0 +1,26 @@ +#ifndef Yields_h +#define Yield_h 1 + +class Yields +{ + +public: + //constructor + Yields(); + //destructor + ~Yields(); + + void GetYields(double E, double masse, double yvector[]); + + +private: + // VARIABLES + double Q_zero,Q_minus,D; + double Yield_minus,Yield_zero,Yield_plus; + + double help1,help2,help3; + +}; + + +#endif diff --git a/geant4/LEMuSR/YIELDS/yields.h~ b/geant4/LEMuSR/YIELDS/yields.h~ new file mode 100644 index 0000000..c2cca9a --- /dev/null +++ b/geant4/LEMuSR/YIELDS/yields.h~ @@ -0,0 +1,27 @@ +#ifndef Yields_h +#define Yield_h 1 + +class YieldsFunctions +{ + +public: + //constructor + YieldsFunctions(); + //destructor + ~YieldsFunctions(); + + void Yields(double E, double masse); + + + +private: + // VARIABLES + double Q_zero,Q_minus,D; + double Yield_minus,Yield_zero,Yield_plus; + + double help1,help2,help3; + +}; + + +#endif diff --git a/geant4/LEMuSR/YIELDS/yields.jpg b/geant4/LEMuSR/YIELDS/yields.jpg new file mode 100644 index 0000000..5ec5ba0 Binary files /dev/null and b/geant4/LEMuSR/YIELDS/yields.jpg differ diff --git a/geant4/LEMuSR/YIELDS/yields1.bmp b/geant4/LEMuSR/YIELDS/yields1.bmp new file mode 100644 index 0000000..0b4940e Binary files /dev/null and b/geant4/LEMuSR/YIELDS/yields1.bmp differ diff --git a/geant4/LEMuSR/YIELDS/yields2.eps b/geant4/LEMuSR/YIELDS/yields2.eps new file mode 100644 index 0000000..f41a205 --- /dev/null +++ b/geant4/LEMuSR/YIELDS/yields2.eps @@ -0,0 +1,768 @@ +%!PS-Adobe-2.0 +%%Title: yields2.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Thu Jul 21 10:57:45 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Portrait +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +4088 0 V +1.000 UL +LTb +714 420 M +63 0 V +4025 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 1056 M +4088 0 V +1.000 UL +LTb +714 1056 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.1) Rshow +1.000 UL +LTa +714 1692 M +4088 0 V +1.000 UL +LTb +714 1692 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.2) Rshow +1.000 UL +LTa +714 2328 M +4088 0 V +1.000 UL +LTb +714 2328 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.3) Rshow +1.000 UL +LTa +714 2964 M +4088 0 V +1.000 UL +LTb +714 2964 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.4) Rshow +1.000 UL +LTa +714 3600 M +4088 0 V +1.000 UL +LTb +714 3600 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.5) Rshow +1.000 UL +LTa +714 4236 M +4088 0 V +1.000 UL +LTb +714 4236 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.6) Rshow +1.000 UL +LTa +714 4872 M +4088 0 V +1.000 UL +LTb +714 4872 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.7) Rshow +1.000 UL +LTa +714 5508 M +4088 0 V +1.000 UL +LTb +714 5508 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.8) Rshow +1.000 UL +LTa +714 6144 M +4088 0 V +1.000 UL +LTb +714 6144 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 0.9) Rshow +1.000 UL +LTa +714 6780 M +4088 0 V +1.000 UL +LTb +714 6780 M +63 0 V +4025 0 R +-63 0 V +-4109 0 R +( 1) Rshow +1.000 UL +LTa +714 420 M +0 6360 V +1.000 UL +LTb +714 420 M +0 63 V +0 6297 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +1643 420 M +0 6360 V +1.000 UL +LTb +1643 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 0.5) Cshow +1.000 UL +LTa +2572 420 M +0 6360 V +1.000 UL +LTb +2572 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 1) Cshow +1.000 UL +LTa +3501 420 M +0 6360 V +1.000 UL +LTb +3501 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 1.5) Cshow +1.000 UL +LTa +4430 420 M +0 6017 V +0 280 R +0 63 V +1.000 UL +LTb +4430 420 M +0 63 V +0 6297 R +0 -63 V +0 -6437 R +( 2) Cshow +1.000 UL +LTb +714 420 M +4088 0 V +0 6360 V +-4088 0 V +714 420 L +140 3600 M +currentpoint gsave translate 90 rotate 0 0 M +(Yields) Cshow +grestore +2758 70 M +(Energy [keV] in power of 10) Cshow +2758 6990 M +(Muonium production yields in Trigger Detector's Carbon Foil) Cshow +1.000 UP +1.000 UL +LT0 +4151 6647 M +(mu+) Rshow +4235 6647 M +399 0 V +1368 924 M +560 284 V +327 235 V +232 204 V +180 184 V +147 169 V +125 156 V +108 145 V +95 138 V +85 130 V +77 125 V +70 119 V +64 114 V +60 109 V +56 106 V +52 103 V +49 99 V +46 96 V +44 94 V +41 91 V +39 89 V +38 86 V +36 85 V +34 82 V +33 81 V +32 79 V +30 78 V +30 76 V +28 74 V +27 74 V +27 72 V +25 70 V +25 70 V +24 68 V +24 68 V +22 66 V +22 65 V +22 65 V +21 63 V +20 63 V +20 61 V +20 61 V +19 60 V +18 60 V +18 58 V +18 58 V +17 57 V +17 57 V +17 55 V +16 56 V +16 54 V +16 54 V +15 54 V +16 53 V +14 52 V +15 52 V +14 51 V +14 51 V +14 50 V +14 50 V +13 49 V +13 27 V +13 4 V +13 4 V +12 4 V +12 3 V +13 4 V +12 3 V +11 4 V +12 3 V +5 1 V +1368 924 Pls +1928 1208 Pls +2255 1443 Pls +2487 1647 Pls +2667 1831 Pls +2814 2000 Pls +2939 2156 Pls +3047 2301 Pls +3142 2439 Pls +3227 2569 Pls +3304 2694 Pls +3374 2813 Pls +3438 2927 Pls +3498 3036 Pls +3554 3142 Pls +3606 3245 Pls +3655 3344 Pls +3701 3440 Pls +3745 3534 Pls +3786 3625 Pls +3825 3714 Pls +3863 3800 Pls +3899 3885 Pls +3933 3967 Pls +3966 4048 Pls +3998 4127 Pls +4028 4205 Pls +4058 4281 Pls +4086 4355 Pls +4113 4429 Pls +4140 4501 Pls +4165 4571 Pls +4190 4641 Pls +4214 4709 Pls +4238 4777 Pls +4260 4843 Pls +4282 4908 Pls +4304 4973 Pls +4325 5036 Pls +4345 5099 Pls +4365 5160 Pls +4385 5221 Pls +4404 5281 Pls +4422 5341 Pls +4440 5399 Pls +4458 5457 Pls +4475 5514 Pls +4492 5571 Pls +4509 5626 Pls +4525 5682 Pls +4541 5736 Pls +4557 5790 Pls +4572 5844 Pls +4588 5897 Pls +4602 5949 Pls +4617 6001 Pls +4631 6052 Pls +4645 6103 Pls +4659 6153 Pls +4673 6203 Pls +4686 6252 Pls +4699 6279 Pls +4712 6283 Pls +4725 6287 Pls +4737 6291 Pls +4749 6294 Pls +4762 6298 Pls +4774 6301 Pls +4785 6305 Pls +4797 6308 Pls +4434 6647 Pls +1.000 UP +1.000 UL +LT2 +4151 6507 M +(mu0) Rshow +4235 6507 M +399 0 V +1368 6017 M +560 -282 V +327 -209 V +232 -179 V +180 -161 V +147 -149 V +125 -139 V +108 -132 V +95 -124 V +85 -120 V +77 -114 V +70 -110 V +64 -107 V +60 -102 V +56 -100 V +52 -97 V +49 -94 V +46 -91 V +44 -89 V +41 -87 V +39 -86 V +38 -83 V +36 -81 V +34 -80 V +33 -78 V +32 -77 V +30 -75 V +30 -74 V +28 -73 V +27 -71 V +27 -71 V +25 -69 V +25 -68 V +24 -67 V +24 -66 V +22 -65 V +22 -65 V +22 -63 V +21 -63 V +20 -61 V +20 -61 V +20 -61 V +19 -59 V +18 -59 V +18 -58 V +18 -57 V +17 -57 V +17 -56 V +17 -55 V +16 -55 V +16 -55 V +16 -53 V +15 -54 V +16 -52 V +14 -52 V +15 -52 V +14 -51 V +14 -51 V +14 -50 V +14 -50 V +13 -49 V +13 -27 V +13 -4 V +13 -4 V +12 -4 V +12 -3 V +13 -4 V +12 -4 V +11 -3 V +12 -3 V +5 -2 V +1368 6017 Star +1928 5735 Star +2255 5526 Star +2487 5347 Star +2667 5186 Star +2814 5037 Star +2939 4898 Star +3047 4766 Star +3142 4642 Star +3227 4522 Star +3304 4408 Star +3374 4298 Star +3438 4191 Star +3498 4089 Star +3554 3989 Star +3606 3892 Star +3655 3798 Star +3701 3707 Star +3745 3618 Star +3786 3531 Star +3825 3445 Star +3863 3362 Star +3899 3281 Star +3933 3201 Star +3966 3123 Star +3998 3046 Star +4028 2971 Star +4058 2897 Star +4086 2824 Star +4113 2753 Star +4140 2682 Star +4165 2613 Star +4190 2545 Star +4214 2478 Star +4238 2412 Star +4260 2347 Star +4282 2282 Star +4304 2219 Star +4325 2156 Star +4345 2095 Star +4365 2034 Star +4385 1973 Star +4404 1914 Star +4422 1855 Star +4440 1797 Star +4458 1740 Star +4475 1683 Star +4492 1627 Star +4509 1572 Star +4525 1517 Star +4541 1462 Star +4557 1409 Star +4572 1355 Star +4588 1303 Star +4602 1251 Star +4617 1199 Star +4631 1148 Star +4645 1097 Star +4659 1047 Star +4673 997 Star +4686 948 Star +4699 921 Star +4712 917 Star +4725 913 Star +4737 909 Star +4749 906 Star +4762 902 Star +4774 898 Star +4785 895 Star +4797 892 Star +4434 6507 Star +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/YIELDS/yields3.eps b/geant4/LEMuSR/YIELDS/yields3.eps new file mode 100644 index 0000000..35d520d --- /dev/null +++ b/geant4/LEMuSR/YIELDS/yields3.eps @@ -0,0 +1,976 @@ +%!PS-Adobe-2.0 +%%Title: yields3.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Mon Aug 15 17:56:04 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color false def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -66 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +/MFshow {{dup dup 0 get findfont exch 1 get scalefont setfont + [ currentpoint ] exch dup 2 get 0 exch rmoveto dup dup 5 get exch 4 get + {show} {stringwidth pop 0 rmoveto}ifelse dup 3 get + {2 get neg 0 exch rmoveto pop} {pop aload pop moveto}ifelse} forall} bind def +/MFwidth {0 exch {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont + 5 get stringwidth pop add} + {pop} ifelse} forall} bind def +/MLshow { currentpoint stroke M + 0 exch R MFshow } bind def +/MRshow { currentpoint stroke M + exch dup MFwidth neg 3 -1 roll R MFshow } def +/MCshow { currentpoint stroke M + exch dup MFwidth -2 div 3 -1 roll R MFshow } def +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 200 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +1020 600 M +5840 0 V +1.000 UL +LTb +1020 600 M +63 0 V +5777 0 R +-63 0 V + stroke +900 600 M +[ [(Helvetica) 200.0 0.0 true true ( 0)] +] -66.7 MRshow +1.000 UL +LTa +1020 1020 M +5840 0 V +1.000 UL +LTb +1020 1020 M +63 0 V +5777 0 R +-63 0 V + stroke +900 1020 M +[ [(Helvetica) 200.0 0.0 true true ( 0.1)] +] -66.7 MRshow +1.000 UL +LTa +1020 1440 M +5840 0 V +1.000 UL +LTb +1020 1440 M +63 0 V +5777 0 R +-63 0 V + stroke +900 1440 M +[ [(Helvetica) 200.0 0.0 true true ( 0.2)] +] -66.7 MRshow +1.000 UL +LTa +1020 1860 M +5840 0 V +1.000 UL +LTb +1020 1860 M +63 0 V +5777 0 R +-63 0 V + stroke +900 1860 M +[ [(Helvetica) 200.0 0.0 true true ( 0.3)] +] -66.7 MRshow +1.000 UL +LTa +1020 2280 M +5840 0 V +1.000 UL +LTb +1020 2280 M +63 0 V +5777 0 R +-63 0 V + stroke +900 2280 M +[ [(Helvetica) 200.0 0.0 true true ( 0.4)] +] -66.7 MRshow +1.000 UL +LTa +1020 2700 M +5840 0 V +1.000 UL +LTb +1020 2700 M +63 0 V +5777 0 R +-63 0 V + stroke +900 2700 M +[ [(Helvetica) 200.0 0.0 true true ( 0.5)] +] -66.7 MRshow +1.000 UL +LTa +1020 3120 M +5840 0 V +1.000 UL +LTb +1020 3120 M +63 0 V +5777 0 R +-63 0 V + stroke +900 3120 M +[ [(Helvetica) 200.0 0.0 true true ( 0.6)] +] -66.7 MRshow +1.000 UL +LTa +1020 3540 M +5840 0 V +1.000 UL +LTb +1020 3540 M +63 0 V +5777 0 R +-63 0 V + stroke +900 3540 M +[ [(Helvetica) 200.0 0.0 true true ( 0.7)] +] -66.7 MRshow +1.000 UL +LTa +1020 3960 M +5840 0 V +1.000 UL +LTb +1020 3960 M +63 0 V +5777 0 R +-63 0 V + stroke +900 3960 M +[ [(Helvetica) 200.0 0.0 true true ( 0.8)] +] -66.7 MRshow +1.000 UL +LTa +1020 4380 M +364 0 V +1237 0 R +4239 0 V +1.000 UL +LTb +1020 4380 M +63 0 V +5777 0 R +-63 0 V + stroke +900 4380 M +[ [(Helvetica) 200.0 0.0 true true ( 0.9)] +] -66.7 MRshow +1.000 UL +LTa +1020 4800 M +5840 0 V +1.000 UL +LTb +1020 4800 M +63 0 V +5777 0 R +-63 0 V + stroke +900 4800 M +[ [(Helvetica) 200.0 0.0 true true ( 1)] +] -66.7 MRshow +1.000 UL +LTa +1020 600 M +0 4200 V +1.000 UL +LTb +1020 600 M +0 63 V +0 4137 R +0 -63 V + stroke +1020 400 M +[ [(Helvetica) 200.0 0.0 true true ( 0.1)] +] -66.7 MCshow +1553 600 M +0 31 V +0 4169 R +0 -31 V +1864 600 M +0 31 V +0 4169 R +0 -31 V +2085 600 M +0 31 V +0 4169 R +0 -31 V +2257 600 M +0 31 V +0 4169 R +0 -31 V +2397 600 M +0 31 V +0 4169 R +0 -31 V +2515 600 M +0 31 V +0 4169 R +0 -31 V +2618 600 M +0 31 V +0 4169 R +0 -31 V +2708 600 M +0 31 V +0 4169 R +0 -31 V +1.000 UL +LTa +2789 600 M +0 4200 V +1.000 UL +LTb +2789 600 M +0 63 V +0 4137 R +0 -63 V + stroke +2789 400 M +[ [(Helvetica) 200.0 0.0 true true ( 1)] +] -66.7 MCshow +3322 600 M +0 31 V +0 4169 R +0 -31 V +3633 600 M +0 31 V +0 4169 R +0 -31 V +3854 600 M +0 31 V +0 4169 R +0 -31 V +4026 600 M +0 31 V +0 4169 R +0 -31 V +4166 600 M +0 31 V +0 4169 R +0 -31 V +4284 600 M +0 31 V +0 4169 R +0 -31 V +4387 600 M +0 31 V +0 4169 R +0 -31 V +4477 600 M +0 31 V +0 4169 R +0 -31 V +1.000 UL +LTa +4558 600 M +0 4200 V +1.000 UL +LTb +4558 600 M +0 63 V +0 4137 R +0 -63 V + stroke +4558 400 M +[ [(Helvetica) 200.0 0.0 true true ( 10)] +] -66.7 MCshow +5091 600 M +0 31 V +0 4169 R +0 -31 V +5402 600 M +0 31 V +0 4169 R +0 -31 V +5623 600 M +0 31 V +0 4169 R +0 -31 V +5795 600 M +0 31 V +0 4169 R +0 -31 V +5935 600 M +0 31 V +0 4169 R +0 -31 V +6053 600 M +0 31 V +0 4169 R +0 -31 V +6156 600 M +0 31 V +0 4169 R +0 -31 V +6246 600 M +0 31 V +0 4169 R +0 -31 V +1.000 UL +LTa +6327 600 M +0 4200 V +1.000 UL +LTb +6327 600 M +0 63 V +0 4137 R +0 -63 V + stroke +6327 400 M +[ [(Helvetica) 200.0 0.0 true true ( 100)] +] -66.7 MCshow +6860 600 M +0 31 V +0 4169 R +0 -31 V +1.000 UL +LTb +1020 600 M +5840 0 V +0 4200 V +-5840 0 V +0 -4200 V + stroke +200 2700 M +currentpoint gsave translate 90 rotate 0 0 moveto +[ [(Helvetica) 200.0 0.0 true true (Yields)] +] -66.7 MCshow +grestore +3940 100 M +[ [(Helvetica) 200.0 0.0 true true (Energy [keV/amu])] +] -66.7 MCshow +2.500 UP +1.000 UL +LT0 +1744 4380 M +[ [(Helvetica) 200.0 0.0 true true (mu+)] +] -66.7 MRshow +1864 4380 M +637 0 V +3412 933 M +533 187 V +311 155 V +221 136 V +172 121 V +140 111 V +118 103 V +103 96 V +90 91 V +81 86 V +74 83 V +66 78 V +62 75 V +57 73 V +53 70 V +49 67 V +47 66 V +44 63 V +42 62 V +39 60 V +37 59 V +36 57 V +34 56 V +33 55 V +31 53 V +30 52 V +29 51 V +28 51 V +27 49 V +26 48 V +26 48 V +24 46 V +24 46 V +23 46 V +22 44 V +22 44 V +21 43 V +20 42 V +20 42 V +19 42 V +19 40 V +19 41 V +18 39 V +18 39 V +17 39 V +17 38 V +16 38 V +17 37 V +15 37 V +16 37 V +15 36 V +15 35 V +15 36 V +14 35 V +14 34 V +14 34 V +14 34 V +13 34 V +13 33 V +13 33 V +13 33 V +12 17 V +13 3 V +12 2 V +12 3 V +11 2 V +12 3 V +11 2 V +11 2 V +11 2 V +11 2 V +11 2 V +11 2 V +10 2 V +10 2 V +11 2 V +10 2 V +10 2 V +9 2 V +10 2 V +10 1 V +9 2 V +9 2 V +10 1 V +9 2 V +9 2 V +8 1 V +9 2 V +8 1 V +3412 933 Pls +3945 1120 Pls +4256 1275 Pls +4477 1411 Pls +4649 1532 Pls +4789 1643 Pls +4907 1746 Pls +5010 1842 Pls +5100 1933 Pls +5181 2019 Pls +5255 2102 Pls +5321 2180 Pls +5383 2255 Pls +5440 2328 Pls +5493 2398 Pls +5542 2465 Pls +5589 2531 Pls +5633 2594 Pls +5675 2656 Pls +5714 2716 Pls +5751 2775 Pls +5787 2832 Pls +5821 2888 Pls +5854 2943 Pls +5885 2996 Pls +5915 3048 Pls +5944 3099 Pls +5972 3150 Pls +5999 3199 Pls +6025 3247 Pls +6051 3295 Pls +6075 3341 Pls +6099 3387 Pls +6122 3433 Pls +6144 3477 Pls +6166 3521 Pls +6187 3564 Pls +6207 3606 Pls +6227 3648 Pls +6246 3690 Pls +6265 3730 Pls +6284 3771 Pls +6302 3810 Pls +6320 3849 Pls +6337 3888 Pls +6354 3926 Pls +6370 3964 Pls +6387 4001 Pls +6402 4038 Pls +6418 4075 Pls +6433 4111 Pls +6448 4146 Pls +6463 4182 Pls +6477 4217 Pls +6491 4251 Pls +6505 4285 Pls +6519 4319 Pls +6532 4353 Pls +6545 4386 Pls +6558 4419 Pls +6571 4452 Pls +6583 4469 Pls +6596 4472 Pls +6608 4474 Pls +6620 4477 Pls +6631 4479 Pls +6643 4482 Pls +6654 4484 Pls +6665 4486 Pls +6676 4488 Pls +6687 4490 Pls +6698 4492 Pls +6709 4494 Pls +6719 4496 Pls +6729 4498 Pls +6740 4500 Pls +6750 4502 Pls +6760 4504 Pls +6769 4506 Pls +6779 4508 Pls +6789 4509 Pls +6798 4511 Pls +6807 4513 Pls +6817 4514 Pls +6826 4516 Pls +6835 4518 Pls +6843 4519 Pls +6852 4521 Pls +2182 4380 Pls +2.500 UP +1.000 UL +LT2 +1744 4180 M +[ [(Helvetica) 200.0 0.0 true true (mu0)] +] -66.7 MRshow +1864 4180 M +637 0 V +911 116 R +533 -186 V +311 -138 V +221 -118 V +172 -107 V +140 -98 V +118 -92 V +103 -87 V +90 -82 V +81 -79 V +74 -76 V +66 -72 V +62 -70 V +57 -68 V +53 -66 V +49 -64 V +47 -62 V +44 -60 V +42 -59 V +39 -58 V +37 -56 V +36 -55 V +34 -54 V +33 -53 V +31 -51 V +30 -51 V +29 -50 V +28 -48 V +27 -48 V +26 -48 V +26 -46 V +24 -46 V +24 -45 V +23 -44 V +22 -44 V +22 -43 V +21 -42 V +20 -42 V +20 -41 V +19 -41 V +19 -40 V +19 -40 V +18 -39 V +18 -39 V +17 -38 V +17 -38 V +16 -38 V +17 -37 V +15 -37 V +16 -36 V +15 -36 V +15 -35 V +15 -35 V +14 -35 V +14 -35 V +14 -34 V +14 -33 V +13 -34 V +13 -33 V +13 -33 V +13 -33 V +12 -17 V +13 -3 V +12 -3 V +12 -2 V +11 -2 V +12 -3 V +11 -2 V +11 -2 V +11 -3 V +11 -2 V +11 -2 V +11 -2 V +10 -2 V +10 -2 V +11 -2 V +10 -2 V +10 -2 V +9 -2 V +10 -2 V +10 -2 V +9 -2 V +9 -2 V +10 -2 V +9 -2 V +9 -2 V +8 -1 V +9 -2 V +8 -2 V +3412 4296 Star +3945 4110 Star +4256 3972 Star +4477 3854 Star +4649 3747 Star +4789 3649 Star +4907 3557 Star +5010 3470 Star +5100 3388 Star +5181 3309 Star +5255 3233 Star +5321 3161 Star +5383 3091 Star +5440 3023 Star +5493 2957 Star +5542 2893 Star +5589 2831 Star +5633 2771 Star +5675 2712 Star +5714 2654 Star +5751 2598 Star +5787 2543 Star +5821 2489 Star +5854 2436 Star +5885 2385 Star +5915 2334 Star +5944 2284 Star +5972 2236 Star +5999 2188 Star +6025 2140 Star +6051 2094 Star +6075 2048 Star +6099 2003 Star +6122 1959 Star +6144 1915 Star +6166 1872 Star +6187 1830 Star +6207 1788 Star +6227 1747 Star +6246 1706 Star +6265 1666 Star +6284 1626 Star +6302 1587 Star +6320 1548 Star +6337 1510 Star +6354 1472 Star +6370 1434 Star +6387 1397 Star +6402 1360 Star +6418 1324 Star +6433 1288 Star +6448 1253 Star +6463 1218 Star +6477 1183 Star +6491 1148 Star +6505 1114 Star +6519 1081 Star +6532 1047 Star +6545 1014 Star +6558 981 Star +6571 948 Star +6583 931 Star +6596 928 Star +6608 925 Star +6620 923 Star +6631 921 Star +6643 918 Star +6654 916 Star +6665 914 Star +6676 911 Star +6687 909 Star +6698 907 Star +6709 905 Star +6719 903 Star +6729 901 Star +6740 899 Star +6750 897 Star +6760 895 Star +6769 893 Star +6779 891 Star +6789 889 Star +6798 887 Star +6807 885 Star +6817 883 Star +6826 881 Star +6835 879 Star +6843 878 Star +6852 876 Star +2182 4180 Star +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/YIELDS/yieldst.eps b/geant4/LEMuSR/YIELDS/yieldst.eps new file mode 100644 index 0000000..375cfd1 --- /dev/null +++ b/geant4/LEMuSR/YIELDS/yieldst.eps @@ -0,0 +1,770 @@ +%!PS-Adobe-2.0 +%%Title: yields3.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Thu Jul 21 10:58:25 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +714 420 M +6248 0 V +1.000 UL +LTb +714 420 M +63 0 V +6185 0 R +-63 0 V +630 420 M +( 0) Rshow +1.000 UL +LTa +714 840 M +6248 0 V +1.000 UL +LTb +714 840 M +63 0 V +6185 0 R +-63 0 V +630 840 M +( 0.1) Rshow +1.000 UL +LTa +714 1260 M +6248 0 V +1.000 UL +LTb +714 1260 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.2) Rshow +1.000 UL +LTa +714 1680 M +6248 0 V +1.000 UL +LTb +714 1680 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.3) Rshow +1.000 UL +LTa +714 2100 M +6248 0 V +1.000 UL +LTb +714 2100 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.4) Rshow +1.000 UL +LTa +714 2520 M +6248 0 V +1.000 UL +LTb +714 2520 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.5) Rshow +1.000 UL +LTa +714 2940 M +6248 0 V +1.000 UL +LTb +714 2940 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.6) Rshow +1.000 UL +LTa +714 3360 M +6248 0 V +1.000 UL +LTb +714 3360 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.7) Rshow +1.000 UL +LTa +714 3780 M +6248 0 V +1.000 UL +LTb +714 3780 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.8) Rshow +1.000 UL +LTa +714 4200 M +6248 0 V +1.000 UL +LTb +714 4200 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 0.9) Rshow +1.000 UL +LTa +714 4620 M +6248 0 V +1.000 UL +LTb +714 4620 M +63 0 V +6185 0 R +-63 0 V +-6269 0 R +( 1) Rshow +1.000 UL +LTa +714 420 M +0 4200 V +1.000 UL +LTb +714 420 M +0 63 V +0 4137 R +0 -63 V +714 280 M +( 0) Cshow +1.000 UL +LTa +2134 420 M +0 4200 V +1.000 UL +LTb +2134 420 M +0 63 V +0 4137 R +0 -63 V +0 -4277 R +( 0.5) Cshow +1.000 UL +LTa +3554 420 M +0 4200 V +1.000 UL +LTb +3554 420 M +0 63 V +0 4137 R +0 -63 V +0 -4277 R +( 1) Cshow +1.000 UL +LTa +4974 420 M +0 4200 V +1.000 UL +LTb +4974 420 M +0 63 V +0 4137 R +0 -63 V +0 -4277 R +( 1.5) Cshow +1.000 UL +LTa +6394 420 M +0 3857 V +0 280 R +0 63 V +1.000 UL +LTb +6394 420 M +0 63 V +0 4137 R +0 -63 V +0 -4277 R +( 2) Cshow +1.000 UL +LTb +714 420 M +6248 0 V +0 4200 V +-6248 0 V +714 420 L +140 2520 M +currentpoint gsave translate 90 rotate 0 0 M +(Yields) Cshow +grestore +3838 70 M +(Energy [keV] in power of 10) Cshow +3838 4830 M +(Muonium production yields in Trigger Detector's Carbon Foil) Cshow +1.000 UP +1.000 UL +LT0 +6311 4487 M +(mu+) Rshow +6395 4487 M +399 0 V +1714 753 M +855 187 V +500 155 V +355 136 V +275 121 V +225 111 V +190 103 V +165 96 V +145 91 V +130 86 V +118 83 V +107 78 V +99 75 V +91 73 V +85 70 V +80 67 V +75 66 V +70 63 V +67 62 V +63 60 V +60 59 V +58 57 V +55 56 V +52 55 V +50 53 V +49 52 V +46 51 V +45 51 V +43 49 V +42 48 V +41 48 V +39 46 V +38 46 V +37 46 V +35 44 V +35 44 V +34 43 V +33 42 V +32 42 V +31 42 V +31 40 V +29 41 V +29 39 V +29 39 V +27 39 V +27 38 V +27 38 V +26 37 V +25 37 V +25 37 V +25 36 V +24 35 V +23 36 V +23 35 V +23 34 V +22 34 V +22 34 V +21 34 V +21 33 V +21 33 V +21 33 V +20 17 V +19 3 V +20 2 V +19 3 V +19 2 V +18 3 V +19 2 V +18 2 V +17 2 V +8 1 V +1714 753 Pls +2569 940 Pls +3069 1095 Pls +3424 1231 Pls +3699 1352 Pls +3924 1463 Pls +4114 1566 Pls +4279 1662 Pls +4424 1753 Pls +4554 1839 Pls +4672 1922 Pls +4779 2000 Pls +4878 2075 Pls +4969 2148 Pls +5054 2218 Pls +5134 2285 Pls +5209 2351 Pls +5279 2414 Pls +5346 2476 Pls +5409 2536 Pls +5469 2595 Pls +5527 2652 Pls +5582 2708 Pls +5634 2763 Pls +5684 2816 Pls +5733 2868 Pls +5779 2919 Pls +5824 2970 Pls +5867 3019 Pls +5909 3067 Pls +5950 3115 Pls +5989 3161 Pls +6027 3207 Pls +6064 3253 Pls +6099 3297 Pls +6134 3341 Pls +6168 3384 Pls +6201 3426 Pls +6233 3468 Pls +6264 3510 Pls +6295 3550 Pls +6324 3591 Pls +6353 3630 Pls +6382 3669 Pls +6409 3708 Pls +6436 3746 Pls +6463 3784 Pls +6489 3821 Pls +6514 3858 Pls +6539 3895 Pls +6564 3931 Pls +6588 3966 Pls +6611 4002 Pls +6634 4037 Pls +6657 4071 Pls +6679 4105 Pls +6701 4139 Pls +6722 4173 Pls +6743 4206 Pls +6764 4239 Pls +6785 4272 Pls +6805 4289 Pls +6824 4292 Pls +6844 4294 Pls +6863 4297 Pls +6882 4299 Pls +6900 4302 Pls +6919 4304 Pls +6937 4306 Pls +6954 4308 Pls +6594 4487 Pls +1.000 UP +1.000 UL +LT2 +6311 4347 M +(mu0) Rshow +6395 4347 M +399 0 V +1714 4116 M +855 -186 V +500 -138 V +355 -118 V +275 -107 V +225 -98 V +190 -92 V +165 -87 V +145 -82 V +130 -79 V +118 -76 V +107 -72 V +99 -70 V +91 -68 V +85 -66 V +80 -64 V +75 -62 V +70 -60 V +67 -59 V +63 -58 V +60 -56 V +58 -55 V +55 -54 V +52 -53 V +50 -51 V +49 -51 V +46 -50 V +45 -48 V +43 -48 V +42 -48 V +41 -46 V +39 -46 V +38 -45 V +37 -44 V +35 -44 V +35 -43 V +34 -42 V +33 -42 V +32 -41 V +31 -41 V +31 -40 V +29 -40 V +29 -39 V +29 -39 V +27 -38 V +27 -38 V +27 -38 V +26 -37 V +25 -37 V +25 -36 V +25 -36 V +24 -35 V +23 -35 V +23 -35 V +23 -35 V +22 -34 V +22 -33 V +21 -34 V +21 -33 V +21 -33 V +21 -33 V +20 -17 V +19 -3 V +20 -3 V +19 -2 V +19 -2 V +18 -3 V +19 -2 V +18 -2 V +17 -3 V +8 -1 V +1714 4116 Star +2569 3930 Star +3069 3792 Star +3424 3674 Star +3699 3567 Star +3924 3469 Star +4114 3377 Star +4279 3290 Star +4424 3208 Star +4554 3129 Star +4672 3053 Star +4779 2981 Star +4878 2911 Star +4969 2843 Star +5054 2777 Star +5134 2713 Star +5209 2651 Star +5279 2591 Star +5346 2532 Star +5409 2474 Star +5469 2418 Star +5527 2363 Star +5582 2309 Star +5634 2256 Star +5684 2205 Star +5733 2154 Star +5779 2104 Star +5824 2056 Star +5867 2008 Star +5909 1960 Star +5950 1914 Star +5989 1868 Star +6027 1823 Star +6064 1779 Star +6099 1735 Star +6134 1692 Star +6168 1650 Star +6201 1608 Star +6233 1567 Star +6264 1526 Star +6295 1486 Star +6324 1446 Star +6353 1407 Star +6382 1368 Star +6409 1330 Star +6436 1292 Star +6463 1254 Star +6489 1217 Star +6514 1180 Star +6539 1144 Star +6564 1108 Star +6588 1073 Star +6611 1038 Star +6634 1003 Star +6657 968 Star +6679 934 Star +6701 901 Star +6722 867 Star +6743 834 Star +6764 801 Star +6785 768 Star +6805 751 Star +6824 748 Star +6844 745 Star +6863 743 Star +6882 741 Star +6900 738 Star +6919 736 Star +6937 734 Star +6954 731 Star +6594 4347 Star +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/YIELDS/ytest.eps b/geant4/LEMuSR/YIELDS/ytest.eps new file mode 100644 index 0000000..8cf4ea1 --- /dev/null +++ b/geant4/LEMuSR/YIELDS/ytest.eps @@ -0,0 +1,733 @@ +%!PS-Adobe-2.0 +%%Title: ytest.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Tue Apr 12 12:16:43 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +574 280 M +6388 0 V +1.000 UL +LTb +574 280 M +63 0 V +6325 0 R +-63 0 V +490 280 M +( 0) Rshow +1.000 UL +LTa +574 1198 M +6388 0 V +1.000 UL +LTb +574 1198 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 0.5) Rshow +1.000 UL +LTa +574 2117 M +6388 0 V +1.000 UL +LTb +574 2117 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 1) Rshow +1.000 UL +LTa +574 3035 M +6388 0 V +1.000 UL +LTb +574 3035 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 1.5) Rshow +1.000 UL +LTa +574 3954 M +6388 0 V +1.000 UL +LTb +574 3954 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 2) Rshow +1.000 UL +LTa +574 4872 M +6388 0 V +1.000 UL +LTb +574 4872 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 2.5) Rshow +1.000 UL +LTa +574 280 M +0 4592 V +1.000 UL +LTb +574 280 M +0 63 V +0 4529 R +0 -63 V +574 140 M +( 0) Cshow +1.000 UL +LTa +1852 280 M +0 4592 V +1.000 UL +LTb +1852 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +( 20) Cshow +1.000 UL +LTa +3129 280 M +0 4592 V +1.000 UL +LTb +3129 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +( 40) Cshow +1.000 UL +LTa +4407 280 M +0 4109 V +0 420 R +0 63 V +1.000 UL +LTb +4407 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +( 60) Cshow +1.000 UL +LTa +5684 280 M +0 4109 V +0 420 R +0 63 V +1.000 UL +LTb +5684 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +( 80) Cshow +1.000 UL +LTa +6962 280 M +0 4592 V +1.000 UL +LTb +6962 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +( 100) Cshow +1.000 UL +LTb +574 280 M +6388 0 V +0 4592 V +-6388 0 V +574 280 L +1.000 UL +LT0 +6311 4739 M +(Yield_plus\(x\)*exp\(-vc_plus/v_rel\(x\)\)) Rshow +6395 4739 M +399 0 V +639 635 M +64 190 V +65 148 V +64 125 V +65 110 V +64 99 V +65 90 V +64 84 V +65 79 V +64 74 V +65 70 V +64 66 V +65 64 V +64 61 V +65 58 V +64 57 V +65 54 V +64 53 V +65 51 V +65 49 V +64 48 V +65 47 V +64 45 V +65 44 V +64 44 V +65 42 V +64 41 V +65 40 V +64 40 V +65 39 V +64 38 V +65 37 V +64 36 V +65 36 V +64 36 V +65 34 V +64 34 V +65 34 V +64 33 V +65 32 V +65 32 V +64 32 V +65 31 V +64 30 V +65 30 V +64 30 V +65 30 V +64 28 V +65 29 V +64 28 V +65 28 V +64 28 V +65 27 V +64 27 V +65 26 V +64 27 V +65 26 V +64 25 V +65 26 V +65 25 V +64 25 V +65 24 V +64 25 V +65 24 V +64 24 V +65 23 V +64 24 V +65 23 V +64 23 V +65 22 V +64 23 V +65 22 V +64 22 V +65 22 V +64 22 V +65 22 V +64 21 V +65 21 V +64 21 V +65 21 V +65 21 V +64 20 V +65 20 V +64 21 V +65 20 V +64 19 V +65 20 V +64 20 V +65 19 V +64 19 V +65 19 V +64 19 V +65 19 V +64 19 V +65 19 V +64 18 V +65 18 V +64 19 V +65 18 V +1.000 UL +LT1 +6311 4599 M +(exp\(-vc_plus/v_rel\(x\)\)) Rshow +6395 4599 M +399 0 V +639 1611 M +64 132 V +65 62 V +64 39 V +65 26 V +64 20 V +65 16 V +64 13 V +65 11 V +64 9 V +65 8 V +64 7 V +65 6 V +64 5 V +65 5 V +64 5 V +65 4 V +64 4 V +65 3 V +65 3 V +64 3 V +65 3 V +64 2 V +65 3 V +64 2 V +65 2 V +64 2 V +65 2 V +64 2 V +65 2 V +64 2 V +65 1 V +64 2 V +65 1 V +64 1 V +65 2 V +64 1 V +65 1 V +64 1 V +65 2 V +65 1 V +64 1 V +65 1 V +64 1 V +65 1 V +64 1 V +65 0 V +64 1 V +65 1 V +64 1 V +65 1 V +64 1 V +65 0 V +64 1 V +65 1 V +64 0 V +65 1 V +64 1 V +65 0 V +65 1 V +64 1 V +65 0 V +64 1 V +65 0 V +64 1 V +65 0 V +64 1 V +65 0 V +64 1 V +65 0 V +64 1 V +65 0 V +64 1 V +65 0 V +64 1 V +65 0 V +64 1 V +65 0 V +64 0 V +65 1 V +65 0 V +64 1 V +65 0 V +64 0 V +65 1 V +64 0 V +65 0 V +64 1 V +65 0 V +64 0 V +65 1 V +64 0 V +65 0 V +64 1 V +65 0 V +64 0 V +65 1 V +64 0 V +65 0 V +1.000 UL +LT2 +6311 4459 M +(Yield_plus\(x\)) Rshow +6395 4459 M +399 0 V +639 770 M +64 194 V +65 150 V +64 126 V +65 111 V +64 100 V +65 91 V +64 84 V +65 79 V +64 74 V +65 70 V +64 67 V +65 63 V +64 61 V +65 59 V +64 56 V +65 54 V +64 53 V +65 50 V +65 50 V +64 47 V +65 47 V +64 45 V +65 44 V +64 44 V +65 42 V +64 41 V +65 40 V +64 39 V +65 39 V +64 38 V +65 37 V +64 36 V +65 36 V +64 35 V +65 35 V +64 34 V +65 33 V +64 33 V +65 32 V +65 32 V +64 31 V +65 31 V +64 31 V +65 30 V +64 29 V +65 30 V +64 28 V +65 29 V +64 28 V +65 28 V +64 27 V +65 27 V +64 27 V +65 26 V +64 26 V +65 26 V +64 26 V +65 25 V +65 25 V +64 25 V +65 24 V +64 25 V +65 23 V +64 24 V +65 24 V +64 23 V +65 23 V +64 23 V +65 23 V +64 22 V +65 22 V +64 22 V +65 22 V +64 22 V +65 21 V +64 21 V +65 21 V +64 21 V +65 21 V +65 20 V +64 21 V +65 20 V +64 20 V +65 20 V +64 20 V +65 19 V +64 20 V +65 19 V +64 19 V +65 19 V +64 19 V +65 19 V +64 19 V +65 18 V +64 18 V +65 19 V +64 18 V +65 18 V +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/YIELDS/ytest.pdf b/geant4/LEMuSR/YIELDS/ytest.pdf new file mode 100644 index 0000000..bd90f5f Binary files /dev/null and b/geant4/LEMuSR/YIELDS/ytest.pdf differ diff --git a/geant4/LEMuSR/YIELDS/ytestlog.eps b/geant4/LEMuSR/YIELDS/ytestlog.eps new file mode 100644 index 0000000..63d3d7f --- /dev/null +++ b/geant4/LEMuSR/YIELDS/ytestlog.eps @@ -0,0 +1,724 @@ +%!PS-Adobe-2.0 +%%Title: ytestlog.eps +%%Creator: gnuplot 3.7 patchlevel 3 +%%CreationDate: Tue Apr 12 12:16:53 2005 +%%DocumentFonts: (atend) +%%BoundingBox: 50 50 554 770 +%%Orientation: Landscape +%%Pages: (atend) +%%EndComments +/gnudict 256 dict def +gnudict begin +/Color true def +/Solid false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/vshift -46 def +/dl {10 mul} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow { currentpoint stroke M + 0 vshift R show } def +/Rshow { currentpoint stroke M + dup stringwidth pop neg vshift R show } def +/Cshow { currentpoint stroke M + dup stringwidth pop -2 div vshift R show } def +/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def +/DL { Color {setrgbcolor Solid {pop []} if 0 setdash } + {pop pop pop Solid {pop []} if 0 setdash} ifelse } def +/BL { stroke userlinewidth 2 mul setlinewidth } def +/AL { stroke userlinewidth 2 div setlinewidth } def +/UL { dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def } def +/PL { stroke userlinewidth setlinewidth } def +/LTb { BL [] 0 0 0 DL } def +/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def +/LT0 { PL [] 1 0 0 DL } def +/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def +/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def +/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def +/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def +/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def +/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def +/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def +/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def +/Pnt { stroke [] 0 setdash + gsave 1 setlinecap M 0 0 V stroke grestore } def +/Dia { stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt } def +/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt } def +/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke } def +/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt } def +/Star { 2 copy Pls Crs } def +/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill } def +/TriUF { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill } def +/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt } def +/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill } def +/Pent { stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt } def +/PentF { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore } def +/Circle { stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt } def +/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def +/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def +/C1 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath } bind def +/C2 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C3 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C4 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C5 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc } bind def +/C6 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C7 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath } bind def +/C8 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C9 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath } bind def +/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath } bind def +/C11 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C12 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C13 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/C14 { BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc } bind def +/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath } bind def +/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath } bind def +/Square { dup Rec } bind def +/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def +/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def +/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def +/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def +/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def +/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill + Bsquare } bind def +/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def +/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def +/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare } bind def +/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare } bind def +/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def +/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare } bind def +/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def +/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def +/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def +/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def +/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def +/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def +/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def +/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def +/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def +/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def +/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def +/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def +/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def +/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def +/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def +/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def +/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def +/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def +/DiaE { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke } def +/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke } def +/TriUE { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke } def +/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke } def +/PentE { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore } def +/CircE { stroke [] 0 setdash + hpt 0 360 arc stroke } def +/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def +/DiaW { stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke } def +/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke } def +/TriUW { stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke } def +/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke } def +/PentW { stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore } def +/CircW { stroke [] 0 setdash + hpt 0 360 arc Opaque stroke } def +/BoxFill { gsave Rec 1 setgray fill grestore } def +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +50 50 translate +0.100 0.100 scale +90 rotate +0 -5040 translate +0 setgray +newpath +(Helvetica) findfont 140 scalefont setfont +1.000 UL +LTb +1.000 UL +LTa +574 280 M +6388 0 V +1.000 UL +LTb +574 280 M +63 0 V +6325 0 R +-63 0 V +490 280 M +( 0) Rshow +1.000 UL +LTa +574 1198 M +6388 0 V +1.000 UL +LTb +574 1198 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 0.5) Rshow +1.000 UL +LTa +574 2117 M +6388 0 V +1.000 UL +LTb +574 2117 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 1) Rshow +1.000 UL +LTa +574 3035 M +6388 0 V +1.000 UL +LTb +574 3035 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 1.5) Rshow +1.000 UL +LTa +574 3954 M +6388 0 V +1.000 UL +LTb +574 3954 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 2) Rshow +1.000 UL +LTa +574 4872 M +6388 0 V +1.000 UL +LTb +574 4872 M +63 0 V +6325 0 R +-63 0 V +-6409 0 R +( 2.5) Rshow +1.000 UL +LTa +574 280 M +0 4592 V +1.000 UL +LTb +574 280 M +0 63 V +0 4529 R +0 -63 V +574 140 M +( 0) Cshow +1.000 UL +LTa +2171 280 M +0 4592 V +1.000 UL +LTb +2171 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +( 0.5) Cshow +1.000 UL +LTa +3768 280 M +0 4109 V +0 420 R +0 63 V +1.000 UL +LTb +3768 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +( 1) Cshow +1.000 UL +LTa +5365 280 M +0 4109 V +0 420 R +0 63 V +1.000 UL +LTb +5365 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +( 1.5) Cshow +1.000 UL +LTa +6962 280 M +0 4592 V +1.000 UL +LTb +6962 280 M +0 63 V +0 4529 R +0 -63 V +0 -4669 R +( 2) Cshow +1.000 UL +LTb +574 280 M +6388 0 V +0 4592 V +-6388 0 V +574 280 L +1.000 UL +LT0 +6311 4739 M +(Yield_plus\(10**x\)*exp\(-vc_plus/v_rel\(10**x\)\)) Rshow +6395 4739 M +399 0 V +574 633 M +65 11 V +64 10 V +65 11 V +64 12 V +65 11 V +64 12 V +65 13 V +64 12 V +65 13 V +64 13 V +65 14 V +64 14 V +65 14 V +64 15 V +65 15 V +64 15 V +65 16 V +64 16 V +65 17 V +65 17 V +64 17 V +65 18 V +64 18 V +65 19 V +64 19 V +65 19 V +64 20 V +65 21 V +64 21 V +65 21 V +64 22 V +65 23 V +64 23 V +65 23 V +64 24 V +65 25 V +64 25 V +65 25 V +64 27 V +65 26 V +65 28 V +64 28 V +65 29 V +64 29 V +65 30 V +64 30 V +65 32 V +64 32 V +65 32 V +64 33 V +65 34 V +64 35 V +65 36 V +64 36 V +65 37 V +64 37 V +65 39 V +64 39 V +65 40 V +65 41 V +64 42 V +65 42 V +64 44 V +65 44 V +64 45 V +65 46 V +64 47 V +65 48 V +64 49 V +65 50 V +64 51 V +65 51 V +64 53 V +65 54 V +64 54 V +65 56 V +64 57 V +65 57 V +64 59 V +65 60 V +65 61 V +64 62 V +65 63 V +64 65 V +65 65 V +64 67 V +65 68 V +64 68 V +65 70 V +64 72 V +65 72 V +64 74 V +65 75 V +64 76 V +65 77 V +64 79 V +65 79 V +64 81 V +65 83 V +1.000 UL +LT1 +6311 4599 M +(exp\(-vc_plus/v_rel\(10**x\)\)) Rshow +6395 4599 M +399 0 V +574 1609 M +65 10 V +64 10 V +65 9 V +64 10 V +65 9 V +64 9 V +65 9 V +64 9 V +65 9 V +64 8 V +65 9 V +64 8 V +65 8 V +64 8 V +65 8 V +64 7 V +65 8 V +64 7 V +65 8 V +65 7 V +64 7 V +65 7 V +64 7 V +65 6 V +64 7 V +65 6 V +64 6 V +65 7 V +64 6 V +65 5 V +64 6 V +65 6 V +64 6 V +65 5 V +64 5 V +65 6 V +64 5 V +65 5 V +64 5 V +65 5 V +65 4 V +64 5 V +65 5 V +64 4 V +65 4 V +64 5 V +65 4 V +64 4 V +65 4 V +64 4 V +65 4 V +64 4 V +65 3 V +64 4 V +65 4 V +64 3 V +65 3 V +64 4 V +65 3 V +65 3 V +64 3 V +65 3 V +64 3 V +65 3 V +64 3 V +65 3 V +64 3 V +65 3 V +64 2 V +65 3 V +64 2 V +65 3 V +64 2 V +65 2 V +64 3 V +65 2 V +64 2 V +65 2 V +64 3 V +65 2 V +65 2 V +64 2 V +65 2 V +64 1 V +65 2 V +64 2 V +65 2 V +64 2 V +65 1 V +64 2 V +65 2 V +64 1 V +65 2 V +64 1 V +65 2 V +64 1 V +65 2 V +64 1 V +65 1 V +1.000 UL +LT2 +6311 4459 M +(Yield_plus\(10**x\)) Rshow +6395 4459 M +399 0 V +574 768 M +65 11 V +64 11 V +65 11 V +64 12 V +65 12 V +64 12 V +65 13 V +64 13 V +65 13 V +64 13 V +65 14 V +64 14 V +65 15 V +64 15 V +65 15 V +64 16 V +65 16 V +64 16 V +65 17 V +65 17 V +64 18 V +65 18 V +64 18 V +65 19 V +64 20 V +65 19 V +64 21 V +65 20 V +64 21 V +65 22 V +64 22 V +65 23 V +64 23 V +65 24 V +64 24 V +65 24 V +64 26 V +65 26 V +64 26 V +65 27 V +65 27 V +64 29 V +65 28 V +64 30 V +65 30 V +64 30 V +65 32 V +64 32 V +65 32 V +64 34 V +65 34 V +64 34 V +65 36 V +64 36 V +65 37 V +64 38 V +65 38 V +64 39 V +65 40 V +65 41 V +64 42 V +65 42 V +64 44 V +65 44 V +64 45 V +65 46 V +64 47 V +65 47 V +64 49 V +65 50 V +64 50 V +65 52 V +64 52 V +65 54 V +64 54 V +65 56 V +64 56 V +65 58 V +64 58 V +65 60 V +65 61 V +64 62 V +65 62 V +64 65 V +65 65 V +64 66 V +65 67 V +64 69 V +65 70 V +64 70 V +65 72 V +64 74 V +65 74 V +64 76 V +65 77 V +64 78 V +65 79 V +64 81 V +65 82 V +stroke +grestore +end +showpage +%%Trailer +%%DocumentFonts: Helvetica +%%Pages: 1 diff --git a/geant4/LEMuSR/YIELDS/ytestlog.pdf b/geant4/LEMuSR/YIELDS/ytestlog.pdf new file mode 100644 index 0000000..980729a Binary files /dev/null and b/geant4/LEMuSR/YIELDS/ytestlog.pdf differ diff --git a/geant4/LEMuSR/allmk.sh b/geant4/LEMuSR/allmk.sh new file mode 100644 index 0000000..8406255 --- /dev/null +++ b/geant4/LEMuSR/allmk.sh @@ -0,0 +1,18 @@ +cd $G4INSTALL/source/particles/management +gmake +cd $G4INSTALL/source/particles/leptons +gmake +cd $G4INSTALL/source/run/ +gmake +cd $G4INSTALL/source/geometry/magneticfield/ +gmake +cd $G4INSTALL/source/track/ +gmake +cd $G4INSTALL/source/tracking/ +gmake +cd $G4INSTALL/source/processes/management/ +gmake +cd $G4INSTALL/source/processes/decay/ +gmake +cd $wlem +gmake diff --git a/geant4/LEMuSR/asym.sh b/geant4/LEMuSR/asym.sh new file mode 100644 index 0000000..862211e --- /dev/null +++ b/geant4/LEMuSR/asym.sh @@ -0,0 +1,13 @@ +export ASYM_USE_LEMU=1 + +unset LEMU_TEST_FIELD +unset LEMU_TEST_CFOIL +unset LEMU_TEST_FOCAL_LENGTH +export LEMU_TEST_ASYM=1 + + +rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRPrimaryGeneratorAction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRMuonPhysics.* + diff --git a/geant4/LEMuSR/dawn.sh b/geant4/LEMuSR/dawn.sh new file mode 100644 index 0000000..a5b466f --- /dev/null +++ b/geant4/LEMuSR/dawn.sh @@ -0,0 +1,4 @@ +export G4DAWN_NAMED_PIPE=1 +export G4DAWN_GUI_ALWAYS=1 + + diff --git a/geant4/LEMuSR/field.sh b/geant4/LEMuSR/field.sh new file mode 100644 index 0000000..f15b623 --- /dev/null +++ b/geant4/LEMuSR/field.sh @@ -0,0 +1,10 @@ +export ASYM_USE_LEMU=1 +export LEMU_TEST_FIELD=1 +unset LEMU_TEST_CFOIL +unset LEMU_TEST_FOCAL_LENGTH +unset LEMU_TEST_ASYM + +rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRPrimaryGeneratorAction.* + diff --git a/geant4/LEMuSR/focal.sh b/geant4/LEMuSR/focal.sh new file mode 100644 index 0000000..474dd62 --- /dev/null +++ b/geant4/LEMuSR/focal.sh @@ -0,0 +1,11 @@ +export ASYM_USE_LEMU=1 + +export LEMU_TEST_FOCAL_LENGTH=1 +unset LEMU_TEST_ASYM +unset LEMU_TEST_FIELD + + +rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRPrimaryGeneratorAction.* + diff --git a/geant4/LEMuSR/include/AsymCheck.hh b/geant4/LEMuSR/include/AsymCheck.hh new file mode 100644 index 0000000..b60e49f --- /dev/null +++ b/geant4/LEMuSR/include/AsymCheck.hh @@ -0,0 +1,139 @@ + +#ifndef AsymCheck_h +#define AsymCheck_h 1 + +#include "G4UserSteppingAction.hh" +#include "globals.hh" +#include +#include "LEMuSRVisManager.hh" +#include "LEMuSRDetectorConstruction.hh" +#include "G4RunManager.hh" +#include "G4Run.hh" + + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" + + + +class AsymCheck : public G4UserSteppingAction +{ +public: + + static AsymCheck* GetInstance(); + + AsymCheck() ; + ~AsymCheck() ; + + + + + + + + void UserSteppingAction(const G4Step *theStep); + + void SetParticleVolumeNames(const G4Step *theStep); + + void SetPositionMomentum(const G4Step *theStep); + + void SetTimeEnergy(const G4Step *theStep); + + void SetAngles(const G4Step* aStep); + + void PrintDatas(const G4Step *theStep); + + void SetField(const G4Step *theStep); + + void SetSpinDirection(const G4Step* aStep); + + void SetPositronAngles(const G4Step *theStep); + + G4bool CheckCondition(const G4Step* aStep); + + G4String p_name, v_name, pv_name; + + G4ThreeVector position,momentum,momentum_direction, polarization, m, parpol, p; + + G4double kenergy, tenergy, localtime, globaltime, proptime; + + G4double theta,sintheta, costheta, phi, sinphi, cosphi; + + + +typedef struct { + + Float_t kenergy, tenergy, localtime, globaltime, proptime; + + Float_t theta,phi; + + + + Float_t positionx, positiony,positionz,momdirx,momdiry,momdirz; + + Int_t ID; + + } LEMuSRparticle ; + +typedef struct { + + Float_t asym,L,R,S; + + + } Asym ; + +typedef struct { + + Float_t omegat,time; + + } Spin ; + + + LEMuSRparticle positron; + Asym asym; + Spin spin; + + + void Update(); + + void BookRoot(); + void FillRoot(); + void WriteRoot(); + + void PrintAsym(); + + // TROOT eventTree; + Int_t nevent , comp , split , write , hfill , read ,arg4, arg5 ; + TFile *myFile; + TTree *myTree; + TBranch *b,*b2; + TH1D *hEnergy, *hTime, *hAngle, *hAngle2; + + TTree *tree; + + TFile* F; + TTree *dt; + + Float_t time; + + + G4double L,R,A; + G4double BR1, BR2, dm1,dm2;// decay modes and branching ratios + +private: + + static AsymCheck* pointer; + + +}; + +#endif diff --git a/geant4/LEMuSR/include/FieldCheck.hh b/geant4/LEMuSR/include/FieldCheck.hh new file mode 100644 index 0000000..6fda8a7 --- /dev/null +++ b/geant4/LEMuSR/include/FieldCheck.hh @@ -0,0 +1,138 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : FieldCheck.hh , v 1.2 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-09-17 10:20 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// FIELDCHECK +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +#ifndef FieldCheck_h +#define FieldCheck_h 1 + +#include "G4UserSteppingAction.hh" +#include "globals.hh" +#include +#include "LEMuSRVisManager.hh" +#include "LEMuSRDetectorConstruction.hh" + + + +#include "G4RunManager.hh" +#include "G4EventManager.hh" +#include "G4Run.hh" + + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" + + + +class FieldCheck : public G4UserSteppingAction +{ +public: + + static FieldCheck* GetInstance(); + + FieldCheck() ; + ~FieldCheck() ; + + + void UserSteppingAction(const G4Step *theStep); + + void SetParticleVolumeNames(const G4Step *theStep); + + void SetPositionMomentum(const G4Step *theStep); + + void SetTimeEnergy(const G4Step *theStep); + + void SetAngles(const G4Step* aStep); + + void PrintDatas(const G4Step *theStep); + + void SetField(const G4Step *theStep); + + void SetSpinDirection(const G4Step* aStep); + + void SetPositronAngles(const G4Step *theStep); + + G4bool CheckCondition(const G4Step* aStep); + + G4String p_name, v_name, pv_name; + + G4ThreeVector position,momentum,momentum_direction, polarization, m, parpol, p; + + G4double kenergy, tenergy, localtime, globaltime, proptime, fx, fy, fz, bx,by,bz; + + G4double theta,sintheta, costheta, phi, sinphi, cosphi,charge; + + G4int loop, evt; + +typedef struct { + + Float_t tenergy, localtime, globaltime, proptime; + + Float_t positionx, positiony,positionz,momdirx,momdiry,momdirz; + + Float_t Bx,By,Bz,Ex,Ey,Ez, charge; + Int_t index, event, id; + + } LEMuSRparticle ; + + LEMuSRparticle muon; + + void Update(); + + void BookRoot(); + void FillRoot(); + void WriteRoot(); + + void PrintField(const G4Step *theStep); + + // TROOT eventTree; + Int_t nevent , comp , split , write , hfill , read ,arg4, arg5 ; + TFile *myFile; + TTree *myTree; + TBranch *b,*b2; + TH1D *hEnergy, *hTime, *hAngle, *hAngle2; + + TTree *tree; + + TFile* F; + TTree *dt; + + Float_t time; + + + G4double L,R,A; + + +private: + + static FieldCheck* pointer; + + +}; + +#endif diff --git a/geant4/LEMuSR/include/FocalLengthTest.hh b/geant4/LEMuSR/include/FocalLengthTest.hh new file mode 100644 index 0000000..322976f --- /dev/null +++ b/geant4/LEMuSR/include/FocalLengthTest.hh @@ -0,0 +1,132 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : FocalLengthTest.hh , v 1.2 +// AUTHOR: Taofiq PARAISO +// DATE : 2005-03-02 09:37 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// FocalLengthTest +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +#ifndef FocalLengthTest_h +#define FocalLengthTest_h 1 + +#include "G4UserSteppingAction.hh" +#include "globals.hh" +#include +#include "LEMuSRVisManager.hh" +#include "LEMuSRDetectorConstruction.hh" + +// root histogram classes +#include +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" + + + +class FocalLengthTest : public G4UserSteppingAction +{ +public: + + static FocalLengthTest* GetInstance(); + + FocalLengthTest() ; + ~FocalLengthTest() ; + + void UserSteppingAction(const G4Step *theStep); + + void SetParticleVolumeNames(const G4Step *theStep); + + void SetPositionMomentum(const G4Step *theStep); + + void SetTimeEnergy(const G4Step *theStep); + + void SetAngles(const G4Step* aStep); + + void PrintDatas(const G4Step *theStep); + + void SetField(const G4Step *theStep); + + void SetSpinDirection(const G4Step* aStep); + + void SetPositronAngles(const G4Step *theStep); + + + void LoopKiller(const G4Step*aStep); + G4int loop; + + G4bool CheckCondition(const G4Step* aStep); + + G4String p_name, v_name, pv_name; + + G4ThreeVector position,momentum,momentum_direction, polarization, m, parpol, p; + + G4double kenergy, tenergy, localtime, globaltime, proptime, fx, fy, fz, init_kenergy; + + G4double theta,sintheta, costheta, phi, sinphi, cosphi; + + + +typedef struct { + + Float_t kenergy; + + Float_t focal, ratio; + + Float_t positionx, positiony,positionz,momdirx,momdiry,momdirz; + Int_t index, event; + } LEMuSRparticle ; + + LEMuSRparticle muon; + + void Update(); + + void BookRoot(); + void FillRoot(); + void WriteRoot(); + + void PrintField(const G4Step *theStep); + + // TROOT eventTree; + Int_t nevent , comp , split , write , hfill , read ,arg4, arg5 ; + TFile *myFile; + TTree *myTree; + TBranch *b,*b2; + TH1D *hEnergy, *hTime, *hAngle, *hAngle2; + + TTree *tree; + + TFile* F; + TTree *dt; + + Float_t time; + + + G4double L,R,A; + + +private: + + static FocalLengthTest* pointer; + + +}; + +#endif diff --git a/geant4/LEMuSR/include/G4AtRestSpinPrecession.hh b/geant4/LEMuSR/include/G4AtRestSpinPrecession.hh new file mode 100644 index 0000000..442573c --- /dev/null +++ b/geant4/LEMuSR/include/G4AtRestSpinPrecession.hh @@ -0,0 +1,57 @@ +// +// ******************************************************************** +// * DISCLAIMER * +// * * +// * The following disclaimer summarizes all the specific disclaimers * +// * of contributors to this software. The specific disclaimers,which * +// * govern, are listed with their locations in: * +// * http://cern.ch/geant4/license * +// * * +// * Neither the authors of this software system, nor their employing * +// * institutes,nor the agencies providing financial support for this * +// * work make any representation or warranty, express or implied, * +// * regarding this software system or assume any liability for its * +// * use. * +// * * +// * This code implementation is the intellectual property of the * +// * GEANT4 collaboration. * +// * By copying, distributing or modifying the Program (or any work * +// * based on the Program) you indicate your acceptance of this * +// * statement, and all its terms. * +// ******************************************************************** +// +// ------------------------------------------------------------ +// GEANT 4 class header file +// +// History: +// 17 August 2004 P. Gumplinger +// ------------------------------------------------------------ +// +#ifndef G4AtRestSpinPrecession_hh +#define G4AtRestSpinPrecession_hh 1 + +#include "G4VRestProcess.hh" +#include "G4ParticleChangeForAtRestSP.hh" + +class G4AtRestSpinPrecession : public G4VRestProcess +{ + +public: + G4AtRestSpinPrecession(); + ~G4AtRestSpinPrecession(); + + G4bool IsApplicable(const G4ParticleDefinition&); + G4VParticleChange* AtRestDoIt(const G4Track& aTrack,const G4Step& aStep); + + virtual G4double GetMeanLifeTime(const G4Track&, + G4ForceCondition*); +private: + + G4ParticleChangeForAtRestSP fParticleChange; + + G4ThreeVector NewSpin(const G4Step& aStep, + G4ThreeVector B, G4double deltatime ); + +}; + +#endif diff --git a/geant4/LEMuSR/include/G4DecayWithSpin.hh b/geant4/LEMuSR/include/G4DecayWithSpin.hh new file mode 100644 index 0000000..a8cbb95 --- /dev/null +++ b/geant4/LEMuSR/include/G4DecayWithSpin.hh @@ -0,0 +1,69 @@ +// +// ******************************************************************** +// * DISCLAIMER * +// * * +// * The following disclaimer summarizes all the specific disclaimers * +// * of contributors to this software. The specific disclaimers,which * +// * govern, are listed with their locations in: * +// * http://cern.ch/geant4/license * +// * * +// * Neither the authors of this software system, nor their employing * +// * institutes,nor the agencies providing financial support for this * +// * work make any representation or warranty, express or implied, * +// * regarding this software system or assume any liability for its * +// * use. * +// * * +// * This code implementation is the intellectual property of the * +// * GEANT4 collaboration. * +// * By copying, distributing or modifying the Program (or any work * +// * based on the Program) you indicate your acceptance of this * +// * statement, and all its terms. * +// ******************************************************************** +// +// ------------------------------------------------------------ +// GEANT 4 class header file +// +// History: +// 17 August 2004 P. Gumplinger +// ------------------------------------------------------------ +// +#ifndef G4DecayWithSpin_h +#define G4DecayWithSpin_h 1 + +#include "G4ios.hh" +#include "globals.hh" +#include "G4VRestDiscreteProcess.hh" +#include "G4ParticleChangeForDecay.hh" + +#include "G4Decay.hh" + +class G4VExtDecayer; + +class G4DecayWithSpin : public G4Decay +{ + public: + // Constructors + G4DecayWithSpin(const G4String& processName ="DecayWithSpin"); + + // Destructor + virtual ~G4DecayWithSpin(); + + protected: // With Description + virtual G4VParticleChange* DecayIt( + const G4Track& aTrack, + const G4Step& aStep + ); + // The DecayIt() method returns by pointer a particle-change object, + // which has information of daughter particles. + + // private: +public: + G4ThreeVector Spin_Precession(const G4Step& aStep, + G4ThreeVector B, G4double deltatime ); + + +}; + + + +#endif diff --git a/geant4/LEMuSR/include/G4ParticleChangeForAtRestSP.hh b/geant4/LEMuSR/include/G4ParticleChangeForAtRestSP.hh new file mode 100644 index 0000000..98ca440 --- /dev/null +++ b/geant4/LEMuSR/include/G4ParticleChangeForAtRestSP.hh @@ -0,0 +1,45 @@ +// +// ******************************************************************** +// * DISCLAIMER * +// * * +// * The following disclaimer summarizes all the specific disclaimers * +// * of contributors to this software. The specific disclaimers,which * +// * govern, are listed with their locations in: * +// * http://cern.ch/geant4/license * +// * * +// * Neither the authors of this software system, nor their employing * +// * institutes,nor the agencies providing financial support for this * +// * work make any representation or warranty, express or implied, * +// * regarding this software system or assume any liability for its * +// * use. * +// * * +// * This code implementation is the intellectual property of the * +// * GEANT4 collaboration. * +// * By copying, distributing or modifying the Program (or any work * +// * based on the Program) you indicate your acceptance of this * +// * statement, and all its terms. * +// ******************************************************************** +// +// ------------------------------------------------------------ +// GEANT 4 class header file +// +// History: +// 17 August 2004 P. Gumplinger +// ------------------------------------------------------------ +// +#ifndef G4ParticleChangeForAtRestSP_hh +#define G4ParticleChangeForAtRestSP_hh 1 + +#include "G4ParticleChange.hh" + +class G4ParticleChangeForAtRestSP : public G4ParticleChange +{ +public: + G4ParticleChangeForAtRestSP(); + virtual ~G4ParticleChangeForAtRestSP(); + + virtual G4Step* UpdateStepForAtRest(G4Step* Step); + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRAtRestSpinRotation.hh b/geant4/LEMuSR/include/LEMuSRAtRestSpinRotation.hh new file mode 100644 index 0000000..274c578 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRAtRestSpinRotation.hh @@ -0,0 +1,55 @@ +#ifndef LEMUSRATRESTSPINROTATION_H +#define LEMUSRATRESTSPINROTATION_H 1 + +#include "G4VRestProcess.hh" +#include "G4DynamicParticle.hh" +#include "G4MagneticField.hh" +#include "G4ParticleTypes.hh" +#include "globals.hh" +#include "G4VParticleChange.hh" +#include "G4ios.hh" +#include "G4ForceCondition.hh" +#include "G4ParticleChangeForTransport.hh" +#include "LEMuSRParticleChangeForSR.hh" +class LEMuSRAtRestSpinRotation : public G4VRestProcess +{ +public: + LEMuSRAtRestSpinRotation(const G4String& processName = "SpinRotationAtRest" ); + LEMuSRAtRestSpinRotation(G4VRestProcess& ); + + virtual ~LEMuSRAtRestSpinRotation(); + + static LEMuSRAtRestSpinRotation* GetInstance(); +private: + static LEMuSRAtRestSpinRotation* pointer; + +public: + G4VParticleChange* AtRestDoIt(const G4Track& theTrack, const G4Step& theStep); + + // G4Track + void RotateSpin(const G4Step&, G4ThreeVector, G4double); + + G4double point[4]; + G4double B[3], rotation_angle; + + G4double itime, ftime, deltatime; + G4ThreeVector SpinDirection; + + + G4ParticleChange thePParticleChange; + G4VParticleChange theVParticleChange; + G4ParticleChangeForTransport theTParticleChange; + LEMuSRParticleChangeForSR theParticleChange; + const G4Field *mfield; + + inline G4double GetMeanLifeTime(const G4Track&, G4ForceCondition* condition) + { + *condition = Forced; + return DBL_MAX; + } + G4ThreeVector polar; + + + +}; +#endif diff --git a/geant4/LEMuSR/include/LEMuSRCryoField.hh b/geant4/LEMuSR/include/LEMuSRCryoField.hh new file mode 100644 index 0000000..3641ba0 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRCryoField.hh @@ -0,0 +1,32 @@ +#include "G4ElectricField.hh" +#include"G4ThreeVector.hh" +#include"G4ios.hh" + +class LEMuSRCryoField : public G4ElectricField +{ +public: + + + LEMuSRCryoField(G4ThreeVector FieldVector); + LEMuSRCryoField(G4ThreeVector FieldVector,G4double radius,G4double zmin, G4double zmax,G4double mcpv_z); + ~LEMuSRCryoField(); + + G4bool DoesFieldChangeEnergy() const { return true; } + // Since an electric field can change track energy + + void GetFieldValue(const G4double pos[4], G4double *field) const; + + G4bool uniform; + + + G4double R; + + +private: + G4double flength, fpotential, fradius, fzmin, fzmax; + + + G4ThreeVector position; + G4ThreeVector EField; + +}; diff --git a/geant4/LEMuSR/include/LEMuSRCryoHit.hh b/geant4/LEMuSR/include/LEMuSRCryoHit.hh new file mode 100644 index 0000000..128c317 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRCryoHit.hh @@ -0,0 +1,86 @@ +#ifndef LEMuSRCryoHit_h +#define LEMuSRCryoHit_h 1 + +#include "G4VHit.hh" +#include "G4THitsCollection.hh" +#include "G4Allocator.hh" +#include "G4ThreeVector.hh" +#include "G4LogicalVolume.hh" +#include "G4VPhysicalVolume.hh" + +class LEMuSRCryoHit : public G4VHit +{ +public: + // contructor and destructor + LEMuSRCryoHit(); + ~LEMuSRCryoHit(); + + void Draw(); + void Print(); + void print(G4String name); + + // operator for hit collector definition + LEMuSRCryoHit(const LEMuSRCryoHit &right); + const LEMuSRCryoHit& operator=(const LEMuSRCryoHit &right); + G4int operator==(const LEMuSRCryoHit &right) const; + + inline void *operator new(size_t); + inline void operator delete(void *aHit); + + // private variables + +private: + G4double energy_deposition, time_of_flight, spin; + G4ThreeVector position, momentum; + G4LogicalVolume* lv_Volume; + G4VPhysicalVolume* pv_Volume; + G4String particle_name; + + // inline functions +public: + inline void SetEnergyDeposition(G4double ed){energy_deposition = ed;} + inline void AddEnergyDeposition(G4double ed){energy_deposition += ed;} + inline G4double GetEnergyDeposition(){return energy_deposition;} + + inline void SetTimeOfFlight(G4double tf){ time_of_flight=tf;} + inline void AddTimeOfFlight(G4double tf){ time_of_flight+=tf;} + inline G4double GetTimeOfFlight(){return time_of_flight;} + + inline void SetSpin(G4double sp){ spin=sp;} + inline G4double GetSpin(){return spin;} + + + inline void SetPosition(G4ThreeVector pos){position =pos;} + inline G4ThreeVector GetPosition(){return position;} + + inline void SetMomentum(G4ThreeVector mom){momentum =mom;} + inline G4ThreeVector GetMomentum(){return momentum;} + + inline void SetParticleName(G4String name){particle_name=name;} + inline G4String GetParticleName(){return particle_name;} + + inline G4LogicalVolume* GetLogicalVolume(){return lv_Volume;} + inline G4VPhysicalVolume* GetPhysicalVolume(){return pv_Volume;} + +}; + +// define the collection class according to template G4THitsCollection + +typedef G4THitsCollection LEMuSRCryoHitsCollection; + +extern G4Allocator LEMuSRCryoHitAllocator; + +inline void* LEMuSRCryoHit :: operator new(size_t) +{ + void *aHit; + aHit = (void*) LEMuSRCryoHitAllocator.MallocSingle(); + return aHit; +} + +inline void LEMuSRCryoHit :: operator delete(void *aHit) +{ + LEMuSRCryoHitAllocator.FreeSingle((LEMuSRCryoHit*) aHit); +} + + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRCryoSD.hh b/geant4/LEMuSR/include/LEMuSRCryoSD.hh new file mode 100644 index 0000000..1519663 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRCryoSD.hh @@ -0,0 +1,88 @@ +#ifndef LEMuSRCryoSD_h +#define LEMuSRCryoSD_h 1 + + + +#include "G4VSensitiveDetector.hh" + +#include "LEMuSRCryoHit.hh" +#include "G4RunManager.hh" +#include "G4Run.hh" + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" +#include "LEMuSRCryoHit.hh" + + + +class G4Step; +class G4HCofThisEvent; +class G4TouchableHistory; + +class LEMuSRCryoSD : public G4VSensitiveDetector +{ +public: + + LEMuSRCryoSD(G4String name); + ~LEMuSRCryoSD(); + + void Initialize (G4HCofThisEvent* HCE); + G4bool ProcessHits(G4Step* aStep, G4TouchableHistory*ROhist); + void EndOfEvent (G4HCofThisEvent* HCE); + void clear(); + void DrawAll(); + void PrintAll(); + + void BookRoot(); + void FillRoot(); + void WriteRoot(); + + TFile *myFile; + TTree *myTree; + TTree *tree; + + // HIT datas + + G4String p_name, vname; + G4double spin, edep, toten, kinen, tof, globaltime, proptime; + G4ThreeVector hitpos, hitmom; + G4int ID; + + G4bool condition; + + G4bool CheckCondition(const G4Step* aStep); + + void GetDatas(const G4Step* aStep); + + +typedef struct +{ + Float_t kenergy, tenergy, edeposit; + Float_t localtime, globaltime, proptime; + Float_t positionx, positiony,positionz; + Float_t momdirx,momdiry,momdirz, foil; + Int_t muon,positron,gamma, runid; +} cryoHit ; + + cryoHit theHit; + void getHit(); + +private: + LEMuSRCryoHitsCollection *CryoCollection; + + G4double positionResolution; + G4int mu,e,g; + +}; + + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRCylVector.hh b/geant4/LEMuSR/include/LEMuSRCylVector.hh new file mode 100644 index 0000000..406bb90 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRCylVector.hh @@ -0,0 +1,20 @@ +#ifndef LEMuSRCylVector_h +#define LEMuSRCylVector_h 1 + +#include "G4ThreeVector.hh" +#include "G4UnitsTable.hh" + +class LEMuSRCylVector : public G4ThreeVector +{ +public: + LEMuSRCylVector(); + LEMuSRCylVector(){;} + + + +}; + + + + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRDecay.hh b/geant4/LEMuSR/include/LEMuSRDecay.hh new file mode 100644 index 0000000..a864901 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRDecay.hh @@ -0,0 +1,34 @@ +#ifndef LEMuSRDecay_h +#define LEMuSRDecay_h 1 + +#include "G4Decay.hh" + + +#include "G4ios.hh" +#include "globals.hh" +#include "G4VRestDiscreteProcess.hh" +#include "G4ParticleChangeForDecay.hh" +class G4VExtDecayer; + +class G4Decay; + +class LEMuSRDecay : public G4Decay +{ + +protected: // With Description + virtual G4VParticleChange* DecayIt( + const G4Track& aTrack, + const G4Step& aStep + ); + // The DecayIt() method returns by pointer a particle-change object, + // which has information of daughter particles. + G4ParticleChangeForDecay pParticleChangeForDecay; + // const G4VExtDecayer *m_ExtDecayer; + G4double m_RemainderLifeTime; + +public: +G4int testa, testb; +}; + + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRDepolarize.hh b/geant4/LEMuSR/include/LEMuSRDepolarize.hh new file mode 100644 index 0000000..1ab0e08 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRDepolarize.hh @@ -0,0 +1,88 @@ + +#ifndef LEMuSRDepolarize_h +#define LEMuSRDepolarize_h 1 +#include "G4VDiscreteProcess.hh" +#include "G4EnergyLossTables.hh" +#include "G4GPILSelection.hh" +#include "G4PhysicsLogVector.hh" +#include "G4VPhysicalVolume.hh" +#include "G4VParticleChange.hh" +#include "G4ParticleChange.hh" +#include "G4UnitsTable.hh" +#include "G4MaterialCutsCouple.hh" +#include "G4ForceCondition.hh" + +#include "G4ParticleTable.hh" +#include "G4DynamicParticle.hh" +#include "LEMuSRPrimaryGeneratorAction.hh" +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +class LEMuSRDepolarize : public G4VDiscreteProcess + +{ + public: // with description + LEMuSRDepolarize(const G4String& name="mudep" , + G4ProcessType aType = fElectromagnetic ); + + + ~LEMuSRDepolarize(); + + + G4VParticleChange* AtRestDoIt( + const G4Track& , + const G4Step& + ); + + G4VParticleChange* PreStepDoIt( + const G4Track& , + const G4Step& + ); + + G4VParticleChange* PostStepDoIt( + const G4Track& , + const G4Step& + ); + + + G4double GetMeanFreePath(const G4Track& aTrack, + G4double previousStepSize, + G4ForceCondition* condition + ); + + + + G4bool CheckCondition( const G4Step& aStep); + G4bool CheckCondition( const G4Step* aStep); + + + G4String p_name, vname; + G4double spin, edep, toten, kinen, tof, globaltime, proptime, itime, ftime,gtime, deltatime; + G4ThreeVector hitpos, hitmom; + G4int ID; + + G4bool condition; + + void GetDatas( const G4Step* aStep); + // model parameters + G4ParticleTable* particleTable; + G4ParticleDefinition* particle; + G4double rnd; + G4DynamicParticle *DP; + + G4ParticleChange fParticleChange; + + + void PrepareSecondary(const G4Track&); + G4Track* aSecondary; + + void InitializeSecondaries(const G4Track&); + + + +}; + + +#endif + + + diff --git a/geant4/LEMuSR/include/LEMuSRDetectorConstruction.hh b/geant4/LEMuSR/include/LEMuSRDetectorConstruction.hh new file mode 100644 index 0000000..1524df7 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRDetectorConstruction.hh @@ -0,0 +1,518 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRDetectorConstruction.hh , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-06-24 16:24 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// DETECTOR CONSTRUCTION.HH +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + +#ifndef LEMuSRDetectorConstruction_H +#define LEMuSRDetectorConstruction_H 1 + + +#include "globals.hh" +#include "G4VUserDetectorConstruction.hh" + + +// G4 CLASSES FOR MATERIAL DEFINITION +#include "G4Material.hh" +#include "G4MaterialTable.hh" +#include "G4Element.hh" +#include "G4ElementTable.hh" +#include "G4Isotope.hh" +#include "G4UnitsTable.hh" +#include "G4Transform3D.hh" + +// G4 ATTRIBUTES CLASSES +#include "G4UserLimits.hh" +#include "G4VisAttributes.hh" +#include "G4Colour.hh" + +// G4 SENSITIVE DETECTOR +#include "G4SDManager.hh" +#include "LEMuSRScintSD.hh" +#include "LEMuSROScintSD.hh" +#include "LEMuSRMcpSD.hh" +#include "LEMuSRCryoSD.hh" + +// G4 FIELD MANAGER +#include "G4UniformMagField.hh" +#include "G4UniformElectricField.hh" +#include "G4FieldManager.hh" +#include "LEMuSRRNDMAGField.hh" + + +class LEMuSRDetectorMessenger; // modif + +class G4Box; +class G4Tubs; +class G4Cons; +class G4SubtractionSolid; +class G4UnionSolid; + +class G4LogicalVolume; +class G4VPhysicalVolume; +class G4Material; + + +class LEMuSRDetectorConstruction : public G4VUserDetectorConstruction +{ + +public: + // Constructeur et destructeur + static LEMuSRDetectorConstruction* theDetector; // un pointeur a l'instance + static LEMuSRDetectorConstruction* GetInstance(); + + LEMuSRDetectorConstruction(); + ~LEMuSRDetectorConstruction(); + + + // construction + G4VPhysicalVolume* Construct(); + + G4VPhysicalVolume* lemuDetector(); + + + // messenger + LEMuSRDetectorMessenger* Messenger; + + + + //declaration of all the volumes + + +private: + + //=======LABORATORY::WORLD================= + + // solid + G4Box* LABO_box; + + // logical + G4LogicalVolume* lv_LABO; + + // physical + G4VPhysicalVolume* pv_LABO; + + // materials + G4Material* LABO_material; + + + + //======= MPC2 ================= + + void lemuMCP2(); + + //solids + G4Tubs* MCPV_tube; + G4Tubs* MCPS_tube; + G4Tubs* F160_tube; + G4Tubs* F100_tube; + G4Tubs* F200_tube; + G4Tubs* GATV_tube; + G4Tubs* GATS_tube; + G4UnionSolid* MCPV_vtube; + + + // logicals volumes + G4LogicalVolume* lv_MCPV; + G4LogicalVolume* lv_MCPS ; + G4LogicalVolume* lv_F160 ; + G4LogicalVolume* lv_F100 ; + G4LogicalVolume* lv_F200 ; + G4LogicalVolume* lv_GATV; + G4LogicalVolume* lv_GATS ; + + // physical volumes + G4VPhysicalVolume* pv_MCPV; + G4VPhysicalVolume* pv_MCPS; + G4VPhysicalVolume* pv_F160 ; + G4VPhysicalVolume* pv_F100 ; + G4VPhysicalVolume* pv_F200 ; + G4VPhysicalVolume* pv_GATV; + G4VPhysicalVolume* pv_GATS ; + + void buildAnodeField(); + + + // parameter +public: + G4double mcpv_z; + G4int Grid, Guards; + + + +//=================== ANODE ======================= +private: + + void lemuANODE(); + + // solids + G4Cons* RA_E_cone; + G4Cons* RA_M_cone; + G4Box *RA_Ebox, *RA_Mbox; + G4SubtractionSolid* RA_E, *RA_M; + G4Tubs* RA_G_tube, *RAV_tube; + + // logical + G4LogicalVolume* lv_RA_E ; + G4LogicalVolume* lv_RA_M ; + G4LogicalVolume* lv_RA_G ; + G4LogicalVolume* lv_RAV ; + + // physical + G4VPhysicalVolume* pv_RA_E ; + G4VPhysicalVolume* pv_RA_M ; + G4VPhysicalVolume* pv_RA_G ; + G4VPhysicalVolume* pv_RAV ; + + + + + +//================ MCP DETECTOR ===================== +private: + void lemuMCPdet(); + + // solids + G4Tubs* DMCP_tube; + G4Tubs* MCPM_tube; + G4Box* MCPA_box; + G4Tubs* ANVA_tube; + G4Box* MCSR_box; + G4Tubs* MCVR_tube; + G4Tubs* MCSS_tube; + + // logical volumes + G4LogicalVolume* lv_DMCP ; + G4LogicalVolume* lv_MCPA ; + G4LogicalVolume* lv_MCPM ; + G4LogicalVolume* lv_ANVA ; + G4LogicalVolume* lv_MCSR ; + G4LogicalVolume* lv_MCVR ; + G4LogicalVolume* lv_MCSS ; + + // physical volumes + G4VPhysicalVolume* pv_DMCP ; + G4VPhysicalVolume* pv_MCPA ; + G4VPhysicalVolume* pv_MCPM ; + G4VPhysicalVolume* pv_MCPM2; + G4VPhysicalVolume* pv_ANVA ; + G4VPhysicalVolume* pv_ANVA2; + G4VPhysicalVolume* pv_MCSR ; + G4VPhysicalVolume* pv_MCVR ; + G4VPhysicalVolume* pv_MCSS ; + + // parameters +public: + G4double B; // magnetic field default unit gauss + +//================ CRYOSTAT ====================== +private: + void lemuCRYO(); + + // solids + G4Tubs* SAH1_tube; + G4Tubs* SAH2_tube; + G4Tubs* SAH3_tube; + G4Tubs* SAPH_tube; + G4Tubs* COFI_tube; + G4Tubs* CRY1_tube; + G4Tubs* CRY2_tube; + G4Tubs* CRY3_tube; + G4Tubs* CRY4_tube; + G4Tubs* CRSH_tube; + G4Tubs* cryoField_tube; + G4Tubs* CRSH2_tube; + G4Tubs* Guard_Rings; + + // logical volumes + G4LogicalVolume* lv_SAH1 ; + G4LogicalVolume* lv_SAH2 ; + G4LogicalVolume* lv_SAH3; + G4LogicalVolume* lv_SAPH ; + G4LogicalVolume* lv_COFI ; + G4LogicalVolume* lv_CRY1 ; + G4LogicalVolume* lv_CRY2 ; + G4LogicalVolume* lv_CRY3 ; + G4LogicalVolume* lv_CRY4 ; + G4LogicalVolume* lv_CRSH ; + G4LogicalVolume* lv_CRSH2 ; + G4LogicalVolume* lv_Guards ; + G4LogicalVolume* lv_cryoField ; + + + // physical volumes + G4VPhysicalVolume* pv_SAH1 ; + G4VPhysicalVolume* pv_SAH2 ; + G4VPhysicalVolume* pv_SAH3 ; + G4VPhysicalVolume* pv_SAPH ; + G4VPhysicalVolume* pv_COFI ; + G4VPhysicalVolume* pv_CRY1 ; + G4VPhysicalVolume* pv_CRY2 ; + G4VPhysicalVolume* pv_CRY3 ; + G4VPhysicalVolume* pv_CRY4 ; + G4VPhysicalVolume* pv_CRSH ; + G4VPhysicalVolume* pv_CRSH2 ; + G4VPhysicalVolume* pv_Guard1 ; + G4VPhysicalVolume* pv_Guard2 ; + G4VPhysicalVolume* pv_cryoField; + + // Cryo electric field manager + G4FieldManager* cryoFieldMgr; + G4ElectricField* cryoField; + + G4FieldManager* sampleFieldMgr; + G4MagneticField* sampleField; + + + void buildCryoField(); + void NEWMAPS(); + +public: + // Parameters + G4double cryoFieldLength,cryoVoltage; + G4String Material_SAH; + + + //================ LINSE three ====================== +private: + void lemuLinse3(); + + // solids + G4Tubs* L3VA_tube; + G4Tubs* L3ST_tube; + G4Tubs* L3F_tube; // flange + + G4SubtractionSolid* L3GP_tube; + G4Tubs* L3GP1, *L3GP2, *L3GP3; // L3GV_tube is a boolean + + + G4SubtractionSolid* L3HP_tube; + + G4Tubs* L3HP1, *L3HP2 , *L3HP3, *L3HP4, *L3HP5; + + // logical volumes + G4LogicalVolume* lv_L3VA ; + G4LogicalVolume* lv_L3ST ; + G4LogicalVolume* lv_L3F;//flange + + // Ground potential + G4LogicalVolume* lv_L3GP1, *lv_L3GP2 , *lv_L3GP3; + + // High potential + G4LogicalVolume* lv_L3HP, *lv_L3HP3, *lv_L3HP4, *lv_L3HP5 ; + + + + // physical volumes + G4double L3z; + G4VPhysicalVolume* pv_L3VA ; + G4VPhysicalVolume* pv_L3ST ; + G4VPhysicalVolume* pv_L3F1, *pv_L3F2 ;// flanges + + + G4VPhysicalVolume* pv_L3GP1, *pv_L3GP2, *pv_L3GP3, *pv_L3GP4, *pv_L3GP5, *pv_L3GP6, *pv_L3GP7, *pv_L3GP8 ; + + G4VPhysicalVolume* pv_L3HP, *pv_L3HP3, *pv_L3HP4, *pv_L3HP5 , *pv_L3HP6, *pv_L3HP7, *pv_L3HP8; + G4VPhysicalVolume* pv_L3GV2 ; + + + + //================ TRIGGER DETECTOR ==================== +private: + void lemuTrigger_Detector(); + + // solids + G4Tubs* Trigger_tube; + G4Tubs* TriggerV_tube; + G4Tubs* TriggerF_tube; // flange + + G4Box* Trigger_box, *Trigger_box2, *Trigger_box3; + + // magnetic field manager + G4FieldManager* T1FieldMgr; + G4UniformElectricField* T1Field; + // magnetic field manager + G4FieldManager* T2FieldMgr; + G4UniformElectricField* T2Field; + // magnetic field manager + G4FieldManager* T3FieldMgr; + G4UniformElectricField* T3Field; + + + // logical + G4LogicalVolume *lv_Trigger, *lv_TriggerF, *lv_TriggerV, *lv_TriggerB, *lv_TriggerB2, *lv_TriggerB3, *lv_CFOIL; + // physica.l + G4VPhysicalVolume *pv_Trigger, *pv_TriggerF1, *pv_TriggerF2,*pv_TriggerV, *pv_TriggerB, *pv_TriggerB2, *pv_TriggerB3, *pv_CFOIL; + + + //================ COMPENSATION GATE ==================== +private: + void lemuCGate(); + + // solids + G4Tubs* CGate_tube; + G4Tubs* CGateV_tube; + G4Tubs* CGateF_tube; // flange + // logical + G4LogicalVolume *lv_CGate, *lv_CGateF, *lv_CGateV; + // physica.l + G4VPhysicalVolume *pv_CGate, *pv_CGateF1, *pv_CGateF2,*pv_CGateV; + + + //======= INNER/OUTER SCINTILLATOR ================= +private: + void lemuSCINT(); + + + //solids + G4Tubs* SCIS_tube; + G4Tubs* SCOS_tube; + + // logicals volumes + G4LogicalVolume* lv_SCIS; + G4LogicalVolume* lv_SCOS ; + + // physical volumes + G4VPhysicalVolume* pv_SCISl; + G4VPhysicalVolume* pv_SCOSl; + + G4VPhysicalVolume* pv_SCISr; + G4VPhysicalVolume* pv_SCOSr; + + G4VPhysicalVolume* pv_SCISb; + G4VPhysicalVolume* pv_SCOSb; + + G4VPhysicalVolume* pv_SCISt; + G4VPhysicalVolume* pv_SCOSt; + G4Transform3D rotation1; + G4Transform3D rotation2; + G4Transform3D rotation3; + + + + + //================ ASYMETRY TEST VOLUMES ================ +private: + void lemuAsym(); + + // solids + G4Tubs* Asym_tube; + // logical + G4LogicalVolume *lv_Asym, *lv_AsymL, *lv_AsymR; + // physica.l + G4VPhysicalVolume *pv_Asym, *pv_Asym2, *pv_AsymL, *pv_AsymR; + G4Transform3D Asym_rotation; + + + + //========= ELECTRIC FIELD TEST VOLUMES ================ +private: + void lemuFieldCheck(); + // solids + G4Tubs* fchk_tube; + // logical + G4LogicalVolume* lv_fchk, *lv_fchk2,*lv_fchk3; + // physical + G4VPhysicalVolume* pv_fchk,*pv_fchk2,*pv_fchk3,*pv_fchk4,*pv_fchk5,*pv_fchk6,*pv_fchk7,*pv_fchk8,*pv_fchk9,*pv_fchk1,*pv_fchk10,*pv_fchk11,*pv_fchk12,*pv_fchk13,*pv_fchk14,*pv_fchk15,*pv_fchk16,*pv_fchk17,*pv_fchk18,*pv_fchk19,*pv_fchk20,*pv_fchk21,*pv_fchk22,*pv_fchk23,*pv_fchk24,*pv_fchk25,*pv_fchk26,*pv_fchk27,*pv_fchk28,*pv_fchk29,*pv_fchk30,*pv_fchk31,*pv_fchk32,*pv_fchk33,*pv_fchk34,*pv_fchk35,*pv_fchk36,*pv_fchk37,*pv_fchk38,*pv_fchk39,*pv_fchk40,*pv_fchk41,*pv_fchk42,*pv_fchk43,*pv_fchk44,*pv_fchk45,*pv_fchk46,*pv_fchk47,*pv_fchk48,*pv_fchk49,*pv_fchk50,*pv_fchk51,*pv_fchk52,*pv_fchk53,*pv_fchk54,*pv_fchk55,*pv_fchk56,*pv_fchk57,*pv_fchk58,*pv_fchk59,*pv_fchk60,*pv_fchk61,*pv_fchk62,*pv_fchk63,*pv_fchk64,*pv_fchk65,*pv_fchk66,*pv_fchk67,*pv_fchk68,*pv_fchk69,*pv_fchk70,*pv_fchk71,*pv_fchk72; + + + //====== SENSITIVE DETECTORS ========================== +public: + LEMuSRCryoSD *CryoSD; + LEMuSRMcpSD *McpSD; + LEMuSRScintSD *iScintSD; + LEMuSROScintSD *oScintSD; + G4int scint, mcp, cryo; + + + //====== MATERIAL DECLARATION ========================= +private: + void MaterialsDefinition(); + + //materials + G4Material* SC_material; + G4Material* SAH_material; + G4Material* SAPH_material; + G4Material* Scint_material; + G4Material* DMCP_material; + G4Material* Vacuum ; + G4Material* SSteel ; + G4Material* Copper ; + G4Material* Macor ; + G4Material* Carbon ; + + + //====== ATTRIBUTES SETTING ========================= + void LoadAttributes(); + + G4VisAttributes* Blue_style, *Red_style, *Purple_style, *Green_style, *Yellow_style, *dRed_style , *dYellow_style, *lBlue_style,*fBlue_style, *dBlue_style, *oxsteel; + G4VisAttributes* VTBB_style,*MCP_style, *MACOR_style, *SCINT_style, *dSCINT_style; + G4VisAttributes* White_style; + + + G4UserLimits* VTBB_lim; + + + //====== ARGUMENTS AND PARAMETERS====================== + +public: + G4double dSPhi; // starting angle for detector + G4double dEPhi; // ending angle for detector + + G4double sSPhi; // starting angle for detector + G4double sEPhi; // ending angle for detector + + G4int magfield, elfield, anode_elfield, trigger_field; + G4double L3FieldVal,AnodeFieldVal,RALval,RARval, FieldStepLim, cfthk; + G4FieldManager* L3FieldMgr, *GFieldMgr; + G4double offset, mcdetector, halfview; + G4double AsymCheck; + G4double RA_Ez, RA_Mz, RA_Gz, GATVz; + inline G4double GetParamMC(){return mcdetector;} + + //======= TEMPLATE Volume To Be Built ================= + + void lemuVTBB(); + + //solids + G4Tubs* VTBB_tube; + + // logicals volumes + G4LogicalVolume* lv_VTBB; + + + // physical volumes + G4VPhysicalVolume* pv_VTBB; + + + + //materials + G4Material* VTBB_material; + + + + + + // print STATUS + void PrintStatus(); +}; + +#endif + diff --git a/geant4/LEMuSR/include/LEMuSRDetectorMessenger.hh b/geant4/LEMuSR/include/LEMuSRDetectorMessenger.hh new file mode 100644 index 0000000..a3d83c5 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRDetectorMessenger.hh @@ -0,0 +1,85 @@ +#ifndef LEMuSRDetectorMessenger_h +#define LEMuSRDetectorMessenger_h 1 + + +#include "G4ios.hh" +#include "globals.hh" +#include "G4UImessenger.hh" +#include "LEMuSRDetectorConstruction.hh" +#include "LEMuSRElectricField.hh" +#include "G4RunManager.hh" + +#include "G4UIdirectory.hh" +#include "G4UIcmdWith3VectorAndUnit.hh" +#include "G4UIcmdWith3Vector.hh" +#include "G4UIcmdWithADoubleAndUnit.hh" +#include "G4UIcmdWithAString.hh" +#include "G4UIcmdWithADouble.hh" + +#include "G4UIcmdWithAnInteger.hh" +#include "G4UIcmdWithoutParameter.hh" +#include "G4UIcommand.hh" +#include "G4UImanager.hh" +#include "G4UIterminal.hh" +#include "G4UItcsh.hh" + +class G4UIcommand; +class G4UIdirectory; +class G4UIcmdWithADouble; +class G4UIcmdWithADoubleAndUnit; +class G4UIcmdWith3VectorAndUnit; +class G4UIcmdWith3Vector; +class G4UIcmdWithAnInteger; +class G4UIcmdWithAString; +class G4UIcmdWithoutParameter; +class LEMuSRDetectorConstruction; //modif + +class LEMuSRDetectorMessenger : public G4UImessenger { +public: + LEMuSRDetectorMessenger(LEMuSRDetectorConstruction*); + ~LEMuSRDetectorMessenger(); + + +public: + void SetNewValue(G4UIcommand* command, G4String newvalue); + + + //arguments +private: + LEMuSRDetectorConstruction* theDetector; + + // commands +private: + + G4UIdirectory* DetMode; + + //commands with STRING + G4UIcmdWithAString* SetDetMode ; + G4UIcmdWithAString* SetElField ; + G4UIcmdWithAString* SetGrid ; + G4UIcmdWithAString* SetGuards ; + G4UIcmdWithAString* SetDetVisualization ; + G4UIcmdWithAString* SetSAHmaterial ; + + G4UIcmdWithAString* SetAsymCheck ; + G4UIcmdWithAString* SetFieldCheck ; + + //commands with DOUBLE + G4UIcmdWithADouble* SetThirdLensPotential, *SetCFthk ; + G4UIcmdWithADouble* SetFieldStepLim ; + G4UIcmdWithADouble* SetMagField ; + + G4UIcmdWithADouble* SetCryoPotential; + + + //coomand with 3vector + G4UIcmdWith3Vector* SetRAPotential; + + + + G4VPhysicalVolume* newDetector; + + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSREMPhysics.hh b/geant4/LEMuSR/include/LEMuSREMPhysics.hh new file mode 100644 index 0000000..d69a821 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSREMPhysics.hh @@ -0,0 +1,61 @@ +// ------------------------------------------- +// History +// first version 12 Nov. 2000 by H.Kurashige +// ------------------------------------------------------------ +#ifndef LEMuSREMPhysics_h +#define LEMuSREMPhysics_h 1 + +#include "globals.hh" +#include "G4ios.hh" + +#include "G4VPhysicsConstructor.hh" + +#include "G4PhotoElectricEffect.hh" +#include "G4ComptonScattering.hh" +#include "G4GammaConversion.hh" +#include "G4MultipleScattering.hh" +#include "G4eIonisation.hh" +#include "G4eBremsstrahlung.hh" +#include "G4eplusAnnihilation.hh" + +class LEMuSREMPhysics : public G4VPhysicsConstructor +{ + public: + LEMuSREMPhysics(const G4String& name ="EM"); + virtual ~LEMuSREMPhysics(); + + public: + // This method will be invoked in the Construct() method. + // each particle type will be instantiated + virtual void ConstructParticle(); + + // This method will be invoked in the Construct() method. + // each physics process will be instantiated and + // registered to the process manager of each particle type + virtual void ConstructProcess(); + + protected: + // Gamma physics + G4PhotoElectricEffect thePhotoEffect; + G4ComptonScattering theComptonEffect; + G4GammaConversion thePairProduction; + + // Electron physics + G4MultipleScattering theElectronMultipleScattering; + G4eIonisation theElectronIonisation; + G4eBremsstrahlung theElectronBremsStrahlung; + + //Positron physics + G4MultipleScattering thePositronMultipleScattering; + G4eIonisation thePositronIonisation; + G4eBremsstrahlung thePositronBremsStrahlung; + G4eplusAnnihilation theAnnihilation; +}; + + +#endif + + + + + diff --git a/geant4/LEMuSR/include/LEMuSRElFieldMix.hh b/geant4/LEMuSR/include/LEMuSRElFieldMix.hh new file mode 100644 index 0000000..3b8b146 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRElFieldMix.hh @@ -0,0 +1,70 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID :LEMuSRElFieldMix.hh , v 1.3 +// AUTHOR: Taofiq PARAISO +// DATE : 2005-02-14 15:15 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// Electric Field MIX +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +#ifndef LEMUSRELECTRICFIELDMIX_H +#define LEMUSRELECTRICFIELDMIX_H 1 + +#include"G4ElectricField.hh" +#include"G4ElectroMagneticField.hh" +#include "globals.hh" +#include "G4ios.hh" + +#include +#include +#include +#include +#include +#include "CLHEP/Matrix/Vector.h" +#include "CLHEP/Matrix/Matrix.h" + + +#include "LEMuSRElectricField.hh" + +class LEMuSRElFieldMix : public G4ElectricField +{ +public: + + + LEMuSRElFieldMix( LEMuSRElectricField* E1, LEMuSRElectricField* E2, G4double field1_val, G4double field2_val); + + LEMuSRElFieldMix( G4ElectricField* E1, G4ElectricField* E2, G4double field1_val, G4double field2_val); + + + + + ~LEMuSRElFieldMix(); + + void GetFieldValue(const G4double point[4], G4double *Bfield) const; + + void Test(); + +public: + G4double coef1, coef2; + // LEMuSRElectricField* field1, *field2; + G4ElectricField* field1, *field2; + + +}; + +#endif + + diff --git a/geant4/LEMuSR/include/LEMuSRElMagField.hh b/geant4/LEMuSR/include/LEMuSRElMagField.hh new file mode 100644 index 0000000..ae804dc --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRElMagField.hh @@ -0,0 +1,43 @@ +#ifndef LEMUSRELECTRICMAGFIELD_H +#define LEMUSRELECTRICMAGFIELD_H 1 + +#include"G4ElectricField.hh" +#include"G4MagneticField.hh" +#include"G4ElectroMagneticField.hh" +#include "globals.hh" +#include "G4ios.hh" + +#include +#include +#include +#include +#include +#include "CLHEP/Matrix/Vector.h" +#include "CLHEP/Matrix/Matrix.h" + + +#include "LEMuSRElectricField.hh" + +class LEMuSRElMagField : public G4MagneticField +{ +public: + + + LEMuSRElMagField( G4ElectricField* E, G4MagneticField* B, G4double field1_val, G4double field2_val); + + ~LEMuSRElMagField(); + + void GetFieldValue(const G4double point[4], G4double *Bfield) const; + + void Test(); + + G4bool DoesFieldChangeEnergy() const { return true; }// important to state that field changes energy (electric part!!!) + +public: + G4double coef1, coef2; + G4ElectricField* field1; + G4MagneticField* field2; + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRElMag_SpinEqRhs.hh b/geant4/LEMuSR/include/LEMuSRElMag_SpinEqRhs.hh new file mode 100644 index 0000000..72100fa --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRElMag_SpinEqRhs.hh @@ -0,0 +1,41 @@ + + +#ifndef LEMuSRELMAG_SPIN_EQRHS +#define LEMuSRELMAG_SPIN_EQRHS + +#include "G4Types.hh" +#include "G4Mag_EqRhs.hh" + +class G4MagneticField; + +class LEMuSRElMag_SpinEqRhs : public G4Mag_EqRhs +{ + public: // with description + + LEMuSRElMag_SpinEqRhs( G4MagneticField* MagField ); + ~LEMuSRElMag_SpinEqRhs(); + // Constructor and destructor. No actions. + + void SetChargeMomentumMass(G4double particleCharge, // in e+ units + G4double MomentumXc, + G4double mass); + + void EvaluateRhsGivenB( const G4double y[], + const G4double B[3], + G4double dydx[] ) const; + // Given the value of the magnetic field B, this function + // calculates the value of the derivative dydx. + + private: + + G4double omegac; + G4double anomaly; + G4double ParticleCharge; + + G4double E; + G4double gamma, m_mass; + G4double beta; + G4double cst; +}; + +#endif /* LEMuSRELMAG_SPIN_EQRHS */ diff --git a/geant4/LEMuSR/include/LEMuSRElectricField.hh b/geant4/LEMuSR/include/LEMuSRElectricField.hh new file mode 100644 index 0000000..037ee07 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRElectricField.hh @@ -0,0 +1,81 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID :LEMuSRElectricField.hh , v 1.3 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-09-17 10:20 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// Electric Field +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +#ifndef LEMUSRELECTRICFIELD_H +#define LEMUSRELECTRICFIELD_H 1 + +#include"G4ElectricField.hh" +#include"G4ElectroMagneticField.hh" +#include "globals.hh" +#include "G4ios.hh" + +#include +#include +#include +#include +#include +#include "CLHEP/Matrix/Vector.h" +#include "CLHEP/Matrix/Matrix.h" + + + +class LEMuSRElectricField : public G4ElectricField +{ +public: + + + LEMuSRElectricField(G4double fieldval,const char* Xfile, + const char* Yfile, + const char* Zfile,G4String map_length_unit, + G4double Offset, G4double nx, G4double ny, G4double nz);//offset must be entered in millimeter + + LEMuSRElectricField(G4double fieldval,const char* file,G4String map_length_unit, + G4double Offset, G4double nx, G4double ny, G4double nz); + + + ~LEMuSRElectricField(); + + void GetFieldValue(const G4double Point[4], G4double *Bfield) const; + + void Test(); + +public: + // std::vector< std::vector< std::vector< G4double > > > xField; // vector of + // vector of + // vector of G4doubles [[[a]i]j]k + + // std::vector< std::vector< std::vector< G4double > > > yField; + // std::vector< std::vector< std::vector< G4double > > > zField; + + G4double xField[90][90][201]; + G4double yField[90][90][201]; + G4double zField[90][90][201]; + // The physical limits of the defined region + G4double minx, maxx, miny, maxy, minz, maxz; + + G4double dx, dy, dz, zOffset, nx,ny,nz, FieldVal; + G4String map_unit; +}; + +#endif + + diff --git a/geant4/LEMuSR/include/LEMuSRElectricField.hh~ b/geant4/LEMuSR/include/LEMuSRElectricField.hh~ new file mode 100644 index 0000000..47d921f --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRElectricField.hh~ @@ -0,0 +1,81 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID :LEMuSRElectricField.hh , v 1.3 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-09-17 10:20 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// Electric Field +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +#ifndef LEMUSRELECTRICFIELD_H +#define LEMUSRELECTRICFIELD_H 1 + +#include"G4ElectricField.hh" +#include"G4ElectroMagneticField.hh" +#include "globals.hh" +#include "G4ios.hh" + +#include +#include +#include +#include +#include +#include "CLHEP/Matrix/Vector.h" +#include "CLHEP/Matrix/Matrix.h" + + + +class LEMuSRElectricField : public G4ElectricField +{ +public: + + + LEMuSRElectricField(G4double fieldval,const char* Xfile, + const char* Yfile, + const char* Zfile,G4String map_length_unit, + G4double Offset, G4double nx, G4double ny, G4double nz);//offset must be entered in millimeter + + LEMuSRElectricField(G4double fieldval,const char* file,G4String map_length_unit, + G4double Offset, G4double nx, G4double ny, G4double nz); + + + ~LEMuSRElectricField(); + + void GetFieldValue(const G4double Point[4], G4double *Bfield) const; + + void Test(); + +public: + // std::vector< std::vector< std::vector< G4double > > > xField; // vector of + // vector of + // vector of G4doubles [[[a]i]j]k + + // std::vector< std::vector< std::vector< G4double > > > yField; + // std::vector< std::vector< std::vector< G4double > > > zField; + + G4double xField*; + G4double yField*; + G4double zField*; + // The physical limits of the defined region + G4double minx, maxx, miny, maxy, minz, maxz; + + G4double dx, dy, dz, zOffset, nx,ny,nz, FieldVal; + G4String map_unit; +}; + +#endif + + diff --git a/geant4/LEMuSR/include/LEMuSREqMagElectricField.hh b/geant4/LEMuSR/include/LEMuSREqMagElectricField.hh new file mode 100644 index 0000000..4a0c91c --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSREqMagElectricField.hh @@ -0,0 +1,82 @@ +// +// ******************************************************************** +// * DISCLAIMER * +// * * +// * The following disclaimer summarizes all the specific disclaimers * +// * of contributors to this software. The specific disclaimers,which * +// * govern, are listed with their locations in: * +// * http://cern.ch/geant4/license * +// * * +// * Neither the authors of this software system, nor their employing * +// * institutes,nor the agencies providing financial support for this * +// * work make any representation or warranty, express or implied, * +// * regarding this software system or assume any liability for its * +// * use. * +// * * +// * This code implementation is the intellectual property of the * +// * GEANT4 collaboration. * +// * By copying, distributing or modifying the Program (or any work * +// * based on the Program) you indicate your acceptance of this * +// * statement, and all its terms. * +// ******************************************************************** +// +// +// $Id$ +// GEANT4 tag $Name$ +// +// +// class LEMuSREqMagElectricField +// +// Class description: +// +// This is the right-hand side of equation of motion in a combined +// electric and magnetic field. + +// History: +// - Created. V.Grichine, 10.11.98 +// ------------------------------------------------------------------- + + +#ifndef LEMuSREQMAGELECTRICFIELD_hh +#define LEMuSREQMAGELECTRICFIELD_hh + +#include "G4EquationOfMotion.hh" +#include "G4ElectroMagneticField.hh" + +class LEMuSREqMagElectricField : public G4EquationOfMotion +{ + public: // with description + + LEMuSREqMagElectricField(G4ElectroMagneticField *emField ) + : G4EquationOfMotion( emField ) {;} + + ~LEMuSREqMagElectricField() {;} + + void SetChargeMomentumMass(G4double particleCharge, // in e+ units + G4double MomentumXc, + G4double mass); + + void EvaluateRhsGivenB(const G4double y[], + const G4double Field[], + G4double dydx[] ) const; + // Given the value of the electromagnetic field, this function + // calculates the value of the derivative dydx. + + private: + + G4double fElectroMagCof ; + G4double fMassCof; + + G4double omegac; + G4double anomaly; + G4double ParticleCharge; + + G4double E; + G4double gamma; + G4double beta; + + + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSREventAction.hh b/geant4/LEMuSR/include/LEMuSREventAction.hh new file mode 100644 index 0000000..2663bd5 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSREventAction.hh @@ -0,0 +1,97 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION +// ID : LEMuSREventAction.hh , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-07-07 11:15 +// +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// EVENT ACTION.HH +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//// + +// + +#ifndef LEMuSREventAction_h +#define LEMuSREventAction_h 1 + +#include "G4UserEventAction.hh" +#include "globals.hh" + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" +#include "LEMuSRCryoHit.hh" + +class G4EventManager; +class G4Event; + + +class LEMuSREventAction : public G4UserEventAction +{ +public: + LEMuSREventAction(); + ~LEMuSREventAction(); +public: // with description + void BeginOfEventAction(const G4Event* anEvent); + void EndOfEventAction(const G4Event* anEvent); + + void SetDrawFlag (G4String val) {drawFlag = val;}; + // Two virtual method the user can override. + +void SDCollManagement(const G4Event* evt); + + +private: + G4String drawFlag; + + G4int iScintCollID, oScintCollID, CryoCollID, McpCollID; + + + + + + // root variables +public: + + // TROOT eventTree; + Int_t nevent , comp , split , write , hfill , read ,arg4, arg5 ; + TFile *myFile; + TTree *myTree; + TBranch *b; + TH1D *hTest ,*hTest2,*hTest3, *hTest4; + + + LEMuSRCryoHit* aHit; + G4double en_dep; + + + + typedef struct { + G4double lifetime, energy, angle; + } PRIMDATAS; + + + PRIMDATAS PMdatas; + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRGeneralPhysics.hh b/geant4/LEMuSR/include/LEMuSRGeneralPhysics.hh new file mode 100644 index 0000000..04a57c6 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRGeneralPhysics.hh @@ -0,0 +1,46 @@ +// History +// first version 12 Nov. 2000 by H.Kurashige +// ------------------------------------------------------------ +#ifndef LEMuSRGeneralPhysics_h +#define LEMuSRGeneralPhysics_h 1 + +#include "globals.hh" +#include "G4ios.hh" + +#include "G4VPhysicsConstructor.hh" +#include "G4StepLimiter.hh" + +#include "LEMuSRDecay.hh" + +class LEMuSRGeneralPhysics : public G4VPhysicsConstructor +{ +public: + LEMuSRGeneralPhysics(const G4String& name = "general"); + virtual ~LEMuSRGeneralPhysics(); + +public: + // This method will be invoked in the Construct() method. + // each particle type will be instantiated + virtual void ConstructParticle(); + + // This method will be invoked in the Construct() method. + // each physics process will be instantiated and + // registered to the process manager of each particle type + virtual void ConstructProcess(); + +protected: + LEMuSRDecay fDecayProcess; + G4StepLimiter fStepLimiter; +}; + + +#endif + + + + + + + + + diff --git a/geant4/LEMuSR/include/LEMuSRHadronPhysics.hh b/geant4/LEMuSR/include/LEMuSRHadronPhysics.hh new file mode 100644 index 0000000..32d48f1 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRHadronPhysics.hh @@ -0,0 +1,322 @@ +// $Id$ +// GEANT4 tag $Name$ +// +// ------------------------------------------------------------ +// GEANT 4 class header file +// +// This class is an derived class of G4VPhysicsConstructor +// +// ------------------------------------------------------------ +#ifndef LEMuSRHadronPhysics_h +#define LEMuSRHadronPhysics_h 1 + +#include "globals.hh" +#include "G4ios.hh" +#include + +#include "G4VPhysicsConstructor.hh" + +#include "G4MultipleScattering.hh" +#include "G4hIonisation.hh" + +#include "G4HadronElasticProcess.hh" +#include "G4HadronFissionProcess.hh" +#include "G4HadronCaptureProcess.hh" + +#include "G4PionPlusInelasticProcess.hh" +#include "G4PionMinusInelasticProcess.hh" +#include "G4KaonPlusInelasticProcess.hh" +#include "G4KaonZeroSInelasticProcess.hh" +#include "G4KaonZeroLInelasticProcess.hh" +#include "G4KaonMinusInelasticProcess.hh" +#include "G4ProtonInelasticProcess.hh" +#include "G4AntiProtonInelasticProcess.hh" +#include "G4NeutronInelasticProcess.hh" +#include "G4AntiNeutronInelasticProcess.hh" +#include "G4LambdaInelasticProcess.hh" +#include "G4AntiLambdaInelasticProcess.hh" +#include "G4SigmaPlusInelasticProcess.hh" +#include "G4SigmaMinusInelasticProcess.hh" +#include "G4AntiSigmaPlusInelasticProcess.hh" +#include "G4AntiSigmaMinusInelasticProcess.hh" +#include "G4XiZeroInelasticProcess.hh" +#include "G4XiMinusInelasticProcess.hh" +#include "G4AntiXiZeroInelasticProcess.hh" +#include "G4AntiXiMinusInelasticProcess.hh" +#include "G4DeuteronInelasticProcess.hh" +#include "G4TritonInelasticProcess.hh" +#include "G4AlphaInelasticProcess.hh" +#include "G4OmegaMinusInelasticProcess.hh" +#include "G4AntiOmegaMinusInelasticProcess.hh" + +// Low-energy Models +#include "G4LElastic.hh" +#include "G4LFission.hh" +#include "G4LCapture.hh" + +#include "G4LEPionPlusInelastic.hh" +#include "G4LEPionMinusInelastic.hh" +#include "G4LEKaonPlusInelastic.hh" +#include "G4LEKaonZeroSInelastic.hh" +#include "G4LEKaonZeroLInelastic.hh" +#include "G4LEKaonMinusInelastic.hh" +#include "G4LEProtonInelastic.hh" +#include "G4LEAntiProtonInelastic.hh" +#include "G4LENeutronInelastic.hh" +#include "G4LEAntiNeutronInelastic.hh" +#include "G4LELambdaInelastic.hh" +#include "G4LEAntiLambdaInelastic.hh" +#include "G4LESigmaPlusInelastic.hh" +#include "G4LESigmaMinusInelastic.hh" +#include "G4LEAntiSigmaPlusInelastic.hh" +#include "G4LEAntiSigmaMinusInelastic.hh" +#include "G4LEXiZeroInelastic.hh" +#include "G4LEXiMinusInelastic.hh" +#include "G4LEAntiXiZeroInelastic.hh" +#include "G4LEAntiXiMinusInelastic.hh" +#include "G4LEDeuteronInelastic.hh" +#include "G4LETritonInelastic.hh" +#include "G4LEAlphaInelastic.hh" +#include "G4LEOmegaMinusInelastic.hh" +#include "G4LEAntiOmegaMinusInelastic.hh" + +// High-energy Models + +#include "G4HEPionPlusInelastic.hh" +#include "G4HEPionMinusInelastic.hh" +#include "G4HEKaonPlusInelastic.hh" +#include "G4HEKaonZeroInelastic.hh" +#include "G4HEKaonZeroInelastic.hh" +#include "G4HEKaonMinusInelastic.hh" +#include "G4HEProtonInelastic.hh" +#include "G4HEAntiProtonInelastic.hh" +#include "G4HENeutronInelastic.hh" +#include "G4HEAntiNeutronInelastic.hh" +#include "G4HELambdaInelastic.hh" +#include "G4HEAntiLambdaInelastic.hh" +#include "G4HESigmaPlusInelastic.hh" +#include "G4HESigmaMinusInelastic.hh" +#include "G4HEAntiSigmaPlusInelastic.hh" +#include "G4HEAntiSigmaMinusInelastic.hh" +#include "G4HEXiZeroInelastic.hh" +#include "G4HEXiMinusInelastic.hh" +#include "G4HEAntiXiZeroInelastic.hh" +#include "G4HEAntiXiMinusInelastic.hh" +#include "G4HEOmegaMinusInelastic.hh" +#include "G4HEAntiOmegaMinusInelastic.hh" + +// Stopping processes +#include "G4AntiProtonAnnihilationAtRest.hh" +#include "G4AntiNeutronAnnihilationAtRest.hh" + +#ifdef TRIUMF_STOP_PIMINUS +#include "G4PionMinusAbsorptionAtRest.hh" +#else +#include "G4PiMinusAbsorptionAtRest.hh" +#endif +#ifdef TRIUMF_STOP_KMINUS +#include "G4KaonMinusAbsorption.hh" +#else +#include "G4KaonMinusAbsorptionAtRest.hh" +#endif + +// quark gluon string model with chips afterburner. +#include "G4TheoFSGenerator.hh" +#include "G4ExcitationHandler.hh" +#include "G4PreCompoundModel.hh" +#include "G4GeneratorPrecompoundInterface.hh" +#include "G4QGSModel.hh" +#include "G4QGSParticipants.hh" +#include "G4QGSMFragmentation.hh" +#include "G4ExcitedStringDecay.hh" + +class LEMuSRHadronPhysics : public G4VPhysicsConstructor +{ + public: + LEMuSRHadronPhysics(const G4String& name ="hadron"); + virtual ~LEMuSRHadronPhysics(); + + public: + // This method will be invoked in the Construct() method. + // each particle type will be instantiated + virtual void ConstructParticle(); + + // This method will be invoked in the Construct() method. + // each physics process will be instantiated and + // registered to the process manager of each particle type + virtual void ConstructProcess(); + + protected: + // Elastic Process + G4HadronElasticProcess theElasticProcess; + G4LElastic* theElasticModel; + + // Pi + + G4PionPlusInelasticProcess thePionPlusInelastic; + G4LEPionPlusInelastic* theLEPionPlusModel; + G4MultipleScattering thePionPlusMult; + G4hIonisation thePionPlusIonisation; + + // Pi - + G4PionMinusInelasticProcess thePionMinusInelastic; + G4LEPionMinusInelastic* theLEPionMinusModel; + G4MultipleScattering thePionMinusMult; + G4hIonisation thePionMinusIonisation; +#ifdef TRIUMF_STOP_PIMINUS + G4PionMinusAbsorptionAtRest thePionMinusAbsorption; +#else + G4PiMinusAbsorptionAtRest thePionMinusAbsorption; +#endif + + // pi+ and pi- + + G4TheoFSGenerator theTheoModel; + G4ExcitationHandler theHandler; + G4PreCompoundModel * thePreEquilib; + G4GeneratorPrecompoundInterface theCascade; + G4QGSModel< G4QGSParticipants > theStringModel; + G4QGSMFragmentation theFragmentation; + G4ExcitedStringDecay * theStringDecay; + + // K + + G4KaonPlusInelasticProcess theKaonPlusInelastic; + G4LEKaonPlusInelastic* theLEKaonPlusModel; + G4HEKaonPlusInelastic* theHEKaonPlusModel; + G4MultipleScattering theKaonPlusMult; + G4hIonisation theKaonPlusIonisation; + + // K - + G4KaonMinusInelasticProcess theKaonMinusInelastic; + G4LEKaonMinusInelastic* theLEKaonMinusModel; + G4HEKaonMinusInelastic* theHEKaonMinusModel; + G4MultipleScattering theKaonMinusMult; + G4hIonisation theKaonMinusIonisation; +#ifdef TRIUMF_STOP_KMINUS + G4KaonMinusAbsorption theKaonMinusAbsorption; +#else + G4PiMinusAbsorptionAtRest theKaonMinusAbsorption; +#endif + + // K0L + G4KaonZeroLInelasticProcess theKaonZeroLInelastic; + G4LEKaonZeroLInelastic* theLEKaonZeroLModel; + G4HEKaonZeroInelastic* theHEKaonZeroLModel; + + // K0S + G4KaonZeroSInelasticProcess theKaonZeroSInelastic; + G4LEKaonZeroSInelastic* theLEKaonZeroSModel; + G4HEKaonZeroInelastic* theHEKaonZeroSModel; + + // Proton + G4ProtonInelasticProcess theProtonInelastic; + G4LEProtonInelastic* theLEProtonModel; + G4HEProtonInelastic* theHEProtonModel; + G4MultipleScattering theProtonMult; + G4hIonisation theProtonIonisation; + + // anti-proton + G4AntiProtonInelasticProcess theAntiProtonInelastic; + G4LEAntiProtonInelastic* theLEAntiProtonModel; + G4HEAntiProtonInelastic* theHEAntiProtonModel; + G4MultipleScattering theAntiProtonMult; + G4hIonisation theAntiProtonIonisation; + G4AntiProtonAnnihilationAtRest theAntiProtonAnnihilation; + + // neutron + G4NeutronInelasticProcess theNeutronInelastic; + G4LENeutronInelastic* theLENeutronModel; + G4HENeutronInelastic* theHENeutronModel; + G4HadronFissionProcess theNeutronFission; + G4LFission* theNeutronFissionModel; + G4HadronCaptureProcess theNeutronCapture; + G4LCapture* theNeutronCaptureModel; + + + // anti-neutron + G4AntiNeutronInelasticProcess theAntiNeutronInelastic; + G4LEAntiNeutronInelastic* theLEAntiNeutronModel; + G4HEAntiNeutronInelastic* theHEAntiNeutronModel; + G4AntiNeutronAnnihilationAtRest theAntiNeutronAnnihilation; + + // Lambda + G4LambdaInelasticProcess theLambdaInelastic; + G4LELambdaInelastic* theLELambdaModel; + G4HELambdaInelastic* theHELambdaModel; + + // AntiLambda + G4AntiLambdaInelasticProcess theAntiLambdaInelastic; + G4LEAntiLambdaInelastic* theLEAntiLambdaModel; + G4HEAntiLambdaInelastic* theHEAntiLambdaModel; + + // SigmaMinus + G4SigmaMinusInelasticProcess theSigmaMinusInelastic; + G4LESigmaMinusInelastic* theLESigmaMinusModel; + G4HESigmaMinusInelastic* theHESigmaMinusModel; + G4MultipleScattering theSigmaMinusMult; + G4hIonisation theSigmaMinusIonisation; + + // AntiSigmaMinus + G4AntiSigmaMinusInelasticProcess theAntiSigmaMinusInelastic; + G4LEAntiSigmaMinusInelastic* theLEAntiSigmaMinusModel; + G4HEAntiSigmaMinusInelastic* theHEAntiSigmaMinusModel; + G4MultipleScattering theAntiSigmaMinusMult; + G4hIonisation theAntiSigmaMinusIonisation; + + // SigmaPlus + G4SigmaPlusInelasticProcess theSigmaPlusInelastic; + G4LESigmaPlusInelastic* theLESigmaPlusModel; + G4HESigmaPlusInelastic* theHESigmaPlusModel; + G4MultipleScattering theSigmaPlusMult; + G4hIonisation theSigmaPlusIonisation; + + // AntiSigmaPlus + G4AntiSigmaPlusInelasticProcess theAntiSigmaPlusInelastic; + G4LEAntiSigmaPlusInelastic* theLEAntiSigmaPlusModel; + G4HEAntiSigmaPlusInelastic* theHEAntiSigmaPlusModel; + G4MultipleScattering theAntiSigmaPlusMult; + G4hIonisation theAntiSigmaPlusIonisation; + + // XiZero + G4XiZeroInelasticProcess theXiZeroInelastic; + G4LEXiZeroInelastic* theLEXiZeroModel; + G4HEXiZeroInelastic* theHEXiZeroModel; + + // AntiXiZero + G4AntiXiZeroInelasticProcess theAntiXiZeroInelastic; + G4LEAntiXiZeroInelastic* theLEAntiXiZeroModel; + G4HEAntiXiZeroInelastic* theHEAntiXiZeroModel; + + // XiMinus + G4XiMinusInelasticProcess theXiMinusInelastic; + G4LEXiMinusInelastic* theLEXiMinusModel; + G4HEXiMinusInelastic* theHEXiMinusModel; + G4MultipleScattering theXiMinusMult; + G4hIonisation theXiMinusIonisation; + + // AntiXiMinus + G4AntiXiMinusInelasticProcess theAntiXiMinusInelastic; + G4LEAntiXiMinusInelastic* theLEAntiXiMinusModel; + G4HEAntiXiMinusInelastic* theHEAntiXiMinusModel; + G4MultipleScattering theAntiXiMinusMult; + G4hIonisation theAntiXiMinusIonisation; + + // OmegaMinus + G4OmegaMinusInelasticProcess theOmegaMinusInelastic; + G4LEOmegaMinusInelastic* theLEOmegaMinusModel; + G4HEOmegaMinusInelastic* theHEOmegaMinusModel; + G4MultipleScattering theOmegaMinusMult; + G4hIonisation theOmegaMinusIonisation; + + // AntiOmegaMinus + G4AntiOmegaMinusInelasticProcess theAntiOmegaMinusInelastic; + G4LEAntiOmegaMinusInelastic* theLEAntiOmegaMinusModel; + G4HEAntiOmegaMinusInelastic* theHEAntiOmegaMinusModel; + G4MultipleScattering theAntiOmegaMinusMult; + G4hIonisation theAntiOmegaMinusIonisation; + + +}; + + +#endif + diff --git a/geant4/LEMuSR/include/LEMuSRIonPhysics.hh b/geant4/LEMuSR/include/LEMuSRIonPhysics.hh new file mode 100644 index 0000000..9d4a3d4 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRIonPhysics.hh @@ -0,0 +1,80 @@ +// ------------------------------------------- +// History +// first version 12 Nov. 2000 by H.Kurashige +// ------------------------------------------------------------ +#ifndef LEMuSRIonPhysics_h +#define LEMuSRIonPhysics_h 1 + +#include "globals.hh" +#include "G4ios.hh" + +#include "G4VPhysicsConstructor.hh" + +#include "G4HadronElasticProcess.hh" +#include "G4LElastic.hh" + +#include "G4DeuteronInelasticProcess.hh" +#include "G4LEDeuteronInelastic.hh" + +#include "G4TritonInelasticProcess.hh" +#include "G4LETritonInelastic.hh" + +#include "G4AlphaInelasticProcess.hh" +#include "G4LEAlphaInelastic.hh" + +#include "G4hIonisation.hh" +#include "G4ionIonisation.hh" +#include "G4MultipleScattering.hh" + +class LEMuSRIonPhysics : public G4VPhysicsConstructor +{ + public: + LEMuSRIonPhysics(const G4String& name="ion"); + virtual ~LEMuSRIonPhysics(); + + public: + // This method will be invoked in the Construct() method. + // each particle type will be instantiated + virtual void ConstructParticle(); + + // This method will be invoked in the Construct() method. + // each physics process will be instantiated and + // registered to the process manager of each particle type + virtual void ConstructProcess(); + + protected: + // Elastic Process + G4HadronElasticProcess theElasticProcess; + G4LElastic* theElasticModel; + + // Generic Ion physics + G4MultipleScattering fIonMultipleScattering; + G4ionIonisation fIonIonisation; + + // Deuteron physics + G4MultipleScattering fDeuteronMultipleScattering; + G4hIonisation fDeuteronIonisation; + G4DeuteronInelasticProcess fDeuteronProcess; + G4LEDeuteronInelastic* fDeuteronModel; + + // Triton physics + G4MultipleScattering fTritonMultipleScattering; + G4hIonisation fTritonIonisation; + G4TritonInelasticProcess fTritonProcess; + G4LETritonInelastic* fTritonModel; + + // Alpha physics + G4MultipleScattering fAlphaMultipleScattering; + G4hIonisation fAlphaIonisation; + G4AlphaInelasticProcess fAlphaProcess; + G4LEAlphaInelastic* fAlphaModel; + + // He3 physics + G4MultipleScattering fHe3MultipleScattering; + G4hIonisation fHe3Ionisation; + +}; + + +#endif + diff --git a/geant4/LEMuSR/include/LEMuSRMSC.hh b/geant4/LEMuSR/include/LEMuSRMSC.hh new file mode 100644 index 0000000..86cc646 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMSC.hh @@ -0,0 +1,227 @@ +// +// ******************************************************************** +// * DISCLAIMER * +// * * +// * The following disclaimer summarizes all the specific disclaimers * +// * of contributors to this software. The specific disclaimers,which * +// * govern, are listed with their locations in: * +// * http://cern.ch/geant4/license * +// * * +// * Neither the authors of this software system, nor their employing * +// * institutes,nor the agencies providing financial support for this * +// * work make any representation or warranty, express or implied, * +// * regarding this software system or assume any liability for its * +// * use. * +// * * +// * This code implementation is the intellectual property of the * +// * GEANT4 collaboration. * +// * By copying, distributing or modifying the Program (or any work * +// * based on the Program) you indicate your acceptance of this * +// * statement, and all its terms. * +// ******************************************************************** +// +// $Id$ +// GEANT4 tag $Name$ +// +//------------- G4MultipleScattering52 physics process -------------------------- +// by Laszlo Urban, March 2001 +// +// 07-08-01 new methods Store/Retrieve PhysicsTable +// 23-08-01 new angle and z distribution,energy dependence reduced, +// Store,Retrieve methods commented out temporarily, L.Urban +// 11-09-01 G4MultipleScatteringx put as default: G4MultipleScattering +// Store,Retrieve methods reactived (mma) +// 13-09-01 Unused TrueToGeomTransformation method deleted, +// class description (L.Urban) +// 19-09-01 come back to previous process name msc +// 17-04-02 NEW angle distribution + boundary algorithm modified, L.Urban +// 22-04-02 boundary algorithm modified -> important improvement in timing !!!! +// (L.Urban) +// 24-04-02 some minor changes in boundary algorithm, L.Urban +// 24-05-02 changes in data members, L.Urban +// 30-10-02 changes in data members, L.Urban +// 05-02-03 changes in data members, L.Urban +// 18-04-03 Change signature of GetTransportMeanFreePath (V.Ivanchenko) +// 08-08-03 This class is frozen at the release 5.2 (V.Ivanchenko) +// 08-11-04 Remove Store/Retrieve tables (V.Ivantchenko) + +//------------------------------------------------------------------------------ + +// class description +// +// The class simulates the multiple scattering for any kind +// of charged particle. +// +// class description - end + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +#ifndef LEMuSRMSC_h +#define LEMuSRMSC_h 1 +#include "G4VContinuousDiscreteProcess.hh" +#include "G4EnergyLossTables.hh" +#include "G4GPILSelection.hh" +#include "G4PhysicsLogVector.hh" +#include "G4VPhysicalVolume.hh" +#include "G4ParticleChangeForMSC.hh" +#include "G4UnitsTable.hh" +#include "G4MaterialCutsCouple.hh" +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +class LEMuSRMSC : public G4VContinuousDiscreteProcess + +{ + public: // with description + + LEMuSRMSC(const G4String& processName="lemumsc"); + + ~LEMuSRMSC(); + + G4bool IsApplicable ( const G4ParticleDefinition& ); + // returns true for charged particles, false otherwise + + void BuildPhysicsTable(const G4ParticleDefinition& aParticleType); + // This function overloads the corresponding virtual function + // of the base class G4VContinuousDiscreteProcess. + // It is invoked by the G4ParticleWithCuts()::SetCut() method. + // It prepares the table of the transport mean free paths + // for every material. + + void PrintInfoDefinition(); + // Print few lines of informations about the process: validity range, + // origine ..etc.. + // Invoked by BuildPhysicsTable(). + + G4double AlongStepGetPhysicalInteractionLength(const G4Track&, + G4double previousStepSize, + G4double currentMinimumStep, + G4double& currentSafety, + G4GPILSelection* selection); + // The function overloads the corresponding function of the base + // class.It limits the step near to boundaries only + // and invokes the method GetContinuousStepLimit at every step. + + G4double GetContinuousStepLimit(const G4Track& aTrack, + G4double previousStepSize, + G4double currentMinimumStep, + G4double& currentSafety); + // It performs the true step length --> geometrical step length + // transformation. It is invoked by the + // AlongStepGetPhysicalInteractionLength method. + + G4double GetMeanFreePath(const G4Track& aTrack, + G4double previousStepSize, + G4ForceCondition* condition); + // It sets the force condition to true only + // in order to have the PostStepDoIt called at every step. + // This function overloads a virtual function of the base class. + // It is invoked by the ProcessManager of the Particle. + + + G4double GetTransportMeanFreePath( + G4double KineticEnergy,const G4MaterialCutsCouple* couple); + // Just a utility method to get the values of the transport + // mean free path . (It is not used inside the class.) + + G4VParticleChange* AlongStepDoIt(const G4Track& aTrack,const G4Step& aStep); + // The geometrical step length --> true path length transformation + // is performed here (the inverse of the transformation done + // by GetContinuousStepLimit). + + G4VParticleChange* PostStepDoIt(const G4Track& aTrack,const G4Step& aStep); + // It computes the final state of the particle: samples the + // scattering angle and computes the lateral displacement. + // The final state is returned as a ParticleChange object. + // This function overloads a virtual function of the base class. + // It is invoked by the ProcessManager of the Particle. + + void Setsamplez(G4bool value) {samplez = value;}; + // geom. step length distribution should be sampled or not + + void Setdtrl(G4double value) {dtrl = value;}; + // to reduce the energy/step dependence + + void SetBoundary(G4bool value) {boundary = value;}; + void Setfacxsi(G4double value) {facxsi = value; + G4cout << " facxsi=" << facxsi << G4endl;}; + void SetFacrange(G4double val) {facrange=val; + nsmallstep = G4int(std::log((cf+facrange-1.)/ + facrange)/std::log(cf))+1 ; + G4cout << " fr=" << facrange + << " nsmall=" << nsmallstep << G4endl ;}; + // Steplimit after boundary crossing = facrange*range + // estimated nb of steps at boundary nsmallstep = 1/facrange + + + void SetLateralDisplacementFlag(G4bool flag) {fLatDisplFlag = flag;}; + // lateral displacement to be/not to be computed + + void SetNuclCorrPar(G4double val) {NuclCorrPar = val;}; + void SetFactPar(G4double val) {FactPar = val;}; + + protected: // with description + + virtual G4double ComputeTransportCrossSection( + const G4ParticleDefinition& aParticleType, + G4double KineticEnergy, + G4double AtomicNumber, + G4double AtomicWeight); + // It computes the transport cross section. + // The transport mean free path is 1/(transport cross section). + + private: + + // hide assignment operator as private + LEMuSRMSC & operator = (const LEMuSRMSC &right); + LEMuSRMSC ( const LEMuSRMSC &); + + private: // data members + + G4PhysicsTable* theTransportMeanFreePathTable; + + G4double taubig,tausmall,taulim; + + G4double LowestKineticEnergy; + G4double HighestKineticEnergy; + G4int TotBin; + + G4int materialIndex; + + G4double tLast; + G4double zLast; + + // model parameters + G4bool boundary; // spec. handling near boundaries + G4double facrange,tlimit,tlimitmin,cf; + G4int stepno,stepnolastmsc,nsmallstep ; + G4double laststep ; + G4GPILSelection valueGPILSelectionMSC; + + G4double zmean; // z(geom.step length) + G4bool samplez ; // distribution + + G4double range,T0,T1,lambda0,lambda1, // used to reduce the energy + Tlow,alam,blam,dtrl,lambdam, // (or step length) dependence + clam,zm,cthm; + + // with/without lateral displacement + G4bool fLatDisplFlag; + + // nuclear size effect correction + G4double NuclCorrPar; + G4double FactPar; + + G4ParticleChangeForMSC fParticleChange; + + G4double alfa1,alfa2,alfa3,b,xsi,c0,facxsi ; // angle distr. parameters + // facxsi : some tuning + // possibility in the tail +}; + +#include "LEMuSRMSC.icc" + +#endif + + + diff --git a/geant4/LEMuSR/include/LEMuSRMSC.icc b/geant4/LEMuSR/include/LEMuSRMSC.icc new file mode 100644 index 0000000..e7a5779 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMSC.icc @@ -0,0 +1,97 @@ +// +// ******************************************************************** +// * DISCLAIMER * +// * * +// * The following disclaimer summarizes all the specific disclaimers * +// * of contributors to this software. The specific disclaimers,which * +// * govern, are listed with their locations in: * +// * http://cern.ch/geant4/license * +// * * +// * Neither the authors of this software system, nor their employing * +// * institutes,nor the agencies providing financial support for this * +// * work make any representation or warranty, express or implied, * +// * regarding this software system or assume any liability for its * +// * use. * +// * * +// * This code implementation is the intellectual property of the * +// * GEANT4 collaboration. * +// * By copying, distributing or modifying the Program (or any work * +// * based on the Program) you indicate your acceptance of this * +// * statement, and all its terms. * +// ******************************************************************** +// +// $Id$ +// GEANT4 tag $Name$ +// +//------------ LEMuSRMSC physics process --------------------------- +// by Laszlo Urban, March 2001 +// +// Modified: +// +// 18-05-01 V.Ivanchenko Clean up against Linux ANSI compilation +// 23-08-01 new angle and z distribution,energy dependence reduced, +// Store,Retrieve methods commented out temporarily, L.Urban +// 27-08-01 bugfix in AlongStepDoIt, L.Urban +// 28-08-01 GetContinuousStepLimit and AlongStepDoIt moved to .cc file (mma) +// 11-09-01 G4MultipleScatteringx put as default: G4MultipleScattering (mma) +// 15-01-03 Migrade to cut per region (V.Ivanchenko) +// 18-04-03 Change signature of GetTransportMeanFreePath (V.Ivanchenko) +// 16-06-03: ShortLived are not applicable any more (V.Ivanchenko) +// 08-08-03 This class is frozen at the release 5.2 (V.Ivanchenko) +// +//------------------------------------------------------------------------------ + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +inline +G4bool LEMuSRMSC::IsApplicable(const G4ParticleDefinition& particle) +{ + return(particle.GetPDGCharge() != 0. && !particle.IsShortLived()); +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +inline G4double LEMuSRMSC::AlongStepGetPhysicalInteractionLength( + const G4Track& track, + G4double previousStepSize, + G4double currentMinimumStep, + G4double& currentSafety, + G4GPILSelection* selection) +{ + // get Step limit proposed by the process + G4double steplength = GetContinuousStepLimit(track,previousStepSize, + currentMinimumStep,currentSafety); + // set return value for G4GPILSelection + *selection = valueGPILSelectionMSC; + return steplength; +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +inline G4double LEMuSRMSC::GetMeanFreePath( + const G4Track&, + G4double, + G4ForceCondition* condition) + + // it does not limit the Step size , but it sets condition to + // Forced , because the PostStepDoIt always has to be called + +{ + *condition = Forced; + return DBL_MAX; +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +inline +G4double LEMuSRMSC::GetTransportMeanFreePath(G4double KineticEnergy, + const G4MaterialCutsCouple* couple) +{ + G4bool isOut; + + return (*theTransportMeanFreePathTable) + (couple->GetIndex())->GetValue(KineticEnergy,isOut); +} + + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... diff --git a/geant4/LEMuSR/include/LEMuSRMUONIUM.hh b/geant4/LEMuSR/include/LEMuSRMUONIUM.hh new file mode 100644 index 0000000..01c96ef --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMUONIUM.hh @@ -0,0 +1,81 @@ + +#ifndef LEMuSRMUONIUM_h +#define LEMuSRMUONIUM_h 1 +#include "G4VDiscreteProcess.hh" +#include "G4EnergyLossTables.hh" +#include "G4GPILSelection.hh" +#include "G4PhysicsLogVector.hh" +#include "G4VPhysicalVolume.hh" +#include "G4VParticleChange.hh" +#include "G4UnitsTable.hh" +#include "G4MaterialCutsCouple.hh" +#include "G4ForceCondition.hh" + +#include "G4ParticleTable.hh" +#include "G4DynamicParticle.hh" +#include "LEMuSRPrimaryGeneratorAction.hh" + +#include "yields.h" +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +class LEMuSRMUONIUM : public G4VDiscreteProcess + +{ + public: // with description + LEMuSRMUONIUM(const G4String& name="Muformation" , + G4ProcessType aType = fElectromagnetic ); + + + ~LEMuSRMUONIUM(); + + G4VParticleChange* PostStepDoIt( + const G4Track& , + const G4Step& + ); + G4double GetMeanFreePath(const G4Track& aTrack, + G4double previousStepSize, + G4ForceCondition* condition + ); + + + + G4bool CheckCondition( const G4Step& aStep); + G4bool CheckCondition( const G4Step* aStep); + + + G4String p_name, vname; + G4double spin, edep, toten, kinen, tof, globaltime, proptime; + G4ThreeVector hitpos, hitmom; + G4int ID; + + G4bool condition; + + void GetDatas( const G4Step* aStep); + // model parameters + G4ParticleTable* particleTable; + G4ParticleDefinition* particle; + Yields Gonin; + G4double yvector[3]; + G4double rnd; + G4DynamicParticle *DP; + + G4VParticleChange fParticleChange; + + + + + + void PrepareSecondary(const G4Track&); + G4Track* aSecondary; + + void InitializeSecondaries(const G4Track&); + + + +}; + + +#endif + + + diff --git a/geant4/LEMuSR/include/LEMuSRMUONIUMScatt.hh b/geant4/LEMuSR/include/LEMuSRMUONIUMScatt.hh new file mode 100644 index 0000000..12b6e5f --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMUONIUMScatt.hh @@ -0,0 +1,80 @@ + +#ifndef LEMuSRMUONIUMScatt_h +#define LEMuSRMUONIUMScatt_h 1 +#include "G4VDiscreteProcess.hh" +#include "G4EnergyLossTables.hh" +#include "G4GPILSelection.hh" +#include "G4PhysicsLogVector.hh" +#include "G4VPhysicalVolume.hh" +#include "G4VParticleChange.hh" +#include "G4ParticleChange.hh" +#include "G4UnitsTable.hh" +#include "G4MaterialCutsCouple.hh" +#include "G4ForceCondition.hh" + +#include "G4ParticleTable.hh" +#include "G4DynamicParticle.hh" +#include "LEMuSRPrimaryGeneratorAction.hh" + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +class LEMuSRMUONIUMScatt : public G4VDiscreteProcess + +{ + public: // with description + LEMuSRMUONIUMScatt(const G4String& name="Muscatt" , + G4ProcessType aType = fGeneral ); + + + ~LEMuSRMUONIUMScatt(); + + G4VParticleChange* PostStepDoIt( + const G4Track& , + const G4Step& + ); + G4double GetMeanFreePath(const G4Track& aTrack, + G4double previousStepSize, + G4ForceCondition* condition + ); + + + + G4bool CheckCondition( const G4Step& aStep); + G4bool CheckCondition( const G4Step* aStep); + + + G4String p_name, vname; + G4double spin, edep, toten, kinen, tof, globaltime, proptime; + G4ThreeVector hitpos, hitmom; + G4int ID; + + G4bool condition; + + void GetDatas( const G4Step* aStep); + // model parameters + G4ParticleTable* particleTable; + G4ParticleDefinition* particle; + G4double yvector[3]; + G4double rnd; + G4DynamicParticle *DP; + + G4ParticleChange fParticleChange; + + + + + + void PrepareSecondary(const G4Track&); + G4Track* aSecondary; + + void InitializeSecondaries(const G4Track&); + + + +}; + + +#endif + + + diff --git a/geant4/LEMuSR/include/LEMuSRMag_SpinEqRhs.hh b/geant4/LEMuSR/include/LEMuSRMag_SpinEqRhs.hh new file mode 100644 index 0000000..20dec9b --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMag_SpinEqRhs.hh @@ -0,0 +1,77 @@ +// +// ******************************************************************** +// * DISCLAIMER * +// * * +// * The following disclaimer summarizes all the specific disclaimers * +// * of contributors to this software. The specific disclaimers,which * +// * govern, are listed with their locations in: * +// * http://cern.ch/geant4/license * +// * * +// * Neither the authors of this software system, nor their employing * +// * institutes,nor the agencies providing financial support for this * +// * work make any representation or warranty, express or implied, * +// * regarding this software system or assume any liability for its * +// * use. * +// * * +// * This code implementation is the intellectual property of the * +// * GEANT4 collaboration. * +// * By copying, distributing or modifying the Program (or any work * +// * based on the Program) you indicate your acceptance of this * +// * statement, and all its terms. * +// ******************************************************************** +// +// +// $Id$ +// GEANT4 tag $Name$ +// +// +// class G4Mag_SpinEqRhs +// +// Class description: +// +// This is the equation of motion for a particle with spin in a pure +// magnetic field. The three components of the particle's spin are +// treated utilising BMT equation. + +// History: +// - Created: J.Apostolakis, P.Gumplinger - February 8th, 1999. +// -------------------------------------------------------------------- + +#ifndef LEMuSRMAG_SPIN_EQRHS +#define LEMuSRMAG_SPIN_EQRHS + +#include "G4Types.hh" +#include "G4Mag_EqRhs.hh" + +class G4MagneticField; + +class LEMuSRMag_SpinEqRhs : public G4Mag_EqRhs +{ + public: // with description + + LEMuSRMag_SpinEqRhs( G4MagneticField* MagField ); + ~LEMuSRMag_SpinEqRhs(); + // Constructor and destructor. No actions. + + void SetChargeMomentumMass(G4double particleCharge, // in e+ units + G4double MomentumXc, + G4double mass); + + void EvaluateRhsGivenB( const G4double y[], + const G4double B[3], + G4double dydx[] ) const; + // Given the value of the magnetic field B, this function + // calculates the value of the derivative dydx. + + private: + + G4double omegac; + G4double anomaly; + G4double ParticleCharge; + + G4double E; + G4double gamma; + G4double beta; +}; + +#endif /* LEMuSRMAG_SPIN_EQRHS */ diff --git a/geant4/LEMuSR/include/LEMuSRMagneticField.hh b/geant4/LEMuSR/include/LEMuSRMagneticField.hh new file mode 100644 index 0000000..63c4697 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMagneticField.hh @@ -0,0 +1,28 @@ +#include "G4UniformMagField.hh" +#include"G4ThreeVector.hh" +#include"G4ios.hh" + +class LEMuSRMagneticField : public G4UniformMagField +{ +public: + + + LEMuSRMagneticField(const G4ThreeVector FieldVector); + ~LEMuSRMagneticField(); + + void GetFieldValue(const G4double pos[4], G4double *field) const; + + G4bool uniform; + + + G4double R; + + +private: + G4double flength, fpotential, fradius, fzmin, fzmax; + + + G4ThreeVector position; + G4ThreeVector BField; + +}; diff --git a/geant4/LEMuSR/include/LEMuSRMcpHit.hh b/geant4/LEMuSR/include/LEMuSRMcpHit.hh new file mode 100644 index 0000000..26c580a --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMcpHit.hh @@ -0,0 +1,86 @@ +#ifndef LEMuSRMcpHit_h +#define LEMuSRMcpHit_h 1 + +#include "G4VHit.hh" +#include "G4THitsCollection.hh" +#include "G4Allocator.hh" +#include "G4ThreeVector.hh" +#include "G4LogicalVolume.hh" +#include "G4VPhysicalVolume.hh" + +class LEMuSRMcpHit : public G4VHit +{ +public: + // contructor and destructor + LEMuSRMcpHit(); + ~LEMuSRMcpHit(); + + void Draw(); + void Print(); + void print(G4String name); + + // operator for hit collector definition + LEMuSRMcpHit(const LEMuSRMcpHit &right); + const LEMuSRMcpHit& operator=(const LEMuSRMcpHit &right); + G4int operator==(const LEMuSRMcpHit &right) const; + + inline void *operator new(size_t); + inline void operator delete(void *aHit); + + // private variables + +private: + G4double energy_deposition, time_of_flight,spin; + G4ThreeVector position, momentum; + G4LogicalVolume* lv_Volume; + G4VPhysicalVolume* pv_Volume; + G4String particle_name; + + // inline functions +public: + inline void SetEnergyDeposition(G4double ed){energy_deposition = ed;} + inline void AddEnergyDeposition(G4double ed){energy_deposition += ed;} + inline G4double GetEnergyDeposition(){return energy_deposition;} + + inline void SetTimeOfFlight(G4double tf){ time_of_flight=tf;} + inline void AddTimeOfFlight(G4double tf){ time_of_flight+=tf;} + inline G4double GetTimeOfFlight(){return time_of_flight;} + + inline void SetSpin(G4double sp){ spin=sp;} + inline G4double GetSpin(){return spin;} + + inline void SetPosition(G4ThreeVector pos){position =pos;} + inline G4ThreeVector GetPosition(){return position;} + + inline void SetMomentum(G4ThreeVector mom){momentum =mom;} + inline G4ThreeVector GetMomentum(){return momentum;} + + inline void SetParticleName(G4String name){particle_name=name;} + inline G4String GetParticleName(){return particle_name;} + + + inline G4LogicalVolume* GetLogicalVolume(){return lv_Volume;} + inline G4VPhysicalVolume* GetPhysicalVolume(){return pv_Volume;} + +}; + +// define the collection class according to template G4THitsCollection + +typedef G4THitsCollection LEMuSRMcpHitsCollection; + +extern G4Allocator LEMuSRMcpHitAllocator; + +inline void* LEMuSRMcpHit :: operator new(size_t) +{ + void *aHit; + aHit = (void*) LEMuSRMcpHitAllocator.MallocSingle(); + return aHit; +} + +inline void LEMuSRMcpHit :: operator delete(void *aHit) +{ + LEMuSRMcpHitAllocator.FreeSingle((LEMuSRMcpHit*) aHit); +} + + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRMcpSD.hh b/geant4/LEMuSR/include/LEMuSRMcpSD.hh new file mode 100644 index 0000000..5a0c694 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMcpSD.hh @@ -0,0 +1,90 @@ +#ifndef LEMuSRMcpSD_h +#define LEMuSRMcpSD_h 1 + + + + + +#include "G4VSensitiveDetector.hh" + +#include "LEMuSRMcpHit.hh" +#include "G4RunManager.hh" +#include "G4Run.hh" + + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" +#include "LEMuSRCryoHit.hh" + + + +class G4Step; +class G4HCofThisEvent; +class G4TouchableHistory; + +class LEMuSRMcpSD : public G4VSensitiveDetector +{ +public: + + LEMuSRMcpSD(G4String name); + ~LEMuSRMcpSD(); + + void Initialize (G4HCofThisEvent* HCE); + G4bool ProcessHits(G4Step* aStep, G4TouchableHistory*ROhist); + void EndOfEvent (G4HCofThisEvent* HCE); + void clear(); + void DrawAll(); + void PrintAll(); + + void BookRoot(); + void FillRoot(); + void WriteRoot(); + + TFile *myFile; + TTree *myTree; + TTree *tree; + + // HIT datas + + G4String p_name, vname; + G4double spin, edep, toten, kinen, tof, globaltime, proptime; + G4ThreeVector hitpos, hitmom; + G4int ID; + + G4bool condition; + + G4bool CheckCondition(const G4Step* aStep); + + void GetDatas(const G4Step* aStep); + + +typedef struct +{ + Float_t kenergy, tenergy, edeposit; + Float_t localtime, globaltime, proptime; + Float_t positionx, positiony,positionz; + Float_t momdirx,momdiry,momdirz, foil; + Int_t muon,positron,gamma, runid; +} mcpHit ; + + mcpHit theHit; + void getHit(); + +private: + LEMuSRMcpHitsCollection *McpCollection; + + G4double positionResolution; + G4int mu,e,g; + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRMuonDecayChannel.hh b/geant4/LEMuSR/include/LEMuSRMuonDecayChannel.hh new file mode 100644 index 0000000..3568c77 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMuonDecayChannel.hh @@ -0,0 +1,82 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION +// ID : LEMuSRMuonDecayChannel.hh , v 1.0 +// AUTHOR: Taofiq PARAISO based on G4MuonDecayChannel $Id$ +// DATE : 2004-07-13 11:15 +// +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// MUON DECAY CHANNEL.HH +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//// + + + +#ifndef LEMuSRMuonDecayChannel_h +#define LEMuSRMuonDecayChannel_h 1 + + +#include "G4ios.hh" +#include "globals.hh" +#include "G4VDecayChannel.hh" +#include "G4DynamicParticle.hh" +#include "Randomize.hh" +#include "G4ThreeVector.hh" +#include "G4Transform3D.hh" + +class LEMuSRMuonDecayChannel : public G4VDecayChannel +{ + + // Class Decription + // + // To do list:: + // Find muon polarization + // Compute the positron angle distribution + // Compute the positron energy as a function of angle distribution + // Remove G4MuonDecayChannel in decay table and add this new one + +public: + //Constructors + LEMuSRMuonDecayChannel(const G4String& theParentName, + G4double theBR); + // Destructor + ~LEMuSRMuonDecayChannel(); + + static LEMuSRMuonDecayChannel* pointer; + static LEMuSRMuonDecayChannel* GetInstance(); + + +void finalize(); + +public: // With Description + virtual G4DecayProducts *DecayIt(G4double); + HepRandomEngine* theEngine; + G4ThreeVector emomdir; + + G4double alpha,sinalpha, cosalpha, delta, sindelta, cosdelta; + G4double costheta, sintheta, phi, sinphi, cosphi, theta; + + inline G4double GetTheta(){return theta;}; + inline G4double GetPhi(){return phi;}; + + + + G4DecayProducts *DecayItPolarized(G4double,G4ThreeVector polar); + + +private: + + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRMuonPhysics.hh b/geant4/LEMuSR/include/LEMuSRMuonPhysics.hh new file mode 100644 index 0000000..db5bad5 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRMuonPhysics.hh @@ -0,0 +1,96 @@ + +// History +// first version 12 Nov. 2000 by H.Kurashige +// ------------------------------------------------------------ + +#ifndef LEMuSRMuonPhysics_h +#define LEMuSRMuonPhysics_h 1 + +#include "globals.hh" +#include "G4ios.hh" + +#include "G4VPhysicsConstructor.hh" +#include "G4MultipleScattering.hh" +#include "G4MultipleScattering52.hh" +#include "LEMuSRMSC.hh" +#include "G4MuBremsstrahlung.hh" +#include "G4MuPairProduction.hh" +#include "G4MuIonisation.hh" +#include "G4hIonisation.hh" + +#include "G4MuonMinusCaptureAtRest.hh" + +#include "G4DecayWithSpin.hh" +#include "G4MuonDecayChannel.hh" +#include "G4MuonDecayChannelWithSpin.hh" + +#include "LEMuSRAtRestSpinRotation.hh" +#include "LEMuSRDecay.hh" + +#include "LEMuSRMUONIUM.hh" +#include "LEMuSRDepolarize.hh" +#include "LEMuSRMUONIUMScatt.hh" + + + +#include"G4VMuEnergyLoss.hh" + + +class LEMuSRMuonPhysics : public G4VPhysicsConstructor +{ + public: + LEMuSRMuonPhysics(const G4String& name="muon"); + virtual ~LEMuSRMuonPhysics(); + + public: + // This method will be invoked in the Construct() method. + // each particle type will be instantiated + virtual void ConstructParticle(); + + // This method will be invoked in the Construct() method. + // each physics process will be instantiated and + // registered to the process manager of each particle type + virtual void ConstructProcess(); + + protected: + // Muon physics + G4MuIonisation fMuPlusIonisation; + G4MultipleScattering fMuoniumMultipleScattering; + LEMuSRMSC fMuPlusMultipleScattering; + G4MuBremsstrahlung fMuPlusBremsstrahlung ; + G4MuPairProduction fMuPlusPairProduction; + LEMuSRMUONIUMScatt fMuoniumScatt; + LEMuSRMUONIUM fMuFormation; + LEMuSRDepolarize fDepolarization; + + + + G4MuIonisation fMuMinusIonisation; + G4MultipleScattering fMuMinusMultipleScattering; + G4MuBremsstrahlung fMuMinusBremsstrahlung ; + G4MuPairProduction fMuMinusPairProduction; + + G4MuonMinusCaptureAtRest fMuMinusCaptureAtRest; + + +#ifdef ASYM_USE_LEMU + LEMuSRDecay fDecayProcess; +#else + G4Decay fDecayProcess; + G4DecayWithSpin fSDecayProcess; +#endif + + LEMuSRAtRestSpinRotation fMuAtRestSpinRotation; + + // Tau physics + G4MultipleScattering fTauPlusMultipleScattering; + G4hIonisation fTauPlusIonisation; + + G4MultipleScattering fTauMinusMultipleScattering; + G4hIonisation fTauMinusIonisation; + +}; + + +#endif + diff --git a/geant4/LEMuSR/include/LEMuSROScintHit.hh b/geant4/LEMuSR/include/LEMuSROScintHit.hh new file mode 100644 index 0000000..1c78246 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSROScintHit.hh @@ -0,0 +1,85 @@ +#ifndef LEMuSROScintHit_h +#define LEMuSROScintHit_h 1 + +#include "G4VHit.hh" +#include "G4THitsCollection.hh" +#include "G4Allocator.hh" +#include "G4ThreeVector.hh" +#include "G4LogicalVolume.hh" +#include "G4VPhysicalVolume.hh" + +class LEMuSROScintHit : public G4VHit +{ +public: + // contructor and destructor + LEMuSROScintHit(); + ~LEMuSROScintHit(); + + void Draw(); + void Print(); + void print(G4String name); + + // operator for hit collector definition + LEMuSROScintHit(const LEMuSROScintHit &right); + const LEMuSROScintHit& operator=(const LEMuSROScintHit &right); + G4int operator==(const LEMuSROScintHit &right) const; + + inline void *operator new(size_t); + inline void operator delete(void *aHit); + + // private variables + +private: + G4double energy_deposition, time_of_flight,spin; + G4ThreeVector position, momentum; + G4LogicalVolume* lv_Volume; + G4VPhysicalVolume* pv_Volume; + G4String particle_name; + + // inline functions +public: + inline void SetEnergyDeposition(G4double ed){energy_deposition = ed;} + inline void AddEnergyDeposition(G4double ed){energy_deposition += ed;} + inline G4double GetEnergyDeposition(){return energy_deposition;} + + inline void SetTimeOfFlight(G4double tf){ time_of_flight=tf;} + inline void AddTimeOfFlight(G4double tf){ time_of_flight+=tf;} + inline G4double GetTimeOfFlight(){return time_of_flight;} + + inline void SetSpin(G4double sp){ spin=sp;} + inline G4double GetSpin(){return spin;} + + inline void SetPosition(G4ThreeVector pos){position =pos;} + inline G4ThreeVector GetPosition(){return position;} + + inline void SetMomentum(G4ThreeVector mom){momentum =mom;} + inline G4ThreeVector GetMomentum(){return momentum;} + + inline void SetParticleName(G4String name){particle_name=name;} + inline G4String GetParticleName(){return particle_name;} + + inline G4LogicalVolume* GetLogicalVolume(){return lv_Volume;} + inline G4VPhysicalVolume* GetPhysicalVolume(){return pv_Volume;} + +}; + +// define the collection class according to template G4THitsCollection + +typedef G4THitsCollection LEMuSROScintHitsCollection; + +extern G4Allocator LEMuSROScintHitAllocator; + +inline void* LEMuSROScintHit :: operator new(size_t) +{ + void *aHit; + aHit = (void*) LEMuSROScintHitAllocator.MallocSingle(); + return aHit; +} + +inline void LEMuSROScintHit :: operator delete(void *aHit) +{ + LEMuSROScintHitAllocator.FreeSingle((LEMuSROScintHit*) aHit); +} + + +#endif diff --git a/geant4/LEMuSR/include/LEMuSROScintSD.hh b/geant4/LEMuSR/include/LEMuSROScintSD.hh new file mode 100644 index 0000000..bd728d6 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSROScintSD.hh @@ -0,0 +1,86 @@ +#ifndef LEMuSROScintSD_h +#define LEMuSROScintSD_h 1 + + + +#include "G4VSensitiveDetector.hh" + +#include "LEMuSROScintHit.hh" + + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" +#include "LEMuSRCryoHit.hh" + + + +class G4Step; +class G4HCofThisEvent; +class G4TouchableHistory; + +class LEMuSROScintSD : public G4VSensitiveDetector +{ +public: + + LEMuSROScintSD(G4String name); + ~LEMuSROScintSD(); + + void Initialize (G4HCofThisEvent* HCE); + G4bool ProcessHits(G4Step* aStep, G4TouchableHistory*ROhist); + void EndOfEvent (G4HCofThisEvent* HCE); + void clear(); + void DrawAll(); + void PrintAll(); + + void BookRoot(); + void FillRoot(); + void WriteRoot(); + + TFile *myFile; + TTree *myTree; + TTree *tree; + + // HIT datas + + G4String p_name, vname; + G4double spin, edep, toten, kinen, tof, globaltime, proptime; + G4ThreeVector hitpos, hitmom; + G4int ID; + + G4bool condition; + + G4bool CheckCondition(const G4Step* aStep); + + void GetDatas(const G4Step* aStep); + + +typedef struct +{ + Float_t kenergy, tenergy, edeposit; + Float_t localtime, globaltime, proptime; + Float_t positionx, positiony,positionz; + Float_t momdirx,momdiry,momdirz; + Float_t scLeft, scRight, scBottom, scTop ; + Int_t runID; +} scintHit ; + + scintHit theHit; + void getHit(); + +private: + LEMuSROScintHitsCollection *ScintCollection; + + G4double positionResolution; + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRParticleChangeForSR.hh b/geant4/LEMuSR/include/LEMuSRParticleChangeForSR.hh new file mode 100644 index 0000000..786e058 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRParticleChangeForSR.hh @@ -0,0 +1,25 @@ +#ifndef LEMuSRParticleChangeForSR_h +#define LEMuSRParticleChangeForSR_h 1 + +#include "G4ParticleChangeForTransport.hh" + + +class LEMuSRParticleChangeForSR : public G4ParticleChangeForTransport +{ + + G4Step* UpdateStepForAtRest(G4Step* Step); + +public: + G4double theDecayTime; + + + + + inline void SetDecayTime(G4double fDecayTime) { theDecayTime = fDecayTime; } + + inline G4double GetDecayTime() { return theDecayTime; } + +}; + + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRParticleGun.hh b/geant4/LEMuSR/include/LEMuSRParticleGun.hh new file mode 100644 index 0000000..04974eb --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRParticleGun.hh @@ -0,0 +1,34 @@ +#ifndef LEMuSRParticleGun_h +#define LEMuSRParticleGun_h 1 + +#include "G4ParticleGun.hh" +#include "G4Event.hh" +#include "G4PrimaryParticle.hh" + +class LEMuSRParticleGunMessenger; +#include"G4ParticleGunMessenger.hh" + +class LEMuSRParticleGun: public G4ParticleGun +{ +public: + LEMuSRParticleGun(); + ~LEMuSRParticleGun(); + + + void GeneratePrimaryVertex(G4Event* evt); + + inline void SetDecayTime(G4double d) {decaytime = d;} + + G4double decaytime; + + +protected: + void SetInitialValues(); + + private: + LEMuSRParticleGunMessenger* theMessenger; + G4ParticleGunMessenger* Messenger; + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRParticleGunMessenger.hh b/geant4/LEMuSR/include/LEMuSRParticleGunMessenger.hh new file mode 100644 index 0000000..a183c20 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRParticleGunMessenger.hh @@ -0,0 +1,59 @@ +#ifndef LEMUSRPARTICLEGUNMESSENGER +#define LEMUSRPARTICLEGUNMESSENGER + +class LEMuSRParticleGun; +class G4ParticleTable; +class G4UIcommand; +class G4UIdirectory; +class G4UIcmdWithoutParameter; +class G4UIcmdWithAString; +class G4UIcmdWithADoubleAndUnit; +class G4UIcmdWith3Vector; +class G4UIcmdWith3VectorAndUnit; +class G4UIcmdWithAnInteger; + +#include "G4UImessenger.hh" +#include "globals.hh" + +class LEMuSRParticleGunMessenger : public G4UImessenger +{ +public: + LEMuSRParticleGunMessenger(LEMuSRParticleGun* gun); + ~LEMuSRParticleGunMessenger(); + + + public: + void SetNewValue(G4UIcommand * command,G4String newValues); + G4String GetCurrentValue(G4UIcommand * command); + + private: + void IonCommand(G4String newValues); + + private: + LEMuSRParticleGun* fParticleGun; + G4ParticleTable * particleTable; + + private: //commands + G4UIdirectory * gunDirectory; + G4UIcmdWithoutParameter * listCmd; + G4UIcmdWithAString * particleCmd; + G4UIcmdWith3Vector * directionCmd; + G4UIcmdWithADoubleAndUnit * energyCmd; + G4UIcmdWith3VectorAndUnit * positionCmd; + G4UIcmdWithADoubleAndUnit * timeCmd; + G4UIcmdWith3Vector * polCmd; + G4UIcmdWithAnInteger * numberCmd; + + G4UIcommand * ionCmd; + + private: // for ion shooting + G4bool fShootIon; + G4int fAtomicNumber; + G4int fAtomicMass; + G4int fIonCharge; + G4double fIonExciteEnergy; + + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRPgaMessenger.hh b/geant4/LEMuSR/include/LEMuSRPgaMessenger.hh new file mode 100644 index 0000000..1cdf234 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRPgaMessenger.hh @@ -0,0 +1,67 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRPgaMessenger.cc , v 1.2 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-09-16 09:12 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// PRIMARY GENERATOR ACTION MESSENGER +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + +#ifndef LEMUSRPGAMESSENGER_H +#define LEMUSRPGAMESSENGER_H 1 + +class LEMuSRPrimaryGeneratorAction; +class G4UIdirectory; +class G4UIcmdWithoutParameter; +class G4UIcmdWithAString; +class G4UIcmdWithADoubleAndUnit; +class G4UIcmdWithADouble; +class G4UIcmdWith3Vector; +class G4UIcmdWith3VectorAndUnit; +class G4UIcmdWithAnInteger; + +#include "G4UImessenger.hh" +#include "globals.hh" + +class LEMuSRPgaMessenger: public G4UImessenger +{ + public: + LEMuSRPgaMessenger(LEMuSRPrimaryGeneratorAction* thPGA); + ~LEMuSRPgaMessenger(); + + public: + void SetNewValue(G4UIcommand * command,G4String newValues); + + private: + LEMuSRPrimaryGeneratorAction * lemuPGA; + + private: //commands + G4UIdirectory * pgaDirectory; + G4UIcmdWithAString *setRndEnergy; + G4UIcmdWithAString *setMuonium; + G4UIcmdWithoutParameter *reset; + G4UIcmdWith3Vector *posCmd, *momCmd, *scaCmd, *scbCmd, *scgCmd, *setEGauss; + G4UIcmdWithADouble *setEnergy; + G4UIcmdWithADouble *setKEoffset; + G4UIcmdWithADouble *setCharge; + + + + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRPhysicsList.hh b/geant4/LEMuSR/include/LEMuSRPhysicsList.hh new file mode 100644 index 0000000..10cce94 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRPhysicsList.hh @@ -0,0 +1,25 @@ +#ifndef LEMuSRPhysicsList_h +#define LEMuSRPhysicsList_h 1 + +#include "G4VModularPhysicsList.hh" +#include "globals.hh" + +class LEMuSRPhysicsList: public G4VModularPhysicsList +{ +public: + LEMuSRPhysicsList(); + virtual ~LEMuSRPhysicsList(); + +public: + // SetCuts() + virtual void SetCuts(); + + +}; + + +#endif + + + + diff --git a/geant4/LEMuSR/include/LEMuSRPrimaryGeneratorAction.hh b/geant4/LEMuSR/include/LEMuSRPrimaryGeneratorAction.hh new file mode 100644 index 0000000..38cc303 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRPrimaryGeneratorAction.hh @@ -0,0 +1,99 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRPrimaryGeneratorAction.hh , v 1.3 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-09-16 09:12 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// PRIMARY GENERATOR ACTION +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + + +#ifndef LEMuSRPrimaryGeneratorAction_h +#define LEMuSRPrimaryGeneratorAction_h 1 + +// G4 LIBRARIES +#include "G4VUserPrimaryGeneratorAction.hh" +#include "globals.hh" +#include "G4ThreeVector.hh" +#include "LEMuSRParticleGun.hh" +#include "G4Event.hh" +#include "Randomize.hh" +#include "G4ParticleGun.hh" +#include "LEMuSRPgaMessenger.hh" + + + +#include +#include +#include +#include +#include +#include +#include + +// G4 CLASSES +//class G4RandGauss; +class G4ParticleGun; +class LEMuSRParticleGun; +class G4Event; + + +// LEMuSRPrimaryGeneratorAction CLASS DEFINITION +class LEMuSRPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction +{ + // Constructor & Destructor + public: + LEMuSRPrimaryGeneratorAction(); + ~LEMuSRPrimaryGeneratorAction(); + + + +static LEMuSRPrimaryGeneratorAction* thePGA; + static LEMuSRPrimaryGeneratorAction* GetPGA(); + // Event generation method + void GeneratePrimaries(G4Event* anEvent); + void GetScanningMode(G4int scan_mode); + +private: + LEMuSRParticleGun* lemuParticleGun; +public: + double rndenergy; + G4double decaytime, energy; + HepRandomEngine * theEngine; + + G4double X, Y, Z,momX, momY, momZ, m_xrange, m_yrange; + G4int m_counterx, m_nbxsteps, m_countery, m_nbysteps, scan, gauss; + G4double radius, angle, mean, stddev, sc_mean, sc_stddev; + G4double circ; + G4bool rnd; + LEMuSRPgaMessenger* messenger; + + G4double charge, ke_offset; + + G4String pname; + + //=============================== + std::ofstream Yprint; + double table[1000]; + int i,j; +}; + +#endif + + + diff --git a/geant4/LEMuSR/include/LEMuSRRNDMAGField.hh b/geant4/LEMuSR/include/LEMuSRRNDMAGField.hh new file mode 100644 index 0000000..9c42c4c --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRRNDMAGField.hh @@ -0,0 +1,30 @@ +#include "G4UniformMagField.hh" +#include"G4ThreeVector.hh" +#include"G4ios.hh" + +class LEMuSRRNDMAGField : public G4UniformMagField +{ +public: + + + LEMuSRRNDMAGField(const G4ThreeVector FieldVector, G4double randomness); + ~LEMuSRRNDMAGField(); + + void GetFieldValue(const G4double pos[4], G4double *field) const; + + G4bool uniform; + + + G4double R; + + G4double randomness; + + +private: + G4double flength, fpotential, fradius, fzmin, fzmax; + + + G4ThreeVector position; + G4ThreeVector BField; + +}; diff --git a/geant4/LEMuSR/include/LEMuSRRunAction.hh b/geant4/LEMuSR/include/LEMuSRRunAction.hh new file mode 100644 index 0000000..eedc70f --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRRunAction.hh @@ -0,0 +1,61 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION +// ID : LEMuSRRunAction.hh , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-07-07 11:15 +// +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// RUN ACTION.HH +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + +#ifndef LEMuSRRunAction_h +#define LEMuSRRunAction_h 1 + +#include "G4UserRunAction.hh" +#include "globals.hh" +#include "G4ParticleGun.hh" + + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" + + + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +class G4Run; + +class LEMuSRRunAction : public G4UserRunAction +{ + public: + LEMuSRRunAction(); + ~LEMuSRRunAction(); + + public: + void BeginOfRunAction(const G4Run*); + void EndOfRunAction(const G4Run*); + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRScintHit.hh b/geant4/LEMuSR/include/LEMuSRScintHit.hh new file mode 100644 index 0000000..428f205 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRScintHit.hh @@ -0,0 +1,85 @@ +#ifndef LEMuSRScintHit_h +#define LEMuSRScintHit_h 1 + +#include "G4VHit.hh" +#include "G4THitsCollection.hh" +#include "G4Allocator.hh" +#include "G4ThreeVector.hh" +#include "G4LogicalVolume.hh" +#include "G4VPhysicalVolume.hh" + +class LEMuSRScintHit : public G4VHit +{ +public: + // contructor and destructor + LEMuSRScintHit(); + ~LEMuSRScintHit(); + + void Draw(); + void Print(); + void print(G4String name); + + // operator for hit collector definition + LEMuSRScintHit(const LEMuSRScintHit &right); + const LEMuSRScintHit& operator=(const LEMuSRScintHit &right); + G4int operator==(const LEMuSRScintHit &right) const; + + inline void *operator new(size_t); + inline void operator delete(void *aHit); + + // private variables + +private: + G4double energy_deposition, time_of_flight, spin, kenergy, tenergy; + G4ThreeVector position, momentum; + G4LogicalVolume* lv_Volume; + G4VPhysicalVolume* pv_Volume; + G4String particle_name; + + // inline functions +public: + inline void SetEnergyDeposition(G4double ed){energy_deposition = ed;} + inline void AddEnergyDeposition(G4double ed){energy_deposition += ed;} + inline G4double GetEnergyDeposition(){return energy_deposition;} + + inline void SetTimeOfFlight(G4double tf){ time_of_flight=tf;} + inline void AddTimeOfFlight(G4double tf){ time_of_flight+=tf;} + inline G4double GetTimeOfFlight(){return time_of_flight;} + + inline void SetSpin(G4double sp){ spin=sp;} + inline G4double GetSpin(){return spin;} + + inline void SetPosition(G4ThreeVector pos){position=pos;} + inline G4ThreeVector GetPosition(){return position;} + + inline void SetMomentum(G4ThreeVector mom){momentum=mom;} + inline G4ThreeVector GetMomentum(){return momentum;} + + inline void SetParticleName(G4String name){particle_name=name;} + inline G4String GetParticleName(){return particle_name;} + + inline G4LogicalVolume* GetLogicalVolume(){return lv_Volume;} + inline G4VPhysicalVolume* GetPhysicalVolume(){return pv_Volume;} + +}; + +// define the collection class according to template G4THitsCollection + +typedef G4THitsCollection LEMuSRScintHitsCollection; + +extern G4Allocator LEMuSRScintHitAllocator; + +inline void* LEMuSRScintHit :: operator new(size_t) +{ + void *aHit; + aHit = (void*) LEMuSRScintHitAllocator.MallocSingle(); + return aHit; +} + +inline void LEMuSRScintHit :: operator delete(void *aHit) +{ + LEMuSRScintHitAllocator.FreeSingle((LEMuSRScintHit*) aHit); +} + + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRScintSD.hh b/geant4/LEMuSR/include/LEMuSRScintSD.hh new file mode 100644 index 0000000..6bda6f2 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRScintSD.hh @@ -0,0 +1,89 @@ +#ifndef LEMuSRScintSD_h +#define LEMuSRScintSD_h 1 + + + +#include "G4VSensitiveDetector.hh" + +#include "LEMuSRScintHit.hh" + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" +#include "LEMuSRCryoHit.hh" +#include "G4PrimaryParticle.hh" +#include "G4RunManager.hh" +#include "G4Run.hh" + +class G4Step; +class G4HCofThisEvent; +class G4TouchableHistory; + +class LEMuSRScintSD : public G4VSensitiveDetector +{ +public: + + LEMuSRScintSD(G4String name); + ~LEMuSRScintSD(); + + void Initialize (G4HCofThisEvent* HCE); + G4bool ProcessHits(G4Step* aStep, G4TouchableHistory*ROhist); + void EndOfEvent (G4HCofThisEvent* HCE); + void clear(); + void DrawAll(); + void PrintAll(); + + void BookRoot(); + void FillRoot(); + void WriteRoot(); + + TFile *myFile; + TTree *myTree; + TTree *tree; + + // HIT datas + + G4String p_name, vname; + G4double spin, edep, toten, kinen, tof, globaltime, proptime; + G4ThreeVector hitpos, hitmom,hitvertex; + G4int scintID, runID; + G4double parentCharge; + + G4bool condition; + + G4bool CheckCondition(const G4Step* aStep); + + void GetDatas(const G4Step* aStep); + + +typedef struct +{ + Float_t kenergy, tenergy, edeposit; + Float_t localtime, globaltime, proptime; + Float_t positionx, positiony,positionz; + Float_t momdirx,momdiry,momdirz; + Float_t ipositionx, ipositiony,ipositionz; + Float_t scLeft, scRight, scBottom, scTop ; + Int_t runID; + Float_t motherCharge; +} scintHit ; + + scintHit theHit; + void getHit(); + +private: + LEMuSRScintHitsCollection *ScintCollection; + + G4double positionResolution; + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRStackingAction.hh b/geant4/LEMuSR/include/LEMuSRStackingAction.hh new file mode 100644 index 0000000..7e666c0 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRStackingAction.hh @@ -0,0 +1,75 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION +// ID : LEMuSRStackingAction.hh , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-07-07 11:15 +// +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// STACKING ACTION.HH +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +#ifndef LEMuSRStackingAction_H +#define LEMuSRStackingAction_H 1 + +#include "globals.hh" +#include "G4UserStackingAction.hh" +#include "G4ThreeVector.hh" + +class G4Track; + +#include "LEMuSRScintHit.hh" +class LEMuSRStackingActionMessenger; + +class LEMuSRStackingAction : public G4UserStackingAction +{ +public: + LEMuSRStackingAction(); + virtual ~LEMuSRStackingAction(); + +public: + virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack); + virtual void NewStage(); + virtual void PrepareNewEvent(); + +private: + // G4bool InsideRoI(const G4Track * aTrack,G4double ang); + G4VHitsCollection* GetCollection(G4String colName); + + LEMuSRScintHitsCollection* ScintHits; + LEMuSRStackingActionMessenger* theMessenger; + + G4int stage; + + /* G4int reqMuon; + G4int reqIsoMuon; + G4int reqIso; + G4double angRoI; + */ + + +public: + /* inline void SetNRequestMuon(G4int val) { reqMuon = val; } + inline G4int GetNRequestMuon() const { return reqMuon; } + inline void SetNRequestIsoMuon(G4int val) { reqIsoMuon = val; } + inline G4int GetNRequestIsoMuon() const { return reqIsoMuon; } + inline void SetNIsolation(G4int val) { reqIso = val; } + inline G4int GetNIsolation() const { return reqIso; } + inline void SetRoIAngle(G4double val) { angRoI = val; } + inline G4double GetRoIAngle() const { return angRoI; } + */ +}; + +#endif + diff --git a/geant4/LEMuSR/include/LEMuSRStackingActionMessenger.hh b/geant4/LEMuSR/include/LEMuSRStackingActionMessenger.hh new file mode 100644 index 0000000..ab10f93 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRStackingActionMessenger.hh @@ -0,0 +1,35 @@ + +#ifndef LEMuSRStackingActionMessenger_h +#define LEMuSRStackingActionMessenger_h 1 + +class LEMuSRStackingAction; +class G4UIcmdWithAnInteger; +class G4UIcmdWithADoubleAndUnit; + +#include "G4UImessenger.hh" +#include "globals.hh" + +class LEMuSRStackingActionMessenger: public G4UImessenger +{ + public: + LEMuSRStackingActionMessenger(LEMuSRStackingAction* msa); + ~LEMuSRStackingActionMessenger(); + + public: + void SetNewValue(G4UIcommand * command,G4String newValues); + G4String GetCurrentValue(G4UIcommand * command); + + private: + LEMuSRStackingAction * myAction; + + private: //commands + /* G4UIcmdWithAnInteger * muonCmd; + G4UIcmdWithAnInteger * isomuonCmd; + G4UIcmdWithAnInteger * isoCmd; + G4UIcmdWithADoubleAndUnit * roiCmd; + */ + +}; + +#endif + diff --git a/geant4/LEMuSR/include/LEMuSRSteppingAction.hh b/geant4/LEMuSR/include/LEMuSRSteppingAction.hh new file mode 100644 index 0000000..c2497db --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRSteppingAction.hh @@ -0,0 +1,59 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION +// ID : LEMuSRSteppingAction.hh , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-07-07 11:15 +// +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// STEPPING ACTION.HH +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + + +#ifndef LEMuSRSteppingAction_h +#define LEMuSRSteppingAction_h 1 + +#include "G4UserSteppingAction.hh" +#include "globals.hh" +#include +#include "LEMuSRVisManager.hh" +#include "LEMuSRDetectorConstruction.hh" + + +class LEMuSRSteppingAction : public G4UserSteppingAction +{ +public: + + static LEMuSRSteppingAction* GetInstance(); + + LEMuSRSteppingAction() ; + ~LEMuSRSteppingAction() ; + + + void UserSteppingAction(const G4Step *theStep); + void FieldInfo(const G4Step *theStep); + void ParticleInfo(const G4Step *theStep); + void LoopKiller(const G4Step *theStep); + +private: + + static LEMuSRSteppingAction* pointer; + G4int loop; + + +}; + +#endif diff --git a/geant4/LEMuSR/include/LEMuSRTrack.hh b/geant4/LEMuSR/include/LEMuSRTrack.hh new file mode 100644 index 0000000..b2de162 --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRTrack.hh @@ -0,0 +1,11 @@ +#include "G4Track.hh" +#include "G4DynamicParticle.hh" + +class LEMuSRTrack : public G4Track +{ + +public: + void SetDynamicParticle(G4DynamicParticle ); + + +}; diff --git a/geant4/LEMuSR/include/LEMuSRTrackingAction.hh b/geant4/LEMuSR/include/LEMuSRTrackingAction.hh new file mode 100644 index 0000000..acddc1f --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRTrackingAction.hh @@ -0,0 +1,48 @@ +#ifndef LEMuSRTrackingAction_h +#define LEMuSRTrackingAction_h 1 +#include "G4DynamicParticle.hh" +#include "G4UserTrackingAction.hh" +#include "G4Track.hh" +#include "globals.hh" + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" +#include "LEMuSRCryoHit.hh" + + + +class LEMuSRTrackingAction : public G4UserTrackingAction { + + public: + LEMuSRTrackingAction(); + ~ LEMuSRTrackingAction(); + void PreUserTrackingAction(const G4Track*); + void PostUserTrackingAction(const G4Track*); + + void Collect_datas(const G4Track*); + + + // TROOT eventTree; + Int_t nevent , comp , split , write , hfill , read ,arg4, arg5 ; + TFile *myFile; + TTree *myTree; + TBranch *b; + TH1D *hEnergy, *hTime, *hAngle, *hAngle2; + +private: + + + +}; +#endif + + diff --git a/geant4/LEMuSR/include/LEMuSRVisManager.hh b/geant4/LEMuSR/include/LEMuSRVisManager.hh new file mode 100644 index 0000000..f827c5e --- /dev/null +++ b/geant4/LEMuSR/include/LEMuSRVisManager.hh @@ -0,0 +1,27 @@ + +#ifndef LEMuSRVisManager_h +#define LEMuSRVisManager_h 1 + +#ifdef G4VIS_USE + +#include "G4VisManager.hh" + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +class LEMuSRVisManager: public G4VisManager { + +public: + + LEMuSRVisManager (); + ~LEMuSRVisManager (); +private: + + void RegisterGraphicsSystems (); + +}; + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +#endif + +#endif diff --git a/geant4/LEMuSR/include/PhysicsList.hh b/geant4/LEMuSR/include/PhysicsList.hh new file mode 100644 index 0000000..0759f5e --- /dev/null +++ b/geant4/LEMuSR/include/PhysicsList.hh @@ -0,0 +1,49 @@ + +#ifndef PhysicsList_h +#define PhysicsList_h 1 + +#include "globals.hh" +#include "G4VUserPhysicsList.hh" + +#include "G4MuonPlus.hh" +#include "G4MuonMinus.hh" +#include "G4NeutrinoMu.hh" +#include "G4AntiNeutrinoMu.hh" + +#include "G4MultipleScattering.hh" +#include "G4MuBremsstrahlung.hh" +#include "G4MuPairProduction.hh" +#include "G4MuIonisation.hh" + +#include "G4DecayWithSpin.hh" + +class PhysicsList: public G4VUserPhysicsList +{ +public: + PhysicsList(); + ~PhysicsList(); + +protected: + // Construct particle and physics process + void ConstructParticle(); + void ConstructProcess(); + + void SetCuts(); + +private: + + G4DecayWithSpin* theDecayProcess; + + G4MuIonisation* theMuPlusIonisation; + G4MultipleScattering* theMuPlusMultipleScattering; + G4MuBremsstrahlung* theMuPlusBremsstrahlung ; + G4MuPairProduction* theMuPlusPairProduction; + + G4MuIonisation* theMuMinusIonisation; + G4MultipleScattering* theMuMinusMultipleScattering; + G4MuBremsstrahlung* theMuMinusBremsstrahlung ; + G4MuPairProduction* theMuMinusPairProduction; + +}; + +#endif diff --git a/geant4/LEMuSR/include/TDCheck.hh b/geant4/LEMuSR/include/TDCheck.hh new file mode 100644 index 0000000..f6d9cc4 --- /dev/null +++ b/geant4/LEMuSR/include/TDCheck.hh @@ -0,0 +1,128 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : TDCheck.hh , v 1.2 +// AUTHOR: Taofiq PARAISO +// DATE : 2005-03-01 10:11 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// TDCHECK +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +#ifndef TDCheck_h +#define TDCheck_h 1 + +#include "G4UserSteppingAction.hh" +#include "globals.hh" +#include +#include "LEMuSRVisManager.hh" +#include "LEMuSRDetectorConstruction.hh" + + +#include "G4RunManager.hh" +#include "G4Run.hh" + + +// root histogram classes +#include + +#include "TROOT.h" +#include "TFile.h" +#include "TH1.h" +#include "TRandom.h" +#include "TTree.h" +#include "TBranch.h" +#include "TClonesArray.h" +#include "TStopwatch.h" + + + +class TDCheck : public G4UserSteppingAction +{ +public: + + static TDCheck* GetInstance(); + + TDCheck() ; + ~TDCheck() ; + + void UserSteppingAction(const G4Step *theStep); + + void SetParticleVolumeNames(const G4Step *theStep); + + void SetPositionMomentum(const G4Step *theStep); + + void SetTimeEnergy(const G4Step *theStep); + + G4bool CheckCondition(const G4Step* aStep); + + G4String p_name, v_name, pv_name, previousv_name, nextv_name; + + G4ThreeVector position,momentum,momentum_direction, polarization, m, parpol, p; + + G4double kenergy, tenergy, localtime, globaltime, proptime, fx, fy, fz, oldz, thk_old; + G4int id, old_id, index; + G4double theta,sintheta, costheta, phi, sinphi, cosphi; + + + void LoopKiller(const G4Step*aStep); + G4int loop; + + +typedef struct { + + Float_t ienergy,tenergy, localtime, globaltime, proptime; + + Float_t positionx, positiony,positionz,momdirx,momdiry,momdirz; + + Float_t angle; + Int_t index; + Float_t thickness; + Int_t id, charge; + + } LEMuSRparticle ; + + LEMuSRparticle muon; + + void Update(); + + void BookRoot(); + void FillRoot(); + void WriteRoot(); + + // TROOT eventTree; + Int_t nevent , comp , split , write , hfill , read ,arg4, arg5 ; + TFile *myFile; + TTree *myTree; + TBranch *b,*b2; + TH1D *hEnergy, *hTime, *hAngle, *hAngle2; + + TTree *tree; + + TFile* F; + TTree *dt; + + Float_t time; + + + G4double L,R,A; + + +private: + + static TDCheck* pointer; + + +}; + +#endif diff --git a/geant4/LEMuSR/include/meyer.h b/geant4/LEMuSR/include/meyer.h new file mode 100644 index 0000000..06295bc --- /dev/null +++ b/geant4/LEMuSR/include/meyer.h @@ -0,0 +1,27 @@ +#ifndef meyer_h +#define meyer_h 1 + +#include +#include +#include +#include +#include +#include +#include +#include "globals.hh" + +class meyer +{ + public: + meyer(); + ~meyer(); + + + void GFunctions(double*, double*, double); + void Get_F_Function_Meyer(double tau, double Ekin, double Z1, double Z2, double m1, double m2); + void F_Functions_Meyer( double tau,double thetaSchlange,double *f1,double *f2); + void Get_F_Function(double tau,double theta, double Ekin, double Z1, double Z2, double m1, double m2, double* F); + +}; + +#endif diff --git a/geant4/LEMuSR/include/yields.h b/geant4/LEMuSR/include/yields.h new file mode 100644 index 0000000..2e2c0ff --- /dev/null +++ b/geant4/LEMuSR/include/yields.h @@ -0,0 +1,28 @@ +#ifndef Yields_h +#define Yield_h 1 + +#include "globals.hh" + +class Yields +{ + +public: + //constructor + Yields(); + //destructor + ~Yields(); + + void GetYields(double E, double masse, double yvector[]); + + +private: + // VARIABLES + double Q_zero,Q_minus,D; + double Yield_minus,Yield_zero,Yield_plus; + + double help1,help2,help3; + +}; + + +#endif diff --git a/geant4/LEMuSR/make.sh b/geant4/LEMuSR/make.sh new file mode 100644 index 0000000..8420350 --- /dev/null +++ b/geant4/LEMuSR/make.sh @@ -0,0 +1,10 @@ +#cd ~/geant4.7.0/source/particles/management +#gmake +#cd ~/geant4.7.0/source/particles/leptons +#gmake +cd ~/geant4.7.0/source/geometry/magneticfield/ +gmake +#cd ~/geant4.7.0/source/geometry/navigation/ +#gmake +cd $wlem +gmake diff --git a/geant4/LEMuSR/mk.sh b/geant4/LEMuSR/mk.sh new file mode 100644 index 0000000..120ecc0 --- /dev/null +++ b/geant4/LEMuSR/mk.sh @@ -0,0 +1,10 @@ +cd ~/geant4.6.1/source/processes/decay/ +make +cd ~/geant4.6.1/source/track +make +cd ~/geant4.6.1/source/particles/management/ +make +cd ~/geant4.6.1/source/particles/leptons/ +make +cd $lem +make \ No newline at end of file diff --git a/geant4/LEMuSR/mkclean.sh b/geant4/LEMuSR/mkclean.sh new file mode 100644 index 0000000..96b5986 --- /dev/null +++ b/geant4/LEMuSR/mkclean.sh @@ -0,0 +1,14 @@ +cd ~/geant4.6.1/source/processes/decay/ +make clean +$make +cd ~/geant4.6.1/source/track +make clean +$make +cd ~/geant4.6.1/source/particles/management/ +make clean +$make +cd ~/geant4.6.1/source/particles/leptons/ +make clean +$make +cd $lem +$make diff --git a/geant4/LEMuSR/src/AsymCheck.cc b/geant4/LEMuSR/src/AsymCheck.cc new file mode 100644 index 0000000..4ddffe1 --- /dev/null +++ b/geant4/LEMuSR/src/AsymCheck.cc @@ -0,0 +1,277 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : AsymCheck.cc , v 1.2 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-08-20 10:20 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// ASYMCHECK +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +#include "AsymCheck.hh" + +#include "G4SteppingManager.hh" +#include "G4Transform3D.hh" +#include "G4DynamicParticle.hh" +#include "G4UnitsTable.hh" +#include "LEMuSRMuonDecayChannel.hh" +#include "G4MuonDecayChannelWithSpin.hh" + +AsymCheck::AsymCheck() +{ + + A=0;L=0;R=0; + BR1=BR2=dm1=dm2=0; + BookRoot(); + + pointer=this ; +} + + +AsymCheck::~AsymCheck() +{ + PrintAsym(); +G4cout <<"\n Left/Right Asymmetry: L vs R = " << L <<" vs " << R <<" => A = " << A <<" for "<< L+R <<" particles.\n"<GetTrack()->GetCreatorProcess()) + { + if( aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="Decay"|| aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="DecayWithSpin") + + { + condition=true; + } + } + } + } + + return condition; + +} + + +void AsymCheck::SetAngles(const G4Step* aStep) +{ + //lemu + // theta = LEMuSRMuonDecayChannel::GetInstance()->theta; + // phi = LEMuSRMuonDecayChannel::GetInstance()->phi; + + // triumf + m=aStep->GetPreStepPoint()->GetMomentumDirection(); + p= aStep->GetTrack()->GetDynamicParticle()->GetPolarization(); + + m.rotateUz(G4ThreeVector(-1.,0.,0.)); + p.rotateUz(G4ThreeVector(-1.,0.,0.)); + + theta = m.theta(p); + if (m.x()<0)phi = acos(m.x()/sin(theta))*(-1.); + else if (m.x()>=0)phi = acos(m.x()/sin(theta))*(+1.); + + +} + + +void AsymCheck::SetParticleVolumeNames(const G4Step* aStep) +{ + // NAMES + p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name + v_name = aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetName(); //lv_name + pv_name = aStep->GetTrack()->GetVolume()->GetName(); //lv_name + +} + + +void AsymCheck::SetPositionMomentum(const G4Step* aStep) +{ + + // POSITION, MOMENTUM + position = aStep->GetPreStepPoint()->GetPosition(); // position + momentum = aStep->GetPreStepPoint()->GetMomentum(); // momentum + momentum_direction = aStep->GetPreStepPoint()->GetMomentumDirection(); // momentum + + if(position.x()>0) L++; + else if(position.x()<0) R++; + +} + + +void AsymCheck::SetTimeEnergy(const G4Step* aStep) +{ + + // ENERGY + kenergy= aStep->GetTrack()->GetDynamicParticle()->GetKineticEnergy(); // position + + tenergy= aStep->GetTrack()->GetDynamicParticle()->GetTotalEnergy(); // position + + // TIME + localtime = aStep->GetTrack()->GetLocalTime(); // time since track creation + globaltime = aStep->GetPreStepPoint()->GetGlobalTime();// time since event creation + proptime = aStep->GetTrack()->GetProperTime(); // proper time of the particle + time = proptime; + + positron.kenergy =kenergy ; +} + + +void AsymCheck::SetSpinDirection(const G4Step* aStep) +{ + polarization = aStep->GetTrack()->GetDynamicParticle()->GetPolarization(); + // G4cout <<"Polarization " << polarization <GetPreStepPoint()->GetGlobalTime(); +} + + +void AsymCheck::Update() +{ + positron.kenergy =kenergy/MeV ; + positron.tenergy =tenergy; + positron.localtime =localtime ; + positron.globaltime =globaltime/ns ; + positron.proptime = proptime ; + + positron.theta = theta/rad ; + positron.phi = phi/rad; + + positron.positionx = position.x()/mm; + positron.positiony = position.y()/mm; + positron.positionz = position.z()/mm; + + positron.momdirx= momentum_direction.x()/mm; + positron.momdiry= momentum_direction.y()/mm; + positron.momdirz= momentum_direction.z()/mm; + + positron.ID=G4RunManager::GetRunManager()->GetCurrentRun()->GetRunID(); + + +} + + +// PRINT VALUES + +void AsymCheck::PrintAsym() +{ + A = (L-R)/(L+R); + // G4cout <<"\n Left/Right Asymmetry: L vs R = " << L <<" vs " << R <<" => A = " << A <<" for "<< L+R <<" particles.\n"<GetTrack()->GetCreatorProcess()) + { + G4cout << "NOT PRIMARY PARTICLE : created by : " << aStep->GetTrack()->GetCreatorProcess()->GetProcessName() <<" ;\n "; + } + + G4cout << "particle name : " << p_name <<" ;\n " + << "volume name : " << v_name <<" ;\n " + << "kinetic energy : " << G4BestUnit(kenergy,"Energy") <<" ;\n " + << "total energy : " << G4BestUnit(tenergy,"Energy") <<" ;\n " + << "current energy : " << G4BestUnit(aStep->GetPreStepPoint()->GetTotalEnergy(),"Energy") <<" ;\n " + << "Time (l,g,p) : " << G4BestUnit(localtime,"Time") <<" ; " + << G4BestUnit(globaltime,"Time")<<" ; " + << G4BestUnit(proptime,"Time") <<" ;\n " + << "position : " << position <<" ;\n " + << "momentum : " << momentum <<" ;\n " + << "momentum direction: " << momentum_direction<<" ;\n " + << "theta angle : " << theta <<" ;\n " + << "phi angle : " << phi <<" ;\n " + + <Branch("positron",&positron.kenergy,"kenergy/F:tenergy/F:localtime/F:globaltime:propertime/F:theta:phi:positionx/F:positiony:positionz:momdirx:momdiry:momdirz/F:runID/I"); + + tree->Branch("Asymetry",&asym.asym,"Asym/F:L:R:S"); + + tree->Branch("spin",&spin.omegat,"omegat/F:time"); + +} + + +void AsymCheck::FillRoot() +{ + tree->Fill(); + // tree->Scan(); + +} + +void AsymCheck::WriteRoot() +{ + myFile->Write(); + myFile->Close(); + +} diff --git a/geant4/LEMuSR/src/FieldCheck.cc b/geant4/LEMuSR/src/FieldCheck.cc new file mode 100644 index 0000000..8b8e2c8 --- /dev/null +++ b/geant4/LEMuSR/src/FieldCheck.cc @@ -0,0 +1,376 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID :FieldCheck.cc , v 1.2 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-09-17 10:20 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// FIELDCHECK +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +#include "FieldCheck.hh" + +#include "G4SteppingManager.hh" +#include "G4Transform3D.hh" +#include "G4DynamicParticle.hh" +#include "G4UnitsTable.hh" +#include "LEMuSRDetectorConstruction.hh" +#include "G4VVisManager.hh" +#include "G4Polyline.hh" +#include "G4VisAttributes.hh" +#include "G4Colour.hh" + + + +FieldCheck::FieldCheck() +{ + + BookRoot(); + muon.index= 0; + + + loop=0; + pointer=this ; +} + + +FieldCheck::~FieldCheck() +{ + WriteRoot(); +} + +FieldCheck* FieldCheck::pointer=0; +FieldCheck* FieldCheck::GetInstance() +{ + return pointer; +} + + +void FieldCheck::UserSteppingAction(const G4Step* aStep) + +{ + if( aStep->GetPreStepPoint()&& aStep->GetPostStepPoint()->GetPhysicalVolume() ) + { + SetParticleVolumeNames(aStep); + kenergy= aStep->GetTrack()->GetDynamicParticle()->GetKineticEnergy(); // position + + if(CheckCondition(aStep)) + { + + SetPositionMomentum(aStep); + SetTimeEnergy(aStep); + // SetSpinDirection(aStep); + + // Print datas to screen + // PrintDatas(aStep); + PrintField(aStep); + + Update(); + FillRoot(); +#if defined G4UI_USE_ROOT + myFile->Write(); +#endif + + } + + + // kill useless particles + // kill useless particles + /* if(aStep->GetTrack()->GetDefinition()->GetParticleName()=="e-" + ||aStep->GetTrack()->GetDefinition()->GetParticleName()=="gamma") + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + }*/ + + if(p_name!="mu+" &&p_name!="Mu" &&p_name!="e+" &&p_name!="geantino") + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + } + + + // loop killa + if(aStep->GetStepLength()<0.01*mm) + { + loop++; + if(loop>20) + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + loop=0; + } + } + + + + } + + + G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance(); + + if (pVVisManager) { + //----- Define a line segment + G4Polyline polyline; + G4Colour colour; + if (p_name == "mu+") colour = G4Colour(1., 0., 0.); + else if (p_name == "Mu" ) colour = G4Colour(0., 0., 1.); + else if (p_name == "e+" ) colour = G4Colour(1., 1., 0.); + else colour = G4Colour(1., 0., 1.); + G4VisAttributes attribs(colour); + polyline.SetVisAttributes(attribs); + polyline.push_back(aStep->GetPreStepPoint()->GetPosition()); + polyline.push_back(aStep->GetPostStepPoint()->GetPosition()); + + //----- Call a drawing method for G4Polyline + pVVisManager -> Draw(polyline); + + } +} + + + + + +G4bool FieldCheck::CheckCondition(const G4Step* aStep) +{ + G4bool condition=false; + + if((p_name == "mu+"||p_name=="Mu"||p_name=="geantino")/*&&v_name=="lv_MCPV"*/&&aStep->GetPreStepPoint()->GetPosition().z()<16*cm) + + // if(aStep->GetPostStepPoint()->GetProcessDefinedStep() != NULL) + // { + // if( aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()=="Decay") + // { + { + condition=true; + } + return condition; + + +} + + +void FieldCheck::SetParticleVolumeNames(const G4Step* aStep) +{ + // NAMES + p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name + v_name = aStep->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName(); //lv_name + pv_name = aStep->GetTrack()->GetVolume()->GetName(); //lv_name + +} + + +void FieldCheck::SetPositionMomentum(const G4Step* aStep) +{ + + // POSITION, MOMENTUM + position = aStep->GetTrack()->GetPosition(); // position + momentum = aStep->GetTrack()->GetMomentum(); // momentum + momentum_direction = aStep->GetTrack()->GetMomentumDirection(); // momentum + +} + + +void FieldCheck::SetTimeEnergy(const G4Step* aStep) +{ + + // ENERGY + kenergy= aStep->GetTrack()->GetDynamicParticle()->GetKineticEnergy(); // position + + tenergy= aStep->GetTrack()->GetDynamicParticle()->GetTotalEnergy(); // position + + // TIME + localtime = aStep->GetPostStepPoint()->GetLocalTime(); // time since track creation + globaltime = aStep->GetPostStepPoint()->GetGlobalTime();// time since event creation + proptime = aStep->GetPostStepPoint()->GetProperTime(); // proper time of the particle + time = proptime; + + charge=aStep->GetTrack()->GetDynamicParticle()->GetCharge(); + +} + + +void FieldCheck::SetSpinDirection(const G4Step* aStep) +{ + polarization = aStep->GetTrack()->GetDynamicParticle()->GetPolarization(); + // G4cout<GetCurrentRun()->GetRunID(); + evt=G4RunManager::GetRunManager()->GetCurrentEvent()->GetEventID(); + muon.event = evt; + + muon.charge= charge; + +} + + +// PRINT VALUES + +void FieldCheck::PrintField(const G4Step* aStep) +{ + // G4cout<< position.z()<GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager()) + { + G4double point[4]; + G4double Bfield[6]; + + point[0]=position.x(); + point[1]=position.y(); + point[2]=position.z(); + + aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager()->GetDetectorField()->GetFieldValue(point, Bfield); + // G4cout<< position.z()<-34.7*cm + &&LEMuSRDetectorConstruction::GetInstance()->magfield==1 + &&LEMuSRDetectorConstruction::GetInstance()->anode_elfield==1) + { + // G4cout<<"Case EM "<-34.7*cm + &&LEMuSRDetectorConstruction::GetInstance()->magfield==1 + &&LEMuSRDetectorConstruction::GetInstance()->anode_elfield==0) + { + // G4cout<<"Case Mag "<-34.7*cm + &&LEMuSRDetectorConstruction::GetInstance()->magfield==0 + &&LEMuSRDetectorConstruction::GetInstance()->anode_elfield==1) + { + // G4cout<<"Case Elec "<GetTrack()->GetCreatorProcess()) + { + G4cout << "NOT PRIMARY PARTICLE : created by : " << aStep->GetTrack()->GetCreatorProcess()->GetProcessName() <<" ;\n "; + } + + G4cout << "particle name : " << p_name <<" ;\n " + << "volume name : " << v_name <<" ;\n " + << "kinetic energy : " << G4BestUnit(kenergy,"Energy") <<" ;\n " + << "Time (l,g,p) : " << G4BestUnit(localtime,"Time") <<" ; " + << G4BestUnit(globaltime,"Time")<<" ; " + << G4BestUnit(proptime,"Time") <<" ;\n " + << "position : " << G4BestUnit(position,"Length")<<" ;\n " + << "momentum : " << momentum <<" ;\n " + << "momentum direction: " << momentum_direction<<" ;\n " + <Branch("muon",&muon.tenergy,"kenergy/F:localtime/F:globaltime:propertime/F:positionx/F:positiony:positionz:momdirx:momdiry:momdirz:Bx:By:Bz:Ex:Ey:Ez:charge/F:index/I:event/I:runID/I"); + +} + + +void FieldCheck::FillRoot() +{ + tree->Fill(); + // tree->Scan(); + +} + +void FieldCheck::WriteRoot() +{ + myFile->Write(); + myFile->Close(); + +} diff --git a/geant4/LEMuSR/src/FocalLengthTest.cc b/geant4/LEMuSR/src/FocalLengthTest.cc new file mode 100644 index 0000000..4cd0dcd --- /dev/null +++ b/geant4/LEMuSR/src/FocalLengthTest.cc @@ -0,0 +1,264 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID :FocalLengthTest.cc , v 1.2 +// AUTHOR: Taofiq PARAISO +// DATE : 2005-03-02 09:37 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// FOCALLENGTHTEST +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +#include "FocalLengthTest.hh" + +#include "G4SteppingManager.hh" +#include "G4Transform3D.hh" +#include "G4DynamicParticle.hh" +#include "G4UnitsTable.hh" + +#include "LEMuSRPrimaryGeneratorAction.hh" + + +FocalLengthTest::FocalLengthTest() +{ + + BookRoot(); + muon.event=0; + loop=0; + pointer=this ; +} + + +FocalLengthTest::~FocalLengthTest() +{ + WriteRoot(); +} + +FocalLengthTest* FocalLengthTest::pointer=0; +FocalLengthTest* FocalLengthTest::GetInstance() +{ + return pointer; +} + + +void FocalLengthTest::UserSteppingAction(const G4Step* aStep) + +{ + if( aStep->GetPreStepPoint()&& aStep->GetPreStepPoint()->GetPhysicalVolume() ) + { + + LoopKiller(aStep); + SetParticleVolumeNames(aStep); + + if(CheckCondition(aStep)) + { + + // Get datas + SetPositionMomentum(aStep); + SetTimeEnergy(aStep); + + Update(); + FillRoot(); +#if defined G4UI_USE_ROOT + myFile->Write(); +#endif + + } + } + + +} + +void FocalLengthTest::LoopKiller(const G4Step *aStep) +{ + // loop killa + if(aStep->GetStepLength()<0.001*mm) + { + loop++; + if(loop>20) + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + loop=0; + } + } + + // kill useless particles + if(aStep->GetTrack()->GetDefinition()->GetParticleName()=="e-" + ||aStep->GetTrack()->GetDefinition()->GetParticleName()=="gamma") + { + if(aStep->GetTrack()->GetKineticEnergy()<10.*eV) + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + } + } + +} + + + + +G4bool FocalLengthTest::CheckCondition(const G4Step* ) +{ + G4bool condition=false; + + // if(p_name == "geantino" && v_name=="lv_fchk") // change also in pga + if(p_name == "mu+" && v_name=="lv_fchk") + { + if(pv_name=="pv_f1"||pv_name=="pv_f44")// THE FIRST DUMMY PLANE + { + condition=true; + } + } + + return condition; + +} + + + +void FocalLengthTest::SetParticleVolumeNames(const G4Step* aStep) +{ + // NAMES + p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name + v_name = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName(); //lv_name + pv_name = aStep->GetTrack()->GetVolume()->GetName(); //lv_name + +} + + +void FocalLengthTest::SetPositionMomentum(const G4Step* aStep) +{ + + // POSITION, MOMENTUM + position = aStep->GetPreStepPoint()->GetPosition(); // position + momentum = aStep->GetPreStepPoint()->GetMomentum(); // momentum + momentum_direction = aStep->GetPreStepPoint()->GetMomentumDirection(); // momentum + +} + + +void FocalLengthTest::SetTimeEnergy(const G4Step* aStep) +{ + + // ENERGY + kenergy= aStep->GetTrack()->GetDynamicParticle()->GetKineticEnergy(); // position + + tenergy= aStep->GetTrack()->GetDynamicParticle()->GetTotalEnergy(); // position + + // TIME + localtime = aStep->GetPreStepPoint()->GetLocalTime(); // time since track creation + globaltime = aStep->GetPreStepPoint()->GetGlobalTime();// time since event creation + proptime = aStep->GetPreStepPoint()->GetProperTime(); // proper time of the particle + time = proptime; + +} + + +void FocalLengthTest::SetSpinDirection(const G4Step* aStep) +{ + polarization = aStep->GetTrack()->GetDynamicParticle()->GetPolarization(); + +} + + +void FocalLengthTest::Update() +{ + muon.index++; + + + if(pv_name=="pv_f1")// THE FIRST DUMMY PLANE + { + muon.index=0; + muon.event++; + init_kenergy=LEMuSRPrimaryGeneratorAction::GetPGA()->energy; + } + + if(pv_name=="pv_f44") + { + G4double FL, h, l, d; + h=sqrt(position.x()*position.x()+position.y()*position.y()); + d=sqrt(momentum_direction.x()*momentum_direction.x()+momentum_direction.y()*momentum_direction.y()); + l=momentum_direction.z(); + + FL= h*l/d+22.*cm;// 22 cm from the last plane pv_f44 to the center of the lense + //G4cout <<"Focal length for this particle : " << FL/meter <<"meter" <energy/keV; + // G4cout <<"Kinectic energy for this particle : " << init_kenergy/keV <<"keV" <Branch("muon",&muon.kenergy,"kenergy/F:focal/F:ratio/F:positionx/F:positiony/F:positionz/F:momdirx/F:momdiry/F:momdirz"); + +} + + +void FocalLengthTest::FillRoot() +{ + tree->Fill(); + // tree->Scan(); + +} + +void FocalLengthTest::WriteRoot() +{ + myFile->Write(); + myFile->Close(); + +} diff --git a/geant4/LEMuSR/src/LEMuSRAtRestSpinRotation.cc b/geant4/LEMuSR/src/LEMuSRAtRestSpinRotation.cc new file mode 100644 index 0000000..f9242af --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRAtRestSpinRotation.cc @@ -0,0 +1,229 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRAtRestSpinRotation.cc , v 1.2 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-08-20 10:20 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// AT REST SPIN ROTATION +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +#include "LEMuSRAtRestSpinRotation.hh" + +#include "G4ThreeVector.hh" +#include "G4MagneticField.hh" +#include "G4Track.hh" +#include "G4FieldManager.hh" +#include +#include "globals.hh" +#include "G4ParticleChange.hh" +#include "G4ios.hh" +#include "G4Transform3D.hh" +#include "G4UnitsTable.hh" + +#include "G4ParticleTable.hh" +#include "G4ParticleDefinition.hh" + +#include "G4ProcessVector.hh" +#include "G4ProcessManager.hh" + + +LEMuSRAtRestSpinRotation::LEMuSRAtRestSpinRotation(const G4String& processName) + : G4VRestProcess (processName) +{ + G4cout << GetProcessName() << " is created "<< G4endl; + pointer = this; +} + + +LEMuSRAtRestSpinRotation::~LEMuSRAtRestSpinRotation() +{;} + + +LEMuSRAtRestSpinRotation* LEMuSRAtRestSpinRotation::pointer=0; +LEMuSRAtRestSpinRotation* LEMuSRAtRestSpinRotation::GetInstance() +{ + return pointer; +} + + + + +G4VParticleChange* LEMuSRAtRestSpinRotation::AtRestDoIt(const G4Track& theTrack, const G4Step& aStep) +{ + + theParticleChange.Initialize(theTrack); + theParticleChange.ProposeTrackStatus(fAlive); + // G4cout<<"AT REST::: globaltime "<< theTrack.GetGlobalTime()/ns <GetPreAssignedDecayProperTime(); + + + + deltatime = ftime - itime; + theParticleChange.ProposeGlobalTime(deltatime + itime -gtime); + theParticleChange.ProposeProperTime(deltatime); + + polar = aStep.GetTrack()->GetPolarization(); + + + if(aStep.GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager()) + { + + + G4FieldManager *fMgr = theTrack.GetVolume()->GetLogicalVolume()->GetFieldManager(); + + + // if(!fMgr->DoesFieldChangeEnergy())//then we have a magnetic field + if(fMgr->FieldHasMagComponent())//then we have a magnetic field + { + +#ifdef G4SRVERBOSE + G4cout<<"AT REST::: MAGNETIC FIELD HERE" <GetDetectorField(); + + mfield->GetFieldValue(point,B); + +#ifdef G4SRVERBOSE + G4cout <<"AT REST::: MAGNETIC FIELD B="<< B[0] <<" " << B[1] <<" " << B[2] <GetDefinition()->GetPDGCharge(); + a= 1.165922e-3; + fqz = 8.5062e+7*rad/(s*kilogauss); + + gamma = aStep.GetTrack()->GetDefinition()->GetGammaFactor()*rad; + + // G4cout<< fqz*(s*tesla)<GetPolarization(); + HepVector3D newspin; + newspin = Spin_rotation*spin; + + G4double x,y,z,alpha; + x = sqrt(spin*spin); + y = sqrt(newspin*newspin); + z = spin*newspin/x/y; + alpha = acos(z); + +#ifdef G4SRVERBOSE + G4cout<< "AT REST::: PARAMETERS\n" + << "Initial spin : " << spin <<"\n" + << "Delta time : " << deltatime <<"\n" + << "Rotation angle: " << rotation_angle/(M_PI*rad) <<"\n" + << "New spin : " << newspin <<"\n" + << "Checked norms : " << x <<" " <fzmin) + { + G4double R=sqrt(X*X+Y*Y); + if(R +#include + +#include "G4UnitsTable.hh" + +G4Allocator LEMuSRCryoHitAllocator; + +LEMuSRCryoHit::LEMuSRCryoHit() +{;} + +LEMuSRCryoHit::~LEMuSRCryoHit() +{;} + +LEMuSRCryoHit::LEMuSRCryoHit(const LEMuSRCryoHit &right) : G4VHit() +{ + particle_name = right.particle_name; + energy_deposition = right.energy_deposition; + time_of_flight = right.time_of_flight; + position = right.position; + momentum = right.momentum; +} + +const LEMuSRCryoHit& LEMuSRCryoHit::operator=(const LEMuSRCryoHit &right) +{ + particle_name = right.particle_name; + energy_deposition = right.energy_deposition; + time_of_flight = right.time_of_flight; + position = right.position; + momentum = right.momentum; + return *this; +} + + + +G4int LEMuSRCryoHit::operator==(const LEMuSRCryoHit &right) const +{ + return (this==&right) ? 1 : 0; +} + +void LEMuSRCryoHit::Draw() +{ + G4VVisManager* VisManager = G4VVisManager::GetConcreteInstance(); + if(VisManager) + { + G4Circle circle(position); + circle.SetScreenSize(0.1); + circle.SetFillStyle(G4Circle::filled); + G4Colour colour(1.,1.,1.); + G4VisAttributes attributes(colour); + circle.SetVisAttributes(attributes); + VisManager->Draw(circle); + } +} + +void LEMuSRCryoHit::Print() +{} + +void LEMuSRCryoHit::print(G4String name) +{ + ofstream TestPrint(name,ios::app); + if (!TestPrint.is_open()) exit(8); + TestPrint << "particle name : " << particle_name <<" ;\n " + << "energy_deposition : " << G4BestUnit(energy_deposition,"Energy") <<" ;\n " + << "time_of_flight : " << G4BestUnit(time_of_flight,"Time") <<" ;\n " + << "position : " << position <<" ;\n " + << "momentum : " << momentum <<" ;\n " + <AddHitsCollection(HCID,CryoCollection); +} + +G4bool LEMuSRCryoSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) +{ + // G4cout << "PROCESS HIT"<GetTrack()->GetDefinition()->GetParticleName(); // particle name + if(p_name=="mu+")mu=1; + if(p_name=="Mu")e=1; + // G4cout<<"mu+ "<< mu <<" mu "<SetParticleName(p_name); + aHit->SetSpin(spin); + + aHit->SetMomentum( hitmom ); + aHit->SetPosition( hitpos ); + + aHit->SetTimeOfFlight( tof); + aHit->SetEnergyDeposition( edep ); + + + CryoCollection->insert( aHit ); + // aHit->Print(); + // aHit->print("Statistics/SCIS.Hits"); + aHit->Draw(); + + + PrintAll(); + + + return true; +} + +void LEMuSRCryoSD::EndOfEvent(G4HCofThisEvent*) +{ + // G4int NbHits = CryoCollection->entries(); + // G4cout << "\n-------->Hits Collection: in this event they are " << NbHits + // << " hits in the cryo: " << G4endl; + // for (G4int i=0;iPrint(); + +} + +G4bool LEMuSRCryoSD::CheckCondition(const G4Step* aStep) +{ + G4bool condition=false; + if(p_name == "mu+"||p_name == "Mu") + { + if(aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_SAH2"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_SAH3"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_SAH1"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_CRSH2"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_CRSH"||aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()=="lv_SAPH") + { + condition=true; + } + } + return condition; + +} + + +void LEMuSRCryoSD::clear() +{ + delete CryoCollection; +} + +void LEMuSRCryoSD::DrawAll() +{ +} + +void LEMuSRCryoSD::PrintAll() +{ + +} + + +void LEMuSRCryoSD::GetDatas(const G4Step *aStep) +{ + // Get datas + //a Volume, name, spin + vname = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName(); + spin= aStep->GetTrack()->GetDefinition()->GetPDGSpin(); // spin in units of 1 + + //b Position momentum + hitpos = aStep->GetPreStepPoint()->GetPosition(); // position + hitmom = aStep->GetPreStepPoint()->GetMomentum(); // momentum + + //c Times + tof = aStep->GetPreStepPoint()->GetLocalTime(); // time since track creation + globaltime = aStep->GetPreStepPoint()->GetGlobalTime();// time since event creation + proptime = aStep->GetPreStepPoint()->GetProperTime(); // particle's proper time + + //d Energy + edep = aStep->GetTotalEnergyDeposit(); + + toten = aStep->GetTrack()->GetTotalEnergy(); + + kinen = aStep->GetTrack()->GetKineticEnergy(); + + +} + + +void LEMuSRCryoSD::getHit() +{ + theHit.kenergy = kinen/keV; + theHit.tenergy = toten/keV; + theHit.edeposit = edep/keV; + theHit.localtime = tof/ns; + theHit.globaltime = globaltime/ns; + theHit.proptime = proptime/ns; + theHit.positionx = hitpos.x()/mm; + theHit.positiony = hitpos.y()/mm; + theHit.positionz = hitpos.z()/mm; + theHit.momdirx = hitmom.x(); + theHit.momdiry = hitmom.y(); + theHit.momdirz = hitmom.z(); + theHit.foil = LEMuSRDetectorConstruction::GetInstance()->cfthk; + theHit.muon = mu; + theHit.positron = e; + theHit.gamma = g; + theHit.runid = G4RunManager::GetRunManager()->GetCurrentRun()->GetRunID(); +} + +// ROOT METHODS + +void LEMuSRCryoSD::BookRoot() +{ + // open root file + myFile = new TFile("SDCryoE0.root", "RECREATE"); + // myFile->SetCompressionLevel(1); + + tree = new TTree ("tree"," Cryo Datas"); + + tree->Branch("cryoHit",&theHit.kenergy,"kenergy/F:tenergy/F:edeposit/F:localtime/F:globaltime:propertime/F:positionx/F:positiony:positionz:momdirx:momdiry:momdirz/F:foil/F:muon/I:muonium/I:gamma/I:runID/I"); + +} + +void LEMuSRCryoSD::FillRoot() +{ + tree->Fill(); +} + +void LEMuSRCryoSD::WriteRoot() +{ + myFile->Write(); + myFile->Close(); +} + diff --git a/geant4/LEMuSR/src/LEMuSRDecay.cc b/geant4/LEMuSR/src/LEMuSRDecay.cc new file mode 100644 index 0000000..558e240 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRDecay.cc @@ -0,0 +1,196 @@ +#include"LEMuSRDecay.hh" + +#include "G4DynamicParticle.hh" +#include "G4DecayProducts.hh" +#include "G4DecayTable.hh" +#include "G4PhysicsLogVector.hh" +#include "G4ParticleChangeForDecay.hh" +#include "G4VExtDecayer.hh" +#include "G4ThreeVector.hh" +#include "LEMuSRMuonDecayChannel.hh" + +G4VParticleChange* LEMuSRDecay::DecayIt(const G4Track& aTrack, const G4Step& aStep) +{ + + + // G4cerr<<"METHOD CALLED WHEN SHOULD NOT BE AT ALL!!!!\n";//enable for geant code + // The DecayIt() method returns by pointer a particle-change object. + // Units are expressed in GEANT4 internal units. + // get particle + const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle(); + G4ParticleDefinition* aParticleDef = aParticle->GetDefinition(); + + + // if particle is not a muon + if(aParticle->GetDefinition()->GetParticleName()!="mu+"&&aParticle->GetDefinition()->GetParticleName()!="Mu") + { + G4ParticleChangeForDecay* k; + k = (G4ParticleChangeForDecay*)G4Decay::DecayIt(aTrack,aStep); + return k ; + } + // m_ExtDecayer = 0;//G4Decay::GetExtDecayer(); + m_RemainderLifeTime = G4Decay::GetRemainderLifeTime(); + + // check if the particle is stable + if (aParticleDef->GetPDGStable()) return &pParticleChangeForDecay ; + + + //check if thePreAssignedDecayProducts exists + const G4DecayProducts* o_products = (aParticle->GetPreAssignedDecayProducts()); + G4bool isPreAssigned = (o_products != 0); + G4DecayProducts* products = 0; + + // decay table + G4DecayTable *decaytable = aParticleDef->GetDecayTable(); + + // check if external decayer exists + G4bool isExtDecayer = (decaytable == 0); + + // Error due to NO Decay Table + if ( (decaytable == 0) && !isExtDecayer &&!isPreAssigned ){ +#ifdef G4VERBOSE + if (GetVerboseLevel()>0) { + G4cerr << "LEMuSRDecay::DoIt : decay table not defined for "; + G4cerr << aParticle->GetDefinition()->GetParticleName()<< G4endl; + } +#endif + pParticleChangeForDecay.SetNumberOfSecondaries(0); + // Kill the parent particle + pParticleChangeForDecay.ProposeTrackStatus( fStopAndKill ) ; + pParticleChangeForDecay.ProposeLocalEnergyDeposit(0.0); + + ClearNumberOfInteractionLengthLeft(); + return &pParticleChangeForDecay ; + } + + if (isPreAssigned) { + // copy decay products + products = new G4DecayProducts(*o_products); + } else { + + + //+++++++++++++++++++++++++++++++++++ACCORDING TO DECAY TABLE++++++++++++++++++++++++++ + // decay acoording to decay table + // choose a decay channel + G4VDecayChannel *decaychannel = decaytable->SelectADecayChannel(); + if (decaychannel == 0 ){ + // decay channel not found + G4Exception("G4Decay::DoIt : can not determine decay channel "); + } else { + G4int temp = decaychannel->GetVerboseLevel(); + // execute DecayIt() +#ifdef G4VERBOSE + if (GetVerboseLevel()>1) { + G4cerr << "LEMuSRDecay::DoIt : selected decay channel addr:" << decaychannel <SetVerboseLevel(GetVerboseLevel()); + } +#endif + + // CHECK FOR POLARIASATION AND ASSIGN IT TO THE DECAY METHOD + + G4ThreeVector parent_polarization = aParticle->GetPolarization(); + + //-----------------------------INFORMATION--------------------------------- + // G4cout <<"LEMuSRDecay MESSAGE:: polarization is " << parent_polarization <<" .\n"; + if(aParticle->GetDefinition()->GetParticleName()=="mu+"||aParticle->GetDefinition()->GetParticleName()=="Mu") + { + decaychannel->SetParentPolarization(parent_polarization); + if(decaychannel->GetKinematicsName()=="LEMuSR Muon Decay") + { + products = decaychannel->DecayIt(aParticle->GetMass());//decaychannel->DecayItPolarized(aParticle->GetMass(),parent_polarization);// has to be included in G4VDecayChannel. + testa++; + } + + else if(decaychannel->GetKinematicsName()=="Muon Decay") + { + products = decaychannel->DecayIt(aParticle->GetMass()); + testb++; + } +#ifdef G4VERBOSE + if (GetVerboseLevel()>1) { + G4cout<<"Decay Channela "<DecayIt(aParticle->GetMass()) ; + + + +#ifdef G4VERBOSE + if (GetVerboseLevel()>1) { + decaychannel->SetVerboseLevel(temp); + } +#endif +#ifdef G4VERBOSE + // for debug + //if (! products->IsChecked() ) products->DumpInfo(); +#endif + } + } + + // get parent particle information ................................... + G4double ParentEnergy = aParticle->GetTotalEnergy(); + G4ThreeVector ParentDirection(aParticle->GetMomentumDirection()); + + //boost all decay products to laboratory frame + G4double energyDeposit = 0.0; + G4double finalGlobalTime = aTrack.GetGlobalTime(); + if (aTrack.GetTrackStatus() == fStopButAlive ){ + // AtRest case + finalGlobalTime += m_RemainderLifeTime; + energyDeposit += aParticle->GetKineticEnergy(); + if (isPreAssigned) products->Boost( ParentEnergy, ParentDirection); + } else { + // PostStep case + if (!isExtDecayer) products->Boost( ParentEnergy, ParentDirection); + } + //add products in pParticleChangeForDecay + G4int numberOfSecondaries = products->entries(); + + pParticleChangeForDecay.SetNumberOfSecondaries(numberOfSecondaries); + +#ifdef G4VERBOSE + if (GetVerboseLevel()>1) { + G4cerr << "LEMuSRDecay::DoIt : Decay vertex :"; + G4cerr << " Time: " << finalGlobalTime/ns << "[ns]"; + G4cerr << " X:" << (aTrack.GetPosition()).x() /cm << "[cm]"; + G4cerr << " Y:" << (aTrack.GetPosition()).y() /cm << "[cm]"; + G4cerr << " Z:" << (aTrack.GetPosition()).z() /cm << "[cm]"; + G4cerr << G4endl; + G4cerr << "G4Decay::DoIt : decay products in Lab. Frame" << G4endl; + products->DumpInfo(); + } +#endif + G4int index; + G4ThreeVector currentPosition; + const G4TouchableHandle thand = aTrack.GetTouchableHandle(); + + for (index=0; index < numberOfSecondaries; index++) + { + // get current position of the track + currentPosition = aTrack.GetPosition(); + // create a new track object + G4Track* secondary = new G4Track( products->PopProducts(), + finalGlobalTime , + currentPosition ); + // switch on good for tracking flag + secondary->SetGoodForTrackingFlag(); + secondary->SetTouchableHandle(thand); + // add the secondary track in the List + pParticleChangeForDecay.AddSecondary(secondary); + } + delete products; + + // Kill the parent particle + pParticleChangeForDecay.ProposeTrackStatus( fStopAndKill ) ; + + pParticleChangeForDecay.ProposeLocalEnergyDeposit(energyDeposit); + pParticleChangeForDecay.ProposeGlobalTime( finalGlobalTime ); + // reset NumberOfInteractionLengthLeft + ClearNumberOfInteractionLengthLeft(); + + return &pParticleChangeForDecay ; + +} diff --git a/geant4/LEMuSR/src/LEMuSRDepolarize.cc b/geant4/LEMuSR/src/LEMuSRDepolarize.cc new file mode 100644 index 0000000..a42e191 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRDepolarize.cc @@ -0,0 +1,175 @@ + +#include "LEMuSRDepolarize.hh" +#include "G4StepStatus.hh" +#include "G4Navigator.hh" +#include "G4TransportationManager.hh" +#include "Randomize.hh" +#include "G4ProductionCutsTable.hh" +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +using namespace std; + +LEMuSRDepolarize:: LEMuSRDepolarize(const G4String& name , + G4ProcessType aType ) + : G4VDiscreteProcess(name, aType) +{} + + +LEMuSRDepolarize:: ~LEMuSRDepolarize() +{} + + +G4VParticleChange* LEMuSRDepolarize::AtRestDoIt( + const G4Track& trackData, + const G4Step& aStep ) +{ + // Initialize ParticleChange (by setting all its members equal + // to corresponding members in G4Track) + fParticleChange.Initialize(trackData); + + // tao :: Get Time + itime = trackData.GetProperTime(); + gtime = trackData.GetGlobalTime(); + ftime = trackData.GetDynamicParticle()->GetPreAssignedDecayProperTime(); + + deltatime = ftime - itime; + fParticleChange.ProposeGlobalTime(deltatime + itime -gtime); + + // set position momentum energy + fParticleChange.ProposePosition(trackData.GetPosition()); + fParticleChange.ProposeMomentumDirection(trackData.GetMomentumDirection()); + fParticleChange.ProposeEnergy(trackData.GetKineticEnergy()); + fParticleChange.ProposeGlobalTime(gtime); + fParticleChange.ProposeProperTime(itime); + fParticleChange.ProposeTrackStatus(trackData.GetTrackStatus()) ; + + if( CheckCondition(aStep)) + { + G4double costheta, sintheta, cosphi, sinphi, theta, phi; + + phi = 2.0*M_PI*G4UniformRand()*rad; + sinphi = sin(phi); + cosphi = cos(phi); + + theta = M_PI*G4UniformRand()*rad; + sintheta = sin(theta); + costheta = cos(theta); + + // rotation angles + G4double px = sintheta*sinphi; + G4double py = sintheta*cosphi; + G4double pz = costheta; + + G4ThreeVector direction0(px,py,pz); + + fParticleChange.ProposePolarization(px,py,pz); + // G4cout<<"DEPOLARIZE at rest"<GetPreAssignedDecayProperTime(); + + deltatime = ftime - itime; + fParticleChange.ProposeGlobalTime(deltatime + itime -gtime); + + // set position momentum energy + fParticleChange.ProposePosition(trackData.GetPosition()); + fParticleChange.ProposeMomentumDirection(trackData.GetMomentumDirection()); + fParticleChange.ProposeEnergy(trackData.GetKineticEnergy()); + fParticleChange.ProposeGlobalTime(gtime); + fParticleChange.ProposeProperTime(itime); + fParticleChange.ProposeTrackStatus(trackData.GetTrackStatus()) ; + + if( CheckCondition(aStep)) + { + G4double costheta, sintheta, cosphi, sinphi, theta, phi; + + phi = 2.0*M_PI*G4UniformRand()*rad; + sinphi = sin(phi); + cosphi = cos(phi); + + theta = M_PI*G4UniformRand()*rad; + sintheta = sin(theta); + costheta = cos(theta); + + // rotation angles + G4double px = sintheta*sinphi; + G4double py = sintheta*cosphi; + G4double pz = costheta; + + G4ThreeVector direction0(px,py,pz); + fParticleChange.ProposePolarization(px,py,pz); + // G4cout<<"DEPOLARIZE post step"<GetDefinition()->GetParticleName(); // particle name + if((p_name == "mu+"||p_name=="Mu")) + { + if(aStep.GetTrack()->GetVolume()->GetLogicalVolume()->GetName()=="lv_SAH1" + ||aStep.GetTrack()->GetVolume()->GetLogicalVolume()->GetName()=="lv_SAH2" + ||aStep.GetTrack()->GetVolume()->GetLogicalVolume()->GetName()=="lv_SAH3" + ||aStep.GetTrack()->GetVolume()->GetLogicalVolume()->GetName()=="lv_SAPH") + { + condition=true;// ACTIVATE PROCESS IN VOLUME ONLY:: LOOK IN G4 DOCUMENTATION + } + } + return condition; + +} + + +G4double LEMuSRDepolarize:: GetMeanFreePath(const G4Track& , + G4double , + G4ForceCondition* condition + ) +{ + + *condition = Forced; + return DBL_MAX; +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +void LEMuSRDepolarize::GetDatas( const G4Step* ) +{} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + + + +void LEMuSRDepolarize::PrepareSecondary(const G4Track& track) +{ + aSecondary = new G4Track(DP,track.GetGlobalTime(),track.GetPosition()); +} diff --git a/geant4/LEMuSR/src/LEMuSRDetectorConstruction.cc b/geant4/LEMuSR/src/LEMuSRDetectorConstruction.cc new file mode 100644 index 0000000..e95d096 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRDetectorConstruction.cc @@ -0,0 +1,1383 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRDetectorConstruction.cc , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-06-24 16:33 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// DETECTOR CONSTRUCTION +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + +// G4 GEOMETRIC FORMS CLASSES + +#include "G4Tubs.hh" +#include "G4Box.hh" +#include "G4Trap.hh" +#include "G4Cons.hh" +#include "G4Sphere.hh" +#include "G4SubtractionSolid.hh" +#include "G4UnionSolid.hh" +#include "G4UnitsTable.hh" + +// G4 VOLUME DEFINITION CLASSES +#include "G4LogicalVolume.hh" +#include "G4VPhysicalVolume.hh" +#include "G4PVReplica.hh" +#include "G4PVPlacement.hh" +#include "G4GeometryManager.hh" +#include "G4FieldManager.hh" +#include "G4PropagatorInField.hh" +#include "G4ChordFinder.hh" +#include "G4El_UsualEqRhs.hh" +#include "G4ClassicalRK4.hh" +#include "G4SimpleHeum.hh" +#include "G4SimpleRunge.hh" +#include "G4MagIntegratorStepper.hh" +#include "G4TransportationManager.hh" +#include "G4GeometryManager.hh" +#include "G4UnitsTable.hh" +//#include "G4RotationMatrix.hh" + +// G4 CLASSES +#include "G4ios.hh" +#include + + +// HEADER +#include "LEMuSRDetectorConstruction.hh" +#include "LEMuSRDetectorMessenger.hh" + + +// process remove +#include "G4ParticleTable.hh" +#include "G4ParticleDefinition.hh" +#include "G4ParticleChange.hh" +#include "G4ProcessVector.hh" +#include "G4ProcessManager.hh" +#include "G4VProcess.hh" + +// electric fieldmap +#include "LEMuSRElectricField.hh" +#include "LEMuSRElFieldMix.hh" +#include "LEMuSRElMagField.hh" +#include "G4ElectricField.hh" +#include "G4ElectroMagneticField.hh" +#include "G4EqMagElectricField.hh" +#include "G4El_MagEqRhs.hh" +#include "LEMuSRCryoField.hh" +#include "LEMuSRMag_SpinEqRhs.hh" +#include "LEMuSRElMag_SpinEqRhs.hh" +#include "LEMuSRMagneticField.hh" +#include "G4Mag_SpinEqRhs.hh" +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + +// CONSTRUCTOR & DESTRUCTOR +LEMuSRDetectorConstruction::LEMuSRDetectorConstruction() +{ + MaterialsDefinition (); + Messenger = new LEMuSRDetectorMessenger(this); + + //default visualization + dSPhi = 0*deg; // starting angle + dEPhi = 360*deg; // ending angle + + +#ifdef LEMU_GET_NEWMAPS + NEWMAPS(); +#endif + + //do not change following values!!!________________________________ + AsymCheck=0; // test asymmetry + scint = 0; // initial state for the scintillator sensitive detector + mcp = 0; // initial state for the mcp sensitive detector + cryo = 0; // initial state for the cryo sensitive detector + mcdetector = 1;// default apparatus with mcp detector + L3FieldVal=6.78; // initial state for the third lönse field + FieldStepLim=10.*mm; + Grid=1; + Guards=0; + Material_SAH="copper"; + //_________________________________________________________________ + + // can be changed + magfield = 1;// magfield enabled + elfield = 0;// 3rd lens elfield / 0 = disabled + anode_elfield =0; //anode field / 0 = disabled + trigger_field = 1;// trigger field / 1 = enabled + AnodeFieldVal=1;// scale of RA field + RALval=0.; // left anode voltage + RARval=0.; // right anode voltage + cfthk = 1.75;// carbon foil thickness in unit mug/cm2 + cryoFieldLength = 3.5; // cryo field length + cryoVoltage = 12.; // cryo voltage + B=50.; // magfield value + + theDetector= this; +} + +LEMuSRDetectorConstruction::~LEMuSRDetectorConstruction() +{ + +} + +LEMuSRDetectorConstruction* LEMuSRDetectorConstruction::theDetector=0; +LEMuSRDetectorConstruction* LEMuSRDetectorConstruction::GetInstance() +{ + return theDetector; +} + + + +// CONTRUCT THE DETECTOR + + +G4VPhysicalVolume* LEMuSRDetectorConstruction::Construct() +{ + return lemuDetector(); +} + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE DETECTOR +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +G4VPhysicalVolume* LEMuSRDetectorConstruction::lemuDetector() // !attention au V dans G4VP... +{ + + + // +++++++++++++++++++++++++++++++DEFINE THE MOTHER VOLUME: THE LABORATOY++++++++++++++++++++++ + // solid + G4double LABO_x = 2*m; + G4double LABO_y = 2*m; + G4double LABO_z = 2*m; + + LABO_box = new G4Box("World_box",LABO_x,LABO_y,LABO_z); + // logical volume + LABO_material = G4Material::GetMaterial("Air"); + lv_LABO = new G4LogicalVolume(LABO_box,LABO_material,"lv_World",0,0,0); + + // physical volume + pv_LABO = new G4PVPlacement(0, // no rotation matrix + G4ThreeVector(), // ()==(0,0,0) + lv_LABO, // logical volume + "pv_World", // name + 0, // no mother volume + false, // always false + 0); // !!! lv_LABO is the world logical, mother volume is 0 for the world! + + //SET VISUAL ATTRIBUTES + //-------NONE---------- + + lv_LABO->SetVisAttributes(G4VisAttributes::Invisible); + G4UserLimits* LABO_lim = new G4UserLimits(); + LABO_lim->SetUserMinEkine(1.*eV); + // LABO_lim->SetUserMaxTrackLength(1.2*m); + + lv_LABO->SetUserLimits(LABO_lim); + + //--------------------- + + + // END OF LABORATORY DEFINITION // + + + + // &&&&&&&&&&&&&&&& ADD THE OTHER DETECTOR VOLUMES &&&&&&&&&&&&&&&&&&&&&// + + + + // LOAD ATTRIBUTES AND USER LIMIT + LoadAttributes(); + //------------------------------- + + // main materials + + Vacuum = G4Material::GetMaterial("vacuum"); + SSteel = G4Material::GetMaterial("stainless_steel"); + //------------------------------- + + + lemuMCP2(); + + + if(AsymCheck==1) + { + lemuAsym(); + } + + + + if(AsymCheck==0) + { + + lemuTrigger_Detector(); + lemuCGate(); + lemuLinse3(); + lemuANODE(); + lemuSCINT(); + +#ifdef LEMU_TEST_FOCAL_LENGTH + lemuFieldCheck(); +#endif + + + if(mcdetector==0) //then use cryostat + { + lemuCRYO(); + if(cryo==0) + { + G4SDManager* SDMGR = G4SDManager::GetSDMpointer(); + + G4String CryoName = "/LEMuSR/Cryo_sample"; + + CryoSD = new LEMuSRCryoSD(CryoName); + + SDMGR->AddNewDetector(CryoSD); + cryo=1; + } + + lv_SAH2->SetSensitiveDetector(CryoSD); + + } + + + else if(mcdetector==1) //then use multiple channel detector + { + lemuMCPdet(); + if(mcp==0) + { + G4SDManager* SDMGR = G4SDManager::GetSDMpointer(); + + G4String McpName = "/LEMuSR/MCP"; + + McpSD = new LEMuSRMcpSD(McpName); + + SDMGR->AddNewDetector(McpSD); + mcp=1; + } + + lv_DMCP->SetSensitiveDetector(McpSD); + + } + + + //SENSITIVE DETECTOR + + + if(scint==0) + { + G4SDManager* SDMGR = G4SDManager::GetSDMpointer(); + + G4String iScintName = "/LEMuSR/Scintillator/Inner"; + G4String oScintName = "/LEMuSR/Scintillator/Outer"; + + iScintSD = new LEMuSRScintSD(iScintName); + oScintSD = new LEMuSROScintSD(oScintName); + + SDMGR->AddNewDetector(iScintSD); + SDMGR->AddNewDetector(oScintSD); + scint=1; + } + + lv_SCIS->SetSensitiveDetector(iScintSD); + lv_SCOS->SetSensitiveDetector(oScintSD); + + } + + + + + + + // PRINT STATUS + G4cout<<"geometry defined"<SetVisAttributes(Blue_style);//G4VisAttributes::Invisible); + lv_MCPS->SetVisAttributes(Blue_style); + lv_F160->SetVisAttributes(fBlue_style); + lv_F100->SetVisAttributes(fBlue_style); + lv_F200->SetVisAttributes(fBlue_style); + // lv_GATV->SetVisAttributes(Blue_style);//G4VisAttributes::Invisible); + lv_GATS->SetVisAttributes(Blue_style); + + + // user limits + G4UserLimits* RAV_lim = new G4UserLimits(); + RAV_lim -> SetMaxAllowedStep(FieldStepLim ); + //RAV_lim->SetUserMaxTrackLength(1.2*m); + RAV_lim-> SetUserMinEkine(1.*eV); + lv_MCPV->SetUserLimits(RAV_lim); + // + +} + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE ANODE +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +void LEMuSRDetectorConstruction::lemuANODE() +{ + // conical anode + + G4double dSPhie=-acos(1/4.51469); + G4double dEPhie=2*acos(1/4.51469); + RA_E_cone= new G4Cons( "sRA_E", 4.51469*cm,6.25*cm,3.35*cm,3.9*cm,2.25*cm, dSPhie, dEPhie); + + RA_M_cone= new G4Cons( "sRA_M", 5.67937*cm,6.25*cm,4.51469*cm,6.25*cm,2.25*cm, dSPhie, dEPhie); + + RA_Ebox = new G4Box("RA_Ebox", 1.*cm,12.5*cm,2.25*cm ); + RA_Mbox = new G4Box("RA_Mbox", 1.*cm,12.5*cm,2.25*cm ); + //boolean + // RA_E= new G4SubtractionSolid("RA_E", RA_E_cone, RA_Ebox); + // RA_M= new G4SubtractionSolid("RA_M", RA_M_cone, RA_Mbox); + + RA_G_tube= new G4Tubs( "sRA_G", 5.8*cm,6.25*cm,5.55*cm, dSPhi, dEPhi); + + + // logicals volumes + lv_RA_E = new G4LogicalVolume( RA_E_cone , SSteel ,"lv_RA_E",0,0,0); + lv_RA_M = new G4LogicalVolume( RA_M_cone , SSteel ,"lv_RA_M",0,0,0); + lv_RA_G = new G4LogicalVolume( RA_G_tube , SSteel ,"lv_RA_G",0,0,0); + + + // physical volumes + RA_Gz= -25.45+3.75; + RA_Ez= -10.35+2.25; + RA_Mz= -10.35-2.25; + + + //#changed mother volumes!!!! + pv_RA_E = new G4PVPlacement( 0, G4ThreeVector( 0*cm, 0*cm, RA_Ez*cm-mcpv_z),lv_RA_E ,"pv_RA_E",lv_MCPV, false, 0 ); + pv_RA_M = new G4PVPlacement( 0, G4ThreeVector( 0*cm, 0*cm, RA_Mz*cm-mcpv_z),lv_RA_M ,"pv_RA_M",lv_MCPV, false, 0 ); + pv_RA_G = new G4PVPlacement( 0, G4ThreeVector( 0*cm, 0*cm, RA_Gz*cm-mcpv_z),lv_RA_G ,"pv_RA_G",lv_MCPV, false, 0 ); + + rotation1=G4RotateZ3D(180*deg) ; + + G4Transform3D tr_E,tr_M, trl_E, trl_M; + trl_E=G4Translate3D(0.,0.,RA_Ez*cm-mcpv_z); + trl_M=G4Translate3D(0.,0.,RA_Mz*cm-mcpv_z); + + tr_E=trl_E*rotation1; + tr_M=trl_M*rotation1; + + + G4VPhysicalVolume* pv_RA_E2; + pv_RA_E2 = new G4PVPlacement(tr_E,lv_RA_E ,"pv_RA_E2",lv_MCPV, false, 0 ); + G4VPhysicalVolume* pv_RA_M2; + pv_RA_M2 = new G4PVPlacement(tr_M,lv_RA_M ,"pv_RA_M2",lv_MCPV, false, 0 ); + + + // Visual attributes + lv_RA_E->SetVisAttributes(lBlue_style); + lv_RA_M->SetVisAttributes(dBlue_style); + lv_RA_G->SetVisAttributes(lBlue_style); + + +} + + + + + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE CRYOSTAT +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +void LEMuSRDetectorConstruction:: lemuCRYO() +{ + + // cu or al plates + SAH1_tube= new G4Tubs( "sSAH1", 0.*cm,3.5*cm,0.25*cm, dSPhi, dEPhi); + SAH2_tube= new G4Tubs( "sSAH2", 0.*cm,3.5*cm,0.2*cm, dSPhi, dEPhi); + SAH3_tube= new G4Tubs( "sSAH3", 2.*cm,3.5*cm,0.05*cm, dSPhi, dEPhi); + SAPH_tube= new G4Tubs( "sSAPH", 0.*cm,3.0*cm,0.3*cm, dSPhi, dEPhi); + + // cryo + COFI_tube= new G4Tubs( "sCOFI", 0.*cm,2.75*cm,0.5*cm, dSPhi, dEPhi); + CRY1_tube= new G4Tubs( "sCRY1", 0.*cm,1.5*cm,0.35*cm, dSPhi, dEPhi); + CRY2_tube= new G4Tubs( "sCRY2", 0.5*cm,1.5*cm,2.5*cm, dSPhi, dEPhi); + CRY3_tube= new G4Tubs( "sCRY3", 3.8*cm,4.7*cm,0.55*cm, dSPhi, dEPhi); + CRY4_tube= new G4Tubs( "sCRY4", 1.5*cm,3.8*cm,0.1*cm, dSPhi, dEPhi); + CRSH_tube= new G4Tubs( "sCRSH", 4.7*cm,4.8*cm,4.5*cm, dSPhi, dEPhi);//HE shield + CRSH2_tube= new G4Tubs( "sCRSH2", 3.0*cm,4.8*cm,.05*cm, dSPhi, dEPhi);//front HE shield + + //materials + SAH_material = G4Material::GetMaterial(Material_SAH);//G4Material::GetMaterial("aluminium"); + SAPH_material = G4Material::GetMaterial("saphire"); + Copper = G4Material::GetMaterial("copper"); + + + Guard_Rings = new G4Tubs ("sGuard",3.0*cm,3.5*cm,0.25*cm, dSPhi, dEPhi); + + + // logicals volumes + + + // sample MAGNETIC field + sampleField = new LEMuSRRNDMAGField(G4ThreeVector(0.,0.,100*gauss),1.); + + G4Mag_SpinEqRhs *Mag_SpinEqRhs; + G4MagIntegratorStepper *pStepper; + Mag_SpinEqRhs = new G4Mag_SpinEqRhs(sampleField); + pStepper = new G4ClassicalRK4( Mag_SpinEqRhs,12 ); + + G4ChordFinder* pChordFinder = new G4ChordFinder(sampleField,1.e-5* mm, pStepper ); + G4FieldManager* sampleFieldMgr = new G4FieldManager(); // 1 + sampleFieldMgr->SetDetectorField(sampleField,true); + sampleFieldMgr->SetChordFinder(pChordFinder); + + + lv_SAH1 = new G4LogicalVolume( SAH1_tube , SAH_material ,"lv_SAH1",0,0,0); + lv_SAH2 = new G4LogicalVolume( SAH2_tube , SAH_material ,"lv_SAH2",0,0,0); + lv_SAH3 = new G4LogicalVolume( SAH3_tube , SAH_material ,"lv_SAH3",0,0,0); + lv_SAPH = new G4LogicalVolume( SAPH_tube , SAPH_material ,"lv_SAPH",0,0,0); + lv_COFI = new G4LogicalVolume( COFI_tube , Copper ,"lv_COFI",0,0,0); + lv_CRY1 = new G4LogicalVolume( CRY1_tube , Copper ,"lv_CRY1",0,0,0); + lv_CRY2 = new G4LogicalVolume( CRY2_tube , Copper ,"lv_CRY2",0,0,0); + lv_CRY3 = new G4LogicalVolume( CRY3_tube , Copper ,"lv_CRY3",0,0,0); + lv_CRY4 = new G4LogicalVolume( CRY4_tube , Copper ,"lv_CRY4",0,0,0); + lv_CRSH = new G4LogicalVolume( CRSH_tube , Copper ,"lv_CRSH",0,0,0); + lv_CRSH2 = new G4LogicalVolume( CRSH2_tube , Copper ,"lv_CRSH2",0,0,0); + + lv_Guards = new G4LogicalVolume(Guard_Rings, Copper, "lv_GRING",0,0,0); + + + + // physical volumes + offset=0.0; + pv_SAH1 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 2.65*cm-mcpv_z), lv_SAH1 ,"pv_SAH1",lv_MCPV,false, 0 ); + pv_SAH2 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 1.6*cm-mcpv_z), lv_SAH2 ,"pv_SAH2",lv_MCPV, false, 0 ); + // pv_SAH3 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 1.35*cm-mcpv_z),lv_SAH3 ,"pv_SAH3",lv_MCPV, false, 0 ); + pv_SAPH = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 2.10*cm-mcpv_z),lv_SAPH ,"pv_SAPH",lv_MCPV, false, 0 ); + pv_COFI = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 3.40*cm-mcpv_z),lv_COFI ,"pv_COFI",lv_MCPV, false, 0 ); + pv_CRY1 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 4.25*cm-mcpv_z),lv_CRY1 ,"pv_CRY1",lv_MCPV, false, 0 ); + pv_CRY2 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 6.75*cm-mcpv_z),lv_CRY2 ,"pv_CRY2",lv_MCPV, false, 0 ); + pv_CRY3 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 5.10*cm-mcpv_z),lv_CRY3 ,"pv_CRY3",lv_MCPV, false, 0 ); + pv_CRY4 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 5.10*cm-mcpv_z),lv_CRY4 ,"pv_CRY4",lv_MCPV, false, 0 ); + pv_CRSH = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 1.6*cm-mcpv_z),lv_CRSH ,"pv_CRSH", lv_MCPV, false, 0 ); + pv_CRSH2 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 1.6*cm-mcpv_z-4.55*cm),lv_CRSH2 ,"pv_CRSH2", lv_MCPV, false, 0 ); + + pv_Guard1 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 1.6*cm- 1.43333*cm-mcpv_z), lv_Guards ,"pv_G_Ring1",lv_MCPV, false, 0); + pv_Guard2 = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 1.6*cm- 1.43333*cm- 1.43333*cm-mcpv_z), lv_Guards ,"pv_G_Ring2",lv_MCPV, false, 0); + + + // Visual Attributes + lv_SAH1->SetVisAttributes(Red_style); + lv_SAH2->SetVisAttributes(Red_style); + lv_SAH3->SetVisAttributes(Red_style); + lv_SAPH->SetVisAttributes(oxsteel); + lv_COFI->SetVisAttributes(dRed_style); + lv_CRY1->SetVisAttributes(dRed_style); + lv_CRY2->SetVisAttributes(dRed_style); + lv_CRY3->SetVisAttributes(dRed_style); + lv_CRY4->SetVisAttributes(dRed_style); + lv_CRSH->SetVisAttributes(dRed_style); + lv_CRSH2->SetVisAttributes(Red_style); + + + + + +} + + + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE MULTIPLE CHANNEL-DETECTOR +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +void LEMuSRDetectorConstruction:: lemuMCPdet() +{ + + //MCP + DMCP_tube= new G4Tubs( "sDMCP",0.*cm,2.15*cm,0.15*cm , dSPhi, dEPhi); + MCPM_tube= new G4Tubs( "sMCPM", 2.40*cm, 3.25*cm, 0.075*cm, dSPhi, dEPhi); + MCPA_box = new G4Box( "sMCPA", 3.65*cm, 3.65*cm, 0.40*cm); + ANVA_tube= new G4Tubs( "sANVA", 0.00*cm, 2.75*cm, 0.15*cm, dSPhi, dEPhi); + MCSR_box = new G4Box( "sMCSR", 3.65*cm, 3.65*cm, 0.10*cm); + MCVR_tube= new G4Tubs( "sMCVR", 0.00*cm, 2.75*cm, 0.10*cm, dSPhi, dEPhi); + MCSS_tube= new G4Tubs( "sMCSS", 4.00*cm, 4.80*cm, 0.25*cm, dSPhi, dEPhi); + + //materials + + Macor = G4Material::GetMaterial("macor"); + DMCP_material = G4Material::GetMaterial("mcpglass"); + + + // logicals volumes + lv_DMCP = new G4LogicalVolume( DMCP_tube , DMCP_material ,"lv_DMCP",0,0,0); + lv_MCPM = new G4LogicalVolume( MCPM_tube , Macor ,"lv_MCVR",0,0,0); + lv_MCPA = new G4LogicalVolume( MCPA_box , SSteel ,"lv_MCPA",0,0,0); + lv_ANVA = new G4LogicalVolume( ANVA_tube , Vacuum ,"lv_ANVA",0,0,0); + lv_MCSR = new G4LogicalVolume( MCSR_box , SSteel ,"lv_MCSR",0,0,0); + lv_MCVR = new G4LogicalVolume( MCVR_tube , Vacuum ,"lv_MCVR",0,0,0); + lv_MCSS = new G4LogicalVolume( MCSS_tube , SSteel ,"lv_MCSS",0,0,0); + + + // physical volumes + pv_DMCP = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 2.15*cm-mcpv_z),lv_DMCP ,"pv_DMCP",lv_MCPV, false, 0 ); + pv_MCPM = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 1.955*cm-mcpv_z),lv_MCPM ,"pv_MCPM",lv_MCPV, false, 0 ); + pv_MCPM2= new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 2.405*cm-mcpv_z),lv_MCPM ,"pv_MCPM2",lv_MCPV, false, 0 ); + pv_MCSR = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 2.63*cm-mcpv_z),lv_MCSR ,"pv_MCSR",lv_MCPV, false, 0 ); + pv_MCVR = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 0.0*cm),lv_MCVR ,"pv_MCVR",lv_MCSR, false, 0 );//CF SUBSTRACTION + pv_MCPA = new G4PVPlacement( 0, G4ThreeVector(0 *cm,0 *cm, 3.73*cm-mcpv_z),lv_MCPA ,"pv_MCPA",lv_MCPV, false, 0 ); + pv_ANVA = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, -0.25*cm),lv_ANVA ,"pv_ANVA",lv_MCPA, false, 0 ); // PART OF THE anode + pv_ANVA2= new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 0.25*cm),lv_ANVA ,"pv_ANVA2",lv_MCPA, false, 0 ); + pv_MCSS = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 6.38*cm-mcpv_z),lv_MCSS ,"pv_MCSS",lv_MCPV, false, 0 ); + + // Visual Attributes + lv_DMCP->SetVisAttributes(MCP_style); + lv_MCPM->SetVisAttributes(MACOR_style); + lv_MCSR->SetVisAttributes(Green_style); + lv_MCVR->SetVisAttributes(VTBB_style); + lv_MCPA->SetVisAttributes(Green_style); + lv_ANVA->SetVisAttributes(VTBB_style); + lv_MCSS ->SetVisAttributes(Green_style); + +} + + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE SCINTILLATOR +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +void LEMuSRDetectorConstruction::lemuSCINT() +{ + + // solids + SCIS_tube= new G4Tubs("sSCIS",9.0*cm,9.5*cm, 13.0*cm, -45*deg, +90*deg); + SCOS_tube= new G4Tubs("sSCOS",9.6*cm,10.1*cm, 13.0*cm, -45*deg, +90*deg); + + // materials + SC_material= G4Material::GetMaterial("scint"); + + // logical + lv_SCIS= new G4LogicalVolume(SCIS_tube,SC_material,"lv_SCIS",0,0,0); + lv_SCOS= new G4LogicalVolume(SCOS_tube,SC_material,"lv_SCOS",0,0,0); + + // physical + rotation1=G4RotateZ3D(90*deg) ; + rotation2=G4RotateZ3D(180*deg) ; + rotation3=G4RotateZ3D(270*deg) ; + + pv_SCISr = new G4PVPlacement( rotation2,lv_SCIS ,"pv_SCISr",lv_LABO, false, 0 ); + pv_SCOSr = new G4PVPlacement( rotation2,lv_SCOS ,"pv_SCOSr",lv_LABO, false, 0 ); + + + if(halfview==0) + { + pv_SCISt = new G4PVPlacement( rotation1,lv_SCIS ,"pv_SCISt",lv_LABO, false, 0 ); + pv_SCOSt = new G4PVPlacement( rotation1,lv_SCOS ,"pv_SCOSt",lv_LABO, false, 0 ); + + pv_SCISl = new G4PVPlacement( 0 , G4ThreeVector(0 *cm,0 *cm, 0*cm),lv_SCIS ,"pv_SCISl",lv_LABO, false, 0 ); + pv_SCOSl = new G4PVPlacement( 0 , G4ThreeVector(0 *cm,0 *cm, 0*cm),lv_SCOS ,"pv_SCOSl",lv_LABO, false, 0 ); + + pv_SCISb = new G4PVPlacement( rotation3,lv_SCIS ,"pv_SCISb",lv_LABO, false, 0 ); + pv_SCOSb = new G4PVPlacement( rotation3,lv_SCOS ,"pv_SCOSb",lv_LABO, false, 0 ); + + } + else if(halfview==1) + { + pv_SCISb = new G4PVPlacement( rotation3,lv_SCIS ,"pv_SCISb",lv_LABO, false, 0 ); + pv_SCOSb = new G4PVPlacement( rotation3,lv_SCOS ,"pv_SCOSb",lv_LABO, false, 0 ); + pv_SCISt = new G4PVPlacement( rotation1,lv_SCIS ,"pv_SCISt",lv_LABO, false, 0 ); + pv_SCOSt = new G4PVPlacement( rotation1,lv_SCOS ,"pv_SCOSt",lv_LABO, false, 0 ); + } + + + // vis attributes + lv_SCIS->SetVisAttributes(SCINT_style); + lv_SCOS->SetVisAttributes(dSCINT_style); +} + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE THIRD LENS +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + +void LEMuSRDetectorConstruction::lemuLinse3() +{ + + // L3 tube + L3VA_tube= new G4Tubs( "sL3VA", 0.*cm,10.0*cm,22.0*cm, dSPhi, dEPhi); + L3ST_tube= new G4Tubs( "sL3ST", 10.0*cm, 10.3*cm, 22.0*cm, dSPhi, dEPhi); + + L3F_tube= new G4Tubs( "sL3F", 10.3*cm, 12.65*cm, 1.2*cm, dSPhi, dEPhi); + + // Ground Potential tubes + L3GP1= new G4Tubs("LGP1", 6.5*cm, 6.7*cm, 6.65*cm, dSPhi, dEPhi); + L3GP2= new G4Tubs("LGP2", 8.1*cm, 8.3*cm, 6.65*cm, dSPhi, dEPhi); + L3GP3= new G4Tubs("LGP3", 6.7*cm,8.1*cm,0.4*cm, dSPhi, dEPhi); + + // High Potential tube + + L3HP1= new G4Tubs("LHP1", 6.5*cm, 8.3*cm, 5.5*cm, dSPhi, dEPhi); + L3HP2= new G4Tubs("LHP2", 6.7*cm, 8.1*cm, 5.*cm, dSPhi, dEPhi); + L3HP4= new G4Tubs("LHP4", 8.1*cm, 8.3*cm, 0.6*cm, dSPhi, dEPhi); + L3HP5= new G4Tubs("LHP5", 6.7*cm, 6.85*cm, 0.75*cm, dSPhi, dEPhi); + + // L3HP_tube= new G4SubtractionSolid("sL3HP", L3HP1, L3HP2); + + + // Logical volumes + + // electric field + + if(elfield==1) + { + + G4ElectricField* L3Field = new LEMuSRElectricField(L3FieldVal, + "/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/ThirdLense/L3b.map" + ,"dm",-567,60,60,100); + + //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + L3FieldMgr = new G4FieldManager();//1 + + G4MagIntegratorStepper *pStepper; + G4El_UsualEqRhs *fEquation = new G4El_UsualEqRhs(L3Field); + + pStepper = new G4ClassicalRK4( fEquation, 12 ); + + // equation considers spin or not + G4ChordFinder* pChordFinder = new G4ChordFinder( L3Field, + 1.e-3 * mm, // Minimum step size + pStepper); + + L3FieldMgr->SetDetectorField(L3Field); + L3FieldMgr->SetChordFinder(pChordFinder); + + lv_L3VA = new G4LogicalVolume( L3VA_tube , Vacuum ,"lv_L3VA",L3FieldMgr,0,0); + + } + + if(elfield==0) + { + lv_L3VA = new G4LogicalVolume( L3VA_tube , Vacuum ,"lv_L3VA",0,0,0); + } + + lv_L3ST = new G4LogicalVolume( L3ST_tube , SSteel ,"lv_L3ST",0,0,0); + + lv_L3F = new G4LogicalVolume( L3F_tube , SSteel ,"lv_L3F",0,0,0); + + lv_L3GP1= new G4LogicalVolume( L3GP1 , SSteel ,"lv_L3GP1",0,0,0); + lv_L3GP2= new G4LogicalVolume( L3GP2 , SSteel ,"lv_L3GP2",0,0,0); + lv_L3GP3= new G4LogicalVolume( L3GP3 , SSteel ,"lv_L3GP3",0,0,0); + + lv_L3HP= new G4LogicalVolume( L3HP1 , SSteel ,"lv_L3HP",0,0,0); + lv_L3HP4= new G4LogicalVolume( L3HP4 , SSteel ,"lv_L3HP4",0,0,0); + lv_L3HP5= new G4LogicalVolume( L3HP5 , SSteel ,"lv_L3HP5",0,0,0); + + + // Physical volumes + L3z= -56.7; + + pv_L3VA = new G4PVPlacement( 0, G4ThreeVector( 0*cm,0 *cm, L3z*cm),lv_L3VA ,"pv_L3VA",lv_LABO, false, 0 ); + pv_L3ST = new G4PVPlacement( 0, G4ThreeVector(0 *cm, 0*cm, L3z*cm),lv_L3ST ,"pv_L3ST",lv_LABO, false, 0 ); + + pv_L3F1 = new G4PVPlacement( 0, G4ThreeVector(0 *cm, 0*cm, (L3z+20.8)*cm),lv_L3F ,"pv_L3F1",lv_LABO, false, 0 ); + pv_L3F2 = new G4PVPlacement( 0, G4ThreeVector(0 *cm, 0*cm, (L3z-20.8)*cm),lv_L3F ,"pv_L3F2",lv_LABO, false, 0 ); + + //ground potential + pv_L3GP1 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm,13.35*cm),lv_L3GP1 ,"pv_L3GP1",lv_L3VA, false, 0 ); + pv_L3GP2 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 13.35*cm),lv_L3GP2 ,"pv_L3GP2",lv_L3VA, false, 0 ); + pv_L3GP3 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 19.6*cm),lv_L3GP3 ,"pv_L3GP3",lv_L3VA, false, 0 ); + pv_L3GP4 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 7.1*cm),lv_L3GP3 ,"pv_L3GP4",lv_L3VA, false, 0 ); + pv_L3GP5 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm,-13.35*cm),lv_L3GP1 ,"pv_L3GP5",lv_L3VA, false, 0 ); + pv_L3GP6 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, -13.35*cm),lv_L3GP2 ,"pv_L3GP6",lv_L3VA, false, 0 ); + pv_L3GP7 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, -19.6*cm),lv_L3GP3 ,"pv_L3GP7",lv_L3VA, false, 0 ); + pv_L3GP8 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, -7.1*cm),lv_L3GP3 ,"pv_L3GP8",lv_L3VA, false, 0 ); + + + pv_L3HP = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm,0*cm),lv_L3HP ,"pv_L3HP",lv_L3VA, false, 0 ); + pv_L3HP4 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 6.1*cm),lv_L3HP4 ,"pv_L3HP4",lv_L3VA, false, 0 ); + pv_L3HP5 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, 4.425*cm),lv_L3HP5 ,"pv_L3HP5",lv_L3VA, false, 0 ); + pv_L3HP7 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, -6.1*cm),lv_L3HP4,"pv_L3HP7",lv_L3VA, false, 0 ); + pv_L3HP8 = new G4PVPlacement( 0, G4ThreeVector( 0.*cm, 0.*cm, -4.425*cm),lv_L3HP5 ,"pv_L3HP8",lv_L3VA, false, 0 ); + + + + + + //Visual Attributes: + // Load attributes and userlimits + + lv_L3VA->SetVisAttributes(G4VisAttributes::Invisible); + lv_L3ST->SetVisAttributes(Blue_style); + lv_L3F->SetVisAttributes(fBlue_style); + + lv_L3GP1->SetVisAttributes(lBlue_style); + lv_L3GP2->SetVisAttributes(Blue_style); + lv_L3GP3->SetVisAttributes(dBlue_style); + + + lv_L3HP->SetVisAttributes(lBlue_style); + lv_L3HP4->SetVisAttributes(Blue_style); + lv_L3HP5->SetVisAttributes(dBlue_style); + + G4UserLimits* L3V_lim = new G4UserLimits(); + L3V_lim -> SetMaxAllowedStep(FieldStepLim ); + //L3V_lim->SetUserMaxTrackLength(1.2*m); + L3V_lim-> SetUserMinEkine(1.*eV); + lv_L3VA->SetUserLimits(L3V_lim); + +} + + + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE TRIGGER DETECTOR +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +void LEMuSRDetectorConstruction::lemuTrigger_Detector() +{ + + //--------------------- CYLINDER AND FLANGES-------------------- + + // solids + TriggerV_tube = new G4Tubs("sTriggerV",0.*cm,10.*cm,14.8*cm, dSPhi, dEPhi); + Trigger_tube = new G4Tubs("sTrigger",10.*cm,10.3*cm,14.8*cm, dSPhi, dEPhi); + TriggerF_tube = new G4Tubs( "sTF", 10.3*cm, 12.65*cm, 1.2*cm, dSPhi, dEPhi); + + Trigger_box = new G4Box("TBox", 4.5*cm, 4.5*cm, 0.4*cm); + Trigger_box2 = new G4Box("TBox", 4.*sqrt(2)*cm, 4.5*cm, 0.7/sqrt(2)*cm); + + G4double thk; + thk = (cfthk*1.e-6/2.)*cm;//denominator must correspnd to graphite's density in material def. + Trigger_box3 = new G4Box("TFoilBox", 6*cm, 6*cm,thk/2.); + + + lv_TriggerV = new G4LogicalVolume(TriggerV_tube,Vacuum,"lv_TriggerV",0,0,0); + lv_TriggerF = new G4LogicalVolume(TriggerF_tube,SSteel,"lv_TriggerF",0,0,0); + lv_Trigger = new G4LogicalVolume(Trigger_tube,SSteel,"lv_Trigger",0,0,0); + + Carbon= G4Material::GetMaterial("graphite"); + lv_CFOIL=new G4LogicalVolume(Trigger_box3,Carbon,"lv_CFOIL",0,0,0); + + + G4double Triggerz = -109.2;//L3z - 22 - 15.7 -14.8; + + pv_TriggerV = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,Triggerz*cm),lv_TriggerV,"pv_TriggerV",lv_LABO, false, 0 ); + pv_TriggerF1 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(Triggerz+13.6)*cm),lv_TriggerF,"pv_TriggerF1",lv_LABO, false, 0 ); + pv_TriggerF2 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(Triggerz-13.6)*cm),lv_TriggerF,"pv_TriggerF2",lv_LABO, false, 0 ); + pv_Trigger = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,Triggerz*cm),lv_Trigger,"pv_Trigger",lv_LABO, false, 0 ); + + + + //--------------------- CARBON FOIL----------------------------- + +#ifndef NO_CFOIL + pv_CFOIL = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-4.5*cm),lv_CFOIL,"pv_CFOIL",lv_TriggerV, false, 0 ); +#endif + + //--------------------- ELECTRIC FIELD ZONES-------------------- + + + // field + + T1Field = new G4UniformElectricField(G4ThreeVector(0.,0.,-23.75*kilovolt/meter)); + T1FieldMgr = new G4FieldManager(); + T1FieldMgr->SetDetectorField(T1Field); + + T2Field = new G4UniformElectricField(G4ThreeVector(0.,0.,+41.416*kilovolt/meter)); + T2FieldMgr = new G4FieldManager(); + T2FieldMgr->SetDetectorField(T2Field); + + T3Field = new G4UniformElectricField(G4ThreeVector(0.,0.,-493.75*kilovolt/meter)); + T3FieldMgr = new G4FieldManager(); + T3FieldMgr->SetDetectorField(T3Field); + + G4MagIntegratorStepper *pStepper; + G4El_UsualEqRhs *fEquation = new G4El_UsualEqRhs(T1Field); + pStepper = new G4ClassicalRK4( fEquation, 12 ); + G4ChordFinder* pChordFinder = new G4ChordFinder( T1Field,1e-10 * mm,pStepper); + T1FieldMgr->SetDetectorField(T1Field); + T1FieldMgr->SetChordFinder(pChordFinder); + + G4MagIntegratorStepper *pStepper2; + G4El_UsualEqRhs *fEquation2 = new G4El_UsualEqRhs(T2Field); + pStepper2 = new G4ClassicalRK4( fEquation2, 12 ); + G4ChordFinder* pChordFinder2 = new G4ChordFinder( T2Field,1e-10 * mm,pStepper2); + T2FieldMgr->SetDetectorField(T2Field); + T2FieldMgr->SetChordFinder(pChordFinder2); + + G4MagIntegratorStepper *pStepper3; + G4El_UsualEqRhs *fEquation3 = new G4El_UsualEqRhs(T3Field); + pStepper3 = new G4ClassicalRK4( fEquation3, 12 ); + G4ChordFinder* pChordFinder3 = new G4ChordFinder( T3Field,1e-10 * mm,pStepper3);//minimum step =0 becuz the field is very big! + //therefore, all min step were set to very small values, just in case. + T3FieldMgr->SetDetectorField(T3Field); + T3FieldMgr->SetChordFinder(pChordFinder3); + + + // logical volumes + + + lv_TriggerB=new G4LogicalVolume(Trigger_box,Vacuum,"lv_TriggerB",T1FieldMgr,0,0); + lv_TriggerB2=new G4LogicalVolume(Trigger_box2,Vacuum,"lv_TriggerB2",T2FieldMgr,0,0); + lv_TriggerB3=new G4LogicalVolume(Trigger_box,Vacuum,"lv_TriggerB3",T3FieldMgr,0,0); + + + G4Transform3D Rotation2, transformation2, trl; + trl=G4Translate3D(0.,0.,2.25*mm); + Rotation2= G4Rotate3D(45*deg,G4ThreeVector(0.,1.,0.)); + transformation2=trl*Rotation2; + + + if(trigger_field!=0) + { + pv_TriggerB = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(-3.85)*cm),lv_TriggerB,"pv_TriggerB",lv_TriggerV, false, 0 ); + + pv_TriggerB2 = new G4PVPlacement(transformation2,lv_TriggerB2,"pv_TriggerB2",lv_TriggerV, false, 0 ); + + pv_TriggerB3 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(+4.3)*cm),lv_TriggerB3,"pv_TriggerB3",lv_TriggerV, false, 0 ); + } + + + //visual attibutes + lv_TriggerV->SetVisAttributes(G4VisAttributes::Invisible); + lv_Trigger->SetVisAttributes(Blue_style); + lv_TriggerF->SetVisAttributes(fBlue_style); + lv_CFOIL->SetVisAttributes(MACOR_style); + + G4UserLimits* RAV_lim = new G4UserLimits(); + // RAV_lim -> SetMaxAllowedStep(FieldStepLim ); + // RAV_lim->SetUserMaxTrackLength(1.2*m); + RAV_lim-> SetUserMinEkine(1.*eV); + lv_TriggerV->SetUserLimits(RAV_lim); + +} + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE COMPENSATION GATE +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +void LEMuSRDetectorConstruction::lemuCGate() +{ + + // solids + CGateV_tube = new G4Tubs("sCGateV",0.*cm,10.*cm,7.85*cm, dSPhi, dEPhi); + CGate_tube = new G4Tubs("sCGate",10.*cm,10.3*cm,7.85*cm, dSPhi, dEPhi); + CGateF_tube = new G4Tubs( "sCGF", 10.3*cm, 12.65*cm, 1.2*cm, dSPhi, dEPhi); + + + // logical volumes + lv_CGateV = new G4LogicalVolume(CGateV_tube,Vacuum,"lv_CGateV",0,0,0); + lv_CGateF = new G4LogicalVolume(CGateF_tube,SSteel,"lv_CGateF",0,0,0); + lv_CGate = new G4LogicalVolume(CGate_tube,SSteel,"lv_CGate",0,0,0); + + + G4double CompGatez=-86.55 ;// L3z-22-7.85; + + pv_CGateV = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,CompGatez*cm),lv_CGateV,"pv_CGateV",lv_LABO, false, 0 ); + pv_CGateF1 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(CompGatez+6.65)*cm),lv_CGateF,"pv_CGateF1",lv_LABO, false, 0 ); + pv_CGateF2 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(CompGatez-6.65)*cm),lv_CGateF,"pv_CGateF2",lv_LABO, false, 0 ); + pv_CGate = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,CompGatez*cm),lv_CGate,"pv_CGate",lv_LABO, false, 0 ); + + //visual attibutes + lv_CGateV->SetVisAttributes(G4VisAttributes::Invisible); + lv_CGate->SetVisAttributes(Blue_style); + lv_CGateF->SetVisAttributes(fBlue_style); + + G4UserLimits* RAV_lim = new G4UserLimits(); + RAV_lim -> SetMaxAllowedStep(FieldStepLim ); + // RAV_lim->SetUserMaxTrackLength(1.2*m); + RAV_lim-> SetUserMinEkine(1.*eV); + lv_CGateV->SetUserLimits(RAV_lim); + +} + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE FIELDS +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + +void LEMuSRDetectorConstruction::buildAnodeField() +{ + + + char dir[256]="\0"; + + int k=2*Grid+Guards; + std::cout<<"k: "<GetFieldValue(position,Efield); + do + { + + GField->GetFieldValue(position,Efield); + G4cout<SetDetectorField(GField,false); + GFieldMgr->SetChordFinder(pChordFinder); + + lv_MCPV = new G4LogicalVolume( MCPV_tube, Vacuum ,"lv_MCPV",GFieldMgr,0,0); + + +#ifdef DEBUG_INTERPOLATING_FIELD + //**************************************************************************// + G4double Efield[3]; + G4double position[4]; + position[0]=0*mm; + position[1]=0*mm; + position[2]=-103*mm; + position[3]=0*mm; + GField->GetFieldValue(position,Efield); + do + { + G4cout<<"Position? "<>position[0]>>position[1]>>position[2]>>position[3]; + GField->GetFieldValue(position,Efield); + G4cout<<"Field E Value " << G4BestUnit(Efield[0]*meter,"Electric potential") <<"/m " <SetDetectorField(EMField,true); + EMFieldMgr->SetChordFinder(EMChordFinder); + + + lv_MCPV = new G4LogicalVolume( MCPV_tube , Vacuum ,"lv_MCPV",EMFieldMgr,0,0); + + + ////////////////// +#ifdef DEBUG_INTERPOLATING_FIELD + G4double EBfield[6]; + G4double position[4]; + position[0]=0*mm; + position[1]=0*mm; + position[2]=-300.*mm; + position[3]=0; + GField->GetFieldValue(position,EBfield); + do + { + + EMField->GetFieldValue(position,EBfield); + G4cout<GetFieldManager(); // 2 + mcFieldMgr->SetDetectorField(mcField,true); + mcFieldMgr->SetChordFinder(pChordFinder); + lv_MCPV = new G4LogicalVolume( MCPV_tube , Vacuum ,"lv_MCPV",mcFieldMgr,0,0); + } + if(magfield==0) + { + // 4 no field at all + lv_MCPV = new G4LogicalVolume( MCPV_tube , Vacuum ,"lv_MCPV",0,0,0); + } + + + } + + +} + + + + + +void LEMuSRDetectorConstruction::buildCryoField() +{ + // sample ELECTRIC field + G4double d= cryoFieldLength*cm; + G4double V= cryoVoltage*kilovolt; + + G4ThreeVector C_field(0.,0.,-V/d); + + + // char dir[]="/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/"; + + char dir[256]; + int k=2*Grid+Guards; + switch(k) + { + + case 0: + stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_NoGuards/\0"); break; + + case 1: + stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/No_Grid_Guards/\0"); break; + + case 2: + stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_NoGuards/\0"); break; + + case 3: + stpcpy(dir,"/home/l_paraiso/geant4.7.0/LEMuSR/FieldMaps/MCPV-80-80-200/Grid_Guards/\0"); break; + + default: break; + } + + + char filename[]="SAMPLE.map"; + + const char* fmap=strcat(dir,filename); + + cryoField = new LEMuSRElectricField(cryoVoltage,fmap,"mm",0.0,80,80,200);//offset in milimeters) + + +#ifdef DEBUG_INTERPOLATING_FIELD + + G4double Efield[3]; + G4double position[4]; + position[0]=0*mm; + position[1]=0*mm; + position[2]=-100.*mm; + position[3]=0; + cryoField->GetFieldValue(position,Efield); + do + { + + cryoField->GetFieldValue(position,Efield); + G4cout<SetGuidance("Set detector parameters"); + + // commands + SetDetMode = new G4UIcmdWithAString("/Detector/Mode",this); + SetDetMode->SetGuidance("\n mcp: multiple channel mode \n cryo: cryostat mode "); + SetDetMode->SetParameterName("mode",false); + SetDetMode->SetDefaultValue("mcp"); + SetDetMode->AvailableForStates(G4State_PreInit,G4State_Idle); + + + // commands + + // El field on/off + SetElField = new G4UIcmdWithAString("/Detector/ElectricField",this); + SetElField->SetGuidance("\n on: electric field on \n off: electric field off "); + SetElField->SetParameterName("field",false); + SetElField->SetDefaultValue("on"); + SetElField->AvailableForStates(G4State_PreInit,G4State_Idle); + + + // Grid on/off + SetGrid = new G4UIcmdWithAString("/Detector/Sample/Grid",this); + SetGrid->SetGuidance("\n on: Sample Grid on \n off: Sample Grid off "); + SetGrid->SetParameterName("grid",false); + SetGrid->SetDefaultValue("on"); + SetGrid->AvailableForStates(G4State_PreInit,G4State_Idle); + + + // Guards on/off + SetGuards = new G4UIcmdWithAString("/Detector/Sample/Guards",this); + SetGuards->SetGuidance("\n on: Sample Guards Rings on \n off: Sample Guards off "); + SetGuards->SetParameterName("guards",false); + SetGuards->SetDefaultValue("on"); + SetGuards->AvailableForStates(G4State_PreInit,G4State_Idle); + + + // ASYM + SetAsymCheck = new G4UIcmdWithAString("/Detector/AsymCheck",this); + SetAsymCheck->SetGuidance("\n on: asym on \n off:asym off "); + SetAsymCheck->SetParameterName("asym",false); + SetAsymCheck->SetDefaultValue("on"); + SetAsymCheck->AvailableForStates(G4State_PreInit,G4State_Idle); + + + // SAH MATERIAL + SetSAHmaterial = new G4UIcmdWithAString("/Detector/Sample/Material",this); + SetSAHmaterial->SetGuidance("\n Sample material"); + SetSAHmaterial->SetParameterName("material",false); + SetSAHmaterial->SetDefaultValue("copper"); + SetSAHmaterial->AvailableForStates(G4State_PreInit,G4State_Idle); + + + + // ELECTRIC POTENTIALS + SetThirdLensPotential = new G4UIcmdWithADouble("/Detector/Voltage/ThirdLense",this); + SetThirdLensPotential->SetGuidance("\n Third Lense Middle Cylinder Voltage Value >> IN KILOVOLT "); + SetThirdLensPotential->SetParameterName("f",false); + SetThirdLensPotential->SetDefaultValue(1); + SetThirdLensPotential->AvailableForStates(G4State_PreInit,G4State_Idle); + + SetMagField = new G4UIcmdWithADouble("/Detector/MagneticField",this); + SetMagField->SetGuidance("\n Magnetic Field Max Value >>> in GAUSS "); + SetMagField->SetParameterName("f",false); + SetMagField->SetDefaultValue(100); + SetMagField->AvailableForStates(G4State_PreInit,G4State_Idle); + + + + + SetRAPotential = new G4UIcmdWith3Vector("/Detector/Voltage/ConicalAnode",this); + SetRAPotential->SetGuidance("\n Conical anode left and right side Voltage Values >> IN KILOVOLT; set build to !=0 to build the detector "); + SetRAPotential->SetParameterName("RA-Left Voltage [kV]","RA-Right Voltage [kV]","Build",false,true); + SetRAPotential->SetDefaultValue(Hep3Vector(8.1,8.1,1.0)); + SetRAPotential->AvailableForStates(G4State_PreInit,G4State_Idle); + + SetCryoPotential = new G4UIcmdWithADouble("/Detector/Voltage/Cryo",this); + SetCryoPotential->SetGuidance("\n Cryo voltage in kV "); + SetCryoPotential->SetParameterName("Voltage [kV]",true,true); + SetCryoPotential->SetDefaultValue(7.2); + SetCryoPotential->AvailableForStates(G4State_PreInit,G4State_Idle); + + + + SetDetVisualization = new G4UIcmdWithAString("/Detector/View",this); + SetDetVisualization->SetGuidance("\n quarter: quarter cut view of the detector \n half: half cut view of the detector \n total: view of the total detector "); + SetDetVisualization->SetParameterName("view",false); + SetDetVisualization->SetDefaultValue("total"); + SetDetVisualization->AvailableForStates(G4State_PreInit,G4State_Idle); + + SetFieldStepLim = new G4UIcmdWithADouble("/Detector/MaxStepInField",this); + SetFieldStepLim->SetGuidance("\n The user step limitation in third lense and conical anode [mm] "); + SetFieldStepLim->SetParameterName("usl",false); + SetFieldStepLim->SetDefaultValue(10.); + SetFieldStepLim->AvailableForStates(G4State_PreInit,G4State_Idle); + + + // Carbon Foil + SetCFthk = new G4UIcmdWithADouble("/Detector/CfoilThickness",this); + SetCFthk->SetGuidance("\n Carbon foil thickness; unit is mug/cm2 "); + SetCFthk->SetParameterName("f",false); + SetCFthk->SetDefaultValue(1.0); + SetCFthk->AvailableForStates(G4State_PreInit,G4State_Idle); + + +} + +LEMuSRDetectorMessenger::~LEMuSRDetectorMessenger() +{ + delete theDetector; + delete DetMode; + delete SetMagField; + delete SetThirdLensPotential; + delete SetCFthk; + delete SetCryoPotential; + delete SetRAPotential; + delete SetElField; + delete SetGrid; + delete SetGuards; + delete SetFieldCheck; + delete SetAsymCheck; + delete SetDetMode; + delete SetDetVisualization; + delete SetFieldStepLim; + delete SetSAHmaterial; + +} + + +void LEMuSRDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newvalue)//MUST have the name SetNewValue:: inherited method from messenger class. +{ + G4UImanager* UI = G4UImanager::GetUIpointer(); + + + if(command == SetDetMode) + { + if(newvalue=="mcp") + { + theDetector->mcdetector=1; + } + else if(newvalue=="cryo") + { + theDetector->mcdetector=0; + } + else + { + G4cout << "Unknown command: please check value."<Construct(); + G4cout << "New detector built."<DefineWorldVolume(newDetector); + + G4cout << " runmanager updated\n" ; + + // Actualisation du visualiseur + //UI ->ApplyCommand("/vis/viewer/refresh") ; + //UI ->ApplyCommand("/vis/viewer/update"); + + } + + + else if(command == SetThirdLensPotential) + { + if(SetThirdLensPotential->GetNewDoubleValue(newvalue)!=0.) + { + theDetector->elfield=1; + theDetector->L3FieldVal=SetThirdLensPotential->GetNewDoubleValue(newvalue); + } + + else if(SetThirdLensPotential->GetNewDoubleValue(newvalue)==0.) + { + theDetector->elfield=0; + + } + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + + } + + else if(command == SetMagField) + { + if(SetMagField->GetNewDoubleValue(newvalue)!=0.) + { + theDetector->magfield=1; + theDetector->B=SetMagField->GetNewDoubleValue(newvalue); + } + else if(SetMagField->GetNewDoubleValue(newvalue)==0.) + { + theDetector->magfield=0; + } + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + } + + + + else if(command == SetSAHmaterial) + { + if(G4Material::GetMaterial(newvalue)) + { + theDetector->Material_SAH=newvalue; + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + } + else + { + G4cout<<":-? Material "<Material_SAH<<"."<cfthk=SetCFthk->GetNewDoubleValue(newvalue); + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + G4cout<<"Thickness: " << LEMuSRDetectorConstruction::GetInstance()->cfthk<GetNew3VectorValue(newvalue).x(); + rar = SetRAPotential->GetNew3VectorValue(newvalue).y(); + build = SetRAPotential->GetNew3VectorValue(newvalue).z(); + + theDetector->RALval=ral; + theDetector->RARval=rar; + G4cout<<"Conical anode Voltage:\n RA-L: "<< ral <<"[kV] RA-R: "<anode_elfield=1; + if(build!=0.0) + { + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + } + + else + { + G4cout<<"\n ~~~~~~~~~~~~~ATTENTION:: DETECTOR NOT BUILT~~~~~~~~~~~~"<GetNewDoubleValue(newvalue); + + theDetector->cryoVoltage=V; + G4cout<<"Cryo Voltage:\n V: "<< V <<"[kV]"<anode_elfield=1; + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + } + + + + else if(command == SetElField) + { + if(newvalue=="on") + { + // theDetector->elfield=1; + // theDetector->anode_elfield=1; + theDetector->trigger_field=1; + G4cout<<"THIS COMMAND ONLY ENABLES THE TRIGGER FIELD.\n" + <<" TO SET THE ELECTROSTATIC LENSES USE /Detector/Voltage COMMAND."<elfield=0; + theDetector->anode_elfield=0; + theDetector->trigger_field=0; + } + else + { + G4cout<<"UNRECOGNIZED COMMAND ENTER on OR off."<Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + + } + + + + // SAMPLE GRID + else if(command == SetGrid) + { + if(newvalue=="on") + { + theDetector->Grid=1; + + } + + else if(newvalue=="off") + { + + theDetector->Grid=0; + + } + G4cout<<"SAMPLE CRYOSTAT:: GRID ON ==>> DON'T FORGET TO REBUILD DETECTOR"<Guards=1; + + } + + else if(newvalue=="off") + { + + theDetector->Guards=0; + + } + G4cout<<"SAMPLE CRYOSTAT:: GUARDS ON ==>> DON'T FORGET TO REBUILD DETECTOR"<FieldStepLim=SetFieldStepLim->GetNewDoubleValue(newvalue)*mm; + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + } + + + + else if(command == SetAsymCheck) + { + if(newvalue=="on") + { + theDetector->AsymCheck=1; + + } + + else if(newvalue=="off") + { + theDetector->AsymCheck=0; + + } + newDetector = theDetector->Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + + } + + + else if(command == SetDetVisualization) + { + if(newvalue=="total") + { + theDetector->dSPhi=0*deg; + theDetector->dEPhi=360*deg; + theDetector->halfview=0; + } + else if(newvalue=="half") + { + theDetector->dSPhi=+90*deg; + theDetector->dEPhi=180*deg; + theDetector->halfview=1; + } + else if(newvalue=="quarter") + { + theDetector->dSPhi=0*deg; + theDetector->dEPhi=270*deg; + theDetector->halfview=1; + } + else + { + G4cout << "Unknown command: please check value."<Construct(); + G4RunManager::GetRunManager()->DefineWorldVolume(newDetector); + + G4cout << " \n !!! BEFORE '/run/beamOn' :: PLEASE ENSURE TOTAL GEOMETRY IS LOADED !!! \n" ; + // Update visualization + //UI ->ApplyCommand("/vis/viewer/refresh") ; + //UI ->ApplyCommand("/vis/viewer/update"); + + } + + else + { + G4cout << "Unknown command: please check value."< + + +LEMuSREMPhysics::LEMuSREMPhysics(const G4String& name) + : G4VPhysicsConstructor(name) +{ +} + +LEMuSREMPhysics::~LEMuSREMPhysics() +{ +} + +#include "G4ParticleDefinition.hh" +#include "G4ParticleTable.hh" + +#include "G4Gamma.hh" + +#include "G4Electron.hh" +#include "G4Positron.hh" + +#include "G4NeutrinoE.hh" +#include "G4AntiNeutrinoE.hh" +#include "G4UserSpecialCuts.hh" +void LEMuSREMPhysics::ConstructParticle() +{ + // gamma + G4Gamma::GammaDefinition(); + + // electron + G4Electron::ElectronDefinition(); + G4Positron::PositronDefinition(); + G4NeutrinoE::NeutrinoEDefinition(); + G4AntiNeutrinoE::AntiNeutrinoEDefinition(); +} + + +#include "G4ProcessManager.hh" + + +void LEMuSREMPhysics::ConstructProcess() +{ + G4ProcessManager * pManager = 0; + + // Gamma Physics + pManager = G4Gamma::Gamma()->GetProcessManager(); + pManager->AddDiscreteProcess(&thePhotoEffect); + pManager->AddDiscreteProcess(&theComptonEffect); + pManager->AddDiscreteProcess(&thePairProduction); + pManager->AddProcess(new G4UserSpecialCuts(),-1,-1,1); + // Electron Physics + pManager = G4Electron::Electron()->GetProcessManager(); + + pManager->AddProcess(&theElectronMultipleScattering, -1, 1, 1); + pManager->AddProcess(&theElectronIonisation, -1, 2, 2); + pManager->AddProcess(&theElectronBremsStrahlung, -1, 3, 3); + pManager->AddProcess(new G4UserSpecialCuts(),-1,-1,4); + + //Positron Physics + pManager = G4Positron::Positron()->GetProcessManager(); + + pManager->AddProcess(&thePositronMultipleScattering, -1, 1, 1); + pManager->AddProcess(&thePositronIonisation, -1, 2, 2); + pManager->AddProcess(&thePositronBremsStrahlung, -1, 3, 3); + pManager->AddProcess(&theAnnihilation, 0,-1, 4); + pManager->AddProcess(new G4UserSpecialCuts(),-1,-1,5); +} + + + diff --git a/geant4/LEMuSR/src/LEMuSRElFieldMix.cc b/geant4/LEMuSR/src/LEMuSRElFieldMix.cc new file mode 100644 index 0000000..3721046 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRElFieldMix.cc @@ -0,0 +1,95 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID :LEMuSRElFieldMix.cc , v 1.3 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-09-17 10:20 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// Electric Field +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +#include"LEMuSRElFieldMix.hh" +#include"G4UnitsTable.hh" + + +LEMuSRElFieldMix::LEMuSRElFieldMix( LEMuSRElectricField *E1, LEMuSRElectricField *E2, G4double field1_val, G4double field2_val) +{ + coef1 = field1_val; + coef2 = field2_val; + field1 = E1; + field2 = E2; + G4cout<<"FIELDMIX COEFS "<< coef1 <<"AND "<< coef2<minz <maxz <GetFieldValue(position, Bfield1); + // G4cout<<"Field 1 Value " << G4BestUnit(Bfield1[0]*coef1*meter,"Electric potential") <<"/m " <GetFieldValue(position2, Bfield2); + // G4cout<<"Field 2 Value " << G4BestUnit(Bfield2[0]*coef2*meter,"Electric potential") <<"/m " < + +LEMuSRElMagField::LEMuSRElMagField( G4ElectricField *E, G4MagneticField *B, G4double field1_val, G4double field2_val) +{ + coef1 = field1_val; + coef2 = field2_val; + field1 = E; + field2 = B; + G4cout<<"ELMAGFIELD COEFS "<< coef1 <<"AND "<< coef2<minz <maxz <GetFieldValue(position, Efield); + + field2->GetFieldValue(position2, Bfield); + /* + G4cout<<"Field E Value " << G4BestUnit(Efield[0]*coef1*meter,"Electric potential") <<"/m " <> xval >> yval >> zval >> bx; + fy >> xval >> yval >> zval >> by; + fz >> xval >> yval >> zval >> bz; + + xField[ix][iy][iz] = bx*volt/meter; + yField[ix][iy][iz] = by*volt/meter; + zField[ix][iy][iz] = bz*volt/meter; + if (firstline==0) + { + minx =xval; + miny =yval; + minz =zval; + + firstline=1; + } + + } + } + } + + + fx.close(); fy.close(); fz.close(); + + maxx = xval; + maxy = yval; + maxz = zval; + + G4cout<>output_name; + std::ofstream fout (output_name); // open destination file + fout.close (); + + + fout.open(output_name); + if (!fout.is_open()) exit(8); + + for (ix=0; ix>bx >>by >>bz; + + xField[ix][iy][iz] = bx*volt/meter; + yField[ix][iy][iz] = by*volt/meter; + zField[ix][iy][iz] = bz*volt/meter; + + } + } + } + + fmap>> maxx >> maxy >> maxz ; + fmap>> minx >> miny >> minz ; + G4cout<< maxx<<" " << maxy<<" " <> zöro"; + } + + + + G4double x = (point[0]/mm)/length_ratio; + G4double y = (point[1]/mm)/length_ratio; + G4double z = ((point[2] - zOffset)/mm)/length_ratio; + + +#ifdef DEBUG_INTERPOLATING_FIELD + + G4cout<<"POSITION:: " <=minx && x<=maxx && y>=miny && y<=maxy && (z)>=minz && (z)<=maxz ) + { + + // Position of given point within region, normalized to the range + // [0,1] + G4double xfraction = (x - minx) / (maxx-minx); + G4double yfraction = (y - miny) / (maxy-miny); + G4double zfraction = (z - minz) / (maxz-minz);//!!!!! PROBLEM MAY BE HERE + + // Need addresses of these to pass to modf below. + // modf uses its second argument as an OUTPUT argument. + G4double xdindex, ydindex, zdindex; + + // Position of the point within the cuboid defined by the + // nearest surrounding tabulated points + + G4double xlocal = ( modf(xfraction*(nx-1), &xdindex)); + G4double ylocal = ( modf(yfraction*(ny-1), &ydindex)); + G4double zlocal = ( modf(zfraction*(nz-1), &zdindex)); + + // The indices of the nearest tabulated point whose coordinates + // are all less than those of the given point + /* int xindex = static_cast(xdindex); + int yindex = static_cast(ydindex); + int zindex = static_cast(zdindex); + */ + G4int xindex = (G4int)(xdindex); + G4int yindex = (G4int)(ydindex); + G4int zindex = (G4int)(zdindex); + + +#ifdef DEBUG_INTERPOLATING_FIELD + G4cout << "Local x,y,z: " << xlocal << " " << ylocal << " " << zlocal << endl; + G4cout << "Index x,y,z: " << xindex << " " << yindex << " " << zindex << endl; +#endif + + //********************* FIELD INTERPOLATION***************************// + //*********** FROM GEANT4 EXTENDED EXAMPLE PURGING MAGNET ************// + + // Full 3-dimensional version + + // example: if map_unit= 'dm' multiply by 10 since field map generated by femlab is in volt/decimeter! in order to get the field in V/m. + + Bfield[0] = + (xField[xindex ][yindex ][zindex ] * (1-xlocal) * (1-ylocal) * (1-zlocal) + + xField[xindex ][yindex ][zindex+1] * (1-xlocal) * (1-ylocal) * zlocal + + xField[xindex ][yindex+1][zindex ] * (1-xlocal) * ylocal * (1-zlocal) + + xField[xindex ][yindex+1][zindex+1] * (1-xlocal) * ylocal * zlocal + + xField[xindex+1][yindex ][zindex ] * xlocal * (1-ylocal) * (1-zlocal) + + xField[xindex+1][yindex ][zindex+1] * xlocal * (1-ylocal) * zlocal + + xField[xindex+1][yindex+1][zindex ] * xlocal * ylocal * (1-zlocal) + + xField[xindex+1][yindex+1][zindex+1] * xlocal * ylocal * zlocal); + Bfield[1] = + (yField[xindex ][yindex ][zindex ] * (1-xlocal) * (1-ylocal) * (1-zlocal) + + yField[xindex ][yindex ][zindex+1] * (1-xlocal) * (1-ylocal) * zlocal + + yField[xindex ][yindex+1][zindex ] * (1-xlocal) * ylocal * (1-zlocal) + + yField[xindex ][yindex+1][zindex+1] * (1-xlocal) * ylocal * zlocal + + yField[xindex+1][yindex ][zindex ] * xlocal * (1-ylocal) * (1-zlocal) + + yField[xindex+1][yindex ][zindex+1] * xlocal * (1-ylocal) * zlocal + + yField[xindex+1][yindex+1][zindex ] * xlocal * ylocal * (1-zlocal) + + yField[xindex+1][yindex+1][zindex+1] * xlocal * ylocal * zlocal); + Bfield[2] = + (zField[xindex ][yindex ][zindex ] * (1-xlocal) * (1-ylocal) * (1-zlocal) + + zField[xindex ][yindex ][zindex+1] * (1-xlocal) * (1-ylocal) * zlocal + + zField[xindex ][yindex+1][zindex ] * (1-xlocal) * ylocal * (1-zlocal) + + zField[xindex ][yindex+1][zindex+1] * (1-xlocal) * ylocal * zlocal + + zField[xindex+1][yindex ][zindex ] * xlocal * (1-ylocal) * (1-zlocal) + + zField[xindex+1][yindex ][zindex+1] * xlocal * (1-ylocal) * zlocal + + zField[xindex+1][yindex+1][zindex ] * xlocal * ylocal * (1-zlocal) + + zField[xindex+1][yindex+1][zindex+1] * xlocal * ylocal * zlocal); + + } else { + // G4cout<<"RANGE ERROR=>field 0:: RANGE is " << minx <<" " << maxx <<" " << miny <<" " << maxy <<" " << minz <<" "<< maxz <<" "; + Bfield[0] = 0.0; + Bfield[1] = 0.0; + Bfield[2] = 0.0; + } + + + //G4cout<<"Field Value " << G4BestUnit(Bfield[0]*meter,"Electric potential") <<"/m " <GetCollectionID("InnerScintCollection"); + + } + + if(oScintCollID<0) + { + oScintCollID = SDman->GetCollectionID("OuterScintCollection"); + + } + + // check detectors mode (mcp or cryo => k) + LEMuSRDetectorConstruction* lemuDet = LEMuSRDetectorConstruction::GetInstance(); + G4double k = lemuDet->GetParamMC(); + if(k==1){ + if(McpCollID<0) + { + McpCollID = SDman->GetCollectionID("McpCollection"); + } + } + else{ + if(CryoCollID<0) + { + CryoCollID = SDman->GetCollectionID("CryoCollection"); + } + } + + +} + + + +void LEMuSREventAction::EndOfEventAction(const G4Event* evt) +{ + // G4cout << ">>> Event " << evt->GetEventID() << G4endl; + + + // extract the trajectories and draw them + + if (G4VVisManager::GetConcreteInstance()) + { + G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer(); + G4int n_trajectories = 0; + if (trajectoryContainer) n_trajectories = trajectoryContainer->entries(); + + for (G4int i=0; iGetTrajectoryContainer()))[i]); + if (drawFlag == "all") trj->DrawTrajectory(500); + else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.)) + trj->DrawTrajectory(50); + else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.)) + trj->DrawTrajectory(50); + } + } + + // SDCollManagement(evt); + +} + + +void LEMuSREventAction::SDCollManagement(const G4Event* evt) +{ + + // informations about hits and draw them + int nos_hit, nis_hit, nm_hit, nc_hit; + + + + if(iScintCollID<0||oScintCollID<0) + { + G4cout<<"IDERROR"; + return; + } + G4HCofThisEvent * HCE = evt->GetHCofThisEvent(); + LEMuSRScintHitsCollection* iScintHC = 0; + LEMuSROScintHitsCollection* oScintHC = 0; + LEMuSRMcpHitsCollection* McpHC = 0; + LEMuSRCryoHitsCollection* CryoHC = 0; + + + // check detectors mode (mcp or cryo => k) + LEMuSRDetectorConstruction* lemuDet = LEMuSRDetectorConstruction::GetInstance(); + G4double k = lemuDet->GetParamMC(); + + if(HCE) + { + iScintHC = (LEMuSRScintHitsCollection*)(HCE->GetHC(iScintCollID)); + oScintHC = (LEMuSROScintHitsCollection*)(HCE->GetHC(oScintCollID)); + if(k==0) {CryoHC = (LEMuSRCryoHitsCollection*)(HCE->GetHC(CryoCollID));} + else{ McpHC = (LEMuSRMcpHitsCollection*)(HCE->GetHC(McpCollID));} + } + + + if(iScintHC) + { + nis_hit = iScintHC->entries(); + // G4cout << " " << nis_hit + // << " hits are stored in LEMuSRHitsCollection for SCIS." << G4endl; + } + + if(oScintHC) + { + nos_hit = oScintHC->entries(); + // G4cout << " " << nos_hit + // << " hits are stored in LEMuSRHitsCollection for SCOS." << G4endl; + + } + + + + + if(k==0) + { + if (CryoCollID <0) return ; + + if(CryoHC) + { + nc_hit = CryoHC->entries(); + // G4cout << " " << nc_hit + // << " hits are stored in LEMuSRHitsCollection for CRYO." << G4endl; + + + + for(int i=0;iGetEnergyDeposition()/keV; + + } + } + } + + else if(k==1) + { + if(McpCollID <0) return ; + if(McpHC) + { + nm_hit = McpHC->entries(); + // G4cout << " " << nm_hit + // << " hits are stored in LEMuSRHitsCollection for MCP." << G4endl; + + } + } + + + +} diff --git a/geant4/LEMuSR/src/LEMuSRGeneralPhysics.cc b/geant4/LEMuSR/src/LEMuSRGeneralPhysics.cc new file mode 100644 index 0000000..9979675 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRGeneralPhysics.cc @@ -0,0 +1,105 @@ + //§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRGeneralPhysics.cc , v 1.1 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-08-24 16:33 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// GENERAL PHYSICS +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +#include "LEMuSRGeneralPhysics.hh" + +#include "globals.hh" +#include "G4ios.hh" +#include +#include "G4StepLimiter.hh" + + +LEMuSRGeneralPhysics::LEMuSRGeneralPhysics(const G4String& name) + : G4VPhysicsConstructor(name) +{ +} + +LEMuSRGeneralPhysics::~LEMuSRGeneralPhysics() +{ +} + +#include "G4ParticleDefinition.hh" +#include "G4ProcessManager.hh" +// Bosons +#include "G4ChargedGeantino.hh" +#include "G4Geantino.hh" + +#include "G4UserSpecialCuts.hh" +#include "G4Neutron.hh" + + +void LEMuSRGeneralPhysics::ConstructParticle() +{ + // pseudo-particles + G4Neutron::Neutron(); + G4Geantino::GeantinoDefinition(); + G4ChargedGeantino::ChargedGeantinoDefinition(); +} + +void LEMuSRGeneralPhysics::ConstructProcess() +{ + // Add Decay Process + theParticleIterator->reset(); + while( (*theParticleIterator)() ) + { + + G4ParticleDefinition* particle = theParticleIterator->value(); + G4ProcessManager* pmanager = particle->GetProcessManager(); + if (fDecayProcess.IsApplicable(*particle)&&particle->GetParticleName()!="mu+"&&particle->GetParticleName()!="Mu") + { + pmanager ->AddProcess(&fDecayProcess); + // set ordering for PostStepDoIt and AtRestDoIt + pmanager ->SetProcessOrdering(&fDecayProcess, idxPostStep); + pmanager ->SetProcessOrdering(&fDecayProcess, idxAtRest); + } + if (particle->GetParticleName()!="mu+"&&particle->GetParticleName()!="Mu") + { + pmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1); + } + //#if defined LEMU_TEST_FIELD + if (particle->GetParticleName()=="mu+"||particle->GetParticleName()=="Mu") + { + pmanager->AddProcess(&fStepLimiter,-1,-1,1); // + pmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1); + + } + //#endif + } + + + G4ProcessManager* Gpmanager; + Gpmanager = G4Geantino::Geantino()->GetProcessManager(); + Gpmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1); // + Gpmanager->AddProcess(&fStepLimiter,-1,-1,1); // + + + G4ProcessManager* Npmanager; + Npmanager = G4Neutron::Neutron()->GetProcessManager(); + + Npmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1); // + Npmanager->AddProcess(new G4UserSpecialCuts(),-1,-1,1); // + + +} + + + diff --git a/geant4/LEMuSR/src/LEMuSRHadronPhysics.cc b/geant4/LEMuSR/src/LEMuSRHadronPhysics.cc new file mode 100644 index 0000000..02b306c --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRHadronPhysics.cc @@ -0,0 +1,415 @@ +// $Id$ +// GEANT4 tag $Name$ +// + +#include "LEMuSRHadronPhysics.hh" + +#include "globals.hh" +#include "G4ios.hh" +#include + + +LEMuSRHadronPhysics::LEMuSRHadronPhysics(const G4String& name) + : G4VPhysicsConstructor(name) +{ +} + +LEMuSRHadronPhysics::~LEMuSRHadronPhysics() +{ +delete theStringDecay; +} + +#include "G4ParticleDefinition.hh" +#include "G4ParticleTable.hh" + +// Nuclei +#include "G4MesonConstructor.hh" +#include "G4BaryonConstructor.hh" +#include "G4ShortLivedConstructor.hh" + +void LEMuSRHadronPhysics::ConstructParticle() +{ + // Construct all mesons + G4MesonConstructor pMesonConstructor; + pMesonConstructor.ConstructParticle(); + + // Construct all barions + G4BaryonConstructor pBaryonConstructor; + pBaryonConstructor.ConstructParticle(); + + // Construct resonaces and quarks + G4ShortLivedConstructor pShortLivedConstructor; + pShortLivedConstructor.ConstructParticle(); + +} + + +#include "G4ProcessManager.hh" + + +void LEMuSRHadronPhysics::ConstructProcess() +{ + G4ProcessManager * pManager = 0; + G4cout << "" << G4endl; + G4cout << "You are using the ExoN04HadronPhysics" << G4endl; + G4cout << " - Note that this hadronic physics list is not optimized for any particular usage" << G4endl; + G4cout << " - If you wish to have a starting point tailored for a particular area of work," << G4endl; + G4cout << " please use one of the available physics lists by use-case." << G4endl; + G4cout << " More information can also be found from the Geant4 HyperNews." << G4endl; + G4cout << "" << G4endl; + // Elastic Process + theElasticModel = new G4LElastic(); + theElasticProcess.RegisterMe(theElasticModel); + + // pi+ and pi- + + thePreEquilib = new G4PreCompoundModel(&theHandler); + theCascade.SetDeExcitation(thePreEquilib); + theTheoModel.SetTransport(&theCascade); + theTheoModel.SetHighEnergyGenerator(&theStringModel); + theStringDecay = new G4ExcitedStringDecay(&theFragmentation); + theStringModel.SetFragmentationModel(theStringDecay); + theTheoModel.SetMinEnergy(15*GeV); + theTheoModel.SetMaxEnergy(100*TeV); + + // PionPlus + pManager = G4PionPlus::PionPlus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEPionPlusModel = new G4LEPionPlusInelastic(); + thePionPlusInelastic.RegisterMe(theLEPionPlusModel); + thePionPlusInelastic.RegisterMe(&theTheoModel); + pManager->AddDiscreteProcess(&thePionPlusInelastic); + + pManager->AddProcess(&thePionPlusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&thePionPlusMult); + pManager->SetProcessOrdering(&thePionPlusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&thePionPlusMult, idxPostStep, 1); + + // PionMinus + pManager = G4PionMinus::PionMinus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEPionMinusModel = new G4LEPionMinusInelastic(); + thePionMinusInelastic.RegisterMe(theLEPionMinusModel); + thePionMinusInelastic.RegisterMe(&theTheoModel); + pManager->AddDiscreteProcess(&thePionMinusInelastic); + + pManager->AddProcess(&thePionMinusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&thePionMinusMult); + pManager->SetProcessOrdering(&thePionMinusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&thePionMinusMult, idxPostStep, 1); + + pManager->AddRestProcess(&thePionMinusAbsorption, ordDefault); + + // KaonPlus + pManager = G4KaonPlus::KaonPlus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEKaonPlusModel = new G4LEKaonPlusInelastic(); + theHEKaonPlusModel = new G4HEKaonPlusInelastic(); + theKaonPlusInelastic.RegisterMe(theLEKaonPlusModel); + theKaonPlusInelastic.RegisterMe(&theTheoModel); + pManager->AddDiscreteProcess(&theKaonPlusInelastic); + + pManager->AddProcess(&theKaonPlusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theKaonPlusMult); + pManager->SetProcessOrdering(&theKaonPlusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theKaonPlusMult, idxPostStep, 1); + + // KaonMinus + pManager = G4KaonMinus::KaonMinus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEKaonMinusModel = new G4LEKaonMinusInelastic(); + theHEKaonMinusModel = new G4HEKaonMinusInelastic(); + theKaonMinusInelastic.RegisterMe(theLEKaonMinusModel); + theKaonMinusInelastic.RegisterMe(theHEKaonMinusModel); + pManager->AddDiscreteProcess(&theKaonMinusInelastic); + + pManager->AddProcess(&theKaonMinusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theKaonMinusMult); + pManager->SetProcessOrdering(&theKaonMinusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theKaonMinusMult, idxPostStep, 1); + + pManager->AddRestProcess(&theKaonMinusAbsorption, ordDefault); + + // KaonZeroL + pManager = G4KaonZeroLong::KaonZeroLong()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEKaonZeroLModel = new G4LEKaonZeroLInelastic(); + theHEKaonZeroLModel = new G4HEKaonZeroInelastic(); + theKaonZeroLInelastic.RegisterMe(theLEKaonZeroLModel); + theKaonZeroLInelastic.RegisterMe(theHEKaonZeroLModel); + pManager->AddDiscreteProcess(&theKaonZeroLInelastic); + + // KaonZeroS + pManager = G4KaonZeroShort::KaonZeroShort()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEKaonZeroSModel = new G4LEKaonZeroSInelastic(); + theHEKaonZeroSModel = new G4HEKaonZeroInelastic(); + theKaonZeroSInelastic.RegisterMe(theLEKaonZeroSModel); + theKaonZeroSInelastic.RegisterMe(theHEKaonZeroSModel); + pManager->AddDiscreteProcess(&theKaonZeroSInelastic); + + // Proton + pManager = G4Proton::Proton()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEProtonModel = new G4LEProtonInelastic(); + theHEProtonModel = new G4HEProtonInelastic(); + theProtonInelastic.RegisterMe(theLEProtonModel); + theProtonInelastic.RegisterMe(&theTheoModel); + pManager->AddDiscreteProcess(&theProtonInelastic); + + pManager->AddProcess(&theProtonIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theProtonMult); + pManager->SetProcessOrdering(&theProtonMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theProtonMult, idxPostStep, 1); + + // anti-Proton + pManager = G4AntiProton::AntiProton()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEAntiProtonModel = new G4LEAntiProtonInelastic(); + theHEAntiProtonModel = new G4HEAntiProtonInelastic(); + theAntiProtonInelastic.RegisterMe(theLEAntiProtonModel); + theAntiProtonInelastic.RegisterMe(theHEAntiProtonModel); + pManager->AddDiscreteProcess(&theAntiProtonInelastic); + + pManager->AddProcess(&theAntiProtonIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theAntiProtonMult); + pManager->SetProcessOrdering(&theAntiProtonMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theAntiProtonMult, idxPostStep, 1); + + pManager->AddRestProcess(&theAntiProtonAnnihilation); + + // Neutron + pManager = G4Neutron::Neutron()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLENeutronModel = new G4LENeutronInelastic(); + theHENeutronModel = new G4HENeutronInelastic(); + theNeutronInelastic.RegisterMe(theLENeutronModel); + theNeutronInelastic.RegisterMe(&theTheoModel); + pManager->AddDiscreteProcess(&theNeutronInelastic); + + theNeutronFissionModel = new G4LFission(); + theNeutronFission.RegisterMe(theNeutronFissionModel); + pManager->AddDiscreteProcess(&theNeutronFission); + + theNeutronCaptureModel = new G4LCapture(); + theNeutronCapture.RegisterMe(theNeutronCaptureModel); + pManager->AddDiscreteProcess(&theNeutronCapture); + + // AntiNeutron + pManager = G4AntiNeutron::AntiNeutron()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEAntiNeutronModel = new G4LEAntiNeutronInelastic(); + theHEAntiNeutronModel = new G4HEAntiNeutronInelastic(); + theAntiNeutronInelastic.RegisterMe(theLEAntiNeutronModel); + theAntiNeutronInelastic.RegisterMe(theHEAntiNeutronModel); + pManager->AddDiscreteProcess(&theAntiNeutronInelastic); + + pManager->AddRestProcess(&theAntiNeutronAnnihilation); + + // Lambda + pManager = G4Lambda::Lambda()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLELambdaModel = new G4LELambdaInelastic(); + theHELambdaModel = new G4HELambdaInelastic(); + theLambdaInelastic.RegisterMe(theLELambdaModel); + theLambdaInelastic.RegisterMe(theHELambdaModel); + pManager->AddDiscreteProcess(&theLambdaInelastic); + + // AntiLambda + pManager = G4AntiLambda::AntiLambda()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEAntiLambdaModel = new G4LEAntiLambdaInelastic(); + theHEAntiLambdaModel = new G4HEAntiLambdaInelastic(); + theAntiLambdaInelastic.RegisterMe(theLEAntiLambdaModel); + theAntiLambdaInelastic.RegisterMe(theHEAntiLambdaModel); + pManager->AddDiscreteProcess(&theAntiLambdaInelastic); + + // SigmaMinus + pManager = G4SigmaMinus::SigmaMinus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLESigmaMinusModel = new G4LESigmaMinusInelastic(); + theHESigmaMinusModel = new G4HESigmaMinusInelastic(); + theSigmaMinusInelastic.RegisterMe(theLESigmaMinusModel); + theSigmaMinusInelastic.RegisterMe(theHESigmaMinusModel); + pManager->AddDiscreteProcess(&theSigmaMinusInelastic); + + pManager->AddProcess(&theSigmaMinusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theSigmaMinusMult); + pManager->SetProcessOrdering(&theSigmaMinusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theSigmaMinusMult, idxPostStep, 1); + + // anti-SigmaMinus + pManager = G4AntiSigmaMinus::AntiSigmaMinus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEAntiSigmaMinusModel = new G4LEAntiSigmaMinusInelastic(); + theHEAntiSigmaMinusModel = new G4HEAntiSigmaMinusInelastic(); + theAntiSigmaMinusInelastic.RegisterMe(theLEAntiSigmaMinusModel); + theAntiSigmaMinusInelastic.RegisterMe(theHEAntiSigmaMinusModel); + pManager->AddDiscreteProcess(&theAntiSigmaMinusInelastic); + + pManager->AddProcess(&theAntiSigmaMinusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theAntiSigmaMinusMult); + pManager->SetProcessOrdering(&theAntiSigmaMinusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theAntiSigmaMinusMult, idxPostStep, 1); + + // SigmaPlus + pManager = G4SigmaPlus::SigmaPlus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLESigmaPlusModel = new G4LESigmaPlusInelastic(); + theHESigmaPlusModel = new G4HESigmaPlusInelastic(); + theSigmaPlusInelastic.RegisterMe(theLESigmaPlusModel); + theSigmaPlusInelastic.RegisterMe(theHESigmaPlusModel); + pManager->AddDiscreteProcess(&theSigmaPlusInelastic); + + pManager->AddProcess(&theSigmaPlusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theSigmaPlusMult); + pManager->SetProcessOrdering(&theSigmaPlusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theSigmaPlusMult, idxPostStep, 1); + + // anti-SigmaPlus + pManager = G4AntiSigmaPlus::AntiSigmaPlus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEAntiSigmaPlusModel = new G4LEAntiSigmaPlusInelastic(); + theHEAntiSigmaPlusModel = new G4HEAntiSigmaPlusInelastic(); + theAntiSigmaPlusInelastic.RegisterMe(theLEAntiSigmaPlusModel); + theAntiSigmaPlusInelastic.RegisterMe(theHEAntiSigmaPlusModel); + pManager->AddDiscreteProcess(&theAntiSigmaPlusInelastic); + + pManager->AddProcess(&theAntiSigmaPlusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theAntiSigmaPlusMult); + pManager->SetProcessOrdering(&theAntiSigmaPlusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theAntiSigmaPlusMult, idxPostStep, 1); + + // XiMinus + pManager = G4XiMinus::XiMinus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEXiMinusModel = new G4LEXiMinusInelastic(); + theHEXiMinusModel = new G4HEXiMinusInelastic(); + theXiMinusInelastic.RegisterMe(theLEXiMinusModel); + theXiMinusInelastic.RegisterMe(theHEXiMinusModel); + pManager->AddDiscreteProcess(&theXiMinusInelastic); + + pManager->AddProcess(&theXiMinusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theXiMinusMult); + pManager->SetProcessOrdering(&theXiMinusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theXiMinusMult, idxPostStep, 1); + + // anti-XiMinus + pManager = G4AntiXiMinus::AntiXiMinus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEAntiXiMinusModel = new G4LEAntiXiMinusInelastic(); + theHEAntiXiMinusModel = new G4HEAntiXiMinusInelastic(); + theAntiXiMinusInelastic.RegisterMe(theLEAntiXiMinusModel); + theAntiXiMinusInelastic.RegisterMe(theHEAntiXiMinusModel); + pManager->AddDiscreteProcess(&theAntiXiMinusInelastic); + + pManager->AddProcess(&theAntiXiMinusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theAntiXiMinusMult); + pManager->SetProcessOrdering(&theAntiXiMinusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theAntiXiMinusMult, idxPostStep, 1); + + // XiZero + pManager = G4XiZero::XiZero()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEXiZeroModel = new G4LEXiZeroInelastic(); + theHEXiZeroModel = new G4HEXiZeroInelastic(); + theXiZeroInelastic.RegisterMe(theLEXiZeroModel); + theXiZeroInelastic.RegisterMe(theHEXiZeroModel); + pManager->AddDiscreteProcess(&theXiZeroInelastic); + + // anti-XiZero + pManager = G4AntiXiZero::AntiXiZero()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEAntiXiZeroModel = new G4LEAntiXiZeroInelastic(); + theHEAntiXiZeroModel = new G4HEAntiXiZeroInelastic(); + theAntiXiZeroInelastic.RegisterMe(theLEAntiXiZeroModel); + theAntiXiZeroInelastic.RegisterMe(theHEAntiXiZeroModel); + pManager->AddDiscreteProcess(&theAntiXiZeroInelastic); + + // OmegaMinus + pManager = G4OmegaMinus::OmegaMinus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEOmegaMinusModel = new G4LEOmegaMinusInelastic(); + theHEOmegaMinusModel = new G4HEOmegaMinusInelastic(); + theOmegaMinusInelastic.RegisterMe(theLEOmegaMinusModel); + theOmegaMinusInelastic.RegisterMe(theHEOmegaMinusModel); + pManager->AddDiscreteProcess(&theOmegaMinusInelastic); + + pManager->AddProcess(&theOmegaMinusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theOmegaMinusMult); + pManager->SetProcessOrdering(&theOmegaMinusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theOmegaMinusMult, idxPostStep, 1); + + // anti-OmegaMinus + pManager = G4AntiOmegaMinus::AntiOmegaMinus()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + theLEAntiOmegaMinusModel = new G4LEAntiOmegaMinusInelastic(); + theHEAntiOmegaMinusModel = new G4HEAntiOmegaMinusInelastic(); + theAntiOmegaMinusInelastic.RegisterMe(theLEAntiOmegaMinusModel); + theAntiOmegaMinusInelastic.RegisterMe(theHEAntiOmegaMinusModel); + pManager->AddDiscreteProcess(&theAntiOmegaMinusInelastic); + + pManager->AddProcess(&theAntiOmegaMinusIonisation, ordInActive,2, 2); + + pManager->AddProcess(&theAntiOmegaMinusMult); + pManager->SetProcessOrdering(&theAntiOmegaMinusMult, idxAlongStep, 1); + pManager->SetProcessOrdering(&theAntiOmegaMinusMult, idxPostStep, 1); + +} diff --git a/geant4/LEMuSR/src/LEMuSRIonPhysics.cc b/geant4/LEMuSR/src/LEMuSRIonPhysics.cc new file mode 100644 index 0000000..ddac283 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRIonPhysics.cc @@ -0,0 +1,103 @@ +// $Id$ +// GEANT4 tag $Name$ +// +// + +#include "LEMuSRIonPhysics.hh" + +#include "globals.hh" +#include "G4ios.hh" +#include + + +LEMuSRIonPhysics::LEMuSRIonPhysics(const G4String& name) + : G4VPhysicsConstructor(name) +{ +} + +LEMuSRIonPhysics::~LEMuSRIonPhysics() +{ +} + +#include "G4ParticleDefinition.hh" +#include "G4ParticleTable.hh" + +// Nuclei +#include "G4IonConstructor.hh" + +void LEMuSRIonPhysics::ConstructParticle() +{ + // Construct light ions + G4IonConstructor pConstructor; + pConstructor.ConstructParticle(); +} + + +#include "G4ProcessManager.hh" + + +void LEMuSRIonPhysics::ConstructProcess() +{ + G4ProcessManager * pManager = 0; + + // Elastic Process + theElasticModel = new G4LElastic(); + theElasticProcess.RegisterMe(theElasticModel); + + // Generic Ion + pManager = G4GenericIon::GenericIon()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + pManager->AddProcess(&fIonMultipleScattering, -1, 1, 1); + pManager->AddProcess(&fIonIonisation, -1, 2, 2); + + // Deuteron + pManager = G4Deuteron::Deuteron()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + fDeuteronModel = new G4LEDeuteronInelastic(); + fDeuteronProcess.RegisterMe(fDeuteronModel); + pManager->AddDiscreteProcess(&fDeuteronProcess); + + pManager->AddProcess(&fDeuteronMultipleScattering, -1, 1, 1); + pManager->AddProcess(&fDeuteronIonisation, -1, 2, 2); + + // Triton + pManager = G4Triton::Triton()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + fTritonModel = new G4LETritonInelastic(); + fTritonProcess.RegisterMe(fTritonModel); + pManager->AddDiscreteProcess(&fTritonProcess); + + pManager->AddProcess(&fTritonMultipleScattering, -1, 1, 1); + pManager->AddProcess(&fTritonIonisation, -1, 2, 2); + + // Alpha + pManager = G4Alpha::Alpha()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + fAlphaModel = new G4LEAlphaInelastic(); + fAlphaProcess.RegisterMe(fAlphaModel); + pManager->AddDiscreteProcess(&fAlphaProcess); + + pManager->AddProcess(&fAlphaMultipleScattering, -1, 1, 1); + pManager->AddProcess(&fAlphaIonisation, -1, 2, 2); + + // He3 + pManager = G4He3::He3()->GetProcessManager(); + // add process + pManager->AddDiscreteProcess(&theElasticProcess); + + pManager->AddProcess(&fHe3MultipleScattering, -1, 1, 1); + pManager->AddProcess(&fHe3Ionisation, -1, 2, 2); + + +} + + + diff --git a/geant4/LEMuSR/src/LEMuSRMSC.cc b/geant4/LEMuSR/src/LEMuSRMSC.cc new file mode 100644 index 0000000..344a16e --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRMSC.cc @@ -0,0 +1,1116 @@ +// +// ******************************************************************** +// * DISCLAIMER * +// * * +// * The following disclaimer summarizes all the specific disclaimers * +// * of contributors to this software. The specific disclaimers,which * +// * govern, are listed with their locations in: * +// * http://cern.ch/geant4/license * +// * * +// * Neither the authors of this software system, nor their employing * +// * institutes,nor the agencies providing financial support for this * +// * work make any representation or warranty, express or implied, * +// * regarding this software system or assume any liability for its * +// * use. * +// * * +// * This code implementation is the intellectual property of the * +// * GEANT4 collaboration. * +// * By copying, distributing or modifying the Program (or any work * +// * based on the Program) you indicate your acceptance of this * +// * statement, and all its terms. * +// ******************************************************************** +// +// +// $Id$ +// GEANT4 tag $Name$ +// +// ----------------------------------------------------------------------------- +// 16/05/01 value of cparm changed , L.Urban +// 18/05/01 V.Ivanchenko Clean up against Linux ANSI compilation +// 07/08/01 new methods Store/Retrieve PhysicsTable (mma) +// 23-08-01 new angle and z distribution,energy dependence reduced, +// Store,Retrieve methods commented out temporarily, L.Urban +// 27-08-01 in BuildPhysicsTable:aParticleType.GetParticleName()=="mu+" (mma) +// 28-08-01 GetContinuousStepLimit and AlongStepDoIt moved from .icc file (mma) +// 03-09-01 value of data member factlim changed, L.Urban +// 10-09-01 small change in GetContinuousStepLimit, L.Urban +// 11-09-01 G4MultipleScatteringx put as default G4MultipleScattering +// store/retrieve physics table reactivated (mma) +// 13-09-01 corr. in ComputeTransportCrossSection, L.Urban +// 14-09-01 protection in GetContinuousStepLimit, L.Urban +// 17-09-01 migration of Materials to pure STL (mma) +// 27-09-01 value of data member factlim changed, L.Urban +// 31-10-01 big fixed in PostStepDoIt,L.Urban +// 24-04-02 some minor changes in boundary algorithm, L.Urban +// 06-05-02 bug fixed in GetContinuousStepLimit, L.Urban +// 24-05-02 changes in angle distribution and boundary algorithm, L.Urban +// 11-06-02 bug fixed in ComputeTransportCrossSection, L.Urban +// 12-08-02 bug fixed in PostStepDoIt (lateral displacement), L.Urban +// 15-08-02 new angle distribution, L.Urban +// 26-09-02 angle distribution + boundary algorithm modified, L.Urban +// 15-10-02 temporary fix for proton scattering +// 30-10-02 modified angle distribution,mods in boundary algorithm, +// changes in data members, L.Urban +// 30-10-02 rename variable cm - Ecm, V.Ivanchenko +// 11-12-02 precision problem in ComputeTransportCrossSection +// for small Tkin/for heavy particles cured, L.Urban +// 05-02-03 changes in data members, new sampling for geom. +// path length, step dependence reduced with new +// method +// 17-03-03 cut per region, V.Ivanchenko +// 13-04-03 add initialisation in GetContinuesStepLimit +// + change table size (V.Ivanchenko) +// 26-04-03 fix problems of retrieve tables (M.Asai) +// 23-05-03 important change in angle distribution for muons/hadrons +// the central part now is similar to the Highland parametrization + +// minor correction in angle sampling algorithm (for all particles) +// (L.Urban) +// 24-05-03 bug in nuclear size corr.computation fixed thanks to Vladimir(L.Urban) +// 30-05-03 misprint in PostStepDoIt corrected(L.Urban) +// 08-08-03 This class is frozen at the release 5.2 (V.Ivanchenko) +// 08-11-04 Remove Store/Retrieve tables (V.Ivantchenko) +// 07-04-05 in BuildPhysicsTable:aParticleType.GetParticleName()=="Mu" (PARAISO) +// ----------------------------------------------------------------------------- +// +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +#include "LEMuSRMSC.hh" +#include "G4StepStatus.hh" +#include "G4Navigator.hh" +#include "G4TransportationManager.hh" +#include "Randomize.hh" +#include "G4ProductionCutsTable.hh" +#include "LEMuSRDetectorConstruction.hh" +#include "LEMuSRPrimaryGeneratorAction.hh" + + +#include "meyer.h" +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +using namespace std; + +LEMuSRMSC::LEMuSRMSC(const G4String& processName) + : G4VContinuousDiscreteProcess(processName), + theTransportMeanFreePathTable(0), + taubig(8.0),tausmall(1.e-14),taulim(1.e-5), + LowestKineticEnergy(0.1*keV), + HighestKineticEnergy(100.*TeV), + TotBin(100), + materialIndex(0), + tLast (0.0), + zLast (0.0), + boundary(true), + facrange(0.199),tlimit(1.e10*mm),tlimitmin(1.e-7*mm), + cf(1.001), + stepno(0),stepnolastmsc(-1000000),nsmallstep(5), + laststep(0.), + valueGPILSelectionMSC(NotCandidateForSelection), + zmean(0.),samplez(true), + range(1.),T0(1.),T1(1.),lambda0(1.),lambda1(-1.), + Tlow(0.),alam(1.),blam(1.),dtrl(0.15), + lambdam(-1.),clam(1.),zm(1.),cthm(1.), + fLatDisplFlag(true), + NuclCorrPar (0.0615), + FactPar(0.40), + facxsi(1.) + { } + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +LEMuSRMSC::~LEMuSRMSC() +{ + if(theTransportMeanFreePathTable) + { + theTransportMeanFreePathTable->clearAndDestroy(); + delete theTransportMeanFreePathTable; + } +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +void LEMuSRMSC::BuildPhysicsTable( + const G4ParticleDefinition& aParticleType) +{ + // set values of some data members + if((aParticleType.GetParticleName() == "e-") || + (aParticleType.GetParticleName() == "e+")) + { + // parameters for e+/e- + alfa1 = 1.45 ; + alfa2 = 0.60 ; + alfa3 = 0.30 ; + b = 1. ; + xsi = facxsi*2.22 ; + c0 = 2.30 ; + } + else + { + // parameters for heavy particles + alfa1 = 1.10 ; + alfa2 = 0.14 ; + alfa3 = 0.07 ; + b = 1. ; + xsi = facxsi*2.70 ; + c0 = 1.40 ; + } + + // .............................. + Tlow = aParticleType.GetPDGMass(); + + // tables are built for MATERIALS + const G4double sigmafactor = twopi*classic_electr_radius* + classic_electr_radius; + G4double KineticEnergy,AtomicNumber,AtomicWeight,sigma,lambda; + G4double density; + + // destroy old tables if any + if (theTransportMeanFreePathTable) + { + theTransportMeanFreePathTable->clearAndDestroy(); + delete theTransportMeanFreePathTable; + } + + // create table + const G4ProductionCutsTable* theCoupleTable= + G4ProductionCutsTable::GetProductionCutsTable(); + size_t numOfCouples = theCoupleTable->GetTableSize(); + + theTransportMeanFreePathTable = new G4PhysicsTable(numOfCouples); + + // loop for materials + for (size_t i=0; i + GetMaterialCutsCouple(i); + const G4Material* material = couple->GetMaterial(); + const G4ElementVector* theElementVector = material->GetElementVector(); + const G4double* NbOfAtomsPerVolume = + material->GetVecNbOfAtomsPerVolume(); + const G4int NumberOfElements = material->GetNumberOfElements(); + density = material->GetDensity(); + + // loop for kinetic energy values + for (G4int i=0; iGetLowEdgeEnergy(i); + sigma = 0.; + + // loop for element in the material + for (G4int iel=0; ielGetZ(); + AtomicWeight = (*theElementVector)[iel]->GetA(); + sigma += NbOfAtomsPerVolume[iel]* + ComputeTransportCrossSection(aParticleType,KineticEnergy, + AtomicNumber,AtomicWeight); + } + sigma *= sigmafactor; + lambda = 1./sigma; + aVector->PutValue(i,lambda); + } + + theTransportMeanFreePathTable->insert(aVector); + + } + + if((aParticleType.GetParticleName() == "e-" ) || + (aParticleType.GetParticleName() == "mu+" ) || + (aParticleType.GetParticleName() == "Mu" ) || + (aParticleType.GetParticleName() == "proton") ) PrintInfoDefinition(); +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +G4double LEMuSRMSC::ComputeTransportCrossSection( + const G4ParticleDefinition& aParticleType, + G4double KineticEnergy, + G4double AtomicNumber,G4double AtomicWeight) +{ + const G4double epsfactor = 2.*electron_mass_c2*electron_mass_c2* + Bohr_radius*Bohr_radius/(hbarc*hbarc); + const G4double epsmin = 1.e-4 , epsmax = 1.e10; + + const G4double Zdat[15] = { 4., 6.,13.,20.,26.,29.,32.,38.,47., + 50.,56.,64.,74.,79.,82. }; + + const G4double Tdat[23] = {0.0001*MeV,0.0002*MeV,0.0004*MeV,0.0007*MeV, + 0.001*MeV,0.002*MeV,0.004*MeV,0.007*MeV, + 0.01*MeV,0.02*MeV,0.04*MeV,0.07*MeV, + 0.1*MeV,0.2*MeV,0.4*MeV,0.7*MeV, + 1.*MeV,2.*MeV,4.*MeV,7.*MeV,10.*MeV,20.*MeV, + 10000.0*MeV}; + + // corr. factors for e-/e+ lambda + G4double celectron[15][23] = + {{1.125,1.072,1.051,1.047,1.047,1.050,1.052,1.054, + 1.054,1.057,1.062,1.069,1.075,1.090,1.105,1.111, + 1.112,1.108,1.100,1.093,1.089,1.087,0.7235 }, + {1.408,1.246,1.143,1.096,1.077,1.059,1.053,1.051, + 1.052,1.053,1.058,1.065,1.072,1.087,1.101,1.108, + 1.109,1.105,1.097,1.090,1.086,1.082,0.7925 }, + {2.833,2.268,1.861,1.612,1.486,1.309,1.204,1.156, + 1.136,1.114,1.106,1.106,1.109,1.119,1.129,1.132, + 1.131,1.124,1.113,1.104,1.099,1.098,0.9147 }, + {3.879,3.016,2.380,2.007,1.818,1.535,1.340,1.236, + 1.190,1.133,1.107,1.099,1.098,1.103,1.110,1.113, + 1.112,1.105,1.096,1.089,1.085,1.098,0.9700 }, + {6.937,4.330,2.886,2.256,1.987,1.628,1.395,1.265, + 1.203,1.122,1.080,1.065,1.061,1.063,1.070,1.073, + 1.073,1.070,1.064,1.059,1.056,1.056,1.0022 }, + {9.616,5.708,3.424,2.551,2.204,1.762,1.485,1.330, + 1.256,1.155,1.099,1.077,1.070,1.068,1.072,1.074, + 1.074,1.070,1.063,1.059,1.056,1.052,1.0158 }, + {11.72,6.364,3.811,2.806,2.401,1.884,1.564,1.386, + 1.300,1.180,1.112,1.082,1.073,1.066,1.068,1.069, + 1.068,1.064,1.059,1.054,1.051,1.050,1.0284 }, + {18.08,8.601,4.569,3.183,2.662,2.025,1.646,1.439, + 1.339,1.195,1.108,1.068,1.053,1.040,1.039,1.039, + 1.039,1.037,1.034,1.031,1.030,1.036,1.0515 }, + {18.22,10.48,5.333,3.713,3.115,2.367,1.898,1.631, + 1.498,1.301,1.171,1.105,1.077,1.048,1.036,1.033, + 1.031,1.028,1.024,1.022,1.021,1.024,1.0834 }, + {14.14,10.65,5.710,3.929,3.266,2.453,1.951,1.669, + 1.528,1.319,1.178,1.106,1.075,1.040,1.027,1.022, + 1.020,1.017,1.015,1.013,1.013,1.020,1.0937 }, + {14.11,11.73,6.312,4.240,3.478,2.566,2.022,1.720, + 1.569,1.342,1.186,1.102,1.065,1.022,1.003,0.997, + 0.995,0.993,0.993,0.993,0.993,1.011,1.1140 }, + {22.76,20.01,8.835,5.287,4.144,2.901,2.219,1.855, + 1.677,1.410,1.224,1.121,1.073,1.014,0.986,0.976, + 0.974,0.972,0.973,0.974,0.975,0.987,1.1410 }, + {50.77,40.85,14.13,7.184,5.284,3.435,2.520,2.059, + 1.837,1.512,1.283,1.153,1.091,1.010,0.969,0.954, + 0.950,0.947,0.949,0.952,0.954,0.963,1.1750 }, + {65.87,59.06,15.87,7.570,5.567,3.650,2.682,2.182, + 1.939,1.579,1.325,1.178,1.108,1.014,0.965,0.947, + 0.941,0.938,0.940,0.944,0.946,0.954,1.1922 }, + // {45.60,47.34,15.92,7.810,5.755,3.767,2.760,2.239, // paper..... + {55.60,47.34,15.92,7.810,5.755,3.767,2.760,2.239, + 1.985,1.609,1.343,1.188,1.113,1.013,0.960,0.939, + 0.933,0.930,0.933,0.936,0.939,0.949,1.2026 }}; + G4double cpositron[15][23] = { + {2.589,2.044,1.658,1.446,1.347,1.217,1.144,1.110, + 1.097,1.083,1.080,1.086,1.092,1.108,1.123,1.131, + 1.131,1.126,1.117,1.108,1.103,1.100,0.7235 }, + {3.904,2.794,2.079,1.710,1.543,1.325,1.202,1.145, + 1.122,1.096,1.089,1.092,1.098,1.114,1.130,1.137, + 1.138,1.132,1.122,1.113,1.108,1.102,0.7925 }, + {7.970,6.080,4.442,3.398,2.872,2.127,1.672,1.451, + 1.357,1.246,1.194,1.179,1.178,1.188,1.201,1.205, + 1.203,1.190,1.173,1.159,1.151,1.145,0.9147 }, + {9.714,7.607,5.747,4.493,3.815,2.777,2.079,1.715, + 1.553,1.353,1.253,1.219,1.211,1.214,1.225,1.228, + 1.225,1.210,1.191,1.175,1.166,1.174,0.9700 }, + {17.97,12.95,8.628,6.065,4.849,3.222,2.275,1.820, + 1.624,1.382,1.259,1.214,1.202,1.202,1.214,1.219, + 1.217,1.203,1.184,1.169,1.160,1.151,1.0022 }, + {24.83,17.06,10.84,7.355,5.767,3.707,2.546,1.996, + 1.759,1.465,1.311,1.252,1.234,1.228,1.238,1.241, + 1.237,1.222,1.201,1.184,1.174,1.159,1.0158 }, + {23.26,17.15,11.52,8.049,6.375,4.114,2.792,2.155, + 1.880,1.535,1.353,1.281,1.258,1.247,1.254,1.256, + 1.252,1.234,1.212,1.194,1.183,1.170,1.0284 }, + {22.33,18.01,12.86,9.212,7.336,4.702,3.117,2.348, + 2.015,1.602,1.385,1.297,1.268,1.251,1.256,1.258, + 1.254,1.237,1.214,1.195,1.185,1.179,1.0515 }, + {33.91,24.13,15.71,10.80,8.507,5.467,3.692,2.808, + 2.407,1.873,1.564,1.425,1.374,1.330,1.324,1.320, + 1.312,1.288,1.258,1.235,1.221,1.205,1.0834 }, + {32.14,24.11,16.30,11.40,9.015,5.782,3.868,2.917, + 2.490,1.925,1.596,1.447,1.391,1.342,1.332,1.327, + 1.320,1.294,1.264,1.240,1.226,1.214,1.0937 }, + {29.51,24.07,17.19,12.28,9.766,6.238,4.112,3.066, + 2.602,1.995,1.641,1.477,1.414,1.356,1.342,1.336, + 1.328,1.302,1.270,1.245,1.231,1.233,1.1140 }, + {38.19,30.85,21.76,15.35,12.07,7.521,4.812,3.498, + 2.926,2.188,1.763,1.563,1.484,1.405,1.382,1.371, + 1.361,1.330,1.294,1.267,1.251,1.239,1.1410 }, + {49.71,39.80,27.96,19.63,15.36,9.407,5.863,4.155, + 3.417,2.478,1.944,1.692,1.589,1.480,1.441,1.423, + 1.409,1.372,1.330,1.298,1.280,1.258,1.1750 }, + {59.25,45.08,30.36,20.83,16.15,9.834,6.166,4.407, + 3.641,2.648,2.064,1.779,1.661,1.531,1.482,1.459, + 1.442,1.400,1.354,1.319,1.299,1.272,1.1922 }, + {56.38,44.29,30.50,21.18,16.51,10.11,6.354,4.542, + 3.752,2.724,2.116,1.817,1.692,1.554,1.499,1.474, + 1.456,1.412,1.364,1.328,1.307,1.282,1.2026 }}; + + G4double sigma; + G4double Z23 = 2.*log(AtomicNumber)/3.; Z23 = exp(Z23); + + G4double ParticleMass = aParticleType.GetPDGMass(); + G4double ParticleKineticEnergy = KineticEnergy ; + + // correction if particle .ne. e-/e+ + // compute equivalent kinetic energy + // lambda depends on p*beta .... + G4double Mass = ParticleMass ; + if((aParticleType.GetParticleName() != "e-") && + (aParticleType.GetParticleName() != "e+") ) + { + G4double TAU = KineticEnergy/Mass ; + G4double c = Mass*TAU*(TAU+2.)/(electron_mass_c2*(TAU+1.)) ; + G4double w = c-2. ; + G4double tau = 0.5*(w+sqrt(w*w+4.*c)) ; + KineticEnergy = electron_mass_c2*tau ; + Mass = electron_mass_c2 ; + } + + G4double Charge = aParticleType.GetPDGCharge(); + G4double ChargeSquare = Charge*Charge/(eplus*eplus); + + G4double TotalEnergy = KineticEnergy + Mass ; + G4double beta2 = KineticEnergy*(TotalEnergy+Mass) + /(TotalEnergy*TotalEnergy); + G4double bg2 = KineticEnergy*(TotalEnergy+Mass) + /(Mass*Mass); + + G4double eps = epsfactor*bg2/Z23; + + if (eps epsmax) w1=log(2.*eps)+1./eps-3./(8.*eps*eps); + else w1=log((a+1.)/(a-1.))-2./(a+1.); + w = 1./((1.-x0)*eps); + if (w < epsmin) w2=-log(w)-1.+2.*w-1.5*w*w; + else w2 = log((a-x0)/(a-1.))-(1.-x0)/(a-x0); + corrnuclsize = w1/w2; + corrnuclsize = exp(-FactPar*ParticleMass/ParticleKineticEnergy)* + (corrnuclsize-1.)+1.; + } + + // interpolate in AtomicNumber and beta2 + // get bin number in Z + G4int iZ = 14; + while ((iZ>=0)&&(Zdat[iZ]>=AtomicNumber)) iZ -= 1; + if (iZ==14) iZ = 13; + if (iZ==-1) iZ = 0 ; + + G4double Z1 = Zdat[iZ]; + G4double Z2 = Zdat[iZ+1]; + G4double ratZ = (AtomicNumber-Z1)/(Z2-Z1); + + // get bin number in T (beta2) + G4int iT = 22; + while ((iT>=0)&&(Tdat[iT]>=KineticEnergy)) iT -= 1; + if(iT==22) iT = 21; + if(iT==-1) iT = 0 ; + + // calculate betasquare values + G4double T = Tdat[iT], E = T + electron_mass_c2; + G4double b2small = T*(E+electron_mass_c2)/(E*E); + T = Tdat[iT+1]; E = T + electron_mass_c2; + G4double b2big = T*(E+electron_mass_c2)/(E*E); + G4double ratb2 = (beta2-b2small)/(b2big-b2small); + + G4double c1,c2,cc1,cc2,corr; + + if (Charge < 0.) + { + c1 = celectron[iZ][iT]; + c2 = celectron[iZ+1][iT]; + cc1 = c1+ratZ*(c2-c1); + + c1 = celectron[iZ][iT+1]; + c2 = celectron[iZ+1][iT+1]; + cc2 = c1+ratZ*(c2-c1); + + corr = cc1+ratb2*(cc2-cc1); + sigma /= corr; + } + + if (Charge > 0.) + { + c1 = cpositron[iZ][iT]; + c2 = cpositron[iZ+1][iT]; + cc1 = c1+ratZ*(c2-c1); + + c1 = cpositron[iZ][iT+1]; + c2 = cpositron[iZ+1][iT+1]; + cc2 = c1+ratZ*(c2-c1); + + corr = cc1+ratb2*(cc2-cc1); + sigma /= corr; + } + + // nucl. size correction for particles other than e+/e- only at present !!!! + if((aParticleType.GetParticleName() != "e-") && + (aParticleType.GetParticleName() != "e+") ) + sigma /= corrnuclsize; + + return sigma; + +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +G4double LEMuSRMSC::GetContinuousStepLimit( + const G4Track& track, + G4double, + G4double currentMinimumStep, + G4double&) +{ + G4double zPathLength,tPathLength; + const G4DynamicParticle* aParticle; + G4double tau,zt,cz,cz1,grej,grej0; + const G4double expmax = 100., ztmax = (2.*expmax+1.)/(2.*expmax+3.) ; + const G4double tmax = 1.e20*mm ; + + G4bool isOut; + + // this process is not a candidate for selection by default + valueGPILSelectionMSC = NotCandidateForSelection; + + tPathLength = currentMinimumStep; + + const G4MaterialCutsCouple* couple = track.GetMaterialCutsCouple(); + materialIndex = couple->GetIndex(); + + aParticle = track.GetDynamicParticle(); + T0 = aParticle->GetKineticEnergy(); + + lambda0 = (*theTransportMeanFreePathTable) + (materialIndex)->GetValue(T0,isOut); + + + range = G4EnergyLossTables::GetRange(aParticle->GetDefinition(), + T0,couple); + //VI Initialisation at the beginning of the step + cthm = 1.; + lambda1 = -1.; + lambdam = -1.; + alam = range; + blam = 1.+alam/lambda0 ; + zm = 1.; + + // special treatment near boundaries ? + if (boundary && range >= currentMinimumStep) + { + // step limitation at boundary ? + stepno = track.GetCurrentStepNumber() ; + if(stepno == 1) + { + stepnolastmsc = -1000000 ; + tlimit = 1.e10 ; + } + + if(stepno > 1) + { + if(track.GetStep()->GetPreStepPoint()->GetStepStatus() == fGeomBoundary) + { + stepnolastmsc = stepno ; + // if : diff.treatment for small/not small Z + if(range > lambda0) + tlimit = facrange*range ; + else + tlimit = facrange*lambda0 ; + if(tlimit < tlimitmin) tlimit = tlimitmin ; + laststep = tlimit ; + if(tPathLength > tlimit) + { + tPathLength = tlimit ; + valueGPILSelectionMSC = CandidateForSelection; + } + } + else if(stepno > stepnolastmsc) + { + if((stepno - stepnolastmsc) < nsmallstep) + { + if(tPathLength > tlimit) + { + laststep *= cf ; + tPathLength = laststep ; + valueGPILSelectionMSC = CandidateForSelection; + } + } + } + } + } + + // do the true -> geom transformation + zmean = tPathLength; + + tau = tPathLength/lambda0 ; + + if (tau < tausmall || range < currentMinimumStep) zPathLength = tPathLength; + else + { + if(tPathLength/range < dtrl) zmean = lambda0*(1.-exp(-tau)); + else + { + T1 = G4EnergyLossTables::GetPreciseEnergyFromRange( + aParticle->GetDefinition(),range-tPathLength,couple); + lambda1 = (*theTransportMeanFreePathTable) + (materialIndex)->GetValue(T1,isOut); + if(T0 < Tlow) + alam = range ; + else + alam = lambda0*tPathLength/(lambda0-lambda1) ; + blam = 1.+alam/lambda0 ; + if(tPathLength/range < 2.*dtrl) + { + zmean = alam*(1.-exp(blam*log(1.-tPathLength/alam)))/blam ; + lambdam = -1. ; + } + else + { + G4double w = 1.-0.5*tPathLength/alam ; + lambdam = lambda0*w ; + clam = 1.+alam/lambdam ; + cthm = exp(alam*log(w)/lambda0) ; + zm = alam*(1.-exp(blam*log(w)))/blam ; + zmean = zm + alam*(1.-exp(clam*log(w)))*cthm/clam ; + } + } + + // sample z + zt = zmean/tPathLength ; + if (samplez && (zt < ztmax) && (zt > 0.5)) + { + cz = 0.5*(3.*zt-1.)/(1.-zt) ; + if(tPathLength < exp(log(tmax)/(2.*cz))) + { + cz1 = 1.+cz ; + grej0 = exp(cz1*log(cz*tPathLength/cz1))/cz ; + do + { + zPathLength = tPathLength*exp(log(G4UniformRand())/cz1) ; + grej = exp(cz*log(zPathLength))*(tPathLength-zPathLength)/grej0 ; + } while (grej < G4UniformRand()) ; + } + else zPathLength = zmean; + } + else zPathLength = zmean; + } + // protection against z > lambda + if(zPathLength > lambda0) + zPathLength = lambda0 ; + + tLast = tPathLength; + zLast = zPathLength; + + return zPathLength; +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +G4VParticleChange* LEMuSRMSC::AlongStepDoIt( + const G4Track& track,const G4Step& step) +{ + // only a geom path->true path transformation is performed + + fParticleChange.Initialize(track); + + G4double geomPathLength = step.GetStepLength(); + + G4double truePathLength = 0. ; + + //VI change order of if operators + if(geomPathLength == zLast) truePathLength = tLast; + else if(geomPathLength/lambda0 < tausmall) truePathLength = geomPathLength; + else + { + if(lambda1 < 0.) truePathLength = -lambda0*log(1.-geomPathLength/lambda0) ; + else if(lambdam < 0.) + { + if(blam*geomPathLength/alam < 1.) + truePathLength = alam*(1.-exp(log(1.-blam*geomPathLength/alam)/ + blam)) ; + else + truePathLength = tLast; + } + else + { + if(geomPathLength <= zm) + { + if(blam*geomPathLength/alam < 1.) + truePathLength = alam*(1.-exp(log(1.-blam*geomPathLength/alam)/ + blam)) ; + else + truePathLength = 0.5*tLast; + + lambdam = -1. ; + } + else + { + if(clam*(geomPathLength-zm)/(alam*cthm) < 1.) + truePathLength = 0.5*tLast + alam*(1.- + exp(log(1.-clam*(geomPathLength-zm)/(alam*cthm)))/clam) ; + else + truePathLength = tLast ; + } + } + // protection .... + if(truePathLength > tLast) + truePathLength = tLast ; + } + + //VI truePath length cannot be smaller than geomPathLength + if (truePathLength < geomPathLength) truePathLength = geomPathLength; + fParticleChange.ProposeTrueStepLength(truePathLength); + + return &fParticleChange; + +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +G4VParticleChange* LEMuSRMSC::PostStepDoIt( + const G4Track& trackData, + const G4Step& stepData) +{ + // angle distribution parameters + const G4double kappa = 2.5, kappapl1 = kappa+1., kappami1 = kappa-1. ; + + fParticleChange.Initialize(trackData); + G4double truestep = stepData.GetStepLength(); + + const G4DynamicParticle* aParticle = trackData.GetDynamicParticle(); + G4double KineticEnergy = aParticle->GetKineticEnergy(); + G4double Mass = aParticle->GetDefinition()->GetPDGMass() ; + + // do nothing for stopped particles ! + if(KineticEnergy > 0.) + { + // change direction first ( scattering ) + G4double cth = 1.0 ; + G4double tau = truestep/lambda0 ; + + if (tau < tausmall) cth = 1.; + else if(tau > taubig) cth = -1.+2.*G4UniformRand(); + else + { + if(lambda1 > 0.) + { + if(lambdam < 0.) + tau = -alam*log(1.-truestep/alam)/lambda0 ; + else + tau = -log(cthm)-alam*log(1.-(truestep-0.5*tLast)/alam)/lambdam ; + } + + if(tau > taubig) cth = -1.+2.*G4UniformRand(); + else + { + const G4double amax=25. ; + const G4double tau0 = 0.02 ; + const G4double c_highland = 13.6*MeV, corr_highland=0.038 ; + + const G4double x1fac1 = exp(-xsi) ; + const G4double x1fac2 = (1.-(1.+xsi)*x1fac1)/(1.-x1fac1) ; + const G4double x1fac3 = 1.3 ; // x1fac3 >= 1. !!!!!!!!! + + G4double a,x0,c,xmean1,xmean2, + xmeanth,prob,qprob ; + G4double ea,eaa,b1,bx,eb1,ebx,cnorm1,cnorm2,f1x0,f2x0,w ; + + // for heavy particles take the width of the cetral part + // from the Highland formula + // (Particle Physics Booklet, July 2002, eq. 26.10) + if(Mass > electron_mass_c2) // + other conditions (beta, x/X0,...?) + { + G4double Q = fabs(aParticle->GetDefinition()->GetPDGCharge()) ; + G4double X0 = trackData.GetMaterialCutsCouple()-> + GetMaterial()->GetRadlen() ; + G4double xx0 = truestep/X0 ; + G4double betacp = KineticEnergy*(KineticEnergy+2.*Mass)/ + (KineticEnergy+Mass) ; + G4double theta0=c_highland*Q*sqrt(xx0)* + (1.+corr_highland*log(xx0))/betacp ; + if(theta0 > tausmall) + a = 0.5/(1.-cos(theta0)) ; + else + a = 1./(theta0*theta0) ; + } + else + { + w = log(tau/tau0) ; + if(tau < tau0) + a = (alfa1-alfa2*w)/tau ; + else + a = (alfa1+alfa3*w)/tau ; + } + + xmeanth = exp(-tau) ; + + x0 = 1.-xsi/a ; + if(x0 < -1.) x0 = -1. ; + + if(x0 == -1.) + { + // 1 model fuction only + // in order to have xmean1 > xmeanth -> qprob < 1 + if((1.-1./a) < xmeanth) + a = 1./(1.-xmeanth) ; + + if(a*(1.-x0) < amax) + ea = exp(-a*(1.-x0)) ; + else + ea = 0. ; + eaa = 1.-ea ; + xmean1 = 1.-1./a+(1.-x0)*ea/eaa ; + + c = 2. ; + b1 = b+1. ; + bx = b1 ; + eb1 = b1 ; + ebx = b1 ; + xmean2 = 0. ; + + prob = 1. ; + qprob = xmeanth/xmean1 ; + } + else + { + // 2 model fuctions + // in order to have xmean1 > xmeanth + if((1.-x1fac2/a) < xmeanth) + { + a = x1fac3*x1fac2/(1.-xmeanth) ; + if(a*(1.-x0) < amax) + ea = exp(-a*(1.-x0)) ; + else + ea = 0. ; + eaa = 1.-ea ; + xmean1 = 1.-1./a+(1.-x0)*ea/eaa ; + } + else + { + ea = x1fac1 ; + eaa = 1.-x1fac1 ; + xmean1 = 1.-x1fac2/a ; + } + + // from continuity of the 1st derivatives + c = a*(b-x0) ; + if(a*tau < c0) + c = c0*(b-x0)/tau ; + + if(c == 1.) c=1.000001 ; + if(c == 2.) c=2.000001 ; + if(c == 3.) c=3.000001 ; + + b1 = b+1. ; + bx=b-x0 ; + eb1=exp((c-1.)*log(b1)) ; + ebx=exp((c-1.)*log(bx)) ; + xmean2 = (x0*eb1+ebx+(eb1*bx-b1*ebx)/(2.-c))/(eb1-ebx) ; + + cnorm1 = a/eaa ; + f1x0 = cnorm1*exp(-a*(1.-x0)) ; + cnorm2 = (c-1.)*eb1*ebx/(eb1-ebx) ; + f2x0 = cnorm2/exp(c*log(b-x0)) ; + + // from continuity at x=x0 + prob = f2x0/(f1x0+f2x0) ; + // from xmean = xmeanth + qprob = (f1x0+f2x0)*xmeanth/(f2x0*xmean1+f1x0*xmean2) ; + } + + // protection against prob or qprob > 1 and + // prob or qprob < 0 + // *************************************************************** + if((qprob > 1.) || (qprob < 0.) || (prob > 1.) || (prob < 0.)) + { + // this print possibility has been left intentionally + // for debugging purposes .......................... + G4bool pr = false ; + // pr = true ; + if(pr) + { + const G4double prlim = 0.10 ; + if((fabs((xmeanth-xmean2)/(xmean1-xmean2)-prob)/prob > prlim) || + ((xmeanth-xmean2)/(xmean1-xmean2) > 1.) || + ((xmeanth-xmean2)/(xmean1-xmean2) < 0.) ) + { + G4cout.precision(5) ; + G4cout << "\nparticle=" << aParticle->GetDefinition()-> + GetParticleName() << " in material " + << trackData.GetMaterialCutsCouple()-> + GetMaterial()->GetName() << " with kinetic energy " + << KineticEnergy << " MeV," << G4endl ; + G4cout << " step length=" + << truestep << " mm" << G4endl ; + G4cout << "p=" << prob << " q=" << qprob << " -----> " + << "p=" << (xmeanth-xmean2)/(xmean1-xmean2) + << " q=" << 1. << G4endl ; + } + } + qprob = 1. ; + prob = (xmeanth-xmean2)/(xmean1-xmean2) ; + } + // ************************************************************** + + // sampling of costheta + if(G4UniformRand() < qprob) + { + if(G4UniformRand() < prob) + cth = 1.+log(ea+G4UniformRand()*eaa)/a ; + else + cth = b-b1*bx/exp(log(ebx-G4UniformRand()*(ebx-eb1))/(c-1.)) ; + } + else + cth = -1.+2.*G4UniformRand() ; + } + + + // TAO if Kenergy<100*keV use Meyer + if(KineticEnergy<100*keV && + trackData.GetMaterialCutsCouple()-> + GetMaterial()->GetNumberOfElements()==1&& + stepData.GetPreStepPoint()->GetPhysicalVolume()-> + GetName()=="pv_CFOIL" + ) + { + + /* G4cout << "\nparticle=" << aParticle->GetDefinition()-> + GetParticleName() << " in material " + << trackData.GetMaterialCutsCouple()-> + GetMaterial() ->GetName() << " with kinetic energy " + << KineticEnergy << " MeV," << G4endl ; + */ + + G4double Z1, Z2; + G4double m1, m2, proton_mass; + proton_mass=938.28*MeV; + Z1=aParticle->GetDefinition()->GetPDGCharge(); + Z2=trackData.GetMaterialCutsCouple()-> + GetMaterial()->GetZ(); + + m1=aParticle->GetDefinition()->GetPDGMass()/proton_mass; + m2=2*Z2; + + /* + G4cout << "\nparticle mass = " << m1 + << "\nparticle charge= " << Z1 + << "\nmaterial mass = " << m2 + << "\nmaterial charge= " << Z2 + << G4endl ; + */ + + + //MEYERS FACTORS + + meyer meyer; + double thetaSchlange,thetaSchlangeMax; + double theta,thetaMax; + double f1,f2,F; + + + //--------------------------------- + //- Parameters: + double a0; // ! Bohrscher Radius in cm + a0 = 5.29E-9;//unit == centimeter + double screeningPar; // ! Screeningparameter "a" in cm fuer Teilchen der + // ! Kernladungszahl Z1=1 in Kohlenstoff (Z2 = 6) + // ! bei Streichung von Z1 (vgl. Referenz, S. 268) + double r0Meyer; // ! r0(C) berechnet aus dem screeningParameter "a" + // ! und dem ebenfalls bei Meyer angegebenem + // ! Verhaeltnis a/r0=0.26 (vgl. Referenz, S. 263 oben) + double eSquare; // ! elektrische Ladung zum Quadrat in keV*cm + double Pi ; // ! die Kreiszahl + + // MEYER NO UNIT NUMBERS + double Ekin= KineticEnergy/keV; + double thick= LEMuSRDetectorConstruction::GetInstance()->cfthk; + + //the screening parameter + double D= exp(2/3*log(Z1))+exp(2/3*log(Z2)); + double a_=0.885*a0/sqrt(D); + screeningPar=a_; // screeningPar = 2.5764E-9; + + r0Meyer = 9.909E-9; + eSquare = 1.44E-10; + Pi = 3.141592654; + + double Meyer_faktor3; + double Meyer_faktor4; + double zzz;// ! "Hilfsparameter" + double Meyer_faktor5; + + Meyer_faktor3 = (screeningPar/r0Meyer) * (screeningPar/r0Meyer); + + Meyer_faktor4 = (m1+m2)/m2/2.; + // std::cout<<"MEYER_F4 "< kann ich nicht ... => STOP"< Tabelle A + thetaSchlangeMax = 4.0; + } + else if (thick<=8.) + { + //! => Tabelle B + thetaSchlangeMax = 7.0; + } + else if (thick<=20.) + { + //! => Tabelle C + thetaSchlangeMax = 20.0; + } + else + { + std::cout<< "Subroutine ''Get_F_Function_Meyer'':"< kann ich nicht ... => STOP"<F); + // std::cout<<"theta " <GetMomentumDirection(); + + G4ThreeVector newDirection(dirx,diry,dirz); + newDirection.rotateUz(ParticleDirection); + fParticleChange.ProposeMomentumDirection(newDirection.x(), + newDirection.y(), + newDirection.z()); + + if (fLatDisplFlag) + { + // compute mean lateral displacement, only for safety > tolerance ! + G4double safetyminustolerance = stepData.GetPostStepPoint()->GetSafety(); + G4double rmean, etau; + + if (safetyminustolerance > 0.) + { + if (tau < tausmall) rmean = 0.; + else if(tau < taulim) rmean = kappa*tau*tau*tau*(1.-kappapl1*tau/4.)/6.; + else + { + if(tau0.) rmean = 2.*lambda0*sqrt(rmean/3.); + else rmean = 0.; + + // for rmean > 0) only + if (rmean > 0.) + { + if (rmean>safetyminustolerance) rmean = safetyminustolerance; + + // sample direction of lateral displacement + phi = twopi*G4UniformRand(); + dirx = cos(phi); diry = sin(phi); dirz = 0.; + + G4ThreeVector latDirection(dirx,diry,dirz); + latDirection.rotateUz(ParticleDirection); + + // compute new endpoint of the Step + G4ThreeVector newPosition = stepData.GetPostStepPoint()->GetPosition() + + rmean*latDirection; + + G4Navigator* navigator = + G4TransportationManager::GetTransportationManager() + ->GetNavigatorForTracking(); + navigator->LocateGlobalPointWithinVolume(newPosition); + + fParticleChange.ProposePosition(newPosition); + } + } + } + } + + return &fParticleChange; +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +void LEMuSRMSC::PrintInfoDefinition() +{ + G4String comments = " Tables of transport mean free paths."; + comments += "\n New model of MSC , computes the lateral \n"; + comments += " displacement of the particle , too."; + + G4cout << G4endl << GetProcessName() << ": " << comments + << "\n PhysicsTables from " + << G4BestUnit(LowestKineticEnergy ,"Energy") + << " to " << G4BestUnit(HighestKineticEnergy,"Energy") + << " in " << TotBin << " bins. \n"; +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... diff --git a/geant4/LEMuSR/src/LEMuSRMUONIUM.cc b/geant4/LEMuSR/src/LEMuSRMUONIUM.cc new file mode 100644 index 0000000..7405c61 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRMUONIUM.cc @@ -0,0 +1,140 @@ + +#include "LEMuSRMUONIUM.hh" +#include "G4StepStatus.hh" +#include "G4Navigator.hh" +#include "G4TransportationManager.hh" +#include "Randomize.hh" +#include "G4ProductionCutsTable.hh" + + +#include "meyer.h" +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +using namespace std; + +LEMuSRMUONIUM:: LEMuSRMUONIUM(const G4String& name , + G4ProcessType aType ) + : G4VDiscreteProcess(name, aType) +{} + + +LEMuSRMUONIUM:: ~LEMuSRMUONIUM() +{} + + +G4VParticleChange* LEMuSRMUONIUM::PostStepDoIt( + const G4Track& trackData, + const G4Step& aStep ) +{ + // Initialize ParticleChange (by setting all its members equal + // to corresponding members in G4Track) + fParticleChange.Initialize(trackData); + + + G4Track theNewTrack; + if( CheckCondition(aStep)) + { + GetDatas(&aStep); + G4Step theStep; + PrepareSecondary( trackData); + + fParticleChange.AddSecondary(aSecondary); + fParticleChange.ProposeTrackStatus(fStopAndKill) ; + + } + else + { + fParticleChange.ProposeTrackStatus(trackData.GetTrackStatus()) ; + } + + return &fParticleChange; +} + + +G4bool LEMuSRMUONIUM::CheckCondition( const G4Step& aStep) +{ + G4bool condition=false; + p_name = aStep.GetTrack()->GetDefinition()->GetParticleName(); // particle name + if(p_name == "mu+"&&aStep.GetTrack()->GetVolume()->GetLogicalVolume()->GetName()=="lv_CFOIL") + { + condition=true; + } + + return condition; + +} + + +G4double LEMuSRMUONIUM:: GetMeanFreePath(const G4Track& , + G4double , + G4ForceCondition* condition + ) +{ + + *condition = Forced; + return DBL_MAX; +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... + +void LEMuSRMUONIUM::GetDatas( const G4Step* aStep) +{ + + // Particle generation according to yields + particleTable=G4ParticleTable::GetParticleTable(); + rnd=G4UniformRand(); + // std::cout<<"rnd : "<GetTrack()->GetDynamicParticle() + ->GetKineticEnergy()/keV; //LEMuSRPrimaryGeneratorAction::GetPGA()->energy/keV+LEMuSRPrimaryGeneratorAction::GetPGA()->ke_offset/keV; + Gonin.GetYields(E,105*1000,yvector); + + + G4String p_new="Mu"; + // MUON PLUS + + if(p_name=="mu+") + { + if(rndFindParticle(p_name) ; + } + else + { + particle = particleTable->FindParticle(p_new); + } + + // Set the new dynamic particle + + + + + DP = new G4DynamicParticle(particle, + aStep->GetTrack()->GetDynamicParticle() + ->GetMomentumDirection(), + + aStep->GetTrack()->GetDynamicParticle() + ->GetKineticEnergy() + ); + // IMPORTANT : COPY THOSE DATA TO GET THE SAME PARTICLE PROPERTIES!!!! + // SHOULD BE KEPT WHEN BUILDING A PARTICLE CHANGE + DP->SetProperTime(aStep->GetTrack()->GetDynamicParticle()->GetProperTime()); + DP->SetPolarization(aStep->GetTrack()->GetDynamicParticle()->GetPolarization().x(),aStep->GetTrack()->GetDynamicParticle()->GetPolarization().y(),aStep->GetTrack()->GetDynamicParticle()->GetPolarization().z()); + DP->SetPreAssignedDecayProperTime(aStep->GetTrack()->GetDynamicParticle()->GetPreAssignedDecayProperTime()); + } + + +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + + + +void LEMuSRMUONIUM::PrepareSecondary(const G4Track& track) +{ + if(p_name=="mu+") + { + aSecondary = new G4Track(DP,track.GetGlobalTime(),track.GetPosition()); + } + + +} diff --git a/geant4/LEMuSR/src/LEMuSRMUONIUMScatt.cc b/geant4/LEMuSR/src/LEMuSRMUONIUMScatt.cc new file mode 100644 index 0000000..06c5eaf --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRMUONIUMScatt.cc @@ -0,0 +1,125 @@ +#include "LEMuSRMUONIUMScatt.hh" +#include "G4StepStatus.hh" +#include "G4Navigator.hh" +#include "G4TransportationManager.hh" +#include "Randomize.hh" +#include "G4ProductionCutsTable.hh" + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +using namespace std; + +LEMuSRMUONIUMScatt:: LEMuSRMUONIUMScatt(const G4String& name , + G4ProcessType aType ) + : G4VDiscreteProcess(name, aType) +{} + + +LEMuSRMUONIUMScatt:: ~LEMuSRMUONIUMScatt() +{} + + +G4VParticleChange* LEMuSRMUONIUMScatt::PostStepDoIt( + const G4Track& trackData, + const G4Step& aStep ) +{ + fParticleChange.Initialize(trackData); + + // tao :: Get Time + G4double itime = trackData.GetProperTime(); + G4double gtime = trackData.GetGlobalTime(); + G4double ftime = trackData.GetDynamicParticle()->GetPreAssignedDecayProperTime(); + + G4double deltatime = ftime - itime; + fParticleChange.ProposeGlobalTime(deltatime + itime -gtime); + + // set position momentum energy + fParticleChange.ProposePosition(trackData.GetPosition()); + fParticleChange.ProposeMomentumDirection(trackData.GetMomentumDirection()); + fParticleChange.ProposeEnergy(trackData.GetKineticEnergy()); + fParticleChange.ProposeGlobalTime(gtime); + fParticleChange.ProposeProperTime(itime); + fParticleChange.ProposeTrackStatus(trackData.GetTrackStatus()) ; + + if( CheckCondition(aStep)) + { + // fParticleChange.ProposeEnergy(0); + fParticleChange.ProposePosition(trackData.GetStep()->GetPreStepPoint()->GetPosition()); + + fParticleChange.ProposePolarization(trackData.GetPolarization()); + // G4cout<<" at rest "<< trackData.GetStep()->GetPreStepPoint()->GetPosition() <GetDefinition()->GetParticleName(); // particle name + if(p_name == "Mu"&&aStep.GetTrack()->GetVolume()->GetLogicalVolume()->GetName()!="lv_CFOIL"&&aStep.GetTrack()->GetVolume()->GetLogicalVolume()->GetMaterial()->GetName()!="vacuum") + { + condition=true; + } + + return condition; + +} + + +G4double LEMuSRMUONIUMScatt:: GetMeanFreePath(const G4Track& , + G4double , + G4ForceCondition* condition + ) +{ + + *condition = Forced; + return DBL_MAX; +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +void LEMuSRMUONIUMScatt::GetDatas( const G4Step* aStep) +{ + + // Particle generation according to yields + particleTable=G4ParticleTable::GetParticleTable(); + particle = particleTable->FindParticle("Mu"); + + // Set the new dynamic particle + DP = new G4DynamicParticle(particle, + aStep->GetTrack()->GetDynamicParticle() + ->GetMomentumDirection(),0.0/*the kinectic energy set to zero*/ + ); + + + DP->SetProperTime(aStep->GetTrack()->GetDynamicParticle()->GetPreAssignedDecayProperTime()); + DP->SetPolarization(aStep->GetTrack()->GetDynamicParticle()->GetPolarization().x(),aStep->GetTrack()->GetDynamicParticle()->GetPolarization().y(),aStep->GetTrack()->GetDynamicParticle()->GetPolarization().z()); + DP->SetPreAssignedDecayProperTime(aStep->GetTrack()->GetDynamicParticle()->GetPreAssignedDecayProperTime()); + + +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + + + +void LEMuSRMUONIUMScatt::PrepareSecondary(const G4Track& track) +{ + aSecondary = new G4Track(DP,track.GetDynamicParticle()->GetPreAssignedDecayProperTime(),track.GetPosition()); + + +;} diff --git a/geant4/LEMuSR/src/LEMuSRMag_SpinEqRhs.cc b/geant4/LEMuSR/src/LEMuSRMag_SpinEqRhs.cc new file mode 100644 index 0000000..fd7cd4b --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRMag_SpinEqRhs.cc @@ -0,0 +1,121 @@ + // +// ******************************************************************** +// * DISCLAIMER * +// * * +// * The following disclaimer summarizes all the specific disclaimers * +// * of contributors to this software. The specific disclaimers,which * +// * govern, are listed with their locations in: * +// * http://cern.ch/geant4/license * +// * * +// * Neither the authors of this software system, nor their employing * +// * institutes,nor the agencies providing financial support for this * +// * work make any representation or warranty, express or implied, * +// * regarding this software system or assume any liability for its * +// * use. * +// * * +// * This code implementation is the intellectual property of the * +// * GEANT4 collaboration. * +// * By copying, distributing or modifying the Program (or any work * +// * based on the Program) you indicate your acceptance of this * +// * statement, and all its terms. * +// ******************************************************************** +// +// +// $Id$ +// GEANT4 tag $Name$ +// +// This is the standard right-hand side for equation of motion. +// This version of the right-hand side includes the three components +// of the particle's spin. +// +// J. Apostolakis, February 8th, 1999 +// P. Gumplinger, February 8th, 1999 +// D. Cote-Ahern, P. Gumplinger, April 11th, 2001 +// +// -------------------------------------------------------------------- + +#include "LEMuSRMag_SpinEqRhs.hh" +#include "G4MagneticField.hh" +#include "G4ThreeVector.hh" + + +LEMuSRMag_SpinEqRhs::LEMuSRMag_SpinEqRhs( G4MagneticField* MagField ) + : G4Mag_EqRhs( MagField ) {} + +LEMuSRMag_SpinEqRhs::~LEMuSRMag_SpinEqRhs() {} + +void +LEMuSRMag_SpinEqRhs::SetChargeMomentumMass(G4double particleCharge, // in e+ units + G4double MomentumXc, + G4double mass) +{ + // To set fCof_val + G4Mag_EqRhs::SetChargeMomentumMass(particleCharge, MomentumXc, mass); + + omegac = 0.105658387*GeV/mass * 2.837374841e-3*(rad/cm/kilogauss); + anomaly = 1.165923e-3; + ParticleCharge = particleCharge; + + E = sqrt(sqr(MomentumXc)+sqr(mass)); + beta = MomentumXc/E; + gamma = E/mass; + + // G4cout<<"LEMuSRMAg_SpinEqRhs :: mass" << mass/g << " \n"; + +} + +void +LEMuSRMag_SpinEqRhs::EvaluateRhsGivenB( const G4double y[], + const G4double B[3], + G4double dydx[] ) const +{ + G4double momentum_mag_square = sqr(y[3]) + sqr(y[4]) + sqr(y[5]); + // G4cout << "\n------------ LEMuSRMAg_SpinEqRhs :: mommagnitude : "<< sqrt(momentum_mag_square) <<"\n"; + G4double inv_momentum_magnitude = 1.0 / sqrt( momentum_mag_square ); + G4double cof = FCof()*inv_momentum_magnitude; + + dydx[0] = y[3] * inv_momentum_magnitude; // (d/ds)x = Vx/V + dydx[1] = y[4] * inv_momentum_magnitude; // (d/ds)y = Vy/V + dydx[2] = y[5] * inv_momentum_magnitude; // (d/ds)z = Vz/V + dydx[3] = cof*(y[4]*B[2] - y[5]*B[1]) ; // Ax = a*(Vy*Bz - Vz*By) + dydx[4] = cof*(y[5]*B[0] - y[3]*B[2]) ; // Ay = a*(Vz*Bx - Vx*Bz) + dydx[5] = cof*(y[3]*B[1] - y[4]*B[0]) ; // Az = a*(Vx*By - Vy*Bx) + + + G4ThreeVector pos(y[0], y[1], y[2]); + + G4ThreeVector u(y[3], y[4], y[5]); + u *= inv_momentum_magnitude; + + G4ThreeVector BField(B[0],B[1],B[2]); + + G4double udb = anomaly*beta*gamma/(1.+gamma) * (BField * u); + G4double ucb = (anomaly+1./gamma)/beta; + + // Initialise the values of dydx that we do not update. + dydx[6] = dydx[7] = dydx[8] = 0.0; + + G4ThreeVector Spin(y[9],y[10],y[11]); + G4ThreeVector dSpin; + + dSpin = 0;//ParticleCharge*omegac*(ucb*(Spin.cross(BField))-udb*(Spin.cross(u))); + + + dydx[ 9] = dSpin.x(); + dydx[10] = dSpin.y(); + dydx[11] = dSpin.z(); + //G4cout<<"LEMuSRMAg_SpinEqRhs :: dydx" << Spin*u << " \n"; + + // G4cout<<"LEMuSRMAg_SpinEqRhs :: dydx \n" + // << dydx[0] <<" " << dydx[1] <<" "<< dydx[2] <<" "<<"\n" + // << dydx[3] <<" " << dydx[4] <<" "<< dydx[5] <<" "<<"\n" + // << dydx[6] <<" " << dydx[7] <<" "<< dydx[8] <<" "<<"\n" + // << dydx[9] <<" " << dydx[10] <<" "<< dydx[11] <<" "<<"\n"; + + + // G4cout<<"LEMuSRMAg_SpinEqRhs ::" << pos <<"\n" << u <<"\n" << Spin <<"\n" << BField <<"\n" < + + +LEMuSRMagneticField::LEMuSRMagneticField(const G4ThreeVector FieldVector) + :G4UniformMagField(FieldVector ) +{ + BField=FieldVector; + +} + + +LEMuSRMagneticField::~LEMuSRMagneticField() +{;} + + +void LEMuSRMagneticField::GetFieldValue (const G4double pos[4], + G4double *field ) const +{ + + + + field[0]= 0.0; + field[1]= 0.0; + field[2]= 0.0; + + G4double X,Y,Z,factor; + + X= pos[0];Y=pos[1];Z=pos[2]*mm; + // G4cout<<"\n"<-20*cm) + { //G4cout<<"true!"; + factor=exp((-Z*Z)/(10*cm*10*cm)); + field[0]= BField.x()*factor ;//TAO + field[1]= BField.y()*factor ; + field[2]= BField.z()*factor ; + + //G4cout<<"true!"< + + +// HEADER +#include "LEMuSRDetectorConstruction.hh" +#include "LEMuSRDetectorMessenger.hh" + + +// process remove +#include "G4ParticleTable.hh" +#include "G4ParticleDefinition.hh" +#include "G4ParticleChange.hh" +#include "G4ProcessVector.hh" +#include "G4ProcessManager.hh" +#include "G4VProcess.hh" + +// electric fieldmap +#include "LEMuSRElectricField.hh" +#include "LEMuSRElFieldMix.hh" +#include "G4ElectricField.hh" +#include "G4ElectroMagneticField.hh" +#include "G4EqMagElectricField.hh" + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE COLOR AND USER LIMIT ATTRIBUTES +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +void LEMuSRDetectorConstruction :: LoadAttributes() +{ + + // visual attributes + + Blue_style = new G4VisAttributes(G4Colour(0.80,0.83,1.)); + Blue_style->SetForceSolid(true); + //Blue_style->SetForceWireframe(false); + fBlue_style = new G4VisAttributes(G4Colour(0.85,.88,0.92)); + fBlue_style->SetForceSolid(true); + + + Red_style = new G4VisAttributes(G4Colour(1.0,0.,.0)); + Red_style->SetForceSolid(true); + + oxsteel = new G4VisAttributes(G4Colour(0.9,0.8,0.75)); + oxsteel->SetForceSolid(true); + + dRed_style = new G4VisAttributes(G4Colour(0.5,0.,.0)); + dRed_style->SetForceSolid(true); + // dRed_style->SetForceWireframe(false); + + Green_style = new G4VisAttributes(G4Colour(0.,1.,.0)); + Green_style->SetForceSolid(true); + // Green_style->SetForceWireframe(false); + + White_style = new G4VisAttributes(G4Colour(1.,1.,1.0)); + White_style->SetForceSolid(true); + // White_style->SetForceWireframe(false); + + lBlue_style = new G4VisAttributes(G4Colour(0.,.5,1.0)); + lBlue_style->SetForceSolid(true); + + + dBlue_style = new G4VisAttributes(G4Colour(0.,.25,.5)); + dBlue_style->SetForceSolid(true); + + Purple_style = new G4VisAttributes(G4Colour(1.,0.,1.0)); + Purple_style->SetForceSolid(true); + // Purple_style->SetForceWireframe(false); + + MCP_style = new G4VisAttributes(G4Colour(0.5,0.2,.7)); + MCP_style->SetForceSolid(true); + // MCP_style->SetForceWireframe(false); + + MACOR_style = new G4VisAttributes(G4Colour(0.9,0.9,.1)); + MACOR_style->SetForceSolid(true); + // MACOR_style->SetForceWireframe(false); + + SCINT_style = new G4VisAttributes(G4Colour(0.5,0.5,.75)); + SCINT_style->SetForceSolid(true); + + dSCINT_style = new G4VisAttributes(G4Colour(0.3,0.3,.3)); + dSCINT_style->SetForceSolid(true); + + + + + VTBB_style = new G4VisAttributes(G4Colour(0.9,0.9,.9)); + //VTBB_style->SetForceSolid(true); + VTBB_style->SetForceWireframe(true); + + // user limits + VTBB_lim = new G4UserLimits(); + + +} + + + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// MATERIALS DEFINITION +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +void LEMuSRDetectorConstruction :: MaterialsDefinition () +{ + + + + G4double a; // atomic mass + G4double z; // atomic number + G4double density; // + G4String name, symbol; // + G4int nbelements; // number of elements + G4double fractionmass; // fractionnal mass - for mixtures + + + + /*** ELEMENTS***/ + + + + // definition hydrogene + a=1.01*g/mole; + G4Element* H = new G4Element(name="hydrogen", symbol="H", z=1., a); + + // definition boron + a=10.811*g/mole; + G4Element* B = new G4Element(name="boron", symbol="B", z=5., a); + + + // definition carbon + a=12.0107*g/mole; + G4Element* C= new G4Element(name="carbone", symbol="C", z=6., a); + + // definition nitrogen + a=14.01*g/mole; + G4Element* N = new G4Element(name="nitrogen", // le nom + symbol="N", // le symbole + z=7., // le numero atomique + a); // la masse atomique + + + // definition oxygene + a=16.00*g/mole; + G4Element* O = new G4Element(name="oxygen",symbol="O", z=8., a); + + // definition sodium + a=22.989770*g/mole; + G4Element* Na= new G4Element(name="sodium", symbol="Na", z=11, a); + + + // definition magnesium + a=24.305*g/mole; + G4Element* Mg= new G4Element ("magnesium","Mg", z=12,a) ; + + // definition aluminium + a=26.981538*g/mole; + G4Element* Al= new G4Element(name="aluminium", symbol="Al", z=13, a); + + // definition silicon + a=28.0855*g/mole; + G4Element* Si= new G4Element(name="silicon", symbol="Si", z=14., a); + + // definition potassium + a=39.0983*g/mole; + G4Element* K= new G4Element(name="potassium", symbol="K", z=19., a); + + // definition chromium + a=51.9961*g/mole; + G4Element* Cr= new G4Element(name="chromium", symbol="Cr", z=24., a); + + // definition mangenese + // a=54.938049*g/mole; + // G4Element* Mn= new G4Element(name="manganese", symbol="Mn", z=25., a); + + // definition iron + a=55.847*g/mole; + G4Element* Fe= new G4Element(name="fer", symbol="Fe", z=26., a); + + // definition nickel + a=58.6934*g/mole; + G4Element* Ni= new G4Element(name="nickel", symbol="Ni", z=28., a); + + // definition copper + a=63.546*g/mole; + G4Element* Cu= new G4Element(name="copper", symbol="Cu", z=29., a); + + // definition zinc + a=65.409*g/mole; + G4Element* Zn= new G4Element(name="zinc", symbol="Zn", z=30., a); + + // definition arsenic + a=74.92160*g/mole; + G4Element* As = new G4Element(name="arsenic", symbol="As", z=33., a); + + // definition rubidium + a=85.4678*g/mole; + G4Element* Rb= new G4Element(name="rubidium", symbol="Rb", z=37., a); + + //definition iodine + a=126.90447*g/mole; + G4Element* I = new G4Element(name="iodine", symbol="I", z=53., a); + + //definition caesium + a=132.90545*g/mole; + G4Element* Cs = new G4Element(name="caesium", symbol="Cs", z=55., a); + + //definition barium + a=137.327*g/mole; + G4Element* Ba= new G4Element(name="barium", symbol="Ba", z=56., a); + + // definition tantalum + a=180.95*g/mole; + G4Element* Ta= new G4Element(name="tantalum", symbol="Ta", z=73., a); + + // definition tungsten + a=183.85*g/mole; + G4Element* W= new G4Element(name="tungsten", symbol="W", z=74., a); + + // definition gold + a=196.97*g/mole; + G4Element* Au= new G4Element(name="gold", symbol="Au", z=79., a); + + // definition lead + a=207.2*g/mole; + G4Element* Pb= new G4Element(name="lead", symbol="Pb", z=82., a); + + + + + + /***MATERIAUX***/ + + // definition : composition de Air + density=1.290*mg/cm3; + G4Material* Air= new G4Material(name="Air", density,nbelements=2); + Air->AddElement (N, fractionmass=0.7);//fractionmass=G4double + Air->AddElement (O, fractionmass=0.3);//fractionmass=G4double + + + density=1.e-9*g/cm3; + G4Material* vac= new G4Material(name="vac", density,nbelements=1); + vac->AddMaterial (Air, fractionmass=1.);//fractionmass=G4double + + + // vacuum + density=1.e-15*g/cm3; + /* G4Material* vacuum = new G4Material("vacuum", z=1., a=1.01*g/mole, density, kStateGas, 3.e-10*pascal, 2.73*kelvin); + G4Material* vacuum2; + vacuum2= vacuum; + */ + density= 2.376e-15*g/cm3; + G4double temperature= 300*kelvin; + G4double pressure= 3.0e-9*pascal; + G4Material* vacuum = new G4Material(name="vacuum", density, nbelements=1, + kStateGas,temperature,pressure); + vacuum-> AddMaterial(Air, fractionmass= 1.); + + //definition H2O= + density = 1.000*g/cm3; + G4Material* H2O = new G4Material(name="H2O", density, 2); + H2O->AddElement (H, nbelements=2);//nbelements=G4int + H2O->AddElement (O, nbelements=1);//nbelements=G4int + + + + //definition materiau 'tantale' + density = 16.650*g/cm3; + G4Material* tantale = new G4Material(name="tantale", density, 1); + tantale->AddElement (Ta, nbelements=1); + + //definition materiau 'or' + density = 19.300*g/cm3; + G4Material* gold = new G4Material(name="gold", density, 1); + gold->AddElement (Au, nbelements=1); + + // definition materiau 'iron' + density = 7.874*g/cm3; + G4Material* iron = new G4Material("iron",density,1); + iron->AddElement (Fe,1); + + // definition materiau 'tungsten' + density =19.250*g/cm3; + G4Material* tungsten = new G4Material("tungsten",density,1); + tungsten->AddElement(W,1); + + + // definition : composition of Graphite + density=2.*g/cm3; + G4Material* graphite= new G4Material(name="graphite",density,1); + graphite->AddElement (C,1); + + + /***MATERIAUX***/ + + // definition composition of NaI + density = 3.67*g/cm3; + G4Material* NaI = new G4Material(name="NaI", density, 2); + NaI->AddElement (Na, nbelements=1);//nbelements=G4int + NaI->AddElement (I, nbelements=1);//nbelements=G4int + + // definition composition of MgO + density = 3.60*g/cm3; + G4Material* MgO = new G4Material(name="MgO", density, 2); + MgO->AddElement (Mg, nbelements=1);//nbelements=G4int + MgO->AddElement (O, nbelements=1);//nbelements=G4int + + // definition composition of K2O + density = 2.350*g/cm3; + G4Material* K2O = new G4Material(name="K2O", density, 2); + K2O->AddElement (O, nbelements=1); + K2O->AddElement (K, nbelements=2); + +// definition composition of SiO2 + density = 2.533*g/cm3; + G4Material* SiO2 = new G4Material(name="SiO2", density, 2); + SiO2->AddElement (O, nbelements=2); + SiO2->AddElement (Si, nbelements=1); + + + // definition composition of B2O3 + density = 2.550*g/cm3; + G4Material* B2O3 = new G4Material(name="B2O3", density, 2); + B2O3->AddElement (B, nbelements=2); + B2O3->AddElement (O, nbelements=3); + + + // definition : composition of saphire //Al2-O3 + density=3.985*g/cm3; + G4Material*saphire = new G4Material(name="saphire", density,2); + saphire->AddElement (Al, nbelements=2); + saphire->AddElement (O, nbelements=3); + + //definition materiau 'copper' + density = 8.920*g/cm3; + G4Material* copper = new G4Material(name="copper", density, 1); + copper->AddElement (Cu, nbelements=1); + + // definition materiau 'aluminium' + density = 2.700*g/cm3; + G4Material* aluminium = new G4Material("aluminium",density,1); + aluminium->AddElement (Al,1); + + // definition composition de Brass + density=8.67*g/cm3; + G4Material* brass= new G4Material(name="brass", density,4); + brass->AddElement (Cu, fractionmass=63./100.); + brass->AddElement (Pb, fractionmass=3./100.); + brass->AddElement (Fe, fractionmass=0.1/100.); + brass->AddElement (Zn, fractionmass=33.9/100.); + + + // definition composition de mcpglass + density = 2.*g/cm3; + G4Material* mcpglass = new G4Material(name="mcpglass", density, 9); + mcpglass->AddElement (Pb, fractionmass= 0.48 ); + mcpglass->AddElement (O, fractionmass= 0.258 ); + mcpglass->AddElement (Si, fractionmass= 0.182 ); + mcpglass->AddElement (K, fractionmass= 0.042 ); + mcpglass->AddElement (Rb, fractionmass= 0.018 ); + mcpglass->AddElement (Ba, fractionmass= 0.013 ); + mcpglass->AddElement (As, fractionmass= 0.004 ); + mcpglass->AddElement (Cs, fractionmass= 0.002 ); + mcpglass->AddElement (Na, fractionmass= 0.001 ); + + // definition composition de scint + density = 1.*g/cm3; + G4Material* scint = new G4Material(name="scint", density, 2); + scint->AddElement (C, fractionmass= 1/2.04 ); + scint->AddElement (H, fractionmass= 1.04/2.04); + + // definition : composition de stainless_steel + density=7.930*g/cm3; + G4Material* stainless_steel= new G4Material(name="stainless_steel", density,3); + stainless_steel->AddElement (Ni, fractionmass= 0.11); + stainless_steel->AddElement (Cr, fractionmass= 0.18); + stainless_steel->AddElement (Fe, fractionmass= 0.71); + + + // definition : composition de macor + density=2.52*g/cm3; + G4Material* macor= new G4Material(name="macor", density,5); + macor->AddMaterial (SiO2, fractionmass=0.47); + macor->AddMaterial (saphire, fractionmass=0.17); + macor->AddMaterial (MgO, fractionmass=0.18); + macor->AddMaterial (K2O, fractionmass=0.105); + macor->AddMaterial (B2O3, fractionmass=0.075); + + // G4cout << *(G4Material::GetMaterialTable()) << G4endl; + +} + diff --git a/geant4/LEMuSR/src/LEMuSRMcpHit.cc b/geant4/LEMuSR/src/LEMuSRMcpHit.cc new file mode 100644 index 0000000..14bae77 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRMcpHit.cc @@ -0,0 +1,75 @@ +#include "LEMuSRMcpHit.hh" +#include "G4VVisManager.hh" +#include "G4Circle.hh" +#include "G4Colour.hh" +#include "G4VisAttributes.hh" +#include "G4ios.hh" +#include +#include + +#include "G4UnitsTable.hh" + +G4Allocator LEMuSRMcpHitAllocator; + +LEMuSRMcpHit::LEMuSRMcpHit() +{;} + +LEMuSRMcpHit::~LEMuSRMcpHit() +{;} + +LEMuSRMcpHit::LEMuSRMcpHit(const LEMuSRMcpHit &right) : G4VHit() +{ + particle_name = right.particle_name; + energy_deposition = right.energy_deposition; + time_of_flight = right.time_of_flight; + position = right.position; + momentum = right.momentum; +} + +const LEMuSRMcpHit& LEMuSRMcpHit::operator=(const LEMuSRMcpHit &right) +{ + particle_name = right.particle_name; + energy_deposition = right.energy_deposition; + time_of_flight = right.time_of_flight; + position = right.position; + momentum = right.momentum; + return *this; +} + + + +G4int LEMuSRMcpHit::operator==(const LEMuSRMcpHit &right) const +{ + return (this==&right) ? 1 : 0; +} + +void LEMuSRMcpHit::Draw() +{ + G4VVisManager* VisManager = G4VVisManager::GetConcreteInstance(); + if(VisManager) + { + G4Circle circle(position); + circle.SetScreenSize(0.1); + circle.SetFillStyle(G4Circle::filled); + G4Colour colour(1.,1.,1.); + G4VisAttributes attributes(colour); + circle.SetVisAttributes(attributes); + VisManager->Draw(circle); + } +} + +void LEMuSRMcpHit::Print() +{} + +void LEMuSRMcpHit::print(G4String name) +{ + ofstream TestPrint(name,ios::app); + if (!TestPrint.is_open()) exit(8); + TestPrint << "particle name : " << particle_name <<" ;\n " + << "energy_deposition : " << G4BestUnit(energy_deposition,"Energy") <<" ;\n " + << "time_of_flight : " << G4BestUnit(time_of_flight,"Time") <<" ;\n " + << "position : " << position <<" ;\n " + << "momentum : " << momentum <<" ;\n " + <AddHitsCollection(HCID,McpCollection); +} + +G4bool LEMuSRMcpSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) +{ + + p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); + + if( CheckCondition(aStep)) + { + GetDatas(aStep); + getHit(); + FillRoot(); + } + + + //PrintAll(); + + return true; +} + +void LEMuSRMcpSD::EndOfEvent(G4HCofThisEvent*) +{ + /* + G4int NbHits = McpCollection->entries(); + G4cout << "\n-------->Hits Collection: in this event they are " << NbHits + << " hits in the mcp: " << G4endl; + for (G4int i=0;iPrint(); + */ +} + +G4bool LEMuSRMcpSD::CheckCondition(const G4Step* aStep) +{ + + G4bool condition=false; + mu=e=g=0; + + + + if(aStep->GetPreStepPoint()->GetGlobalTime()/ns<1000.) + { + if(p_name == "e+"&&aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()!="lv_DMCP") + { + if( aStep->GetTrack()->GetCreatorProcess()) + { + if( aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="Decay") + { + condition=false;//true; + } + } + } + // if(p_name == "proton") + if(p_name == "mu+"||p_name == "Mu") + { + condition=true; + if(p_name=="mu+")mu=1; + if(p_name=="Mu")e=1; + } + if(p_name == "gamma") + { + g=1; + condition=false;//true; + } + } + + + return condition; + + +} + + +void LEMuSRMcpSD::clear() +{ + delete McpCollection; +} + +void LEMuSRMcpSD::DrawAll() +{ +} + +void LEMuSRMcpSD::PrintAll() +{ + + // Define Hit + + LEMuSRMcpHit* aHit; + aHit = new LEMuSRMcpHit(); + + //++++++++++++++ set hit values _______________ + aHit->SetParticleName(p_name); + aHit->SetSpin(spin); + + aHit->SetMomentum( hitmom ); + aHit->SetPosition( hitpos ); + + aHit->SetTimeOfFlight( tof ); + aHit->SetEnergyDeposition( edep ); + + + // McpCollection->insert( aHit ); + // aHit->Print(); + // aHit->print("Statistics/SCIS.Hits"); + // aHit->Draw(); + + +} + + +void LEMuSRMcpSD::GetDatas(const G4Step *aStep) +{ + // Get datas + //a Volume, name, spin + vname = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName(); + spin= aStep->GetTrack()->GetDefinition()->GetPDGSpin(); // spin in units of 1 + + //b Position momentum + hitpos = aStep->GetPreStepPoint()->GetPosition()/cm; // position + hitmom = aStep->GetPreStepPoint()->GetMomentumDirection(); // momentum + + //c Times + tof = aStep->GetPreStepPoint()->GetLocalTime()/ns; // time since track creation + globaltime = aStep->GetPreStepPoint()->GetGlobalTime()/ns;// time since event creation + proptime = aStep->GetTrack()->GetDynamicParticle()->GetProperTime()/ns; // particle's proper time + + //d Energy + edep = aStep->GetTotalEnergyDeposit(); + + toten = LEMuSRPrimaryGeneratorAction::GetPGA()->energy/keV;//aStep->GetTrack()->GetTotalEnergy(); + + kinen = aStep->GetPreStepPoint()->GetKineticEnergy(); + + +} + + +void LEMuSRMcpSD::getHit() +{ + theHit.kenergy = kinen; + theHit.tenergy = toten; + theHit.edeposit = edep; + theHit.localtime = tof; + theHit.globaltime = globaltime; + theHit.proptime = proptime; + theHit.positionx = hitpos.x(); + theHit.positiony = hitpos.y(); + theHit.positionz = hitpos.z(); + theHit.momdirx = hitmom.x(); + theHit.momdiry = hitmom.y(); + theHit.momdirz = hitmom.z(); + theHit.foil = LEMuSRDetectorConstruction::GetInstance()->cfthk; + theHit.muon = mu; + theHit.positron = e; + theHit.gamma = g; + theHit.runid = G4RunManager::GetRunManager()->GetCurrentRun()->GetRunID(); +} + +// ROOT METHODS + +void LEMuSRMcpSD::BookRoot() +{ + // open root file + myFile = new TFile("SDMcp.root", "RECREATE"); + // myFile->SetCompressionLevel(1); + + tree = new TTree ("tree"," Mcp Datas"); + + tree->Branch("mcpHit",&theHit.kenergy,"kenergy/F:init_energy/F:edeposit/F:localtime/F:globaltime:propertime/F:positionx/F:positiony:positionz:momentumx:momentumy:momentumz/F:foil/F:muon/I:muonium/I:gamma/I:ID/I"); + +} + +void LEMuSRMcpSD::FillRoot() +{ + tree->Fill(); +} + +void LEMuSRMcpSD::WriteRoot() +{ + myFile->Write(); + myFile->Close(); +} + diff --git a/geant4/LEMuSR/src/LEMuSRMuonDecayChannel.cc b/geant4/LEMuSR/src/LEMuSRMuonDecayChannel.cc new file mode 100644 index 0000000..d3b71b0 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRMuonDecayChannel.cc @@ -0,0 +1,285 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION +// ID : LEMuSRMuonDecayChannel.cc , v 1.2 +// AUTHOR: Taofiq PARAISO based on G4MuonDecayChannel $Id$ +// DATE : 2004-07-13 11:15 +// +// add muonium decay, PARAISO 07/04/2005 +// +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// MUON DECAY CHANNEL.CC +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//// + + + +#include "Randomize.hh" +#include "G4ios.hh" +#include "G4ParticleDefinition.hh" +#include "G4DecayProducts.hh" +#include "G4VDecayChannel.hh" +#include "LEMuSRMuonDecayChannel.hh" +#include "Randomize.hh" +#include "G4LorentzVector.hh" +#include "G4LorentzRotation.hh" +#include "G4Transform3D.hh" +#include "G4UnitsTable.hh" + +#include "LEMuSRAtRestSpinRotation.hh" + + +LEMuSRMuonDecayChannel::LEMuSRMuonDecayChannel(const G4String& theParentName, + G4double theBR) + :G4VDecayChannel("LEMuSR Muon Decay",1) +{ + + // set names for daughter particles + if (theParentName == "mu+") { + SetBR(theBR); + SetParent("mu+"); + SetNumberOfDaughters(3); + SetDaughter(0, "e+"); + SetDaughter(1, "nu_e"); + SetDaughter(2, "anti_nu_mu"); + + } else if (theParentName == "mu-") { + SetBR(theBR); + SetParent("mu-"); + SetNumberOfDaughters(3); + SetDaughter(0, "e-"); + SetDaughter(1, "anti_nu_e"); + SetDaughter(2, "nu_mu"); + } + else if (theParentName == "Mu") { + SetBR(theBR); + SetParent("Mu"); + SetNumberOfDaughters(3); + SetDaughter(0, "e+"); + SetDaughter(1, "nu_e"); + SetDaughter(2, "anti_nu_mu"); + } + else { + +#ifdef G4VERBOSE + if (GetVerboseLevel()>0) { + G4cout << "LEMuSRMuonDecayChannel:: constructor :"; + G4cout << " parent particle is not muon but "; + G4cout << theParentName << G4endl; + } +#endif + + } + + // get the random number engine + theEngine = HepRandom::getTheEngine(); + + + theParentPolarization=G4ThreeVector(0,0,0); + pointer = this; + + + +} + +LEMuSRMuonDecayChannel* LEMuSRMuonDecayChannel::pointer=0; +LEMuSRMuonDecayChannel* LEMuSRMuonDecayChannel::GetInstance() +{ + return pointer; +} + + + +LEMuSRMuonDecayChannel::~LEMuSRMuonDecayChannel() +{ + +} + + +G4DecayProducts *LEMuSRMuonDecayChannel::DecayItPolarized(G4double mass,G4ThreeVector polar) +{ + SetParentPolarization(polar); + +#ifdef G4VERBOSE + if (GetVerboseLevel()>2) { + G4cout << "LEMuSRMuonDecayChannel:: theParentPolarization is" <2) { + G4cout << "LEMuSRMuonDecayChannel::DecayIt "; + } +#endif + + if (parent == 0) FillParent(); + if (daughters == 0) FillDaughters(); + + // parent mass + G4double parentmass = parent->GetPDGMass(); + + //daughters'mass + G4double daughtermass[3]; + G4double sumofdaughtermass = 0.0; + for (G4int index=0; index<3; index++){ + daughtermass[index] = daughters[index]->GetPDGMass(); + sumofdaughtermass += daughtermass[index]; + } + + //create parent G4DynamicParticle at rest + G4ThreeVector dummy; + G4DynamicParticle * parentparticle = new G4DynamicParticle( parent, dummy, 0.0); + //create G4Decayproducts + G4DecayProducts *products = new G4DecayProducts(*parentparticle); + delete parentparticle; + + + // Calculate Positron energy + + G4double daughtermomentum[3]; + G4double energy; + G4double x; // maximal positron energy is 52.831MeV + G4double r; + + do { + do { + r = G4UniformRand(); + x = G4UniformRand(); + } while (r > (3.0 - 2.0*x)*x*x); + + + energy = x*52.831*MeV; + } while (energy <0.0|| energy > 52.831); + + + + // Anglular Distribution + + G4double energymax=52.831*MeV; + G4double E=energy/energymax; + + G4double D = (2*E-1)/(3-2*E); + + // theta + G4double K = G4UniformRand(); + costheta = 1/D*(-1.+ sqrt(1.-2*D*(2*K-1)+D*D)); + theta = acos(costheta); + sintheta=sin(theta); + + // phi + phi = 2.0*M_PI*G4UniformRand()*rad; + sinphi = sin(phi); + cosphi = cos(phi); + + // rotation angles + G4double px = sintheta*sinphi; + G4double py = sintheta*cosphi; + G4double pz = costheta; + + G4ThreeVector direction0(px,py,pz); + + direction0.rotateUz(theParentPolarization); + +#ifdef G4VERBOSE + if (GetVerboseLevel()>2) { + G4cout << "LEMuSRMuonDecayChanel::DecayIt \n"; + G4cout <<"e+ momentum direction: " << direction0 <SetPolarization(theParentPolarization.x(),theParentPolarization.y(),theParentPolarization.z()); + products->PushProducts(daughterparticle); + + + + // daughter 1 ,2 (neutrinos) + // create neutrinos in the C.M frame of two neutrinos + G4double energy2 = parentmass*(1.0 - x/2.0); + G4double vmass = sqrt((energy2-daughtermomentum[0])*(energy2+daughtermomentum[0])); + G4double beta = -1.0*daughtermomentum[0]/energy2; + G4double costhetan = 2.*G4UniformRand()-1.0; + G4double sinthetan = sqrt((1.0-costhetan)*(1.0+costhetan)); + G4double phin = 2.0*M_PI*G4UniformRand()*rad; + G4double sinphin = sin(phin); + G4double cosphin = cos(phin); + + G4ThreeVector direction1(sinthetan*cosphin,sinthetan*sinphin,costhetan); + G4DynamicParticle * daughterparticle1 + = new G4DynamicParticle( daughters[1], direction1*(vmass/2.)); + G4DynamicParticle * daughterparticle2 + = new G4DynamicParticle( daughters[2], direction1*(-1.0*vmass/2.)); + + // boost to the muon rest frame + G4LorentzVector p4; + p4 = daughterparticle1->Get4Momentum(); + p4.boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta); + daughterparticle1->Set4Momentum(p4); + p4 = daughterparticle2->Get4Momentum(); + p4.boost( direction0.x()*beta, direction0.y()*beta, direction0.z()*beta); + daughterparticle2->Set4Momentum(p4); + products->PushProducts(daughterparticle1); + products->PushProducts(daughterparticle2); + daughtermomentum[1] = daughterparticle1->GetTotalMomentum(); + daughtermomentum[2] = daughterparticle2->GetTotalMomentum(); + + // output message +#ifdef G4VERBOSE + if (GetVerboseLevel()>2) { + G4cout << "LEMuSRMuonDecayChanel::DecayIt "; + G4cout << " THETA aNGLE ::" <DumpInfo(); + } +#endif + + + return products; +} diff --git a/geant4/LEMuSR/src/LEMuSRMuonPhysics.cc b/geant4/LEMuSR/src/LEMuSRMuonPhysics.cc new file mode 100644 index 0000000..7baa98c --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRMuonPhysics.cc @@ -0,0 +1,154 @@ +#include "LEMuSRMuonPhysics.hh" + +#include "globals.hh" +#include "G4ios.hh" +#include + + +LEMuSRMuonPhysics::LEMuSRMuonPhysics(const G4String& name) + : G4VPhysicsConstructor(name) +{ +} + +LEMuSRMuonPhysics::~LEMuSRMuonPhysics() +{ +} + +#include "G4ParticleDefinition.hh" +#include "G4ParticleTable.hh" + +#include "G4MuonPlus.hh" +#include "G4Muonium.hh" +#include "G4MuonMinus.hh" +#include "G4TauMinus.hh" +#include "G4TauPlus.hh" +#include "G4NeutrinoTau.hh" +#include "G4AntiNeutrinoTau.hh" +#include "G4NeutrinoMu.hh" +#include "G4AntiNeutrinoMu.hh" +#include "LEMuSRMuonDecayChannel.hh" +#include "G4UserSpecialCuts.hh" +#include "G4DecayTable.hh" +#include "G4MuonDecayChannelWithSpin.hh" + + + + +void LEMuSRMuonPhysics::ConstructParticle() +{ + // Mu + G4MuonPlus::MuonPlusDefinition(); + G4Muonium::MuoniumDefinition(); + G4MuonMinus::MuonMinusDefinition(); + G4NeutrinoMu::NeutrinoMuDefinition(); + G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); + + // Tau + G4TauMinus::TauMinusDefinition(); + G4TauPlus::TauPlusDefinition(); + G4NeutrinoTau::NeutrinoTauDefinition(); + G4AntiNeutrinoTau::AntiNeutrinoTauDefinition(); + + +#ifdef ASYM_USE_LEMU + G4DecayTable* MuonPlusDecayTable = new G4DecayTable(); + MuonPlusDecayTable -> Insert(new LEMuSRMuonDecayChannel("mu+",1.00)); + G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(MuonPlusDecayTable); + + G4DecayTable* MuoniumDecayTable = new G4DecayTable(); + MuoniumDecayTable -> Insert(new LEMuSRMuonDecayChannel("Mu",0.5)); + MuoniumDecayTable -> Insert(new G4MuonDecayChannel("Mu",0.5)); + G4Muonium::MuoniumDefinition() -> SetDecayTable(MuoniumDecayTable); + + G4DecayTable* MuonMinusDecayTable = new G4DecayTable(); + MuonMinusDecayTable -> Insert(new LEMuSRMuonDecayChannel("mu-",1.00)); + G4MuonMinus::MuonMinusDefinition() -> SetDecayTable(MuonMinusDecayTable); + G4cout<<"ASYM_USE_LEMU\n"; +#else + G4DecayTable* MuonPlusDecayTable = new G4DecayTable(); + MuonPlusDecayTable -> Insert(new G4MuonDecayChannel("mu+",1.00)); + G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(MuonPlusDecayTable); + + G4DecayTable* MuoniumDecayTable = new G4DecayTable(); + MuoniumDecayTable -> Insert(new G4MuonDecayChannel("Mu",1.)); + G4Muonium::MuoniumDefinition() -> SetDecayTable(MuoniumDecayTable); + + G4DecayTable* MuonMinusDecayTable = new G4DecayTable(); + MuonMinusDecayTable -> Insert(new G4MuonDecayChannelWithSpin("mu-",1.00)); + G4MuonMinus::MuonMinusDefinition() -> SetDecayTable(MuonMinusDecayTable); + G4cout<<"ASYM_USE_G4\n"; +#endif + + +} + + +#include "G4ProcessManager.hh" + +void LEMuSRMuonPhysics::ConstructProcess() +{ + G4ProcessManager * pManager = 0; + + // Muon Plus Physics + pManager = G4MuonPlus::MuonPlus()->GetProcessManager(); + + pManager->AddProcess(&fMuAtRestSpinRotation, 1, -1, -1); //(&fprocess, atrest, prestep, poststep) + pManager->AddProcess(&fMuFormation,-1, -1, 1); + pManager->AddProcess(&fMuPlusMultipleScattering,-1, 1, -1);// may crash when enabled as post step process + pManager->AddProcess(&fMuPlusIonisation, -1, 2, 2); + pManager->AddProcess(&fMuPlusBremsstrahlung, -1, 3, 3); + pManager->AddProcess(&fMuPlusPairProduction, -1, 4, 4); + + pManager->AddProcess(new G4UserSpecialCuts(),-1,-1,6); + // pManager ->SetProcessOrderingToLast(&fDepolarization, idxAtRest); + // pManager ->SetProcessOrdering(&fDepolarization, idxPostStep); + + // the last process: decay + pManager->AddProcess(&fDecayProcess); + pManager ->SetProcessOrderingToLast(&fDecayProcess, idxAtRest); + pManager ->SetProcessOrdering(&fDecayProcess, idxPostStep); + + + // Muonium Physics is the same as muon plus physics + pManager = G4Muonium::Muonium()->GetProcessManager(); + + pManager->AddProcess(&fMuAtRestSpinRotation, 1, -1, -1); + pManager->AddProcess(&fMuPlusIonisation, -1, 2, 2); + pManager->AddProcess(&fMuoniumScatt, -1, -1, 3); + pManager->AddProcess(&fMuPlusBremsstrahlung, -1, 4, 4); + pManager->AddProcess(&fMuPlusPairProduction, -1, 5, 5); + + pManager->AddProcess(new G4UserSpecialCuts(),-1,-1,6); + + // the last process: decay + pManager->AddProcess(&fDecayProcess); + pManager->SetProcessOrderingToLast(&fDecayProcess, idxAtRest); + pManager->SetProcessOrdering(&fDecayProcess, idxPostStep); + + // Muon Minus Physics + pManager = G4MuonMinus::MuonMinus()->GetProcessManager(); + + pManager->AddProcess(&fMuMinusMultipleScattering,-1, 1, 1); + pManager->AddProcess(&fMuMinusIonisation, -1, 2, 2); + pManager->AddProcess(&fMuMinusBremsstrahlung, -1, 3, 3); + pManager->AddProcess(&fMuMinusPairProduction, -1, 4, 4); + + pManager->AddRestProcess(&fMuMinusCaptureAtRest); + pManager->AddProcess(&fDecayProcess); + pManager->SetProcessOrderingToLast(&fDecayProcess, idxAtRest); + pManager->SetProcessOrdering(&fDecayProcess, idxPostStep); + + // Tau Plus Physics + pManager = G4TauPlus::TauPlus()->GetProcessManager(); + + pManager->AddProcess(&fTauPlusMultipleScattering, -1, 1, 1); + pManager->AddProcess(&fTauPlusIonisation, -1, 2, 2); + + // Tau Minus Physics + pManager = G4TauMinus::TauMinus()->GetProcessManager(); + + pManager->AddProcess(&fTauMinusMultipleScattering, -1, 1, 1); + pManager->AddProcess(&fTauMinusIonisation, -1, 2, 2); + +} + diff --git a/geant4/LEMuSR/src/LEMuSROScintHit.cc b/geant4/LEMuSR/src/LEMuSROScintHit.cc new file mode 100644 index 0000000..9b66ab7 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSROScintHit.cc @@ -0,0 +1,75 @@ +#include "LEMuSROScintHit.hh" +#include "G4VVisManager.hh" +#include "G4Circle.hh" +#include "G4Colour.hh" +#include "G4VisAttributes.hh" +#include "G4ios.hh" +#include +#include + +#include "G4UnitsTable.hh" + +G4Allocator LEMuSROScintHitAllocator; + +LEMuSROScintHit::LEMuSROScintHit() +{;} + +LEMuSROScintHit::~LEMuSROScintHit() +{;} + +LEMuSROScintHit::LEMuSROScintHit(const LEMuSROScintHit &right) : G4VHit() +{ + particle_name = right.particle_name; + energy_deposition = right.energy_deposition; + time_of_flight = right.time_of_flight; + position = right.position; + momentum = right.momentum; +} + +const LEMuSROScintHit& LEMuSROScintHit::operator=(const LEMuSROScintHit &right) +{ + particle_name = right.particle_name; + energy_deposition = right.energy_deposition; + time_of_flight = right.time_of_flight; + position = right.position; + momentum = right.momentum; + return *this; +} + + + +G4int LEMuSROScintHit::operator==(const LEMuSROScintHit &right) const +{ + return (this==&right) ? 1 : 0; +} + +void LEMuSROScintHit::Draw() +{ + G4VVisManager* VisManager = G4VVisManager::GetConcreteInstance(); + if(VisManager) + { + G4Circle circle(position); + circle.SetScreenSize(0.1); + circle.SetFillStyle(G4Circle::filled); + G4Colour colour(1.,1.,1.); + G4VisAttributes attributes(colour); + circle.SetVisAttributes(attributes); + VisManager->Draw(circle); + } +} + +void LEMuSROScintHit::Print() +{} + +void LEMuSROScintHit::print(G4String name) +{ + ofstream TestPrint(name,ios::app); + if (!TestPrint.is_open()) exit(8); + TestPrint << "particle name : " << particle_name <<" ;\n " + << "energy_deposition : " << G4BestUnit(energy_deposition,"Energy") <<" ;\n " + << "time_of_flight : " << G4BestUnit(time_of_flight,"Time") <<" ;\n " + << "position : " << position <<" ;\n " + << "momentum : " << momentum <<" ;\n " + <AddHitsCollection(HCID,ScintCollection); +} + +G4bool LEMuSROScintSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) +{ + // G4cout << "PROCESS HIT"<GetTrack()->GetDefinition()->GetParticleName(); // particle name + + + if( CheckCondition(aStep)) + { + GetDatas(aStep); + getHit(); + FillRoot(); + } + + + // Define Hit + aHit = new LEMuSROScintHit(); + + //++++++++++++++ set hit values _______________ + aHit->SetParticleName(p_name); + aHit->SetSpin(spin); + + aHit->SetMomentum( hitmom ); + aHit->SetPosition( hitpos ); + + aHit->SetTimeOfFlight( tof); + aHit->SetEnergyDeposition( edep ); + + + ScintCollection->insert( aHit ); + // aHit->Print(); + // aHit->print("Statistics/SCIS.Hits"); + aHit->Draw(); + + + PrintAll(); + + + return true; +} + +void LEMuSROScintSD::EndOfEvent(G4HCofThisEvent*) +{ + // G4int NbHits = ScintCollection->entries(); + // G4cout << "\n-------->Hits Collection: in this event they are " << NbHits + // << " hits in the inner scintillator: " << G4endl; + // for (G4int i=0;iPrint(); + +} + +G4bool LEMuSROScintSD::CheckCondition(const G4Step* aStep) +{ + G4bool condition=false; + + if(p_name == "e+"&&aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()!="lv_SCOS") + { + if( aStep->GetTrack()->GetCreatorProcess()) + { + if( aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="Decay") + { + condition=true; + } + } + } + + return condition; + +} + + +void LEMuSROScintSD::clear() +{ + delete ScintCollection; +} + +void LEMuSROScintSD::DrawAll() +{ +} + +void LEMuSROScintSD::PrintAll() +{ + +} + + +void LEMuSROScintSD::GetDatas(const G4Step *aStep) +{ + // Get datas + //a Volume, name, spin + vname = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName(); + spin= aStep->GetTrack()->GetDefinition()->GetPDGSpin(); // spin in units of 1 + + //b Position momentum + hitpos = aStep->GetPreStepPoint()->GetPosition(); // position + hitmom = aStep->GetPreStepPoint()->GetMomentum(); // momentum + + //c Times + tof = aStep->GetPreStepPoint()->GetLocalTime(); // time since track creation + globaltime = aStep->GetPreStepPoint()->GetGlobalTime();// time since event creation + proptime = aStep->GetPreStepPoint()->GetProperTime(); // particle's proper time + + //d Energy + edep = aStep->GetTotalEnergyDeposit(); + + toten = aStep->GetTrack()->GetTotalEnergy(); + + kinen = aStep->GetTrack()->GetKineticEnergy(); + + //e OScint ID + +} + + +void LEMuSROScintSD::getHit() +{ + theHit.kenergy = kinen; + theHit.tenergy = toten; + theHit.edeposit = edep; + theHit.localtime = tof; + theHit.globaltime = globaltime; + theHit.proptime = proptime; + theHit.positionx = hitpos.x(); + theHit.positiony = hitpos.y(); + theHit.positionz = hitpos.z(); + theHit.momdirx = hitmom.x(); + theHit.momdiry = hitmom.y(); + theHit.momdirz = hitmom.z(); + if (vname=="pv_SCISl") + { + theHit.scLeft = globaltime;//+=1;// + } + else if (vname=="pv_SCISb") + { + theHit.scBottom =globaltime ;//+=1; + } + else if (vname=="pv_SCISr") + { + theHit.scRight =globaltime;//+=1; + } + else if (vname=="pv_SCISt") + { + theHit.scTop = globaltime;//+=1; + } +} + +// ROOT METHODS + +void LEMuSROScintSD::BookRoot() +{ + // open root file + myFile = new TFile("SDOuterScintE0.root", "RECREATE"); + // myFile->SetCompressionLevel(1); + + tree = new TTree ("tree","Outer Scintillator Datas"); + + tree->Branch("scintHit",&theHit.kenergy,"kenergy/F:tenergy/F:edeposit/F:localtime/F:globaltime:propertime/F:positionx/F:positiony:positionz:momdirx:momdiry:momdirz/F:Left/F:Right/F:Bottom/F:Top/F:runID"); + +} + +void LEMuSROScintSD::FillRoot() +{ + tree->Fill(); +} + +void LEMuSROScintSD::WriteRoot() +{ + myFile->Write(); + myFile->Close(); +} diff --git a/geant4/LEMuSR/src/LEMuSRParticleChangeForSR.cc b/geant4/LEMuSR/src/LEMuSRParticleChangeForSR.cc new file mode 100644 index 0000000..33d5338 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRParticleChangeForSR.cc @@ -0,0 +1,64 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRParticleChangeForSR.cc , v 1.2b +// AUTHOR: Taofiq PARAISO +// DATE : 2004-08-20 10:36 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// PARTICLE CHANGE FOR SPIN ROTATION +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +#include "LEMuSRParticleChangeForSR.hh" + + + +G4Step* LEMuSRParticleChangeForSR::UpdateStepForAtRest(G4Step* pStep) +{ + G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint(); + G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint(); + G4Track* aTrack = pStep->GetTrack(); + + // update polarization + + pPostStepPoint->SetMomentumDirection(theMomentumDirectionChange); + pPostStepPoint->SetKineticEnergy(theEnergyChange); + pPostStepPoint->AddPolarization( thePolarizationChange + - pPreStepPoint->GetPolarization()); + + // update position and time + pPostStepPoint->AddPosition( thePositionChange + - pPreStepPoint->GetPosition() ); + + + pStep->SetControlFlag( theSteppingControlFlag ); + + // Update track + pStep->UpdateTrack(); + + +#ifdef G4SRVERBOSE + G4cout<<"STEP UPDATED " + << aTrack->GetDynamicParticle()->GetPreAssignedDecayProperTime() + <<" " + << aTrack->GetDynamicParticle()->GetProperTime() + <GetPDGMass(); + G4double energy = particle_energy + mass; + G4double pmom = sqrt(energy*energy-mass*mass); + G4double px = pmom*particle_momentum_direction.x(); + G4double py = pmom*particle_momentum_direction.y(); + G4double pz = pmom*particle_momentum_direction.z(); + for( G4int i=0; iSetMass( mass ); + // particle->SetCharge( particle_charge ); + // G4cout<<"Charge (from gun) = " << particle->GetCharge() <<" \n" <SetPolarization(particle_polarization.x(), + particle_polarization.y(), + particle_polarization.z()); + particle->SetProperTime(decaytime); + // G4cout<<"Muon decay time = " << decaytime/ns <<"ns. \n" <SetPrimary( particle ); + + + } + + evt->AddPrimaryVertex( vertex ); +} diff --git a/geant4/LEMuSR/src/LEMuSRParticleGunMessenger.cc b/geant4/LEMuSR/src/LEMuSRParticleGunMessenger.cc new file mode 100644 index 0000000..762af1d --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRParticleGunMessenger.cc @@ -0,0 +1,231 @@ +#include "LEMuSRParticleGunMessenger.hh" +#include "LEMuSRParticleGun.hh" +#include "G4Geantino.hh" +#include "G4ThreeVector.hh" +#include "G4ParticleTable.hh" +#include "G4IonTable.hh" +#include "G4UIdirectory.hh" +#include "G4UIcmdWithoutParameter.hh" +#include "G4UIcmdWithAString.hh" +#include "G4UIcmdWithADoubleAndUnit.hh" +#include "G4UIcmdWith3Vector.hh" +#include "G4UIcmdWith3VectorAndUnit.hh" +#include "G4UIcmdWithAnInteger.hh" +#include "G4ios.hh" +#include "G4Tokenizer.hh" + +#include +#include + + +LEMuSRParticleGunMessenger::LEMuSRParticleGunMessenger(LEMuSRParticleGun* fPtclGun) + :fParticleGun(fPtclGun),fShootIon(false) +{ + particleTable = G4ParticleTable::GetParticleTable(); + + gunDirectory = new G4UIdirectory("/lemuGun/"); + gunDirectory->SetGuidance("Particle Gun control commands."); + + listCmd = new G4UIcmdWithoutParameter("/lemuGun/List",this); + listCmd->SetGuidance("List available particles."); + listCmd->SetGuidance(" Invoke G4ParticleTable."); + + particleCmd = new G4UIcmdWithAString("/lemuGun/particle",this); + particleCmd->SetGuidance("Set particle to be generated."); + particleCmd->SetGuidance(" (geantino is default)"); + particleCmd->SetGuidance(" (ion can be specified for shooting ions)"); + particleCmd->SetParameterName("particleName",true); + particleCmd->SetDefaultValue("geantino"); + G4String candidateList; + G4int nPtcl = particleTable->entries(); + for(G4int i=0;iGetParticle(i)->IsShortLived())) + { + candidateList += particleTable->GetParticleName(i); + candidateList += " "; + } + } + candidateList += "ion "; + particleCmd->SetCandidates(candidateList); + + directionCmd = new G4UIcmdWith3Vector("/lemuGun/direction",this); + directionCmd->SetGuidance("Set momentum direction."); + directionCmd->SetGuidance("Direction needs not to be a unit vector."); + directionCmd->SetParameterName("Px","Py","Pz",true,true); + directionCmd->SetRange("Px != 0 || Py != 0 || Pz != 0"); + + energyCmd = new G4UIcmdWithADoubleAndUnit("/lemuGun/energy",this); + energyCmd->SetGuidance("Set kinetic energy."); + energyCmd->SetParameterName("Energy",true,true); + energyCmd->SetDefaultUnit("GeV"); + //energyCmd->SetUnitCategory("Energy"); + //energyCmd->SetUnitCandidates("eV keV MeV GeV TeV"); + + positionCmd = new G4UIcmdWith3VectorAndUnit("/lemuGun/position",this); + positionCmd->SetGuidance("Set starting position of the particle."); + positionCmd->SetParameterName("X","Y","Z",true,true); + positionCmd->SetDefaultUnit("cm"); + //positionCmd->SetUnitCategory("Length"); + //positionCmd->SetUnitCandidates("microm mm cm m km"); + + timeCmd = new G4UIcmdWithADoubleAndUnit("/lemuGun/time",this); + timeCmd->SetGuidance("Set initial time of the particle."); + timeCmd->SetParameterName("t0",true,true); + timeCmd->SetDefaultUnit("ns"); + //timeCmd->SetUnitCategory("Time"); + //timeCmd->SetUnitCandidates("ns ms s"); + + polCmd = new G4UIcmdWith3Vector("/lemuGun/polarization",this); + polCmd->SetGuidance("Set polarization."); + polCmd->SetParameterName("Px","Py","Pz",true,true); + polCmd->SetRange("Px>=-1.&&Px<=1.&&Py>=-1.&&Py<=1.&&Pz>=-1.&&Pz<=1."); + + numberCmd = new G4UIcmdWithAnInteger("/lemuGun/number",this); + numberCmd->SetGuidance("Set number of particles to be generated."); + numberCmd->SetParameterName("N",true,true); + numberCmd->SetRange("N>0"); + + ionCmd = new G4UIcommand("/lemuGun/ion",this); + ionCmd->SetGuidance("Set properties of ion to be generated."); + ionCmd->SetGuidance("[usage] /lemuGun/ion Z A Q"); + ionCmd->SetGuidance(" Z:(int) AtomicNumber"); + ionCmd->SetGuidance(" A:(int) AtomicMass"); + ionCmd->SetGuidance(" Q:(int) Charge of Ion (in unit of e)"); + ionCmd->SetGuidance(" E:(double) Excitation energy (in keV)"); + + G4UIparameter* param; + param = new G4UIparameter("Z",'i',false); + param->SetDefaultValue("1"); + ionCmd->SetParameter(param); + param = new G4UIparameter("A",'i',false); + param->SetDefaultValue("1"); + ionCmd->SetParameter(param); + param = new G4UIparameter("Q",'i',true); + param->SetDefaultValue("0"); + ionCmd->SetParameter(param); + param = new G4UIparameter("E",'d',true); + param->SetDefaultValue("0.0"); + ionCmd->SetParameter(param); + + // set initial value to G4ParticleGun + fParticleGun->SetParticleDefinition( G4Geantino::Geantino() ); + fParticleGun->SetParticleMomentumDirection( G4ThreeVector(1.0,0.0,0.0) ); + fParticleGun->SetParticleEnergy( 1.0*GeV ); + fParticleGun->SetParticlePosition(G4ThreeVector(0.0*cm, 0.0*cm, 0.0*cm)); + fParticleGun->SetParticleTime( 0.0*ns ); +} + + + +LEMuSRParticleGunMessenger::~LEMuSRParticleGunMessenger() +{ + delete listCmd; + delete particleCmd; + delete directionCmd; + delete energyCmd; + delete positionCmd; + delete timeCmd; + delete polCmd; + delete numberCmd; + delete ionCmd; + delete gunDirectory; +} + + +void LEMuSRParticleGunMessenger::SetNewValue(G4UIcommand * command,G4String newValues) +{ + if( command==listCmd ) + { particleTable->DumpTable(); } + else if( command==particleCmd ) + { + if (newValues =="ion") { + fShootIon = true; + } else { + fShootIon = false; + G4ParticleDefinition* pd = particleTable->FindParticle(newValues); + if(pd != 0) + { fParticleGun->SetParticleDefinition( pd ); } + } + } + else if( command==directionCmd ) + { fParticleGun->SetParticleMomentumDirection(directionCmd->GetNew3VectorValue(newValues)); } + else if( command==energyCmd ) + { fParticleGun->SetParticleEnergy(energyCmd->GetNewDoubleValue(newValues)); } + else if( command==positionCmd ) + { fParticleGun->SetParticlePosition(positionCmd->GetNew3VectorValue(newValues)); } + else if( command==timeCmd ) + { fParticleGun->SetParticleTime(timeCmd->GetNewDoubleValue(newValues)); } + else if( command==polCmd ) + { fParticleGun->SetParticlePolarization(polCmd->GetNew3VectorValue(newValues)); } + else if( command==numberCmd ) + { fParticleGun->SetNumberOfParticles(numberCmd->GetNewIntValue(newValues)); } + else if( command==ionCmd ) + { IonCommand(newValues); } +} + +G4String LEMuSRParticleGunMessenger::GetCurrentValue(G4UIcommand * command) +{ + G4String cv; + + if( command==directionCmd ) + { cv = directionCmd->ConvertToString(fParticleGun->GetParticleMomentumDirection()); } + else if( command==particleCmd ) + { cv = fParticleGun->GetParticleDefinition()->GetParticleName(); } + else if( command==energyCmd ) + { cv = energyCmd->ConvertToString(fParticleGun->GetParticleEnergy(),"GeV"); } + else if( command==positionCmd ) + { cv = positionCmd->ConvertToString(fParticleGun->GetParticlePosition(),"cm"); } + else if( command==timeCmd ) + { cv = timeCmd->ConvertToString(fParticleGun->GetParticleTime(),"ns"); } + else if( command==polCmd ) + { cv = polCmd->ConvertToString(fParticleGun->GetParticlePolarization()); } + else if( command==numberCmd ) + { cv = numberCmd->ConvertToString(fParticleGun->GetNumberOfParticles()); } + else if( command==ionCmd ) + { + if (fShootIon) { + cv = ItoS(fAtomicNumber) + " " + ItoS(fAtomicMass) + " "; + cv += ItoS(fIonCharge); + } else { + cv = ""; + } + } + return cv; +} + +void LEMuSRParticleGunMessenger::IonCommand(G4String newValues) +{ + if (fShootIon) { + G4Tokenizer next( newValues ); + // check argument + fAtomicNumber = StoI(next()); + fAtomicMass = StoI(next()); + G4String sQ = next(); + if (sQ.isNull()) { + fIonCharge = fAtomicNumber; + } else { + fIonCharge = StoI(sQ); + sQ = next(); + if (sQ.isNull()) { + fIonExciteEnergy = 0.0; + } else { + fIonExciteEnergy = StoD(sQ) * keV; + } + } + + G4ParticleDefinition* ion; + ion = particleTable->GetIon( fAtomicNumber, fAtomicMass, fIonExciteEnergy); + if (ion==0) { + G4cout << "Ion with Z=" << fAtomicNumber; + G4cout << " A=" << fAtomicMass << "is not be defined" << G4endl; + } else { + fParticleGun->SetParticleDefinition(ion); + fParticleGun->SetParticleCharge(fIonCharge*eplus); + } + } else { + G4cout << "Set /lemuGun/particle to ion before using /lemuGun/ion command"; + G4cout << G4endl; + } +} + diff --git a/geant4/LEMuSR/src/LEMuSRPgaMessenger.cc b/geant4/LEMuSR/src/LEMuSRPgaMessenger.cc new file mode 100644 index 0000000..d5575b5 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRPgaMessenger.cc @@ -0,0 +1,239 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRPgaMessenger.cc , v 1.1 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-06-30 09:12 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// PRIMARY GENERATOR ACTION MEESENGER +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + +#include "LEMuSRPgaMessenger.hh" + + +#include "LEMuSRPrimaryGeneratorAction.hh" +#include "G4UIdirectory.hh" +#include "G4UIcmdWithAString.hh" +#include "G4UIcmdWithoutParameter.hh" +#include "G4UIcmdWithADoubleAndUnit.hh" +#include "G4UIcmdWithADouble.hh" +#include "G4UIcmdWith3Vector.hh" +#include "G4UIcmdWith3VectorAndUnit.hh" +#include "G4UIcmdWithAnInteger.hh" +#include "G4ios.hh" +#include "G4UnitsTable.hh" +#include "G4ParticleTable.hh" +LEMuSRPgaMessenger::LEMuSRPgaMessenger(LEMuSRPrimaryGeneratorAction *thePGA) +:lemuPGA(thePGA) +{ + pgaDirectory = new G4UIdirectory("/lemuGun/"); + pgaDirectory->SetGuidance("LEMuSR particle shooting control commands."); + + // commands + + posCmd = new G4UIcmdWith3Vector("/lemuGun/gunPosition",this); + posCmd->SetGuidance("Set Gun Position >> IN CENTIMETERS."); + posCmd->SetParameterName("X [cm]","Y [cm]","Z [cm]",true,true); + posCmd->SetDefaultValue(Hep3Vector(0., 0., -114)); + + posCmd = new G4UIcmdWith3Vector("/lemuGun/MomentumDirection",this); + posCmd->SetGuidance("Set momentum direction >> sum must equal one."); + posCmd->SetParameterName("momX ","momY ","momZ ",true,true); + posCmd->SetDefaultValue(Hep3Vector(0., 0., 1.)); + + + scaCmd = new G4UIcmdWith3Vector("/lemuGun/scan/square",this); + scaCmd->SetGuidance("Gun scan: xrange yrange nbins \n Shoot right number of particles to fill. \n xrange and yrange are divided in nbins.\n"); + scaCmd->SetParameterName("X range [cm]","Y range [cm]","Number of bins",true,true); + scaCmd->SetDefaultValue(Hep3Vector(2., 2., 400)); + + scbCmd = new G4UIcmdWith3Vector("/lemuGun/scan/circular",this); + scbCmd->SetGuidance("Gun scan: radius Rsteps ThetaSteps \n Shoot Rsteps*Thetasteps particles to fill."); + scbCmd->SetParameterName("Radius [cm]","Number of step along radius","Number of steps along angle",true,true); + scbCmd->SetDefaultValue(Hep3Vector(1., 36 , 360 )); + + scgCmd = new G4UIcmdWith3Vector("/lemuGun/scan/gauss",this); + scgCmd->SetGuidance("Gun gauss scan:."); + scgCmd->SetParameterName("Radius [cm]","Number of step along radius","Number of steps along angle",true,true); + scgCmd->SetDefaultValue(Hep3Vector(1., 36 , 360 )); + + + + reset = new G4UIcmdWithoutParameter("/lemuGun/scan/reset",this); + reset->SetGuidance("\n Reset the counters for scanning"); + + setEnergy = new G4UIcmdWithADouble("/lemuGun/energy/defined",this); + setEnergy->SetGuidance("\n Energy Value >> IN keV \n "); + setEnergy->SetParameterName("Energy in [keV]",false); + setEnergy->SetDefaultValue(20); + setEnergy->AvailableForStates(G4State_PreInit,G4State_Idle); + + setKEoffset = new G4UIcmdWithADouble("/lemuGun/energy/offset",this); // not implemented yet + setKEoffset->SetGuidance("\n KEoffset Value >> IN keV \n "); + setKEoffset->SetParameterName("KEoffset in [keV]; default value 3.73",false); + setKEoffset->SetDefaultValue(0); + setKEoffset->AvailableForStates(G4State_PreInit,G4State_Idle); + + + + setRndEnergy = new G4UIcmdWithAString("/lemuGun/energy/random",this); + setRndEnergy->SetGuidance("Gaussian energy distribution with default mean 20 kev and 0.5 kev deviation"); + setRndEnergy->SetParameterName("Random Energy: on/off",true); + setRndEnergy->SetDefaultValue("on"); + + + setMuonium = new G4UIcmdWithAString("/lemuGun/particle",this); + setMuonium->SetGuidance("Particles to be shot"); + setMuonium->SetParameterName("Particle types: mu+/Mu",true); + setMuonium->SetDefaultValue("mu+"); + + + setEGauss = new G4UIcmdWith3Vector("/lemuGun/energy/gauss",this); + setEGauss->SetGuidance("Gaussian energy distribution with specified mean and standard deviation\n ENTER VALUES >> IN keV "); + setEGauss->SetParameterName("Mean Energy","Standard Deviation","",true,true); + setEGauss->SetDefaultValue(Hep3Vector(20., 0.5, 0.0)); + +} + + +LEMuSRPgaMessenger::~LEMuSRPgaMessenger() +{ + delete posCmd; + delete momCmd; + delete scaCmd; + delete scgCmd; + delete scbCmd; + delete reset; + delete setEnergy; + delete setRndEnergy; + delete setMuonium; + delete setKEoffset; + delete setEGauss; + delete pgaDirectory; +} + + +void LEMuSRPgaMessenger::SetNewValue(G4UIcommand * command,G4String newValues) +{ + + if( command==posCmd ) + { + lemuPGA->scan=0; + lemuPGA->X=posCmd->GetNew3VectorValue(newValues).x(); + lemuPGA->Y=posCmd->GetNew3VectorValue(newValues).y(); + lemuPGA->Z=posCmd->GetNew3VectorValue(newValues).z(); + } + else if( command==momCmd ) + { + // lemuPGA->scan=0; + lemuPGA->momX=momCmd->GetNew3VectorValue(newValues).x(); + lemuPGA->momY=momCmd->GetNew3VectorValue(newValues).y(); + lemuPGA->momZ=momCmd->GetNew3VectorValue(newValues).z(); + } + else if( command==scaCmd) + { + lemuPGA->scan=1; + G4int xb, yb; + lemuPGA->m_xrange=scaCmd->GetNew3VectorValue(newValues).x(); + lemuPGA->m_yrange=scaCmd->GetNew3VectorValue(newValues).y(); + + xb=(G4int)(scaCmd->GetNew3VectorValue(newValues).z()/(2*scaCmd->GetNew3VectorValue(newValues).x())); + yb=(G4int)(scaCmd->GetNew3VectorValue(newValues).z()/(2*scaCmd->GetNew3VectorValue(newValues).y())); + + // xb=(G4int)(scaCmd->GetNew3VectorValue(newValues).z()); + // yb=(G4int)(scaCmd->GetNew3VectorValue(newValues).z()); + lemuPGA->m_nbxsteps=xb; + lemuPGA->m_nbysteps=yb; + + + lemuPGA->m_counterx = 0; + lemuPGA->m_countery = 0; + + G4cout<<"Scan will make " << lemuPGA->m_nbxsteps << " steps along x and " <m_nbysteps <<" steps along y.\n sHooT :: " << xb*yb <<" particles to fill.\n "; + + } + + else if( command==scbCmd) + { + lemuPGA->scan=2; + lemuPGA->m_xrange=scbCmd->GetNew3VectorValue(newValues).x(); + lemuPGA->m_nbxsteps=(G4int)scbCmd->GetNew3VectorValue(newValues).y(); + lemuPGA->m_nbysteps=(G4int)scbCmd->GetNew3VectorValue(newValues).z(); + + lemuPGA->m_counterx = 0; + lemuPGA->m_countery = 0; + + } + + else if( command==scgCmd) + { + lemuPGA->scan=3; + lemuPGA->m_xrange=scgCmd->GetNew3VectorValue(newValues).x(); + lemuPGA->sc_mean =scgCmd->GetNew3VectorValue(newValues).y(); + lemuPGA->sc_stddev=scgCmd->GetNew3VectorValue(newValues).z(); + + lemuPGA->m_counterx = 0; + lemuPGA->m_countery = 0; + G4cout<<"Scan will make 40 steps along radius and 180 steps along angle.\n sHooT :: 3600 particles to fill.\n "; + } + else if( command==reset) + { + lemuPGA->m_counterx = 0; + lemuPGA->m_countery = 0; + } + + + else if( command==setMuonium) + { + G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable(); + + if(particleTable->FindParticle(newValues)) + { + lemuPGA->pname=newValues; + } + else + { + lemuPGA->pname="mu+"; + G4cout<<"Particle " << newValues<<" not found ==>> will shoot mu+. "<ke_offset=setKEoffset->GetNewDoubleValue(newValues)*keV; + } + + else if(command == setEnergy) + { + lemuPGA->rnd=false; + G4double k=setEnergy->GetNewDoubleValue(newValues); + lemuPGA->energy=k*keV; + } + else if(command == setRndEnergy) + { + lemuPGA->rnd=true; + } + else if( command==setEGauss ) + { + lemuPGA->gauss=1; + lemuPGA->mean = setEGauss->GetNew3VectorValue(newValues).x(); + lemuPGA->stddev= setEGauss->GetNew3VectorValue(newValues).y(); + } + + + +} + diff --git a/geant4/LEMuSR/src/LEMuSRPhysicsList.cc b/geant4/LEMuSR/src/LEMuSRPhysicsList.cc new file mode 100644 index 0000000..fe48d95 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRPhysicsList.cc @@ -0,0 +1,93 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRPhysicsList.cc , v 1.1 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-08-24 16:33 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// PHYSICS LIST +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + +#include "LEMuSRPhysicsList.hh" + +#include "globals.hh" +#include "G4ParticleDefinition.hh" +#include "G4ProcessManager.hh" +#include "G4ProcessVector.hh" +#include "G4ParticleTypes.hh" +#include "G4ParticleTable.hh" + +#include "G4Material.hh" +#include "G4MaterialTable.hh" +#include "G4ios.hh" +#include + +#include "LEMuSRGeneralPhysics.hh" +#include "LEMuSREMPhysics.hh" +#include "LEMuSRMuonPhysics.hh" +#include "LEMuSRHadronPhysics.hh" +#include "LEMuSRIonPhysics.hh" + +LEMuSRPhysicsList::LEMuSRPhysicsList(): G4VModularPhysicsList() +{ + // default cut value (1.0mm) + defaultCutValue = 10.0*cm; + // SetVerboseLevel(1); + // SetCuts(); + SetCutsWithDefault(); + + SetCutValue(1*mm, "e+"); + SetCutValue(1*mm, "proton"); + + // SetCutValue(0.001*mm, "mu+"); + // SetCutValue(0.001*mm, "Mu"); + + // General Physics + RegisterPhysics( new LEMuSRGeneralPhysics("general") ); + + // EM Physics + RegisterPhysics( new LEMuSREMPhysics("standard EM")); + + // Muon Physics + RegisterPhysics( new LEMuSRMuonPhysics("muon")); + + // Hadron Physics + RegisterPhysics( new LEMuSRHadronPhysics("hadron")); + + // Ion Physics + RegisterPhysics( new LEMuSRIonPhysics("ion")); + + +} + +LEMuSRPhysicsList::~LEMuSRPhysicsList() +{ +} + +void LEMuSRPhysicsList::SetCuts() +{ + // " G4VUserPhysicsList::SetCutsWithDefault" method sets + // the default cut value for all particle types + SetCutsWithDefault(); + + SetCutValue(1.*mm, "e+"); + SetCutValue(1.*mm, "e-"); + +} + + + + diff --git a/geant4/LEMuSR/src/LEMuSRPrimaryGeneratorAction.cc b/geant4/LEMuSR/src/LEMuSRPrimaryGeneratorAction.cc new file mode 100644 index 0000000..489b9ef --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRPrimaryGeneratorAction.cc @@ -0,0 +1,354 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRPrimaryGeneratorAction.cc , v 1.3 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-09-16 09:12 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// PRIMARY GENERATOR ACTION +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + + +#include "LEMuSRPrimaryGeneratorAction.hh" +#include "LEMuSRPgaMessenger.hh" +#include "yields.h" + +// G4 LIBRARIES + +#include "G4ParticleTable.hh" +#include "G4ParticleDefinition.hh" +#include "G4UnitsTable.hh" +#include "Randomize.hh" +#include "G4Event.hh" +#include "G4ParticleGun.hh" +#include "LEMuSRParticleGun.hh" +#include "globals.hh" +#include "Randomize.hh" +#include "G4Gamma.hh" +#include "G4ThreeVector.hh" +#include "globals.hh" +#include "G4RunManager.hh" +#include "time.h" +#include "G4ios.hh" +#include + +#include "G4Muonium.hh" + + +LEMuSRPrimaryGeneratorAction::LEMuSRPrimaryGeneratorAction() +{ + + + // Instance pointer + thePGA=this; + + // Messenger + messenger = new LEMuSRPgaMessenger(this); + + // get the random number engine + theEngine = HepRandom::getTheEngine(); + + m_nbxsteps = 200; + m_nbysteps = 200; + m_counterx = 0; + m_countery = 0; + m_xrange = 2.; + m_yrange = 2.; + + lemuParticleGun = new LEMuSRParticleGun(); + lemuParticleGun->SetNumberOfParticles(1); + + X=0; Y=0; + Z=0.; + momX=0.; momY=0.; momZ=1; + + scan=0; + + rnd=false; + + energy=5*keV; + + gauss=0; mean=0; stddev=0; + + pname="mu+"; + + ke_offset=3.73*keV; +#if defined LEMU_TEST_ASYM + ke_offset=0; +#endif + charge=+1; + + //==================================TEST + /* i=j=0; + Yprint.open("test5.txt"); + if (!Yprint.is_open()) exit(8); + while(i<1000){table[i]=0; i++;} + */ + +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OO + + +LEMuSRPrimaryGeneratorAction::~LEMuSRPrimaryGeneratorAction() +{ + delete lemuParticleGun; + delete messenger; + + + //============================0000TEST + /* i=0; + do + { + // G4cout<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + // the random engine + G4RandGauss* iRndGauss = new G4RandGauss(theEngine, 20.0, 10.0); + + // the random energy + if(rnd) + { + rndenergy = iRndGauss->shoot(20.0, 0.50); + energy= rndenergy*keV;//default unit is MeV + } + + if(gauss==1) + { + rndenergy = iRndGauss->shoot(mean, stddev); + energy= rndenergy*keV;//default unit is MeV + } + +#ifdef DEBUG_LEMU_PGA + G4cout<<"Energy is "<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable(); + + G4ParticleDefinition* particle; + + particle = particleTable->FindParticle(pname); + + // std::cout<<"Particle "<< particle->GetParticleName(); + + + lemuParticleGun->SetParticleDefinition(particle); + + lemuParticleGun->SetParticleEnergy(energy+ke_offset); + + + + if(particle->GetParticleSubType()=="mu") + { + // the random time of the decay for muons + + G4double tau=0.000002197; // the muon mean lifetime + G4double rnddecaytime = - tau*log(1-G4UniformRand()); + decaytime = rnddecaytime*s; + lemuParticleGun->SetDecayTime(decaytime); + // G4cout<<"Decay Time is "<>>>>>>>>>>>>>>>>>> + + lemuParticleGun->SetParticleMomentumDirection(G4ThreeVector(momX,momY,momZ)); + lemuParticleGun->SetParticlePolarization(G4ThreeVector(1.,0.,0.)); +#if defined LEMU_TEST_ASYM + lemuParticleGun->SetParticlePosition(G4ThreeVector(0.,0.,0.)); + lemuParticleGun->SetParticlePolarization(G4ThreeVector(-1.,0.,0.)); + lemuParticleGun->SetParticleEnergy(0); +#endif + + + lemuParticleGun->GeneratePrimaryVertex(anEvent); + +} + + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OO +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OO + + + + +void LEMuSRPrimaryGeneratorAction::GetScanningMode(G4int scan) +{ + + //----------------------SINGLE SHOOTING POSITION >>>>>>>>>>>>>>>>>>>>>>>>>>>>> + if(scan==0) + { + lemuParticleGun->SetParticlePosition(G4ThreeVector(X*cm,Y*cm,Z*cm)); + } + + + + + //-------------------------SQUARE SCAN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + if(scan==1) + { + //scan: position of the gun + if(m_countery<=m_nbysteps) + { + if(m_counterx<=m_nbxsteps) + { + // total scan + X = -m_xrange+m_counterx*(2*m_xrange)/m_nbxsteps; + Y = -m_yrange+m_countery*(2*m_yrange)/m_nbysteps; + m_counterx++; + } + + if(m_counterx>m_nbxsteps) + { + m_countery++; + m_counterx=1; + } + } + + else if(m_countery>m_nbysteps) + { + m_countery=0; + m_counterx=0; + } + // SET POSITION + lemuParticleGun->SetParticlePosition(G4ThreeVector(X*cm,Y*cm,-114*cm)); + } + + + + + //----------------------CIRCULAR SCAN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + if(scan==2) + { + if(m_countery<=m_nbysteps) + { + if(m_counterx<=m_nbxsteps) + { + radius= m_xrange*(m_counterx/m_nbxsteps)*cm; + angle=2*M_PI*m_countery/(m_nbysteps)*rad; + X = radius*cos(angle); + Y = radius*sin(angle); + m_counterx++; + + } + + if(m_counterx>m_nbxsteps) + { + m_countery++; + m_counterx=1; + } + } + + else if (m_countery>m_nbysteps) + { + // X=0; + // Y=0; + m_countery=0; + m_counterx=0; + } + // SET POSITION + lemuParticleGun->SetParticlePosition(G4ThreeVector(X,Y,-114*cm)); + } + + + //----------------------CIRCULAR SCAN Gauss >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + + if(scan==3) + { + G4RandGauss* iRndGauss = new G4RandGauss(theEngine); + + + // G4cout <<"radius "<< radius/cm<shoot(sc_mean, sc_stddev)*cm; + Y = iRndGauss->shoot(sc_mean, sc_stddev)*cm; + + radius= sqrt(X*X+Y*Y); + }while(radius>2.5*cm); + // SET POSITION + lemuParticleGun->SetParticlePosition(G4ThreeVector(X,Y,-114*cm)); + } + + + +} + + + + + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OO + +LEMuSRPrimaryGeneratorAction* LEMuSRPrimaryGeneratorAction::thePGA=0; +LEMuSRPrimaryGeneratorAction* LEMuSRPrimaryGeneratorAction::GetPGA() +{ + return thePGA; +} + + + + + + + +//---------------------------------------------------------------- +//---------------------------------------------------------------- +//---------------------------------------------------------------- +//---------------------------------------------------------------- + + + /* + G4double k=G4UniformRand(); + if(k>0.5) + { + G4double gamma; + gamma = 0.5*((1.*eplus)/(0.1056584*GeV/(c_light*c_light))+(1.*eplus)/(0.51099906*MeV/(c_light*c_light))); + G4cout<< "PGA "<< k<< " " <SetGammaFactor(gamma); + } + else if(k<0.5) + { + G4double gamma; + gamma = 0.5*((1.*eplus)/(0.1056584*GeV/(c_light*c_light))-(1.*eplus)/(0.51099906*MeV/(c_light*c_light))); + G4cout<< "PGA "<< k<< " " <SetGammaFactor(gamma); + } + */ diff --git a/geant4/LEMuSR/src/LEMuSRRNDMAGField.cc b/geant4/LEMuSR/src/LEMuSRRNDMAGField.cc new file mode 100644 index 0000000..d251a02 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRRNDMAGField.cc @@ -0,0 +1,68 @@ +#include "LEMuSRRNDMAGField.hh" +#include "G4ios.hh" +#include +#include "Randomize.hh" +#include "globals.hh" +#include "G4Transform3D.hh" +#include "G4UnitsTable.hh" + + +LEMuSRRNDMAGField::LEMuSRRNDMAGField(const G4ThreeVector FieldVector, G4double rndness ) + :G4UniformMagField(FieldVector ) +{ + BField=FieldVector; + + randomness=1; + + if(rndness<=1.&&rndness>=0) + { + randomness=rndness; + G4cout <<"Mag field randomness = "<GetRunID() << " start." << G4endl; + + G4RunManager::GetRunManager()->SetRandomNumberStore(true); + + if (G4VVisManager::GetConcreteInstance()) + { + G4UImanager* UI = G4UImanager::GetUIpointer(); + UI->ApplyCommand("/vis/scene/notifyHandlers"); + } + +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + +void LEMuSRRunAction::EndOfRunAction(const G4Run*) +{ + if (G4VVisManager::GetConcreteInstance()) + { + G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update"); + } +} + +//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... + diff --git a/geant4/LEMuSR/src/LEMuSRScintHit.cc b/geant4/LEMuSR/src/LEMuSRScintHit.cc new file mode 100644 index 0000000..c37f3dd --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRScintHit.cc @@ -0,0 +1,75 @@ +#include "LEMuSRScintHit.hh" +#include "G4VVisManager.hh" +#include "G4Circle.hh" +#include "G4Colour.hh" +#include "G4VisAttributes.hh" +#include "G4ios.hh" +#include +#include + +#include "G4UnitsTable.hh" + +G4Allocator LEMuSRScintHitAllocator; + +LEMuSRScintHit::LEMuSRScintHit() +{;} + +LEMuSRScintHit::~LEMuSRScintHit() +{;} + +LEMuSRScintHit::LEMuSRScintHit(const LEMuSRScintHit &right) : G4VHit() +{ + particle_name = right.particle_name; + energy_deposition = right.energy_deposition; + time_of_flight = right.time_of_flight; + position = right.position; + momentum = right.momentum; +} + +const LEMuSRScintHit& LEMuSRScintHit::operator=(const LEMuSRScintHit &right) +{ + particle_name = right.particle_name; + energy_deposition = right.energy_deposition; + time_of_flight = right.time_of_flight; + position = right.position; + momentum = right.momentum; + return *this; +} + + + +G4int LEMuSRScintHit::operator==(const LEMuSRScintHit &right) const +{ + return (this==&right) ? 1 : 0; +} + +void LEMuSRScintHit::Draw() +{ + G4VVisManager* VisManager = G4VVisManager::GetConcreteInstance(); + if(VisManager) + { + G4Circle circle(position); + circle.SetScreenSize(0.1); + circle.SetFillStyle(G4Circle::filled); + G4Colour colour(1.,1.,1.); + G4VisAttributes attributes(colour); + circle.SetVisAttributes(attributes); + VisManager->Draw(circle); + } +} + +void LEMuSRScintHit::Print() +{} + +void LEMuSRScintHit::print(G4String name) +{ + ofstream TestPrint(name,ios::app); + if (!TestPrint.is_open()) exit(8); + TestPrint << "particle_name : " << particle_name <<" ;\n" + << "energy_deposition : " << G4BestUnit(energy_deposition,"Energy") <<" ;\n " + << "time_of_flight : " << G4BestUnit(time_of_flight,"Time") <<" ;\n " + << "position : " << position <<" ;\n " + << "momentum : " << momentum <<" ;\n " + <AddHitsCollection(HCID,ScintCollection); +} + +G4bool LEMuSRScintSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) +{ + p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name + + + if( CheckCondition(aStep)) + { + GetDatas(aStep); + getHit(); + FillRoot(); + + } + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + + // PrintAll(); + + + return true; +} + +void LEMuSRScintSD::EndOfEvent(G4HCofThisEvent*) +{ + // G4int NbHits = ScintCollection->entries(); + // G4cout << "\n-------->Hits Collection: in this event they are " << NbHits + // << " hits in the inner scintillator: " << G4endl; + // for (G4int i=0;iPrint(); + +} + +G4bool LEMuSRScintSD::CheckCondition(const G4Step* aStep) +{ + G4bool condition=false; + + if(p_name == "e+")//&&aStep->GetTrack()->GetNextVolume()->GetLogicalVolume()->GetName()!="lv_SCIS") + { + condition=true; + if( aStep->GetTrack()->GetCreatorProcess()) + { + if( aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="Decay"|| aStep->GetTrack()->GetCreatorProcess()->GetProcessName()=="DecayWithSpin") + { + condition=true; + } + } + } + + return condition; + +} + + +void LEMuSRScintSD::clear() +{ + delete ScintCollection; +} + +void LEMuSRScintSD::DrawAll() +{ +} + +void LEMuSRScintSD::PrintAll() +{ + // Define Hit + +// G4cout << "PROCESS HIT"<SetParticleName(p_name); + aHit->SetSpin(spin); + + aHit->SetMomentum( hitmom ); + aHit->SetPosition( hitpos ); + + aHit->SetTimeOfFlight( tof); + aHit->SetEnergyDeposition( edep ); + + + // ScintCollection->insert( aHit ); + // aHit->Print(); + // aHit->print("Statistics/SCIS.Hits"); + // aHit->Draw(); + + +} + + +void LEMuSRScintSD::GetDatas(const G4Step *aStep) +{ + // Get datas + //a Volume, name, spin + vname = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName(); + spin= aStep->GetTrack()->GetDefinition()->GetPDGSpin(); // spin in units of 1 + + //b Position momentum + hitpos = aStep->GetTrack()->GetPosition(); // position + hitmom = aStep->GetTrack()->GetMomentumDirection(); // momentum + hitvertex = aStep->GetTrack()->GetVertexPosition();// creation position + //c Times + tof = aStep->GetTrack()->GetLocalTime(); // time since track creation + globaltime = aStep->GetTrack()->GetGlobalTime();// time since event creation + proptime = aStep->GetTrack()->GetProperTime(); // particle's proper time + + //d Energy + edep = aStep->GetTotalEnergyDeposit(); + + toten = aStep->GetTrack()->GetTotalEnergy(); + + kinen = aStep->GetTrack()->GetKineticEnergy(); + + //e Scint scintID + + + //f runID + runID=G4RunManager::GetRunManager()->GetCurrentRun()->GetRunID(); + + //g parent charge: 0 for muonium and 1 for muon + +} + + +void LEMuSRScintSD::getHit() +{ + theHit.kenergy = kinen; + theHit.tenergy = toten; + theHit.edeposit = edep; + theHit.localtime = tof; + theHit.globaltime = globaltime; + theHit.proptime = proptime; + theHit.positionx = hitpos.x(); + theHit.positiony = hitpos.y(); + theHit.positionz = hitpos.z(); + theHit.momdirx = hitmom.x(); + theHit.momdiry = hitmom.y(); + theHit.momdirz = hitmom.z(); + theHit.ipositionx = hitvertex.x(); + theHit.ipositiony = hitvertex.y(); + theHit.ipositionz = hitvertex.z(); + theHit.runID = runID; + theHit.motherCharge = runID; + + theHit.scLeft = 0; + theHit.scBottom =0 ; + theHit.scRight =0; + theHit.scTop = 0; + + if (vname=="pv_SCISl") + { + theHit.scLeft = 1; + } + else if (vname=="pv_SCISb") + { + theHit.scBottom =1 ; + } + else if (vname=="pv_SCISr") + { + theHit.scRight =1; + } + else if (vname=="pv_SCISt") + { + theHit.scTop = 1; + } + + + + } + +// ROOT METHODS + +void LEMuSRScintSD::BookRoot() +{ + // open root file + myFile = new TFile("SDInnerScint.root", "RECREATE"); + // myFile->SetCompressionLevel(1); + + tree = new TTree ("tree","Inner Scintillator Datas"); + + tree->Branch("positron",&theHit.kenergy,"kenergy/F:tenergy/F:edeposit/F:localtime/F:globaltime:propertime/F:positionx/F:positiony:positionz:momentumx:momentumy:momentumz/F:initx/F:inity/F:initz/F:Left/F:Right/F:Bottom/F:Top/F:runID/I:parentCharge/F"); + +} + +void LEMuSRScintSD::FillRoot() +{ + tree->Fill(); +} + +void LEMuSRScintSD::WriteRoot() +{ + myFile->Write(); + myFile->Close(); +} diff --git a/geant4/LEMuSR/src/LEMuSRStackingAction.cc b/geant4/LEMuSR/src/LEMuSRStackingAction.cc new file mode 100644 index 0000000..6ccf69a --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRStackingAction.cc @@ -0,0 +1,94 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION +// ID : LEMuSRStackingAction.cc , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-07-07 11:15 +// +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// STACKING ACTION.CC +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + + + + + + + +#include "LEMuSRStackingAction.hh" +#include "G4SDManager.hh" +#include "G4RunManager.hh" +#include "G4Event.hh" +#include "G4HCofThisEvent.hh" +#include "G4Track.hh" +#include "G4TrackStatus.hh" +#include "G4ParticleDefinition.hh" +#include "G4ParticleTypes.hh" +#include "LEMuSRStackingActionMessenger.hh" +#include "G4ios.hh" + +LEMuSRStackingAction::LEMuSRStackingAction() + :ScintHits(0), stage(0) +{ + theMessenger = new LEMuSRStackingActionMessenger(this); +} + +LEMuSRStackingAction::~LEMuSRStackingAction() +{ + delete theMessenger; + } + + + +G4ClassificationOfNewTrack +LEMuSRStackingAction::ClassifyNewTrack(const G4Track *) +{ + G4ClassificationOfNewTrack classification; + classification = fUrgent; + return classification; +} + + +G4VHitsCollection* LEMuSRStackingAction::GetCollection(G4String colName) +{ + G4SDManager* SDMan = G4SDManager::GetSDMpointer(); + G4RunManager* runMan = G4RunManager::GetRunManager(); + int colID = SDMan->GetCollectionID(colName); + if(colID>=0) + { + const G4Event* currentEvent = runMan->GetCurrentEvent(); + G4HCofThisEvent* HCE = currentEvent->GetHCofThisEvent(); + return HCE->GetHC(colID); + } + return 0; +} + + + +void LEMuSRStackingAction::NewStage() +{ + +} + + + +void LEMuSRStackingAction::PrepareNewEvent() +{ + stage = 0; + ScintHits = 0; +} + + diff --git a/geant4/LEMuSR/src/LEMuSRStackingActionMessenger.cc b/geant4/LEMuSR/src/LEMuSRStackingActionMessenger.cc new file mode 100644 index 0000000..87fc68e --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRStackingActionMessenger.cc @@ -0,0 +1,27 @@ +#include "LEMuSRStackingActionMessenger.hh" +#include "LEMuSRStackingAction.hh" +#include "G4UIcmdWithAnInteger.hh" +#include "G4UIcmdWithADoubleAndUnit.hh" +#include "G4ios.hh" + +LEMuSRStackingActionMessenger::LEMuSRStackingActionMessenger(LEMuSRStackingAction * msa) +:myAction(msa) +{ + ; +} + +LEMuSRStackingActionMessenger::~LEMuSRStackingActionMessenger() +{ + ; +} + +void LEMuSRStackingActionMessenger::SetNewValue(G4UIcommand *,G4String) +{ + ; +} + +G4String LEMuSRStackingActionMessenger::GetCurrentValue(G4UIcommand *) +{ + ; +} + diff --git a/geant4/LEMuSR/src/LEMuSRSteppingAction.cc b/geant4/LEMuSR/src/LEMuSRSteppingAction.cc new file mode 100644 index 0000000..5bb0873 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRSteppingAction.cc @@ -0,0 +1,268 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION +// ID : LEMuSRSteppingAction.cc , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-07-07 11:15 +// +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// STEPPING ACTION.CC +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + + +#include "LEMuSRSteppingAction.hh" +#include "G4SteppingManager.hh" +#include "G4Transform3D.hh" +#include "G4DynamicParticle.hh" +#include "G4ParticleDefinition.hh" +#include "G4ProcessManager.hh" +#include "LEMuSRDecay.hh" +#include "G4VVisManager.hh" +#include "G4Polyline.hh" +#include "G4VisAttributes.hh" +#include "G4Colour.hh" + + +LEMuSRSteppingAction::LEMuSRSteppingAction() +{ +pointer=this ; + loop=0; +} + + +LEMuSRSteppingAction::~LEMuSRSteppingAction() +{ + ; +} + +LEMuSRSteppingAction* LEMuSRSteppingAction::pointer=0; +LEMuSRSteppingAction* LEMuSRSteppingAction::GetInstance() +{ + return pointer; +} + + + +void LEMuSRSteppingAction::UserSteppingAction(const G4Step* aStep) + +{ + LoopKiller(aStep); + + G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance(); + G4String p_name; + p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name + if (pVVisManager) { + //----- Define a line segment + G4Polyline polyline; + G4Colour colour; + if (p_name == "mu+") colour = G4Colour(1., 0., 0.); + else if (p_name == "Mu" ) colour = G4Colour(0., 0., 1.); + else if (p_name == "e+" ) colour = G4Colour(1., 1., 0.); + else colour = G4Colour(1., 0., 1.); + G4VisAttributes attribs(colour); + polyline.SetVisAttributes(attribs); + polyline.push_back(aStep->GetPreStepPoint()->GetPosition()); + polyline.push_back(aStep->GetPostStepPoint()->GetPosition()); + + //----- Call a drawing method for G4Polyline + pVVisManager -> Draw(polyline); + + } +} + + + +void LEMuSRSteppingAction::LoopKiller(const G4Step *aStep) +{ + // loop killa + if(aStep->GetTrack()->GetCurrentStepNumber()>2500) + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + G4cout<<"killed "<GetTrack()->GetDefinition()->GetParticleName()=="e-" + ||aStep->GetTrack()->GetDefinition()->GetParticleName()=="gamma" + ||aStep->GetTrack()->GetDefinition()->GetParticleName()=="nu_e" + ||aStep->GetTrack()->GetDefinition()->GetParticleName()=="anti_nu_e" + ||aStep->GetTrack()->GetDefinition()->GetParticleName()=="nu_mu" + ||aStep->GetTrack()->GetDefinition()->GetParticleName()=="anti_nu_mu") + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + } + + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +//-------------------------------------------------------------------------------- +//-------------------------------------------------------------------------------- + + + + + +void LEMuSRSteppingAction:: FieldInfo(const G4Step *aStep) +{ + + G4String p_name; + p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name + G4String v_name = aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetName(); + + if( aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager()) + { + + G4cout << "Field Manager...OK: \n" + << "particle name : " << p_name <<" ;\n " + << "volume name : " << v_name <<" ;\n " + << "position : " << aStep->GetPostStepPoint()->GetPosition() <<" ;\n " + << "kenergy : " << aStep->GetTrack()->GetKineticEnergy()<<" ;\n " + << "momentum direction: " << aStep->GetPostStepPoint()->GetMomentumDirection() <<" ;\n " + << "polarization : " << aStep->GetPostStepPoint()->GetPolarization() <<" ;\n " + << "time : " << aStep->GetPostStepPoint()->GetGlobalTime() <<" ;\n " ; + // field datas + // G4cout << "Field Step : " << aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager()->GetDeltaOneStep() <<" ;\n " ; + double point[4]; + point[0]= aStep->GetPostStepPoint()->GetPosition().x()/mm/100; + point[1]= aStep->GetPostStepPoint()->GetPosition().y()/mm/100; + point[2]= aStep->GetPostStepPoint()->GetPosition().z()/mm/100 + 5.67; + double field[6]; + aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetFieldManager()->GetDetectorField()->GetFieldValue(point,field); + G4cout <<"pOSITION : "<< point[0] <<" "<GetTrack()->GetDefinition()->GetParticleName(); // particle name + G4String v_name = aStep->GetTrack()->GetVolume()->GetLogicalVolume()->GetName(); + + // Get datas + //a + if(aStep->GetTrack()->GetDefinition()) + { + p_name = aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetParticleName(); // particle name + + // if(p_name == "mu+") + // { + G4String nv_name; + G4String v_name = aStep->GetTrack()->GetVolume()->GetName(); // particle name + if(v_name!="pv_World") + { + nv_name = aStep->GetTrack()->GetNextVolume()->GetName(); // particle name + } + else if(v_name=="pv_World") + { + nv_name=v_name; + } + + G4double spin= aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetPDGSpin(); // spin in units of 1 + //b + G4ThreeVector position = aStep->GetPostStepPoint()->GetPosition(); // position + G4ThreeVector momentum = aStep->GetPostStepPoint()->GetMomentum(); // momentum + //c + G4double tof = aStep->GetTrack()->GetLocalTime(); // time since track creation + G4double globaltime = aStep->GetTrack()->GetGlobalTime();// time since the event in which the track belongs is created. + G4double proptime = aStep->GetTrack()->GetProperTime(); // proper time of the particle + //d + G4double edep = aStep->GetTotalEnergyDeposit(); + + // Print Datas + + if( aStep->GetTrack()->GetCreatorProcess()) + { + G4cout << "NOT PRIMARY PARTICLE : created by : " << aStep->GetTrack()->GetCreatorProcess()->GetProcessName() <<" ;\n "; + // G4cout << "Parent particles are : " << aStep->GetTrack()->GetCreatorProcess()->GetProcessName() <<" ;\n "; + + } + + G4cout << "particle name : " << p_name <<" ;\n " + << "volume name : " << v_name <<" ;\n " + << "next volume name : " << nv_name <<" ;\n " + << "spin : " << spin <<" ;\n " + << "current energy : " << aStep->GetTrack()->GetDynamicParticle()->GetKineticEnergy()/keV <<" keV;\n " + << "energy_deposition : " << G4BestUnit(edep,"Energy") <<" ;\n " + << "time_of_flight : " << G4BestUnit(tof,"Time") <<" ; " << G4BestUnit(globaltime,"Time")<<" ; " << G4BestUnit(proptime,"Time") <<" ;\n " + << "position : " << position <<" ;\n " + << "momentum : " << momentum <<" ;\n " + << "polarization : " << aStep->GetTrack()->GetDynamicParticle()->GetPolarization() <<" ;\n " ; + if(aStep->GetPostStepPoint()->GetProcessDefinedStep()){ + G4cout << "process : " << aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() <<"\n" + <GetDynamicParticle(); + *theParticle = particle; +} diff --git a/geant4/LEMuSR/src/LEMuSRTrackingAction.cc b/geant4/LEMuSR/src/LEMuSRTrackingAction.cc new file mode 100644 index 0000000..4972c1d --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRTrackingAction.cc @@ -0,0 +1,42 @@ +#include"LEMuSRTrackingAction.hh" +#include"G4VProcess.hh" +#include"G4PrimaryParticle.hh" +#include"G4UnitsTable.hh" +#include"LEMuSRMuonDecayChannel.hh" + + +LEMuSRTrackingAction ::LEMuSRTrackingAction() +{ + + + +;} + +LEMuSRTrackingAction:: ~LEMuSRTrackingAction() +{ + +} + + +void LEMuSRTrackingAction::PreUserTrackingAction(const G4Track* theTrack) +{ + + +} + + + +void LEMuSRTrackingAction::Collect_datas(const G4Track* theTrack) +{ + + +} + + + + +void LEMuSRTrackingAction::PostUserTrackingAction(const G4Track*) +{ + ; +} + diff --git a/geant4/LEMuSR/src/LEMuSRVisManager.cc b/geant4/LEMuSR/src/LEMuSRVisManager.cc new file mode 100644 index 0000000..2d20e59 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRVisManager.cc @@ -0,0 +1,113 @@ + +#ifdef G4VIS_USE + +#include "LEMuSRVisManager.hh" + +// Supported drivers... + +// Not needing external packages or libraries... +#include "G4ASCIITree.hh" +#include "G4DAWNFILE.hh" +#include "G4GAGTree.hh" +#include "G4HepRepFile.hh" +#include "G4HepRep.hh" +#include "G4RayTracer.hh" +#include "G4VRML1File.hh" +#include "G4VRML2File.hh" + +// Needing external packages or libraries... + +#ifdef G4VIS_USE_DAWN +#include "G4FukuiRenderer.hh" +#endif + +#ifdef G4VIS_USE_OPENGLX +#include "G4OpenGLImmediateX.hh" +#include "G4OpenGLStoredX.hh" +#endif + +#ifdef G4VIS_USE_OPENGLWIN32 +#include "G4OpenGLImmediateWin32.hh" +#include "G4OpenGLStoredWin32.hh" +#endif + +#ifdef G4VIS_USE_OPENGLXM +#include "G4OpenGLImmediateXm.hh" +#include "G4OpenGLStoredXm.hh" +#endif + +#ifdef G4VIS_USE_OIX +#include "G4OpenInventorX.hh" +#endif + +#ifdef G4VIS_USE_OIWIN32 +#include "G4OpenInventorWin32.hh" +#endif + +#ifdef G4VIS_USE_VRML +#include "G4VRML1.hh" +#include "G4VRML2.hh" +#endif + + + +LEMuSRVisManager::LEMuSRVisManager () {;} + +LEMuSRVisManager::~LEMuSRVisManager () {;} + +void LEMuSRVisManager::RegisterGraphicsSystems () { + + // Graphics Systems not needing external packages or libraries... + RegisterGraphicsSystem (new G4ASCIITree); + RegisterGraphicsSystem (new G4DAWNFILE); + RegisterGraphicsSystem (new G4GAGTree); + RegisterGraphicsSystem (new G4HepRepFile); + RegisterGraphicsSystem (new G4HepRep); + RegisterGraphicsSystem (new G4RayTracer); + RegisterGraphicsSystem (new G4VRML1File); + RegisterGraphicsSystem (new G4VRML2File); + + // Graphics systems needing external packages or libraries... + +#ifdef G4VIS_USE_DAWN + RegisterGraphicsSystem (new G4FukuiRenderer); +#endif + +#ifdef G4VIS_USE_OPENGLX + RegisterGraphicsSystem (new G4OpenGLImmediateX); + RegisterGraphicsSystem (new G4OpenGLStoredX); +#endif + +#ifdef G4VIS_USE_OPENGLWIN32 + RegisterGraphicsSystem (new G4OpenGLImmediateWin32); + RegisterGraphicsSystem (new G4OpenGLStoredWin32); +#endif + +#ifdef G4VIS_USE_OPENGLXM + RegisterGraphicsSystem (new G4OpenGLImmediateXm); + RegisterGraphicsSystem (new G4OpenGLStoredXm); +#endif + +#ifdef G4VIS_USE_OIX + RegisterGraphicsSystem (new G4OpenInventorX); +#endif + +#ifdef G4VIS_USE_OIWIN32 + RegisterGraphicsSystem (new G4OpenInventorWin32); +#endif + +#ifdef G4VIS_USE_VRML + RegisterGraphicsSystem (new G4VRML1); + RegisterGraphicsSystem (new G4VRML2); +#endif + + if (fVerbose > 0) { + G4cout << + "\nYou have successfully chosen to use the following graphics systems." + << G4endl; + PrintAvailableGraphicsSystems (); + } +} + +#endif + diff --git a/geant4/LEMuSR/src/LEMuSRdummydets.cc b/geant4/LEMuSR/src/LEMuSRdummydets.cc new file mode 100644 index 0000000..a3a38c6 --- /dev/null +++ b/geant4/LEMuSR/src/LEMuSRdummydets.cc @@ -0,0 +1,225 @@ +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID : LEMuSRDetectorConstruction.cc , v 1.0 +// AUTHOR: Taofiq PARAISO +// DATE : 2004-06-24 16:33 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// DETECTOR CONSTRUCTION +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + +// G4 GEOMETRIC FORMS CLASSES + +#include "G4Tubs.hh" +#include "G4Box.hh" +#include "G4Trap.hh" +#include "G4Cons.hh" +#include "G4Sphere.hh" +#include "G4SubtractionSolid.hh" +#include "G4UnitsTable.hh" + +// G4 VOLUME DEFINITION CLASSES +#include "G4LogicalVolume.hh" +#include "G4VPhysicalVolume.hh" +#include "G4PVReplica.hh" +#include "G4PVPlacement.hh" +#include "G4GeometryManager.hh" +#include "G4FieldManager.hh" +#include "G4PropagatorInField.hh" +#include "LEMuSRMag_SpinEqRhs.hh" +#include "G4Mag_SpinEqRhs.hh" +#include "G4ChordFinder.hh" +#include "G4El_UsualEqRhs.hh" +#include "G4ClassicalRK4.hh" +#include "G4SimpleHeum.hh" +#include "G4SimpleRunge.hh" +#include "G4MagIntegratorStepper.hh" +#include "G4TransportationManager.hh" +#include "G4GeometryManager.hh" +#include "G4UnitsTable.hh" +//#include "G4RotationMatrix.hh" + +// G4 CLASSES +#include "G4ios.hh" +#include + + +// HEADER +#include "LEMuSRDetectorConstruction.hh" +#include "LEMuSRDetectorMessenger.hh" + + +// process remove +#include "G4ParticleTable.hh" +#include "G4ParticleDefinition.hh" +#include "G4ParticleChange.hh" +#include "G4ProcessVector.hh" +#include "G4ProcessManager.hh" +#include "G4VProcess.hh" + +// electric fieldmap +#include "LEMuSRElectricField.hh" +#include "LEMuSRElFieldMix.hh" +#include "G4ElectricField.hh" +#include "G4ElectroMagneticField.hh" +#include "G4EqMagElectricField.hh" + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + + + +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE ASYMETRY DUMMY DETECTORS +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// + +void LEMuSRDetectorConstruction::lemuAsym() +{ + + + // solids + Asym_tube = new G4Tubs("sAsym",0.*cm,1*cm,0.0000001*cm, dSPhi, dEPhi); + + G4Sphere *Asym_sphl = new G4Sphere("sphAsymL",25*cm,25.001*cm,0.*deg,360*deg,90*deg,90*deg); + G4Sphere *Asym_sphr = new G4Sphere("sphAsymR",25*cm,25.001*cm,0.*deg,360*deg,0*deg,90*deg); + + // logical volumes + lv_Asym = new G4LogicalVolume(Asym_tube,G4Material::GetMaterial("vacuum"),"lv_Asym",0,0,0); + + lv_AsymL = new G4LogicalVolume(Asym_sphl,G4Material::GetMaterial("vacuum"),"lv_AsymL",0,0,0); + lv_AsymR = new G4LogicalVolume(Asym_sphr,G4Material::GetMaterial("vacuum"),"lv_AsymR",0,0,0); + + // G4Translate3D trl =G4ThreeVector(+50.*cm,0.*cm,0.*cm); //uncomment + Asym_rotation = G4RotateY3D(90*deg); + + // G4Transform3D asymt3d= trl;//*Asym_rotation;//uncomment + // pv_Asym = new G4PVPlacement( asymt3d,lv_Asym,"pv_Asym1",lv_LABO, false, 0 );//uncomment + + // G4Translate3D trl2 =G4ThreeVector(-50.*cm,0.*cm,0.*cm);//uncomment + + // G4Transform3D asymt3d2= trl2*Asym_rotation;//uncomment + //pv_Asym2 = new G4PVPlacement( asymt3d2,lv_Asym,"pv_Asym2",lv_LABO, false, 0 );//uncomment + + pv_AsymL = new G4PVPlacement(Asym_rotation ,lv_AsymL,"pv_AsymL",lv_LABO, false, 0 ); + pv_AsymR = new G4PVPlacement(Asym_rotation ,lv_AsymR,"pv_AsymR",lv_LABO, false, 0 ); + + //visual attibutes + // lv_Asym->SetVisAttributes(VTBB_style); + + lv_AsymL->SetVisAttributes(Green_style); + lv_AsymR->SetVisAttributes(dRed_style); + + +} + + +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// DEFINE THE ELECTRIC FIELD DUMMY DETECTORS +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +void LEMuSRDetectorConstruction::lemuFieldCheck() +{ + + // solids + fchk_tube = new G4Tubs("tube_fchk", 0., 6*cm, 0.001*mm, dSPhi, dEPhi); + + lv_fchk = new G4LogicalVolume(fchk_tube,G4Material::GetMaterial("vacuum"),"lv_fchk",0 ,0 ,0 ); + lv_fchk2 = new G4LogicalVolume(fchk_tube,G4Material::GetMaterial("vacuum"),"lv_fchk",0 ,0 ,0 ); + lv_fchk3 = new G4LogicalVolume(fchk_tube,G4Material::GetMaterial("vacuum"),"lv_fchk",0 ,0 ,0 ); + + + pv_fchk = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,0*cm),lv_fchk,"pv_f0",lv_L3VA, false, 0 ); + pv_fchk1 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-22*cm),lv_fchk,"pv_f1",lv_L3VA, false, 0 ); + /* pv_fchk2 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -21*cm),lv_fchk,"pv_f2",lv_L3VA, false, 0 ); + pv_fchk3 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -20*cm),lv_fchk,"pv_f3",lv_L3VA, false, 0 ); + pv_fchk4 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -19*cm),lv_fchk,"pv_f4",lv_L3VA, false, 0 ); + pv_fchk5 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -18*cm),lv_fchk,"pv_f5",lv_L3VA, false, 0 ); + pv_fchk6 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -17*cm),lv_fchk,"pv_f6",lv_L3VA, false, 0 ); + pv_fchk7 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -16*cm),lv_fchk,"pv_f7",lv_L3VA, false, 0 ); + pv_fchk8 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -15*cm),lv_fchk,"pv_f8",lv_L3VA, false, 0 ); + pv_fchk9 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -14*cm),lv_fchk,"pv_f9",lv_L3VA, false, 0 ); + pv_fchk10 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -13*cm),lv_fchk,"pv_f10",lv_L3VA, false, 0 ); + pv_fchk11 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -12*cm),lv_fchk,"pv_f11",lv_L3VA, false, 0 ); + pv_fchk12 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -11*cm),lv_fchk,"pv_f12",lv_L3VA, false, 0 ); + pv_fchk13 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -10*cm),lv_fchk,"pv_f13",lv_L3VA, false, 0 ); + pv_fchk14 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -9*cm),lv_fchk,"pv_f14",lv_L3VA, false, 0 ); + pv_fchk15 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -8*cm),lv_fchk,"pv_f15",lv_L3VA, false, 0 ); + pv_fchk16 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -7*cm),lv_fchk,"pv_f16",lv_L3VA, false, 0 ); + pv_fchk17 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -6*cm),lv_fchk,"pv_f17",lv_L3VA, false, 0 ); + pv_fchk18 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -5*cm),lv_fchk,"pv_f18",lv_L3VA, false, 0 ); + pv_fchk19 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -4*cm),lv_fchk,"pv_f19",lv_L3VA, false, 0 ); + pv_fchk20 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -3*cm),lv_fchk,"pv_f20",lv_L3VA, false, 0 ); + pv_fchk21 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -2*cm),lv_fchk,"pv_f21",lv_L3VA, false, 0 ); + pv_fchk22 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -1*cm),lv_fchk,"pv_f22",lv_L3VA, false, 0 ); + pv_fchk23 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +1*cm),lv_fchk,"pv_f23",lv_L3VA, false, 0 ); + pv_fchk24 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +2*cm),lv_fchk,"pv_f24",lv_L3VA, false, 0 ); + pv_fchk25 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +3*cm),lv_fchk,"pv_f25",lv_L3VA, false, 0 ); + pv_fchk26 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +4*cm),lv_fchk,"pv_f26",lv_L3VA, false, 0 ); + pv_fchk27 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +5*cm),lv_fchk,"pv_f27",lv_L3VA, false, 0 ); + pv_fchk28 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +6*cm),lv_fchk,"pv_f28",lv_L3VA, false, 0 ); + pv_fchk29 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +7*cm),lv_fchk,"pv_f29",lv_L3VA, false, 0 ); + pv_fchk30 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +8*cm),lv_fchk,"pv_f30",lv_L3VA, false, 0 ); + pv_fchk31 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +9*cm),lv_fchk,"pv_f31",lv_L3VA, false, 0 ); + pv_fchk32 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +10*cm),lv_fchk,"pv_f32",lv_L3VA, false, 0 ); + pv_fchk33 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +11*cm),lv_fchk,"pv_f33",lv_L3VA, false, 0 ); + pv_fchk34 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +12*cm),lv_fchk,"pv_f34",lv_L3VA, false, 0 ); + pv_fchk35 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +13*cm),lv_fchk,"pv_f35",lv_L3VA, false, 0 ); + pv_fchk36 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +14*cm),lv_fchk,"pv_f36",lv_L3VA, false, 0 ); + pv_fchk37 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +15*cm),lv_fchk,"pv_f37",lv_L3VA, false, 0 ); + pv_fchk38 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +16*cm),lv_fchk,"pv_f38",lv_L3VA, false, 0 ); + pv_fchk39 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +17*cm),lv_fchk,"pv_f39",lv_L3VA, false, 0 ); + pv_fchk40 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +18*cm),lv_fchk,"pv_f40",lv_L3VA, false, 0 ); + pv_fchk41 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +19*cm),lv_fchk,"pv_f41",lv_L3VA, false, 0 ); + pv_fchk42 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +20*cm),lv_fchk,"pv_f42",lv_L3VA, false, 0 ); + pv_fchk43 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +21*cm),lv_fchk,"pv_f43",lv_L3VA, false, 0 ); */ + pv_fchk44 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, +21.5*cm),lv_fchk,"pv_f44",lv_L3VA, false, 0 ); + +#ifndef LEMU_TEST_FOCAL_LENGTH + // use another lv_fchk because belong to another mother volume + pv_fchk45 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(-8-25.45)*cm),lv_fchk2,"pv_f45",lv_RAV, false, 0 ); + pv_fchk46 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(-7-25.45)*cm),lv_fchk2,"pv_f46",lv_RAV, false, 0 ); + pv_fchk47 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(-5-25.45)*cm),lv_fchk2,"pv_f47",lv_RAV, false, 0 ); + pv_fchk48 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(-2.5-25.45)*cm),lv_fchk2,"pv_f48",lv_RAV, false, 0 ); + pv_fchk49 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(0-25.45)*cm),lv_fchk2,"pv_f49",lv_RAV, false, 0 ); + pv_fchk50 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(2.5-25.45)*cm),lv_fchk2,"pv_f50",lv_RAV, false, 0 ); + pv_fchk51 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(5-25.45)*cm),lv_fchk2,"pv_f51",lv_RAV, false, 0 ); + pv_fchk52 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(7-25.45)*cm),lv_fchk2,"pv_f52",lv_RAV, false, 0 ); + pv_fchk53 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,(9-25.45)*cm),lv_fchk2,"pv_f53",lv_RAV, false, 0 ); + + + + + // use another lv_fchk because belong to another mother volume + pv_fchk54 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-16*cm),lv_fchk3,"pv_f54",lv_MCPV, false, 0 ); + pv_fchk55 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-15*cm),lv_fchk3,"pv_f55",lv_MCPV, false, 0 ); + pv_fchk56 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-14*cm),lv_fchk3,"pv_f56",lv_MCPV, false, 0 ); + pv_fchk57 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-13*cm),lv_fchk3,"pv_f57",lv_MCPV, false, 0 ); + pv_fchk58 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-12*cm),lv_fchk3,"pv_f58",lv_MCPV, false, 0 ); + pv_fchk59 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-11*cm),lv_fchk3,"pv_f59",lv_MCPV, false, 0 ); + pv_fchk60 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-10*cm),lv_fchk3,"pv_f60",lv_MCPV, false, 0 ); + pv_fchk61 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-9*cm),lv_fchk3,"pv_f61",lv_MCPV, false, 0 ); + pv_fchk62 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm, -8*cm),lv_fchk3,"pv_f62",lv_MCPV, false, 0 ); + + pv_fchk64 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-7*cm),lv_fchk3,"pv_f64",lv_MCPV, false, 0 ); + pv_fchk65 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-6*cm),lv_fchk3,"pv_f65",lv_MCPV, false, 0 ); + pv_fchk66 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-5*cm),lv_fchk3,"pv_f66",lv_MCPV, false, 0 ); + pv_fchk67 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-4*cm),lv_fchk3,"pv_f67",lv_MCPV, false, 0 ); + pv_fchk68 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-3*cm),lv_fchk3,"pv_f68",lv_MCPV, false, 0 ); + pv_fchk69 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,-2*cm),lv_fchk3,"pv_f69",lv_MCPV, false, 0 ); + pv_fchk70 = new G4PVPlacement( 0,G4ThreeVector(0.*cm,0.*cm,+1.75*cm),lv_fchk3,"pv_f70",lv_MCPV, false, 0 ); + +#endif + + +} diff --git a/geant4/LEMuSR/src/PhysicsList.cc b/geant4/LEMuSR/src/PhysicsList.cc new file mode 100644 index 0000000..164ba64 --- /dev/null +++ b/geant4/LEMuSR/src/PhysicsList.cc @@ -0,0 +1,103 @@ +#include "PhysicsList.hh" + +#include "globals.hh" +#include "G4ParticleDefinition.hh" +#include "G4ParticleTypes.hh" +#include "G4ParticleTable.hh" + +#include "G4Material.hh" +#include "G4MaterialTable.hh" + +#include "G4ProcessManager.hh" +#include "G4ProcessVector.hh" + +#include "G4DecayTable.hh" + +#include "G4MuonDecayChannelWithSpin.hh" + +PhysicsList::PhysicsList() +{} + +PhysicsList::~PhysicsList() +{} + +void PhysicsList::ConstructParticle() +{ + G4Electron::ElectronDefinition(); + G4Positron::PositronDefinition(); + G4NeutrinoE::NeutrinoEDefinition(); + G4AntiNeutrinoE::AntiNeutrinoEDefinition(); + G4MuonPlus::MuonPlusDefinition(); + G4MuonMinus::MuonMinusDefinition(); + G4NeutrinoMu::NeutrinoMuDefinition(); + G4AntiNeutrinoMu::AntiNeutrinoMuDefinition(); + + G4DecayTable* MuonPlusDecayTable = new G4DecayTable(); + MuonPlusDecayTable -> Insert(new G4MuonDecayChannelWithSpin("mu+",1.00)); + G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(MuonPlusDecayTable); + + G4DecayTable* MuonMinusDecayTable = new G4DecayTable(); + MuonMinusDecayTable -> Insert(new G4MuonDecayChannelWithSpin("mu-",1.00)); + G4MuonMinus::MuonMinusDefinition() -> SetDecayTable(MuonMinusDecayTable); + +} + +void PhysicsList::ConstructProcess() +{ + // Define transportation process + + AddTransportation(); + + theDecayProcess = new G4DecayWithSpin(); + + G4ProcessManager* pManager; + theParticleIterator->reset(); + while( (*theParticleIterator)() ){ + G4ParticleDefinition* particle = theParticleIterator->value(); + pManager = particle->GetProcessManager(); + + if (theDecayProcess->IsApplicable(*particle)) { + pManager->AddProcess(theDecayProcess); + pManager ->SetProcessOrderingToLast(theDecayProcess, idxAtRest); + } + } + + theMuPlusIonisation = new G4MuIonisation(); + theMuPlusMultipleScattering = new G4MultipleScattering(); + theMuPlusBremsstrahlung=new G4MuBremsstrahlung(); + theMuPlusPairProduction= new G4MuPairProduction(); + + theMuMinusIonisation = new G4MuIonisation(); + theMuMinusMultipleScattering = new G4MultipleScattering; + theMuMinusBremsstrahlung = new G4MuBremsstrahlung(); + theMuMinusPairProduction = new G4MuPairProduction(); + + // Muon Plus Physics + pManager = G4MuonPlus::MuonPlus()->GetProcessManager(); + pManager->AddProcess(theMuPlusMultipleScattering,-1, 1, 1); + pManager->AddProcess(theMuPlusIonisation, -1, 2, 2); + pManager->AddProcess(theMuPlusBremsstrahlung, -1, 3, 3); + pManager->AddProcess(theMuPlusPairProduction, -1, 4, 4); + + // Muon Minus Physics + pManager = G4MuonMinus::MuonMinus()->GetProcessManager(); + pManager->AddProcess(theMuMinusMultipleScattering,-1, 1, 1); + pManager->AddProcess(theMuMinusIonisation, -1, 2, 2); + pManager->AddProcess(theMuMinusBremsstrahlung, -1, 3, 3); + pManager->AddProcess(theMuMinusPairProduction, -1, 4, 4); + +} + +void PhysicsList::SetCuts() +{ + // suppress error messages even in case e/gamma/proton do not exist + G4int temp = GetVerboseLevel(); + SetVerboseLevel(0); + + // " G4VUserPhysicsList::SetCutsWithDefault" method sets + // the default cut value for all particle types + SetCutsWithDefault(); + + // Retrieve verbose level + SetVerboseLevel(temp); +} diff --git a/geant4/LEMuSR/src/TDCheck.cc b/geant4/LEMuSR/src/TDCheck.cc new file mode 100644 index 0000000..9156f4e --- /dev/null +++ b/geant4/LEMuSR/src/TDCheck.cc @@ -0,0 +1,256 @@ +///§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§//* +// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION +// +// ID :TDCheck.cc , v 1.2 +// AUTHOR: Taofiq PARAISO +// DATE : 2005-03-01 10:07 +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +// +// & &&&&&&&&&& &&&&&&& &&&&&&&& +// & & && && & && +// & & & & & & && +// & &&&&&&& & & &&&&&& &&&&&&&& +// & & & && & & && +// & & && & & && && & & +// &&&&&&&&&& &&&&&&&&&& & &&&&& && &&&&&&& & && +// & +// & +// & +// & +// TDCHECK +//§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§// +#include "TDCheck.hh" + +#include "G4SteppingManager.hh" +#include "G4Transform3D.hh" +#include "G4DynamicParticle.hh" +#include "G4UnitsTable.hh" + + +#include "LEMuSRDetectorConstruction.hh" +#include "LEMuSRPrimaryGeneratorAction.hh" + + +TDCheck::TDCheck() +{ + + BookRoot(); + muon.thickness=0; + pointer=this ; + loop=0; + oldz=0; + thk_old=0; + id=0; + old_id=0; + loop=0; +} + + +TDCheck::~TDCheck() +{ + WriteRoot(); +} + +TDCheck* TDCheck::pointer=0; +TDCheck* TDCheck::GetInstance() +{ + return pointer; +} + + +void TDCheck::UserSteppingAction(const G4Step* aStep) + +{ + + if( aStep->GetPreStepPoint()&& aStep->GetPreStepPoint()->GetPhysicalVolume() ) + { + SetParticleVolumeNames(aStep); + + if(CheckCondition(aStep)) + { + // Get datas + SetPositionMomentum(aStep); + SetTimeEnergy(aStep); + Update(); + FillRoot(); +#if defined G4UI_USE_ROOT + myFile->Write(); +#endif + } + + + LoopKiller(aStep); + + } + +} + + +G4bool TDCheck::CheckCondition(const G4Step* ) +{ + G4bool condition=false; + + if(v_name=="lv_CFOIL" ) + { + if(p_name=="Mu" || p_name == "mu+") + { + condition=true; + } + } + + if(v_name=="lv_SAH2" ) + { + if(p_name=="Mu" || p_name == "mu+") + { + condition=true; + } + } + + return condition; + +} + + +void TDCheck::LoopKiller(const G4Step *aStep) +{ + // loop killa + if(aStep->GetStepLength()<0.1*mm) + { + loop++; + if(loop>20) + { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + loop=0; + } + } + + // kill useless particles + if(aStep->GetTrack()->GetDefinition()->GetParticleName()=="e-" + ||aStep->GetTrack()->GetDefinition()->GetParticleName()=="gamma") + { + // if(aStep->GetTrack()->GetKineticEnergy()<10.*eV) + // { + aStep->GetTrack()->SetTrackStatus(fStopAndKill); + // } + } + +} + + + + +void TDCheck::SetParticleVolumeNames(const G4Step* aStep) +{ + // NAMES + p_name = aStep->GetTrack()->GetDefinition()->GetParticleName(); // particle name + v_name = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName(); + pv_name = aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName(); +} + + +void TDCheck::SetPositionMomentum(const G4Step* aStep) +{ + // POSITION, MOMENTUM + position = aStep->GetPreStepPoint()->GetPosition(); // position + momentum = aStep->GetPostStepPoint()->GetMomentumDirection(); // momentum + momentum_direction = aStep->GetPreStepPoint()->GetMomentumDirection(); // momentum + +} + + +void TDCheck::SetTimeEnergy(const G4Step* aStep) +{ + + // ENERGY + kenergy= aStep->GetTrack()->GetDynamicParticle()->GetKineticEnergy(); // position + + tenergy= aStep->GetTrack()->GetDynamicParticle()->GetTotalEnergy(); // position + + // TIME + localtime = (aStep->GetPreStepPoint()->GetLocalTime()+ aStep->GetPreStepPoint()->GetLocalTime())/2.; // time since track creation + globaltime = aStep->GetPreStepPoint()->GetGlobalTime();// time since event creation + proptime = aStep->GetPreStepPoint()->GetProperTime(); // proper time of the particle + time = proptime; + +} + +void TDCheck::Update() +{ + muon.localtime = localtime/ns ; + muon.globaltime= globaltime/ns ; + muon.proptime = proptime/ns ; + + muon.positionx = LEMuSRPrimaryGeneratorAction::GetPGA()->X/cm; // position.x()/cm; + muon.positiony = LEMuSRPrimaryGeneratorAction::GetPGA()->Y/cm; //position.y()/cm; + muon.positionz = position.z()/cm; + + muon.momdirx= LEMuSRPrimaryGeneratorAction::GetPGA()->angle/rad;//momentum_direction.x(); + muon.momdiry= LEMuSRPrimaryGeneratorAction::GetPGA()->radius/cm; //momentum_direction.y(); + muon.momdirz= momentum_direction.z(); + + muon.tenergy = kenergy/keV; + muon.thickness = LEMuSRDetectorConstruction::GetInstance()->cfthk; + + muon.angle=0; + + + muon.index=0; + muon.ienergy= LEMuSRPrimaryGeneratorAction::GetPGA()->energy/keV; + + muon.angle=acos(momentum.z())*180/M_PI; + + ///////////////// + /* + G4cout << "particle name : " << p_name <<" ;\n " + << "position : " << position <<" ;\n " + << "momentum direction: " <GetCurrentRun()->GetRunID()!=old_id) + { + id=id+1; + old_id= G4RunManager::GetRunManager()->GetCurrentRun()->GetRunID(); + } + + if( LEMuSRDetectorConstruction::GetInstance()->cfthk!=thk_old) + { + id=0; + thk_old=LEMuSRDetectorConstruction::GetInstance()->cfthk; + } + muon.id = G4RunManager::GetRunManager()->GetCurrentRun()->GetRunID(); + + if(p_name=="Mu") muon.charge=0; + else if(p_name=="mu+") muon.charge=1; + + +} + + +//--------------------------------------------------------------------------------// +// ROOT + +void TDCheck::BookRoot() +{ + myFile = new TFile("gfoil.root", "RECREATE"); + + tree = new TTree ("tree","Muons parameters"); + + tree->Branch("muon",&muon.ienergy,"Init_Energy/F:kenergy/F:localtime/F:globaltime:propertime/F:positionx/F:positiony:positionz:init_angle:init_radius:momdirz:Angle/F:Plane/I:foil_thickness/F:runID/I:Charge/I"); + +} + + +void TDCheck::FillRoot() +{ + tree->Fill(); +} + +void TDCheck::WriteRoot() +{ + myFile->Write(); + myFile->Close(); + +} diff --git a/geant4/LEMuSR/src/meyer.cc b/geant4/LEMuSR/src/meyer.cc new file mode 100644 index 0000000..bf29433 --- /dev/null +++ b/geant4/LEMuSR/src/meyer.cc @@ -0,0 +1,1013 @@ +/* + fIRST IMPLEMENTATION BY ANLSEM,H. IN FORTRAN + C++ CONVERSION T.K.PARAISO 04-2005 + + !!! IMPORTANT !!! + + Notice: + Tables definition changes between FORTRAN and C++: + 1/ Fortran indices start at 1 and C++ indices start at 0 + 2/ Tables are defined as table[column][row] in Fortran + table[row][column] in c++ + + usefull reference + http://gershwin.ens.fr/vdaniel/Doc-Locale/Langages-Program-Scientific/Fortran/Tutorial/arrays.htm + +*/ + +#include "meyer.h" +#include +#include +#include +#include +#include +using namespace std; + + +meyer::meyer() +{;} + +meyer::~meyer() +{;} + + +void meyer::GFunctions(double* g1,double* g2, double tau) + +{ + + //Diese Routine gibt in Abhaengigkeit von der reduzierten Dicke 'tau' + //Funktionswerte fuer g1 und g2 zurueck. g1 und g2 sind dabei die von + //Meyer angegebenen tabellierten Funktionen fuer die Berechnung von Halbwerts- + //breiten von Streuwinkelverteilungen. (L.Meyer, phys.stat.sol. (b) 44, 253 + //(1971)) + + + double help; + + int i; + + + double tau_[] = {0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, + 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 9.0, + 10.0, 12.0, 14.0, 16.0, 18.0, 20.0 }; + + double g1_[] = {0.050,0.115,0.183,0.245,0.305,0.363,0.419,0.473,0.525,0.575, + 0.689,0.799,0.905,1.010,1.100,1.190,1.370,1.540,1.700,1.850, + 1.990,2.270,2.540,2.800,3.050,3.290 }; + + double g2_[] = {0.00,1.25,0.91,0.79,0.73,0.69,0.65,0.63,0.61,0.59, + 0.56,0.53,0.50,0.47,0.45,0.43,0.40,0.37,0.34,0.32, + 0.30,0.26,0.22,0.18,0.15,0.13 }; + + + if (tau kann ich nicht ... => STOP"< Tabelle A + thetaSchlangeMax = 4.0; + } + else if (tau<=8.) + { + //! => Tabelle B + thetaSchlangeMax = 7.0; + } + else if (tau<=20.) + { + //! => Tabelle C + thetaSchlangeMax = 20.0; + } + else + { + std::cout<< "Subroutine ''Get_F_Function_Meyer'':"< kann ich nicht ... => STOP"<50.) + { + thetaStep = .5; + } + + else if (thetaMax>25) + { + thetaStep = .25; + } + else if (thetaMax>12.5) + { + thetaStep = .125; + } + else + { + thetaStep = .0625; + } + + + //Tabelle der F-Werte erstellen: + + nBin = 0; + std::cout<<"thetamax = "<nBinMax) + { + std::cout<< "nBin > nBinMax => EXIT"; + break; + } + + value[nBin] = sin(theta)*F; + + fValues[nBin+1] = F; // ! fuer Testzwecke + fValuesFolded[nBin+1] = sin(theta/180*M_PI)*F;// ! fuer Testzwecke + + + }// end of do loop + + + //Berechnen der Flaecheninhalte der einzelnen Kanaele sowie der Integrale: + + bigtheta:for( i = 1;i<= nBin; i++) + { + area[i] = (value[i]+value[i-1])/2.* thetaStep; + integ[i] = integ[i-1] + area[i]; + } + + + //Normiere totale Flaeche auf 1: + + rHelp = integ[nBin]; + for( i = 1; i<=nBin; i++) + { + value[i] = value[i] / rHelp; + area[i] = area[i] / rHelp; + integ[i] = integ[i] / rHelp; + } + + + //vorerst noch: gib Tabelle in Datei und Histogrammfile aus: + + //! Berechne die Werte fuer theta=0: + + F_Functions_Meyer(tau,0.,&f1,&f2); + F = Meyer_faktor4*Meyer_faktor4 * Ekin*Ekin /2 /M_PI * (f1 - Meyer_faktor3*f2);// TAO, Anselm was: Meyer_faktor5 * Ekin*Ekin * (f1 - Meyer_faktor3*f2); + fValues[1] = F; + fValuesFolded[1] = 0.; + + //! Gib die Werte in das Tabellenfile aus: + + /* ofstream Mprint("testmeyer.out"); + theta = thetaStep; + if (!Mprint.is_open()) exit(8); + for( i = 1; i<=nBin+1;i++) + { + Mprint << theta<< " "<< fValues[i]/fValues[1]<<" " << fValuesFolded[i]< Reihe mit hoeherem Index + //iColumn = 2 => Reihe mit kleinerem Index + + + iColumn = 1; + + // 5 continue; + do{ + + if (column_<=8) + { + //! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //! Werte aus 1. Tabelle: 0.2 <= tau <= 1.8 + + column = column_; + // std::cout<<"thetaSchlange = "< +#include +#include +#include + +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Die Funktion sowie die Parameter sind uebernommen aus: + + M.Gonin, R.Kallenbach, P.Bochsler: 'Charge exchange of hydrogen atoms + in carbon foils at 0.4 - 120 keV', Rev.Sci.Instrum. 65 (3), March 1994 + + +fIRST IMPLEMENTATION BY ANLSEM,H. IN FORTRAN +C++ CONVERSION T.K.PARAISO 04-2005 +c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +Yields::Yields(){;} +Yields::~Yields(){;} + +void Yields::GetYields( + double E, // kinetische Energie in keV + double masse,// in keV / c**2 + double yvector[3])// pointer to yields table +{ + + // YIELDS FUNCTIONS PRAMETERS + double a_zero,a_minus; + double k_Fermi,k_zero,k_minus; + double zwo_k_Fermi; + double k_Fermi_Quad,k_zero_Quad,k_minus_Quad; + double vc_minus,vc_plus,v_Bohr,v_rel; + + + // YIELDS FUNCTIONS PARAMETERs VALUES + a_zero = 0.953 ; + a_minus = 0.029 ; + k_Fermi = 1.178 ;// ! [v_Bohr] + k_Fermi_Quad = k_Fermi * k_Fermi ; + zwo_k_Fermi = 2. * k_Fermi ; + k_zero = 0.991*k_Fermi ; //! [v_Bohr] + k_zero_Quad = k_zero * k_zero ; + k_minus = 0.989*k_Fermi ; // [v_Bohr] + k_minus_Quad = k_minus * k_minus ; + vc_minus = 0.284 ; + vc_plus = 0.193 ; // [v_Bohr] + v_Bohr = 7.2974E-3 ; // [c] + + + + // std::cout<< "E = "<< E < ABORT!"< exp(-vc_minus/v_rel)) Yield_minus=exp(-vc_minus/v_rel); + if(Yield_plus > exp(-vc_plus/v_rel)) Yield_plus=exp(-vc_plus/v_rel); + + Yield_zero = 1. - (Yield_minus + Yield_plus); + + yvector[0]=Yield_plus; + yvector[1]=Yield_zero; + yvector[2]=Yield_minus; + + // std::cout<<"Y+ : " << Yield_plus << std::endl; + // std::cout<<"Y0 : " << Yield_zero << std::endl; + + + +} + diff --git a/geant4/LEMuSR/stepping.sh b/geant4/LEMuSR/stepping.sh new file mode 100644 index 0000000..0d3b33a --- /dev/null +++ b/geant4/LEMuSR/stepping.sh @@ -0,0 +1,11 @@ +export ASYM_USE_LEMU=1 + +unset LEMU_TEST_CFOIL +unset LEMU_TEST_FIELD +unset LEMU_TEST_FOCAL_LENGTH +unset LEMU_TEST_ASYM + + +rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRPrimaryGeneratorAction.* diff --git a/geant4/LEMuSR/td.sh b/geant4/LEMuSR/td.sh new file mode 100644 index 0000000..7283dcb --- /dev/null +++ b/geant4/LEMuSR/td.sh @@ -0,0 +1,11 @@ +export ASYM_USE_LEMU=1 + +export LEMU_TEST_CFOIL=1 +unset LEMU_TEST_FIELD +unset LEMU_TEST_FOCAL_LENGTH +unset LEMU_TEST_ASYM + + +rm ~/geant4/tmp/Linux-g++/LEMuSR/exe/* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRDetectorConstruction.* +rm ~/geant4/tmp/Linux-g++/LEMuSR/LEMuSRPrimaryGeneratorAction.*