Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AUSA
AUSAlib
Commits
944ec570
Commit
944ec570
authored
Aug 26, 2016
by
Munken
Browse files
Merge remote-tracking branch 'origin/master' into telescope
parents
f93a476a
5e7f6af6
Changes
7
Hide whitespace changes
Inline
Side-by-side
include/ausa/LabToCm.h
View file @
944ec570
...
...
@@ -9,8 +9,20 @@ namespace AUSA {
* Output from LabToCM
*/
struct
TransformedValues
{
/**
* Energy in CM.
* Same units as input.
*/
double
energy
;
/**
* Angle in CM in radians
*/
double
angle
;
/**
* Jacobian defined here as sigma'/sigma
* CM solid angle = lab solid angle * 1/jabobian
*/
double
jacobian
;
};
...
...
include/ausa/kinfit/IterativeKinFitter.h
View file @
944ec570
...
...
@@ -71,6 +71,22 @@ namespace AUSA {
* @param nMax maximum number of iterations. Default value is nMax=50.
*/
void
setMaxIterations
(
int
nMax
);
/**
* Get number of known (i.e. measured) kinematic quantities
*/
inline
int
getNumberOfKnowns
()
const
{
return
N
;
};
/**
* Get number of unknown (i.e. not measured) kinematic quantities
*/
inline
int
getNumberOfUnknowns
()
const
{
return
J
;
};
/**
* Get number of constraints
*/
inline
int
getNumberOfConstraints
()
const
{
return
K
;
};
private:
int
N
,
J
,
K
;
...
...
include/ausa/kinfit/IterativeKinFitterImpl.h
View file @
944ec570
...
...
@@ -286,6 +286,7 @@ namespace AUSA {
// replace measured values with fitted ones
for
(
Int_t
i
=
0
;
i
<
N
;
i
++
)
values
[
i
]
=
x
(
i
,
0
);
for
(
Int_t
i
=
0
;
i
<
J
;
i
++
)
values
[
N
+
i
]
=
xi
(
i
,
0
);
// set flag
newFitCompleted
=
true
;
...
...
include/ausa/sort/SortedReader.h
View file @
944ec570
...
...
@@ -64,6 +64,7 @@ namespace AUSA {
private:
Setup
&
setup
;
std
::
unique_ptr
<
SortedReaderBackend
>
reader
;
bool
first
;
};
}
}
...
...
source/sort/SortedReader.cpp
View file @
944ec570
...
...
@@ -16,12 +16,14 @@ SortedReader::SortedReader(std::string file, Setup& setup) : SortedReader(setup)
add
(
file
);
}
SortedReader
::
SortedReader
(
Setup
&
setup
)
:
setup
(
setup
)
{
SortedReader
::
SortedReader
(
Setup
&
setup
)
:
setup
(
setup
)
,
first
(
true
)
{
}
void
SortedReader
::
run
()
{
reader
->
reset
();
if
(
!
first
)
reader
->
reset
();
first
=
false
;
AbstractSortedProvider
::
provider
.
notifyReset
();
SortedSetupOutput
&
output
=
reader
->
getOutput
();
Output
::
setTotal
(
output
,
reader
->
getEntries
());
...
...
test/eloss/SRIM13TabulationTest.cpp
View file @
944ec570
...
...
@@ -37,9 +37,7 @@ SUITE(SRIM13TabulationTest) {
CHECK_EQUAL
(
tOld
.
second
.
front
(),
tNew
.
second
.
front
());
auto
content
=
AUSA
::
asciiFileToString
(
SRIM13Tabulation
::
getDownloadDirectory
()
+
"/1_1/H1_1H.dat"
);
CHECK
(
content
.
find
(
"Hydrogen in Hydrogen.txt"
)
!=
std
::
string
::
npos
);
AUSA
::
asciiFileToString
(
SRIM13Tabulation
::
getDownloadDirectory
()
+
"/1_1/H1_1H.dat"
);
}
TEST
(
HydrogenInHydrogenGasLoads
)
{
...
...
@@ -49,9 +47,7 @@ SUITE(SRIM13TabulationTest) {
SRIM13Tabulation
tab
{
1
,
1
,
Hgas
};
tab
.
getRange
();
auto
content
=
AUSA
::
asciiFileToString
(
f
);
CHECK
(
content
.
find
(
"Hydrogen in Hydrogen (gas).txt"
)
!=
std
::
string
::
npos
);
AUSA
::
asciiFileToString
(
f
);
}
...
...
@@ -72,9 +68,7 @@ SUITE(SRIM13TabulationTest) {
tab
.
getTotalStoppingPower
();
auto
content
=
AUSA
::
asciiFileToString
(
f
);
CHECK
(
content
.
find
(
"Hydrogen in Hydrogen.txt"
)
!=
std
::
string
::
npos
);
AUSA
::
asciiFileToString
(
f
);
}
TEST
(
TableDownloadsH7InHeIfMissing
)
{
...
...
@@ -83,9 +77,7 @@ SUITE(SRIM13TabulationTest) {
SRIM13Tabulation
tab
{
1
,
7
,
He
};
tab
.
getTotalStoppingPower
();
auto
content
=
AUSA
::
asciiFileToString
(
f
);
CHECK
(
content
.
find
(
"Hydrogen in Helium.txt"
)
!=
std
::
string
::
npos
);
AUSA
::
asciiFileToString
(
f
);
}
TEST
(
TestCompoundMaterialDownloadsFine
)
{
...
...
test/kinfit/IterativeKinFitterTest.cpp
View file @
944ec570
...
...
@@ -104,7 +104,7 @@ SUITE(IterativeKinFitter) {
CHECK_CLOSE
(
0.919
,
chisq
,
1E-3
);
CHECK_CLOSE
(
1.944
,
values
[
0
],
1E-3
);
CHECK_CLOSE
(
0.243
,
values
[
1
],
1E-3
);
CHECK_CLOSE
(
0.83
0
,
values
[
2
],
1E-3
);
CHECK_CLOSE
(
0.8
1
3
,
values
[
2
],
1E-3
);
// get covariance matrix
TMatrixD
fitCovMat
=
kf
.
getCovarianceMatrix
();
CHECK_CLOSE
(
0.000324
,
fitCovMat
(
0
,
0
),
1E-3
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment