Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
go4egor
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
go4egor
Commits
f328bdca
Commit
f328bdca
authored
Jul 01, 2018
by
Vratislav Chudoba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some progress with Be data analysis.
parent
1c8bbfcf
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
971 additions
and
210 deletions
+971
-210
fillChain.cxx
analysis/fillChain.cxx
+224
-24
showBananas2.cxx
analysis/showBananas2.cxx
+446
-126
showTritium.cxx
analysis/showTritium.cxx
+3
-60
showTritiumReport.cxx
analysis/showTritiumReport.cxx
+298
-0
No files found.
analysis/fillChain.cxx
View file @
f328bdca
This diff is collapsed.
Click to expand it.
analysis/showBananas2.cxx
View file @
f328bdca
This diff is collapsed.
Click to expand it.
analysis/showTritium.cxx
View file @
f328bdca
...
@@ -28,12 +28,6 @@ void showTritium(const Long64_t drawEntries = 100000)
...
@@ -28,12 +28,6 @@ void showTritium(const Long64_t drawEntries = 100000)
tr
->
AddFriend
(
trCal
);
tr
->
AddFriend
(
trCal
);
// TFile *fcal = new TFile("~/data/exp1804/calib/si_20_03_calib.root");
// TTree *tAlphaCal = (TTree*)fcal->Get("cal");
// tAlphaCal->SetMarkerColor(kRed);
// tAlphaCal->SetMarkerStyle(20);
// tAlphaCal->SetMarkerSize(.6);
TFile
*
fc
=
new
TFile
(
"cutsIdentification.root"
,
"READ"
);
TFile
*
fc
=
new
TFile
(
"cutsIdentification.root"
,
"READ"
);
TCutG
*
cUS
=
(
TCutG
*
)
fc
->
Get
(
"c7UpperShadow"
);
TCutG
*
cUS
=
(
TCutG
*
)
fc
->
Get
(
"c7UpperShadow"
);
TCutG
*
cLS
=
(
TCutG
*
)
fc
->
Get
(
"c7LowerShadow"
);
TCutG
*
cLS
=
(
TCutG
*
)
fc
->
Get
(
"c7LowerShadow"
);
...
@@ -44,9 +38,6 @@ void showTritium(const Long64_t drawEntries = 100000)
...
@@ -44,9 +38,6 @@ void showTritium(const Long64_t drawEntries = 100000)
TCutG
*
cBR
=
(
TCutG
*
)
fc
->
Get
(
"cBeamRight"
);
TCutG
*
cBR
=
(
TCutG
*
)
fc
->
Get
(
"cBeamRight"
);
// const Int_t drawEntries = 6000000;
// const Int_t drawEntries = tr->GetEntries();
tr
->
GetListOfFiles
()
->
Print
();
tr
->
GetListOfFiles
()
->
Print
();
trCal
->
GetListOfFiles
()
->
Print
();
trCal
->
GetListOfFiles
()
->
Print
();
...
@@ -102,7 +93,7 @@ void showTritium(const Long64_t drawEntries = 100000)
...
@@ -102,7 +93,7 @@ void showTritium(const Long64_t drawEntries = 100000)
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
// c2
// c2
/*
TCanvas *c2 = new TCanvas("c2", "time from right Si", 1600, 800);
TCanvas
*
c2
=
new
TCanvas
(
"c2"
,
"time from right Si"
,
1600
,
800
);
c2
->
Divide
(
4
,
2
);
c2
->
Divide
(
4
,
2
);
for
(
Int_t
i
=
0
;
i
<
8
;
i
++
)
{
for
(
Int_t
i
=
0
;
i
<
8
;
i
++
)
{
...
@@ -142,7 +133,7 @@ void showTritium(const Long64_t drawEntries = 100000)
...
@@ -142,7 +133,7 @@ void showTritium(const Long64_t drawEntries = 100000)
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
// c3
// c3
/*
TCanvas *c3 = new TCanvas("c3", "time from CsI", 1000, 900);
TCanvas
*
c3
=
new
TCanvas
(
"c3"
,
"time from CsI"
,
1000
,
900
);
c3
->
Divide
(
4
,
4
);
c3
->
Divide
(
4
,
4
);
// gROOT->ProcessLine(".x cutPokus.cxx");
// gROOT->ProcessLine(".x cutPokus.cxx");
...
@@ -210,7 +201,7 @@ void showTritium(const Long64_t drawEntries = 100000)
...
@@ -210,7 +201,7 @@ void showTritium(const Long64_t drawEntries = 100000)
c4
->
Update
();
c4
->
Update
();
}
//*/
}
//*/
return
;
//
return;
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
// c5
// c5
...
@@ -288,54 +279,6 @@ void showTritium(const Long64_t drawEntries = 100000)
...
@@ -288,54 +279,6 @@ void showTritium(const Long64_t drawEntries = 100000)
}
}
return
;
/////////////////////////////////////////////////////////////////////
// c6
TCanvas
*
c6
=
new
TCanvas
(
"c6"
,
"1 mm Y: 8-15 - target locus"
,
1600
,
800
);
c6
->
Divide
(
4
,
2
);
TString
cTarget
(
"xt>-10. && xt<10. && yt>-15. && yt<15."
);
c6
->
cd
(
1
);
tr
->
Draw
(
"SQ20E[0]:SQ20E[0]+SQLYEsum>>(200,0,5,200,0,5)"
,
""
,
""
,
100
);
for
(
Int_t
i
=
0
;
i
<
8
;
i
++
)
{
c6
->
cd
(
i
+
1
);
varName
.
Form
(
"SQ20E[%d]:SQ20E[%d]+SQLYEsum"
,
i
+
firstThinStrip
,
i
+
firstThinStrip
);
condition
.
Form
(
"SQ20E[%d]>1.2 && SQ20E[%d]<5.5 && SQLYEsum>1.1 && SQLYEsum<30 && SQLYE[0]<1. && SQLYE[15]<1."
,
i
+
firstThinStrip
,
i
+
firstThinStrip
);
tr
->
Draw
(
varName
,
condition
,
"col"
,
drawEntries
);
c6
->
Update
();
condition
.
Form
(
"SQ20E[%d]>1.2 && SQ20E[%d]<5.5 && SQLYEsum>1.1 && SQLYEsum<30 && SQLYE[0]<1. && SQLYE[15]<1. && %s"
,
i
+
firstThinStrip
,
i
+
firstThinStrip
,
cTarget
.
Data
());
tr
->
SetMarkerColor
(
kRed
);
tr
->
SetMarkerStyle
(
20
);
tr
->
SetMarkerSize
(
.5
);
tr
->
Draw
(
varName
,
condition
,
"same"
,
drawEntries
);
c6
->
Update
();
}
/////////////////////////////////////////////////////////////////////
// c7
TCanvas
*
c7
=
new
TCanvas
(
"c7"
,
"1 mm Y: 8-15"
,
1600
,
800
);
c7
->
Divide
(
4
,
2
);
TString
cStripsLow
(
"SQLXE[0]<1. && SQLXE[1]<1. && SQLXE[2]<1. && SQLXE[3]<1. && SQLXE[4]<1. && SQLXE[5]<1. && SQLXE[6]<1. && SQLXE[7]<1. && SQLXE[8]<1. && SQLXE[9]<1. && SQLXE[10]<1."
);
TString
cStripsHigh
(
"SQLXE[31]<1. && SQLXE[30]<1. && SQLXE[29]<1. && SQLXE[28]<1. && SQLXE[27]<1. && SQLXE[26]<1. && SQLXE[25]<1. && SQLXE[24]<1. && SQLXE[23]<1. && SQLXE[22]<1. && SQLXE[21]<1. && SQLXE[20]<1."
);
for
(
Int_t
i
=
0
;
i
<
8
;
i
++
)
{
c7
->
cd
(
i
+
1
);
varName
.
Form
(
"SQ20E[%d]:SQ20E[%d]+SQLXEsum"
,
i
+
firstThinStrip
,
i
+
firstThinStrip
);
condition
.
Form
(
"SQ20E[%d]>1.2 && SQ20E[%d]<5.5 "
"&& SQLXEsum>1.1 && SQLXEsum<30 "
"&& %s && %s"
,
i
+
firstThinStrip
,
i
+
firstThinStrip
,
cStripsLow
.
Data
(),
cStripsHigh
.
Data
());
tr
->
Draw
(
varName
,
condition
,
"col"
,
drawEntries
);
c7
->
Update
();
}
return
;
return
;
}
}
analysis/showTritiumReport.cxx
0 → 100644
View file @
f328bdca
#include "TSystem.h"
#include "TFile.h"
#include "TTree.h"
#include "TChain.h"
#include "TCanvas.h"
#include "TBox.h"
#include "TCut.h"
#include "TCutG.h"
#include "TROOT.h"
using
std
::
cout
;
using
std
::
endl
;
void
showTritiumReport
(
const
Long64_t
drawEntries
=
1000000
)
{
TChain
*
tr
=
new
TChain
(
"AnalysisxTree"
);
tr
->
Add
(
"~/data/exp1804/h5_14_0?.root"
);
tr
->
Add
(
"~/data/exp1804/be10_0?_?0.root"
);
TChain
*
trCal
=
new
TChain
(
"cal"
);
trCal
->
Add
(
"~/data/exp1804/h5_14_0?_calib.root"
);
trCal
->
Add
(
"~/data/exp1804/be10_0?_?0_calib.root"
);
tr
->
AddFriend
(
trCal
);
TFile
*
fc
=
new
TFile
(
"cutsIdentification.root"
,
"READ"
);
TCutG
*
cUS
=
(
TCutG
*
)
fc
->
Get
(
"c7UpperShadow"
);
TCutG
*
cLS
=
(
TCutG
*
)
fc
->
Get
(
"c7LowerShadow"
);
cLS
->
SetLineColor
(
kMagenta
);
TCutG
*
cMA
=
(
TCutG
*
)
fc
->
Get
(
"c7MainAlpha"
);
TCutG
*
cA
=
(
TCutG
*
)
fc
->
Get
(
"c7All"
);
TCutG
*
cBL
=
(
TCutG
*
)
fc
->
Get
(
"cBeamLeft"
);
TCutG
*
cBR
=
(
TCutG
*
)
fc
->
Get
(
"cBeamRight"
);
tr
->
GetListOfFiles
()
->
Print
();
trCal
->
GetListOfFiles
()
->
Print
();
cout
<<
tr
->
GetEntries
()
<<
" events."
<<
endl
;
cout
<<
trCal
->
GetEntries
()
<<
" calibrated events."
<<
endl
;
TString
varName
;
TString
condition
;
cout
<<
drawEntries
<<
" entries in input chain will be processed."
<<
endl
;
Int_t
firstThinStrip
=
4
;
TFile
*
fCutsTime
=
new
TFile
(
"cutsTimeCsI.root"
);
TFile
*
fCutsTritium
=
new
TFile
(
"cutsDeltaEtritium.root"
);
TFile
*
fCutsHelium
=
new
TFile
(
"cutsDeltaEhelium.root"
);
TCutG
*
currCut
;
TString
cutName
;
TString
timeSiCondition
;
timeSiCondition
.
Form
(
"0.3*tSQX_R[0]-0.125*tF5[0]<100"
);
// TString auxCon;
for
(
Int_t
j
=
1
;
j
<
32
;
j
++
)
{
condition
.
Form
(
" && 0.3*tSQX_R[%d]-0.125*tF5[0]<100"
,
j
);
timeSiCondition
.
Append
(
condition
);
}
cout
<<
timeSiCondition
<<
endl
;
/////////////////////////////////////////////////////////////////////
// c1
/*TCanvas *c1 = new TCanvas("c1", "tritium raw", 1600, 400);
c1->Divide(4,1);
for (Int_t i = 0; i < 4; i++) {
c1->cd(i+1);
varName.Form("SQRXE:NeEvent.CsI_R[%d]", i+firstThinStrip);
condition.Form("NeEvent.CsI_R[%d]<4000 "
"&& SQRXEsum<40 && SQRXmult==1 && SQRXE[0]<1 "
"&& trigger==3",
i+firstThinStrip);
tr->SetMarkerColor(kBlack);
tr->SetMarkerStyle(20);
tr->SetMarkerSize(0.1);
tr->Draw(varName, condition, "", 10000000);
c1->Update();
}//*/
// return;
/////////////////////////////////////////////////////////////////////
// c2
/*TCanvas *c2 = new TCanvas("c2", "time from right Si", 1600, 400);
c2->Divide(4,1);
firstThinStrip = 14;
for (Int_t i = 0; i < 4; i++) {
c2->cd(i+1);
varName.Form("SQRXE[%d]:0.3*tSQX_R[%d]-0.125*tF5[0]", i+firstThinStrip, i+firstThinStrip);
condition.Form("tSQX_R[%d]>1"
"&& trigger==3"
"&& (0.3*tSQX_R[%d]-0.125*tF5[0])<250",
i+firstThinStrip, i+firstThinStrip);
tr->SetMarkerColor(kBlack);
tr->Draw(varName, condition, "", drawEntries);
condition.Form(
"trigger==3 && %s",
timeSiCondition.Data());
tr->SetMarkerColor(kRed);
tr->Draw(varName, condition, "same", 10000000);
c2->Update();
}//for */
// return;
/////////////////////////////////////////////////////////////////////
// c3
/*TCanvas *c3 = new TCanvas("c3", "time from CsI", 1600, 400);
c3->Divide(4,1);
firstThinStrip = 4;
for (Int_t i = 0; i < 4; i++) {
c3->cd(i+1);
cutName.Form("cTime%d", i);
currCut = (TCutG*)fCutsTime->Get(cutName);
varName.Form("CsI_R[%d]:0.125*tCsI_R[%d]-0.125*tF5[0]",
i+firstThinStrip, i+firstThinStrip);
condition.Form("CsI_R[%d]>3 && trigger==3"
"&& 0.125*tCsI_R[%d]-0.125*tF5[0] > -80"
"&& 0.125*tCsI_R[%d]-0.125*tF5[0] < 0"
"&& CsI_R[%d] < 8500",
i+firstThinStrip, i+firstThinStrip,
i+firstThinStrip, i+firstThinStrip);
tr->SetMarkerColor(kBlack);
tr->Draw(varName, condition, "", 10000000);
currCut->Draw("same");
c3->Update();
}//*/
// return;
/////////////////////////////////////////////////////////////////////
// c4
/*TCanvas *c4 = new TCanvas("c4", "PID plot from CsI filtered for time", 1600, 400);
c4->Divide(4,1);
firstThinStrip = 8;
for (Int_t i = 0; i < 4; i++) {
c4->cd(i+1);
cutName.Form("cTime%d", i+firstThinStrip);
currCut = (TCutG*)fCutsTime->Get(cutName);
varName.Form("SQRXE:NeEvent.CsI_R[%d]", i+firstThinStrip);
condition.Form("NeEvent.CsI_R[%d]<3500"
"&& SQRXEsum<25 && SQRXEsum>1 && SQRXmult==1"
"&& trigger==3 && %s && %s",
i+firstThinStrip, cutName.Data(), timeSiCondition.Data());
tr->SetMarkerColor(kBlack);
tr->Draw(varName, condition, "", 100000000);
cutName.Form("cutEnergy%d", i+firstThinStrip);
currCut = (TCutG*)fCutsTritium->Get(cutName);
currCut->Draw("same");
c4->Update();
}//*/
// return;
/////////////////////////////////////////////////////////////////////
// c5
TCanvas
*
c5
=
new
TCanvas
(
"c5"
,
"dE-E left telescope corrected"
,
1600
,
400
);
c5
->
Divide
(
4
,
1
);
firstThinStrip
=
4
;
for
(
Int_t
i
=
0
;
i
<
4
;
i
++
)
{
c5
->
cd
(
i
+
1
);
// varName.Form("SQ20Ecorr[%d]:SQLYEsum", i+firstThinStrip);
varName
.
Form
(
"SQ20Ecorr[%d]:SQ20Ecorr[%d]+SQLYEsum"
,
i
+
firstThinStrip
,
i
+
firstThinStrip
);
varName
.
Form
(
"SQ20Ecorr[%d]:SQ20Ecorr[%d]+SQLXEsum"
,
i
+
firstThinStrip
,
i
+
firstThinStrip
);
condition
.
Form
(
"SQ20Ecorr[%d]>1.2 && SQ20Ecorr[%d]<5 "
"&& SQLYEsum>1.1 && SQLYEsum<30 "
"&& SQLXEsum>1.1 && SQLXEsum<30 "
"&& SQLYE[0]<1. && SQLYE[15]<1. "
"&& SQLYmult==1 && SQLXmult==1"
"&& trigger==3"
,
i
+
firstThinStrip
,
i
+
firstThinStrip
);
tr
->
SetMarkerColor
(
kBlack
);
tr
->
Draw
(
varName
,
condition
,
"col"
,
10000000000
);
cutName
.
Form
(
"cutHe%d"
,
i
+
firstThinStrip
);
currCut
=
(
TCutG
*
)
fCutsHelium
->
Get
(
cutName
);
currCut
->
Draw
(
"same"
);
c5
->
Update
();
}
//*/
return
;
/////////////////////////////////////////////////////////////////////
// c6
TCanvas
*
c6
=
new
TCanvas
(
"c6"
,
"3He-3H coincidences"
,
1600
,
400
);
c6
->
Divide
(
4
,
1
);
firstThinStrip
=
12
;
TCutG
*
currCutTritium
;
TString
cutNameTritium
;
TString
cutHe
(
"(cutHe0"
);
TString
cutNameHe
;
// TFile *fCutsHelium = new TFile("cutsDeltaEhelium.root");
TCutG
*
cutsHe
[
14
];
for
(
Int_t
i
=
0
;
i
<
14
;
i
++
)
{
cutNameHe
.
Form
(
"cutHe%d"
,
i
);
cutsHe
[
i
]
=
(
TCutG
*
)
fCutsHelium
->
Get
(
cutNameHe
);
cutName
.
Form
(
" || %s"
,
cutNameHe
.
Data
());
if
(
i
>
0
)
cutHe
.
Append
(
cutName
);
}
cutHe
.
Append
(
")"
);
cout
<<
endl
<<
endl
<<
cutHe
<<
endl
;
Int_t
numberOfHe
[
16
];
for
(
Int_t
i
=
0
;
i
<
16
;
i
++
)
numberOfHe
[
i
]
=
-
1
;
for
(
Int_t
i
=
0
;
i
<
4
;
i
++
)
{
c6
->
cd
(
i
+
1
);
cutName
.
Form
(
"cTime%d"
,
i
+
firstThinStrip
);
currCut
=
(
TCutG
*
)
fCutsTime
->
Get
(
cutName
);
cutNameTritium
.
Form
(
"cutEnergy%d"
,
i
+
firstThinStrip
);
currCutTritium
=
(
TCutG
*
)
fCutsTritium
->
Get
(
cutNameTritium
);
varName
.
Form
(
"SQRXE:NeEvent.CsI_R[%d]"
,
i
+
firstThinStrip
);
condition
.
Form
(
"NeEvent.CsI_R[%d]<3500"
"&& SQRXEsum<25 && SQRXEsum>1 && SQRXmult==1"
"&& trigger==3 && %s && %s"
,
i
+
firstThinStrip
,
cutName
.
Data
(),
timeSiCondition
.
Data
());
tr
->
SetMarkerColor
(
kBlack
);
tr
->
SetMarkerStyle
(
20
);
tr
->
SetMarkerSize
(
.2
);
tr
->
Draw
(
varName
,
condition
,
""
,
100000000
);
// tr->Draw(varName, "", "", drawEntries);
// tr->Draw(varName, condition, "", drawEntries);
// tAlphaCal->Draw(varName, "", "same");
// cutName.Form("cutEnergy%d", i);
// currCut = (TCutG*)fCutsTritium->Get(cutName);
currCutTritium
->
Draw
(
"same"
);
c6
->
Update
();
condition
.
Form
(
"NeEvent.CsI_R[%d]<3500"
"&& SQRXEsum<25 && SQRXEsum>1 && SQRXmult==1"
"&& trigger==3 && %s && %s && %s && %s"
,
i
+
firstThinStrip
,
cutName
.
Data
(),
timeSiCondition
.
Data
(),
cutNameTritium
.
Data
(),
cutHe
.
Data
());
tr
->
SetMarkerColor
(
kRed
);
tr
->
SetMarkerStyle
(
20
);
tr
->
SetMarkerSize
(
1
);
numberOfHe
[
i
+
firstThinStrip
]
=
tr
->
Draw
(
varName
,
condition
,
"same"
,
100000000
);
cout
<<
"CsI number "
<<
i
+
firstThinStrip
<<
": "
<<
numberOfHe
[
i
+
firstThinStrip
]
<<
" events"
<<
endl
;
c6
->
Update
();
}
cout
<<
endl
<<
endl
;
for
(
Int_t
i
=
0
;
i
<
16
;
i
++
)
{
cout
<<
"CsI number "
<<
i
<<
": "
<<
numberOfHe
[
i
]
<<
" events"
<<
endl
;
}
//*/
// return;
}
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