Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7089e4b3d6 | |||
| 7de55705d2 | |||
| 56f094dad0 | |||
| cab8703f85 | |||
| 72c085a0a8 | |||
| 113996aa4e | |||
| cb0e8d2e65 | |||
| 0dc1c4d975 | |||
| 21213a45eb | |||
| e6e951e8f4 | |||
| 551fa4e4a6 | |||
| 6d61cfd4d9 | |||
| cc8ac60713 | |||
| 1372a8b782 | |||
| 27607a2fa1 | |||
| 88b4e7600d | |||
| 01ce90e97e | |||
| 457adc7e7e | |||
| 90fb81f16a | |||
| bfd7229252 | |||
| f9581ae9d5 | |||
| cd785b8e5d | |||
| 9cc9792054 | |||
| ad9cf0abf9 | |||
| 5dcc962351 | |||
| 386217b1fe | |||
| 12c2e5f7a4 | |||
| daef50e35a | |||
| 04fff97704 | |||
| 20d9794db2 | |||
| ba7665c85f | |||
| 32cf3221d9 | |||
| 6ef53c6b6a | |||
| 18424fe149 | |||
| 6747e5c1ca |
126
CMakeLists.txt
@@ -5,7 +5,7 @@ if (CMAKE_VERSION GREATER_EQUAL 3.12)
|
||||
cmake_policy(SET CMP0075 NEW)
|
||||
endif (CMAKE_VERSION GREATER_EQUAL 3.12)
|
||||
|
||||
project(musrfit VERSION 1.6.4 LANGUAGES C CXX)
|
||||
project(musrfit VERSION 1.7.0 LANGUAGES C CXX)
|
||||
|
||||
#--- musrfit specific options -------------------------------------------------
|
||||
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
||||
@@ -83,7 +83,12 @@ if (ROOT_mathmore_FOUND)
|
||||
endif (ROOT_mathmore_FOUND)
|
||||
|
||||
#--- check for boost ----------------------------------------------------------
|
||||
find_package(Boost REQUIRED)
|
||||
find_package(Boost REQUIRED
|
||||
COMPONENTS
|
||||
system
|
||||
filesystem
|
||||
)
|
||||
message(STATUS "Boost libs: ${Boost_LIBRARIES}")
|
||||
|
||||
#--- check for gsl ------------------------------------------------------------
|
||||
find_package(GSL REQUIRED)
|
||||
@@ -113,49 +118,60 @@ endif (try_OpenMP AND NOT APPLE)
|
||||
if (qt_based_tools)
|
||||
# check for any Qt, i.e. AUTO
|
||||
if (qt_version STREQUAL AUTO)
|
||||
# first try Qt5
|
||||
# Find the QtCore library
|
||||
find_package(Qt5Core)
|
||||
if (Qt5Core_FOUND)
|
||||
# Find the QtWidgets library
|
||||
find_package(Qt5Widgets CONFIG REQUIRED)
|
||||
# Find the QtXml library
|
||||
find_package(Qt5Xml CONFIG REQUIRED)
|
||||
# Find the QtNetwork library
|
||||
find_package(Qt5Network CONFIG REQUIRED)
|
||||
# Find the QtSvg library
|
||||
find_package(Qt5Svg CONFIG REQUIRED)
|
||||
# Fing the QtPrintSupport
|
||||
find_package(Qt5PrintSupport CONFIG REQUIRED)
|
||||
endif (Qt5Core_FOUND)
|
||||
# try Qt6
|
||||
find_package(Qt6Core)
|
||||
if (Qt6Core_FOUND)
|
||||
find_package(Qt6Widgets CONFIG REQUIRED)
|
||||
find_package(Qt6Xml CONFIG REQUIRED)
|
||||
find_package(Qt6Network CONFIG REQUIRED)
|
||||
find_package(Qt6Svg CONFIG REQUIRED)
|
||||
find_package(Qt6PrintSupport CONFIG REQUIRED)
|
||||
endif (Qt6Core_FOUND)
|
||||
# try Qt5
|
||||
if (NOT Qt6Core_FOUND)
|
||||
find_package(Qt5Core)
|
||||
if (Qt5Core_FOUND)
|
||||
find_package(Qt5Widgets CONFIG REQUIRED)
|
||||
find_package(Qt5Xml CONFIG REQUIRED)
|
||||
find_package(Qt5Network CONFIG REQUIRED)
|
||||
find_package(Qt5Svg CONFIG REQUIRED)
|
||||
find_package(Qt5PrintSupport CONFIG REQUIRED)
|
||||
endif (Qt5Core_FOUND)
|
||||
endif (NOT Qt6Core_FOUND)
|
||||
|
||||
# if Qt5 is not found, try Qt4
|
||||
if (NOT Qt5Core_FOUND)
|
||||
# if Qt6 and Qt5 is not found, try Qt4
|
||||
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND)
|
||||
find_package(Qt4 COMPONENTS QtGui QtWebKit QtXml)
|
||||
endif (NOT Qt5Core_FOUND)
|
||||
endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND)
|
||||
|
||||
# if Qt5 and Qt4 is not found try Qt3. Hopefully you never reach this point
|
||||
if (NOT Qt5Core_FOUND)
|
||||
if (NOT Qt4_FOUND)
|
||||
find_package(Qt3)
|
||||
endif (NOT Qt4_FOUND)
|
||||
endif (NOT Qt5Core_FOUND)
|
||||
# if Qt6, Qt5 and Qt4 is not found try Qt3. Hopefully you never reach this point
|
||||
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND Qt4_FOUND)
|
||||
find_package(Qt3)
|
||||
endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND Qt4_FOUND)
|
||||
endif (qt_version STREQUAL AUTO)
|
||||
|
||||
# check specifically for Qt5
|
||||
# check specifically for Qt6
|
||||
if (qt_version STREQUAL 6)
|
||||
find_package(Qt6Core)
|
||||
if (Qt6Core_FOUND)
|
||||
find_package(Qt6Widgets CONFIG REQUIRED)
|
||||
find_package(Qt6Xml CONFIG REQUIRED)
|
||||
find_package(Qt6Network CONFIG REQUIRED)
|
||||
find_package(Qt6Svg CONFIG REQUIRED)
|
||||
find_package(Qt6PrintSupport CONFIG REQUIRED)
|
||||
else (Qt6Core_FOUND)
|
||||
message(FATAL_ERROR "Couldn't find the specifically requested Qt6 version.")
|
||||
endif (Qt6Core_FOUND)
|
||||
endif (qt_version STREQUAL 6)
|
||||
|
||||
# check specifically for Qt5
|
||||
if (qt_version STREQUAL 5)
|
||||
# Find the QtCore library
|
||||
find_package(Qt5Core)
|
||||
if (Qt5Core_FOUND)
|
||||
# Find the QtWidgets library
|
||||
find_package(Qt5Widgets CONFIG REQUIRED)
|
||||
# Find the QtXml library
|
||||
find_package(Qt5Xml CONFIG REQUIRED)
|
||||
# Find the QtNetwork library
|
||||
find_package(Qt5Network CONFIG REQUIRED)
|
||||
# Find the QtSvg library
|
||||
find_package(Qt5Svg CONFIG REQUIRED)
|
||||
# Fing the QtPrintSupport
|
||||
find_package(Qt5PrintSupport CONFIG REQUIRED)
|
||||
else (Qt5Core_FOUND)
|
||||
message(FATAL_ERROR "Couldn't find the specifically requested Qt5 version.")
|
||||
@@ -236,17 +252,21 @@ endif (nexus)
|
||||
|
||||
message("")
|
||||
if (qt_based_tools)
|
||||
if (Qt5Core_FOUND)
|
||||
message(" Qt found in ${Qt5Core_INCLUDE_DIRS} (Version: ${Qt5Core_VERSION})")
|
||||
else (Qt5Core_FOUND)
|
||||
if (Qt4_FOUND)
|
||||
message(" Qt found (Version: ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH})")
|
||||
else (Qt4_FOUND)
|
||||
if (QT_FOUND)
|
||||
message(" Qt found (Version: ${QT_VERSION})")
|
||||
endif (QT_FOUND)
|
||||
endif (Qt4_FOUND)
|
||||
endif (Qt5Core_FOUND)
|
||||
if (Qt6Core_FOUND)
|
||||
message(" Qt found in ${Qt6Core_INCLUDE_DIRS} (Version: ${Qt6Core_VERSION})")
|
||||
else (Qt6Core_FOUND)
|
||||
if (Qt5Core_FOUND)
|
||||
message(" Qt found in ${Qt5Core_INCLUDE_DIRS} (Version: ${Qt5Core_VERSION})")
|
||||
else (Qt5Core_FOUND)
|
||||
if (Qt4_FOUND)
|
||||
message(" Qt found (Version: ${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH})")
|
||||
else (Qt4_FOUND)
|
||||
if (QT_FOUND)
|
||||
message(" Qt found (Version: ${QT_VERSION})")
|
||||
endif (QT_FOUND)
|
||||
endif (Qt4_FOUND)
|
||||
endif (Qt5Core_FOUND)
|
||||
endif (Qt6Core_FOUND)
|
||||
endif (qt_based_tools)
|
||||
message("")
|
||||
message(" Features:")
|
||||
@@ -284,25 +304,27 @@ else (BNMRlibs)
|
||||
endif (BNMRlibs)
|
||||
|
||||
if (qt_based_tools)
|
||||
if (Qt5Core_FOUND)
|
||||
if (Qt6Core_FOUND)
|
||||
message("")
|
||||
message(" Qt6 based tools:")
|
||||
message(" musredit, musrStep, musrWiz, mupp : yes")
|
||||
elseif (Qt5Core_FOUND)
|
||||
message("")
|
||||
message(" Qt5 based tools:")
|
||||
message(" musredit, musrStep, musrWiz, mupp : yes")
|
||||
endif (Qt5Core_FOUND)
|
||||
if (Qt4_FOUND)
|
||||
elseif (Qt4_FOUND)
|
||||
message("")
|
||||
message(" Qt4 based tools (deprecated):")
|
||||
message(" musredit : yes")
|
||||
endif (Qt4_FOUND)
|
||||
if (QT_FOUND)
|
||||
else ()
|
||||
message("")
|
||||
message(" Qt3 based tools (outdated):")
|
||||
message(" musrgui : yes")
|
||||
endif (QT_FOUND)
|
||||
if (NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND)
|
||||
endif ()
|
||||
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND)
|
||||
message("")
|
||||
message(" NO Qt based tools will be installed since Qt is not found or not installed on the system")
|
||||
endif (NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND)
|
||||
endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND NOT Qt4_FOUND AND NOT QT_FOUND)
|
||||
else (qt_based_tools)
|
||||
message("")
|
||||
message(" Qt based tools (musredit, musrStep, musrWiz, mupp) have been disabled")
|
||||
|
||||
10
ChangeLog
@@ -12,6 +12,16 @@ or
|
||||
|
||||
https://bitbucket.org/muonspin/musrfit/commits/all
|
||||
|
||||
Release of V1.7.0, 2021/03/30
|
||||
=============================
|
||||
|
||||
Centralize the rge-handling for user functions.
|
||||
|
||||
Release of V1.6.5, 2021/01/22
|
||||
=============================
|
||||
|
||||
Add Qt6 version of musredit, mupp, etc.
|
||||
|
||||
Release of V1.6.4, 2020/08/29
|
||||
=============================
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ set (CPACK_SET_DESTDIR "OFF")
|
||||
set (CPACK_PACKAGE_RELOCATABLE "true")
|
||||
|
||||
if (${CPACK_GENERATOR} STREQUAL "RPM")
|
||||
set (CPACK_RPM_PACKAGE_REQUIRES "root >= 6.16.00")
|
||||
set (CPACK_RPM_PACKAGE_REQUIRES "root >= 6.22.00")
|
||||
set (CPACK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||
set (CPACK_RPM_FILE_NAME "RPM-DEFAULT")
|
||||
set (CPACK_RPM_PACKAGE_RELEASE "1")
|
||||
# next variable for RHEL, CentOS, Fedfora
|
||||
# next variable for RHEL, CentOS, Fedora
|
||||
set (CPACK_RPM_PACKAGE_RELEASE_DIST "")
|
||||
set (CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set (CPACK_RPM_PACKAGE_VENDOR "Paul Scherrer Institute - LMU - LEM")
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
|
||||
<comment>
|
||||
$Id: nonlocal_startup.xml 4047 2009-07-02 13:36:18Z nemu $
|
||||
nonlocal_startup.xml
|
||||
</comment>
|
||||
<nonlocal_par>
|
||||
<fourier_points>262144</fourier_points>
|
||||
</nonlocal_par>
|
||||
<trim_sp_part>
|
||||
<data_path>profiles/Sn_E</data_path>
|
||||
<trim_sp>
|
||||
<data_path>./profiles/</data_path>
|
||||
<rge_fln_pre>Sn_E</rge_fln_pre>
|
||||
<energy_list>
|
||||
<energy>1000</energy>
|
||||
<energy>2000</energy>
|
||||
@@ -22,5 +23,5 @@
|
||||
<energy>25000</energy>
|
||||
<energy>27300</energy>
|
||||
</energy_list>
|
||||
</trim_sp_part>
|
||||
</trim_sp>
|
||||
</nonlocal>
|
||||
|
||||
@@ -4,21 +4,21 @@ FITPARAMETER
|
||||
# Nr. Name Value Step Pos_Error Boundaries
|
||||
1 one 1 0 none
|
||||
2 zero 0 0 none
|
||||
3 Asy 0.2235 -0.0066 0.0072 0 0.33
|
||||
4 energy 22 0 none
|
||||
3 Asy 0.2235 -0.0065 0.0072 0 0.33
|
||||
4 energy 22000 0 none
|
||||
5 redTemp 0.8683 0 none
|
||||
6 thickness 5000 0 none
|
||||
7 ell 12000 0 none
|
||||
8 xi 94 0 none
|
||||
9 lambdaL 52.5 -1.4 1.2
|
||||
9 lambdaL 52.5 -1.3 1.2
|
||||
10 Bext 47.11 0 none
|
||||
11 deadLayer 0.00052 -0.00052 6.89563 0 none
|
||||
11 deadLayer 0.0004 0.0037 none 0 none
|
||||
12 RateSmear 0.418 -0.015 0.015
|
||||
13 N0_L 301.61 0.62 none
|
||||
14 Bkg_L 24.442 0.076 none
|
||||
13 N0_L 301.6 -1.1 1.2
|
||||
14 Bkg_L 24.441 -0.092 0.092
|
||||
15 Phase_L 42.0 -2.2 2.2
|
||||
16 Alpha_LR 1.0614 -0.0066 0.0064
|
||||
17 Bkg_R 27.646 -0.090 0.090
|
||||
16 Alpha_LR 1.0613 -0.0066 0.0064
|
||||
17 Bkg_R 27.646 -0.089 0.090
|
||||
18 RelPhase_R 154.4 -1.1 1.1
|
||||
|
||||
###############################################################
|
||||
@@ -37,7 +37,6 @@ RUN data/lem10_his_0825 MUE4 PSI ROOT-NPP (name beamline institute data-file-f
|
||||
fittype 0 (single histogram fit)
|
||||
norm 13
|
||||
backgr.fit 14
|
||||
lifetimecorrection
|
||||
map 1 2 0 0 0 0 0 0 0 0
|
||||
forward 1
|
||||
data 3289 65000
|
||||
@@ -49,7 +48,6 @@ RUN data/lem10_his_0825 MUE4 PSI ROOT-NPP (name beamline institute data-file-f
|
||||
fittype 0 (single histogram fit)
|
||||
norm fun1
|
||||
backgr.fit 17
|
||||
lifetimecorrection
|
||||
map 16 18 0 0 0 0 0 0 0 0
|
||||
forward 3
|
||||
data 3289 65000
|
||||
@@ -69,23 +67,27 @@ SAVE
|
||||
|
||||
###############################################################
|
||||
PLOT 0 (single histo plot)
|
||||
lifetimecorrection
|
||||
runs 1 2
|
||||
range 0 9 -0.3 0.3
|
||||
view_packing 500
|
||||
|
||||
###############################################################
|
||||
FOURIER
|
||||
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
|
||||
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
|
||||
fourier_power 10
|
||||
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
|
||||
phase 8.5
|
||||
#range_for_phase_correction 50.0 70.0
|
||||
range 0.0 200.0
|
||||
range 0 200
|
||||
|
||||
###############################################################
|
||||
STATISTIC --- 2014-11-05 12:34:54
|
||||
maxLH = 415.6, NDF = 358, maxLH/NDF = 1.160933
|
||||
STATISTIC --- 2021-03-30 15:04:30
|
||||
maxLH = 415.6, NDF = 358, maxLH/NDF = 1.160942
|
||||
expected maxLH = 418.1, NDF = 358, expected maxLH/NDF = 1.168011
|
||||
run block 1: (NDF/red.maxLH/red.maxLH_e) = (177/1.072511/1.087460)
|
||||
run block 2: (NDF/red.maxLH/red.maxLH_e) = (175/1.290186/1.289528)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,23 +2,23 @@ LSCO x=0.195 single
|
||||
###############################################################
|
||||
FITPARAMETER
|
||||
# No Name Value Step Pos_Error Boundaries
|
||||
1 phase 8.09 0.30 none
|
||||
2 field 107.08786 0.00052 none
|
||||
3 lambda 195.5703 0.0029 none 1 none
|
||||
1 phase 10.34 0.21 none
|
||||
2 field 112.82363 0.00033 none
|
||||
3 lambda 170.4570 0.0022 none 1 none
|
||||
4 xi 4 0 none 0 10
|
||||
|
||||
5 asym1 0.1980 0.0011 none 0 0.3
|
||||
6 rate1 0.7697 0.0063 none
|
||||
5 asym1 0.19219 -0.00079 0.00079 0 0.3
|
||||
6 rate1 0.7955 0.0043 none
|
||||
7 asymBg 0 0 none 0 0.3
|
||||
8 rateBg 0 0 none 0 none
|
||||
|
||||
9 N01 3311.3 1.7 none 0 none
|
||||
10 bg1 68.70 0.30 none 0 none
|
||||
11 N02 3577.8 1.7 none 0 none
|
||||
12 bg2 69.62 0.31 none 0 none
|
||||
13 relphase 181.63 0.41 none 150 210
|
||||
9 N01 3313.6 1.2 none 0 none
|
||||
10 bg1 68.54 0.21 none 0 none
|
||||
11 N02 3575.9 1.2 none 0 none
|
||||
12 bg2 69.82 0.22 none 0 none
|
||||
13 relphase 181.46 0.29 none 150 210
|
||||
14 zero 0 0 none
|
||||
15 relasy 1.0325 0.0075 none
|
||||
15 relasy 1.0365 0.0051 none
|
||||
16 one 1 0 none
|
||||
|
||||
###############################################################
|
||||
@@ -39,52 +39,51 @@ fun3 = par5 * map2
|
||||
fun4 = par7 * map2
|
||||
|
||||
###############################################################
|
||||
RUN data/deltat_pta_gps_3093 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
|
||||
GLOBAL
|
||||
fittype 0 (single histogram fit)
|
||||
fit 0 8
|
||||
packing 30
|
||||
|
||||
|
||||
###############################################################
|
||||
RUN data/deltat_pta_gps_3093 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
|
||||
map 14 16 0 0 0 0 0 0 0 0
|
||||
forward 3
|
||||
norm 9
|
||||
lifetimecorrection
|
||||
backgr.fit 10
|
||||
t0 125.0
|
||||
data 128 8001
|
||||
fit 0 8
|
||||
packing 30
|
||||
|
||||
RUN data/deltat_pta_gps_3093 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
|
||||
fittype 0 (single histogram fit)
|
||||
map 13 15 0 0 0 0 0 0 0 0
|
||||
forward 4
|
||||
norm 11
|
||||
lifetimecorrection
|
||||
backgr.fit 12
|
||||
t0 124.0
|
||||
data 127 8000
|
||||
fit 0 8
|
||||
packing 30
|
||||
|
||||
###############################################################
|
||||
COMMANDS
|
||||
MAX_LIKELIHOOD
|
||||
MINIMIZE
|
||||
#MIGRAD
|
||||
HESSE
|
||||
#MINOS
|
||||
MINOS
|
||||
SAVE
|
||||
|
||||
###############################################################
|
||||
FOURIER
|
||||
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
|
||||
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
|
||||
fourier_power 9
|
||||
apodization NONE # NONE, WEAK, MEDIUM, STRONG
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
|
||||
phase par1
|
||||
range 0 500
|
||||
|
||||
###############################################################
|
||||
PLOT 0 (single histo plot)
|
||||
lifetimecorrection
|
||||
runs 1 2
|
||||
range 0 4 -0.25 0.25
|
||||
|
||||
###############################################################
|
||||
STATISTIC --- 2013-05-03 09:08:20
|
||||
chisq = 1200.8, NDF = 415, chisq/NDF = 2.893391
|
||||
STATISTIC --- 2021-02-26 14:54:47
|
||||
maxLH = 1497.5, NDF = 415, maxLH/NDF = 3.608471
|
||||
|
||||
@@ -4,19 +4,19 @@ FITPARAMETER
|
||||
# No Name Value Step Pos_Error Boundaries
|
||||
1 field 94.717 0 none
|
||||
2 deadlayer 10.5 0 none
|
||||
3 lambda 115.96 -0.92 0.88
|
||||
3 lambda 115.98 -0.65 0.63
|
||||
|
||||
# E = 22keV
|
||||
|
||||
4 phase22 25.4956 0 none
|
||||
5 asym22 0.1047 -0.0029 0.0030 0 0.3
|
||||
6 rate22 0.559 -0.032 0.033
|
||||
7 NormL22 753.00 -0.86 0.87
|
||||
8 BGL22 51.08 -0.13 0.13
|
||||
9 NormR22 545.93 -0.77 0.76
|
||||
10 BGR22 38.60 -0.11 0.12
|
||||
11 relasyR22 1.068 -0.038 0.039 0.2 2
|
||||
12 relphaR22 162.8 -1.5 1.5 110 210
|
||||
5 asym22 0.1047 -0.0021 0.0021 0 0.3
|
||||
6 rate22 0.558 -0.023 0.023
|
||||
7 NormL22 752.98 -0.61 0.61
|
||||
8 BGL22 51.114 -0.094 0.094
|
||||
9 NormR22 545.95 -0.54 0.54
|
||||
10 BGR22 38.634 -0.082 0.082
|
||||
11 relasyR22 1.068 -0.027 0.027 0.2 2
|
||||
12 relphaR22 162.8 -1.1 1.1 110 210
|
||||
13 energy22 22 0 none
|
||||
|
||||
14 one 1 0 none
|
||||
@@ -35,53 +35,48 @@ fun2 = map1 + map5
|
||||
fun3 = par1 * gamma_mu
|
||||
|
||||
###############################################################
|
||||
RUN data/lem09_his_0916 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
|
||||
GLOBAL
|
||||
fittype 0 (single histogram fit)
|
||||
norm 7
|
||||
backgr.fit 8
|
||||
lifetimecorrection
|
||||
map 4 5 6 14 15 13 0 0 0 0
|
||||
forward 1
|
||||
background 65000 66500
|
||||
data 3419 63000
|
||||
t0 3419.0
|
||||
fit 0.15 10
|
||||
packing 150
|
||||
|
||||
RUN data/lem09_his_0916 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
|
||||
fittype 0 (single histogram fit)
|
||||
norm 9
|
||||
backgr.fit 10
|
||||
lifetimecorrection
|
||||
map 4 5 6 11 12 13 0 0 0 0
|
||||
forward 3
|
||||
background 65000 66500
|
||||
data 3419 63000
|
||||
t0 3419.0
|
||||
fit 0.15 10
|
||||
packing 150
|
||||
|
||||
###############################################################
|
||||
RUN data/lem09_his_0916 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
|
||||
norm 7
|
||||
backgr.fit 8
|
||||
map 4 5 6 14 15 13 0 0 0 0
|
||||
forward 1
|
||||
|
||||
RUN data/lem09_his_0916 MUE4 PSI ROOT-NPP (name beamline institute data-file-format)
|
||||
norm 9
|
||||
backgr.fit 10
|
||||
map 4 5 6 11 12 13 0 0 0 0
|
||||
forward 3
|
||||
|
||||
###############################################################
|
||||
COMMANDS
|
||||
#MAX_LIKELIHOOD
|
||||
MAX_LIKELIHOOD
|
||||
MINIMIZE
|
||||
MINOS
|
||||
SAVE
|
||||
|
||||
###############################################################
|
||||
FOURIER
|
||||
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
|
||||
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
|
||||
fourier_power 10
|
||||
apodization WEAK # NONE, WEAK, MEDIUM, STRONG
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
|
||||
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
|
||||
phase par4
|
||||
range 0 200
|
||||
|
||||
###############################################################
|
||||
PLOT 0 (single histo plot)
|
||||
runs 1 2
|
||||
lifetimecorrection
|
||||
runs 1 2
|
||||
range 0 4 -0.25 0.25
|
||||
|
||||
###############################################################
|
||||
STATISTIC --- 2013-11-12 10:25:11
|
||||
chisq = 696.9, NDF = 663, chisq/NDF = 1.051076
|
||||
STATISTIC --- 2021-02-26 14:50:08
|
||||
maxLH = 695.5, NDF = 663, maxLH/NDF = 1.049008
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 0b93e4185566cd2a81b86f199313e66e
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
60
doc/html/_downloads/Makefile.TMyLibrary
Normal file
@@ -0,0 +1,60 @@
|
||||
#---------------------------------------------------
|
||||
# get compilation flags from root-config
|
||||
|
||||
ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags)
|
||||
|
||||
#---------------------------------------------------
|
||||
|
||||
OS = LINUX
|
||||
CXX = g++
|
||||
CXXFLAGS = -O3 -Wall -Wno-trigraphs -fPIC
|
||||
LOCALINCLUDE = .
|
||||
ROOTINCLUDE = $(ROOTSYS)/include
|
||||
INCLUDES = -I$(LOCALINCLUDE) -I$(ROOTINCLUDE)
|
||||
LD = g++
|
||||
LDFLAGS =
|
||||
SOFLAGS = -O -shared
|
||||
|
||||
# the output from the root-config script:
|
||||
CXXFLAGS += $(ROOTCFLAGS)
|
||||
LDFLAGS +=
|
||||
|
||||
# some definitions: headers (used to generate *Dict* stuff), sources, objects,...
|
||||
OBJS =
|
||||
OBJS += TMyFunction.o TMyLibraryDict.o
|
||||
|
||||
SHLIB = libTMyLibrary.so
|
||||
|
||||
# make the shared lib:
|
||||
#
|
||||
all: $(SHLIB)
|
||||
|
||||
$(SHLIB): $(OBJS)
|
||||
@echo "---> Building shared library $(SHLIB) ..."
|
||||
/bin/rm -f $(SHLIB)
|
||||
$(LD) $(OBJS) $(SOFLAGS) -o $(SHLIB)
|
||||
@echo "done"
|
||||
|
||||
# clean up: remove all object file (and core files)
|
||||
# semicolon needed to tell make there is no source
|
||||
# for this target!
|
||||
#
|
||||
clean:; @rm -f $(OBJS) *Dict* core*
|
||||
@echo "---> removing $(OBJS)"
|
||||
|
||||
#
|
||||
$(OBJS): %.o: %.cpp
|
||||
$(CXX) $(INCLUDES) $(CXXFLAGS) -c $<
|
||||
|
||||
# Generate the ROOT CINT dictionary
|
||||
|
||||
TMyLibraryDict.cpp: TMyFunction.h TMyLibraryLinkDef.h
|
||||
@echo "Generating dictionary $@..."
|
||||
rootcint -f $@ -c -p -I$(ROOTINCLUDE) $^
|
||||
|
||||
install: all
|
||||
@echo "Installing shared lib: libTApproximation.so"
|
||||
ifeq ($(OS),LINUX)
|
||||
cp -pv $(SHLIB) $(ROOTSYS)/lib
|
||||
cp -pv $(LOCALINCLUDE)/*.h $(ROOTSYS)/include
|
||||
endif
|
||||
BIN
doc/html/_static/ajax-loader.gif
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
doc/html/_static/comment-bright.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
doc/html/_static/comment-close.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
doc/html/_static/comment.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
doc/html/_static/down-pressed.png
Normal file
|
After Width: | Height: | Size: 368 B |
BIN
doc/html/_static/down.png
Normal file
|
After Width: | Height: | Size: 363 B |
BIN
doc/html/_static/up-pressed.png
Normal file
|
After Width: | Height: | Size: 372 B |
BIN
doc/html/_static/up.png
Normal file
|
After Width: | Height: | Size: 363 B |
808
doc/html/_static/websupport.js
Normal file
@@ -0,0 +1,808 @@
|
||||
/*
|
||||
* websupport.js
|
||||
* ~~~~~~~~~~~~~
|
||||
*
|
||||
* sphinx.websupport utilties for all documentation.
|
||||
*
|
||||
* :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
$.fn.autogrow = function() {
|
||||
return this.each(function() {
|
||||
var textarea = this;
|
||||
|
||||
$.fn.autogrow.resize(textarea);
|
||||
|
||||
$(textarea)
|
||||
.focus(function() {
|
||||
textarea.interval = setInterval(function() {
|
||||
$.fn.autogrow.resize(textarea);
|
||||
}, 500);
|
||||
})
|
||||
.blur(function() {
|
||||
clearInterval(textarea.interval);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.autogrow.resize = function(textarea) {
|
||||
var lineHeight = parseInt($(textarea).css('line-height'), 10);
|
||||
var lines = textarea.value.split('\n');
|
||||
var columns = textarea.cols;
|
||||
var lineCount = 0;
|
||||
$.each(lines, function() {
|
||||
lineCount += Math.ceil(this.length / columns) || 1;
|
||||
});
|
||||
var height = lineHeight * (lineCount + 1);
|
||||
$(textarea).css('height', height);
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
(function($) {
|
||||
var comp, by;
|
||||
|
||||
function init() {
|
||||
initEvents();
|
||||
initComparator();
|
||||
}
|
||||
|
||||
function initEvents() {
|
||||
$('a.comment-close').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
hide($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.vote').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
handleVote($(this));
|
||||
});
|
||||
$('a.reply').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
openReply($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.close-reply').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
closeReply($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.sort-option').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
handleReSort($(this));
|
||||
});
|
||||
$('a.show-proposal').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
showProposal($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.hide-proposal').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
hideProposal($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.show-propose-change').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
showProposeChange($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.hide-propose-change').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
hideProposeChange($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.accept-comment').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
acceptComment($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.delete-comment').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
deleteComment($(this).attr('id').substring(2));
|
||||
});
|
||||
$('a.comment-markup').live("click", function(event) {
|
||||
event.preventDefault();
|
||||
toggleCommentMarkupBox($(this).attr('id').substring(2));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set comp, which is a comparator function used for sorting and
|
||||
* inserting comments into the list.
|
||||
*/
|
||||
function setComparator() {
|
||||
// If the first three letters are "asc", sort in ascending order
|
||||
// and remove the prefix.
|
||||
if (by.substring(0,3) == 'asc') {
|
||||
var i = by.substring(3);
|
||||
comp = function(a, b) { return a[i] - b[i]; };
|
||||
} else {
|
||||
// Otherwise sort in descending order.
|
||||
comp = function(a, b) { return b[by] - a[by]; };
|
||||
}
|
||||
|
||||
// Reset link styles and format the selected sort option.
|
||||
$('a.sel').attr('href', '#').removeClass('sel');
|
||||
$('a.by' + by).removeAttr('href').addClass('sel');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a comp function. If the user has preferences stored in
|
||||
* the sortBy cookie, use those, otherwise use the default.
|
||||
*/
|
||||
function initComparator() {
|
||||
by = 'rating'; // Default to sort by rating.
|
||||
// If the sortBy cookie is set, use that instead.
|
||||
if (document.cookie.length > 0) {
|
||||
var start = document.cookie.indexOf('sortBy=');
|
||||
if (start != -1) {
|
||||
start = start + 7;
|
||||
var end = document.cookie.indexOf(";", start);
|
||||
if (end == -1) {
|
||||
end = document.cookie.length;
|
||||
by = unescape(document.cookie.substring(start, end));
|
||||
}
|
||||
}
|
||||
}
|
||||
setComparator();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a comment div.
|
||||
*/
|
||||
function show(id) {
|
||||
$('#ao' + id).hide();
|
||||
$('#ah' + id).show();
|
||||
var context = $.extend({id: id}, opts);
|
||||
var popup = $(renderTemplate(popupTemplate, context)).hide();
|
||||
popup.find('textarea[name="proposal"]').hide();
|
||||
popup.find('a.by' + by).addClass('sel');
|
||||
var form = popup.find('#cf' + id);
|
||||
form.submit(function(event) {
|
||||
event.preventDefault();
|
||||
addComment(form);
|
||||
});
|
||||
$('#s' + id).after(popup);
|
||||
popup.slideDown('fast', function() {
|
||||
getComments(id);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide a comment div.
|
||||
*/
|
||||
function hide(id) {
|
||||
$('#ah' + id).hide();
|
||||
$('#ao' + id).show();
|
||||
var div = $('#sc' + id);
|
||||
div.slideUp('fast', function() {
|
||||
div.remove();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform an ajax request to get comments for a node
|
||||
* and insert the comments into the comments tree.
|
||||
*/
|
||||
function getComments(id) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: opts.getCommentsURL,
|
||||
data: {node: id},
|
||||
success: function(data, textStatus, request) {
|
||||
var ul = $('#cl' + id);
|
||||
var speed = 100;
|
||||
$('#cf' + id)
|
||||
.find('textarea[name="proposal"]')
|
||||
.data('source', data.source);
|
||||
|
||||
if (data.comments.length === 0) {
|
||||
ul.html('<li>No comments yet.</li>');
|
||||
ul.data('empty', true);
|
||||
} else {
|
||||
// If there are comments, sort them and put them in the list.
|
||||
var comments = sortComments(data.comments);
|
||||
speed = data.comments.length * 100;
|
||||
appendComments(comments, ul);
|
||||
ul.data('empty', false);
|
||||
}
|
||||
$('#cn' + id).slideUp(speed + 200);
|
||||
ul.slideDown(speed);
|
||||
},
|
||||
error: function(request, textStatus, error) {
|
||||
showError('Oops, there was a problem retrieving the comments.');
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a comment via ajax and insert the comment into the comment tree.
|
||||
*/
|
||||
function addComment(form) {
|
||||
var node_id = form.find('input[name="node"]').val();
|
||||
var parent_id = form.find('input[name="parent"]').val();
|
||||
var text = form.find('textarea[name="comment"]').val();
|
||||
var proposal = form.find('textarea[name="proposal"]').val();
|
||||
|
||||
if (text == '') {
|
||||
showError('Please enter a comment.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable the form that is being submitted.
|
||||
form.find('textarea,input').attr('disabled', 'disabled');
|
||||
|
||||
// Send the comment to the server.
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: opts.addCommentURL,
|
||||
dataType: 'json',
|
||||
data: {
|
||||
node: node_id,
|
||||
parent: parent_id,
|
||||
text: text,
|
||||
proposal: proposal
|
||||
},
|
||||
success: function(data, textStatus, error) {
|
||||
// Reset the form.
|
||||
if (node_id) {
|
||||
hideProposeChange(node_id);
|
||||
}
|
||||
form.find('textarea')
|
||||
.val('')
|
||||
.add(form.find('input'))
|
||||
.removeAttr('disabled');
|
||||
var ul = $('#cl' + (node_id || parent_id));
|
||||
if (ul.data('empty')) {
|
||||
$(ul).empty();
|
||||
ul.data('empty', false);
|
||||
}
|
||||
insertComment(data.comment);
|
||||
var ao = $('#ao' + node_id);
|
||||
ao.find('img').attr({'src': opts.commentBrightImage});
|
||||
if (node_id) {
|
||||
// if this was a "root" comment, remove the commenting box
|
||||
// (the user can get it back by reopening the comment popup)
|
||||
$('#ca' + node_id).slideUp();
|
||||
}
|
||||
},
|
||||
error: function(request, textStatus, error) {
|
||||
form.find('textarea,input').removeAttr('disabled');
|
||||
showError('Oops, there was a problem adding the comment.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively append comments to the main comment list and children
|
||||
* lists, creating the comment tree.
|
||||
*/
|
||||
function appendComments(comments, ul) {
|
||||
$.each(comments, function() {
|
||||
var div = createCommentDiv(this);
|
||||
ul.append($(document.createElement('li')).html(div));
|
||||
appendComments(this.children, div.find('ul.comment-children'));
|
||||
// To avoid stagnating data, don't store the comments children in data.
|
||||
this.children = null;
|
||||
div.data('comment', this);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* After adding a new comment, it must be inserted in the correct
|
||||
* location in the comment tree.
|
||||
*/
|
||||
function insertComment(comment) {
|
||||
var div = createCommentDiv(comment);
|
||||
|
||||
// To avoid stagnating data, don't store the comments children in data.
|
||||
comment.children = null;
|
||||
div.data('comment', comment);
|
||||
|
||||
var ul = $('#cl' + (comment.node || comment.parent));
|
||||
var siblings = getChildren(ul);
|
||||
|
||||
var li = $(document.createElement('li'));
|
||||
li.hide();
|
||||
|
||||
// Determine where in the parents children list to insert this comment.
|
||||
for(i=0; i < siblings.length; i++) {
|
||||
if (comp(comment, siblings[i]) <= 0) {
|
||||
$('#cd' + siblings[i].id)
|
||||
.parent()
|
||||
.before(li.html(div));
|
||||
li.slideDown('fast');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If we get here, this comment rates lower than all the others,
|
||||
// or it is the only comment in the list.
|
||||
ul.append(li.html(div));
|
||||
li.slideDown('fast');
|
||||
}
|
||||
|
||||
function acceptComment(id) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: opts.acceptCommentURL,
|
||||
data: {id: id},
|
||||
success: function(data, textStatus, request) {
|
||||
$('#cm' + id).fadeOut('fast');
|
||||
$('#cd' + id).removeClass('moderate');
|
||||
},
|
||||
error: function(request, textStatus, error) {
|
||||
showError('Oops, there was a problem accepting the comment.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function deleteComment(id) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: opts.deleteCommentURL,
|
||||
data: {id: id},
|
||||
success: function(data, textStatus, request) {
|
||||
var div = $('#cd' + id);
|
||||
if (data == 'delete') {
|
||||
// Moderator mode: remove the comment and all children immediately
|
||||
div.slideUp('fast', function() {
|
||||
div.remove();
|
||||
});
|
||||
return;
|
||||
}
|
||||
// User mode: only mark the comment as deleted
|
||||
div
|
||||
.find('span.user-id:first')
|
||||
.text('[deleted]').end()
|
||||
.find('div.comment-text:first')
|
||||
.text('[deleted]').end()
|
||||
.find('#cm' + id + ', #dc' + id + ', #ac' + id + ', #rc' + id +
|
||||
', #sp' + id + ', #hp' + id + ', #cr' + id + ', #rl' + id)
|
||||
.remove();
|
||||
var comment = div.data('comment');
|
||||
comment.username = '[deleted]';
|
||||
comment.text = '[deleted]';
|
||||
div.data('comment', comment);
|
||||
},
|
||||
error: function(request, textStatus, error) {
|
||||
showError('Oops, there was a problem deleting the comment.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showProposal(id) {
|
||||
$('#sp' + id).hide();
|
||||
$('#hp' + id).show();
|
||||
$('#pr' + id).slideDown('fast');
|
||||
}
|
||||
|
||||
function hideProposal(id) {
|
||||
$('#hp' + id).hide();
|
||||
$('#sp' + id).show();
|
||||
$('#pr' + id).slideUp('fast');
|
||||
}
|
||||
|
||||
function showProposeChange(id) {
|
||||
$('#pc' + id).hide();
|
||||
$('#hc' + id).show();
|
||||
var textarea = $('#pt' + id);
|
||||
textarea.val(textarea.data('source'));
|
||||
$.fn.autogrow.resize(textarea[0]);
|
||||
textarea.slideDown('fast');
|
||||
}
|
||||
|
||||
function hideProposeChange(id) {
|
||||
$('#hc' + id).hide();
|
||||
$('#pc' + id).show();
|
||||
var textarea = $('#pt' + id);
|
||||
textarea.val('').removeAttr('disabled');
|
||||
textarea.slideUp('fast');
|
||||
}
|
||||
|
||||
function toggleCommentMarkupBox(id) {
|
||||
$('#mb' + id).toggle();
|
||||
}
|
||||
|
||||
/** Handle when the user clicks on a sort by link. */
|
||||
function handleReSort(link) {
|
||||
var classes = link.attr('class').split(/\s+/);
|
||||
for (var i=0; i<classes.length; i++) {
|
||||
if (classes[i] != 'sort-option') {
|
||||
by = classes[i].substring(2);
|
||||
}
|
||||
}
|
||||
setComparator();
|
||||
// Save/update the sortBy cookie.
|
||||
var expiration = new Date();
|
||||
expiration.setDate(expiration.getDate() + 365);
|
||||
document.cookie= 'sortBy=' + escape(by) +
|
||||
';expires=' + expiration.toUTCString();
|
||||
$('ul.comment-ul').each(function(index, ul) {
|
||||
var comments = getChildren($(ul), true);
|
||||
comments = sortComments(comments);
|
||||
appendComments(comments, $(ul).empty());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to process a vote when a user clicks an arrow.
|
||||
*/
|
||||
function handleVote(link) {
|
||||
if (!opts.voting) {
|
||||
showError("You'll need to login to vote.");
|
||||
return;
|
||||
}
|
||||
|
||||
var id = link.attr('id');
|
||||
if (!id) {
|
||||
// Didn't click on one of the voting arrows.
|
||||
return;
|
||||
}
|
||||
// If it is an unvote, the new vote value is 0,
|
||||
// Otherwise it's 1 for an upvote, or -1 for a downvote.
|
||||
var value = 0;
|
||||
if (id.charAt(1) != 'u') {
|
||||
value = id.charAt(0) == 'u' ? 1 : -1;
|
||||
}
|
||||
// The data to be sent to the server.
|
||||
var d = {
|
||||
comment_id: id.substring(2),
|
||||
value: value
|
||||
};
|
||||
|
||||
// Swap the vote and unvote links.
|
||||
link.hide();
|
||||
$('#' + id.charAt(0) + (id.charAt(1) == 'u' ? 'v' : 'u') + d.comment_id)
|
||||
.show();
|
||||
|
||||
// The div the comment is displayed in.
|
||||
var div = $('div#cd' + d.comment_id);
|
||||
var data = div.data('comment');
|
||||
|
||||
// If this is not an unvote, and the other vote arrow has
|
||||
// already been pressed, unpress it.
|
||||
if ((d.value !== 0) && (data.vote === d.value * -1)) {
|
||||
$('#' + (d.value == 1 ? 'd' : 'u') + 'u' + d.comment_id).hide();
|
||||
$('#' + (d.value == 1 ? 'd' : 'u') + 'v' + d.comment_id).show();
|
||||
}
|
||||
|
||||
// Update the comments rating in the local data.
|
||||
data.rating += (data.vote === 0) ? d.value : (d.value - data.vote);
|
||||
data.vote = d.value;
|
||||
div.data('comment', data);
|
||||
|
||||
// Change the rating text.
|
||||
div.find('.rating:first')
|
||||
.text(data.rating + ' point' + (data.rating == 1 ? '' : 's'));
|
||||
|
||||
// Send the vote information to the server.
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: opts.processVoteURL,
|
||||
data: d,
|
||||
error: function(request, textStatus, error) {
|
||||
showError('Oops, there was a problem casting that vote.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a reply form used to reply to an existing comment.
|
||||
*/
|
||||
function openReply(id) {
|
||||
// Swap out the reply link for the hide link
|
||||
$('#rl' + id).hide();
|
||||
$('#cr' + id).show();
|
||||
|
||||
// Add the reply li to the children ul.
|
||||
var div = $(renderTemplate(replyTemplate, {id: id})).hide();
|
||||
$('#cl' + id)
|
||||
.prepend(div)
|
||||
// Setup the submit handler for the reply form.
|
||||
.find('#rf' + id)
|
||||
.submit(function(event) {
|
||||
event.preventDefault();
|
||||
addComment($('#rf' + id));
|
||||
closeReply(id);
|
||||
})
|
||||
.find('input[type=button]')
|
||||
.click(function() {
|
||||
closeReply(id);
|
||||
});
|
||||
div.slideDown('fast', function() {
|
||||
$('#rf' + id).find('textarea').focus();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the reply form opened with openReply.
|
||||
*/
|
||||
function closeReply(id) {
|
||||
// Remove the reply div from the DOM.
|
||||
$('#rd' + id).slideUp('fast', function() {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
// Swap out the hide link for the reply link
|
||||
$('#cr' + id).hide();
|
||||
$('#rl' + id).show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively sort a tree of comments using the comp comparator.
|
||||
*/
|
||||
function sortComments(comments) {
|
||||
comments.sort(comp);
|
||||
$.each(comments, function() {
|
||||
this.children = sortComments(this.children);
|
||||
});
|
||||
return comments;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the children comments from a ul. If recursive is true,
|
||||
* recursively include childrens' children.
|
||||
*/
|
||||
function getChildren(ul, recursive) {
|
||||
var children = [];
|
||||
ul.children().children("[id^='cd']")
|
||||
.each(function() {
|
||||
var comment = $(this).data('comment');
|
||||
if (recursive)
|
||||
comment.children = getChildren($(this).find('#cl' + comment.id), true);
|
||||
children.push(comment);
|
||||
});
|
||||
return children;
|
||||
}
|
||||
|
||||
/** Create a div to display a comment in. */
|
||||
function createCommentDiv(comment) {
|
||||
if (!comment.displayed && !opts.moderator) {
|
||||
return $('<div class="moderate">Thank you! Your comment will show up '
|
||||
+ 'once it is has been approved by a moderator.</div>');
|
||||
}
|
||||
// Prettify the comment rating.
|
||||
comment.pretty_rating = comment.rating + ' point' +
|
||||
(comment.rating == 1 ? '' : 's');
|
||||
// Make a class (for displaying not yet moderated comments differently)
|
||||
comment.css_class = comment.displayed ? '' : ' moderate';
|
||||
// Create a div for this comment.
|
||||
var context = $.extend({}, opts, comment);
|
||||
var div = $(renderTemplate(commentTemplate, context));
|
||||
|
||||
// If the user has voted on this comment, highlight the correct arrow.
|
||||
if (comment.vote) {
|
||||
var direction = (comment.vote == 1) ? 'u' : 'd';
|
||||
div.find('#' + direction + 'v' + comment.id).hide();
|
||||
div.find('#' + direction + 'u' + comment.id).show();
|
||||
}
|
||||
|
||||
if (opts.moderator || comment.text != '[deleted]') {
|
||||
div.find('a.reply').show();
|
||||
if (comment.proposal_diff)
|
||||
div.find('#sp' + comment.id).show();
|
||||
if (opts.moderator && !comment.displayed)
|
||||
div.find('#cm' + comment.id).show();
|
||||
if (opts.moderator || (opts.username == comment.username))
|
||||
div.find('#dc' + comment.id).show();
|
||||
}
|
||||
return div;
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple template renderer. Placeholders such as <%id%> are replaced
|
||||
* by context['id'] with items being escaped. Placeholders such as <#id#>
|
||||
* are not escaped.
|
||||
*/
|
||||
function renderTemplate(template, context) {
|
||||
var esc = $(document.createElement('div'));
|
||||
|
||||
function handle(ph, escape) {
|
||||
var cur = context;
|
||||
$.each(ph.split('.'), function() {
|
||||
cur = cur[this];
|
||||
});
|
||||
return escape ? esc.text(cur || "").html() : cur;
|
||||
}
|
||||
|
||||
return template.replace(/<([%#])([\w\.]*)\1>/g, function() {
|
||||
return handle(arguments[2], arguments[1] == '%' ? true : false);
|
||||
});
|
||||
}
|
||||
|
||||
/** Flash an error message briefly. */
|
||||
function showError(message) {
|
||||
$(document.createElement('div')).attr({'class': 'popup-error'})
|
||||
.append($(document.createElement('div'))
|
||||
.attr({'class': 'error-message'}).text(message))
|
||||
.appendTo('body')
|
||||
.fadeIn("slow")
|
||||
.delay(2000)
|
||||
.fadeOut("slow");
|
||||
}
|
||||
|
||||
/** Add a link the user uses to open the comments popup. */
|
||||
$.fn.comment = function() {
|
||||
return this.each(function() {
|
||||
var id = $(this).attr('id').substring(1);
|
||||
var count = COMMENT_METADATA[id];
|
||||
var title = count + ' comment' + (count == 1 ? '' : 's');
|
||||
var image = count > 0 ? opts.commentBrightImage : opts.commentImage;
|
||||
var addcls = count == 0 ? ' nocomment' : '';
|
||||
$(this)
|
||||
.append(
|
||||
$(document.createElement('a')).attr({
|
||||
href: '#',
|
||||
'class': 'sphinx-comment-open' + addcls,
|
||||
id: 'ao' + id
|
||||
})
|
||||
.append($(document.createElement('img')).attr({
|
||||
src: image,
|
||||
alt: 'comment',
|
||||
title: title
|
||||
}))
|
||||
.click(function(event) {
|
||||
event.preventDefault();
|
||||
show($(this).attr('id').substring(2));
|
||||
})
|
||||
)
|
||||
.append(
|
||||
$(document.createElement('a')).attr({
|
||||
href: '#',
|
||||
'class': 'sphinx-comment-close hidden',
|
||||
id: 'ah' + id
|
||||
})
|
||||
.append($(document.createElement('img')).attr({
|
||||
src: opts.closeCommentImage,
|
||||
alt: 'close',
|
||||
title: 'close'
|
||||
}))
|
||||
.click(function(event) {
|
||||
event.preventDefault();
|
||||
hide($(this).attr('id').substring(2));
|
||||
})
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
var opts = {
|
||||
processVoteURL: '/_process_vote',
|
||||
addCommentURL: '/_add_comment',
|
||||
getCommentsURL: '/_get_comments',
|
||||
acceptCommentURL: '/_accept_comment',
|
||||
deleteCommentURL: '/_delete_comment',
|
||||
commentImage: '/static/_static/comment.png',
|
||||
closeCommentImage: '/static/_static/comment-close.png',
|
||||
loadingImage: '/static/_static/ajax-loader.gif',
|
||||
commentBrightImage: '/static/_static/comment-bright.png',
|
||||
upArrow: '/static/_static/up.png',
|
||||
downArrow: '/static/_static/down.png',
|
||||
upArrowPressed: '/static/_static/up-pressed.png',
|
||||
downArrowPressed: '/static/_static/down-pressed.png',
|
||||
voting: false,
|
||||
moderator: false
|
||||
};
|
||||
|
||||
if (typeof COMMENT_OPTIONS != "undefined") {
|
||||
opts = jQuery.extend(opts, COMMENT_OPTIONS);
|
||||
}
|
||||
|
||||
var popupTemplate = '\
|
||||
<div class="sphinx-comments" id="sc<%id%>">\
|
||||
<p class="sort-options">\
|
||||
Sort by:\
|
||||
<a href="#" class="sort-option byrating">best rated</a>\
|
||||
<a href="#" class="sort-option byascage">newest</a>\
|
||||
<a href="#" class="sort-option byage">oldest</a>\
|
||||
</p>\
|
||||
<div class="comment-header">Comments</div>\
|
||||
<div class="comment-loading" id="cn<%id%>">\
|
||||
loading comments... <img src="<%loadingImage%>" alt="" /></div>\
|
||||
<ul id="cl<%id%>" class="comment-ul"></ul>\
|
||||
<div id="ca<%id%>">\
|
||||
<p class="add-a-comment">Add a comment\
|
||||
(<a href="#" class="comment-markup" id="ab<%id%>">markup</a>):</p>\
|
||||
<div class="comment-markup-box" id="mb<%id%>">\
|
||||
reStructured text markup: <i>*emph*</i>, <b>**strong**</b>, \
|
||||
<tt>``code``</tt>, \
|
||||
code blocks: <tt>::</tt> and an indented block after blank line</div>\
|
||||
<form method="post" id="cf<%id%>" class="comment-form" action="">\
|
||||
<textarea name="comment" cols="80"></textarea>\
|
||||
<p class="propose-button">\
|
||||
<a href="#" id="pc<%id%>" class="show-propose-change">\
|
||||
Propose a change ▹\
|
||||
</a>\
|
||||
<a href="#" id="hc<%id%>" class="hide-propose-change">\
|
||||
Propose a change ▿\
|
||||
</a>\
|
||||
</p>\
|
||||
<textarea name="proposal" id="pt<%id%>" cols="80"\
|
||||
spellcheck="false"></textarea>\
|
||||
<input type="submit" value="Add comment" />\
|
||||
<input type="hidden" name="node" value="<%id%>" />\
|
||||
<input type="hidden" name="parent" value="" />\
|
||||
</form>\
|
||||
</div>\
|
||||
</div>';
|
||||
|
||||
var commentTemplate = '\
|
||||
<div id="cd<%id%>" class="sphinx-comment<%css_class%>">\
|
||||
<div class="vote">\
|
||||
<div class="arrow">\
|
||||
<a href="#" id="uv<%id%>" class="vote" title="vote up">\
|
||||
<img src="<%upArrow%>" />\
|
||||
</a>\
|
||||
<a href="#" id="uu<%id%>" class="un vote" title="vote up">\
|
||||
<img src="<%upArrowPressed%>" />\
|
||||
</a>\
|
||||
</div>\
|
||||
<div class="arrow">\
|
||||
<a href="#" id="dv<%id%>" class="vote" title="vote down">\
|
||||
<img src="<%downArrow%>" id="da<%id%>" />\
|
||||
</a>\
|
||||
<a href="#" id="du<%id%>" class="un vote" title="vote down">\
|
||||
<img src="<%downArrowPressed%>" />\
|
||||
</a>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="comment-content">\
|
||||
<p class="tagline comment">\
|
||||
<span class="user-id"><%username%></span>\
|
||||
<span class="rating"><%pretty_rating%></span>\
|
||||
<span class="delta"><%time.delta%></span>\
|
||||
</p>\
|
||||
<div class="comment-text comment"><#text#></div>\
|
||||
<p class="comment-opts comment">\
|
||||
<a href="#" class="reply hidden" id="rl<%id%>">reply ▹</a>\
|
||||
<a href="#" class="close-reply" id="cr<%id%>">reply ▿</a>\
|
||||
<a href="#" id="sp<%id%>" class="show-proposal">proposal ▹</a>\
|
||||
<a href="#" id="hp<%id%>" class="hide-proposal">proposal ▿</a>\
|
||||
<a href="#" id="dc<%id%>" class="delete-comment hidden">delete</a>\
|
||||
<span id="cm<%id%>" class="moderation hidden">\
|
||||
<a href="#" id="ac<%id%>" class="accept-comment">accept</a>\
|
||||
</span>\
|
||||
</p>\
|
||||
<pre class="proposal" id="pr<%id%>">\
|
||||
<#proposal_diff#>\
|
||||
</pre>\
|
||||
<ul class="comment-children" id="cl<%id%>"></ul>\
|
||||
</div>\
|
||||
<div class="clearleft"></div>\
|
||||
</div>\
|
||||
</div>';
|
||||
|
||||
var replyTemplate = '\
|
||||
<li>\
|
||||
<div class="reply-div" id="rd<%id%>">\
|
||||
<form id="rf<%id%>">\
|
||||
<textarea name="comment" cols="80"></textarea>\
|
||||
<input type="submit" value="Add reply" />\
|
||||
<input type="button" value="Cancel" />\
|
||||
<input type="hidden" name="parent" value="<%id%>" />\
|
||||
<input type="hidden" name="node" value="" />\
|
||||
</form>\
|
||||
</div>\
|
||||
</li>';
|
||||
|
||||
$(document).ready(function() {
|
||||
init();
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
$(document).ready(function() {
|
||||
// add comment anchors for all paragraphs that are commentable
|
||||
$('.sphinx-has-comment').comment();
|
||||
|
||||
// highlight search words in search results
|
||||
$("div.context").each(function() {
|
||||
var params = $.getQueryParameters();
|
||||
var terms = (params.q) ? params.q[0].split(/\s+/) : [];
|
||||
var result = $(this);
|
||||
$.each(terms, function() {
|
||||
result.highlightText(this.toLowerCase(), 'highlighted');
|
||||
});
|
||||
});
|
||||
|
||||
// directly open comment window if requested
|
||||
var anchor = document.location.hash;
|
||||
if (anchor.substring(0, 9) == '#comment-') {
|
||||
$('#ao' + anchor.substring(9)).click();
|
||||
document.location.hash = '#s' + anchor.substring(9);
|
||||
}
|
||||
});
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Acknowledgements — musrfit 1.6.4 documentation</title>
|
||||
<title>Acknowledgements — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="Bugtracking" href="bugtracking.html" />
|
||||
<link rel="prev" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="musr-root.html" title="MusrRoot - an Extensible Open File Format for μSR"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -112,12 +112,12 @@ extremely competent way to deal with his projects as well as to deal with the ch
|
||||
<li class="right" >
|
||||
<a href="musr-root.html" title="MusrRoot - an Extensible Open File Format for μSR"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.6.4 documentation</title>
|
||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
|
||||
<link rel="prev" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -102,12 +102,12 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
||||
<li class="right" >
|
||||
<a href="msr2data.html" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Bugtracking — musrfit 1.6.4 documentation</title>
|
||||
<title>Bugtracking — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="prev" title="Acknowledgements" href="acknowledgement.html" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -37,7 +37,7 @@
|
||||
<li class="right" >
|
||||
<a href="acknowledgement.html" title="Acknowledgements"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -93,12 +93,12 @@ or send an e-mail to A. Suter at PSI.</p>
|
||||
<li class="right" >
|
||||
<a href="acknowledgement.html" title="Acknowledgements"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>How to Cite musrfit? — musrfit 1.6.4 documentation</title>
|
||||
<title>How to Cite musrfit? — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="Tutorial for musrfit" href="tutorial.html" />
|
||||
<link rel="prev" title="Welcome to the musrfit documentation!" href="index.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="index.html" title="Welcome to the musrfit documentation!"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -114,12 +114,12 @@
|
||||
<li class="right" >
|
||||
<a href="index.html" title="Welcome to the musrfit documentation!"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — musrfit 1.6.4 documentation</title>
|
||||
<title>Index — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -15,7 +15,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -25,7 +25,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="related">
|
||||
@@ -34,7 +34,7 @@
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="#" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -990,12 +990,12 @@
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="#" title="General Index"
|
||||
>index</a></li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Mar 01, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Welcome to the musrfit documentation! — musrfit 1.6.4 documentation</title>
|
||||
<title>Welcome to the musrfit documentation! — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="#" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="#" />
|
||||
<link rel="next" title="How to Cite musrfit?" href="cite.html" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -37,7 +37,7 @@
|
||||
<li class="right" >
|
||||
<a href="cite.html" title="How to Cite musrfit?"
|
||||
accesskey="N">next</a> |</li>
|
||||
<li><a href="#">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="#">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -180,12 +180,12 @@
|
||||
<li class="right" >
|
||||
<a href="cite.html" title="How to Cite musrfit?"
|
||||
>next</a> |</li>
|
||||
<li><a href="#">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="#">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Mar 01, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.6.4 documentation</title>
|
||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
|
||||
<link rel="prev" title="mupp - μSR Parameter Plotter" href="mupp.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -434,12 +434,12 @@ fit serves as template for the second and so on. The template field stays empty
|
||||
<li class="right" >
|
||||
<a href="mupp.html" title="mupp - μSR Parameter Plotter"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>mupp - μSR Parameter Plotter — musrfit 1.6.4 documentation</title>
|
||||
<title>mupp - μSR Parameter Plotter — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
|
||||
<link rel="prev" title="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -324,12 +324,12 @@ SCRIPT COMMANDS:
|
||||
<li class="right" >
|
||||
<a href="musredit.html" title="musredit: the GUI Based Interface to musrfit"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.6.4 documentation</title>
|
||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="Acknowledgements" href="acknowledgement.html" />
|
||||
<link rel="prev" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="any2many.html" title="any2many - a Universal μSR-file-format converter"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -923,12 +923,12 @@ the entry has been added. The last token, <tt class="docutils literal"><span cla
|
||||
<li class="right" >
|
||||
<a href="any2many.html" title="any2many - a Universal μSR-file-format converter"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.6.4 documentation</title>
|
||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="mupp - μSR Parameter Plotter" href="mupp.html" />
|
||||
<link rel="prev" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s" href="setup-dks.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
<div class="section" id="introduction">
|
||||
<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
|
||||
<p><tt class="docutils literal"><span class="pre">musredit</span></tt> is an editor which also provide a graphical user interface to the programs contained in the <tt class="docutils literal"><span class="pre">musrfit</span></tt> suite and are intended
|
||||
to help the user handle <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr files. It is implemented in <tt class="docutils literal"><span class="pre">C++</span></tt> and use the <a class="reference external" href="https://qt.io">Qt</a> framework. <tt class="docutils literal"><span class="pre">musredit</span></tt> is based on Qt 4.6 or Qt 5.6 (or above).
|
||||
The Qt 5.6 version of <tt class="docutils literal"><span class="pre">musredit</span></tt> will be actively developed, whereas the Qt 4.x version will only get bug fixing and eventually will be dropped.
|
||||
to help the user handle <tt class="docutils literal"><span class="pre">musrfit</span></tt> msr files. It is implemented in <tt class="docutils literal"><span class="pre">C++</span></tt> and use the <a class="reference external" href="https://qt.io">Qt</a> framework. <tt class="docutils literal"><span class="pre">musredit</span></tt> is based on Qt 4.6, Qt 5.6 (or above), or Qt6.x.
|
||||
The Qt 5.6 and Qt 6.x version of <tt class="docutils literal"><span class="pre">musredit</span></tt> will be actively developed, whereas the Qt 4.x version will only get bug fixing and eventually will be dropped.
|
||||
On this documentation page only the features related to <tt class="docutils literal"><span class="pre">musrfit</span></tt> are described — the basic editor functions which should be self-explanatory are <em>not</em>.
|
||||
<tt class="docutils literal"><span class="pre">musrgui</span></tt> is an outdated early version of <tt class="docutils literal"><span class="pre">musredit</span></tt> and will not described anymore. If still in use, the user is urged to switch to <tt class="docutils literal"><span class="pre">musredit</span></tt>.</p>
|
||||
<div class="admonition note">
|
||||
@@ -550,12 +550,12 @@ the corresponding fit parameter value, except the phases where the step will be
|
||||
<li class="right" >
|
||||
<a href="setup-dks.html" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — musrfit 1.6.4 documentation</title>
|
||||
<title>Search — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -25,7 +25,7 @@
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a></li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -89,12 +89,12 @@
|
||||
<li class="right" style="margin-right: 10px">
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a></li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Mar 01, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.6.4 documentation</title>
|
||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="musredit: the GUI Based Interface to musrfit" href="musredit.html" />
|
||||
<link rel="prev" title="Setting up musrfit on Different Platforms" href="setup-standard.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="setup-standard.html" title="Setting up musrfit on Different Platforms"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -321,12 +321,12 @@ The only thing you need <tt class="docutils literal"><span class="pre">DKS</span
|
||||
<li class="right" >
|
||||
<a href="setup-standard.html" title="Setting up musrfit on Different Platforms"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Setting up musrfit on Different Platforms — musrfit 1.6.4 documentation</title>
|
||||
<title>Setting up musrfit on Different Platforms — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="Setting up musrfit / DKS: High Speed Fitting with GPU’s" href="setup-dks.html" />
|
||||
<link rel="prev" title="Documentation of user libs (user functions)" href="user-libs.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="user-libs.html" title="Documentation of user libs (user functions)"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -106,7 +106,7 @@ Currently the <tt class="docutils literal"><span class="pre">MXML</span></tt> su
|
||||
<p>If <em>optionally</em> the editor and graphical user interface <tt class="docutils literal"><span class="pre">musrgui</span></tt> / <tt class="docutils literal"><span class="pre">musredit</span></tt> is going to be installed there is one further requirement:</p>
|
||||
<dl class="docutils" id="index-11">
|
||||
<dt><strong>Qt</strong></dt>
|
||||
<dd>A cross-platform application and user interface framework. <em>Required version ≥ 4.6</em> (musredit) (see <a class="reference external" href="http://qt.io/">Qt</a>).</dd>
|
||||
<dd>A cross-platform application and user interface framework. <em>Required version ≥ 4.6</em> (musredit) (see <a class="reference external" href="http://qt.io/">Qt</a>). Currently the <strong>Qt5</strong> is the main development part. Qt6 just kicked in, but is not widely available yet.</dd>
|
||||
</dl>
|
||||
<p>Each of the following sections focusing on the installation of <tt class="docutils literal"><span class="pre">musrfit</span></tt> on the different operating systems will also give a brief introduction on the installation of the requirements before the actual musrfit installation is described.</p>
|
||||
</div>
|
||||
@@ -150,7 +150,7 @@ from the shell will do the trick (never type the ‘$’ it is the shell
|
||||
<p>For <strong>Qt5</strong>:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ yum install epel-release
|
||||
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt5-qtbase-devel qt5-qtsvg-devel qt5-qtwebkit-devel
|
||||
$ yum install git cmake boost-devel gsl-devel fftw-devel libxml2-devel qt5-qtbase-devel qt5-qtsvg-devel
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
@@ -165,7 +165,7 @@ the installation would look like:</p>
|
||||
</div></blockquote>
|
||||
<p>For <strong>Qt5</strong>:</p>
|
||||
<blockquote>
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev libqt5webkit5-dev
|
||||
<div><div class="highlight-bash"><div class="highlight"><pre><span></span>$ apt-get install git cmake libboost-dev libgsl-dev libfftw3-dev libxml2-dev qt5-default qtbase5-dev libqt5svg5-dev
|
||||
</pre></div>
|
||||
</div>
|
||||
</div></blockquote>
|
||||
@@ -241,9 +241,9 @@ $ <span class="nb">cd</span> Apps
|
||||
$ git clone http://github.com/root-project/root.git
|
||||
$ <span class="nb">cd</span> root
|
||||
$ git tag -l
|
||||
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-16-00</span>
|
||||
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-22-06</span>
|
||||
$ <span class="c1"># or the latest official release number</span>
|
||||
$ git checkout -b v6-16-00 v6-16-00
|
||||
$ git checkout -b v6-22-06 v6-22-06
|
||||
$ <span class="c1"># now ROOT is ready to be configured. Below you will find the minimal ROOT configuration needed.</span>
|
||||
$ <span class="c1"># since we are using cmake build now, first we will need to create the build directory.</span>
|
||||
$ mkdir root_build
|
||||
@@ -339,7 +339,7 @@ switch is not provided is <tt class="docutils literal"><span class="pre">BMWlibs
|
||||
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
|
||||
By default this is enabled. Again <value>=0 means disabled, <value>=1 enabled.</dd>
|
||||
<dt><strong>-Dqt_version=<value></strong></dt>
|
||||
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. <value> can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5</span></tt>.
|
||||
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. <value> can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
|
||||
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
|
||||
<dt><strong>-Dtry_OpenMP=<value></strong></dt>
|
||||
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is enabled</dd>
|
||||
@@ -380,23 +380,10 @@ detailed information on this XML file refer to the <a class="reference internal"
|
||||
<div class="section" id="musredit">
|
||||
<span id="index-20"></span><h3>musredit<a class="headerlink" href="#musredit" title="Permalink to this headline">¶</a></h3>
|
||||
<p>In the latest version of <tt class="docutils literal"><span class="pre">musrfit</span></tt> the configure script tries to determine automatically the highest available <tt class="docutils literal"><span class="pre">Qt</span></tt> version.
|
||||
In case this is found, the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is built already together with <tt class="docutils literal"><span class="pre">musrfit</span></tt>.
|
||||
To install this editor separately, <em>i.e.</em> by “hand” do</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> <span class="nv">$HOME</span>/Apps/musrfit/src/musredit_qt5
|
||||
$ <span class="c1"># for some distributions you will need qmake-qt5 for the next command</span>
|
||||
$ qmake musredit.pro
|
||||
</pre></div>
|
||||
In case this is found, the editor <tt class="docutils literal"><span class="pre">musredit</span></tt> is built already together with <tt class="docutils literal"><span class="pre">musrfit</span></tt>.</p>
|
||||
</div>
|
||||
<p>If everything went fine, <tt class="docutils literal"><span class="pre">musredit</span></tt> can be compiled and installed:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ make
|
||||
$ make install
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>In case one does not like the executable <tt class="docutils literal"><span class="pre">musredit</span></tt> to be copied to the default installation directory <tt class="docutils literal"><span class="pre">$ROOTSYS/bin</span></tt>
|
||||
the last <em>make install</em> can be skipped and the executable can be copied somewhere else instead.</p>
|
||||
</div>
|
||||
<div class="section" id="musrgui-obsolate">
|
||||
<h3>musrgui (obsolate)<a class="headerlink" href="#musrgui-obsolate" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="musrgui-depreciated">
|
||||
<h3>musrgui (depreciated)<a class="headerlink" href="#musrgui-depreciated" title="Permalink to this headline">¶</a></h3>
|
||||
<p>If <tt class="docutils literal"><span class="pre">Qt4.6</span></tt> or higher is not available but <tt class="docutils literal"><span class="pre">Qt3</span></tt> is set up <tt class="docutils literal"><span class="pre">musrgui</span></tt> can be installed. For this please
|
||||
follow the instructions for the <tt class="docutils literal"><span class="pre">musredit</span></tt> installation where simply every <tt class="docutils literal"><span class="pre">musredit</span></tt> occurrence has to
|
||||
be replaced by <tt class="docutils literal"><span class="pre">musrgui</span></tt>. If there are problems during the <tt class="docutils literal"><span class="pre">qmake</span></tt> step, <em>e.g.</em>
|
||||
@@ -603,7 +590,7 @@ The default setting, <em>i.e.</em> the switch is not provided is <tt class="docu
|
||||
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
|
||||
By default this is <em>enabled</em>. Again <value>=0 means disabled, <value>=1 enabled.</dd>
|
||||
<dt><strong>-Dqt_version=<value></strong></dt>
|
||||
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. <value> can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5</span></tt>.
|
||||
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. <value> can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
|
||||
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
|
||||
<dt><strong>-Dtry_OpenMP=<value></strong></dt>
|
||||
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is <em>enabled</em>.</dd>
|
||||
@@ -652,7 +639,7 @@ musredit <span class="p">&</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="id12">
|
||||
<h3>musrgui (obsolate)<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
|
||||
<h3>musrgui (depreciated)<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
|
||||
<p>If <tt class="docutils literal"><span class="pre">Qt4.5</span></tt> or higher is not available but <tt class="docutils literal"><span class="pre">Qt3</span></tt> is set up <tt class="docutils literal"><span class="pre">musrgui</span></tt> can be installed. For this
|
||||
please follow the instructions for the <tt class="docutils literal"><span class="pre">musredit</span></tt> installation where simply every <tt class="docutils literal"><span class="pre">musredit</span></tt> occurrence
|
||||
has to be replaced by <tt class="docutils literal"><span class="pre">musrgui</span></tt>, and <tt class="docutils literal"><span class="pre">qt4</span></tt> is replaced by <tt class="docutils literal"><span class="pre">qt3</span></tt>.</p>
|
||||
@@ -686,6 +673,11 @@ and <tt class="docutils literal"><span class="pre">C:\cygwin\bin\bash.exe</span>
|
||||
<h2>Mac OS X / macOS<a class="headerlink" href="#mac-os-x-macos" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">macOS 11 alias <strong>Big Sur</strong>: <tt class="docutils literal"><span class="pre">musrfit</span></tt> is ready for <strong>Big Sur</strong> on Intel based macs. The <tt class="docutils literal"><span class="pre">DKS</span></tt> version of
|
||||
<tt class="docutils literal"><span class="pre">musrfit</span></tt> for macOS <strong>Big Sur</strong> is ready as well.</p>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">macOS Catalina is slightly different in some aspects, so if it happens that you have it installed, please
|
||||
first check <a class="reference internal" href="#note-on-catalina"><em>Notes on macOS Catalina</em></a> before you proceed.</p>
|
||||
</div>
|
||||
@@ -753,7 +745,7 @@ add a new line pointing to your local copy, <em>e.g.</em></p>
|
||||
</ol>
|
||||
<p>Then the MacPorts system should be set up and can be used to install additional software.</p>
|
||||
<p>The installation of the software mentioned above is then done in the terminal:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ sudo port -v install pkgconfig autoconf automake libtool cmake fftw-3 fftw-3-single gsl boost libxml2 qt5 qt5-qtsvg qt5-qtwebengine
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ sudo port -v install pkgconfig autoconf automake libtool cmake fftw-3 fftw-3-single gsl boost libxml2 qt5 qt5-qtsvg
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>With <tt class="docutils literal"><span class="pre">Qt5</span></tt>, <tt class="docutils literal"><span class="pre">musredit</span></tt> will be installed. If it happens that you used <tt class="docutils literal"><span class="pre">musrgui</span></tt> in the past,
|
||||
@@ -792,9 +784,9 @@ it is at the time of writting <tt class="docutils literal"><span class="pre">roo
|
||||
<tt class="docutils literal"><span class="pre">ROOT</span></tt> will be installed under <tt class="docutils literal"><span class="pre">/Application</span></tt> as owner root. In order to ease your life for the
|
||||
steps to follow and assuming you are the only guy working on your Mac, you could change the owner and group of the <tt class="docutils literal"><span class="pre">ROOT</span></tt> directory:</p>
|
||||
<div class="highlight-bash"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> /Applications
|
||||
$ sudo chown -R <username> root_v6.16.00
|
||||
$ sudo chgrp -R staff root_v6.16.00
|
||||
$ sudo ln -s root_v6.16.00 root
|
||||
$ sudo chown -R <username> root_v6.22.00
|
||||
$ sudo chgrp -R staff root_v6.22.00
|
||||
$ sudo ln -s root_v6.22.00 root
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -811,14 +803,14 @@ comments will be added starting with a ‘#’ which can be omitted. The
|
||||
$ git clone http://github.com/root-project/root.git
|
||||
$ <span class="nb">cd</span> root
|
||||
$ git tag -l
|
||||
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-10-xx</span>
|
||||
$ <span class="c1"># where xx is the highest listed number, e.g. v6-16-00</span>
|
||||
$ git checkout -b v6-16-00 v6-16-00
|
||||
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-xx-yy</span>
|
||||
$ <span class="c1"># where xx is the highest listed number, e.g. v6-22-06</span>
|
||||
$ git checkout -b v6-22-06 v6-22-06
|
||||
$ <span class="c1"># now ROOT is ready to be configured. Below you will find the minimal ROOT configuration needed.</span>
|
||||
$ <span class="c1"># We will use the cmake out-of-source approach here.</span>
|
||||
$ mkdir root_build
|
||||
$ <span class="nb">cd</span> root_build
|
||||
$ cmake ../ -Dgminimal<span class="o">=</span>ON -Dasimage<span class="o">=</span>ON -Dmathmore<span class="o">=</span>ON -Dminuit2<span class="o">=</span>ON -Dxml<span class="o">=</span>ON -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
|
||||
$ cmake ../ -Dgminimal<span class="o">=</span><span class="m">1</span> -Dasimage<span class="o">=</span><span class="m">1</span> -Dmathmore<span class="o">=</span><span class="m">1</span> -Dminuit2<span class="o">=</span><span class="m">1</span> -Dxml<span class="o">=</span><span class="m">1</span> -Dopengl<span class="o">=</span><span class="m">1</span> -Dbuiltin_glew<span class="o">=</span><span class="m">1</span> -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
|
||||
$ <span class="c1"># next will be the make. If running on a multicore CPU you can speed up tremendously by calling</span>
|
||||
$ <span class="c1"># make with the option -j <number>, where <number> is the number of threads which you want to give,</span>
|
||||
$ <span class="c1"># e.g. make -j8</span>
|
||||
@@ -927,8 +919,7 @@ is necessary to compile a few packages from source since no binary packages are
|
||||
automatically by the FinkCommander after you have chosen the software packages for installation:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span></span>autoconf automake cmake boost1.63-nopython boost1.63.nopython-shlibs fftw3 fftw3-shlibs gsl gsl-shlibs
|
||||
libtool2 libtool2-shlibs libxml2 libxml2-bin libxml2-shlibs pkgconfig qt5-mac-qtbase qt5-mac-qtbase-dev-tools
|
||||
qt5-mac-qtsvg qt5-mac-qtsvg-shlibs qt5-mac-qtwebengine qt5-mac-qtwebengine-shlibs qt5-mac-qtwebenginecore-shlibs
|
||||
qt5-mac-qtwebenginewidgets-shlibs
|
||||
qt5-mac-qtsvg qt5-mac-qtsvg-shlibs
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Under OS X 10.6 Snow Leopard it will <em>not</em> be possible to install <tt class="docutils literal"><span class="pre">qt3mac</span></tt> since the system is by default a 64-bit
|
||||
@@ -1005,14 +996,14 @@ comments will be added starting with a ‘#’ which can be omitted. The
|
||||
$ git clone http://github.com/root-project/root.git
|
||||
$ <span class="nb">cd</span> root
|
||||
$ git tag -l
|
||||
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-10-xx</span>
|
||||
$ <span class="c1"># where xx is the highest listed number, e.g. v6-16-00</span>
|
||||
$ git checkout -b v6-16-00 v6-16-00
|
||||
$ <span class="c1"># git tag -l will list all available tags. In the next command choose the tag v6-xx-yy</span>
|
||||
$ <span class="c1"># where xx is the highest listed number, e.g. v6-22-06</span>
|
||||
$ git checkout -b v6-22-06 v6-22-06
|
||||
$ <span class="c1"># now ROOT is ready to be configured. Below you will find the minimal ROOT configuration needed.</span>
|
||||
$ <span class="c1"># We will use the cmake out-of-source approach here.</span>
|
||||
$ mkdir root_build
|
||||
$ <span class="nb">cd</span> root_build
|
||||
$ cmake ../ -Dgminimal<span class="o">=</span>ON -Dasimage<span class="o">=</span>ON -Dmathmore<span class="o">=</span>ON -Dminuit2<span class="o">=</span>ON -Dxml<span class="o">=</span>ON -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
|
||||
$ cmake ../ -Dgminimal<span class="o">=</span><span class="m">1</span> -Dasimage<span class="o">=</span><span class="m">1</span> -Dmathmore<span class="o">=</span><span class="m">1</span> -Dminuit2<span class="o">=</span><span class="m">1</span> -Dxml<span class="o">=</span><span class="m">1</span> -Dopengl<span class="o">=</span><span class="m">1</span> -Dbuiltin_glew<span class="o">=</span><span class="m">1</span> -DCMAKE_INSTALL_PREFIX<span class="o">=</span><span class="nv">$HOME</span>/Applications/root/root_exec
|
||||
$ <span class="c1"># next will be the make. If running on a multicore CPU you can speed up tremendously by calling</span>
|
||||
$ <span class="c1"># make with the option -j <number>, where <number> is the number of threads which you want to give,</span>
|
||||
$ <span class="c1"># e.g. make -j8</span>
|
||||
@@ -1112,7 +1103,7 @@ switch is not provided is <tt class="docutils literal"><span class="pre">BMWlibs
|
||||
<dd>Will try to get <tt class="docutils literal"><span class="pre">musredit</span></tt>, <tt class="docutils literal"><span class="pre">musrWiz</span></tt>, <tt class="docutils literal"><span class="pre">musrStep</span></tt>, and <tt class="docutils literal"><span class="pre">mupp</span></tt> installed, if <tt class="docutils literal"><span class="pre">Qt</span></tt> is found.
|
||||
By default this is enabled. Again <value>=0 means disabled, <value>=1 enabled.</dd>
|
||||
<dt><strong>-Dqt_version=<value></strong></dt>
|
||||
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. <value> can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5</span></tt>.
|
||||
<dd>Allows to specify which <tt class="docutils literal"><span class="pre">Qt</span></tt> version shall be tried. <value> can take the values: <tt class="docutils literal"><span class="pre">AUTO,</span> <span class="pre">3,</span> <span class="pre">4,</span> <span class="pre">5,</span> <span class="pre">6</span></tt>.
|
||||
If the value is set to <tt class="docutils literal"><span class="pre">AUTO</span></tt>, this highest installed version is chosen, otherwise the specified version is used.</dd>
|
||||
<dt><strong>-Dtry_OpenMP=<value></strong></dt>
|
||||
<dd>Will check if <tt class="docutils literal"><span class="pre">OpenMP</span></tt> support is possible, and if yes use it. The default is enabled</dd>
|
||||
@@ -1223,7 +1214,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#musredit">musredit</a></li>
|
||||
<li><a class="reference internal" href="#musrgui-obsolate">musrgui (obsolate)</a></li>
|
||||
<li><a class="reference internal" href="#musrgui-depreciated">musrgui (depreciated)</a></li>
|
||||
<li><a class="reference internal" href="#check-the-installation">Check the installation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -1240,7 +1231,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#index-26">musredit</a></li>
|
||||
<li><a class="reference internal" href="#id12">musrgui (obsolate)</a></li>
|
||||
<li><a class="reference internal" href="#id12">musrgui (depreciated)</a></li>
|
||||
<li><a class="reference internal" href="#id13">Check the installation</a></li>
|
||||
<li><a class="reference internal" href="#potential-problems">Potential Problems</a></li>
|
||||
</ul>
|
||||
@@ -1311,12 +1302,12 @@ $ musrview test-histo-ROOT-NPP.msr
|
||||
<li class="right" >
|
||||
<a href="user-libs.html" title="Documentation of user libs (user functions)"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Mar 01, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Tutorial for musrfit — musrfit 1.6.4 documentation</title>
|
||||
<title>Tutorial for musrfit — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="User manual" href="user-manual.html" />
|
||||
<link rel="prev" title="How to Cite musrfit?" href="cite.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="cite.html" title="How to Cite musrfit?"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -443,12 +443,12 @@ For a complete description please refer to the manuals of <a class="reference in
|
||||
<li class="right" >
|
||||
<a href="cite.html" title="How to Cite musrfit?"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Documentation of user libs (user functions) — musrfit 1.6.4 documentation</title>
|
||||
<title>Documentation of user libs (user functions) — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="Setting up musrfit on Different Platforms" href="setup-standard.html" />
|
||||
<link rel="prev" title="User manual" href="user-manual.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="user-manual.html" title="User manual"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -662,12 +662,12 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
||||
<li class="right" >
|
||||
<a href="user-manual.html" title="User manual"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Jan 23, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>User manual — musrfit 1.6.4 documentation</title>
|
||||
<title>User manual — musrfit 1.6.5 documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
@@ -14,7 +14,7 @@
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '1.6.4',
|
||||
VERSION: '1.6.5',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
@@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="top" title="musrfit 1.6.4 documentation" href="index.html" />
|
||||
<link rel="top" title="musrfit 1.6.5 documentation" href="index.html" />
|
||||
<link rel="next" title="Documentation of user libs (user functions)" href="user-libs.html" />
|
||||
<link rel="prev" title="Tutorial for musrfit" href="tutorial.html" />
|
||||
</head>
|
||||
@@ -41,7 +41,7 @@
|
||||
<li class="right" >
|
||||
<a href="tutorial.html" title="Tutorial for musrfit"
|
||||
accesskey="P">previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -2242,11 +2242,6 @@ In this abstract base class a function operator is defined that takes two argume
|
||||
<span class="n">TMyFunction</span><span class="p">(){}</span>
|
||||
<span class="o">~</span><span class="n">TMyFunction</span><span class="p">(){}</span>
|
||||
|
||||
<span class="c1">// global user-function-access functions, here without any functionality</span>
|
||||
<span class="n">Bool_t</span> <span class="n">NeedGlobalPart</span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span> <span class="k">return</span> <span class="nb">false</span><span class="p">;</span> <span class="p">}</span>
|
||||
<span class="kt">void</span> <span class="n">SetGlobalPart</span><span class="p">(</span><span class="n">vector</span><span class="o"><</span><span class="kt">void</span><span class="o">*></span> <span class="o">&</span><span class="n">globalPart</span><span class="p">,</span> <span class="n">UInt_t</span> <span class="n">idx</span><span class="p">)</span> <span class="p">{</span> <span class="p">}</span>
|
||||
<span class="n">Bool_t</span> <span class="n">GlobalPartIsValid</span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span> <span class="k">return</span> <span class="nb">true</span><span class="p">;</span> <span class="p">}</span>
|
||||
|
||||
<span class="c1">// function operator</span>
|
||||
<span class="n">Double_t</span> <span class="k">operator</span><span class="p">()(</span><span class="n">Double_t</span><span class="p">,</span> <span class="k">const</span> <span class="n">vector</span><span class="o"><</span><span class="n">Double_t</span><span class="o">>&</span><span class="p">)</span> <span class="k">const</span><span class="p">;</span>
|
||||
|
||||
@@ -2557,12 +2552,12 @@ In case this cannot be ensured, the parallelization can be disabled by <em>̵
|
||||
<li class="right" >
|
||||
<a href="tutorial.html" title="Tutorial for musrfit"
|
||||
>previous</a> |</li>
|
||||
<li><a href="index.html">musrfit 1.6.4 documentation</a> »</li>
|
||||
<li><a href="index.html">musrfit 1.6.5 documentation</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer">
|
||||
© Copyright 2020, Andreas Suter.
|
||||
Last updated on Aug 29, 2020.
|
||||
© Copyright 2021, Andreas Suter.
|
||||
Last updated on Feb 26, 2021.
|
||||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
#--- add further sub-directories ----------------------------------------------
|
||||
add_subdirectory(classes)
|
||||
add_subdirectory(external)
|
||||
if (Qt5Core_FOUND)
|
||||
if (Qt6Core_FOUND)
|
||||
add_subdirectory(musredit_qt6)
|
||||
elseif (Qt5Core_FOUND)
|
||||
add_subdirectory(musredit_qt5)
|
||||
elseif (Qt4_FOUND)
|
||||
add_subdirectory(musredit)
|
||||
elseif (QT_FOUND)
|
||||
add_subdirectory(musrgui)
|
||||
endif (Qt5Core_FOUND)
|
||||
endif ()
|
||||
|
||||
#--- define the musrfit libs --------------------------------------------------
|
||||
set(MUSRFIT_LIBS ${MUSRFIT_LIBS} mud)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#--- build the PMusr and PUserFcnBase libs ------------------------------------
|
||||
#--- build the PMusr, PUserFcnBase, and PRgeHandler libs ----------------------
|
||||
|
||||
#--- generate necessary dictionaries ------------------------------------------
|
||||
set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
@@ -53,6 +53,18 @@ root_generate_dictionary(
|
||||
-I${FFTW3_INCLUDE_DIR} -I${MUSRFIT_INC}
|
||||
MODULE PUserFcnBase
|
||||
)
|
||||
root_generate_dictionary(
|
||||
PRgeHandlerDict
|
||||
PRgeHandler.h
|
||||
OPTIONS
|
||||
-I${NONLOCAL_INC}
|
||||
-I${MUSRFIT_INC}
|
||||
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||
-inlineInputHeader
|
||||
LINKDEF ${MUSRFIT_INC}/PRgeHandlerLinkDef.h
|
||||
MODULE PRgeHandler
|
||||
)
|
||||
|
||||
|
||||
#--- create pkg-config info ---------------------------------------------------
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
@@ -64,6 +76,8 @@ set(MUSR_LIBRARY_NAME "PMusr")
|
||||
configure_file("PMusr.pc.in" "PMusr.pc" @ONLY)
|
||||
set(USERFCN_LIBRARY_NAME "PUserFcnBase")
|
||||
configure_file("PUserFcnBase.pc.in" "PUserFcnBase.pc" @ONLY)
|
||||
set(PRGEHANDLER_LIBRARY_NAME "PRgeHandler")
|
||||
configure_file("PRgeHandler.pc.in" "PRgeHandler.pc" @ONLY)
|
||||
|
||||
#--- lib creation -------------------------------------------------------------
|
||||
add_library(PMusr SHARED
|
||||
@@ -117,6 +131,11 @@ add_library(PUserFcnBase SHARED
|
||||
PUserFcnBaseDict.cxx
|
||||
)
|
||||
|
||||
add_library(PRgeHandler SHARED
|
||||
PRgeHandler.cpp
|
||||
PRgeHandlerDict.cxx
|
||||
)
|
||||
|
||||
#--- set target properties, e.g. version --------------------------------------
|
||||
set_target_properties(PMusr
|
||||
PROPERTIES
|
||||
@@ -126,11 +145,20 @@ set_target_properties(PUserFcnBase
|
||||
PROPERTIES
|
||||
VERSION ${MUSR_VERSION}
|
||||
)
|
||||
set_target_properties(PRgeHandler
|
||||
PROPERTIES
|
||||
VERSION ${MUSR_VERSION}
|
||||
)
|
||||
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PUserFcnBase BEFORE PRIVATE $<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
PRgeHandler BEFORE PRIVATE $<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
)
|
||||
|
||||
#--- add OpenMP compile options if needed -------------------------------------
|
||||
if (OpenMP_FOUND)
|
||||
target_compile_options(PMusr PUBLIC ${OpenMP_CXX_FLAGS})
|
||||
@@ -157,11 +185,15 @@ if (OpenMP_FOUND)
|
||||
endif (OpenMP_FOUND)
|
||||
|
||||
target_link_libraries(PUserFcnBase ${ROOT_LIBRARIES})
|
||||
target_link_libraries(PRgeHandler ${Boost_LIBRARIES} ${ROOT_LIBRARIES})
|
||||
target_link_libraries(PMusr ${DependOnLibs})
|
||||
|
||||
#--- install PUserFcnBase solib -----------------------------------------------
|
||||
install(TARGETS PUserFcnBase DESTINATION lib)
|
||||
|
||||
#--- install PRgeHandler solib -----------------------------------------------
|
||||
install(TARGETS PRgeHandler DESTINATION lib)
|
||||
|
||||
#--- install PMusr solib ------------------------------------------------------
|
||||
install(TARGETS PMusr DESTINATION lib)
|
||||
|
||||
@@ -173,6 +205,8 @@ install(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrCanvas.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrT0_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPMusrT0.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPRgeHandler_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPRgeHandler.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler_rdict.pcm
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPStartupHandler.rootmap
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libPUserFcnBase_rdict.pcm
|
||||
@@ -195,6 +229,7 @@ install(
|
||||
${MUSRFIT_INC}/PMusr.h
|
||||
${MUSRFIT_INC}/PMusrT0.h
|
||||
${MUSRFIT_INC}/PPrepFourier.h
|
||||
${MUSRFIT_INC}/PRgeHandler.h
|
||||
${MUSRFIT_INC}/PRunAsymmetry.h
|
||||
${MUSRFIT_INC}/PRunAsymmetryBNMR.h
|
||||
${MUSRFIT_INC}/PRunAsymmetryRRF.h
|
||||
@@ -214,6 +249,7 @@ install(
|
||||
#--- install pkg-config info --------------------------------------------------
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/PUserFcnBase.pc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/PRgeHandler.pc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/PMusr.pc
|
||||
DESTINATION lib/pkgconfig
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2019 by Bastian M. Wojek / Andreas Suter *
|
||||
* Copyright (C) 2009-2021 by Bastian M. Wojek / Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -3675,6 +3675,7 @@ void PMusrCanvas::HandleFourierDifference()
|
||||
fData[i].diffFourierRe = new TH1F(name, name, fData[i].dataFourierRe->GetNbinsX(),
|
||||
fData[i].dataFourierRe->GetXaxis()->GetXmin(),
|
||||
fData[i].dataFourierRe->GetXaxis()->GetXmax());
|
||||
|
||||
// imaginary part
|
||||
name = TString(fData[i].dataFourierIm->GetTitle()) + "_diff";
|
||||
fData[i].diffFourierIm = new TH1F(name, name, fData[i].dataFourierIm->GetNbinsX(),
|
||||
@@ -3692,10 +3693,12 @@ void PMusrCanvas::HandleFourierDifference()
|
||||
fData[i].dataFourierPhase->GetXaxis()->GetXmax());
|
||||
|
||||
// phase optimized real part
|
||||
name = TString(fData[i].dataFourierPhaseOptReal->GetTitle()) + "_diff";
|
||||
fData[i].diffFourierPhaseOptReal = new TH1F(name, name, fData[i].dataFourierPhaseOptReal->GetNbinsX(),
|
||||
fData[i].dataFourierPhaseOptReal->GetXaxis()->GetXmin(),
|
||||
fData[i].dataFourierPhaseOptReal->GetXaxis()->GetXmax());
|
||||
if (fData[i].dataFourierPhaseOptReal != nullptr) {
|
||||
name = TString(fData[i].dataFourierPhaseOptReal->GetTitle()) + "_diff";
|
||||
fData[i].diffFourierPhaseOptReal = new TH1F(name, name, fData[i].dataFourierPhaseOptReal->GetNbinsX(),
|
||||
fData[i].dataFourierPhaseOptReal->GetXaxis()->GetXmin(),
|
||||
fData[i].dataFourierPhaseOptReal->GetXaxis()->GetXmax());
|
||||
}
|
||||
|
||||
// calculate difference
|
||||
for (UInt_t j=1; j<fData[i].dataFourierRe->GetEntries(); j++) {
|
||||
@@ -3715,10 +3718,12 @@ void PMusrCanvas::HandleFourierDifference()
|
||||
theoBin = fData[i].theoryFourierPhase->FindBin(dvalx); // get the theory x-axis bin
|
||||
dval = fData[i].dataFourierPhase->GetBinContent(j) - fData[i].theoryFourierPhase->GetBinContent(theoBin);
|
||||
fData[i].diffFourierPhase->SetBinContent(j, dval);
|
||||
dvalx = fData[i].dataFourierPhaseOptReal->GetXaxis()->GetBinCenter(j); // get x-axis value of bin j
|
||||
theoBin = fData[i].theoryFourierPhaseOptReal->FindBin(dvalx); // get the theory x-axis bin
|
||||
dval = fData[i].dataFourierPhaseOptReal->GetBinContent(j) - fData[i].theoryFourierPhaseOptReal->GetBinContent(theoBin);
|
||||
fData[i].diffFourierPhaseOptReal->SetBinContent(j, dval);
|
||||
if (fData[i].dataFourierPhaseOptReal != nullptr) {
|
||||
dvalx = fData[i].dataFourierPhaseOptReal->GetXaxis()->GetBinCenter(j); // get x-axis value of bin j
|
||||
theoBin = fData[i].theoryFourierPhaseOptReal->FindBin(dvalx); // get the theory x-axis bin
|
||||
dval = fData[i].dataFourierPhaseOptReal->GetBinContent(j) - fData[i].theoryFourierPhaseOptReal->GetBinContent(theoBin);
|
||||
fData[i].diffFourierPhaseOptReal->SetBinContent(j, dval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3732,21 +3737,27 @@ void PMusrCanvas::HandleFourierDifference()
|
||||
fData[i].diffFourierPwr->SetLineColor(fData[i].dataFourierPwr->GetLineColor());
|
||||
fData[i].diffFourierPhase->SetMarkerColor(fData[i].dataFourierPhase->GetMarkerColor());
|
||||
fData[i].diffFourierPhase->SetLineColor(fData[i].dataFourierPhase->GetLineColor());
|
||||
fData[i].diffFourierPhaseOptReal->SetMarkerColor(fData[i].dataFourierPhaseOptReal->GetMarkerColor());
|
||||
fData[i].diffFourierPhaseOptReal->SetLineColor(fData[i].dataFourierPhaseOptReal->GetLineColor());
|
||||
if (fData[i].dataFourierPhaseOptReal != nullptr) {
|
||||
fData[i].diffFourierPhaseOptReal->SetMarkerColor(fData[i].dataFourierPhaseOptReal->GetMarkerColor());
|
||||
fData[i].diffFourierPhaseOptReal->SetLineColor(fData[i].dataFourierPhaseOptReal->GetLineColor());
|
||||
}
|
||||
|
||||
// set marker size
|
||||
fData[i].diffFourierRe->SetMarkerSize(1);
|
||||
fData[i].diffFourierIm->SetMarkerSize(1);
|
||||
fData[i].diffFourierPwr->SetMarkerSize(1);
|
||||
fData[i].diffFourierPhase->SetMarkerSize(1);
|
||||
fData[i].diffFourierPhaseOptReal->SetMarkerSize(1);
|
||||
if (fData[i].dataFourierPhaseOptReal != nullptr) {
|
||||
fData[i].diffFourierPhaseOptReal->SetMarkerSize(1);
|
||||
}
|
||||
// set marker type
|
||||
fData[i].diffFourierRe->SetMarkerStyle(fData[i].dataFourierRe->GetMarkerStyle());
|
||||
fData[i].diffFourierIm->SetMarkerStyle(fData[i].dataFourierIm->GetMarkerStyle());
|
||||
fData[i].diffFourierPwr->SetMarkerStyle(fData[i].dataFourierPwr->GetMarkerStyle());
|
||||
fData[i].diffFourierPhase->SetMarkerStyle(fData[i].dataFourierPhase->GetMarkerStyle());
|
||||
fData[i].diffFourierPhaseOptReal->SetMarkerStyle(fData[i].dataFourierPhaseOptReal->GetMarkerStyle());
|
||||
if (fData[i].dataFourierPhaseOptReal != nullptr) {
|
||||
fData[i].diffFourierPhaseOptReal->SetMarkerStyle(fData[i].dataFourierPhaseOptReal->GetMarkerStyle());
|
||||
}
|
||||
|
||||
// set diffFourierTag
|
||||
fData[i].diffFourierTag = 2; // f-d
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
603
src/classes/PRgeHandler.cpp
Normal file
@@ -0,0 +1,603 @@
|
||||
/***************************************************************************
|
||||
|
||||
PRgeHandler.cpp
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "PRgeHandler.h"
|
||||
|
||||
ClassImpQ(PXmlRgeHandler)
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnStartDocument
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Called on start of the XML file reading. Initializes all necessary variables.
|
||||
*/
|
||||
void PXmlRgeHandler::OnStartDocument()
|
||||
{
|
||||
fKey = eEmpty;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnEndDocument
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Called on end of XML file reading.
|
||||
*/
|
||||
void PXmlRgeHandler::OnEndDocument()
|
||||
{
|
||||
if (!fIsValid)
|
||||
return;
|
||||
|
||||
// check if anything was set
|
||||
if (fTrimSpDataPath.empty()) {
|
||||
std::string err = "<data_path> content is missing!";
|
||||
fIsValid = false;
|
||||
OnError(err.c_str());
|
||||
}
|
||||
if (fTrimSpFlnPre.empty()) {
|
||||
std::string err = "<rge_fln_pre> content is missing!";
|
||||
fIsValid = false;
|
||||
OnError(err.c_str());
|
||||
}
|
||||
if (fTrimSpDataEnergyList.size()==0) {
|
||||
std::string err = "no implantation energies present!";
|
||||
fIsValid = false;
|
||||
OnError(err.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnStartElement
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Called when a XML start element is found. Filters out the needed elements
|
||||
* and sets a proper key.
|
||||
*
|
||||
* \param str XML element name
|
||||
* \param attributes not used
|
||||
*/
|
||||
void PXmlRgeHandler::OnStartElement(const Char_t *str, const TList *attributes)
|
||||
{
|
||||
if (!strcmp(str, "trim_sp")) {
|
||||
isTrimSp=true;
|
||||
} else if (!strcmp(str, "data_path") && isTrimSp) {
|
||||
fKey = eDataPath;
|
||||
} else if (!strcmp(str, "rge_fln_pre") && isTrimSp) {
|
||||
fKey = eFlnPre;
|
||||
} else if (!strcmp(str, "energy") && isTrimSp) {
|
||||
fKey = eEnergy;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnEndElement
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Called when a XML end element is found. Resets the handler key.
|
||||
*
|
||||
* \param str not used
|
||||
*/
|
||||
void PXmlRgeHandler::OnEndElement(const Char_t *str)
|
||||
{
|
||||
if (!strcmp(str, "trim_sp")) {
|
||||
isTrimSp=false;
|
||||
}
|
||||
|
||||
fKey = eEmpty;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnCharacters
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Content of a given XML element. Filters out the data and feeds them to
|
||||
* the internal variables.
|
||||
*
|
||||
* \param str XML element string
|
||||
*/
|
||||
void PXmlRgeHandler::OnCharacters(const Char_t *str)
|
||||
{
|
||||
int ival;
|
||||
std::string msg(""), sstr(str);
|
||||
size_t pos;
|
||||
|
||||
switch(fKey) {
|
||||
case eDataPath:
|
||||
fTrimSpDataPath=str;
|
||||
break;
|
||||
case eFlnPre:
|
||||
fTrimSpFlnPre=str;
|
||||
break;
|
||||
case eEnergy:
|
||||
try {
|
||||
ival = std::stoi(str, &pos);
|
||||
} catch(std::invalid_argument& e) {
|
||||
fIsValid = false;
|
||||
msg = "The found energy '" + sstr + "' which is not a number";
|
||||
OnError(msg.c_str());
|
||||
} catch(std::out_of_range& e) {
|
||||
fIsValid = false;
|
||||
msg = "The found energy '" + sstr + "' which is out-of-range.";
|
||||
OnError(msg.c_str());
|
||||
} catch(...) {
|
||||
fIsValid = false;
|
||||
msg = "The found energy '" + sstr + "' which generates an error.";
|
||||
OnError(msg.c_str());
|
||||
}
|
||||
if (pos != sstr.length()) {
|
||||
fIsValid = false;
|
||||
msg = "The found energy '" + sstr + "' which is not an integer";
|
||||
OnError(msg.c_str());
|
||||
}
|
||||
fTrimSpDataEnergyList.push_back(ival);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnComment
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Called when a XML comment is found. Not used.
|
||||
*
|
||||
* \param str not used.
|
||||
*/
|
||||
void PXmlRgeHandler::OnComment(const Char_t *str)
|
||||
{
|
||||
// nothing to be done for now
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnWarning
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Called when the XML parser emits a warning.
|
||||
*
|
||||
* \param str warning string
|
||||
*/
|
||||
void PXmlRgeHandler::OnWarning(const Char_t *str)
|
||||
{
|
||||
std::cerr << std::endl << "PXmlRgeHandler **WARNING** " << str;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnError
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Called when the XML parser emits an error.
|
||||
*
|
||||
* \param str error string
|
||||
*/
|
||||
void PXmlRgeHandler::OnError(const Char_t *str)
|
||||
{
|
||||
std::cerr << std::endl << "PXmlRgeHandler **ERROR** " << str;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnFatalError
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Called when the XML parser emits a fatal error.
|
||||
*
|
||||
* \param str fatal error string
|
||||
*/
|
||||
void PXmlRgeHandler::OnFatalError(const Char_t *str)
|
||||
{
|
||||
std::cerr << std::endl << "PXmlRgeHandler **FATAL ERROR** " << str;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnCdataBlock
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Not used.
|
||||
*
|
||||
* \param str not used
|
||||
* \param len not used
|
||||
*/
|
||||
void PXmlRgeHandler::OnCdataBlock(const Char_t *str, Int_t len)
|
||||
{
|
||||
// nothing to be done for now
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
ClassImp(PRgeHandler)
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Ctor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief PRgeHandler::PRgeHandler
|
||||
* @param fln
|
||||
*/
|
||||
PRgeHandler::PRgeHandler(const std::string fln)
|
||||
{
|
||||
// make sure there is an xml-startup file name
|
||||
if (fln.empty()) { // fln not given
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** NO xml file name provided." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
fValid=false;
|
||||
return;
|
||||
}
|
||||
|
||||
// read the startup xml-file to extract the necessary rge infos.
|
||||
if (!boost::filesystem::exists(fln)) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** xml file named: " << fln << " does not exist." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
fValid=false;
|
||||
return;
|
||||
}
|
||||
|
||||
// create the rge xml handler
|
||||
PXmlRgeHandler *xmlRge = new PXmlRgeHandler();
|
||||
if (xmlRge == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke PXmlRgeHandler." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
fValid=false;
|
||||
return;
|
||||
}
|
||||
|
||||
// create the SAX parser
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
if (saxParser == nullptr) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** couldn't invoke TSAXParser." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
fValid=false;
|
||||
return;
|
||||
}
|
||||
saxParser->SetStopOnError();
|
||||
|
||||
// connect SAX parser and rge handler
|
||||
saxParser->ConnectToHandler("PXmlRgeHandler", xmlRge);
|
||||
int status = saxParser->ParseFile(fln.c_str());
|
||||
if (status != 0) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** parsing the xml-file: " << fln << "." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
fValid=false;
|
||||
return;
|
||||
}
|
||||
if (xmlRge->IsValid())
|
||||
fValid = true;
|
||||
else
|
||||
fValid = false;
|
||||
|
||||
// read the rge-file(s) content if everything went fine so far
|
||||
std::string rgeFln;
|
||||
PRgeData dataSet;
|
||||
if (fValid) {
|
||||
const PIntVector energy = xmlRge->GetTrimSpDataVectorList();
|
||||
for (int i=0; i<energy.size(); i++) {
|
||||
// construct the file name
|
||||
rgeFln = xmlRge->GetTrimSpDataPath();
|
||||
if (rgeFln[rgeFln.size()-1] != '/')
|
||||
rgeFln += "/";
|
||||
rgeFln += xmlRge->GetTrimSpFlnPre();
|
||||
rgeFln += std::to_string(energy[i]);
|
||||
rgeFln += ".rge";
|
||||
if (!boost::filesystem::exists(rgeFln)) {
|
||||
fValid = false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** rge-file: " << rgeFln << " not found." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
// init data set
|
||||
dataSet.energy = energy[i];
|
||||
dataSet.depth.clear();
|
||||
dataSet.amplitude.clear();
|
||||
if (!ReadRgeFile(rgeFln, dataSet)) {
|
||||
fValid = false;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** read error in rge-file: " << rgeFln << " not found." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
// get the total number of particles
|
||||
double tot=0.0;
|
||||
for (int j=0; j<dataSet.amplitude.size(); j++)
|
||||
tot += dataSet.amplitude[j];
|
||||
dataSet.noOfParticles = tot;
|
||||
|
||||
// sum_j nn dzz == 1, (dzz_j = depth[j]-depth[j-1])
|
||||
dataSet.nn.resize(dataSet.amplitude.size());
|
||||
tot = 0.0;
|
||||
double zz=0.0; // "previous" zz (since depth[j]-depth[j-1] != const) it needs to be done this way.
|
||||
for (int j=0; j<dataSet.nn.size(); j++) {
|
||||
tot += dataSet.amplitude[j] * (dataSet.depth[j] - zz);
|
||||
zz = dataSet.depth[j];
|
||||
}
|
||||
for (int j=0; j<dataSet.nn.size(); j++) {
|
||||
dataSet.nn[j] = dataSet.amplitude[j] / tot;
|
||||
}
|
||||
|
||||
fData.push_back(dataSet);
|
||||
}
|
||||
}
|
||||
|
||||
delete saxParser;
|
||||
delete xmlRge;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// ReadRgeFile
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Read the content of a rge-file.
|
||||
*
|
||||
* @param fln file name of the rge-file
|
||||
* @return true on success.
|
||||
*/
|
||||
bool PRgeHandler::ReadRgeFile(const std::string fln, PRgeData &data)
|
||||
{
|
||||
std::ifstream fin(fln);
|
||||
if (!fin.is_open())
|
||||
return false;
|
||||
|
||||
std::string line, msg;
|
||||
std::vector<std::string> tok;
|
||||
Double_t zz, nn;
|
||||
size_t pos;
|
||||
int lineNo=0;
|
||||
|
||||
while (fin.good() && fValid) {
|
||||
std::getline(fin, line);
|
||||
lineNo++;
|
||||
boost::algorithm::trim(line);
|
||||
if (line.empty())
|
||||
continue;
|
||||
if (!std::isdigit(line[0]))
|
||||
continue;
|
||||
tok.clear();
|
||||
boost::algorithm::split(tok, line, boost::algorithm::is_any_of(" \t"), boost::algorithm::token_compress_on);
|
||||
if (tok.size() != 2) {
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** in rge-file: " << fln << ", unexpected number of tokens (" << tok.size() << ")." << std::endl;
|
||||
std::cerr << std::endl;
|
||||
fin.close();
|
||||
return false;
|
||||
}
|
||||
// check distance
|
||||
try {
|
||||
zz = std::stod(tok[0], &pos);
|
||||
} catch(std::invalid_argument& e) {
|
||||
fValid = false;
|
||||
msg = "The found depth '" + tok[0] + "' which is not a number";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
|
||||
std::cerr << " " << msg << std::endl;
|
||||
std::cerr << std::endl;
|
||||
} catch(std::out_of_range& e) {
|
||||
fValid = false;
|
||||
msg = "The found depth '" + tok[0] + "' which is out-of-range.";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
|
||||
std::cerr << " " << msg << std::endl;
|
||||
std::cerr << std::endl;
|
||||
} catch(...) {
|
||||
fValid = false;
|
||||
msg = "The found depth '" + tok[0] + "' which generates an error.";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
|
||||
std::cerr << " " << msg << std::endl;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
if (pos != tok[0].length()) {
|
||||
fValid = false;
|
||||
msg = "The found depth '" + tok[0] + "' which is not an number.";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
|
||||
std::cerr << " " << msg << std::endl;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
// check number of implanted particles
|
||||
try {
|
||||
nn = std::stod(tok[1], &pos);
|
||||
} catch(std::invalid_argument& e) {
|
||||
fValid = false;
|
||||
msg = "The found #particles '" + tok[1] + "' which is not a number";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
|
||||
std::cerr << " " << msg << std::endl;
|
||||
std::cerr << std::endl;
|
||||
} catch(std::out_of_range& e) {
|
||||
fValid = false;
|
||||
msg = "The found #particles '" + tok[1] + "' which is out-of-range.";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
|
||||
std::cerr << " " << msg << std::endl;
|
||||
std::cerr << std::endl;
|
||||
} catch(...) {
|
||||
fValid = false;
|
||||
msg = "The found #particles '" + tok[1] + "' which generates an error.";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
|
||||
std::cerr << " " << msg << std::endl;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
if (pos != tok[1].length()) {
|
||||
fValid = false;
|
||||
msg = "The found #particles '" + tok[1] + "' which is not an integer.";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "**ERROR** in rge-file: " << fln << ": lineNo: " << lineNo << std::endl;
|
||||
std::cerr << " " << msg << std::endl;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
data.depth.push_back(zz/10.0); // distance in nm
|
||||
data.amplitude.push_back(nn);
|
||||
}
|
||||
|
||||
fin.close();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetZmax via energy
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Get maximal depth for a given energy.
|
||||
*
|
||||
* @param energy energy in (eV)
|
||||
* @return zMax if energy is found, -1 otherwise.
|
||||
*/
|
||||
Double_t PRgeHandler::GetZmax(const Double_t energy)
|
||||
{
|
||||
int idx=-1;
|
||||
for (int i=0; i<fData.size(); i++) {
|
||||
if (fabs(fData[i].energy-energy) < 1.0) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (idx != -1)
|
||||
return GetZmax(idx);
|
||||
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetZmax via index
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Get maximal depth for a given index.
|
||||
*
|
||||
* @param idx index for which zMax is requested.
|
||||
* @return zMax if idx is in range, -1 otherwise.
|
||||
*/
|
||||
Double_t PRgeHandler::GetZmax(const Int_t idx)
|
||||
{
|
||||
if ((idx < 0) || (idx >= fData.size()))
|
||||
return -1.0;
|
||||
|
||||
return fData[idx].depth[fData[idx].depth.size()-1];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Get_n via energy
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Get the normalized n(E,z) value.
|
||||
*
|
||||
* @param energy (eV)
|
||||
* @param z (nm)
|
||||
* @return n(E,z) if energy and z are in proper range, -1.0 otherwise.
|
||||
*/
|
||||
Double_t PRgeHandler::Get_n(const Double_t energy, const Double_t z)
|
||||
{
|
||||
int idx=-1;
|
||||
for (int i=0; i<fData.size(); i++) {
|
||||
if (fabs(fData[i].energy-energy) < 1.0) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (idx == -1)
|
||||
return 0.0;
|
||||
|
||||
return Get_n(idx, z);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Get_n via index
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Get the normalized n(idx,z) value.
|
||||
*
|
||||
* @param idx index of the rge-dataset
|
||||
* @param z (nm)
|
||||
* @return n(idx,z) if idx and z are in proper range, -1.0 otherwise.
|
||||
*/
|
||||
Double_t PRgeHandler::Get_n(const Int_t idx, const Double_t z)
|
||||
{
|
||||
if ((idx < 0) || (idx >= fData.size()))
|
||||
return 0.0;
|
||||
|
||||
if ((z < 0.0) || (z > GetZmax(idx)))
|
||||
return 0.0;
|
||||
|
||||
int pos=0;
|
||||
for (int i=0; i<fData[idx].depth.size(); i++) {
|
||||
if (z <= fData[idx].depth[i]) {
|
||||
pos = i-1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Double_t nn=0.0;
|
||||
if (pos < 0) {
|
||||
nn = fData[idx].nn[0] * z/(fData[idx].depth[1]-fData[idx].depth[0]);
|
||||
} else { // linear interpolation
|
||||
nn = fData[idx].nn[pos] +
|
||||
(fData[idx].nn[pos+1] - fData[idx].nn[pos]) *
|
||||
(z-fData[idx].depth[pos])/(fData[idx].depth[pos+1]-fData[idx].depth[pos]);
|
||||
}
|
||||
|
||||
return nn;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetEnergyIndex
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Get the energy index by providing an energy in (eV).
|
||||
*
|
||||
* @param energy in (eV).
|
||||
* @return energy index if energy was found, -1 otherwise.
|
||||
*/
|
||||
Int_t PRgeHandler::GetEnergyIndex(const Double_t energy)
|
||||
{
|
||||
int idx=-1;
|
||||
for (int i=0; i<fData.size(); i++) {
|
||||
if (fabs(fData[i].energy-energy) < 1.0) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return idx;
|
||||
}
|
||||
10
src/classes/PRgeHandler.pc.in
Normal file
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: PRgeHandler
|
||||
Description: C++ shared library providing the support for handling of TrimSP rge-files
|
||||
Version: @MUSR_VERSION@
|
||||
Libs: -L${libdir} -l@PRGEHANDLER_LIBRARY_NAME@
|
||||
Cflags: -I${includedir}
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -1297,7 +1297,7 @@ Bool_t PRunAsymmetry::PrepareViewData(PRawRunData* runData, UInt_t histoNo[2])
|
||||
|
||||
// calculate theory
|
||||
Double_t time;
|
||||
UInt_t size = runData->GetDataBin(histoNo[0])->size();
|
||||
UInt_t size = runData->GetDataBin(histoNo[0])->size()/packing;
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
|
||||
fData.SetTheoryTimeStart(fData.GetDataTimeStart());
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2018-2019 by Zaher Salman *
|
||||
* Copyright (C) 2018-2021 by Zaher Salman *
|
||||
* zaher.salman@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -1315,7 +1315,7 @@ Bool_t PRunSingleHisto::PrepareViewData(PRawRunData* runData, const UInt_t histo
|
||||
|
||||
// calculate theory
|
||||
Double_t theoryValue;
|
||||
UInt_t size = fForward.size();
|
||||
UInt_t size = fForward.size()/packing;
|
||||
Int_t factor = 8; // 8 times more points for the theory (if fTheoAsData == false)
|
||||
UInt_t rebinRRF = 0;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -34,26 +34,6 @@
|
||||
|
||||
ClassImp(PUserFcnBase)
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Constructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Constructor
|
||||
*/
|
||||
PUserFcnBase::PUserFcnBase()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Destructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Destructor
|
||||
*/
|
||||
PUserFcnBase::~PUserFcnBase()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// This function is a replacement for the ParseFile method of TSAXParser.
|
||||
// It is needed because in certain environments ParseFile does not work but ParseBuffer does.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
207
src/external/BMWtools/BMWIntegrator.cpp
vendored
@@ -35,8 +35,186 @@
|
||||
#define SEED 0
|
||||
#define STATEFILE NULL
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TPointPWaveGapIntegralCuhre::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Cuhre interface
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - value of the integral
|
||||
*/
|
||||
double TPointPWaveGapIntegralCuhre::IntegrateFunc(int tag)
|
||||
{
|
||||
const unsigned int NCOMP(1);
|
||||
const unsigned int NVEC(1);
|
||||
const double EPSREL (1e-4);
|
||||
const double EPSABS (1e-6);
|
||||
const unsigned int VERBOSE (0);
|
||||
const unsigned int LAST (4);
|
||||
const unsigned int MINEVAL (0);
|
||||
const unsigned int MAXEVAL (50000);
|
||||
|
||||
const unsigned int KEY (13);
|
||||
|
||||
int nregions, neval, fail;
|
||||
double integral[NCOMP], error[NCOMP], prob[NCOMP];
|
||||
|
||||
if (tag == 0)
|
||||
Cuhre(fNDim, NCOMP, Integrand_aa, USERDATA, NVEC,
|
||||
EPSREL, EPSABS, VERBOSE | LAST, MINEVAL, MAXEVAL,
|
||||
KEY, STATEFILE, SPIN,
|
||||
&nregions, &neval, &fail, integral, error, prob);
|
||||
else
|
||||
Cuhre(fNDim, NCOMP, Integrand_cc, USERDATA, NVEC,
|
||||
EPSREL, EPSABS, VERBOSE | LAST, MINEVAL, MAXEVAL,
|
||||
KEY, STATEFILE, SPIN,
|
||||
&nregions, &neval, &fail, integral, error, prob);
|
||||
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
* for p-wave point, aa==bb component
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - 0
|
||||
*
|
||||
* \param ndim number of dimensions of the integral (2 here)
|
||||
* \param x point where the function should be evaluated
|
||||
* \param ncomp number of components of the integrand (1 here)
|
||||
* \param f function value
|
||||
* \param userdata additional user parameters (required by the interface, NULL here)
|
||||
*/
|
||||
int TPointPWaveGapIntegralCuhre::Integrand_aa(const int *ndim, const double x[],
|
||||
const int *ncomp, double f[], void *userdata) // x = {E, z}, fPar = {twokBT, Delta(T), Ec, zc}
|
||||
{
|
||||
double z = x[1]*fPar[3];
|
||||
double deltasq(pow(sqrt(1.0-z*z)*fPar[1],2.0));
|
||||
f[0] = (1.0-z*z)/TMath::Power(TMath::CosH(TMath::Sqrt(x[0]*x[0]*fPar[2]*fPar[2]+deltasq)/fPar[0]),2.0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
* for p-wave point, cc component
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - 0
|
||||
*
|
||||
* \param ndim number of dimensions of the integral (2 here)
|
||||
* \param x point where the function should be evaluated
|
||||
* \param ncomp number of components of the integrand (1 here)
|
||||
* \param f function value
|
||||
* \param userdata additional user parameters (required by the interface, NULL here)
|
||||
*/
|
||||
int TPointPWaveGapIntegralCuhre::Integrand_cc(const int *ndim, const double x[],
|
||||
const int *ncomp, double f[], void *userdata) // x = {E, z}, fPar = {twokBT, Delta(T), Ec, zc}
|
||||
{
|
||||
double z = x[1]*fPar[3];
|
||||
double deltasq(pow(sqrt(1.0-z*z)*fPar[1],2.0));
|
||||
f[0] = (z*z)/TMath::Power(TMath::CosH(TMath::Sqrt(x[0]*x[0]*fPar[2]*fPar[2]+deltasq)/fPar[0]),2.0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TLinePWaveGapIntegralCuhre::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Cuhre interface
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - value of the integral
|
||||
*/
|
||||
double TLinePWaveGapIntegralCuhre::IntegrateFunc(int tag)
|
||||
{
|
||||
const unsigned int NCOMP(1);
|
||||
const unsigned int NVEC(1);
|
||||
const double EPSREL (1e-4);
|
||||
const double EPSABS (1e-6);
|
||||
const unsigned int VERBOSE (0);
|
||||
const unsigned int LAST (4);
|
||||
const unsigned int MINEVAL (0);
|
||||
const unsigned int MAXEVAL (50000);
|
||||
|
||||
const unsigned int KEY (13);
|
||||
|
||||
int nregions, neval, fail;
|
||||
double integral[NCOMP], error[NCOMP], prob[NCOMP];
|
||||
|
||||
if (tag == 0)
|
||||
Cuhre(fNDim, NCOMP, Integrand_aa, USERDATA, NVEC,
|
||||
EPSREL, EPSABS, VERBOSE | LAST, MINEVAL, MAXEVAL,
|
||||
KEY, STATEFILE, SPIN,
|
||||
&nregions, &neval, &fail, integral, error, prob);
|
||||
else
|
||||
Cuhre(fNDim, NCOMP, Integrand_cc, USERDATA, NVEC,
|
||||
EPSREL, EPSABS, VERBOSE | LAST, MINEVAL, MAXEVAL,
|
||||
KEY, STATEFILE, SPIN,
|
||||
&nregions, &neval, &fail, integral, error, prob);
|
||||
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
* for p-wave line, aa==bb component
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - 0
|
||||
*
|
||||
* \param ndim number of dimensions of the integral (2 here)
|
||||
* \param x point where the function should be evaluated
|
||||
* \param ncomp number of components of the integrand (1 here)
|
||||
* \param f function value
|
||||
* \param userdata additional user parameters (required by the interface, NULL here)
|
||||
*/
|
||||
int TLinePWaveGapIntegralCuhre::Integrand_aa(const int *ndim, const double x[],
|
||||
const int *ncomp, double f[], void *userdata) // x = {E, z}, fPar = {twokBT, Delta(T), Ec, zc}
|
||||
{
|
||||
double z = x[1]*fPar[3];
|
||||
double deltasq(pow(z*fPar[1],2.0));
|
||||
f[0] = (1.0-z*z)/TMath::Power(TMath::CosH(TMath::Sqrt(x[0]*x[0]*fPar[2]*fPar[2]+deltasq)/fPar[0]),2.0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
* for p-wave line, cc component
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - 0
|
||||
*
|
||||
* \param ndim number of dimensions of the integral (2 here)
|
||||
* \param x point where the function should be evaluated
|
||||
* \param ncomp number of components of the integrand (1 here)
|
||||
* \param f function value
|
||||
* \param userdata additional user parameters (required by the interface, NULL here)
|
||||
*/
|
||||
int TLinePWaveGapIntegralCuhre::Integrand_cc(const int *ndim, const double x[],
|
||||
const int *ncomp, double f[], void *userdata) // x = {E, z}, fPar = {twokBT, Delta(T), Ec, zc}
|
||||
{
|
||||
double z = x[1]*fPar[3];
|
||||
double deltasq(pow(z*fPar[1],2.0));
|
||||
f[0] = (z*z)/TMath::Power(TMath::CosH(TMath::Sqrt(x[0]*x[0]*fPar[2]*fPar[2]+deltasq)/fPar[0]),2.0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TDWaveGapIntegralCuhre::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Cuhre interface
|
||||
*
|
||||
@@ -67,6 +245,7 @@ double TDWaveGapIntegralCuhre::IntegrateFunc()
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
*
|
||||
@@ -87,8 +266,11 @@ int TDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TCosSqDWaveGapIntegralCuhre::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Cuhre interface
|
||||
*
|
||||
@@ -119,6 +301,7 @@ double TCosSqDWaveGapIntegralCuhre::IntegrateFunc()
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
*
|
||||
@@ -139,8 +322,11 @@ int TCosSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TSinSqDWaveGapIntegralCuhre::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Cuhre interface
|
||||
*
|
||||
@@ -171,6 +357,7 @@ double TSinSqDWaveGapIntegralCuhre::IntegrateFunc()
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
*
|
||||
@@ -191,8 +378,11 @@ int TSinSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TAnSWaveGapIntegralCuhre::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Cuhre interface
|
||||
*
|
||||
@@ -223,6 +413,7 @@ double TAnSWaveGapIntegralCuhre::IntegrateFunc()
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
*
|
||||
@@ -243,8 +434,11 @@ int TAnSWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TAnSWaveGapIntegralDivonne::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Divonne interface
|
||||
*
|
||||
@@ -283,6 +477,7 @@ double TAnSWaveGapIntegralDivonne::IntegrateFunc()
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Divonne---actual implementation of the function
|
||||
*
|
||||
@@ -303,8 +498,11 @@ int TAnSWaveGapIntegralDivonne::Integrand(const int *ndim, const double x[],
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TAnSWaveGapIntegralSuave::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Suave interface
|
||||
*
|
||||
@@ -337,6 +535,7 @@ double TAnSWaveGapIntegralSuave::IntegrateFunc()
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Suave---actual implementation of the function
|
||||
*
|
||||
@@ -357,8 +556,11 @@ int TAnSWaveGapIntegralSuave::Integrand(const int *ndim, const double x[],
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TNonMonDWave1GapIntegralCuhre::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Cuhre interface
|
||||
*
|
||||
@@ -389,6 +591,7 @@ double TNonMonDWave1GapIntegralCuhre::IntegrateFunc()
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
*
|
||||
@@ -409,8 +612,11 @@ int TNonMonDWave1GapIntegralCuhre::Integrand(const int *ndim, const double x[],
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
std::vector<double> TNonMonDWave2GapIntegralCuhre::fPar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Integrate the function using the Cuhre interface
|
||||
*
|
||||
@@ -441,6 +647,7 @@ double TNonMonDWave2GapIntegralCuhre::IntegrateFunc()
|
||||
return integral[0];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
|
||||
*
|
||||
|
||||
151
src/external/BMWtools/BMWIntegrator.h
vendored
@@ -36,6 +36,7 @@
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Alternative base class for 1D integrations using the GNU Scientific Library integrator.
|
||||
* The difference to the other class is that here the integration parameters have to be supplied directly to the IntegrateFunc method.
|
||||
@@ -54,6 +55,7 @@ class T2Integrator {
|
||||
static double FuncAtXgsl(double, void *);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Method for passing the integrand function value to the integrator.
|
||||
*
|
||||
@@ -69,6 +71,7 @@ inline double T2Integrator::FuncAtXgsl(double x, void *ptrPair)
|
||||
return pairOfPointers->first->FuncAtX(x, *(pairOfPointers->second));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the integral of the function between the given boundaries
|
||||
*
|
||||
@@ -93,20 +96,7 @@ inline double T2Integrator::IntegrateFunc(double x1, double x2, const std::vecto
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Base class for 1D integrations using the GNU Scientific Library integrator.
|
||||
* The function which should be integrated has to be implemented in a derived class.
|
||||
@@ -129,6 +119,7 @@ class TIntegrator {
|
||||
mutable double (*fFunc)(double, void *); ///< pointer to the integrand function
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Constructor of the base class for 1D integrations
|
||||
* Allocation of memory for an integration using the adaptive 31 point Gauss-Kronrod rule
|
||||
@@ -137,6 +128,7 @@ inline TIntegrator::TIntegrator() : fFunc(0) {
|
||||
fIntegrator = new ROOT::Math::GSLIntegrator(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Destructor of the base class for 1D integrations
|
||||
* Clean up.
|
||||
@@ -148,6 +140,7 @@ inline TIntegrator::~TIntegrator(){
|
||||
fFunc=0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Method for passing the integrand function value to the integrator.
|
||||
*
|
||||
@@ -162,6 +155,7 @@ inline double TIntegrator::FuncAtXgsl(double x, void *obj)
|
||||
return ((TIntegrator*)obj)->FuncAtX(x);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the integral of the function between the given boundaries
|
||||
*
|
||||
@@ -177,6 +171,7 @@ inline double TIntegrator::IntegrateFunc(double x1, double x2)
|
||||
return fIntegrator->Integral(fFunc, (this), x1, x2);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Base class for multidimensional Monte-Carlo integrations using the GNU Scientific Library integrator.
|
||||
* The function which should be integrated has to be implemented in a derived class.
|
||||
@@ -199,6 +194,7 @@ class TMCIntegrator {
|
||||
mutable double (*fFunc)(double *, size_t, void *); ///< pointer to the integrand function
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Constructor of the base class for multidimensional Monte-Carlo integrations
|
||||
* Allocation of memory for an integration using the MISER algorithm of Press and Farrar
|
||||
@@ -207,6 +203,7 @@ inline TMCIntegrator::TMCIntegrator() : fFunc(0) {
|
||||
fMCIntegrator = new ROOT::Math::GSLMCIntegrator(ROOT::Math::MCIntegration::kMISER, 1.E-6, 1.E-4, 500000);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Destructor of the base class for 1D integrations
|
||||
* Clean up.
|
||||
@@ -218,6 +215,7 @@ inline TMCIntegrator::~TMCIntegrator(){
|
||||
fFunc=0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Method for passing the integrand function value to the integrator.
|
||||
*
|
||||
@@ -233,6 +231,7 @@ inline double TMCIntegrator::FuncAtXgsl(double *x, size_t dim, void *obj)
|
||||
return ((TMCIntegrator*)obj)->FuncAtX(x);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the integral of the function between the given boundaries
|
||||
*
|
||||
@@ -249,6 +248,47 @@ inline double TMCIntegrator::IntegrateFunc(size_t dim, double *x1, double *x2)
|
||||
return fMCIntegrator->Integral(fFunc, dim, x1, x2, (this));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and a point p symmetry of the superconducting order parameter.
|
||||
* The integration uses the Cuhre algorithm of the Cuba library.
|
||||
*/
|
||||
class TPointPWaveGapIntegralCuhre {
|
||||
public:
|
||||
TPointPWaveGapIntegralCuhre() : fNDim(2) {}
|
||||
~TPointPWaveGapIntegralCuhre() { fPar.clear(); }
|
||||
void SetParameters(const std::vector<double> &par) { fPar=par; }
|
||||
static int Integrand_aa(const int*, const double[], const int*, double[], void*);
|
||||
static int Integrand_cc(const int*, const double[], const int*, double[], void*);
|
||||
double IntegrateFunc(int tag);
|
||||
|
||||
protected:
|
||||
static std::vector<double> fPar; ///< parameters of the integrand
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and a line p symmetry of the superconducting order parameter.
|
||||
* The integration uses the Cuhre algorithm of the Cuba library.
|
||||
*/
|
||||
class TLinePWaveGapIntegralCuhre {
|
||||
public:
|
||||
TLinePWaveGapIntegralCuhre() : fNDim(2) {}
|
||||
~TLinePWaveGapIntegralCuhre() { fPar.clear(); }
|
||||
void SetParameters(const std::vector<double> &par) { fPar=par; }
|
||||
static int Integrand_aa(const int*, const double[], const int*, double[], void*);
|
||||
static int Integrand_cc(const int*, const double[], const int*, double[], void*);
|
||||
double IntegrateFunc(int tag);
|
||||
|
||||
protected:
|
||||
static std::vector<double> fPar; ///< parameters of the integrand
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and a d_{x^2-y^2} symmetry of the superconducting order parameter.
|
||||
@@ -267,6 +307,7 @@ class TDWaveGapIntegralCuhre {
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density along the a-axis
|
||||
* within the semi-classical model assuming a cylindrical Fermi surface and a mixed d_{x^2-y^2} + s symmetry of the
|
||||
@@ -286,6 +327,7 @@ class TCosSqDWaveGapIntegralCuhre {
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density along the b-axis
|
||||
* within the semi-classical model assuming a cylindrical Fermi surface and a mixed d_{x^2-y^2} + s symmetry of the
|
||||
@@ -305,6 +347,7 @@ class TSinSqDWaveGapIntegralCuhre {
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and an "anisotropic s-wave" symmetry of the superconducting order parameter.
|
||||
@@ -323,6 +366,7 @@ class TAnSWaveGapIntegralCuhre {
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and an "anisotropic s-wave" symmetry of the superconducting order parameter.
|
||||
@@ -341,6 +385,7 @@ class TAnSWaveGapIntegralDivonne {
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and an "anisotropic s-wave" symmetry of the superconducting order parameter.
|
||||
@@ -359,6 +404,7 @@ class TAnSWaveGapIntegralSuave {
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and an "non-monotonic d-wave" symmetry of the superconducting order parameter.
|
||||
@@ -377,6 +423,7 @@ class TNonMonDWave1GapIntegralCuhre {
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Two-dimensional integrator class for the efficient calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and an "non-monotonic d-wave" symmetry of the superconducting order parameter.
|
||||
@@ -395,6 +442,7 @@ class TNonMonDWave2GapIntegralCuhre {
|
||||
unsigned int fNDim; ///< dimension of the integral
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Test class for the 2D MC integration
|
||||
* Integral: x*y dx dy
|
||||
@@ -406,6 +454,7 @@ class T2DTest : public TMCIntegrator {
|
||||
double FuncAtX(double *) const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the function x*y
|
||||
*
|
||||
@@ -419,6 +468,65 @@ inline double T2DTest::FuncAtX(double *x) const
|
||||
return x[0]*x[1];
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 2D Monte-Carlo integration for the calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and a point p symmetry of the superconducting order parameter.
|
||||
* The integration uses the GSL integration routines.
|
||||
*/
|
||||
class TPointPWaveGapIntegral : public TMCIntegrator {
|
||||
public:
|
||||
TPointPWaveGapIntegral() {}
|
||||
~TPointPWaveGapIntegral() {}
|
||||
double FuncAtX(double *) const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 2D Monte-Carlo integration for the calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and a line p symmetry of the superconducting order parameter.
|
||||
* The integration uses the GSL integration routines.
|
||||
*/
|
||||
class TLinePWaveGapIntegral : public TMCIntegrator {
|
||||
public:
|
||||
TLinePWaveGapIntegral() {}
|
||||
~TLinePWaveGapIntegral() {}
|
||||
double FuncAtX(double *) const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the function
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - function value
|
||||
*
|
||||
* \param x point where the function should be evaluated
|
||||
*/
|
||||
inline double TPointPWaveGapIntegral::FuncAtX(double *x) const // x = {E, theta}, fPar = {T, Delta(T)}
|
||||
{
|
||||
double twokt(2.0*0.08617384436*fPar[0]); // kB in meV/K
|
||||
double deltasq(TMath::Power(fPar[1]*TMath::Sin(x[1]),2.0));
|
||||
return -TMath::Sin(x[1])/(4.0*twokt*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the function
|
||||
*
|
||||
* <p><b>return:</b>
|
||||
* - function value
|
||||
*
|
||||
* \param x point where the function should be evaluated
|
||||
*/
|
||||
inline double TLinePWaveGapIntegral::FuncAtX(double *x) const // x = {E, theta}, fPar = {T, Delta(T)}
|
||||
{
|
||||
double twokt(2.0*0.08617384436*fPar[0]); // kB in meV/K
|
||||
double deltasq(TMath::Power(fPar[1]*TMath::Cos(x[1]),2.0));
|
||||
return -TMath::Sin(x[1])/(4.0*twokt*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 2D Monte-Carlo integration for the calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and a d_{x^2-y^2} symmetry of the superconducting order parameter.
|
||||
@@ -431,6 +539,7 @@ class TDWaveGapIntegral : public TMCIntegrator {
|
||||
double FuncAtX(double *) const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the function
|
||||
*
|
||||
@@ -446,6 +555,7 @@ inline double TDWaveGapIntegral::FuncAtX(double *x) const // x = {E, phi}, fPar
|
||||
return -1.0/(2.0*twokt*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 2D Monte-Carlo integration for the calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and an "anisotropic s-wave" symmetry of the superconducting order parameter.
|
||||
@@ -458,6 +568,7 @@ class TAnSWaveGapIntegral : public TMCIntegrator {
|
||||
double FuncAtX(double *) const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the function
|
||||
*
|
||||
@@ -473,6 +584,7 @@ inline double TAnSWaveGapIntegral::FuncAtX(double *x) const // x = {E, phi}, fPa
|
||||
return -1.0/(2.0*twokt*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 1D integration of j0(a*x)*exp(-b*x)
|
||||
* The integration uses the GSL integration routines.
|
||||
@@ -486,6 +598,7 @@ class TIntBesselJ0Exp : public T2Integrator {
|
||||
double FuncAtX(double, const std::vector<double>&) const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the function j0(a*x)*exp(-b*x)
|
||||
*
|
||||
@@ -506,6 +619,7 @@ inline double TIntBesselJ0Exp::FuncAtX(double x, const std::vector<double> &par)
|
||||
return j0 * TMath::Exp(-par[1]*x);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 1D integration of sin(a*x)*exp(-b*x*x)
|
||||
* The integration uses the GSL integration routines.
|
||||
@@ -519,6 +633,7 @@ class TIntSinGss : public T2Integrator {
|
||||
double FuncAtX(double, const std::vector<double>&) const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the function sin(a*x)*exp(-b*x*x)
|
||||
*
|
||||
@@ -532,6 +647,7 @@ inline double TIntSinGss::FuncAtX(double x, const std::vector<double> &par) cons
|
||||
return TMath::Sin(TMath::TwoPi()*par[0]*x) * TMath::Exp(-0.5*par[1]*par[1]*x*x);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 1D integration of the "DeRenzi Spin Glass Interpolation Integrand"
|
||||
* See Eq. (5) of R. De Renzi and S. Fanesi, Physica B 289-290, 209-212 (2000).
|
||||
@@ -547,6 +663,7 @@ class TIntSGInterpolation : public T2Integrator {
|
||||
double FuncAtX(double, const std::vector<double>&) const;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the function
|
||||
*
|
||||
@@ -563,6 +680,7 @@ inline double TIntSGInterpolation::FuncAtX(double x, const std::vector<double> &
|
||||
return (wt*TMath::Cos(wt)-TMath::Sin(wt))/(wt*wt)*TMath::Exp(-TMath::Power(expo,par[3]))/TMath::Power(expo,(1.0-par[3]));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 1D integration for the calculation of the superfluid density within the semi-classical model
|
||||
* assuming a cylindrical Fermi surface and an isotropic s-wave symmetry of the superconducting order parameter.
|
||||
@@ -575,6 +693,7 @@ class TGapIntegral : public TIntegrator {
|
||||
double FuncAtX(double) const; // variable: E
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the function df/dE * E / sqrt(E^2 - Delta^2)
|
||||
*
|
||||
@@ -588,6 +707,7 @@ inline double TGapIntegral::FuncAtX(double e) const
|
||||
return 1.0/(TMath::Power(TMath::CosH(TMath::Sqrt(e*e+fPar[1]*fPar[1])/fPar[0]),2.0));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 1D integration for the calculation of the uniaxial static Gauss-Kubo-Toyabe function
|
||||
* The integration uses the GSL integration routines.
|
||||
@@ -601,6 +721,7 @@ class TFirstUniaxialGssKTIntegral : public T2Integrator {
|
||||
virtual double FuncAtX(double, const std::vector<double>&) const; // variable: x
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the integrand in Eq. (7) of Solt's article
|
||||
*
|
||||
@@ -618,6 +739,7 @@ inline double TFirstUniaxialGssKTIntegral::FuncAtX(double x, const std::vector<d
|
||||
return (1.0 - x*x)*(p - SsqTsq)/TMath::Power(p, 2.5)*TMath::Exp(-0.5*SsqTsq/p);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Class for the 1D integration for the calculation of the uniaxial static Gauss-Kubo-Toyabe function
|
||||
* The integration uses the GSL integration routines.
|
||||
@@ -631,6 +753,7 @@ class TSecondUniaxialGssKTIntegral : public T2Integrator {
|
||||
virtual double FuncAtX(double, const std::vector<double>&) const; // variable: x
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Calculate the function value---actual implementation of the integrand in Eq. (7) of Solt's article
|
||||
*
|
||||
|
||||
2
src/external/BMWtools/BMWStartupHandler.cpp
vendored
@@ -11,7 +11,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter, Bastian M. Wojek *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter, Bastian M. Wojek *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
2
src/external/BMWtools/BMWStartupHandler.h
vendored
@@ -11,7 +11,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter, Bastian M. Wojek *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter, Bastian M. Wojek *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
4
src/external/MagProximity/CMakeLists.txt
vendored
@@ -38,7 +38,6 @@ configure_file("PMagProximityFitter.pc.in" "PMagProximityFitter.pc" @ONLY)
|
||||
add_library(PMagProximityFitter SHARED
|
||||
PMagProximityFitter.cpp
|
||||
PMagProximityFitterDict.cxx
|
||||
PMPRgeHandler.cpp
|
||||
PMPStartupHandler.cpp
|
||||
PMPStartupHandlerDict.cxx
|
||||
)
|
||||
@@ -57,7 +56,7 @@ set_target_properties(PMagProximityFitter
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(PMagProximityFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase)
|
||||
target_link_libraries(PMagProximityFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
|
||||
|
||||
#--- install PMagProximityFitter solib ----------------------------------------
|
||||
install(TARGETS PMagProximityFitter DESTINATION lib)
|
||||
@@ -76,7 +75,6 @@ install(
|
||||
FILES
|
||||
PMagProximity.h
|
||||
PMagProximityFitter.h
|
||||
PMPRgeHandler.h
|
||||
PMPStartupHandler.h
|
||||
DESTINATION
|
||||
include
|
||||
|
||||
212
src/external/MagProximity/PMPRgeHandler.cpp
vendored
@@ -1,212 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
PMPRgeHandler.cpp
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2019 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "PMPRgeHandler.h"
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Constructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
PMPRgeHandler::PMPRgeHandler(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
|
||||
{
|
||||
fIsValid = false;
|
||||
|
||||
fIsValid = LoadRgeData(rgeDataPathList, rgeDataEnergyList);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Destructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
PMPRgeHandler::~PMPRgeHandler()
|
||||
{
|
||||
fRgeDataList.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetRgeEnergyIndex
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
* \param energy in (keV)
|
||||
*/
|
||||
Int_t PMPRgeHandler::GetRgeEnergyIndex(const Double_t energy)
|
||||
{
|
||||
Int_t idx = -1;
|
||||
|
||||
for (UInt_t i=0; i<fRgeDataList.size(); i++) {
|
||||
if (energy == fRgeDataList[i].energy) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetRgeValue
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
* \param energy in (keV)
|
||||
* \param dist in (nm)
|
||||
*/
|
||||
Double_t PMPRgeHandler::GetRgeValue(const Int_t index, const Double_t dist)
|
||||
{
|
||||
Double_t rgeVal = 0.0;
|
||||
|
||||
UInt_t distIdx = static_cast<UInt_t>(dist/(fRgeDataList[index].stoppingDistance[1]-fRgeDataList[index].stoppingDistance[0]));
|
||||
|
||||
if (distIdx >= fRgeDataList[index].stoppingDistance.size()) {
|
||||
rgeVal = 0.0;
|
||||
} else {
|
||||
rgeVal = fRgeDataList[index].stoppingAmplitude[distIdx] +
|
||||
(fRgeDataList[index].stoppingAmplitude[distIdx+1] - fRgeDataList[index].stoppingAmplitude[distIdx]) *
|
||||
(dist-fRgeDataList[index].stoppingDistance[distIdx])/(fRgeDataList[index].stoppingDistance[distIdx+1]-fRgeDataList[index].stoppingDistance[distIdx]);
|
||||
}
|
||||
|
||||
return rgeVal;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetRgeValue
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
* \param energy in (keV)
|
||||
* \param dist in (nm)
|
||||
*/
|
||||
Double_t PMPRgeHandler::GetRgeValue(const Double_t energy, const Double_t dist)
|
||||
{
|
||||
// check if energy is present in rge data list
|
||||
Int_t idx = -1;
|
||||
|
||||
for (UInt_t i=0; i<fRgeDataList.size(); i++) {
|
||||
if (energy == fRgeDataList[i].energy) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// energy not found
|
||||
if (idx == -1)
|
||||
return -1.0;
|
||||
|
||||
return GetRgeValue(idx, dist);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// LoadRgeData
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Bool_t PMPRgeHandler::LoadRgeData(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
|
||||
{
|
||||
std::ifstream fin;
|
||||
PMPRgeData data;
|
||||
Int_t idx=0;
|
||||
TString dataName, tstr;
|
||||
char line[512];
|
||||
int result;
|
||||
double dist, val;
|
||||
|
||||
for (UInt_t i=0; i<rgeDataPathList.size(); i++) {
|
||||
// open rge-file for reading
|
||||
fin.open(rgeDataPathList[i].Data(), std::iostream::in);
|
||||
if (!fin.is_open()) {
|
||||
std::cout << std::endl << "PMPRgeHandler::LoadRgeData **ERROR**";
|
||||
std::cout << std::endl << " Could not open file " << rgeDataPathList[i].Data();
|
||||
std::cout << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// keep energy (in keV)
|
||||
data.energy = rgeDataEnergyList[i]/1000.0;
|
||||
|
||||
// read msr-file
|
||||
idx = 0;
|
||||
while (!fin.eof()) {
|
||||
// read a line
|
||||
fin.getline(line, sizeof(line));
|
||||
idx++;
|
||||
|
||||
// ignore first line
|
||||
if (idx <= 1)
|
||||
continue;
|
||||
|
||||
// ignore empty lines
|
||||
tstr = line;
|
||||
if (tstr.IsWhitespace())
|
||||
continue;
|
||||
|
||||
|
||||
// get values
|
||||
result = sscanf(line, "%lf %lf", &dist, &val);
|
||||
// check if data are valid
|
||||
if (result != 2) {
|
||||
fin.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
// feed fRgeDataList
|
||||
data.stoppingDistance.push_back(dist/10.0); // keep distancies in (nm)
|
||||
data.stoppingAmplitude.push_back(val);
|
||||
}
|
||||
|
||||
// normalize stopping distribution
|
||||
Double_t norm = 0.0;
|
||||
for (UInt_t j=0; j<data.stoppingAmplitude.size(); j++)
|
||||
norm += data.stoppingAmplitude[j];
|
||||
norm *= (data.stoppingDistance[1] - data.stoppingDistance[0]);
|
||||
for (UInt_t j=0; j<data.stoppingAmplitude.size(); j++)
|
||||
data.stoppingAmplitude[j] /= norm;
|
||||
|
||||
// keep data
|
||||
fRgeDataList.push_back(data);
|
||||
|
||||
// clean up
|
||||
data.stoppingAmplitude.clear();
|
||||
data.stoppingDistance.clear();
|
||||
|
||||
fin.close();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2019 by Andreas Suter *
|
||||
* Copyright (C) 2011-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2019 by Andreas Suter *
|
||||
* Copyright (C) 2011-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2019 by Andreas Suter *
|
||||
* Copyright (C) 2011-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
2
src/external/MagProximity/PMagProximity.h
vendored
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2019 by Andreas Suter *
|
||||
* Copyright (C) 2011-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2019 by Andreas Suter *
|
||||
* Copyright (C) 2011-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -89,7 +89,7 @@ PMagProximityFitterGlobal::PMagProximityFitterGlobal()
|
||||
}
|
||||
|
||||
// load all the TRIM.SP rge-files
|
||||
fRgeHandler = new PMPRgeHandler(fStartupHandler->GetTrimSpDataPathList(), fStartupHandler->GetTrimSpDataVectorList());
|
||||
fRgeHandler = new PRgeHandler();
|
||||
if (!fRgeHandler->IsValid()) {
|
||||
std::cout << std::endl << ">> PMagProximityFitterGlobal::PMagProximityFitterGlobal **PANIC ERROR**";
|
||||
std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
|
||||
|
||||
10
src/external/MagProximity/PMagProximityFitter.h
vendored
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2019 by Andreas Suter *
|
||||
* Copyright (C) 2009-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "PUserFcnBase.h"
|
||||
#include "PMPStartupHandler.h"
|
||||
#include "PMPRgeHandler.h"
|
||||
#include "PRgeHandler.h"
|
||||
|
||||
class PMagProximityFitterGlobal
|
||||
{
|
||||
@@ -42,15 +42,15 @@ class PMagProximityFitterGlobal
|
||||
|
||||
Bool_t IsValid() { return fValid; }
|
||||
virtual void CalculateField(const std::vector<Double_t> ¶m) const;
|
||||
virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetRgeEnergyIndex(energy); }
|
||||
virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->GetRgeValue(energyIndex, z); }
|
||||
virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetEnergyIndex(energy); }
|
||||
virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->Get_n(energyIndex, z); }
|
||||
virtual Double_t GetMagneticField(const Double_t z) const;
|
||||
|
||||
private:
|
||||
Bool_t fValid;
|
||||
|
||||
PMPStartupHandler *fStartupHandler;
|
||||
PMPRgeHandler *fRgeHandler;
|
||||
PRgeHandler *fRgeHandler;
|
||||
|
||||
mutable std::vector<Double_t> fPreviousParam;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2011-2019 by Andreas Suter *
|
||||
* Copyright (C) 2011-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
@@ -3,13 +3,14 @@
|
||||
<comment>
|
||||
contains meta file infromation of the needed trim.sp files.
|
||||
</comment>
|
||||
<trim_sp_part>
|
||||
<data_path>/mnt/home/nemu/analysis/2010/EuS-Co/trimsp2/EuS-Co_E</data_path>
|
||||
<trim_sp>
|
||||
<data_path>/afs/psi.ch/project/nemu/analysis/2010/EuS-Co/trimsp2</data_path>
|
||||
<rge_fln_pre>EuS-Co_E</rge_fln_pre>
|
||||
<energy_list>
|
||||
<energy>5030</energy>
|
||||
<energy>6330</energy>
|
||||
<energy>7530</energy>
|
||||
<energy>8730</energy>
|
||||
</energy_list>
|
||||
</trim_sp_part>
|
||||
</trim_sp>
|
||||
</mag_proximity>
|
||||
|
||||
10
src/external/MusrRoot/MusrRoot.xsd
vendored
@@ -15,8 +15,10 @@
|
||||
|
||||
<xs:complexType name="musrRoot">
|
||||
<xs:sequence>
|
||||
<xs:element ref="histos"/>
|
||||
<xs:element name="RunHeader" type="runHeaderFolder"/>
|
||||
<xs:choice>
|
||||
<xs:element ref="histos"/>
|
||||
<xs:element name="RunHeader" type="runHeaderFolder"/>
|
||||
</xs:choice>
|
||||
<xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- here can go any additional stuff you like -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
@@ -100,8 +102,8 @@
|
||||
<xs:element name="Generic_Validator_URL" type="TString"/>
|
||||
<xs:element name="Specific_Validator_URL" type="TString"/>
|
||||
<xs:element name="Generator" type="TString"/>
|
||||
<xs:element name="Proposal Number" type="Int_t" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="Main Proposer" type="TString" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="Proposal_Number" type="Int_t" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="Main_Proposer" type="TString" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="File_Name" type="TString"/>
|
||||
<xs:element name="Run_Title" type="TString"/>
|
||||
<xs:element name="Run_Number" type="Int_t"/>
|
||||
|
||||
10
src/external/MusrRoot/MusrRootLEM.xsd
vendored
@@ -14,8 +14,10 @@
|
||||
|
||||
<xs:complexType name="musrRoot">
|
||||
<xs:sequence>
|
||||
<xs:element ref="histos"/>
|
||||
<xs:element name="RunHeader" type="runHeaderFolder"/>
|
||||
<xs:choice>
|
||||
<xs:element ref="histos"/>
|
||||
<xs:element name="RunHeader" type="runHeaderFolder"/>
|
||||
</xs:choice>
|
||||
<xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"/> <!-- here can go any additional stuff you like -->
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
@@ -101,8 +103,8 @@
|
||||
<xs:element name="Generic_Validator_URL" type="TString"/>
|
||||
<xs:element name="Specific_Validator_URL" type="TString"/>
|
||||
<xs:element name="Generator" type="TString"/>
|
||||
<xs:element name="Proposal Number" type="Int_t" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="Main Proposer" type="TString" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="Proposal_Number" type="Int_t" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="Main_Proposer" type="TString" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="File_Name" type="TString"/>
|
||||
<xs:element name="Run_Title" type="TString"/>
|
||||
<xs:element name="Run_Number" type="Int_t"/>
|
||||
|
||||
64
src/external/MusrRoot/TMusrRunHeader.cpp
vendored
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -394,6 +394,68 @@ Bool_t TMusrRunHeader::FillFolder(TFolder *folder)
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetTypeOfPath (public)
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Get type of path-name, e.g. RunInfo/Sample Name.
|
||||
*
|
||||
* @param pathName path-name for which the type is requested
|
||||
*
|
||||
* @return the type, or 'undef' if path-name is not found.
|
||||
*/
|
||||
TString TMusrRunHeader::GetTypeOfPath(TString pathName)
|
||||
{
|
||||
TString type("undef");
|
||||
|
||||
// find pathName
|
||||
for (Int_t i=0; i<fStringObj.size(); i++) {
|
||||
if (fStringObj[i].GetPathName() == pathName) {
|
||||
type = fStringObj[i].GetType();
|
||||
return type;
|
||||
}
|
||||
}
|
||||
for (Int_t i=0; i<fIntObj.size(); i++) {
|
||||
if (fIntObj[i].GetPathName() == pathName) {
|
||||
type = fIntObj[i].GetType();
|
||||
return type;
|
||||
}
|
||||
}
|
||||
for (Int_t i=0; i<fDoubleObj.size(); i++) {
|
||||
if (fDoubleObj[i].GetPathName() == pathName) {
|
||||
type = fDoubleObj[i].GetType();
|
||||
return type;
|
||||
}
|
||||
}
|
||||
for (Int_t i=0; i<fMusrRunPhysQuantityObj.size(); i++) {
|
||||
if (fMusrRunPhysQuantityObj[i].GetPathName() == pathName) {
|
||||
type = fMusrRunPhysQuantityObj[i].GetType();
|
||||
return type;
|
||||
}
|
||||
}
|
||||
for (Int_t i=0; i<fStringVectorObj.size(); i++) {
|
||||
if (fStringVectorObj[i].GetPathName() == pathName) {
|
||||
type = fStringVectorObj[i].GetType();
|
||||
return type;
|
||||
}
|
||||
}
|
||||
for (Int_t i=0; i<fIntVectorObj.size(); i++) {
|
||||
if (fIntVectorObj[i].GetPathName() == pathName) {
|
||||
type = fIntVectorObj[i].GetType();
|
||||
return type;
|
||||
}
|
||||
}
|
||||
for (Int_t i=0; i<fDoubleVectorObj.size(); i++) {
|
||||
if (fDoubleVectorObj[i].GetPathName() == pathName) {
|
||||
type = fDoubleVectorObj[i].GetType();
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Get (public)
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
4
src/external/MusrRoot/TMusrRunHeader.h
vendored
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -133,6 +133,8 @@ public:
|
||||
virtual Bool_t ExtractAll(TFolder *folder);
|
||||
virtual Bool_t ExtractHeaderInformation(TObjArray *headerInfo, TString path);
|
||||
|
||||
virtual TString GetTypeOfPath(TString pathName);
|
||||
|
||||
virtual void Get(TString pathName, TString &value, Bool_t &ok);
|
||||
virtual void Get(TString pathName, Int_t &value, Bool_t &ok);
|
||||
virtual void Get(TString pathName, Double_t &value, Bool_t &ok);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2007-2020 by Andreas Suter *
|
||||
* Copyright (C) 2007-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
7
src/external/Nonlocal/CMakeLists.txt
vendored
@@ -36,7 +36,7 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
set(exec_prefix "\$\{prefix\}")
|
||||
set(libdir "\$\{exec_prefix\}/lib")
|
||||
set(includedir "\$\{prefix\}/include")
|
||||
set(PNL_PIPPARDFITTER_VERSION "1.0.0")
|
||||
set(PNL_PIPPARDFITTER_VERSION "1.1.0")
|
||||
set(PNL_PIPPARDFITTER_LIBRARY_NAME "PNL_PippardFitter")
|
||||
configure_file("PNL_PippardFitter.pc.in" "PNL_PippardFitter.pc" @ONLY)
|
||||
|
||||
@@ -44,7 +44,6 @@ configure_file("PNL_PippardFitter.pc.in" "PNL_PippardFitter.pc" @ONLY)
|
||||
add_library(PNL_PippardFitter SHARED
|
||||
PNL_PippardFitter.cpp
|
||||
PNL_PippardFitterDict.cxx
|
||||
PNL_RgeHandler.cpp
|
||||
PNL_StartupHandler.cpp
|
||||
PNL_StartupHandlerDict.cxx
|
||||
)
|
||||
@@ -63,7 +62,7 @@ set_target_properties(PNL_PippardFitter
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(PNL_PippardFitter ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PUserFcnBase)
|
||||
target_link_libraries(PNL_PippardFitter ${Boost_LIBRARIES} ${FFTW3_LIBRARY} ${ROOT_LIBRARIES} PRgeHandler PUserFcnBase)
|
||||
|
||||
#--- install PNL_PippardFitter solib ------------------------------------------
|
||||
install(TARGETS PNL_PippardFitter DESTINATION lib)
|
||||
@@ -80,9 +79,7 @@ install(
|
||||
#--- install PNL_PippardFitter header -----------------------------------------
|
||||
install(
|
||||
FILES
|
||||
PNonlocal.h
|
||||
PNL_PippardFitter.h
|
||||
PNL_RgeHandler.h
|
||||
PNL_StartupHandler.h
|
||||
DESTINATION
|
||||
include
|
||||
|
||||
56
src/external/Nonlocal/PNL_PippardFitter.cpp
vendored
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2019 by Andreas Suter *
|
||||
* Copyright (C) 2009-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <cmath>
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include <TSAXParser.h>
|
||||
#include <TMath.h>
|
||||
@@ -51,10 +50,6 @@ ClassImp(PNL_PippardFitterGlobal)
|
||||
*/
|
||||
PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
|
||||
{
|
||||
fValid = true;
|
||||
fStartupHandler = 0;
|
||||
fRgeHandler = 0;
|
||||
|
||||
// read XML startup file
|
||||
char startup_path_name[128];
|
||||
TSAXParser *saxParser = new TSAXParser();
|
||||
@@ -67,8 +62,8 @@ PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
|
||||
Int_t status = parseXmlFile(saxParser, startup_path_name);
|
||||
// check for parse errors
|
||||
if (status) { // error
|
||||
cout << endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal: **WARNING** Reading/parsing nonlocal_startup.xml failed.";
|
||||
cout << endl;
|
||||
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal: **WARNING** Reading/parsing nonlocal_startup.xml failed.";
|
||||
std::cout << std::endl;
|
||||
fValid = false;
|
||||
}
|
||||
|
||||
@@ -80,20 +75,20 @@ PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
|
||||
|
||||
// check if everything went fine with the startup handler
|
||||
if (!fStartupHandler->IsValid()) {
|
||||
cout << endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
|
||||
cout << endl << ">> startup handler too unhappy. Will terminate unfriendly, sorry.";
|
||||
cout << endl;
|
||||
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
|
||||
std::cout << std::endl << ">> startup handler too unhappy. Will terminate unfriendly, sorry.";
|
||||
std::cout << std::endl;
|
||||
fValid = false;
|
||||
}
|
||||
|
||||
fFourierPoints = fStartupHandler->GetFourierPoints();
|
||||
|
||||
// load all the TRIM.SP rge-files
|
||||
fRgeHandler = new PNL_RgeHandler(fStartupHandler->GetTrimSpDataPathList(), fStartupHandler->GetTrimSpDataVectorList());
|
||||
fRgeHandler = new PRgeHandler("./nonlocal_startup.xml");
|
||||
if (!fRgeHandler->IsValid()) {
|
||||
cout << endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
|
||||
cout << endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
|
||||
cout << endl;
|
||||
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
|
||||
std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
|
||||
std::cout << std::endl;
|
||||
fValid = false;
|
||||
}
|
||||
|
||||
@@ -182,16 +177,16 @@ void PNL_PippardFitterGlobal::CalculateField(const std::vector<Double_t> ¶m)
|
||||
if (fFieldq == 0) {
|
||||
fFieldq = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * fFourierPoints);
|
||||
if (fFieldq == 0) {
|
||||
cout << endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldq";
|
||||
cout << endl;
|
||||
std::cout << std::endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldq";
|
||||
std::cout << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (fFieldB == 0) {
|
||||
fFieldB = (fftw_complex *) fftw_malloc(sizeof(fftw_complex) * fFourierPoints);
|
||||
if (fFieldB == 0) {
|
||||
cout << endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldB";
|
||||
cout << endl;
|
||||
std::cout << std::endl << "PPippard::CalculateField(): **ERROR** couldn't allocate memory for fFieldB";
|
||||
std::cout << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -349,19 +344,6 @@ Double_t PNL_PippardFitterGlobal::XiP_T(const Double_t xi0, const Double_t meanF
|
||||
|
||||
ClassImp(PNL_PippardFitter)
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Constructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
PNL_PippardFitter::PNL_PippardFitter()
|
||||
{
|
||||
fValid = false;
|
||||
fInvokedGlobal = false;
|
||||
fPippardFitterGlobal = 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Destructor
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -387,18 +369,18 @@ PNL_PippardFitter::~PNL_PippardFitter()
|
||||
* \param globalPart
|
||||
* \param idx
|
||||
*/
|
||||
void PNL_PippardFitter::SetGlobalPart(vector<void*> &globalPart, UInt_t idx)
|
||||
void PNL_PippardFitter::SetGlobalPart(std::vector<void*> &globalPart, UInt_t idx)
|
||||
{
|
||||
fIdxGlobal = static_cast<Int_t>(idx);
|
||||
|
||||
if ((Int_t)globalPart.size() <= fIdxGlobal) {
|
||||
fPippardFitterGlobal = new PNL_PippardFitterGlobal();
|
||||
if (fPippardFitterGlobal == 0) {
|
||||
if (fPippardFitterGlobal == nullptr) {
|
||||
fValid = false;
|
||||
cerr << endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** Couldn't invoke global user function object, sorry ..." << endl;
|
||||
std::cerr << std::endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** Couldn't invoke global user function object, sorry ..." << std::endl;
|
||||
} else if (!fPippardFitterGlobal->IsValid()) {
|
||||
fValid = false;
|
||||
cerr << endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** initialization of global user function object failed, sorry ..." << endl;
|
||||
std::cerr << std::endl << ">> PNL_PippardFitter::SetGlobalPart(): **ERROR** initialization of global user function object failed, sorry ..." << std::endl;
|
||||
} else {
|
||||
fValid = true;
|
||||
fInvokedGlobal = true;
|
||||
@@ -447,7 +429,7 @@ Double_t PNL_PippardFitter::operator()(Double_t t, const std::vector<Double_t> &
|
||||
fPippardFitterGlobal->CalculateField(param);
|
||||
Int_t energyIndex = fPippardFitterGlobal->GetEnergyIndex(param[0]);
|
||||
if (energyIndex == -1) { // energy not found
|
||||
cerr << endl << ">> PNL_PippardFitter::operator() energy " << param[0] << " not found. Will terminate." << endl;
|
||||
std::cerr << std::endl << ">> PNL_PippardFitter::operator() energy " << param[0] << " not found. Will terminate." << std::endl;
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
||||
25
src/external/Nonlocal/PNL_PippardFitter.h
vendored
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2019 by Andreas Suter *
|
||||
* Copyright (C) 2009-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -36,9 +36,10 @@
|
||||
//#endif
|
||||
#include <fftw3.h>
|
||||
|
||||
#include "PMusr.h"
|
||||
#include "PUserFcnBase.h"
|
||||
#include "PNL_StartupHandler.h"
|
||||
#include "PNL_RgeHandler.h"
|
||||
#include "PRgeHandler.h"
|
||||
|
||||
class PNL_PippardFitterGlobal
|
||||
{
|
||||
@@ -49,15 +50,15 @@ class PNL_PippardFitterGlobal
|
||||
Bool_t IsValid() { return fValid; }
|
||||
virtual void SetTempExponent(const Double_t nn) { f_nn = nn; }
|
||||
virtual void CalculateField(const std::vector<Double_t> ¶m) const;
|
||||
virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetRgeEnergyIndex(energy); }
|
||||
virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->GetRgeValue(energyIndex, z); }
|
||||
virtual Int_t GetEnergyIndex(const Double_t energy) { return fRgeHandler->GetEnergyIndex(energy); }
|
||||
virtual Double_t GetMuonStoppingDensity(const Int_t energyIndex, const Double_t z) const { return fRgeHandler->Get_n(energyIndex, z); }
|
||||
virtual Double_t GetMagneticField(const Double_t z) const;
|
||||
|
||||
private:
|
||||
Bool_t fValid;
|
||||
Bool_t fValid{true};
|
||||
|
||||
PNL_StartupHandler *fStartupHandler;
|
||||
PNL_RgeHandler *fRgeHandler;
|
||||
PNL_StartupHandler *fStartupHandler{nullptr};
|
||||
PRgeHandler *fRgeHandler{nullptr};
|
||||
|
||||
mutable std::vector<Double_t> fPreviousParam;
|
||||
|
||||
@@ -85,21 +86,21 @@ class PNL_PippardFitterGlobal
|
||||
class PNL_PippardFitter : public PUserFcnBase
|
||||
{
|
||||
public:
|
||||
PNL_PippardFitter();
|
||||
PNL_PippardFitter() {}
|
||||
virtual ~PNL_PippardFitter();
|
||||
|
||||
virtual Bool_t NeedGlobalPart() const { return true; }
|
||||
virtual void SetGlobalPart(vector<void*> &globalPart, UInt_t idx);
|
||||
virtual void SetGlobalPart(std::vector<void*> &globalPart, UInt_t idx);
|
||||
virtual Bool_t GlobalPartIsValid() const;
|
||||
|
||||
virtual Double_t operator()(Double_t t, const std::vector<Double_t> ¶m) const;
|
||||
|
||||
private:
|
||||
Bool_t fValid;
|
||||
Bool_t fInvokedGlobal;
|
||||
Bool_t fValid{true};
|
||||
Bool_t fInvokedGlobal{false};
|
||||
Int_t fIdxGlobal;
|
||||
|
||||
PNL_PippardFitterGlobal *fPippardFitterGlobal;
|
||||
PNL_PippardFitterGlobal *fPippardFitterGlobal{nullptr};
|
||||
|
||||
ClassDef(PNL_PippardFitter, 1)
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2019 by Andreas Suter *
|
||||
* Copyright (C) 2009-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
208
src/external/Nonlocal/PNL_RgeHandler.cpp
vendored
@@ -1,208 +0,0 @@
|
||||
/***************************************************************************
|
||||
|
||||
PNL_RgeHandler.cpp
|
||||
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
$Id$
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include "PNL_RgeHandler.h"
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Constructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
PNL_RgeHandler::PNL_RgeHandler(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
|
||||
{
|
||||
fIsValid = false;
|
||||
|
||||
fIsValid = LoadRgeData(rgeDataPathList, rgeDataEnergyList);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Destructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
PNL_RgeHandler::~PNL_RgeHandler()
|
||||
{
|
||||
fRgeDataList.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetRgeEnergyIndex
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Int_t PNL_RgeHandler::GetRgeEnergyIndex(const Double_t energy)
|
||||
{
|
||||
Int_t idx = -1;
|
||||
|
||||
for (UInt_t i=0; i<fRgeDataList.size(); i++) {
|
||||
if (energy == fRgeDataList[i].energy) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return idx;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetRgeValue
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Double_t PNL_RgeHandler::GetRgeValue(const Int_t index, const Double_t dist)
|
||||
{
|
||||
Double_t rgeVal = 0.0;
|
||||
|
||||
// find the proper position index
|
||||
Int_t distIdx = -2;
|
||||
for (UInt_t i=0; i<fRgeDataList[index].stoppingDistance.size(); i++) {
|
||||
if (fRgeDataList[index].stoppingDistance[i] > dist) {
|
||||
distIdx = i-1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// get the proper n(z) value
|
||||
if (distIdx < 0) {
|
||||
rgeVal = 0.0;
|
||||
} else {
|
||||
rgeVal = fRgeDataList[index].stoppingAmplitude[distIdx] +
|
||||
(fRgeDataList[index].stoppingAmplitude[distIdx+1] - fRgeDataList[index].stoppingAmplitude[distIdx]) *
|
||||
(dist-fRgeDataList[index].stoppingDistance[distIdx])/(fRgeDataList[index].stoppingDistance[distIdx+1]-fRgeDataList[index].stoppingDistance[distIdx]);
|
||||
}
|
||||
|
||||
return rgeVal;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GetRgeValue
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Double_t PNL_RgeHandler::GetRgeValue(const Double_t energy, const Double_t dist)
|
||||
{
|
||||
// check if energy is present in rge data list
|
||||
Int_t idx = -1;
|
||||
|
||||
for (UInt_t i=0; i<fRgeDataList.size(); i++) {
|
||||
if (energy == fRgeDataList[i].energy) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// energy not found
|
||||
if (idx == -1)
|
||||
return -1.0;
|
||||
|
||||
return GetRgeValue(idx, dist);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// LoadRgeData
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Bool_t PNL_RgeHandler::LoadRgeData(const PStringVector &rgeDataPathList, const PDoubleVector &rgeDataEnergyList)
|
||||
{
|
||||
std::ifstream fin;
|
||||
PNL_RgeData data;
|
||||
TString tstr;
|
||||
char line[512];
|
||||
int result;
|
||||
double dist, val;
|
||||
|
||||
for (UInt_t i=0; i<rgeDataPathList.size(); i++) {
|
||||
// open rge-file for reading
|
||||
fin.open(rgeDataPathList[i].Data(), std::iostream::in);
|
||||
if (!fin.is_open()) {
|
||||
std::cout << std::endl << "PNL_RgeHandler::LoadRgeData **ERROR**";
|
||||
std::cout << std::endl << " Could not open file " << rgeDataPathList[i].Data();
|
||||
std::cout << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// keep energy (in keV)
|
||||
data.energy = rgeDataEnergyList[i]/1000.0;
|
||||
|
||||
// read msr-file
|
||||
while (!fin.eof()) {
|
||||
// read a line
|
||||
fin.getline(line, sizeof(line));
|
||||
|
||||
// ignore empty lines
|
||||
tstr = line;
|
||||
if (tstr.IsWhitespace())
|
||||
continue;
|
||||
|
||||
// get values
|
||||
result = sscanf(line, "%lf %lf", &dist, &val);
|
||||
// check if data are valid, otherwise ignore it
|
||||
if (result != 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// feed fRgeDataList
|
||||
data.stoppingDistance.push_back(dist/10.0);
|
||||
data.stoppingAmplitude.push_back(val);
|
||||
}
|
||||
|
||||
// normalize stopping distribution
|
||||
Double_t norm = 0.0;
|
||||
for (UInt_t j=0; j<data.stoppingAmplitude.size(); j++)
|
||||
norm += data.stoppingAmplitude[j];
|
||||
norm *= (data.stoppingDistance[1] - data.stoppingDistance[0]);
|
||||
for (UInt_t j=0; j<data.stoppingAmplitude.size(); j++)
|
||||
data.stoppingAmplitude[j] /= norm;
|
||||
|
||||
// keep data
|
||||
fRgeDataList.push_back(data);
|
||||
|
||||
// clean up
|
||||
data.stoppingAmplitude.clear();
|
||||
data.stoppingDistance.clear();
|
||||
|
||||
fin.close();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
72
src/external/Nonlocal/PNL_StartupHandler.cpp
vendored
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2019 by Andreas Suter *
|
||||
* Copyright (C) 2009-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include "PNL_StartupHandler.h"
|
||||
|
||||
ClassImpQ(PNL_StartupHandler)
|
||||
@@ -44,46 +46,26 @@ ClassImpQ(PNL_StartupHandler)
|
||||
*/
|
||||
PNL_StartupHandler::PNL_StartupHandler()
|
||||
{
|
||||
fIsValid = true;
|
||||
|
||||
fStartupFileFound = false;
|
||||
fStartupFilePath = "";
|
||||
|
||||
fFourierPoints = 0;
|
||||
fTrimSpDataPath = TString("");
|
||||
|
||||
// get default path (for the moment only linux like)
|
||||
char startup_path_name[512];
|
||||
char *home_str=0;
|
||||
|
||||
// check if the startup file is found in the current directory
|
||||
strcpy(startup_path_name, "./nonlocal_startup.xml");
|
||||
if (StartupFileExists(startup_path_name)) {
|
||||
if (boost::filesystem::exists(startup_path_name)) {
|
||||
fStartupFileFound = true;
|
||||
fStartupFilePath = TString(startup_path_name);
|
||||
} else { // startup file is not found in the current directory
|
||||
std::cout << std::endl << "PNL_StartupHandler(): **WARNING** Couldn't find nonlocal_startup.xml in the current directory, will try default one." << std::endl;
|
||||
home_str = getenv("HOME");
|
||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/nonlocal_startup.xml", home_str);
|
||||
if (StartupFileExists(startup_path_name)) {
|
||||
if (boost::filesystem::exists(startup_path_name)) {
|
||||
fStartupFileFound = true;
|
||||
fStartupFilePath = TString(startup_path_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Destructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
*/
|
||||
PNL_StartupHandler::~PNL_StartupHandler()
|
||||
{
|
||||
fTrimSpDataPathList.clear();
|
||||
fTrimSpDataEnergyList.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// OnStartDocument
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -124,10 +106,6 @@ void PNL_StartupHandler::OnStartElement(const char *str, const TList *attributes
|
||||
{
|
||||
if (!strcmp(str, "fourier_points")) {
|
||||
fKey = eFourierPoints;
|
||||
} else if (!strcmp(str, "data_path")) {
|
||||
fKey = eDataPath;
|
||||
} else if (!strcmp(str, "energy")) {
|
||||
fKey = eEnergy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,23 +145,6 @@ void PNL_StartupHandler::OnCharacters(const char *str)
|
||||
std::cout << std::endl;
|
||||
}
|
||||
break;
|
||||
case eDataPath:
|
||||
fTrimSpDataPath = str;
|
||||
break;
|
||||
case eEnergy:
|
||||
tstr = str;
|
||||
if (tstr.IsFloat()) {
|
||||
fTrimSpDataEnergyList.push_back(tstr.Atof());
|
||||
tstr = fTrimSpDataPath;
|
||||
tstr += str;
|
||||
tstr += ".rge";
|
||||
fTrimSpDataPathList.push_back(tstr);
|
||||
} else {
|
||||
std::cout << std::endl << "PNL_StartupHandler::OnCharacters: **ERROR** when finding energy:";
|
||||
std::cout << std::endl << "\"" << str << "\" is not a floating point number, will ignore it and use the default value.";
|
||||
std::cout << std::endl;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -257,29 +218,6 @@ void PNL_StartupHandler::OnCdataBlock(const char *str, Int_t len)
|
||||
// nothing to be done for now
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// StartupFileExists
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
*/
|
||||
bool PNL_StartupHandler::StartupFileExists(char *fln)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
std::ifstream ifile(fln);
|
||||
|
||||
if (ifile.fail()) {
|
||||
result = false;
|
||||
} else {
|
||||
result = true;
|
||||
ifile.close();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// end
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
26
src/external/Nonlocal/PNL_StartupHandler.h
vendored
@@ -5,12 +5,10 @@
|
||||
Author: Andreas Suter
|
||||
e-mail: andreas.suter@psi.ch
|
||||
|
||||
$Id$
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2019 by Andreas Suter *
|
||||
* Copyright (C) 2009-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -36,13 +34,11 @@
|
||||
#include <TQObject.h>
|
||||
#include <TString.h>
|
||||
|
||||
#include "PNonlocal.h"
|
||||
|
||||
class PNL_StartupHandler : public TObject
|
||||
{
|
||||
public:
|
||||
PNL_StartupHandler();
|
||||
virtual ~PNL_StartupHandler();
|
||||
virtual ~PNL_StartupHandler() {}
|
||||
|
||||
virtual void OnStartDocument(); // SLOT
|
||||
virtual void OnEndDocument(); // SLOT
|
||||
@@ -58,26 +54,18 @@ class PNL_StartupHandler : public TObject
|
||||
virtual bool IsValid() { return fIsValid; }
|
||||
virtual TString GetStartupFilePath() { return fStartupFilePath; }
|
||||
virtual const Int_t GetFourierPoints() const { return fFourierPoints; }
|
||||
virtual const PStringVector GetTrimSpDataPathList() const { return fTrimSpDataPathList; }
|
||||
virtual const PDoubleVector GetTrimSpDataVectorList() const { return fTrimSpDataEnergyList; }
|
||||
|
||||
virtual bool StartupFileFound() { return fStartupFileFound; }
|
||||
|
||||
private:
|
||||
enum EKeyWords {eEmpty, eComment, eFourierPoints, eDataPath, eEnergy};
|
||||
enum EKeyWords {eEmpty, eFourierPoints};
|
||||
EKeyWords fKey;
|
||||
|
||||
bool fIsValid;
|
||||
bool fIsValid{true};
|
||||
|
||||
bool fStartupFileFound;
|
||||
TString fStartupFilePath;
|
||||
bool fStartupFileFound{false};
|
||||
TString fStartupFilePath{""};
|
||||
|
||||
Int_t fFourierPoints;
|
||||
TString fTrimSpDataPath;
|
||||
PStringVector fTrimSpDataPathList;
|
||||
PDoubleVector fTrimSpDataEnergyList;
|
||||
|
||||
bool StartupFileExists(char *fln);
|
||||
Int_t fFourierPoints{0};
|
||||
|
||||
ClassDef(PNL_StartupHandler, 1)
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009-2019 by Andreas Suter *
|
||||
* Copyright (C) 2009-2021 by Andreas Suter *
|
||||
* andreas.suter@psi.ch *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
|
||||
32
src/external/Nonlocal/nonlocal_startup.xml
vendored
@@ -1,25 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
|
||||
<comment>
|
||||
trim.sp meta information
|
||||
Fourier and TrimSp information
|
||||
</comment>
|
||||
<nonlocal_par>
|
||||
<fourier_points>262144</fourier_points>
|
||||
</nonlocal_par>
|
||||
<trim_sp_part>
|
||||
<data_path>/afs/psi.ch/project/nemu/analysis/2009/Nonlocal/trimsp/InSne</data_path>
|
||||
<trim_sp>
|
||||
<data_path>./profiles/</data_path>
|
||||
<rge_fln_pre>Sn_E</rge_fln_pre>
|
||||
<energy_list>
|
||||
<energy>2.5</energy>
|
||||
<energy>4.0</energy>
|
||||
<energy>6.0</energy>
|
||||
<energy>8.0</energy>
|
||||
<energy>10.0</energy>
|
||||
<energy>12.5</energy>
|
||||
<energy>14.1</energy>
|
||||
<energy>17.5</energy>
|
||||
<energy>22.0</energy>
|
||||
<energy>25.0</energy>
|
||||
<energy>28.2</energy>
|
||||
<energy>1000</energy>
|
||||
<energy>2000</energy>
|
||||
<energy>4000</energy>
|
||||
<energy>6000</energy>
|
||||
<energy>8000</energy>
|
||||
<energy>10000</energy>
|
||||
<energy>12000</energy>
|
||||
<energy>14100</energy>
|
||||
<energy>18000</energy>
|
||||
<energy>22000</energy>
|
||||
<energy>25000</energy>
|
||||
<energy>27300</energy>
|
||||
</energy_list>
|
||||
</trim_sp_part>
|
||||
</trim_sp>
|
||||
</nonlocal>
|
||||
|
||||
8
src/external/libBNMR/TBNMR.h
vendored
@@ -55,10 +55,6 @@ public:
|
||||
ExpRlx(){}
|
||||
~ExpRlx(){}
|
||||
|
||||
Bool_t NeedGlobalPart() const { return false; }
|
||||
void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
// function operator
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
|
||||
@@ -73,10 +69,6 @@ public:
|
||||
SExpRlx(){}
|
||||
~SExpRlx(){}
|
||||
|
||||
Bool_t NeedGlobalPart() const { return false; }
|
||||
void SetGlobalPart(std::vector<void *> &globalPart, UInt_t idx) { }
|
||||
Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
// function operator
|
||||
double operator()(double, const std::vector<double>&) const;
|
||||
private:
|
||||
|
||||
@@ -51,12 +51,6 @@ Double_t IAsym_high(Double_t, Double_t, Double_t, Double_t);
|
||||
class LineGauss : public PUserFcnBase {
|
||||
|
||||
public:
|
||||
|
||||
// global user-function-access functions, here without any functionality
|
||||
Bool_t NeedGlobalPart() const { return false; }
|
||||
void SetGlobalPart(vector<void*> &globalPart, UInt_t idx) { }
|
||||
Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
// function operator
|
||||
Double_t operator()(Double_t, const vector<Double_t>&) const;
|
||||
|
||||
@@ -68,12 +62,6 @@ public:
|
||||
class LineLaplace : public PUserFcnBase {
|
||||
|
||||
public:
|
||||
|
||||
// global user-function-access functions, here without any functionality
|
||||
Bool_t NeedGlobalPart() const { return false; }
|
||||
void SetGlobalPart(vector<void*> &globalPart, UInt_t idx) { }
|
||||
Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
// function operator
|
||||
Double_t operator()(Double_t, const vector<Double_t>&) const;
|
||||
|
||||
@@ -85,11 +73,6 @@ public:
|
||||
class LineLorentzian : public PUserFcnBase {
|
||||
|
||||
public:
|
||||
// global user-function-access functions, here without any functionality
|
||||
Bool_t NeedGlobalPart() const { return false; }
|
||||
void SetGlobalPart(vector<void*> &globalPart, UInt_t idx) { }
|
||||
Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
// function operator
|
||||
Double_t operator()(Double_t, const vector<Double_t>&) const;
|
||||
|
||||
@@ -101,11 +84,6 @@ public:
|
||||
class LineSkewLorentzian : public PUserFcnBase {
|
||||
|
||||
public:
|
||||
// global user-function-access functions, here without any functionality
|
||||
Bool_t NeedGlobalPart() const { return false; }
|
||||
void SetGlobalPart(vector<void*> &globalPart, UInt_t idx) { }
|
||||
Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
// function operator
|
||||
Double_t operator()(Double_t, const vector<Double_t>&) const;
|
||||
|
||||
@@ -118,11 +96,6 @@ public:
|
||||
class LineSkewLorentzian2 : public PUserFcnBase {
|
||||
|
||||
public:
|
||||
// global user-function-access functions, here without any functionality
|
||||
Bool_t NeedGlobalPart() const { return false; }
|
||||
void SetGlobalPart(vector<void*> &globalPart, UInt_t idx) { }
|
||||
Bool_t GlobalPartIsValid() const { return true; }
|
||||
|
||||
// function operator
|
||||
Double_t operator()(Double_t, const vector<Double_t>&) const;
|
||||
|
||||
|
||||