Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AculUtils
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AccullinaGroup
AculUtils
Commits
a0882328
Commit
a0882328
authored
Oct 05, 2016
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function AculCalibration::CalibrateRawSpectra() added.
parent
ff00f341
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
169 additions
and
31 deletions
+169
-31
AculCalibration.cpp
AculData/AculCalibration.cpp
+145
-26
AculCalibration.h
AculData/AculCalibration.h
+24
-5
No files found.
AculData/AculCalibration.cpp
View file @
a0882328
This diff is collapsed.
Click to expand it.
AculData/AculCalibration.h
View file @
a0882328
...
...
@@ -75,12 +75,14 @@ public:
Double_t
fFitMinSigma
;
//pouziva se, private
Double_t
fFitPeakThreshold
;
//pouziva se, private, prozkoumat, k cemu vlastne slouzi ve fci ShowPeaks, popremyslet o vhodnem prednastaveni v konstruktoru
//t
yto promenne jsou smyslem tridy, mely by tedy byt snad jako jedine verejne
Double_t
fA
[
BLOCKSNUMBER
][
ADDRESSNUMBER
];
//kalibracni parametry, f(x) = fA*x + fB
Double_t
fB
[
BLOCKSNUMBER
][
ADDRESSNUMBER
];
//kalibracni parametry, f(x) = fA*x + fB
//t
hese variables are the main for the class
Double_t
fA
Old
[
BLOCKSNUMBER
][
ADDRESSNUMBER
];
//calibration parameter, f(x) = fAOld*x + fBOld
Double_t
fB
Old
[
BLOCKSNUMBER
][
ADDRESSNUMBER
];
//calibration parameter, f(x) = fAOld*x + fBOld
Double_t
fC
[
BLOCKSNUMBER
][
ADDRESSNUMBER
];
//treti kalibracni parametr, jine zavislosti nez pol1
Double_t
fD
[
BLOCKSNUMBER
][
ADDRESSNUMBER
];
//ctvrty kalibracni parametr
TArrayD
fA
;
TArrayD
fB
;
...
...
@@ -126,7 +128,7 @@ public:
Bool_t
SetCalibrationParameters
(
const
char
*
calparfile
);
//Loads the file with calibration parameters
//
// calparfile: file containing calibration parameters in format: crate number, address, subaddress, fA
, fB
, fC, fD
// calparfile: file containing calibration parameters in format: crate number, address, subaddress, fA
Old, fBOld
, fC, fD
//
// allowed comment characters: *, #, %, //
...
...
@@ -134,7 +136,7 @@ public:
//I hope this is selfunderstanding function
void
PrintCalibrationParameters
(
const
Int_t
blockmin
=
1
,
const
Int_t
blockmax
=
BLOCKSNUMBER
-
1
);
//Print calibration parameters fA
, fB
, fC, fD which are currently saved in object AculCalibration
//Print calibration parameters fA
Old, fBOld
, fC, fD which are currently saved in object AculCalibration
//
// blockmin: minimum block data are displayed for
// blockmax: maximum block data are displayed for
...
...
@@ -154,6 +156,23 @@ public:
// lowersubaddress: block subaddress
// uppersubaddress: block subbaddress
void
CalibrateRawSpectra
();
UShort_t
SomeFunction
(
UShort_t
x
,
int
len
);
template
<
typename
T
>
T
SomeFunction
(
T
x
,
int
len
)
{
/*T max = x[0];
for(int i = 1; i < len; i++)
if(max < x[i])
max = x[i];*/
// return max;
return
x
;
}
void
CalibrateRawSpectra
(
const
char
*
inputfile
,
const
char
*
block
,
const
Int_t
address
,
const
char
*
treename
,
Int_t
lowerchannel
=
0
,
Int_t
upperchannel
=
4095
,
Int_t
nEBins
=
1000
,
Int_t
lowersubaddress
=
0
,
Int_t
uppersubaddress
=
ADDRESSNUMBER
-
1
);
// Bool_t EnergyPositions(const char* inputfile, const char* block,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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