Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Be_libraries
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vratislav Chudoba
Be_libraries
Commits
e7924428
Commit
e7924428
authored
Jul 28, 2017
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function SetSimCuts() added.
parent
59525b13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
37 deletions
+67
-37
BeAnalysis.cpp
Be/BeAnalysis.cpp
+50
-18
BeAnalysis.h
Be/BeAnalysis.h
+17
-19
No files found.
Be/BeAnalysis.cpp
View file @
e7924428
...
@@ -53,6 +53,7 @@ void BeAnalysis::OpenSimChains() {
...
@@ -53,6 +53,7 @@ void BeAnalysis::OpenSimChains() {
Info
(
"statesRatioFitting.cxx"
,
"%lld events in chain
\"
%s
\"
containing simulated data"
,
chs
[
i
]
->
GetEntries
(),
chs
[
i
]
->
GetName
());
Info
(
"statesRatioFitting.cxx"
,
"%lld events in chain
\"
%s
\"
containing simulated data"
,
chs
[
i
]
->
GetEntries
(),
chs
[
i
]
->
GetName
());
ti
[
i
]
=
BeWork
::
OpenTree
(
inputFiles
[
i
].
Data
(),
"sbeam"
,
2
);
ti
[
i
]
=
BeWork
::
OpenTree
(
inputFiles
[
i
].
Data
(),
"sbeam"
,
2
);
}
}
printf
(
"
\n
"
);
}
}
...
@@ -66,17 +67,18 @@ void BeAnalysis::OpenExpChain() {
...
@@ -66,17 +67,18 @@ void BeAnalysis::OpenExpChain() {
}
}
void
BeAnalysis
::
SetCuts
()
{
void
BeAnalysis
::
SetCuts
()
{
cBe20
=
"fBeIM>0 && fBeIM<20"
;
//
cBe20 = "fBeIM>0 && fBeIM<20";
cBe3
=
"fBeIM>0 && fBeIM<3"
;
//
cBe3 = "fBeIM>0 && fBeIM<3";
cBeWork
=
"fBeIM>0 && fBeIM<10"
;
cBeWork
=
"fBeIM>0 && fBeIM<10"
;
/*TCut */
cBe0_14
=
"fBeIM>0 && fBeIM<1.4"
;
TCut
cBe0_14
=
"fBeIM>0 && fBeIM<1.4"
;
//cBe0_14 = "fBeIM>0 && fBeIM<1.6";
//cBe0_14 = "fBeIM>0 && fBeIM<1.6";
//cBe0_14 = "fBeIM>0 && fBeIM<1.20";
//cBe0_14 = "fBeIM>0 && fBeIM<1.20";
cBe14_19
=
"fBeIM>1.4 && fBeIM<1.9"
;
TCut
cBe14_19
=
"fBeIM>1.4 && fBeIM<1.9"
;
cBe19_25
=
"fBeIM>1.9 && fBeIM<2.5"
;
// cBe14_19 = "fBeIM>1.4 && fBeIM<2.0";
cBe25_31
=
"fBeIM>2.5 && fBeIM<3.1"
;
TCut
cBe19_25
=
"fBeIM>1.9 && fBeIM<2.5"
;
cBe31_37
=
"fBeIM>3.1 && fBeIM<3.7"
;
TCut
cBe25_31
=
"fBeIM>2.5 && fBeIM<3.1"
;
TCut
cBe31_37
=
"fBeIM>3.1 && fBeIM<3.7"
;
//array:
//array:
cBeE
[
0
]
=
cBe0_14
;
cBeE
[
0
]
=
cBe0_14
;
cBeE
[
1
]
=
cBe14_19
;
cBeE
[
1
]
=
cBe14_19
;
...
@@ -91,17 +93,18 @@ void BeAnalysis::SetCuts() {
...
@@ -91,17 +93,18 @@ void BeAnalysis::SetCuts() {
//raw files
//raw files
//energy cuts
//energy cuts
crBe20
=
"f6BeIM>0 && f6BeIM<20"
;
//
crBe20 = "f6BeIM>0 && f6BeIM<20";
crBe3
=
"f6BeIM>0 && f6BeIM<3"
;
//
crBe3 = "f6BeIM>0 && f6BeIM<3";
crBeWork
=
"f6BeIM>0 && f6BeIM<10"
;
crBeWork
=
"f6BeIM>0 && f6BeIM<10"
;
crBe0_14
=
"f6BeIM>0 && f6BeIM<1.4"
;
TCut
crBe0_14
=
"f6BeIM>0 && f6BeIM<1.4"
;
//crBe0_14 = "f6BeIM>0 && f6BeIM<1.6";
//crBe0_14 = "f6BeIM>0 && f6BeIM<1.6";
//crBe0_14 = "f6BeIM>0.5 && f6BeIM<1.20";
//crBe0_14 = "f6BeIM>0.5 && f6BeIM<1.20";
crBe14_19
=
"f6BeIM>1.4 && f6BeIM<1.9"
;
TCut
crBe14_19
=
"f6BeIM>1.4 && f6BeIM<1.9"
;
crBe19_25
=
"f6BeIM>1.9 && f6BeIM<2.5"
;
// TCut crBe14_19 = "f6BeIM>1.6 && f6BeIM<2.1";
crBe25_31
=
"f6BeIM>2.5 && f6BeIM<3.1"
;
TCut
crBe19_25
=
"f6BeIM>1.9 && f6BeIM<2.5"
;
crBe31_37
=
"f6BeIM>3.1 && f6BeIM<3.7"
;
TCut
crBe25_31
=
"f6BeIM>2.5 && f6BeIM<3.1"
;
TCut
crBe31_37
=
"f6BeIM>3.1 && f6BeIM<3.7"
;
//array:
//array:
crBeE
[
0
]
=
crBe0_14
;
crBeE
[
0
]
=
crBe0_14
;
crBeE
[
1
]
=
crBe14_19
;
crBeE
[
1
]
=
crBe14_19
;
...
@@ -263,7 +266,7 @@ void BeAnalysis::Spectra() {
...
@@ -263,7 +266,7 @@ void BeAnalysis::Spectra() {
for
(
Int_t
j
=
0
;
j
<
6
;
j
++
)
{
//different files
for
(
Int_t
j
=
0
;
j
<
6
;
j
++
)
{
//different files
if
(
!
kChains
[
j
])
continue
;
if
(
!
kChains
[
j
])
continue
;
cout
<<
kChains
[
j
]
<<
endl
;
//
cout << kChains[j] << endl;
cSpectra
->
cd
(
j
+
1
);
cSpectra
->
cd
(
j
+
1
);
chs
[
j
]
->
SetLineColor
(
kBlue
);
chs
[
j
]
->
SetLineColor
(
kBlue
);
chs
[
j
]
->
SetFillColor
(
kWhite
);
chs
[
j
]
->
SetFillColor
(
kWhite
);
...
@@ -316,15 +319,27 @@ void BeAnalysis::Spectra() {
...
@@ -316,15 +319,27 @@ void BeAnalysis::Spectra() {
cSpectra
->
Update
();
cSpectra
->
Update
();
cout
<<
endl
;
Int_t
intLowLimit
,
IntHighLimit
;
const
Double_t
binToMeV
=
10.
/
(
Double_t
)
noBinsSpectra
;
Info
(
"statesRatioFitting"
,
"MC %d"
,
j
+
1
);
Info
(
"statesRatioFitting"
,
"MC %d"
,
j
+
1
);
Info
(
"statesRatioFitting"
,
"ground state: %3.1f (sim)/ %3.1f (exp) = %3.3f"
,
hsSpectra
[
j
]
->
Integral
(
0
,
40
),
heSpectra
[
j
]
->
Integral
(
0
,
40
),
hsSpectra
[
j
]
->
Integral
(
0
,
40
)
/
heSpectra
[
j
]
->
Integral
(
0
,
40
)
);
intLowLimit
=
(
Int_t
)
0.
/
binToMeV
;
Info
(
"statesRatioFitting"
,
"left slope: %3.1f (sim)/ %3.1f (exp) = %3.3f
\n
"
,
hsSpectra
[
j
]
->
Integral
(
50
,
70
),
heSpectra
[
j
]
->
Integral
(
50
,
70
),
hsSpectra
[
j
]
->
Integral
(
50
,
70
)
/
heSpectra
[
j
]
->
Integral
(
50
,
70
)
);
IntHighLimit
=
(
Int_t
)
2.
/
binToMeV
;
Info
(
"statesRatioFitting"
,
"ground state: %3.1f (sim)/ %3.1f (exp) = %3.3f"
,
hsSpectra
[
j
]
->
Integral
(
intLowLimit
,
IntHighLimit
),
heSpectra
[
j
]
->
Integral
(
intLowLimit
,
IntHighLimit
),
hsSpectra
[
j
]
->
Integral
(
intLowLimit
,
IntHighLimit
)
/
heSpectra
[
j
]
->
Integral
(
intLowLimit
,
IntHighLimit
)
);
intLowLimit
=
(
Int_t
)
2.5
/
binToMeV
;
IntHighLimit
=
(
Int_t
)
3.2
/
binToMeV
;
Info
(
"statesRatioFitting"
,
"left slope: %3.1f (sim)/ %3.1f (exp) = %3.3f
\n
"
,
hsSpectra
[
j
]
->
Integral
(
intLowLimit
,
IntHighLimit
),
heSpectra
[
j
]
->
Integral
(
intLowLimit
,
IntHighLimit
),
hsSpectra
[
j
]
->
Integral
(
intLowLimit
,
IntHighLimit
)
/
heSpectra
[
j
]
->
Integral
(
intLowLimit
,
IntHighLimit
)
);
}
//for j
}
//for j
SaveFigures
(
cSpectra
,
"Spectra"
,
0
);
SaveFigures
(
cSpectra
,
"Spectra"
,
0
);
Info
(
"sfAngInt_spectra.cxx"
,
"Finished."
);
Info
(
"sfAngInt_spectra.cxx"
,
"Finished."
);
printf
(
"
\n
"
);
}
}
...
@@ -1100,6 +1115,23 @@ void BeAnalysis::SaveFigures(TCanvas *canvas, TString variable, Int_t interval)
...
@@ -1100,6 +1115,23 @@ void BeAnalysis::SaveFigures(TCanvas *canvas, TString variable, Int_t interval)
}
}
void
BeAnalysis
::
SetSimCuts
(
TString
sEt
[
5
]
/*, TString sET0, TString sET1, TString sET2, TString sET3, TString sET4*/
)
{
// if (sEt == 0) {
// Error("BeAnalysis::SetSimCuts", "String array empty, no effect.");
// return;
// }
for
(
Int_t
i
=
0
;
i
<
5
;
i
++
)
{
// cout << sEt[i].Sizeof() << endl;
if
(
sEt
[
i
].
Sizeof
()
<=
1
)
continue
;
crBeE
[
i
]
=
sEt
[
i
];
Info
(
"BeAnalysis::SetSimCuts"
,
"crBeE[%d] was changed to
\'
%s
\'
."
,
i
,
sEt
[
i
].
Data
());
// cout << crBeE[i] << endl;
}
}
void
BeAnalysis
::
CanvasDivision
(
TCanvas
*
c
)
{
void
BeAnalysis
::
CanvasDivision
(
TCanvas
*
c
)
{
c
->
Divide
(
2
,
3
,
0.
,
0.
);
c
->
Divide
(
2
,
3
,
0.
,
0.
);
}
}
Be/BeAnalysis.h
View file @
e7924428
...
@@ -42,7 +42,10 @@ public:
...
@@ -42,7 +42,10 @@ public:
TChain
*
GetSimChain
(
Int_t
i
)
{
return
chs
[
i
];};
TChain
*
GetSimChain
(
Int_t
i
)
{
return
chs
[
i
];};
void
SetChainsToDraw
(
Bool_t
ch0
=
1
,
Bool_t
ch1
=
1
,
Bool_t
ch2
=
1
,
Bool_t
ch3
=
1
,
Bool_t
ch4
=
1
,
Bool_t
ch5
=
1
);
void
SetChainsToDraw
(
Bool_t
ch0
=
1
,
Bool_t
ch1
=
1
,
Bool_t
ch2
=
1
,
Bool_t
ch3
=
1
,
Bool_t
ch4
=
1
,
Bool_t
ch5
=
1
);
private
:
void
SetCuts
();
void
SetCuts
();
public
:
void
SetSimCuts
(
TString
sEt
[
5
]
/*, TString sET0 = "", TString sET1 = "", TString sET2 = "", TString sET3 = "", TString sET4 = ""*/
);
void
SetCMAngularRange
(
Int_t
minAngle
,
Int_t
maxAngle
);
void
SetCMAngularRange
(
Int_t
minAngle
,
Int_t
maxAngle
);
private
:
private
:
...
@@ -129,14 +132,14 @@ private:
...
@@ -129,14 +132,14 @@ private:
Double_t
eTRange
[
5
][
6
];
//!
Double_t
eTRange
[
5
][
6
];
//!
//cuts
//cuts
TCut
cBe20
;
//
TCut cBe20;
TCut
cBe3
;
//
TCut cBe3;
TCut
cBeWork
;
TCut
cBeWork
;
TCut
cBe0_14
;
//
TCut cBe0_14;
TCut
cBe14_19
;
//
TCut cBe14_19;
TCut
cBe19_25
;
//
TCut cBe19_25;
TCut
cBe25_31
;
//
TCut cBe25_31;
TCut
cBe31_37
;
//
TCut cBe31_37;
TCut
cBeE
[
5
];
TCut
cBeE
[
5
];
TCut
cEpsilonT
;
TCut
cEpsilonT
;
...
@@ -144,14 +147,14 @@ private:
...
@@ -144,14 +147,14 @@ private:
//raw files
//raw files
//energy cuts
//energy cuts
TCut
crBe20
;
//
TCut crBe20;
TCut
crBe3
;
//
TCut crBe3;
TCut
crBeWork
;
TCut
crBeWork
;
TCut
crBe0_14
;
//
TCut crBe0_14;
TCut
crBe14_19
;
//
TCut crBe14_19;
TCut
crBe19_25
;
//
TCut crBe19_25;
TCut
crBe25_31
;
//
TCut crBe25_31;
TCut
crBe31_37
;
//
TCut crBe31_37;
TCut
crBeE
[
5
];
TCut
crBeE
[
5
];
//angular cuts
//angular cuts
...
@@ -159,11 +162,6 @@ private:
...
@@ -159,11 +162,6 @@ private:
TCut
crEpsilonY
;
TCut
crEpsilonY
;
//simulation input
//simulation input
// TCut ciBe0_14;
// TCut ciBe14_19;
// TCut ciBe19_25;
// TCut ciBe25_31;
// TCut ciBe31_37;
TCut
ciBeE
[
5
];
TCut
ciBeE
[
5
];
TCut
ciEpsilon
;
TCut
ciEpsilon
;
...
...
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