This commit is contained in:
Janka Gianluca 2023-02-07 16:18:40 +01:00
commit 41e82f44cf
29 changed files with 61 additions and 3407 deletions

39
.gitignore vendored Normal file
View File

@ -0,0 +1,39 @@
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
# Build Folder
build/
# Latex compilation
*.aux
*.log

Binary file not shown.

View File

@ -1,5 +1,5 @@
\documentclass[twoside]{dis04} \documentclass[twoside]{dis04}
\usepackage{epsfig} %\usepackage{epsfig}
%\def\runauthor{Kamil Sedl\'{a}k} %\def\runauthor{Kamil Sedl\'{a}k}
\def\runauthor{PSI} \def\runauthor{PSI}
% for the H1 collaboration} % for the H1 collaboration}
@ -1260,6 +1260,8 @@ The list of variables that can be stored in the Root tree:
If the track ID is negative, there were more than just one track contributing to this hit. The absolute value If the track ID is negative, there were more than just one track contributing to this hit. The absolute value
of det\_VrtxTrackID[det\_n] corresponds to the first (in time) track. of det\_VrtxTrackID[det\_n] corresponds to the first (in time) track.
\item{\bf det\_VrtxParticleID[det\_n]} (array of Int\_t) -- particle ID of the first particle that belongs to the given hit. \item{\bf det\_VrtxParticleID[det\_n]} (array of Int\_t) -- particle ID of the first particle that belongs to the given hit.
(Some relevant particle IDs: Muon+=-13, Muon-=+13, Electron=11, Positron=-11,
Gamma=22, Proton=2212, Neutron=2112, Pion-=-211, Pion+=211.)
\item{\bf det\_Vvv*****[det\_n]} -- similar to the variables det\_Vrtx*****[det\_n] above, but if the first particle \item{\bf det\_Vvv*****[det\_n]} -- similar to the variables det\_Vrtx*****[det\_n] above, but if the first particle
belonging to the hit was created inside of the logical volume where the hit occurs, then it's track is followed belonging to the hit was created inside of the logical volume where the hit occurs, then it's track is followed
to its mother track (even several times) until the track (particle) is found that has been created outside the to its mother track (even several times) until the track (particle) is found that has been created outside the
@ -1300,6 +1302,8 @@ The list of variables that can be stored in the Root tree:
the given ``save'' volume. Save volumes can therefore be made of vacuum. the given ``save'' volume. Save volumes can therefore be made of vacuum.
\item{\bf save\_detID[save\_n]} (array of Int\_t) -- ID number of the save volume. \item{\bf save\_detID[save\_n]} (array of Int\_t) -- ID number of the save volume.
\item{\bf save\_particleID[save\_n]} (array of Int\_t) -- particle ID of the particle that entered the save volume. \item{\bf save\_particleID[save\_n]} (array of Int\_t) -- particle ID of the particle that entered the save volume.
(Some relevant particle IDs: Muon+=-13, Muon-=+13, Electron=11, Positron=-11,
Gamma=22, Proton=2212, Neutron=2112, Pion-=-211, Pion+=211.)
\item{\bf save\_time[save\_n]} (array of Double\_t) -- time when the particle entered in the volume (in $\mu$s). \item{\bf save\_time[save\_n]} (array of Double\_t) -- time when the particle entered in the volume (in $\mu$s).
\item{\bf save\_x[save\_n], save\_y[save\_n], save\_z[save\_n]} (array of Double\_t) -- position of the particle where it \item{\bf save\_x[save\_n], save\_y[save\_n], save\_z[save\_n]} (array of Double\_t) -- position of the particle where it
entered the save volume (``GetPreStepPoint()'') (in mm). entered the save volume (``GetPreStepPoint()'') (in mm).
@ -1379,10 +1383,10 @@ One of the easiest example to illustrate the basic features of the musrSim (and/
shoot electrons into a scintillator block, and to observe the energy deposited inside it. shoot electrons into a scintillator block, and to observe the energy deposited inside it.
Figure~\ref{vis101} Figure~\ref{vis101}
% %
\begin{figure}[tb]\centering \begin{figure}[htb]\centering
\epsfig{file=pict/vis_101_a.eps,width=8cm,%\linewidth,% \includegraphics[width=8cm]{pict/vis_101_a.pdf}
%bbllx=83pt,bblly=330pt,bburx=538pt,bbury=513pt, %\epsfig{file=pict/vis_101_a.eps,width=8cm}
clip=} %\linewidth,%%bbllx=83pt,bblly=330pt,bburx=538pt,bbury=513pt,clip=}
\caption{A simple simulation of an electron passing through two \caption{A simple simulation of an electron passing through two
scintillator tiles.} scintillator tiles.}
\label{vis101} \label{vis101}
@ -1487,9 +1491,9 @@ where some of the elements present in the simulation (beampipe, magnet, aluminiu
for simplicity. for simplicity.
The most important parameters of the simulation are summarised in table~\ref{dimensions}. The most important parameters of the simulation are summarised in table~\ref{dimensions}.
% %
\begin{figure}[tbp]\centering \begin{figure}[htbp]\centering
\epsfig{file=pict/vis_201_1.eps,width=0.5\linewidth,% \includegraphics[width=0.5\linewidth]{pict/vis_201_1.pdf}
bbllx=70pt,bblly=270pt,bburx=455pt,bbury=640pt,clip=} % \epsfig{file=pict/vis_201_1.eps,width=0.5\linewidth,bbllx=70pt,bblly=270pt,bburx=455pt,bbury=640pt,clip=}
\caption{3D view at the GPD detector system (run 201). Blue colour indicates the positron counters, \caption{3D view at the GPD detector system (run 201). Blue colour indicates the positron counters,
magenta stands for collimators, red is the muon counter. GPD magnet, some Aluminium U-profiles and beampipe magenta stands for collimators, red is the muon counter. GPD magnet, some Aluminium U-profiles and beampipe
are not shown in the plot, however they are included in the simulation.} are not shown in the plot, however they are included in the simulation.}
@ -1497,25 +1501,25 @@ are not shown in the plot, however they are included in the simulation.}
\end{figure} \end{figure}
% %
% %
\begin{figure}[tbp]\centering \begin{figure}[htbp]\centering
\epsfig{file=pict/vis_201_2.eps,width=0.8\linewidth,% \includegraphics[width=0.7\linewidth]{pict/vis_201_2.pdf}
bbllx=90pt,bblly=310pt,bburx=450pt,bbury=525pt,clip=} % \epsfig{file=pict/vis_201_2.eps,width=0.8\linewidth,bbllx=90pt,bblly=310pt,bburx=450pt,bbury=525pt,clip=}
\caption{Side view of the GPD detector.} \caption{Side view of the GPD detector.}
\label{fig:vis_201_2} \label{fig:vis_201_2}
\end{figure} \end{figure}
% %
% %
\begin{figure}[tbp]\centering \begin{figure}[htbp]\centering
\epsfig{file=pict/vis_201_3.eps,width=0.4\linewidth,% \includegraphics[width=0.4\linewidth]{pict/vis_201_3.pdf}
bbllx=210pt,bblly=320pt,bburx=380pt,bbury=525pt,clip=} % \epsfig{file=pict/vis_201_3.eps,width=0.4\linewidth,bbllx=210pt,bblly=320pt,bburx=380pt,bbury=525pt,clip=}
\caption{Front view of the GPD detector.} \caption{Front view of the GPD detector.}
\label{fig:vis_201_3} \label{fig:vis_201_3}
\end{figure} \end{figure}
% %
% %
\begin{figure}[tbp]\centering \begin{figure}[htbp]\centering
\epsfig{file=pict/vis_201_4.eps,width=0.9\linewidth,% \includegraphics[width=0.8\linewidth]{pict/vis_201_4.pdf}
bbllx=70pt,bblly=309pt,bburx=485pt,bbury=513pt,clip=} % \epsfig{file=pict/vis_201_4.eps,width=0.9\linewidth,bbllx=70pt,bblly=309pt,bburx=485pt,bbury=513pt,clip=}
\caption{Top view of the GPD detector.} \caption{Top view of the GPD detector.}
\label{fig:vis_201_4} \label{fig:vis_201_4}
\end{figure} \end{figure}
@ -1588,7 +1592,7 @@ and typically can be found in subdirectories of the high field project:
/afs/psi.ch/project/HighFieldMuSR/. /afs/psi.ch/project/HighFieldMuSR/.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage %\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

BIN
doc/pict/vis_101_a.pdf Normal file

Binary file not shown.

BIN
doc/pict/vis_101_b.pdf Normal file

Binary file not shown.

BIN
doc/pict/vis_201_1.pdf Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
doc/pict/vis_201_2.pdf Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

BIN
doc/pict/vis_201_3.pdf Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
doc/pict/vis_201_4.pdf Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -1,3 +0,0 @@
latex musrSim.tex
dvips -o musrSim.ps musrSim.dvi
dvipdf musrSim.dvi

View File

@ -1,315 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# GPS Mark-II template
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
#
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
#
#=============================
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
# Inner ring rotations - 8 segments, 0 deg tilt
/musr/command rotation matlti1 0 1 0 -45
/musr/command rotation matlti2 0 1 0 0
/musr/command rotation matlti3 0 1 0 45
/musr/command rotation matlti4 0 1 0 90
/musr/command rotation matlti5 0 1 0 135
/musr/command rotation matlti6 0 1 0 180
/musr/command rotation matlti7 0 1 0 225
/musr/command rotation matlti8 0 1 0 270
# Outer ring rotations - 10 segments, 0 deg tilt
/musr/command rotation matlto1 0 1 0 -45
/musr/command rotation matlto2 0 1 0 -9
/musr/command rotation matlto3 0 1 0 27
/musr/command rotation matlto4 0 1 0 63
/musr/command rotation matlto5 0 1 0 99
/musr/command rotation matlto6 0 1 0 135
/musr/command rotation matlto7 0 1 0 171
/musr/command rotation matlto8 0 1 0 -153
/musr/command rotation matlto9 0 1 0 -117
/musr/command rotation matlto10 0 1 0 -81
#
#=============================
# WORLD VOLUME
#
/musr/command construct box World 30 30 30 G4_Galactic 0 0 0 no_logical_volume norot dead -1
#
#############Remove here to test in GPS#####################
#/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
#/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
#
#=============================
# SECOND COLLIMATOR
#
#/musr/command construct tubs shield_collimA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
#
#=============================
# OLD ALC DESIGN: MSR 20.05.083 Flange
#
#/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
#
##############End of Removed to test in GPS################
#=============================
# POSITRON COUNTERS FORWARD BACKWARD UP DOWN RIGHT LEFT
#
#/musr/command construct GPSbackward forwardCounter 25 25 2.5 9.1 11.9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
#/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
#/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0 log_World norot musr/ScintSD 3
#/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0 log_World norot musr/ScintSD 4
#/musr/command construct box right1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
#/musr/command construct box right2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
#/musr/command construct box right3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
#/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
#/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
# FORWARD VETO
#/musr/command construct GPSbackwardVeto forwVetoA 9. 11.8 9. 11.8 2.5 6.25 6.7 6.25 6.7 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoB 11.8 18.9 11.8 18.9 15 6.7 13.8 6.7 13.8 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44.0 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 18.9 18.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 61.5 log_World norot musr/ScintSD 51
# BACKWARD VETO
#/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#=============================
# Pixel detectors
#
# /musr/command construct box name_of_pixel xlen ylen zlen G4_SI_SC xcoor ycoor zcoor log_World rot_mat musr/ScintSD 5??
# Inner set of pixel detectors
/musr/command construct box pixeli1 10 10 0.025 G4_Si 0.0 0.0 -10.0 log_World norot musr/ScintSD 501
/musr/command construct box pixeli2 10 10 0.025 G4_Si 0.0 0.0 10.0 log_World norot musr/ScintSD 502
/musr/command construct box pixeli3 10 0.025 10 G4_Si 0.0 -10.0 0.0 log_World norot musr/ScintSD 503
/musr/command construct box pixeli4 10 0.025 10 G4_Si 0.0 10.0 0.0 log_World norot musr/ScintSD 504
# Outer set of pixel detectors
/musr/command construct box pixelo1 20 20 0.025 G4_Si 0.0 0.0 -20.0 log_World norot musr/ScintSD 601
/musr/command construct box pixelo2 20 20 0.025 G4_Si 0.0 0.0 20.0 log_World norot musr/ScintSD 602
/musr/command construct box pixelo3 20 0.025 20 G4_Si 0.0 -20.0 0.0 log_World norot musr/ScintSD 603
/musr/command construct box pixelo4 20 0.025 20 G4_Si 0.0 20.0 0.0 log_World norot musr/ScintSD 604
#
#=============================
# OUTER SHIELD
#/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
#/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
#/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
#/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
#/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
#/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
#/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
#/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
#/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#=============================
#
#=============================
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#=============================
#
#=============================
# TARGET
/musr/command construct tubs target 0 10.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs saveTarget 0 10.0 0.1 0 360 G4_Galactic 0 0 0 log_World norot dead 253
#/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#=============================
#
#=============================
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE invisible
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
/musr/command visattributes G4_Ag red
/musr/command visattributes log_World invisible
/musr/command visattributes log_target red
/musr/command visattributes G4_Si blue
#
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 3DBOpera GPS_WEP_xyz_Sym_2_from_000_cgs.table log_targetFieldVol 0.005
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.300
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
/musr/command globalfield printFieldValueAtPoint 0 0 4
/musr/command globalfield printFieldValueAtPoint 0 0 8
/musr/command globalfield printFieldValueAtPoint 0 0 12
/musr/command globalfield printFieldValueAtPoint 0 0 16
/musr/command globalfield printFieldValueAtPoint 0 0 20
/musr/command globalfield printFieldValueAtPoint 4 0 0
/musr/command globalfield printFieldValueAtPoint 0 4 0
/musr/command globalfield printFieldValueAtPoint 80 80 200
#
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 1000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_time_end off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
#
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
#/vis/disable
/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
#
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
#
/gun/vertex 0 0 -29 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#####################
/gun/vertexsigma 0 0 0 mm
#/gun/vertexsigma 0.5 0.5 0 mm
#####################
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#####################
/gun/momentum 27.0 MeV
#####################
# sigma = 3% ==> sigma 27*0.03 = 0.81
/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
#######################/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
#/gun/muonPolarizVector 0.173648 0. -0.98480775
/gun/muonPolarizVector 0. 0. -1.0
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
#
#
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#
#/run/beamOn 3000000
#/run/beamOn 100000
/run/beamOn 100

View File

@ -1,315 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# GPS Mark-II template
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
#
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
#
#=============================
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
# Inner ring rotations - 8 segments, 0 deg tilt
/musr/command rotation matlti1 0 1 0 -45
/musr/command rotation matlti2 0 1 0 0
/musr/command rotation matlti3 0 1 0 45
/musr/command rotation matlti4 0 1 0 90
/musr/command rotation matlti5 0 1 0 135
/musr/command rotation matlti6 0 1 0 180
/musr/command rotation matlti7 0 1 0 225
/musr/command rotation matlti8 0 1 0 270
# Outer ring rotations - 10 segments, 0 deg tilt
/musr/command rotation matlto1 0 1 0 -45
/musr/command rotation matlto2 0 1 0 -9
/musr/command rotation matlto3 0 1 0 27
/musr/command rotation matlto4 0 1 0 63
/musr/command rotation matlto5 0 1 0 99
/musr/command rotation matlto6 0 1 0 135
/musr/command rotation matlto7 0 1 0 171
/musr/command rotation matlto8 0 1 0 -153
/musr/command rotation matlto9 0 1 0 -117
/musr/command rotation matlto10 0 1 0 -81
#
#=============================
# WORLD VOLUME
#
/musr/command construct box World 30 30 30 G4_Galactic 0 0 0 no_logical_volume norot dead -1
#
#############Remove here to test in GPS#####################
#/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
#/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
#
#=============================
# SECOND COLLIMATOR
#
#/musr/command construct tubs shield_collimA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
#
#=============================
# OLD ALC DESIGN: MSR 20.05.083 Flange
#
#/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
#
##############End of Removed to test in GPS################
#=============================
# POSITRON COUNTERS FORWARD BACKWARD UP DOWN RIGHT LEFT
#
#/musr/command construct GPSbackward forwardCounter 25 25 2.5 9.1 11.9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
#/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
#/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0 log_World norot musr/ScintSD 3
#/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0 log_World norot musr/ScintSD 4
#/musr/command construct box right1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
#/musr/command construct box right2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
#/musr/command construct box right3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
#/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
#/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
# FORWARD VETO
#/musr/command construct GPSbackwardVeto forwVetoA 9. 11.8 9. 11.8 2.5 6.25 6.7 6.25 6.7 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoB 11.8 18.9 11.8 18.9 15 6.7 13.8 6.7 13.8 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44.0 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 18.9 18.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 61.5 log_World norot musr/ScintSD 51
# BACKWARD VETO
#/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#=============================
# Pixel detectors
#
# /musr/command construct box name_of_pixel xlen ylen zlen G4_SI_SC xcoor ycoor zcoor log_World rot_mat musr/ScintSD 5??
# Inner set of pixel detectors
/musr/command construct box pixeli1 10 10 0.025 G4_Si 0.0 0.0 -10.0 log_World norot musr/ScintSD 501
/musr/command construct box pixeli2 10 10 0.025 G4_Si 0.0 0.0 10.0 log_World norot musr/ScintSD 502
/musr/command construct box pixeli3 10 0.025 10 G4_Si 0.0 -10.0 0.0 log_World norot musr/ScintSD 503
/musr/command construct box pixeli4 10 0.025 10 G4_Si 0.0 10.0 0.0 log_World norot musr/ScintSD 504
# Outer set of pixel detectors
/musr/command construct box pixelo1 20 20 0.025 G4_Si 0.0 0.0 -20.0 log_World norot musr/ScintSD 601
/musr/command construct box pixelo2 20 20 0.025 G4_Si 0.0 0.0 20.0 log_World norot musr/ScintSD 602
/musr/command construct box pixelo3 20 0.025 20 G4_Si 0.0 -20.0 0.0 log_World norot musr/ScintSD 603
/musr/command construct box pixelo4 20 0.025 20 G4_Si 0.0 20.0 0.0 log_World norot musr/ScintSD 604
#
#=============================
# OUTER SHIELD
#/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
#/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
#/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
#/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
#/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
#/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
#/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
#/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
#/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#=============================
#
#=============================
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#=============================
#
#=============================
# TARGET
/musr/command construct tubs target 0 10.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs saveTarget 0 10.0 0.01 0 360 G4_Galactic 0 0 -0.5 log_World norot dead 253
#/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#=============================
#
#=============================
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE invisible
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
/musr/command visattributes G4_Ag red
/musr/command visattributes log_World invisible
/musr/command visattributes log_target red
/musr/command visattributes G4_Si blue
#
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 3DBOpera GPS_WEP_xyz_Sym_2_from_000_cgs.table log_targetFieldVol 0.005
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.300
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
/musr/command globalfield printFieldValueAtPoint 0 0 4
/musr/command globalfield printFieldValueAtPoint 0 0 8
/musr/command globalfield printFieldValueAtPoint 0 0 12
/musr/command globalfield printFieldValueAtPoint 0 0 16
/musr/command globalfield printFieldValueAtPoint 0 0 20
/musr/command globalfield printFieldValueAtPoint 4 0 0
/musr/command globalfield printFieldValueAtPoint 0 4 0
/musr/command globalfield printFieldValueAtPoint 80 80 200
#
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 1000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_time_end off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
#
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
#/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
#
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
#
/gun/vertex 0 0 -29 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#####################
/gun/vertexsigma 0 0 0 mm
#/gun/vertexsigma 0.5 0.5 0 mm
#####################
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#####################
/gun/momentum 27.0 MeV
#####################
# sigma = 3% ==> sigma 27*0.03 = 0.81
/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
#######################/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
#/gun/muonPolarizVector 0.173648 0. -0.98480775
/gun/muonPolarizVector 0. 0. -1.0
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
#
#
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#
#/run/beamOn 3000000
#/run/beamOn 100000
/run/beamOn 10000

View File

@ -1,315 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# GPS Mark-II template
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
#
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
#
#=============================
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
# Inner ring rotations - 8 segments, 0 deg tilt
/musr/command rotation matlti1 0 1 0 -45
/musr/command rotation matlti2 0 1 0 0
/musr/command rotation matlti3 0 1 0 45
/musr/command rotation matlti4 0 1 0 90
/musr/command rotation matlti5 0 1 0 135
/musr/command rotation matlti6 0 1 0 180
/musr/command rotation matlti7 0 1 0 225
/musr/command rotation matlti8 0 1 0 270
# Outer ring rotations - 10 segments, 0 deg tilt
/musr/command rotation matlto1 0 1 0 -45
/musr/command rotation matlto2 0 1 0 -9
/musr/command rotation matlto3 0 1 0 27
/musr/command rotation matlto4 0 1 0 63
/musr/command rotation matlto5 0 1 0 99
/musr/command rotation matlto6 0 1 0 135
/musr/command rotation matlto7 0 1 0 171
/musr/command rotation matlto8 0 1 0 -153
/musr/command rotation matlto9 0 1 0 -117
/musr/command rotation matlto10 0 1 0 -81
#
#=============================
# WORLD VOLUME
#
/musr/command construct box World 30 30 30 G4_Galactic 0 0 0 no_logical_volume norot dead -1
#
#############Remove here to test in GPS#####################
#/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
#/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
#
#=============================
# SECOND COLLIMATOR
#
#/musr/command construct tubs shield_collimA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
#
#=============================
# OLD ALC DESIGN: MSR 20.05.083 Flange
#
#/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
#
##############End of Removed to test in GPS################
#=============================
# POSITRON COUNTERS FORWARD BACKWARD UP DOWN RIGHT LEFT
#
#/musr/command construct GPSbackward forwardCounter 25 25 2.5 9.1 11.9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
#/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
#/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0 log_World norot musr/ScintSD 3
#/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0 log_World norot musr/ScintSD 4
#/musr/command construct box right1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
#/musr/command construct box right2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
#/musr/command construct box right3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
#/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
#/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
# FORWARD VETO
#/musr/command construct GPSbackwardVeto forwVetoA 9. 11.8 9. 11.8 2.5 6.25 6.7 6.25 6.7 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoB 11.8 18.9 11.8 18.9 15 6.7 13.8 6.7 13.8 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44.0 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 18.9 18.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 61.5 log_World norot musr/ScintSD 51
# BACKWARD VETO
#/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#=============================
# Pixel detectors
#
# /musr/command construct box name_of_pixel xlen ylen zlen G4_SI_SC xcoor ycoor zcoor log_World rot_mat musr/ScintSD 5??
# Inner set of pixel detectors
/musr/command construct box pixeli1 10 10 0.025 G4_Si 0.0 0.0 -10.0 log_World norot musr/ScintSD 501
/musr/command construct box pixeli2 10 10 0.025 G4_Si 0.0 0.0 10.0 log_World norot musr/ScintSD 502
/musr/command construct box pixeli3 0.025 10 10 G4_Si -10.0 0.0 0.0 log_World norot musr/ScintSD 503
/musr/command construct box pixeli4 0.025 10 10 G4_Si 10.0 0.0 0.0 log_World norot musr/ScintSD 504
# Outer set of pixel detectors
/musr/command construct box pixelo1 20 20 0.025 G4_Si 0.0 0.0 -20.0 log_World norot musr/ScintSD 601
/musr/command construct box pixelo2 20 20 0.025 G4_Si 0.0 0.0 20.0 log_World norot musr/ScintSD 602
/musr/command construct box pixelo3 0.025 20 20 G4_Si -20.0 0.0 0.0 log_World norot musr/ScintSD 603
/musr/command construct box pixelo4 0.025 20 20 G4_Si 20.0 0.0 0.0 log_World norot musr/ScintSD 604
#
#=============================
# OUTER SHIELD
#/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
#/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
#/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
#/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
#/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
#/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
#/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
#/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
#/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#=============================
#
#=============================
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#=============================
#
#=============================
# TARGET
/musr/command construct tubs target 0 10.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs saveTarget 0 10.0 0.01 0 360 G4_Galactic 0 0 -0.5 log_World norot dead 253
#/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#=============================
#
#=============================
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE invisible
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
/musr/command visattributes G4_Ag red
/musr/command visattributes log_World invisible
/musr/command visattributes log_target red
/musr/command visattributes G4_Si blue
#
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 3DBOpera GPS_WEP_xyz_Sym_2_from_000_cgs.table log_targetFieldVol 0.005
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.300
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
/musr/command globalfield printFieldValueAtPoint 0 0 4
/musr/command globalfield printFieldValueAtPoint 0 0 8
/musr/command globalfield printFieldValueAtPoint 0 0 12
/musr/command globalfield printFieldValueAtPoint 0 0 16
/musr/command globalfield printFieldValueAtPoint 0 0 20
/musr/command globalfield printFieldValueAtPoint 4 0 0
/musr/command globalfield printFieldValueAtPoint 0 4 0
/musr/command globalfield printFieldValueAtPoint 80 80 200
#
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 1000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_time_end off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
#
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
#/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
#
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
#
/gun/vertex 0 0 -29 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#####################
/gun/vertexsigma 0 0 0 mm
#/gun/vertexsigma 0.5 0.5 0 mm
#####################
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#####################
/gun/momentum 27.0 MeV
#####################
# sigma = 3% ==> sigma 27*0.03 = 0.81
/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
#######################/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
#/gun/muonPolarizVector 0.173648 0. -0.98480775
/gun/muonPolarizVector 0. 0. -1.0
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
#
#
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#
#/run/beamOn 3000000
#/run/beamOn 100000
/run/beamOn 100000

View File

@ -1,316 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# GPS Mark-II template
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
#
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
#
#=============================
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
# Inner ring rotations - 8 segments, 0 deg tilt
/musr/command rotation matlti1 0 1 0 -45
/musr/command rotation matlti2 0 1 0 0
/musr/command rotation matlti3 0 1 0 45
/musr/command rotation matlti4 0 1 0 90
/musr/command rotation matlti5 0 1 0 135
/musr/command rotation matlti6 0 1 0 180
/musr/command rotation matlti7 0 1 0 225
/musr/command rotation matlti8 0 1 0 270
# Outer ring rotations - 10 segments, 0 deg tilt
/musr/command rotation matlto1 0 1 0 -45
/musr/command rotation matlto2 0 1 0 -9
/musr/command rotation matlto3 0 1 0 27
/musr/command rotation matlto4 0 1 0 63
/musr/command rotation matlto5 0 1 0 99
/musr/command rotation matlto6 0 1 0 135
/musr/command rotation matlto7 0 1 0 171
/musr/command rotation matlto8 0 1 0 -153
/musr/command rotation matlto9 0 1 0 -117
/musr/command rotation matlto10 0 1 0 -81
#
#=============================
# WORLD VOLUME
#
/musr/command construct box World 30 30 30 G4_Galactic 0 0 0 no_logical_volume norot dead -1
#
#############Remove here to test in GPS#####################
#/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
#/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
#
#=============================
# SECOND COLLIMATOR
#
#/musr/command construct tubs shield_collimA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
#
#=============================
# OLD ALC DESIGN: MSR 20.05.083 Flange
#
#/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
#
##############End of Removed to test in GPS################
#=============================
# POSITRON COUNTERS FORWARD BACKWARD UP DOWN RIGHT LEFT
#
#/musr/command construct GPSbackward forwardCounter 25 25 2.5 9.1 11.9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
#/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
#/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0 log_World norot musr/ScintSD 3
#/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0 log_World norot musr/ScintSD 4
#/musr/command construct box right1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
#/musr/command construct box right2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
#/musr/command construct box right3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
#/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
#/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
# FORWARD VETO
#/musr/command construct GPSbackwardVeto forwVetoA 9. 11.8 9. 11.8 2.5 6.25 6.7 6.25 6.7 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoB 11.8 18.9 11.8 18.9 15 6.7 13.8 6.7 13.8 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44.0 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 18.9 18.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 61.5 log_World norot musr/ScintSD 51
# BACKWARD VETO
#/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#=============================
# Pixel detectors
#
# /musr/command construct box name_of_pixel xlen ylen zlen G4_SI_SC xcoor ycoor zcoor log_World rot_mat musr/ScintSD 5??
# Inner set of pixel detectors
/musr/command construct box pixeli1 10 10 0.025 G4_Si 0.0 0.0 -10.0 log_World norot musr/ScintSD 501
/musr/command construct box pixeli2 10 10 0.025 G4_Si 0.0 0.0 10.0 log_World norot musr/ScintSD 502
/musr/command construct box pixeli3 0.025 10 10 G4_Si -10.0 0.0 0.0 log_World norot musr/ScintSD 503
/musr/command construct box pixeli4 0.025 10 10 G4_Si 10.0 0.0 0.0 log_World norot musr/ScintSD 504
# Outer set of pixel detectors
/musr/command construct box pixelo1 20 20 0.025 G4_Si 0.0 0.0 -20.0 log_World norot musr/ScintSD 601
/musr/command construct box pixelo2 20 20 0.025 G4_Si 0.0 0.0 20.0 log_World norot musr/ScintSD 602
/musr/command construct box pixelo3 0.025 20 20 G4_Si -20.0 0.0 0.0 log_World norot musr/ScintSD 603
/musr/command construct box pixelo4 0.025 20 20 G4_Si 20.0 0.0 0.0 log_World norot musr/ScintSD 604
#
#=============================
# OUTER SHIELD
#/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
#/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
#/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
#/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
#/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
#/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
#/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
#/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
#/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#=============================
#
#=============================
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#=============================
#
#=============================
# TARGET
/musr/command construct tubs target 0 10.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs saveTarget 0 10.0 0.01 0 360 G4_Galactic 0 0 -0.5 log_World norot dead 253
/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#=============================
#
#=============================
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE invisible
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
/musr/command visattributes G4_Ag red
/musr/command visattributes log_World invisible
/musr/command visattributes log_target red
/musr/command visattributes G4_Si blue
#
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
#/musr/command globalfield centralSolenoidField 10. 10. 10. uniform 0. 0. 0. log_targetFieldVol 0.005 0.0 0.0 0.0 0.0 0.0
/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 3DBOpera GPS_WEP_xyz_Sym_2_from_000_cgs.table log_targetFieldVol 0.005
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.300
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
/musr/command globalfield printFieldValueAtPoint 0 0 4
/musr/command globalfield printFieldValueAtPoint 0 0 8
/musr/command globalfield printFieldValueAtPoint 0 0 12
/musr/command globalfield printFieldValueAtPoint 0 0 16
/musr/command globalfield printFieldValueAtPoint 0 0 20
/musr/command globalfield printFieldValueAtPoint 4 0 0
/musr/command globalfield printFieldValueAtPoint 0 4 0
/musr/command globalfield printFieldValueAtPoint 80 80 200
#
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 1000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_time_end off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
#
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
#/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
#
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
#
/gun/vertex 0 0 -29 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#####################
/gun/vertexsigma 0 0 0 mm
#/gun/vertexsigma 0.5 0.5 0 mm
#####################
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#####################
/gun/momentum 27.0 MeV
#####################
# sigma = 3% ==> sigma 27*0.03 = 0.81
/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
#######################/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
#/gun/muonPolarizVector 0.173648 0. -0.98480775
/gun/muonPolarizVector 0. 0. -1.0
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
#
#
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#
#/run/beamOn 3000000
#/run/beamOn 100000
/run/beamOn 100000

View File

@ -1,315 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# GPS Mark-II template
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
#
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
#
#=============================
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
# Inner ring rotations - 8 segments, 0 deg tilt
/musr/command rotation matlti1 0 1 0 -45
/musr/command rotation matlti2 0 1 0 0
/musr/command rotation matlti3 0 1 0 45
/musr/command rotation matlti4 0 1 0 90
/musr/command rotation matlti5 0 1 0 135
/musr/command rotation matlti6 0 1 0 180
/musr/command rotation matlti7 0 1 0 225
/musr/command rotation matlti8 0 1 0 270
# Outer ring rotations - 10 segments, 0 deg tilt
/musr/command rotation matlto1 0 1 0 -45
/musr/command rotation matlto2 0 1 0 -9
/musr/command rotation matlto3 0 1 0 27
/musr/command rotation matlto4 0 1 0 63
/musr/command rotation matlto5 0 1 0 99
/musr/command rotation matlto6 0 1 0 135
/musr/command rotation matlto7 0 1 0 171
/musr/command rotation matlto8 0 1 0 -153
/musr/command rotation matlto9 0 1 0 -117
/musr/command rotation matlto10 0 1 0 -81
#
#=============================
# WORLD VOLUME
#
/musr/command construct box World 30 30 30 G4_Galactic 0 0 0 no_logical_volume norot dead -1
#
#############Remove here to test in GPS#####################
#/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
#/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
#
#=============================
# SECOND COLLIMATOR
#
#/musr/command construct tubs shield_collimA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
#
#=============================
# OLD ALC DESIGN: MSR 20.05.083 Flange
#
#/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
#
##############End of Removed to test in GPS################
#=============================
# POSITRON COUNTERS FORWARD BACKWARD UP DOWN RIGHT LEFT
#
#/musr/command construct GPSbackward forwardCounter 25 25 2.5 9.1 11.9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
#/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
#/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0 log_World norot musr/ScintSD 3
#/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0 log_World norot musr/ScintSD 4
#/musr/command construct box right1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
#/musr/command construct box right2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
#/musr/command construct box right3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
#/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
#/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
# FORWARD VETO
#/musr/command construct GPSbackwardVeto forwVetoA 9. 11.8 9. 11.8 2.5 6.25 6.7 6.25 6.7 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoB 11.8 18.9 11.8 18.9 15 6.7 13.8 6.7 13.8 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44.0 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 18.9 18.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 61.5 log_World norot musr/ScintSD 51
# BACKWARD VETO
#/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#=============================
# Pixel detectors
#
# /musr/command construct box name_of_pixel xlen ylen zlen G4_SI_SC xcoor ycoor zcoor log_World rot_mat musr/ScintSD 5??
# Inner set of pixel detectors
/musr/command construct box pixeli1 10 10 0.025 G4_Si 0.0 0.0 -10.0 log_World norot musr/ScintSD 501
/musr/command construct box pixeli2 10 10 0.025 G4_Si 0.0 0.0 10.0 log_World norot musr/ScintSD 502
/musr/command construct box pixeli3 0.025 10 10 G4_Si -10.0 0.0 0.0 log_World norot musr/ScintSD 503
/musr/command construct box pixeli4 0.025 10 10 G4_Si 10.0 0.0 0.0 log_World norot musr/ScintSD 504
# Outer set of pixel detectors
/musr/command construct box pixelo1 20 20 0.025 G4_Si 0.0 0.0 -20.0 log_World norot musr/ScintSD 601
/musr/command construct box pixelo2 20 20 0.025 G4_Si 0.0 0.0 20.0 log_World norot musr/ScintSD 602
/musr/command construct box pixelo3 0.025 20 20 G4_Si -20.0 0.0 0.0 log_World norot musr/ScintSD 603
/musr/command construct box pixelo4 0.025 20 20 G4_Si 20.0 0.0 0.0 log_World norot musr/ScintSD 604
#
#=============================
# OUTER SHIELD
#/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
#/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
#/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
#/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
#/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
#/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
#/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
#/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
#/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#=============================
#
#=============================
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#=============================
#
#=============================
# TARGET
/musr/command construct tubs target 0 5.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs saveTarget 0 10.0 0.01 0 360 G4_Galactic 0 0 -0.5 log_World norot dead 253
#/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#=============================
#
#=============================
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE invisible
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
/musr/command visattributes G4_Ag red
/musr/command visattributes log_World invisible
/musr/command visattributes log_target red
/musr/command visattributes G4_Si blue
#
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 3DBOpera GPS_WEP_xyz_Sym_2_from_000_cgs.table log_targetFieldVol 0.005
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.300
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
/musr/command globalfield printFieldValueAtPoint 0 0 4
/musr/command globalfield printFieldValueAtPoint 0 0 8
/musr/command globalfield printFieldValueAtPoint 0 0 12
/musr/command globalfield printFieldValueAtPoint 0 0 16
/musr/command globalfield printFieldValueAtPoint 0 0 20
/musr/command globalfield printFieldValueAtPoint 4 0 0
/musr/command globalfield printFieldValueAtPoint 0 4 0
/musr/command globalfield printFieldValueAtPoint 80 80 200
#
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 1000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_time_end off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
#
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
#/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
#
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
#
/gun/vertex 0 0 -29 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#####################
/gun/vertexsigma 0 0 0 mm
#/gun/vertexsigma 0.5 0.5 0 mm
#####################
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#####################
/gun/momentum 27.0 MeV
#####################
# sigma = 3% ==> sigma 27*0.03 = 0.81
/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
#######################/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
#/gun/muonPolarizVector 0.173648 0. -0.98480775
/gun/muonPolarizVector 0. 0. -1.0
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
#
#
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#
#/run/beamOn 3000000
#/run/beamOn 100000
/run/beamOn 100000

View File

@ -1,315 +0,0 @@
#-----------------------------------------------------------------------
# Macro file for muSR instrument simulations
# GPS Mark-II template
# Unless specified otherwises, the default units are mm, ns, MeV, MeV/c.
# Lines starting with star "#" are comments.
#
###################################################################################
############################# G E O M E T R Y ###################################
###################################################################################
#
#=============================
# ROTATION MATRIXES:
/musr/command rotation matrix1 0 0 45
/musr/command rotation matrix2 0 180 0
/musr/command rotation matrix3 0 270 0
# Inner ring rotations - 8 segments, 0 deg tilt
/musr/command rotation matlti1 0 1 0 -45
/musr/command rotation matlti2 0 1 0 0
/musr/command rotation matlti3 0 1 0 45
/musr/command rotation matlti4 0 1 0 90
/musr/command rotation matlti5 0 1 0 135
/musr/command rotation matlti6 0 1 0 180
/musr/command rotation matlti7 0 1 0 225
/musr/command rotation matlti8 0 1 0 270
# Outer ring rotations - 10 segments, 0 deg tilt
/musr/command rotation matlto1 0 1 0 -45
/musr/command rotation matlto2 0 1 0 -9
/musr/command rotation matlto3 0 1 0 27
/musr/command rotation matlto4 0 1 0 63
/musr/command rotation matlto5 0 1 0 99
/musr/command rotation matlto6 0 1 0 135
/musr/command rotation matlto7 0 1 0 171
/musr/command rotation matlto8 0 1 0 -153
/musr/command rotation matlto9 0 1 0 -117
/musr/command rotation matlto10 0 1 0 -81
#
#=============================
# WORLD VOLUME
#
/musr/command construct box World 30 30 30 G4_Galactic 0 0 0 no_logical_volume norot dead -1
#
#############Remove here to test in GPS#####################
#/musr/command construct tubs tube 35.45 38.05 315 0 360 Steel 0 0 -613 log_World norot dead 8201
#/musr/command construct tubs tube_a 0 35.45 315 0 360 G4_Galactic 0 0 -613 log_World norot dead 8251
#
#=============================
# SECOND COLLIMATOR
#
#/musr/command construct tubs shield_collimA2 10 35 25 0 360 G4_Cu 0 0 290 log_tube_a norot dead 341
#
#=============================
# OLD ALC DESIGN: MSR 20.05.083 Flange
#
#/musr/command construct tubs flange 38.05 90 6 0 360 Steel 0 0 -934 log_World norot dead 8301
#
##############End of Removed to test in GPS################
#=============================
# POSITRON COUNTERS FORWARD BACKWARD UP DOWN RIGHT LEFT
#
#/musr/command construct GPSbackward forwardCounter 25 25 2.5 9.1 11.9 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 1
#/musr/command construct GPSbackward backwardCounter 30 30 2.5 8.80 7.64 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -30.0 log_World norot musr/ScintSD 2
#/musr/command construct box up 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE 57.5 0 0 log_World norot musr/ScintSD 3
#/musr/command construct box down 2.5 53 53 G4_PLASTIC_SC_VINYLTOLUENE -57.5 0 0 log_World norot musr/ScintSD 4
#/musr/command construct box right1 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 -38 log_World norot musr/ScintSD 5
#/musr/command construct box right2 53 2.5 14 G4_PLASTIC_SC_VINYLTOLUENE 0 -56.25 38 log_World norot musr/ScintSD 6
#/musr/command construct box right3 35 2.5 20 G4_PLASTIC_SC_VINYLTOLUENE 0 -51.25 0 log_World norot musr/ScintSD 7
#/musr/command construct box left1 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 -48.3 log_World norot musr/ScintSD 8
#/musr/command construct box left2 53 2.5 19.3 G4_PLASTIC_SC_VINYLTOLUENE 0 72.5 48.3 log_World norot musr/ScintSD 9
# FORWARD VETO
#/musr/command construct GPSbackwardVeto forwVetoA 9. 11.8 9. 11.8 2.5 6.25 6.7 6.25 6.7 G4_PLASTIC_SC_VINYLTOLUENE 0 0 26.5 log_World norot musr/ScintSD 51
#/musr/command construct GPSbackwardVeto forwVetoB 11.8 18.9 11.8 18.9 15 6.7 13.8 6.7 13.8 G4_PLASTIC_SC_VINYLTOLUENE 0 0 44.0 log_World norot musr/ScintSD 51
#/musr/command construct box forwVetoD 18.9 18.9 2.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 61.5 log_World norot musr/ScintSD 51
# BACKWARD VETO
#/musr/command construct GPSbackwardVeto backwardVeto 35.13 7.63 35.13 7.63 60 31 3.5 31 3.5 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -87.5 log_World norot musr/ScintSD 52
#=============================
# Pixel detectors
#
# /musr/command construct box name_of_pixel xlen ylen zlen G4_SI_SC xcoor ycoor zcoor log_World rot_mat musr/ScintSD 5??
# Inner set of pixel detectors
/musr/command construct box pixeli1 10 10 0.025 G4_Si 0.0 0.0 -10.0 log_World norot musr/ScintSD 501
/musr/command construct box pixeli2 10 10 0.025 G4_Si 0.0 0.0 10.0 log_World norot musr/ScintSD 502
/musr/command construct box pixeli3 0.025 10 10 G4_Si -10.0 0.0 0.0 log_World norot musr/ScintSD 503
/musr/command construct box pixeli4 0.025 10 10 G4_Si 10.0 0.0 0.0 log_World norot musr/ScintSD 504
# Outer set of pixel detectors
/musr/command construct box pixelo1 20 20 0.025 G4_Si 0.0 0.0 -20.0 log_World norot musr/ScintSD 601
/musr/command construct box pixelo2 20 20 0.025 G4_Si 0.0 0.0 20.0 log_World norot musr/ScintSD 602
/musr/command construct box pixelo3 0.025 20 20 G4_Si -20.0 0.0 0.0 log_World norot musr/ScintSD 603
/musr/command construct box pixelo4 0.025 20 20 G4_Si 20.0 0.0 0.0 log_World norot musr/ScintSD 604
#
#=============================
# OUTER SHIELD
#/musr/command construct tubeWithWindows tube1 20 21 33.5 14.5 33.5 14.5 33.5 G4_Cu 0 0 0 log_World matrix3 dead 401
#/musr/command construct tubs bottom1 0 20 0.5 0 360 G4_Cu 0 -33.0 0 log_World matrix3 dead 402
#/musr/command construct tubs window1 21 21.010 15 0 360 G4_Cu 0 0 0 log_World matrix3 dead 403
#/musr/command construct tubs bottom1a 0 20 0.5 0 360 G4_Cu 0 33.0 0 log_World matrix3 dead 404
# INNER SHIELD
#/musr/command construct tubeWithWindows tube2 11.5 12.5 21.5 7.5 21.5 10. 21.5 G4_Cu 0 0 0 log_World matrix3 dead 411
#/musr/command construct tubs bottom2 0 11.5 3.0 0 360 G4_Cu 0 -21.5 0 log_World matrix3 dead 412
#/musr/command construct tubs window2 12.5 12.510 8 0 360 G4_Cu 0 0 0 log_World matrix3 dead 413
#/musr/command construct tubs bottom2a 0 11.5 3.0 0 360 G4_Cu 0 21.5 0 log_World matrix3 dead 414
# HEATER
#/musr/command construct tubs heater 16 16.3 7.5 0 360 G4_Cu 0 -18.5 0 log_World matrix3 dead 415
#=============================
#
#=============================
# M COUNTERS AND M COUNTER HOLDER
#/musr/command construct tubs M0 0 7.5 0.15 0 360 G4_PLASTIC_SC_VINYLTOLUENE 0 0 -25.0 log_World norot musr/ScintSD 102
#=============================
#
#=============================
# TARGET
/musr/command construct tubs target 0 5.0 0.215 0 360 G4_Ag 0 0 0 log_World norot dead 201
/musr/command construct tubs saveTarget 0 10.0 0.01 0 360 G4_Galactic 0 0 -0.5 log_World norot dead 253
#/musr/command construct tubs targetFieldVol 0 0.5 0.015 0 360 G4_Ag 0 0 0 log_target norot dead 202
#=============================
#
#=============================
/musr/command visattributes G4_PLASTIC_SC_VINYLTOLUENE invisible
/musr/command visattributes G4_PLEXIGLASS yellow
/musr/command visattributes G4_Pb blue
/musr/command visattributes G4_Ag red
/musr/command visattributes log_World invisible
/musr/command visattributes log_target red
/musr/command visattributes G4_Si blue
#
###################################################################################
######################### M A G N E T I C F I E L D #########################
###################################################################################
# Set magnetic field (set field intensity in T and sigma in mm)
# syntax for magneticfield: fromfile filename fieldValue
# uniform fieldValue
# gaussian fieldValue sigma
#
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 3DBOpera GPS_WEP_xyz_Sym_2_from_000_cgs.table log_targetFieldVol 0.005
#/musr/command globalfield centralSolenoidField 0. 0. 0. fromfile 2D GPS_6kG_yAx_xRad_cgs.table log_targetFieldVol 0.300
/musr/command globalfield setparameter SetLargestAcceptableStep 2
/musr/command globalfield setparameter SetMinimumEpsilonStep 5e-5
/musr/command globalfield setparameter SetMaximumEpsilonStep 0.001
/musr/command globalfield setparameter SetDeltaOneStep 0.1
/musr/command globalfield setparameter SetDeltaIntersection 0.01
/musr/command globalfield printparameters
/musr/command globalfield printFieldValueAtPoint 0 0 0
/musr/command globalfield printFieldValueAtPoint 0 0 4
/musr/command globalfield printFieldValueAtPoint 0 0 8
/musr/command globalfield printFieldValueAtPoint 0 0 12
/musr/command globalfield printFieldValueAtPoint 0 0 16
/musr/command globalfield printFieldValueAtPoint 0 0 20
/musr/command globalfield printFieldValueAtPoint 4 0 0
/musr/command globalfield printFieldValueAtPoint 0 4 0
/musr/command globalfield printFieldValueAtPoint 80 80 200
#
###################################################################################
######################### P H Y S I C S P R O C E S S E S ##################
###################################################################################
# Geant 4.9.3
/musr/command process addDiscreteProcess gamma G4PhotoElectricEffect
/musr/command process addDiscreteProcess gamma G4ComptonScattering
/musr/command process addDiscreteProcess gamma G4GammaConversion
/musr/command process addDiscreteProcess gamma G4RayleighScattering
/musr/command process addProcess e- G4eMultipleScattering -1 1 1
/musr/command process addProcess e- G4eIonisation -1 2 2
/musr/command process addProcess e- G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eMultipleScattering -1 1 1
/musr/command process addProcess e+ G4eIonisation -1 2 2
/musr/command process addProcess e+ G4eBremsstrahlung -1 3 3
/musr/command process addProcess e+ G4eplusAnnihilation 0 -1 4
/musr/command process addProcess mu- G4MuMultipleScattering -1 1 1
/musr/command process addProcess mu- G4MuIonisation -1 2 2
/musr/command process addProcess mu- G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu- G4MuPairProduction -1 4 4
/musr/command process addProcess mu+ G4MuMultipleScattering -1 1 1
#/musr/command process addModel mu+ G4MuMultipleScattering G4UrbanMscModel92 0
/musr/command process addProcess mu+ G4MuIonisation -1 2 2
/musr/command process addProcess mu+ G4MuBremsstrahlung -1 3 3
/musr/command process addProcess mu+ G4MuPairProduction -1 4 4
#
#
#/home/install/geant4.9.3/source/processes/electromagnetic/utils/src/G4EnergyLossMessenger.cc
######## /process/msc/StepLimit Minimal | UseDistanceToBoundary | UseSafety
/process/msc/StepLimit UseSafety
#/process/msc/LateralDisplacement
/process/msc/RangeFactor 0.04
/process/msc/GeomFactor 2.5
#/process/msc/FactorForAngleLimit
/process/msc/Skin 3.0
#/process/msc/ThetaLimit 0.2 rad
#
###################################################################################
################## S O M E O T H E R P A R A M E T E R S ##################
###################################################################################
# Set the overall range cut
#/run/setCut 1 mm
# Set the range cut on a particular volumes (in mm)
/musr/command SetUserLimits log_target 0.01
#/musr/command SetUserLimits log_targetscint 0.01
#/musr/command SetUserLimits log_M0 0.01
# Store all events into the ROOT tree or just the interesting ones ? (true is default)
#/musr/command storeOnlyEventsWithHits false
# Set the minimum time separation between two subsequent signals in the same detector (in ns)
/musr/command signalSeparationTime 0.1
#
/musr/run/howOftenToPrintEvent 1000
/musr/command maximumRunTimeAllowed 86000
/musr/run/randomOption 2
###################################################################################
######################### R O O T O U T P U T ##############################
###################################################################################
#
#/musr/command rootOutput det_edep_el off
#/musr/command rootOutput det_edep_pos off
#/musr/command rootOutput det_edep_gam off
#/musr/command rootOutput det_edep_mup off
#/musr/command rootOutput det_nsteps off
#/musr/command rootOutput det_length off
#/musr/command rootOutput det_time_end off
#/musr/command rootOutput det_kine off
/musr/command rootOutput det_VrtxKine off
/musr/command rootOutput det_VrtxX off
/musr/command rootOutput det_VrtxY off
/musr/command rootOutput det_VrtxZ off
/musr/command rootOutput det_VrtxVolID off
/musr/command rootOutput det_VrtxProcID off
/musr/command rootOutput det_VrtxTrackID off
/musr/command rootOutput det_VrtxParticleID off
/musr/command rootOutput det_VvvKine off
/musr/command rootOutput det_VvvX off
/musr/command rootOutput det_VvvY off
/musr/command rootOutput det_VvvZ off
/musr/command rootOutput det_VvvVolID off
/musr/command rootOutput det_VvvProcID off
/musr/command rootOutput det_VvvTrackID off
/musr/command rootOutput det_VvvParticleID off
/musr/command rootOutput odet_ID off
/musr/command rootOutput odet_nPhot off
/musr/command rootOutput odet_timeFirst off
/musr/command rootOutput odet_timeSecond off
/musr/command rootOutput odet_timeThird off
/musr/command rootOutput odet_timeA off
/musr/command rootOutput odet_timeB off
/musr/command rootOutput odet_timeC off
/musr/command rootOutput odet_timeD off
/musr/command rootOutput odet_timeMean off
/musr/command rootOutput odet_timeLast off
/musr/command rootOutput odet_timeCFD off
/musr/command rootOutput odet_amplCFD off
/musr/command rootOutput nOptPhot off
#
###################################################################################
######################### V I S U A L I S A T I O N ##############################
###################################################################################
#/vis/disable
#/control/execute visVRML.mac
#/control/execute visFromToni.mac
#/control/execute visDawn50001.mac
#/vis/open VRML2FILE
#/vis/open DAWNFILE
### (if too many tracks cause core dump => storeTrajectory 0)
#/vis/scene/create
#
#/tracking/storeTrajectory 1
#/vis/viewer/set/viewpointThetaPhi 90 0
##/vis/viewer/set/globalLineWidthScale 3
#/vis/viewer/zoom 30
###/vis/scene/add/trajectories
#/vis/drawVolume
#/vis/viewer/flush
####/hits/verbose 2
#
###################################################################################
######################### P A R T I C L E G U N #################################
###################################################################################
#
/gun/vertex 0 0 -29 mm
# FWHM 10mm ==> sigma = 10/2.354 = 4.2481mm
#####################
/gun/vertexsigma 0 0 0 mm
#/gun/vertexsigma 0.5 0.5 0 mm
#####################
#---/gun/vertexboundary: rMaxAllowed, zMinAllowed, zMaxAllowed
/gun/vertexboundary 128 -999999 999999 mm
#####################
/gun/momentum 27.0 MeV
#####################
# sigma = 3% ==> sigma 27*0.03 = 0.81
/gun/momentumsmearing 0.81 MeV
#---/gun/momentumboundary: pMinAllowed, pMaxAllowed, dummy
#/gun/momentumboundary 20 40 0 MeV
# TURTLE
#/gun/turtlefilename FOR061_2008_04_22.DAT
#/gun/turtlefilename FOR070_2008_10_17_XXII.DAT
#/gun/turtlefilename FOR077_pie3_HiField_d05_x30.dat
#/gun/turtlefilename FOR077_reggiani_Jan2010_NEW.dat
#######################/gun/turtlefilename FOR077_reggiani_Feb2010.dat
#/gun/turtleZ0position -900 mm
#---/gun/tilt: xangle, yangle, dummy
#/gun/tilt 0 0.5 0 deg
#---/gun/tiltsigma: xangleSigma, yangleSigma, dummy (1 degree on 1 meter ~ 17mm)
#/gun/tiltsigma 0.2 0.2 0 deg
#/gun/pitch 0.5 deg
# Spin rotated by 50 degrees upwards:
#/gun/muonPolarizVector 0.173648 0. -0.98480775
/gun/muonPolarizVector 0. 0. -1.0
#---/gun/decaytimelimits: decayMin, decayMax, decayTime
#/gun/decaytimelimits 400 410 2197.03 ns
/gun/decaytimelimits -1 -1 2197.03 ns
#
#
###################################################################################
######################## B E A M O N #########################################
###################################################################################
#
#/run/beamOn 3000000
#/run/beamOn 100000
/run/beamOn 100000

View File

@ -1,342 +0,0 @@
// To run root without logon screen and script use: root -l -n
// To run a named macro in root use:
//.L SiPixel_tr.C
// muSpot("data/musr_1100.root", 868)
#include <string>
void muSpot(const char* fname, int saveID)
{
TString cutStr;
TH1D *pol_x, *pol_z, *xisect, *yisect, *xfsect, *yfsect;
TH2D *ini_hist, *bspot_hist, *bspot_hist1;
TTree *t1;
TFile* f1 = new TFile(fname);
t1 = (TTree*) gDirectory->FindObjectAny("t1");
// Get muon (particleID == -13) hits in saveID
cutStr.Form("save_detID== %3i &&save_particleID==-13",saveID);
// Get positron (particleID == 22) hits in saveID
//sprintf(poscutStr,"save_detID== %3i &&save_particleID==22",saveID);
gStyle->SetPalette(1,0);
TCanvas* c1 = new TCanvas("c1","Beam Spot",60,60,600,600);
c1->Divide(2,2);
c1->SetGridx();
c1->SetGridy();
// Initial beam spot
c1->cd(1)->SetGridx();c1->cd(1)->SetGridy();
t1->Draw("muIniPosY[0]:muIniPosX[0]>>ini_hist(60,-20, 20,60,-20,20)");
ini_hist = (TH2D*) gDirectory->Get("ini_hist");
ini_hist->SetTitle("Muon initial beam cross section [mm]");
ini_hist->Draw();
ini_hist->Draw("cont0 same");
ini_hist->ProjectionX("xisect");
ini_hist->ProjectionY("yisect");
// Resulting beam spot
c1->cd(2)->SetGridx();c1->cd(2)->SetGridy();
// Muons decay position (on target)
//t1->Draw("muDecayPosX:muDecayPosY>>bspot_hist(60,-20,20,60,-20,20)");
// Muons passing through save_detID
t1->Draw("save_y:save_x>>bspot_hist(60,-20,20,60,-20,20)",cutStr);
bspot_hist = (TH2D*) gDirectory->Get("bspot_hist");
bspot_hist->SetTitle("Muon beam cross section [mm]");
bspot_hist->Draw();
bspot_hist->Draw("cont0 same");
bspot_hist->ProjectionX("xfsect");
bspot_hist->ProjectionY("yfsect");
// Initial beam spot cross section
c1->cd(3);
c1->cd(3)->SetGridx();c1->cd(3)->SetGridy();
xisect = (TH1D*) gDirectory->Get("xisect");
xisect->SetTitle("x initial cross section [mm]");
xisect->SetFillStyle(1001);
xisect->SetFillColor(45);
xisect->Draw();
// Resulting beam spot cross section
c1->cd(4);
c1->cd(4)->SetGridx();c1->cd(4)->SetGridy();
xfsect = (TH1D*) gDirectory->Get("xfsect");
xfsect->SetTitle("x muon cross section [mm]");
xfsect->SetFillStyle(1001);
xfsect->SetFillColor(45);
xfsect->Draw();
// yfsect = (TH1D*) gDirectory->Get("yfsect");
// yfsect->SetTitle("x muon cross section [mm]");
// yfsect->SetFillStyle(1001);
// yfsect->SetFillColor(46);
// yfsect->Draw();
// bspot_hist1 = (TH2D*) gDirectory->Get("bspot_hist1");
// bspot_hist1->SetTitle("Muon beam cross section [mm]");
// bspot_hist1->GetXaxis()->SetTitle("x (mm)");
// bspot_hist1->GetYaxis()->SetTitle("y (mm)");
// bspot_hist1->Draw();
// bspot_hist1->Draw("cont0 same");
// cout << "Mean x, Mean y, RMS x, RMS y: " << bspot_hist1->GetMean(1) << ", " << bspot_hist1->GetMean(2) << ", " << bspot_hist1->GetRMS(1) << ", " << bspot_hist1->GetRMS(2) << ", " << endl;
// cout << "Fraction in [-10.,10.]: " << bspot_hist1->Integral(21,60,21,60)/bspot_hist1->Integral(1,80,1,80) << endl;
// cout << "Fraction in [-12.5,12.5]: " << bspot_hist1->Integral(16,65,16,65)/bspot_hist1->Integral(1,80,1,80) << endl;
// cout << "Fraction in [-5.0,5.0]: " << bspot_hist1->Integral(31,50,31,50)/bspot_hist1->Integral(1,80,1,80) << endl;
// cout << "Fraction in [-2.5,2.5]: " << bspot_hist1->Integral(36,45,36,45)/bspot_hist1->Integral(1,80,1,80) << endl;
// cout << "N[-20,20]: " << bspot_hist1->Integral(1,80,1,80) << endl;
}
void phase_space(const char* fname)
{
TH1D *pol_x, *pol_z, *xisect, *yisect, *xfsect, *yfsect;
TH2D *ini_hist, *bspot_hist, *bspot_hist1;
TTree *t1;
TFile* f1 = new TFile(fname);
t1 = (TTree*) gDirectory->FindObjectAny("t1");
gStyle->SetPalette(1,0);
TCanvas* c1 = new TCanvas("c1","Phase Space",60,40,600,800);
c1->Divide(2,2);
c1->SetGridx();
c1->SetGridy();
// Resulting phase space px,py
c1->cd(1);
t1->Draw("muIniMomY[0]:muIniMomX[0]>>ini_hist(64,-40,40,64,-40,40)","muIniPolX > -2");
ini_hist->SetTitle("Muon initial beam phase space []");
ini_hist->Draw();
ini_hist->Draw("cont0 same");
ini_hist->ProjectionX("xisect",31,33);
ini_hist->ProjectionY("yisect",31,33);
// Resulting polarization in the z direction
c1->cd(2);
t1->Draw("muTargetPosY[0]:muTargetPosX[0]>>bspot_hist(64,-40,40,64,-40,40)","muTargetPolX > -2");
bspot_hist->SetTitle("Muon beam cross section [mm]");
bspot_hist->Draw();
bspot_hist->Draw("cont0 same");
bspot_hist->ProjectionX("xfsect",31,33);
bspot_hist->ProjectionY("yfsect",31,33);
// Initial beam spot
c1->cd(3)->SetGridx();c1->cd(3)->SetGridy(); // c2->cd(3);
t1->Draw("muIniPosY[0]:muIniPosX[0]>>ini_hist(64,-40,40,64,-40,40)","muIniPolX > -2");
ini_hist->SetTitle("Muon initial beam cross section [mm]");
ini_hist->Draw();
ini_hist->Draw("cont0 same");
ini_hist->ProjectionX("xisect",31,33);
ini_hist->ProjectionY("yisect",31,33);
// Resulting beam spot
c1->cd(4)->SetGridx();c1->cd(4)->SetGridy(); // c1->cd(3);
t1->Draw("muTargetPosY[0]:muTargetPosX[0]>>bspot_hist(64,-40,40,64,-40,40)","muTargetPolX > -2");
bspot_hist->SetTitle("Muon beam cross section [mm]");
bspot_hist->Draw();
bspot_hist->Draw("cont0 same");
bspot_hist->ProjectionX("xfsect",31,33);
bspot_hist->ProjectionY("yfsect",31,33);
}
void Slice(const char* fname, Int_t SliceID)
{
TH1D *pol_x, *pol_z, *xisect, *yisect, *xfsect, *yfsect, *zhist;
TH2D *ini_hist, *bspot_hist;
TTree *t1;
TFile* f1 = new TFile(fname);
TString Cond,Title;
Double_t zSlice;
t1 = (TTree*) gDirectory->FindObjectAny("t1");
gStyle->SetPalette(1,0);
TCanvas* c1 = new TCanvas("c1","Polarization and Transmission",60,40,600,800);
//c1->Divide(2,3);
c1->SetGridx();
c1->SetGridy();
// Resulting polarization in the x direction
c1->cd(1);
// Cond.Form("save_detID== %04d&&save_particleID==-13",SliceID);
Cond.Form("save_detID== %04d",SliceID);
t1->Draw("save_polx >> pol_x(64,-1,1)",Cond); //0, 2
pol_x->SetTitle("Polarization X");
pol_x->GetXaxis()->SetNdivisions(405);
pol_x->GetYaxis()->SetNdivisions(406);
pol_x->GetXaxis()->SetTickLength(0.018);
pol_x->GetYaxis()->SetTickLength(0.018);
pol_x->Draw("F");
pol_x->SetFillStyle(1001);
pol_x->SetFillColor(kGreen-5);
pol_x->Draw();
//c1->SaveAs("data/sr_bspot_0.eps");
// Resulting polarization in the z direction
// c1->cd(2);
// t1->Draw("save_polz >> pol_z(64,-1,1)",Cond); //-1., 1
// pol_z->SetTitle("Polarization Z");
// pol_z->GetXaxis()->SetNdivisions(405);
// pol_z->GetYaxis()->SetNdivisions(406);
// pol_z->GetXaxis()->SetTickLength(0.018);
// pol_z->GetYaxis()->SetTickLength(0.018);
// pol_z->Draw("F");
// pol_z->SetFillStyle(1001);
// pol_z->SetFillColor(38);
// pol_z->Draw();
// Initial beam spot
// c1->cd(3)->SetGridx();c1->cd(3)->SetGridy(); // c2->cd(3);
// t1->Draw("muIniPosZ[0]:muIniPosY[0]>>ini_hist(64,-40,40,64,-1710,-1646)","muIniPolZ > -2");
// ini_hist->SetTitle("Muon initial beam cross section [mm]");
// ini_hist->Draw();
// ini_hist->Draw("cont0 same");
// ini_hist->ProjectionX("xisect",31,33);
// ini_hist->ProjectionY("yisect",31,33);
// Resulting beam spot
// c1->cd(4)->SetGridx();c1->cd(4)->SetGridy(); // c1->cd(3);
// t1->Draw("save_z>>zhist",Cond);
// zSlice=zhist->GetMean(1);
// t1->Draw("save_y:save_x>>bspot_hist(64,-40,40,64,-40,40)",Cond);
// Title.Form("Muon beam cross section [mm], z=%g [mm]",zSlice);
// bspot_hist->SetTitle(Title);
// bspot_hist->Draw();
// bspot_hist->Draw("cont0 same");
// bspot_hist->ProjectionX("xfsect",31,33);
// bspot_hist->ProjectionY("yfsect",31,33);
// Initial beam spot cross section
// c1->cd(5);
// xisect->SetTitle("x initial cross section [mm]");
// xisect->SetFillStyle(1001);
// xisect->SetFillColor(45);
// xisect->Draw();
// Resulting beam spot cross section
// c1->cd(6);
// xfsect->SetTitle("x cross section [mm]");
// xfsect->SetFillStyle(1001);
// xfsect->SetFillColor(45);
// xfsect->Draw();
}
void VarSlice(const char* fname, char* Var, Int_t Slice, Int_t SubPlot)
{
TH1D *histo;
TTree *t1;
TFile* f1 = new TFile(fname);
t1 = (TTree*) gDirectory->FindObjectAny("t1");
TString Cond,Title,Histo;
Double_t zSlice;
gStyle->SetPalette(1,0);
TCanvas* c1 = new TCanvas("c1", Var);
// c1->Divide(3,5);
c1->cd(SubPlot);
Cond.Form("save_detID== %04d&&save_particleID==-13",Slice);
Histo.Form("%s >> histo",Var);
t1->Draw(Histo,Cond);
histo->SetTitle(Var);
histo->Draw("F");
histo->SetFillStyle(1001);
histo->SetFillColor(kGreen-5);
histo->Draw();
}
void VarxySlice(const char* fname, char* Varx, char* Vary, Int_t Slice, Int_t SubPlot)
{
TH1D *histo;
TTree *t1;
TFile* f1 = new TFile(fname);
TString Cond,Title,Histo;
Double_t zSlice;
t1 = (TTree*) gDirectory->FindObjectAny("t1");
gStyle->SetPalette(1,0);
TCanvas* c1 = new TCanvas("c1", Varx);
// c1->Divide(3,5);
c1->cd(SubPlot);
Cond.Form("save_detID== %04d&&save_particleID==-13",Slice);
Histo.Form("%s:%s >> histo",Vary,Varx);
t1->Draw(Histo,Cond);
histo->SetTitle(Histo);
histo->Draw();
histo->Draw("cont0 same");
}
void Beam_Env(const char* fname, Int_t iSlice, Int_t fSlice)
{
TH2D *bspot_hist;
TTree *t1;
TFile* f1 = new TFile(fname);
TString Cond,Title;
Double_t zSlice,Xrms,Yrms,Xavg,Yavg,Nbins;
Int_t i;
t1 = (TTree*) gDirectory->FindObjectAny("t1");
gStyle->SetPalette(1,0);
TCanvas* c1 = new TCanvas("c1","Polarization and Transmission");
// Initial beam spot
// t1->Draw("muIniPosZ[0]:muIniPosY[0]:muIniPosX[0]>>ini_hist(64,-40,40,64,-40,40)","muIniPolX > -2");
// ini_hist->SetTitle("Muon initial beam cross section [mm]");
// ini_hist->Draw();
// ini_hist->Draw("cont0 same");
// ini_hist->ProjectionX("xisect",31,33);
// ini_hist->ProjectionY("yisect",31,33);
printf("SliceID \t Z \t Xrms \t Yrms \t Xavg \t Yavg \t N\n");
for (i=iSlice; i<=fSlice; i++)
{
// Resulting beam spot
Cond.Form("save_detID==%d&&save_particleID==-13",i);
// Cond.Form("save_detID==%d&& (save_particleID!=22) ",i);
t1->Draw("save_z:save_y:save_x>>bspot_hist(100,-100,100,100,-100,100,100,-2600,1500)",Cond);
// t1->Draw("save_z:save_y:save_x>>bspot_hist(64,-40,40,64,-40,40,100,-290,290)",Cond);
bspot_hist = (TH2D*) gDirectory->Get("bspot_hist");
// Get properties of slice
zSlice=bspot_hist->GetMean(3);
Xrms=bspot_hist->GetRMS(1);
Yrms=bspot_hist->GetRMS(2);
Xavg=bspot_hist->GetMean(1);
Yavg=bspot_hist->GetMean(2);
Nbins=bspot_hist->Integral();
printf("%d\t%10.1f\t%6.2f\t%6.2f\t%6.2f\t%6.2f\t%g\n",i,zSlice,Xrms,Yrms,Xavg,Yavg,Nbins);
// delete bspot_hist;
}
// t1->Draw("save_z:save_y:save_x>>bspot_hist(64,-40,40,64,-40,40,100,-290,290)","save_particleID==-13");
// t1->Draw("save_z:save_y:save_x>>bspot_hist(64,-40,40,64,-40,40,100,-2600,300)","save_particleID==-13");
// bspot_hist->Draw("Iso");
}
void ToF(const char* fname,Int_t SaveID)
{
TTree *t1;
TFile* f1 = new TFile(fname);
TString Cond;
t1 = (TTree*) gDirectory->FindObjectAny("t1");
Cond.Form("save_detID== %03d&&save_particleID==-13",SaveID);
t1->Draw("save_time>>tof",Cond);
// t1->Draw("save_y:save_x>>bspot_hist(64,-40,40,64,-40,40)",Cond);
// f1->Close();
}

View File

@ -1,586 +0,0 @@
#define SiSpect_cxx
#include "SiSpect.h"
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
#include <string>
#include <TROOT.h>
#include <TKey.h>
#include <TFile.h>
#include <TSystem.h>
#include <TTree.h>
/*
To use
TFile* fin=new TFile("data/musr_1021.root");
.L SiSpect.C
SiSpect t
t.CreateIO(1,0.0)
*/
void SiSpect::Loop()
{
}
void SiSpect::CreateIO( Bool_t FigFlag, Double_t eCut )
{
// Double_t eCut = 0.7; //minimum energy deposition in scintillators [MeV]
Bool_t tofFlag = 0;
if (fChain == 0) return;
//DEFINE HISTOGRAMS
TH1F* hEdeposited = new TH1F("hEdeposited","Energy spectrum; E [MeV]", 250,0.,0.5);
TH1F* hEdepositMuI = new TH1F("hEdepositMuI","Energy spectrum Mu/Pos; E [MeV]", 250,0.,0.5);
TH1F* hEdepositMuO = new TH1F("hEdepositMuO","Energy spectrum Mu/Pos; E [MeV]", 250,0.,0.5);
TH1F* hEdepositCF = new TH1F("hEdepositCF","Energy spectrum; E [keV]", 500,0.,20.0);
TH1F* hEdepTrig = new TH1F("hEdepTrig", "Radioactive electron kin. energy",250,0.,2.5);
TH1F* hEdepoTest = new TH1F("hEdepoTest", "Number of events in coincidence", 100,0.,1.);
TH1F* hTof = new TH1F("hTof", "time-of-flight (#mus)", 1000, 0., 1.);
TH2F* hBeamSpot = new TH2F("hBeamSpot", " x,y", 40, -40., 40., 40, -40., 40.);
TH1F* hDetz = new TH1F("hDetz", "z detector [mm]", 100, -40., 40.);
TH1F* hDetzI = new TH1F("hDetzI", "z I detector [mm]", 100, -40., 40.);
TH1F* hDetzO = new TH1F("hDetzO", "z O detector [mm]", 100, -40., 40.);
TH1F* hEventID = new TH1F("hEventID", "Event ID", 10001, -0.5, 10000.5);
// Back inner histogram (501)
TH1F* hBackI = new TH1F("hBackI","Back I (#mus)",1300,0.,13.);
// Forward inner histogram (502)
TH1F* hForwI = new TH1F("hForwI","Forw I (#mus)",1300,0.,13.);
// Top inner histogram (503)
TH1F* hTopI = new TH1F("hTopI","Top I (#mus)",1300,0.,13.);
// Down inner histogram (504)
TH1F* hDownI = new TH1F("hDownI","Down I (#mus)",1300,0.,13.);
// Back outer histogram (601)
TH1F* hBackO = new TH1F("hBackO","Back O (#mus)",1300,0.,13.);
// Forward outer histogram (602)
TH1F* hForwO = new TH1F("hForwO","Forw O (#mus)",1300,0.,13.);
// Top outer histogram (603)
TH1F* hTopO = new TH1F("hTopO","Top O (#mus)",1300,0.,13.);
// Down outer histogram (604)
TH1F* hDownO = new TH1F("hDownO","Down O (#mus)",1300,0.,13.);
Long64_t NFI,NFO,NBI,NBO,NTI,NTO,NDI,NDO;
hEdeposited->Sumw2();
hEdepositCF->Sumw2();
hEdepTrig->Sumw2();
Long64_t nentries = fChain->GetEntriesFast();
//nentries=1000;
printf("nentries = %lld\n",nentries);
Long64_t nbytes = 0, nb = 0;
for (Long64_t jentry=0; jentry<nentries;jentry++) {
tofFlag = 0;
/* Long64_t ientry = LoadTree(jentry);
if (ientry < 0) break;*/
nb = fChain->GetEntry(jentry); nbytes += nb;
// FILL IN HISTOGRAMS
hEdepositCF->Fill(save_ke[0]/1000.);
hBeamSpot->Fill(save_x[0], save_y[0]);
//for (Int_t i=0; i<det_n; i++)
// { if (det_ID[i]==623) { hEdeposited->Fill(save_ke[i]);}
// }
hTof->Fill(muTargetTime);
if (muTargetTime>0.23) tofFlag = 1;
//tofFlag = 1.;
for (Int_t i=0; i<det_n; i++) {
// Only positrons
if (det_ID[i] == 501 && save_particleID[i]==-13) {
hEdepositMuI->Fill(det_edep[i]);
break; //fill only once
}
}
for (Int_t i=0; i<det_n; i++) {
// Only positrons
if (det_ID[i] == 601 && save_particleID[i]==-13) {
hEdepositMuO->Fill(det_edep[i]);
break; //fill only once
}
}
// Hist in Back I detector (501)
for (Int_t i=0; i<det_n; i++) {
// Only positrons
if (det_ID[i] == 501 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
hBackI->Fill(det_time_start[i]);
hDetz->Fill(det_z[i]);
hDetzI->Fill(det_z[i]);
hEventID->Fill(eventID);
break; //fill only once
}
}
}
// Hist in Forw I detector (502)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i] == 502 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
hForwI->Fill(det_time_start[i]);
hDetz->Fill(det_z[i]);
hDetzI->Fill(det_z[i]);
hEventID->Fill(eventID);
break; //fill only once
}
}
}
// Hist in Top I detector (503)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i] == 503 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
hTopI->Fill(det_time_start[i]);
hDetz->Fill(det_z[i]);
hDetzI->Fill(det_z[i]);
hEventID->Fill(eventID);
break; //fill only once
}
}
}
// Hist in Down I detector (504)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i] == 504 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
hDownI->Fill(det_time_start[i]);
hDetz->Fill(det_z[i]);
hDetzI->Fill(det_z[i]);
hEventID->Fill(eventID);
break; //fill only once
}
}
}
// Hist in Back O detector (601)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i] == 601 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
// Only positrons
if (det_edep[i]>eCut){
hBackO->Fill(det_time_start[i]);
hDetz->Fill(det_z[i]);
hDetzO->Fill(det_z[i]);
hEventID->Fill(eventID);
break; //fill only once
}
}
}
// Hist in Forw O detector (602)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i] == 602 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
hForwO->Fill(det_time_start[i]);
hDetz->Fill(det_z[i]);
hDetzO->Fill(det_z[i]);
hEventID->Fill(eventID);
break; //fill only once
}
}
}
// Hist in Top O detector (603)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i] == 603 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
hTopO->Fill(det_time_start[i]);
hDetz->Fill(det_z[i]);
hDetzO->Fill(det_z[i]);
hEventID->Fill(eventID);
break; //fill only once
}
}
}
// Hist in Down O detector (604)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i] == 604 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
hDownO->Fill(det_time_start[i]);
hDetz->Fill(det_z[i]);
hDetzO->Fill(det_z[i]);
hEventID->Fill(eventID);
break; //fill only once
}
}
}
}
// Calculate Asymmetry
// Temporary F and B histograms
TH1F *hFtemp = (TH1F*) hForwI->Clone(); hFtemp->SetName("hFtemp");
TH1F *hBtemp = (TH1F*) hBackI->Clone(); hBtemp->SetName("hBtemp");
// Sum and difference F and B
TH1F *hSumFB = (TH1F*) hForwI->Clone(); hSumFB->SetName("hSumFB");
hSumFB->Sumw2();
TH1F *hDifFB = (TH1F*) hForwI->Clone(); hDifFB->SetName("hDifFB");
hDifFB->Sumw2();
// Asymmetry histograms!
TH1F *hAsyFB = (TH1F*) hForwI->Clone(); hAsyFB->SetName("hAsyFB");
hAsyFB->SetTitle("Muon decay asymmetry F-B; Time (#mus); Asymmetry");
hAsyFB->Sumw2();
// Calculate difference and sum, then divide
hDifFB->Add(hFtemp,hBtemp,1.,-1.);
hSumFB->Add(hFtemp,hBtemp,1., 1.);
hAsyFB->Divide(hDifFB,hSumFB,1.,1.);
if (FigFlag) {
TCanvas* c1= new TCanvas("c1","canvas 1");
c1->Divide(3,2);
c1->cd(1);
hForwI->Draw();
hForwI->SetLineColor(kBlack);
hBackI->Draw("sames");
hBackI->SetLineColor(kRed);
// hBackI->SetX1NDC(10);
// hBackI->SetX2NDC(20);
hTopI->Draw("sames");
hTopI->SetLineColor(kGreen);
hDownI->Draw("sames");
hDownI->SetLineColor(kBlue);
gStyle->SetOptStat("ne");
c1->cd(2);
hForwO->Draw();
hForwO->SetLineColor(kBlack);
hBackO->Draw("sames");
hBackO->SetLineColor(kRed);
hTopO->Draw("sames");
hTopO->SetLineColor(kGreen);
hDownO->Draw("sames");
hDownO->SetLineColor(kBlue);
gStyle->SetOptStat("ne");
c1->cd(3);
hAsyFB->Draw();
hAsyFB -> Fit("pol0","Q","",0.6, 13.);
gStyle->SetOptStat(1001111);
gStyle->SetOptFit(0001);
gStyle->SetLineColor(2);
c1->cd(4);
hEdeposited->Draw();
hEdepositMuO->Draw("sames");
hEdepositMuO->SetLineColor(kRed);
hEdepositMuI->Draw("sames");
hEdeposited->SetLineColor(kGreen);
//gStyle->SetOptStat("nemr");
c1->cd(5);
hDetz->Draw();
hDetzI->Draw("sames");
hDetzI->SetLineColor(kRed);
hDetzO->Draw("sames");
hDetzO->SetLineColor(kGreen);
} else {
hAsyFB -> Fit("pol0","NQ","",0.6, 13.);
}
TF1 *pol0;
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
Double_t chi2=pol0->GetChisquare();
Double_t p1=pol0->GetParameter(0);
Double_t e1=pol0->GetParError(0);
// printf("Chi=%g\tP1=%g +/- %g\n",chi2,p1,e1);
printf("%g\t%g\t%g\n",p1,e1,chi2);
}
void SiSpect::CoinIO( Bool_t FigFlag, Double_t eCut )
{
// Double_t eCut = 0.7; //minimum energy deposition in scintillators [MeV]
Bool_t tofFlag = 0;
if (fChain == 0) return;
//DEFINE HISTOGRAMS
TH1F* hEdeposited = new TH1F("hEdeposited","Energy spectrum; E [MeV]", 250,0.,0.5);
TH1F* hEdepositMu = new TH1F("hEdepositMuI","Energy spectrum Mu/Pos; E [MeV]", 250,0.,0.5);
TH1F* hEdepositCF = new TH1F("hEdepositCF","Energy spectrum; E [keV]", 500,0.,20.0);
TH1F* hEdepTrig = new TH1F("hEdepTrig", "Radioactive electron kin. energy",250,0.,2.5);
TH1F* hEdepoTest = new TH1F("hEdepoTest", "Number of events in coincidence", 100,0.,1.);
TH1F* hTof = new TH1F("hTof", "time-of-flight (#mus)", 1000, 0., 1.);
TH2F* hBeamSpot = new TH2F("hBeamSpot", " x,y", 40, -40., 40., 40, -40., 40.);
TH1F* hDetz = new TH1F("hDetz", "z detector [mm]", 100, -40., 40.);
TH1F* hEventID = new TH1F("hEventID", "Event ID", 10001, -0.5, 10000.5);
TH2F* hMuIxy = new TH2F("hMuIxy", " x,y", 40, -40., 40., 40, -40., 40.);
TH2F* hMuOxy = new TH2F("hMuOxy", " x,y", 40, -40., 40., 40, -40., 40.);
TH2F* hMuIOxy = new TH2F("hMuIOxy", " x,y", 40, -40., 40., 40, -40., 40.);
TH2F* hMuSamxy = new TH2F("hMuIOxy", " x,y", 40, -40., 40., 40, -40., 40.);
// Back histogram, i.e. all counts in coincedence 501-601
TH1F* hBack = new TH1F("hBack","Back (#mus)",130,0.,13.);
// Forward histogram, i.e. all counts in coincedence 502-602
TH1F* hForw = new TH1F("hForw","Forw (#mus)",130,0.,13.);
// Top histogram, i.e. all counts in coincedence 503-603
TH1F* hTop = new TH1F("hTop","Top (#mus)",130,0.,13.);
// Down histogram, i.e. all counts in coincedence 504-604
TH1F* hDown = new TH1F("hDown","Down (#mus)",130,0.,13.);
// Mu counter, i.e. all counts in coincedence 501-601
TH1F* hMu = new TH1F("hMu","Muons (#mus)",130,0.,13.);
Double_t xo,yo,zo,xi,yi,zi,xs,ys,zs;
// Sample position
zs = 0.0;
hEdeposited->Sumw2();
hEdepositCF->Sumw2();
hEdepTrig->Sumw2();
Long64_t nentries = fChain->GetEntriesFast();
/* nentries=50000;*/
Long64_t nbytes = 0, nb = 0;
for (Long64_t jentry=0; jentry<nentries;jentry++) {
tofFlag = 0;
/* Long64_t ientry = LoadTree(jentry);
if (ientry < 0) break;*/
nb = fChain->GetEntry(jentry); nbytes += nb;
// FILL IN HISTOGRAMS
hEdepositCF->Fill(save_ke[0]/1000.);
hBeamSpot->Fill(save_x[0], save_y[0]);
//for (Int_t i=0; i<det_n; i++)
// { if (det_ID[i]==623) { hEdeposited->Fill(save_ke[i]);}
// }
hTof->Fill(muTargetTime);
if (muTargetTime>0.23) tofFlag = 1;
//tofFlag = 1.;
// Hist in Muon detector (501) coincidence (601)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i]==501 && save_particleID[i]==-13) {
// Mu outer hit
xo=det_x[i];
yo=det_y[i];
zo=det_z[i];
hMuOxy->Fill(xo, yo);
// printf("Outer: %6.2f\t%6.2f\n",xo,yo);
hEdepositMu->Fill(det_edep[i]);
for (Int_t j=0; j<det_n; j++){
if (det_ID[j]==601 && save_particleID[j]==-13) {
printf("Inner %d\t%d\n",det_ID[j] ,save_particleID[j]);
//printf("Inner\n");
// Mu inner hit
xi=det_x[j];
yi=det_y[j];
zi=det_z[j];
hMuIxy->Fill(xi, yi);
hEdepositMu->Fill(det_edep[j]);
hMu->Fill(det_time_start[j]);
hDetz->Fill(det_z[j]);
hEventID->Fill(eventID);
// Propagate Mu trajectory on sample
xs=xi+((xi-xo)/(zi-zo))*(zs-zi);
ys=yi+((yi-yo)/(zi-zo))*(zs-zi);
hMuIOxy->Fill(xs-save_x[j], ys-save_y[j]);
hMuSamxy->Fill(save_x[j], save_y[j]);
// printf("%6.2f\t%6.2f\n",xs,ys);
break; //fill only once
}
}
}
//printf("\n");
}
// Hist in Back detector (501) coincidence (601)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i]==501 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
for (Int_t j=0; j<det_n; j++){
if (det_ID[j]==601 && save_particleID[j]==22) {
hEdeposited->Fill(det_edep[j]);
if (det_edep[j]>eCut){
hBack->Fill(det_time_start[j]);
hDetz->Fill(det_z[j]);
hEventID->Fill(eventID);
}
break; //fill only once
}
}
}
}
}
// Hist in Forw detector (502) coincidence (602)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i]==502 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
for (Int_t j=0; j<det_n; j++){
if (det_ID[j]==602 && save_particleID[j]==22) {
if (det_edep[j]>eCut){
hForw->Fill(det_time_start[j]);
hDetz->Fill(det_z[j]);
hEventID->Fill(eventID);
}
break; //fill only once
}
}
}
}
}
// Hist in Top detector (503) coincidence (603)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i]==503 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
for (Int_t j=0; j<det_n; j++){
if (det_ID[j]==603 && save_particleID[j]==22) {
if (det_edep[j]>eCut){
hTop->Fill(det_time_start[j]);
hDetz->Fill(det_z[j]);
hEventID->Fill(eventID);
}
break; //fill only once
}
}
}
}
}
// Hist in Down detector (504) coincidence (604)
for (Int_t i=0; i<det_n; i++) {
if (det_ID[i]==504 && save_particleID[i]==22) {
hEdeposited->Fill(det_edep[i]);
if (det_edep[i]>eCut){
for (Int_t j=0; j<det_n; j++){
if (det_ID[j]==604 && save_particleID[j]==22) {
if (det_edep[j]>eCut){
hDown->Fill(det_time_start[j]);
hDetz->Fill(det_z[j]);
hEventID->Fill(eventID);
}
break; //fill only once
}
}
}
}
}
}
// Calculate Asymmetry
// Temporary F and B histograms
TH1F *hFtemp = (TH1F*) hForw->Clone(); hFtemp->SetName("hFtemp");
TH1F *hBtemp = (TH1F*) hBack->Clone(); hBtemp->SetName("hBtemp");
// Temporary T and D histograms
TH1F *hTtemp = (TH1F*) hTop->Clone(); hTtemp->SetName("hTtemp");
TH1F *hDtemp = (TH1F*) hDown->Clone(); hDtemp->SetName("hDtemp");
// Sum and difference F and B
TH1F *hSumFB = (TH1F*) hForw->Clone(); hSumFB->SetName("hSumFB");
hSumFB->Sumw2();
TH1F *hDifFB = (TH1F*) hForw->Clone(); hDifFB->SetName("hDifFB");
hDifFB->Sumw2();
// Sum and difference T and D
TH1F *hSumTD = (TH1F*) hTop->Clone(); hSumTD->SetName("hSumTD");
hSumTD->Sumw2();
TH1F *hDifTD = (TH1F*) hDown->Clone(); hDifTD->SetName("hDifTD");
hDifTD->Sumw2();
// Asymmetry histograms!
TH1F *hAsyFB = (TH1F*) hForw->Clone(); hAsyFB->SetName("hAsyFB");
hAsyFB->SetTitle("Muon decay asymmetry F-B; Time (#mus); Asymmetry");
hAsyFB->Sumw2();
TH1F *hAsyTD = (TH1F*) hTop->Clone(); hAsyTD->SetName("hAsyTD");
hAsyTD->SetTitle("Muon decay asymmetry T-D; Time (#mus); Asymmetry");
hAsyTD->Sumw2();
// Calculate difference and sum, then divide
hDifFB->Add(hFtemp,hBtemp,1.,-1.);
hSumFB->Add(hFtemp,hBtemp,1., 1.);
hAsyFB->Divide(hDifFB,hSumFB,1.,1.);
hDifTD->Add(hTtemp,hDtemp,1.,-1.);
hSumTD->Add(hTtemp,hDtemp,1., 1.);
hAsyTD->Divide(hDifTD,hSumTD,1.,1.);
if (FigFlag) {
TCanvas* c1= new TCanvas("c1","canvas 1");
c1->Divide(3,3);
c1->cd(1);
hBack->Draw();
hBack->SetLineColor(kBlack);
hForw->Draw("sames");
hForw->SetLineColor(kRed);
hTop->Draw("sames");
hTop->SetLineColor(kGreen);
hDown->Draw("sames");
hDown->SetLineColor(kBlue);
c1->cd(2);
hAsyFB->Draw();
hAsyFB -> Fit("pol0","Q","",0.1, 13.);
gStyle->SetOptStat(1001111);
gStyle->SetOptFit(0001);
gStyle->SetLineColor(2);
hAsyTD->Draw("sames");
hAsyTD -> Fit("pol0","Q","",0.1, 13.);
gStyle->SetOptStat(1001111);
gStyle->SetOptFit(0001);
gStyle->SetLineColor(2);
c1->cd(3);
hDetz->Draw();
c1->cd(4);
hMu->Draw();
c1->cd(5);
hEdeposited->Draw();
hEdepositMu->Draw("sames");
hEdepositMu->SetLineColor(kRed);
/* det_edep_pos->Draw("sames");
det_edep_pos->SetLineColor(kGreen);
det_edep_mup->Draw("sames");
det_edep_mup->SetLineColor(kPink);*/
c1->cd(6);
hMuIOxy->Draw();
hMuIOxy->Draw("cont0 same");
c1->cd(7);
hMuSamxy->Draw();
hMuSamxy->Draw("cont0 same");
} else {
hAsyFB -> Fit("pol0","NQ","",0.1, 13.);
}
TF1 *pol0;
pol0 = (TF1*)gROOT->GetListOfFunctions()->FindObject("pol0");
Double_t chi2=pol0->GetChisquare();
Double_t p1=pol0->GetParameter(0);
Double_t e1=pol0->GetParError(0);
Double_t NDet=hDetz->GetSum();
// printf("Chi=%g\tP1=%g +/- %g\n",chi2,p1,e1);
//printf("%g\t%g\t%g\t%g\n",p1,e1,chi2,NDet);
Double_t NhF = hBack->GetEntries();
Double_t NhB = hForw->GetEntries();
Double_t asymFB = (NhB-NhF)/(NhB+NhF);
Double_t NhT = hTop->GetEntries();
Double_t NhD = hDown->GetEntries();
Double_t asymTD = (NhT-NhD)/(NhT+NhD);
cout << "FB Asymmetry = " << asymFB << endl;
cout << "TD Asymmetry = " << asymTD << endl;
}
/*
ax=(x2-x1)/(z2-z1)
ay=(y2-y1)/(z2-z1)
x3=x2+ax*(z3-z2)
y3=y2+ay*(x3-z2)
*/

View File

@ -1,306 +0,0 @@
//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Fri Oct 26 16:55:39 2007 by ROOT version 5.08/00
// from TTree t1/a simple Tree with simple variables
// found on file: musr_200003.root
//////////////////////////////////////////////////////////
#ifndef SiSpect_h
#define SiSpect_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
class SiSpect {
public :
TTree *fChain; //!pointer to the analyzed TTree or TChain
Int_t fCurrent; //!current Tree number in a TChain
// Declaration of leave types
Int_t runID;
Int_t eventID;
Double_t BFieldAtDecay_Bx;
Double_t BFieldAtDecay_By;
Double_t BFieldAtDecay_Bz;
Double_t BFieldAtDecay_B3;
Double_t BFieldAtDecay_B4;
Double_t BFieldAtDecay_B5;
Double_t muIniPosX;
Double_t muIniPosY;
Double_t muIniPosZ;
Double_t muIniMomX;
Double_t muIniMomY;
Double_t muIniMomZ;
Double_t muIniPolX;
Double_t muIniPolY;
Double_t muIniPolZ;
Int_t muDecayDetID;
Double_t muDecayPosX;
Double_t muDecayPosY;
Double_t muDecayPosZ;
Double_t muDecayTime;
Double_t muDecayPolX;
Double_t muDecayPolY;
Double_t muDecayPolZ;
Double_t muTargetTime;
Double_t muTargetPolX;
Double_t muTargetPolY;
Double_t muTargetPolZ;
Double_t fieldNomVal;
Int_t det_n;
Int_t det_ID[100]; //[det_n]
Double_t det_edep[100]; //[det_n]
Int_t det_nsteps[100]; //[det_n]
Double_t det_length[100]; //[det_n]
Double_t det_time_start[100]; //[det_n]
Double_t det_time_end[100]; //[det_n]
Double_t det_x[100]; //[det_n]
Double_t det_y[100]; //[det_n]
Double_t det_z[100]; //[det_n]
Int_t save_n;
Int_t save_detID[100]; //[save_n]
Int_t save_particleID[100]; //[save_n]
Double_t save_ke[100]; //[save_n]
Double_t save_x[100]; //[save_n]
Double_t save_y[100]; //[save_n]
Double_t save_z[100]; //[save_n]
Double_t save_px[100]; //[save_n]
Double_t save_py[100]; //[save_n]
Double_t save_pz[100]; //[save_n]
// List of branches
TBranch *b_runID; //!
TBranch *b_eventID; //!
TBranch *b_BFieldAtDecay; //!
TBranch *b_muIniPosX; //!
TBranch *b_muIniPosY; //!
TBranch *b_muIniPosZ; //!
TBranch *b_muIniMomX; //!
TBranch *b_muIniMomY; //!
TBranch *b_muIniMomZ; //!
TBranch *b_muIniPolX; //!
TBranch *b_muIniPolY; //!
TBranch *b_muIniPolZ; //!
TBranch *b_muDecayDetID; //!
TBranch *b_muDecayPosX; //!
TBranch *b_muDecayPosY; //!
TBranch *b_muDecayPosZ; //!
TBranch *b_muDecayTime; //!
TBranch *b_muDecayPolX; //!
TBranch *b_muDecayPolY; //!
TBranch *b_muDecayPolZ; //!
TBranch *b_muTargetTime; //!
TBranch *b_muTargetPolX; //!
TBranch *b_muTargetPolY; //!
TBranch *b_muTargetPolZ; //!
TBranch *b_fieldNomVal; //!
TBranch *b_det_n; //!
TBranch *b_det_ID; //!
TBranch *b_det_edep; //!
TBranch *b_det_nsteps; //!
TBranch *b_det_length; //!
TBranch *b_det_time_start; //!
TBranch *b_det_time_end; //!
TBranch *b_det_x; //!
TBranch *b_det_y; //!
TBranch *b_det_z; //!
TBranch *b_save_n; //!
TBranch *b_save_detID; //!
TBranch *b_save_particleID; //!
TBranch *b_save_ke; //!
TBranch *b_save_x; //!
TBranch *b_save_y; //!
TBranch *b_save_z; //!
TBranch *b_save_px; //!
TBranch *b_save_py; //!
TBranch *b_save_pz; //!
SiSpect(TTree *tree=0);
virtual ~SiSpect();
virtual Int_t Cut(Long64_t entry);
virtual Int_t GetEntry(Long64_t entry);
virtual Long64_t LoadTree(Long64_t entry);
virtual void Init(TTree *tree);
virtual void Loop();
virtual Bool_t Notify();
virtual void Show(Long64_t entry = -1);
virtual void CreateIO(Bool_t FigFlag, Double_t eCut );
virtual void CoinIO( Bool_t FigFlag, Double_t eCut );
};
#endif
#ifdef SiSpect_cxx
SiSpect::SiSpect(TTree *tree)
{
// if parameter tree is not specified (or zero), connect the file
// used to generate this class and read the Tree.
if (tree == 0) {
//TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("data/lem4_1049.root");
//if (!f) {
//f = new TFile("musr_200003.root");
// f = new TFile("data/lem4_1051.root"); //1049
//}
tree = (TTree*)gDirectory->Get("t1");
}
Init(tree);
}
SiSpect::~SiSpect()
{
if (!fChain) return;
delete fChain->GetCurrentFile();
}
Int_t SiSpect::GetEntry(Long64_t entry)
{
// Read contents of entry.
if (!fChain) return 0;
return fChain->GetEntry(entry);
}
Long64_t SiSpect::LoadTree(Long64_t entry)
{
// Set the environment to read one entry
if (!fChain) return -5;
Long64_t centry = fChain->LoadTree(entry);
if (centry < 0) return centry;
if (fChain->IsA() != TChain::Class()) return centry;
TChain *chain = (TChain*)fChain;
if (chain->GetTreeNumber() != fCurrent) {
fCurrent = chain->GetTreeNumber();
Notify();
}
return centry;
}
void SiSpect::Init(TTree *tree)
{
// The Init() function is called when the selector needs to initialize
// a new tree or chain. Typically here the branch addresses of the tree
// will be set. It is normaly not necessary to make changes to the
// generated code, but the routine can be extended by the user if needed.
// Init() will be called many times when running with PROOF.
// Set branch addresses
if (tree == 0) return;
fChain = tree;
fCurrent = -1;
fChain->SetMakeClass(1);
fChain->SetBranchAddress("runID",&runID);
fChain->SetBranchAddress("eventID",&eventID);
fChain->SetBranchAddress("BFieldAtDecay",&BFieldAtDecay_Bx);
fChain->SetBranchAddress("muIniPosX",&muIniPosX);
fChain->SetBranchAddress("muIniPosY",&muIniPosY);
fChain->SetBranchAddress("muIniPosZ",&muIniPosZ);
fChain->SetBranchAddress("muIniMomX",&muIniMomX);
fChain->SetBranchAddress("muIniMomY",&muIniMomY);
fChain->SetBranchAddress("muIniMomZ",&muIniMomZ);
fChain->SetBranchAddress("muIniPolX",&muIniPolX);
fChain->SetBranchAddress("muIniPolY",&muIniPolY);
fChain->SetBranchAddress("muIniPolZ",&muIniPolZ);
fChain->SetBranchAddress("muDecayDetID",&muDecayDetID);
fChain->SetBranchAddress("muDecayPosX",&muDecayPosX);
fChain->SetBranchAddress("muDecayPosY",&muDecayPosY);
fChain->SetBranchAddress("muDecayPosZ",&muDecayPosZ);
fChain->SetBranchAddress("muDecayTime",&muDecayTime);
fChain->SetBranchAddress("muDecayPolX",&muDecayPolX);
fChain->SetBranchAddress("muDecayPolY",&muDecayPolY);
fChain->SetBranchAddress("muDecayPolZ",&muDecayPolZ);
fChain->SetBranchAddress("muTargetTime",&muTargetTime);
fChain->SetBranchAddress("muTargetPolX",&muTargetPolX);
fChain->SetBranchAddress("muTargetPolY",&muTargetPolY);
fChain->SetBranchAddress("muTargetPolZ",&muTargetPolZ);
fChain->SetBranchAddress("fieldNomVal",&fieldNomVal);
fChain->SetBranchAddress("det_n",&det_n);
fChain->SetBranchAddress("det_ID",det_ID);
fChain->SetBranchAddress("det_edep",det_edep);
fChain->SetBranchAddress("det_nsteps",det_nsteps);
fChain->SetBranchAddress("det_length",det_length);
fChain->SetBranchAddress("det_time_start",det_time_start);
fChain->SetBranchAddress("det_time_end",det_time_end);
fChain->SetBranchAddress("det_x",det_x);
fChain->SetBranchAddress("det_y",det_y);
fChain->SetBranchAddress("det_z",det_z);
fChain->SetBranchAddress("save_n", &save_n, &b_save_n);
fChain->SetBranchAddress("save_detID", save_detID, &b_save_detID);
fChain->SetBranchAddress("save_particleID", save_particleID, &b_save_particleID);
fChain->SetBranchAddress("save_ke", save_ke, &b_save_ke);
fChain->SetBranchAddress("save_x", save_x, &b_save_x);
fChain->SetBranchAddress("save_y", save_y, &b_save_y);
fChain->SetBranchAddress("save_z", save_z, &b_save_z);
fChain->SetBranchAddress("save_px", save_px, &b_save_px);
fChain->SetBranchAddress("save_py", save_py, &b_save_py);
fChain->SetBranchAddress("save_pz", save_pz, &b_save_pz);
Notify();
}
Bool_t SiSpect::Notify()
{
// The Notify() function is called when a new file is opened. This
// can be either for a new TTree in a TChain or when when a new TTree
// is started when using PROOF. Typically here the branch pointers
// will be retrieved. It is normaly not necessary to make changes
// to the generated code, but the routine can be extended by the
// user if needed.
// Get branch pointers
b_runID = fChain->GetBranch("runID");
b_eventID = fChain->GetBranch("eventID");
b_BFieldAtDecay = fChain->GetBranch("BFieldAtDecay");
b_muIniPosX = fChain->GetBranch("muIniPosX");
b_muIniPosY = fChain->GetBranch("muIniPosY");
b_muIniPosZ = fChain->GetBranch("muIniPosZ");
b_muIniMomX = fChain->GetBranch("muIniMomX");
b_muIniMomY = fChain->GetBranch("muIniMomY");
b_muIniMomZ = fChain->GetBranch("muIniMomZ");
b_muIniPolX = fChain->GetBranch("muIniPolX");
b_muIniPolY = fChain->GetBranch("muIniPolY");
b_muIniPolZ = fChain->GetBranch("muIniPolZ");
b_muDecayDetID = fChain->GetBranch("muDecayDetID");
b_muDecayPosX = fChain->GetBranch("muDecayPosX");
b_muDecayPosY = fChain->GetBranch("muDecayPosY");
b_muDecayPosZ = fChain->GetBranch("muDecayPosZ");
b_muDecayTime = fChain->GetBranch("muDecayTime");
b_muDecayPolX = fChain->GetBranch("muDecayPolX");
b_muDecayPolY = fChain->GetBranch("muDecayPolY");
b_muDecayPolZ = fChain->GetBranch("muDecayPolZ");
b_muTargetTime = fChain->GetBranch("muTargetTime");
b_muTargetPolX = fChain->GetBranch("muTargetPolX");
b_muTargetPolY = fChain->GetBranch("muTargetPolY");
b_muTargetPolZ = fChain->GetBranch("muTargetPolZ");
b_fieldNomVal = fChain->GetBranch("fieldNomVal");
b_det_n = fChain->GetBranch("det_n");
b_det_ID = fChain->GetBranch("det_ID");
b_det_edep = fChain->GetBranch("det_edep");
b_det_nsteps = fChain->GetBranch("det_nsteps");
b_det_length = fChain->GetBranch("det_length");
b_det_time_start = fChain->GetBranch("det_time_start");
b_det_time_end = fChain->GetBranch("det_time_end");
b_det_x = fChain->GetBranch("det_x");
b_det_y = fChain->GetBranch("det_y");
b_det_z = fChain->GetBranch("det_z");
return kTRUE;
}
void SiSpect::Show(Long64_t entry)
{
// Print contents of entry.
// If entry is not specified, print current entry
if (!fChain) return;
fChain->Show(entry);
}
Int_t SiSpect::Cut(Long64_t entry)
{
// This function may be called from Loop.
// returns 1 if entry is accepted.
// returns -1 otherwise.
return 1;
}
#endif // #ifdef SiSpect_cxx

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,65 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
#/vis/open VRML2FILE
/vis/open OGLIX 600x600-0+0
#*/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
#/vis/viewer/set/style surface
#/vis/viewer/zoom 0.5
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 0.8 0.5
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 0.7 0.7 0 1
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 0.3 1.0 0 0.5
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush
/vis/reviewKeptEvents

View File

@ -1,70 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
#/vis/open VRML2FILE
#*/vis/open OGLIX 600x600-0+0
/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
#/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/viewpointThetaPhi 80 30
#/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
/vis/viewer/set/style surface
/vis/viewer/zoom 0.8
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
#cks
#/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
#/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
#/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 1 1 1 0
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA gamma 0 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e- 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 1 1 1 0 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 1 1 1 0.5
#/vis/modeling/trajectories/drawByParticleID-0/set nu_e white
#/vis/modeling/trajectories/drawByParticleID-0/set anti_nu_mu white
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush

View File

@ -1,63 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
#/vis/open VRML2FILE
#*/vis/open OGLIX 600x600-0+0
/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
#/vis/viewer/set/style surface
#/vis/viewer/zoom 0.5
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
#/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 0.8 0.5
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 0.7 0.7 0 1
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 0.3 1.0 0 0.5
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush

View File

@ -1,63 +0,0 @@
# This is a macro file for visualizing G4 events.
# It can either be included in another macro or called with /control/exec vis.mac
# Create an OpenGL driver (i.e. a scene handler and viewer)
# Some useful choices: VRML2FILE, OGLSX, OGLIX, DAWNFILE, etc.
/vis/open VRML2FILE
#*/vis/open OGLIX 600x600-0+0
#/vis/open DAWNFILE
# To calculate volumes and masses uncomment the next two lines
#*/vis/open ATree
#*/vis/ASCIITree/verbose 4
# Create a new empty scene and attach it to handler
/vis/scene/create
# Add world volume, trajectories and hits to the scene
/vis/scene/add/volume
/vis/scene/add/trajectories
/vis/scene/add/hits
/vis/sceneHandler/attach
# Configure the viewer (optional)
/vis/viewer/set/viewpointThetaPhi 235 -45
/vis/viewer/set/lightsThetaPhi 120 60
#/vis/viewer/set/hiddenEdge true
#/vis/viewer/set/style surface
#/vis/viewer/zoom 0.5
# Style: s - surface, w - wireframe
# Note: "surface style" and "hiddenEdge true" remove transparency!
# Other viewpoints (25 55) (235 -45) (125 35)
# Store trajectory information for visualisation (set to 0 if too many tracks cause core dump)
/tracking/storeTrajectory 1
#At the end of each event (default behaviour)
#/vis/scene/endOfEventAction refresh
#At the end of run of X events - Data from X events will be superimposed
/vis/scene/endOfEventAction accumulate
#At the end of Y runs - Data from Y runs will be superimposed
/vis/scene/endOfRunAction accumulate
# Coloured trajectories for an easier particle identification:
# PDG IDs and colours: e- 11 red, e+ -11 blue, nu_e 12 yellow,
# mu+ -13 magenta, anti_nu_mu -14 green, gamma 22 grey
#
#/vis/modeling/trajectories/create/drawByCharge
#/vis/modeling/trajectories/drawByCharge-0/set 1 cyan
/vis/modeling/trajectories/create/drawByParticleID
#*/vis/modeling/trajectories/drawByParticleID-0/set gamma grey
/vis/modeling/trajectories/drawByParticleID-0/setRGBA mu+ 1 0 1 1
/vis/modeling/trajectories/drawByParticleID-0/setRGBA e+ 0 0 0.8 0.5
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA nu_e 0.7 0.7 0 1
#*/vis/modeling/trajectories/drawByParticleID-0/setRGBA anti_nu_mu 0.3 1.0 0 0.5
# Verbosity of hits
#/hits/verbose 2
# Output just the detector geometry
/vis/viewer/flush