Compare commits
182 Commits
Author | SHA1 | Date | |
---|---|---|---|
8cfd0bcc4a | |||
7198521f60 | |||
834884f3a4 | |||
80591f6f13 | |||
44456c49e9 | |||
495f02c3c6 | |||
ad2e84581f | |||
59dbae4a1e | |||
4d176c395c | |||
74978025fb | |||
deeee783f5 | |||
cadd28b9fe | |||
79c8be54bf | |||
3cf89c6571 | |||
673a742631 | |||
f68775dd64 | |||
23bf2ec2fc | |||
23ac67a443 | |||
d6a3767040 | |||
75d0c9e01a | |||
ecd9e4a953 | |||
3c2b0322c0 | |||
4747fbc77d | |||
b1b808ad7b | |||
2d1875ebfe | |||
d221ef1ed0 | |||
f7c45f46ff | |||
5b093208eb | |||
7a1f60d00f | |||
de2d8394d3 | |||
af13e78c52 | |||
7691ef2815 | |||
8f4a7c6b68 | |||
1cb0cfd3e7 | |||
344a5c8ba0 | |||
6f521668c0 | |||
02a1cb7a0c | |||
fdeed5dec4 | |||
e676d3c045 | |||
9911d88889 | |||
51520868f1 | |||
3d149dc6ab | |||
e79322b348 | |||
62e86f42b7 | |||
c18ed68aa8 | |||
e376e9a2e6 | |||
a90af4c342 | |||
1c7556a73d | |||
eb234b7de5 | |||
3d7d86d657 | |||
7743eaee09 | |||
9c2e981e2a | |||
f9b1ef9dcc | |||
89146f3cee | |||
be29e55834 | |||
8e7fda92e1 | |||
890d48a95c | |||
823ef087c9 | |||
05c06a071e | |||
dbfadc4e42 | |||
93754a9fc2 | |||
0bff931af9 | |||
1a72d67be9 | |||
7e17af0256 | |||
5d731611cf | |||
4b561b1f15 | |||
69305f8b1d | |||
88b3ab8a01 | |||
ca742a064f | |||
b5a391e355 | |||
1feed7116a | |||
ff9245fd28 | |||
98026c725d | |||
5972391ff4 | |||
c5f6eb04b4 | |||
2a2e2b40d5 | |||
c2a2051d29 | |||
578dc900c2 | |||
cf44df21ed | |||
ef641de033 | |||
4c62ae547f | |||
91d6a4bc99 | |||
c6ebaf3675 | |||
1df6643bfa | |||
4d1c7c10c8 | |||
0b3fc43123 | |||
1f32698b5f | |||
22178f7869 | |||
2e6e5ecb97 | |||
56a8730252 | |||
40e15218a3 | |||
39a54d7f63 | |||
d664f5d877 | |||
8765ac9192 | |||
f1b7ca226a | |||
30d124ab51 | |||
feb33b24ae | |||
c6cf124ee3 | |||
401ff9ead6 | |||
5fa84c74ec | |||
7b0492f499 | |||
da2705aa0e | |||
dd733164d1 | |||
5658c06afd | |||
b8622fefa8 | |||
382fd8ad99 | |||
96ac7f68a2 | |||
02f7c459c5 | |||
bb9942e34b | |||
8245728f82 | |||
3c607768b9 | |||
b47c735a1c | |||
c585fedb63 | |||
374367bee8 | |||
e1c9a61251 | |||
6e9d8b3e35 | |||
e37dede866 | |||
0b93a08108 | |||
326b3bea17 | |||
aeaa698be2 | |||
5bcc460cce | |||
6e4e9ab55e | |||
c4da2c4ec0 | |||
edbbb8fc45 | |||
3e6d55f0e8 | |||
d9b29388d0 | |||
f94c43ccdf | |||
30d2275b86 | |||
7d6d8e279f | |||
f3388a7d17 | |||
2d65bc4574 | |||
51e4482945 | |||
5235935f85 | |||
76c2a98f5a | |||
b488ed60a0 | |||
b9e3ceea5c | |||
e0ecad2f3a | |||
97400255a0 | |||
16a1629ab6 | |||
939d4fb7b5 | |||
c638456afe | |||
29b603e124 | |||
9c438b580b | |||
65ee70c52e | |||
6b32dcaa38 | |||
7f2d8f6625 | |||
4dea80c6b6 | |||
8afc51f497 | |||
acd149a159 | |||
c87906efd6 | |||
21dedba8fa | |||
7279de07ff | |||
693b99755d | |||
0069ef02c8 | |||
45de42bc5b | |||
7d1cb313f2 | |||
6a8ec77037 | |||
85359817f9 | |||
268772e953 | |||
260c2c19e7 | |||
c8e863617a | |||
8da82ee6cc | |||
a7e1477f7f | |||
cbdef9b7b9 | |||
5cc8722a95 | |||
56337cf7a5 | |||
a2855bba19 | |||
263554dd37 | |||
a701a7a336 | |||
a30ac29032 | |||
479e81cc68 | |||
896540bee6 | |||
2f5259d6e5 | |||
8742d9651b | |||
63f73427b1 | |||
2afc21becc | |||
63a1b1c1f3 | |||
b916b0f6da | |||
4ef4316b97 | |||
357b225d53 | |||
5fff38d36b | |||
d00752b196 |
@ -1,7 +1,7 @@
|
|||||||
# - musrfit
|
# - musrfit
|
||||||
cmake_minimum_required(VERSION 3.17)
|
cmake_minimum_required(VERSION 3.17)
|
||||||
|
|
||||||
project(musrfit VERSION 1.9.1 LANGUAGES C CXX)
|
project(musrfit VERSION 1.9.3 LANGUAGES C CXX)
|
||||||
|
|
||||||
#--- musrfit specific options -------------------------------------------------
|
#--- musrfit specific options -------------------------------------------------
|
||||||
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
||||||
@ -222,6 +222,29 @@ else ()
|
|||||||
set(IS_GIT_REPO 0)
|
set(IS_GIT_REPO 0)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
#--- rpath related things -----------------------------------------------------
|
||||||
|
# use, i.e. don't skip the full RPATH for the build tree
|
||||||
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
|
|
||||||
|
# when building, don't use the install RPATH already
|
||||||
|
# (but later on when installing)
|
||||||
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
|
|
||||||
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||||
|
|
||||||
|
# add the automatically determined parts of the RPATH
|
||||||
|
# which point to directories outside the build tree to the install RPATH
|
||||||
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
|
|
||||||
|
# the RPATH to be used when installing, but only if it's not a system directory
|
||||||
|
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
|
||||||
|
if("${isSystemDir}" STREQUAL "-1")
|
||||||
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||||
|
endif("${isSystemDir}" STREQUAL "-1")
|
||||||
|
set(rpath ${CMAKE_INSTALL_RPATH})
|
||||||
|
string(APPEND rpath ";/usr/local/lib")
|
||||||
|
set(CMAKE_INSTALL_RPATH "${rpath}")
|
||||||
|
|
||||||
#--- propagate to the sub-directories -----------------------------------------
|
#--- propagate to the sub-directories -----------------------------------------
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
@ -12,6 +12,11 @@ or
|
|||||||
|
|
||||||
https://bitbucket.org/muonspin/musrfit/commits/all
|
https://bitbucket.org/muonspin/musrfit/commits/all
|
||||||
|
|
||||||
|
Release of V1.9.2, 2023/10/25
|
||||||
|
=============================
|
||||||
|
|
||||||
|
switch over to smart pointers wherever possible.
|
||||||
|
|
||||||
Release of V1.9.1, 2023/05/16
|
Release of V1.9.1, 2023/05/16
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ For a more exhaustive user documentation see:
|
|||||||
|
|
||||||
<andreas.suter@psi.ch>
|
<andreas.suter@psi.ch>
|
||||||
|
|
||||||
For the beta-NMR related parts, please contact
|
For the beta-NMR related parts, please contact Zaher Salman
|
||||||
|
|
||||||
<zaher.salman@psi.ch>
|
<zaher.salman@psi.ch>
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Sphinx build info version 1
|
# 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.
|
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||||
config: ea8ddbeaec87fd554dad49f5d0917959
|
config: b18a215470778ea2da02b3cad4d0e07c
|
||||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||||
VERSION: '1.9.0',
|
VERSION: '1.9.1',
|
||||||
LANGUAGE: 'None',
|
LANGUAGE: 'None',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Acknowledgements — musrfit 1.9.0 documentation</title>
|
<title>Acknowledgements — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -94,6 +94,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Acknowledgements</a></li>
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -198,7 +199,7 @@ extremely competent way to deal with his projects as well as to deal with the ch
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -220,7 +221,7 @@ extremely competent way to deal with his projects as well as to deal with the ch
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>any2many - a Universal μSR-file-format converter — musrfit 1.9.0 documentation</title>
|
<title>any2many - a Universal μSR-file-format converter — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
<link rel="index" title="Index" href="genindex.html" />
|
||||||
<link rel="search" title="Search" href="search.html" />
|
<link rel="search" title="Search" href="search.html" />
|
||||||
<link rel="next" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
|
<link rel="next" title="Short description and references to the supported file-formats" href="file-formats.html" />
|
||||||
<link rel="prev" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
|
<link rel="prev" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" href="msr2data.html" />
|
||||||
|
|
||||||
|
|
||||||
@ -94,6 +94,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -175,7 +176,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
|||||||
|
|
||||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||||
|
|
||||||
<a href="musr-root.html" class="btn btn-neutral float-right" title="MusrRoot - an Extensible Open File Format for μSR" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
<a href="file-formats.html" class="btn btn-neutral float-right" title="Short description and references to the supported file-formats" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||||
|
|
||||||
|
|
||||||
<a href="msr2data.html" class="btn btn-neutral" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
<a href="msr2data.html" class="btn btn-neutral" title="msr2data - A Program for Automatically Processing Multiple musrfit msr Files" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||||
@ -188,7 +189,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -210,7 +211,7 @@ For a detailed description see <a class="reference internal" href="user-manual.h
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Bugtracking — musrfit 1.9.0 documentation</title>
|
<title>Bugtracking — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -93,6 +93,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Bugtracking</a></li>
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">Bugtracking</a></li>
|
||||||
@ -186,7 +187,7 @@ or send an e-mail to A. Suter at PSI.</p>
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -208,7 +209,7 @@ or send an e-mail to A. Suter at PSI.</p>
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>How to Cite musrfit? — musrfit 1.9.0 documentation</title>
|
<title>How to Cite musrfit? — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -94,6 +94,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -200,7 +201,7 @@
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -222,7 +223,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
553
doc/html/file-formats.html
Normal file
553
doc/html/file-formats.html
Normal file
@ -0,0 +1,553 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
||||||
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<title>Short description and references to the supported file-formats — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" />
|
||||||
|
<link rel="search" title="Search" href="search.html" />
|
||||||
|
<link rel="next" title="MusrRoot - an Extensible Open File Format for μSR" href="musr-root.html" />
|
||||||
|
<link rel="prev" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
|
||||||
|
|
||||||
|
|
||||||
|
<script src="_static/js/modernizr.min.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
|
||||||
|
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||||
|
<div class="wy-side-scroll">
|
||||||
|
<div class="wy-side-nav-search">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="index.html" class="icon icon-home"> musrfit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="version">
|
||||||
|
1.9
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div role="search">
|
||||||
|
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" />
|
||||||
|
<input type="hidden" name="check_keywords" value="yes" />
|
||||||
|
<input type="hidden" name="area" value="default" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="cite.html">How to Cite <code class="docutils literal notranslate"><span class="pre">musrfit</span></code>?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial for <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="user-manual.html">User manual</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="user-libs.html">Documentation of user libs (user functions)</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="setup-standard.html">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> on Different Platforms</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="setup-dks.html">Setting up <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> / <code class="docutils literal notranslate"><span class="pre">DKS</span></code>: High Speed Fitting with GPU’s</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="musredit.html"><code class="docutils literal notranslate"><span class="pre">musredit</span></code>: the GUI Based Interface to <code class="docutils literal notranslate"><span class="pre">musrfit</span></code></a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">Short description and references to the supported file-formats</a><ul>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#ascii-file-format-for-non-mgrsr">ASCII file format for non-μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#db-file-format-for-non-mgrsr">DB file format for non-μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#dat-csv-like-file-format-for-non-mgrsr">DAT: CSV like file format for non-μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#mdu-file-format-psi-for-mgrsr">MDU file format (psi) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#mud-file-format-triumf-for-mgrsr">MUD file format (triumf) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#musrroot-file-format-psi-for-mgrsr">MusrRoot file format (PSI) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#nexus-file-format-isis-for-mgrsr">NeXus file format (isis) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#psi-bin-file-format-psi-for-mgrsr">PSI-BIN file format (psi) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#root-file-format-psi-lem-before-2012-for-mgrsr">ROOT file format (psi/lem before 2012) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#wkm-file-format-for-mgrsr">WKM file format for μSR</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="wy-nav-top" aria-label="top navigation">
|
||||||
|
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href="index.html">musrfit</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
|
||||||
|
<div class="rst-content">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
|
||||||
|
<li><a href="index.html">Docs</a> »</li>
|
||||||
|
|
||||||
|
<li>Short description and references to the supported file-formats</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
|
||||||
|
|
||||||
|
<a href="_sources/file-formats.rst.txt" rel="nofollow"> View page source</a>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div itemprop="articleBody">
|
||||||
|
|
||||||
|
<div class="section" id="short-description-and-references-to-the-supported-file-formats">
|
||||||
|
<span id="file-formats"></span><span id="index-0"></span><h1>Short description and references to the supported file-formats<a class="headerlink" href="#short-description-and-references-to-the-supported-file-formats" title="Permalink to this headline">¶</a></h1>
|
||||||
|
<p>Currently the following μSR and non-μSR file formats are supported (in alphabetic order):</p>
|
||||||
|
<ul class="simple">
|
||||||
|
<li>ascii (non-μSR): <a class="reference internal" href="#ascii-file-format"><span class="std std-ref">ASCII file format for non-uSR</span></a></li>
|
||||||
|
<li>db (non-μSR): <a class="reference internal" href="#db-file-format"><span class="std std-ref">DB (triumf)</span></a></li>
|
||||||
|
<li>dat (non-μSR): <a class="reference internal" href="#dat-file-format"><span class="std std-ref">DAT: CSV like data file</span></a></li>
|
||||||
|
<li>mdu (μSR): <a class="reference internal" href="#mdu-file-format"><span class="std std-ref">MDU file format (PSI)</span></a></li>
|
||||||
|
<li>mud (μSR): <a class="reference internal" href="#mud-file-format"><span class="std std-ref">MUon Data access file format (TRIUMF)</span></a></li>
|
||||||
|
<li>musr-root (μSR): <a class="reference internal" href="musr-root.html#musrroot"><span class="std std-ref">MusrRoot - an Extensible Open File Format for uSR</span></a></li>
|
||||||
|
<li>nexus (μSR): used to read NeXus files from ISIS (HDF4 and HDF5): <a class="reference internal" href="#nexus-file-format"><span class="std std-ref">NeXus</span></a></li>
|
||||||
|
<li>psi-bin (μSR): <a class="reference internal" href="#psi-bin-file-format"><span class="std std-ref">PSI-BIN file format (PSI)</span></a></li>
|
||||||
|
<li>root (μSR): specific version for LEM before 2012 <a class="reference internal" href="#root-file-format"><span class="std std-ref">LEM ROOT file format</span></a></li>
|
||||||
|
<li>wkm (μSR): special ascii file format used in the past by the TU Braunschweig (outdated): <a class="reference internal" href="#wkm-file-format"><span class="std std-ref">WKM</span></a></li>
|
||||||
|
</ul>
|
||||||
|
<div class="section" id="ascii-file-format-for-non-mgrsr">
|
||||||
|
<span id="ascii-file-format"></span><span id="index-1"></span><h2>ASCII file format for non-μSR<a class="headerlink" href="#ascii-file-format-for-non-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>This for instance can be used to fit <span class="math notranslate nohighlight">\(1/\lambda^2 ~ \mathrm{vs} ~ T\)</span> to study gap properties of superconductors.
|
||||||
|
Details about the gap-intergrals can be found in the memo <em>GapIntegrals.pdf</em> which can be found in the source code of musrfit
|
||||||
|
under <musrfit-home-dir>/src/external/libGapIntegrals.</p>
|
||||||
|
<p>This primitive file format has the following structure:</p>
|
||||||
|
<p>Comment lines start with a ‘#’ or ‘%’ character.
|
||||||
|
The file can start with some header info. The header is optional, as all its tags, but
|
||||||
|
if present it has the following format:</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">HEADER</span>
|
||||||
|
<span class="n">TITLE</span><span class="p">:</span> <span class="n">title</span>
|
||||||
|
<span class="n">X</span><span class="o">-</span><span class="n">AXIS</span><span class="o">-</span><span class="n">TITLE</span><span class="p">:</span> <span class="n">x</span><span class="o">-</span><span class="n">axis</span> <span class="n">title</span>
|
||||||
|
<span class="n">Y</span><span class="o">-</span><span class="n">AXIS</span><span class="o">-</span><span class="n">TITLE</span><span class="p">:</span> <span class="n">y</span><span class="o">-</span><span class="n">axis</span> <span class="n">title</span>
|
||||||
|
<span class="n">SETUP</span><span class="p">:</span> <span class="n">setup</span>
|
||||||
|
<span class="n">FIELD</span><span class="p">:</span> <span class="n">field</span>
|
||||||
|
<span class="n">TEMP</span><span class="p">:</span> <span class="n">temperature</span>
|
||||||
|
<span class="n">ENERGY</span><span class="p">:</span> <span class="n">energy</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>Field has to be given in (G), temperature in (K) and energy in (keV).</p>
|
||||||
|
<p>The data are read column like and start with the data tag DATA, followed by the
|
||||||
|
data columns, i.e.:</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">DATA</span>
|
||||||
|
<span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="p">[,</span> <span class="n">error</span> <span class="n">y</span><span class="p">]</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>where spaces, column, are a tab are possible separations.
|
||||||
|
If no error in y is present, the weighting in the fit will be equal.</p>
|
||||||
|
<p>A full example might look like this:</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># libGapIntegrals-test.dat</span>
|
||||||
|
<span class="c1"># This is a comment</span>
|
||||||
|
<span class="o">%</span> <span class="n">This</span> <span class="k">as</span> <span class="n">well</span>
|
||||||
|
<span class="n">HEADER</span>
|
||||||
|
<span class="n">TITLE</span><span class="p">:</span> <span class="n">Test</span> <span class="n">superconductor</span> <span class="n">data</span>
|
||||||
|
<span class="n">X</span><span class="o">-</span><span class="n">AXIS</span><span class="o">-</span><span class="n">TITLE</span><span class="p">:</span> <span class="n">T</span> <span class="p">(</span><span class="n">K</span><span class="p">)</span>
|
||||||
|
<span class="n">Y</span><span class="o">-</span><span class="n">AXIS</span><span class="o">-</span><span class="n">TITLE</span><span class="p">:</span> <span class="c1">#lambda^{-2} (#mum^{-2})</span>
|
||||||
|
<span class="n">SETUP</span><span class="p">:</span> <span class="n">H</span> <span class="c1">#parallel c</span>
|
||||||
|
<span class="n">FIELD</span><span class="p">:</span> <span class="mi">100</span>
|
||||||
|
<span class="n">TEMP</span><span class="p">:</span> <span class="mf">0.0</span>
|
||||||
|
<span class="n">ENERGY</span><span class="p">:</span> <span class="mi">4200</span>
|
||||||
|
<span class="c1"># here the data will follow</span>
|
||||||
|
<span class="n">DATA</span>
|
||||||
|
<span class="c1"># x, y, error y</span>
|
||||||
|
<span class="mf">0.0318411</span><span class="p">,</span> <span class="mf">7.77455</span><span class="p">,</span> <span class="mf">0.2</span>
|
||||||
|
<span class="mf">0.0629929</span><span class="p">,</span> <span class="mf">7.9869</span><span class="p">,</span> <span class="mf">0.15</span>
|
||||||
|
<span class="mf">0.113914</span><span class="p">,</span> <span class="mf">7.64209</span><span class="p">,</span> <span class="mf">0.15</span>
|
||||||
|
<span class="mf">0.202492</span><span class="p">,</span> <span class="mf">7.37699</span><span class="p">,</span> <span class="mf">0.15</span>
|
||||||
|
<span class="mf">0.302725</span><span class="p">,</span> <span class="mf">7.70893</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">0.447456</span><span class="p">,</span> <span class="mf">7.77565</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">0.611685</span><span class="p">,</span> <span class="mf">7.45768</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">0.813613</span><span class="p">,</span> <span class="mf">7.19287</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">1.00822</span><span class="p">,</span> <span class="mf">7.57813</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">1.24793</span><span class="p">,</span> <span class="mf">7.31343</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">1.50635</span><span class="p">,</span> <span class="mf">7.16818</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">1.74591</span><span class="p">,</span> <span class="mf">6.99634</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">1.99795</span><span class="p">,</span> <span class="mf">6.90414</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">2.25061</span><span class="p">,</span> <span class="mf">6.41393</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">2.4958</span><span class="p">,</span> <span class="mf">6.66666</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">2.75514</span><span class="p">,</span> <span class="mf">5.93766</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">3.00753</span><span class="p">,</span> <span class="mf">5.61992</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">3.26056</span><span class="p">,</span> <span class="mf">4.89091</span><span class="p">,</span> <span class="mf">0.12</span>
|
||||||
|
<span class="mf">3.49414</span><span class="p">,</span> <span class="mf">4.52005</span><span class="p">,</span> <span class="mf">0.08</span>
|
||||||
|
<span class="mf">3.75356</span><span class="p">,</span> <span class="mf">3.73799</span><span class="p">,</span> <span class="mf">0.08</span>
|
||||||
|
<span class="mf">3.99425</span><span class="p">,</span> <span class="mf">2.84974</span><span class="p">,</span> <span class="mf">0.08</span>
|
||||||
|
<span class="mf">4.30518</span><span class="p">,</span> <span class="mf">1.35139</span><span class="p">,</span> <span class="mf">0.08</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="db-file-format-for-non-mgrsr">
|
||||||
|
<span id="db-file-format"></span><span id="index-2"></span><h2>DB file format for non-μSR<a class="headerlink" href="#db-file-format-for-non-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>The DB file format is an <em>archaic</em> ascii file format from TRIUMF which is intended to be used to collect parameter summaries of various runs, which can be read directly by <a class="reference internal" href="mupp.html#mupp"><span class="std std-ref">mupp</span></a>.</p>
|
||||||
|
<p>The DB file is organized in a couple of tags defining various properties, followed by the parameter data with its errors.
|
||||||
|
Tags and is content are always separated by an empty line.
|
||||||
|
The first tag is the <strong>TITLE</strong>. Followed by the title in the next line</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">TITLE</span>
|
||||||
|
<span class="n">This</span> <span class="ow">is</span> <span class="n">the</span> <span class="n">best</span> <span class="n">data</span> <span class="n">ever</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>The next tag is the <strong>ABSTRACT</strong>, followed a potentially multi-line abstract, e.g.</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ABSTRACT</span>
|
||||||
|
<span class="n">Here</span> <span class="n">comes</span> <span class="n">the</span> <span class="n">detailed</span> <span class="n">description</span> <span class="o">...</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>The next tag, <strong>LABELS</strong>, are used to define human readable names for the data parameters to be followed:</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">LABELS</span>
|
||||||
|
<span class="n">T</span> <span class="p">(</span><span class="n">K</span><span class="p">)</span>
|
||||||
|
<span class="n">B</span> <span class="p">(</span><span class="n">G</span><span class="p">)</span>
|
||||||
|
<span class="o">...</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>The number of labels have to fit the number of parameters present!</p>
|
||||||
|
<p>The next tag is <strong>DATA</strong>, which is a list of the parameter names as found in you msr-file.
|
||||||
|
Unlike the other tags, here the list of names follow directly after the <strong>DATA</strong> tag</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">DATA</span> <span class="n">dataT</span> <span class="n">dataB</span> <span class="n">dataE</span> <span class="n">dataTr</span> <span class="o">...</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>Next there will be a line with the tag <strong>\-e</strong>, followed by</p>
|
||||||
|
<p>The parameters are afterwards listed as</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">param</span><span class="o">-</span><span class="n">name</span> <span class="o">=</span> <span class="n">val</span><span class="p">,</span> <span class="n">pos</span><span class="o">-</span><span class="n">err</span><span class="p">,</span> <span class="n">neg</span><span class="o">-</span><span class="n">err</span><span class="p">,</span>\
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>After all the parameters listed of a specific run, the <strong>run number</strong> with the run title ends a run data set.
|
||||||
|
This might look like this (be aware of the comma!):</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">11231</span><span class="p">,,,</span> <span class="n">AgPlate</span> <span class="mi">250</span><span class="n">nm</span> <span class="p">(</span><span class="n">T5034</span><span class="p">),</span> <span class="n">T</span><span class="o">=</span><span class="mf">200.00</span> <span class="n">K</span><span class="p">,</span> <span class="n">E</span><span class="o">=</span><span class="mf">12.99</span> <span class="n">keV</span><span class="p">,</span> <span class="n">B</span><span class="o">=~</span><span class="mi">50</span><span class="p">(</span><span class="n">G</span><span class="p">)</span><span class="o">/</span><span class="mf">8.65</span><span class="p">(</span><span class="n">A</span><span class="p">),</span> <span class="n">Tr</span><span class="o">/</span><span class="n">Sa</span><span class="o">=</span><span class="mf">12.00</span><span class="o">/-</span><span class="mf">1.80</span> <span class="n">kV</span><span class="p">,</span> <span class="n">SR</span><span class="o">=-</span><span class="mf">10.00</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>A full example might look like this:</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">TITLE</span>
|
||||||
|
<span class="n">Ag</span> <span class="n">Plate</span> <span class="mi">2023</span> <span class="n">runs</span><span class="p">,</span> <span class="n">Tr12kV</span><span class="p">,</span> <span class="n">E</span><span class="o">=</span><span class="mi">13</span><span class="n">keV</span><span class="p">,</span> <span class="n">TF</span> <span class="n">B</span><span class="o">=</span><span class="mi">50</span><span class="n">G</span>
|
||||||
|
|
||||||
|
<span class="n">Abstract</span>
|
||||||
|
<span class="n">Summary</span> <span class="n">of</span> <span class="n">the</span>
|
||||||
|
|
||||||
|
<span class="n">LABELS</span>
|
||||||
|
<span class="n">T</span> <span class="p">(</span><span class="n">K</span><span class="p">)</span>
|
||||||
|
<span class="n">B</span> <span class="p">(</span><span class="n">G</span><span class="p">)</span>
|
||||||
|
<span class="n">Implantation</span> <span class="n">Energy</span> <span class="p">(</span><span class="n">keV</span><span class="p">)</span>
|
||||||
|
<span class="n">Transport</span> <span class="p">(</span><span class="n">kV</span><span class="p">)</span>
|
||||||
|
<span class="n">RAL</span><span class="o">-</span><span class="n">RAR</span> <span class="p">(</span><span class="n">kV</span><span class="p">)</span>
|
||||||
|
<span class="n">RAT</span><span class="o">-</span><span class="n">RAB</span> <span class="p">(</span><span class="n">kV</span><span class="p">)</span>
|
||||||
|
<span class="n">Spin</span> <span class="n">Rotation</span> <span class="n">Angle</span> <span class="p">(</span><span class="n">degree</span><span class="p">)</span>
|
||||||
|
<span class="n">Asy</span>
|
||||||
|
<span class="n">Lambda</span>
|
||||||
|
<span class="n">Ph</span>
|
||||||
|
<span class="n">Field</span>
|
||||||
|
<span class="n">RelPh_L</span>
|
||||||
|
<span class="n">N0_L</span>
|
||||||
|
<span class="n">N_bkg_L</span>
|
||||||
|
<span class="n">RelPh_T</span>
|
||||||
|
<span class="n">N0_T</span>
|
||||||
|
<span class="n">N_bkg_T</span>
|
||||||
|
<span class="n">RelPh_R</span>
|
||||||
|
<span class="n">alpha_LR</span>
|
||||||
|
<span class="n">N_bkg_R</span>
|
||||||
|
<span class="n">RelPh_B</span>
|
||||||
|
<span class="n">alpha_TB</span>
|
||||||
|
<span class="n">N_bkg_B</span>
|
||||||
|
<span class="n">maxLH</span>
|
||||||
|
<span class="n">NDF</span>
|
||||||
|
<span class="n">maxLHred</span>
|
||||||
|
<span class="n">RUN</span>
|
||||||
|
|
||||||
|
<span class="n">Data</span> <span class="n">dataT</span> <span class="n">dataB</span> <span class="n">dataE</span> <span class="n">dataTr</span> <span class="n">dataRALRAR</span> <span class="n">dataRATRAB</span> <span class="n">dataSpinRot</span> <span class="n">Asy</span> <span class="n">Lambda</span> <span class="n">Ph</span> <span class="n">Field</span> <span class="n">RelPh_L</span> <span class="n">N0_L</span> <span class="n">N_bkg_L</span> <span class="n">RelPh_T</span> <span class="n">N0_T</span> <span class="n">N_bkg_T</span> <span class="n">RelPh_R</span> <span class="n">alpha_LR</span> <span class="n">N_bkg_R</span> <span class="n">RelPh_B</span> <span class="n">alpha_TB</span> <span class="n">N_bkg_B</span> <span class="n">maxLH</span> <span class="n">NDF</span> <span class="n">maxLHred</span> <span class="n">RUN</span>
|
||||||
|
\<span class="o">-</span><span class="n">e</span>
|
||||||
|
<span class="n">dataT</span> <span class="o">=</span> <span class="mf">200.001</span><span class="p">,</span> <span class="mf">0.0009</span><span class="p">,</span> <span class="mf">0.0009</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataB</span> <span class="o">=</span> <span class="mf">49.49</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataE</span> <span class="o">=</span> <span class="mf">12.9952</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataTr</span> <span class="o">=</span> <span class="mf">11.9993</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataRALRAR</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.008</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataRATRAB</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.009</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataSpinRot</span> <span class="o">=</span> <span class="o">-</span><span class="mi">10</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">Asy</span> <span class="o">=</span> <span class="mf">0.22466</span><span class="p">,</span> <span class="mf">0.00084</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.00084</span><span class="p">,</span>\
|
||||||
|
<span class="n">Lambda</span> <span class="o">=</span> <span class="mf">0.0081</span><span class="p">,</span> <span class="mf">0.0014</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0014</span><span class="p">,</span>\
|
||||||
|
<span class="n">Ph</span> <span class="o">=</span> <span class="mf">12.14</span><span class="p">,</span> <span class="mf">0.32</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.32</span><span class="p">,</span>\
|
||||||
|
<span class="n">Field</span> <span class="o">=</span> <span class="mf">50.837</span><span class="p">,</span> <span class="mf">0.017</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.017</span><span class="p">,</span>\
|
||||||
|
<span class="n">RelPh_L</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">N0_L</span> <span class="o">=</span> <span class="mf">430.67</span><span class="p">,</span> <span class="mf">0.39</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.39</span><span class="p">,</span>\
|
||||||
|
<span class="n">N_bkg_L</span> <span class="o">=</span> <span class="mf">6.81</span><span class="p">,</span> <span class="mf">0.048</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||||
|
<span class="n">RelPh_T</span> <span class="o">=</span> <span class="o">-</span><span class="mf">89.95</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||||
|
<span class="n">N0_T</span> <span class="o">=</span> <span class="mf">422.6</span><span class="p">,</span> <span class="mf">0.37</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.37</span><span class="p">,</span>\
|
||||||
|
<span class="n">N_bkg_T</span> <span class="o">=</span> <span class="mf">7.125</span><span class="p">,</span> <span class="mf">0.047</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||||
|
<span class="n">RelPh_R</span> <span class="o">=</span> <span class="o">-</span><span class="mf">178.55</span><span class="p">,</span> <span class="mf">0.39</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.39</span><span class="p">,</span>\
|
||||||
|
<span class="n">alpha_LR</span> <span class="o">=</span> <span class="mf">0.9729</span><span class="p">,</span> <span class="mf">0.0012</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0012</span><span class="p">,</span>\
|
||||||
|
<span class="n">N_bkg_R</span> <span class="o">=</span> <span class="mf">7.375</span><span class="p">,</span> <span class="mf">0.048</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||||
|
<span class="n">RelPh_B</span> <span class="o">=</span> <span class="mf">90.38</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||||
|
<span class="n">alpha_TB</span> <span class="o">=</span> <span class="mf">0.9522</span><span class="p">,</span> <span class="mf">0.0012</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0012</span><span class="p">,</span>\
|
||||||
|
<span class="n">N_bkg_B</span> <span class="o">=</span> <span class="mf">6.546</span><span class="p">,</span> <span class="mf">0.047</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.047</span><span class="p">,</span>\
|
||||||
|
<span class="n">maxLH</span> <span class="o">=</span> <span class="mf">20303.3</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">NDF</span> <span class="o">=</span> <span class="mi">20361</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">maxLHred</span> <span class="o">=</span> <span class="mf">0.997166</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="mi">11231</span><span class="p">,,,</span> <span class="n">AgPlate</span> <span class="mi">250</span><span class="n">nm</span> <span class="p">(</span><span class="n">T5034</span><span class="p">),</span> <span class="n">T</span><span class="o">=</span><span class="mf">200.00</span> <span class="n">K</span><span class="p">,</span> <span class="n">E</span><span class="o">=</span><span class="mf">12.99</span> <span class="n">keV</span><span class="p">,</span> <span class="n">B</span><span class="o">=~</span><span class="mi">50</span><span class="p">(</span><span class="n">G</span><span class="p">)</span><span class="o">/</span><span class="mf">8.65</span><span class="p">(</span><span class="n">A</span><span class="p">),</span> <span class="n">Tr</span><span class="o">/</span><span class="n">Sa</span><span class="o">=</span><span class="mf">12.00</span><span class="o">/-</span><span class="mf">1.80</span> <span class="n">kV</span><span class="p">,</span> <span class="n">SR</span><span class="o">=-</span><span class="mf">10.00</span>
|
||||||
|
<span class="n">dataT</span> <span class="o">=</span> <span class="mi">153</span><span class="p">,</span> <span class="mf">0.7</span><span class="p">,</span> <span class="mf">0.7</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataB</span> <span class="o">=</span> <span class="mf">49.49</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataE</span> <span class="o">=</span> <span class="mf">12.9952</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataTr</span> <span class="o">=</span> <span class="mf">11.9993</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataRALRAR</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.008</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataRATRAB</span> <span class="o">=</span> <span class="o">-</span><span class="mf">0.009</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">dataSpinRot</span> <span class="o">=</span> <span class="o">-</span><span class="mi">10</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">Asy</span> <span class="o">=</span> <span class="mf">0.22253</span><span class="p">,</span> <span class="mf">0.00084</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.00083</span><span class="p">,</span>\
|
||||||
|
<span class="n">Lambda</span> <span class="o">=</span> <span class="mf">0.0055</span><span class="p">,</span> <span class="mf">0.0014</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0014</span><span class="p">,</span>\
|
||||||
|
<span class="n">Ph</span> <span class="o">=</span> <span class="mf">11.53</span><span class="p">,</span> <span class="mf">0.32</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.32</span><span class="p">,</span>\
|
||||||
|
<span class="n">Field</span> <span class="o">=</span> <span class="mf">51.026</span><span class="p">,</span> <span class="mf">0.017</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.017</span><span class="p">,</span>\
|
||||||
|
<span class="n">RelPh_L</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">N0_L</span> <span class="o">=</span> <span class="mf">430.31</span><span class="p">,</span> <span class="mf">0.39</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.39</span><span class="p">,</span>\
|
||||||
|
<span class="n">N_bkg_L</span> <span class="o">=</span> <span class="mf">6.762</span><span class="p">,</span> <span class="mf">0.048</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||||
|
<span class="n">RelPh_T</span> <span class="o">=</span> <span class="o">-</span><span class="mf">89.3</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||||
|
<span class="n">N0_T</span> <span class="o">=</span> <span class="mf">422.31</span><span class="p">,</span> <span class="mf">0.37</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.37</span><span class="p">,</span>\
|
||||||
|
<span class="n">N_bkg_T</span> <span class="o">=</span> <span class="mf">6.96</span><span class="p">,</span> <span class="mf">0.047</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.047</span><span class="p">,</span>\
|
||||||
|
<span class="n">RelPh_R</span> <span class="o">=</span> <span class="o">-</span><span class="mf">178.61</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||||
|
<span class="n">alpha_LR</span> <span class="o">=</span> <span class="mf">0.975</span><span class="p">,</span> <span class="mf">0.0013</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0012</span><span class="p">,</span>\
|
||||||
|
<span class="n">N_bkg_R</span> <span class="o">=</span> <span class="mf">7.361</span><span class="p">,</span> <span class="mf">0.048</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.048</span><span class="p">,</span>\
|
||||||
|
<span class="n">RelPh_B</span> <span class="o">=</span> <span class="mf">90.24</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.4</span><span class="p">,</span>\
|
||||||
|
<span class="n">alpha_TB</span> <span class="o">=</span> <span class="mf">0.9605</span><span class="p">,</span> <span class="mf">0.0012</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.0012</span><span class="p">,</span>\
|
||||||
|
<span class="n">N_bkg_B</span> <span class="o">=</span> <span class="mf">6.623</span><span class="p">,</span> <span class="mf">0.047</span><span class="p">,</span> <span class="o">-</span><span class="mf">0.047</span><span class="p">,</span>\
|
||||||
|
<span class="n">maxLH</span> <span class="o">=</span> <span class="mf">20435.6</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">NDF</span> <span class="o">=</span> <span class="mi">20361</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="n">maxLHred</span> <span class="o">=</span> <span class="mf">1.00366</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span>\
|
||||||
|
<span class="mi">11235</span><span class="p">,,,</span> <span class="n">AgPlate</span> <span class="mi">250</span><span class="n">nm</span> <span class="p">(</span><span class="n">T5034</span><span class="p">),</span> <span class="n">T</span><span class="o">=</span><span class="mf">151.72</span> <span class="n">K</span><span class="p">,</span> <span class="n">E</span><span class="o">=</span><span class="mf">13.00</span> <span class="n">keV</span><span class="p">,</span> <span class="n">B</span><span class="o">=~</span><span class="mi">50</span><span class="p">(</span><span class="n">G</span><span class="p">)</span><span class="o">/</span><span class="mf">8.65</span><span class="p">(</span><span class="n">A</span><span class="p">),</span> <span class="n">Tr</span><span class="o">/</span><span class="n">Sa</span><span class="o">=</span><span class="mf">12.00</span><span class="o">/-</span><span class="mf">1.80</span> <span class="n">kV</span><span class="p">,</span> <span class="n">SR</span><span class="o">=-</span><span class="mf">10.00</span>
|
||||||
|
<span class="o">>></span> <span class="n">here</span> <span class="n">many</span> <span class="n">more</span> <span class="n">run</span> <span class="n">data</span> <span class="n">would</span> <span class="n">follow</span> <span class="o">...</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="dat-csv-like-file-format-for-non-mgrsr">
|
||||||
|
<span id="dat-file-format"></span><span id="index-3"></span><h2>DAT: CSV like file format for non-μSR<a class="headerlink" href="#dat-csv-like-file-format-for-non-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>This is typically used when exporting the parameter data from <strong>msr2data</strong> to be used in <strong>mupp</strong>, gnuplot, origin, or whatever parameter plotter you might use.
|
||||||
|
The first line defines the parameter tags separated by spaces or tabs. If errors are available there are labeled be the ending <em>Err</em>.
|
||||||
|
This is followed by the parameter values and its errors if present. A fill example looks like this:</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">dataT</span> <span class="n">dataTErr</span> <span class="n">dataB</span> <span class="n">dataE</span> <span class="n">dataTr</span> <span class="n">dataRALRAR</span> <span class="n">dataRATRAB</span> <span class="n">dataSpinRot</span> <span class="n">Asy</span> <span class="n">AsyPosErr</span> <span class="n">AsyNegErr</span> <span class="n">Lambda</span> <span class="n">LambdaPosErr</span> <span class="n">LambdaNegErr</span> <span class="n">Ph</span> <span class="n">PhPosErr</span> <span class="n">PhNegErr</span> <span class="n">Field</span> <span class="n">FieldPosErr</span> <span class="n">FieldNegErr</span> <span class="n">RelPh_L</span> <span class="n">RelPh_LPosErr</span> <span class="n">RelPh_LNegErr</span> <span class="n">N0_L</span> <span class="n">N0_LPosErr</span> <span class="n">N0_LNegErr</span> <span class="n">N_bkg_L</span> <span class="n">N_bkg_LPosErr</span> <span class="n">N_bkg_LNegErr</span> <span class="n">RelPh_T</span> <span class="n">RelPh_TPosErr</span> <span class="n">RelPh_TNegErr</span> <span class="n">N0_T</span> <span class="n">N0_TPosErr</span> <span class="n">N0_TNegErr</span> <span class="n">N_bkg_T</span> <span class="n">N_bkg_TPosErr</span> <span class="n">N_bkg_TNegErr</span> <span class="n">RelPh_R</span> <span class="n">RelPh_RPosErr</span> <span class="n">RelPh_RNegErr</span> <span class="n">alpha_LR</span> <span class="n">alpha_LRPosErr</span> <span class="n">alpha_LRNegErr</span> <span class="n">N_bkg_R</span> <span class="n">N_bkg_RPosErr</span> <span class="n">N_bkg_RNegErr</span> <span class="n">RelPh_B</span> <span class="n">RelPh_BPosErr</span> <span class="n">RelPh_BNegErr</span> <span class="n">alpha_TB</span> <span class="n">alpha_TBPosErr</span> <span class="n">alpha_TBNegErr</span> <span class="n">N_bkg_B</span> <span class="n">N_bkg_BPosErr</span> <span class="n">N_bkg_BNegErr</span> <span class="n">maxLH</span> <span class="n">NDF</span> <span class="n">maxLHred</span> <span class="n">RUN</span>
|
||||||
|
<span class="mi">200</span> <span class="mf">0.007</span> <span class="mf">99.48</span> <span class="mf">1.11754</span> <span class="mf">10.001</span> <span class="o">-</span><span class="mf">0.008</span> <span class="o">-</span><span class="mf">0.008</span> <span class="o">-</span><span class="mi">10</span> <span class="mf">0.1587</span> <span class="mf">0.0012</span> <span class="mf">0.0012</span> <span class="mf">0.0263</span> <span class="mf">0.003</span> <span class="mf">0.003</span> <span class="mf">29.85</span> <span class="mf">0.64</span> <span class="mf">0.64</span> <span class="mf">101.179</span> <span class="mf">0.035</span> <span class="mf">0.035</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mf">219.27</span> <span class="mf">0.27</span> <span class="mf">0.27</span> <span class="mf">2.676</span> <span class="mf">0.033</span> <span class="mf">0.033</span> <span class="o">-</span><span class="mf">89.79</span> <span class="mf">0.81</span> <span class="mf">0.81</span> <span class="mf">210.42</span> <span class="mf">0.26</span> <span class="mf">0.26</span> <span class="mf">2.723</span> <span class="mf">0.032</span> <span class="mf">0.032</span> <span class="o">-</span><span class="mf">179.73</span> <span class="mf">0.81</span> <span class="mf">0.81</span> <span class="mf">0.9808</span> <span class="mf">0.0017</span> <span class="mf">0.0017</span> <span class="mf">2.993</span> <span class="mf">0.033</span> <span class="mf">0.033</span> <span class="mf">90.05</span> <span class="mf">0.82</span> <span class="mf">0.82</span> <span class="mf">0.9755</span> <span class="mf">0.0017</span> <span class="mf">0.0017</span> <span class="mf">2.501</span> <span class="mf">0.032</span> <span class="mf">0.032</span> <span class="mf">20444.8</span> <span class="mi">20361</span> <span class="mf">1.00412</span> <span class="mi">11400</span>
|
||||||
|
<span class="mi">200</span> <span class="mf">0.009</span> <span class="mf">99.49</span> <span class="mf">2.11668</span> <span class="mf">10.001</span> <span class="o">-</span><span class="mf">0.008</span> <span class="o">-</span><span class="mf">0.008</span> <span class="o">-</span><span class="mi">10</span> <span class="mf">0.1732</span> <span class="mf">0.0012</span> <span class="mf">0.0012</span> <span class="mf">0.0096</span> <span class="mf">0.0025</span> <span class="mf">0.0026</span> <span class="mf">28.88</span> <span class="mf">0.57</span> <span class="mf">0.57</span> <span class="mf">101.231</span> <span class="mf">0.03</span> <span class="mf">0.03</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mf">219.86</span> <span class="mf">0.27</span> <span class="mf">0.27</span> <span class="mf">2.749</span> <span class="mf">0.033</span> <span class="mf">0.033</span> <span class="o">-</span><span class="mf">88.87</span> <span class="mf">0.71</span> <span class="mf">0.71</span> <span class="mf">211.47</span> <span class="mf">0.26</span> <span class="mf">0.26</span> <span class="mf">2.791</span> <span class="mf">0.032</span> <span class="mf">0.032</span> <span class="o">-</span><span class="mf">178.48</span> <span class="mf">0.72</span> <span class="mf">0.71</span> <span class="mf">0.9678</span> <span class="mf">0.0017</span> <span class="mf">0.0017</span> <span class="mf">2.969</span> <span class="mf">0.033</span> <span class="mf">0.033</span> <span class="mf">90.94</span> <span class="mf">0.73</span> <span class="mf">0.73</span> <span class="mf">0.9608</span> <span class="mf">0.0017</span> <span class="mf">0.0017</span> <span class="mf">2.653</span> <span class="mf">0.032</span> <span class="mf">0.032</span> <span class="mf">20182.5</span> <span class="mi">20361</span> <span class="mf">0.991233</span> <span class="mi">11401</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="mdu-file-format-psi-for-mgrsr">
|
||||||
|
<span id="mdu-file-format"></span><span id="index-4"></span><h2>MDU file format (psi) for μSR<a class="headerlink" href="#mdu-file-format-psi-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>For details about the PSI-BIN/MDU file format from PSI see <a class="reference external" href="http://lmu.web.psi.ch/docu/manuals/bulk_manuals/software/Class_MuSR_PSI/index.html">Class_MuSR_PSI</a></p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="mud-file-format-triumf-for-mgrsr">
|
||||||
|
<span id="mud-file-format"></span><span id="index-5"></span><h2>MUD file format (triumf) for μSR<a class="headerlink" href="#mud-file-format-triumf-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>For details about the MUD file format from triumf see <a class="reference external" href="https://cmms.triumf.ca/mud/">MUon Data access</a> .</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="musrroot-file-format-psi-for-mgrsr">
|
||||||
|
<span id="musr-root-file-format"></span><h2>MusrRoot file format (PSI) for μSR<a class="headerlink" href="#musrroot-file-format-psi-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>For details see <a class="reference internal" href="musr-root.html#musrroot"><span class="std std-ref">MusrRoot - an Extensible Open File Format for uSR</span></a>.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="nexus-file-format-isis-for-mgrsr">
|
||||||
|
<span id="nexus-file-format"></span><span id="index-6"></span><h2>NeXus file format (isis) for μSR<a class="headerlink" href="#nexus-file-format-isis-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>For details about the NeXus file format from ISIS (UK) see <a class="reference external" href="https://doi.org/10.1016/S0921-4526(02)01613-7">The application of the NeXus data format to ISIS muon data</a> . For a detailed list of available meta information and data see <a class="reference external" href="https://www.isis.stfc.ac.uk/Pages/nexus-definition-v27924.pdf">NeXus Instrument Definitions for ISIS muon Data</a> .</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="psi-bin-file-format-psi-for-mgrsr">
|
||||||
|
<span id="psi-bin-file-format"></span><span id="index-7"></span><h2>PSI-BIN file format (psi) for μSR<a class="headerlink" href="#psi-bin-file-format-psi-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>For details about the PSI-BIN/MDU file format from PSI see <a class="reference external" href="http://lmu.web.psi.ch/docu/manuals/bulk_manuals/software/Class_MuSR_PSI/index.html">Class_MuSR_PSI</a>.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="root-file-format-psi-lem-before-2012-for-mgrsr">
|
||||||
|
<span id="root-file-format"></span><span id="index-8"></span><h2>ROOT file format (psi/lem before 2012) for μSR<a class="headerlink" href="#root-file-format-psi-lem-before-2012-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>For details about the API of ROOT files can be here: <a class="reference external" href="https://root.cern/manual/root_files/">ROOT files</a>.
|
||||||
|
The structure of the ROOT files (LEM, before 2012) looks like this:</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">ROOT</span><span class="o">-</span><span class="n">file</span> <span class="o">--|</span>
|
||||||
|
<span class="o">|--</span> <span class="n">histos</span> <span class="o">---|</span>
|
||||||
|
<span class="o">|</span> <span class="o">|--</span> <span class="n">DecayAnaModule</span>
|
||||||
|
<span class="o">|</span> <span class="o">|--</span> <span class="n">PileUpAnaModule</span>
|
||||||
|
<span class="o">|</span> <span class="o">|--</span> <span class="n">ScalerSumRate</span>
|
||||||
|
<span class="o">|</span> <span class="o">|--</span> <span class="n">SCAnaModule</span>
|
||||||
|
<span class="o">|</span>
|
||||||
|
<span class="o">|--</span> <span class="n">RunInfo</span> <span class="o">--|</span>
|
||||||
|
<span class="o">|--</span> <span class="n">RunSummary</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p><code class="docutils literal notranslate"><span class="pre">histos</span></code>, <code class="docutils literal notranslate"><span class="pre">RunInfo</span></code>, <code class="docutils literal notranslate"><span class="pre">DecayAnaModule</span></code>, <code class="docutils literal notranslate"><span class="pre">PileUpAnaModule</span></code>, <code class="docutils literal notranslate"><span class="pre">ScalerSumRate</span></code>, <code class="docutils literal notranslate"><span class="pre">SCAnaModule</span></code> are <strong>TFolder</strong> objects.</p>
|
||||||
|
<p>The <code class="docutils literal notranslate"><span class="pre">DecayAnaModule</span></code> object holds the positron spectra</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">DecayAnaModule</span> <span class="o">--|</span>
|
||||||
|
<span class="o">|--</span> <span class="n">hDecay00</span>
|
||||||
|
<span class="o">|--</span> <span class="n">hDecay01</span>
|
||||||
|
<span class="o">|--</span> <span class="n">hDecay02</span>
|
||||||
|
<span class="o">|--</span> <span class="n">hDecay03</span>
|
||||||
|
<span class="o">|--</span> <span class="n">hDecay20</span>
|
||||||
|
<span class="o">|--</span> <span class="n">hDecay21</span>
|
||||||
|
<span class="o">|--</span> <span class="n">hDecay22</span>
|
||||||
|
<span class="o">|--</span> <span class="n">hDecay23</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>The <code class="docutils literal notranslate"><span class="pre">hDecayXX</span></code> files or <strong>TH1F</strong> objects containing the positron spectra of the LEM detectors.</p>
|
||||||
|
<p>The detectors (00, 01, 02, and 03) are the detectors (Left, Top, Right, Bottom). These are non-post-pileup (NPP) histograms.</p>
|
||||||
|
<p>The detectors (20, 21, 22, and 23) are the detectors (Left, Top, Right, Bottom). These are post-pileup-corrected (PPC) histograms.</p>
|
||||||
|
<p>The <code class="docutils literal notranslate"><span class="pre">SCAnaModule</span></code> contains various <strong>TF1H</strong> objects of slow control data of the run.</p>
|
||||||
|
<p>The <code class="docutils literal notranslate"><span class="pre">RunSummary</span></code> is essentially an ascii dump, with summary information of the run.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="wkm-file-format-for-mgrsr">
|
||||||
|
<span id="wkm-file-format"></span><span id="index-9"></span><h2>WKM file format for μSR<a class="headerlink" href="#wkm-file-format-for-mgrsr" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>WKM is an obsolete ascii file format, originally introduced by people from the TU Braunschweig.
|
||||||
|
It starts with a header which shows like this:</p>
|
||||||
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">-</span> <span class="n">WKM</span> <span class="n">data</span> <span class="n">file</span> <span class="n">converted</span> <span class="k">with</span> <span class="n">any2many</span>
|
||||||
|
<span class="n">NEMU_Run</span><span class="p">:</span> <span class="mi">2466</span>
|
||||||
|
<span class="n">nemu_Run</span><span class="p">:</span> <span class="o">./</span><span class="mf">2466.</span><span class="n">wkm</span>
|
||||||
|
<span class="n">Date</span><span class="p">:</span> <span class="mi">13</span><span class="p">:</span><span class="mi">22</span><span class="p">:</span><span class="mi">00</span> <span class="mi">2012</span><span class="o">-</span><span class="mi">06</span><span class="o">-</span><span class="mi">03</span> <span class="o">/</span> <span class="mi">14</span><span class="p">:</span><span class="mi">04</span><span class="p">:</span><span class="mi">38</span> <span class="mi">2012</span><span class="o">-</span><span class="mi">06</span><span class="o">-</span><span class="mi">03</span>
|
||||||
|
<span class="n">Title</span><span class="p">:</span> <span class="n">LSCO</span> <span class="n">x</span><span class="o">=</span><span class="mf">0.02</span> <span class="p">(</span><span class="mi">224</span><span class="o">-</span><span class="mi">227</span><span class="p">),</span> <span class="n">T</span><span class="o">=</span><span class="mf">12.00</span> <span class="p">(</span><span class="n">K</span><span class="p">),</span> <span class="n">E</span><span class="o">=</span><span class="mf">5.57</span> <span class="n">keV</span><span class="p">,</span> <span class="n">WEW</span> <span class="n">B</span><span class="o">=~</span><span class="mi">49</span><span class="p">(</span><span class="n">G</span><span class="p">)</span><span class="o">/</span><span class="mf">8.62</span><span class="p">(</span><span class="n">A</span><span class="p">),</span> <span class="n">Tr</span><span class="o">=</span><span class="mf">15.02</span> <span class="p">(</span><span class="n">kV</span><span class="p">),</span> <span class="n">Sample</span><span class="o">=</span><span class="mf">8.70</span> <span class="p">(</span><span class="n">kV</span><span class="p">),</span> <span class="n">SpinRot</span> <span class="o">-</span><span class="mi">10</span>
|
||||||
|
<span class="n">Field</span><span class="p">:</span> <span class="mf">49.11</span>
|
||||||
|
<span class="n">Setup</span><span class="p">:</span> <span class="n">Sample</span><span class="p">,</span> <span class="n">WEW</span><span class="p">,</span> <span class="n">LowTemp</span><span class="o">-</span><span class="mi">2</span>
|
||||||
|
<span class="n">Temp</span><span class="p">:</span> <span class="mf">11.999</span>
|
||||||
|
<span class="n">TOF</span><span class="p">(</span><span class="n">M3S1</span><span class="p">):</span> <span class="n">nocut</span>
|
||||||
|
<span class="n">Groups</span><span class="p">:</span> <span class="mi">8</span>
|
||||||
|
<span class="n">Channels</span><span class="p">:</span> <span class="mi">66601</span>
|
||||||
|
<span class="n">Resolution</span><span class="p">:</span> <span class="mf">0.0001953125</span>
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>The header ends with an empty line.</p>
|
||||||
|
<p>The data are stored as following: there are always 10 bin-counts per line.
|
||||||
|
Between detectors, there will be an empty line.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||||
|
|
||||||
|
<a href="musr-root.html" class="btn btn-neutral float-right" title="MusrRoot - an Extensible Open File Format for μSR" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="any2many.html" class="btn btn-neutral" title="any2many - a Universal μSR-file-format converter" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<p>
|
||||||
|
© Copyright 2023, Andreas Suter.
|
||||||
|
Last updated on Aug 24, 2023.
|
||||||
|
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var DOCUMENTATION_OPTIONS = {
|
||||||
|
URL_ROOT:'./',
|
||||||
|
VERSION:'1.9.1',
|
||||||
|
LANGUAGE:'None',
|
||||||
|
COLLAPSE_INDEX:false,
|
||||||
|
FILE_SUFFIX:'.html',
|
||||||
|
HAS_SOURCE: true,
|
||||||
|
SOURCELINK_SUFFIX: '.txt'
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||||
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(function () {
|
||||||
|
SphinxRtdTheme.Navigation.enable(true);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Index — musrfit 1.9.0 documentation</title>
|
<title>Index — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -93,6 +93,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -183,6 +184,7 @@
|
|||||||
| <a href="#T"><strong>T</strong></a>
|
| <a href="#T"><strong>T</strong></a>
|
||||||
| <a href="#U"><strong>U</strong></a>
|
| <a href="#U"><strong>U</strong></a>
|
||||||
| <a href="#V"><strong>V</strong></a>
|
| <a href="#V"><strong>V</strong></a>
|
||||||
|
| <a href="#W"><strong>W</strong></a>
|
||||||
| <a href="#X"><strong>X</strong></a>
|
| <a href="#X"><strong>X</strong></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -205,13 +207,15 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-37">addt0-asymmetry</a>
|
<li><a href="user-manual.html#index-37">addt0-asymmetry</a>
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
|
||||||
<li><a href="user-manual.html#index-36">addt0-single-histo</a>
|
<li><a href="user-manual.html#index-36">addt0-single-histo</a>
|
||||||
</li>
|
</li>
|
||||||
|
</ul></td>
|
||||||
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="user-manual.html#index-22">alpha-beta</a>
|
<li><a href="user-manual.html#index-22">alpha-beta</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="any2many.html#index-0">any2many</a>, <a href="user-manual.html#index-8">[1]</a>
|
<li><a href="any2many.html#index-0">any2many</a>, <a href="user-manual.html#index-8">[1]</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="file-formats.html#index-1">ascii-file-format</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-71">asymmetry-fit</a>
|
<li><a href="user-manual.html#index-71">asymmetry-fit</a>
|
||||||
</li>
|
</li>
|
||||||
@ -263,18 +267,22 @@
|
|||||||
<h2 id="D">D</h2>
|
<h2 id="D">D</h2>
|
||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
|
<li><a href="file-formats.html#index-3">dat-file-format</a>
|
||||||
|
</li>
|
||||||
<li><a href="user-manual.html#index-33">data-asymmetry</a>
|
<li><a href="user-manual.html#index-33">data-asymmetry</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-32">data-single-histo</a>
|
<li><a href="user-manual.html#index-32">data-single-histo</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="file-formats.html#index-2">db-file-format</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-libs.html#index-15">DepthProf-lib</a>
|
<li><a href="user-libs.html#index-15">DepthProf-lib</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="setup-dks.html#index-0">dks</a>
|
<li><a href="setup-dks.html#index-0">dks</a>
|
||||||
</li>
|
|
||||||
<li><a href="user-manual.html#index-43">dks-command-overview</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
</ul></td>
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
|
<li><a href="user-manual.html#index-43">dks-command-overview</a>
|
||||||
|
</li>
|
||||||
<li><a href="setup-dks.html#index-3">dks-install</a>
|
<li><a href="setup-dks.html#index-3">dks-install</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="setup-dks.html#index-5">dks-opencl-macOS</a>
|
<li><a href="setup-dks.html#index-5">dks-opencl-macOS</a>
|
||||||
@ -300,6 +308,8 @@
|
|||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="setup-standard.html#index-4">fftw</a>
|
<li><a href="setup-standard.html#index-4">fftw</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="file-formats.html#index-0">file-formats</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-39">fit</a>
|
<li><a href="user-manual.html#index-39">fit</a>
|
||||||
</li>
|
</li>
|
||||||
@ -310,11 +320,11 @@
|
|||||||
<li><a href="user-manual.html#index-27">forward</a>
|
<li><a href="user-manual.html#index-27">forward</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-28">forward-backward</a>
|
<li><a href="user-manual.html#index-28">forward-backward</a>
|
||||||
</li>
|
|
||||||
<li><a href="user-manual.html#index-50">fourier-block-apodization</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
</ul></td>
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
|
<li><a href="user-manual.html#index-50">fourier-block-apodization</a>
|
||||||
|
</li>
|
||||||
<li><a href="user-manual.html#index-49">fourier-block-dc-corrected</a>
|
<li><a href="user-manual.html#index-49">fourier-block-dc-corrected</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-48">fourier-block-fourier_power</a>
|
<li><a href="user-manual.html#index-48">fourier-block-fourier_power</a>
|
||||||
@ -406,6 +416,8 @@
|
|||||||
<li><a href="setup-standard.html#index-21">macports</a>
|
<li><a href="setup-standard.html#index-21">macports</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-26">map</a>
|
<li><a href="user-manual.html#index-26">map</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="file-formats.html#index-4">mdu-file-format</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-17">meta-information</a>
|
<li><a href="user-manual.html#index-17">meta-information</a>
|
||||||
</li>
|
</li>
|
||||||
@ -469,10 +481,12 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-7">msr2msr</a>
|
<li><a href="user-manual.html#index-7">msr2msr</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mupp.html#index-0">mupp</a>
|
<li><a href="file-formats.html#index-5">mud-file-format</a>
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
</ul></td>
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
|
<li><a href="mupp.html#index-0">mupp</a>
|
||||||
|
</li>
|
||||||
<li><a href="mupp.html#index-1">mupp-gui</a>
|
<li><a href="mupp.html#index-1">mupp-gui</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="mupp.html#index-2">mupp-scripting</a>
|
<li><a href="mupp.html#index-2">mupp-scripting</a>
|
||||||
@ -558,6 +572,8 @@
|
|||||||
</ul></td>
|
</ul></td>
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="setup-standard.html#index-22">nexus-build-macports</a>
|
<li><a href="setup-standard.html#index-22">nexus-build-macports</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="file-formats.html#index-6">nexus-file-format</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-manual.html#index-75">non-musr-fit</a>
|
<li><a href="user-manual.html#index-75">non-musr-fit</a>
|
||||||
</li>
|
</li>
|
||||||
@ -583,13 +599,15 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><a href="user-libs.html#index-32">PowderLineAsymGss</a>
|
<li><a href="user-libs.html#index-32">PowderLineAsymGss</a>
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
|
||||||
<li><a href="user-libs.html#index-31">PowderLineAsymLor</a>
|
<li><a href="user-libs.html#index-31">PowderLineAsymLor</a>
|
||||||
</li>
|
</li>
|
||||||
|
</ul></td>
|
||||||
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="user-libs.html#index-30">PowderLineAxialGss</a>
|
<li><a href="user-libs.html#index-30">PowderLineAxialGss</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="user-libs.html#index-29">PowderLineAxialLor</a>
|
<li><a href="user-libs.html#index-29">PowderLineAxialLor</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="file-formats.html#index-7">psi-bin-file-format</a>
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
</ul></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
@ -609,13 +627,15 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><a href="setup-standard.html#index-26">root-build-homebrew</a>
|
<li><a href="setup-standard.html#index-26">root-build-homebrew</a>
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
|
||||||
<li><a href="setup-standard.html#index-16">root-build-linux</a>
|
<li><a href="setup-standard.html#index-16">root-build-linux</a>
|
||||||
</li>
|
</li>
|
||||||
|
</ul></td>
|
||||||
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="setup-standard.html#index-23">root-build-macports</a>
|
<li><a href="setup-standard.html#index-23">root-build-macports</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="setup-standard.html#index-5">root-cern</a>
|
<li><a href="setup-standard.html#index-5">root-cern</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="file-formats.html#index-8">root-file-format</a>
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
</ul></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
@ -700,6 +720,14 @@
|
|||||||
</ul></td>
|
</ul></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
|
||||||
|
<h2 id="W">W</h2>
|
||||||
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
|
<li><a href="file-formats.html#index-9">wkm-file-format</a>
|
||||||
|
</li>
|
||||||
|
</ul></td>
|
||||||
|
</tr></table>
|
||||||
|
|
||||||
<h2 id="X">X</h2>
|
<h2 id="X">X</h2>
|
||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
@ -721,7 +749,7 @@
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 24, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -743,7 +771,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Welcome to the musrfit documentation! — musrfit 1.9.0 documentation</title>
|
<title>Welcome to the musrfit documentation! — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -93,6 +93,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -223,6 +224,19 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a><ul>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#ascii-file-format-for-non-mgrsr">ASCII file format for non-μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#db-file-format-for-non-mgrsr">DB file format for non-μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#dat-csv-like-file-format-for-non-mgrsr">DAT: CSV like file format for non-μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#mdu-file-format-psi-for-mgrsr">MDU file format (psi) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#mud-file-format-triumf-for-mgrsr">MUD file format (triumf) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#musrroot-file-format-psi-for-mgrsr">MusrRoot file format (PSI) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#nexus-file-format-isis-for-mgrsr">NeXus file format (isis) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#psi-bin-file-format-psi-for-mgrsr">PSI-BIN file format (psi) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#root-file-format-psi-lem-before-2012-for-mgrsr">ROOT file format (psi/lem before 2012) for μSR</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="file-formats.html#wkm-file-format-for-mgrsr">WKM file format for μSR</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a><ul>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a><ul>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="musr-root.html#some-basics-concerning-root-files">Some Basics Concerning ROOT Files</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="musr-root.html#some-basics-concerning-root-files">Some Basics Concerning ROOT Files</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="musr-root.html#id1">MusrRoot an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="musr-root.html#id1">MusrRoot an Extensible Open File Format for μSR</a></li>
|
||||||
@ -268,7 +282,7 @@
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 24, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -290,7 +304,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.9.0 documentation</title>
|
<title>msr2data - A Program for Automatically Processing Multiple musrfit msr Files — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -109,6 +109,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -515,7 +516,7 @@ fit serves as template for the second and so on. The template field stays empty
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -537,7 +538,7 @@ fit serves as template for the second and so on. The template field stays empty
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>mupp - μSR Parameter Plotter — musrfit 1.9.0 documentation</title>
|
<title>mupp - μSR Parameter Plotter — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -102,6 +102,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -405,7 +406,7 @@ SCRIPT COMMANDS:
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -427,7 +428,7 @@ SCRIPT COMMANDS:
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.9.0 documentation</title>
|
<title>MusrRoot - an Extensible Open File Format for μSR — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<link rel="index" title="Index" href="genindex.html" />
|
<link rel="index" title="Index" href="genindex.html" />
|
||||||
<link rel="search" title="Search" href="search.html" />
|
<link rel="search" title="Search" href="search.html" />
|
||||||
<link rel="next" title="Acknowledgements" href="acknowledgement.html" />
|
<link rel="next" title="Acknowledgements" href="acknowledgement.html" />
|
||||||
<link rel="prev" title="any2many - a Universal μSR-file-format converter" href="any2many.html" />
|
<link rel="prev" title="Short description and references to the supported file-formats" href="file-formats.html" />
|
||||||
|
|
||||||
|
|
||||||
<script src="_static/js/modernizr.min.js"></script>
|
<script src="_static/js/modernizr.min.js"></script>
|
||||||
@ -94,6 +94,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">MusrRoot - an Extensible Open File Format for μSR</a><ul>
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">MusrRoot - an Extensible Open File Format for μSR</a><ul>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="#some-basics-concerning-root-files">Some Basics Concerning ROOT Files</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="#some-basics-concerning-root-files">Some Basics Concerning ROOT Files</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="#id1">MusrRoot an Extensible Open File Format for μSR</a><ul>
|
<li class="toctree-l2"><a class="reference internal" href="#id1">MusrRoot an Extensible Open File Format for μSR</a><ul>
|
||||||
@ -994,7 +995,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
|
|||||||
<a href="acknowledgement.html" class="btn btn-neutral float-right" title="Acknowledgements" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
<a href="acknowledgement.html" class="btn btn-neutral float-right" title="Acknowledgements" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||||
|
|
||||||
|
|
||||||
<a href="any2many.html" class="btn btn-neutral" title="any2many - a Universal μSR-file-format converter" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
<a href="file-formats.html" class="btn btn-neutral" title="Short description and references to the supported file-formats" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -1004,7 +1005,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -1026,7 +1027,7 @@ the entry has been added. The last token, <code class="docutils literal notransl
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.9.0 documentation</title>
|
<title>musredit: the GUI Based Interface to musrfit — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -114,6 +114,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -631,7 +632,7 @@ the corresponding fit parameter value, except the phases where the step will be
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -653,7 +654,7 @@ the corresponding fit parameter value, except the phases where the step will be
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
Binary file not shown.
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Search — musrfit 1.9.0 documentation</title>
|
<title>Search — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -92,6 +92,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -182,7 +183,7 @@
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 24, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -204,7 +205,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.9.0 documentation</title>
|
<title>Setting up musrfit / DKS: High Speed Fitting with GPU’s — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -113,6 +113,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -405,7 +406,7 @@ The only thing you need <code class="docutils literal notranslate"><span class="
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -427,7 +428,7 @@ The only thing you need <code class="docutils literal notranslate"><span class="
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Setting up musrfit on Different Platforms — musrfit 1.9.0 documentation</title>
|
<title>Setting up musrfit on Different Platforms — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -138,6 +138,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -1092,7 +1093,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -1114,7 +1115,7 @@ $ musrview test-histo-ROOT-NPP.msr
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Tutorial for musrfit — musrfit 1.9.0 documentation</title>
|
<title>Tutorial for musrfit — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -106,6 +106,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -524,7 +525,7 @@ For a complete description please refer to the manuals of <a class="reference in
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -546,7 +547,7 @@ For a complete description please refer to the manuals of <a class="reference in
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>Documentation of user libs (user functions) — musrfit 1.9.0 documentation</title>
|
<title>Documentation of user libs (user functions) — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -119,6 +119,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -865,7 +866,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -887,7 +888,7 @@ K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},\en
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<title>User manual — musrfit 1.9.0 documentation</title>
|
<title>User manual — musrfit 1.9.1 documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -157,6 +157,7 @@
|
|||||||
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="mupp.html">mupp - μSR Parameter Plotter</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="msr2data.html">msr2data - A Program for Automatically Processing Multiple <code class="docutils literal notranslate"><span class="pre">musrfit</span></code> msr Files</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="any2many.html">any2many - a Universal μSR-file-format converter</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="file-formats.html">Short description and references to the supported file-formats</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="musr-root.html">MusrRoot - an Extensible Open File Format for μSR</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="acknowledgement.html">Acknowledgements</a></li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
<li class="toctree-l1"><a class="reference internal" href="bugtracking.html">Bugtracking</a></li>
|
||||||
@ -2871,7 +2872,7 @@ The syntax here is attribute driven</li>
|
|||||||
<div role="contentinfo">
|
<div role="contentinfo">
|
||||||
<p>
|
<p>
|
||||||
© Copyright 2023, Andreas Suter.
|
© Copyright 2023, Andreas Suter.
|
||||||
Last updated on Feb 17, 2023.
|
Last updated on Aug 17, 2023.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -2893,7 +2894,7 @@ The syntax here is attribute driven</li>
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT:'./',
|
URL_ROOT:'./',
|
||||||
VERSION:'1.9.0',
|
VERSION:'1.9.1',
|
||||||
LANGUAGE:'None',
|
LANGUAGE:'None',
|
||||||
COLLAPSE_INDEX:false,
|
COLLAPSE_INDEX:false,
|
||||||
FILE_SUFFIX:'.html',
|
FILE_SUFFIX:'.html',
|
||||||
|
@ -38,7 +38,7 @@ PROJECT_NAME = "mupp"
|
|||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 1.0.0
|
PROJECT_NUMBER = 1.1.0
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
|
|
||||||
\mainpage musrfit - a framework to analyse muSR data.
|
\mainpage musrfit - a framework to analyse muSR data.
|
||||||
|
|
||||||
<p>This pages here are meant to explain the software structure of the musrfit framework. Only the core-classes
|
<p>This pages here are meant to explain the software structure of the musrfit framework.
|
||||||
are described, *i.e.* not the Qt GUI related stuff.
|
|
||||||
|
|
||||||
<p>People merely interested in the handling of the programs should check this link:
|
<p>People merely interested in the handling of the programs should check this link:
|
||||||
\htmlonly
|
\htmlonly
|
||||||
@ -64,13 +63,9 @@ under Linux, Mac OS X, and (with some more work) under Windows. The musrfit fram
|
|||||||
|
|
||||||
\section roadmap Road map and missing features
|
\section roadmap Road map and missing features
|
||||||
|
|
||||||
<p>Support for NeXus files is fully available from early 2012 on.
|
|
||||||
|
|
||||||
<p>The following features should eventually be implemented, but are still missing:
|
<p>The following features should eventually be implemented, but are still missing:
|
||||||
- non-muSR: The plan is to add an option to fit/plot \f$f(x_1,\ldots,x_n)\f$ versus \f$g(x_1,\ldots,x_n)\f$, where \f$x_i\f$ is a given data set element.
|
- non-muSR: The plan is to add an option to fit/plot \f$f(x_1,\ldots,x_n)\f$ versus \f$g(x_1,\ldots,x_n)\f$, where \f$x_i\f$ is a given data set element.
|
||||||
- as soon as ROOT will properly support MS Windows platforms, some better support for MS Windows will be added. Currently only the cygwin version will be supported.
|
|
||||||
- add an interface to maxent
|
- add an interface to maxent
|
||||||
- we will provide rpm's for various linux flavors.
|
|
||||||
|
|
||||||
\section shortComings Short comings of the current musrfit design
|
\section shortComings Short comings of the current musrfit design
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ PROJECT_NAME = musrfit
|
|||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 1.6.0
|
PROJECT_NUMBER = 1.9.2
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
@ -535,40 +536,22 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// read startup file
|
// read startup file
|
||||||
char startup_path_name[128];
|
char startup_path_name[128];
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
PStartupHandler *startupHandler = new PStartupHandler();
|
std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
|
||||||
if (!startupHandler->StartupFileFound()) {
|
if (!startupHandler->StartupFileFound()) {
|
||||||
std::cerr << std::endl << ">> addRun **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
std::cerr << std::endl << ">> addRun **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = nullptr;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
||||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("PStartupHandler", startupHandler.get());
|
||||||
//status = saxParser->ParseFile(startup_path_name);
|
//status = saxParser->ParseFile(startup_path_name);
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
||||||
status = parseXmlFile(saxParser, startup_path_name);
|
status = parseXmlFile(saxParser.get(), startup_path_name);
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
std::cerr << std::endl << ">> addRun **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
std::cerr << std::endl << ">> addRun **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = nullptr;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
startupHandler->CheckLists();
|
startupHandler->CheckLists();
|
||||||
}
|
}
|
||||||
@ -639,19 +622,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// load the files
|
// load the files
|
||||||
std::vector<PRunDataHandler*> runDataHandler;
|
std::vector< std::unique_ptr<PRunDataHandler> > runDataHandler;
|
||||||
runDataHandler.resize(addRunInfo.size());
|
runDataHandler.resize(addRunInfo.size());
|
||||||
Bool_t isGood{true};
|
Bool_t isGood{true};
|
||||||
for (UInt_t i=0; i<runDataHandler.size(); i++) {
|
for (UInt_t i=0; i<runDataHandler.size(); i++) {
|
||||||
if (startupHandler != nullptr) {
|
if (startupHandler != nullptr) {
|
||||||
runDataHandler[i] = new PRunDataHandler(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat, startupHandler->GetDataPathList());
|
runDataHandler[i] = std::make_unique<PRunDataHandler>(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat, startupHandler->GetDataPathList());
|
||||||
if (runDataHandler[i] == nullptr) {
|
|
||||||
isGood = false;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
std::cerr << "**ERROR** couldn't invoke PRunDataHandler (i=" << i << ")." << std::endl;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
runDataHandler[i]->ReadData();
|
runDataHandler[i]->ReadData();
|
||||||
if (!runDataHandler[i]->IsAllDataAvailable()) {
|
if (!runDataHandler[i]->IsAllDataAvailable()) {
|
||||||
isGood = false;
|
isGood = false;
|
||||||
@ -661,14 +637,7 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
runDataHandler[i] = new PRunDataHandler(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat);
|
runDataHandler[i] = std::make_unique<PRunDataHandler>(addRunInfo[i].fPathFileName, addRunInfo[i].fFileFormat);
|
||||||
if (runDataHandler[i] == nullptr) {
|
|
||||||
isGood = false;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
std::cerr << "**ERROR** couldn't invoke PRunDataHandler (i=" << i << ")." << std::endl;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
runDataHandler[i]->ReadData();
|
runDataHandler[i]->ReadData();
|
||||||
if (!runDataHandler[i]->IsAllDataAvailable()) {
|
if (!runDataHandler[i]->IsAllDataAvailable()) {
|
||||||
isGood = false;
|
isGood = false;
|
||||||
@ -683,8 +652,8 @@ int main(int argc, char *argv[])
|
|||||||
// make sure that the number of provided t0's are matching the number of histos from the run-file
|
// make sure that the number of provided t0's are matching the number of histos from the run-file
|
||||||
|
|
||||||
// 1st make sure all the runs have the same number run data (==1 here)
|
// 1st make sure all the runs have the same number run data (==1 here)
|
||||||
PAny2ManyInfo *info{nullptr};
|
std::unique_ptr<PAny2ManyInfo> info;
|
||||||
PRunDataHandler *dataOut{nullptr};
|
std::unique_ptr<PRunDataHandler> dataOut;
|
||||||
if (isGood) {
|
if (isGood) {
|
||||||
for (UInt_t i=1; i<runDataHandler.size(); i++) {
|
for (UInt_t i=1; i<runDataHandler.size(); i++) {
|
||||||
if (runDataHandler[0]->GetNoOfRunData() != runDataHandler[i]->GetNoOfRunData()) {
|
if (runDataHandler[0]->GetNoOfRunData() != runDataHandler[i]->GetNoOfRunData()) {
|
||||||
@ -695,13 +664,7 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info = new PAny2ManyInfo();
|
info = std::make_unique<PAny2ManyInfo>();
|
||||||
if (info == nullptr) {
|
|
||||||
std::cerr << std::endl;
|
|
||||||
std::cerr << "**ERROR** couldn't invoke PAny2ManyInfo." << std::endl;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
isGood = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isGood) {
|
if (isGood) {
|
||||||
@ -709,13 +672,7 @@ int main(int argc, char *argv[])
|
|||||||
info->outFormat = format;
|
info->outFormat = format;
|
||||||
info->year = year;
|
info->year = year;
|
||||||
info->outFileName = flnOut;
|
info->outFileName = flnOut;
|
||||||
dataOut = new PRunDataHandler(info);
|
dataOut = std::make_unique<PRunDataHandler>(info.get());
|
||||||
if (dataOut == nullptr) {
|
|
||||||
std::cerr << std::endl;
|
|
||||||
std::cerr << "**ERROR** couldn't invoke PRunDataHandler for the output file." << std::endl;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
isGood = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isGood) {
|
if (isGood) {
|
||||||
@ -812,8 +769,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// feed all the necessary information for the data file
|
// feed all the necessary information for the data file
|
||||||
PRawRunData *rawRunData = new PRawRunData();
|
PRawRunData *rawRunData = nullptr;
|
||||||
rawRunData = runDataHandler[0]->GetRunData(); // copy all
|
rawRunData = runDataHandler[0]->GetRunData(); // copy all
|
||||||
|
if (rawRunData == nullptr) {
|
||||||
|
std::cerr << ">> addRun: **ERROR** couldn't obtain PRawRunData object." << std::endl;
|
||||||
|
return PMUSR_MSR_ALLOCATION_ERROR;
|
||||||
|
}
|
||||||
rawRunData->SetGenerator("addRun");
|
rawRunData->SetGenerator("addRun");
|
||||||
// overwrite the t0 values with the new ones
|
// overwrite the t0 values with the new ones
|
||||||
for (UInt_t i=0; i<rawRunData->GetNoOfHistos(); i++) {
|
for (UInt_t i=0; i<rawRunData->GetNoOfHistos(); i++) {
|
||||||
@ -831,21 +792,5 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
}
|
|
||||||
if (info) {
|
|
||||||
delete info;
|
|
||||||
}
|
|
||||||
if (dataOut) {
|
|
||||||
delete dataOut;
|
|
||||||
}
|
|
||||||
for (int i=0; i<runDataHandler.size(); i++) {
|
|
||||||
if (runDataHandler[i])
|
|
||||||
delete runDataHandler[i];
|
|
||||||
}
|
|
||||||
runDataHandler.clear();
|
|
||||||
|
|
||||||
return PMUSR_SUCCESS;
|
return PMUSR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <TString.h>
|
#include <TString.h>
|
||||||
#include <TSAXParser.h>
|
#include <TSAXParser.h>
|
||||||
@ -493,49 +494,31 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// read startup file
|
// read startup file
|
||||||
char startup_path_name[128];
|
char startup_path_name[128];
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
PStartupHandler *startupHandler = new PStartupHandler();
|
std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
|
||||||
if (!startupHandler->StartupFileFound()) {
|
if (!startupHandler->StartupFileFound()) {
|
||||||
std::cerr << std::endl << ">> any2many **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
std::cerr << std::endl << ">> any2many **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = nullptr;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
||||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("PStartupHandler", startupHandler.get());
|
||||||
//status = saxParser->ParseFile(startup_path_name);
|
//status = saxParser->ParseFile(startup_path_name);
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
||||||
status = parseXmlFile(saxParser, startup_path_name);
|
status = parseXmlFile(saxParser.get(), startup_path_name);
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
std::cerr << std::endl << ">> any2many **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
std::cerr << std::endl << ">> any2many **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// read all the necessary runs (raw data)
|
// read all the necessary runs (raw data)
|
||||||
PRunDataHandler *dataHandler;
|
std::unique_ptr<PRunDataHandler> dataHandler;
|
||||||
if (startupHandler)
|
if (startupHandler)
|
||||||
dataHandler = new PRunDataHandler(&info, startupHandler->GetDataPathList());
|
dataHandler = std::make_unique<PRunDataHandler>(&info, startupHandler->GetDataPathList());
|
||||||
else
|
else
|
||||||
dataHandler = new PRunDataHandler(&info);
|
dataHandler = std::make_unique<PRunDataHandler>(&info);
|
||||||
|
|
||||||
// read and convert all data
|
// read and convert all data
|
||||||
dataHandler->ConvertData();
|
dataHandler->ConvertData();
|
||||||
@ -546,21 +529,6 @@ int main(int argc, char *argv[])
|
|||||||
std::cerr << std::endl << ">> any2many **ERROR** Couldn't read all data files, will quit ..." << std::endl;
|
std::cerr << std::endl << ">> any2many **ERROR** Couldn't read all data files, will quit ..." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up
|
|
||||||
info.runList.clear();
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = nullptr;
|
|
||||||
}
|
|
||||||
if (dataHandler) {
|
|
||||||
delete dataHandler;
|
|
||||||
dataHandler = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return PMUSR_SUCCESS;
|
return PMUSR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
|
|||||||
set(exec_prefix "\$\{prefix\}")
|
set(exec_prefix "\$\{prefix\}")
|
||||||
set(libdir "\$\{exec_prefix\}/lib")
|
set(libdir "\$\{exec_prefix\}/lib")
|
||||||
set(includedir "\$\{prefix\}/include")
|
set(includedir "\$\{prefix\}/include")
|
||||||
set(MUSR_VERSION "1.3.0")
|
set(MUSR_VERSION "1.4.0")
|
||||||
set(MUSR_LIBRARY_NAME "PMusr")
|
set(MUSR_LIBRARY_NAME "PMusr")
|
||||||
configure_file("PMusr.pc.in" "PMusr.pc" @ONLY)
|
configure_file("PMusr.pc.in" "PMusr.pc" @ONLY)
|
||||||
set(USERFCN_LIBRARY_NAME "PUserFcnBase")
|
set(USERFCN_LIBRARY_NAME "PUserFcnBase")
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -54,8 +54,10 @@ PFindRun::PFindRun(const PStringVector path, const PRunNameTemplateList runNameT
|
|||||||
* @param run
|
* @param run
|
||||||
*/
|
*/
|
||||||
PFindRun::PFindRun(const PStringVector path, const PRunNameTemplateList runNameTemplateList,
|
PFindRun::PFindRun(const PStringVector path, const PRunNameTemplateList runNameTemplateList,
|
||||||
const TString &instrument, const UInt_t year, const UInt_t run) :
|
const TString &instrument, const UInt_t year, const UInt_t run,
|
||||||
fPath(path), fRunNameTemplateList(runNameTemplateList), fInstrument(instrument), fYear(year), fRun(run)
|
const TString file_format) :
|
||||||
|
fPath(path), fRunNameTemplateList(runNameTemplateList), fInstrument(instrument),
|
||||||
|
fYear(year), fRun(run), fFileFormat(file_format)
|
||||||
{
|
{
|
||||||
// nothing to be done here
|
// nothing to be done here
|
||||||
}
|
}
|
||||||
@ -130,6 +132,23 @@ TString PFindRun::CreatePathName(const TString path, const TString runNameTempla
|
|||||||
*/
|
*/
|
||||||
Bool_t PFindRun::FoundPathName()
|
Bool_t PFindRun::FoundPathName()
|
||||||
{
|
{
|
||||||
|
// if file format is given, get proper extension
|
||||||
|
TString ext("");
|
||||||
|
if (fFileFormat.Length() != 0) {
|
||||||
|
if (!fFileFormat.CompareTo("MusrRoot") || !fFileFormat.CompareTo("ROOT"))
|
||||||
|
ext = ".root";
|
||||||
|
else if (!fFileFormat.CompareTo("NeXus"))
|
||||||
|
ext = ".nxs";
|
||||||
|
else if (!fFileFormat.CompareTo("PSI-BIN"))
|
||||||
|
ext = ".bin";
|
||||||
|
else if (!fFileFormat.CompareTo("PSI-MDU"))
|
||||||
|
ext = ".mdu";
|
||||||
|
else if (!fFileFormat.CompareTo("MUD"))
|
||||||
|
ext = ".mud";
|
||||||
|
else if (!fFileFormat.CompareTo("WKM"))
|
||||||
|
ext = ".wkm";
|
||||||
|
}
|
||||||
|
|
||||||
// find instrument name in path list
|
// find instrument name in path list
|
||||||
TString pathName{""};
|
TString pathName{""};
|
||||||
for (Int_t i=0; i<fPath.size(); i++) {
|
for (Int_t i=0; i<fPath.size(); i++) {
|
||||||
@ -137,6 +156,10 @@ Bool_t PFindRun::FoundPathName()
|
|||||||
for (Int_t j=0; j<fRunNameTemplateList.size(); j++) {
|
for (Int_t j=0; j<fRunNameTemplateList.size(); j++) {
|
||||||
if (fRunNameTemplateList[j].instrument == fInstrument) {
|
if (fRunNameTemplateList[j].instrument == fInstrument) {
|
||||||
pathName = CreatePathName(fPath[i], fRunNameTemplateList[j].runNameTemplate);
|
pathName = CreatePathName(fPath[i], fRunNameTemplateList[j].runNameTemplate);
|
||||||
|
if (fFileFormat.Length() != 0) {
|
||||||
|
if (!pathName.Contains(ext, TString::kIgnoreCase))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (boost::filesystem::exists(pathName.Data())) {
|
if (boost::filesystem::exists(pathName.Data())) {
|
||||||
fPathName = pathName;
|
fPathName = pathName;
|
||||||
return true;
|
return true;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -280,9 +280,6 @@ PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bo
|
|||||||
fCmdLines = *runInfo->GetMsrCommands();
|
fCmdLines = *runInfo->GetMsrCommands();
|
||||||
|
|
||||||
// init class variables
|
// init class variables
|
||||||
fFitterFcn = nullptr;
|
|
||||||
fFcnMin = nullptr;
|
|
||||||
|
|
||||||
fScanAll = true;
|
fScanAll = true;
|
||||||
fScanParameter[0] = 0;
|
fScanParameter[0] = 0;
|
||||||
fScanParameter[1] = 0;
|
fScanParameter[1] = 0;
|
||||||
@ -317,11 +314,7 @@ PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bo
|
|||||||
GetPhaseParams();
|
GetPhaseParams();
|
||||||
|
|
||||||
// create fit function object
|
// create fit function object
|
||||||
fFitterFcn = new PFitterFcn(runListCollection, fUseChi2);
|
fFitterFcn = std::make_unique<PFitterFcn>(runListCollection, fUseChi2);
|
||||||
if (!fFitterFcn) {
|
|
||||||
fIsValid = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -337,16 +330,6 @@ PFitter::~PFitter()
|
|||||||
fScanData.clear();
|
fScanData.clear();
|
||||||
|
|
||||||
fElapsedTime.clear();
|
fElapsedTime.clear();
|
||||||
|
|
||||||
if (fFcnMin) {
|
|
||||||
delete fFcnMin;
|
|
||||||
fFcnMin = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fFitterFcn) {
|
|
||||||
delete fFitterFcn;
|
|
||||||
fFitterFcn = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -1802,11 +1785,7 @@ Bool_t PFitter::ExecuteMigrad()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// keep FunctionMinimum object
|
// keep FunctionMinimum object
|
||||||
if (fFcnMin) { // fFcnMin exist hence clean up first
|
fFcnMin.reset(new ROOT::Minuit2::FunctionMinimum(min));
|
||||||
delete fFcnMin;
|
|
||||||
fFcnMin = nullptr;
|
|
||||||
}
|
|
||||||
fFcnMin = new ROOT::Minuit2::FunctionMinimum(min);
|
|
||||||
|
|
||||||
// keep user parameters
|
// keep user parameters
|
||||||
if (fFcnMin)
|
if (fFcnMin)
|
||||||
@ -1883,11 +1862,7 @@ Bool_t PFitter::ExecuteMinimize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// keep FunctionMinimum object
|
// keep FunctionMinimum object
|
||||||
if (fFcnMin) { // fFcnMin exist hence clean up first
|
fFcnMin.reset(new ROOT::Minuit2::FunctionMinimum(min));
|
||||||
delete fFcnMin;
|
|
||||||
fFcnMin = nullptr;
|
|
||||||
}
|
|
||||||
fFcnMin = new ROOT::Minuit2::FunctionMinimum(min);
|
|
||||||
|
|
||||||
// keep user parameters
|
// keep user parameters
|
||||||
if (fFcnMin)
|
if (fFcnMin)
|
||||||
@ -2435,8 +2410,8 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
|
|||||||
title += fRunInfo->GetFileName();
|
title += fRunInfo->GetFileName();
|
||||||
title += " - ";
|
title += " - ";
|
||||||
title += dt.AsSQLString();
|
title += dt.AsSQLString();
|
||||||
TCanvas *ccorr = new TCanvas("ccorr", "title", 500, 500);
|
std::unique_ptr<TCanvas> ccorr = std::make_unique<TCanvas>("ccorr", "title", 500, 500);
|
||||||
TH2D *hcorr = new TH2D("hcorr", title, cov.Nrow(), 0.0, cov.Nrow(), cov.Nrow(), 0.0, cov.Nrow());
|
std::unique_ptr<TH2D> hcorr = std::make_unique<TH2D>("hcorr", title, cov.Nrow(), 0.0, cov.Nrow(), cov.Nrow(), 0.0, cov.Nrow());
|
||||||
Double_t dval;
|
Double_t dval;
|
||||||
for (UInt_t i=0; i<cov.Nrow(); i++) {
|
for (UInt_t i=0; i<cov.Nrow(); i++) {
|
||||||
// parameter number
|
// parameter number
|
||||||
@ -2498,15 +2473,6 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
|
|||||||
ccorr->Write("ccorr", TObject::kOverwrite, sizeof(ccorr));
|
ccorr->Write("ccorr", TObject::kOverwrite, sizeof(ccorr));
|
||||||
hcorr->Write("hcorr", TObject::kOverwrite, sizeof(hcorr));
|
hcorr->Write("hcorr", TObject::kOverwrite, sizeof(hcorr));
|
||||||
ff.Close();
|
ff.Close();
|
||||||
// clean up
|
|
||||||
if (ccorr) {
|
|
||||||
delete ccorr;
|
|
||||||
ccorr = nullptr;
|
|
||||||
}
|
|
||||||
if (hcorr) {
|
|
||||||
delete hcorr;
|
|
||||||
hcorr = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
parNo.clear(); // clean up
|
parNo.clear(); // clean up
|
||||||
} else {
|
} else {
|
||||||
@ -2596,11 +2562,7 @@ Bool_t PFitter::ExecuteSimplex()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// keep FunctionMinimum object
|
// keep FunctionMinimum object
|
||||||
if (fFcnMin) { // fFcnMin exist hence clean up first
|
fFcnMin.reset(new ROOT::Minuit2::FunctionMinimum(min));
|
||||||
delete fFcnMin;
|
|
||||||
fFcnMin = nullptr;
|
|
||||||
}
|
|
||||||
fFcnMin = new ROOT::Minuit2::FunctionMinimum(min);
|
|
||||||
|
|
||||||
// keep user parameters
|
// keep user parameters
|
||||||
if (fFcnMin)
|
if (fFcnMin)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -55,7 +55,6 @@ ClassImpQ(PFourierCanvas)
|
|||||||
PFourierCanvas::PFourierCanvas()
|
PFourierCanvas::PFourierCanvas()
|
||||||
{
|
{
|
||||||
fTimeout = 0;
|
fTimeout = 0;
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
|
|
||||||
fBatchMode = false;
|
fBatchMode = false;
|
||||||
fValid = false;
|
fValid = false;
|
||||||
@ -69,18 +68,10 @@ PFourierCanvas::PFourierCanvas()
|
|||||||
fXaxisTitle = TString("");
|
fXaxisTitle = TString("");
|
||||||
|
|
||||||
fCurrentFourierPhase = 0.0;
|
fCurrentFourierPhase = 0.0;
|
||||||
fCurrentFourierPhaseText = nullptr;
|
|
||||||
|
|
||||||
fStyle = nullptr;
|
|
||||||
fImp = nullptr;
|
fImp = nullptr;
|
||||||
fBar = nullptr;
|
fBar = nullptr;
|
||||||
fPopupMain = nullptr;
|
fPopupMain = nullptr;
|
||||||
fPopupFourier = nullptr;
|
|
||||||
|
|
||||||
fMainCanvas = nullptr;
|
|
||||||
fTitlePad = nullptr;
|
|
||||||
fFourierPad = nullptr;
|
|
||||||
fInfoPad = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@ -112,12 +103,9 @@ PFourierCanvas::PFourierCanvas(std::vector<PFourier*> &fourier, PIntVector dataS
|
|||||||
fInitialXRange[1] = fourierXrange[1];
|
fInitialXRange[1] = fourierXrange[1];
|
||||||
|
|
||||||
fTimeout = 0;
|
fTimeout = 0;
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
|
|
||||||
fValid = false;
|
fValid = false;
|
||||||
|
|
||||||
fCurrentFourierPhaseText = nullptr;
|
|
||||||
|
|
||||||
// generate fMarkerList and fColorList, since they are not provided
|
// generate fMarkerList and fColorList, since they are not provided
|
||||||
TRandom rand;
|
TRandom rand;
|
||||||
Int_t style, color;
|
Int_t style, color;
|
||||||
@ -168,12 +156,9 @@ PFourierCanvas::PFourierCanvas(std::vector<PFourier*> &fourier, PIntVector dataS
|
|||||||
fInitialXRange[1] = fourierXrange[1];
|
fInitialXRange[1] = fourierXrange[1];
|
||||||
|
|
||||||
fTimeout = 0;
|
fTimeout = 0;
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
|
|
||||||
fValid = false;
|
fValid = false;
|
||||||
|
|
||||||
fCurrentFourierPhaseText = nullptr;
|
|
||||||
|
|
||||||
// generate fMarkerList and fColorList, since they are not provided
|
// generate fMarkerList and fColorList, since they are not provided
|
||||||
TRandom rand;
|
TRandom rand;
|
||||||
Int_t style, color;
|
Int_t style, color;
|
||||||
@ -196,70 +181,6 @@ PFourierCanvas::PFourierCanvas(std::vector<PFourier*> &fourier, PIntVector dataS
|
|||||||
gStyle->SetHistMinimumZero(kTRUE); // needed to enforce proper bar option handling
|
gStyle->SetHistMinimumZero(kTRUE); // needed to enforce proper bar option handling
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>Destructor
|
|
||||||
*/
|
|
||||||
PFourierCanvas::~PFourierCanvas()
|
|
||||||
{
|
|
||||||
if (fTimeoutTimer)
|
|
||||||
delete fTimeoutTimer;
|
|
||||||
|
|
||||||
if (fCurrentFourierPhaseText)
|
|
||||||
delete fCurrentFourierPhaseText;
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (fStyle) {
|
|
||||||
delete fStyle;
|
|
||||||
fStyle = 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (fTitlePad) {
|
|
||||||
fTitlePad->Clear();
|
|
||||||
delete fTitlePad;
|
|
||||||
fTitlePad = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fFourierHistos.size() > 0) {
|
|
||||||
for (UInt_t i=0; i<fFourierHistos.size(); i++) {
|
|
||||||
delete fFourierHistos[i].dataFourierRe;
|
|
||||||
delete fFourierHistos[i].dataFourierIm;
|
|
||||||
delete fFourierHistos[i].dataFourierPwr;
|
|
||||||
delete fFourierHistos[i].dataFourierPhase;
|
|
||||||
delete fFourierHistos[i].dataFourierPhaseOptReal;
|
|
||||||
}
|
|
||||||
fFourierHistos.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
CleanupAverage();
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (fFourierPad) {
|
|
||||||
fFourierPad->Clear();
|
|
||||||
delete fFourierPad;
|
|
||||||
fFourierPad = 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (fInfoPad) {
|
|
||||||
fInfoPad->Clear();
|
|
||||||
delete fInfoPad;
|
|
||||||
fInfoPad = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fLegAvgPerDataSet) {
|
|
||||||
fLegAvgPerDataSet->Clear();
|
|
||||||
delete fLegAvgPerDataSet;
|
|
||||||
fLegAvgPerDataSet = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (fMainCanvas) {
|
|
||||||
delete fMainCanvas;
|
|
||||||
fMainCanvas = nullptr;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// Done (SIGNAL)
|
// Done (SIGNAL)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -563,11 +484,7 @@ void PFourierCanvas::SetTimeout(Int_t timeout)
|
|||||||
if (fTimeout <= 0)
|
if (fTimeout <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fTimeoutTimer) {
|
fTimeoutTimer.reset(new TTimer());
|
||||||
delete fTimeoutTimer;
|
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
}
|
|
||||||
fTimeoutTimer = new TTimer();
|
|
||||||
|
|
||||||
fTimeoutTimer->Connect("Timeout()", "PFourierCanvas", this, "Done()");
|
fTimeoutTimer->Connect("Timeout()", "PFourierCanvas", this, "Done()");
|
||||||
|
|
||||||
@ -831,7 +748,7 @@ void PFourierCanvas::CreateXaxisTitle()
|
|||||||
void PFourierCanvas::CreateStyle()
|
void PFourierCanvas::CreateStyle()
|
||||||
{
|
{
|
||||||
TString musrFTStyle("musrFTStyle");
|
TString musrFTStyle("musrFTStyle");
|
||||||
fStyle = new TStyle(musrFTStyle, musrFTStyle);
|
fStyle = std::make_unique<TStyle>(musrFTStyle, musrFTStyle);
|
||||||
fStyle->SetOptStat(0); // no statistics options
|
fStyle->SetOptStat(0); // no statistics options
|
||||||
fStyle->SetOptTitle(0); // no title
|
fStyle->SetOptTitle(0); // no title
|
||||||
fStyle->cd();
|
fStyle->cd();
|
||||||
@ -990,21 +907,10 @@ void PFourierCanvas::InitFourierCanvas(const Char_t* title, Int_t wtopx, Int_t w
|
|||||||
fImp = nullptr;
|
fImp = nullptr;
|
||||||
fBar = nullptr;
|
fBar = nullptr;
|
||||||
fPopupMain = nullptr;
|
fPopupMain = nullptr;
|
||||||
fPopupFourier = nullptr;
|
|
||||||
|
|
||||||
fMainCanvas = nullptr;
|
|
||||||
fTitlePad = nullptr;
|
|
||||||
fFourierPad = nullptr;
|
|
||||||
fInfoPad = nullptr;
|
|
||||||
|
|
||||||
// invoke canvas
|
// invoke canvas
|
||||||
TString canvasName = TString("fMainCanvas");
|
TString canvasName = TString("fMainCanvas");
|
||||||
fMainCanvas = new TCanvas(canvasName.Data(), title, wtopx, wtopy, ww, wh);
|
fMainCanvas = std::make_unique<TCanvas>(canvasName.Data(), title, wtopx, wtopy, ww, wh);
|
||||||
if (fMainCanvas == nullptr) {
|
|
||||||
std::cerr << std::endl << "PFourierCanvas::PFourierCanvas: **PANIC ERROR**: Couldn't invoke " << canvasName.Data();
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// add canvas menu if not in batch mode
|
// add canvas menu if not in batch mode
|
||||||
if (!fBatchMode) {
|
if (!fBatchMode) {
|
||||||
@ -1012,9 +918,9 @@ void PFourierCanvas::InitFourierCanvas(const Char_t* title, Int_t wtopx, Int_t w
|
|||||||
fBar = fImp->GetMenuBar();
|
fBar = fImp->GetMenuBar();
|
||||||
fPopupMain = fBar->AddPopup("MusrFT");
|
fPopupMain = fBar->AddPopup("MusrFT");
|
||||||
|
|
||||||
fPopupFourier = new TGPopupMenu();
|
fPopupFourier = std::make_unique<TGPopupMenu>();
|
||||||
|
|
||||||
fPopupMain->AddPopup("&Fourier", fPopupFourier);
|
fPopupMain->AddPopup("&Fourier", fPopupFourier.get());
|
||||||
fPopupFourier->AddEntry("Show Real", P_MENU_ID_FOURIER+P_MENU_ID_FOURIER_REAL);
|
fPopupFourier->AddEntry("Show Real", P_MENU_ID_FOURIER+P_MENU_ID_FOURIER_REAL);
|
||||||
fPopupFourier->AddEntry("Show Imag", P_MENU_ID_FOURIER+P_MENU_ID_FOURIER_IMAG);
|
fPopupFourier->AddEntry("Show Imag", P_MENU_ID_FOURIER+P_MENU_ID_FOURIER_IMAG);
|
||||||
fPopupFourier->AddEntry("Show Real+Imag", P_MENU_ID_FOURIER+P_MENU_ID_FOURIER_REAL_AND_IMAG);
|
fPopupFourier->AddEntry("Show Real+Imag", P_MENU_ID_FOURIER+P_MENU_ID_FOURIER_REAL_AND_IMAG);
|
||||||
@ -1067,39 +973,25 @@ void PFourierCanvas::InitFourierCanvas(const Char_t* title, Int_t wtopx, Int_t w
|
|||||||
|
|
||||||
// divide the canvas into sub pads
|
// divide the canvas into sub pads
|
||||||
// title pad
|
// title pad
|
||||||
fTitlePad = new TPaveText(0.0, YTITLE, 1.0, 1.0, "NDC");
|
fTitlePad = std::make_unique<TPaveText>(0.0, YTITLE, 1.0, 1.0, "NDC");
|
||||||
if (fTitlePad == nullptr) {
|
|
||||||
std::cerr << std::endl << "PFourierCanvas::PFourierCanvas: **PANIC ERROR**: Couldn't invoke fTitlePad";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fTitlePad->SetFillColor(TColor::GetColor(255,255,255));
|
fTitlePad->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
fTitlePad->SetTextAlign(12); // middle, left
|
fTitlePad->SetTextAlign(12); // middle, left
|
||||||
fTitlePad->AddText(title);
|
fTitlePad->AddText(title);
|
||||||
fTitlePad->Draw();
|
fTitlePad->Draw();
|
||||||
|
|
||||||
// fourier pad
|
// fourier pad
|
||||||
fFourierPad = new TPad("fFourierPad", "fFourierPad", 0.0, YINFO, 1.0, YTITLE);
|
fFourierPad = std::make_unique<TPad>("fFourierPad", "fFourierPad", 0.0, YINFO, 1.0, YTITLE);
|
||||||
if (fFourierPad == nullptr) {
|
|
||||||
std::cerr << std::endl << "PFourierCanvas::PFourierCanvas: **PANIC ERROR**: Couldn't invoke fFourierPad";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fFourierPad->SetFillColor(TColor::GetColor(255,255,255));
|
fFourierPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
fFourierPad->Draw();
|
fFourierPad->Draw();
|
||||||
|
|
||||||
// info pad
|
// info pad
|
||||||
fInfoPad = new TLegend(0.0, 0.0, 1.0, YINFO, "NDC");
|
fInfoPad = std::make_unique<TLegend>(0.0, 0.0, 1.0, YINFO, "NDC");
|
||||||
if (fInfoPad == nullptr) {
|
|
||||||
std::cerr << std::endl << "PFourierCanvas::PFourierCanvas: **PANIC ERROR**: Couldn't invoke fInfoPad";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
|
fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
fInfoPad->SetTextAlign(12); // middle, left
|
fInfoPad->SetTextAlign(12); // middle, left
|
||||||
|
|
||||||
fLegAvgPerDataSet = nullptr;
|
|
||||||
|
|
||||||
fValid = true;
|
fValid = true;
|
||||||
|
|
||||||
if ((fFourier.size() != fDataSetTag.size()) && fAveragedViewPerDataSet) {
|
if ((fFourier.size() != fDataSetTag.size()) && fAveragedViewPerDataSet) {
|
||||||
@ -1629,12 +1521,6 @@ void PFourierCanvas::PlotFourier()
|
|||||||
*/
|
*/
|
||||||
void PFourierCanvas::PlotFourierPhaseValue()
|
void PFourierCanvas::PlotFourierPhaseValue()
|
||||||
{
|
{
|
||||||
// check if phase TLatex object is present
|
|
||||||
if (fCurrentFourierPhaseText) {
|
|
||||||
delete fCurrentFourierPhaseText;
|
|
||||||
fCurrentFourierPhaseText = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
Double_t x, y;
|
Double_t x, y;
|
||||||
TString str;
|
TString str;
|
||||||
|
|
||||||
@ -1643,7 +1529,7 @@ void PFourierCanvas::PlotFourierPhaseValue()
|
|||||||
str += fCurrentFourierPhase;
|
str += fCurrentFourierPhase;
|
||||||
x = 0.7;
|
x = 0.7;
|
||||||
y = 0.85;
|
y = 0.85;
|
||||||
fCurrentFourierPhaseText = new TLatex();
|
fCurrentFourierPhaseText.reset(new TLatex());
|
||||||
fCurrentFourierPhaseText->SetNDC(kTRUE);
|
fCurrentFourierPhaseText->SetNDC(kTRUE);
|
||||||
fCurrentFourierPhaseText->SetText(x, y, str.Data());
|
fCurrentFourierPhaseText->SetText(x, y, str.Data());
|
||||||
fCurrentFourierPhaseText->SetTextFont(62);
|
fCurrentFourierPhaseText->SetTextFont(62);
|
||||||
@ -1675,10 +1561,8 @@ void PFourierCanvas::PlotAverage()
|
|||||||
xmax = fInitialXRange[1];
|
xmax = fInitialXRange[1];
|
||||||
Double_t ymin=0.0, ymax=0.0;
|
Double_t ymin=0.0, ymax=0.0;
|
||||||
|
|
||||||
if (fLegAvgPerDataSet) {
|
if (fLegAvgPerDataSet.get()) {
|
||||||
fLegAvgPerDataSet->Clear();
|
fLegAvgPerDataSet->Clear();
|
||||||
delete fLegAvgPerDataSet;
|
|
||||||
fLegAvgPerDataSet = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (fCurrentPlotView) {
|
switch (fCurrentPlotView) {
|
||||||
@ -1799,7 +1683,7 @@ void PFourierCanvas::PlotAverage()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fAveragedViewPerDataSet) { // plot all the rest
|
if (fAveragedViewPerDataSet) { // plot all the rest
|
||||||
fLegAvgPerDataSet = new TLegend(0.55, 0.4, 0.85, 0.6);
|
fLegAvgPerDataSet = std::make_unique<TLegend>(0.55, 0.4, 0.85, 0.6);
|
||||||
TString str = GetDataSetName(fFourierAverage[0].dataFourierPwr->GetTitle());
|
TString str = GetDataSetName(fFourierAverage[0].dataFourierPwr->GetTitle());
|
||||||
TString label = TString::Format("<%s>", str.Data());
|
TString label = TString::Format("<%s>", str.Data());
|
||||||
fLegAvgPerDataSet->AddEntry(fFourierAverage[0].dataFourierPwr, label.Data());
|
fLegAvgPerDataSet->AddEntry(fFourierAverage[0].dataFourierPwr, label.Data());
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -655,7 +655,9 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i)
|
|||||||
assert(i->children.size() == 2);
|
assert(i->children.size() == 2);
|
||||||
EvalTreeForStringExpression(i->children.begin());
|
EvalTreeForStringExpression(i->children.begin());
|
||||||
fFuncString += " / ";
|
fFuncString += " / ";
|
||||||
|
fFuncString += "(";
|
||||||
EvalTreeForStringExpression(i->children.begin()+1);
|
EvalTreeForStringExpression(i->children.begin()+1);
|
||||||
|
fFuncString += ")";
|
||||||
} else {
|
} else {
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Bastian M. Wojek / Andreas Suter *
|
* Copyright (C) 2009-2024 by Bastian M. Wojek / Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -38,6 +38,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/algorithm/string/trim.hpp> // for stripping leading whitespace in std::string
|
#include <boost/algorithm/string/trim.hpp> // for stripping leading whitespace in std::string
|
||||||
#include <boost/algorithm/string/case_conv.hpp> // for to_lower() in std::string
|
#include <boost/algorithm/string/case_conv.hpp> // for to_lower() in std::string
|
||||||
@ -58,7 +59,6 @@ PMsr2Data::PMsr2Data(const std::string &ext) : fFileExtension(ext), fRunListFile
|
|||||||
{
|
{
|
||||||
fRunVector.clear();
|
fRunVector.clear();
|
||||||
fRunVectorIter = fRunVector.end();
|
fRunVectorIter = fRunVector.end();
|
||||||
fRunListFileStream = nullptr;
|
|
||||||
fSaxParser = nullptr;
|
fSaxParser = nullptr;
|
||||||
fStartupHandler = nullptr;
|
fStartupHandler = nullptr;
|
||||||
fDataHandler = nullptr;
|
fDataHandler = nullptr;
|
||||||
@ -74,28 +74,6 @@ PMsr2Data::~PMsr2Data()
|
|||||||
fRunVector.clear();
|
fRunVector.clear();
|
||||||
fRunVectorIter = fRunVector.end();
|
fRunVectorIter = fRunVector.end();
|
||||||
fIndVar.clear();
|
fIndVar.clear();
|
||||||
|
|
||||||
if (fRunListFileStream) {
|
|
||||||
fRunListFileStream->close();
|
|
||||||
delete fRunListFileStream;
|
|
||||||
fRunListFileStream = nullptr;
|
|
||||||
}
|
|
||||||
if (fSaxParser) {
|
|
||||||
delete fSaxParser;
|
|
||||||
fSaxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (fStartupHandler) {
|
|
||||||
delete fStartupHandler;
|
|
||||||
fStartupHandler = nullptr;
|
|
||||||
}
|
|
||||||
if (fDataHandler) {
|
|
||||||
delete fDataHandler;
|
|
||||||
fDataHandler = nullptr;
|
|
||||||
}
|
|
||||||
if (fMsrHandler) {
|
|
||||||
delete fMsrHandler;
|
|
||||||
fMsrHandler = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------
|
//-------------------------------------------------------------
|
||||||
@ -118,19 +96,17 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
|||||||
{
|
{
|
||||||
std::ostringstream strInfile;
|
std::ostringstream strInfile;
|
||||||
strInfile << runNo << fFileExtension << ".msr";
|
strInfile << runNo << fFileExtension << ".msr";
|
||||||
std::ifstream *in = new std::ifstream(strInfile.str().c_str());
|
std::unique_ptr<std::ifstream> in = std::make_unique<std::ifstream>(strInfile.str().c_str());
|
||||||
if (!in->is_open()) {
|
if (!in->is_open()) {
|
||||||
delete in;
|
|
||||||
if (!normalMode && (runNo == *fRunVectorIter)) {
|
if (!normalMode && (runNo == *fRunVectorIter)) {
|
||||||
std::string fileNameCopy(strInfile.str());
|
std::string fileNameCopy(strInfile.str());
|
||||||
strInfile.clear();
|
strInfile.clear();
|
||||||
strInfile.str("");
|
strInfile.str("");
|
||||||
strInfile << runNo << "+global" << fFileExtension << ".msr";
|
strInfile << runNo << "+global" << fFileExtension << ".msr";
|
||||||
in = new std::ifstream(strInfile.str().c_str());
|
in.reset(new std::ifstream(strInfile.str().c_str()));
|
||||||
if (!in->is_open()) {
|
if (!in->is_open()) {
|
||||||
std::cerr << std::endl << ">> msr2data: **ERROR** Neither the file " << fileNameCopy << " nor the file " << strInfile.str() << " can be opened! Please check!";
|
std::cerr << std::endl << ">> msr2data: **ERROR** Neither the file " << fileNameCopy << " nor the file " << strInfile.str() << " can be opened! Please check!";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
delete in;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else if (runNo == *fRunVectorIter) { // the first run of the runlist was given - if it did not exist, try the rest of the runlist
|
} else if (runNo == *fRunVectorIter) { // the first run of the runlist was given - if it did not exist, try the rest of the runlist
|
||||||
@ -176,8 +152,6 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
in->close();
|
in->close();
|
||||||
delete in;
|
|
||||||
in = nullptr;
|
|
||||||
fRunVectorIter = fRunVector.begin(); // set back the runlist-iterator which might have changed during the search for the correct file
|
fRunVectorIter = fRunVector.begin(); // set back the runlist-iterator which might have changed during the search for the correct file
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
@ -187,8 +161,6 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
|||||||
std::cerr << std::endl << ">> msr2data: **ERROR** this is either some template or the first existing file from the run list.";
|
std::cerr << std::endl << ">> msr2data: **ERROR** this is either some template or the first existing file from the run list.";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
in->close();
|
in->close();
|
||||||
delete in;
|
|
||||||
in = nullptr;
|
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,8 +170,7 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo, bool normalMode) con
|
|||||||
std::cerr << std::endl << ">> msr2data: **ERROR** Obviously it contains no RUN block...";
|
std::cerr << std::endl << ">> msr2data: **ERROR** Obviously it contains no RUN block...";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
in->close();
|
in->close();
|
||||||
delete in;
|
|
||||||
in = nullptr;
|
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,7 +358,8 @@ int PMsr2Data::SetRunNumbers(const std::string &runListFile)
|
|||||||
in.close();
|
in.close();
|
||||||
fRunVectorIter = fRunVector.begin();
|
fRunVectorIter = fRunVector.begin();
|
||||||
fRunListFile = true;
|
fRunListFile = true;
|
||||||
fRunListFileStream = new std::ifstream(runListFile.c_str());
|
fRunListFileStream = std::make_unique<std::ifstream>(runListFile.c_str());
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,26 +374,17 @@ int PMsr2Data::SetRunNumbers(const std::string &runListFile)
|
|||||||
int PMsr2Data::ParseXmlStartupFile()
|
int PMsr2Data::ParseXmlStartupFile()
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
fSaxParser = new TSAXParser();
|
fSaxParser = std::make_unique<TSAXParser>();
|
||||||
fStartupHandler = new PStartupHandler();
|
fStartupHandler = std::make_unique<PStartupHandler>();
|
||||||
std::string startup_path_name(fStartupHandler->GetStartupFilePath().Data());
|
std::string startup_path_name(fStartupHandler->GetStartupFilePath().Data());
|
||||||
fSaxParser->ConnectToHandler("PStartupHandler", fStartupHandler);
|
fSaxParser->ConnectToHandler("PStartupHandler", fStartupHandler.get());
|
||||||
//status = fSaxParser->ParseFile(startup_path_name.c_str());
|
//status = fSaxParser->ParseFile(startup_path_name.c_str());
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
||||||
status = parseXmlFile(fSaxParser, startup_path_name.c_str());
|
status = parseXmlFile(fSaxParser.get(), startup_path_name.c_str());
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
std::cerr << std::endl << ">> msr2data: **WARNING** Reading/parsing musrfit_startup.xml failed." << std::endl;
|
std::cerr << std::endl << ">> msr2data: **WARNING** Reading/parsing musrfit_startup.xml failed." << std::endl;
|
||||||
// clean up
|
|
||||||
if (fSaxParser) {
|
|
||||||
delete fSaxParser;
|
|
||||||
fSaxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (fStartupHandler) {
|
|
||||||
delete fStartupHandler;
|
|
||||||
fStartupHandler = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -439,7 +402,7 @@ int PMsr2Data::ParseXmlStartupFile()
|
|||||||
int PMsr2Data::ReadMsrFile(const std::string &infile) const
|
int PMsr2Data::ReadMsrFile(const std::string &infile) const
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
fMsrHandler = new PMsrHandler(infile.c_str());
|
fMsrHandler = std::make_unique<PMsrHandler>(infile.c_str());
|
||||||
status = fMsrHandler->ReadMsrFile();
|
status = fMsrHandler->ReadMsrFile();
|
||||||
if (status != PMUSR_SUCCESS) {
|
if (status != PMUSR_SUCCESS) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
@ -487,6 +450,7 @@ PMsrHandler* PMsr2Data::GetSingleRunMsrFile() const
|
|||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return singleRunMsrFile;
|
return singleRunMsrFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,19 +465,18 @@ PMsrHandler* PMsr2Data::GetSingleRunMsrFile() const
|
|||||||
int PMsr2Data::ReadRunDataFile()
|
int PMsr2Data::ReadRunDataFile()
|
||||||
{
|
{
|
||||||
if (fStartupHandler)
|
if (fStartupHandler)
|
||||||
fDataHandler = new PRunDataHandler(fMsrHandler, fStartupHandler->GetDataPathList());
|
fDataHandler = std::make_unique<PRunDataHandler>(fMsrHandler.get(), fStartupHandler->GetDataPathList());
|
||||||
else
|
else
|
||||||
fDataHandler = new PRunDataHandler(fMsrHandler);
|
fDataHandler = std::make_unique<PRunDataHandler>(fMsrHandler.get());
|
||||||
|
|
||||||
fDataHandler->ReadData();
|
fDataHandler->ReadData();
|
||||||
|
|
||||||
bool success = fDataHandler->IsAllDataAvailable();
|
bool success = fDataHandler->IsAllDataAvailable();
|
||||||
if (!success) {
|
if (!success) {
|
||||||
std::cerr << std::endl << ">> msr2data: **WARNING** Could not read all data files, will continue without the data file information..." << std::endl;
|
std::cerr << std::endl << ">> msr2data: **WARNING** Could not read all data files, will continue without the data file information..." << std::endl;
|
||||||
delete fDataHandler;
|
|
||||||
fDataHandler = nullptr;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1339,8 +1302,11 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
|||||||
|
|
||||||
if (newRunNumber.str().compare(tempRunNumber.str())) { // first run number does not match the template run number
|
if (newRunNumber.str().compare(tempRunNumber.str())) { // first run number does not match the template run number
|
||||||
// in global+ mode, read in the single run msr-file of the corresponding run
|
// in global+ mode, read in the single run msr-file of the corresponding run
|
||||||
if (globalPlus)
|
if (globalPlus) {
|
||||||
singleRunMsrFile = GetSingleRunMsrFile();
|
singleRunMsrFile = GetSingleRunMsrFile();
|
||||||
|
if (singleRunMsrFile == nullptr)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// substitute the template run-numbers in the parameter names
|
// substitute the template run-numbers in the parameter names
|
||||||
for (unsigned int l(fNumGlobalParam); l < msrParamList->size(); ++l) {
|
for (unsigned int l(fNumGlobalParam); l < msrParamList->size(); ++l) {
|
||||||
@ -1417,8 +1383,11 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
|||||||
newRunNumber << *fRunVectorIter;
|
newRunNumber << *fRunVectorIter;
|
||||||
|
|
||||||
// in global+ mode, read in the single run msr-file
|
// in global+ mode, read in the single run msr-file
|
||||||
if (globalPlus)
|
if (globalPlus) {
|
||||||
singleRunMsrFile = GetSingleRunMsrFile();
|
singleRunMsrFile = GetSingleRunMsrFile();
|
||||||
|
if (singleRunMsrFile == nullptr)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// add parameters for each run
|
// add parameters for each run
|
||||||
for (unsigned int l(0); l < fNumSpecParam; ++l) {
|
for (unsigned int l(0); l < fNumSpecParam; ++l) {
|
||||||
@ -1945,14 +1914,6 @@ int PMsr2Data::WriteOutput(const std::string &outfile, const std::vector<unsigne
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
fRunVectorIter++;
|
fRunVectorIter++;
|
||||||
|
|
||||||
delete fMsrHandler;
|
|
||||||
fMsrHandler = nullptr;
|
|
||||||
|
|
||||||
if (fDataHandler) {
|
|
||||||
delete fDataHandler;
|
|
||||||
fDataHandler = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// clean up some vectors
|
// clean up some vectors
|
||||||
dataParamNames.clear();
|
dataParamNames.clear();
|
||||||
dataParamLabels.clear();
|
dataParamLabels.clear();
|
||||||
@ -2454,13 +2415,7 @@ int PMsr2Data::WriteOutput(const std::string &outfile, const std::vector<unsigne
|
|||||||
outFile.close();
|
outFile.close();
|
||||||
|
|
||||||
if (!global || (fRunVectorIter == fRunVector.end())) {
|
if (!global || (fRunVectorIter == fRunVector.end())) {
|
||||||
delete fMsrHandler;
|
fDataHandler.reset();
|
||||||
fMsrHandler = nullptr;
|
|
||||||
|
|
||||||
if (fDataHandler) {
|
|
||||||
delete fDataHandler;
|
|
||||||
fDataHandler = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
msrParamList = nullptr;
|
msrParamList = nullptr;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -66,8 +66,6 @@ PMsrHandler::PMsrHandler(const Char_t *fileName, PStartupOptions *startupOptions
|
|||||||
fStatistic.fMinExpectedPerHisto.clear();
|
fStatistic.fMinExpectedPerHisto.clear();
|
||||||
fStatistic.fNdfPerHisto.clear();
|
fStatistic.fNdfPerHisto.clear();
|
||||||
|
|
||||||
fFuncHandler = nullptr;
|
|
||||||
|
|
||||||
// check if the file name given is a path-file-name, and if yes, split it into path and file name.
|
// check if the file name given is a path-file-name, and if yes, split it into path and file name.
|
||||||
if (fFileName.Contains("/")) {
|
if (fFileName.Contains("/")) {
|
||||||
Int_t idx = -1;
|
Int_t idx = -1;
|
||||||
@ -99,11 +97,6 @@ PMsrHandler::~PMsrHandler()
|
|||||||
fStatistic.fMinExpectedPerHisto.clear();
|
fStatistic.fMinExpectedPerHisto.clear();
|
||||||
fStatistic.fNdfPerHisto.clear();
|
fStatistic.fNdfPerHisto.clear();
|
||||||
fParamInUse.clear();
|
fParamInUse.clear();
|
||||||
|
|
||||||
if (fFuncHandler) {
|
|
||||||
delete fFuncHandler;
|
|
||||||
fFuncHandler = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -2697,10 +2690,6 @@ Int_t PMsrHandler::ParameterInUse(UInt_t paramNo)
|
|||||||
*/
|
*/
|
||||||
Bool_t PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
|
Bool_t PMsrHandler::HandleFitParameterEntry(PMsrLines &lines)
|
||||||
{
|
{
|
||||||
// If msr-file is used for musrFT only, nothing needs to be done here.
|
|
||||||
if (fFourierOnly)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
PMsrParamStructure param;
|
PMsrParamStructure param;
|
||||||
Bool_t error = false;
|
Bool_t error = false;
|
||||||
|
|
||||||
@ -2945,11 +2934,7 @@ Bool_t PMsrHandler::HandleFunctionsEntry(PMsrLines &lines)
|
|||||||
fFunctions = lines;
|
fFunctions = lines;
|
||||||
|
|
||||||
// create function handler
|
// create function handler
|
||||||
fFuncHandler = new PFunctionHandler(fFunctions);
|
fFuncHandler = std::make_unique<PFunctionHandler>(fFunctions);
|
||||||
if (fFuncHandler == nullptr) {
|
|
||||||
std::cerr << std::endl << ">> PMsrHandler::HandleFunctionsEntry: **ERROR** Couldn't invoke PFunctionHandler." << std::endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// do the parsing
|
// do the parsing
|
||||||
if (!fFuncHandler->DoParse()) {
|
if (!fFuncHandler->DoParse()) {
|
||||||
@ -3549,7 +3534,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
} else {
|
} else {
|
||||||
PUIntVector group;
|
PUIntVector group;
|
||||||
str = iter->fLine;
|
str = iter->fLine;
|
||||||
PStringNumberList *rl = new PStringNumberList(str.Data());
|
std::unique_ptr<PStringNumberList> rl = std::make_unique<PStringNumberList>(str.Data());
|
||||||
std::string errorMsg("");
|
std::string errorMsg("");
|
||||||
if (rl->Parse(errorMsg, true)) {
|
if (rl->Parse(errorMsg, true)) {
|
||||||
group = rl->GetList();
|
group = rl->GetList();
|
||||||
@ -3559,7 +3544,6 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
} else {
|
} else {
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
delete rl;
|
|
||||||
group.clear();
|
group.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3574,7 +3558,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
} else {
|
} else {
|
||||||
PUIntVector group;
|
PUIntVector group;
|
||||||
str = iter->fLine;
|
str = iter->fLine;
|
||||||
PStringNumberList *rl = new PStringNumberList(str.Data());
|
std::unique_ptr<PStringNumberList> rl = std::make_unique<PStringNumberList>(str.Data());
|
||||||
std::string errorMsg("");
|
std::string errorMsg("");
|
||||||
if (rl->Parse(errorMsg, true)) {
|
if (rl->Parse(errorMsg, true)) {
|
||||||
group = rl->GetList();
|
group = rl->GetList();
|
||||||
@ -3584,7 +3568,6 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
|
|||||||
} else {
|
} else {
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
delete rl;
|
|
||||||
group.clear();
|
group.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4638,7 +4621,7 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
param.fLifeTimeCorrection = true;
|
param.fLifeTimeCorrection = true;
|
||||||
} else if (line.Contains("runs", TString::kIgnoreCase)) { // handle plot runs
|
} else if (line.Contains("runs", TString::kIgnoreCase)) { // handle plot runs
|
||||||
TComplex run;
|
TComplex run;
|
||||||
PStringNumberList *rl;
|
std::unique_ptr<PStringNumberList> rl;
|
||||||
std::string errorMsg;
|
std::string errorMsg;
|
||||||
PUIntVector runList;
|
PUIntVector runList;
|
||||||
switch (param.fPlotType) {
|
switch (param.fPlotType) {
|
||||||
@ -4652,7 +4635,7 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
case MSR_PLOT_ASYM_RRF:
|
case MSR_PLOT_ASYM_RRF:
|
||||||
case MSR_PLOT_NON_MUSR:
|
case MSR_PLOT_NON_MUSR:
|
||||||
case MSR_PLOT_MU_MINUS:
|
case MSR_PLOT_MU_MINUS:
|
||||||
rl = new PStringNumberList(line.Data());
|
rl = std::make_unique<PStringNumberList>(line.Data());
|
||||||
if (!rl->Parse(errorMsg, true)) {
|
if (!rl->Parse(errorMsg, true)) {
|
||||||
std::cerr << std::endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
std::cerr << std::endl << ">> PMsrHandler::HandlePlotEntry: **SEVERE ERROR** Couldn't tokenize PLOT in line " << iter1->fLineNo;
|
||||||
std::cerr << std::endl << ">> Error Message: " << errorMsg;
|
std::cerr << std::endl << ">> Error Message: " << errorMsg;
|
||||||
@ -4666,7 +4649,6 @@ Bool_t PMsrHandler::HandlePlotEntry(PMsrLines &lines)
|
|||||||
}
|
}
|
||||||
// clean up
|
// clean up
|
||||||
runList.clear();
|
runList.clear();
|
||||||
delete rl;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error = true;
|
error = true;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -119,7 +119,6 @@ ClassImpQ(PMusrCanvas)
|
|||||||
PMusrCanvas::PMusrCanvas()
|
PMusrCanvas::PMusrCanvas()
|
||||||
{
|
{
|
||||||
fTimeout = 0;
|
fTimeout = 0;
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
|
|
||||||
fScaleN0AndBkg = true;
|
fScaleN0AndBkg = true;
|
||||||
fValid = false;
|
fValid = false;
|
||||||
@ -134,16 +133,6 @@ PMusrCanvas::PMusrCanvas()
|
|||||||
fImp = nullptr;
|
fImp = nullptr;
|
||||||
fBar = nullptr;
|
fBar = nullptr;
|
||||||
fPopupMain = nullptr;
|
fPopupMain = nullptr;
|
||||||
fPopupFourier = nullptr;
|
|
||||||
|
|
||||||
fStyle = nullptr;
|
|
||||||
fMainCanvas = nullptr;
|
|
||||||
fTitlePad = nullptr;
|
|
||||||
fDataTheoryPad = nullptr;
|
|
||||||
fParameterPad = nullptr;
|
|
||||||
fTheoryPad = nullptr;
|
|
||||||
fInfoPad = nullptr;
|
|
||||||
fMultiGraphLegend = nullptr;
|
|
||||||
|
|
||||||
fHistoFrame = nullptr;
|
fHistoFrame = nullptr;
|
||||||
|
|
||||||
@ -153,11 +142,6 @@ PMusrCanvas::PMusrCanvas()
|
|||||||
InitFourier();
|
InitFourier();
|
||||||
InitAverage();
|
InitAverage();
|
||||||
|
|
||||||
fCurrentFourierPhaseText = nullptr;
|
|
||||||
|
|
||||||
fRRFText = nullptr;
|
|
||||||
fRRFLatexText = nullptr;
|
|
||||||
|
|
||||||
fXRangePresent = false;
|
fXRangePresent = false;
|
||||||
fYRangePresent = false;
|
fYRangePresent = false;
|
||||||
fXmin = 0.0;
|
fXmin = 0.0;
|
||||||
@ -193,7 +177,6 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
|||||||
fBatchMode(batch), fPlotNumber(number)
|
fBatchMode(batch), fPlotNumber(number)
|
||||||
{
|
{
|
||||||
fTimeout = 0;
|
fTimeout = 0;
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
fAveragedView = false;
|
fAveragedView = false;
|
||||||
|
|
||||||
fMultiGraphData = nullptr;
|
fMultiGraphData = nullptr;
|
||||||
@ -206,11 +189,6 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
|||||||
CreateStyle();
|
CreateStyle();
|
||||||
InitMusrCanvas(title, wtopx, wtopy, ww, wh);
|
InitMusrCanvas(title, wtopx, wtopy, ww, wh);
|
||||||
|
|
||||||
fCurrentFourierPhaseText = nullptr;
|
|
||||||
|
|
||||||
fRRFText = nullptr;
|
|
||||||
fRRFLatexText = nullptr;
|
|
||||||
|
|
||||||
fXRangePresent = false;
|
fXRangePresent = false;
|
||||||
fYRangePresent = false;
|
fYRangePresent = false;
|
||||||
fXmin = 0.0;
|
fXmin = 0.0;
|
||||||
@ -252,7 +230,6 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
|||||||
fMarkerList(markerList), fColorList(colorList)
|
fMarkerList(markerList), fColorList(colorList)
|
||||||
{
|
{
|
||||||
fTimeout = 0;
|
fTimeout = 0;
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
|
|
||||||
fMultiGraphData = nullptr;
|
fMultiGraphData = nullptr;
|
||||||
fMultiGraphDiff = nullptr;
|
fMultiGraphDiff = nullptr;
|
||||||
@ -263,11 +240,6 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
|||||||
CreateStyle();
|
CreateStyle();
|
||||||
InitMusrCanvas(title, wtopx, wtopy, ww, wh);
|
InitMusrCanvas(title, wtopx, wtopy, ww, wh);
|
||||||
|
|
||||||
fCurrentFourierPhaseText = nullptr;
|
|
||||||
|
|
||||||
fRRFText = nullptr;
|
|
||||||
fRRFLatexText = nullptr;
|
|
||||||
|
|
||||||
fXRangePresent = false;
|
fXRangePresent = false;
|
||||||
fYRangePresent = false;
|
fYRangePresent = false;
|
||||||
fXmin = 0.0;
|
fXmin = 0.0;
|
||||||
@ -287,31 +259,6 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
|||||||
PMusrCanvas::~PMusrCanvas()
|
PMusrCanvas::~PMusrCanvas()
|
||||||
{
|
{
|
||||||
// cleanup
|
// cleanup
|
||||||
if (fTimeoutTimer) {
|
|
||||||
delete fTimeoutTimer;
|
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
}
|
|
||||||
if (fCurrentFourierPhaseText) {
|
|
||||||
delete fCurrentFourierPhaseText;
|
|
||||||
fCurrentFourierPhaseText = nullptr;
|
|
||||||
}
|
|
||||||
if (fRRFLatexText) {
|
|
||||||
delete fRRFLatexText;
|
|
||||||
fRRFLatexText = nullptr;
|
|
||||||
}
|
|
||||||
if (fRRFText) {
|
|
||||||
delete fRRFText;
|
|
||||||
fRRFText = nullptr;
|
|
||||||
}
|
|
||||||
if (fStyle) {
|
|
||||||
delete fStyle;
|
|
||||||
fStyle = nullptr;
|
|
||||||
}
|
|
||||||
if (fTitlePad) {
|
|
||||||
fTitlePad->Clear();
|
|
||||||
delete fTitlePad;
|
|
||||||
fTitlePad = nullptr;
|
|
||||||
}
|
|
||||||
if (fData.size() > 0) {
|
if (fData.size() > 0) {
|
||||||
for (UInt_t i=0; i<fData.size(); i++)
|
for (UInt_t i=0; i<fData.size(); i++)
|
||||||
CleanupDataSet(fData[i]);
|
CleanupDataSet(fData[i]);
|
||||||
@ -322,11 +269,6 @@ PMusrCanvas::~PMusrCanvas()
|
|||||||
CleanupDataSet(fNonMusrData[i]);
|
CleanupDataSet(fNonMusrData[i]);
|
||||||
fNonMusrData.clear();
|
fNonMusrData.clear();
|
||||||
}
|
}
|
||||||
if (fMultiGraphLegend) {
|
|
||||||
fMultiGraphLegend->Clear();
|
|
||||||
delete fMultiGraphLegend;
|
|
||||||
fMultiGraphLegend = nullptr;
|
|
||||||
}
|
|
||||||
if (fMultiGraphData) {
|
if (fMultiGraphData) {
|
||||||
delete fMultiGraphData;
|
delete fMultiGraphData;
|
||||||
fMultiGraphData = nullptr;
|
fMultiGraphData = nullptr;
|
||||||
@ -335,29 +277,6 @@ PMusrCanvas::~PMusrCanvas()
|
|||||||
delete fMultiGraphDiff;
|
delete fMultiGraphDiff;
|
||||||
fMultiGraphDiff = nullptr;
|
fMultiGraphDiff = nullptr;
|
||||||
}
|
}
|
||||||
if (fDataTheoryPad) {
|
|
||||||
delete fDataTheoryPad;
|
|
||||||
fDataTheoryPad = nullptr;
|
|
||||||
}
|
|
||||||
if (fParameterPad) {
|
|
||||||
fParameterPad->Clear();
|
|
||||||
delete fParameterPad;
|
|
||||||
fParameterPad = nullptr;
|
|
||||||
}
|
|
||||||
if (fTheoryPad) {
|
|
||||||
fTheoryPad->Clear();
|
|
||||||
delete fTheoryPad;
|
|
||||||
fTheoryPad = nullptr;
|
|
||||||
}
|
|
||||||
if (fInfoPad) {
|
|
||||||
fInfoPad->Clear();
|
|
||||||
delete fInfoPad;
|
|
||||||
fInfoPad = nullptr;
|
|
||||||
}
|
|
||||||
if (fMainCanvas) {
|
|
||||||
delete fMainCanvas;
|
|
||||||
fMainCanvas = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -409,7 +328,7 @@ void PMusrCanvas::SetMsrHandler(PMsrHandler *msrHandler)
|
|||||||
(fMsrHandler->GetMsrPlotList()->at(0).fRRFFreq != 0.0)) ||
|
(fMsrHandler->GetMsrPlotList()->at(0).fRRFFreq != 0.0)) ||
|
||||||
(fMsrHandler->GetMsrGlobal()->GetRRFPacking() > 0 &&
|
(fMsrHandler->GetMsrGlobal()->GetRRFPacking() > 0 &&
|
||||||
fMsrHandler->GetMsrGlobal()->GetRRFUnit().CompareTo("??"))) {
|
fMsrHandler->GetMsrGlobal()->GetRRFUnit().CompareTo("??"))) {
|
||||||
fRRFLatexText = new TLatex();
|
fRRFLatexText = std::make_unique<TLatex>();
|
||||||
fRRFLatexText->SetNDC(kTRUE);
|
fRRFLatexText->SetNDC(kTRUE);
|
||||||
fRRFLatexText->SetTextFont(62);
|
fRRFLatexText->SetTextFont(62);
|
||||||
fRRFLatexText->SetTextSize(0.03);
|
fRRFLatexText->SetTextSize(0.03);
|
||||||
@ -417,7 +336,7 @@ void PMusrCanvas::SetMsrHandler(PMsrHandler *msrHandler)
|
|||||||
Int_t rrfUnitTag = -1;
|
Int_t rrfUnitTag = -1;
|
||||||
Double_t rrfFreq = 0.0;
|
Double_t rrfFreq = 0.0;
|
||||||
if (fMsrHandler->GetMsrPlotList()->at(0).fRRFPacking > 0) { // RRF single histo PLOT
|
if (fMsrHandler->GetMsrPlotList()->at(0).fRRFPacking > 0) { // RRF single histo PLOT
|
||||||
fRRFText = new TString("RRF: ");
|
fRRFText = std::make_unique<TString>("RRF: ");
|
||||||
rrfUnitTag = fMsrHandler->GetMsrPlotList()->at(0).fRRFUnit;
|
rrfUnitTag = fMsrHandler->GetMsrPlotList()->at(0).fRRFUnit;
|
||||||
rrfFreq = fMsrHandler->GetMsrPlotList()->at(0).fRRFFreq;
|
rrfFreq = fMsrHandler->GetMsrPlotList()->at(0).fRRFFreq;
|
||||||
TString rrfFreqStr("");
|
TString rrfFreqStr("");
|
||||||
@ -446,7 +365,7 @@ void PMusrCanvas::SetMsrHandler(PMsrHandler *msrHandler)
|
|||||||
*fRRFText += TString(", RRF packing = ");
|
*fRRFText += TString(", RRF packing = ");
|
||||||
*fRRFText += fMsrHandler->GetMsrPlotList()->at(0).fRRFPacking;
|
*fRRFText += fMsrHandler->GetMsrPlotList()->at(0).fRRFPacking;
|
||||||
} else { // RRF single histo FIT
|
} else { // RRF single histo FIT
|
||||||
fRRFText = new TString("RRF: ");
|
fRRFText = std::make_unique<TString>("RRF: ");
|
||||||
rrfUnitTag = fMsrHandler->GetMsrGlobal()->GetRRFUnitTag();
|
rrfUnitTag = fMsrHandler->GetMsrGlobal()->GetRRFUnitTag();
|
||||||
rrfFreq = fMsrHandler->GetMsrGlobal()->GetRRFFreq(fMsrHandler->GetMsrGlobal()->GetRRFUnit().Data());
|
rrfFreq = fMsrHandler->GetMsrGlobal()->GetRRFFreq(fMsrHandler->GetMsrGlobal()->GetRRFUnit().Data());
|
||||||
TString rrfFreqStr("");
|
TString rrfFreqStr("");
|
||||||
@ -493,11 +412,7 @@ void PMusrCanvas::SetTimeout(Int_t timeout)
|
|||||||
if (fTimeout <= 0)
|
if (fTimeout <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fTimeoutTimer) {
|
fTimeoutTimer.reset(new TTimer());
|
||||||
delete fTimeoutTimer;
|
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
}
|
|
||||||
fTimeoutTimer = new TTimer();
|
|
||||||
|
|
||||||
fTimeoutTimer->Connect("Timeout()", "PMusrCanvas", this, "Done()");
|
fTimeoutTimer->Connect("Timeout()", "PMusrCanvas", this, "Done()");
|
||||||
|
|
||||||
@ -1542,7 +1457,7 @@ void PMusrCanvas::LastCanvasClosed()
|
|||||||
void PMusrCanvas::WindowClosed()
|
void PMusrCanvas::WindowClosed()
|
||||||
{
|
{
|
||||||
// std::cerr << ">> fMainCanvas->GetName()=" << fMainCanvas->GetName() << std::endl;
|
// std::cerr << ">> fMainCanvas->GetName()=" << fMainCanvas->GetName() << std::endl;
|
||||||
gROOT->GetListOfCanvases()->Remove(fMainCanvas);
|
gROOT->GetListOfCanvases()->Remove(fMainCanvas.get());
|
||||||
LastCanvasClosed();
|
LastCanvasClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2323,7 +2238,7 @@ void PMusrCanvas::CreateStyle()
|
|||||||
{
|
{
|
||||||
TString musrStyle("musrStyle");
|
TString musrStyle("musrStyle");
|
||||||
musrStyle += fPlotNumber;
|
musrStyle += fPlotNumber;
|
||||||
fStyle = new TStyle(musrStyle, musrStyle);
|
fStyle = std::make_unique<TStyle>(musrStyle, musrStyle);
|
||||||
fStyle->SetOptStat(0); // no statistics options
|
fStyle->SetOptStat(0); // no statistics options
|
||||||
fStyle->SetOptTitle(0); // no title
|
fStyle->SetOptTitle(0); // no title
|
||||||
fStyle->cd();
|
fStyle->cd();
|
||||||
@ -2407,25 +2322,11 @@ void PMusrCanvas::InitMusrCanvas(const Char_t* title, Int_t wtopx, Int_t wtopy,
|
|||||||
fImp = nullptr;
|
fImp = nullptr;
|
||||||
fBar = nullptr;
|
fBar = nullptr;
|
||||||
fPopupMain = nullptr;
|
fPopupMain = nullptr;
|
||||||
fPopupFourier = nullptr;
|
|
||||||
|
|
||||||
fMainCanvas = nullptr;
|
|
||||||
fTitlePad = nullptr;
|
|
||||||
fDataTheoryPad = nullptr;
|
|
||||||
fParameterPad = nullptr;
|
|
||||||
fTheoryPad = nullptr;
|
|
||||||
fInfoPad = nullptr;
|
|
||||||
fMultiGraphLegend = nullptr;
|
|
||||||
|
|
||||||
// invoke canvas
|
// invoke canvas
|
||||||
TString canvasName = TString("fMainCanvas");
|
TString canvasName = TString("fMainCanvas");
|
||||||
canvasName += fPlotNumber;
|
canvasName += fPlotNumber;
|
||||||
fMainCanvas = new TCanvas(canvasName.Data(), title, wtopx, wtopy, ww, wh);
|
fMainCanvas = std::make_unique<TCanvas>(canvasName.Data(), title, wtopx, wtopy, ww, wh);
|
||||||
if (fMainCanvas == nullptr) {
|
|
||||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke " << canvasName.Data();
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
fMainCanvas->Connect("Closed()", "PMusrCanvas", this, "LastCanvasClosed()");
|
fMainCanvas->Connect("Closed()", "PMusrCanvas", this, "LastCanvasClosed()");
|
||||||
|
|
||||||
@ -2436,11 +2337,11 @@ void PMusrCanvas::InitMusrCanvas(const Char_t* title, Int_t wtopx, Int_t wtopy,
|
|||||||
fBar = fImp->GetMenuBar();
|
fBar = fImp->GetMenuBar();
|
||||||
fPopupMain = fBar->AddPopup("&Musrfit");
|
fPopupMain = fBar->AddPopup("&Musrfit");
|
||||||
|
|
||||||
fPopupFourier = new TGPopupMenu();
|
fPopupFourier = std::make_unique<TGPopupMenu>();
|
||||||
fPopupMain->AddEntry("&Data", P_MENU_ID_DATA+P_MENU_PLOT_OFFSET*fPlotNumber);
|
fPopupMain->AddEntry("&Data", P_MENU_ID_DATA+P_MENU_PLOT_OFFSET*fPlotNumber);
|
||||||
fPopupMain->AddSeparator();
|
fPopupMain->AddSeparator();
|
||||||
|
|
||||||
fPopupMain->AddPopup("&Fourier", fPopupFourier);
|
fPopupMain->AddPopup("&Fourier", fPopupFourier.get());
|
||||||
fPopupFourier->AddEntry("Show Real", P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL);
|
fPopupFourier->AddEntry("Show Real", P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL);
|
||||||
fPopupFourier->AddEntry("Show Imag", P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_IMAG);
|
fPopupFourier->AddEntry("Show Imag", P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_IMAG);
|
||||||
fPopupFourier->AddEntry("Show Real+Imag", P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL_AND_IMAG);
|
fPopupFourier->AddEntry("Show Real+Imag", P_MENU_ID_FOURIER+P_MENU_PLOT_OFFSET*fPlotNumber+P_MENU_ID_FOURIER_REAL_AND_IMAG);
|
||||||
@ -2470,57 +2371,32 @@ void PMusrCanvas::InitMusrCanvas(const Char_t* title, Int_t wtopx, Int_t wtopy,
|
|||||||
|
|
||||||
// divide the canvas into 4 pads
|
// divide the canvas into 4 pads
|
||||||
// title pad
|
// title pad
|
||||||
fTitlePad = new TPaveText(0.0, YTITLE, 1.0, 1.0, "NDC");
|
fTitlePad = std::make_unique<TPaveText>(0.0, YTITLE, 1.0, 1.0, "NDC");
|
||||||
if (fTitlePad == nullptr) {
|
|
||||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fTitlePad";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fTitlePad->SetFillColor(TColor::GetColor(255,255,255));
|
fTitlePad->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
fTitlePad->SetTextAlign(12); // middle, left
|
fTitlePad->SetTextAlign(12); // middle, left
|
||||||
fTitlePad->AddText(title);
|
fTitlePad->AddText(title);
|
||||||
fTitlePad->Draw();
|
fTitlePad->Draw();
|
||||||
|
|
||||||
// data/theory pad
|
// data/theory pad
|
||||||
fDataTheoryPad = new TPad("dataTheoryPad", "dataTheoryPad", 0.0, YINFO, XTHEO, YTITLE);
|
fDataTheoryPad = std::make_unique<TPad>("dataTheoryPad", "dataTheoryPad", 0.0, YINFO, XTHEO, YTITLE);
|
||||||
if (fDataTheoryPad == nullptr) {
|
|
||||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fDataTheoryPad";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fDataTheoryPad->SetFillColor(TColor::GetColor(255,255,255));
|
fDataTheoryPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
fDataTheoryPad->Draw();
|
fDataTheoryPad->Draw();
|
||||||
|
|
||||||
// parameter pad
|
// parameter pad
|
||||||
fParameterPad = new TPaveText(XTHEO, 0.5, 1.0, YTITLE, "NDC");
|
fParameterPad = std::make_unique<TPaveText>(XTHEO, 0.5, 1.0, YTITLE, "NDC");
|
||||||
if (fParameterPad == nullptr) {
|
|
||||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fParameterPad";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fParameterPad->SetFillColor(TColor::GetColor(255,255,255));
|
fParameterPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
fParameterPad->SetTextAlign(13); // top, left
|
fParameterPad->SetTextAlign(13); // top, left
|
||||||
fParameterPad->SetTextFont(102); // courier bold, scalable so that greek parameters will be plotted properly
|
fParameterPad->SetTextFont(102); // courier bold, scalable so that greek parameters will be plotted properly
|
||||||
|
|
||||||
// theory pad
|
// theory pad
|
||||||
fTheoryPad = new TPaveText(XTHEO, 0.1, 1.0, 0.5, "NDC");
|
fTheoryPad = std::make_unique<TPaveText>(XTHEO, 0.1, 1.0, 0.5, "NDC");
|
||||||
if (fTheoryPad == nullptr) {
|
|
||||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fTheoryPad";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fTheoryPad->SetFillColor(TColor::GetColor(255,255,255));
|
fTheoryPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
fTheoryPad->SetTextAlign(13); // top, left
|
fTheoryPad->SetTextAlign(13); // top, left
|
||||||
fTheoryPad->SetTextFont(102); // courier bold, scalable so that greek parameters will be plotted properly
|
fTheoryPad->SetTextFont(102); // courier bold, scalable so that greek parameters will be plotted properly
|
||||||
|
|
||||||
|
|
||||||
// info pad
|
// info pad
|
||||||
fInfoPad = new TLegend(0.0, 0.0, 1.0, YINFO, "NDC");
|
fInfoPad = std::make_unique<TLegend>(0.0, 0.0, 1.0, YINFO, "NDC");
|
||||||
if (fInfoPad == nullptr) {
|
|
||||||
std::cerr << std::endl << ">> PMusrCanvas::PMusrCanvas(): **PANIC ERROR** Couldn't invoke fInfoPad";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
|
fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
fInfoPad->SetTextAlign(12); // middle, left
|
fInfoPad->SetTextAlign(12); // middle, left
|
||||||
|
|
||||||
@ -4913,11 +4789,7 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
|
|||||||
// set y-axis label
|
// set y-axis label
|
||||||
fMultiGraphData->GetYaxis()->SetTitle(yAxisTitle.Data());
|
fMultiGraphData->GetYaxis()->SetTitle(yAxisTitle.Data());
|
||||||
} else { // more than one data set present, hence add a legend
|
} else { // more than one data set present, hence add a legend
|
||||||
if (fMultiGraphLegend) {
|
fMultiGraphLegend.reset(new TLegend(0.8, 0.8, 1.0, 1.0));
|
||||||
delete fMultiGraphLegend;
|
|
||||||
}
|
|
||||||
fMultiGraphLegend = new TLegend(0.8, 0.8, 1.0, 1.0);
|
|
||||||
assert(fMultiGraphLegend != nullptr);
|
|
||||||
PStringVector legendLabel;
|
PStringVector legendLabel;
|
||||||
for (UInt_t i=0; i<plotInfo.fRuns.size(); i++) {
|
for (UInt_t i=0; i<plotInfo.fRuns.size(); i++) {
|
||||||
runNo = (UInt_t)plotInfo.fRuns[i]-1;
|
runNo = (UInt_t)plotInfo.fRuns[i]-1;
|
||||||
@ -6110,12 +5982,6 @@ void PMusrCanvas::PlotFourierDifference(Bool_t unzoom)
|
|||||||
*/
|
*/
|
||||||
void PMusrCanvas::PlotFourierPhaseValue(Bool_t unzoom)
|
void PMusrCanvas::PlotFourierPhaseValue(Bool_t unzoom)
|
||||||
{
|
{
|
||||||
// check if phase TLatex object is present
|
|
||||||
if (fCurrentFourierPhaseText) {
|
|
||||||
delete fCurrentFourierPhaseText;
|
|
||||||
fCurrentFourierPhaseText = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
double x, y;
|
double x, y;
|
||||||
TString str;
|
TString str;
|
||||||
|
|
||||||
@ -6127,7 +5993,7 @@ void PMusrCanvas::PlotFourierPhaseValue(Bool_t unzoom)
|
|||||||
}
|
}
|
||||||
x = 0.7;
|
x = 0.7;
|
||||||
y = 0.85;
|
y = 0.85;
|
||||||
fCurrentFourierPhaseText = new TLatex();
|
fCurrentFourierPhaseText.reset(new TLatex());
|
||||||
fCurrentFourierPhaseText->SetNDC(kTRUE);
|
fCurrentFourierPhaseText->SetNDC(kTRUE);
|
||||||
fCurrentFourierPhaseText->SetText(x, y, str.Data());
|
fCurrentFourierPhaseText->SetText(x, y, str.Data());
|
||||||
fCurrentFourierPhaseText->SetTextFont(62);
|
fCurrentFourierPhaseText->SetTextFont(62);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -245,20 +245,11 @@ ClassImpQ(PMusrT0)
|
|||||||
PMusrT0::PMusrT0()
|
PMusrT0::PMusrT0()
|
||||||
{
|
{
|
||||||
fTimeout = 0;
|
fTimeout = 0;
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
|
|
||||||
fValid = false;
|
fValid = false;
|
||||||
|
|
||||||
fStatus = 0; // default is quit locally
|
fStatus = 0; // default is quit locally
|
||||||
|
|
||||||
fMainCanvas = nullptr;
|
|
||||||
|
|
||||||
fHisto = nullptr;
|
|
||||||
fData = nullptr;
|
|
||||||
fBkg = nullptr;
|
|
||||||
|
|
||||||
fToDoInfo = nullptr;
|
|
||||||
|
|
||||||
fDataAndBkgEnabled = false;
|
fDataAndBkgEnabled = false;
|
||||||
fT0Enabled = false;
|
fT0Enabled = false;
|
||||||
fShowT0DataChannel = false;
|
fShowT0DataChannel = false;
|
||||||
@ -267,13 +258,6 @@ PMusrT0::PMusrT0()
|
|||||||
fDataRange[1] = 0;
|
fDataRange[1] = 0;
|
||||||
fBkgRange[0] = 0;
|
fBkgRange[0] = 0;
|
||||||
fBkgRange[1] = 0;
|
fBkgRange[1] = 0;
|
||||||
|
|
||||||
fT0Line = nullptr;
|
|
||||||
fT0DataLine = nullptr;
|
|
||||||
fFirstBkgLine = nullptr;
|
|
||||||
fLastBkgLine = nullptr;
|
|
||||||
fFirstDataLine = nullptr;
|
|
||||||
fLastDataLine = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -287,20 +271,11 @@ PMusrT0::PMusrT0()
|
|||||||
PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||||
{
|
{
|
||||||
fTimeout = 0;
|
fTimeout = 0;
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
|
|
||||||
fValid = true;
|
fValid = true;
|
||||||
|
|
||||||
fStatus = 0; // default is quit locally
|
fStatus = 0; // default is quit locally
|
||||||
|
|
||||||
fMainCanvas = nullptr;
|
|
||||||
|
|
||||||
fHisto = nullptr;
|
|
||||||
fData = nullptr;
|
|
||||||
fBkg = nullptr;
|
|
||||||
|
|
||||||
fToDoInfo = nullptr;
|
|
||||||
|
|
||||||
fDataAndBkgEnabled = false;
|
fDataAndBkgEnabled = false;
|
||||||
fT0Enabled = false;
|
fT0Enabled = false;
|
||||||
fShowT0DataChannel = false;
|
fShowT0DataChannel = false;
|
||||||
@ -310,13 +285,6 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
|||||||
fBkgRange[0] = 0;
|
fBkgRange[0] = 0;
|
||||||
fBkgRange[1] = 0;
|
fBkgRange[1] = 0;
|
||||||
|
|
||||||
fT0Line = nullptr;
|
|
||||||
fT0DataLine = nullptr;
|
|
||||||
fFirstBkgLine = nullptr;
|
|
||||||
fLastBkgLine = nullptr;
|
|
||||||
fFirstDataLine = nullptr;
|
|
||||||
fLastDataLine = nullptr;
|
|
||||||
|
|
||||||
// feed necessary objects
|
// feed necessary objects
|
||||||
TString str;
|
TString str;
|
||||||
|
|
||||||
@ -347,7 +315,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
|||||||
Int_t noOfBins = rawRunData->GetDataBin(histoNo)->size();
|
Int_t noOfBins = rawRunData->GetDataBin(histoNo)->size();
|
||||||
Double_t start = -0.5;
|
Double_t start = -0.5;
|
||||||
Double_t end = noOfBins - 0.5; // -0.5 is correct since the data start at 0.0
|
Double_t end = noOfBins - 0.5; // -0.5 is correct since the data start at 0.0
|
||||||
fHisto = new TH1F("fHisto", str.Data(), noOfBins, start, end);
|
fHisto = std::make_unique<TH1F>("fHisto", str.Data(), noOfBins, start, end);
|
||||||
fHisto->SetMarkerStyle(21);
|
fHisto->SetMarkerStyle(21);
|
||||||
fHisto->SetMarkerSize(0.5);
|
fHisto->SetMarkerSize(0.5);
|
||||||
fHisto->SetMarkerColor(TColor::GetColor(0,0,0)); // black
|
fHisto->SetMarkerColor(TColor::GetColor(0,0,0)); // black
|
||||||
@ -382,7 +350,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
|||||||
Int_t noOfBins = rawRunData->GetDataBin(histoNo)->size();
|
Int_t noOfBins = rawRunData->GetDataBin(histoNo)->size();
|
||||||
Double_t start = -0.5;
|
Double_t start = -0.5;
|
||||||
Double_t end = noOfBins - 0.5; // -0.5 is correct since the data start at 0.0
|
Double_t end = noOfBins - 0.5; // -0.5 is correct since the data start at 0.0
|
||||||
fHisto = new TH1F("fHisto", str.Data(), noOfBins, start, end);
|
fHisto = std::make_unique<TH1F>("fHisto", str.Data(), noOfBins, start, end);
|
||||||
fHisto->SetMarkerStyle(21);
|
fHisto->SetMarkerStyle(21);
|
||||||
fHisto->SetMarkerSize(0.5);
|
fHisto->SetMarkerSize(0.5);
|
||||||
fHisto->SetMarkerColor(TColor::GetColor(0,0,0)); // black
|
fHisto->SetMarkerColor(TColor::GetColor(0,0,0)); // black
|
||||||
@ -517,7 +485,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// generate canvas etc
|
// generate canvas etc
|
||||||
fMainCanvas = new TCanvas("fMainCanvas", str);
|
fMainCanvas = std::make_unique<TCanvas>("fMainCanvas", str);
|
||||||
fMainCanvas->SetFillColor(TColor::GetColor(255,255,255));
|
fMainCanvas->SetFillColor(TColor::GetColor(255,255,255));
|
||||||
|
|
||||||
|
|
||||||
@ -545,7 +513,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
|||||||
|
|
||||||
if (fMusrT0Data.GetCmdTag() == PMUSRT0_GET_T0) {
|
if (fMusrT0Data.GetCmdTag() == PMUSRT0_GET_T0) {
|
||||||
str = "please set t0 bin only.";
|
str = "please set t0 bin only.";
|
||||||
fToDoInfo = new TLatex();
|
fToDoInfo = std::make_unique<TLatex>();
|
||||||
fToDoInfo->SetTextFont(51);
|
fToDoInfo->SetTextFont(51);
|
||||||
fToDoInfo->SetTextSize(0.030);
|
fToDoInfo->SetTextSize(0.030);
|
||||||
fToDoInfo->SetLineWidth(2);
|
fToDoInfo->SetLineWidth(2);
|
||||||
@ -554,7 +522,7 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
|||||||
}
|
}
|
||||||
if (fMusrT0Data.GetCmdTag() == PMUSRT0_GET_DATA_AND_BKG_RANGE) {
|
if (fMusrT0Data.GetCmdTag() == PMUSRT0_GET_DATA_AND_BKG_RANGE) {
|
||||||
str = "please set data and bkg range.";
|
str = "please set data and bkg range.";
|
||||||
fToDoInfo = new TLatex();
|
fToDoInfo = std::make_unique<TLatex>();
|
||||||
fToDoInfo->SetTextFont(51);
|
fToDoInfo->SetTextFont(51);
|
||||||
fToDoInfo->SetTextSize(0.030);
|
fToDoInfo->SetTextSize(0.030);
|
||||||
fToDoInfo->SetLineWidth(2);
|
fToDoInfo->SetLineWidth(2);
|
||||||
@ -563,64 +531,6 @@ PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
// Destructor
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
/**
|
|
||||||
* <p>Destructor.
|
|
||||||
*/
|
|
||||||
PMusrT0::~PMusrT0()
|
|
||||||
{
|
|
||||||
if (fTimeoutTimer) {
|
|
||||||
delete fTimeoutTimer;
|
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
}
|
|
||||||
if (fHisto) {
|
|
||||||
delete fHisto;
|
|
||||||
fHisto = nullptr;
|
|
||||||
}
|
|
||||||
if (fData) {
|
|
||||||
delete fData;
|
|
||||||
fData = nullptr;
|
|
||||||
}
|
|
||||||
if (fBkg) {
|
|
||||||
delete fBkg;
|
|
||||||
fBkg = nullptr;
|
|
||||||
}
|
|
||||||
if (fToDoInfo) {
|
|
||||||
delete fToDoInfo;
|
|
||||||
fToDoInfo = nullptr;
|
|
||||||
}
|
|
||||||
if (fT0Line) {
|
|
||||||
delete fT0Line;
|
|
||||||
fT0Line = nullptr;
|
|
||||||
}
|
|
||||||
if (fT0DataLine) {
|
|
||||||
delete fT0DataLine;
|
|
||||||
fT0DataLine = nullptr;
|
|
||||||
}
|
|
||||||
if (fFirstBkgLine) {
|
|
||||||
delete fFirstBkgLine;
|
|
||||||
fFirstBkgLine = nullptr;
|
|
||||||
}
|
|
||||||
if (fLastBkgLine) {
|
|
||||||
delete fLastBkgLine;
|
|
||||||
fLastBkgLine = nullptr;
|
|
||||||
}
|
|
||||||
if (fFirstDataLine) {
|
|
||||||
delete fFirstDataLine;
|
|
||||||
fFirstDataLine = nullptr;
|
|
||||||
}
|
|
||||||
if (fLastDataLine) {
|
|
||||||
delete fLastDataLine;
|
|
||||||
fLastDataLine = nullptr;
|
|
||||||
}
|
|
||||||
if (fMainCanvas && (fStatus != 2)) {
|
|
||||||
delete fMainCanvas;
|
|
||||||
fMainCanvas = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// Done (SIGNAL)
|
// Done (SIGNAL)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -724,11 +634,7 @@ void PMusrT0::SetTimeout(Int_t timeout)
|
|||||||
if (fTimeout <= 0)
|
if (fTimeout <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fTimeoutTimer) {
|
fTimeoutTimer.reset(new TTimer());
|
||||||
delete fTimeoutTimer;
|
|
||||||
fTimeoutTimer = nullptr;
|
|
||||||
}
|
|
||||||
fTimeoutTimer = new TTimer();
|
|
||||||
|
|
||||||
fTimeoutTimer->Connect("Timeout()", "PMusrT0", this, "Quit()");
|
fTimeoutTimer->Connect("Timeout()", "PMusrT0", this, "Quit()");
|
||||||
|
|
||||||
@ -782,7 +688,7 @@ void PMusrT0::InitT0()
|
|||||||
}
|
}
|
||||||
Double_t max = fHisto->GetMaximum();
|
Double_t max = fHisto->GetMaximum();
|
||||||
|
|
||||||
fT0Line = new TLine((Double_t)t0Bin, 0.0, (Double_t)t0Bin, max);
|
fT0Line = std::make_unique<TLine>((Double_t)t0Bin, 0.0, (Double_t)t0Bin, max);
|
||||||
fT0Line->SetLineStyle(1); // solid
|
fT0Line->SetLineStyle(1); // solid
|
||||||
fT0Line->SetLineColor(TColor::GetColor(0,255,0)); // green
|
fT0Line->SetLineColor(TColor::GetColor(0,255,0)); // green
|
||||||
fT0Line->SetLineWidth(2);
|
fT0Line->SetLineWidth(2);
|
||||||
@ -815,7 +721,7 @@ void PMusrT0::InitDataAndBkg()
|
|||||||
Int_t noOfBins = fDataRange[1]-fDataRange[0]+1;
|
Int_t noOfBins = fDataRange[1]-fDataRange[0]+1;
|
||||||
Double_t start = fDataRange[0] - 0.5;
|
Double_t start = fDataRange[0] - 0.5;
|
||||||
Double_t end = fDataRange[1] + 0.5;
|
Double_t end = fDataRange[1] + 0.5;
|
||||||
fData = new TH1F("fData", "fData", noOfBins, start, end);
|
fData = std::make_unique<TH1F>("fData", "fData", noOfBins, start, end);
|
||||||
fData->SetMarkerStyle(21);
|
fData->SetMarkerStyle(21);
|
||||||
fData->SetMarkerSize(0.5);
|
fData->SetMarkerSize(0.5);
|
||||||
fData->SetMarkerColor(TColor::GetColor(0,0,255)); // blue
|
fData->SetMarkerColor(TColor::GetColor(0,0,255)); // blue
|
||||||
@ -843,7 +749,7 @@ void PMusrT0::InitDataAndBkg()
|
|||||||
noOfBins = fBkgRange[1]-fBkgRange[0]+1;
|
noOfBins = fBkgRange[1]-fBkgRange[0]+1;
|
||||||
start = fBkgRange[0] - 0.5;
|
start = fBkgRange[0] - 0.5;
|
||||||
end = fBkgRange[1] + 0.5;
|
end = fBkgRange[1] + 0.5;
|
||||||
fBkg = new TH1F("fBkg", "fBkg", noOfBins, start, end);
|
fBkg = std::make_unique<TH1F>("fBkg", "fBkg", noOfBins, start, end);
|
||||||
fBkg->SetMarkerStyle(21);
|
fBkg->SetMarkerStyle(21);
|
||||||
fBkg->SetMarkerSize(0.5);
|
fBkg->SetMarkerSize(0.5);
|
||||||
fBkg->SetMarkerColor(TColor::GetColor(255,0,0)); // red
|
fBkg->SetMarkerColor(TColor::GetColor(255,0,0)); // red
|
||||||
@ -857,26 +763,26 @@ void PMusrT0::InitDataAndBkg()
|
|||||||
Double_t max = fHisto->GetMaximum();
|
Double_t max = fHisto->GetMaximum();
|
||||||
|
|
||||||
// data lines
|
// data lines
|
||||||
fFirstDataLine = new TLine(static_cast<Double_t>(fDataRange[0]), 0.0, static_cast<Double_t>(fDataRange[0]), max);
|
fFirstDataLine = std::make_unique<TLine>(static_cast<Double_t>(fDataRange[0]), 0.0, static_cast<Double_t>(fDataRange[0]), max);
|
||||||
fFirstDataLine->SetLineStyle(3); // doted
|
fFirstDataLine->SetLineStyle(3); // doted
|
||||||
fFirstDataLine->SetLineColor(TColor::GetColor(0,0,255)); // blue
|
fFirstDataLine->SetLineColor(TColor::GetColor(0,0,255)); // blue
|
||||||
fFirstDataLine->SetLineWidth(2);
|
fFirstDataLine->SetLineWidth(2);
|
||||||
fFirstDataLine->Draw();
|
fFirstDataLine->Draw();
|
||||||
|
|
||||||
fLastDataLine = new TLine(static_cast<Double_t>(fDataRange[1]), 0.0, static_cast<Double_t>(fDataRange[1]), max);
|
fLastDataLine = std::make_unique<TLine>(static_cast<Double_t>(fDataRange[1]), 0.0, static_cast<Double_t>(fDataRange[1]), max);
|
||||||
fLastDataLine->SetLineStyle(3); // doted
|
fLastDataLine->SetLineStyle(3); // doted
|
||||||
fLastDataLine->SetLineColor(TColor::GetColor(0,0,255)); // blue
|
fLastDataLine->SetLineColor(TColor::GetColor(0,0,255)); // blue
|
||||||
fLastDataLine->SetLineWidth(2);
|
fLastDataLine->SetLineWidth(2);
|
||||||
fLastDataLine->Draw();
|
fLastDataLine->Draw();
|
||||||
|
|
||||||
// bkg lines
|
// bkg lines
|
||||||
fFirstBkgLine = new TLine(static_cast<Double_t>(fBkgRange[0]), 0.0, static_cast<Double_t>(fBkgRange[0]), max);
|
fFirstBkgLine = std::make_unique<TLine>(static_cast<Double_t>(fBkgRange[0]), 0.0, static_cast<Double_t>(fBkgRange[0]), max);
|
||||||
fFirstBkgLine->SetLineStyle(6); // _..._...
|
fFirstBkgLine->SetLineStyle(6); // _..._...
|
||||||
fFirstBkgLine->SetLineColor(TColor::GetColor(255,0,0)); // red
|
fFirstBkgLine->SetLineColor(TColor::GetColor(255,0,0)); // red
|
||||||
fFirstBkgLine->SetLineWidth(2);
|
fFirstBkgLine->SetLineWidth(2);
|
||||||
fFirstBkgLine->Draw();
|
fFirstBkgLine->Draw();
|
||||||
|
|
||||||
fLastBkgLine = new TLine(static_cast<Double_t>(fBkgRange[1]), 0.0, static_cast<Double_t>(fBkgRange[1]), max);
|
fLastBkgLine = std::make_unique<TLine>(static_cast<Double_t>(fBkgRange[1]), 0.0, static_cast<Double_t>(fBkgRange[1]), max);
|
||||||
fLastBkgLine->SetLineStyle(6); // _..._...
|
fLastBkgLine->SetLineStyle(6); // _..._...
|
||||||
fLastBkgLine->SetLineColor(TColor::GetColor(255,0,0)); // red
|
fLastBkgLine->SetLineColor(TColor::GetColor(255,0,0)); // red
|
||||||
fLastBkgLine->SetLineWidth(2);
|
fLastBkgLine->SetLineWidth(2);
|
||||||
@ -898,7 +804,7 @@ void PMusrT0::ShowDataFileT0Channel()
|
|||||||
Double_t max = fHisto->GetMaximum();
|
Double_t max = fHisto->GetMaximum();
|
||||||
|
|
||||||
if (!fT0DataLine) {
|
if (!fT0DataLine) {
|
||||||
fT0DataLine = new TLine(static_cast<Double_t>(t0Bin), 0.0, static_cast<Double_t>(t0Bin), max);
|
fT0DataLine = std::make_unique<TLine>(static_cast<Double_t>(t0Bin), 0.0, static_cast<Double_t>(t0Bin), max);
|
||||||
fT0DataLine->SetLineStyle(1); // solid
|
fT0DataLine->SetLineStyle(1); // solid
|
||||||
fT0DataLine->SetLineColor(kOrange-3);
|
fT0DataLine->SetLineColor(kOrange-3);
|
||||||
fT0DataLine->SetLineWidth(2);
|
fT0DataLine->SetLineWidth(2);
|
||||||
@ -917,8 +823,7 @@ void PMusrT0::ShowDataFileT0Channel()
|
|||||||
void PMusrT0::HideDataFileT0Channel()
|
void PMusrT0::HideDataFileT0Channel()
|
||||||
{
|
{
|
||||||
if (fT0DataLine) {
|
if (fT0DataLine) {
|
||||||
delete fT0DataLine;
|
fT0DataLine.reset();
|
||||||
fT0DataLine = nullptr;
|
|
||||||
}
|
}
|
||||||
fMainCanvas->Update();
|
fMainCanvas->Update();
|
||||||
}
|
}
|
||||||
@ -1036,15 +941,11 @@ void PMusrT0::SetDataFirstChannel()
|
|||||||
fFirstDataLine->SetX1(x);
|
fFirstDataLine->SetX1(x);
|
||||||
fFirstDataLine->SetX2(x);
|
fFirstDataLine->SetX2(x);
|
||||||
|
|
||||||
// recreate data histo
|
|
||||||
delete fData;
|
|
||||||
fData = nullptr;
|
|
||||||
|
|
||||||
// refill data histo
|
// refill data histo
|
||||||
Int_t noOfBins = fDataRange[1]-fDataRange[0]+1;
|
Int_t noOfBins = fDataRange[1]-fDataRange[0]+1;
|
||||||
Double_t start = fDataRange[0] - 0.5;
|
Double_t start = fDataRange[0] - 0.5;
|
||||||
Double_t end = fDataRange[1] + 0.5;
|
Double_t end = fDataRange[1] + 0.5;
|
||||||
fData = new TH1F("fData", "fData", noOfBins, start, end);
|
fData.reset(new TH1F("fData", "fData", noOfBins, start, end));
|
||||||
fData->SetMarkerStyle(21);
|
fData->SetMarkerStyle(21);
|
||||||
fData->SetMarkerSize(0.5);
|
fData->SetMarkerSize(0.5);
|
||||||
fData->SetMarkerColor(TColor::GetColor(0,0,255)); // blue
|
fData->SetMarkerColor(TColor::GetColor(0,0,255)); // blue
|
||||||
@ -1086,15 +987,11 @@ void PMusrT0::SetDataLastChannel()
|
|||||||
fLastDataLine->SetX1(x);
|
fLastDataLine->SetX1(x);
|
||||||
fLastDataLine->SetX2(x);
|
fLastDataLine->SetX2(x);
|
||||||
|
|
||||||
// recreate data histo
|
|
||||||
delete fData;
|
|
||||||
fData = nullptr;
|
|
||||||
|
|
||||||
// refill data histo
|
// refill data histo
|
||||||
Int_t noOfBins = fDataRange[1]-fDataRange[0]+1;
|
Int_t noOfBins = fDataRange[1]-fDataRange[0]+1;
|
||||||
Double_t start = fDataRange[0] - 0.5;
|
Double_t start = fDataRange[0] - 0.5;
|
||||||
Double_t end = fDataRange[1] + 0.5;
|
Double_t end = fDataRange[1] + 0.5;
|
||||||
fData = new TH1F("fData", "fData", noOfBins, start, end);
|
fData.reset(new TH1F("fData", "fData", noOfBins, start, end));
|
||||||
fData->SetMarkerStyle(21);
|
fData->SetMarkerStyle(21);
|
||||||
fData->SetMarkerSize(0.5);
|
fData->SetMarkerSize(0.5);
|
||||||
fData->SetMarkerColor(TColor::GetColor(0,0,255)); // blue
|
fData->SetMarkerColor(TColor::GetColor(0,0,255)); // blue
|
||||||
@ -1136,15 +1033,11 @@ void PMusrT0::SetBkgFirstChannel()
|
|||||||
fFirstBkgLine->SetX1(x);
|
fFirstBkgLine->SetX1(x);
|
||||||
fFirstBkgLine->SetX2(x);
|
fFirstBkgLine->SetX2(x);
|
||||||
|
|
||||||
// recreate data histo
|
|
||||||
delete fBkg;
|
|
||||||
fBkg = nullptr;
|
|
||||||
|
|
||||||
// refill data histo
|
// refill data histo
|
||||||
Int_t noOfBins = fBkgRange[1]-fBkgRange[0]+1;
|
Int_t noOfBins = fBkgRange[1]-fBkgRange[0]+1;
|
||||||
Double_t start = fBkgRange[0] - 0.5;
|
Double_t start = fBkgRange[0] - 0.5;
|
||||||
Double_t end = fBkgRange[1] + 0.5;
|
Double_t end = fBkgRange[1] + 0.5;
|
||||||
fBkg = new TH1F("fBkg", "fBkg", noOfBins, start, end);
|
fBkg.reset(new TH1F("fBkg", "fBkg", noOfBins, start, end));
|
||||||
fBkg->SetMarkerStyle(21);
|
fBkg->SetMarkerStyle(21);
|
||||||
fBkg->SetMarkerSize(0.5);
|
fBkg->SetMarkerSize(0.5);
|
||||||
fBkg->SetMarkerColor(TColor::GetColor(255,0,0)); // red
|
fBkg->SetMarkerColor(TColor::GetColor(255,0,0)); // red
|
||||||
@ -1186,15 +1079,11 @@ void PMusrT0::SetBkgLastChannel()
|
|||||||
fLastBkgLine->SetX1(x);
|
fLastBkgLine->SetX1(x);
|
||||||
fLastBkgLine->SetX2(x);
|
fLastBkgLine->SetX2(x);
|
||||||
|
|
||||||
// recreate data histo
|
|
||||||
delete fBkg;
|
|
||||||
fBkg = nullptr;
|
|
||||||
|
|
||||||
// refill data histo
|
// refill data histo
|
||||||
Int_t noOfBins = fBkgRange[1]-fBkgRange[0]+1;
|
Int_t noOfBins = fBkgRange[1]-fBkgRange[0]+1;
|
||||||
Double_t start = fBkgRange[0] - 0.5;
|
Double_t start = fBkgRange[0] - 0.5;
|
||||||
Double_t end = fBkgRange[1] + 0.5;
|
Double_t end = fBkgRange[1] + 0.5;
|
||||||
fBkg = new TH1F("fBkg", "fBkg", noOfBins, start, end);
|
fBkg.reset(new TH1F("fBkg", "fBkg", noOfBins, start, end));
|
||||||
fBkg->SetMarkerStyle(21);
|
fBkg->SetMarkerStyle(21);
|
||||||
fBkg->SetMarkerSize(0.5);
|
fBkg->SetMarkerSize(0.5);
|
||||||
fBkg->SetMarkerColor(TColor::GetColor(255,0,0)); // red
|
fBkg->SetMarkerColor(TColor::GetColor(255,0,0)); // red
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -31,6 +31,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
@ -345,7 +346,7 @@ PRgeHandler::PRgeHandler(const std::string fln)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create the rge xml handler
|
// create the rge xml handler
|
||||||
PXmlRgeHandler *xmlRge = new PXmlRgeHandler();
|
std::unique_ptr<PXmlRgeHandler> xmlRge = std::make_unique<PXmlRgeHandler>();
|
||||||
if (xmlRge == nullptr) {
|
if (xmlRge == nullptr) {
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "**ERROR** couldn't invoke PXmlRgeHandler." << std::endl;
|
std::cerr << "**ERROR** couldn't invoke PXmlRgeHandler." << std::endl;
|
||||||
@ -355,7 +356,7 @@ PRgeHandler::PRgeHandler(const std::string fln)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create the SAX parser
|
// create the SAX parser
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
if (saxParser == nullptr) {
|
if (saxParser == nullptr) {
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "**ERROR** couldn't invoke TSAXParser." << std::endl;
|
std::cerr << "**ERROR** couldn't invoke TSAXParser." << std::endl;
|
||||||
@ -366,7 +367,7 @@ PRgeHandler::PRgeHandler(const std::string fln)
|
|||||||
saxParser->SetStopOnError();
|
saxParser->SetStopOnError();
|
||||||
|
|
||||||
// connect SAX parser and rge handler
|
// connect SAX parser and rge handler
|
||||||
saxParser->ConnectToHandler("PXmlRgeHandler", xmlRge);
|
saxParser->ConnectToHandler("PXmlRgeHandler", xmlRge.get());
|
||||||
int status = saxParser->ParseFile(fln.c_str());
|
int status = saxParser->ParseFile(fln.c_str());
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
@ -433,9 +434,6 @@ PRgeHandler::PRgeHandler(const std::string fln)
|
|||||||
fData.push_back(dataSet);
|
fData.push_back(dataSet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete saxParser;
|
|
||||||
delete xmlRge;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2018-2023 by Zaher Salman *
|
* Copyright (C) 2018-2024 by Zaher Salman *
|
||||||
* zaher.salman@psi.ch *
|
* zaher.salman@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -99,7 +99,7 @@ PRunBase::PRunBase(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo,
|
|||||||
fFuncValues.push_back(0.0);
|
fFuncValues.push_back(0.0);
|
||||||
|
|
||||||
// generate theory
|
// generate theory
|
||||||
fTheory = new PTheory(fMsrInfo, runNo);
|
fTheory = std::make_unique<PTheory>(fMsrInfo, runNo);
|
||||||
if (fTheory == nullptr) {
|
if (fTheory == nullptr) {
|
||||||
std::cerr << std::endl << "**SEVERE ERROR** PRunBase::PRunBase: Couldn't create an instance of PTheory :-(, will quit" << std::endl;
|
std::cerr << std::endl << "**SEVERE ERROR** PRunBase::PRunBase: Couldn't create an instance of PTheory :-(, will quit" << std::endl;
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -181,10 +181,7 @@ void PRunBase::SetFitRange(PDoublePairVector fitRange)
|
|||||||
*/
|
*/
|
||||||
void PRunBase::CleanUp()
|
void PRunBase::CleanUp()
|
||||||
{
|
{
|
||||||
if (fTheory) {
|
fTheory.reset();
|
||||||
delete fTheory;
|
|
||||||
fTheory = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -41,6 +41,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <TROOT.h>
|
#include <TROOT.h>
|
||||||
#include <TSystem.h>
|
#include <TSystem.h>
|
||||||
@ -1713,7 +1714,7 @@ Bool_t PRunDataHandler::ReadRootFile()
|
|||||||
}
|
}
|
||||||
} else { // MusrRoot file
|
} else { // MusrRoot file
|
||||||
// invoke the MusrRoot header object
|
// invoke the MusrRoot header object
|
||||||
TMusrRunHeader *header = new TMusrRunHeader(true); // read quite
|
std::unique_ptr<TMusrRunHeader> header = std::make_unique<TMusrRunHeader>(true); // read quiet
|
||||||
if (header == nullptr) {
|
if (header == nullptr) {
|
||||||
std::cerr << std::endl << ">> PRunDataHandler::ReadRootFile: **ERROR** Couldn't invoke MusrRoot RunHeader in file:" << fRunPathName;
|
std::cerr << std::endl << ">> PRunDataHandler::ReadRootFile: **ERROR** Couldn't invoke MusrRoot RunHeader in file:" << fRunPathName;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
@ -2080,12 +2081,6 @@ Bool_t PRunDataHandler::ReadRootFile()
|
|||||||
histoData.clear();
|
histoData.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (header) {
|
|
||||||
delete header;
|
|
||||||
header=nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
f.Close();
|
f.Close();
|
||||||
@ -2122,7 +2117,7 @@ Bool_t PRunDataHandler::ReadNexusFile()
|
|||||||
Double_t dval;
|
Double_t dval;
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
PNeXus *nxs_file = new PNeXus(fRunPathName.Data());
|
std::unique_ptr<PNeXus> nxs_file = std::make_unique<PNeXus>(fRunPathName.Data());
|
||||||
if (!nxs_file->IsValid()) {
|
if (!nxs_file->IsValid()) {
|
||||||
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): Not a valid NeXus file.";
|
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): Not a valid NeXus file.";
|
||||||
std::cerr << std::endl << ">> Error Message: " << nxs_file->GetErrorMsg().data() << std::endl;
|
std::cerr << std::endl << ">> Error Message: " << nxs_file->GetErrorMsg().data() << std::endl;
|
||||||
@ -2454,12 +2449,6 @@ Bool_t PRunDataHandler::ReadNexusFile()
|
|||||||
} else {
|
} else {
|
||||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): IDF version " << nxs_file->GetIdfVersion() << ", not implemented." << std::endl;
|
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): IDF version " << nxs_file->GetIdfVersion() << ", not implemented." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (nxs_file) {
|
|
||||||
delete nxs_file;
|
|
||||||
nxs_file = nullptr;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): Sorry, not enabled at configuration level, i.e. --enable-NeXus when executing configure" << std::endl << std::endl;
|
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): Sorry, not enabled at configuration level, i.e. --enable-NeXus when executing configure" << std::endl << std::endl;
|
||||||
#endif
|
#endif
|
||||||
@ -4531,7 +4520,7 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
|||||||
|
|
||||||
runHeader = gROOT->GetRootFolder()->AddFolder("RunHeader", "MusrRoot Run Header Info");
|
runHeader = gROOT->GetRootFolder()->AddFolder("RunHeader", "MusrRoot Run Header Info");
|
||||||
gROOT->GetListOfBrowsables()->Add(runHeader, "RunHeader");
|
gROOT->GetListOfBrowsables()->Add(runHeader, "RunHeader");
|
||||||
TMusrRunHeader *header = new TMusrRunHeader(true);
|
std::unique_ptr<TMusrRunHeader> header = std::make_unique<TMusrRunHeader>(true);
|
||||||
gROOT->GetListOfBrowsables()->Add(runHeader, "RunHeader");
|
gROOT->GetListOfBrowsables()->Add(runHeader, "RunHeader");
|
||||||
|
|
||||||
// feed header info
|
// feed header info
|
||||||
@ -4647,9 +4636,13 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
|||||||
str.Form("hDecay%03d", dataSet->GetHistoNo());
|
str.Form("hDecay%03d", dataSet->GetHistoNo());
|
||||||
length = dataSet->GetData()->size();
|
length = dataSet->GetData()->size();
|
||||||
histo = new TH1F(str.Data(), str.Data(), length+1, -0.5, static_cast<Double_t>(length)+0.5);
|
histo = new TH1F(str.Data(), str.Data(), length+1, -0.5, static_cast<Double_t>(length)+0.5);
|
||||||
|
Int_t sum=0, entries=0;
|
||||||
for (UInt_t j=0; j<length; j++) {
|
for (UInt_t j=0; j<length; j++) {
|
||||||
histo->SetBinContent(j+1, dataSet->GetData()->at(j));
|
entries = dataSet->GetData()->at(j);
|
||||||
|
histo->SetBinContent(j+1, entries);
|
||||||
|
sum += entries;
|
||||||
}
|
}
|
||||||
|
histo->SetEntries(sum);
|
||||||
histos.push_back(histo);
|
histos.push_back(histo);
|
||||||
}
|
}
|
||||||
} else { // rebin > 1
|
} else { // rebin > 1
|
||||||
@ -4666,14 +4659,18 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
|||||||
length = dataSet->GetData()->size();
|
length = dataSet->GetData()->size();
|
||||||
histo = new TH1F(str.Data(), str.Data(), static_cast<Int_t>(length/fAny2ManyInfo->rebin)+1, -0.5, static_cast<Double_t>(static_cast<Int_t>(length/fAny2ManyInfo->rebin))+0.5);
|
histo = new TH1F(str.Data(), str.Data(), static_cast<Int_t>(length/fAny2ManyInfo->rebin)+1, -0.5, static_cast<Double_t>(static_cast<Int_t>(length/fAny2ManyInfo->rebin))+0.5);
|
||||||
dataCount = 0;
|
dataCount = 0;
|
||||||
|
Int_t sum=0, entries=0;
|
||||||
for (UInt_t j=0; j<length; j++) {
|
for (UInt_t j=0; j<length; j++) {
|
||||||
if ((j > 0) && (j % fAny2ManyInfo->rebin == 0)) {
|
if ((j > 0) && (j % fAny2ManyInfo->rebin == 0)) {
|
||||||
dataCount++;
|
dataCount++;
|
||||||
histo->SetBinContent(dataCount, dataRebin);
|
histo->SetBinContent(dataCount, dataRebin);
|
||||||
dataRebin = 0;
|
dataRebin = 0;
|
||||||
}
|
}
|
||||||
dataRebin += static_cast<UInt_t>(dataSet->GetData()->at(j));
|
entries = dataSet->GetData()->at(j);
|
||||||
|
sum += entries;
|
||||||
|
dataRebin += static_cast<UInt_t>(entries);
|
||||||
}
|
}
|
||||||
|
histo->SetEntries(sum);
|
||||||
histos.push_back(histo);
|
histos.push_back(histo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4683,7 +4680,7 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
|||||||
decayAnaModule->Add(histos[i]);
|
decayAnaModule->Add(histos[i]);
|
||||||
|
|
||||||
// write file
|
// write file
|
||||||
TFile *fout = new TFile(fln, "RECREATE", fln);
|
std::unique_ptr<TFile> fout = std::make_unique<TFile>(fln, "RECREATE", fln);
|
||||||
if (fout == nullptr) {
|
if (fout == nullptr) {
|
||||||
std::cerr << std::endl << "PRunDataHandler::WriteMusrRootFile(): **ERROR** Couldn't create ROOT file '" << fln << "'" << std::endl;
|
std::cerr << std::endl << "PRunDataHandler::WriteMusrRootFile(): **ERROR** Couldn't create ROOT file '" << fln << "'" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
@ -4695,6 +4692,12 @@ Bool_t PRunDataHandler::WriteMusrRootFile(TString fln)
|
|||||||
histosFolder->Write();
|
histosFolder->Write();
|
||||||
fout->Close();
|
fout->Close();
|
||||||
|
|
||||||
|
// cleanup
|
||||||
|
for (UInt_t i=0; i<histos.size(); i++) {
|
||||||
|
if (histos[i])
|
||||||
|
delete histos[i];
|
||||||
|
}
|
||||||
|
|
||||||
// check if root file shall be streamed to stdout
|
// check if root file shall be streamed to stdout
|
||||||
if (fAny2ManyInfo->useStandardOutput && (fAny2ManyInfo->compressionTag == 0)) {
|
if (fAny2ManyInfo->useStandardOutput && (fAny2ManyInfo->compressionTag == 0)) {
|
||||||
// stream file to stdout
|
// stream file to stdout
|
||||||
@ -4774,7 +4777,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
|||||||
|
|
||||||
runInfo = gROOT->GetRootFolder()->AddFolder("RunInfo", "LEM RunInfo");
|
runInfo = gROOT->GetRootFolder()->AddFolder("RunInfo", "LEM RunInfo");
|
||||||
gROOT->GetListOfBrowsables()->Add(runInfo, "RunInfo");
|
gROOT->GetListOfBrowsables()->Add(runInfo, "RunInfo");
|
||||||
TLemRunHeader *header = new TLemRunHeader();
|
std::unique_ptr<TLemRunHeader> header = std::make_unique<TLemRunHeader>();
|
||||||
gROOT->GetListOfBrowsables()->Add(runInfo, "RunInfo");
|
gROOT->GetListOfBrowsables()->Add(runInfo, "RunInfo");
|
||||||
|
|
||||||
// feed header info
|
// feed header info
|
||||||
@ -4813,7 +4816,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
|||||||
tt0[i] = dataSet->GetTimeZeroBin()/fAny2ManyInfo->rebin;
|
tt0[i] = dataSet->GetTimeZeroBin()/fAny2ManyInfo->rebin;
|
||||||
}
|
}
|
||||||
header->SetTimeZero(tt0);
|
header->SetTimeZero(tt0);
|
||||||
runInfo->Add(header); // add header to RunInfo folder
|
runInfo->Add(header.get()); // add header to RunInfo folder
|
||||||
|
|
||||||
// feed histos
|
// feed histos
|
||||||
std::vector<TH1F*> histos;
|
std::vector<TH1F*> histos;
|
||||||
@ -4867,7 +4870,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
|||||||
decayAnaModule->Add(histos[i]);
|
decayAnaModule->Add(histos[i]);
|
||||||
|
|
||||||
// write file
|
// write file
|
||||||
TFile *fout = new TFile(fln, "RECREATE", fln);
|
std::unique_ptr<TFile> fout = std::make_unique<TFile>(fln, "RECREATE", fln);
|
||||||
if (fout == nullptr) {
|
if (fout == nullptr) {
|
||||||
std::cerr << std::endl << "PRunDataHandler::WriteRootFile(): **ERROR** Couldn't create ROOT file '" << fln << "'" << std::endl;
|
std::cerr << std::endl << "PRunDataHandler::WriteRootFile(): **ERROR** Couldn't create ROOT file '" << fln << "'" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
@ -4883,9 +4886,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
|||||||
delete histos[i];
|
delete histos[i];
|
||||||
}
|
}
|
||||||
histos.clear();
|
histos.clear();
|
||||||
delete fout;
|
|
||||||
delete [] tt0;
|
delete [] tt0;
|
||||||
delete header;
|
|
||||||
|
|
||||||
// check if root file shall be streamed to stdout
|
// check if root file shall be streamed to stdout
|
||||||
if (fAny2ManyInfo->useStandardOutput && (fAny2ManyInfo->compressionTag == 0)) {
|
if (fAny2ManyInfo->useStandardOutput && (fAny2ManyInfo->compressionTag == 0)) {
|
||||||
@ -4956,7 +4957,7 @@ Bool_t PRunDataHandler::WriteNexusFile(TString fln)
|
|||||||
std::cout << std::endl << ">> PRunDataHandler::WriteNexusFile(): writing a NeXus data file (" << fln.Data() << ") ... " << std::endl;
|
std::cout << std::endl << ">> PRunDataHandler::WriteNexusFile(): writing a NeXus data file (" << fln.Data() << ") ... " << std::endl;
|
||||||
|
|
||||||
// create NeXus object
|
// create NeXus object
|
||||||
PNeXus *nxs = new PNeXus();
|
std::unique_ptr<PNeXus> nxs = std::make_unique<PNeXus>();
|
||||||
if (nxs == nullptr) {
|
if (nxs == nullptr) {
|
||||||
std::cerr << std::endl << ">> PRunDataHandler::WriteNexusFile(): **ERROR** couldn't invoke the NeXus object." << std::endl;
|
std::cerr << std::endl << ">> PRunDataHandler::WriteNexusFile(): **ERROR** couldn't invoke the NeXus object." << std::endl;
|
||||||
return false;
|
return false;
|
||||||
@ -5236,11 +5237,6 @@ Bool_t PRunDataHandler::WriteNexusFile(TString fln)
|
|||||||
if (fgb) delete [] fgb;
|
if (fgb) delete [] fgb;
|
||||||
if (lgb) delete [] lgb;
|
if (lgb) delete [] lgb;
|
||||||
} else {
|
} else {
|
||||||
// clean up
|
|
||||||
if (nxs != 0) {
|
|
||||||
delete nxs;
|
|
||||||
nxs = nullptr;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5256,20 +5252,11 @@ Bool_t PRunDataHandler::WriteNexusFile(TString fln)
|
|||||||
else {
|
else {
|
||||||
std::cerr << std::endl << ">> PRunDataHandler::WriteNexusFile(): **ERROR** undefined output NeXus format " << fAny2ManyInfo->outFormat.Data() << " found.";
|
std::cerr << std::endl << ">> PRunDataHandler::WriteNexusFile(): **ERROR** undefined output NeXus format " << fAny2ManyInfo->outFormat.Data() << " found.";
|
||||||
std::cerr << std::endl << ">> Allowed are: hdf4, hdf5, xml" << std::endl;
|
std::cerr << std::endl << ">> Allowed are: hdf4, hdf5, xml" << std::endl;
|
||||||
if (nxs != 0) {
|
|
||||||
delete nxs;
|
|
||||||
nxs = nullptr;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// write file
|
// write file
|
||||||
nxs->WriteFile(fln, fileType, fAny2ManyInfo->idf);
|
nxs->WriteFile(fln, fileType, fAny2ManyInfo->idf);
|
||||||
|
|
||||||
if (nxs != 0) {
|
|
||||||
delete nxs;
|
|
||||||
nxs = nullptr;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
std::cout << std::endl << ">> PRunDataHandler::WriteNexusFile(): Sorry, not enabled at configuration level, i.e. --enable-NeXus when executing configure" << std::endl << std::endl;
|
std::cout << std::endl << ">> PRunDataHandler::WriteNexusFile(): Sorry, not enabled at configuration level, i.e. --enable-NeXus when executing configure" << std::endl << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -38,6 +38,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <TString.h>
|
#include <TString.h>
|
||||||
#include <TObjArray.h>
|
#include <TObjArray.h>
|
||||||
@ -1068,13 +1069,13 @@ Double_t PRunSingleHistoRRF::GetMainFrequency(PDoubleVector &data)
|
|||||||
// create histo
|
// create histo
|
||||||
Double_t startTime = (fGoodBins[0]-fT0s[0]) * fTimeResolution;
|
Double_t startTime = (fGoodBins[0]-fT0s[0]) * fTimeResolution;
|
||||||
Int_t noOfBins = fGoodBins[1]-fGoodBins[0]+1;
|
Int_t noOfBins = fGoodBins[1]-fGoodBins[0]+1;
|
||||||
TH1F *histo = new TH1F("data", "data", noOfBins, startTime-fTimeResolution/2.0, startTime+fTimeResolution/2.0+noOfBins*fTimeResolution);
|
std::unique_ptr<TH1F> histo = std::make_unique<TH1F>("data", "data", noOfBins, startTime-fTimeResolution/2.0, startTime+fTimeResolution/2.0+noOfBins*fTimeResolution);
|
||||||
for (Int_t i=fGoodBins[0]; i<=fGoodBins[1]; i++) {
|
for (Int_t i=fGoodBins[0]; i<=fGoodBins[1]; i++) {
|
||||||
histo->SetBinContent(i-fGoodBins[0]+1, data[i]);
|
histo->SetBinContent(i-fGoodBins[0]+1, data[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fourier transform
|
// Fourier transform
|
||||||
PFourier *ft = new PFourier(histo, FOURIER_UNIT_FREQ);
|
std::unique_ptr<PFourier> ft = std::make_unique<PFourier>(histo.get(), FOURIER_UNIT_FREQ);
|
||||||
ft->Transform(F_APODIZATION_STRONG);
|
ft->Transform(F_APODIZATION_STRONG);
|
||||||
|
|
||||||
// find frequency maximum
|
// find frequency maximum
|
||||||
@ -1099,10 +1100,6 @@ Double_t PRunSingleHistoRRF::GetMainFrequency(PDoubleVector &data)
|
|||||||
// clean up
|
// clean up
|
||||||
if (power)
|
if (power)
|
||||||
delete power;
|
delete power;
|
||||||
if (ft)
|
|
||||||
delete ft;
|
|
||||||
if (histo)
|
|
||||||
delete histo;
|
|
||||||
|
|
||||||
return freqMax;
|
return freqMax;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -91,7 +91,7 @@ int parseXmlFile(TSAXParser *saxParser, const char *startup_path_name)
|
|||||||
/**
|
/**
|
||||||
* <p>Constructor. Check if the musrfit_startup.xml file is found in some standard search paths
|
* <p>Constructor. Check if the musrfit_startup.xml file is found in some standard search paths
|
||||||
*/
|
*/
|
||||||
PStartupHandler::PStartupHandler()
|
PStartupHandler::PStartupHandler(bool reset_startup_file)
|
||||||
{
|
{
|
||||||
fStartupFileFound = false;
|
fStartupFileFound = false;
|
||||||
fStartupFilePath = "";
|
fStartupFilePath = "";
|
||||||
@ -145,6 +145,17 @@ PStartupHandler::PStartupHandler()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// musrfit_startup.xml found. Check if it should be rewritten
|
||||||
|
if (fStartupFileFound && reset_startup_file) {
|
||||||
|
std::cout << std::endl;
|
||||||
|
std::cout << ">> Will only reset the file: '" << fStartupFilePath.Data() << "'."<< std::endl;
|
||||||
|
std::cout << std::endl;
|
||||||
|
if (!WriteDefaultStartupFile(reset_startup_file)) {
|
||||||
|
std::cerr << std::endl << "**ERROR** couldn't re-write " << fStartupFilePath.Data() << "." << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if musrfit_startup.xml is still not found, will create a default one
|
// if musrfit_startup.xml is still not found, will create a default one
|
||||||
if (!fStartupFileFound) {
|
if (!fStartupFileFound) {
|
||||||
std::cout << std::endl << "**INFO** no musrfit_startup.xml file found, will write a default one." << std::endl;
|
std::cout << std::endl << "**INFO** no musrfit_startup.xml file found, will write a default one." << std::endl;
|
||||||
@ -606,33 +617,37 @@ Bool_t PStartupHandler::StartupFileExists(Char_t *fln)
|
|||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// WriteDefaultStartupFile
|
// WriteDefaultStartupFile
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
Bool_t PStartupHandler::WriteDefaultStartupFile()
|
Bool_t PStartupHandler::WriteDefaultStartupFile(bool reset_startup_file)
|
||||||
{
|
{
|
||||||
// get home
|
|
||||||
Char_t startup_path_name[256];
|
Char_t startup_path_name[256];
|
||||||
Char_t *home = nullptr;
|
if (reset_startup_file) { // reset the found
|
||||||
home = getenv("HOME");
|
snprintf(startup_path_name, sizeof(startup_path_name), "%s", fStartupFilePath.Data());
|
||||||
if (home == nullptr) {
|
} else { // no musrfit_startup.xml found, hence write default under $HOME/.musrfit
|
||||||
std::cerr << std::endl << "**ERROR** couldn't obtain $HOME." << std::endl;
|
// get home
|
||||||
return false;
|
Char_t *home = nullptr;
|
||||||
}
|
home = getenv("HOME");
|
||||||
|
if (home == nullptr) {
|
||||||
// first check that $HOME/.musrfit exists and if NOT create it
|
std::cerr << std::endl << "**ERROR** couldn't obtain $HOME." << std::endl;
|
||||||
struct stat info;
|
|
||||||
|
|
||||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit", home);
|
|
||||||
if (!stat(startup_path_name, &info)) {
|
|
||||||
if (!(info.st_mode & S_IFDIR))
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
if (mkdir(startup_path_name, 0777)) {
|
|
||||||
std::cerr << std::endl << "**ERROR** couldn't create '" << startup_path_name << "'" << std::endl;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// set path-name for musrfit_startup.xml
|
// first check that $HOME/.musrfit exists and if NOT create it
|
||||||
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/musrfit_startup.xml", home);
|
struct stat info;
|
||||||
|
|
||||||
|
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit", home);
|
||||||
|
if (!stat(startup_path_name, &info)) {
|
||||||
|
if (!(info.st_mode & S_IFDIR))
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
if (mkdir(startup_path_name, 0777)) {
|
||||||
|
std::cerr << std::endl << "**ERROR** couldn't create '" << startup_path_name << "'" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set path-name for musrfit_startup.xml
|
||||||
|
snprintf(startup_path_name, sizeof(startup_path_name), "%s/.musrfit/musrfit_startup.xml", home);
|
||||||
|
}
|
||||||
|
|
||||||
std::ofstream fout(startup_path_name, std::ofstream::out);
|
std::ofstream fout(startup_path_name, std::ofstream::out);
|
||||||
if (!fout.is_open()) {
|
if (!fout.is_open()) {
|
||||||
@ -648,25 +663,36 @@ Bool_t PStartupHandler::WriteDefaultStartupFile()
|
|||||||
fout << " </comment>" << std::endl;
|
fout << " </comment>" << std::endl;
|
||||||
fout << " <data_path>/afs/psi.ch/project/nemu/data/his</data_path>" << std::endl;
|
fout << " <data_path>/afs/psi.ch/project/nemu/data/his</data_path>" << std::endl;
|
||||||
fout << " <data_path>/afs/psi.ch/project/nemu/data/wkm</data_path>" << std::endl;
|
fout << " <data_path>/afs/psi.ch/project/nemu/data/wkm</data_path>" << std::endl;
|
||||||
|
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/misc</data_path>" << std::endl;
|
||||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/gps</data_path>" << std::endl;
|
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/gps</data_path>" << std::endl;
|
||||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/dolly</data_path>" << std::endl;
|
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/dolly</data_path>" << std::endl;
|
||||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/gpd</data_path>" << std::endl;
|
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/gpd</data_path>" << std::endl;
|
||||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/ltf</data_path>" << std::endl;
|
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/ltf</data_path>" << std::endl;
|
||||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/alc</data_path>" << std::endl;
|
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/alc/td</data_path>" << std::endl;
|
||||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/hifi</data_path>" << std::endl;
|
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/hifi</data_path>" << std::endl;
|
||||||
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/lem</data_path>" << std::endl;
|
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/lem</data_path>" << std::endl;
|
||||||
|
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/flame</data_path>" << std::endl;
|
||||||
|
fout << " <!-- MISC/PSI 1985 - 1990 -->" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"misc\">d%yyyy%/deltat_misc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
|
fout << " <!-- ALC TD/PSI -->" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"alc\">d%yyyy%/deltat_zh_chem_%rrrr%.bin</run_name_template>" << std:: endl;
|
||||||
|
fout << " <run_name_template inst=\"alc\">d%yyyy%/deltat_tdc_alc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"alc\">d%yyyy%/tdc/deltat_tdc_alc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <!-- Dolly/PSI -->" << std::endl;
|
fout << " <!-- Dolly/PSI -->" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/root/deltat_tdc_dolly_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pie1/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pie1/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pie3/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pie3/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"dolly\">d%yyyy%/deltat_flc_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"dolly\">d%yyyy%/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pta/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pta/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/pta/deltat_pta_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
|
||||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/deltat_tdc_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/deltat_tdc_dolly_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/root/deltat_tdc_dolly_%rrrr%.root</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"dolly\">d%yyyy%/tdc/mdu/deltat_tdc_dolly_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||||
fout << " <!-- Flame/PSI -->" << std::endl;
|
fout << " <!-- Flame/PSI -->" << std::endl;
|
||||||
fout << " <run_name_template inst=\"flame\">d%yyyy%/tdc/root/deltat_tdc_flame_%yyyy%_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"flame\">d%yyyy%/tdc/root/deltat_tdc_flame_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"flame\">d%yyyy%/tdc/deltat_tdc_flame_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"flame\">d%yyyy%/tdc/mdu/deltat_tdc_flame_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||||
fout << " <!-- GPD/PSI -->" << std::endl;
|
fout << " <!-- GPD/PSI -->" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/root/deltat_tdc_gpd_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_mue1_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_mue1_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_fq_si_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_fq_si_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_strobo_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_strobo_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
@ -677,9 +703,11 @@ Bool_t PStartupHandler::WriteDefaultStartupFile()
|
|||||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_janis_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_pta_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/deltat_pta_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/pta/deltat_pta_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/deltat_tdc_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/deltat_tdc_gpd_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/root/deltat_tdc_gpd_%rrrr%.root</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gpd\">d%yyyy%/tdc/mdu/deltat_tdc_gpd_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||||
fout << " <!-- GPS/PSI -->" << std::endl;
|
fout << " <!-- GPS/PSI -->" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/root/deltat_tdc_gps_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_ccr_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_ccr_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_he3_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_he3_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_stutt_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_stutt_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
@ -690,13 +718,15 @@ Bool_t PStartupHandler::WriteDefaultStartupFile()
|
|||||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_oven2_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_oven2_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_pta_gps_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gps\">d%yyyy%/deltat_pta_gps_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/deltat_tdc_gps_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/deltat_tdc_gps_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/root/deltat_tdc_gps_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"gps\">d%yyyy%/tdc/mdu/deltat_tdc_gps_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||||
fout << " <!-- HAL-9500/PSI == HIFI/PSI -->" << std::endl;
|
fout << " <!-- HAL-9500/PSI == HIFI/PSI -->" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.root</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/deltat_hifi_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/deltat_hifi_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/tdc_hifi_%yyyy%_%rrrrr%.mdu</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/tdc_hifi_%yyyy%_%rrrrr%.mdu</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"hifi\">d%yyyy%/tdc/root/deltat_tdc_hifi_%yyyy%_%rrrr%.mdu</run_name_template>" << std::endl;
|
||||||
fout << " <!-- LTF/PSI -->" << std::endl;
|
fout << " <!-- LTF/PSI -->" << std::endl;
|
||||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
|
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_ltf2_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"ltf\">d%yyyy%/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/pta/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"ltf\">d%yyyy%/pta/deltat_pta_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
fout << " <run_name_template inst=\"ltf\">d%yyyy%/tdc/deltat_tdc_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
fout << " <run_name_template inst=\"ltf\">d%yyyy%/tdc/deltat_tdc_ltf_%rrrr%.bin</run_name_template>" << std::endl;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -43,6 +43,7 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
@ -99,7 +100,7 @@ void dump_header_syntax()
|
|||||||
std::cout << std::endl << " -s, --summary : this option is used for LE-uSR data sets only. It will, additionally";
|
std::cout << std::endl << " -s, --summary : this option is used for LE-uSR data sets only. It will, additionally";
|
||||||
std::cout << std::endl << " to the header information, print the summary file content.";
|
std::cout << std::endl << " to the header information, print the summary file content.";
|
||||||
std::cout << std::endl << " -i, --instrument <inst> : where <inst> is the requested instrument:";
|
std::cout << std::endl << " -i, --instrument <inst> : where <inst> is the requested instrument:";
|
||||||
std::cout << std::endl << " lem (default) | gps | ltf | dolly | gpd | hifi.";
|
std::cout << std::endl << " lem (default) | gps | ltf | dolly | gpd | hifi | flame.";
|
||||||
std::cout << std::endl << " -c, --counts : will show detector counts as well.";
|
std::cout << std::endl << " -c, --counts : will show detector counts as well.";
|
||||||
std::cout << std::endl << " -h, --help : will show this help";
|
std::cout << std::endl << " -h, --help : will show this help";
|
||||||
std::cout << std::endl << " -v, --version : will show the current version.";
|
std::cout << std::endl << " -v, --version : will show the current version.";
|
||||||
@ -145,12 +146,16 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
|||||||
fileType = DH_LEM_ROOT;
|
fileType = DH_LEM_ROOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<TMusrRunHeader> header;
|
||||||
|
bool ok;
|
||||||
|
Int_t ival;
|
||||||
|
|
||||||
if (fileType == DH_LEM_ROOT) { // ROOT (LEM)
|
if (fileType == DH_LEM_ROOT) { // ROOT (LEM)
|
||||||
// read header and check if some missing run info need to be fed
|
// read header and check if some missing run info need to be fed
|
||||||
TLemRunHeader *runHeader = dynamic_cast<TLemRunHeader*>(folder->FindObjectAny("TLemRunHeader"));
|
TLemRunHeader* runHeader = dynamic_cast<TLemRunHeader*>(folder->FindObjectAny("TLemRunHeader"));
|
||||||
|
|
||||||
// check if run header is valid
|
// check if run header is valid
|
||||||
if (!runHeader) {
|
if (runHeader == nullptr) {
|
||||||
std::cerr << std::endl << "**ERROR** Couldn't obtain run header info from ROOT file " << fileName << std::endl;
|
std::cerr << std::endl << "**ERROR** Couldn't obtain run header info from ROOT file " << fileName << std::endl;
|
||||||
f.Close();
|
f.Close();
|
||||||
return 1;
|
return 1;
|
||||||
@ -193,17 +198,9 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
|||||||
std::cout << std::endl << "First Good Bin : " << timeZero[0];
|
std::cout << std::endl << "First Good Bin : " << timeZero[0];
|
||||||
std::cout << std::endl << "Last Good Bin : " << runHeader->GetNChannels()-1;
|
std::cout << std::endl << "Last Good Bin : " << runHeader->GetNChannels()-1;
|
||||||
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
||||||
|
|
||||||
delete runHeader;
|
|
||||||
} else { // MusrRoot
|
} else { // MusrRoot
|
||||||
// invoke the MusrRoot header object
|
// invoke the MusrRoot header object
|
||||||
TMusrRunHeader *header = new TMusrRunHeader(fileName.c_str(), true); // read quite
|
header = std::make_unique<TMusrRunHeader>(fileName.c_str(), true); // read quite
|
||||||
if (header == 0) {
|
|
||||||
std::cerr << std::endl << "**ERROR** Couldn't invoke MusrRoot RunHeader in file:" << fileName;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
f.Close();
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// try to populate the MusrRoot header object
|
// try to populate the MusrRoot header object
|
||||||
if (!header->ExtractAll(folder)) {
|
if (!header->ExtractAll(folder)) {
|
||||||
@ -216,8 +213,6 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
|||||||
header->DumpHeader();
|
header->DumpHeader();
|
||||||
|
|
||||||
if (counts) {
|
if (counts) {
|
||||||
bool ok;
|
|
||||||
Int_t ival;
|
|
||||||
PIntVector ivec;
|
PIntVector ivec;
|
||||||
header->Get("RunInfo/No of Histos", ival, ok);
|
header->Get("RunInfo/No of Histos", ival, ok);
|
||||||
if (ok)
|
if (ok)
|
||||||
@ -226,8 +221,6 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
|||||||
if (ok)
|
if (ok)
|
||||||
redGreenOffset = ivec;
|
redGreenOffset = ivec;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete header;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// summary as well?
|
// summary as well?
|
||||||
@ -248,33 +241,54 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
|||||||
tstr = static_cast<TObjString*>(runSum->At(i));
|
tstr = static_cast<TObjString*>(runSum->At(i));
|
||||||
str = tstr->String();
|
str = tstr->String();
|
||||||
std::cout << str;
|
std::cout << str;
|
||||||
|
if (!str.Contains("\r") && !str.Contains("\n"))
|
||||||
|
std::cout << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// detector counts as well?
|
// detector counts as well?
|
||||||
if (counts && (fileType == DH_MUSR_ROOT)) {
|
if (counts && (fileType == DH_MUSR_ROOT)) {
|
||||||
// dump the detector counts
|
// dump the detector counts
|
||||||
std::cout << "Detector counts" << std::endl;
|
std::cout << "Detector counts (all, between fgb and lgb)" << std::endl;
|
||||||
f.GetObject("histos", folder);
|
f.GetObject("histos", folder);
|
||||||
if (folder != nullptr) {
|
if ((folder != nullptr) && (header != nullptr)) {
|
||||||
char detectorLabel[64];
|
char detectorLabel[64];
|
||||||
TH1F *histo{nullptr};
|
TH1F *histo{nullptr};
|
||||||
UInt_t total{0};
|
UInt_t total{0}, total_good{0}, ta, tg;
|
||||||
|
Int_t fgb, lgb;
|
||||||
for (UInt_t i=0; i<redGreenOffset.size(); i++) {
|
for (UInt_t i=0; i<redGreenOffset.size(); i++) {
|
||||||
std::cout << " Group " << i+1 << " (Offset=" << redGreenOffset[i] << ") : " << std::endl;
|
std::cout << " Group " << i+1 << " (Offset=" << redGreenOffset[i] << ") : " << std::endl;
|
||||||
total = 0;
|
total = 0;
|
||||||
|
total_good = 0;
|
||||||
for (UInt_t j=0; j<noOfHistos; j++) {
|
for (UInt_t j=0; j<noOfHistos; j++) {
|
||||||
|
// get fgb, lgb
|
||||||
|
fgb = -1;
|
||||||
|
snprintf(detectorLabel, sizeof(detectorLabel), "DetectorInfo/Detector%03d/First Good Bin", redGreenOffset[i]+j+1);
|
||||||
|
header->Get(detectorLabel, ival, ok);
|
||||||
|
if (ok) {
|
||||||
|
fgb = ival;
|
||||||
|
}
|
||||||
|
lgb = -1;
|
||||||
|
snprintf(detectorLabel, sizeof(detectorLabel), "DetectorInfo/Detector%03d/Last Good Bin", redGreenOffset[i]+j+1);
|
||||||
|
header->Get(detectorLabel, ival, ok);
|
||||||
|
if (ok) {
|
||||||
|
lgb = ival;
|
||||||
|
}
|
||||||
|
// get histo info
|
||||||
snprintf(detectorLabel, sizeof(detectorLabel), "hDecay%03d", redGreenOffset[i]+j+1);
|
snprintf(detectorLabel, sizeof(detectorLabel), "hDecay%03d", redGreenOffset[i]+j+1);
|
||||||
histo = (TH1F*) folder->FindObjectAny(detectorLabel);
|
histo = (TH1F*) folder->FindObjectAny(detectorLabel);
|
||||||
if (histo != nullptr) {
|
if (histo != nullptr) {
|
||||||
std::cout << " " << histo->GetTitle() << ":\t " << histo->GetEntries() << std::endl;
|
ta = histo->Integral(0, histo->GetNbinsX()+1);
|
||||||
total += histo->GetEntries();
|
tg = histo->Integral(fgb, lgb);
|
||||||
|
std::cout << " " << histo->GetTitle() << ":\t " << ta << ", " << tg << std::endl;
|
||||||
|
total += ta;
|
||||||
|
total_good += tg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i % 2 == 0)
|
if (i % 2 == 0)
|
||||||
std::cout << " total counts of group " << i+1 << ":\t\t\t " << total << std::endl;
|
std::cout << " total counts of group " << i+1 << ":\t\t\t " << total << ", " << total_good << std::endl;
|
||||||
else
|
else
|
||||||
std::cout << " total counts of group " << i+1 << ":\t\t\t\t\t " << total << std::endl;
|
std::cout << " total counts of group " << i+1 << ":\t\t\t\t\t " << total << ", " << total_good << std::endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::cout << "Sorry, no histos folder found" << std::endl;
|
std::cout << "Sorry, no histos folder found" << std::endl;
|
||||||
@ -293,32 +307,23 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
|
|||||||
* <p>dumps the header information of a NeXus file.
|
* <p>dumps the header information of a NeXus file.
|
||||||
*
|
*
|
||||||
* @param fileName file name of the NeXus file.
|
* @param fileName file name of the NeXus file.
|
||||||
|
* @param counts bool, if true dump detector counts
|
||||||
*
|
*
|
||||||
* @return 0 on success, 1 otherwise
|
* @return 0 on success, 1 otherwise
|
||||||
*/
|
*/
|
||||||
int dump_header_nexus(const std::string fileName) {
|
int dump_header_nexus(const std::string fileName, const bool counts) {
|
||||||
|
|
||||||
#ifdef PNEXUS_ENABLED
|
#ifdef PNEXUS_ENABLED
|
||||||
PNeXus *nxs_file = new PNeXus(fileName.c_str());
|
std::unique_ptr<PNeXus> nxs_file = std::make_unique<PNeXus>(fileName.c_str());
|
||||||
|
|
||||||
if (nxs_file == nullptr) {
|
|
||||||
std::cerr << std::endl;
|
|
||||||
std::cerr << "**ERROR** couldn't invoke NeXus file object." << std::endl;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nxs_file->IsValid(false)) {
|
if (nxs_file->IsValid(false)) {
|
||||||
nxs_file->Dump();
|
nxs_file->Dump(counts);
|
||||||
} else {
|
} else {
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
std::cerr << "**ERROR** found invalid NeXus file." << std::endl;
|
std::cerr << "**ERROR** found invalid NeXus file." << std::endl;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nxs_file)
|
|
||||||
delete nxs_file;
|
|
||||||
#else
|
#else
|
||||||
std::cout << std::endl << "NeXus not enabled, hence the header information cannot be dumped." << std::endl << std::endl;
|
std::cout << std::endl << "NeXus not enabled, hence the header information cannot be dumped." << std::endl << std::endl;
|
||||||
#endif
|
#endif
|
||||||
@ -395,10 +400,11 @@ std::vector<std::string> dump_header_instrument_info(std::string fileName)
|
|||||||
*
|
*
|
||||||
* @param fileName file name of the PSI-BIN
|
* @param fileName file name of the PSI-BIN
|
||||||
* @param fileFormat either PSI-BIN or PSI-MDU
|
* @param fileFormat either PSI-BIN or PSI-MDU
|
||||||
|
* @param counts bool, if true dump detector counts
|
||||||
*
|
*
|
||||||
* @return 0 on success, 1 otherwise
|
* @return 0 on success, 1 otherwise
|
||||||
*/
|
*/
|
||||||
int dump_header_psi_bin(const std::string fileName, const std::string fileFormat)
|
int dump_header_psi_bin(const std::string fileName, const std::string fileFormat, const bool counts)
|
||||||
{
|
{
|
||||||
MuSR_td_PSI_bin psiBin;
|
MuSR_td_PSI_bin psiBin;
|
||||||
int status;
|
int status;
|
||||||
@ -490,7 +496,8 @@ int dump_header_psi_bin(const std::string fileName, const std::string fileFormat
|
|||||||
std::cout << std::endl << "Time Zero Bin : " << psiBin.GetT0Int(i);
|
std::cout << std::endl << "Time Zero Bin : " << psiBin.GetT0Int(i);
|
||||||
std::cout << std::endl << "First Good Bin : " << psiBin.GetFirstGoodInt(i);
|
std::cout << std::endl << "First Good Bin : " << psiBin.GetFirstGoodInt(i);
|
||||||
std::cout << std::endl << "Last Good Bin : " << psiBin.GetLastGoodInt(i);
|
std::cout << std::endl << "Last Good Bin : " << psiBin.GetLastGoodInt(i);
|
||||||
std::cout << std::endl << "No of Events : " << psiBin.GetEventsHistoLong(i);
|
if (counts)
|
||||||
|
std::cout << std::endl << "No of Events : " << psiBin.GetEventsHistoLong(i);
|
||||||
}
|
}
|
||||||
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
||||||
|
|
||||||
@ -501,10 +508,11 @@ int dump_header_psi_bin(const std::string fileName, const std::string fileFormat
|
|||||||
/**
|
/**
|
||||||
* <p>dump the header information of a MUD file.
|
* <p>dump the header information of a MUD file.
|
||||||
* @param fileName file name of the MUD file
|
* @param fileName file name of the MUD file
|
||||||
|
* @param counts bool, if true dump detector counts
|
||||||
*
|
*
|
||||||
* @return 0 on success, 1 otherwise
|
* @return 0 on success, 1 otherwise
|
||||||
*/
|
*/
|
||||||
int dump_header_mud(const std::string fileName)
|
int dump_header_mud(const std::string fileName, const bool counts)
|
||||||
{
|
{
|
||||||
int fh;
|
int fh;
|
||||||
UINT32 type, val;
|
UINT32 type, val;
|
||||||
@ -669,6 +677,12 @@ int dump_header_mud(const std::string fileName)
|
|||||||
std::cout << std::endl << "Last Good Bin : " << val;
|
std::cout << std::endl << "Last Good Bin : " << val;
|
||||||
else
|
else
|
||||||
std::cout << std::endl << "Last Good Bin : ???";
|
std::cout << std::endl << "Last Good Bin : ???";
|
||||||
|
if (counts) {
|
||||||
|
success = MUD_getHistNumEvents( fh, i+1, &val );
|
||||||
|
if (success) {
|
||||||
|
std::cout << std::endl << "#Events : " << val;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
std::cout << std::endl << "-------------------" << std::endl << std::endl;
|
||||||
@ -873,7 +887,8 @@ int main(int argc, char *argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (strcmp(argv[i+1], "lem") && strcmp(argv[i+1], "gps") && strcmp(argv[i+1], "ltf") &&
|
if (strcmp(argv[i+1], "lem") && strcmp(argv[i+1], "gps") && strcmp(argv[i+1], "ltf") &&
|
||||||
strcmp(argv[i+1], "dolly") && strcmp(argv[i+1], "gpd") && strcmp(argv[i+1], "hifi")) {
|
strcmp(argv[i+1], "dolly") && strcmp(argv[i+1], "gpd") && strcmp(argv[i+1], "hifi") &&
|
||||||
|
strcmp(argv[i+1], "flame")) {
|
||||||
std::cerr << std::endl << "**ERROR** found --instrument with unkown instrument name: '" << argv[i+1] << "'!" << std::endl;
|
std::cerr << std::endl << "**ERROR** found --instrument with unkown instrument name: '" << argv[i+1] << "'!" << std::endl;
|
||||||
dump_header_syntax();
|
dump_header_syntax();
|
||||||
return 1;
|
return 1;
|
||||||
@ -902,40 +917,22 @@ int main(int argc, char *argv[])
|
|||||||
// invoke the startup handler in order to get the default search paths to the data files
|
// invoke the startup handler in order to get the default search paths to the data files
|
||||||
// read startup file
|
// read startup file
|
||||||
char startup_path_name[128];
|
char startup_path_name[128];
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
PStartupHandler *startupHandler = new PStartupHandler();
|
std::unique_ptr<PStartupHandler> startupHandler = std::make_unique<PStartupHandler>();
|
||||||
if (!startupHandler->StartupFileFound()) {
|
if (!startupHandler->StartupFileFound()) {
|
||||||
std::cerr << std::endl << ">> musrfit **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
std::cerr << std::endl << ">> musrfit **WARNING** couldn't find " << startupHandler->GetStartupFilePath().Data();
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = nullptr;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
strcpy(startup_path_name, startupHandler->GetStartupFilePath().Data());
|
||||||
saxParser->ConnectToHandler("PStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("PStartupHandler", startupHandler.get());
|
||||||
//status = saxParser->ParseFile(startup_path_name);
|
//status = saxParser->ParseFile(startup_path_name);
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
// use the parseXmlFile function instead (see PStartupHandler.cpp for the definition)
|
||||||
int status = parseXmlFile(saxParser, startup_path_name);
|
int status = parseXmlFile(saxParser.get(), startup_path_name);
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
std::cerr << std::endl << ">> musrfit **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
std::cerr << std::endl << ">> musrfit **WARNING** Reading/parsing musrfit_startup.xml failed.";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -944,7 +941,8 @@ int main(int argc, char *argv[])
|
|||||||
if (fileName == "") { // only look for runs if the file name is not explicitly given
|
if (fileName == "") { // only look for runs if the file name is not explicitly given
|
||||||
int yy = static_cast<int>(strtod(year.c_str(), static_cast<char**>(nullptr)));
|
int yy = static_cast<int>(strtod(year.c_str(), static_cast<char**>(nullptr)));
|
||||||
int run = static_cast<int>(strtod(runNo.c_str(), static_cast<char**>(nullptr)));
|
int run = static_cast<int>(strtod(runNo.c_str(), static_cast<char**>(nullptr)));
|
||||||
PFindRun findRun(startupHandler->GetDataPathList(), startupHandler->GetRunNameTemplateList(), instrument, yy, run);
|
PFindRun findRun(startupHandler->GetDataPathList(), startupHandler->GetRunNameTemplateList(),
|
||||||
|
instrument, yy, run, fileFormat);
|
||||||
if (findRun.FoundPathName()) {
|
if (findRun.FoundPathName()) {
|
||||||
pathFln = findRun.GetPathName().Data();
|
pathFln = findRun.GetPathName().Data();
|
||||||
} else {
|
} else {
|
||||||
@ -986,27 +984,17 @@ int main(int argc, char *argv[])
|
|||||||
dump_header_root(pathFln, summary, counts);
|
dump_header_root(pathFln, summary, counts);
|
||||||
} else if (boost::iequals(fileFormat, "NeXus")) {
|
} else if (boost::iequals(fileFormat, "NeXus")) {
|
||||||
#ifdef PNEXUS_ENABLED
|
#ifdef PNEXUS_ENABLED
|
||||||
dump_header_nexus(pathFln);
|
dump_header_nexus(pathFln, counts);
|
||||||
#else
|
#else
|
||||||
std::cout << std::endl << "Sorry, NeXus is not enabled, hence I cannot help you." << std::endl;
|
std::cout << std::endl << "Sorry, NeXus is not enabled, hence I cannot help you." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
} else if (boost::iequals(fileFormat, "PSI-BIN") || boost::iequals(fileFormat, "PSI-MDU")) {
|
} else if (boost::iequals(fileFormat, "PSI-BIN") || boost::iequals(fileFormat, "PSI-MDU")) {
|
||||||
dump_header_psi_bin(pathFln, fileFormat);
|
dump_header_psi_bin(pathFln, fileFormat, counts);
|
||||||
} else if (boost::iequals(fileFormat, "MUD")) {
|
} else if (boost::iequals(fileFormat, "MUD")) {
|
||||||
dump_header_mud(pathFln);
|
dump_header_mud(pathFln, counts);
|
||||||
} else if (boost::iequals(fileFormat, "WKM")) {
|
} else if (boost::iequals(fileFormat, "WKM")) {
|
||||||
dump_header_wkm(pathFln);
|
dump_header_wkm(pathFln);
|
||||||
}
|
}
|
||||||
|
|
||||||
// cleanup
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = nullptr;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
17
src/external/BMWtools/BMWIntegrator.h
vendored
17
src/external/BMWtools/BMWIntegrator.h
vendored
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
@ -88,10 +89,8 @@ inline double T2Integrator::IntegrateFunc(double x1, double x2, const std::vecto
|
|||||||
ptrPair.first = (this);
|
ptrPair.first = (this);
|
||||||
ptrPair.second = ∥
|
ptrPair.second = ∥
|
||||||
|
|
||||||
ROOT::Math::GSLIntegrator *integrator = new ROOT::Math::GSLIntegrator(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
|
std::unique_ptr<ROOT::Math::GSLIntegrator> integrator = std::make_unique<ROOT::Math::GSLIntegrator>(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
|
||||||
double value(integrator->Integral(&T2Integrator::FuncAtXgsl, static_cast<void*>(&ptrPair), x1, x2));
|
double value(integrator->Integral(&T2Integrator::FuncAtXgsl, static_cast<void*>(&ptrPair), x1, x2));
|
||||||
delete integrator;
|
|
||||||
integrator = nullptr;
|
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@ -115,7 +114,7 @@ class TIntegrator {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static double FuncAtXgsl(double, void *);
|
static double FuncAtXgsl(double, void *);
|
||||||
ROOT::Math::GSLIntegrator *fIntegrator; ///< pointer to the GSL integrator
|
std::unique_ptr<ROOT::Math::GSLIntegrator> fIntegrator; ///< pointer to the GSL integrator
|
||||||
mutable double (*fFunc)(double, void *); ///< pointer to the integrand function
|
mutable double (*fFunc)(double, void *); ///< pointer to the integrand function
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -125,7 +124,7 @@ class TIntegrator {
|
|||||||
* Allocation of memory for an integration using the adaptive 31 point Gauss-Kronrod rule
|
* Allocation of memory for an integration using the adaptive 31 point Gauss-Kronrod rule
|
||||||
*/
|
*/
|
||||||
inline TIntegrator::TIntegrator() : fFunc(0) {
|
inline TIntegrator::TIntegrator() : fFunc(0) {
|
||||||
fIntegrator = new ROOT::Math::GSLIntegrator(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
|
fIntegrator = std::make_unique<ROOT::Math::GSLIntegrator>(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -135,8 +134,6 @@ inline TIntegrator::TIntegrator() : fFunc(0) {
|
|||||||
*/
|
*/
|
||||||
inline TIntegrator::~TIntegrator(){
|
inline TIntegrator::~TIntegrator(){
|
||||||
fPar.clear();
|
fPar.clear();
|
||||||
delete fIntegrator;
|
|
||||||
fIntegrator=nullptr;
|
|
||||||
fFunc=0;
|
fFunc=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +187,7 @@ class TMCIntegrator {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static double FuncAtXgsl(double *, size_t, void *);
|
static double FuncAtXgsl(double *, size_t, void *);
|
||||||
ROOT::Math::GSLMCIntegrator *fMCIntegrator; ///< pointer to the GSL integrator
|
std::unique_ptr<ROOT::Math::GSLMCIntegrator> fMCIntegrator; ///< pointer to the GSL integrator
|
||||||
mutable double (*fFunc)(double *, size_t, void *); ///< pointer to the integrand function
|
mutable double (*fFunc)(double *, size_t, void *); ///< pointer to the integrand function
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -200,7 +197,7 @@ class TMCIntegrator {
|
|||||||
* Allocation of memory for an integration using the MISER algorithm of Press and Farrar
|
* Allocation of memory for an integration using the MISER algorithm of Press and Farrar
|
||||||
*/
|
*/
|
||||||
inline TMCIntegrator::TMCIntegrator() : fFunc(0) {
|
inline TMCIntegrator::TMCIntegrator() : fFunc(0) {
|
||||||
fMCIntegrator = new ROOT::Math::GSLMCIntegrator(ROOT::Math::MCIntegration::kMISER, 1.E-6, 1.E-4, 500000);
|
fMCIntegrator = std::make_unique<ROOT::Math::GSLMCIntegrator>(ROOT::Math::MCIntegration::kMISER, 1.E-6, 1.E-4, 500000);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -210,8 +207,6 @@ inline TMCIntegrator::TMCIntegrator() : fFunc(0) {
|
|||||||
*/
|
*/
|
||||||
inline TMCIntegrator::~TMCIntegrator(){
|
inline TMCIntegrator::~TMCIntegrator(){
|
||||||
fPar.clear();
|
fPar.clear();
|
||||||
delete fMCIntegrator;
|
|
||||||
fMCIntegrator=nullptr;
|
|
||||||
fFunc=0;
|
fFunc=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
src/external/BMWtools/BMWStartupHandler.cpp
vendored
2
src/external/BMWtools/BMWStartupHandler.cpp
vendored
@ -11,7 +11,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter, Bastian M. Wojek *
|
* Copyright (C) 2007-2024 by Andreas Suter, Bastian M. Wojek *
|
||||||
* *
|
* *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
2
src/external/BMWtools/BMWStartupHandler.h
vendored
2
src/external/BMWtools/BMWStartupHandler.h
vendored
@ -11,7 +11,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter, Bastian M. Wojek *
|
* Copyright (C) 2007-2024 by Andreas Suter, Bastian M. Wojek *
|
||||||
* *
|
* *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
190
src/external/BMWtools/TTrimSPDataHandler.cpp
vendored
190
src/external/BMWtools/TTrimSPDataHandler.cpp
vendored
@ -33,37 +33,33 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <memory>
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Constructor of the TrimSPData class -- reading all available trim.SP-rge-files with a given name into std::vectors
|
// Constructor of the TrimSPData class -- reading all available trim.SP-rge-files with a given name into std::vectors
|
||||||
//--------------------
|
//--------------------
|
||||||
|
|
||||||
TTrimSPData::TTrimSPData(const string &path, map<double, string> &energies, bool debug, unsigned int highRes) {
|
TTrimSPData::TTrimSPData(const std::string &path, std::map<double, std::string> &energies, bool debug, unsigned int highRes) {
|
||||||
|
|
||||||
// sort the energies in ascending order - this might be useful for later applications (energy-interpolations etc.)
|
// sort the energies in ascending order - this might be useful for later applications (energy-interpolations etc.)
|
||||||
// after the change from the vector to the map this is not necessary any more - since maps are always ordered!
|
// after the change from the vector to the map this is not necessary any more - since maps are always ordered!
|
||||||
// sort(energies.begin(), energies.end());
|
// sort(energies.begin(), energies.end());
|
||||||
|
|
||||||
double zz(0.0), nzz(0.0);
|
double zz(0.0), nzz(0.0);
|
||||||
vector<double> vzz, vnzz;
|
std::vector<double> vzz, vnzz;
|
||||||
string word, energyStr;
|
std::string word, energyStr;
|
||||||
bool goodFile(false);
|
bool goodFile(false);
|
||||||
|
|
||||||
for ( map<double, string>::const_iterator iter(energies.begin()); iter != energies.end(); ++iter ) {
|
for ( std::map<double, std::string>::const_iterator iter(energies.begin()); iter != energies.end(); ++iter ) {
|
||||||
|
|
||||||
energyStr = path + iter->second + ".rge";
|
energyStr = path + iter->second + ".rge";
|
||||||
|
|
||||||
ifstream *rgeFile = new ifstream(energyStr.c_str());
|
std::unique_ptr<std::ifstream> rgeFile = std::make_unique<std::ifstream>(energyStr.c_str());
|
||||||
if(! *rgeFile) {
|
if (rgeFile == nullptr) {
|
||||||
cerr << "TTrimSPData::TTrimSPData: file " << energyStr << " not found! Try next energy..." << endl;
|
std::cerr << "TTrimSPData::TTrimSPData: file " << energyStr << " not found! Try next energy..." << std::endl;
|
||||||
delete rgeFile;
|
|
||||||
rgeFile = 0;
|
|
||||||
} else {
|
} else {
|
||||||
|
while (*rgeFile >> word) {
|
||||||
while(*rgeFile >> word) {
|
if (word == "PARTICLES") {
|
||||||
if(word == "PARTICLES") {
|
|
||||||
goodFile = true;
|
goodFile = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -73,7 +69,7 @@ TTrimSPData::TTrimSPData(const string &path, map<double, string> &energies, bool
|
|||||||
|
|
||||||
fEnergy.push_back(iter->first);
|
fEnergy.push_back(iter->first);
|
||||||
|
|
||||||
while(!rgeFile->eof()) {
|
while (!rgeFile->eof()) {
|
||||||
*rgeFile >> zz >> nzz;
|
*rgeFile >> zz >> nzz;
|
||||||
vzz.push_back(zz);
|
vzz.push_back(zz);
|
||||||
vnzz.push_back(nzz);
|
vnzz.push_back(nzz);
|
||||||
@ -92,8 +88,6 @@ TTrimSPData::TTrimSPData(const string &path, map<double, string> &energies, bool
|
|||||||
|
|
||||||
|
|
||||||
rgeFile->close();
|
rgeFile->close();
|
||||||
delete rgeFile;
|
|
||||||
rgeFile = 0;
|
|
||||||
|
|
||||||
vzz.clear();
|
vzz.clear();
|
||||||
vnzz.clear();
|
vnzz.clear();
|
||||||
@ -106,14 +100,14 @@ TTrimSPData::TTrimSPData(const string &path, map<double, string> &energies, bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
cerr << "TTrimSPData::TTrimSPData: " << energyStr << " does not seem to be a valid unmodified TRIM.SP output file!" << endl;
|
std::cerr << "TTrimSPData::TTrimSPData: " << energyStr << " does not seem to be a valid unmodified TRIM.SP output file!" << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
cout << "TTrimSPData::TTrimSPData: Read in " << fDataNZ.size() << " implantation profiles in total." << endl;
|
std::cout << "TTrimSPData::TTrimSPData: Read in " << fDataNZ.size() << " implantation profiles in total." << std::endl;
|
||||||
|
|
||||||
fOrigDataNZ = fDataNZ;
|
fOrigDataNZ = fDataNZ;
|
||||||
|
|
||||||
@ -126,8 +120,8 @@ TTrimSPData::TTrimSPData(const string &path, map<double, string> &energies, bool
|
|||||||
// If it is not found the energy iterator will point to the end() of the energy vector.
|
// If it is not found the energy iterator will point to the end() of the energy vector.
|
||||||
|
|
||||||
void TTrimSPData::FindEnergy(double e) const {
|
void TTrimSPData::FindEnergy(double e) const {
|
||||||
for(fEnergyIter = fEnergy.begin(); fEnergyIter != fEnergy.end(); ++fEnergyIter) {
|
for (fEnergyIter = fEnergy.begin(); fEnergyIter != fEnergy.end(); ++fEnergyIter) {
|
||||||
if(fabs(*fEnergyIter - e) < 0.05)
|
if (fabs(*fEnergyIter - e) < 0.05)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -137,11 +131,11 @@ void TTrimSPData::UseHighResolution(double e) {
|
|||||||
|
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
vector<double> vecZ;
|
std::vector<double> vecZ;
|
||||||
vector<double> vecNZ;
|
std::vector<double> vecNZ;
|
||||||
for(double zz(1.); zz<2100.; zz+=1.) {
|
for (double zz(1.); zz<2100.; zz+=1.) {
|
||||||
vecZ.push_back(zz);
|
vecZ.push_back(zz);
|
||||||
vecNZ.push_back(GetNofZ(zz/10.0, e));
|
vecNZ.push_back(GetNofZ(zz/10.0, e));
|
||||||
}
|
}
|
||||||
@ -153,7 +147,7 @@ void TTrimSPData::UseHighResolution(double e) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "TTrimSPData::DataZ: No implantation profile available for the specified energy... Nothing happens." << endl;
|
std::cout << "TTrimSPData::DataZ: No implantation profile available for the specified energy... Nothing happens." << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,16 +155,16 @@ void TTrimSPData::UseHighResolution(double e) {
|
|||||||
// Method returning z-vector calculated by trim.SP for given energy[keV]
|
// Method returning z-vector calculated by trim.SP for given energy[keV]
|
||||||
//---------------------
|
//---------------------
|
||||||
|
|
||||||
vector<double> TTrimSPData::DataZ(double e) const {
|
std::vector<double> TTrimSPData::DataZ(double e) const {
|
||||||
|
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
return fDataZ[i];
|
return fDataZ[i];
|
||||||
}
|
}
|
||||||
// default
|
// default
|
||||||
cout << "TTrimSPData::DataZ: No implantation profile available for the specified energy... You get back the first one." << endl;
|
std::cout << "TTrimSPData::DataZ: No implantation profile available for the specified energy... You get back the first one." << std::endl;
|
||||||
return fDataZ[0];
|
return fDataZ[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,50 +173,50 @@ vector<double> TTrimSPData::DataZ(double e) const {
|
|||||||
// potentially altered by the WeightLayers- or the Normalize-method for given energy[keV]
|
// potentially altered by the WeightLayers- or the Normalize-method for given energy[keV]
|
||||||
//---------------------
|
//---------------------
|
||||||
|
|
||||||
vector<double> TTrimSPData::DataNZ(double e) const {
|
std::vector<double> TTrimSPData::DataNZ(double e) const {
|
||||||
|
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
return fDataNZ[i];
|
return fDataNZ[i];
|
||||||
}
|
}
|
||||||
// default
|
// default
|
||||||
cout << "TTrimSPData::DataNZ: No implantation profile available for the specified energy... You get back the first one." << endl;
|
std::cout << "TTrimSPData::DataNZ: No implantation profile available for the specified energy... You get back the first one." << std::endl;
|
||||||
return fDataNZ[0];
|
|
||||||
|
|
||||||
|
return fDataNZ[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------
|
//---------------------
|
||||||
// Method returning original n(z)-vector calculated by trim.SP for given energy[keV]
|
// Method returning original n(z)-vector calculated by trim.SP for given energy[keV]
|
||||||
//---------------------
|
//---------------------
|
||||||
|
|
||||||
vector<double> TTrimSPData::OrigDataNZ(double e) const {
|
std::vector<double> TTrimSPData::OrigDataNZ(double e) const {
|
||||||
|
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
return fOrigDataNZ[i];
|
return fOrigDataNZ[i];
|
||||||
}
|
}
|
||||||
// default
|
// default
|
||||||
cout << "TTrimSPData::OrigDataNZ: No implantation profile available for the specified energy... You get back the first one." << endl;
|
std::cout << "TTrimSPData::OrigDataNZ: No implantation profile available for the specified energy... You get back the first one." << std::endl;
|
||||||
return fOrigDataNZ[0];
|
|
||||||
|
|
||||||
|
return fOrigDataNZ[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
double TTrimSPData::DataDZ(double e) const {
|
double TTrimSPData::DataDZ(double e) const {
|
||||||
|
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
return fDZ[i];
|
return fDZ[i];
|
||||||
}
|
}
|
||||||
// default
|
// default
|
||||||
cout << "TTrimSPData::DataDZ: No implantation profile available for the specified energy... The resolution will be zero!" << endl;
|
std::cout << "TTrimSPData::DataDZ: No implantation profile available for the specified energy... The resolution will be zero!" << std::endl;
|
||||||
return 0.0;
|
|
||||||
|
|
||||||
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------
|
//---------------------
|
||||||
@ -230,10 +224,10 @@ double TTrimSPData::DataDZ(double e) const {
|
|||||||
// Parameters: Energy[keV], LayerNumber[1], Interfaces[nm]
|
// Parameters: Energy[keV], LayerNumber[1], Interfaces[nm]
|
||||||
//---------------------
|
//---------------------
|
||||||
|
|
||||||
double TTrimSPData::LayerFraction(double e, unsigned int layno, const vector<double>& interface) const {
|
double TTrimSPData::LayerFraction(double e, unsigned int layno, const std::vector<double>& interface) const {
|
||||||
|
|
||||||
if(layno < 1 && layno > (interface.size()+1)) {
|
if (layno < 1 && layno > (interface.size()+1)) {
|
||||||
cout << "TTrimSPData::LayerFraction: No such layer available according to your specified interfaces... Returning 0.0!" << endl;
|
std::cout << "TTrimSPData::LayerFraction: No such layer available according to your specified interfaces... Returning 0.0!" << std::endl;
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,21 +238,21 @@ double TTrimSPData::LayerFraction(double e, unsigned int layno, const vector<dou
|
|||||||
// Because we do not know if the implantation profile is normalized or not, do not care about this and calculate the fraction from the beginning
|
// Because we do not know if the implantation profile is normalized or not, do not care about this and calculate the fraction from the beginning
|
||||||
// Total "number of muons"
|
// Total "number of muons"
|
||||||
double totalNumber(0.0);
|
double totalNumber(0.0);
|
||||||
for(unsigned int j(0); j<fDataZ[i].size(); j++)
|
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||||
totalNumber += fDataNZ[i][j];
|
totalNumber += fDataNZ[i][j];
|
||||||
// "number of muons" in layer layno
|
// "number of muons" in layer layno
|
||||||
double layerNumber(0.0);
|
double layerNumber(0.0);
|
||||||
if(!(layno-1)){
|
if (!(layno-1)){
|
||||||
for(unsigned int j(0); j<fDataZ[i].size(); j++)
|
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||||
if(fDataZ[i][j] < interface[0]*10.0)
|
if (fDataZ[i][j] < interface[0]*10.0)
|
||||||
layerNumber += fDataNZ[i][j];
|
layerNumber += fDataNZ[i][j];
|
||||||
} else if(!(layno-interface.size()-1)){
|
} else if (!(layno-interface.size()-1)) {
|
||||||
for(unsigned int j(0); j<fDataZ[i].size(); j++)
|
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||||
if(fDataZ[i][j] >= *(interface.end()-1)*10.0)
|
if (fDataZ[i][j] >= *(interface.end()-1)*10.0)
|
||||||
layerNumber += fDataNZ[i][j];
|
layerNumber += fDataNZ[i][j];
|
||||||
} else {
|
} else {
|
||||||
for(unsigned int j(0); j<fDataZ[i].size(); j++)
|
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||||
if(fDataZ[i][j] >= interface[layno-2]*10.0 && fDataZ[i][j] < interface[layno-1]*10.0)
|
if (fDataZ[i][j] >= interface[layno-2]*10.0 && fDataZ[i][j] < interface[layno-1]*10.0)
|
||||||
layerNumber += fDataNZ[i][j];
|
layerNumber += fDataNZ[i][j];
|
||||||
}
|
}
|
||||||
// fraction of muons in layer layno
|
// fraction of muons in layer layno
|
||||||
@ -267,9 +261,9 @@ double TTrimSPData::LayerFraction(double e, unsigned int layno, const vector<dou
|
|||||||
}
|
}
|
||||||
|
|
||||||
// default
|
// default
|
||||||
cout << "TTrimSPData::LayerFraction: No implantation profile available for the specified energy " << e << " keV... Returning 0.0" << endl;
|
std::cout << "TTrimSPData::LayerFraction: No implantation profile available for the specified energy " << e << " keV... Returning 0.0" << std::endl;
|
||||||
return 0.0;
|
|
||||||
|
|
||||||
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------
|
//---------------------
|
||||||
@ -280,30 +274,30 @@ double TTrimSPData::LayerFraction(double e, unsigned int layno, const vector<dou
|
|||||||
// the first and last layers get the full n(z), where only one third of the muons in the second layer will be taken into account
|
// the first and last layers get the full n(z), where only one third of the muons in the second layer will be taken into account
|
||||||
//---------------------
|
//---------------------
|
||||||
|
|
||||||
void TTrimSPData::WeightLayers(double e, const vector<double>& interface, const vector<double>& weight) const {
|
void TTrimSPData::WeightLayers(double e, const std::vector<double>& interface, const std::vector<double>& weight) const {
|
||||||
|
|
||||||
if(weight.size()-interface.size()-1) {
|
if (weight.size()-interface.size()-1) {
|
||||||
cout << "TTrimSPData::WeightLayers: For the weighting the number of interfaces has to be one less than the number of weights!" << endl;
|
std::cout << "TTrimSPData::WeightLayers: For the weighting the number of interfaces has to be one less than the number of weights!" << std::endl;
|
||||||
cout << "TTrimSPData::WeightLayers: No weighting of the implantation profile will be done unless you take care of that!" << endl;
|
std::cout << "TTrimSPData::WeightLayers: No weighting of the implantation profile will be done unless you take care of that!" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(unsigned int i(0); i<interface.size(); i++) {
|
for (unsigned int i(0); i<interface.size(); i++) {
|
||||||
if (interface[i]<0.0) {
|
if (interface[i]<0.0) {
|
||||||
cout << "TTrimSPData::WeightLayers: One of your layer interfaces has a negative coordinate! - No weighting will be done!" << endl;
|
std::cout << "TTrimSPData::WeightLayers: One of your layer interfaces has a negative coordinate! - No weighting will be done!" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (i>1) {
|
else if (i>1) {
|
||||||
if (interface[i]<interface[i-1]) {
|
if (interface[i]<interface[i-1]) {
|
||||||
cout << "TTrimSPData::WeightLayers: The specified interfaces appear to be not in ascending order! - No weighting will be done!" << endl;
|
std::cout << "TTrimSPData::WeightLayers: The specified interfaces appear to be not in ascending order! - No weighting will be done!" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(unsigned int i(0); i<weight.size(); i++) {
|
for (unsigned int i(0); i<weight.size(); i++) {
|
||||||
if (weight[i]>1.0 || weight[i]<0.0) {
|
if (weight[i]>1.0 || weight[i]<0.0) {
|
||||||
cout << "TTrimSPData::WeightLayers: At least one of the specified weights is out of range - no weighting will be done!" << endl;
|
std::cout << "TTrimSPData::WeightLayers: At least one of the specified weights is out of range - no weighting will be done!" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -311,11 +305,11 @@ void TTrimSPData::WeightLayers(double e, const vector<double>& interface, const
|
|||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
// If all weights are equal to one, use the original n(z) vector
|
// If all weights are equal to one, use the original n(z) vector
|
||||||
for(unsigned int i(0); i<weight.size(); i++) {
|
for (unsigned int i(0); i<weight.size(); i++) {
|
||||||
if(weight[i]-1.0)
|
if (weight[i]-1.0)
|
||||||
break;
|
break;
|
||||||
if(i == weight.size() - 1) {
|
if (i == weight.size() - 1) {
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int j(fEnergyIter - fEnergy.begin());
|
unsigned int j(fEnergyIter - fEnergy.begin());
|
||||||
fDataNZ[j] = fOrigDataNZ[j];
|
fDataNZ[j] = fOrigDataNZ[j];
|
||||||
fIsNormalized[j] = false;
|
fIsNormalized[j] = false;
|
||||||
@ -324,12 +318,12 @@ void TTrimSPData::WeightLayers(double e, const vector<double>& interface, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
unsigned int k(0);
|
unsigned int k(0);
|
||||||
for(unsigned int j(0); j<fDataZ[i].size(); j++) {
|
for (unsigned int j(0); j<fDataZ[i].size(); j++) {
|
||||||
if(k<interface.size()) {
|
if (k<interface.size()) {
|
||||||
if(fDataZ[i][j] < interface[k]*10.0)
|
if (fDataZ[i][j] < interface[k]*10.0)
|
||||||
fDataNZ[i][j] = fOrigDataNZ[i][j]*weight[k];
|
fDataNZ[i][j] = fOrigDataNZ[i][j]*weight[k];
|
||||||
else {
|
else {
|
||||||
k++;
|
k++;
|
||||||
@ -339,11 +333,11 @@ void TTrimSPData::WeightLayers(double e, const vector<double>& interface, const
|
|||||||
else
|
else
|
||||||
fDataNZ[i][j] = fOrigDataNZ[i][j]*weight[k];
|
fDataNZ[i][j] = fOrigDataNZ[i][j]*weight[k];
|
||||||
}
|
}
|
||||||
fIsNormalized[i] = false;
|
fIsNormalized[i] = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "TTrimSPData::WeightLayers: No implantation profile available for the specified energy... No weighting done." << endl;
|
std::cout << "TTrimSPData::WeightLayers: No implantation profile available for the specified energy... No weighting done." << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,20 +347,20 @@ void TTrimSPData::WeightLayers(double e, const vector<double>& interface, const
|
|||||||
|
|
||||||
double TTrimSPData::GetNofZ(double zz, double e) const {
|
double TTrimSPData::GetNofZ(double zz, double e) const {
|
||||||
|
|
||||||
vector<double> z, nz;
|
std::vector<double> z, nz;
|
||||||
|
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
z = fDataZ[i];
|
z = fDataZ[i];
|
||||||
nz = fDataNZ[i];
|
nz = fDataNZ[i];
|
||||||
} else {
|
} else {
|
||||||
cout << "TTrimSPData::GetNofZ: No implantation profile available for the specified energy " << e << " keV... Quitting!" << endl;
|
std::cout << "TTrimSPData::GetNofZ: No implantation profile available for the specified energy " << e << " keV... Quitting!" << std::endl;
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(zz < 0)
|
if (zz < 0)
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@ -395,7 +389,7 @@ void TTrimSPData::Normalize(double e) const {
|
|||||||
|
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
double nZsum = 0.0;
|
double nZsum = 0.0;
|
||||||
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
for (unsigned int j(0); j<fDataZ[i].size(); j++)
|
||||||
@ -408,9 +402,9 @@ void TTrimSPData::Normalize(double e) const {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// default
|
// default
|
||||||
cout << "TTrimSPData::Normalize: No implantation profile available for the specified energy... No normalization done." << endl;
|
std::cout << "TTrimSPData::Normalize: No implantation profile available for the specified energy... No normalization done." << std::endl;
|
||||||
return;
|
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------
|
//---------------------
|
||||||
@ -420,12 +414,12 @@ void TTrimSPData::Normalize(double e) const {
|
|||||||
bool TTrimSPData::IsNormalized(double e) const {
|
bool TTrimSPData::IsNormalized(double e) const {
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
return fIsNormalized[i];
|
return fIsNormalized[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "TTrimSPData::IsNormalized: No implantation profile available for the specified energy... Returning false! Check your code!" << endl;
|
std::cout << "TTrimSPData::IsNormalized: No implantation profile available for the specified energy... Returning false! Check your code!" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,19 +430,19 @@ bool TTrimSPData::IsNormalized(double e) const {
|
|||||||
double TTrimSPData::MeanRange(double e) const {
|
double TTrimSPData::MeanRange(double e) const {
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
if (!fIsNormalized[i])
|
if (!fIsNormalized[i])
|
||||||
Normalize(e);
|
Normalize(e);
|
||||||
double mean(0.0);
|
double mean(0.0);
|
||||||
for(unsigned int j(0); j<fDataNZ[i].size(); j++){
|
for (unsigned int j(0); j<fDataNZ[i].size(); j++){
|
||||||
mean += fDataNZ[i][j]*fDataZ[i][j];
|
mean += fDataNZ[i][j]*fDataZ[i][j];
|
||||||
}
|
}
|
||||||
mean *= fDZ[i]/10.0;
|
mean *= fDZ[i]/10.0;
|
||||||
return mean;
|
return mean;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "TTrimSPData::MeanRange: No implantation profile available for the specified energy... Returning -1! Check your code!" << endl;
|
std::cout << "TTrimSPData::MeanRange: No implantation profile available for the specified energy... Returning -1! Check your code!" << std::endl;
|
||||||
return -1.;
|
return -1.;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,21 +454,21 @@ double TTrimSPData::PeakRange(double e) const {
|
|||||||
|
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
|
|
||||||
vector<double>::const_iterator nziter;
|
std::vector<double>::const_iterator nziter;
|
||||||
nziter = max_element(fDataNZ[i].begin(),fDataNZ[i].end());
|
nziter = max_element(fDataNZ[i].begin(),fDataNZ[i].end());
|
||||||
|
|
||||||
if(nziter != fDataNZ[i].end()){
|
if (nziter != fDataNZ[i].end()){
|
||||||
unsigned int j(nziter - fDataNZ[i].begin());
|
unsigned int j(nziter - fDataNZ[i].begin());
|
||||||
return fDataZ[i][j]/10.0;
|
return fDataZ[i][j]/10.0;
|
||||||
}
|
}
|
||||||
cout << "TTrimSPData::PeakRange: No maximum found in the implantation profile... Returning -1! Please check the profile!" << endl;
|
std::cout << "TTrimSPData::PeakRange: No maximum found in the implantation profile... Returning -1! Please check the profile!" << std::endl;
|
||||||
return -1.;
|
return -1.;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "TTrimSPData::PeakRange: No implantation profile available for the specified energy... Returning -1! Check your code!" << endl;
|
std::cout << "TTrimSPData::PeakRange: No implantation profile available for the specified energy... Returning -1! Check your code!" << std::endl;
|
||||||
return -1.;
|
return -1.;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -484,26 +478,26 @@ double TTrimSPData::PeakRange(double e) const {
|
|||||||
//---------------------
|
//---------------------
|
||||||
|
|
||||||
void TTrimSPData::ConvolveGss(double w, double e) const {
|
void TTrimSPData::ConvolveGss(double w, double e) const {
|
||||||
if(!w)
|
if (!w)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
vector<double> z, nz, gss;
|
std::vector<double> z, nz, gss;
|
||||||
double nn;
|
double nn;
|
||||||
|
|
||||||
FindEnergy(e);
|
FindEnergy(e);
|
||||||
|
|
||||||
if(fEnergyIter != fEnergy.end()) {
|
if (fEnergyIter != fEnergy.end()) {
|
||||||
unsigned int i(fEnergyIter - fEnergy.begin());
|
unsigned int i(fEnergyIter - fEnergy.begin());
|
||||||
z = fDataZ[i];
|
z = fDataZ[i];
|
||||||
nz = fDataNZ[i];
|
nz = fDataNZ[i];
|
||||||
|
|
||||||
for(unsigned int k(0); k<z.size(); k++) {
|
for (unsigned int k(0); k<z.size(); k++) {
|
||||||
gss.push_back(exp(-z[k]*z[k]/200.0/w/w));
|
gss.push_back(exp(-z[k]*z[k]/200.0/w/w));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(unsigned int k(0); k<nz.size(); k++) {
|
for (unsigned int k(0); k<nz.size(); k++) {
|
||||||
nn = 0.0;
|
nn = 0.0;
|
||||||
for(unsigned int j(0); j<nz.size(); j++) {
|
for (unsigned int j(0); j<nz.size(); j++) {
|
||||||
nn += nz[j]*gss[abs(int(k)-int(j))];
|
nn += nz[j]*gss[abs(int(k)-int(j))];
|
||||||
}
|
}
|
||||||
fDataNZ[i][k] = nn;
|
fDataNZ[i][k] = nn;
|
||||||
@ -514,6 +508,6 @@ void TTrimSPData::ConvolveGss(double w, double e) const {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "TTrimSPData::ConvolveGss: No implantation profile available for the specified energy... No convolution done!" << endl;
|
std::cout << "TTrimSPData::ConvolveGss: No implantation profile available for the specified energy... No convolution done!" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
29
src/external/BMWtools/TTrimSPDataHandler.h
vendored
29
src/external/BMWtools/TTrimSPDataHandler.h
vendored
@ -32,7 +32,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Class used to handle a set of low energy muon implantation profiles
|
* <p>Class used to handle a set of low energy muon implantation profiles
|
||||||
@ -41,7 +40,7 @@ class TTrimSPData {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TTrimSPData(const string&, map<double, string>&, bool debug = false, unsigned int highRes = 0);
|
TTrimSPData(const std::string&, std::map<double, std::string>&, bool debug = false, unsigned int highRes = 0);
|
||||||
|
|
||||||
~TTrimSPData() {
|
~TTrimSPData() {
|
||||||
fDataZ.clear();
|
fDataZ.clear();
|
||||||
@ -52,15 +51,15 @@ public:
|
|||||||
fIsNormalized.clear();
|
fIsNormalized.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<double> Energy() const {return fEnergy;}
|
std::vector<double> Energy() const {return fEnergy;}
|
||||||
vector<double> DataZ(double) const;
|
std::vector<double> DataZ(double) const;
|
||||||
vector<double> DataNZ(double) const;
|
std::vector<double> DataNZ(double) const;
|
||||||
vector<double> OrigDataNZ(double) const;
|
std::vector<double> OrigDataNZ(double) const;
|
||||||
double DataDZ(double) const;
|
double DataDZ(double) const;
|
||||||
void UseHighResolution(double);
|
void UseHighResolution(double);
|
||||||
void SetOriginal() {fOrigDataNZ = fDataNZ;}
|
void SetOriginal() {fOrigDataNZ = fDataNZ;}
|
||||||
void WeightLayers(double, const vector<double>&, const vector<double>&) const;
|
void WeightLayers(double, const std::vector<double>&, const std::vector<double>&) const;
|
||||||
double LayerFraction(double, unsigned int, const vector<double>&) const;
|
double LayerFraction(double, unsigned int, const std::vector<double>&) const;
|
||||||
double GetNofZ(double, double) const;
|
double GetNofZ(double, double) const;
|
||||||
void Normalize(double) const;
|
void Normalize(double) const;
|
||||||
bool IsNormalized(double) const;
|
bool IsNormalized(double) const;
|
||||||
@ -71,13 +70,13 @@ public:
|
|||||||
private:
|
private:
|
||||||
void FindEnergy(double) const;
|
void FindEnergy(double) const;
|
||||||
|
|
||||||
vector<double> fEnergy; ///< vector holding all available muon energies
|
std::vector<double> fEnergy; ///< vector holding all available muon energies
|
||||||
vector<double> fDZ; ///< vector holding the spatial resolution of the TRIM.SP output for all energies
|
std::vector<double> fDZ; ///< vector holding the spatial resolution of the TRIM.SP output for all energies
|
||||||
vector< vector<double> > fDataZ; ///< discrete points in real space for which n(z) has been calculated for all energies
|
std::vector< std::vector<double> > fDataZ; ///< discrete points in real space for which n(z) has been calculated for all energies
|
||||||
mutable vector< vector<double> > fDataNZ; ///< n(z) for all energies
|
mutable std::vector< std::vector<double> > fDataNZ; ///< n(z) for all energies
|
||||||
vector< vector<double> > fOrigDataNZ; ///< original (unmodified) implantation profiles for all energies as read in from rge-files
|
std::vector< std::vector<double> > fOrigDataNZ; ///< original (unmodified) implantation profiles for all energies as read in from rge-files
|
||||||
mutable vector<bool> fIsNormalized; ///< tag indicating if the implantation profiles are normalized (for each energy separately)
|
mutable std::vector<bool> fIsNormalized; ///< tag indicating if the implantation profiles are normalized (for each energy separately)
|
||||||
mutable vector<double>::const_iterator fEnergyIter; ///< iterator traversing the vector of available energies
|
mutable std::vector<double>::const_iterator fEnergyIter; ///< iterator traversing the vector of available energies
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _TTrimSPDataHandler_H_
|
#endif // _TTrimSPDataHandler_H_
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2013-2023 by Andreas Suter *
|
* Copyright (C) 2013-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2013-2023 by Andreas Suter *
|
* Copyright (C) 2013-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2013-2023 by Andreas Suter *
|
* Copyright (C) 2013-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2013-2023 by Andreas Suter *
|
* Copyright (C) 2013-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2011-2023 by Andreas Suter *
|
* Copyright (C) 2011-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2011-2023 by Andreas Suter *
|
* Copyright (C) 2011-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2011-2023 by Andreas Suter *
|
* Copyright (C) 2011-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
2
src/external/MagProximity/PMagProximity.h
vendored
2
src/external/MagProximity/PMagProximity.h
vendored
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2011-2023 by Andreas Suter *
|
* Copyright (C) 2011-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2011-2023 by Andreas Suter *
|
* Copyright (C) 2011-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -59,14 +59,14 @@ PMagProximityFitterGlobal::PMagProximityFitterGlobal()
|
|||||||
|
|
||||||
// read XML startup file
|
// read XML startup file
|
||||||
char startup_path_name[128];
|
char startup_path_name[128];
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
PMPStartupHandler *fStartupHandler = new PMPStartupHandler();
|
fStartupHandler = std::make_unique<PMPStartupHandler>();
|
||||||
strcpy(startup_path_name, fStartupHandler->GetStartupFilePath().Data());
|
strcpy(startup_path_name, fStartupHandler->GetStartupFilePath().Data());
|
||||||
saxParser->ConnectToHandler("PMPStartupHandler", fStartupHandler);
|
saxParser->ConnectToHandler("PMPStartupHandler", fStartupHandler.get());
|
||||||
//Int_t status = saxParser->ParseFile(startup_path_name);
|
//Int_t status = saxParser->ParseFile(startup_path_name);
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
||||||
Int_t status = parseXmlFile(saxParser, startup_path_name);
|
Int_t status = parseXmlFile(saxParser.get(), startup_path_name);
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
std::cout << std::endl << ">> PMagProximityFitterGlobal::PMagProximityFitterGlobal: **WARNING** Reading/parsing mag_proximity_startup.xml failed.";
|
std::cout << std::endl << ">> PMagProximityFitterGlobal::PMagProximityFitterGlobal: **WARNING** Reading/parsing mag_proximity_startup.xml failed.";
|
||||||
@ -74,12 +74,6 @@ PMagProximityFitterGlobal::PMagProximityFitterGlobal()
|
|||||||
fValid = false;
|
fValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if everything went fine with the startup handler
|
// check if everything went fine with the startup handler
|
||||||
if (!fStartupHandler->IsValid()) {
|
if (!fStartupHandler->IsValid()) {
|
||||||
std::cout << std::endl << ">> PMagProximityFitterGlobal::PMagProximityFitterGlobal **PANIC ERROR**";
|
std::cout << std::endl << ">> PMagProximityFitterGlobal::PMagProximityFitterGlobal **PANIC ERROR**";
|
||||||
@ -89,7 +83,7 @@ PMagProximityFitterGlobal::PMagProximityFitterGlobal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// load all the TRIM.SP rge-files
|
// load all the TRIM.SP rge-files
|
||||||
fRgeHandler = new PRgeHandler();
|
fRgeHandler = std::make_unique<PRgeHandler>();
|
||||||
if (!fRgeHandler->IsValid()) {
|
if (!fRgeHandler->IsValid()) {
|
||||||
std::cout << std::endl << ">> PMagProximityFitterGlobal::PMagProximityFitterGlobal **PANIC ERROR**";
|
std::cout << std::endl << ">> PMagProximityFitterGlobal::PMagProximityFitterGlobal **PANIC ERROR**";
|
||||||
std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
|
std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
|
||||||
@ -109,15 +103,6 @@ PMagProximityFitterGlobal::~PMagProximityFitterGlobal()
|
|||||||
fPreviousParam.clear();
|
fPreviousParam.clear();
|
||||||
|
|
||||||
fField.clear();
|
fField.clear();
|
||||||
|
|
||||||
if (fRgeHandler) {
|
|
||||||
delete fRgeHandler;
|
|
||||||
fRgeHandler = nullptr;
|
|
||||||
}
|
|
||||||
if (fStartupHandler) {
|
|
||||||
delete fStartupHandler;
|
|
||||||
fStartupHandler = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -30,6 +30,8 @@
|
|||||||
#ifndef _PMAGPROXIMITYFITTER_H_
|
#ifndef _PMAGPROXIMITYFITTER_H_
|
||||||
#define _PMAGPROXIMITYFITTER_H_
|
#define _PMAGPROXIMITYFITTER_H_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "PUserFcnBase.h"
|
#include "PUserFcnBase.h"
|
||||||
#include "PMPStartupHandler.h"
|
#include "PMPStartupHandler.h"
|
||||||
#include "PRgeHandler.h"
|
#include "PRgeHandler.h"
|
||||||
@ -49,8 +51,8 @@ class PMagProximityFitterGlobal
|
|||||||
private:
|
private:
|
||||||
Bool_t fValid;
|
Bool_t fValid;
|
||||||
|
|
||||||
PMPStartupHandler *fStartupHandler;
|
std::unique_ptr<PMPStartupHandler> fStartupHandler;
|
||||||
PRgeHandler *fRgeHandler;
|
std::unique_ptr<PRgeHandler> fRgeHandler;
|
||||||
|
|
||||||
mutable std::vector<Double_t> fPreviousParam;
|
mutable std::vector<Double_t> fPreviousParam;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2011-2023 by Andreas Suter *
|
* Copyright (C) 2011-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
17
src/external/MusrRoot/TMusrRunHeader.cpp
vendored
17
src/external/MusrRoot/TMusrRunHeader.cpp
vendored
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -31,6 +31,7 @@
|
|||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "TMusrRunHeader.h"
|
#include "TMusrRunHeader.h"
|
||||||
|
|
||||||
@ -1075,7 +1076,7 @@ Bool_t TMusrRunHeader::ExtractHeaderInformation(TObjArray *headerInfo, TString r
|
|||||||
}
|
}
|
||||||
for (Int_t i=0; i<tokens->GetEntries(); i++) {
|
for (Int_t i=0; i<tokens->GetEntries(); i++) {
|
||||||
ostr = dynamic_cast<TObjString*>(tokens->At(i));
|
ostr = dynamic_cast<TObjString*>(tokens->At(i));
|
||||||
dvec.push_back(ostr->GetString().Atoi());
|
dvec.push_back(ostr->GetString().Atof());
|
||||||
}
|
}
|
||||||
if (tokens) {
|
if (tokens) {
|
||||||
delete tokens;
|
delete tokens;
|
||||||
@ -1234,7 +1235,7 @@ void TMusrRunHeader::DumpHeader()
|
|||||||
str += subStr;
|
str += subStr;
|
||||||
str += "; ";
|
str += "; ";
|
||||||
}
|
}
|
||||||
subStr.Form(fmt, dvec.size()-1);
|
subStr.Form(fmt, dvec[dvec.size()-1]);
|
||||||
str += subStr;
|
str += subStr;
|
||||||
str += " -@";
|
str += " -@";
|
||||||
str += MRH_DOUBLE_VECTOR;
|
str += MRH_DOUBLE_VECTOR;
|
||||||
@ -1254,13 +1255,13 @@ void TMusrRunHeader::DumpHeader()
|
|||||||
*/
|
*/
|
||||||
void TMusrRunHeader::DrawHeader()
|
void TMusrRunHeader::DrawHeader()
|
||||||
{
|
{
|
||||||
TPaveText *pt;
|
std::unique_ptr<TPaveText> pt;
|
||||||
TCanvas *ca;
|
std::unique_ptr<TCanvas> ca;
|
||||||
|
|
||||||
ca = new TCanvas("MusrRoot RunHeader","MusrRoot RunHeader", 147,37,699,527);
|
ca = std::make_unique<TCanvas>("MusrRoot RunHeader","MusrRoot RunHeader", 147,37,699,527);
|
||||||
ca->Range(0., 0., 100., 100.);
|
ca->Range(0., 0., 100., 100.);
|
||||||
|
|
||||||
pt = new TPaveText(10.,10.,90.,90.,"br");
|
pt = std::make_unique<TPaveText>(10.,10.,90.,90.,"br");
|
||||||
pt->SetFillColor(19);
|
pt->SetFillColor(19);
|
||||||
pt->SetTextAlign(12);
|
pt->SetTextAlign(12);
|
||||||
|
|
||||||
@ -1506,7 +1507,7 @@ bool TMusrRunHeader::UpdateFolder(TObject *treeObj, TString path)
|
|||||||
|
|
||||||
if (!obj) { // required object not present, create it
|
if (!obj) { // required object not present, create it
|
||||||
TObjArray *oarray = new TObjArray();
|
TObjArray *oarray = new TObjArray();
|
||||||
if (!oarray) {
|
if (oarray == nullptr) {
|
||||||
std::cerr << std::endl << ">> TMusrRunHeader::UpdateFolder(): **ERROR** couldn't create header structure!!" << std::endl;
|
std::cerr << std::endl << ">> TMusrRunHeader::UpdateFolder(): **ERROR** couldn't create header structure!!" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
2
src/external/MusrRoot/TMusrRunHeader.h
vendored
2
src/external/MusrRoot/TMusrRunHeader.h
vendored
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2007-2023 by Andreas Suter *
|
* Copyright (C) 2007-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
BIN
src/external/MusrRoot/doc/MusrRootDefinition.pdf
vendored
BIN
src/external/MusrRoot/doc/MusrRootDefinition.pdf
vendored
Binary file not shown.
21
src/external/MusrRoot/doc/MusrRootDefinition.tex
vendored
21
src/external/MusrRoot/doc/MusrRootDefinition.tex
vendored
@ -274,7 +274,7 @@ An example program \verb!write_musrRoot_runHeader! which is writing a full run h
|
|||||||
|
|
||||||
\begin{shaded}
|
\begin{shaded}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
TMusrRunHeader *header = new TMusrRunHeader();
|
std::unique_ptr<TMusrRunHeader> header = std::make_unique<TMusrRunHeader>();
|
||||||
TMusrRunPhysicalQuantity prop;
|
TMusrRunPhysicalQuantity prop;
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\end{shaded}
|
\end{shaded}
|
||||||
@ -318,14 +318,15 @@ header->Set("DetectorInfo/Detector001/Time Zero Bin", 3419.0);
|
|||||||
|
|
||||||
\begin{shaded}
|
\begin{shaded}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
TFile *f = new TFile(fileName, "RECREATE", "write_musrRoot_runHeader");
|
std::unique_ptr<TFile> f = std::make_unique<TFile>(fileName, "RECREATE",
|
||||||
|
"write_musrRoot_runHeader");
|
||||||
if (f->IsZombie()) {
|
if (f->IsZombie()) {
|
||||||
delete f;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the needed TFolder object
|
// create the needed TFolder object
|
||||||
TFolder *runHeader = new TFolder("RunHeader", "MusrRoot Run Header Info");
|
std::unique_ptr<TFolder> runHeader = std::make_unique<TFolder>("RunHeader",
|
||||||
|
"MusrRoot Run Header Info");
|
||||||
|
|
||||||
// create the "directory" structure
|
// create the "directory" structure
|
||||||
if (header->FillFolder(runHeader)) {
|
if (header->FillFolder(runHeader)) {
|
||||||
@ -343,21 +344,22 @@ The following code snippet shows how the extract the full run header from the \m
|
|||||||
|
|
||||||
\begin{shaded}
|
\begin{shaded}
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
TFile *f = new TFile(fileName, "READ", "read_musrRoot_runHeader");
|
std::unique_ptr<TFile> f = std::make_unique<TFile>(fileName, "READ",
|
||||||
|
"read_musrRoot_runHeader");
|
||||||
if (f->IsZombie()) {
|
if (f->IsZombie()) {
|
||||||
delete f;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
TFolder *runHeader = 0;
|
TFolder *runHeader = nullptr;
|
||||||
f->GetObject("RunHeader", runHeader);
|
f->GetObject("RunHeader", runHeader);
|
||||||
if (runHeader == 0) {
|
if (runHeader == nullptr) {
|
||||||
cerr << endl << ">> **ERROR** Couldn't get top folder RunHeader";
|
cerr << endl << ">> **ERROR** Couldn't get top folder RunHeader";
|
||||||
closeFile(f);
|
closeFile(f);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
TMusrRunHeader *header = new TMusrRunHeader(fileName);
|
std::unique_ptr<TMusrRunHeader> header =
|
||||||
|
std::make_unique<TMusrRunHeader>(fileName);
|
||||||
|
|
||||||
if (!header->ExtractAll(runHeader)) {
|
if (!header->ExtractAll(runHeader)) {
|
||||||
cerr << endl << ">> **ERROR** couldn't extract all RunHeader information";
|
cerr << endl << ">> **ERROR** couldn't extract all RunHeader information";
|
||||||
@ -366,7 +368,6 @@ if (!header->ExtractAll(runHeader)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
f->Close();
|
f->Close();
|
||||||
delete f;
|
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\end{shaded}
|
\end{shaded}
|
||||||
|
|
||||||
|
42
src/external/Nonlocal/PNL_PippardFitter.cpp
vendored
42
src/external/Nonlocal/PNL_PippardFitter.cpp
vendored
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -31,6 +31,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <TSAXParser.h>
|
#include <TSAXParser.h>
|
||||||
#include <TMath.h>
|
#include <TMath.h>
|
||||||
@ -52,14 +53,14 @@ PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
|
|||||||
{
|
{
|
||||||
// read XML startup file
|
// read XML startup file
|
||||||
char startup_path_name[128];
|
char startup_path_name[128];
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
PNL_StartupHandler *fStartupHandler = new PNL_StartupHandler();
|
fStartupHandler = std::make_unique<PNL_StartupHandler>();
|
||||||
strcpy(startup_path_name, fStartupHandler->GetStartupFilePath().Data());
|
strcpy(startup_path_name, fStartupHandler->GetStartupFilePath().Data());
|
||||||
saxParser->ConnectToHandler("PNL_StartupHandler", fStartupHandler);
|
saxParser->ConnectToHandler("PNL_StartupHandler", fStartupHandler.get());
|
||||||
//Int_t status = saxParser->ParseFile(startup_path_name);
|
//Int_t status = saxParser->ParseFile(startup_path_name);
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
||||||
Int_t status = parseXmlFile(saxParser, startup_path_name);
|
Int_t status = parseXmlFile(saxParser.get(), startup_path_name);
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal: **WARNING** Reading/parsing nonlocal_startup.xml failed.";
|
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal: **WARNING** Reading/parsing nonlocal_startup.xml failed.";
|
||||||
@ -67,14 +68,8 @@ PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
|
|||||||
fValid = false;
|
fValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if everything went fine with the startup handler
|
// check if everything went fine with the startup handler
|
||||||
if (!fStartupHandler->IsValid()) {
|
if (!fStartupHandler->IsValid() && fValid) {
|
||||||
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
|
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 << ">> startup handler too unhappy. Will terminate unfriendly, sorry.";
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
@ -84,12 +79,14 @@ PNL_PippardFitterGlobal::PNL_PippardFitterGlobal()
|
|||||||
fFourierPoints = fStartupHandler->GetFourierPoints();
|
fFourierPoints = fStartupHandler->GetFourierPoints();
|
||||||
|
|
||||||
// load all the TRIM.SP rge-files
|
// load all the TRIM.SP rge-files
|
||||||
fRgeHandler = new PRgeHandler("./nonlocal_startup.xml");
|
if (fValid) {
|
||||||
if (!fRgeHandler->IsValid()) {
|
fRgeHandler = std::make_unique<PRgeHandler>("./nonlocal_startup.xml");
|
||||||
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
|
if (!fRgeHandler->IsValid()) {
|
||||||
std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
|
std::cout << std::endl << ">> PNL_PippardFitterGlobal::PNL_PippardFitterGlobal **PANIC ERROR**";
|
||||||
std::cout << std::endl;
|
std::cout << std::endl << ">> rge data handler too unhappy. Will terminate unfriendly, sorry.";
|
||||||
fValid = false;
|
std::cout << std::endl;
|
||||||
|
fValid = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fPlanPresent = false;
|
fPlanPresent = false;
|
||||||
@ -124,15 +121,6 @@ PNL_PippardFitterGlobal::~PNL_PippardFitterGlobal()
|
|||||||
fftw_free(fFieldq);
|
fftw_free(fFieldq);
|
||||||
fFieldB = 0;
|
fFieldB = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fRgeHandler) {
|
|
||||||
delete fRgeHandler;
|
|
||||||
fRgeHandler = 0;
|
|
||||||
}
|
|
||||||
if (fStartupHandler) {
|
|
||||||
delete fStartupHandler;
|
|
||||||
fStartupHandler = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
8
src/external/Nonlocal/PNL_PippardFitter.h
vendored
8
src/external/Nonlocal/PNL_PippardFitter.h
vendored
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -36,6 +36,8 @@
|
|||||||
//#endif
|
//#endif
|
||||||
#include <fftw3.h>
|
#include <fftw3.h>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "PMusr.h"
|
#include "PMusr.h"
|
||||||
#include "PUserFcnBase.h"
|
#include "PUserFcnBase.h"
|
||||||
#include "PNL_StartupHandler.h"
|
#include "PNL_StartupHandler.h"
|
||||||
@ -57,8 +59,8 @@ class PNL_PippardFitterGlobal
|
|||||||
private:
|
private:
|
||||||
Bool_t fValid{true};
|
Bool_t fValid{true};
|
||||||
|
|
||||||
PNL_StartupHandler *fStartupHandler{nullptr};
|
std::unique_ptr<PNL_StartupHandler> fStartupHandler;
|
||||||
PRgeHandler *fRgeHandler{nullptr};
|
std::unique_ptr<PRgeHandler> fRgeHandler;
|
||||||
|
|
||||||
mutable std::vector<Double_t> fPreviousParam;
|
mutable std::vector<Double_t> fPreviousParam;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
2
src/external/Nonlocal/PNL_StartupHandler.cpp
vendored
2
src/external/Nonlocal/PNL_StartupHandler.cpp
vendored
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
2
src/external/Nonlocal/PNL_StartupHandler.h
vendored
2
src/external/Nonlocal/PNL_StartupHandler.h
vendored
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
4
src/external/Nonlocal/cmake/dnlf_config.h.in
vendored
4
src/external/Nonlocal/cmake/dnlf_config.h.in
vendored
@ -2,3 +2,7 @@
|
|||||||
|
|
||||||
#define PROJECT_VERSION "@PROJECT_VERSION@"
|
#define PROJECT_VERSION "@PROJECT_VERSION@"
|
||||||
|
|
||||||
|
#define GIT_BRANCH "@GIT_BRANCH@"
|
||||||
|
#define GIT_CURRENT_SHA1 @GIT_CURRENT_SHA1@
|
||||||
|
|
||||||
|
#define ROOT_VERSION_USED "@ROOT_VERSION_USED@"
|
||||||
|
55
src/external/Nonlocal/prog/CMakeLists.txt
vendored
55
src/external/Nonlocal/prog/CMakeLists.txt
vendored
@ -1,23 +1,64 @@
|
|||||||
#--- dump_nonlocal_field ------------------------------------------------------
|
#--- dump_nonlocal_field ------------------------------------------------------
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
|
||||||
project(dump_nonlocal_field VERSION 1.0.0 LANGUAGES C CXX)
|
project(dump_nonlocal_field VERSION 1.0.0 LANGUAGES C CXX)
|
||||||
|
|
||||||
|
#--- check for git ------------------------------------------------------------
|
||||||
|
find_package(Git REQUIRED)
|
||||||
|
|
||||||
|
#--- check for ROOT -----------------------------------------------------------
|
||||||
|
find_package(ROOT 6.18 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
|
||||||
|
if (ROOT_mathmore_FOUND)
|
||||||
|
execute_process(COMMAND root-config --bindir OUTPUT_VARIABLE ROOT_BINDIR)
|
||||||
|
string(STRIP ${ROOT_BINDIR} ROOT_BINDIR)
|
||||||
|
execute_process(COMMAND root-config --version OUTPUT_VARIABLE ROOT_VERSION_USED)
|
||||||
|
string(STRIP ${ROOT_VERSION_USED} ROOT_VERSION_USED)
|
||||||
|
execute_process(COMMAND root-config --incdir OUTPUT_VARIABLE ROOT_INC)
|
||||||
|
string(STRIP ${ROOT_INC} ROOT_INC)
|
||||||
|
message("-- Found ROOT: ${ROOT_BINDIR} (found version: ${ROOT_VERSION})")
|
||||||
|
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
|
||||||
|
include(${ROOT_USE_FILE})
|
||||||
|
endif (ROOT_mathmore_FOUND)
|
||||||
|
|
||||||
|
#--- check for boost ----------------------------------------------------------
|
||||||
|
find_package(Boost REQUIRED
|
||||||
|
COMPONENTS
|
||||||
|
system
|
||||||
|
filesystem
|
||||||
|
)
|
||||||
|
message(STATUS "Boost libs: ${Boost_LIBRARIES}")
|
||||||
|
|
||||||
|
#--- check for fftw3 ----------------------------------------------------------
|
||||||
|
#find_package(FFTW3 REQUIRED)
|
||||||
|
|
||||||
|
# Get the current working branch
|
||||||
|
execute_process(
|
||||||
|
COMMAND git rev-parse --abbrev-ref HEAD
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_BRANCH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
# Get the latest abbreviated commit hash of the working branch
|
||||||
|
execute_process(
|
||||||
|
COMMAND git log -1 --pretty="%h, %ci"
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_CURRENT_SHA1
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
#--- feed dnlf_config.h -----------------------------------------
|
#--- feed dnlf_config.h -----------------------------------------
|
||||||
set(HAVE_DNLF_CONFIG_H 1 CACHE INTERNAL "dnlf_config.h is available")
|
set(HAVE_DNLF_CONFIG_H 1 CACHE INTERNAL "dnlf_config.h is available")
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/dnlf_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/dnlf_config.h)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/dnlf_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/dnlf_config.h)
|
||||||
|
|
||||||
#--- start create git-revision.h ----------------------------------------------
|
|
||||||
if (IS_GIT_REPO)
|
|
||||||
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
|
|
||||||
else (IS_GIT_REPO)
|
|
||||||
set(HAVE_GIT_REV_H "")
|
|
||||||
endif (IS_GIT_REPO)
|
|
||||||
|
|
||||||
add_executable(dump_nonlocal_field dump_nonlocal_field.cpp)
|
add_executable(dump_nonlocal_field dump_nonlocal_field.cpp)
|
||||||
target_compile_options(dump_nonlocal_field BEFORE PRIVATE "-DHAVE_CONFIG_H" "-DHAVE_DNLF_CONFIG_H" "${HAVE_GIT_REV_H}")
|
target_compile_options(dump_nonlocal_field BEFORE PRIVATE "-DHAVE_CONFIG_H" "-DHAVE_DNLF_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||||
target_include_directories(dump_nonlocal_field
|
target_include_directories(dump_nonlocal_field
|
||||||
BEFORE PRIVATE
|
BEFORE PRIVATE
|
||||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
|
||||||
|
$<BUILD_INTERFACE:${ROOT_INC}>
|
||||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2009-2023 by Andreas Suter *
|
* Copyright (C) 2009-2024 by Andreas Suter *
|
||||||
* andreas.suter@psi.ch *
|
* andreas.suter@psi.ch *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -38,15 +38,9 @@
|
|||||||
|
|
||||||
#include "PNL_PippardFitter.h"
|
#include "PNL_PippardFitter.h"
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_DNLF_CONFIG_H
|
#ifdef HAVE_DNLF_CONFIG_H
|
||||||
#include "dnlf_config.h"
|
#include "dnlf_config.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_GIT_REV_H
|
|
||||||
#include "git-revision.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
@ -58,6 +52,7 @@ void dnlf_syntax()
|
|||||||
std::cout << "usage: dump_nonlocal_field [<msr-file> --out <field-dump> [--step <stepVal>] | --version | --help]" << std::endl;
|
std::cout << "usage: dump_nonlocal_field [<msr-file> --out <field-dump> [--step <stepVal>] | --version | --help]" << std::endl;
|
||||||
std::cout << " <msr-file> : nonlocal msr-file name." << std::endl;
|
std::cout << " <msr-file> : nonlocal msr-file name." << std::endl;
|
||||||
std::cout << " --out <field-dump> : ascii field dump output file name." << std::endl;
|
std::cout << " --out <field-dump> : ascii field dump output file name." << std::endl;
|
||||||
|
std::cout << " --range <rangeVal> : this optional parameter (in nm) will overwrite the standard z-range = 5 * lambdaL." << std::endl;
|
||||||
std::cout << " --step <stepVal> : this optional parameters allows to define the z-value step size in (nm)." << std::endl;
|
std::cout << " --step <stepVal> : this optional parameters allows to define the z-value step size in (nm)." << std::endl;
|
||||||
std::cout << " --version : dumps the version" << std::endl;
|
std::cout << " --version : dumps the version" << std::endl;
|
||||||
std::cout << " --help : will dump this help" << std::endl;
|
std::cout << " --help : will dump this help" << std::endl;
|
||||||
@ -190,7 +185,8 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
std::string msrFileName("");
|
std::string msrFileName("");
|
||||||
std::string outFileName("");
|
std::string outFileName("");
|
||||||
double step(0.0);
|
double step{0.0};
|
||||||
|
double range{0.0};
|
||||||
bool show_syntax(false);
|
bool show_syntax(false);
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
@ -202,18 +198,10 @@ int main(int argc, char* argv[])
|
|||||||
if (argv[i][0] != '-') { // must be the msr-file name
|
if (argv[i][0] != '-') { // must be the msr-file name
|
||||||
msrFileName = argv[i];
|
msrFileName = argv[i];
|
||||||
} else if (!strcmp(argv[i], "--version")) {
|
} else if (!strcmp(argv[i], "--version")) {
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_DNLF_CONFIG_H
|
||||||
#ifdef HAVE_GIT_REV_H
|
std::cout << std::endl << "dump_nonlocal_field version: " << PROJECT_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
|
||||||
std::cout << std::endl << "dump_nonlocal_field version: " << PROJECT_VERSION << " (" << PACKAGE_VERSION << "), git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << " (" << BUILD_TYPE << "), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
|
|
||||||
#else
|
#else
|
||||||
std::cout << std::endl << "dump_nonlocal_field version: " << PROJECT_VERSION << " (" << PACKAGE_VERSION << "/" << BUILD_TYPE << "), ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
|
std::cout << std::endl << "dump_nonlocal_field version: " << PROJECT_VERSION << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#ifdef HAVE_GIT_REV_H
|
|
||||||
std::cout << std::endl << "dump_nonlocal_field git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
|
|
||||||
#else
|
|
||||||
std::cout << std::endl << "dump_nonlocal_field version: unknown" << std::endl << std::endl;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
} else if (!strcmp(argv[i], "--help")) {
|
} else if (!strcmp(argv[i], "--help")) {
|
||||||
@ -228,6 +216,22 @@ int main(int argc, char* argv[])
|
|||||||
show_syntax = true;
|
show_syntax = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else if (!strcmp(argv[i], "--range")) {
|
||||||
|
if (i < argc-1) {
|
||||||
|
try {
|
||||||
|
range = std::stod(argv[i+1]);
|
||||||
|
}
|
||||||
|
catch(std::exception& e) {
|
||||||
|
std::cout << "dump_nonlocal_field: **ERROR** <rangeVal> '" << argv[i+1] << "' seems not to be a double." << std::endl;
|
||||||
|
show_syntax = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
} else {
|
||||||
|
std::cerr << std::endl << "dump_nonlocal_field: **ERROR** found option --range without <rangeVal>" << std::endl;
|
||||||
|
show_syntax = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
} else if (!strcmp(argv[i], "--step")) {
|
} else if (!strcmp(argv[i], "--step")) {
|
||||||
if (i < argc-1) {
|
if (i < argc-1) {
|
||||||
try {
|
try {
|
||||||
@ -260,14 +264,17 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
// calculate field and write it to file
|
// calculate field and write it to file
|
||||||
PNL_PippardFitterGlobal pip;
|
PNL_PippardFitterGlobal pip;
|
||||||
pip.CalculateField(param);
|
if (pip.IsValid())
|
||||||
|
pip.CalculateField(param);
|
||||||
|
else
|
||||||
|
return -3;
|
||||||
|
|
||||||
std::ofstream fout(outFileName.c_str(), std::ofstream::out);
|
std::ofstream fout(outFileName.c_str(), std::ofstream::out);
|
||||||
if (!fout.is_open()) {
|
if (!fout.is_open()) {
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
std::cerr << "**ERROR** can not write to file '" << outFileName << "'." << std::endl;
|
std::cerr << "**ERROR** can not write to file '" << outFileName << "'." << std::endl;
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
return -3;
|
return -4;
|
||||||
}
|
}
|
||||||
// write header
|
// write header
|
||||||
fout << "% z (nm), field (G)" << std::endl;
|
fout << "% z (nm), field (G)" << std::endl;
|
||||||
@ -280,13 +287,15 @@ int main(int argc, char* argv[])
|
|||||||
bool done(false);
|
bool done(false);
|
||||||
double deadLayer = param[8];
|
double deadLayer = param[8];
|
||||||
double b0 = param[6];
|
double b0 = param[6];
|
||||||
|
if (range == 0.0)
|
||||||
|
range = 5.0*param[5]; // 5*lambda
|
||||||
do {
|
do {
|
||||||
if (z < deadLayer) {
|
if (z < deadLayer) {
|
||||||
fout << z << ", " << b0 << std::endl;
|
fout << z << ", " << b0 << std::endl;
|
||||||
} else {
|
} else {
|
||||||
field = pip.GetMagneticField(z-deadLayer);
|
field = pip.GetMagneticField(z-deadLayer);
|
||||||
fout << z << ", " << b0*field << std::endl;
|
fout << z << ", " << b0*field << std::endl;
|
||||||
if (fabs(prevField-field) < 1.0e-10)
|
if ((fabs(prevField-field) < 1.0e-10) && (z >= range))
|
||||||
done = true;
|
done = true;
|
||||||
prevField = field;
|
prevField = field;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#include "LineProfile.h"
|
#include "LineProfile.h"
|
||||||
#include <iostream> //for testing purposes
|
#include <iostream> //for testing purposes
|
||||||
|
|
||||||
|
#include <boost/math/special_functions/ellint_1.hpp>
|
||||||
|
|
||||||
//Implement helperfunctions
|
//Implement helperfunctions
|
||||||
|
|
||||||
Double_t GaussianShape(Double_t x, Double_t position, Double_t width) {
|
Double_t GaussianShape(Double_t x, Double_t position, Double_t width) {
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boost/math/special_functions/ellint_1.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef PI
|
#ifndef PI
|
||||||
#define PI 3.14159265358979323846 /* pi */
|
#define PI 3.14159265358979323846 /* pi */
|
||||||
|
@ -50,33 +50,22 @@ TMeanFieldsForScHalfSpace::TMeanFieldsForScHalfSpace() {
|
|||||||
// read startup file
|
// read startup file
|
||||||
std::string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Operator-method that returns the mean field for a given implantation energy
|
// Operator-method that returns the mean field for a given implantation energy
|
||||||
@ -141,33 +130,22 @@ TMeanFieldsForScSingleLayer::TMeanFieldsForScSingleLayer() {
|
|||||||
// read startup file
|
// read startup file
|
||||||
std::string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Operator-method that returns the mean field for a given implantation energy
|
// Operator-method that returns the mean field for a given implantation energy
|
||||||
@ -240,33 +218,22 @@ TMeanFieldsForScBilayer::TMeanFieldsForScBilayer() {
|
|||||||
// read startup file
|
// read startup file
|
||||||
std::string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug(), 1);
|
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Operator-method that returns the mean field for a given implantation energy
|
// Operator-method that returns the mean field for a given implantation energy
|
||||||
@ -335,10 +302,10 @@ double TMeanFieldsForScBilayer::CalcMeanB (double E, const std::vector<double>&
|
|||||||
std::vector<double> nz(fImpProfile->DataNZ(E));
|
std::vector<double> nz(fImpProfile->DataNZ(E));
|
||||||
double dz(fImpProfile->DataDZ(E));
|
double dz(fImpProfile->DataDZ(E));
|
||||||
|
|
||||||
if (E==20.0){
|
if (E==20.0) {
|
||||||
ofstream of("Implantation-profile-normal.dat");
|
std::ofstream of("Implantation-profile-normal.dat");
|
||||||
for (unsigned int i(0); i<z.size(); i++) {
|
for (unsigned int i(0); i<z.size(); i++) {
|
||||||
of << z[i] << " " << nz[i] << endl;
|
of << z[i] << " " << nz[i] << std::endl;
|
||||||
}
|
}
|
||||||
of.close();
|
of.close();
|
||||||
}
|
}
|
||||||
@ -359,33 +326,22 @@ TMeanFieldsForScTrilayer::TMeanFieldsForScTrilayer() {
|
|||||||
// read startup file
|
// read startup file
|
||||||
std::string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Operator-method that returns the mean field for a given implantation energy
|
// Operator-method that returns the mean field for a given implantation energy
|
||||||
@ -464,33 +420,22 @@ TMeanFieldsForScTrilayerWithInsulator::TMeanFieldsForScTrilayerWithInsulator() {
|
|||||||
// read startup file
|
// read startup file
|
||||||
std::string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Operator-method that returns the mean field for a given implantation energy
|
// Operator-method that returns the mean field for a given implantation energy
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
#ifndef _TCalcMeanFieldsLEM_H_
|
#ifndef _TCalcMeanFieldsLEM_H_
|
||||||
#define _TCalcMeanFieldsLEM_H_
|
#define _TCalcMeanFieldsLEM_H_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "TLondon1D.h"
|
#include "TLondon1D.h"
|
||||||
|
|
||||||
class TMeanFieldsForScHalfSpace : public PUserFcnBase {
|
class TMeanFieldsForScHalfSpace : public PUserFcnBase {
|
||||||
@ -36,13 +38,12 @@ class TMeanFieldsForScHalfSpace : public PUserFcnBase {
|
|||||||
public:
|
public:
|
||||||
// default constructor
|
// default constructor
|
||||||
TMeanFieldsForScHalfSpace();
|
TMeanFieldsForScHalfSpace();
|
||||||
~TMeanFieldsForScHalfSpace() {delete fImpProfile; fImpProfile = 0;}
|
|
||||||
|
|
||||||
double operator()(double, const std::vector<double>&) const;
|
double operator()(double, const std::vector<double>&) const;
|
||||||
double CalcMeanB (double, const TLondon1D_HS&) const;
|
double CalcMeanB (double, const TLondon1D_HS&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TTrimSPData *fImpProfile;
|
std::unique_ptr<TTrimSPData> fImpProfile;
|
||||||
|
|
||||||
ClassDef(TMeanFieldsForScHalfSpace,1)
|
ClassDef(TMeanFieldsForScHalfSpace,1)
|
||||||
};
|
};
|
||||||
@ -52,13 +53,12 @@ class TMeanFieldsForScSingleLayer : public PUserFcnBase {
|
|||||||
public:
|
public:
|
||||||
// default constructor
|
// default constructor
|
||||||
TMeanFieldsForScSingleLayer();
|
TMeanFieldsForScSingleLayer();
|
||||||
~TMeanFieldsForScSingleLayer() {delete fImpProfile; fImpProfile = 0;}
|
|
||||||
|
|
||||||
double operator()(double, const std::vector<double>&) const;
|
double operator()(double, const std::vector<double>&) const;
|
||||||
double CalcMeanB (double, const std::vector<double>&, const std::vector<double>&, const TLondon1D_1L&) const;
|
double CalcMeanB (double, const std::vector<double>&, const std::vector<double>&, const TLondon1D_1L&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TTrimSPData *fImpProfile;
|
std::unique_ptr<TTrimSPData> fImpProfile;
|
||||||
|
|
||||||
ClassDef(TMeanFieldsForScSingleLayer,1)
|
ClassDef(TMeanFieldsForScSingleLayer,1)
|
||||||
};
|
};
|
||||||
@ -68,13 +68,12 @@ class TMeanFieldsForScBilayer : public PUserFcnBase {
|
|||||||
public:
|
public:
|
||||||
// default constructor
|
// default constructor
|
||||||
TMeanFieldsForScBilayer();
|
TMeanFieldsForScBilayer();
|
||||||
~TMeanFieldsForScBilayer() {delete fImpProfile; fImpProfile = 0;}
|
|
||||||
|
|
||||||
double operator()(double, const std::vector<double>&) const;
|
double operator()(double, const std::vector<double>&) const;
|
||||||
double CalcMeanB (double, const std::vector<double>&, const std::vector<double>&, const TLondon1D_2L&, double) const;
|
double CalcMeanB (double, const std::vector<double>&, const std::vector<double>&, const TLondon1D_2L&, double) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TTrimSPData *fImpProfile;
|
std::unique_ptr<TTrimSPData> fImpProfile;
|
||||||
|
|
||||||
ClassDef(TMeanFieldsForScBilayer,1)
|
ClassDef(TMeanFieldsForScBilayer,1)
|
||||||
};
|
};
|
||||||
@ -84,13 +83,12 @@ class TMeanFieldsForScTrilayer : public PUserFcnBase {
|
|||||||
public:
|
public:
|
||||||
// default constructor
|
// default constructor
|
||||||
TMeanFieldsForScTrilayer();
|
TMeanFieldsForScTrilayer();
|
||||||
~TMeanFieldsForScTrilayer() {delete fImpProfile; fImpProfile = 0;}
|
|
||||||
|
|
||||||
double operator()(double, const std::vector<double>&) const;
|
double operator()(double, const std::vector<double>&) const;
|
||||||
double CalcMeanB (double, const std::vector<double>&, const std::vector<double>&, const TLondon1D_3L&) const;
|
double CalcMeanB (double, const std::vector<double>&, const std::vector<double>&, const TLondon1D_3L&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TTrimSPData *fImpProfile;
|
std::unique_ptr<TTrimSPData> fImpProfile;
|
||||||
|
|
||||||
ClassDef(TMeanFieldsForScTrilayer,1)
|
ClassDef(TMeanFieldsForScTrilayer,1)
|
||||||
};
|
};
|
||||||
@ -100,13 +98,12 @@ class TMeanFieldsForScTrilayerWithInsulator : public PUserFcnBase {
|
|||||||
public:
|
public:
|
||||||
// default constructor
|
// default constructor
|
||||||
TMeanFieldsForScTrilayerWithInsulator();
|
TMeanFieldsForScTrilayerWithInsulator();
|
||||||
~TMeanFieldsForScTrilayerWithInsulator() {delete fImpProfile; fImpProfile = 0;}
|
|
||||||
|
|
||||||
double operator()(double, const std::vector<double>&) const;
|
double operator()(double, const std::vector<double>&) const;
|
||||||
double CalcMeanB (double, const std::vector<double>&, const std::vector<double>&, const TLondon1D_3LwInsulator&) const;
|
double CalcMeanB (double, const std::vector<double>&, const std::vector<double>&, const TLondon1D_3LwInsulator&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TTrimSPData *fImpProfile;
|
std::unique_ptr<TTrimSPData> fImpProfile;
|
||||||
|
|
||||||
ClassDef(TMeanFieldsForScTrilayerWithInsulator,1)
|
ClassDef(TMeanFieldsForScTrilayerWithInsulator,1)
|
||||||
};
|
};
|
||||||
|
392
src/external/libFitPofB/classes/TLondon1D.cpp
vendored
392
src/external/libFitPofB/classes/TLondon1D.cpp
vendored
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "TLondon1D.h"
|
#include "TLondon1D.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
@ -55,12 +56,6 @@ TLondon1DHS::~TLondon1DHS() {
|
|||||||
fParForBofZ.clear();
|
fParForBofZ.clear();
|
||||||
fParForPofB.clear();
|
fParForPofB.clear();
|
||||||
fParForPofT.clear();
|
fParForPofT.clear();
|
||||||
delete fImpProfile;
|
|
||||||
fImpProfile = 0;
|
|
||||||
delete fPofB;
|
|
||||||
fPofB = 0;
|
|
||||||
delete fPofT;
|
|
||||||
fPofT = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TLondon1D1L::~TLondon1D1L() {
|
TLondon1D1L::~TLondon1D1L() {
|
||||||
@ -68,12 +63,6 @@ TLondon1D1L::~TLondon1D1L() {
|
|||||||
fParForBofZ.clear();
|
fParForBofZ.clear();
|
||||||
fParForPofB.clear();
|
fParForPofB.clear();
|
||||||
fParForPofT.clear();
|
fParForPofT.clear();
|
||||||
delete fImpProfile;
|
|
||||||
fImpProfile = 0;
|
|
||||||
delete fPofB;
|
|
||||||
fPofB = 0;
|
|
||||||
delete fPofT;
|
|
||||||
fPofT = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TLondon1D2L::~TLondon1D2L() {
|
TLondon1D2L::~TLondon1D2L() {
|
||||||
@ -81,12 +70,6 @@ TLondon1D2L::~TLondon1D2L() {
|
|||||||
fParForBofZ.clear();
|
fParForBofZ.clear();
|
||||||
fParForPofB.clear();
|
fParForPofB.clear();
|
||||||
fParForPofT.clear();
|
fParForPofT.clear();
|
||||||
delete fImpProfile;
|
|
||||||
fImpProfile = 0;
|
|
||||||
delete fPofB;
|
|
||||||
fPofB = 0;
|
|
||||||
delete fPofT;
|
|
||||||
fPofT = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TProximity1D1LHS::~TProximity1D1LHS() {
|
TProximity1D1LHS::~TProximity1D1LHS() {
|
||||||
@ -94,12 +77,6 @@ TProximity1D1LHS::~TProximity1D1LHS() {
|
|||||||
fParForBofZ.clear();
|
fParForBofZ.clear();
|
||||||
fParForPofB.clear();
|
fParForPofB.clear();
|
||||||
fParForPofT.clear();
|
fParForPofT.clear();
|
||||||
delete fImpProfile;
|
|
||||||
fImpProfile = 0;
|
|
||||||
delete fPofB;
|
|
||||||
fPofB = 0;
|
|
||||||
delete fPofT;
|
|
||||||
fPofT = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TLondon1D3L::~TLondon1D3L() {
|
TLondon1D3L::~TLondon1D3L() {
|
||||||
@ -107,12 +84,6 @@ TLondon1D3L::~TLondon1D3L() {
|
|||||||
fParForBofZ.clear();
|
fParForBofZ.clear();
|
||||||
fParForPofB.clear();
|
fParForPofB.clear();
|
||||||
fParForPofT.clear();
|
fParForPofT.clear();
|
||||||
delete fImpProfile;
|
|
||||||
fImpProfile = 0;
|
|
||||||
delete fPofB;
|
|
||||||
fPofB = 0;
|
|
||||||
delete fPofT;
|
|
||||||
fPofT = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TLondon1D3LS::~TLondon1D3LS() {
|
TLondon1D3LS::~TLondon1D3LS() {
|
||||||
@ -120,12 +91,6 @@ TLondon1D3LS::~TLondon1D3LS() {
|
|||||||
fParForBofZ.clear();
|
fParForBofZ.clear();
|
||||||
fParForPofB.clear();
|
fParForPofB.clear();
|
||||||
fParForPofT.clear();
|
fParForPofT.clear();
|
||||||
delete fImpProfile;
|
|
||||||
fImpProfile = 0;
|
|
||||||
delete fPofB;
|
|
||||||
fPofB = 0;
|
|
||||||
delete fPofT;
|
|
||||||
fPofT = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TLondon1D4L::~TLondon1D4L() {
|
// TLondon1D4L::~TLondon1D4L() {
|
||||||
@ -133,10 +98,6 @@ TLondon1D3LS::~TLondon1D3LS() {
|
|||||||
// fParForBofZ.clear();
|
// fParForBofZ.clear();
|
||||||
// fParForPofB.clear();
|
// fParForPofB.clear();
|
||||||
// fParForPofT.clear();
|
// fParForPofT.clear();
|
||||||
// delete fImpProfile;
|
|
||||||
// fImpProfile = 0;
|
|
||||||
// delete fPofT;
|
|
||||||
// fPofT = 0;
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -147,27 +108,27 @@ TLondon1D3LS::~TLondon1D3LS() {
|
|||||||
TLondon1DHS::TLondon1DHS() : fCalcNeeded(true), fFirstCall(true) {
|
TLondon1DHS::TLondon1DHS() : fCalcNeeded(true), fFirstCall(true) {
|
||||||
|
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
||||||
int status = parseXmlFile(saxParser, startup_path_name.c_str());
|
int status = parseXmlFile(saxParser.get(), startup_path_name.c_str());
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
fNSteps = startupHandler->GetNSteps();
|
fNSteps = startupHandler->GetNSteps();
|
||||||
fWisdom = startupHandler->GetWisdomFile();
|
fWisdom = startupHandler->GetWisdomFile();
|
||||||
string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fParForPofT.push_back(0.0); // phase
|
fParForPofT.push_back(0.0); // phase
|
||||||
fParForPofT.push_back(startupHandler->GetDeltat());
|
fParForPofT.push_back(startupHandler->GetDeltat());
|
||||||
@ -180,21 +141,11 @@ TLondon1DHS::TLondon1DHS() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
fParForPofB.push_back(0.005); // Bkg-width
|
fParForPofB.push_back(0.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
fParForPofB.push_back(0.0); // Bkg-weight
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
|
|
||||||
fPofB = new TPofBCalc(fParForPofB);
|
fPofB = std::make_unique<TPofBCalc>(fParForPofB);
|
||||||
|
|
||||||
fPofT = new TPofTCalc(fPofB, fWisdom, fParForPofT);
|
fPofT = std::make_unique<TPofTCalc>(fPofB.get(), fWisdom, fParForPofT);
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -203,18 +154,18 @@ TLondon1DHS::TLondon1DHS() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
// Parameters: all the parameters for the function to be fitted through TLondon1DHS
|
// Parameters: all the parameters for the function to be fitted through TLondon1DHS
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TLondon1DHS::operator()(double t, const vector<double> &par) const {
|
double TLondon1DHS::operator()(double t, const std::vector<double> &par) const {
|
||||||
|
|
||||||
assert(par.size() == 5);
|
assert(par.size() == 5);
|
||||||
|
|
||||||
if(t<0.0)
|
if (t<0.0)
|
||||||
return cos(par[0]*0.017453293);
|
return cos(par[0]*0.017453293);
|
||||||
|
|
||||||
bool dead_layer_changed(false);
|
bool dead_layer_changed(false);
|
||||||
|
|
||||||
// check if the function is called the first time and if yes, read in parameters
|
// check if the function is called the first time and if yes, read in parameters
|
||||||
|
|
||||||
if(fFirstCall){
|
if (fFirstCall) {
|
||||||
fPar = par;
|
fPar = par;
|
||||||
|
|
||||||
for (unsigned int i(2); i<fPar.size(); i++){
|
for (unsigned int i(2); i<fPar.size(); i++){
|
||||||
@ -230,7 +181,7 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
|
|||||||
bool only_phase_changed(false);
|
bool only_phase_changed(false);
|
||||||
|
|
||||||
for (unsigned int i(0); i<fPar.size(); i++) {
|
for (unsigned int i(0); i<fPar.size(); i++) {
|
||||||
if( fPar[i]-par[i] ) {
|
if ( fPar[i]-par[i] ) {
|
||||||
fPar[i] = par[i];
|
fPar[i] = par[i];
|
||||||
par_changed = true;
|
par_changed = true;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@ -253,7 +204,7 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
fParForPofT[0] = par[0]; // phase
|
fParForPofT[0] = par[0]; // phase
|
||||||
|
|
||||||
if(!only_phase_changed) {
|
if (!only_phase_changed) {
|
||||||
|
|
||||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||||
|
|
||||||
@ -264,8 +215,8 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
|
|||||||
fParForPofB[3] = par[2]; // Bkg-Field
|
fParForPofB[3] = par[2]; // Bkg-Field
|
||||||
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
||||||
|
|
||||||
if(dead_layer_changed){
|
if (dead_layer_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[3]);// dead layer
|
interfaces.push_back(par[3]);// dead layer
|
||||||
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces); // Fraction of muons in the deadlayer
|
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces); // Fraction of muons in the deadlayer
|
||||||
interfaces.clear();
|
interfaces.clear();
|
||||||
@ -273,7 +224,7 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
TLondon1D_HS BofZ(fParForBofZ);
|
TLondon1D_HS BofZ(fParForBofZ);
|
||||||
fPofB->UnsetPBExists();
|
fPofB->UnsetPBExists();
|
||||||
fPofB->Calculate(&BofZ, fImpProfile, fParForPofB);
|
fPofB->Calculate(&BofZ, fImpProfile.get(), fParForPofB);
|
||||||
fPofT->DoFFT();
|
fPofT->DoFFT();
|
||||||
|
|
||||||
}/* else {
|
}/* else {
|
||||||
@ -286,7 +237,6 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return fPofT->Eval(t);
|
return fPofT->Eval(t);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -298,27 +248,27 @@ double TLondon1DHS::operator()(double t, const vector<double> &par) const {
|
|||||||
TLondon1D1L::TLondon1D1L() : fCalcNeeded(true), fFirstCall(true) {
|
TLondon1D1L::TLondon1D1L() : fCalcNeeded(true), fFirstCall(true) {
|
||||||
|
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
||||||
int status = parseXmlFile(saxParser, startup_path_name.c_str());
|
int status = parseXmlFile(saxParser.get(), startup_path_name.c_str());
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
fNSteps = startupHandler->GetNSteps();
|
fNSteps = startupHandler->GetNSteps();
|
||||||
fWisdom = startupHandler->GetWisdomFile();
|
fWisdom = startupHandler->GetWisdomFile();
|
||||||
string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fParForPofT.push_back(0.0);
|
fParForPofT.push_back(0.0);
|
||||||
fParForPofT.push_back(startupHandler->GetDeltat());
|
fParForPofT.push_back(startupHandler->GetDeltat());
|
||||||
@ -331,21 +281,11 @@ TLondon1D1L::TLondon1D1L() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
fParForPofB.push_back(0.005); // Bkg-width
|
fParForPofB.push_back(0.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
fParForPofB.push_back(0.0); // Bkg-weight
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
|
|
||||||
fPofB = new TPofBCalc(fParForPofB);
|
fPofB = std::make_unique<TPofBCalc>(fParForPofB);
|
||||||
|
|
||||||
fPofT = new TPofTCalc(fPofB, fWisdom, fParForPofT);
|
fPofT = std::make_unique<TPofTCalc>(fPofB.get(), fWisdom, fParForPofT);
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -354,7 +294,7 @@ TLondon1D1L::TLondon1D1L() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
// Parameters: all the parameters for the function to be fitted through TLondon1D1L
|
// Parameters: all the parameters for the function to be fitted through TLondon1D1L
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
double TLondon1D1L::operator()(double t, const std::vector<double> &par) const {
|
||||||
|
|
||||||
assert(par.size() == 6 || par.size() == 8);
|
assert(par.size() == 6 || par.size() == 8);
|
||||||
|
|
||||||
@ -362,7 +302,7 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
|||||||
// Count the number of function calls
|
// Count the number of function calls
|
||||||
// fCallCounter++;
|
// fCallCounter++;
|
||||||
|
|
||||||
if(t<0.0)
|
if (t<0.0)
|
||||||
return cos(par[0]*0.017453293);
|
return cos(par[0]*0.017453293);
|
||||||
|
|
||||||
bool bkg_fraction_changed(false);
|
bool bkg_fraction_changed(false);
|
||||||
@ -370,7 +310,7 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
// check if the function is called the first time and if yes, read in parameters
|
// check if the function is called the first time and if yes, read in parameters
|
||||||
|
|
||||||
if(fFirstCall){
|
if (fFirstCall) {
|
||||||
fPar = par;
|
fPar = par;
|
||||||
|
|
||||||
for (unsigned int i(2); i<fPar.size(); i++){
|
for (unsigned int i(2); i<fPar.size(); i++){
|
||||||
@ -389,7 +329,7 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
|||||||
bool only_phase_changed(false);
|
bool only_phase_changed(false);
|
||||||
|
|
||||||
for (unsigned int i(0); i<fPar.size(); i++) {
|
for (unsigned int i(0); i<fPar.size(); i++) {
|
||||||
if( fPar[i]-par[i] ) {
|
if ( fPar[i]-par[i] ) {
|
||||||
fPar[i] = par[i];
|
fPar[i] = par[i];
|
||||||
par_changed = true;
|
par_changed = true;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@ -413,7 +353,7 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
fParForPofT[0] = par[0]; // phase
|
fParForPofT[0] = par[0]; // phase
|
||||||
|
|
||||||
if(!only_phase_changed) {
|
if (!only_phase_changed) {
|
||||||
|
|
||||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||||
|
|
||||||
@ -424,12 +364,12 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
|||||||
fParForPofB[3] = par[2]; // Bkg-Field
|
fParForPofB[3] = par[2]; // Bkg-Field
|
||||||
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
||||||
|
|
||||||
if(weights_changed) {
|
if (weights_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[3]+par[4]);
|
interfaces.push_back(par[3]+par[4]);
|
||||||
|
|
||||||
vector<double> weights;
|
std::vector<double> weights;
|
||||||
for(unsigned int i(6); i<8; i++)
|
for (unsigned int i(6); i<8; i++)
|
||||||
weights.push_back(par[i]);
|
weights.push_back(par[i]);
|
||||||
|
|
||||||
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
||||||
@ -439,8 +379,8 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
|||||||
weights.clear();
|
weights.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bkg_fraction_changed || weights_changed) {
|
if (bkg_fraction_changed || weights_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[3]);// dead layer
|
interfaces.push_back(par[3]);// dead layer
|
||||||
interfaces.push_back(par[3] + par[4]);// dead layer + first layer
|
interfaces.push_back(par[3] + par[4]);// dead layer + first layer
|
||||||
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces) + // Fraction of muons in the deadlayer
|
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces) + // Fraction of muons in the deadlayer
|
||||||
@ -451,7 +391,7 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
TLondon1D_1L BofZ1(fParForBofZ);
|
TLondon1D_1L BofZ1(fParForBofZ);
|
||||||
fPofB->UnsetPBExists();
|
fPofB->UnsetPBExists();
|
||||||
fPofB->Calculate(&BofZ1, fImpProfile, fParForPofB);
|
fPofB->Calculate(&BofZ1, fImpProfile.get(), fParForPofB);
|
||||||
fPofT->DoFFT();
|
fPofT->DoFFT();
|
||||||
|
|
||||||
}/* else {
|
}/* else {
|
||||||
@ -484,27 +424,27 @@ double TLondon1D1L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
TLondon1D2L::TLondon1D2L() : fCalcNeeded(true), fFirstCall(true) {
|
TLondon1D2L::TLondon1D2L() : fCalcNeeded(true), fFirstCall(true) {
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
||||||
int status = parseXmlFile(saxParser, startup_path_name.c_str());
|
int status = parseXmlFile(saxParser.get(), startup_path_name.c_str());
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
fNSteps = startupHandler->GetNSteps();
|
fNSteps = startupHandler->GetNSteps();
|
||||||
fWisdom = startupHandler->GetWisdomFile();
|
fWisdom = startupHandler->GetWisdomFile();
|
||||||
string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fParForPofT.push_back(0.0);
|
fParForPofT.push_back(0.0);
|
||||||
fParForPofT.push_back(startupHandler->GetDeltat());
|
fParForPofT.push_back(startupHandler->GetDeltat());
|
||||||
@ -517,21 +457,11 @@ TLondon1D2L::TLondon1D2L() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
fParForPofB.push_back(0.005); // Bkg-width
|
fParForPofB.push_back(0.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
fParForPofB.push_back(0.0); // Bkg-weight
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
|
|
||||||
fPofB = new TPofBCalc(fParForPofB);
|
fPofB = std::make_unique<TPofBCalc>(fParForPofB);
|
||||||
|
|
||||||
fPofT = new TPofTCalc(fPofB, fWisdom, fParForPofT);
|
fPofT = std::make_unique<TPofTCalc>(fPofB.get(), fWisdom, fParForPofT);
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -540,11 +470,11 @@ TLondon1D2L::TLondon1D2L() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
// Parameters: all the parameters for the function to be fitted through TLondon1D2L
|
// Parameters: all the parameters for the function to be fitted through TLondon1D2L
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
double TLondon1D2L::operator()(double t, const std::vector<double> &par) const {
|
||||||
|
|
||||||
assert(par.size() == 8 || par.size() == 11);
|
assert(par.size() == 8 || par.size() == 11);
|
||||||
|
|
||||||
if(t<0.0)
|
if (t<0.0)
|
||||||
return cos(par[0]*0.017453293);
|
return cos(par[0]*0.017453293);
|
||||||
|
|
||||||
bool bkg_fraction_changed(false);
|
bool bkg_fraction_changed(false);
|
||||||
@ -552,7 +482,7 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
// check if the function is called the first time and if yes, read in parameters
|
// check if the function is called the first time and if yes, read in parameters
|
||||||
|
|
||||||
if(fFirstCall){
|
if (fFirstCall) {
|
||||||
fPar = par;
|
fPar = par;
|
||||||
|
|
||||||
for (unsigned int i(2); i<fPar.size(); i++){
|
for (unsigned int i(2); i<fPar.size(); i++){
|
||||||
@ -570,7 +500,7 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
|||||||
bool only_phase_changed(false);
|
bool only_phase_changed(false);
|
||||||
|
|
||||||
for (unsigned int i(0); i<fPar.size(); i++) {
|
for (unsigned int i(0); i<fPar.size(); i++) {
|
||||||
if( fPar[i]-par[i] ) {
|
if ( fPar[i]-par[i] ) {
|
||||||
fPar[i] = par[i];
|
fPar[i] = par[i];
|
||||||
par_changed = true;
|
par_changed = true;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@ -594,7 +524,7 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
fParForPofT[0] = par[0]; // phase
|
fParForPofT[0] = par[0]; // phase
|
||||||
|
|
||||||
if(!only_phase_changed) {
|
if (!only_phase_changed) {
|
||||||
|
|
||||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||||
|
|
||||||
@ -605,13 +535,13 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
|||||||
fParForPofB[3] = par[2]; // Bkg-Field
|
fParForPofB[3] = par[2]; // Bkg-Field
|
||||||
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
||||||
|
|
||||||
if(weights_changed) {
|
if (weights_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[3]+par[4]);
|
interfaces.push_back(par[3]+par[4]);
|
||||||
interfaces.push_back(par[3]+par[4]+par[5]);
|
interfaces.push_back(par[3]+par[4]+par[5]);
|
||||||
|
|
||||||
vector<double> weights;
|
std::vector<double> weights;
|
||||||
for(unsigned int i(8); i<11; i++)
|
for (unsigned int i(8); i<11; i++)
|
||||||
weights.push_back(par[i]);
|
weights.push_back(par[i]);
|
||||||
|
|
||||||
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
||||||
@ -621,8 +551,8 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
|||||||
weights.clear();
|
weights.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bkg_fraction_changed || weights_changed) {
|
if (bkg_fraction_changed || weights_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[3]);// dead layer
|
interfaces.push_back(par[3]);// dead layer
|
||||||
interfaces.push_back(par[3] + par[4] + par[5]);// dead layer + first layer + second layer
|
interfaces.push_back(par[3] + par[4] + par[5]);// dead layer + first layer + second layer
|
||||||
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces) + // Fraction of muons in the deadlayer
|
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces) + // Fraction of muons in the deadlayer
|
||||||
@ -632,7 +562,7 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
TLondon1D_2L BofZ2(fParForBofZ);
|
TLondon1D_2L BofZ2(fParForBofZ);
|
||||||
fPofB->UnsetPBExists();
|
fPofB->UnsetPBExists();
|
||||||
fPofB->Calculate(&BofZ2, fImpProfile, fParForPofB);
|
fPofB->Calculate(&BofZ2, fImpProfile.get(), fParForPofB);
|
||||||
fPofT->DoFFT();
|
fPofT->DoFFT();
|
||||||
|
|
||||||
|
|
||||||
@ -646,7 +576,6 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return fPofT->Eval(t);
|
return fPofT->Eval(t);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -657,27 +586,27 @@ double TLondon1D2L::operator()(double t, const vector<double> &par) const {
|
|||||||
TProximity1D1LHS::TProximity1D1LHS() : fCalcNeeded(true), fFirstCall(true) {
|
TProximity1D1LHS::TProximity1D1LHS() : fCalcNeeded(true), fFirstCall(true) {
|
||||||
|
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
||||||
int status = parseXmlFile(saxParser, startup_path_name.c_str());
|
int status = parseXmlFile(saxParser.get(), startup_path_name.c_str());
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
fNSteps = startupHandler->GetNSteps();
|
fNSteps = startupHandler->GetNSteps();
|
||||||
fWisdom = startupHandler->GetWisdomFile();
|
fWisdom = startupHandler->GetWisdomFile();
|
||||||
string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fParForPofT.push_back(0.0);
|
fParForPofT.push_back(0.0);
|
||||||
fParForPofT.push_back(startupHandler->GetDeltat());
|
fParForPofT.push_back(startupHandler->GetDeltat());
|
||||||
@ -690,21 +619,11 @@ TProximity1D1LHS::TProximity1D1LHS() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
fParForPofB.push_back(0.01); // Bkg-width
|
fParForPofB.push_back(0.01); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
fParForPofB.push_back(0.0); // Bkg-weight
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
|
|
||||||
fPofB = new TPofBCalc(fParForPofB);
|
fPofB = std::make_unique<TPofBCalc>(fParForPofB);
|
||||||
|
|
||||||
fPofT = new TPofTCalc(fPofB, fWisdom, fParForPofT);
|
fPofT = std::make_unique<TPofTCalc>(fPofB.get(), fWisdom, fParForPofT);
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -713,18 +632,18 @@ TProximity1D1LHS::TProximity1D1LHS() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
// Parameters: all the parameters for the function to be fitted through TProximity1D1LHS
|
// Parameters: all the parameters for the function to be fitted through TProximity1D1LHS
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TProximity1D1LHS::operator()(double t, const vector<double> &par) const {
|
double TProximity1D1LHS::operator()(double t, const std::vector<double> &par) const {
|
||||||
|
|
||||||
assert(par.size() == 7);
|
assert(par.size() == 7);
|
||||||
|
|
||||||
if(t<0.0)
|
if (t<0.0)
|
||||||
return cos(par[0]*0.017453293);
|
return cos(par[0]*0.017453293);
|
||||||
|
|
||||||
// check if the function is called the first time and if yes, read in parameters
|
// check if the function is called the first time and if yes, read in parameters
|
||||||
|
|
||||||
bool dead_layer_changed(false);
|
bool dead_layer_changed(false);
|
||||||
|
|
||||||
if(fFirstCall){
|
if (fFirstCall) {
|
||||||
fPar = par;
|
fPar = par;
|
||||||
|
|
||||||
for (unsigned int i(2); i<fPar.size(); i++){
|
for (unsigned int i(2); i<fPar.size(); i++){
|
||||||
@ -740,14 +659,14 @@ double TProximity1D1LHS::operator()(double t, const vector<double> &par) const {
|
|||||||
bool only_phase_changed(false);
|
bool only_phase_changed(false);
|
||||||
|
|
||||||
for (unsigned int i(0); i<fPar.size(); i++) {
|
for (unsigned int i(0); i<fPar.size(); i++) {
|
||||||
if( fPar[i]-par[i] ) {
|
if ( fPar[i]-par[i] ) {
|
||||||
fPar[i] = par[i];
|
fPar[i] = par[i];
|
||||||
par_changed = true;
|
par_changed = true;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
only_phase_changed = true;
|
only_phase_changed = true;
|
||||||
} else {
|
} else {
|
||||||
only_phase_changed = false;
|
only_phase_changed = false;
|
||||||
if (i == 4){
|
if (i == 4) {
|
||||||
dead_layer_changed = true;
|
dead_layer_changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -763,7 +682,7 @@ double TProximity1D1LHS::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
fParForPofT[0] = par[0]; // phase
|
fParForPofT[0] = par[0]; // phase
|
||||||
|
|
||||||
if(!only_phase_changed) {
|
if (!only_phase_changed) {
|
||||||
|
|
||||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||||
|
|
||||||
@ -774,8 +693,8 @@ double TProximity1D1LHS::operator()(double t, const vector<double> &par) const {
|
|||||||
fParForPofB[3] = par[2]; // Bkg-Field
|
fParForPofB[3] = par[2]; // Bkg-Field
|
||||||
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
||||||
|
|
||||||
if(dead_layer_changed){
|
if (dead_layer_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[4]);// dead layer
|
interfaces.push_back(par[4]);// dead layer
|
||||||
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces); // Fraction of muons in the deadlayer
|
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces); // Fraction of muons in the deadlayer
|
||||||
interfaces.clear();
|
interfaces.clear();
|
||||||
@ -783,7 +702,7 @@ double TProximity1D1LHS::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
TProximity1D_1LHS BofZ(fParForBofZ);
|
TProximity1D_1LHS BofZ(fParForBofZ);
|
||||||
fPofB->UnsetPBExists();
|
fPofB->UnsetPBExists();
|
||||||
fPofB->Calculate(&BofZ, fImpProfile, fParForPofB);
|
fPofB->Calculate(&BofZ, fImpProfile.get(), fParForPofB);
|
||||||
fPofT->DoFFT();
|
fPofT->DoFFT();
|
||||||
|
|
||||||
|
|
||||||
@ -797,7 +716,6 @@ double TProximity1D1LHS::operator()(double t, const vector<double> &par) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return fPofT->Eval(t);
|
return fPofT->Eval(t);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -807,27 +725,27 @@ double TProximity1D1LHS::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
TLondon1D3L::TLondon1D3L() : fCalcNeeded(true), fFirstCall(true) {
|
TLondon1D3L::TLondon1D3L() : fCalcNeeded(true), fFirstCall(true) {
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
||||||
int status = parseXmlFile(saxParser, startup_path_name.c_str());
|
int status = parseXmlFile(saxParser.get(), startup_path_name.c_str());
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
fNSteps = startupHandler->GetNSteps();
|
fNSteps = startupHandler->GetNSteps();
|
||||||
fWisdom = startupHandler->GetWisdomFile();
|
fWisdom = startupHandler->GetWisdomFile();
|
||||||
string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fParForPofT.push_back(0.0);
|
fParForPofT.push_back(0.0);
|
||||||
fParForPofT.push_back(startupHandler->GetDeltat());
|
fParForPofT.push_back(startupHandler->GetDeltat());
|
||||||
@ -840,21 +758,11 @@ TLondon1D3L::TLondon1D3L() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
fParForPofB.push_back(0.005); // Bkg-width
|
fParForPofB.push_back(0.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
fParForPofB.push_back(0.0); // Bkg-weight
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
|
|
||||||
fPofB = new TPofBCalc(fParForPofB);
|
fPofB = std::make_unique<TPofBCalc>(fParForPofB);
|
||||||
|
|
||||||
fPofT = new TPofTCalc(fPofB, fWisdom, fParForPofT);
|
fPofT = std::make_unique<TPofTCalc>(fPofB.get(), fWisdom, fParForPofT);
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -863,11 +771,11 @@ TLondon1D3L::TLondon1D3L() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
// Parameters: all the parameters for the function to be fitted through TLondon1D3L
|
// Parameters: all the parameters for the function to be fitted through TLondon1D3L
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
double TLondon1D3L::operator()(double t, const std::vector<double> &par) const {
|
||||||
|
|
||||||
assert(par.size() == 10 || par.size() == 14);
|
assert(par.size() == 10 || par.size() == 14);
|
||||||
|
|
||||||
if(t<0.0)
|
if (t<0.0)
|
||||||
return cos(par[0]*0.017453293);
|
return cos(par[0]*0.017453293);
|
||||||
|
|
||||||
bool bkg_fraction_changed(false);
|
bool bkg_fraction_changed(false);
|
||||||
@ -875,7 +783,7 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
// check if the function is called the first time and if yes, read in parameters
|
// check if the function is called the first time and if yes, read in parameters
|
||||||
|
|
||||||
if(fFirstCall){
|
if (fFirstCall) {
|
||||||
fPar = par;
|
fPar = par;
|
||||||
|
|
||||||
for (unsigned int i(2); i<fPar.size(); i++){
|
for (unsigned int i(2); i<fPar.size(); i++){
|
||||||
@ -893,7 +801,7 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
|||||||
bool only_phase_changed(false);
|
bool only_phase_changed(false);
|
||||||
|
|
||||||
for (unsigned int i(0); i<fPar.size(); i++) {
|
for (unsigned int i(0); i<fPar.size(); i++) {
|
||||||
if( fPar[i]-par[i] ) {
|
if ( fPar[i]-par[i] ) {
|
||||||
fPar[i] = par[i];
|
fPar[i] = par[i];
|
||||||
par_changed = true;
|
par_changed = true;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@ -917,7 +825,7 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
fParForPofT[0] = par[0]; // phase
|
fParForPofT[0] = par[0]; // phase
|
||||||
|
|
||||||
if(!only_phase_changed) {
|
if (!only_phase_changed) {
|
||||||
|
|
||||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||||
|
|
||||||
@ -928,14 +836,14 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
|||||||
fParForPofB[3] = par[2]; // Bkg-Field
|
fParForPofB[3] = par[2]; // Bkg-Field
|
||||||
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
||||||
|
|
||||||
if(weights_changed) {
|
if (weights_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[3]+par[4]);
|
interfaces.push_back(par[3]+par[4]);
|
||||||
interfaces.push_back(par[3]+par[4]+par[5]);
|
interfaces.push_back(par[3]+par[4]+par[5]);
|
||||||
interfaces.push_back(par[3]+par[4]+par[5]+par[6]);
|
interfaces.push_back(par[3]+par[4]+par[5]+par[6]);
|
||||||
|
|
||||||
vector<double> weights;
|
std::vector<double> weights;
|
||||||
for(unsigned int i(10); i<14; i++)
|
for (unsigned int i(10); i<14; i++)
|
||||||
weights.push_back(par[i]);
|
weights.push_back(par[i]);
|
||||||
|
|
||||||
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
||||||
@ -945,8 +853,8 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
|||||||
weights.clear();
|
weights.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bkg_fraction_changed || weights_changed) {
|
if (bkg_fraction_changed || weights_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[3]);// dead layer
|
interfaces.push_back(par[3]);// dead layer
|
||||||
interfaces.push_back(par[3] + par[4] + par[5] + par[6]);// dead layer + first layer + second layer + third layer
|
interfaces.push_back(par[3] + par[4] + par[5] + par[6]);// dead layer + first layer + second layer + third layer
|
||||||
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces) + // Fraction of muons in the deadlayer
|
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces) + // Fraction of muons in the deadlayer
|
||||||
@ -956,7 +864,7 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
TLondon1D_3L BofZ3(fParForBofZ);
|
TLondon1D_3L BofZ3(fParForBofZ);
|
||||||
fPofB->UnsetPBExists();
|
fPofB->UnsetPBExists();
|
||||||
fPofB->Calculate(&BofZ3, fImpProfile, fParForPofB);
|
fPofB->Calculate(&BofZ3, fImpProfile.get(), fParForPofB);
|
||||||
fPofT->DoFFT();
|
fPofT->DoFFT();
|
||||||
|
|
||||||
}/* else {
|
}/* else {
|
||||||
@ -969,7 +877,6 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return fPofT->Eval(t);
|
return fPofT->Eval(t);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -979,27 +886,27 @@ double TLondon1D3L::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
TLondon1D3LS::TLondon1D3LS() : fCalcNeeded(true), fFirstCall(true) {
|
TLondon1D3LS::TLondon1D3LS() : fCalcNeeded(true), fFirstCall(true) {
|
||||||
// read startup file
|
// read startup file
|
||||||
string startup_path_name("BMW_startup.xml");
|
std::string startup_path_name("BMW_startup.xml");
|
||||||
|
|
||||||
TSAXParser *saxParser = new TSAXParser();
|
std::unique_ptr<TSAXParser> saxParser = std::make_unique<TSAXParser>();
|
||||||
BMWStartupHandler *startupHandler = new BMWStartupHandler();
|
std::unique_ptr<BMWStartupHandler> startupHandler = std::make_unique<BMWStartupHandler>();
|
||||||
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler);
|
saxParser->ConnectToHandler("BMWStartupHandler", startupHandler.get());
|
||||||
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
//int status (saxParser->ParseFile(startup_path_name.c_str()));
|
||||||
// parsing the file as above seems to lead to problems in certain environments;
|
// parsing the file as above seems to lead to problems in certain environments;
|
||||||
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
// use the parseXmlFile function instead (see PUserFcnBase.cpp for the definition)
|
||||||
int status = parseXmlFile(saxParser, startup_path_name.c_str());
|
int status = parseXmlFile(saxParser.get(), startup_path_name.c_str());
|
||||||
// check for parse errors
|
// check for parse errors
|
||||||
if (status) { // error
|
if (status) { // error
|
||||||
cerr << endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
std::cerr << std::endl << "**ERROR** Reading/parsing " << startup_path_name << " failed." \
|
||||||
<< endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
<< std::endl << "**ERROR** Please make sure that the file exists in the local directory and it is set up correctly!" \
|
||||||
<< endl;
|
<< std::endl;
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
fNSteps = startupHandler->GetNSteps();
|
fNSteps = startupHandler->GetNSteps();
|
||||||
fWisdom = startupHandler->GetWisdomFile();
|
fWisdom = startupHandler->GetWisdomFile();
|
||||||
string rge_path(startupHandler->GetDataPath());
|
std::string rge_path(startupHandler->GetDataPath());
|
||||||
map<double, string> energy_vec(startupHandler->GetEnergies());
|
std::map<double, std::string> energy_vec(startupHandler->GetEnergies());
|
||||||
|
|
||||||
fParForPofT.push_back(0.0);
|
fParForPofT.push_back(0.0);
|
||||||
fParForPofT.push_back(startupHandler->GetDeltat());
|
fParForPofT.push_back(startupHandler->GetDeltat());
|
||||||
@ -1012,21 +919,11 @@ TLondon1D3LS::TLondon1D3LS() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
fParForPofB.push_back(0.005); // Bkg-width
|
fParForPofB.push_back(0.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
fParForPofB.push_back(0.0); // Bkg-weight
|
||||||
|
|
||||||
fImpProfile = new TTrimSPData(rge_path, energy_vec, startupHandler->GetDebug());
|
fImpProfile = std::make_unique<TTrimSPData>(rge_path, energy_vec, startupHandler->GetDebug());
|
||||||
|
|
||||||
fPofB = new TPofBCalc(fParForPofB);
|
fPofB = std::make_unique<TPofBCalc>(fParForPofB);
|
||||||
|
|
||||||
fPofT = new TPofTCalc(fPofB, fWisdom, fParForPofT);
|
fPofT = std::make_unique<TPofTCalc>(fPofB.get(), fWisdom, fParForPofT);
|
||||||
|
|
||||||
// clean up
|
|
||||||
if (saxParser) {
|
|
||||||
delete saxParser;
|
|
||||||
saxParser = 0;
|
|
||||||
}
|
|
||||||
if (startupHandler) {
|
|
||||||
delete startupHandler;
|
|
||||||
startupHandler = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------
|
//------------------
|
||||||
@ -1035,11 +932,11 @@ TLondon1D3LS::TLondon1D3LS() : fCalcNeeded(true), fFirstCall(true) {
|
|||||||
// Parameters: all the parameters for the function to be fitted through TLondon1D3LS
|
// Parameters: all the parameters for the function to be fitted through TLondon1D3LS
|
||||||
//------------------
|
//------------------
|
||||||
|
|
||||||
double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
double TLondon1D3LS::operator()(double t, const std::vector<double> &par) const {
|
||||||
|
|
||||||
assert(par.size() == 9 || par.size() == 13);
|
assert(par.size() == 9 || par.size() == 13);
|
||||||
|
|
||||||
if(t<0.0)
|
if (t<0.0)
|
||||||
return cos(par[0]*0.017453293);
|
return cos(par[0]*0.017453293);
|
||||||
|
|
||||||
bool bkg_fraction_changed(false);
|
bool bkg_fraction_changed(false);
|
||||||
@ -1047,7 +944,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
// check if the function is called the first time and if yes, read in parameters
|
// check if the function is called the first time and if yes, read in parameters
|
||||||
|
|
||||||
if(fFirstCall){
|
if (fFirstCall) {
|
||||||
fPar = par;
|
fPar = par;
|
||||||
|
|
||||||
for (unsigned int i(2); i<fPar.size(); i++){
|
for (unsigned int i(2); i<fPar.size(); i++){
|
||||||
@ -1065,7 +962,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
|||||||
bool only_phase_changed(false);
|
bool only_phase_changed(false);
|
||||||
|
|
||||||
for (unsigned int i(0); i<fPar.size(); i++) {
|
for (unsigned int i(0); i<fPar.size(); i++) {
|
||||||
if( fPar[i]-par[i] ) {
|
if ( fPar[i]-par[i] ) {
|
||||||
fPar[i] = par[i];
|
fPar[i] = par[i];
|
||||||
par_changed = true;
|
par_changed = true;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
@ -1089,7 +986,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
fParForPofT[0] = par[0]; // phase
|
fParForPofT[0] = par[0]; // phase
|
||||||
|
|
||||||
if(!only_phase_changed) {
|
if (!only_phase_changed) {
|
||||||
|
|
||||||
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
// std::cout << " Parameters have changed, (re-)calculating p(B) and P(t) now..." << std::endl;
|
||||||
|
|
||||||
@ -1100,14 +997,14 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
|||||||
fParForPofB[3] = par[2]; // Bkg-Field
|
fParForPofB[3] = par[2]; // Bkg-Field
|
||||||
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
//fParForPofB[4] = 0.005; // Bkg-width (in principle zero)
|
||||||
|
|
||||||
if(weights_changed) {
|
if (weights_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[3]+par[4]);
|
interfaces.push_back(par[3]+par[4]);
|
||||||
interfaces.push_back(par[3]+par[4]+par[5]);
|
interfaces.push_back(par[3]+par[4]+par[5]);
|
||||||
interfaces.push_back(par[3]+par[4]+par[5]+par[6]);
|
interfaces.push_back(par[3]+par[4]+par[5]+par[6]);
|
||||||
|
|
||||||
vector<double> weights;
|
std::vector<double> weights;
|
||||||
for(unsigned int i(9); i<13; i++)
|
for (unsigned int i(9); i<13; i++)
|
||||||
weights.push_back(par[i]);
|
weights.push_back(par[i]);
|
||||||
|
|
||||||
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
// std::cout << "Weighting has changed, re-calculating n(z) now..." << std::endl;
|
||||||
@ -1117,8 +1014,8 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
|||||||
weights.clear();
|
weights.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(bkg_fraction_changed || weights_changed) {
|
if (bkg_fraction_changed || weights_changed) {
|
||||||
vector<double> interfaces;
|
std::vector<double> interfaces;
|
||||||
interfaces.push_back(par[3]);// dead layer
|
interfaces.push_back(par[3]);// dead layer
|
||||||
interfaces.push_back(par[3] + par[4] + par[5] + par[6]);// dead layer + first layer + second layer + third layer
|
interfaces.push_back(par[3] + par[4] + par[5] + par[6]);// dead layer + first layer + second layer + third layer
|
||||||
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces) + // Fraction of muons in the deadlayer
|
fParForPofB[5] = fImpProfile->LayerFraction(par[1], 1, interfaces) + // Fraction of muons in the deadlayer
|
||||||
@ -1128,7 +1025,7 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
|||||||
|
|
||||||
TLondon1D_3LS BofZ3(fParForBofZ);
|
TLondon1D_3LS BofZ3(fParForBofZ);
|
||||||
fPofB->UnsetPBExists();
|
fPofB->UnsetPBExists();
|
||||||
fPofB->Calculate(&BofZ3, fImpProfile, fParForPofB);
|
fPofB->Calculate(&BofZ3, fImpProfile.get(), fParForPofB);
|
||||||
fPofT->DoFFT();
|
fPofT->DoFFT();
|
||||||
|
|
||||||
}/* else {
|
}/* else {
|
||||||
@ -1141,7 +1038,6 @@ double TLondon1D3LS::operator()(double t, const vector<double> &par) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return fPofT->Eval(t);
|
return fPofT->Eval(t);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// //------------------
|
// //------------------
|
||||||
|
@ -553,7 +553,7 @@ void TPofBCalc::Calculate(const TBulkVortexFieldCalc *vortexLattice, const std::
|
|||||||
if (fill_index < fPBSize) {
|
if (fill_index < fPBSize) {
|
||||||
fPB[fill_index] += 1.0;
|
fPB[fill_index] += 1.0;
|
||||||
} else {
|
} else {
|
||||||
cout << "Field over the limit..." << endl;
|
std::cout << "Field over the limit..." << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// of << endl;
|
// of << endl;
|
||||||
|
46
src/external/libFitPofB/classes/TPofTCalc.cpp
vendored
46
src/external/libFitPofB/classes/TPofTCalc.cpp
vendored
@ -13,7 +13,7 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (C) 2008-2023 by Bastian M. Wojek, Andreas Suter *
|
* Copyright (C) 2008-2024 by Bastian M. Wojek, Andreas Suter *
|
||||||
* *
|
* *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
@ -36,12 +36,14 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "TPofTCalc.h"
|
|
||||||
#include "fftw3.h"
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <iostream>
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include "TPofTCalc.h"
|
||||||
|
#include "fftw3.h"
|
||||||
|
|
||||||
#ifdef HAVE_GOMP
|
#ifdef HAVE_GOMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
@ -217,7 +219,7 @@ double TPofTCalc::Eval(double t) const {
|
|||||||
// Parameters: output filename, par(dt, dB, timeres, channels, asyms, phases, t0s, N0s, bgs) optPar(field, energy)
|
// Parameters: output filename, par(dt, dB, timeres, channels, asyms, phases, t0s, N0s, bgs) optPar(field, energy)
|
||||||
//---------------------
|
//---------------------
|
||||||
|
|
||||||
void TPofTCalc::FakeData(const string &rootOutputFileName, const std::vector<double> &par, const std::vector<double> *optPar = 0) {
|
void TPofTCalc::FakeData(const std::string &rootOutputFileName, const std::vector<double> &par, const std::vector<double> *optPar = 0) {
|
||||||
|
|
||||||
//determine the number of histograms to be built
|
//determine the number of histograms to be built
|
||||||
unsigned int numHist(0);
|
unsigned int numHist(0);
|
||||||
@ -314,8 +316,8 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const std::vector<dou
|
|||||||
|
|
||||||
std::cout << "TPofTCalc::FakeData: Adding Poisson noise ..." << std::endl;
|
std::cout << "TPofTCalc::FakeData: Adding Poisson noise ..." << std::endl;
|
||||||
|
|
||||||
TH1F* theoHisto;
|
std::unique_ptr<TH1F> theoHisto;
|
||||||
TH1F* fakeHisto;
|
std::unique_ptr<TH1F> fakeHisto;
|
||||||
std::vector<TH1F*> histoData;
|
std::vector<TH1F*> histoData;
|
||||||
|
|
||||||
TString name;
|
TString name;
|
||||||
@ -323,13 +325,13 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const std::vector<dou
|
|||||||
// create histos
|
// create histos
|
||||||
name = "theoHisto";
|
name = "theoHisto";
|
||||||
name += i;
|
name += i;
|
||||||
theoHisto = new TH1F(name.Data(), name.Data(), int(par[3]), -par[2]/2.0, (par[3]+0.5)*par[2]);
|
theoHisto = std::make_unique<TH1F>(name.Data(), name.Data(), int(par[3]), -par[2]/2.0, (par[3]+0.5)*par[2]);
|
||||||
if (i < 10)
|
if (i < 10)
|
||||||
name = "hDecay0";
|
name = "hDecay0";
|
||||||
else
|
else
|
||||||
name = "hDecay";
|
name = "hDecay";
|
||||||
name += i;
|
name += i;
|
||||||
fakeHisto = new TH1F(name.Data(), name.Data(), int(par[3]), -par[2]/2.0, (par[3]+0.5)*par[2]);
|
fakeHisto = std::make_unique<TH1F>(name.Data(), name.Data(), int(par[3]), -par[2]/2.0, (par[3]+0.5)*par[2]);
|
||||||
// fill theoHisto
|
// fill theoHisto
|
||||||
#ifdef HAVE_GOMP
|
#ifdef HAVE_GOMP
|
||||||
#pragma omp parallel for default(shared) private(j) schedule(dynamic,chunk)
|
#pragma omp parallel for default(shared) private(j) schedule(dynamic,chunk)
|
||||||
@ -339,24 +341,18 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const std::vector<dou
|
|||||||
// end omp
|
// end omp
|
||||||
|
|
||||||
// fill fakeHisto
|
// fill fakeHisto
|
||||||
fakeHisto->FillRandom(theoHisto, (int)theoHisto->Integral());
|
fakeHisto->FillRandom(theoHisto.get(), (int)theoHisto->Integral());
|
||||||
|
|
||||||
// keep fake data
|
// keep fake data
|
||||||
histoData.push_back(fakeHisto);
|
histoData.push_back(fakeHisto.get());
|
||||||
|
|
||||||
// cleanup
|
|
||||||
if (theoHisto) {
|
|
||||||
delete theoHisto;
|
|
||||||
theoHisto = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "TPofTCalc::FakeData: Write histograms and header information to the file ..." << std::endl;
|
std::cout << "TPofTCalc::FakeData: Write histograms and header information to the file ..." << std::endl;
|
||||||
|
|
||||||
// save the histograms as root files
|
// save the histograms as root files
|
||||||
// create run info folder and content
|
// create run info folder and content
|
||||||
TFolder *runInfoFolder = new TFolder("RunInfo", "Run Info");
|
std::unique_ptr<TFolder> runInfoFolder = std::make_unique<TFolder>("RunInfo", "Run Info");
|
||||||
TLemRunHeader *runHeader = new TLemRunHeader();
|
std::unique_ptr<TLemRunHeader> runHeader = std::make_unique<TLemRunHeader>();
|
||||||
//snprintf(str, sizeof(str), "Fake Data generated from %s", pBFileName.Data());
|
//snprintf(str, sizeof(str), "Fake Data generated from %s", pBFileName.Data());
|
||||||
runHeader->SetRunTitle("Fake Data");
|
runHeader->SetRunTitle("Fake Data");
|
||||||
if (optPar && (optPar->size() > 1)) { // set energy and field if they were specified
|
if (optPar && (optPar->size() > 1)) { // set energy and field if they were specified
|
||||||
@ -375,12 +371,12 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const std::vector<dou
|
|||||||
delete[] t0array;
|
delete[] t0array;
|
||||||
t0array = 0;
|
t0array = 0;
|
||||||
}
|
}
|
||||||
runInfoFolder->Add(runHeader);
|
runInfoFolder->Add(runHeader.get());
|
||||||
|
|
||||||
// create decay histo folder and content
|
// create decay histo folder and content
|
||||||
TFolder *histoFolder = new TFolder("histos", "histos");
|
std::unique_ptr<TFolder> histoFolder = std::make_unique<TFolder>("histos", "histos");
|
||||||
TFolder *decayAnaModule = new TFolder("DecayAnaModule", "DecayAnaModule");
|
std::unique_ptr<TFolder> decayAnaModule = std::make_unique<TFolder>("DecayAnaModule", "DecayAnaModule");
|
||||||
histoFolder->Add(decayAnaModule);
|
histoFolder->Add(decayAnaModule.get());
|
||||||
// no post pileup corrected (NPP)
|
// no post pileup corrected (NPP)
|
||||||
for (unsigned int i(0); i<histoData.size(); i++)
|
for (unsigned int i(0); i<histoData.size(); i++)
|
||||||
decayAnaModule->Add(histoData[i]);
|
decayAnaModule->Add(histoData[i]);
|
||||||
@ -420,13 +416,9 @@ void TPofTCalc::FakeData(const string &rootOutputFileName, const std::vector<dou
|
|||||||
fakeHisto = 0;
|
fakeHisto = 0;
|
||||||
|
|
||||||
histoFolder->Clear();
|
histoFolder->Clear();
|
||||||
delete histoFolder; histoFolder = 0;
|
|
||||||
decayAnaModule->Clear();
|
decayAnaModule->Clear();
|
||||||
delete decayAnaModule; decayAnaModule = 0;
|
|
||||||
|
|
||||||
runInfoFolder->Clear();
|
runInfoFolder->Clear();
|
||||||
delete runInfoFolder; runInfoFolder = 0;
|
|
||||||
delete runHeader; runHeader = 0;
|
|
||||||
|
|
||||||
t0.clear();
|
t0.clear();
|
||||||
asy0.clear();
|
asy0.clear();
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user