Compare commits
219 Commits
master
...
devel_vign
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
542e927049 | ||
|
|
2784671732 | ||
|
|
774050dfdf | ||
|
|
caeff0d7c5 | ||
|
|
6ff00bedc2 | ||
|
|
8e9d539653 | ||
|
|
902afaad54 | ||
|
|
07e30a5ddd | ||
|
|
00c507e0ac | ||
|
|
2d3bcc7c74 | ||
|
|
58d0ef1839 | ||
|
|
51ece5e69b | ||
|
|
bd79dda26b | ||
|
|
14999546b7 | ||
|
|
a292695a4d | ||
|
|
173fb36ea2 | ||
|
|
3e9c86d8dc | ||
|
|
3b09639c60 | ||
|
|
2bd4f4eb33 | ||
|
|
a3cab973be | ||
|
|
f17259c8cc | ||
|
|
95f15ed23d | ||
|
|
aa960fd711 | ||
|
|
356d0c65b2 | ||
|
|
ba8e8440e8 | ||
|
|
dae9ca32cc | ||
|
|
3cfecd4c29 | ||
|
|
7568431c03 | ||
|
|
2632044293 | ||
|
|
370649a7ba | ||
|
|
48eea6d70b | ||
|
|
826139a26d | ||
|
|
18b948a335 | ||
|
|
8c10235be9 | ||
|
|
88eba525e1 | ||
|
|
aa48a9d82f | ||
|
|
d19f0352af | ||
|
|
364fce5d0c | ||
|
|
d1d265835c | ||
|
|
d784650f15 | ||
|
|
4249b9b848 | ||
|
|
6bad95d228 | ||
|
|
c2a8cbefc6 | ||
|
|
3ba532843d | ||
|
|
4170adb503 | ||
|
|
385f5af204 | ||
|
|
ff21920bae | ||
|
|
9e2023a9db | ||
|
|
819a8937f7 | ||
|
|
fcd412dc59 | ||
|
|
1bbf2ae059 | ||
|
|
7861cc496c | ||
|
|
f7248f6a4e | ||
|
|
20f8ad227c | ||
|
|
8dd6526221 | ||
|
|
948c6e6ea2 | ||
|
|
5824fa7148 | ||
|
|
20dc8fef22 | ||
|
|
702399be84 | ||
|
|
9ad4e9d5d4 | ||
|
|
7891aaebca | ||
|
|
d8e4b22614 | ||
|
|
d5419bab9b | ||
|
|
66fd758554 | ||
|
|
88cf59bce3 | ||
|
|
86933ac2bf | ||
|
|
a875b17247 | ||
|
|
6104c6f7a9 | ||
|
|
1fb12d2f46 | ||
|
|
792933de25 | ||
|
|
a64d45e081 | ||
|
|
254402b4cc | ||
|
|
787b1ca498 | ||
|
|
15773d4606 | ||
|
|
07fe2a5d38 | ||
|
|
3b70b279e7 | ||
|
|
f5f7515d7a | ||
|
|
41b286da5d | ||
|
|
bb05baf89d | ||
|
|
d8593b2f55 | ||
|
|
ce0bedf704 | ||
|
|
b69dcf39d6 | ||
|
|
17f44bc12e | ||
|
|
3503953b0f | ||
|
|
c142f4b567 | ||
|
|
574506acb7 | ||
|
|
419cbd3c8c | ||
|
|
5282ef7e1c | ||
|
|
1d7b9dde47 | ||
|
|
1081e4b690 | ||
|
|
4dd157bcb8 | ||
|
|
164a3e2e57 | ||
|
|
3a42c2d137 | ||
|
|
2908da4854 | ||
|
|
9d581fa72d | ||
|
|
c8923ca870 | ||
|
|
d43edcf2ee | ||
|
|
e25a63cd14 | ||
|
|
3f55a2a81e | ||
|
|
15e60a0cc1 | ||
|
|
4a7dc22acd | ||
|
|
e41f2e14ec | ||
|
|
40ec71a216 | ||
|
|
dccea0c862 | ||
|
|
fc09dc9258 | ||
|
|
16c49c4f12 | ||
|
|
c3bb28a1a2 | ||
|
|
307d5dfc44 | ||
|
|
1a01f332e6 | ||
|
|
e3bfcda35c | ||
|
|
67bb9b6fd9 | ||
|
|
b936da724a | ||
|
|
8e2cdaae58 | ||
|
|
50a8e03eef | ||
|
|
6e0100253b | ||
|
|
4c8e3b7519 | ||
|
|
b801421d3c | ||
|
|
45ab7f9cee | ||
|
|
3999fd5b71 | ||
|
|
e407b9842e | ||
|
|
00c8a9378e | ||
|
|
652b680fb9 | ||
|
|
74dfc46d8c | ||
|
|
5b34251638 | ||
|
|
68efdadc8f | ||
|
|
e0f2fa192c | ||
|
|
456db0a9d0 | ||
|
|
ec9d25b048 | ||
|
|
65af941b39 | ||
|
|
9af7e70f26 | ||
|
|
6e6d281dd3 | ||
|
|
411ef2d9de | ||
|
|
cbd4bf42a7 | ||
|
|
601caa3881 | ||
|
|
2938411c35 | ||
|
|
8c2657255c | ||
|
|
00f8460e36 | ||
|
|
7260d42d8d | ||
|
|
4401ae8eb2 | ||
|
|
282aa5ecea | ||
|
|
9f949edd00 | ||
|
|
56cc900b61 | ||
|
|
17ab8c884a | ||
|
|
67199cdb60 | ||
|
|
ac035370b4 | ||
|
|
c4b543bdeb | ||
|
|
0a8432e4e3 | ||
|
|
0883ebdb6e | ||
|
|
9c20c4abfe | ||
|
|
13bfafe9c4 | ||
|
|
22e32c7ebc | ||
|
|
4599ad2a38 | ||
|
|
c1ffaa8340 | ||
|
|
19286055ea | ||
|
|
82c2127b4d | ||
|
|
d81e35d5e4 | ||
|
|
97880940be | ||
|
|
aee3a2467d | ||
|
|
c32215e293 | ||
|
|
535afcb704 | ||
|
|
0773b9e6cc | ||
|
|
7582731de4 | ||
|
|
49de3b64a8 | ||
|
|
61473ca14e | ||
|
|
ecd755e09c | ||
|
|
265ebd3372 | ||
|
|
afef56df12 | ||
|
|
579f4e4f6c | ||
|
|
d59b22ff78 | ||
|
|
49610e9c2f | ||
|
|
fa4b1dd2f5 | ||
|
|
877f765357 | ||
|
|
06fbc1afd9 | ||
|
|
b44ffd7fdf | ||
|
|
3d0d176f5a | ||
|
|
4fc05ea338 | ||
|
|
dd2ec66db1 | ||
|
|
a8d4e8f0f6 | ||
|
|
2864036ec8 | ||
|
|
050cb425d5 | ||
|
|
fb355a3cc4 | ||
|
|
5b43d60b30 | ||
|
|
e86ab5ed4d | ||
|
|
9cadfdd191 | ||
|
|
d4582d80ff | ||
|
|
18870ed82b | ||
|
|
5c1c5348f4 | ||
|
|
65ab69ebe6 | ||
|
|
1df7470ca1 | ||
|
|
a7a765c059 | ||
|
|
39e8f41ab1 | ||
|
|
9225620426 | ||
|
|
2225b3a942 | ||
|
|
6cfb38b564 | ||
|
|
cb72c14ca4 | ||
|
|
5995081396 | ||
|
|
d623e0cd17 | ||
|
|
8d7322cf5a | ||
|
|
699b0f8701 | ||
|
|
02213caaee | ||
|
|
56a6389b4f | ||
|
|
b99ad4e4d7 | ||
|
|
a5dfa2ecd3 | ||
|
|
26e943adc8 | ||
|
|
42e093b104 | ||
|
|
3129339647 | ||
|
|
7a70340b18 | ||
|
|
a10081ea81 | ||
|
|
4cb8a2c48c | ||
|
|
fe6dbee171 | ||
|
|
7805481ead | ||
|
|
511b4aa808 | ||
|
|
43233ceb02 | ||
|
|
68fc36a8f6 | ||
|
|
a6e754b958 | ||
|
|
48ede97992 | ||
|
|
f0a393abe2 | ||
|
|
4ba9c73b98 | ||
|
|
238ec8961e |
31
.gitignore
vendored
31
.gitignore
vendored
|
|
@ -1,12 +1,39 @@
|
||||||
EventBuilder*
|
|
||||||
*.d
|
*.d
|
||||||
*.so
|
*.so
|
||||||
*.pcm
|
*.pcm
|
||||||
*.root
|
*.root
|
||||||
*.exe
|
*.exe
|
||||||
|
*.txt
|
||||||
|
*.err
|
||||||
|
*.seq
|
||||||
|
*.png
|
||||||
|
*.gif
|
||||||
|
*.msh
|
||||||
|
*.vtk
|
||||||
Mapper
|
Mapper
|
||||||
AnasenMS
|
AnasenMS
|
||||||
|
|
||||||
data/
|
data/
|
||||||
data_proton/
|
data_proton/
|
||||||
|
Sudarshan/
|
||||||
|
wires2d/
|
||||||
|
myenv/
|
||||||
|
Analyzer_C_ACLiC_dict0713aaa966_dictContent.h
|
||||||
|
.gitignore
|
||||||
|
Analyzer_C_ACLiC_dict5411fecd5c_dictUmbrella.h
|
||||||
|
gainmatch.C
|
||||||
|
gainmatch.h
|
||||||
|
MakePlotsQQQ.C
|
||||||
|
MakePlotsQQQ.h
|
||||||
|
MakePlotsSX3.C
|
||||||
|
MakePlotsSX3.h
|
||||||
|
Armory/CorrelateQQQ.h
|
||||||
|
QQQStage2.C
|
||||||
|
anasen_fem/scalars.dat.names
|
||||||
|
anasen_fem/He96_CO2_4_260Torr.gas
|
||||||
|
anasen_fem/heavy_ion_track.csv
|
||||||
|
Armory/EventBuilder
|
||||||
|
EventBuilder
|
||||||
|
anasen_fem/anode_to_cathode_1d_17.43.csv
|
||||||
|
CLAUDE.md
|
||||||
|
pc_calib_raw/
|
||||||
59
.vscode/c_cpp_properties.json
vendored
59
.vscode/c_cpp_properties.json
vendored
|
|
@ -1,23 +1,11 @@
|
||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "splitpole",
|
"name": "Hades",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/**",
|
"${workspaceFolder}/**",
|
||||||
"/home/splitpole/cern/root/**"
|
"/usr/include/x86_64-linux-gnu/qt6/**",
|
||||||
],
|
"/usr/local/cern/root_v6.26.06/include/**"
|
||||||
"defines": [],
|
|
||||||
"compilerPath": "/usr/bin/gcc",
|
|
||||||
"cStandard": "c17",
|
|
||||||
"cppStandard": "gnu++17",
|
|
||||||
"intelliSenseMode": "linux-gcc-x64"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Ryan",
|
|
||||||
"includePath": [
|
|
||||||
"${workspaceFolder}/**",
|
|
||||||
"/home/ryan/Downloads/root_build/**",
|
|
||||||
"/home/ryan/Downloads/root_build/include"
|
|
||||||
],
|
],
|
||||||
"defines": [],
|
"defines": [],
|
||||||
"compilerPath": "/usr/bin/gcc",
|
"compilerPath": "/usr/bin/gcc",
|
||||||
|
|
@ -29,7 +17,8 @@
|
||||||
"name": "RyanUbuntu",
|
"name": "RyanUbuntu",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/**",
|
"${workspaceFolder}/**",
|
||||||
"/opt/root/**"
|
"/usr/include/x86_64-linux-gnu/qt6/**",
|
||||||
|
"/opt/root/include/**"
|
||||||
],
|
],
|
||||||
"defines": [],
|
"defines": [],
|
||||||
"compilerPath": "/usr/bin/gcc",
|
"compilerPath": "/usr/bin/gcc",
|
||||||
|
|
@ -38,10 +27,11 @@
|
||||||
"intelliSenseMode": "linux-gcc-x64"
|
"intelliSenseMode": "linux-gcc-x64"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "RyanHome",
|
"name": "Anasen",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/**",
|
"${workspaceFolder}/**",
|
||||||
"/home/ryan/root_v6.30.06/**"
|
"/usr/include/x86_64-linux-gnu/qt6/**",
|
||||||
|
"/opt/root/include/**"
|
||||||
],
|
],
|
||||||
"defines": [],
|
"defines": [],
|
||||||
"compilerPath": "/usr/bin/gcc",
|
"compilerPath": "/usr/bin/gcc",
|
||||||
|
|
@ -50,10 +40,39 @@
|
||||||
"intelliSenseMode": "linux-gcc-x64"
|
"intelliSenseMode": "linux-gcc-x64"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Dirac",
|
"name": "Splitpole",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/**",
|
"${workspaceFolder}/**",
|
||||||
"/usr/opt/root/**"
|
"/usr/include/x86_64-linux-gnu/qt6/**",
|
||||||
|
"/home/splitpole/cern/root/include/**",
|
||||||
|
"/usr/include/x86_64-linux-gnu/qt6/QtWidgets",
|
||||||
|
"/usr/include/x86_64-linux-gnu/qt6/QtCore"
|
||||||
|
],
|
||||||
|
"defines": [],
|
||||||
|
"compilerPath": "/usr/bin/gcc",
|
||||||
|
"cStandard": "c17",
|
||||||
|
"cppStandard": "gnu++17",
|
||||||
|
"intelliSenseMode": "linux-gcc-x64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Penguin",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**",
|
||||||
|
"/usr/include/x86_64-linux-gnu/qt6/**",
|
||||||
|
"/usr/local/cern/root/include/**"
|
||||||
|
],
|
||||||
|
"defines": [],
|
||||||
|
"compilerPath": "/usr/bin/gcc",
|
||||||
|
"cStandard": "c17",
|
||||||
|
"cppStandard": "gnu++17",
|
||||||
|
"intelliSenseMode": "linux-gcc-x64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "VigneshROG",
|
||||||
|
"includePath": [
|
||||||
|
"/home/vsitaraman/**",
|
||||||
|
"${workspaceFolder}/**",
|
||||||
|
"/home/vsitaraman/root/include/**"
|
||||||
],
|
],
|
||||||
"defines": [],
|
"defines": [],
|
||||||
"compilerPath": "/usr/bin/gcc",
|
"compilerPath": "/usr/bin/gcc",
|
||||||
|
|
|
||||||
40
.vscode/settings.json
vendored
40
.vscode/settings.json
vendored
|
|
@ -90,6 +90,42 @@
|
||||||
"processRun.C": "cpp",
|
"processRun.C": "cpp",
|
||||||
"TrackRecon.C": "cpp",
|
"TrackRecon.C": "cpp",
|
||||||
"processRuns.C": "cpp",
|
"processRuns.C": "cpp",
|
||||||
"Analysis.C": "cpp"
|
"Analysis.C": "cpp",
|
||||||
}
|
"datastructs.h": "c",
|
||||||
|
"ANASENPlotEdit.C": "cpp",
|
||||||
|
"GetMean_Q3_new.C": "cpp",
|
||||||
|
"AlphaCal_new.C": "cpp",
|
||||||
|
"f1.C": "cpp",
|
||||||
|
"GeoCal_Maria_new.C": "cpp",
|
||||||
|
"PCPulser_All_new.C": "cpp",
|
||||||
|
"PosCal_2.C": "cpp",
|
||||||
|
"AutoFit.C": "cpp",
|
||||||
|
"Fitting.C": "cpp",
|
||||||
|
"PCGainMatch.C": "cpp",
|
||||||
|
"Analyzer1.C": "cpp",
|
||||||
|
"FitHistogramsWithTSpectrum_Sequential_Improved.C": "cpp",
|
||||||
|
"PlotAndFitCentroids.C": "cpp",
|
||||||
|
"MatchAndPlotCentroids.C": "cpp",
|
||||||
|
"GainMatch.C": "cpp",
|
||||||
|
"GainMatchSX3.C": "cpp",
|
||||||
|
"RelBack_Fix_new.C": "cpp",
|
||||||
|
"SiRelativeGains_Step1_new.C": "cpp",
|
||||||
|
"charconv": "cpp",
|
||||||
|
"format": "cpp",
|
||||||
|
"GainMatchSX3Front.C": "cpp",
|
||||||
|
"GainMatchSX3Front1.C": "cpp",
|
||||||
|
"Calibration.C": "cpp",
|
||||||
|
"GainMatchQQQ.C": "cpp",
|
||||||
|
"UTF-8gainmatch.C": "cpp",
|
||||||
|
"MakePlotsQQQ.C": "cpp",
|
||||||
|
"MakePlotsSX3.C": "cpp",
|
||||||
|
"QQQ_Calibcheck.C": "cpp",
|
||||||
|
"QQQ_Calcheck.C": "cpp",
|
||||||
|
"makeplots.C": "cpp",
|
||||||
|
"GlobalMinimizeQQQ.C": "cpp",
|
||||||
|
"QQQStage2.C": "cpp",
|
||||||
|
"inspect.C": "cpp"
|
||||||
|
},
|
||||||
|
"github-enterprise.uri": "https://fsunuc.physics.fsu.edu",
|
||||||
|
"C_Cpp.default.compilerPath": "/usr/bin/gcc"
|
||||||
}
|
}
|
||||||
879
Analyzer.C
879
Analyzer.C
File diff suppressed because it is too large
Load Diff
15
Analyzer.h
15
Analyzer.h
|
|
@ -18,6 +18,7 @@ public :
|
||||||
Det sx3;
|
Det sx3;
|
||||||
Det qqq;
|
Det qqq;
|
||||||
Det pc ;
|
Det pc ;
|
||||||
|
Det misc;
|
||||||
|
|
||||||
ULong64_t evID;
|
ULong64_t evID;
|
||||||
UInt_t run;
|
UInt_t run;
|
||||||
|
|
@ -40,6 +41,13 @@ public :
|
||||||
TBranch *b_pcCh; //!
|
TBranch *b_pcCh; //!
|
||||||
TBranch *b_pcE; //!
|
TBranch *b_pcE; //!
|
||||||
TBranch *b_pcT; //!
|
TBranch *b_pcT; //!
|
||||||
|
TBranch *b_miscMulti; //!
|
||||||
|
TBranch *b_miscID; //!
|
||||||
|
TBranch *b_miscCh; //!
|
||||||
|
TBranch *b_miscE; //!
|
||||||
|
TBranch *b_miscT; //!
|
||||||
|
TBranch *b_miscTf; //!
|
||||||
|
|
||||||
|
|
||||||
Analyzer(TTree * /*tree*/ =0) : fChain(0) { }
|
Analyzer(TTree * /*tree*/ =0) : fChain(0) { }
|
||||||
virtual ~Analyzer() { }
|
virtual ~Analyzer() { }
|
||||||
|
|
@ -92,6 +100,13 @@ void Analyzer::Init(TTree *tree){
|
||||||
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
||||||
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
||||||
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
||||||
|
fChain->SetBranchAddress("miscMulti", &misc.multi, &b_miscMulti);
|
||||||
|
fChain->SetBranchAddress("miscID", &misc.id, &b_miscID);
|
||||||
|
fChain->SetBranchAddress("miscCh", &misc.ch, &b_miscCh);
|
||||||
|
fChain->SetBranchAddress("miscE", &misc.e, &b_miscE);
|
||||||
|
fChain->SetBranchAddress("miscT", &misc.t, &b_miscT);
|
||||||
|
// fChain->SetBranchAddress("miscF", &misc.tf, &b_miscTf);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ void ANASEN_model(int anodeID1 = -1, int anodeID2 = -1, int cathodeID1 = -1, int
|
||||||
//--- making ANASEN
|
//--- making ANASEN
|
||||||
const int nWire = 24;
|
const int nWire = 24;
|
||||||
const int wireShift = 3;
|
const int wireShift = 3;
|
||||||
const int zLen = 300; //mm
|
const int zLen = 350; //mm
|
||||||
const int radiusA = 38;
|
const int radiusA = 38;
|
||||||
const int radiusC = 43;
|
const int radiusC = 43;
|
||||||
|
|
||||||
|
|
@ -103,8 +103,8 @@ void ANASEN_model(int anodeID1 = -1, int anodeID2 = -1, int cathodeID1 = -1, int
|
||||||
new TGeoRotation("rot1", 360/nSX3 * (i + 0.5), 0., 0.)));
|
new TGeoRotation("rot1", 360/nSX3 * (i + 0.5), 0., 0.)));
|
||||||
}
|
}
|
||||||
|
|
||||||
const int qqqR1 = 10;
|
const int qqqR1 = 50;
|
||||||
const int qqqR2 = 50;
|
const int qqqR2 = 100;
|
||||||
TGeoVolume *qqq = geom->MakeTubs("qqq", Al, qqqR1, qqqR2, 0.5, 5, 85);
|
TGeoVolume *qqq = geom->MakeTubs("qqq", Al, qqqR1, qqqR2, 0.5, 5, 85);
|
||||||
qqq->SetLineColor(7);
|
qqq->SetLineColor(7);
|
||||||
for( int i = 0; i < 4; i++){
|
for( int i = 0; i < 4; i++){
|
||||||
|
|
|
||||||
1270
Armory/ClassData.h
Normal file
1270
Armory/ClassData.h
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -5,15 +5,17 @@
|
||||||
|
|
||||||
#define MAXMULTI 1000
|
#define MAXMULTI 1000
|
||||||
|
|
||||||
class Det{
|
class Det
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
Det(): multi(0) {Clear(); }
|
Det() : multi(0) { Clear(); }
|
||||||
|
|
||||||
unsigned short multi; // max 65535
|
unsigned short multi; // max 65535
|
||||||
unsigned short id[MAXMULTI];
|
unsigned short id[MAXMULTI];
|
||||||
unsigned short ch[MAXMULTI];
|
unsigned short ch[MAXMULTI];
|
||||||
unsigned short e[MAXMULTI];
|
unsigned short e[MAXMULTI];
|
||||||
unsigned long long t[MAXMULTI];
|
unsigned long long t[MAXMULTI];
|
||||||
|
unsigned long long tf[MAXMULTI];
|
||||||
|
|
||||||
unsigned short sn[MAXMULTI];
|
unsigned short sn[MAXMULTI];
|
||||||
unsigned short digiCh[MAXMULTI];
|
unsigned short digiCh[MAXMULTI];
|
||||||
|
|
@ -21,13 +23,16 @@ public:
|
||||||
unsigned short index[MAXMULTI]; // id * nCh + ch;
|
unsigned short index[MAXMULTI]; // id * nCh + ch;
|
||||||
bool used[MAXMULTI];
|
bool used[MAXMULTI];
|
||||||
|
|
||||||
void Clear(){
|
void Clear()
|
||||||
|
{
|
||||||
multi = 0;
|
multi = 0;
|
||||||
for( int i = 0; i < MAXMULTI; i++){
|
for (int i = 0; i < MAXMULTI; i++)
|
||||||
|
{
|
||||||
id[i] = 0;
|
id[i] = 0;
|
||||||
ch[i] = 0;
|
ch[i] = 0;
|
||||||
e[i] = 0;
|
e[i] = 0;
|
||||||
t[i] = 0;
|
t[i] = 0;
|
||||||
|
tf[i] = 0;
|
||||||
index[i] = 0;
|
index[i] = 0;
|
||||||
sn[i] = 0;
|
sn[i] = 0;
|
||||||
digiCh[i] = 0;
|
digiCh[i] = 0;
|
||||||
|
|
@ -35,30 +40,32 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Print(){
|
void Print()
|
||||||
|
{
|
||||||
printf("=============================== multi : %u\n", multi);
|
printf("=============================== multi : %u\n", multi);
|
||||||
for( int i = 0; i < multi; i++) {
|
for (int i = 0; i < multi; i++)
|
||||||
printf(" %3d | %2d-%-2d(%5d) %5u %15llu \n", i, id[i], ch[i], index[i], e[i], t[i]);
|
{
|
||||||
|
printf(" %3d | %2d-%-2d(%5d) %5u %15llu %15llu \n", i, id[i], ch[i], index[i], e[i], t[i], tf[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDetDimension(unsigned short maxID, unsigned maxCh){
|
void SetDetDimension(unsigned short maxID, unsigned maxCh)
|
||||||
|
{
|
||||||
nID = maxID;
|
nID = maxID;
|
||||||
nCh = maxCh;
|
nCh = maxCh;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CalIndex(){
|
void CalIndex()
|
||||||
for( int i = 0; i < multi; i++){
|
{
|
||||||
index[i] = id[i] * nCh + ch[i] ;
|
for (int i = 0; i < multi; i++)
|
||||||
|
{
|
||||||
|
index[i] = id[i] * nCh + ch[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
unsigned short nID;
|
unsigned short nID;
|
||||||
unsigned short nCh;
|
unsigned short nCh;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,246 +0,0 @@
|
||||||
#ifndef ClassPC_h
|
|
||||||
#define ClassPC_h
|
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <TMath.h>
|
|
||||||
#include <TVector3.h>
|
|
||||||
#include <TRandom.h>
|
|
||||||
|
|
||||||
struct PCHit_1An{
|
|
||||||
std::pair<short, short> nearestWire; // anode, cathode
|
|
||||||
std::pair<double, double> nearestDist; // anode, cathode
|
|
||||||
|
|
||||||
short nextNearestWire; // cathode
|
|
||||||
double nextNearestDist; // cathode
|
|
||||||
|
|
||||||
void Clear(){
|
|
||||||
nearestWire.first = -1;
|
|
||||||
nearestWire.second = -1;
|
|
||||||
nearestDist.first = 999999999;
|
|
||||||
nearestDist.second = 999999999;
|
|
||||||
nextNearestWire= -1;
|
|
||||||
nextNearestDist = 999999999;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//!########################################################
|
|
||||||
class PC{ // proportional wire
|
|
||||||
public:
|
|
||||||
PC(){ ClearHitInfo();};
|
|
||||||
~PC(){};
|
|
||||||
|
|
||||||
PCHit_1An GetHitInfo() const {return hitInfo;}
|
|
||||||
std::pair<short, short> GetNearestID() const {return hitInfo.nearestWire;}
|
|
||||||
std::pair<double, double> GetNearestDistance() const {return hitInfo.nearestDist;}
|
|
||||||
short Get2ndNearestID() const {return hitInfo.nextNearestWire;}
|
|
||||||
double Get2ndNearestDistance() const {return hitInfo.nextNearestDist;}
|
|
||||||
|
|
||||||
TVector3 GetTrackPos() const {return trackPos;}
|
|
||||||
TVector3 GetTrackVec() const {return trackVec;}
|
|
||||||
double GetTrackTheta() const {return trackVec.Theta();}
|
|
||||||
double GetTrackPhi() const {return trackVec.Phi();}
|
|
||||||
double GetZ0();
|
|
||||||
|
|
||||||
int GetNumWire() const {return nWire;}
|
|
||||||
double GetDeltaAngle() const {return dAngle;}
|
|
||||||
double GetAnodeLength() const {return anodeLength;}
|
|
||||||
double GetCathodeLength() const {return cathodeLength;}
|
|
||||||
TVector3 GetAnodeDn(short id) const {return An[id].first;}
|
|
||||||
TVector3 GetAnodeUp(short id) const {return An[id].second;}
|
|
||||||
TVector3 GetCathodeDn(short id) const {return Ca[id].first;}
|
|
||||||
TVector3 GetCathodeUp(short id) const {return Ca[id].second;}
|
|
||||||
|
|
||||||
TVector3 GetAnodneMid(short id) const {return (An[id].first + An[id].second) * 0.5; }
|
|
||||||
double GetAnodeTheta(short id) const {return (An[id].first - An[id].second).Theta();}
|
|
||||||
double GetAnodePhi(short id) const {return (An[id].first - An[id].second).Phi();}
|
|
||||||
|
|
||||||
TVector3 GetCathodneMid(short id) const {return (Ca[id].first + Ca[id].second) * 0.5; }
|
|
||||||
double GetCathodeTheta(short id) const {return (Ca[id].first - Ca[id].second).Theta();}
|
|
||||||
double GetCathodePhi(short id) const {return (Ca[id].first - Ca[id].second).Phi();}
|
|
||||||
|
|
||||||
void ClearHitInfo();
|
|
||||||
void ConstructGeo();
|
|
||||||
void FindWireID(TVector3 pos, TVector3 direction, bool verbose = false);
|
|
||||||
void CalTrack3(TVector3 sx3Pos, PCHit_1An hitInfo, double sigmaA = 0, double sigmaC = 0, bool verbose = false);
|
|
||||||
|
|
||||||
void Print(){
|
|
||||||
printf(" The nearest | Anode: %2d(%5.2f) Cathode: %2d(%5.2f)\n", hitInfo.nearestWire.first,
|
|
||||||
hitInfo.nearestDist.first,
|
|
||||||
hitInfo.nearestWire.second,
|
|
||||||
hitInfo.nearestDist.second);
|
|
||||||
|
|
||||||
printf(" The 2nd nearest Cathode: %2d(%5.2f)\n", hitInfo.nextNearestWire,
|
|
||||||
hitInfo.nextNearestDist);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
// PCHitInfo hitInfo;
|
|
||||||
PCHit_1An hitInfo;
|
|
||||||
|
|
||||||
TVector3 trackPos;
|
|
||||||
TVector3 trackVec;
|
|
||||||
|
|
||||||
const int nWire = 24;
|
|
||||||
const int wireShift = 3;
|
|
||||||
const float zLen = 380; //mm
|
|
||||||
const float radiusA = 37;
|
|
||||||
const float radiusC = 43;
|
|
||||||
|
|
||||||
double dAngle;
|
|
||||||
double anodeLength;
|
|
||||||
double cathodeLength;
|
|
||||||
|
|
||||||
std::vector<std::pair<TVector3,TVector3>> An; // the anode wire position vector in space
|
|
||||||
std::vector<std::pair<TVector3,TVector3>> Ca; // the cathode wire position vector in space
|
|
||||||
|
|
||||||
double Distance(TVector3 a1, TVector3 a2, TVector3 b1, TVector3 b2){
|
|
||||||
TVector3 na = a1 - a2;
|
|
||||||
TVector3 nb = b1 - b2;
|
|
||||||
TVector3 nd = (na.Cross(nb)).Unit();
|
|
||||||
return TMath::Abs(nd.Dot(a1-b2));
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
inline void PC::ClearHitInfo(){
|
|
||||||
hitInfo.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void PC::ConstructGeo(){
|
|
||||||
|
|
||||||
An.clear();
|
|
||||||
Ca.clear();
|
|
||||||
|
|
||||||
std::pair<TVector3, TVector3> p1; // anode
|
|
||||||
std::pair<TVector3, TVector3> q1; // cathode
|
|
||||||
|
|
||||||
//anode and cathode start at pos-Y axis and count in right-Hand
|
|
||||||
//anode wire shift is right-hand.
|
|
||||||
//cathode wire shift is left-hand.
|
|
||||||
|
|
||||||
for(int i = 0; i < nWire; i++ ){
|
|
||||||
// Anode rotate right-hand
|
|
||||||
p1.first.SetXYZ( radiusA * TMath::Cos( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
|
|
||||||
radiusA * TMath::Sin( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
|
|
||||||
zLen/2);
|
|
||||||
p1.second.SetXYZ( radiusA * TMath::Cos( TMath::TwoPi() / nWire * (i + wireShift) + TMath::PiOver2()),
|
|
||||||
radiusA * TMath::Sin( TMath::TwoPi() / nWire * (i + wireShift) + TMath::PiOver2()),
|
|
||||||
-zLen/2);
|
|
||||||
An.push_back(p1);
|
|
||||||
|
|
||||||
// Cathod rotate left-hand
|
|
||||||
q1.first.SetXYZ( radiusC * TMath::Cos( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
|
|
||||||
radiusC * TMath::Sin( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
|
|
||||||
zLen/2);
|
|
||||||
q1.second.SetXYZ( radiusC * TMath::Cos( TMath::TwoPi() / nWire * (i - wireShift) + TMath::PiOver2()),
|
|
||||||
radiusC * TMath::Sin( TMath::TwoPi() / nWire * (i - wireShift) + TMath::PiOver2()),
|
|
||||||
-zLen/2);
|
|
||||||
Ca.push_back(q1);
|
|
||||||
}
|
|
||||||
|
|
||||||
dAngle = wireShift * TMath::TwoPi() / nWire;
|
|
||||||
anodeLength = TMath::Sqrt( zLen*zLen + TMath::Power(2* radiusA * TMath::Sin(dAngle/2),2) );
|
|
||||||
cathodeLength = TMath::Sqrt( zLen*zLen + TMath::Power(2* radiusC * TMath::Sin(dAngle/2),2) );
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void PC::FindWireID(TVector3 pos, TVector3 direction, bool verbose ){
|
|
||||||
|
|
||||||
hitInfo.Clear();
|
|
||||||
double phi = direction.Phi();
|
|
||||||
|
|
||||||
for( int i = 0; i < nWire; i++){
|
|
||||||
|
|
||||||
double disA = 99999999;
|
|
||||||
double phiS = An[i].first.Phi() - TMath::PiOver4();
|
|
||||||
double phiL = An[i].second.Phi() + TMath::PiOver4();
|
|
||||||
// printf("A%2d: %f %f | %f\n", i, phiS * TMath::RadToDeg(), phiL * TMath::RadToDeg(), phi * TMath::RadToDeg());
|
|
||||||
if( phi > 0 && phiS > phiL ) phiL = phiL + TMath::TwoPi();
|
|
||||||
if( phi < 0 && phiS > phiL ) phiS = phiS - TMath::TwoPi();
|
|
||||||
|
|
||||||
if( phiS < phi && phi < phiL) {
|
|
||||||
disA = Distance( pos, pos + direction, An[i].first, An[i].second);
|
|
||||||
if( disA < hitInfo.nearestDist.first ){
|
|
||||||
hitInfo.nearestDist.first = disA;
|
|
||||||
hitInfo.nearestWire.first = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
double disC = 99999999;
|
|
||||||
phiS = Ca[i].second.Phi()- TMath::PiOver4();
|
|
||||||
phiL = Ca[i].first.Phi() + TMath::PiOver4();
|
|
||||||
// printf("C%2d: %f %f\n", i, phiS * TMath::RadToDeg(), phiL * TMath::RadToDeg());
|
|
||||||
if( phi > 0 && phiS > phiL ) phiL = phiL + TMath::TwoPi();
|
|
||||||
if( phi < 0 && phiS > phiL ) phiS = phiS - TMath::TwoPi();
|
|
||||||
|
|
||||||
if(phiS < phi && phi < phiL) {
|
|
||||||
disC = Distance( pos, pos + direction, Ca[i].first, Ca[i].second);
|
|
||||||
if( disC < hitInfo.nearestDist.second ){
|
|
||||||
hitInfo.nearestDist.second = disC;
|
|
||||||
hitInfo.nearestWire.second = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(verbose) printf(" %2d | %8.2f, %8.2f\n", i, disA, disC);
|
|
||||||
}
|
|
||||||
|
|
||||||
short cathode1 = hitInfo.nearestWire.second;
|
|
||||||
short ccc1 = cathode1 - 1; if( ccc1 < 0 ) ccc1 += nWire;
|
|
||||||
short ccc2 = (cathode1 + 1) % nWire;
|
|
||||||
|
|
||||||
double haha1 = Distance( pos, pos + direction, Ca[ccc1].first, Ca[ccc1].second);
|
|
||||||
double haha2 = Distance( pos, pos + direction, Ca[ccc2].first, Ca[ccc2].second);
|
|
||||||
if( haha1 < haha2){
|
|
||||||
hitInfo.nextNearestWire = ccc1;
|
|
||||||
hitInfo.nextNearestDist = haha1;
|
|
||||||
}else{
|
|
||||||
hitInfo.nextNearestWire = ccc2;
|
|
||||||
hitInfo.nextNearestDist= haha2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( verbose ) Print();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline void PC::CalTrack3(TVector3 sx3Pos, PCHit_1An hitInfo, double sigmaA, double sigmaC, bool verbose){
|
|
||||||
|
|
||||||
trackPos = sx3Pos;
|
|
||||||
|
|
||||||
double p1 = TMath::Abs(hitInfo.nearestDist.first + gRandom->Gaus(0, sigmaA));
|
|
||||||
short anodeID1 = hitInfo.nearestWire.first;
|
|
||||||
|
|
||||||
double q1 = TMath::Abs(hitInfo.nearestDist.second + gRandom->Gaus(0, sigmaC));
|
|
||||||
double q2 = TMath::Abs(hitInfo.nextNearestDist+ gRandom->Gaus(0, sigmaC));
|
|
||||||
double fracC = q1 / (q1 + q2);
|
|
||||||
short cathodeID1 = hitInfo.nearestWire.second;
|
|
||||||
short cathodeID2 = hitInfo.nextNearestWire;
|
|
||||||
TVector3 shiftC1 = (Ca[cathodeID2].first - Ca[cathodeID1].first) * fracC;
|
|
||||||
TVector3 shiftC2 = (Ca[cathodeID2].second - Ca[cathodeID1].second) * fracC;
|
|
||||||
|
|
||||||
TVector3 a1 = An[anodeID1].first;
|
|
||||||
|
|
||||||
TVector3 c1 = Ca[cathodeID1].first + shiftC1;
|
|
||||||
TVector3 c2 = Ca[cathodeID1].second + shiftC2;
|
|
||||||
|
|
||||||
TVector3 n1 = (sx3Pos - a1).Unit();
|
|
||||||
TVector3 n2 = (c1 - c2).Cross((sx3Pos - c2)).Unit();
|
|
||||||
|
|
||||||
// if the handiness of anode and cathode revered, it should be n2 cross n1
|
|
||||||
trackVec = (n2.Cross(n1)).Unit();
|
|
||||||
|
|
||||||
if( verbose ) printf("Theta, Phi = %f, %f \n", trackVec.Theta() *TMath::RadToDeg(), trackVec.Phi()*TMath::RadToDeg());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
inline double PC::GetZ0(){
|
|
||||||
|
|
||||||
double x = trackPos.X();
|
|
||||||
double y = trackPos.Y();
|
|
||||||
double rho = TMath::Sqrt(x*x + y*y);
|
|
||||||
double theta = trackVec.Theta();
|
|
||||||
|
|
||||||
return trackPos.Z() - rho / TMath::Tan(theta);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
668
Armory/ClassPW.h
Normal file → Executable file
668
Armory/ClassPW.h
Normal file → Executable file
|
|
@ -2,17 +2,21 @@
|
||||||
#define ClassPW_h
|
#define ClassPW_h
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <iostream>
|
||||||
#include <TMath.h>
|
#include <TMath.h>
|
||||||
#include <TVector3.h>
|
#include <TVector3.h>
|
||||||
|
#include <TRandom.h>
|
||||||
|
|
||||||
struct PWHitInfo{
|
struct PWHitInfo
|
||||||
|
{
|
||||||
std::pair<short, short> nearestWire; // anode, cathode
|
std::pair<short, short> nearestWire; // anode, cathode
|
||||||
std::pair<double, double> nearestDist; // anode, cathode
|
std::pair<double, double> nearestDist; // anode, cathode
|
||||||
|
|
||||||
std::pair<short, short> nextNearestWire; // anode, cathode
|
std::pair<short, short> nextNearestWire; // anode, cathode
|
||||||
std::pair<double, double> nextNearestDist; // anode, cathode
|
std::pair<double, double> nextNearestDist; // anode, cathode
|
||||||
|
|
||||||
void Clear(){
|
void Clear()
|
||||||
|
{
|
||||||
nearestWire.first = -1;
|
nearestWire.first = -1;
|
||||||
nearestWire.second = -1;
|
nearestWire.second = -1;
|
||||||
nearestDist.first = 999999999;
|
nearestDist.first = 999999999;
|
||||||
|
|
@ -24,50 +28,77 @@ struct PWHitInfo{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//!########################################################
|
struct Coord
|
||||||
class PW{ // proportional wire
|
{
|
||||||
|
float x, y, z;
|
||||||
|
Coord() : x(0), y(0), z(0) {}
|
||||||
|
Coord(const TVector3 &vec)
|
||||||
|
{
|
||||||
|
x = vec.X(); // TVector3's X() returns the x-coordinate
|
||||||
|
y = vec.Y(); // TVector3's Y() returns the y-coordinate
|
||||||
|
z = vec.Z(); // TVector3's Z() returns the z-coordinate
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//! ########################################################
|
||||||
|
class PW
|
||||||
|
{ // proportional wire
|
||||||
public:
|
public:
|
||||||
PW(){ ClearHitInfo();};
|
PW() { ClearHitInfo(); };
|
||||||
~PW(){};
|
~PW() {};
|
||||||
|
|
||||||
PWHitInfo GetHitInfo() const {return hitInfo;}
|
PWHitInfo GetHitInfo() const { return hitInfo; }
|
||||||
std::pair<short, short> GetNearestID() const {return hitInfo.nearestWire;}
|
std::pair<short, short> GetNearestID() const { return hitInfo.nearestWire; }
|
||||||
std::pair<double, double> GetNearestDistance() const {return hitInfo.nearestDist;}
|
std::pair<double, double> GetNearestDistance() const { return hitInfo.nearestDist; }
|
||||||
std::pair<short, short> Get2ndNearestID() const {return hitInfo.nextNearestWire;}
|
std::pair<short, short> Get2ndNearestID() const { return hitInfo.nextNearestWire; }
|
||||||
std::pair<double, double> Get2ndNearestDistance() const {return hitInfo.nextNearestDist;}
|
std::pair<double, double> Get2ndNearestDistance() const { return hitInfo.nextNearestDist; }
|
||||||
|
|
||||||
TVector3 GetTrackPos() const {return trackPos;}
|
std::vector<std::pair<TVector3, TVector3>> An; // the anode wire position vector in space
|
||||||
TVector3 GetTrackVec() const {return trackVec;}
|
std::vector<std::pair<TVector3, TVector3>> Ca; // the cathode wire position vector in space
|
||||||
double GetTrackTheta() const {return trackVec.Theta();}
|
|
||||||
double GetTrackPhi() const {return trackVec.Phi();}
|
TVector3 GetTrackPos() const { return trackPos; }
|
||||||
|
TVector3 GetTrackVec() const { return trackVec; }
|
||||||
|
double GetTrackTheta() const { return trackVec.Theta(); }
|
||||||
|
double GetTrackPhi() const { return trackVec.Phi(); }
|
||||||
double GetZ0();
|
double GetZ0();
|
||||||
|
|
||||||
int GetNumWire() const {return nWire;}
|
Coord Crossover[24][24][2];
|
||||||
double GetDeltaAngle() const {return dAngle;}
|
|
||||||
double GetAnodeLength() const {return anodeLength;}
|
|
||||||
double GetCathodeLength() const {return cathodeLength;}
|
|
||||||
TVector3 GetAnodeDn(short id) const {return An[id].first;}
|
|
||||||
TVector3 GetAnodeUp(short id) const {return An[id].second;}
|
|
||||||
TVector3 GetCathodeDn(short id) const {return Ca[id].first;}
|
|
||||||
TVector3 GetCathodeUp(short id) const {return Ca[id].second;}
|
|
||||||
|
|
||||||
TVector3 GetAnodneMid(short id) const {return (An[id].first + An[id].second) * 0.5; }
|
inline TVector3 getClosestWirePosAtWirePhi(std::pair<TVector3, TVector3>, double phi);
|
||||||
double GetAnodeTheta(short id) const {return (An[id].first - An[id].second).Theta();}
|
inline TVector3 getClosestWirePosAtWirePhiOld(std::pair<TVector3, TVector3>, double phi);
|
||||||
double GetAnodePhi(short id) const {return (An[id].first - An[id].second).Phi();}
|
inline std::tuple<std::pair<TVector3, TVector3>, double, double, double> GetPseudoWire(const std::vector<std::tuple<int, double, double>> &cluster, std::string type);
|
||||||
|
|
||||||
TVector3 GetCathodneMid(short id) const {return (Ca[id].first + Ca[id].second) * 0.5; }
|
inline std::tuple<TVector3, double, double, double, double, double, double, double>
|
||||||
double GetCathodeTheta(short id) const {return (Ca[id].first - Ca[id].second).Theta();}
|
FindCrossoverProperties(const std::vector<std::tuple<int, double, double>> &a_cluster, const std::vector<std::tuple<int, double, double>> &c_cluster);
|
||||||
double GetCathodePhi(short id) const {return (Ca[id].first - Ca[id].second).Phi();}
|
|
||||||
|
inline std::vector<std::vector<std::tuple<int, double, double>>>
|
||||||
|
Make_Clusters(const std::unordered_map<int, std::tuple<int, double, double>> &wireEvents);
|
||||||
|
|
||||||
|
int GetNumWire() const { return nWire; }
|
||||||
|
double GetDeltaAngle() const { return dAngle; }
|
||||||
|
double GetAnodeLength() const { return anodeLength; }
|
||||||
|
double GetCathodeLength() const { return cathodeLength; }
|
||||||
|
TVector3 GetAnodeDn(short id) const { return An[id].first; }
|
||||||
|
TVector3 GetAnodeUp(short id) const { return An[id].second; }
|
||||||
|
TVector3 GetCathodeDn(short id) const { return Ca[id].first; }
|
||||||
|
TVector3 GetCathodeUp(short id) const { return Ca[id].second; }
|
||||||
|
|
||||||
|
TVector3 GetAnodneMid(short id) const { return (An[id].first + An[id].second) * 0.5; }
|
||||||
|
double GetAnodeTheta(short id) const { return (An[id].first - An[id].second).Theta(); }
|
||||||
|
double GetAnodePhi(short id) const { return (An[id].first - An[id].second).Phi(); }
|
||||||
|
|
||||||
|
TVector3 GetCathodeMid(short id) const { return (Ca[id].first + Ca[id].second) * 0.5; }
|
||||||
|
double GetCathodeTheta(short id) const { return (Ca[id].first - Ca[id].second).Theta(); }
|
||||||
|
double GetCathodePhi(short id) const { return (Ca[id].first - Ca[id].second).Phi(); }
|
||||||
|
|
||||||
void ClearHitInfo();
|
void ClearHitInfo();
|
||||||
void ConstructGeo();
|
void ConstructGeo();
|
||||||
void FindWireID(TVector3 pos, TVector3 direction, bool verbose = false);
|
void FindWireID(TVector3 pos, TVector3 direction, bool verbose = false);
|
||||||
void CalTrack(TVector3 sx3Pos, int anodeID, int cathodeID, bool verbose = false);
|
void CalTrack(TVector3 sx3Pos, int anodeID, int cathodeID, bool verbose = false);
|
||||||
void CalTrack2(TVector3 sx3Pos, PWHitInfo hitInfo, double sigmaA = 0, double sigmaC = 0, bool verbose = false);
|
void CalTrack2(TVector3 sx3Pos, TVector3 anodeInt, bool verbose = false);
|
||||||
|
|
||||||
double CircularMean(std::vector<std::pair<int, double>> wireList);
|
void Print()
|
||||||
|
{
|
||||||
void Print(){
|
|
||||||
printf(" The nearest | Anode: %2d(%5.2f) Cathode: %2d(%5.2f)\n", hitInfo.nearestWire.first,
|
printf(" The nearest | Anode: %2d(%5.2f) Cathode: %2d(%5.2f)\n", hitInfo.nearestWire.first,
|
||||||
hitInfo.nearestDist.first,
|
hitInfo.nearestDist.first,
|
||||||
hitInfo.nearestWire.second,
|
hitInfo.nearestWire.second,
|
||||||
|
|
@ -80,15 +111,16 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
PWHitInfo hitInfo;
|
PWHitInfo hitInfo;
|
||||||
|
|
||||||
TVector3 trackPos;
|
TVector3 trackPos;
|
||||||
TVector3 trackVec;
|
TVector3 trackVec;
|
||||||
|
|
||||||
const int nWire = 24;
|
const int nWire = 24;
|
||||||
const int wireShift = 3;
|
const int wireShift = 4;
|
||||||
const float zLen = 380; //mm
|
// const float zLen = 380; // mm
|
||||||
|
// const float zLen = 348.6; // mm
|
||||||
|
const float zLen = 174.3 * 2; // mm
|
||||||
const float radiusA = 37;
|
const float radiusA = 37;
|
||||||
const float radiusC = 43;
|
const float radiusC = 43;
|
||||||
|
|
||||||
|
|
@ -96,23 +128,25 @@ private:
|
||||||
double anodeLength;
|
double anodeLength;
|
||||||
double cathodeLength;
|
double cathodeLength;
|
||||||
|
|
||||||
std::vector<std::pair<TVector3,TVector3>> An; // the anode wire position vector in space
|
// std::vector<std::pair<TVector3, TVector3>> An; // the anode wire position vector in space
|
||||||
std::vector<std::pair<TVector3,TVector3>> Ca; // the cathode wire position vector in space
|
// std::vector<std::pair<TVector3, TVector3>> Ca; // the cathode wire position vector in space
|
||||||
|
|
||||||
double Distance(TVector3 a1, TVector3 a2, TVector3 b1, TVector3 b2){
|
double Distance(TVector3 a1, TVector3 a2, TVector3 b1, TVector3 b2)
|
||||||
|
{
|
||||||
TVector3 na = a1 - a2;
|
TVector3 na = a1 - a2;
|
||||||
TVector3 nb = b1 - b2;
|
TVector3 nb = b1 - b2;
|
||||||
TVector3 nd = (na.Cross(nb)).Unit();
|
TVector3 nd = (na.Cross(nb)).Unit();
|
||||||
return TMath::Abs(nd.Dot(a1-b2));
|
return TMath::Abs(nd.Dot(a1 - b2));
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void PW::ClearHitInfo(){
|
inline void PW::ClearHitInfo()
|
||||||
|
{
|
||||||
hitInfo.Clear();
|
hitInfo.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void PW::ConstructGeo(){
|
inline void PW::ConstructGeo()
|
||||||
|
{
|
||||||
|
|
||||||
An.clear();
|
An.clear();
|
||||||
Ca.clear();
|
Ca.clear();
|
||||||
|
|
@ -120,108 +154,416 @@ inline void PW::ConstructGeo(){
|
||||||
std::pair<TVector3, TVector3> p1; // anode
|
std::pair<TVector3, TVector3> p1; // anode
|
||||||
std::pair<TVector3, TVector3> q1; // cathode
|
std::pair<TVector3, TVector3> q1; // cathode
|
||||||
|
|
||||||
//anode and cathode start at pos-Y axis and count in right-Hand
|
double k = TMath::TwoPi() / 24.; // 48 solder thru holes, wires in every other one
|
||||||
//anode wire shift is right-hand.
|
double offset_a1 = -6 * k - 4 * k; // -6 to go from 0,0 to 90degree up, and 4 for the wire offset //old version -5 * k - 5 * k;
|
||||||
//cathode wire shift is left-hand.
|
double offset_c1 = -6 * k + k / 2.0; // correct for a half-turn
|
||||||
|
// std::cerr << "Here!" << std::endl;
|
||||||
|
// #include "../scratch/testing.h"
|
||||||
|
double offset_a2 = offset_a1 + wireShift * k;
|
||||||
|
double offset_c2 = offset_c1 - wireShift * k;
|
||||||
|
|
||||||
for(int i = 0; i < nWire; i++ ){
|
for (int i = 0; i < nWire; i++)
|
||||||
// Anode rotate right-hand
|
{
|
||||||
p1.first.SetXYZ( radiusA * TMath::Cos( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
|
// Anode rotate right-hand coming in towards +z riding with the beam. In this frame, +x is to the right, and +y down
|
||||||
radiusA * TMath::Sin( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
|
// updated Feb 2026, Sudarsan B. Photographs indicate that anode wires twist right handed, as one moves from -z to +z with the convention above
|
||||||
zLen/2);
|
// wire indices increase leftward as one moves to +z (hence -k factor), but wires themselves twist rightward - as indicated by offset_a2 being more +ve w.r.t offset_a1
|
||||||
p1.second.SetXYZ( radiusA * TMath::Cos( TMath::TwoPi() / nWire * (i + wireShift) + TMath::PiOver2()),
|
//'First' is -z locus, 'second' is +z locus
|
||||||
radiusA * TMath::Sin( TMath::TwoPi() / nWire * (i + wireShift) + TMath::PiOver2()),
|
p1.first.SetXYZ(radiusA * TMath::Cos(-k * i + offset_a1),
|
||||||
-zLen/2);
|
radiusA * TMath::Sin(-k * i + offset_a1),
|
||||||
|
-zLen / 2);
|
||||||
|
p1.second.SetXYZ(radiusA * TMath::Cos(-k * i + offset_a2),
|
||||||
|
radiusA * TMath::Sin(-k * i + offset_a2),
|
||||||
|
+zLen / 2);
|
||||||
|
|
||||||
|
// Cathodes twist left-hand as indicated by offset_c2 being more negative than offset_c1, under the same system, while wires increase rightward (hence +k factor)
|
||||||
|
q1.first.SetXYZ(radiusC * TMath::Cos(k * i + offset_c1),
|
||||||
|
radiusC * TMath::Sin(k * i + offset_c1),
|
||||||
|
-zLen / 2);
|
||||||
|
q1.second.SetXYZ(radiusC * TMath::Cos(k * i + offset_c2),
|
||||||
|
radiusC * TMath::Sin(k * i + offset_c2),
|
||||||
|
zLen / 2);
|
||||||
An.push_back(p1);
|
An.push_back(p1);
|
||||||
|
|
||||||
// Cathod rotate left-hand
|
|
||||||
q1.first.SetXYZ( radiusC * TMath::Cos( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
|
|
||||||
radiusC * TMath::Sin( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
|
|
||||||
zLen/2);
|
|
||||||
q1.second.SetXYZ( radiusC * TMath::Cos( TMath::TwoPi() / nWire * (i - wireShift) + TMath::PiOver2()),
|
|
||||||
radiusC * TMath::Sin( TMath::TwoPi() / nWire * (i - wireShift) + TMath::PiOver2()),
|
|
||||||
-zLen/2);
|
|
||||||
Ca.push_back(q1);
|
Ca.push_back(q1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calculate Crossover Geometry ONCE
|
||||||
|
TVector3 a, c, diff;
|
||||||
|
double a2, ac, c2, adiff, cdiff, denom, alpha;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < An.size(); i++)
|
||||||
|
{
|
||||||
|
// a = An[i].first - An[i].second;
|
||||||
|
a = An[i].second - An[i].first;
|
||||||
|
for (size_t j = 0; j < Ca.size(); j++)
|
||||||
|
{
|
||||||
|
c = Ca[j].second - Ca[j].first;
|
||||||
|
diff = An[i].second - Ca[j].second;
|
||||||
|
a2 = a.Dot(a);
|
||||||
|
c2 = c.Dot(c);
|
||||||
|
ac = a.Dot(c);
|
||||||
|
adiff = a.Dot(diff);
|
||||||
|
cdiff = c.Dot(diff);
|
||||||
|
denom = a2 * c2 - ac * ac;
|
||||||
|
alpha = (ac * cdiff - c2 * adiff) / denom;
|
||||||
|
|
||||||
|
Crossover[i][j][0].x = An[i].second.X() + alpha * a.X();
|
||||||
|
Crossover[i][j][0].y = An[i].second.Y() + alpha * a.Y();
|
||||||
|
Crossover[i][j][0].z = An[i].second.Z() + alpha * a.Z();
|
||||||
|
|
||||||
|
if (Crossover[i][j][0].z < -190 || Crossover[i][j][0].z > 190)
|
||||||
|
{
|
||||||
|
// std::cout << "Weird crossover but ok" << std::endl;
|
||||||
|
}
|
||||||
|
if ((i + j) % 24 == 12 || Crossover[i][j][0].z < -190 || Crossover[i][j][0].z > 190)
|
||||||
|
{
|
||||||
|
Crossover[i][j][0].z = 9999999;
|
||||||
|
// std::cout << "Weird crossover" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
Crossover[i][j][1].x = alpha;
|
||||||
|
Crossover[i][j][1].y = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dAngle = wireShift * TMath::TwoPi() / nWire;
|
dAngle = wireShift * TMath::TwoPi() / nWire;
|
||||||
anodeLength = TMath::Sqrt( zLen*zLen + TMath::Power(2* radiusA * TMath::Sin(dAngle/2),2) );
|
anodeLength = TMath::Sqrt(zLen * zLen + TMath::Power(2 * radiusA * TMath::Sin(dAngle / 2), 2));
|
||||||
cathodeLength = TMath::Sqrt( zLen*zLen + TMath::Power(2* radiusC * TMath::Sin(dAngle/2),2) );
|
cathodeLength = TMath::Sqrt(zLen * zLen + TMath::Power(2 * radiusC * TMath::Sin(dAngle / 2), 2)); // chord length subtending an angle alpha is 2rsin(alpha/2)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void PW::FindWireID(TVector3 pos, TVector3 direction, bool verbose ){
|
inline TVector3 PW::getClosestWirePosAtWirePhiOld(std::pair<TVector3, TVector3> awire, double sx3phi_radian)
|
||||||
|
{
|
||||||
|
// 1. Get wire geometry
|
||||||
|
TVector3 a1 = awire.first; // Top of the wire
|
||||||
|
TVector3 a2 = awire.second; // Bottom of the wire
|
||||||
|
TVector3 wireVec = a2 - a1; // Vector pointing down the wire
|
||||||
|
|
||||||
|
// Variables to track our minimums during the scan
|
||||||
|
double min_delta_phi = 9999.0;
|
||||||
|
double best_t = -1.0;
|
||||||
|
TVector3 best_pcz_intersect;
|
||||||
|
|
||||||
|
// 2. THE SCAN: Walk down the wire in 1000 tiny steps
|
||||||
|
// (For a 380mm wire, this is checking every 0.38 mm)
|
||||||
|
int num_steps = 1000;
|
||||||
|
for (int i = 0; i <= num_steps; ++i)
|
||||||
|
{
|
||||||
|
double t_test = (double)i / num_steps; // Ranges from 0.0 to 1.0
|
||||||
|
TVector3 test_pt = a1 + t_test * wireVec; // The 3D point at this step
|
||||||
|
|
||||||
|
// Calculate absolute Delta Phi between Si hit and this specific point on the wire
|
||||||
|
if (TMath::IsNaN(sx3phi_radian - test_pt.Phi()))
|
||||||
|
continue;
|
||||||
|
double dPhi = TMath::Abs(TVector2::Phi_mpi_pi(sx3phi_radian - test_pt.Phi())); // Phi_mpi_pi just puts the angle in the range -180 to 180
|
||||||
|
|
||||||
|
// If this is the smallest Delta Phi we've seen so far, save it!
|
||||||
|
if (dPhi < min_delta_phi)
|
||||||
|
{
|
||||||
|
min_delta_phi = dPhi;
|
||||||
|
best_t = t_test;
|
||||||
|
best_pcz_intersect = test_pt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return best_pcz_intersect;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline TVector3 PW::getClosestWirePosAtWirePhi(std::pair<TVector3, TVector3> awire, double phi)
|
||||||
|
{
|
||||||
|
const TVector3 &a1 = awire.first;
|
||||||
|
const TVector3 &a2 = awire.second;
|
||||||
|
const double s = TMath::Sin(phi), c = TMath::Cos(phi);
|
||||||
|
const double dx = a2.X() - a1.X(), dy = a2.Y() - a1.Y();
|
||||||
|
const double t = (a1.Y() * c - a1.X() * s) / (dx * s - dy * c);
|
||||||
|
|
||||||
|
auto nearerEndpoint = [&]() -> TVector3
|
||||||
|
{
|
||||||
|
auto dphi = [&](const TVector3 &p)
|
||||||
|
{
|
||||||
|
return TMath::Abs(TVector2::Phi_mpi_pi(phi - p.Phi()));
|
||||||
|
};
|
||||||
|
return dphi(a1) <= dphi(a2) ? a1 : a2;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (t < 0.0 || t > 1.0)
|
||||||
|
return nearerEndpoint();
|
||||||
|
|
||||||
|
const TVector3 hit = a1 + t * (a2 - a1);
|
||||||
|
if (hit.X() * c + hit.Y() * s <= 0.0) // wrong half-plane (anti-phi side)
|
||||||
|
return nearerEndpoint();
|
||||||
|
|
||||||
|
return hit;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline std::vector<std::vector<std::tuple<int, double, double>>>
|
||||||
|
|
||||||
|
PW::Make_Clusters(const std::unordered_map<int, std::tuple<int, double, double>> &wireEvents)
|
||||||
|
{
|
||||||
|
std::vector<std::vector<std::tuple<int, double, double>>> wireClusters;
|
||||||
|
std::vector<std::tuple<int, double, double>> wireCluster;
|
||||||
|
// TODO: Write a macro once, call it twice
|
||||||
|
int wirecount = 0;
|
||||||
|
while (wirecount < 24)
|
||||||
|
{
|
||||||
|
if (wireEvents.find(wirecount) == wireEvents.end())
|
||||||
|
{
|
||||||
|
wirecount++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
wireCluster.clear();
|
||||||
|
int ctr2 = wirecount;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
wireCluster.emplace_back(wireEvents.at(ctr2));
|
||||||
|
ctr2 += 1;
|
||||||
|
if (ctr2 == 24 || ctr2 - wirecount == 7)
|
||||||
|
break; // loose logic, needs to be looked at.
|
||||||
|
} while (wireEvents.find(ctr2) != wireEvents.end());
|
||||||
|
wireClusters.push_back(std::move(wireCluster));
|
||||||
|
wirecount = ctr2; // we already dealt with wires until the last value of ctr2
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wireClusters.size() > 1)
|
||||||
|
{ // Deal with wraparound if required
|
||||||
|
auto first_cluster = wireClusters.front(); // front and back provide references to the elements themselves. less copy, can modify etc
|
||||||
|
auto last_cluster = wireClusters.back();
|
||||||
|
if (std::get<0>(last_cluster.back()) == 23 && std::get<0>(first_cluster.front()) == 0)
|
||||||
|
{
|
||||||
|
last_cluster.insert(last_cluster.end(), first_cluster.begin(), first_cluster.end());
|
||||||
|
}
|
||||||
|
wireClusters.erase(wireClusters.begin()); // canonically, erase() needs an iterator, hence begin() not front()
|
||||||
|
// TODO: Can also deal with 'gaps' of missing wires similarly. end of one segment and beginning of another segment will be separated by missing wire --> combine the two
|
||||||
|
// TODO: Also needs some development regarding the time-correlation. Don't put wires in the same cluster if they aren't time coincident
|
||||||
|
}
|
||||||
|
return wireClusters;
|
||||||
|
|
||||||
|
/*if(aClusters.size()>1 || cClusters.size() > 1) {
|
||||||
|
std::cout << " ============== " << std::endl;
|
||||||
|
}
|
||||||
|
if(aClusters.size()>1 && cClusters.size() >=1) {
|
||||||
|
std::cout << aClusters.size() << " new anode clusters ----> " << std::endl;
|
||||||
|
int cc=1;
|
||||||
|
for(auto ac : aClusters) {
|
||||||
|
std::cout << " Cluster " << cc << std::endl;
|
||||||
|
double first_ts = std::get<2>(ac.at(0));
|
||||||
|
for(auto item : ac) {
|
||||||
|
std::cout << " \t" << std::get<0>(item) << " " << std::get<1>(item) << " " << std::get<2>(item)-first_ts << std::endl;
|
||||||
|
}
|
||||||
|
std::cout << " ------" << std::endl;
|
||||||
|
cc++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cClusters.size()>=1 ) {
|
||||||
|
std::cout << cClusters.size() << " new cathode clusters ----> " << std::endl;
|
||||||
|
int cc=1;
|
||||||
|
for(auto ac : cClusters) {
|
||||||
|
std::cout << " Cluster " << cc << std::endl;
|
||||||
|
double first_ts = std::get<2>(ac.at(0));
|
||||||
|
for(auto item : ac) {
|
||||||
|
std::cout << " \t" << std::get<0>(item) << " " << std::get<1>(item) << " " << std::get<2>(item)-first_ts << std::endl;
|
||||||
|
}
|
||||||
|
std::cout << " ------" << std::endl;
|
||||||
|
cc++;
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
inline std::tuple<std::pair<TVector3, TVector3>, double, double, double>
|
||||||
|
PW::GetPseudoWire(const std::vector<std::tuple<int, double, double>> &cluster, std::string type)
|
||||||
|
{
|
||||||
|
std::pair<TVector3, TVector3> avgvec = std::pair(TVector3(0, 0, 0), TVector3(0, 0, 0));
|
||||||
|
double sumEnergy = 0;
|
||||||
|
double maxEnergy = 0;
|
||||||
|
double tsMaxEnergy = 0;
|
||||||
|
if (type == "ANODE")
|
||||||
|
{
|
||||||
|
// if(cluster.size()>1) std::cout << " -------anodes" << std::endl;
|
||||||
|
for (auto wire : cluster)
|
||||||
|
{
|
||||||
|
avgvec.first += std::get<1>(wire) * TVector3(An.at(std::get<0>(wire)).first.X(), An.at(std::get<0>(wire)).first.Y(), 0);
|
||||||
|
avgvec.second += std::get<1>(wire) * TVector3(An.at(std::get<0>(wire)).second.X(), An.at(std::get<0>(wire)).second.Y(), 0);
|
||||||
|
sumEnergy += std::get<1>(wire);
|
||||||
|
if (std::get<1>(wire) > maxEnergy)
|
||||||
|
{
|
||||||
|
maxEnergy = std::get<1>(wire);
|
||||||
|
tsMaxEnergy = std::get<2>(wire);
|
||||||
|
}
|
||||||
|
/*if(cluster.size()>1) {
|
||||||
|
std::cout << "\t\t ch:" << std::get<0>(wire) << " " << std::get<1>(wire) << " " << std::get<2>(wire) << std::endl;
|
||||||
|
std::cout << "\t\t w1(r,phi,z):" << An.at(std::get<0>(wire)).first.Perp() << " " << An.at(std::get<0>(wire)).first.Phi()*180/M_PI << " " << An.at(std::get<0>(wire)).first.Z() << std::endl;
|
||||||
|
std::cout << "\t\t w2(r,phi,z):" << An.at(std::get<0>(wire)).second.Perp() << " " << An.at(std::get<0>(wire)).second.Phi()*180/M_PI << " " << An.at(std::get<0>(wire)).second.Z() << std::endl;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
avgvec.first = avgvec.first * (1.0 / sumEnergy);
|
||||||
|
avgvec.second = avgvec.second * (1.0 / sumEnergy);
|
||||||
|
double phi1 = avgvec.first.Phi();
|
||||||
|
double phi2 = avgvec.second.Phi();
|
||||||
|
avgvec.first.SetXYZ(radiusA * TMath::Cos(phi1), radiusA * TMath::Sin(phi1), -zLen / 2);
|
||||||
|
avgvec.second.SetXYZ(radiusA * TMath::Cos(phi2), radiusA * TMath::Sin(phi2), zLen / 2);
|
||||||
|
/*if(cluster.size()>1) {
|
||||||
|
std::cout << "\t\t avg1(r,phi,z):" << avgvec.first.Perp() << " " << avgvec.first.Phi()*180/M_PI << " " << avgvec.first.Z() << std::endl;
|
||||||
|
std::cout << "\t\t avg2(r,phi,z):" << avgvec.second.Perp() << " " << avgvec.second.Phi()*180/M_PI << " " << avgvec.second.Z() << std::endl;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
else if (type == "CATHODE")
|
||||||
|
{
|
||||||
|
for (auto wire : cluster)
|
||||||
|
{
|
||||||
|
avgvec.first += std::get<1>(wire) * TVector3(Ca.at(std::get<0>(wire)).first.X(), Ca.at(std::get<0>(wire)).first.Y(), 0);
|
||||||
|
avgvec.second += std::get<1>(wire) * TVector3(Ca.at(std::get<0>(wire)).second.X(), Ca.at(std::get<0>(wire)).second.Y(), 0);
|
||||||
|
sumEnergy += std::get<1>(wire);
|
||||||
|
if (std::get<1>(wire) > maxEnergy)
|
||||||
|
{
|
||||||
|
maxEnergy = std::get<1>(wire);
|
||||||
|
tsMaxEnergy = std::get<2>(wire);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
avgvec.first = avgvec.first * (1.0 / sumEnergy);
|
||||||
|
avgvec.second = avgvec.second * (1.0 / sumEnergy);
|
||||||
|
double phi1 = avgvec.first.Phi();
|
||||||
|
double phi2 = avgvec.second.Phi();
|
||||||
|
avgvec.first.SetXYZ(radiusC * TMath::Cos(phi1), radiusC * TMath::Sin(phi1), -zLen / 2);
|
||||||
|
avgvec.second.SetXYZ(radiusC * TMath::Cos(phi2), radiusC * TMath::Sin(phi2), zLen / 2);
|
||||||
|
}
|
||||||
|
return std::tuple(avgvec, sumEnergy, maxEnergy, tsMaxEnergy);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline std::tuple<TVector3, double, double, double, double, double, double, double> PW::FindCrossoverProperties(const std::vector<std::tuple<int, double, double>> &a_cluster,
|
||||||
|
const std::vector<std::tuple<int, double, double>> &c_cluster)
|
||||||
|
{
|
||||||
|
// std::pair<TVector3, TVector3> apwire = GetPseudoWire(a_cluster,"ANODE",anodeSumE);
|
||||||
|
// std::pair<TVector3, TVector3> cpwire = GetPseudoWire(c_cluster,"CATHODE",cathodeSumE);
|
||||||
|
auto [apwire, apSumE, apMaxE, apTSMaxE] = GetPseudoWire(a_cluster, "ANODE");
|
||||||
|
auto [cpwire, cpSumE, cpMaxE, cpTSMaxE] = GetPseudoWire(c_cluster, "CATHODE");
|
||||||
|
|
||||||
|
TVector3 crossover;
|
||||||
|
crossover.Clear();
|
||||||
|
TVector3 a, c, diff;
|
||||||
|
double a2, ac, c2, adiff, cdiff, denom, alpha = 0;
|
||||||
|
|
||||||
|
if (apSumE && cpSumE)
|
||||||
|
{
|
||||||
|
a = apwire.first - apwire.second;
|
||||||
|
c = cpwire.first - cpwire.second;
|
||||||
|
diff = apwire.first - cpwire.first;
|
||||||
|
a2 = a.Dot(a);
|
||||||
|
c2 = c.Dot(c);
|
||||||
|
ac = a.Dot(c);
|
||||||
|
adiff = a.Dot(diff);
|
||||||
|
cdiff = c.Dot(diff);
|
||||||
|
denom = a2 * c2 - ac * ac;
|
||||||
|
alpha = (ac * cdiff - c2 * adiff) / denom;
|
||||||
|
crossover = apwire.first + alpha * a;
|
||||||
|
if (crossover.z() < -190 || crossover.Z() > 190)
|
||||||
|
{
|
||||||
|
alpha = 9999999;
|
||||||
|
apSumE = -1;
|
||||||
|
cpSumE = -1;
|
||||||
|
apMaxE = -1;
|
||||||
|
cpMaxE = -1;
|
||||||
|
apTSMaxE = -1;
|
||||||
|
cpTSMaxE = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// std::cout << apSumE << " " << cpSumE << " " << " " << crossover.Perp() << std::endl;
|
||||||
|
return std::tuple(crossover, alpha, apSumE, cpSumE, apMaxE, cpMaxE, apTSMaxE, cpTSMaxE);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void PW::FindWireID(TVector3 pos, TVector3 direction, bool verbose)
|
||||||
|
{
|
||||||
|
|
||||||
hitInfo.Clear();
|
hitInfo.Clear();
|
||||||
double phi = direction.Phi();
|
double phi = direction.Phi();
|
||||||
|
|
||||||
for( int i = 0; i < nWire; i++){
|
for (int i = 0; i < nWire; i++)
|
||||||
|
{
|
||||||
|
|
||||||
double disA = 99999999;
|
double disA = 99999999;
|
||||||
double phiS = An[i].first.Phi() - TMath::PiOver4();
|
double phiS = An[i].first.Phi() - TMath::PiOver4();
|
||||||
double phiL = An[i].second.Phi() + TMath::PiOver4();
|
double phiL = An[i].second.Phi() + TMath::PiOver4();
|
||||||
// printf("A%2d: %f %f | %f\n", i, phiS * TMath::RadToDeg(), phiL * TMath::RadToDeg(), phi * TMath::RadToDeg());
|
// printf("A%2d: %f %f | %f\n", i, phiS * TMath::RadToDeg(), phiL * TMath::RadToDeg(), phi * TMath::RadToDeg());
|
||||||
if( phi > 0 && phiS > phiL ) phiL = phiL + TMath::TwoPi();
|
if (phi > 0 && phiS > phiL)
|
||||||
if( phi < 0 && phiS > phiL ) phiS = phiS - TMath::TwoPi();
|
phiL = phiL + TMath::TwoPi();
|
||||||
|
if (phi < 0 && phiS > phiL)
|
||||||
|
phiS = phiS - TMath::TwoPi();
|
||||||
|
|
||||||
if( phiS < phi && phi < phiL) {
|
if (phiS < phi && phi < phiL)
|
||||||
disA = Distance( pos, pos + direction, An[i].first, An[i].second);
|
{
|
||||||
if( disA < hitInfo.nearestDist.first ){
|
disA = Distance(pos, pos + direction, An[i].first, An[i].second);
|
||||||
|
if (disA < hitInfo.nearestDist.first)
|
||||||
|
{
|
||||||
hitInfo.nearestDist.first = disA;
|
hitInfo.nearestDist.first = disA;
|
||||||
hitInfo.nearestWire.first = i;
|
hitInfo.nearestWire.first = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double disC = 99999999;
|
double disC = 99999999;
|
||||||
phiS = Ca[i].second.Phi()- TMath::PiOver4();
|
phiS = Ca[i].second.Phi() - TMath::PiOver4();
|
||||||
phiL = Ca[i].first.Phi() + TMath::PiOver4();
|
phiL = Ca[i].first.Phi() + TMath::PiOver4();
|
||||||
// printf("C%2d: %f %f\n", i, phiS * TMath::RadToDeg(), phiL * TMath::RadToDeg());
|
// printf("C%2d: %f %f\n", i, phiS * TMath::RadToDeg(), phiL * TMath::RadToDeg());
|
||||||
if( phi > 0 && phiS > phiL ) phiL = phiL + TMath::TwoPi();
|
if (phi > 0 && phiS > phiL)
|
||||||
if( phi < 0 && phiS > phiL ) phiS = phiS - TMath::TwoPi();
|
phiL = phiL + TMath::TwoPi();
|
||||||
|
if (phi < 0 && phiS > phiL)
|
||||||
|
phiS = phiS - TMath::TwoPi();
|
||||||
|
|
||||||
if(phiS < phi && phi < phiL) {
|
if (phiS < phi && phi < phiL)
|
||||||
disC = Distance( pos, pos + direction, Ca[i].first, Ca[i].second);
|
{
|
||||||
if( disC < hitInfo.nearestDist.second ){
|
disC = Distance(pos, pos + direction, Ca[i].first, Ca[i].second);
|
||||||
|
if (disC < hitInfo.nearestDist.second)
|
||||||
|
{
|
||||||
hitInfo.nearestDist.second = disC;
|
hitInfo.nearestDist.second = disC;
|
||||||
hitInfo.nearestWire.second = i;
|
hitInfo.nearestWire.second = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(verbose) printf(" %2d | %8.2f, %8.2f\n", i, disA, disC);
|
if (verbose)
|
||||||
|
printf(" %2d | %8.2f, %8.2f\n", i, disA, disC);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==== find the 2nd nearest wire
|
//==== find the 2nd nearest wire
|
||||||
short anode1 = hitInfo.nearestWire.first;
|
short anode1 = hitInfo.nearestWire.first;
|
||||||
short aaa1 = anode1 - 1; if( aaa1 < 0 ) aaa1 += nWire;
|
short aaa1 = anode1 - 1;
|
||||||
|
if (aaa1 < 0)
|
||||||
|
aaa1 += nWire;
|
||||||
short aaa2 = (anode1 + 1) % nWire;
|
short aaa2 = (anode1 + 1) % nWire;
|
||||||
|
|
||||||
double haha1 = Distance( pos, pos + direction, An[aaa1].first, An[aaa1].second);
|
double haha1 = Distance(pos, pos + direction, An[aaa1].first, An[aaa1].second);
|
||||||
double haha2 = Distance( pos, pos + direction, An[aaa2].first, An[aaa2].second);
|
double haha2 = Distance(pos, pos + direction, An[aaa2].first, An[aaa2].second);
|
||||||
if( haha1 < haha2){
|
if (haha1 < haha2)
|
||||||
|
{
|
||||||
hitInfo.nextNearestWire.first = aaa1;
|
hitInfo.nextNearestWire.first = aaa1;
|
||||||
hitInfo.nextNearestDist.first = haha1;
|
hitInfo.nextNearestDist.first = haha1;
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
hitInfo.nextNearestWire.first = aaa2;
|
hitInfo.nextNearestWire.first = aaa2;
|
||||||
hitInfo.nextNearestDist.first = haha2;
|
hitInfo.nextNearestDist.first = haha2;
|
||||||
}
|
}
|
||||||
|
|
||||||
short cathode1 = hitInfo.nearestWire.second;
|
short cathode1 = hitInfo.nearestWire.second;
|
||||||
short ccc1 = cathode1 - 1; if( ccc1 < 0 ) ccc1 += nWire;
|
short ccc1 = cathode1 - 1;
|
||||||
|
if (ccc1 < 0)
|
||||||
|
ccc1 += nWire;
|
||||||
short ccc2 = (cathode1 + 1) % nWire;
|
short ccc2 = (cathode1 + 1) % nWire;
|
||||||
|
|
||||||
haha1 = Distance( pos, pos + direction, Ca[ccc1].first, Ca[ccc1].second);
|
haha1 = Distance(pos, pos + direction, Ca[ccc1].first, Ca[ccc1].second);
|
||||||
haha2 = Distance( pos, pos + direction, Ca[ccc2].first, Ca[ccc2].second);
|
haha2 = Distance(pos, pos + direction, Ca[ccc2].first, Ca[ccc2].second);
|
||||||
if( haha1 < haha2){
|
if (haha1 < haha2)
|
||||||
|
{
|
||||||
hitInfo.nextNearestWire.second = ccc1;
|
hitInfo.nextNearestWire.second = ccc1;
|
||||||
hitInfo.nextNearestDist.second = haha1;
|
hitInfo.nextNearestDist.second = haha1;
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
hitInfo.nextNearestWire.second = ccc2;
|
hitInfo.nextNearestWire.second = ccc2;
|
||||||
hitInfo.nextNearestDist.second = haha2;
|
hitInfo.nextNearestDist.second = haha2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( verbose ) Print();
|
if (verbose)
|
||||||
|
Print();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void PW::CalTrack(TVector3 sx3Pos, int anodeID, int cathodeID, bool verbose){
|
inline void PW::CalTrack(TVector3 sx3Pos, int anodeID, int cathodeID, bool verbose)
|
||||||
|
{
|
||||||
|
|
||||||
trackPos = sx3Pos;
|
trackPos = sx3Pos;
|
||||||
|
|
||||||
|
|
@ -231,72 +573,116 @@ inline void PW::CalTrack(TVector3 sx3Pos, int anodeID, int cathodeID, bool verbo
|
||||||
// if the handiness of anode and cathode revered, it should be n2 cross n1
|
// if the handiness of anode and cathode revered, it should be n2 cross n1
|
||||||
trackVec = (n2.Cross(n1)).Unit();
|
trackVec = (n2.Cross(n1)).Unit();
|
||||||
|
|
||||||
if( verbose ) printf("Theta, Phi = %f, %f \n", trackVec.Theta() *TMath::RadToDeg(), trackVec.Phi()*TMath::RadToDeg());
|
if (verbose)
|
||||||
|
printf("Theta, Phi = %f, %f \n", trackVec.Theta() * TMath::RadToDeg(), trackVec.Phi() * TMath::RadToDeg());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void PW::CalTrack2(TVector3 sx3Pos, PWHitInfo hitInfo, double sigmaA, double sigmaC, bool verbose){
|
inline void PW::CalTrack2(TVector3 siPos, TVector3 anodeInt, bool verbose)
|
||||||
|
{
|
||||||
|
|
||||||
trackPos = sx3Pos;
|
double mx, my;
|
||||||
|
double z;
|
||||||
double p1 = TMath::Abs(hitInfo.nearestDist.first + gRandom->Gaus(0, sigmaA));
|
mx = siPos.X() / (siPos.X() - anodeInt.X());
|
||||||
double p2 = TMath::Abs(hitInfo.nextNearestDist.first + gRandom->Gaus(0, sigmaA));
|
my = siPos.Y() / (siPos.Y() - anodeInt.Y());
|
||||||
double fracA = p1 / (p1 + p2);
|
z = siPos.Z() + mx * (anodeInt.Z() - siPos.Z());
|
||||||
short anodeID1 = hitInfo.nearestWire.first;
|
// if (mx == my)
|
||||||
short anodeID2 = hitInfo.nextNearestWire.first;
|
{
|
||||||
TVector3 shiftA1 = (An[anodeID2].first - An[anodeID1].first) * fracA;
|
trackVec = TVector3(0, 0, z);
|
||||||
TVector3 shiftA2 = (An[anodeID2].second - An[anodeID1].second) * fracA;
|
}
|
||||||
|
|
||||||
double q1 = TMath::Abs(hitInfo.nearestDist.second + gRandom->Gaus(0, sigmaC));
|
|
||||||
double q2 = TMath::Abs(hitInfo.nextNearestDist.second + gRandom->Gaus(0, sigmaC));
|
|
||||||
double fracC = q1 / (q1 + q2);
|
|
||||||
short cathodeID1 = hitInfo.nearestWire.second;
|
|
||||||
short cathodeID2 = hitInfo.nextNearestWire.second;
|
|
||||||
TVector3 shiftC1 = (Ca[cathodeID2].first - Ca[cathodeID1].first) * fracC;
|
|
||||||
TVector3 shiftC2 = (Ca[cathodeID2].second - Ca[cathodeID1].second) * fracC;
|
|
||||||
|
|
||||||
TVector3 a1 = An[anodeID1].first + shiftA1;
|
|
||||||
TVector3 a2 = An[anodeID1].second + shiftA2;
|
|
||||||
|
|
||||||
TVector3 c1 = Ca[cathodeID1].first + shiftC1;
|
|
||||||
TVector3 c2 = Ca[cathodeID1].second + shiftC2;
|
|
||||||
|
|
||||||
TVector3 n1 = (a1 - a2).Cross((sx3Pos - a2)).Unit();
|
|
||||||
TVector3 n2 = (c1 - c2).Cross((sx3Pos - c2)).Unit();
|
|
||||||
|
|
||||||
// if the handiness of anode and cathode revered, it should be n2 cross n1
|
|
||||||
trackVec = (n2.Cross(n1)).Unit();
|
|
||||||
|
|
||||||
if( verbose ) printf("Theta, Phi = %f, %f \n", trackVec.Theta() *TMath::RadToDeg(), trackVec.Phi()*TMath::RadToDeg());
|
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
printf("X slope = %f and Y slope = %f \n", mx, my);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double PW::GetZ0(){
|
/*inline TVector3 PW::CalTrack3(TVector3 siPos, TVector3 anodeInt, bool verbose)
|
||||||
|
{
|
||||||
|
|
||||||
|
TVector3 v = anodeInt-siPos;
|
||||||
|
double t_minimum = -1.0*(siPos.X()*v.X()+siPos.Y()*v.Y())/(v.X()*v.X()+v.Y()*v.Y());
|
||||||
|
TVector3 vector_closest_to_z = siPos + t_minimum*v;
|
||||||
|
|
||||||
|
return vector_closest_to_z;
|
||||||
|
if (verbose)
|
||||||
|
printf("X slope = %f and Y slope = %f \n", mx, my);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
inline double PW::GetZ0()
|
||||||
|
{
|
||||||
|
|
||||||
double x = trackPos.X();
|
double x = trackPos.X();
|
||||||
double y = trackPos.Y();
|
double y = trackPos.Y();
|
||||||
double rho = TMath::Sqrt(x*x + y*y);
|
double rho = TMath::Sqrt(x * x + y * y);
|
||||||
double theta = trackVec.Theta();
|
double theta = trackVec.Theta();
|
||||||
|
|
||||||
return trackPos.Z() - rho / TMath::Tan(theta);
|
return trackVec.Z();
|
||||||
|
}
|
||||||
|
// Each wire family is strung as straight skew chords between two rings, so it sweeps a
|
||||||
|
// one-sheet hyperboloid (x*x+y*y)/(a*a) - (z*z)/(c*c) = 1 whose waist 'a' is smaller than
|
||||||
|
// the ring radius. The anode waist was fit to the measured anode crossover points; the
|
||||||
|
// other families share the flare 'c' and scale their waist with the ring radius.
|
||||||
|
//
|
||||||
|
// Radial ordering, inner to outer: guard (ring 32) < anode (ring 37) < cathode (ring 43).
|
||||||
|
// Charge collection spans guard -> cathode. The anodes in the middle are the readout, the
|
||||||
|
// cathodes see the induced/mirror charge, and the guard wires are field-shaping, not read out.
|
||||||
|
const double kPCHyperbC = 301.895;
|
||||||
|
const double kPCAnodeWaist = 32.0429; // ring radius 37 mm -- readout
|
||||||
|
const double kPCCathodeWaist = 32.0429 * 43.0 / 37.0; // ring radius 43 mm -- induced charge
|
||||||
|
const double kPCGuardWaist = 32.0429 * 32.0 / 37.0; // ring radius 32 mm -- not read out
|
||||||
|
|
||||||
|
// Intersection of the segment x1 -> x1+dx with the one-sheet hyperboloid of waist a, flare c.
|
||||||
|
// Returns TVector3(0, 0, 54321) when the segment does not cross the surface.
|
||||||
|
inline TVector3 pc_hyperboloid_intersect(const TVector3 &x1, const TVector3 &dx, double a, double c)
|
||||||
|
{
|
||||||
|
double t2 = 1.0; // value of 't' at the destination point, by definition t=(z(t)-z0)/dz
|
||||||
|
auto A = pow(dx.Perp(), 2) / (a * a) - pow(dx.Z(), 2) / (c * c);
|
||||||
|
auto B = 2 * (dx.X() * x1.X() + dx.Y() * x1.Y()) / (a * a) - 2 * (dx.Z() * x1.Z()) / (c * c);
|
||||||
|
auto C = pow(x1.Perp(), 2) / (a * a) - pow(x1.Z(), 2) / (c * c) - 1.0;
|
||||||
|
double disc = B * B - 4 * A * C;
|
||||||
|
if (disc < 0)
|
||||||
|
return TVector3(0, 0, 54321);
|
||||||
|
double tsol1 = (-B + TMath::Sqrt(disc)) / (2 * A);
|
||||||
|
double tsol2 = (-B - TMath::Sqrt(disc)) / (2 * A);
|
||||||
|
if (tsol1 >= 0 && tsol1 <= t2)
|
||||||
|
return x1 + tsol1 * dx;
|
||||||
|
else if (tsol2 >= 0 && tsol2 <= t2)
|
||||||
|
return x1 + tsol2 * dx;
|
||||||
|
else
|
||||||
|
return TVector3(0, 0, 54321);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double PW::CircularMean(std::vector<std::pair<int, double>> wireList){
|
inline std::tuple<TVector3, TVector3, double> find_PC_PathLength(const TVector3 &x1, const TVector3 &x2)
|
||||||
|
{
|
||||||
//use unit vector, wireID start from Zero
|
/*
|
||||||
double xCom = 0, yCom = 0;
|
Anode -> cathode segment for a particle moving from x1 to x2.
|
||||||
for( size_t i = 0; i < wireList.size() ; i++){
|
* Typical arguments here will be x1=r_rhoMin, x2=qqqevent.pos or sx3event.pos
|
||||||
xCom += TMath::Cos(TMath::TwoPi() * wireList[i].first / nWire) * wireList[i].second;
|
* Returns {cathode_intersect, anode_intersect, gap_in_cm}; gap == 54321 sentinel on failure.
|
||||||
yCom += TMath::Sin(TMath::TwoPi() * wireList[i].first / nWire) * wireList[i].second;
|
* NOTE: this is the anode->cathode gap, NOT the full charge-collection region.
|
||||||
}
|
For the anode energy calibration use find_PC_CollectionPath() instead.
|
||||||
|
*/
|
||||||
//calculate the angle of the summed unit vectors
|
TVector3 dx = x2 - x1; // direction vector
|
||||||
double angle = TMath::ATan2(yCom, xCom);
|
TVector3 anode_intersect = pc_hyperboloid_intersect(x1, dx, kPCAnodeWaist, kPCHyperbC);
|
||||||
if( angle < 0 ) angle += TMath::TwoPi(); // convert the angle from 0 to 2 pi
|
TVector3 cathode_intersect = pc_hyperboloid_intersect(x1, dx, kPCCathodeWaist, kPCHyperbC);
|
||||||
|
if (anode_intersect.Z() != 54321 && cathode_intersect.Z() != 54321)
|
||||||
return angle/ TMath::TwoPi() * nWire;
|
return std::tuple(cathode_intersect, anode_intersect, (cathode_intersect - anode_intersect).Mag() * 0.1);
|
||||||
|
else
|
||||||
|
return std::tuple(TVector3(0, 0, 0), TVector3(0, 0, 0), 54321);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline std::tuple<TVector3, TVector3, double> find_PC_CollectionPath(const TVector3 &x1, const TVector3 &x2)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Charge-collection region for a particle moving from x1 to x2: it begins where the track
|
||||||
|
passes the guard wires and ends at the cathode. This is the segment whose energy deposit
|
||||||
|
the anodes actually collect, so it is the dE target for the anode energy calibration.
|
||||||
|
* Returns {guard_intersect, cathode_intersect, thickness_in_cm}; 54321 sentinel on failure.
|
||||||
|
*/
|
||||||
|
TVector3 dx = x2 - x1;
|
||||||
|
TVector3 guard_intersect = pc_hyperboloid_intersect(x1, dx, kPCGuardWaist, kPCHyperbC);
|
||||||
|
TVector3 cathode_intersect = pc_hyperboloid_intersect(x1, dx, kPCCathodeWaist, kPCHyperbC);
|
||||||
|
if (guard_intersect.Z() != 54321 && cathode_intersect.Z() != 54321)
|
||||||
|
return std::tuple(guard_intersect, cathode_intersect, (cathode_intersect - guard_intersect).Mag() * 0.1);
|
||||||
|
else
|
||||||
|
return std::tuple(TVector3(0, 0, 0), TVector3(0, 0, 0), 54321);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
355
Armory/EventBuilder.cpp
Normal file
355
Armory/EventBuilder.cpp
Normal file
|
|
@ -0,0 +1,355 @@
|
||||||
|
#include "fsuReader.h"
|
||||||
|
|
||||||
|
#include "TROOT.h"
|
||||||
|
#include "TSystem.h"
|
||||||
|
#include "TClonesArray.h"
|
||||||
|
#include "TGraph.h"
|
||||||
|
#include "TFile.h"
|
||||||
|
#include "TTree.h"
|
||||||
|
#include "TMacro.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define MAX_MULTI 2000
|
||||||
|
|
||||||
|
struct FileInfo{
|
||||||
|
|
||||||
|
std::string fileName;
|
||||||
|
int fileID;
|
||||||
|
unsigned long hitCount;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//^#############################################################
|
||||||
|
//^#############################################################
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
|
printf("=========================================\n");
|
||||||
|
printf("=== *.fsu Events Builder ===\n");
|
||||||
|
printf("=========================================\n");
|
||||||
|
if (argc < 6) {
|
||||||
|
printf("Incorrect number of arguments:\n");
|
||||||
|
printf("%s [timeWindow] [withTrace] [verbose] [batchSize] [inFile1] [inFile2] .... \n", argv[0]);
|
||||||
|
printf(" timeWindow : in ns, -1 = no event building \n");
|
||||||
|
printf(" withTrace : 0 for no trace, 1 for trace \n");
|
||||||
|
printf(" verbose : > 0 for debug \n");
|
||||||
|
printf(" batchSize : the size of hit in a batch \n");
|
||||||
|
printf(" Output file name is contructed from inFile1 \n");
|
||||||
|
printf("\n");
|
||||||
|
printf(" Example: %s 0 0 0 10000 '\\ls -1 *001*.fsu'\n", argv[0]);
|
||||||
|
printf("\n\n");
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
uInt runStartTime = getTime_us();
|
||||||
|
|
||||||
|
///============= read input
|
||||||
|
long timeWindow = atoi(argv[1]);
|
||||||
|
bool traceOn = atoi(argv[2]);
|
||||||
|
unsigned int debug = atoi(argv[3]);
|
||||||
|
unsigned int batchSize = atoi(argv[4]);
|
||||||
|
int nFile = argc - 5;
|
||||||
|
TString inFileName[nFile];
|
||||||
|
for( int i = 0 ; i < nFile ; i++){ inFileName[i] = argv[i+5];}
|
||||||
|
|
||||||
|
/// Form outFileName;
|
||||||
|
TString outFileName = inFileName[0];
|
||||||
|
int pos = outFileName.Last('/');
|
||||||
|
pos = outFileName.Index("_", pos+1); // find next "_"
|
||||||
|
pos = outFileName.Index("_", pos+1); // find next "_"
|
||||||
|
if( nFile == 1 ) pos = outFileName.Index("_", pos+1); // find next "_", S/N
|
||||||
|
outFileName.Remove(pos); // remove the rest
|
||||||
|
outFileName += "_" + std::to_string(timeWindow);
|
||||||
|
outFileName += ".root";
|
||||||
|
printf("-------> Out file name : %s \n", outFileName.Data());
|
||||||
|
printf("========================================= Number of Files : %d \n", nFile);
|
||||||
|
for( int i = 0; i < nFile; i++) printf("%2d | %s \n", i, inFileName[i].Data());
|
||||||
|
printf("=========================================\n");
|
||||||
|
printf(" Time Window = %ld ns = %.1f us\n", timeWindow, timeWindow/1000.);
|
||||||
|
printf(" Include Trace = %s\n", traceOn ? "Yes" : "No");
|
||||||
|
printf(" Debug level = %d\n", debug);
|
||||||
|
printf(" Batch size = %d events/file\n", batchSize);
|
||||||
|
printf(" Max multiplity = %d hits/event (hard coded)\n", MAX_MULTI);
|
||||||
|
printf("========================================= Grouping files\n");
|
||||||
|
|
||||||
|
std::vector<std::vector<FileInfo>> fileGroupList; // fileName and ID = SN * 1000 + index
|
||||||
|
std::vector<FileInfo> fileList;
|
||||||
|
|
||||||
|
unsigned long long int totalHitCount = 0;
|
||||||
|
|
||||||
|
FSUReader * readerA = new FSUReader(inFileName[0].Data(), 1, 1);
|
||||||
|
readerA->ScanNumBlock(0,0);
|
||||||
|
FileInfo fileInfo = {inFileName[0].Data(), readerA->GetSN() * 1000 + readerA->GetFileOrder(), readerA->GetHitCount()};
|
||||||
|
fileList.push_back(fileInfo);
|
||||||
|
totalHitCount += readerA->GetHitCount();
|
||||||
|
|
||||||
|
for( int i = 1; i < nFile; i++){
|
||||||
|
FSUReader * readerB = new FSUReader(inFileName[i].Data(), 1, 0);
|
||||||
|
readerB->ScanNumBlock(0,0);
|
||||||
|
totalHitCount += readerB->GetHitCount();
|
||||||
|
fileInfo = {inFileName[i].Data(), readerB->GetSN() * 1000 + readerB->GetFileOrder(), readerB->GetHitCount()};
|
||||||
|
|
||||||
|
if( readerA->GetSN() == readerB->GetSN() ){
|
||||||
|
fileList.push_back(fileInfo);
|
||||||
|
}else{
|
||||||
|
fileGroupList.push_back(fileList);
|
||||||
|
fileList.clear();
|
||||||
|
fileList.push_back(fileInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
delete readerA;
|
||||||
|
readerA = readerB;
|
||||||
|
}
|
||||||
|
fileGroupList.push_back(fileList);
|
||||||
|
delete readerA;
|
||||||
|
|
||||||
|
printf("======================= total Hit Count : %llu\n", totalHitCount);
|
||||||
|
|
||||||
|
for( size_t i = 0; i < fileGroupList.size(); i++){
|
||||||
|
printf("group ----- %ld \n", i);
|
||||||
|
|
||||||
|
//sort by ID
|
||||||
|
std::sort(fileGroupList[i].begin(), fileGroupList[i].end(), [](const FileInfo & a, const FileInfo & b) {
|
||||||
|
return a.fileID < b.fileID;
|
||||||
|
});
|
||||||
|
|
||||||
|
for( size_t j = 0; j < fileGroupList[i].size(); j++){
|
||||||
|
printf("%3ld | %8d | %9lu| %s \n", j, fileGroupList[i][j].fileID, fileGroupList[i][j].hitCount, fileGroupList[i][j].fileName.c_str() );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// //*====================================== create tree
|
||||||
|
TFile * outRootFile = new TFile(outFileName, "recreate");
|
||||||
|
TTree * tree = new TTree("tree", outFileName);
|
||||||
|
|
||||||
|
unsigned long long evID = 0;
|
||||||
|
unsigned int multi = 0;
|
||||||
|
unsigned short sn[MAX_MULTI] = {0}; /// board SN
|
||||||
|
unsigned short ch[MAX_MULTI] = {0}; /// chID
|
||||||
|
unsigned short e[MAX_MULTI] = {0}; /// 15 bit
|
||||||
|
unsigned short e2[MAX_MULTI] = {0}; /// 15 bit
|
||||||
|
unsigned long long e_t[MAX_MULTI] = {0}; /// timestamp 47 bit
|
||||||
|
unsigned short e_f[MAX_MULTI] = {0}; /// fine time 10 bit
|
||||||
|
unsigned short traceLength[MAX_MULTI];
|
||||||
|
|
||||||
|
tree->Branch("evID", &evID, "event_ID/l");
|
||||||
|
tree->Branch("multi", &multi, "multi/i");
|
||||||
|
tree->Branch("sn", sn, "sn[multi]/s");
|
||||||
|
tree->Branch("ch", ch, "ch[multi]/s");
|
||||||
|
tree->Branch("e", e, "e[multi]/s");
|
||||||
|
tree->Branch("e2", e2, "e2[multi]/s");
|
||||||
|
tree->Branch("e_t", e_t, "e_timestamp[multi]/l");
|
||||||
|
tree->Branch("e_f", e_f, "e_fineTime[multi]/s");
|
||||||
|
tree->Branch("traceLength", traceLength, "traceLength[multi]/s");
|
||||||
|
|
||||||
|
TClonesArray * arrayTrace = nullptr;
|
||||||
|
TGraph * trace = nullptr;
|
||||||
|
|
||||||
|
if( traceOn ) {
|
||||||
|
arrayTrace = new TClonesArray("TGraph");
|
||||||
|
tree->Branch("trace", arrayTrace, 2560000);
|
||||||
|
arrayTrace->BypassStreamer();
|
||||||
|
}
|
||||||
|
|
||||||
|
//*======================================= Open files
|
||||||
|
printf("========================================= Open files & Build Events.\n");
|
||||||
|
|
||||||
|
const short nGroup = fileGroupList.size();
|
||||||
|
std::vector<Hit> hitList[nGroup];
|
||||||
|
|
||||||
|
FSUReader ** reader = new FSUReader * [nGroup];
|
||||||
|
ulong ID[nGroup];
|
||||||
|
for( short i = 0; i < nGroup; i++){
|
||||||
|
std::vector<std::string> fList;
|
||||||
|
for( size_t j = 0; j < fileGroupList[i].size(); j++){
|
||||||
|
fList.push_back( fileGroupList[i][j].fileName );
|
||||||
|
}
|
||||||
|
reader[i] = new FSUReader(fList, 600, debug);
|
||||||
|
hitList[i] = reader[i]->ReadBatch(batchSize, debug );
|
||||||
|
reader[i]->PrintHitListInfo(&hitList[i], "hitList-" + std::to_string(reader[i]->GetSN()));
|
||||||
|
ID[i] = 0;
|
||||||
|
if( debug ) {
|
||||||
|
|
||||||
|
for( size_t p = 0; p < 10; p ++ ){
|
||||||
|
if( hitList[i].size() <= p ) break;
|
||||||
|
hitList[i][p].Print();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long long tStart = 0;
|
||||||
|
unsigned long long tEnd = 0;
|
||||||
|
|
||||||
|
//find earliest time group;
|
||||||
|
unsigned long long t0 = -1;
|
||||||
|
short g0 = 0 ;
|
||||||
|
for( short i = 0; i < nGroup; i++){
|
||||||
|
if( hitList[i].size() == 0 ) continue;
|
||||||
|
if( hitList[i][0].timestamp < t0 ) {
|
||||||
|
t0 = hitList[i][0].timestamp;
|
||||||
|
g0 = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tStart = t0;
|
||||||
|
if( debug ) printf("First timestamp is %llu, group : %u\n", t0, g0);
|
||||||
|
|
||||||
|
int nFileFinished = 0;
|
||||||
|
multi = 0;
|
||||||
|
evID = 0;
|
||||||
|
std::vector<Hit> events;
|
||||||
|
|
||||||
|
unsigned long long hitProcessed = 0;
|
||||||
|
|
||||||
|
do{
|
||||||
|
|
||||||
|
//*============= Build events from hitList[i]
|
||||||
|
if( debug ) printf("################################ ev build %llu \n", evID);
|
||||||
|
events.clear();
|
||||||
|
|
||||||
|
for( short i = 0; i < nGroup; i++){
|
||||||
|
short ig = (i + g0 ) % nGroup;
|
||||||
|
|
||||||
|
if( hitList[ig].size() == 0 ) continue;
|
||||||
|
|
||||||
|
//chekc if reached the end of hitList
|
||||||
|
if( ID[ig] >= hitList[ig].size() ) {
|
||||||
|
hitList[ig] = reader[ig]->ReadBatch(batchSize, debug + 1);
|
||||||
|
if( debug ) reader[ig]->PrintHitListInfo( &hitList[ig], "hitList-" + std::to_string(ig));
|
||||||
|
ID[ig] = 0;
|
||||||
|
if( hitList[ig].size() == 0 ) continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( timeWindow >= 0 ){
|
||||||
|
|
||||||
|
do{
|
||||||
|
|
||||||
|
if( (long int)(hitList[ig].at(ID[ig]).timestamp - t0) <= timeWindow ){
|
||||||
|
events.push_back(hitList[ig].at(ID[ig]));
|
||||||
|
ID[ig] ++;
|
||||||
|
}else{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//check if reached the end of hitList
|
||||||
|
if( ID[ig] >= hitList[ig].size() ) {
|
||||||
|
hitList[ig] = reader[ig]->ReadBatch(batchSize, debug);
|
||||||
|
if( debug ) reader[ig]->PrintHitListInfo( &hitList[ig], "hitList-" + std::to_string(ig));
|
||||||
|
ID[ig] = 0;
|
||||||
|
if( hitList[ig].size() == 0 ) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}while(ID[ig] < hitList[ig].size());
|
||||||
|
|
||||||
|
}else{
|
||||||
|
events.push_back(hitList[ig].at(ID[ig]));
|
||||||
|
ID[ig] ++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( timeWindow < 0) break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if( events.size() > 1 ){
|
||||||
|
std::sort(events.begin(), events.end(), [](const Hit& a, const Hit& b) {
|
||||||
|
return a.timestamp < b.timestamp;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
tEnd = events.back().timestamp;
|
||||||
|
|
||||||
|
hitProcessed += events.size();
|
||||||
|
if( hitProcessed % 10000 == 0 ) printf("hit Porcessed %llu/%llu hit....%.2f%%\n\033[A\r", hitProcessed, totalHitCount, hitProcessed*100./totalHitCount);
|
||||||
|
|
||||||
|
|
||||||
|
multi = events.size() ;
|
||||||
|
if( events.size() >= MAX_MULTI ) {
|
||||||
|
printf("event %lld has size = %d > MAX_MULTI = %d\n", evID, multi, MAX_MULTI);
|
||||||
|
multi = MAX_MULTI;
|
||||||
|
}
|
||||||
|
if( debug ) printf("=================================== filling data | %u \n", multi);
|
||||||
|
for( size_t p = 0; p < multi ; p ++ ) {
|
||||||
|
if( debug ) {printf("%4zu | ", p); events[p].Print();}
|
||||||
|
|
||||||
|
sn[p] = events[p].sn;
|
||||||
|
ch[p] = events[p].ch;
|
||||||
|
e[p] = events[p].energy;
|
||||||
|
e2[p] = events[p].energy2;
|
||||||
|
e_t[p] = events[p].timestamp;
|
||||||
|
e_f[p] = events[p].fineTime;
|
||||||
|
|
||||||
|
traceLength[p] = events[p].traceLength;
|
||||||
|
if( traceOn ){
|
||||||
|
trace = (TGraph *) arrayTrace->ConstructedAt(multi, "C");
|
||||||
|
trace->Clear();
|
||||||
|
for( int hh = 0; hh < traceLength[multi]; hh++){
|
||||||
|
trace->SetPoint(hh, hh, events[p].trace[hh]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
outRootFile->cd();
|
||||||
|
tree->Fill();
|
||||||
|
// tree->Write();
|
||||||
|
multi = 0;
|
||||||
|
evID ++;
|
||||||
|
|
||||||
|
///===================== find the next first timestamp
|
||||||
|
t0 = -1;
|
||||||
|
g0 = -1;
|
||||||
|
|
||||||
|
for( int i = 0; i < nGroup; i++) {
|
||||||
|
if( hitList[i].size() == 0 ) continue;
|
||||||
|
if( hitList[i][ID[i]].timestamp < t0 ) {
|
||||||
|
t0 = hitList[i][ID[i]].timestamp;
|
||||||
|
g0 = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( debug ) printf("Next First timestamp is %llu, group : %u\n", t0, g0);
|
||||||
|
|
||||||
|
//*=============
|
||||||
|
nFileFinished = 0;
|
||||||
|
for( int i = 0 ; i < nGroup; i++) {
|
||||||
|
if( hitList[i].size() == 0 ) {
|
||||||
|
nFileFinished ++;
|
||||||
|
continue;
|
||||||
|
}else{
|
||||||
|
if( ID[i] >= hitList[i].size( )) {
|
||||||
|
hitList[i] = reader[i]->ReadBatch(batchSize, debug);
|
||||||
|
ID[i] = 0;
|
||||||
|
if( hitList[i].size() == 0 ) nFileFinished ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( debug > 1 ) printf("========== nFileFinished : %d\n", nFileFinished);
|
||||||
|
|
||||||
|
}while( nFileFinished < nGroup);
|
||||||
|
|
||||||
|
tree->Write();
|
||||||
|
|
||||||
|
uInt runEndTime = getTime_us();
|
||||||
|
double runTime = (runEndTime - runStartTime) * 1e-6;
|
||||||
|
printf("========================================= finished.\n");
|
||||||
|
printf(" event building time = %.2f sec = %.2f min\n", runTime, runTime/60.);
|
||||||
|
printf(" total events built = %llu by event builder (%llu in tree)\n", evID, tree->GetEntriesFast());
|
||||||
|
double tDuration_sec = (tEnd - tStart) * 1e-9;
|
||||||
|
printf(" first timestamp = %20llu ns\n", tStart);
|
||||||
|
printf(" last timestamp = %20llu ns\n", tEnd);
|
||||||
|
printf(" total data duration = %.2f sec = %.2f min\n", tDuration_sec, tDuration_sec/60.);
|
||||||
|
printf("==============> saved to %s \n", outFileName.Data());
|
||||||
|
|
||||||
|
TMacro info;
|
||||||
|
info.AddLine(Form("tStart= %20llu ns",tStart));
|
||||||
|
info.AddLine(Form(" tEnd= %20llu ns",tEnd));
|
||||||
|
info.Write("info");
|
||||||
|
|
||||||
|
outRootFile->Close();
|
||||||
|
|
||||||
|
for( int i = 0; i < nGroup; i++) delete reader[i];
|
||||||
|
delete [] reader;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
491
Armory/HistPlotter.h
Normal file
491
Armory/HistPlotter.h
Normal file
|
|
@ -0,0 +1,491 @@
|
||||||
|
#ifndef HISTPLOTTER_H
|
||||||
|
#define HISTPLOTTER_H
|
||||||
|
#include <TCanvas.h>
|
||||||
|
#include <TROOT.h>
|
||||||
|
#include <TSystem.h>
|
||||||
|
#include <TStyle.h>
|
||||||
|
#include <iostream>
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TMemFile.h>
|
||||||
|
#include <TH1.h>
|
||||||
|
#include <TH2.h>
|
||||||
|
#include <TCutG.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <utility>
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <map>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <set>
|
||||||
|
#include <TGraphErrors.h>
|
||||||
|
|
||||||
|
class HistPlotter
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
long long barrier_count, barrier_limit; // meant to keep track of how often to call FillN() on histograms
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
TFILE,
|
||||||
|
TMEMFILE
|
||||||
|
} filetype;
|
||||||
|
std::map<std::string, TObject *> oMap; //!< Maps std::string to all TH1, TH2 objects in the class
|
||||||
|
std::unordered_map<std::string, TObject *> cutsMap; //!< Maps std::string to TCutG objects held by the class
|
||||||
|
std::set<std::string> folderList; //!< List of all folder names used to nest objects
|
||||||
|
std::unordered_map<TObject *, std::string> foldersForObjects; //!< Map that returns the folder corresponding to the object whose pointer is specified
|
||||||
|
TFile *ofile = nullptr; //!< TFile pointer for the output file
|
||||||
|
TMemFile *omfile = nullptr; //!< TFile pointer for the output memfile
|
||||||
|
|
||||||
|
// Caches to permit FillN() calls
|
||||||
|
std::map<std::string, std::vector<double>> onedimcache;
|
||||||
|
std::map<std::string, std::pair<std::vector<double>, std::vector<double>>> twodimcache;
|
||||||
|
inline void FillN_All_Histograms();
|
||||||
|
|
||||||
|
public:
|
||||||
|
HistPlotter(std::string outfile, std::string type);
|
||||||
|
inline void FlushToDisk(int integral); //!< Writes all objects to file before closing, nesting objects in folders as is found necessary
|
||||||
|
inline void PrintObjects(); //!< Dump objects to std::cout for inspection
|
||||||
|
inline void ReadCuts(std::string);
|
||||||
|
inline TCutG *FindCut(std::string cut)
|
||||||
|
{
|
||||||
|
return static_cast<TCutG *>(cutsMap.at(cut));
|
||||||
|
}
|
||||||
|
inline void set_barrier_limit(long long limit) { barrier_limit = limit; }
|
||||||
|
inline void barrier_increment()
|
||||||
|
{
|
||||||
|
barrier_count++;
|
||||||
|
if (barrier_count == barrier_limit)
|
||||||
|
{
|
||||||
|
FillN_All_Histograms();
|
||||||
|
barrier_count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void force_flush_caches()
|
||||||
|
{
|
||||||
|
FillN_All_Histograms();
|
||||||
|
barrier_count = 0;
|
||||||
|
}
|
||||||
|
/*! \fn void FindCut()
|
||||||
|
\brief
|
||||||
|
- Searches for a cut by name 'cut' in the internal list of cuts 'cutsMap'. Ugly fails (via unresolved at()) if such a cut isn't found.
|
||||||
|
\param filename - name of the plainxtext file containing the cut file locations and identifiers
|
||||||
|
\return Pointer to the TCutG object that matches the name. Very useful to use this as plotter.FindCut("protonbarrelpid")->IsInside(deltaE, E) for instance.
|
||||||
|
*/
|
||||||
|
|
||||||
|
inline void SetNewTitle(std::string name, std::string title)
|
||||||
|
{
|
||||||
|
auto result = oMap.find(name); // result is an iterator
|
||||||
|
if (result == oMap.end())
|
||||||
|
return; // no warnings, could be changed in future
|
||||||
|
else
|
||||||
|
static_cast<TNamed *>(oMap.at(name))->SetTitle(title.c_str()); // set new title
|
||||||
|
}
|
||||||
|
|
||||||
|
// Smart functions that create a new histogram if it doesn't exist.
|
||||||
|
inline void FillGraph(const std::string &name, float valuex, float valuey, float errx = 0, float erry = 0);
|
||||||
|
inline void Fill1D(const std::string &name, int nbinsx, float xlow, float xhigh, float value);
|
||||||
|
inline void Fill2D(const std::string &name, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh, float valuex, float valuey);
|
||||||
|
inline void Fill1D(const std::string &name, int nbinsx, float xlow, float xhigh, float value, const std::string &folder);
|
||||||
|
inline void Fill2D(const std::string &name, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh, float valuex, float valuey, const std::string &folder);
|
||||||
|
// TObject* findObject(std::string key);
|
||||||
|
};
|
||||||
|
|
||||||
|
HistPlotter::HistPlotter(std::string outfile, std::string type = "")
|
||||||
|
{
|
||||||
|
/*!
|
||||||
|
\brief Constructor. Opens a TFile instance with the specified filename
|
||||||
|
\param outfile : std::string that holds the desired output ROOT filename
|
||||||
|
\return None
|
||||||
|
*/
|
||||||
|
if (type == "" || type == "TFILE")
|
||||||
|
{
|
||||||
|
ofile = new TFile(outfile.c_str(), "recreate");
|
||||||
|
filetype = TFILE;
|
||||||
|
}
|
||||||
|
else if (type == "TMEMFILE")
|
||||||
|
{
|
||||||
|
omfile = new TMemFile(outfile.c_str(), "recreate");
|
||||||
|
filetype = TMEMFILE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "Unknown type " << type << " specified for HistPlotter (use \"TFILE\" or \"TMEMFILE\"), using default \"TFILE\" " << std::endl;
|
||||||
|
ofile = new TFile(outfile.c_str(), "recreate");
|
||||||
|
filetype = TFILE;
|
||||||
|
}
|
||||||
|
barrier_count = 0;
|
||||||
|
barrier_limit = 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistPlotter::FillN_All_Histograms()
|
||||||
|
{
|
||||||
|
for (auto it = oMap.begin(); it != oMap.end(); it++)
|
||||||
|
{
|
||||||
|
// it->first is std::string 'name', it->second is the TObject
|
||||||
|
if (it->second->InheritsFrom("TH1F"))
|
||||||
|
{
|
||||||
|
// FillN(size, array-of-doubles, array-of-weights); //we set array-of-weights to (1,1,1,.. (size)
|
||||||
|
static_cast<TH1F *>(it->second)->FillN(onedimcache[it->first].size(), // size
|
||||||
|
onedimcache[it->first].data(), // array
|
||||||
|
std::vector<double>(onedimcache[it->first].size(), 1.0).data()); // weight of ones
|
||||||
|
onedimcache[it->first].clear();
|
||||||
|
}
|
||||||
|
else if (it->second->InheritsFrom("TH2F"))
|
||||||
|
{
|
||||||
|
// FillN(size, array-of-doubles, array-of-weights); //we set array-of-weights to (1,1,1,.. (size))
|
||||||
|
static_cast<TH2F *>(it->second)->FillN(twodimcache[it->first].first.size(), // size
|
||||||
|
twodimcache[it->first].first.data(), // x array
|
||||||
|
twodimcache[it->first].second.data(), // y array
|
||||||
|
std::vector<double>(twodimcache[it->first].first.size(), 1.0).data()); // weight of ones
|
||||||
|
twodimcache[it->first].first.clear();
|
||||||
|
twodimcache[it->first].second.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::cout << "." << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistPlotter::FlushToDisk(int min_integral = 0)
|
||||||
|
{
|
||||||
|
/*! \fn void FlushToDisk()
|
||||||
|
\brief Function that can be used at any point to exit smoothly by saving all ROOT objects in memory
|
||||||
|
to the output file before closing it. Obeys the binding of histograms to separate folders, if so specified.
|
||||||
|
\return No return -- void
|
||||||
|
*/
|
||||||
|
if (filetype == TMEMFILE && omfile)
|
||||||
|
{
|
||||||
|
std::cout << "Not flushing a TMemfile .. exiting .." << std::endl;
|
||||||
|
delete omfile;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ofile->IsZombie() || !ofile)
|
||||||
|
{
|
||||||
|
std::cerr << "Output file is zombie, finishing up without writing to disk!" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
FillN_All_Histograms();
|
||||||
|
for (auto it = oMap.begin(); it != oMap.end(); it++)
|
||||||
|
{
|
||||||
|
// omap maps: name(first) to object address(second).
|
||||||
|
// foldersForObjects maps: object address(first) to foldername(second)
|
||||||
|
auto result = foldersForObjects.find(it->second); // returns <TObject* histogram,std::string foldername> pair if found
|
||||||
|
if (result != foldersForObjects.end())
|
||||||
|
{ // we try to create folder if needed and cd to it
|
||||||
|
ofile->mkdir(result->second.c_str(), "", kTRUE); // args: name, title, returnExistingDirectory
|
||||||
|
ofile->cd(result->second.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ofile->cd(); // toplevel for all default histograms. Default setting
|
||||||
|
}
|
||||||
|
if (((TH1F *)it->second)->Integral() > min_integral)
|
||||||
|
it->second->Write();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a directory for all cuts, and save all cuts in them
|
||||||
|
ofile->mkdir("gCUTS", "", kTRUE);
|
||||||
|
ofile->cd("gCUTS");
|
||||||
|
for (auto it = cutsMap.begin(); it != cutsMap.end(); it++)
|
||||||
|
{
|
||||||
|
(static_cast<TNamed *>(it->second))->SetName(it->first.c_str());
|
||||||
|
it->second->Write();
|
||||||
|
}
|
||||||
|
ofile->Close();
|
||||||
|
std::cout << "Wrote " << oMap.size() << " histograms to TFile " << std::string(ofile->GetName()) << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistPlotter::FillGraph(const std::string &name, float valuex, float valuey, float errx, float erry)
|
||||||
|
{
|
||||||
|
/*! \fn void FillGraph()
|
||||||
|
\brief
|
||||||
|
- Creates a TGraphError in memory with name 'name' if it doesn't exist, and fills it with valuex, valuey
|
||||||
|
- Writes present state to disk and fails with return value -1 if the name clashes with another object that's not of type TGraph*
|
||||||
|
|
||||||
|
\param name name of the TGraph
|
||||||
|
\param valuex The xvalue
|
||||||
|
\param valuey The yvalue
|
||||||
|
\param errx The x error
|
||||||
|
\param erry The y error
|
||||||
|
\return No return void
|
||||||
|
*/
|
||||||
|
auto result = oMap.find(name);
|
||||||
|
if (result == oMap.end())
|
||||||
|
{
|
||||||
|
TGraphErrors *tempG = new TGraphErrors();
|
||||||
|
tempG->SetName(name.c_str());
|
||||||
|
oMap.insert(std::make_pair(name, static_cast<TObject *>(tempG)));
|
||||||
|
}
|
||||||
|
if (!oMap.at(name)->InheritsFrom("TGraphErrors"))
|
||||||
|
{
|
||||||
|
std::cerr << "Object " << name << " refers to something other than a TGraph*, not filling it hence!" << std::endl;
|
||||||
|
std::cerr << "Abort.." << std::endl;
|
||||||
|
FlushToDisk();
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
// static_cast<TGraphErrors*>(oMap.at(name))->AddPointError(valuex,valuey,errx,erry);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistPlotter::Fill1D(const std::string &name, int nbinsx, float xlow, float xhigh, float value)
|
||||||
|
{
|
||||||
|
/*! \fn void Fill1D()
|
||||||
|
\brief
|
||||||
|
- Creates a TH1F in memory with name 'name' if it doesn't exist, and fills it with valuex, valuey
|
||||||
|
- Writes present state to disk and fails with return value -1 if the name clashes with another object that's not of type TH1*
|
||||||
|
|
||||||
|
\param name name of the TH1F histogram
|
||||||
|
\param nbinsx Number of bins in the histogram
|
||||||
|
\param xlow Lower limit on x-axis
|
||||||
|
\param xhigh Upper limit on x-axis
|
||||||
|
\param value The bin corresponding to value in (nbinsx, xlow, xhigh) is incremented by 1
|
||||||
|
\return No return void
|
||||||
|
*/
|
||||||
|
auto result = oMap.find(name); // result is an iterator
|
||||||
|
if (result == oMap.end())
|
||||||
|
{
|
||||||
|
TH1F *temp1D = new TH1F(name.c_str(), name.c_str(), nbinsx, xlow, xhigh);
|
||||||
|
oMap.insert(std::make_pair(name, static_cast<TObject *>(temp1D)));
|
||||||
|
onedimcache.insert(std::make_pair(name, std::vector<double>()));
|
||||||
|
onedimcache[name].reserve(16384);
|
||||||
|
}
|
||||||
|
else if (foldersForObjects.find(oMap.at(name)) != foldersForObjects.end())
|
||||||
|
{ // shouldn't have a folder associated with it
|
||||||
|
std::cerr << "Object " << name << " already registered at " << foldersForObjects[oMap[name]] << ", choose a different name for the histogram to be stored in toplevel .." << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the string 'name' maps to a 1D hist. If there's any other object by this name raise issue
|
||||||
|
if (!oMap.at(name)->InheritsFrom("TH1F"))
|
||||||
|
{
|
||||||
|
std::cerr << "Object " << name << " refers to something other than a TH1*, not filling it hence!" << std::endl;
|
||||||
|
std::cerr << "Abort.." << std::endl;
|
||||||
|
FlushToDisk();
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
onedimcache[name].emplace_back(value);
|
||||||
|
// static_cast<TH1F*>(oMap.at(name))->Fill(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistPlotter::Fill1D(const std::string &name, int nbinsx, float xlow, float xhigh, float value, const std::string &foldername)
|
||||||
|
{
|
||||||
|
/*! \fn void Fill1D()
|
||||||
|
\brief
|
||||||
|
- Creates a TH1F in memory with name 'name' if it doesn't exist, and fills it with valuex, valuey
|
||||||
|
- Writes present state to disk and fails with return value -1 if the name clashes with another object that's not of type TH1*
|
||||||
|
- Remembers the foldername this particular histogram maps to, if provided. If not, defaults to toplevel.
|
||||||
|
|
||||||
|
\param name name of the TH1F histogram
|
||||||
|
\param nbinsx Number of bins in the histogram
|
||||||
|
\param xlow Lower limit on x-axis
|
||||||
|
\param xhigh Upper limit on x-axis
|
||||||
|
\param value The bin corresponding to value in (nbinsx, xlow, xhigh) is incremented by 1
|
||||||
|
\param foldername Name of the folder to put this histogram into. Defaults to toplevel if left empty
|
||||||
|
\return No return -- void
|
||||||
|
*/
|
||||||
|
|
||||||
|
auto result = oMap.find(name); // result is an iterator
|
||||||
|
if (result == oMap.end())
|
||||||
|
{
|
||||||
|
TH1F *temp1D = new TH1F(name.c_str(), name.c_str(), nbinsx, xlow, xhigh);
|
||||||
|
oMap.insert(std::make_pair(name, static_cast<TObject *>(temp1D)));
|
||||||
|
onedimcache.insert(std::make_pair(name, std::vector<double>()));
|
||||||
|
onedimcache[name].reserve(16384);
|
||||||
|
if (foldername != "")
|
||||||
|
{
|
||||||
|
if (folderList.find(foldername) == folderList.end())
|
||||||
|
{
|
||||||
|
folderList.insert(foldername);
|
||||||
|
}
|
||||||
|
foldersForObjects.insert(std::make_pair(static_cast<TObject *>(temp1D), foldername));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// object is present in map, but we enforce unique names
|
||||||
|
// it must already have a folder attached to it
|
||||||
|
if (foldersForObjects.find(oMap.at(name)) == foldersForObjects.end())
|
||||||
|
{
|
||||||
|
std::cerr << "Object " << name << " already registered at toplevel, choose a different name for the histogram to be stored in " << foldername << " folder .." << std::endl;
|
||||||
|
}
|
||||||
|
else if (foldersForObjects[oMap[name]] != foldername)
|
||||||
|
{
|
||||||
|
std::cerr << "Object " << name << " already registered at " << foldersForObjects[oMap[name]] << ", choose a different name for the histogram to be stored in " << foldername << " folder .." << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Check if the string 'name' maps to a 1D hist. If there's any other object by this name raise issue
|
||||||
|
if (!oMap.at(name)->InheritsFrom("TH1F"))
|
||||||
|
{
|
||||||
|
std::cerr << "Object " << name << " refers to something other than a TH1*, not filling it hence!" << std::endl;
|
||||||
|
std::cerr << "Abort.." << std::endl;
|
||||||
|
FlushToDisk();
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
onedimcache[name].emplace_back(value);
|
||||||
|
// static_cast<TH1F*>(oMap.at(name))->Fill(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistPlotter::Fill2D(const std::string &name, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh, float valuex, float valuey)
|
||||||
|
{
|
||||||
|
/*! \fn void Fill2D()
|
||||||
|
\brief
|
||||||
|
- Creates a TH2F in memory with name 'name' if it doesn't exist, and fills it with valuex, valuey
|
||||||
|
- Writes present state to disk and fails with return value -1 if the name clashes with another object that's not of type TH2*
|
||||||
|
\param name name of the TH1F histogram
|
||||||
|
\param nbinsx Number of xbins in the histogram
|
||||||
|
\param xlow Lower limit on x-axis
|
||||||
|
\param xhigh Upper limit on x-axis
|
||||||
|
\param nbinsy Number of ybins in the histogram
|
||||||
|
\param ylow Lower limit on y-axis
|
||||||
|
\param yhigh Upper limit on y-axis
|
||||||
|
\param valuex
|
||||||
|
\param valuey The bin corresponding to (valuex, valuey) in (nbinsx, xlow, xhigh, ybinsx, ylow, yhigh) is incremented by 1
|
||||||
|
\return No return -- void
|
||||||
|
*/
|
||||||
|
|
||||||
|
auto result = oMap.find(name); // result is an iterator
|
||||||
|
if (result == oMap.end())
|
||||||
|
{
|
||||||
|
TH2F *temp2D = new TH2F(name.c_str(), name.c_str(), nbinsx, xlow, xhigh, nbinsy, ylow, yhigh);
|
||||||
|
oMap.insert(std::make_pair(name, static_cast<TObject *>(temp2D)));
|
||||||
|
twodimcache.insert(std::make_pair(name, std::make_pair(std::vector<double>(), std::vector<double>())));
|
||||||
|
twodimcache[name].first.reserve(16384);
|
||||||
|
twodimcache[name].second.reserve(16384);
|
||||||
|
}
|
||||||
|
else if (foldersForObjects.find(oMap.at(name)) != foldersForObjects.end())
|
||||||
|
{ // shouldn't have a folder associated with it
|
||||||
|
std::cerr << "Object " << name << " already registered at " << foldersForObjects[oMap[name]] << ", choose a different name for the histogram to be stored in toplevel .." << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the string 'name' maps to a 1D hist. If there's any other object by this name raise issue
|
||||||
|
if (!oMap.at(name)->InheritsFrom("TH2F"))
|
||||||
|
{
|
||||||
|
std::cerr << "Object " << name << " refers to something other than a TH2*, not filling it hence!" << std::endl;
|
||||||
|
std::cerr << "Abort.." << std::endl;
|
||||||
|
FlushToDisk();
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
twodimcache[name].first.emplace_back(valuex);
|
||||||
|
twodimcache[name].second.emplace_back(valuey);
|
||||||
|
// static_cast<TH2F*>(oMap.at(name))->Fill(valuex,valuey);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistPlotter::Fill2D(const std::string &name, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh, float valuex, float valuey, const std::string &foldername)
|
||||||
|
{
|
||||||
|
/*! \fn void Fill2D()
|
||||||
|
\brief
|
||||||
|
- Creates a TH2F in memory with name 'name' if it doesn't exist, and fills it with valuex, valuey
|
||||||
|
- Writes present state to disk and fails with return value -1 if the name clashes with another object that's not of type TH2*
|
||||||
|
- Remembers the foldername this particular histogram maps to, if provided. If not defaults to toplevel
|
||||||
|
|
||||||
|
\param name name of the TH1F histogram
|
||||||
|
\param nbinsx Number of xbins in the histogram
|
||||||
|
\param xlow Lower limit on x-axis
|
||||||
|
\param xhigh Upper limit on x-axis
|
||||||
|
\param nbinsy Number of ybins in the histogram
|
||||||
|
\param ylow Lower limit on y-axis
|
||||||
|
\param yhigh Upper limit on y-axis
|
||||||
|
\param valuex
|
||||||
|
\param valuey The bin corresponding to (valuex, valuey) in (nbinsx, xlow, xhigh, ybinsx, ylow, yhigh) is incremented by 1
|
||||||
|
\param foldername Name of the folder to put this histogram into. Defaults to toplevel if left empty
|
||||||
|
\return No return -- void
|
||||||
|
*/
|
||||||
|
|
||||||
|
auto result = oMap.find(name); // result is an iterator
|
||||||
|
if (result == oMap.end())
|
||||||
|
{
|
||||||
|
TH2F *temp2D = new TH2F(name.c_str(), name.c_str(), nbinsx, xlow, xhigh, nbinsy, ylow, yhigh);
|
||||||
|
oMap.insert(std::make_pair(name, static_cast<TObject *>(temp2D)));
|
||||||
|
twodimcache.insert(std::make_pair(name, std::make_pair(std::vector<double>(), std::vector<double>())));
|
||||||
|
twodimcache[name].first.reserve(16384);
|
||||||
|
twodimcache[name].second.reserve(16384);
|
||||||
|
if (foldername != "")
|
||||||
|
{
|
||||||
|
if (folderList.find(foldername) == folderList.end())
|
||||||
|
{
|
||||||
|
folderList.insert(foldername);
|
||||||
|
}
|
||||||
|
foldersForObjects.insert(std::make_pair(static_cast<TObject *>(temp2D), foldername));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// object is present in map, but we enforce unique names
|
||||||
|
// it must already have a folder attached to it
|
||||||
|
if (foldersForObjects.find(oMap.at(name)) == foldersForObjects.end())
|
||||||
|
{
|
||||||
|
std::cerr << "Object " << name << " already registered at toplevel, choose a different name for the histogram to be stored in " << foldername << " folder .." << std::endl;
|
||||||
|
}
|
||||||
|
else if (foldersForObjects[oMap.at(name)] != foldername)
|
||||||
|
{
|
||||||
|
std::cerr << "Object " << name << " already registered at " << foldersForObjects[oMap[name]] << ", choose a different name for the histogram to be stored in " << foldername << " folder .." << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the string 'name' maps to a 1D hist. If there's any other object by this name raise issue
|
||||||
|
if (!oMap.at(name)->InheritsFrom("TH2F"))
|
||||||
|
{
|
||||||
|
std::cerr << "Object " << name << " refers to something other than a TH2*, not filling it hence!" << std::endl;
|
||||||
|
std::cerr << "Abort.." << std::endl;
|
||||||
|
FlushToDisk();
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
twodimcache[name].first.emplace_back(valuex);
|
||||||
|
twodimcache[name].second.emplace_back(valuey);
|
||||||
|
// static_cast<TH2F*>(oMap.at(name))->Fill(valuex,valuey);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistPlotter::ReadCuts(std::string filename)
|
||||||
|
{
|
||||||
|
/*! \fn void ReadCuts()
|
||||||
|
\brief Reads a list of cuts from a file. The file must have the format below, two columns
|
||||||
|
- Column#1 - path to a file that contains a single TCutG object named "CUTG", the default name in ROOT.
|
||||||
|
- Column#2 - The identifier name you plan to use in the code, like 'protonbarrelpid' or something, that will be searched by FindCut()
|
||||||
|
\param filename name of the plainxtext file containing the cut file locations and identifiers
|
||||||
|
\return No return -- void
|
||||||
|
*/
|
||||||
|
|
||||||
|
std::ifstream infile;
|
||||||
|
infile.open(filename);
|
||||||
|
std::string cutfilename, cutname;
|
||||||
|
for (std::string line; std::getline(infile, line);)
|
||||||
|
{
|
||||||
|
if (line.size() != 0 && line[0] == '#')
|
||||||
|
; // don't do anything with '#' lines
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::stringstream ss(line);
|
||||||
|
ss >> cutfilename >> cutname;
|
||||||
|
|
||||||
|
TFile f(cutfilename.c_str());
|
||||||
|
if (f.IsZombie())
|
||||||
|
{
|
||||||
|
std::cerr << "Cannot open cutfile " << cutfilename << " .. skipping.." << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
TCutG *cut = (TCutG *)(f.Get("CUTG"));
|
||||||
|
cutsMap.insert(std::make_pair(cutname, static_cast<TObject *>(cut)));
|
||||||
|
f.Close();
|
||||||
|
} // else
|
||||||
|
} // for loop
|
||||||
|
infile.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HistPlotter::PrintObjects()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
void PrintObjects()
|
||||||
|
Prints the contents of the unordered_maps oMap and cutsMap to facilitate debugging
|
||||||
|
|
||||||
|
*/
|
||||||
|
std::cout << "Type | Name " << std::endl;
|
||||||
|
std::cout << "---- | --------------------- " << std::endl;
|
||||||
|
for (auto it = oMap.begin(); it != oMap.end(); it++)
|
||||||
|
{
|
||||||
|
std::cout << it->second->ClassName() << " | " << it->first << std::endl;
|
||||||
|
}
|
||||||
|
for (auto it = cutsMap.begin(); it != cutsMap.end(); it++)
|
||||||
|
{
|
||||||
|
std::cout << it->second->ClassName() << " | " << it->first << std::endl;
|
||||||
|
}
|
||||||
|
std::cout << "---- | --------------------- " << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
52
Armory/Hit.h
Normal file
52
Armory/Hit.h
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
#ifndef Hit_H
|
||||||
|
#define Hit_H
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
class Hit{
|
||||||
|
public:
|
||||||
|
unsigned short sn;
|
||||||
|
uint8_t ch;
|
||||||
|
unsigned short energy;
|
||||||
|
unsigned short energy2;
|
||||||
|
unsigned long long timestamp;
|
||||||
|
unsigned short fineTime;
|
||||||
|
bool pileUp;
|
||||||
|
|
||||||
|
unsigned short traceLength;
|
||||||
|
std::vector<short> trace;
|
||||||
|
|
||||||
|
Hit(){
|
||||||
|
Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Clear(){
|
||||||
|
sn = 0;
|
||||||
|
ch = 0;
|
||||||
|
energy = 0;
|
||||||
|
energy2 = 0;
|
||||||
|
timestamp = 0;
|
||||||
|
fineTime = 0;
|
||||||
|
traceLength = 0;
|
||||||
|
pileUp = false;
|
||||||
|
trace.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Print(){
|
||||||
|
printf("(%5d, %2d) %6d %16llu, %6d, %d, %5ld\n", sn, ch, energy, timestamp, fineTime, pileUp, trace.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrintTrace(){
|
||||||
|
for( unsigned short i = 0; i < traceLength; i++){
|
||||||
|
printf("%3u | %6d \n", i, trace[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define operator< for sorting
|
||||||
|
bool operator<(const Hit& other) const {
|
||||||
|
return timestamp < other.timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
111
Armory/Kinematics.cpp
Normal file
111
Armory/Kinematics.cpp
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
#include "Kinematics.h"
|
||||||
|
//#include "elastcaller.h"
|
||||||
|
//double Kinematics::getQval(double m1, double m2, double m3, double t1, double t3, double angle3)
|
||||||
|
double Kinematics::getExc(double t3, double angle3)
|
||||||
|
/*
|
||||||
|
\brief Follows convention in Marion, 2013: (1 - beam, 2- target, 3-ejectile, 4-recoil)
|
||||||
|
|
||||||
|
m1 is beam, (typically heavy nucleus)
|
||||||
|
m2 is 'd', (light target)
|
||||||
|
m3 is 'p', (light ejectile mass)
|
||||||
|
t1 is beam kinetic energy,
|
||||||
|
\param t3 lab-kinetic-energy in MeV
|
||||||
|
\param angle3 lab-angle in deg of detected proton (if d,p) or other charged particle
|
||||||
|
\return Excitation energy of the heavy-recoil nucleus in MeV
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
double m1 = m_A;
|
||||||
|
double m2 = m_d;
|
||||||
|
double m3 = m_p;
|
||||||
|
double m4 = m_B;
|
||||||
|
double t1 = E_beam;
|
||||||
|
//t1 = slowitdown("75Ga",t1,"1(12C)2(2H)",1.2);
|
||||||
|
|
||||||
|
m1 *= u_MeV;
|
||||||
|
m2 *= u_MeV;
|
||||||
|
m3 *= u_MeV;
|
||||||
|
m4 *= u_MeV;
|
||||||
|
|
||||||
|
double e1 = m1 + t1;
|
||||||
|
double e3 = m3 + t3;
|
||||||
|
ET = t1 + m1 + m2;
|
||||||
|
double p1 = TMath::Sqrt(t1*t1 + 2*m1*t1);
|
||||||
|
double p3 = TMath::Sqrt(t3*t3 + 2*m3*t3);
|
||||||
|
double cosTheta = TMath::Cos(angle3*TMath::Pi()/180.);
|
||||||
|
// return m1+m2-m3-TMath::Sqrt(m1*m1 + m2*m2 + m3*m3 + 2.*m2*e1 - 2.*e3*(e1+m2)+ 2.*p1*p3*cosTheta);
|
||||||
|
double Q = m1+m2-m3-TMath::Sqrt(m1*m1 + m2*m2 + m3*m3 + 2.*m2*e1 - 2.*e3*(e1+m2)+ 2.*p1*p3*cosTheta);
|
||||||
|
|
||||||
|
Qx = Q;
|
||||||
|
T4 = ET - e3 - (m1+m2-m3-Q);
|
||||||
|
//T4 = slowitdown("75Ga",T4,"1(12C)2(2H)",1.2);
|
||||||
|
P4 = TMath::Sqrt(T4*T4 + 2*m4*T4);
|
||||||
|
|
||||||
|
//this angle will not be affected by eloss
|
||||||
|
theta4 = (180./M_PI)*TMath::ASin((p3/P4)*TMath::Sin(angle3*M_PI/180.));
|
||||||
|
|
||||||
|
// T4-=16.5; //eloss in about 1.4 mg CD2
|
||||||
|
T4-=15.5; //eloss in 1.35 mg CD2 //TODO: actually degrade recoil/ejectiles in target
|
||||||
|
// T4-=14.1; //eloss in about 1.2 mg CD2
|
||||||
|
// T4-=31.7; //eloss in 2.7 mg CD2
|
||||||
|
|
||||||
|
//recalculate everything other than angle with lowered Kinetic energy
|
||||||
|
P4 = TMath::Sqrt(T4*T4 + 2*m4*T4);
|
||||||
|
gamma4 = T4/m4+1.;
|
||||||
|
beta4 = TMath::Sqrt(1. - 1./(gamma4*gamma4));
|
||||||
|
//beta4 = TMath::Sqrt((P4*P4)/(P4*P4 + m4*m4));
|
||||||
|
theta4 = (180./M_PI)*TMath::ASin((p3/P4)*TMath::Sin(angle3*M_PI/180.));
|
||||||
|
|
||||||
|
return Q0 - Q;//Q0 = Q + Exc
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
double Kinematics::getBeta4(double t3, double angle3)
|
||||||
|
/*
|
||||||
|
\brief Follows convention in Marion, 2013: (1 - beam, 2- target, 3-ejectile, 4-recoil)
|
||||||
|
|
||||||
|
m1 is beam, (typically heavy nucleus)
|
||||||
|
m2 is 'd', (light target)
|
||||||
|
m3 is 'p', (light ejectile mass)
|
||||||
|
t1 is beam kinetic energy,
|
||||||
|
\param t3 lab-kinetic-energy in MeV
|
||||||
|
\param angle3 lab-angle in deg of detected proton (if d,p) or other charged particle
|
||||||
|
\return doppler-shift beta (=v/c) of the heavy-recoil nucleus, calls getExc() to fill the value
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
getExc(t3, angle3);
|
||||||
|
return beta4;
|
||||||
|
}
|
||||||
|
|
||||||
|
double Kinematics::getBrho(double t3, double angle3, double charge_state) {
|
||||||
|
/*
|
||||||
|
\brief Follows convention in Marion, 2013: (1 - beam, 2- target, 3-ejectile, 4-recoil)
|
||||||
|
|
||||||
|
m1 is beam, (typically heavy nucleus)
|
||||||
|
m2 is 'd', (light target)
|
||||||
|
m3 is 'p', (light ejectile mass)
|
||||||
|
t1 is beam kinetic energy,
|
||||||
|
\param t3 lab-kinetic-energy in MeV
|
||||||
|
\param angle3 lab-angle in deg of detected proton (if d,p) or other charged particle
|
||||||
|
\param charge_state charge state of the intended nucleus, in units of elementary charge (= +1 for H+, +2 for He2+ etc).
|
||||||
|
\return b-rho value, generated from P4*3.3359e-3/charge_state where P4 is 4momentum of heavy-recoil calculated from orruba kinematics
|
||||||
|
*/
|
||||||
|
getExc(t3,angle3);
|
||||||
|
return P4*3.3359e-3/charge_state;
|
||||||
|
}
|
||||||
|
|
||||||
|
double Kinematics::getTheta4(double t3, double angle3) {
|
||||||
|
/*
|
||||||
|
\brief Follows convention in Marion, 2013: (1 - beam, 2- target, 3-ejectile, 4-recoil)
|
||||||
|
|
||||||
|
m1 is beam, (typically heavy nucleus)
|
||||||
|
m2 is 'd', (light target)
|
||||||
|
m3 is 'p', (light ejectile mass)
|
||||||
|
t1 is beam kinetic energy,
|
||||||
|
\param t3 lab-kinetic-energy in MeV
|
||||||
|
\param angle3 lab-angle in deg of detected proton (if d,p) or other charged particle
|
||||||
|
\param charge_state charge state of the intended nucleus, in units of elementary charge (= +1 for H+, +2 for He2+ etc).
|
||||||
|
\return lab theta value of heavy recoil in degrees
|
||||||
|
*/
|
||||||
|
getExc(t3,angle3);
|
||||||
|
return theta4;
|
||||||
|
}
|
||||||
207
Armory/Kinematics.h
Normal file
207
Armory/Kinematics.h
Normal file
|
|
@ -0,0 +1,207 @@
|
||||||
|
#ifndef KINEMATICS_H
|
||||||
|
#define KINEMATICS_H
|
||||||
|
#include <TMath.h>
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <string>
|
||||||
|
#include <TVector3.h>
|
||||||
|
const double u_MeV = 931.49410372; //u in MeV
|
||||||
|
|
||||||
|
class Kinematics {
|
||||||
|
public:
|
||||||
|
/*
|
||||||
|
A(d,p)B is used as template, with A being beam, and p being ejectile.
|
||||||
|
Always, make m3 the thing you detect, and m1 the beam
|
||||||
|
*/
|
||||||
|
double m_A, m_d, m_p, m_B;
|
||||||
|
double E_beam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @{ \name List of funny impossible default values
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* \brief Default values used for all the physics values
|
||||||
|
*/
|
||||||
|
double Q0=-9999, Qx=-9999;
|
||||||
|
double P4=-9999, E4=-9999, T4=-9999; //heavy recoil momentum, totE, KE
|
||||||
|
double P3=-9999, E3=-9999, T3=-9999; //light recoil
|
||||||
|
double ET=-9999;
|
||||||
|
double gamma4=-9999, beta4=-9999, theta4=-9999; //theta=heavy-recoil lab angle
|
||||||
|
double brho=-9999;
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
Kinematics(double m1, double m2, double m3, double m4, double ebeam) {
|
||||||
|
/*
|
||||||
|
A(d,p)B is used as template, with A being beam, and p being ejectile.
|
||||||
|
Always, make m3 the thing you detect, m2 the target, and m1 the beam
|
||||||
|
|
||||||
|
ebeam is in MeV/u, all others are in amu
|
||||||
|
*/
|
||||||
|
m_A = m1;
|
||||||
|
m_d = m2;
|
||||||
|
m_p = m3, m_B = m4, E_beam = ebeam*m_A;
|
||||||
|
Q0 = (- m_B - m_p + m_d + m_A)*u_MeV;
|
||||||
|
}
|
||||||
|
Kinematics() {}
|
||||||
|
|
||||||
|
void setValues(double m1, double m2, double m3, double m4, double ebeam) {
|
||||||
|
/*
|
||||||
|
Can be used to 'live update' say the beam energy in the case of active target detectors.
|
||||||
|
*/
|
||||||
|
|
||||||
|
m_A = m1;
|
||||||
|
m_d = m2;
|
||||||
|
m_p = m3, m_B = m4, E_beam = ebeam*m_A;
|
||||||
|
Q0 = (- m_B - m_p + m_d + m_A)*u_MeV;
|
||||||
|
//std::cout << "Q0 MeV: " << Q0 << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setEBeam(double Ebeam) {E_beam = Ebeam;}
|
||||||
|
|
||||||
|
double getBeta4(double t3, double angle3);
|
||||||
|
double getTheta4(double t3, double angle3);
|
||||||
|
double getBrho(double t3, double angle3, double charge_state);
|
||||||
|
double getExc(double t3, double angle3); //t3 is proton energy detected in ORRUBA, angle3 is proton angle in degrees
|
||||||
|
|
||||||
|
double getBeta4_fromvec(double t3, const TVector3 &pos, const TVector3 &origin) {
|
||||||
|
TVector3 local = pos - origin; //position w.r.t origin
|
||||||
|
float angle = local.Theta()*180./M_PI;
|
||||||
|
return getBeta4(t3, angle);
|
||||||
|
}
|
||||||
|
|
||||||
|
double getExc_fromvec(double t3, const TVector3 &pos, const TVector3 &origin) {
|
||||||
|
TVector3 local = pos - origin; //position w.r.t origin
|
||||||
|
float angle = local.Theta()*180./M_PI;
|
||||||
|
return getExc(t3, angle);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setValuesFromFile(const std::string& filename) {
|
||||||
|
(void) filename;
|
||||||
|
/*std::ifstream in;
|
||||||
|
in.open(filename);
|
||||||
|
if(!in) {
|
||||||
|
std::cerr<< "File not open at " << filename << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for(std::string line; std::getline(in, line); ) {
|
||||||
|
if(line.size()!=0 && line[0]=='#')
|
||||||
|
; //don't do anything with '#' lines
|
||||||
|
else {
|
||||||
|
std::stringstream ss(line);
|
||||||
|
ss>>m_A>>m_d>>m_p>>m_B>>E_beam;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
in.close();*/
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//double Kinematics::getQval(double m1, double m2, double m3, double t1, double t3, double angle3)
|
||||||
|
double Kinematics::getExc(double t3, double angle3)
|
||||||
|
/*
|
||||||
|
\brief Follows convention in Marion, 2013: (1 - beam, 2- target, 3-ejectile, 4-recoil)
|
||||||
|
|
||||||
|
m1 is beam, (typically heavy nucleus)
|
||||||
|
m2 is 'd', (light target)
|
||||||
|
m3 is 'p', (light ejectile mass)
|
||||||
|
t1 is beam kinetic energy,
|
||||||
|
|
||||||
|
All calculations are done here, and other wrapper functions written make derived quantities from stuff calculated here.
|
||||||
|
|
||||||
|
\param t3 lab-kinetic-energy in MeV
|
||||||
|
\param angle3 lab-angle in deg of detected proton (if d,p) or other charged particle
|
||||||
|
\return Excitation energy of the heavy-recoil nucleus in MeV
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
double m1 = m_A;
|
||||||
|
double m2 = m_d;
|
||||||
|
double m3 = m_p;
|
||||||
|
double m4 = m_B;
|
||||||
|
double t1 = E_beam;
|
||||||
|
|
||||||
|
m1 *= u_MeV;
|
||||||
|
m2 *= u_MeV;
|
||||||
|
m3 *= u_MeV;
|
||||||
|
m4 *= u_MeV;
|
||||||
|
|
||||||
|
double e1 = m1 + t1;
|
||||||
|
double e3 = m3 + t3;
|
||||||
|
ET = t1 + m1 + m2;
|
||||||
|
double p1 = TMath::Sqrt(t1*t1 + 2*m1*t1);
|
||||||
|
double p3 = TMath::Sqrt(t3*t3 + 2*m3*t3);
|
||||||
|
double cosTheta = TMath::Cos(angle3*TMath::Pi()/180.);
|
||||||
|
// return m1+m2-m3-TMath::Sqrt(m1*m1 + m2*m2 + m3*m3 + 2.*m2*e1 - 2.*e3*(e1+m2)+ 2.*p1*p3*cosTheta);
|
||||||
|
double Q = m1+m2-m3-TMath::Sqrt(m1*m1 + m2*m2 + m3*m3 + 2.*m2*e1 - 2.*e3*(e1+m2)+ 2.*p1*p3*cosTheta);
|
||||||
|
|
||||||
|
Qx = Q;
|
||||||
|
//Recoil properties just in case it's useful
|
||||||
|
T4 = ET - e3 - (m1+m2-m3-Q);
|
||||||
|
P4 = TMath::Sqrt(T4*T4 + 2*m4*T4);
|
||||||
|
|
||||||
|
//this angle will not be affected by eloss
|
||||||
|
theta4 = (180./M_PI)*TMath::ASin((p3/P4)*TMath::Sin(angle3*M_PI/180.));
|
||||||
|
|
||||||
|
//recalculate everything other than angle with lowered Kinetic energy
|
||||||
|
P4 = TMath::Sqrt(T4*T4 + 2*m4*T4);
|
||||||
|
gamma4 = T4/m4+1.;
|
||||||
|
beta4 = TMath::Sqrt(1. - 1./(gamma4*gamma4));
|
||||||
|
theta4 = (180./M_PI)*TMath::ASin((p3/P4)*TMath::Sin(angle3*M_PI/180.));
|
||||||
|
|
||||||
|
return Q0 - Q;//Q0 = Q + Exc
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
double Kinematics::getBeta4(double t3, double angle3)
|
||||||
|
/*
|
||||||
|
\brief Follows convention in Marion, 2013: (1 - beam, 2- target, 3-ejectile, 4-recoil)
|
||||||
|
|
||||||
|
m1 is beam, (typically heavy nucleus)
|
||||||
|
m2 is 'd', (light target)
|
||||||
|
m3 is 'p', (light ejectile mass)
|
||||||
|
t1 is beam kinetic energy,
|
||||||
|
\param t3 lab-kinetic-energy in MeV
|
||||||
|
\param angle3 lab-angle in deg of detected proton (if d,p) or other charged particle
|
||||||
|
\return doppler-shift beta (=v/c) of the heavy-recoil nucleus, calls getExc() to fill the value
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
getExc(t3, angle3);
|
||||||
|
return beta4;
|
||||||
|
}
|
||||||
|
|
||||||
|
double Kinematics::getBrho(double t3, double angle3, double charge_state) {
|
||||||
|
/*
|
||||||
|
\brief Follows convention in Marion, 2013: (1 - beam, 2- target, 3-ejectile, 4-recoil)
|
||||||
|
|
||||||
|
m1 is beam, (typically heavy nucleus)
|
||||||
|
m2 is 'd', (light target)
|
||||||
|
m3 is 'p', (light ejectile mass)
|
||||||
|
t1 is beam kinetic energy,
|
||||||
|
\param t3 lab-kinetic-energy in MeV
|
||||||
|
\param angle3 lab-angle in deg of detected proton (if d,p) or other charged particle
|
||||||
|
\param charge_state charge state of the intended nucleus, in units of elementary charge (= +1 for H+, +2 for He2+ etc).
|
||||||
|
\return b-rho value, generated from P4*3.3359e-3/charge_state where P4 is 4momentum of heavy-recoil calculated from orruba kinematics
|
||||||
|
*/
|
||||||
|
getExc(t3,angle3);
|
||||||
|
return P4*3.3359e-3/charge_state;
|
||||||
|
}
|
||||||
|
|
||||||
|
double Kinematics::getTheta4(double t3, double angle3) {
|
||||||
|
/*
|
||||||
|
\brief Follows convention in Marion, 2013: (1 - beam, 2- target, 3-ejectile, 4-recoil)
|
||||||
|
|
||||||
|
m1 is beam, (typically heavy nucleus)
|
||||||
|
m2 is 'd', (light target)
|
||||||
|
m3 is 'p', (light ejectile mass)
|
||||||
|
t1 is beam kinetic energy,
|
||||||
|
\param t3 lab-kinetic-energy in MeV
|
||||||
|
\param angle3 lab-angle in deg of detected proton (if d,p) or other charged particle
|
||||||
|
\param charge_state charge state of the intended nucleus, in units of elementary charge (= +1 for H+, +2 for He2+ etc).
|
||||||
|
\return lab theta value of heavy recoil in degrees
|
||||||
|
*/
|
||||||
|
getExc(t3,angle3);
|
||||||
|
return theta4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
674
Armory/LICENSE
Normal file
674
Armory/LICENSE
Normal file
|
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||||
|
|
@ -10,7 +10,7 @@ COPTS = -fPIC -DLINUX -g -O0 -Wall -std=c++17 -lpthread
|
||||||
|
|
||||||
ROOTLIBS = `root-config --cflags --glibs`
|
ROOTLIBS = `root-config --cflags --glibs`
|
||||||
|
|
||||||
ALL = Mapper AnasenMS
|
ALL = Mapper EventBuilder#AnasenMS
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
|
|
@ -23,6 +23,10 @@ Mapper : Mapper.cpp ../mapping.h ClassDet.h
|
||||||
@echo "--------- making Mapper"
|
@echo "--------- making Mapper"
|
||||||
$(CC) $(COPTS) -o Mapper Mapper.cpp $(ROOTLIBS)
|
$(CC) $(COPTS) -o Mapper Mapper.cpp $(ROOTLIBS)
|
||||||
|
|
||||||
AnasenMS : constant.h Isotope.h ClassTransfer.h ClassSX3.h ClassPW.h ClassAnasen.h anasenMS.cpp
|
# AnasenMS : constant.h Isotope.h ClassTransfer.h ClassSX3.h ClassPW.h ClassAnasen.h anasenMS.cpp
|
||||||
@echo "--------- making ANASEN Monte Carlo"
|
# @echo "--------- making ANASEN Monte Carlo"
|
||||||
$(CC) $(COPTS) -o AnasenMS anasenMS.cpp $(ROOTLIBS)
|
# $(CC) $(COPTS) -o AnasenMS anasenMS.cpp $(ROOTLIBS)
|
||||||
|
|
||||||
|
EventBuilder : EventBuilder.cpp ClassData.h fsuReader.h Hit.h
|
||||||
|
@echo "--------- making EventBuilder"
|
||||||
|
$(CC) $(COPTS) -o EventBuilder EventBuilder.cpp $(ROOTLIBS)
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,14 @@
|
||||||
#include "ClassDet.h"
|
#include "ClassDet.h"
|
||||||
|
|
||||||
//===============================
|
//===============================
|
||||||
int main(int argc, char **argv){
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
|
||||||
printf("=========================================\n");
|
printf("=========================================\n");
|
||||||
printf("=== Mapper ===\n");
|
printf("=== Mapper ===\n");
|
||||||
printf("=========================================\n");
|
printf("=========================================\n");
|
||||||
if (argc != 2) {
|
if (argc != 2)
|
||||||
|
{
|
||||||
printf("Incorrect number of arguments:\n");
|
printf("Incorrect number of arguments:\n");
|
||||||
printf("%s [inFile]\n", argv[0]);
|
printf("%s [inFile]\n", argv[0]);
|
||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
|
|
@ -28,8 +30,8 @@ int main(int argc, char **argv){
|
||||||
|
|
||||||
PrintMapping();
|
PrintMapping();
|
||||||
|
|
||||||
TFile * inFile = new TFile(inFileName.c_str(), "READ");
|
TFile *inFile = new TFile(inFileName.c_str(), "READ");
|
||||||
TTree * tree = (TTree*) inFile->Get("tree");
|
TTree *tree = (TTree *)inFile->Get("tree");
|
||||||
unsigned long long totnumEntry = tree->GetEntries();
|
unsigned long long totnumEntry = tree->GetEntries();
|
||||||
|
|
||||||
ULong64_t evID;
|
ULong64_t evID;
|
||||||
|
|
@ -54,10 +56,10 @@ int main(int argc, char **argv){
|
||||||
TString outFileName = inFileName;
|
TString outFileName = inFileName;
|
||||||
TString runStr = outFileName;
|
TString runStr = outFileName;
|
||||||
int pos = outFileName.Last('/');
|
int pos = outFileName.Last('/');
|
||||||
pos = outFileName.Index("_", pos+1); // find next "_"
|
pos = outFileName.Index("_", pos + 1); // find next "_"
|
||||||
runStr.Remove(0, pos+1);
|
runStr.Remove(0, pos + 1);
|
||||||
runStr.Remove(3);
|
runStr.Remove(3);
|
||||||
pos = outFileName.Index("_", pos+1); // find next "_"
|
pos = outFileName.Index("_", pos + 1); // find next "_"
|
||||||
outFileName.Remove(pos); // remove the rest
|
outFileName.Remove(pos); // remove the rest
|
||||||
outFileName += "_mapped.root";
|
outFileName += "_mapped.root";
|
||||||
|
|
||||||
|
|
@ -66,19 +68,19 @@ int main(int argc, char **argv){
|
||||||
|
|
||||||
Det sx3;
|
Det sx3;
|
||||||
Det qqq;
|
Det qqq;
|
||||||
Det pc ;
|
Det pc;
|
||||||
|
Det misc;
|
||||||
|
|
||||||
printf(" Raw root file : %s\n", inFileName.c_str());
|
printf(" Raw root file : %s\n", inFileName.c_str());
|
||||||
printf(" Run : %03d\n", run);
|
printf(" Run : %03d\n", run);
|
||||||
printf(" total Entry : %lld \n", totnumEntry);
|
printf(" total Entry : %lld \n", totnumEntry);
|
||||||
printf(" Out file name : %s \n", outFileName.Data());
|
printf(" Out file name : %s \n", outFileName.Data());
|
||||||
|
|
||||||
TFile * saveFile = new TFile( outFileName,"RECREATE");
|
TFile *saveFile = new TFile(outFileName, "RECREATE");
|
||||||
TTree * newTree = new TTree("tree","tree");
|
TTree *newTree = new TTree("tree", "tree");
|
||||||
|
|
||||||
|
newTree->Branch("evID", &eventID, "eventID/l");
|
||||||
newTree->Branch("evID", &eventID,"eventID/l");
|
newTree->Branch("run", &run, "run/i");
|
||||||
newTree->Branch("run", &run,"run/i");
|
|
||||||
|
|
||||||
newTree->Branch("sx3Multi", &sx3.multi, "sx3Multi/s");
|
newTree->Branch("sx3Multi", &sx3.multi, "sx3Multi/s");
|
||||||
newTree->Branch("sx3ID", &sx3.id, "sx3ID[sx3Multi]/s");
|
newTree->Branch("sx3ID", &sx3.id, "sx3ID[sx3Multi]/s");
|
||||||
|
|
@ -99,84 +101,117 @@ int main(int argc, char **argv){
|
||||||
newTree->Branch("pcE", &pc.e, "pcEnergy[pcMulti]/s");
|
newTree->Branch("pcE", &pc.e, "pcEnergy[pcMulti]/s");
|
||||||
newTree->Branch("pcT", &pc.t, "pcTime[pcMulti]/l");
|
newTree->Branch("pcT", &pc.t, "pcTime[pcMulti]/l");
|
||||||
|
|
||||||
|
newTree->Branch("miscMulti", &misc.multi, "miscMulti/s");
|
||||||
|
newTree->Branch("miscID", &misc.id, "miscID[miscMulti]/s");
|
||||||
|
newTree->Branch("miscCh", &misc.ch, "miscCh[miscMulti]/s");
|
||||||
|
newTree->Branch("miscE", &misc.e, "miscEnergy[miscMulti]/s");
|
||||||
|
newTree->Branch("miscT", &misc.t, "miscTime[miscMulti]/l");
|
||||||
|
newTree->Branch("miscF", &misc.tf, "miscFineTime[miscMulti]/l");
|
||||||
|
|
||||||
///================== looping old tree and apply mapping
|
///================== looping old tree and apply mapping
|
||||||
|
|
||||||
//clock
|
// clock
|
||||||
// TBenchmark clock;
|
// TBenchmark clock;
|
||||||
// Bool_t shown;
|
// Bool_t shown;
|
||||||
|
|
||||||
for( unsigned long long ev = 0; ev < totnumEntry; ev++){
|
for (unsigned long long ev = 0; ev < totnumEntry; ev++)
|
||||||
|
{
|
||||||
tree->GetEntry(ev);
|
tree->GetEntry(ev);
|
||||||
|
|
||||||
eventID = evID;
|
eventID = evID;
|
||||||
sx3.multi = 0;
|
sx3.multi = 0;
|
||||||
qqq.multi = 0;
|
qqq.multi = 0;
|
||||||
pc.multi = 0;
|
pc.multi = 0;
|
||||||
|
misc.multi = 0;
|
||||||
|
|
||||||
|
sx3.Clear();
|
||||||
|
sx3.Clear();
|
||||||
qqq.Clear();
|
qqq.Clear();
|
||||||
|
pc.Clear();
|
||||||
|
misc.Clear();
|
||||||
|
pc.Clear();
|
||||||
|
misc.Clear();
|
||||||
|
|
||||||
for( unsigned int i = 0; i < multi; i++){
|
for (unsigned int i = 0; i < multi; i++)
|
||||||
|
{
|
||||||
|
|
||||||
// printf("%10u/%10u| %5d, %2u, %6u, %14llu\n", i, multi, sn[i], ch[i], e[i], e_t[i] );
|
// printf("%10u/%10u| %5d, %2u, %6u, %14llu\n", i, multi, sn[i], ch[i], e[i], e_t[i] );
|
||||||
|
|
||||||
//globalCh = digi-ID * nCh(digi-iD) + ch
|
// globalCh = digi-ID * nCh(digi-iD) + ch
|
||||||
int globalCh = -1;
|
int globalCh = -1;
|
||||||
|
|
||||||
for( int j = 0; j < nBd; j++){
|
for (int j = 0; j < nBd; j++)
|
||||||
if( board.at(j) == sn[i]){
|
{
|
||||||
globalCh = (sn[i] > 1000 ? j * 64 : 7*64 + (j-7) * 16) + ch[i]; //& = number V1740
|
if (board.at(j) == sn[i])
|
||||||
|
{
|
||||||
|
globalCh = (sn[i] > 1000 ? j * 64 : 7 * 64 + (j - 7) * 16) + ch[i]; //& = number V1740
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( globalCh == -1) printf("ev %llu\n", ev);
|
if (globalCh == -1)
|
||||||
|
printf("ev %llu\n", ev);
|
||||||
|
|
||||||
unsigned short ID = mapping[globalCh];
|
unsigned short ID = mapping[globalCh];
|
||||||
|
|
||||||
//=================================== sx3
|
//=================================== sx3
|
||||||
if( ID < 10000 ) {
|
if (ID < 10000)
|
||||||
|
{
|
||||||
sx3.id[sx3.multi] = ID / 100;
|
sx3.id[sx3.multi] = ID / 100;
|
||||||
sx3.ch[sx3.multi] = ID % 100;
|
sx3.ch[sx3.multi] = ID % 100;
|
||||||
sx3.e[sx3.multi] = e[i];
|
sx3.e[sx3.multi] = e[i];
|
||||||
sx3.t[sx3.multi] = e_t[i];
|
sx3.t[sx3.multi] = e_t[i];
|
||||||
sx3.multi ++;
|
sx3.multi++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================== qqq
|
//=================================== qqq
|
||||||
if( 10000 <= ID && ID < 20000 ) {
|
if (10000 <= ID && ID < 20000)
|
||||||
|
{
|
||||||
qqq.id[qqq.multi] = (ID - 10000) / 100;
|
qqq.id[qqq.multi] = (ID - 10000) / 100;
|
||||||
qqq.ch[qqq.multi] = (ID - 10000) % 100;
|
qqq.ch[qqq.multi] = (ID - 10000) % 100;
|
||||||
qqq.e[qqq.multi] = e[i];
|
qqq.e[qqq.multi] = e[i];
|
||||||
qqq.t[qqq.multi] = e_t[i];
|
qqq.t[qqq.multi] = e_t[i];
|
||||||
qqq.sn[qqq.multi] = sn[i];
|
qqq.sn[qqq.multi] = sn[i];
|
||||||
qqq.multi ++;
|
qqq.multi++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================== pc
|
//=================================== pc
|
||||||
if( 20000 <= ID && ID < 30000 ) {
|
if (20000 <= ID && ID < 30000)
|
||||||
|
{
|
||||||
pc.id[pc.multi] = (ID - 20000) / 100;
|
pc.id[pc.multi] = (ID - 20000) / 100;
|
||||||
pc.ch[pc.multi] = (ID - 20000) % 100;
|
pc.ch[pc.multi] = (ID - 20000) % 100;
|
||||||
pc.e[pc.multi] = e[i];
|
pc.e[pc.multi] = e[i];
|
||||||
pc.t[pc.multi] = e_t[i];
|
pc.t[pc.multi] = e_t[i];
|
||||||
pc.multi ++;
|
pc.multi++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=================================== misc
|
||||||
|
if (30000 <= ID && ID < 40000)
|
||||||
|
{
|
||||||
|
misc.id[misc.multi] = (ID - 30000) / 100;
|
||||||
|
misc.ch[misc.multi] = (ID - 30000) % 100;
|
||||||
|
misc.e[misc.multi] = e[i];
|
||||||
|
misc.t[misc.multi] = e_t[i];
|
||||||
|
misc.tf[misc.multi] = e_f[i];
|
||||||
|
// if( ID == 30002 || ID == 30004 ) printf("sn : %d ch: %2d | gID %3d | ID %6d | e_f : %d\n", sn[i], ch[i], globalCh, ID, e_f[i]);
|
||||||
|
misc.multi++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
saveFile->cd(); //set focus on this file
|
saveFile->cd(); // set focus on this file
|
||||||
newTree->Fill();
|
newTree->Fill();
|
||||||
|
|
||||||
if( eventID % 100 == 0 ) printf("%6lu/%6llu [%2d%%]\n\033[A\r", eventID, totnumEntry, TMath::Nint((eventID+1)*100./totnumEntry));
|
if (eventID % 100 == 0)
|
||||||
|
printf("%6lu/%6llu [%2d%%]\n\033[A\r", eventID, totnumEntry, TMath::Nint((eventID + 1) * 100. / totnumEntry));
|
||||||
}
|
}
|
||||||
|
|
||||||
inFile->Close();
|
inFile->Close();
|
||||||
|
|
||||||
saveFile->cd(); //set focus on this file
|
saveFile->cd(); // set focus on this file
|
||||||
newTree->Write();
|
newTree->Write();
|
||||||
UInt_t eventNumber = newTree->GetEntries();
|
UInt_t eventNumber = newTree->GetEntries();
|
||||||
saveFile->Close();
|
saveFile->Close();
|
||||||
printf("-------------- done, %u\n", eventNumber);
|
printf("-------------- done, %u\n", eventNumber);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
82
Armory/PC_StepLadder_Correction.h
Normal file
82
Armory/PC_StepLadder_Correction.h
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
#include <TF1.h>
|
||||||
|
|
||||||
|
double model_invert(double *y, double *p)
|
||||||
|
{
|
||||||
|
double result = y[0];
|
||||||
|
double slope = 0.52;
|
||||||
|
double z_grid[8] = {147.998, 101.946, 59.7634, 19.6965, -19.6965, -59.7634, -101.946, -147.998};
|
||||||
|
for (int i = 0; i < 7; i++)
|
||||||
|
{
|
||||||
|
if (y[0] <= z_grid[i] && y[0] > z_grid[i + 1])
|
||||||
|
{
|
||||||
|
double zavg = (z_grid[i] + z_grid[i + 1]) * 0.5; // midpoint about which we pivot
|
||||||
|
result = (y[0] - zavg) / slope + zavg;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
// ---- Parabola variant (now takes optional slope; out-of-band -> Si, no clamp-snap) ----
|
||||||
|
inline double model_invert_a1c1(double cfrac, double z_si, double z_pivot,
|
||||||
|
double C, const double* c0_table, bool& ok,
|
||||||
|
double slope = 1.0)
|
||||||
|
{
|
||||||
|
ok = false;
|
||||||
|
static const double z_grid[8] =
|
||||||
|
{147.998, 101.946, 59.7634, 19.6965, -19.6965, -59.7634, -101.946, -147.998};
|
||||||
|
const double cfrac_hi = 0.90, cfrac_lo = 0.12;
|
||||||
|
if (cfrac > cfrac_hi || cfrac < cfrac_lo) return z_si;
|
||||||
|
|
||||||
|
const double sgn = (z_si >= z_pivot) ? +1.0 : -1.0;
|
||||||
|
int gnb = -1; double z_nb = (sgn > 0) ? +1.0e30 : -1.0e30;
|
||||||
|
for (int i = 0; i < 8; ++i) {
|
||||||
|
if (sgn > 0 && z_grid[i] > z_pivot + 1e-6 && z_grid[i] < z_nb) { z_nb = z_grid[i]; gnb = i; }
|
||||||
|
if (sgn < 0 && z_grid[i] < z_pivot - 1e-6 && z_grid[i] > z_nb) { z_nb = z_grid[i]; gnb = i; }
|
||||||
|
}
|
||||||
|
if (gnb < 0) return z_si;
|
||||||
|
const double W = TMath::Abs(z_nb - z_pivot);
|
||||||
|
if (W <= 0.0) return z_si;
|
||||||
|
int cell = (sgn > 0) ? gnb : gnb - 1;
|
||||||
|
if (cell < 0) cell = 0; if (cell > 6) cell = 6;
|
||||||
|
|
||||||
|
double s2 = (c0_table[cell] - cfrac) / C;
|
||||||
|
if (s2 < 0.0 || s2 > 1.0) return z_si; // out-of-band -> Si (no boundary snap)
|
||||||
|
double s = TMath::Sqrt(s2);
|
||||||
|
double z_rec = z_pivot + sgn * s * W;
|
||||||
|
if (slope > 0.0 && slope != 1.0) {
|
||||||
|
const double zc = 0.5 * (z_grid[cell] + z_grid[cell + 1]);
|
||||||
|
z_rec = (z_rec - zc) / slope + zc;
|
||||||
|
}
|
||||||
|
if (TMath::Abs(z_rec - z_si) > W) return z_si;
|
||||||
|
ok = true;
|
||||||
|
return z_rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---- Linear centre-fold variant ----
|
||||||
|
inline double model_invert_a1c1_linear(double cfrac, double z_si, double z_pivot,
|
||||||
|
double k, const double* cfmin_table, bool& ok)
|
||||||
|
{
|
||||||
|
ok = false;
|
||||||
|
static const double z_grid[8] =
|
||||||
|
{147.998, 101.946, 59.7634, 19.6965, -19.6965, -59.7634, -101.946, -147.998};
|
||||||
|
const double cfrac_hi = 0.90, cfrac_lo = 0.12;
|
||||||
|
if (cfrac > cfrac_hi || cfrac < cfrac_lo) return z_si;
|
||||||
|
|
||||||
|
int cell = -1;
|
||||||
|
for (int i = 0; i < 7; ++i)
|
||||||
|
if (z_si <= z_grid[i] && z_si > z_grid[i + 1]) { cell = i; break; }
|
||||||
|
if (cell < 0) return z_si;
|
||||||
|
const double zc = 0.5 * (z_grid[cell] + z_grid[cell + 1]);
|
||||||
|
const double half = 0.5 * (z_grid[cell] - z_grid[cell + 1]);
|
||||||
|
if (half <= 0.0 || k <= 0.0) return z_si;
|
||||||
|
|
||||||
|
double f = (cfrac - cfmin_table[cell]) / k;
|
||||||
|
if (f < 0.0) f = 0.0;
|
||||||
|
if (f > 1.0) return z_si;
|
||||||
|
const double d = f * half;
|
||||||
|
const double sgn = (z_pivot >= zc) ? +1.0 : -1.0;
|
||||||
|
const double z_rec = zc + sgn * d;
|
||||||
|
if (TMath::Abs(z_rec - z_si) > half) return z_si;
|
||||||
|
ok = true;
|
||||||
|
return z_rec;
|
||||||
|
}
|
||||||
190
Armory/SX3Geom.h
Executable file
190
Armory/SX3Geom.h
Executable file
|
|
@ -0,0 +1,190 @@
|
||||||
|
#ifndef SX3Geom_h
|
||||||
|
#define SX3Geom_h
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
const double DEFAULT_NULL=-987654321.;
|
||||||
|
|
||||||
|
class sx3_geometry_scalefactors {
|
||||||
|
public:
|
||||||
|
//If sx3 has L, R being the left and right extremities, we choose add, stretch here such that
|
||||||
|
// x_mm = (x_raw+add)*stretch; so add=abs(L), stretch=75/(abs(L)+R)
|
||||||
|
float add[4];
|
||||||
|
float stretch[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
class qqq5_finegains {
|
||||||
|
public:
|
||||||
|
std::array<std::pair<float,float>,32> front;
|
||||||
|
//front.at(30).first = slope at clkpos 0, ring 30 for E front layer
|
||||||
|
//front.at(30).second = intercept for the same as above
|
||||||
|
std::array<std::pair<float,float>,4> back;
|
||||||
|
};
|
||||||
|
class sx3_fbgains {
|
||||||
|
public:
|
||||||
|
//Order of indices is [pad][strip]
|
||||||
|
float padoffsets[4][4];
|
||||||
|
float padgains[4][4];
|
||||||
|
|
||||||
|
float stripLoffsets[4][4];
|
||||||
|
float stripLgains[4][4];
|
||||||
|
|
||||||
|
float stripRoffsets[4][4];
|
||||||
|
float stripRgains[4][4];
|
||||||
|
};
|
||||||
|
|
||||||
|
std::array<sx3_fbgains,24> sx3_xtalk_gains; //every sx3 needs to be gainmatched as a frontL-back, frontR-back pair (pad strip pair)
|
||||||
|
std::array<sx3_geometry_scalefactors,24> sx3gs;
|
||||||
|
|
||||||
|
class sx3 {
|
||||||
|
public:
|
||||||
|
//TODO: Convert to std::array
|
||||||
|
//Holds all information in an event, including ped subtraction+scaling. back[2].at(0) will have the largest energy seen in ch2, if any
|
||||||
|
std::vector<float> back[4];
|
||||||
|
std::vector<float> frontL[4];
|
||||||
|
std::vector<float> frontR[4];
|
||||||
|
|
||||||
|
double ts = DEFAULT_NULL;
|
||||||
|
//Easy lookup of final calibrated event. Only filled for valid cases, assumed for now to be 1L, 1R, 1B
|
||||||
|
float frontX=DEFAULT_NULL;
|
||||||
|
float frontXmm=DEFAULT_NULL;
|
||||||
|
float frontE=DEFAULT_NULL;
|
||||||
|
float backE=DEFAULT_NULL;
|
||||||
|
int stripF=DEFAULT_NULL;
|
||||||
|
int stripB=DEFAULT_NULL;
|
||||||
|
float frontEL=DEFAULT_NULL;
|
||||||
|
float frontER=DEFAULT_NULL;
|
||||||
|
|
||||||
|
float phi=DEFAULT_NULL; //
|
||||||
|
|
||||||
|
std::set<int> valid_front_chans;
|
||||||
|
std::set<int> valid_back_chans;
|
||||||
|
std::set<int> unmatched_front_chans; //every front channel is unmatched and invalid at first. when it gets matched, it gets removed and sent to valid
|
||||||
|
|
||||||
|
bool foundevent=false;
|
||||||
|
bool valid=false;//valid will be set to false in all cases where we have ambiguity
|
||||||
|
int flags=-1;//flags settable to different types of values to indicate different invalid situations
|
||||||
|
|
||||||
|
void fillevent(const std::string& position, const int subchannel, const float value); //make 'const' what functions don't need to change, helps with performance
|
||||||
|
void validate(const sx3_fbgains&, const sx3_geometry_scalefactors&);
|
||||||
|
void validate();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void sx3::fillevent(const std::string& positionstring, const int subchannel, const float value) {
|
||||||
|
assert(subchannel>=0 && subchannel<4);
|
||||||
|
foundevent=1;
|
||||||
|
if(positionstring=="FRONT_L") {
|
||||||
|
frontL[subchannel].push_back(value);
|
||||||
|
unmatched_front_chans.insert(subchannel);
|
||||||
|
} else if(positionstring=="FRONT_R") {
|
||||||
|
frontR[subchannel].push_back(value);
|
||||||
|
unmatched_front_chans.insert(subchannel);
|
||||||
|
} else if(positionstring=="BACK") {
|
||||||
|
back[subchannel].push_back(value);
|
||||||
|
valid_back_chans.insert(subchannel);
|
||||||
|
} else {
|
||||||
|
std::cout << "Unknown string "+positionstring+" encountered in sx3::fillevent \n" << std::endl;
|
||||||
|
}
|
||||||
|
if(frontL[subchannel].size()!=0 && frontR[subchannel].size()!=0 ) {
|
||||||
|
unmatched_front_chans.erase(subchannel);
|
||||||
|
valid_front_chans.insert(subchannel); //std::set, so no duplication will happen
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//void sx3::validate(const sx3_fbgains& fbgains, const sx3_geometry_scalefactors& sx3gs) {
|
||||||
|
void sx3::validate() {
|
||||||
|
if(valid_front_chans.size()!=0 && valid_back_chans.size()!=0) {
|
||||||
|
valid=true;
|
||||||
|
float maxFE=0;
|
||||||
|
float maxBE=0;
|
||||||
|
//float zpos=0;
|
||||||
|
int bchan=-1;
|
||||||
|
int fchan=-1;
|
||||||
|
/* for(auto cc: valid_front_chans) {
|
||||||
|
std::cout << "fc" << cc << std::endl;// " " << frontL[cc].at(0) << " " << frontR[cc].at(0) << std::endl;
|
||||||
|
}
|
||||||
|
for(auto cc: valid_back_chans) {
|
||||||
|
std::cout << "bc" << cc << std::endl; //" " << back[cc].at(0) << std::endl;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
for(auto chan: valid_front_chans) {
|
||||||
|
if(frontL[chan].size()>1) {
|
||||||
|
printf("\nmultihit sx3 at Lsubchan:%d, ts:%1.13g\n",chan,ts);
|
||||||
|
for(const auto& e: frontL[chan]) printf("e: %f\t",e);
|
||||||
|
std::sort(frontL[chan].begin(), frontL[chan].end(), std::greater<float>());
|
||||||
|
flags += (-1000);
|
||||||
|
}
|
||||||
|
if(frontR[chan].size()>1) {
|
||||||
|
printf("\nmultihit sx3 at Rsubchan:%d, ts:%1.13g\n",chan,ts);
|
||||||
|
for(const auto& e: frontR[chan]) printf("e: %f\t",e);
|
||||||
|
std::sort(frontR[chan].begin(), frontR[chan].end(), std::greater<float>());
|
||||||
|
flags += (-2000);
|
||||||
|
}
|
||||||
|
//assign position using max L+R value
|
||||||
|
/*printf("chan:%d sizeL: %d sizeR: %d\n",chan, frontL[chan].size(), frontR[chan].size()); fflush(stdout);
|
||||||
|
printf("foo\n");
|
||||||
|
std::cout << "\nL:" << std::endl;
|
||||||
|
for(auto thing: frontL[chan]) std::cout << thing << " " << std::flush;
|
||||||
|
std::cout << "\nR:" << std::endl;
|
||||||
|
for(auto thing: frontR[chan]) std::cout << thing << " " << std::flush;*/
|
||||||
|
if(frontL[chan].at(0) + frontR[chan].at(0)>= maxFE) {
|
||||||
|
maxFE = frontL[chan].at(0) + frontR[chan].at(0);
|
||||||
|
//zpos = (frontL[chan].at(0)-frontR[chan].at(0))/maxFE;
|
||||||
|
fchan = chan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(auto chan: valid_back_chans) {
|
||||||
|
if(back[chan].size()>1) {
|
||||||
|
printf("\nmultihit sx3 at Bsubchan:%d, ts:%1.13g\n",chan,ts);
|
||||||
|
for(const auto& e: back[chan]) printf("e: %f\t",e);
|
||||||
|
std::sort(back[chan].begin(), back[chan].end(), std::greater<float>());
|
||||||
|
flags += (-3000);
|
||||||
|
}
|
||||||
|
if(back[chan].size() ==0 ) {
|
||||||
|
printf("foo\n");
|
||||||
|
//continue;
|
||||||
|
}
|
||||||
|
if(back[chan].at(0) >= maxBE) {
|
||||||
|
maxBE = back[chan].at(0);
|
||||||
|
bchan = chan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Cross-talk corrections are important when evaluating 'energy' signals from strips/pads.
|
||||||
|
They can cause unexpected behavior when used universally for all EL, ER cases, so we split scenarios in two.
|
||||||
|
- Positions along each strip (frontX) *are not* corrected for crosstalk.
|
||||||
|
- Total F and B energies (frontE, backE) *are*.
|
||||||
|
Sudarsan B, 31 Oct 2024
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(fchan==-1 || bchan==-1) {
|
||||||
|
std::cout << "how" << std::endl;
|
||||||
|
std::cout << "fc " << std::flush; for(auto fc : valid_front_chans) std::cout << fc << " (" << frontL[fc].at(0) << "," << frontR[fc].at(0)<< ") "; std::cout << std::endl;
|
||||||
|
std::cout << "bc " << std::flush; for(auto bc : valid_back_chans) std::cout << bc << " " << back[bc].at(0) << std::flush; std::cout << std::endl;
|
||||||
|
}
|
||||||
|
float Eleft = frontL[fchan].at(0);
|
||||||
|
float Eright = frontR[fchan].at(0);
|
||||||
|
frontEL = Eleft;
|
||||||
|
frontER = Eright;
|
||||||
|
frontX = (Eleft-Eright)/(Eleft+Eright);
|
||||||
|
//frontXmm = (frontX+sx3gs.add[fchan])*sx3gs.stretch[fchan]; //convert to mm
|
||||||
|
|
||||||
|
//frontE = Eleft*fbgains.stripLgains[bchan][fchan] + fbgains.stripLoffsets[bchan][fchan]
|
||||||
|
// + Eright*fbgains.stripRgains[bchan][fchan] + fbgains.stripRoffsets[bchan][fchan];
|
||||||
|
//backE = back[bchan].at(0)*fbgains.padgains[bchan][fchan]+fbgains.padoffsets[bchan][fchan];
|
||||||
|
frontE = Eleft+Eright;
|
||||||
|
backE = maxBE;
|
||||||
|
stripF=fchan;
|
||||||
|
stripB=bchan;
|
||||||
|
|
||||||
|
flags = 0;
|
||||||
|
} else if(valid_front_chans.size()!=0 && valid_back_chans.size()==0) {
|
||||||
|
flags = -10;
|
||||||
|
} else if(valid_front_chans.size()==0 && valid_back_chans.size()!=0) {
|
||||||
|
flags = -20;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef sx3 sx3det;
|
||||||
|
#endif
|
||||||
795
Armory/fsuReader.h
Normal file
795
Armory/fsuReader.h
Normal file
|
|
@ -0,0 +1,795 @@
|
||||||
|
#include "ClassData.h"
|
||||||
|
#include "Hit.h"
|
||||||
|
#include <algorithm>
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
|
// #include "AggSeparator.h"
|
||||||
|
|
||||||
|
class FSUReader{
|
||||||
|
|
||||||
|
public:
|
||||||
|
FSUReader();
|
||||||
|
FSUReader(std::string fileName, uInt dataSize = 100, int verbose = 1);
|
||||||
|
FSUReader(std::vector<std::string> fileList, uInt dataSize = 100, int verbose = 1);
|
||||||
|
~FSUReader();
|
||||||
|
|
||||||
|
void OpenFile(std::string fileName, uInt dataSize, int verbose = 1);
|
||||||
|
bool IsOpen() const{return inFile == nullptr ? false : true;}
|
||||||
|
bool IsEndOfFile() const {
|
||||||
|
// printf("%s : %d | %ld |%ld\n", __func__, feof(inFile), ftell(inFile), inFileSize);
|
||||||
|
if(fileList.empty() ) {
|
||||||
|
if( (uLong )ftell(inFile) >= inFileSize){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if( fileID + 1 == (int) fileList.size() && ((uLong)ftell(inFile) >= inFileSize) ) {
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScanNumBlock(int verbose = 1, uShort saveData = 0); // saveData = 0 (no save), 1 (no trace), 2 (with trace);
|
||||||
|
int ReadNextBlock(bool traceON = false, int verbose = 0, uShort saveData = 0); // saveData = 0 (no save), 1 (no trace), 2 (with trace);
|
||||||
|
int ReadBlock(unsigned int ID, int verbose = 0);
|
||||||
|
|
||||||
|
unsigned int GetFilePos() const {return filePos;}
|
||||||
|
unsigned long GetTotNumBlock() const{ return totNumBlock;}
|
||||||
|
std::vector<unsigned int> GetBlockTimestamp() const {return blockTimeStamp;}
|
||||||
|
|
||||||
|
Data * GetData() const{return data;}
|
||||||
|
|
||||||
|
std::string GetFileName() const{return fileName;}
|
||||||
|
int GetDPPType() const{return DPPType;}
|
||||||
|
int GetSN() const{return sn;}
|
||||||
|
int GetTick2ns() const{return tick2ns;}
|
||||||
|
int GetNumCh() const{return numCh;}
|
||||||
|
int GetFileOrder() const{return order;}
|
||||||
|
int GetChMask() const{return chMask;}
|
||||||
|
unsigned long GetFileByteSize() const {return inFileSize;}
|
||||||
|
|
||||||
|
void ClearHitList() { hit.clear();}
|
||||||
|
ulong GetHitListLength() const {return hit.size();}
|
||||||
|
std::vector<Hit> GetHitVector() const {return hit;}
|
||||||
|
void SortHit(int verbose = false);
|
||||||
|
Hit GetHit(int id) const {
|
||||||
|
if( id < 0 ) id = hit.size() + id;
|
||||||
|
return hit[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClearHitCount() {hitCount = 0;}
|
||||||
|
ulong GetHitCount() const{return hitCount;}
|
||||||
|
|
||||||
|
std::vector<Hit> ReadBatch(unsigned int batchSize = 1000000, bool verbose = false); // output the sorted Hit
|
||||||
|
|
||||||
|
// std::string SaveHit(std::vector<Hit> hitList, bool isAppend = false);
|
||||||
|
// std::string SaveHit2NewFile(std::string saveFolder = "./", std::string indexStr = "");
|
||||||
|
// void SortAndSaveTS(unsigned int batchSize = 1000000, bool verbose = false);
|
||||||
|
// off_t GetTSFileSize() const {return tsFileSize;}
|
||||||
|
|
||||||
|
//TODO
|
||||||
|
//void SplitFile(unsigned long hitSizePreFile);
|
||||||
|
|
||||||
|
void PrintHit(ulong numHit = -1, ulong startIndex = 0) {
|
||||||
|
for( ulong i = startIndex; i < std::min(numHit, hitCount); i++){
|
||||||
|
printf("%10zu ", i); hit[i].Print();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintHitListInfo(std::vector<Hit> * hitList, std::string name){
|
||||||
|
size_t n = hitList->size();
|
||||||
|
size_t s = sizeof(Hit);
|
||||||
|
printf("============== %s, size : %zu | %.2f MByte\n", name.c_str(), n, n*s/1024./1024.);
|
||||||
|
if( n > 0 ){
|
||||||
|
printf("t0 : %15llu ns\n", hitList->front().timestamp);
|
||||||
|
printf("t1 : %15llu ns\n", hitList->back().timestamp);
|
||||||
|
printf("dt : %15.3f ms\n", (hitList->back().timestamp - hitList->front().timestamp)/1e6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrintHitListInfo(){
|
||||||
|
size_t n = hit.size();
|
||||||
|
size_t s = sizeof(Hit);
|
||||||
|
printf("============== reader.hit, size : %zu | %.2f MByte\n", n, n*s/1024./1024.);
|
||||||
|
if( n > 0 ){
|
||||||
|
printf("t0 : %15llu ns\n", hit.at(0).timestamp);
|
||||||
|
printf("t1 : %15llu ns\n", hit.back().timestamp);
|
||||||
|
printf("dt : %15.3f ms\n", (hit.back().timestamp - hit.front().timestamp)/1e6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//void SaveAsCAENCoMPASSFormat();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
FILE * inFile;
|
||||||
|
Data * data;
|
||||||
|
|
||||||
|
std::string fileName;
|
||||||
|
std::vector<std::string> fileList;
|
||||||
|
short fileID;
|
||||||
|
unsigned long inFileSize;
|
||||||
|
unsigned int filePos;
|
||||||
|
unsigned long totNumBlock;
|
||||||
|
unsigned int blockID;
|
||||||
|
|
||||||
|
bool isDualBlock;
|
||||||
|
|
||||||
|
uShort sn;
|
||||||
|
uShort DPPType;
|
||||||
|
uShort tick2ns;
|
||||||
|
uShort order;
|
||||||
|
uShort chMask;
|
||||||
|
uShort numCh;
|
||||||
|
|
||||||
|
std::vector<unsigned int> blockPos;
|
||||||
|
std::vector<unsigned int > blockTimeStamp;
|
||||||
|
|
||||||
|
unsigned long hitCount;
|
||||||
|
|
||||||
|
std::vector<Hit> hit;
|
||||||
|
|
||||||
|
unsigned int word[1]; /// 4 byte
|
||||||
|
size_t dummy;
|
||||||
|
char * buffer;
|
||||||
|
|
||||||
|
off_t tsFileSize;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
inline FSUReader::~FSUReader(){
|
||||||
|
delete data;
|
||||||
|
|
||||||
|
if( inFile ) fclose(inFile);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
inline FSUReader::FSUReader(){
|
||||||
|
inFile = nullptr;
|
||||||
|
data = nullptr;
|
||||||
|
|
||||||
|
blockPos.clear();
|
||||||
|
blockTimeStamp.clear();
|
||||||
|
hit.clear();
|
||||||
|
|
||||||
|
fileList.clear();
|
||||||
|
fileID = -1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
inline FSUReader::FSUReader(std::string fileName, uInt dataSize, int verbose){
|
||||||
|
inFile = nullptr;
|
||||||
|
data = nullptr;
|
||||||
|
|
||||||
|
blockPos.clear();
|
||||||
|
blockTimeStamp.clear();
|
||||||
|
hit.clear();
|
||||||
|
|
||||||
|
fileList.clear();
|
||||||
|
fileID = -1;
|
||||||
|
OpenFile(fileName, dataSize, verbose);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline FSUReader::FSUReader(std::vector<std::string> fileList, uInt dataSize, int verbose){
|
||||||
|
inFile = nullptr;
|
||||||
|
data = nullptr;
|
||||||
|
|
||||||
|
blockPos.clear();
|
||||||
|
blockTimeStamp.clear();
|
||||||
|
hit.clear();
|
||||||
|
//The files are the same DPPType and sn
|
||||||
|
this->fileList = fileList;
|
||||||
|
fileID = 0;
|
||||||
|
OpenFile(fileList[fileID], dataSize, verbose);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void FSUReader::OpenFile(std::string fileName, uInt dataSize, int verbose){
|
||||||
|
|
||||||
|
/// File format must be YYY...Y_runXXX_AAA_BBB_TT_CCC.fsu
|
||||||
|
/// YYY...Y = prefix
|
||||||
|
/// XXX = runID, 3 digits
|
||||||
|
/// AAA = board Serial Number, 3 digits
|
||||||
|
/// BBB = DPPtype, 3 digits
|
||||||
|
/// TT = tick2ns, any digits
|
||||||
|
/// CCC = over size index, 3 digits
|
||||||
|
|
||||||
|
if( inFile != nullptr ) fclose(inFile);
|
||||||
|
|
||||||
|
inFile = fopen(fileName.c_str(), "r");
|
||||||
|
|
||||||
|
if( inFile == NULL ){
|
||||||
|
printf("FSUReader::Cannot open file : %s \n", fileName.c_str());
|
||||||
|
this->fileName = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this->fileName = fileName;
|
||||||
|
|
||||||
|
fseek(inFile, 0L, SEEK_END);
|
||||||
|
inFileSize = ftell(inFile);
|
||||||
|
if(verbose) printf("%s | file size : %ld Byte = %.2f MB\n", fileName.c_str() , inFileSize, inFileSize/1024./1024.);
|
||||||
|
fseek(inFile, 0L, SEEK_SET);
|
||||||
|
filePos = 0;
|
||||||
|
|
||||||
|
if( fileID > 0 ) return;
|
||||||
|
|
||||||
|
totNumBlock = 0;
|
||||||
|
blockID = 0;
|
||||||
|
blockPos.clear();
|
||||||
|
blockTimeStamp.clear();
|
||||||
|
|
||||||
|
hitCount = 0;
|
||||||
|
hit.clear();
|
||||||
|
|
||||||
|
//check is the file is *.fsu or *.fsu.X
|
||||||
|
size_t found = fileName.find_last_of('.');
|
||||||
|
std::string ext = fileName.substr(found + 1);
|
||||||
|
|
||||||
|
if( ext.find("fsu") != std::string::npos ) {
|
||||||
|
if(verbose > 1) printf("It is an raw data *.fsu format\n");
|
||||||
|
isDualBlock = false;
|
||||||
|
chMask = -1;
|
||||||
|
}else{
|
||||||
|
chMask = atoi(ext.c_str());
|
||||||
|
isDualBlock = true;
|
||||||
|
if(verbose > 1) printf("It is a splitted dual block data *.fsu.X format, dual channel mask : %d \n", chMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string fileNameNoExt;
|
||||||
|
found = fileName.find_last_of(".fsu");
|
||||||
|
size_t found2 = fileName.find_last_of('/');
|
||||||
|
if( found2 == std::string::npos ){
|
||||||
|
fileNameNoExt = fileName.substr(0, found-4);
|
||||||
|
}else{
|
||||||
|
fileNameNoExt = fileName.substr(found2+1, found-4);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Split the string by underscores
|
||||||
|
std::istringstream iss(fileNameNoExt);
|
||||||
|
std::vector<std::string> tokens;
|
||||||
|
std::string token;
|
||||||
|
|
||||||
|
while (std::getline(iss, token, '_')) { tokens.push_back(token); }
|
||||||
|
sn = atoi(tokens[2].c_str());
|
||||||
|
tick2ns = atoi(tokens[4].c_str());
|
||||||
|
order = atoi(tokens[5].c_str());
|
||||||
|
|
||||||
|
DPPType = 0;
|
||||||
|
if( fileName.find("PHA") != std::string::npos ) DPPType = DPPTypeCode::DPP_PHA_CODE;
|
||||||
|
if( fileName.find("PSD") != std::string::npos ) DPPType = DPPTypeCode::DPP_PSD_CODE;
|
||||||
|
if( fileName.find("QDC") != std::string::npos ) DPPType = DPPTypeCode::DPP_QDC_CODE;
|
||||||
|
if( DPPType == 0 ){
|
||||||
|
fclose(inFile);
|
||||||
|
inFile = nullptr;
|
||||||
|
printf("Cannot find DPPType in the filename. Abort.");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
numCh = (DPPType == DPPTypeCode::DPP_QDC_CODE ? 64 : 16);
|
||||||
|
|
||||||
|
data = new Data(numCh, dataSize);
|
||||||
|
data->tick2ns = tick2ns;
|
||||||
|
data->boardSN = sn;
|
||||||
|
data->DPPType = DPPType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int FSUReader::ReadNextBlock(bool traceON, int verbose, uShort saveData){
|
||||||
|
if( inFile == NULL ) return -1;
|
||||||
|
if( feof(inFile) || filePos >= inFileSize) {
|
||||||
|
if( fileID >= 0 && fileID + 1 < (short) fileList.size() ){
|
||||||
|
printf("-------------- next file\n");
|
||||||
|
fileID ++;
|
||||||
|
OpenFile(fileList[fileID], data->GetDataSize(), 1 );
|
||||||
|
}else{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dummy = fread(word, 4, 1, inFile);
|
||||||
|
fseek(inFile, -4, SEEK_CUR);
|
||||||
|
|
||||||
|
if( dummy != 1) {
|
||||||
|
printf("fread error, should read 4 bytes, but read %ld x 4 byte, file pos: %ld / %ld byte\n",
|
||||||
|
dummy, ftell(inFile), inFileSize);
|
||||||
|
return -10;
|
||||||
|
}
|
||||||
|
short header = ((word[0] >> 28 ) & 0xF);
|
||||||
|
|
||||||
|
Hit temp;
|
||||||
|
|
||||||
|
if( header == 0xA ) { ///normal header
|
||||||
|
|
||||||
|
unsigned int aggSize = (word[0] & 0x0FFFFFFF) * 4; ///byte
|
||||||
|
if( aggSize > inFileSize - ftell(inFile)) aggSize = inFileSize - ftell(inFile);
|
||||||
|
buffer = new char[aggSize];
|
||||||
|
dummy = fread(buffer, aggSize, 1, inFile);
|
||||||
|
filePos = ftell(inFile);
|
||||||
|
if( dummy != 1) {
|
||||||
|
printf("fread error, should read %d bytes, but read %ld x %d byte, file pos: %ld / %ld byte \n",
|
||||||
|
aggSize, dummy, aggSize, ftell(inFile), inFileSize);
|
||||||
|
return -30;
|
||||||
|
}
|
||||||
|
|
||||||
|
data->DecodeBuffer(buffer, aggSize, !traceON, verbose); // data will own the buffer
|
||||||
|
//printf(" word Index = %u | filePos : %u | ", data->GetWordIndex(), filePos);
|
||||||
|
|
||||||
|
}else if( (header & 0xF ) == 0x8 ) { /// dual channel header
|
||||||
|
|
||||||
|
unsigned int dualSize = (word[0] & 0x7FFFFFFF) * 4; ///byte
|
||||||
|
buffer = new char[dualSize];
|
||||||
|
dummy = fread(buffer, dualSize, 1, inFile);
|
||||||
|
filePos = ftell(inFile);
|
||||||
|
|
||||||
|
data->buffer = buffer;
|
||||||
|
data->DecodeDualBlock(buffer, dualSize, DPPType, chMask, !traceON, verbose);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
printf("incorrect header.\n trminate.");
|
||||||
|
return -20;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int eventCout = 0;
|
||||||
|
|
||||||
|
for( int ch = 0; ch < data->GetNChannel(); ch++){
|
||||||
|
if( data->NumEventsDecoded[ch] == 0 ) continue;
|
||||||
|
|
||||||
|
hitCount += data->NumEventsDecoded[ch];
|
||||||
|
eventCout += data->NumEventsDecoded[ch];
|
||||||
|
|
||||||
|
if( saveData ){
|
||||||
|
int start = data->GetDataIndex(ch) - data->NumEventsDecoded[ch] + 1;
|
||||||
|
if( start < 0 ) start = start + data->GetDataSize();
|
||||||
|
|
||||||
|
for( int i = start; i < start + data->NumEventsDecoded[ch]; i++ ){
|
||||||
|
int k = i % data->GetDataSize();
|
||||||
|
|
||||||
|
temp.sn = sn;
|
||||||
|
temp.ch = ch;
|
||||||
|
temp.energy = data->GetEnergy(ch, k);
|
||||||
|
temp.energy2 = data->GetEnergy2(ch, k);
|
||||||
|
temp.timestamp = data->GetTimestamp(ch, k);
|
||||||
|
temp.fineTime = data->GetFineTime(ch, k);
|
||||||
|
temp.pileUp = data->GetPileUp(ch, k);
|
||||||
|
if( saveData > 1 ) {
|
||||||
|
temp.traceLength = data->Waveform1[ch][k].size();
|
||||||
|
temp.trace = data->Waveform1[ch][k];
|
||||||
|
}else{
|
||||||
|
temp.traceLength = 0;
|
||||||
|
if( temp.trace.size() > 0 ) temp.trace.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
hit.push_back(temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data->ClearTriggerRate();
|
||||||
|
data->ClearNumEventsDecoded();
|
||||||
|
data->ClearBuffer(); // this will clear the buffer.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int FSUReader::ReadBlock(unsigned int ID, int verbose){
|
||||||
|
if( totNumBlock == 0 )return -1;
|
||||||
|
if( ID >= totNumBlock )return -1;
|
||||||
|
|
||||||
|
data->ClearData();
|
||||||
|
|
||||||
|
fseek( inFile, 0L, SEEK_SET);
|
||||||
|
|
||||||
|
if( verbose ) printf("Block index: %u, File Pos: %u byte\n", ID, blockPos[ID]);
|
||||||
|
|
||||||
|
fseek(inFile, blockPos[ID], SEEK_CUR);
|
||||||
|
filePos = blockPos[ID];
|
||||||
|
blockID = ID;
|
||||||
|
return ReadNextBlock(false, verbose, false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void FSUReader::SortHit(int verbose){
|
||||||
|
if( verbose) printf("\nQuick Sort hit array according to time...");
|
||||||
|
std::sort(hit.begin(), hit.end(), [](const Hit& a, const Hit& b) {
|
||||||
|
return a.timestamp < b.timestamp;
|
||||||
|
});
|
||||||
|
if( verbose) printf(".......done.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void FSUReader::ScanNumBlock(int verbose, uShort saveData){
|
||||||
|
if( inFile == nullptr ) return;
|
||||||
|
if( feof(inFile) ) return;
|
||||||
|
|
||||||
|
blockID = 0;
|
||||||
|
blockPos.push_back(0);
|
||||||
|
|
||||||
|
data->ClearData();
|
||||||
|
rewind(inFile);
|
||||||
|
filePos = 0;
|
||||||
|
|
||||||
|
bool isTraceOn = saveData < 2 ? false : true;
|
||||||
|
|
||||||
|
while( ReadNextBlock(isTraceOn, verbose - 1, saveData) == 0 ){
|
||||||
|
blockPos.push_back(filePos);
|
||||||
|
blockTimeStamp.push_back(data->aggTime);
|
||||||
|
blockID ++;
|
||||||
|
if(verbose && blockID % 10000 == 0) printf("%u, %.2f%% %u/%lu\n\033[A\r", blockID, filePos*100./inFileSize, filePos, inFileSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
totNumBlock = blockID;
|
||||||
|
if(verbose) {
|
||||||
|
printf("\nScan complete: number of data Block : %lu\n", totNumBlock);
|
||||||
|
printf( " number of hit : %lu", hitCount);
|
||||||
|
if( hitCount > 1e6 ) printf(" = %.3f million", hitCount/1e6);
|
||||||
|
printf("\n");
|
||||||
|
if( saveData )printf( " size of the hit array : %lu\n", hit.size());
|
||||||
|
|
||||||
|
if( saveData ){
|
||||||
|
size_t sizeT = sizeof(hit[0]) * hit.size();
|
||||||
|
printf("size of hit array : %lu byte = %.2f kByte, = %.2f MByte\n", sizeT, sizeT/1024., sizeT/1024./1024.);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( fileList.size() > 0 ){
|
||||||
|
fileID = 0;
|
||||||
|
OpenFile(fileList[fileID], data->GetDataSize(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
rewind(inFile);
|
||||||
|
blockID = 0;
|
||||||
|
filePos = 0;
|
||||||
|
|
||||||
|
//check is the hitCount == hit.size();
|
||||||
|
if( saveData ){
|
||||||
|
if( hitCount != hit.size()){
|
||||||
|
printf("!!!!!! the Data::dataSize is not big enough. !!!!!!!!!!!!!!!\n");
|
||||||
|
}else{
|
||||||
|
SortHit(verbose+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline std::vector<Hit> FSUReader::ReadBatch(unsigned int batchSize, bool verbose){
|
||||||
|
|
||||||
|
// printf("%s sn:%d. filePos : %lu\n", __func__, sn, ftell(inFile));
|
||||||
|
|
||||||
|
std::vector<Hit> hitList_A;
|
||||||
|
if( IsEndOfFile() ) {
|
||||||
|
hitList_A = hit;
|
||||||
|
hit.clear();
|
||||||
|
return hitList_A;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( hit.size() == 0 ){
|
||||||
|
int res = 0;
|
||||||
|
do{
|
||||||
|
res = ReadNextBlock(true, 0, 3);
|
||||||
|
}while ( hit.size() < batchSize && res == 0);
|
||||||
|
SortHit();
|
||||||
|
uLong t0_B = hit.at(0).timestamp;
|
||||||
|
uLong t1_B = hit.back().timestamp;
|
||||||
|
if( verbose ) {
|
||||||
|
printf(" hit in memeory : %7zu | %u | %lu \n", hit.size(), filePos, inFileSize);
|
||||||
|
printf("t0 : %15lu ns\n", t0_B);
|
||||||
|
printf("t1 : %15lu ns\n", t1_B);
|
||||||
|
printf("dt : %15.3f ms\n", (t1_B - t0_B)/1e6);
|
||||||
|
}
|
||||||
|
|
||||||
|
hitList_A = hit;
|
||||||
|
hit.clear();
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
hitList_A = hit;
|
||||||
|
hit.clear();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if( IsEndOfFile() ) return hitList_A; // when file finished for 1st batch read
|
||||||
|
|
||||||
|
int res = 0;
|
||||||
|
do{
|
||||||
|
res = ReadNextBlock(true, 0, 3);
|
||||||
|
}while ( hit.size() < batchSize && res == 0);
|
||||||
|
SortHit();
|
||||||
|
uLong t0_B = hit.at(0).timestamp;
|
||||||
|
uLong t1_B = hit.back().timestamp;
|
||||||
|
|
||||||
|
if( verbose ) {
|
||||||
|
printf(" hit in memeory : %7zu | %u | %lu \n", hit.size(), filePos, inFileSize);
|
||||||
|
printf("t0 : %15lu\n", t0_B);
|
||||||
|
printf("t1 : %15lu\n", t1_B);
|
||||||
|
printf("dt : %15.3f ms\n", (t1_B - t0_B)/1e6);
|
||||||
|
}
|
||||||
|
|
||||||
|
uLong t0_A = hitList_A.at(0).timestamp;
|
||||||
|
uLong t1_A = hitList_A.back().timestamp;
|
||||||
|
ulong ID_A = 0;
|
||||||
|
ulong ID_B = 0;
|
||||||
|
|
||||||
|
if( t0_A >= t0_B) {
|
||||||
|
printf("\033[0;31m!!!!!!!!!!!!!!!!! %s | Need to increase the batch size. \033[0m\n", __func__);
|
||||||
|
return std::vector<Hit> ();
|
||||||
|
}
|
||||||
|
|
||||||
|
if( t1_A > t0_B) { // need to sort between two hitList
|
||||||
|
|
||||||
|
if( verbose ) {
|
||||||
|
printf("############# need to sort \n");
|
||||||
|
printf("=========== sume of A + B : %zu \n", hitList_A.size() + hit.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<Hit> hitTemp;
|
||||||
|
|
||||||
|
// find the hit that is >= t0_B, save them to hitTemp
|
||||||
|
for( size_t j = 0; j < hitList_A.size() ; j++){
|
||||||
|
if( hitList_A[j].timestamp < t0_B ) continue;;
|
||||||
|
if( ID_A == 0 ) ID_A = j;
|
||||||
|
hitTemp.push_back(hitList_A[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove hitList_A element that is >= t0_B
|
||||||
|
hitList_A.erase(hitList_A.begin() + ID_A, hitList_A.end() );
|
||||||
|
|
||||||
|
// find the hit that is <= t1_A, save them to hitTemp
|
||||||
|
for( size_t j = 0; j < hit.size(); j++){
|
||||||
|
if( hit[j].timestamp > t1_A ) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
hitTemp.push_back(hit[j]);
|
||||||
|
ID_B = j + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove hit elements that is <= t1_A
|
||||||
|
hit.erase(hit.begin(), hit.begin() + ID_B );
|
||||||
|
|
||||||
|
// sort hitTemp
|
||||||
|
std::sort(hitTemp.begin(), hitTemp.end(), [](const Hit& a, const Hit& b) {
|
||||||
|
return a.timestamp < b.timestamp;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if( verbose ) {
|
||||||
|
printf("----------------- ID_A : %lu, Drop\n", ID_A);
|
||||||
|
printf("----------------- ID_B : %lu, Drop\n", ID_B);
|
||||||
|
PrintHitListInfo(&hitList_A, "hitList_A");
|
||||||
|
PrintHitListInfo(&hitTemp, "hitTemp");
|
||||||
|
PrintHitListInfo();
|
||||||
|
printf("=========== sume of A + B + Temp : %zu \n", hitList_A.size() + hit.size() + hitTemp.size());
|
||||||
|
printf("----------------- refill hitList_A \n");
|
||||||
|
}
|
||||||
|
|
||||||
|
for( size_t j = 0; j < hitTemp.size(); j++){
|
||||||
|
hitList_A.push_back(hitTemp[j]);
|
||||||
|
}
|
||||||
|
hitTemp.clear();
|
||||||
|
|
||||||
|
if( verbose ) {
|
||||||
|
PrintHitListInfo(&hitList_A, "hitList_A");
|
||||||
|
PrintHitListInfo();
|
||||||
|
printf("=========== sume of A + B : %zu \n", hitList_A.size() + hit.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return hitList_A;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
inline void FSUReader::SortAndSaveTS(unsigned int batchSize, bool verbose){
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
std::vector<Hit> hitList_A ;
|
||||||
|
|
||||||
|
do{
|
||||||
|
|
||||||
|
if( verbose ) printf("***************************************************\n");
|
||||||
|
|
||||||
|
int res = 0;
|
||||||
|
do{
|
||||||
|
res = ReadNextBlock(true, 0, 3);
|
||||||
|
}while ( hit.size() < batchSize && res == 0);
|
||||||
|
|
||||||
|
SortHit();
|
||||||
|
uLong t0_B = hit.at(0).timestamp;
|
||||||
|
uLong t1_B = hit.back().timestamp;
|
||||||
|
|
||||||
|
if( verbose ) {
|
||||||
|
printf(" hit in memeory : %7zu | %u | %lu \n", hit.size(), filePos, inFileSize);
|
||||||
|
printf("t0 : %15lu\n", t0_B);
|
||||||
|
printf("t1 : %15lu\n", t1_B);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( count == 0 ) {
|
||||||
|
hitList_A = hit; // copy hit
|
||||||
|
}else{
|
||||||
|
|
||||||
|
uLong t0_A = hitList_A.at(0).timestamp;
|
||||||
|
uLong t1_A = hitList_A.back().timestamp;
|
||||||
|
ulong ID_A = 0;
|
||||||
|
ulong ID_B = 0;
|
||||||
|
|
||||||
|
if( t0_A > t0_B) {
|
||||||
|
printf("Need to increase the batch size. \n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( t1_A > t0_B) { // need to sort between two hitList
|
||||||
|
|
||||||
|
if( verbose ) {
|
||||||
|
printf("############# need to sort \n");
|
||||||
|
printf("=========== sume of A + B : %zu \n", hitList_A.size() + hit.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<Hit> hitTemp;
|
||||||
|
|
||||||
|
for( size_t j = 0; j < hitList_A.size() ; j++){
|
||||||
|
if( hitList_A[j].timestamp < t0_B ) continue;
|
||||||
|
if( ID_A == 0 ) ID_A = j;
|
||||||
|
hitTemp.push_back(hitList_A[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
hitList_A.erase(hitList_A.begin() + ID_A, hitList_A.end() );
|
||||||
|
if( verbose ) {
|
||||||
|
printf("----------------- ID_A : %lu, Drop\n", ID_A);
|
||||||
|
PrintHitListInfo(hitList_A, "hitList_A");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for( size_t j = 0; j < hit.size(); j++){
|
||||||
|
if( hit[j].timestamp > t1_A ) {
|
||||||
|
ID_B = j;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
hitTemp.push_back(hit[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::sort(hitTemp.begin(), hitTemp.end(), [](const Hit& a, const Hit& b) {
|
||||||
|
return a.timestamp < b.timestamp;
|
||||||
|
});
|
||||||
|
|
||||||
|
hit.erase(hit.begin(), hit.begin() + ID_B );
|
||||||
|
|
||||||
|
if( verbose ) {
|
||||||
|
PrintHitListInfo(hitTemp, "hitTemp");
|
||||||
|
printf("----------------- ID_B : %lu, Drop\n", ID_B);
|
||||||
|
PrintHitListInfo(hit, "hit");
|
||||||
|
printf("=========== sume of A + B + Temp : %zu \n", hitList_A.size() + hit.size() + hitTemp.size());
|
||||||
|
printf("----------------- refill hitList_A \n");
|
||||||
|
}
|
||||||
|
ulong ID_Temp = 0;
|
||||||
|
for( size_t j = 0; j < hitTemp.size(); j++){
|
||||||
|
hitList_A.push_back(hitTemp[j]);
|
||||||
|
if( hitList_A.size() >= batchSize ) {
|
||||||
|
ID_Temp = j+1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hitTemp.erase(hitTemp.begin(), hitTemp.begin() + ID_Temp );
|
||||||
|
for( size_t j = 0 ; j < hit.size(); j ++){
|
||||||
|
hitTemp.push_back(hit[j]);
|
||||||
|
}
|
||||||
|
SaveHit(hitList_A, count <= 1 ? false : true);
|
||||||
|
|
||||||
|
if( verbose ) {
|
||||||
|
PrintHitListInfo(hitList_A, "hitList_A");
|
||||||
|
PrintHitListInfo(hitTemp, "hitTemp");
|
||||||
|
printf("----------------- replace hitList_A by hitTemp \n");
|
||||||
|
}
|
||||||
|
|
||||||
|
hitList_A.clear();
|
||||||
|
hitList_A = hitTemp;
|
||||||
|
hit.clear();
|
||||||
|
|
||||||
|
if( verbose ) {
|
||||||
|
PrintHitListInfo(hitList_A, "hitList_A");
|
||||||
|
printf("===========================================\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{ // save hitList_A, replace hitList_A
|
||||||
|
|
||||||
|
SaveHit(hitList_A, count <= 1? false : true);
|
||||||
|
hitList_A.clear();
|
||||||
|
hitList_A = hit;
|
||||||
|
if( verbose ) PrintHitListInfo(hitList_A, "hitList_A");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ClearHitList();
|
||||||
|
count ++;
|
||||||
|
}while(filePos < inFileSize);
|
||||||
|
|
||||||
|
SaveHit(hitList_A, count <= 1 ? false : true);
|
||||||
|
|
||||||
|
printf("================= finished.\n");
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
inline std::string FSUReader::SaveHit(std::vector<Hit> hitList, bool isAppend){
|
||||||
|
|
||||||
|
std::string outFileName;
|
||||||
|
if( fileList.empty() ) {
|
||||||
|
outFileName = fileName + ".ts" ;
|
||||||
|
}else{
|
||||||
|
outFileName = fileList[0] + ".ts" ;
|
||||||
|
}
|
||||||
|
uint64_t hitSize = hitList.size();
|
||||||
|
|
||||||
|
FILE * outFile ;
|
||||||
|
if( isAppend ) {
|
||||||
|
outFile = fopen(outFileName.c_str(), "rb+"); //read/write bineary
|
||||||
|
|
||||||
|
rewind(outFile);
|
||||||
|
fseek( outFile, 4, SEEK_CUR);
|
||||||
|
uint64_t org_hitSize;
|
||||||
|
fread(&org_hitSize, 8, 1, outFile);
|
||||||
|
|
||||||
|
rewind(outFile);
|
||||||
|
fseek( outFile, 4, SEEK_CUR);
|
||||||
|
|
||||||
|
org_hitSize += hitSize;
|
||||||
|
|
||||||
|
fwrite(&org_hitSize, 8, 1, outFile);
|
||||||
|
fseek(outFile, 0, SEEK_END);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
outFile = fopen(outFileName.c_str(), "wb"); //overwrite binary
|
||||||
|
uint32_t header = 0xAA000000;
|
||||||
|
header += sn;
|
||||||
|
fwrite( &header, 4, 1, outFile );
|
||||||
|
fwrite( &hitSize, 8, 1, outFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for( ulong i = 0; i < hitSize; i++){
|
||||||
|
|
||||||
|
if( i% 10000 == 0 ) printf("Saving %lu/%lu Hit (%.2f%%)\n\033[A\r", i, hitSize, i*100./hitSize);
|
||||||
|
|
||||||
|
uint16_t flag = hitList[i].ch + (hitList[i].pileUp << 8) ;
|
||||||
|
|
||||||
|
if( DPPType == DPPTypeCode::DPP_PSD_CODE ) flag += ( 1 << 15);
|
||||||
|
if( hitList[i].traceLength > 0 ) flag += (1 << 14);
|
||||||
|
|
||||||
|
// fwrite( &(hit[i].ch), 1, 1, outFile);
|
||||||
|
fwrite( &flag, 2, 1, outFile);
|
||||||
|
fwrite( &(hitList[i].energy), 2, 1, outFile);
|
||||||
|
if( DPPType == DPPTypeCode::DPP_PSD_CODE ) fwrite( &(hitList[i].energy2), 2, 1, outFile);
|
||||||
|
fwrite( &(hitList[i].timestamp), 6, 1, outFile);
|
||||||
|
fwrite( &(hitList[i].fineTime), 2, 1, outFile);
|
||||||
|
if( hitList[i].traceLength > 0 ) fwrite( &(hitList[i].traceLength), 2, 1, outFile);
|
||||||
|
|
||||||
|
for( uShort j = 0; j < hitList[i].traceLength; j++){
|
||||||
|
fwrite( &(hitList[i].trace[j]), 2, 1, outFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
off_t tsFileSize = ftello(outFile); // unsigned int = Max ~4GB
|
||||||
|
fclose(outFile);
|
||||||
|
|
||||||
|
printf("Saved to %s, size: ", outFileName.c_str());
|
||||||
|
if( tsFileSize < 1024 ) {
|
||||||
|
printf(" %ld Byte", tsFileSize);
|
||||||
|
}else if( tsFileSize < 1024*1024 ) {
|
||||||
|
printf(" %.2f kB", tsFileSize/1024.);
|
||||||
|
}else if( tsFileSize < 1024*1024*1024){
|
||||||
|
printf(" %.2f MB", tsFileSize/1024./1024.);
|
||||||
|
}else{
|
||||||
|
printf(" %.2f GB", tsFileSize/1024./1024./1024.);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
return outFileName;
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
56
Armory/macro.h
Normal file
56
Armory/macro.h
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
#ifndef MACRO_H
|
||||||
|
#define MACRO_H
|
||||||
|
|
||||||
|
#define MaxNPorts 4 //for optical link
|
||||||
|
#define MaxNBoards 4 //for both optical link and usb
|
||||||
|
|
||||||
|
#define MaxNDigitizer MaxNPorts * MaxNBoards
|
||||||
|
|
||||||
|
#define MaxRegChannel 16
|
||||||
|
#define MaxNChannels 64
|
||||||
|
#define MaxRecordLength 0x3fff * 8
|
||||||
|
#define MaxSaveFileSize 1024 * 1024 * 1024 * 2
|
||||||
|
|
||||||
|
#define MaxDisplayTraceTimeLength 20000 //ns
|
||||||
|
#define ScopeUpdateMiliSec 200 // msec
|
||||||
|
#define MaxNumberOfTrace 5 // in an event
|
||||||
|
|
||||||
|
#define SETTINGSIZE 2048
|
||||||
|
|
||||||
|
#define DAQLockFile "DAQLock.dat"
|
||||||
|
#define PIDFile "pid.dat"
|
||||||
|
|
||||||
|
#include <sys/time.h> /** struct timeval, select() */
|
||||||
|
|
||||||
|
inline unsigned int getTime_us(){
|
||||||
|
unsigned int time_us;
|
||||||
|
struct timeval t1;
|
||||||
|
struct timezone tz;
|
||||||
|
gettimeofday(&t1, &tz);
|
||||||
|
time_us = (t1.tv_sec) * 1000 * 1000 + t1.tv_usec;
|
||||||
|
return time_us;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
inline unsigned long long getTime_ns(){
|
||||||
|
std::chrono::high_resolution_clock::time_point currentTime = std::chrono::high_resolution_clock::now();
|
||||||
|
std::chrono::nanoseconds nanoseconds = std::chrono::duration_cast<std::chrono::nanoseconds>(currentTime.time_since_epoch());
|
||||||
|
return nanoseconds.count();
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef unsigned short uShort;
|
||||||
|
typedef unsigned int uInt;
|
||||||
|
typedef unsigned long uLong;
|
||||||
|
typedef unsigned long long ullong;
|
||||||
|
|
||||||
|
#define DebugMode 0 //process check, when 1, print out all function call
|
||||||
|
|
||||||
|
// if DebugMode is 1, define DebugPrint() to be printf(), else, DebugPrint() define nothing
|
||||||
|
#if DebugMode
|
||||||
|
#define DebugPrint(fmt, ...) printf(fmt "::%s\n",##__VA_ARGS__, __func__);
|
||||||
|
#else
|
||||||
|
#define DebugPrint(fmt, ...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
6
BatchProcess.sh
Normal file
6
BatchProcess.sh
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#parallel -j 6 echo ./ProcessRun.sh {1} 2000 0 ::: {020..400}
|
||||||
|
|
||||||
|
parallel --jobs 1 --results log/log_{}.txt --memfree 1G --ctag -j 1 ./ProcessRun.sh {1} 2000 0 ::: {109..400} # for 17F
|
||||||
|
|
||||||
|
# parallel --results log/log_{}.txt --ctag -j 6 ./ProcessRun.sh {1} 4000 0 ::: {5..21}
|
||||||
270
CalibrationQQQ.C
Normal file
270
CalibrationQQQ.C
Normal file
|
|
@ -0,0 +1,270 @@
|
||||||
|
|
||||||
|
#define CalibrationQQQ_cxx
|
||||||
|
|
||||||
|
#include <TH2.h>
|
||||||
|
#include <TF1.h>
|
||||||
|
#include <TStyle.h>
|
||||||
|
#include <TCanvas.h>
|
||||||
|
#include <TMath.h>
|
||||||
|
#include <TCutG.h>
|
||||||
|
#include <fstream>
|
||||||
|
#include <utility>
|
||||||
|
#include <algorithm>
|
||||||
|
#include "Armory/HistPlotter.h"
|
||||||
|
#include "TVector3.h"
|
||||||
|
#include "Calibration.h"
|
||||||
|
|
||||||
|
TH2F *hQQQFVB;
|
||||||
|
HistPlotter *plotter;
|
||||||
|
int padID = 0;
|
||||||
|
|
||||||
|
TCutG *cut;
|
||||||
|
std::map<std::tuple<int, int, int>, std::vector<std::pair<double, double>>> dataPoints;
|
||||||
|
|
||||||
|
bool qqqEcut = false;
|
||||||
|
|
||||||
|
// Gain Arrays
|
||||||
|
const int MAX_QQQ = 4;
|
||||||
|
const int MAX_RING = 16;
|
||||||
|
const int MAX_WEDGE = 16;
|
||||||
|
double qqqwGain[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{0}}};
|
||||||
|
// double qqqrGain[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{0}}};
|
||||||
|
bool qqqwGainValid[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{false}}};
|
||||||
|
// bool qqqrGainValid[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{false}}};
|
||||||
|
|
||||||
|
void CalibrationQQQ::Begin(TTree * /*tree*/)
|
||||||
|
{
|
||||||
|
plotter = new HistPlotter("Calib.root", "TFILE");
|
||||||
|
// ----------------------- Load QQQ Gains
|
||||||
|
{
|
||||||
|
std::string filename = "qqq_GainMatch.dat";
|
||||||
|
std::ifstream infile(filename);
|
||||||
|
if (!infile.is_open())
|
||||||
|
{
|
||||||
|
std::cerr << "Error opening " << filename << "!" << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int det, ring, wedge;
|
||||||
|
double gainw, gainr;
|
||||||
|
while (infile >> det >> ring >> wedge >> gainw >> gainr)
|
||||||
|
{
|
||||||
|
qqqwGain[det][ring][wedge] = gainw;
|
||||||
|
// qqqrGain[det][ring][wedge] = gainr;
|
||||||
|
qqqwGainValid[det][ring][wedge] = (gainw > 0);
|
||||||
|
// qqqrGainValid[det][ring][wedge] = (gainr > 0);
|
||||||
|
}
|
||||||
|
infile.close();
|
||||||
|
std::cout << "Loaded QQQ gains from " << filename << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int det = 0; det < MAX_QQQ; det++)
|
||||||
|
{
|
||||||
|
for (int ring = 0; ring < MAX_RING; ring++)
|
||||||
|
{
|
||||||
|
for (int wedge = 0; wedge < MAX_WEDGE; wedge++)
|
||||||
|
{
|
||||||
|
TString hname = Form("hCal_qqq%d_ring%d_wedge%d", det, ring, wedge);
|
||||||
|
TString htitle = Form("QQQ det%d ring%d wedge%d; Energy (arb); Counts", det, ring, wedge);
|
||||||
|
// hQQQSpectra[det][ring][wedge] = new TH1F(hname, htitle, 4000, 0, 16000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool_t CalibrationQQQ::Process(Long64_t entry)
|
||||||
|
{
|
||||||
|
b_qqqMulti->GetEntry(entry);
|
||||||
|
b_qqqID->GetEntry(entry);
|
||||||
|
b_qqqCh->GetEntry(entry);
|
||||||
|
b_qqqE->GetEntry(entry);
|
||||||
|
b_qqqT->GetEntry(entry);
|
||||||
|
|
||||||
|
qqq.CalIndex();
|
||||||
|
|
||||||
|
for (int i = 0; i < qqq.multi; i++)
|
||||||
|
{
|
||||||
|
for (int j = i + 1; j < qqq.multi; j++)
|
||||||
|
{
|
||||||
|
if (qqq.e[i] > 100)
|
||||||
|
qqqEcut = true;
|
||||||
|
if (qqq.id[i] == qqq.id[j])
|
||||||
|
{
|
||||||
|
int chWedge = -1;
|
||||||
|
int chRing = -1;
|
||||||
|
float eWedgeRaw = 0.0;
|
||||||
|
float eWedge = 0.0;
|
||||||
|
float eRingRaw = 0.0;
|
||||||
|
float eRing = 0.0;
|
||||||
|
if (qqq.ch[i] < 16 && qqq.ch[j] >= 16 && /*qqqrGainValid[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16] &&*/ qqqwGainValid[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16])
|
||||||
|
{
|
||||||
|
chWedge = qqq.ch[i];
|
||||||
|
eWedgeRaw = qqq.e[i];
|
||||||
|
eWedge = qqq.e[i] * qqqwGain[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16];
|
||||||
|
// printf("Wedge E: %.2f Gain: %.4f \n", eWedge, qqqGain[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16]);
|
||||||
|
chRing = qqq.ch[j] - 16;
|
||||||
|
eRingRaw = qqq.e[j];
|
||||||
|
eRing = qqq.e[j];// * qqqrGain[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16];
|
||||||
|
}
|
||||||
|
else if (qqq.ch[j] < 16 && qqq.ch[i] >= 16 && /*qqqrGainValid[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16] &&*/ qqqwGainValid[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16])
|
||||||
|
{
|
||||||
|
chWedge = qqq.ch[j];
|
||||||
|
eWedge = qqq.e[j] * qqqwGain[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16];
|
||||||
|
eWedgeRaw = qqq.e[j];
|
||||||
|
|
||||||
|
chRing = qqq.ch[i] - 16;
|
||||||
|
eRing = qqq.e[i];// * qqqrGain[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16];
|
||||||
|
eRingRaw = qqq.e[i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// hQQQFVB->Fill(eWedge, eRing);
|
||||||
|
plotter->Fill2D(Form("hRaw_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 16000, 400, 0, 16000, eWedgeRaw, eRingRaw, "ERaw");
|
||||||
|
plotter->Fill2D(Form("hGM_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 16000, 400, 0, 16000, eWedge, eRing, "EGM");
|
||||||
|
plotter->Fill2D("hRawQQQ", 4000, 0, 16000, 4000, 0, 16000, eWedgeRaw, eRingRaw);
|
||||||
|
plotter->Fill2D("hGMQQQ", 4000, 0, 16000, 4000, 0, 16000, eWedge, eRing);
|
||||||
|
|
||||||
|
TString histName = Form("hQQQFVB_id%d_r%d_w%d", qqq.id[i], chRing, chWedge);
|
||||||
|
// TH2F *hist2d = (TH2F *)gDirectory->Get(histName);
|
||||||
|
// if (!hist2d)
|
||||||
|
// {
|
||||||
|
// hist2d = new TH2F(histName, Form("QQQ Det%d R%d W%d;Wedge E;Ring E", qqq.id[i], chRing, chWedge), 400, 0, 16000, 400, 0, 16000);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// hist2d->Fill(eWedge, eRing);
|
||||||
|
// if (cut && cut->IsInside(eWedge, eRing))
|
||||||
|
const double MIN_ADC = 1500.0;
|
||||||
|
const double MAX_ADC = 3000.0;
|
||||||
|
|
||||||
|
// if (eWedge >= MIN_ADC && eWedge <= MAX_ADC &&
|
||||||
|
// eRing >= MIN_ADC && eRing <= MAX_ADC)
|
||||||
|
double ratio = (eWedge > 0.0) ? (eRing / eWedge) : 0.0;
|
||||||
|
|
||||||
|
double maxslope = 1.5;
|
||||||
|
|
||||||
|
bool validPoint = false;
|
||||||
|
if (ratio < maxslope && ratio > 1. / maxslope)
|
||||||
|
{
|
||||||
|
// Accumulate data for gain matching
|
||||||
|
dataPoints[{qqq.id[i], chRing, chWedge}].emplace_back(eWedge, eRing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CalibrationQQQ::Terminate()
|
||||||
|
{
|
||||||
|
const double AM241_PEAK = 5485.56;
|
||||||
|
const double P_PEAK = 7000; // keV
|
||||||
|
|
||||||
|
double calibArray[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{0}}};
|
||||||
|
bool calibValid[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{false}}};
|
||||||
|
|
||||||
|
std::ofstream outFile("qqq_Calib.dat");
|
||||||
|
if (!outFile.is_open())
|
||||||
|
{
|
||||||
|
std::cerr << "Error opening qqq_Calib.dat!" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// 1. Create per–channel 1D spectra in ADC from stored gain-matched data
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
std::map<std::tuple<int, int, int>, TH1F *> spectra;
|
||||||
|
|
||||||
|
for (auto &kv : dataPoints)
|
||||||
|
{
|
||||||
|
int det, ring, wedge;
|
||||||
|
std::tie(det, ring, wedge) = kv.first;
|
||||||
|
|
||||||
|
TString hname = Form("hSpec_d%d_r%d_w%d", det, ring, wedge);
|
||||||
|
TH1F *h = new TH1F(hname, hname, 4000, 0, 16000);
|
||||||
|
|
||||||
|
for (auto &p : kv.second)
|
||||||
|
{
|
||||||
|
double eWedge = p.first; // already gain-matched ADC
|
||||||
|
double eRing = p.second;
|
||||||
|
|
||||||
|
// Use ring ADC for calibration (cleaner alpha peak)
|
||||||
|
h->Fill(eRing);
|
||||||
|
}
|
||||||
|
|
||||||
|
spectra[kv.first] = h;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// 2. Fit Am-241 peak and extract keV/ADC calibration slope
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
for (auto &kv : spectra)
|
||||||
|
{
|
||||||
|
int det, ring, wedge;
|
||||||
|
std::tie(det, ring, wedge) = kv.first;
|
||||||
|
TH1F *h = kv.second;
|
||||||
|
|
||||||
|
if (!h || h->GetEntries() < 50)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
int binMax = h->GetMaximumBin();
|
||||||
|
double adcPeak = h->GetXaxis()->GetBinCenter(binMax);
|
||||||
|
|
||||||
|
if (adcPeak <= 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
double slope_keV = AM241_PEAK / adcPeak; // keV per ADC
|
||||||
|
// double slope_keV = P_PEAK / adcPeak; // keV per ADC
|
||||||
|
|
||||||
|
calibArray[det][ring][wedge] = slope_keV;
|
||||||
|
calibValid[det][ring][wedge] = true;
|
||||||
|
|
||||||
|
outFile << det << " " << wedge << " " << ring << " "
|
||||||
|
<< slope_keV << "\n";
|
||||||
|
|
||||||
|
// printf("QQQ DET=%d R=%d W=%d ADCpeak=%.1f slope_keV=%.6f\n",det, ring, wedge, adcPeak, slope_keV);
|
||||||
|
}
|
||||||
|
|
||||||
|
outFile.close();
|
||||||
|
std::cout << "Wrote QQQ calibration file qqq_Calib.dat\n";
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// 3. Build fully calibrated 2D combined histogram
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
TH2F *hCal = new TH2F("hCal",
|
||||||
|
"All QQQ Calibrated;Wedge Energy (keV);Ring Energy (keV)",
|
||||||
|
800, 0, 7000,
|
||||||
|
800, 0, 7000);
|
||||||
|
|
||||||
|
for (auto &kv : dataPoints)
|
||||||
|
{
|
||||||
|
int det, ring, wedge;
|
||||||
|
std::tie(det, ring, wedge) = kv.first;
|
||||||
|
|
||||||
|
if (!calibValid[det][ring][wedge])
|
||||||
|
continue;
|
||||||
|
|
||||||
|
double slope = calibArray[det][ring][wedge];
|
||||||
|
|
||||||
|
for (auto &p : kv.second)
|
||||||
|
{
|
||||||
|
double eWGM = p.first; // gain matched ADC
|
||||||
|
double eRGM = p.second;
|
||||||
|
|
||||||
|
double eWkeV = eWGM * slope / 1000;
|
||||||
|
double eRkeV = eRGM * slope / 1000;
|
||||||
|
|
||||||
|
hCal->Fill(eWkeV, eRkeV);
|
||||||
|
plotter->Fill2D("hCalQQQ", 4000, 0, 10, 4000, 0, 10, eWkeV, eRkeV);
|
||||||
|
plotter->Fill2D(Form("hRCal_qqq%d", det), 16, 0, 15, 400, 0, 24, ring, eRkeV, "RingCal");
|
||||||
|
plotter->Fill2D(Form("hWCal_qqq%d", det), 16, 0, 15, 400, 0, 24, wedge, eWkeV, "WedgeCal");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plotter->FlushToDisk();
|
||||||
|
std::cout << "Calibrated 2D QQQ histogram saved.\n";
|
||||||
|
}
|
||||||
114
CalibrationQQQ.h
Normal file
114
CalibrationQQQ.h
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
#ifndef CalibrationQQQ_h
|
||||||
|
#define CalibrationQQQ_h
|
||||||
|
|
||||||
|
#include <TROOT.h>
|
||||||
|
#include <TChain.h>
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TSelector.h>
|
||||||
|
|
||||||
|
#include "Armory/ClassDet.h"
|
||||||
|
|
||||||
|
class CalibrationQQQ : public TSelector {
|
||||||
|
public :
|
||||||
|
TTree *fChain; //!pointer to the analyzed TTree or TChain
|
||||||
|
|
||||||
|
// Fixed size dimensions of array or collections stored in the TTree if any.
|
||||||
|
|
||||||
|
// Declaration of leaf types
|
||||||
|
Det sx3;
|
||||||
|
Det qqq;
|
||||||
|
Det pc ;
|
||||||
|
|
||||||
|
ULong64_t evID;
|
||||||
|
UInt_t run;
|
||||||
|
|
||||||
|
// List of branches
|
||||||
|
TBranch *b_eventID; //!
|
||||||
|
TBranch *b_run; //!
|
||||||
|
TBranch *b_sx3Multi; //!
|
||||||
|
TBranch *b_sx3ID; //!
|
||||||
|
TBranch *b_sx3Ch; //!
|
||||||
|
TBranch *b_sx3E; //!
|
||||||
|
TBranch *b_sx3T; //!
|
||||||
|
TBranch *b_qqqMulti; //!
|
||||||
|
TBranch *b_qqqID; //!
|
||||||
|
TBranch *b_qqqCh; //!
|
||||||
|
TBranch *b_qqqE; //!
|
||||||
|
TBranch *b_qqqT; //!
|
||||||
|
TBranch *b_pcMulti; //!
|
||||||
|
TBranch *b_pcID; //!
|
||||||
|
TBranch *b_pcCh; //!
|
||||||
|
TBranch *b_pcE; //!
|
||||||
|
TBranch *b_pcT; //!
|
||||||
|
|
||||||
|
CalibrationQQQ(TTree * /*tree*/ =0) : fChain(0) { }
|
||||||
|
virtual ~CalibrationQQQ() { }
|
||||||
|
virtual Int_t Version() const { return 2; }
|
||||||
|
virtual void Begin(TTree *tree);
|
||||||
|
virtual void SlaveBegin(TTree *tree);
|
||||||
|
virtual void Init(TTree *tree);
|
||||||
|
virtual Bool_t Notify();
|
||||||
|
virtual Bool_t Process(Long64_t entry);
|
||||||
|
virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
|
||||||
|
virtual void SetOption(const char *option) { fOption = option; }
|
||||||
|
virtual void SetObject(TObject *obj) { fObject = obj; }
|
||||||
|
virtual void SetInputList(TList *input) { fInput = input; }
|
||||||
|
virtual TList *GetOutputList() const { return fOutput; }
|
||||||
|
virtual void SlaveTerminate();
|
||||||
|
virtual void Terminate();
|
||||||
|
|
||||||
|
ClassDef(CalibrationQQQ,0);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CalibrationQQQ_cxx
|
||||||
|
void CalibrationQQQ::Init(TTree *tree){
|
||||||
|
|
||||||
|
// Set branch addresses and branch pointers
|
||||||
|
if (!tree) return;
|
||||||
|
fChain = tree;
|
||||||
|
fChain->SetMakeClass(1);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("evID", &evID, &b_eventID);
|
||||||
|
fChain->SetBranchAddress("run", &run, &b_run);
|
||||||
|
|
||||||
|
sx3.SetDetDimension(24,12);
|
||||||
|
qqq.SetDetDimension(4,32);
|
||||||
|
pc.SetDetDimension(2,24);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("sx3Multi", &sx3.multi, &b_sx3Multi);
|
||||||
|
fChain->SetBranchAddress("sx3ID", &sx3.id, &b_sx3ID);
|
||||||
|
fChain->SetBranchAddress("sx3Ch", &sx3.ch, &b_sx3Ch);
|
||||||
|
fChain->SetBranchAddress("sx3E", &sx3.e, &b_sx3E);
|
||||||
|
fChain->SetBranchAddress("sx3T", &sx3.t, &b_sx3T);
|
||||||
|
fChain->SetBranchAddress("qqqMulti", &qqq.multi, &b_qqqMulti);
|
||||||
|
fChain->SetBranchAddress("qqqID", &qqq.id, &b_qqqID);
|
||||||
|
fChain->SetBranchAddress("qqqCh", &qqq.ch, &b_qqqCh);
|
||||||
|
fChain->SetBranchAddress("qqqE", &qqq.e, &b_qqqE);
|
||||||
|
fChain->SetBranchAddress("qqqT", &qqq.t, &b_qqqT);
|
||||||
|
fChain->SetBranchAddress("pcMulti", &pc.multi, &b_pcMulti);
|
||||||
|
fChain->SetBranchAddress("pcID", &pc.id, &b_pcID);
|
||||||
|
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
||||||
|
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
||||||
|
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool_t CalibrationQQQ::Notify(){
|
||||||
|
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CalibrationQQQ::SlaveBegin(TTree * /*tree*/){
|
||||||
|
|
||||||
|
TString option = GetOption();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CalibrationQQQ::SlaveTerminate(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // #ifdef CalibrationQQQ_cxx
|
||||||
124
FitHistogramsWithTSpectrum_Sequential_Improved.C
Normal file
124
FitHistogramsWithTSpectrum_Sequential_Improved.C
Normal file
|
|
@ -0,0 +1,124 @@
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TH1.h>
|
||||||
|
#include <TSpectrum.h>
|
||||||
|
#include <TF1.h>
|
||||||
|
#include <TCanvas.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <iostream>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <fstream>
|
||||||
|
#include <TText.h>
|
||||||
|
|
||||||
|
void FitHistogramsWithTSpectrum_Sequential_Improved() {
|
||||||
|
TFile *inputFile = new TFile("Histograms_anodes.root", "READ");
|
||||||
|
if (!inputFile || inputFile->IsZombie()) {
|
||||||
|
std::cerr << "Error opening the input file!" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TCanvas *c1 = new TCanvas("c1", "Histogram Viewer", 800, 600);
|
||||||
|
|
||||||
|
// Open the output ASCII file to save the centroids
|
||||||
|
std::ofstream outFile("centroids.txt");
|
||||||
|
if (!outFile.is_open()) {
|
||||||
|
std::cerr << "Error opening output file!" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
outFile << "HistogramIndex\tPeakNumber\tCentroid\tAmplitude\tSigma" << std::endl;
|
||||||
|
|
||||||
|
for (int i = 0; i < 24; ++i) {
|
||||||
|
TH1 *histogram = dynamic_cast<TH1*>(inputFile->Get(Form("hCathode_%d", i)));
|
||||||
|
if (!histogram) {
|
||||||
|
std::cerr << "Failed to retrieve histogram_" << i << " from the file." << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set range for peak search
|
||||||
|
double minX = 700;
|
||||||
|
double maxX = 25000;
|
||||||
|
histogram->GetXaxis()->SetRangeUser(minX, maxX);
|
||||||
|
|
||||||
|
// Draw the histogram
|
||||||
|
c1->cd();
|
||||||
|
histogram->Draw();
|
||||||
|
|
||||||
|
// Peak search using TSpectrum
|
||||||
|
const int maxPeaks = 5;
|
||||||
|
TSpectrum spectrumFinder(maxPeaks);
|
||||||
|
int nFound = spectrumFinder.Search(histogram, 2, "", 0.01);
|
||||||
|
|
||||||
|
if (nFound <= 0) {
|
||||||
|
std::cerr << "No peaks found for histogram " << i << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Double_t *xPositions = spectrumFinder.GetPositionX();
|
||||||
|
Double_t *yPositions = spectrumFinder.GetPositionY();
|
||||||
|
std::vector<std::pair<Double_t, Double_t>> peaks;
|
||||||
|
|
||||||
|
// Collect and sort peaks by X position
|
||||||
|
for (int j = 0; j < nFound; ++j) {
|
||||||
|
peaks.emplace_back(xPositions[j], yPositions[j]);
|
||||||
|
}
|
||||||
|
std::sort(peaks.begin(), peaks.end());
|
||||||
|
|
||||||
|
// Fit each peak with a Gaussian
|
||||||
|
for (int j = 0; j < peaks.size(); ++j) {
|
||||||
|
Double_t peakX = peaks[j].first;
|
||||||
|
Double_t peakY = peaks[j].second;
|
||||||
|
Double_t initialAmplitude = peakY; // Better initial guess
|
||||||
|
Double_t initialCentroid = peakX; // Centroid based on peak position
|
||||||
|
Double_t initialSigma = 60.0;
|
||||||
|
// Define Gaussian with initial parameters
|
||||||
|
TF1 *gaussFit = new TF1(Form("gauss_%d", j), "gaus", peakX - 200, peakX + 200);
|
||||||
|
//gaussFit->SetParameters(peakY, peakX, 25.0); // Initial guesses for amplitude, mean, sigma
|
||||||
|
gaussFit->SetParameters(initialAmplitude, initialCentroid, initialSigma);
|
||||||
|
// Perform fit
|
||||||
|
int fitStatus = histogram->Fit(gaussFit, "RQ+");
|
||||||
|
if (fitStatus != 0) {
|
||||||
|
std::cerr << "Fit failed for peak " << j + 1 << " in histogram " << i << std::endl;
|
||||||
|
delete gaussFit;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve fit parameters
|
||||||
|
double amplitude = gaussFit->GetParameter(0);
|
||||||
|
double centroid = gaussFit->GetParameter(1);
|
||||||
|
double sigma = gaussFit->GetParameter(2);
|
||||||
|
double amplitudeError = gaussFit->GetParError(0);
|
||||||
|
double centroidError = gaussFit->GetParError(1);
|
||||||
|
double sigmaError = gaussFit->GetParError(2);
|
||||||
|
|
||||||
|
// Chi-squared value
|
||||||
|
double chi2 = gaussFit->GetChisquare();
|
||||||
|
int ndf = gaussFit->GetNDF();
|
||||||
|
outFile << i << "\t" << j + 1 << "\t" << centroid << std::endl;
|
||||||
|
gaussFit->SetLineColor(kRed);
|
||||||
|
gaussFit->Draw("SAME");
|
||||||
|
TText *text = new TText();
|
||||||
|
text->SetNDC();
|
||||||
|
text->SetTextSize(0.03);
|
||||||
|
text->SetTextColor(kRed);
|
||||||
|
//text->DrawText(0.15, 0.8 - j * 0.05, Form("Peak %d: Amp=%.2f, Mean=%.2f, Sigma=%.2f", j + 1, amplitude, centroid, sigma));
|
||||||
|
text->DrawText(0.15, 0.8 - j * 0.05,
|
||||||
|
Form("Peak %d: Amp=%.2f±%.2f, Mean=%.2f±%.2f, Sigma=%.2f±%.2f, Chi2/NDF=%.2f",
|
||||||
|
j + 1, amplitude, amplitudeError, centroid, centroidError, sigma, sigmaError, chi2 / ndf));
|
||||||
|
// Save results
|
||||||
|
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
delete gaussFit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update canvas for visualization
|
||||||
|
c1->Update();
|
||||||
|
std::cout << "Press Enter to view the next histogram..." << std::endl;
|
||||||
|
c1->WaitPrimitive(); // Wait until Enter is pressed in the ROOT console
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close resources
|
||||||
|
inputFile->Close();
|
||||||
|
outFile.close();
|
||||||
|
delete c1;
|
||||||
|
}
|
||||||
|
|
||||||
309
GainMatchQQQ.C
Normal file
309
GainMatchQQQ.C
Normal file
|
|
@ -0,0 +1,309 @@
|
||||||
|
#define GainMatchQQQ_cxx
|
||||||
|
|
||||||
|
#include "GainMatchQQQ.h"
|
||||||
|
#include <TH2.h>
|
||||||
|
#include <TF1.h>
|
||||||
|
#include <TStyle.h>
|
||||||
|
#include <TCanvas.h>
|
||||||
|
#include <TMath.h>
|
||||||
|
#include <TCutG.h>
|
||||||
|
#include <fstream>
|
||||||
|
#include <utility>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
|
#include <numeric>
|
||||||
|
#include "Armory/HistPlotter.h"
|
||||||
|
#include "TVector3.h"
|
||||||
|
#include "TGraphErrors.h"
|
||||||
|
#include "TF1.h"
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
TH2F *hQQQFVB;
|
||||||
|
HistPlotter *plotter;
|
||||||
|
|
||||||
|
int padID = 0;
|
||||||
|
|
||||||
|
TCutG *cut;
|
||||||
|
std::map<std::tuple<int, int, int>, std::vector<std::pair<double, double>>> dataPoints;
|
||||||
|
|
||||||
|
void GainMatchQQQ::Begin(TTree * /*tree*/)
|
||||||
|
{
|
||||||
|
plotter = new HistPlotter("GainQQQ.root", "TFILE");
|
||||||
|
TString option = GetOption();
|
||||||
|
|
||||||
|
hQQQFVB = new TH2F("hQQQFVB", "QQQ Front vs Back; Front E; Back E", 800, 0, 16000, 800, 0, 16000);
|
||||||
|
|
||||||
|
// Load the TCutG object
|
||||||
|
TFile *cutFile = TFile::Open("qqqcorr.root");
|
||||||
|
if (!cutFile || cutFile->IsZombie())
|
||||||
|
{
|
||||||
|
std::cerr << "Error: Could not open qqqcorr.root" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cut = dynamic_cast<TCutG *>(cutFile->Get("qqqcorr"));
|
||||||
|
if (!cut)
|
||||||
|
{
|
||||||
|
std::cerr << "Error: Could not find TCutG named 'qqqcorr' in qqqcorr.root" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cut->SetName("qqqcorr"); // Ensure the cut has the correct name
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool_t GainMatchQQQ::Process(Long64_t entry)
|
||||||
|
{
|
||||||
|
|
||||||
|
int ringMults[16] = {0};
|
||||||
|
int wedgeMults[16] = {0};
|
||||||
|
std::vector<std::tuple<int, int, int, double, double>> events;
|
||||||
|
|
||||||
|
b_qqqMulti->GetEntry(entry);
|
||||||
|
b_qqqID->GetEntry(entry);
|
||||||
|
b_qqqCh->GetEntry(entry);
|
||||||
|
b_qqqE->GetEntry(entry);
|
||||||
|
b_qqqT->GetEntry(entry);
|
||||||
|
|
||||||
|
qqq.CalIndex();
|
||||||
|
|
||||||
|
for (int i = 0; i < qqq.multi; i++)
|
||||||
|
{
|
||||||
|
for (int j = i + 1; j < qqq.multi; j++)
|
||||||
|
{
|
||||||
|
if (qqq.id[i] == qqq.id[j])
|
||||||
|
{
|
||||||
|
int chWedge = -1;
|
||||||
|
int chRing = -1;
|
||||||
|
float eWedge = 0.0;
|
||||||
|
float eRing = 0.0;
|
||||||
|
if (qqq.ch[i] < 16 && qqq.ch[j] >= 16)
|
||||||
|
{
|
||||||
|
chWedge = qqq.ch[i];
|
||||||
|
eWedge = qqq.e[i];
|
||||||
|
chRing = qqq.ch[j] - 16;
|
||||||
|
eRing = qqq.e[j];
|
||||||
|
}
|
||||||
|
else if (qqq.ch[j] < 16 && qqq.ch[i] >= 16)
|
||||||
|
{
|
||||||
|
chWedge = qqq.ch[j];
|
||||||
|
eWedge = qqq.e[j];
|
||||||
|
chRing = qqq.ch[i] - 16;
|
||||||
|
eRing = qqq.e[i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
ringMults[chRing]++;
|
||||||
|
wedgeMults[chWedge]++;
|
||||||
|
hQQQFVB->Fill(eWedge, eRing);
|
||||||
|
events.emplace_back(qqq.id[i], chRing, chWedge, eRing, eWedge);
|
||||||
|
plotter->Fill2D(Form("hRaw_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 800, 0, 3000, 800, 0, 3000, eWedge, eRing, "hRawQQQ");
|
||||||
|
// double ratio = (eWedge > 0.0) ? (eRing / eWedge) : 0.0;
|
||||||
|
// double maxslope = 1.5;
|
||||||
|
|
||||||
|
// bool validPoint = false;
|
||||||
|
// if (ratio < maxslope && ratio > 1. / maxslope)
|
||||||
|
// {
|
||||||
|
// // Accumulate data for gain matching
|
||||||
|
// dataPoints[{qqq.id[i], chRing, chWedge}].emplace_back(eWedge, eRing);
|
||||||
|
// plotter->Fill2D("hAll_in", 4000, 0, 16000, 4000, 0, 16000, eWedge, eRing);
|
||||||
|
// validPoint = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!validPoint)
|
||||||
|
// {
|
||||||
|
// plotter->Fill2D("hAll_out", 4000, 0, 16000, 4000, 0, 16000, eWedge, eRing);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto tuple : events)
|
||||||
|
{
|
||||||
|
auto [id, chr, chw, er, ew] = tuple;
|
||||||
|
if (ringMults[chr] > 1 || wedgeMults[chw] > 1)
|
||||||
|
continue; // ignore multiplicity > 1 events
|
||||||
|
double ratio = (ew > 0.0) ? (er / ew) : 0.0;
|
||||||
|
double maxslope = 1.5;
|
||||||
|
|
||||||
|
bool validPoint = false;
|
||||||
|
if (ratio < maxslope && ratio > 1. / maxslope)
|
||||||
|
{
|
||||||
|
// Accumulate data for gain matching
|
||||||
|
dataPoints[{id, chr, chw}].emplace_back(ew, er);
|
||||||
|
plotter->Fill2D("hAll_in", 4000, 0, 16000, 4000, 0, 16000, ew, er);
|
||||||
|
validPoint = true;
|
||||||
|
}
|
||||||
|
if (!validPoint)
|
||||||
|
{
|
||||||
|
plotter->Fill2D("hAll_out", 4000, 0, 16000, 4000, 0, 16000, ew, er);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GainMatchQQQ::Terminate()
|
||||||
|
{
|
||||||
|
const int MAX_DET = 4;
|
||||||
|
const int MAX_RING = 16;
|
||||||
|
const int MAX_WEDGE = 16;
|
||||||
|
|
||||||
|
// We store gains locally just for the "corrected" plot,
|
||||||
|
// but the file will output Slopes for the global minimizer.
|
||||||
|
double gainW[MAX_DET][MAX_RING][MAX_WEDGE] = {{{0}}};
|
||||||
|
double gainR[MAX_DET][MAX_RING][MAX_WEDGE] = {{{0}}};
|
||||||
|
bool gainValid[MAX_DET][MAX_RING][MAX_WEDGE] = {{{false}}};
|
||||||
|
|
||||||
|
// Output file for the Minimizer
|
||||||
|
std::ofstream outFile("qqq_GainMatch.dat");
|
||||||
|
|
||||||
|
// Benchmark/Debug file
|
||||||
|
std::ofstream benchFile("benchmark_diff.dat");
|
||||||
|
benchFile << "ID Wedge Ring Chi2NDF Slope SlopeErr" << std::endl;
|
||||||
|
|
||||||
|
if (!outFile.is_open()) { std::cerr << "Error opening output file!" << std::endl; return; }
|
||||||
|
|
||||||
|
const int MIN_POINTS = 50;
|
||||||
|
const int MAX_ITER = 3; // Outlier rejection passes
|
||||||
|
const double CLIP_SIGMA = 2.5; // Sigma threshold for outliers
|
||||||
|
|
||||||
|
for (const auto &kv : dataPoints)
|
||||||
|
{
|
||||||
|
auto key = kv.first;
|
||||||
|
auto [id, ring, wedge] = key;
|
||||||
|
const auto &pts = kv.second;
|
||||||
|
|
||||||
|
if (pts.size() < (size_t)MIN_POINTS) continue;
|
||||||
|
|
||||||
|
std::vector<std::pair<double, double>> current_pts = pts;
|
||||||
|
|
||||||
|
double finalSlope = 0.0;
|
||||||
|
double finalSlopeErr = 0.0;
|
||||||
|
bool converged = false;
|
||||||
|
|
||||||
|
// --- Iterative Fitting ---
|
||||||
|
for (int iter = 0; iter < MAX_ITER; ++iter)
|
||||||
|
{
|
||||||
|
if (current_pts.size() < (size_t)MIN_POINTS) break;
|
||||||
|
|
||||||
|
std::vector<double> x, y, ex, ey;
|
||||||
|
|
||||||
|
for (const auto &p : current_pts)
|
||||||
|
{
|
||||||
|
x.push_back(p.first); // Wedge E
|
||||||
|
y.push_back(p.second); // Ring E
|
||||||
|
ex.push_back(std::sqrt(std::abs(p.first))); // Error in X (Poisson)
|
||||||
|
ey.push_back(std::sqrt(std::abs(p.second))); // Error in Y (Poisson)
|
||||||
|
|
||||||
|
// Sanity check to avoid 0 error
|
||||||
|
if(ex.back() < 1.0) ex.back() = 1.0;
|
||||||
|
if(ey.back() < 1.0) ey.back() = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Create Graph
|
||||||
|
TGraphErrors *gr = new TGraphErrors(current_pts.size(), x.data(), y.data(), ex.data(), ey.data());
|
||||||
|
|
||||||
|
// 3. Fit Linear Function through Origin
|
||||||
|
TF1 *f1= new TF1("calibFit", "[0]*x", 0, 16000);
|
||||||
|
f1->SetParameter(0, 1.0);
|
||||||
|
|
||||||
|
// "Q"=Quiet, "N"=NoDraw, "S"=ResultPtr
|
||||||
|
// We do NOT use "W" (Ignore weights), we want to use the errors we set.
|
||||||
|
int fitStatus = gr->Fit(f1, "QNS");
|
||||||
|
|
||||||
|
if (fitStatus != 0) {
|
||||||
|
delete gr; delete f1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
finalSlope = f1->GetParameter(0);
|
||||||
|
double chi2 = f1->GetChisquare();
|
||||||
|
double ndf = f1->GetNDF();
|
||||||
|
|
||||||
|
// Get the statistical error on the slope
|
||||||
|
double rawErr = f1->GetParError(0);
|
||||||
|
|
||||||
|
// SCALING ERROR:
|
||||||
|
// If Chi2/NDF > 1, the data scatters more than Poisson stats predict.
|
||||||
|
// // We inflate the error by sqrt(Chi2/NDF) to be conservative for the Minimizer.
|
||||||
|
// double redChi2 = (ndf > 0) ? (chi2 / ndf) : 1.0;
|
||||||
|
// double inflation = (redChi2 > 1.0) ? std::sqrt(redChi2) : 1.0;
|
||||||
|
|
||||||
|
// finalSlopeErr = rawErr * inflation;
|
||||||
|
|
||||||
|
// 4. Outlier Rejection
|
||||||
|
if (iter == MAX_ITER - 1) {
|
||||||
|
converged = true;
|
||||||
|
delete gr; delete f1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate Residuals
|
||||||
|
std::vector<double> residuals;
|
||||||
|
double sumSqResid = 0.0;
|
||||||
|
for(size_t k=0; k<current_pts.size(); ++k) {
|
||||||
|
double val = f1->Eval(current_pts[k].first);
|
||||||
|
double res = current_pts[k].second - val;
|
||||||
|
residuals.push_back(res);
|
||||||
|
sumSqResid += res*res;
|
||||||
|
}
|
||||||
|
// double sigma = std::sqrt(sumSqResid / current_pts.size());
|
||||||
|
|
||||||
|
// // Filter
|
||||||
|
// std::vector<std::pair<double, double>> next_pts;
|
||||||
|
// for(size_t k=0; k<current_pts.size(); ++k) {
|
||||||
|
// if(std::abs(residuals[k]) < CLIP_SIGMA * sigma) {
|
||||||
|
// next_pts.push_back(current_pts[k]);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (next_pts.size() == current_pts.size()) {
|
||||||
|
// converged = true;
|
||||||
|
// delete gr; delete f1;
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// current_pts = next_pts;
|
||||||
|
// delete gr; delete f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!converged || finalSlope <= 0) continue;
|
||||||
|
|
||||||
|
// --- Store/Output ---
|
||||||
|
|
||||||
|
// 1. Save locally for the verification plot (hAll)
|
||||||
|
// Approximate local gain for plotting purposes only
|
||||||
|
double gW_local = std::sqrt(finalSlope);
|
||||||
|
double gR_local = 1.0 / gW_local;
|
||||||
|
gainW[id][ring][wedge] = gW_local;
|
||||||
|
gainR[id][ring][wedge] = gR_local;
|
||||||
|
gainValid[id][ring][wedge] = true;
|
||||||
|
|
||||||
|
// 2. Write to File for Minimizer
|
||||||
|
// Format: ID Wedge Ring Slope Error
|
||||||
|
outFile << id << " " << wedge << " " << ring << " " << finalSlope << " " << finalSlopeErr << std::endl;
|
||||||
|
|
||||||
|
// 3. Benchmark Info
|
||||||
|
benchFile << id << " " << wedge << " " << ring << " "
|
||||||
|
<< finalSlope << " " << finalSlopeErr << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
outFile.close();
|
||||||
|
benchFile.close();
|
||||||
|
std::cout << "Gain matching with Errors complete." << std::endl;
|
||||||
|
|
||||||
|
// Plotting the corrected data (Visual check using local approx gains)
|
||||||
|
for (auto &kv : dataPoints)
|
||||||
|
{
|
||||||
|
int id, ring, wedge;
|
||||||
|
std::tie(id, ring, wedge) = kv.first;
|
||||||
|
if (!gainValid[id][ring][wedge]) continue;
|
||||||
|
auto &pts = kv.second;
|
||||||
|
for (auto &pr : pts)
|
||||||
|
{
|
||||||
|
double corrWedge = pr.first * gainW[id][ring][wedge];
|
||||||
|
double corrRing = pr.second * gainR[id][ring][wedge];
|
||||||
|
plotter->Fill2D("hAll", 4000, 0, 16000, 4000, 0, 16000, corrWedge, corrRing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plotter->FlushToDisk();
|
||||||
|
}
|
||||||
114
GainMatchQQQ.h
Normal file
114
GainMatchQQQ.h
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
#ifndef GainMatchQQQ_h
|
||||||
|
#define GainMatchQQQ_h
|
||||||
|
|
||||||
|
#include <TROOT.h>
|
||||||
|
#include <TChain.h>
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TSelector.h>
|
||||||
|
|
||||||
|
#include "Armory/ClassDet.h"
|
||||||
|
|
||||||
|
class GainMatchQQQ : public TSelector {
|
||||||
|
public :
|
||||||
|
TTree *fChain; //!pointer to the analyzed TTree or TChain
|
||||||
|
|
||||||
|
// Fixed size dimensions of array or collections stored in the TTree if any.
|
||||||
|
|
||||||
|
// Declaration of leaf types
|
||||||
|
Det sx3;
|
||||||
|
Det qqq;
|
||||||
|
Det pc ;
|
||||||
|
|
||||||
|
ULong64_t evID;
|
||||||
|
UInt_t run;
|
||||||
|
|
||||||
|
// List of branches
|
||||||
|
TBranch *b_eventID; //!
|
||||||
|
TBranch *b_run; //!
|
||||||
|
TBranch *b_sx3Multi; //!
|
||||||
|
TBranch *b_sx3ID; //!
|
||||||
|
TBranch *b_sx3Ch; //!
|
||||||
|
TBranch *b_sx3E; //!
|
||||||
|
TBranch *b_sx3T; //!
|
||||||
|
TBranch *b_qqqMulti; //!
|
||||||
|
TBranch *b_qqqID; //!
|
||||||
|
TBranch *b_qqqCh; //!
|
||||||
|
TBranch *b_qqqE; //!
|
||||||
|
TBranch *b_qqqT; //!
|
||||||
|
TBranch *b_pcMulti; //!
|
||||||
|
TBranch *b_pcID; //!
|
||||||
|
TBranch *b_pcCh; //!
|
||||||
|
TBranch *b_pcE; //!
|
||||||
|
TBranch *b_pcT; //!
|
||||||
|
|
||||||
|
GainMatchQQQ(TTree * /*tree*/ =0) : fChain(0) { }
|
||||||
|
virtual ~GainMatchQQQ() { }
|
||||||
|
virtual Int_t Version() const { return 2; }
|
||||||
|
virtual void Begin(TTree *tree);
|
||||||
|
virtual void SlaveBegin(TTree *tree);
|
||||||
|
virtual void Init(TTree *tree);
|
||||||
|
virtual Bool_t Notify();
|
||||||
|
virtual Bool_t Process(Long64_t entry);
|
||||||
|
virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
|
||||||
|
virtual void SetOption(const char *option) { fOption = option; }
|
||||||
|
virtual void SetObject(TObject *obj) { fObject = obj; }
|
||||||
|
virtual void SetInputList(TList *input) { fInput = input; }
|
||||||
|
virtual TList *GetOutputList() const { return fOutput; }
|
||||||
|
virtual void SlaveTerminate();
|
||||||
|
virtual void Terminate();
|
||||||
|
|
||||||
|
ClassDef(GainMatchQQQ,0);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GainMatchQQQ_cxx
|
||||||
|
void GainMatchQQQ::Init(TTree *tree){
|
||||||
|
|
||||||
|
// Set branch addresses and branch pointers
|
||||||
|
if (!tree) return;
|
||||||
|
fChain = tree;
|
||||||
|
fChain->SetMakeClass(1);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("evID", &evID, &b_eventID);
|
||||||
|
fChain->SetBranchAddress("run", &run, &b_run);
|
||||||
|
|
||||||
|
sx3.SetDetDimension(24,12);
|
||||||
|
qqq.SetDetDimension(4,32);
|
||||||
|
pc.SetDetDimension(2,24);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("sx3Multi", &sx3.multi, &b_sx3Multi);
|
||||||
|
fChain->SetBranchAddress("sx3ID", &sx3.id, &b_sx3ID);
|
||||||
|
fChain->SetBranchAddress("sx3Ch", &sx3.ch, &b_sx3Ch);
|
||||||
|
fChain->SetBranchAddress("sx3E", &sx3.e, &b_sx3E);
|
||||||
|
fChain->SetBranchAddress("sx3T", &sx3.t, &b_sx3T);
|
||||||
|
fChain->SetBranchAddress("qqqMulti", &qqq.multi, &b_qqqMulti);
|
||||||
|
fChain->SetBranchAddress("qqqID", &qqq.id, &b_qqqID);
|
||||||
|
fChain->SetBranchAddress("qqqCh", &qqq.ch, &b_qqqCh);
|
||||||
|
fChain->SetBranchAddress("qqqE", &qqq.e, &b_qqqE);
|
||||||
|
fChain->SetBranchAddress("qqqT", &qqq.t, &b_qqqT);
|
||||||
|
fChain->SetBranchAddress("pcMulti", &pc.multi, &b_pcMulti);
|
||||||
|
fChain->SetBranchAddress("pcID", &pc.id, &b_pcID);
|
||||||
|
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
||||||
|
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
||||||
|
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool_t GainMatchQQQ::Notify(){
|
||||||
|
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GainMatchQQQ::SlaveBegin(TTree * /*tree*/){
|
||||||
|
|
||||||
|
TString option = GetOption();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GainMatchQQQ::SlaveTerminate(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // #ifdef GainMatchQQQ_cxx
|
||||||
4003
MakeVertex.C
Executable file
4003
MakeVertex.C
Executable file
File diff suppressed because it is too large
Load Diff
133
MakeVertex.h
Normal file
133
MakeVertex.h
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
#ifndef MakeVertex_h
|
||||||
|
#define MakeVertex_h
|
||||||
|
|
||||||
|
#include <TROOT.h>
|
||||||
|
#include <TChain.h>
|
||||||
|
#include <TApplication.h>
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TSelector.h>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <vector> // Required for vectors
|
||||||
|
#include <utility> // Required for std::pair
|
||||||
|
|
||||||
|
#include "Armory/ClassDet.h"
|
||||||
|
#include "Armory/ClassPW.h" // YOU ADDED THIS (Correct! Defines Coord)
|
||||||
|
|
||||||
|
class MakeVertex : public TSelector {
|
||||||
|
public :
|
||||||
|
TTree *fChain; //!pointer to the analyzed TTree or TChain
|
||||||
|
|
||||||
|
// Declaration of leaf types
|
||||||
|
Det sx3;
|
||||||
|
Det qqq;
|
||||||
|
Det pc ;
|
||||||
|
Det misc;
|
||||||
|
|
||||||
|
ULong64_t evID;
|
||||||
|
UInt_t run;
|
||||||
|
|
||||||
|
// List of branches
|
||||||
|
TBranch *b_eventID; //!
|
||||||
|
TBranch *b_run; //!
|
||||||
|
TBranch *b_sx3Multi; //!
|
||||||
|
TBranch *b_sx3ID; //!
|
||||||
|
TBranch *b_sx3Ch; //!
|
||||||
|
TBranch *b_sx3E; //!
|
||||||
|
TBranch *b_sx3T; //!
|
||||||
|
TBranch *b_qqqMulti; //!
|
||||||
|
TBranch *b_qqqID; //!
|
||||||
|
TBranch *b_qqqCh; //!
|
||||||
|
TBranch *b_qqqE; //!
|
||||||
|
TBranch *b_qqqT; //!
|
||||||
|
TBranch *b_pcMulti; //!
|
||||||
|
TBranch *b_pcID; //!
|
||||||
|
TBranch *b_pcCh; //!
|
||||||
|
TBranch *b_pcE; //!
|
||||||
|
TBranch *b_pcT; //!
|
||||||
|
TBranch *b_miscMulti; //!
|
||||||
|
TBranch *b_miscID; //!
|
||||||
|
TBranch *b_miscCh; //!
|
||||||
|
TBranch *b_miscE; //!
|
||||||
|
TBranch *b_miscT; //!
|
||||||
|
TBranch *b_miscTf; //!
|
||||||
|
|
||||||
|
// 1. Geometry Cache
|
||||||
|
Coord Crossover[24][24][2];
|
||||||
|
|
||||||
|
// 2. Persistent Vectors (REQUIRED for the optimized .cxx to work)
|
||||||
|
std::vector<std::pair<int, double>> anodeHits;
|
||||||
|
std::vector<std::pair<int, double>> cathodeHits;
|
||||||
|
std::vector<std::pair<int, double>> corrcatMax;
|
||||||
|
std::vector<std::pair<int, double>> corranoMax;
|
||||||
|
std::vector<double> cathodeTimes;
|
||||||
|
std::vector<double> anodeTimes;
|
||||||
|
|
||||||
|
MakeVertex(TTree * /*tree*/ =0) : fChain(0) { }
|
||||||
|
virtual ~MakeVertex() { }
|
||||||
|
virtual Int_t Version() const { return 2; }
|
||||||
|
virtual void Begin(TTree *tree);
|
||||||
|
virtual void SlaveBegin(TTree *tree);
|
||||||
|
virtual void Init(TTree *tree);
|
||||||
|
virtual Bool_t Notify();
|
||||||
|
virtual Bool_t Process(Long64_t entry);
|
||||||
|
virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
|
||||||
|
virtual void SetOption(const char *option) { fOption = option; }
|
||||||
|
virtual void SetObject(TObject *obj) { fObject = obj; }
|
||||||
|
virtual void SetInputList(TList *input) { fInput = input; }
|
||||||
|
virtual TList *GetOutputList() const { return fOutput; }
|
||||||
|
virtual void SlaveTerminate();
|
||||||
|
virtual void Terminate();
|
||||||
|
|
||||||
|
ClassDef(MakeVertex,0);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MakeVertex_cxx
|
||||||
|
void MakeVertex::Init(TTree *tree){
|
||||||
|
|
||||||
|
if (!tree) return;
|
||||||
|
fChain = tree;
|
||||||
|
fChain->SetMakeClass(1);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("evID", &evID, &b_eventID);
|
||||||
|
fChain->SetBranchAddress("run", &run, &b_run);
|
||||||
|
|
||||||
|
sx3.SetDetDimension(24,12);
|
||||||
|
qqq.SetDetDimension(4,32);
|
||||||
|
pc.SetDetDimension(2,24);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("sx3Multi", &sx3.multi, &b_sx3Multi);
|
||||||
|
fChain->SetBranchAddress("sx3ID", &sx3.id, &b_sx3ID);
|
||||||
|
fChain->SetBranchAddress("sx3Ch", &sx3.ch, &b_sx3Ch);
|
||||||
|
fChain->SetBranchAddress("sx3E", &sx3.e, &b_sx3E);
|
||||||
|
fChain->SetBranchAddress("sx3T", &sx3.t, &b_sx3T);
|
||||||
|
fChain->SetBranchAddress("qqqMulti", &qqq.multi, &b_qqqMulti);
|
||||||
|
fChain->SetBranchAddress("qqqID", &qqq.id, &b_qqqID);
|
||||||
|
fChain->SetBranchAddress("qqqCh", &qqq.ch, &b_qqqCh);
|
||||||
|
fChain->SetBranchAddress("qqqE", &qqq.e, &b_qqqE);
|
||||||
|
fChain->SetBranchAddress("qqqT", &qqq.t, &b_qqqT);
|
||||||
|
fChain->SetBranchAddress("pcMulti", &pc.multi, &b_pcMulti);
|
||||||
|
fChain->SetBranchAddress("pcID", &pc.id, &b_pcID);
|
||||||
|
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
||||||
|
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
||||||
|
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
||||||
|
fChain->SetBranchAddress("miscMulti", &misc.multi, &b_miscMulti);
|
||||||
|
fChain->SetBranchAddress("miscID", &misc.id, &b_miscID);
|
||||||
|
fChain->SetBranchAddress("miscCh", &misc.ch, &b_miscCh);
|
||||||
|
fChain->SetBranchAddress("miscE", &misc.e, &b_miscE);
|
||||||
|
fChain->SetBranchAddress("miscT", &misc.t, &b_miscT);
|
||||||
|
fChain->SetBranchAddress("miscf", &misc.tf, &b_miscTf);
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool_t MakeVertex::Notify(){
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MakeVertex::SlaveBegin(TTree * /*tree*/){
|
||||||
|
// TString option = GetOption();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MakeVertex::SlaveTerminate(){
|
||||||
|
}
|
||||||
|
#endif // #ifdef MakeVertex_cxx
|
||||||
139
MatchAndPlotCentroids.C
Normal file
139
MatchAndPlotCentroids.C
Normal file
|
|
@ -0,0 +1,139 @@
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
#include <iostream>
|
||||||
|
#include <TGraph.h>
|
||||||
|
#include <TF1.h>
|
||||||
|
#include <TCanvas.h>
|
||||||
|
#include <TH1.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void MatchAndPlotCentroids() {
|
||||||
|
// Open the centroid data file
|
||||||
|
std::ifstream inputFile("centroids_27Al.txt");
|
||||||
|
// std::ifstream inputFile("centroids_17F.txt");
|
||||||
|
if (!inputFile.is_open()) {
|
||||||
|
std::cerr << "Error: Could not open Centroids.txt" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Data structure to store centroids by histogram and peak number
|
||||||
|
std::map<int, std::map<int, double>> centroidData;
|
||||||
|
|
||||||
|
// Read data from the file
|
||||||
|
std::string line;
|
||||||
|
while (std::getline(inputFile, line)) {
|
||||||
|
std::istringstream iss(line);
|
||||||
|
int histogramIndex, peakNumber;
|
||||||
|
double centroid;
|
||||||
|
if (iss >> histogramIndex >> peakNumber >> centroid) {
|
||||||
|
centroidData[histogramIndex][peakNumber] = centroid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inputFile.close();
|
||||||
|
|
||||||
|
// Ensure histogram 24 exists and has data
|
||||||
|
if (centroidData.find(1) == centroidData.end()) {
|
||||||
|
std::cerr << "Error: Histogram 0 not found in the data!" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reference centroids from histogram 24
|
||||||
|
const auto& referenceCentroids = centroidData[1];
|
||||||
|
std::ofstream outputFile("slope_intercept_results.dat");
|
||||||
|
if (!outputFile.is_open()) {
|
||||||
|
std::cerr << "Error: Could not open the output file for writing!" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
outputFile << "Histogram Number\tSlope\tIntercept\n";
|
||||||
|
// Loop through histograms 25 to 47
|
||||||
|
|
||||||
|
// 1. Create a SINGLE canvas BEFORE the loop
|
||||||
|
TCanvas *c1 = new TCanvas("c1", "Centroid Fit Viewer", 800, 600);
|
||||||
|
|
||||||
|
for (int targetHist = 0; targetHist <= 23; targetHist++) {
|
||||||
|
// Ensure the target histogram exists and matches in peak numbers
|
||||||
|
if (centroidData.find(targetHist) == centroidData.end() || centroidData[targetHist].size() != referenceCentroids.size()) {
|
||||||
|
//4th cnetroid data point for 19 was generated using the 3 datqa points for the slope of wires 0 and 19
|
||||||
|
std::cout << "Skipping Histogram " << targetHist << " due to mismatched or missing data." << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prepare x and y values for TGraph
|
||||||
|
std::vector<double> xValues, yValues;
|
||||||
|
for (const auto& [peakNumber, refCentroid] : referenceCentroids) {
|
||||||
|
if (centroidData[targetHist].find(peakNumber) != centroidData[targetHist].end()) {
|
||||||
|
yValues.push_back(refCentroid);
|
||||||
|
xValues.push_back(centroidData[targetHist][peakNumber]);
|
||||||
|
} else {
|
||||||
|
std::cerr << "Warning: Peak " << peakNumber << " missing in histogram " << targetHist << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xValues.size() < 3) {
|
||||||
|
std::cout << "Skipping Histogram " << targetHist << " as it has less than 3 matching centroids." << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a TGraph
|
||||||
|
TGraph *graph = new TGraph(xValues.size(), &xValues[0], &yValues[0]);
|
||||||
|
graph->SetTitle(Form("Centroid of Histogram %d vs 1", targetHist));
|
||||||
|
graph->GetYaxis()->SetTitle("Centroid of Histogram 1");
|
||||||
|
graph->GetXaxis()->SetTitle(Form("Centroid of Histogram %d", targetHist));
|
||||||
|
graph->SetMarkerStyle(20);
|
||||||
|
graph->SetMarkerSize(1.0);
|
||||||
|
graph->SetMarkerColor(kBlue);
|
||||||
|
|
||||||
|
graph->Draw("AP");
|
||||||
|
// Draw the graph
|
||||||
|
graph->Draw("AP");
|
||||||
|
double minX = *std::min_element(xValues.begin(), xValues.end());
|
||||||
|
double maxX = *std::max_element(xValues.begin(), xValues.end());
|
||||||
|
// Fit the data with a linear function
|
||||||
|
TF1 *fitLine = new TF1("fitLine", "pol1", minX, maxX); // Adjust range as needed
|
||||||
|
fitLine->SetLineColor(kRed); // Set the line color to distinguish it
|
||||||
|
fitLine->SetLineWidth(2); // Thicker line for visibility
|
||||||
|
graph->Fit(fitLine, "M");
|
||||||
|
fitLine->Draw("same");
|
||||||
|
fitLine->SetParLimits(0, -10, 10); // Limit intercept between -10 and 10
|
||||||
|
fitLine->SetParLimits(1, 0, 2);
|
||||||
|
// Extract slope and intercept
|
||||||
|
double slope = fitLine->GetParameter(1);
|
||||||
|
double intercept = fitLine->GetParameter(0);
|
||||||
|
outputFile << targetHist << "\t" << slope << "\t" << intercept << "\n";
|
||||||
|
std::cout << "Histogram 24 vs " << targetHist << ": Slope = " << slope << ", Intercept = " << intercept << std::endl;
|
||||||
|
std::vector<double> residuals;
|
||||||
|
for (size_t i = 0; i < xValues.size(); ++i) {
|
||||||
|
double fittedY = fitLine->Eval(xValues[i]); // Evaluate fitted function at x
|
||||||
|
double residual = yValues[i] - fittedY; // Residual = observed - fitted
|
||||||
|
residuals.push_back(residual);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a graph for the residuals
|
||||||
|
/*TGraph *residualGraph = new TGraph(residuals.size(), &xValues[0], &residuals[0]);
|
||||||
|
residualGraph->SetTitle(Form("Residuals for Histogram 24 vs %d", targetHist));
|
||||||
|
residualGraph->GetYaxis()->SetTitle("Residuals");
|
||||||
|
residualGraph->GetXaxis()->SetTitle(Form("Centroid of Histogram %d", targetHist));
|
||||||
|
residualGraph->SetMarkerStyle(20);
|
||||||
|
residualGraph->SetMarkerSize(1.0);
|
||||||
|
residualGraph->SetMarkerColor(kGreen);
|
||||||
|
|
||||||
|
// Draw the residuals plot below the original plot (can be on a new canvas if preferred)
|
||||||
|
TCanvas *c2 = new TCanvas(Form("c_residuals_24_vs_%d", targetHist), Form("Residuals for Centroid 24 vs %d", targetHist), 800, 400);
|
||||||
|
residualGraph->Draw("AP");*/
|
||||||
|
c1->Update();
|
||||||
|
//c2->Update();
|
||||||
|
std::cout << "Press Enter to continue..." << std::endl;
|
||||||
|
|
||||||
|
//std::cin.get();
|
||||||
|
c1->WaitPrimitive();
|
||||||
|
//c2->WaitPrimitive();
|
||||||
|
//std::cin.get();
|
||||||
|
//std::cin.get();
|
||||||
|
}
|
||||||
|
outputFile.close();
|
||||||
|
std::cout << "Results written to slope_intercept_results.txt" << std::endl;
|
||||||
|
}
|
||||||
454
PCGainMatch.C
Normal file
454
PCGainMatch.C
Normal file
|
|
@ -0,0 +1,454 @@
|
||||||
|
#define PCGainMatch_cxx
|
||||||
|
|
||||||
|
#include "PCGainMatch.h"
|
||||||
|
#include <TH2.h>
|
||||||
|
#include <TStyle.h>
|
||||||
|
#include <TCanvas.h>
|
||||||
|
#include <TMath.h>
|
||||||
|
#include <TCutG.h>
|
||||||
|
#include <utility>
|
||||||
|
#include <algorithm>
|
||||||
|
#include "Armory/ClassSX3.h"
|
||||||
|
#include "Armory/ClassPW.h"
|
||||||
|
|
||||||
|
#include "TVector3.h"
|
||||||
|
|
||||||
|
TH2F * hsx3IndexVE;
|
||||||
|
TH2F * hqqqIndexVE;
|
||||||
|
TH2F * hpcIndexVE;
|
||||||
|
|
||||||
|
TH2F * hsx3Coin;
|
||||||
|
TH2F * hqqqCoin;
|
||||||
|
TH2F * hpcCoin;
|
||||||
|
|
||||||
|
TH2F * hqqqPolar;
|
||||||
|
TH2F * hsx3VpcIndex;
|
||||||
|
TH2F * hqqqVpcIndex;
|
||||||
|
TH2F * hqqqVpcE;
|
||||||
|
TH2F * hsx3VpcE;
|
||||||
|
TH2F * hanVScatsum;
|
||||||
|
TH2F * hanVScatsum_a[24];
|
||||||
|
TH2F * hanVScatsum_hcut;
|
||||||
|
TH2F * hanVScatsum_lcut;
|
||||||
|
TH2F * hAnodeHits;
|
||||||
|
TH1F * hAnodeMultiplicity;
|
||||||
|
|
||||||
|
|
||||||
|
int padID = 0;
|
||||||
|
|
||||||
|
SX3 sx3_contr;
|
||||||
|
PW pw_contr;
|
||||||
|
TVector3 hitPos;
|
||||||
|
bool HitNonZero;
|
||||||
|
|
||||||
|
TH1F * hZProj;
|
||||||
|
TCutG *AnCatSum_high;
|
||||||
|
TCutG *AnCatSum_low;
|
||||||
|
TCutG *PCCoinc_cut1;
|
||||||
|
TCutG *PCCoinc_cut2;
|
||||||
|
bool inCuth;
|
||||||
|
bool inCutl;
|
||||||
|
bool inPCCut;
|
||||||
|
|
||||||
|
void PCGainMatch::Begin(TTree * /*tree*/){
|
||||||
|
TString option = GetOption();
|
||||||
|
|
||||||
|
hsx3IndexVE = new TH2F("hsx3IndexVE", "SX3 index vs Energy; sx3 index ; Energy", 24*12, 0, 24*12, 400, 0, 5000); hsx3IndexVE->SetNdivisions( -612, "x");
|
||||||
|
hqqqIndexVE = new TH2F("hqqqIndexVE", "QQQ index vs Energy; QQQ index ; Energy", 4*2*16, 0, 4*2*16, 400, 0, 5000); hqqqIndexVE->SetNdivisions( -1204, "x");
|
||||||
|
hpcIndexVE = new TH2F("hpcIndexVE", "PC index vs Energy; PC index ; Energy", 2*24, 0, 2*24, 800, 0, 16000); hpcIndexVE->SetNdivisions( -1204, "x");
|
||||||
|
|
||||||
|
|
||||||
|
hsx3Coin = new TH2F("hsx3Coin", "SX3 Coincident", 24*12, 0, 24*12, 24*12, 0, 24*12);
|
||||||
|
hqqqCoin = new TH2F("hqqqCoin", "QQQ Coincident", 4*2*16, 0, 4*2*16, 4*2*16, 0, 4*2*16);
|
||||||
|
hpcCoin = new TH2F("hpcCoin", "PC Coincident", 2*24, 0, 2*24, 2*24, 0, 2*24);
|
||||||
|
|
||||||
|
hqqqPolar = new TH2F("hqqqPolar", "QQQ Polar ID", 16*4, -TMath::Pi(), TMath::Pi(),16, 10, 50);
|
||||||
|
|
||||||
|
hsx3VpcIndex = new TH2F("hsx3Vpcindex", "sx3 vs pc; sx3 index; pc index", 24*12, 0, 24*12, 48, 0, 48);
|
||||||
|
hsx3VpcIndex->SetNdivisions( -612, "x");
|
||||||
|
hsx3VpcIndex->SetNdivisions( -12, "y");
|
||||||
|
hqqqVpcIndex = new TH2F("hqqqVpcindex", "qqq vs pc; qqq index; pc index", 4*2*16, 0, 4*2*16, 48, 0, 48);
|
||||||
|
hqqqVpcIndex->SetNdivisions( -612, "x");
|
||||||
|
hqqqVpcIndex->SetNdivisions( -12, "y");
|
||||||
|
|
||||||
|
hqqqVpcE = new TH2F("hqqqVpcEnergy", "qqq vs pc; qqq energy; pc energy", 400, 0, 5000, 400, 0, 5000);
|
||||||
|
hqqqVpcE->SetNdivisions( -612, "x");
|
||||||
|
hqqqVpcE->SetNdivisions( -12, "y");
|
||||||
|
|
||||||
|
hsx3VpcE = new TH2F("hsx3VpcEnergy", "sx3 vs pc; sx3 energy; pc energy", 400, 0, 5000, 400, 0, 5000);
|
||||||
|
hsx3VpcE->SetNdivisions( -612, "x");
|
||||||
|
hsx3VpcE->SetNdivisions( -12, "y");
|
||||||
|
|
||||||
|
hZProj = new TH1F("hZProj", "Nos of anodes", 20, 0, 19);
|
||||||
|
hAnodeHits = new TH2F("hAnodeHits", "Anode vs Anode Energy, Anode ID; Anode E", 24,0 , 23, 400, 0 , 20000);
|
||||||
|
hAnodeMultiplicity = new TH1F("hAnodeMultiplicity", "Number of Anodes/Event", 40, 0, 40);
|
||||||
|
hanVScatsum = new TH2F("hanVScatsum", "Anode vs Cathode Sum; Anode E; Cathode E", 400,0 , 10000, 800, 0 , 16000);
|
||||||
|
for (int i = 0; i < 24; i++) {
|
||||||
|
TString histName = Form("hAnodeVsCathode_%d", i);
|
||||||
|
TString histTitle = Form("Anode %d vs Cathode Sum; Anode E; Cathode Sum E", i);
|
||||||
|
hanVScatsum_a[i] = new TH2F(histName, histTitle, 400, 0, 10000, 400, 0, 16000);
|
||||||
|
}
|
||||||
|
hanVScatsum_lcut = new TH2F("hanVScatsum_LCUT", "Anode vs Cathode Sum; Anode E; Cathode E", 400,0 , 16000, 400, 0 , 16000);
|
||||||
|
hanVScatsum_hcut = new TH2F("hanVScatsum_HCUT", "Anode vs Cathode Sum; Anode E; Cathode E", 400,0 , 16000, 400, 0 , 16000);
|
||||||
|
|
||||||
|
sx3_contr.ConstructGeo();
|
||||||
|
pw_contr.ConstructGeo();
|
||||||
|
// TFile *f1 = new TFile("AnCatSum_high.root");
|
||||||
|
// TFile *f2 = new TFile("AnCatSum_low.root");
|
||||||
|
// TFile *f3 = new TFile("PCCoinc_cut1.root");
|
||||||
|
// TFile *f4 = new TFile("PCCoinc_cut2.root");
|
||||||
|
// AnCatSum_high= (TCutG*)f1->Get("AnCatSum_high");
|
||||||
|
// AnCatSum_low= (TCutG*)f2->Get("AnCatSum_low");
|
||||||
|
// PCCoinc_cut1= (TCutG*)f3->Get("PCCoinc_cut1");
|
||||||
|
// PCCoinc_cut2= (TCutG*)f4->Get("PCCoinc_cut2");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Bool_t PCGainMatch::Process(Long64_t entry){
|
||||||
|
// if (entry % 1000000 == 0) {
|
||||||
|
// std::cout << "Processing entry: " << entry << std::endl;
|
||||||
|
// }
|
||||||
|
// if ( entry > 100 ) return kTRUE;
|
||||||
|
|
||||||
|
hitPos.Clear();
|
||||||
|
HitNonZero = false;
|
||||||
|
|
||||||
|
// if( entry > 1) return kTRUE;
|
||||||
|
// printf("################### ev : %llu \n", entry);
|
||||||
|
|
||||||
|
b_sx3Multi->GetEntry(entry);
|
||||||
|
b_sx3ID->GetEntry(entry);
|
||||||
|
b_sx3Ch->GetEntry(entry);
|
||||||
|
b_sx3E->GetEntry(entry);
|
||||||
|
b_sx3T->GetEntry(entry);
|
||||||
|
b_qqqMulti->GetEntry(entry);
|
||||||
|
b_qqqID->GetEntry(entry);
|
||||||
|
b_qqqCh->GetEntry(entry);
|
||||||
|
b_qqqE->GetEntry(entry);
|
||||||
|
b_qqqT->GetEntry(entry);
|
||||||
|
b_pcMulti->GetEntry(entry);
|
||||||
|
b_pcID->GetEntry(entry);
|
||||||
|
b_pcCh->GetEntry(entry);
|
||||||
|
b_pcE->GetEntry(entry);
|
||||||
|
b_pcT->GetEntry(entry);
|
||||||
|
|
||||||
|
sx3.CalIndex();
|
||||||
|
qqq.CalIndex();
|
||||||
|
pc.CalIndex();
|
||||||
|
|
||||||
|
// sx3.Print();
|
||||||
|
|
||||||
|
//########################################################### Raw data
|
||||||
|
|
||||||
|
// //======================= PC
|
||||||
|
|
||||||
|
std::vector<std::pair<int, double>> anodeHits={};
|
||||||
|
std::vector<std::pair<int, double>> cathodeHits={};
|
||||||
|
int aID = 0;
|
||||||
|
int cID = 0;
|
||||||
|
float aE = 0;
|
||||||
|
float cE = 0;
|
||||||
|
|
||||||
|
// Define the excluded SX3 and QQQ channels
|
||||||
|
// std::unordered_set<int> excludeSX3 = {34, 35, 36, 37, 61, 62, 67, 73, 74, 75, 76, 77, 78, 79, 80, 93, 97, 100, 103, 108, 109, 110, 111, 112};
|
||||||
|
// std::unordered_set<int> excludeQQQ = {0, 17, 109, 110, 111, 112, 113, 119, 127, 128};
|
||||||
|
// inCuth=false;
|
||||||
|
// inCutl=false;
|
||||||
|
// inPCCut=false;
|
||||||
|
for( int i = 0; i < pc.multi; i ++){
|
||||||
|
|
||||||
|
if(pc.e[i]>50 && pc.multi<7){
|
||||||
|
|
||||||
|
float aESum = 0;
|
||||||
|
float cESum = 0;
|
||||||
|
if (pc.index[i] < 24 ) {
|
||||||
|
anodeHits.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
|
||||||
|
} else if (pc.index[i] >= 24) {
|
||||||
|
cathodeHits.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int j=i+1;j<pc.multi;j++){
|
||||||
|
// if(PCCoinc_cut1->IsInside(pc.index[i], pc.index[j]) || PCCoinc_cut2->IsInside(pc.index[i], pc.index[j])){
|
||||||
|
// // hpcCoin->Fill(pc.index[i], pc.index[j]);
|
||||||
|
// inPCCut = true;
|
||||||
|
// }
|
||||||
|
hpcCoin->Fill(pc.index[i], pc.index[j]);
|
||||||
|
}
|
||||||
|
if (anodeHits.size()==1 && cathodeHits.size() >= 1) {
|
||||||
|
|
||||||
|
for (const auto& anode : anodeHits) {
|
||||||
|
// for(int l=0; l<sx3.multi; l++){
|
||||||
|
// if (sx3.index[l]==80){
|
||||||
|
|
||||||
|
aID = anode.first;
|
||||||
|
aE = anode.second;
|
||||||
|
aESum += aE;
|
||||||
|
// printf("aID : %d, aE : %f\n", aID, aE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// printf("aID : %d, aE : %f, cE : %f\n", aID, aE, cE);
|
||||||
|
for (const auto& cathode : cathodeHits) {
|
||||||
|
cID = cathode.first;
|
||||||
|
cE = cathode.second;
|
||||||
|
// if(cE>cEMax){
|
||||||
|
// cEMax = cE;
|
||||||
|
// cIDMax = cID;
|
||||||
|
// }
|
||||||
|
// if(cE>cEnextMax && cE<cEMax){
|
||||||
|
// cEnextMax = cE;
|
||||||
|
// cIDnextMax = cID;
|
||||||
|
// }
|
||||||
|
|
||||||
|
cESum += cE;
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
|
// inCuth = false;
|
||||||
|
// inCutl = false;
|
||||||
|
// inPCCut = false;
|
||||||
|
// for(int j=i+1;j<pc.multi;j++){
|
||||||
|
// if(PCCoinc_cut1->IsInside(pc.index[i], pc.index[j]) || PCCoinc_cut2->IsInside(pc.index[i], pc.index[j])){
|
||||||
|
// // hpcCoin->Fill(pc.index[i], pc.index[j]);
|
||||||
|
// inPCCut = true;
|
||||||
|
// }
|
||||||
|
// hpcCoin->Fill(pc.index[i], pc.index[j]);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Check if the accumulated energies are within the defined ranges
|
||||||
|
// if (AnCatSum_high && AnCatSum_high->IsInside(aESum, cESum)) {
|
||||||
|
// inCuth = true;
|
||||||
|
// }
|
||||||
|
// if (AnCatSum_low && AnCatSum_low->IsInside(aESum, cESum)) {
|
||||||
|
// inCutl = true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Fill histograms based on the cut conditions
|
||||||
|
// if (inCuth && inPCCut) {
|
||||||
|
// hanVScatsum_hcut->Fill(aESum, cESum);
|
||||||
|
// }
|
||||||
|
// if (inCutl && inPCCut) {
|
||||||
|
// hanVScatsum_lcut->Fill(aESum, cESum);
|
||||||
|
// }
|
||||||
|
// for(auto anode : anodeHits){
|
||||||
|
|
||||||
|
// float aE = anode.second;
|
||||||
|
// aESum += aE;
|
||||||
|
// if(inPCCut){
|
||||||
|
hanVScatsum->Fill(aESum, cESum);
|
||||||
|
// }
|
||||||
|
if (aID < 24 && aE > 50) {
|
||||||
|
hanVScatsum_a[aID]->Fill(aE, cESum);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
// Fill histograms for the `pc` data
|
||||||
|
hpcIndexVE->Fill(pc.index[i], pc.e[i]);
|
||||||
|
// if(inPCCut){
|
||||||
|
hAnodeMultiplicity->Fill(anodeHits.size());
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// //======================= SX3
|
||||||
|
|
||||||
|
std::vector<std::pair<int, int>> ID; // first = id, 2nd = index
|
||||||
|
for( int i = 0; i < sx3.multi; i ++){
|
||||||
|
if(sx3.e[i]>50){
|
||||||
|
ID.push_back(std::pair<int, int>(sx3.id[i], i));
|
||||||
|
hsx3IndexVE->Fill( sx3.index[i], sx3.e[i] );
|
||||||
|
|
||||||
|
for( int j = i+1; j < sx3.multi; j++){
|
||||||
|
hsx3Coin->Fill( sx3.index[i], sx3.index[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for( int j = 0; j < pc.multi; j++){
|
||||||
|
hsx3VpcIndex->Fill( sx3.index[i], pc.index[j] );
|
||||||
|
// if( sx3.ch[index] > 8 ){
|
||||||
|
// hsx3VpcE->Fill( sx3.e[i], pc.e[j] );
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if( ID.size() > 0 ){
|
||||||
|
std::sort(ID.begin(), ID.end(), [](const std::pair<int, int> & a, const std::pair<int, int> & b) {
|
||||||
|
return a.first < b.first;
|
||||||
|
} );
|
||||||
|
// printf("##############################\n");
|
||||||
|
// for( size_t i = 0; i < ID.size(); i++) printf("%zu | %d %d \n", i, ID[i].first, ID[i].second );
|
||||||
|
|
||||||
|
std::vector<std::pair<int, int>> sx3ID;
|
||||||
|
sx3ID.push_back(ID[0]);
|
||||||
|
bool found = false;
|
||||||
|
for( size_t i = 1; i < ID.size(); i++){
|
||||||
|
if( ID[i].first == sx3ID.back().first) {
|
||||||
|
sx3ID.push_back(ID[i]);
|
||||||
|
if( sx3ID.size() >= 3) {
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if( !found ){
|
||||||
|
sx3ID.clear();
|
||||||
|
sx3ID.push_back(ID[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// printf("---------- sx3ID Multi : %zu \n", sx3ID.size());
|
||||||
|
|
||||||
|
if( found ){
|
||||||
|
int sx3ChUp, sx3ChDn, sx3ChBk;
|
||||||
|
float sx3EUp, sx3EDn;
|
||||||
|
// printf("------ sx3 ID : %d, multi: %zu\n", sx3ID[0].first, sx3ID.size());
|
||||||
|
for( size_t i = 0; i < sx3ID.size(); i++ ){
|
||||||
|
int index = sx3ID[i].second;
|
||||||
|
// printf(" %zu | index %d | ch : %d, energy : %d \n", i, index, sx3.ch[index], sx3.e[index]);
|
||||||
|
|
||||||
|
|
||||||
|
if( sx3.ch[index] < 8 ){
|
||||||
|
if( sx3.ch[index] % 2 == 0) {
|
||||||
|
sx3ChDn = sx3.ch[index];
|
||||||
|
sx3EDn = sx3.e[index];
|
||||||
|
}else{
|
||||||
|
sx3ChUp = sx3.ch[index];
|
||||||
|
sx3EUp = sx3.e[index];
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
sx3ChBk = sx3.ch[index];
|
||||||
|
}
|
||||||
|
for( int j = 0; j < pc.multi; j++){
|
||||||
|
|
||||||
|
// hsx3VpcIndex->Fill( sx3.index[i], pc.index[j] );
|
||||||
|
if( sx3.ch[index] > 8 && pc.index[j]<24 && pc.e[j]>50 ){
|
||||||
|
hsx3VpcE->Fill( sx3.e[i], pc.e[j] );
|
||||||
|
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sx3_contr.CalSX3Pos(sx3ID[0].first, sx3ChUp, sx3ChDn, sx3ChBk, sx3EUp, sx3EDn);
|
||||||
|
hitPos = sx3_contr.GetHitPos();
|
||||||
|
HitNonZero = true;
|
||||||
|
// hitPos.Print();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// //======================= QQQ
|
||||||
|
for( int i = 0; i < qqq.multi; i ++){
|
||||||
|
|
||||||
|
// for( int j = 0; j < pc.multi; j++){
|
||||||
|
if(qqq.e[i]>50 ){
|
||||||
|
hqqqIndexVE->Fill( qqq.index[i], qqq.e[i] );
|
||||||
|
for( int j = 0; j < qqq.multi; j++){
|
||||||
|
if ( j == i ) continue;
|
||||||
|
hqqqCoin->Fill( qqq.index[i], qqq.index[j]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for( int j = i + 1; j < qqq.multi; j++){
|
||||||
|
for( int k = 0; k < pc.multi; k++){
|
||||||
|
// if(qqq.e[i>50]){
|
||||||
|
hqqqVpcE->Fill( qqq.e[i], pc.e[k] );
|
||||||
|
hqqqVpcIndex->Fill( qqq.index[i], pc.index[j] );
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
// hanVScatsum->Fill(aE,cE);
|
||||||
|
|
||||||
|
|
||||||
|
if( HitNonZero){
|
||||||
|
pw_contr.CalTrack( hitPos, aID, cID);
|
||||||
|
hZProj->Fill(pw_contr.GetZ0());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//########################################################### Track constrcution
|
||||||
|
|
||||||
|
|
||||||
|
//############################## DO THE KINEMATICS
|
||||||
|
|
||||||
|
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PCGainMatch::Terminate(){
|
||||||
|
|
||||||
|
gStyle->SetOptStat("neiou");
|
||||||
|
TCanvas * canvas = new TCanvas("cANASEN", "ANASEN", 2000, 2000);
|
||||||
|
canvas->Divide(3,3);
|
||||||
|
|
||||||
|
//hsx3VpcIndex->Draw("colz");
|
||||||
|
|
||||||
|
//=============================================== pad-1
|
||||||
|
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
|
hsx3IndexVE->Draw("colz");
|
||||||
|
|
||||||
|
//=============================================== pad-2
|
||||||
|
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
|
hqqqIndexVE->Draw("colz");
|
||||||
|
|
||||||
|
//=============================================== pad-3
|
||||||
|
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
|
hpcIndexVE->Draw("colz");
|
||||||
|
|
||||||
|
//=============================================== pad-4
|
||||||
|
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
|
hsx3Coin->Draw("colz");
|
||||||
|
|
||||||
|
//=============================================== pad-5
|
||||||
|
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
|
canvas->cd(padID)->SetLogz(true);
|
||||||
|
|
||||||
|
hqqqCoin->Draw("colz");
|
||||||
|
|
||||||
|
//=============================================== pad-6
|
||||||
|
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
|
hpcCoin->Draw("colz");
|
||||||
|
|
||||||
|
//=============================================== pad-7
|
||||||
|
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
|
// hsx3VpcIndex ->Draw("colz");
|
||||||
|
hsx3VpcE->Draw("colz") ;
|
||||||
|
|
||||||
|
//=============================================== pad-8
|
||||||
|
padID ++; canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
||||||
|
|
||||||
|
// hqqqVpcIndex ->Draw("colz");
|
||||||
|
|
||||||
|
hqqqVpcE ->Draw("colz");
|
||||||
|
//=============================================== pad-9
|
||||||
|
padID ++;
|
||||||
|
|
||||||
|
// canvas->cd(padID)->DrawFrame(-50, -50, 50, 50);
|
||||||
|
// hqqqPolar->Draw("same colz pol");
|
||||||
|
|
||||||
|
canvas->cd(padID); canvas->cd(padID)->SetGrid(1);
|
||||||
|
hanVScatsum->Draw("colz");
|
||||||
|
// hAnodeHits->Draw("colz");
|
||||||
|
// hAnodeMultiplicity->Draw();
|
||||||
|
}
|
||||||
114
PCGainMatch.h
Normal file
114
PCGainMatch.h
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
#ifndef PCGainMatch_h
|
||||||
|
#define PCGainMatch_h
|
||||||
|
|
||||||
|
#include <TROOT.h>
|
||||||
|
#include <TChain.h>
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TSelector.h>
|
||||||
|
|
||||||
|
#include "Armory/ClassDet.h"
|
||||||
|
|
||||||
|
class PCGainMatch : public TSelector {
|
||||||
|
public :
|
||||||
|
TTree *fChain; //!pointer to the analyzed TTree or TChain
|
||||||
|
|
||||||
|
// Fixed size dimensions of array or collections stored in the TTree if any.
|
||||||
|
|
||||||
|
// Declaration of leaf types
|
||||||
|
Det sx3;
|
||||||
|
Det qqq;
|
||||||
|
Det pc ;
|
||||||
|
|
||||||
|
ULong64_t evID;
|
||||||
|
UInt_t run;
|
||||||
|
|
||||||
|
// List of branches
|
||||||
|
TBranch *b_eventID; //!
|
||||||
|
TBranch *b_run; //!
|
||||||
|
TBranch *b_sx3Multi; //!
|
||||||
|
TBranch *b_sx3ID; //!
|
||||||
|
TBranch *b_sx3Ch; //!
|
||||||
|
TBranch *b_sx3E; //!
|
||||||
|
TBranch *b_sx3T; //!
|
||||||
|
TBranch *b_qqqMulti; //!
|
||||||
|
TBranch *b_qqqID; //!
|
||||||
|
TBranch *b_qqqCh; //!
|
||||||
|
TBranch *b_qqqE; //!
|
||||||
|
TBranch *b_qqqT; //!
|
||||||
|
TBranch *b_pcMulti; //!
|
||||||
|
TBranch *b_pcID; //!
|
||||||
|
TBranch *b_pcCh; //!
|
||||||
|
TBranch *b_pcE; //!
|
||||||
|
TBranch *b_pcT; //!
|
||||||
|
|
||||||
|
PCGainMatch(TTree * /*tree*/ =0) : fChain(0) { }
|
||||||
|
virtual ~PCGainMatch() { }
|
||||||
|
virtual Int_t Version() const { return 2; }
|
||||||
|
virtual void Begin(TTree *tree);
|
||||||
|
virtual void SlaveBegin(TTree *tree);
|
||||||
|
virtual void Init(TTree *tree);
|
||||||
|
virtual Bool_t Notify();
|
||||||
|
virtual Bool_t Process(Long64_t entry);
|
||||||
|
virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
|
||||||
|
virtual void SetOption(const char *option) { fOption = option; }
|
||||||
|
virtual void SetObject(TObject *obj) { fObject = obj; }
|
||||||
|
virtual void SetInputList(TList *input) { fInput = input; }
|
||||||
|
virtual TList *GetOutputList() const { return fOutput; }
|
||||||
|
virtual void SlaveTerminate();
|
||||||
|
virtual void Terminate();
|
||||||
|
|
||||||
|
ClassDef(PCGainMatch,0);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PCGainMatch_cxx
|
||||||
|
void PCGainMatch::Init(TTree *tree){
|
||||||
|
|
||||||
|
// Set branch addresses and branch pointers
|
||||||
|
if (!tree) return;
|
||||||
|
fChain = tree;
|
||||||
|
fChain->SetMakeClass(1);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("evID", &evID, &b_eventID);
|
||||||
|
fChain->SetBranchAddress("run", &run, &b_run);
|
||||||
|
|
||||||
|
sx3.SetDetDimension(24,12);
|
||||||
|
qqq.SetDetDimension(4,32);
|
||||||
|
pc.SetDetDimension(2,24);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("sx3Multi", &sx3.multi, &b_sx3Multi);
|
||||||
|
fChain->SetBranchAddress("sx3ID", &sx3.id, &b_sx3ID);
|
||||||
|
fChain->SetBranchAddress("sx3Ch", &sx3.ch, &b_sx3Ch);
|
||||||
|
fChain->SetBranchAddress("sx3E", &sx3.e, &b_sx3E);
|
||||||
|
fChain->SetBranchAddress("sx3T", &sx3.t, &b_sx3T);
|
||||||
|
fChain->SetBranchAddress("qqqMulti", &qqq.multi, &b_qqqMulti);
|
||||||
|
fChain->SetBranchAddress("qqqID", &qqq.id, &b_qqqID);
|
||||||
|
fChain->SetBranchAddress("qqqCh", &qqq.ch, &b_qqqCh);
|
||||||
|
fChain->SetBranchAddress("qqqE", &qqq.e, &b_qqqE);
|
||||||
|
fChain->SetBranchAddress("qqqT", &qqq.t, &b_qqqT);
|
||||||
|
fChain->SetBranchAddress("pcMulti", &pc.multi, &b_pcMulti);
|
||||||
|
fChain->SetBranchAddress("pcID", &pc.id, &b_pcID);
|
||||||
|
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
||||||
|
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
||||||
|
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool_t PCGainMatch::Notify(){
|
||||||
|
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PCGainMatch::SlaveBegin(TTree * /*tree*/){
|
||||||
|
|
||||||
|
TString option = GetOption();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PCGainMatch::SlaveTerminate(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // #ifdef Analyzer_cxx
|
||||||
|
|
@ -1,27 +1,38 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$#" -ne 2 ]; then
|
if [ "$#" -ne 3 ]; then
|
||||||
echo "Usage: $0 runID timeWindow_ns"
|
echo "Usage: $0 runID timeWindow_ns option"
|
||||||
|
echo "option: 0 - process raw data, 1 - process mapped data"
|
||||||
echo "Exiting..."
|
echo "Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
runID=$1
|
runID=$(printf "%03d" $1)
|
||||||
timeWindow=$2
|
timeWindow=$2
|
||||||
|
|
||||||
rawFolder=/home/tandem/Desktop/analysis/data
|
option=$3
|
||||||
rootFolder=/home/tandem/Desktop/analysis/data/root_data
|
|
||||||
|
|
||||||
rsync -a splitpole@128.186.111.223:/media/nvmeData/ANASEN27Alap/*.fsu /home/tandem/Desktop/analysis/data
|
# rawFolder=/home/tandem/data1/2024_09_17Fap/data
|
||||||
|
# rawFolder=/mnt/d/17F
|
||||||
|
# rootFolder=/mnt/d/Remapped_files/17F_data/root_data
|
||||||
|
# rawFolder=/mnt/data1/vs19g/2024_06_27Al
|
||||||
|
# rootFolder=/home/vs19g/Desktop/27Al_Data/root_data
|
||||||
|
rawFolder=/mnt/data1/vs19g/2024_09_17Fap/data
|
||||||
|
rootFolder=/home/vs19g/Desktop/17F_Data/root_data
|
||||||
|
|
||||||
fileList=`\ls -1 ${rawFolder}/Run_${runID}_*.fsu`
|
if [ $option -eq 0 ]; then
|
||||||
|
|
||||||
./EventBuilder ${timeWindow} 0 0 10000000 ${fileList}
|
# rsync -auh --info=progress2 splitpole@128.186.111.223:/media/nvmeData/2024_09_17Fap/*.fsu /home/tandem/data1/2024_09_17Fap/data
|
||||||
|
|
||||||
outFile=${rawFolder}/*${runID}*${timeWindow}.root
|
fileList=`\ls -1 ${rawFolder}/*Run*_${runID}_*.fsu`
|
||||||
|
|
||||||
mv -vf ${outFile} ${rootFolder}/.
|
time ./EventBuilder ${timeWindow} 0 0 100000000 ${fileList}
|
||||||
|
|
||||||
./Mapper ${rootFolder}/*${runID}*${timeWindow}.root
|
outFile=${rawFolder}/*${runID}*${timeWindow}.root
|
||||||
|
|
||||||
root "processRun.C(\"${rootFolder}/Run_${runID}_mapped.root\")"
|
mv -vf ${outFile} ${rootFolder}/.
|
||||||
|
|
||||||
|
time ./Mapper ${rootFolder}/*${runID}*${timeWindow}.root
|
||||||
|
fi
|
||||||
|
|
||||||
|
# root "processRun.C(\"${rootFolder}/Run_${runID}_mapped.root\")"
|
||||||
|
|
|
||||||
167
QQQ_Calcheck.C
Normal file
167
QQQ_Calcheck.C
Normal file
|
|
@ -0,0 +1,167 @@
|
||||||
|
|
||||||
|
#define QQQ_Calcheck_cxx
|
||||||
|
|
||||||
|
#include <TH2.h>
|
||||||
|
#include <TF1.h>
|
||||||
|
#include <TStyle.h>
|
||||||
|
#include <TCanvas.h>
|
||||||
|
#include <TMath.h>
|
||||||
|
#include <TCutG.h>
|
||||||
|
#include <fstream>
|
||||||
|
#include <utility>
|
||||||
|
#include <algorithm>
|
||||||
|
#include "Armory/HistPlotter.h"
|
||||||
|
#include "TVector3.h"
|
||||||
|
#include "QQQ_Calcheck.h"
|
||||||
|
|
||||||
|
TH2F *hQQQFVB;
|
||||||
|
HistPlotter *plotter;
|
||||||
|
int padID = 0;
|
||||||
|
|
||||||
|
TCutG *cut;
|
||||||
|
std::map<std::tuple<int, int, int>, std::vector<std::pair<double, double>>> dataPoints;
|
||||||
|
|
||||||
|
bool qqqEcut = false;
|
||||||
|
|
||||||
|
// Gain Arrays
|
||||||
|
const int MAX_QQQ = 4;
|
||||||
|
const int MAX_RING = 16;
|
||||||
|
const int MAX_WEDGE = 16;
|
||||||
|
double qqqwGain[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{0}}};
|
||||||
|
double qqqrGain[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{0}}};
|
||||||
|
bool qqqwGainValid[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{false}}};
|
||||||
|
bool qqqrGainValid[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{false}}};
|
||||||
|
double qqqCalib[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{0}}};
|
||||||
|
bool qqqCalibValid[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{false}}};
|
||||||
|
|
||||||
|
void QQQ_Calcheck::Begin(TTree * /*tree*/)
|
||||||
|
{
|
||||||
|
plotter = new HistPlotter("Cal_checkQQQ.root", "TFILE");
|
||||||
|
// ----------------------- Load QQQ Gains
|
||||||
|
{
|
||||||
|
std::string filename = "qqq_GainMatch.dat";
|
||||||
|
std::ifstream infile(filename);
|
||||||
|
if (!infile.is_open())
|
||||||
|
{
|
||||||
|
std::cerr << "Error opening " << filename << "!" << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int det, ring, wedge;
|
||||||
|
double gainw,gainr;
|
||||||
|
while (infile >> det >> ring >> wedge >> gainw>> gainr)
|
||||||
|
{
|
||||||
|
qqqwGain[det][ring][wedge] = gainw;
|
||||||
|
// qqqrGain[det][ring][wedge] = gainr;
|
||||||
|
qqqwGainValid[det][ring][wedge] = (gainw > 0);
|
||||||
|
// qqqrGainValid[det][ring][wedge] = (gainr > 0);
|
||||||
|
}
|
||||||
|
infile.close();
|
||||||
|
std::cout << "Loaded QQQ gains from " << filename << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----------------------- Load QQQ Calibrations
|
||||||
|
{
|
||||||
|
std::string filename = "qqq_Calib.dat";
|
||||||
|
std::ifstream infile(filename);
|
||||||
|
if (!infile.is_open())
|
||||||
|
{
|
||||||
|
std::cerr << "Error opening " << filename << "!" << std::endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int det, ring, wedge;
|
||||||
|
double slope;
|
||||||
|
while (infile >> det >> ring >> wedge >> slope)
|
||||||
|
{
|
||||||
|
qqqCalib[det][ring][wedge] = slope;
|
||||||
|
qqqCalibValid[det][ring][wedge] = (slope > 0);
|
||||||
|
}
|
||||||
|
infile.close();
|
||||||
|
std::cout << "Loaded QQQ calibrations from " << filename << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool_t QQQ_Calcheck::Process(Long64_t entry)
|
||||||
|
{
|
||||||
|
b_qqqMulti->GetEntry(entry);
|
||||||
|
b_qqqID->GetEntry(entry);
|
||||||
|
b_qqqCh->GetEntry(entry);
|
||||||
|
b_qqqE->GetEntry(entry);
|
||||||
|
b_qqqT->GetEntry(entry);
|
||||||
|
|
||||||
|
qqq.CalIndex();
|
||||||
|
|
||||||
|
for (int i = 0; i < qqq.multi; i++)
|
||||||
|
{
|
||||||
|
for (int j = i + 1; j < qqq.multi; j++)
|
||||||
|
{
|
||||||
|
if (qqq.e[i] > 100)
|
||||||
|
qqqEcut = true;
|
||||||
|
if (qqq.id[i] == qqq.id[j])
|
||||||
|
{
|
||||||
|
int chWedge = -1;
|
||||||
|
int chRing = -1;
|
||||||
|
float eWedgeRaw = 0.0;
|
||||||
|
float eWedge = 0.0;
|
||||||
|
float eWedgeMeV = 0.0;
|
||||||
|
float eRingRaw = 0.0;
|
||||||
|
float eRing = 0.0;
|
||||||
|
float eRingMeV = 0.0;
|
||||||
|
// plug in gains
|
||||||
|
if (qqq.ch[i] < 16 && qqq.ch[j] >= 16 && /*qqqrGainValid[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16] &&*/ qqqwGainValid[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16])
|
||||||
|
{
|
||||||
|
chWedge = qqq.ch[i];
|
||||||
|
eWedgeRaw = qqq.e[i];
|
||||||
|
eWedge = qqq.e[i] * qqqwGain[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16];
|
||||||
|
// printf("Wedge E: %.2f Gain: %.4f \n", eWedge, qqqGain[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16]);
|
||||||
|
chRing = qqq.ch[j] - 16;
|
||||||
|
eRingRaw = qqq.e[j];
|
||||||
|
eRing = qqq.e[j];//* qqqrGain[qqq.id[j]][qqq.ch[j]][qqq.ch[i]-16];
|
||||||
|
}
|
||||||
|
else if (qqq.ch[j] < 16 && qqq.ch[i] >= 16/* && qqqrGainValid[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16] */&& qqqwGainValid[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16])
|
||||||
|
{
|
||||||
|
chWedge = qqq.ch[j];
|
||||||
|
eWedge = qqq.e[j] * qqqwGain[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16];
|
||||||
|
eWedgeRaw = qqq.e[j];
|
||||||
|
|
||||||
|
chRing = qqq.ch[i] - 16;
|
||||||
|
eRing = qqq.e[i];// * qqqrGain[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16];
|
||||||
|
eRingRaw = qqq.e[i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
// plug in calibrations
|
||||||
|
if (qqqCalibValid[qqq.id[i]][chWedge][chRing])
|
||||||
|
{
|
||||||
|
eWedgeMeV = eWedge * qqqCalib[qqq.id[i]][chWedge][chRing] / 1000;
|
||||||
|
eRingMeV = eRing * qqqCalib[qqq.id[i]][chWedge][chRing] / 1000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// hQQQFVB->Fill(eWedge, eRing);
|
||||||
|
plotter->Fill2D(Form("hRaw_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 8000, 400, 0, 8000, eWedgeRaw, eRingRaw, "ERaw");
|
||||||
|
plotter->Fill2D(Form("hGM_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 16000, 400, 0, 16000, eWedge, eRing, "EGM");
|
||||||
|
plotter->Fill2D(Form("hCal_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 10, 400, 0, 10, eWedgeMeV, eRingMeV, "ECal");
|
||||||
|
if(eWedgeRaw >1500 && eRingRaw>1500 )
|
||||||
|
plotter->Fill2D(Form("hCal_cut_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 10, 400, 0, 10, eWedgeMeV, eRingMeV, "ECal_cut");
|
||||||
|
|
||||||
|
plotter->Fill2D(Form("hRCal_qqq%d", qqq.id[i]), 16, 0, 15, 1000, 0, 30, chRing, eRingMeV, "RingCal");
|
||||||
|
plotter->Fill2D(Form("hWCal_qqq%d", qqq.id[i]), 16, 0, 15, 1000, 0, 30, chWedge, eWedgeMeV, "WedgeCal");
|
||||||
|
plotter->Fill2D("hRawQQQ", 4000, 0, 8000, 4000, 0, 8000, eWedgeRaw, eRingRaw);
|
||||||
|
plotter->Fill2D("hGMQQQ", 4000, 0, 8000, 4000, 0, 8000, eWedge, eRing);
|
||||||
|
plotter->Fill2D("hCalQQQ", 4000, 0, 10, 4000, 0, 10, eWedgeMeV, eRingMeV);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QQQ_Calcheck::Terminate()
|
||||||
|
{
|
||||||
|
plotter->FlushToDisk();
|
||||||
|
std::cout << "Calibration check file for 2D QQQ histogram saved.\n";
|
||||||
|
}
|
||||||
114
QQQ_Calcheck.h
Normal file
114
QQQ_Calcheck.h
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
#ifndef QQQ_Calcheck_h
|
||||||
|
#define QQQ_Calcheck_h
|
||||||
|
|
||||||
|
#include <TROOT.h>
|
||||||
|
#include <TChain.h>
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TSelector.h>
|
||||||
|
|
||||||
|
#include "Armory/ClassDet.h"
|
||||||
|
|
||||||
|
class QQQ_Calcheck : public TSelector {
|
||||||
|
public :
|
||||||
|
TTree *fChain; //!pointer to the analyzed TTree or TChain
|
||||||
|
|
||||||
|
// Fixed size dimensions of array or collections stored in the TTree if any.
|
||||||
|
|
||||||
|
// Declaration of leaf types
|
||||||
|
Det sx3;
|
||||||
|
Det qqq;
|
||||||
|
Det pc ;
|
||||||
|
|
||||||
|
ULong64_t evID;
|
||||||
|
UInt_t run;
|
||||||
|
|
||||||
|
// List of branches
|
||||||
|
TBranch *b_eventID; //!
|
||||||
|
TBranch *b_run; //!
|
||||||
|
TBranch *b_sx3Multi; //!
|
||||||
|
TBranch *b_sx3ID; //!
|
||||||
|
TBranch *b_sx3Ch; //!
|
||||||
|
TBranch *b_sx3E; //!
|
||||||
|
TBranch *b_sx3T; //!
|
||||||
|
TBranch *b_qqqMulti; //!
|
||||||
|
TBranch *b_qqqID; //!
|
||||||
|
TBranch *b_qqqCh; //!
|
||||||
|
TBranch *b_qqqE; //!
|
||||||
|
TBranch *b_qqqT; //!
|
||||||
|
TBranch *b_pcMulti; //!
|
||||||
|
TBranch *b_pcID; //!
|
||||||
|
TBranch *b_pcCh; //!
|
||||||
|
TBranch *b_pcE; //!
|
||||||
|
TBranch *b_pcT; //!
|
||||||
|
|
||||||
|
QQQ_Calcheck(TTree * /*tree*/ =0) : fChain(0) { }
|
||||||
|
virtual ~QQQ_Calcheck() { }
|
||||||
|
virtual Int_t Version() const { return 2; }
|
||||||
|
virtual void Begin(TTree *tree);
|
||||||
|
virtual void SlaveBegin(TTree *tree);
|
||||||
|
virtual void Init(TTree *tree);
|
||||||
|
virtual Bool_t Notify();
|
||||||
|
virtual Bool_t Process(Long64_t entry);
|
||||||
|
virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
|
||||||
|
virtual void SetOption(const char *option) { fOption = option; }
|
||||||
|
virtual void SetObject(TObject *obj) { fObject = obj; }
|
||||||
|
virtual void SetInputList(TList *input) { fInput = input; }
|
||||||
|
virtual TList *GetOutputList() const { return fOutput; }
|
||||||
|
virtual void SlaveTerminate();
|
||||||
|
virtual void Terminate();
|
||||||
|
|
||||||
|
ClassDef(QQQ_Calcheck,0);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef QQQ_Calcheck_cxx
|
||||||
|
void QQQ_Calcheck::Init(TTree *tree){
|
||||||
|
|
||||||
|
// Set branch addresses and branch pointers
|
||||||
|
if (!tree) return;
|
||||||
|
fChain = tree;
|
||||||
|
fChain->SetMakeClass(1);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("evID", &evID, &b_eventID);
|
||||||
|
fChain->SetBranchAddress("run", &run, &b_run);
|
||||||
|
|
||||||
|
sx3.SetDetDimension(24,12);
|
||||||
|
qqq.SetDetDimension(4,32);
|
||||||
|
pc.SetDetDimension(2,24);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("sx3Multi", &sx3.multi, &b_sx3Multi);
|
||||||
|
fChain->SetBranchAddress("sx3ID", &sx3.id, &b_sx3ID);
|
||||||
|
fChain->SetBranchAddress("sx3Ch", &sx3.ch, &b_sx3Ch);
|
||||||
|
fChain->SetBranchAddress("sx3E", &sx3.e, &b_sx3E);
|
||||||
|
fChain->SetBranchAddress("sx3T", &sx3.t, &b_sx3T);
|
||||||
|
fChain->SetBranchAddress("qqqMulti", &qqq.multi, &b_qqqMulti);
|
||||||
|
fChain->SetBranchAddress("qqqID", &qqq.id, &b_qqqID);
|
||||||
|
fChain->SetBranchAddress("qqqCh", &qqq.ch, &b_qqqCh);
|
||||||
|
fChain->SetBranchAddress("qqqE", &qqq.e, &b_qqqE);
|
||||||
|
fChain->SetBranchAddress("qqqT", &qqq.t, &b_qqqT);
|
||||||
|
fChain->SetBranchAddress("pcMulti", &pc.multi, &b_pcMulti);
|
||||||
|
fChain->SetBranchAddress("pcID", &pc.id, &b_pcID);
|
||||||
|
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
||||||
|
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
||||||
|
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool_t QQQ_Calcheck::Notify(){
|
||||||
|
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QQQ_Calcheck::SlaveBegin(TTree * /*tree*/){
|
||||||
|
|
||||||
|
TString option = GetOption();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void QQQ_Calcheck::SlaveTerminate(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // #ifdef QQQ_Calcheck_cxx
|
||||||
238
README.md
Normal file
238
README.md
Normal file
|
|
@ -0,0 +1,238 @@
|
||||||
|
# ANASEN Analysis
|
||||||
|
|
||||||
|
Analysis code for the **Array for Nuclear Astrophysics and Structure with Exotic Nuclei (ANASEN)** detector at FSU. Processes raw .fsu data through event building, channel mapping, calibration, and physics-level vertex reconstruction for transfer reaction experiments.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Detector Overview
|
||||||
|
|
||||||
|
| Detector | Type | Role |
|
||||||
|
|----------|------|------|
|
||||||
|
| **SX3** | Double-sided silicon strip (barrel, ~88 mm radius) | Energy and Z-position of recoils/ejectiles |
|
||||||
|
| **QQQ** | Annular silicon (forward, z = 100 mm) | Energy and polar angle of forward-going particles |
|
||||||
|
| **PC** | Helical proportional counter | dE and azimuthal/Z position via 24 anode + 24 cathode wires |
|
||||||
|
|
||||||
|
The PC uses 24 twisted anode wires and 24 cathode wires. Wire geometry, crossover positions, pseudo-wire interpolation, and track-plane intersection are all handled by `Armory/ClassPW.h`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Full Analysis Chain
|
||||||
|
|
||||||
|
```
|
||||||
|
Raw .fsu files (FSU digitizer output)
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
┌─────────────────────────────────────────────────────────────────┐
|
||||||
|
│ 1. EVENT BUILDING │
|
||||||
|
│ Binary: EventBuilder (Armory/EventBuilder.cpp) │
|
||||||
|
│ Script: buildEvents.sh or ProcessRun.sh <run> <tw> 0 │
|
||||||
|
│ Input : *.fsu files │
|
||||||
|
│ Output: Run_NNN_<timeWindow>ns.root (raw, unmapped TTree) │
|
||||||
|
│ Hits within a configurable time window are grouped as events. │
|
||||||
|
└─────────────────────────────────────────────────────────────────┘
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
┌─────────────────────────────────────────────────────────────────┐
|
||||||
|
│ 3. PRE-ANALYSIS CHECKS (optional) │
|
||||||
|
│ Macro: PreAnalysis.C │
|
||||||
|
│ Plots raw rates and energy spectra per channel from unmapped │
|
||||||
|
│ data — useful for identifying dead/noisy channels before │
|
||||||
|
│ mapping. │
|
||||||
|
└─────────────────────────────────────────────────────────────────┘
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
┌─────────────────────────────────────────────────────────────────┐
|
||||||
|
│ 2. CHANNEL MAPPING │
|
||||||
|
│ Binary: Mapper (Armory/Mapper.cpp) │
|
||||||
|
│ Script: ProcessRun.sh <run> <tw> 0 (calls Mapper internally) │
|
||||||
|
│ Config: mapping.h │
|
||||||
|
│ Input : Eventbuilt ROOT tree │
|
||||||
|
│ Output: Run_NNN_mapped.root │
|
||||||
|
│ Translates hardware (digitizer SN, channel) to logical │
|
||||||
|
│ detector identity (SX3/QQQ/PC, strip/wire number). │
|
||||||
|
└─────────────────────────────────────────────────────────────────┘
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
┌─────────────────────────────────────────────────────────────────┐
|
||||||
|
│ 4. CALIBRATION │
|
||||||
|
│ │
|
||||||
|
| SX3 — two-pass procedure: │
|
||||||
|
│ Pass 1 — Left/Right matching (sx3cal/LRFit.C) │
|
||||||
|
│ │ Start with unity gains: │
|
||||||
|
│ │ LRFit.C fits the left/right charge ratio │
|
||||||
|
│ │ Collate per-detector results into a single rightgains.dat │
|
||||||
|
| │ │
|
||||||
|
│ Pass 2 — Back/Front gain matching (sx3cal/EXFit.C) │
|
||||||
|
│ │ Run on data that is unity-gain sorted but L/R matched │
|
||||||
|
│ │ EXFit.C : │
|
||||||
|
│ │ 1) gain-matches the back strips (backgains.dat) │
|
||||||
|
│ │ 2) corrects dynamic range non-linearity in the fronts │
|
||||||
|
│ │ (frontgains.dat) │
|
||||||
|
│ │ Run for every detector, collate into master backgains.dat │
|
||||||
|
│ │ and frontgains.dat. │
|
||||||
|
│ │ |
|
||||||
|
│ ├── GainMatchQQQ.C │
|
||||||
|
│ │ QQQ ring/wedge gain matching │
|
||||||
|
│ │ Output: qqq_GainMatch.dat │
|
||||||
|
│ ├── CalibrationQQQ.C │
|
||||||
|
│ │ Final absolute energy calibration for all detectors │
|
||||||
|
│ │ Output: qqq_Calib.dat │
|
||||||
|
│ ├── PCGainMatch.C │
|
||||||
|
│ │ PC anode and cathode gain matching │
|
||||||
|
│ │ Output: slope_intercept_*.dat │
|
||||||
|
│ ├── FitHistogramsWithTSpectrum_Sequential_Improved.C │
|
||||||
|
│ │ Automated peak finding on PC wire spectra │
|
||||||
|
│ │ done separately for anodes and cathodes then combined │
|
||||||
|
│ │ (TSpectrum-based; writes centroids for gain match) │
|
||||||
|
│ └──QQQ_Calcheck.C │
|
||||||
|
│ Verifies QQQ calibration against known sources │
|
||||||
|
└─────────────────────────────────────────────────────────────────┘
|
||||||
|
│
|
||||||
|
▼
|
||||||
|
┌─────────────────────────────────────────────────────────────────┐
|
||||||
|
│ 5. VERTEX RECONSTRUCTION (MakeVertex) │
|
||||||
|
│ Macro : MakeVertex.C (ROOT TSelector) │
|
||||||
|
│ Batch : run_sx3.sh (choose dataset, wireflip and offset) │
|
||||||
|
│ Input : Run_NNN_mapped.root │
|
||||||
|
│ Output: result_runNNN.root (calibrated TTree │
|
||||||
|
│ + diagnostic histograms) │
|
||||||
|
│ Applies energy calibrations, reconstructs PC hit positions │
|
||||||
|
│ (anode energy + cathode charge division), clusters wires, │
|
||||||
|
│ and builds SX3/QQQ/PC event objects. │
|
||||||
|
│ 3D track-reconstruction diagnostics using │
|
||||||
|
│ PC wire geometry and Si hit positions. │
|
||||||
|
└─────────────────────────────────────────────────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Channel Mapping (`mapping.h` / `mapping_alpha.h`)
|
||||||
|
|
||||||
|
The Mapper binary reads the raw TTree (digitizer serial number + channel) and rewrites it with logical detector labels. `mapping.h` is used for standard beam runs; `mapping_alpha.h` for source/alpha calibration runs where the electronics configuration differs. The active mapping is selected by editing the `#include` at the top of `Armory/Mapper.cpp` before building.
|
||||||
|
|
||||||
|
`PrintMapping()` (defined in the mapping header) prints the full channel table at runtime for verification.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MakeVertex — Vertex Reconstruction
|
||||||
|
|
||||||
|
`MakeVertex.C` is a ROOT `TSelector` that loops over the analyzed event tree and fills diagnostic and physics histograms. It loads energy-loss lookup tables from `eloss_calculations/` and uses `Armory/Kinematics.h` for two-body reaction kinematics.
|
||||||
|
|
||||||
|
### Diagnostic Section Toggles
|
||||||
|
|
||||||
|
Comment out any `#define` at the top of `MakeVertex.C` to skip that block at compile time:
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
#define DIAG_WIREMULT // anode/cathode cluster multiplicity plots
|
||||||
|
#define DIAG_1WIRE // raw per-wire dE vs Si (no PC required)
|
||||||
|
#define DIAG_PC_SX3 // PC-SX3 coincidence analysis
|
||||||
|
#define DIAG_1A0C_SX3 // 1A0C single-wire vertex with SX3
|
||||||
|
#define DIAG_1A0C_QQQ // 1A0C single-wire vertex with QQQ
|
||||||
|
#define DIAG_NA0C_SX3 // nA0C (n>=2) pseudo-wire vertex with SX3
|
||||||
|
#define DIAG_NA0C_QQQ // nA0C (n>=2) pseudo-wire vertex with QQQ
|
||||||
|
#define DIAG_PC_QQQ // PC-QQQ coincidence analysis
|
||||||
|
```
|
||||||
|
|
||||||
|
### Histogram Output Folders
|
||||||
|
|
||||||
|
| ROOT Folder | Content |
|
||||||
|
|-------------|---------|
|
||||||
|
| `wiremult` | Anode/cathode cluster size and multiplicity matrices |
|
||||||
|
| `1wire` | Raw single-wire dE vs SX3/QQQ energy and phi correlations |
|
||||||
|
| `hTiming` | PC-Si timing spectra |
|
||||||
|
| `hPCZSX3` | PC-Z reconstruction with SX3 coincidence |
|
||||||
|
| `hPCzQQQ` | PC-Z projection with QQQ coincidence |
|
||||||
|
| `1A0C`,`2A0C`, `3A0C`, … | n anodes (n≥1), 0 cathode: pseudo-wire vertex + excitation spectra |
|
||||||
|
| `ainterp_noc` | Pseudo-wire interpolation diagnostics (no cathode gate) |
|
||||||
|
| `phicut` | PC-QQQ with phi coincidence gate |
|
||||||
|
|
||||||
|
### Vertex Reconstruction Methods
|
||||||
|
|
||||||
|
**nA0C (n ≥ 1 anodes, `DIAG_NA0C_SX3/QQQ`):** All anode clusters are flattened and passed to `GetPseudoWire()` to produce an energy-weighted average wire. `getClosestWirePosAtWirePhi()` then finds the point on that pseudo-wire at the Si phi. Histograms land in a folder named `{n}A0C` (e.g. `2A0C`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Energy Loss (`eloss_calculations/`)
|
||||||
|
|
||||||
|
Lookup tables pre-computed with [pycatima](https://github.com/hrosiak/pycatima) for the isobutane/helium fill gas at 250 Torr. Tables cover protons, alphas, aluminum beam, fluorine, and oxygen. `Eloss.py` regenerates the tables; `make_eloss_table.C` is a ROOT-based alternative generator.
|
||||||
|
|
||||||
|
The `cm_to_MeV` / `MeV_to_cm` TGraph pairs loaded in `MakeVertex.C` provide fast range–energy conversion for correcting energy loss in the Si detectors.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Geometry Utilities
|
||||||
|
|
||||||
|
| File | Purpose |
|
||||||
|
|------|---------|
|
||||||
|
| `grid_generate.py` | Generates `detector_geometry.dat` — calculates SX3, QQQ, and PC wire azimuthal angles from first principles given detector radii and strip positions |
|
||||||
|
| `shadowplay.py` | Exports ANASEN geometry (wires, SX3, QQQ) as a VTK file + `anasen_labels.csv` for visualisation in ParaView |
|
||||||
|
| `detector_geometry.dat` | Pre-generated geometry reference (SX3 strip angles, wire positions) |
|
||||||
|
| `anasen_labels.csv` | Label table for ParaView geometry display |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## FEM Simulations (`anasen_fem/`)
|
||||||
|
|
||||||
|
Finite-element simulations of the PC electric field using gmsh (meshing), Elmer (FEM solver), and ParaView (visualisation). See `anasen_fem/README.md` for full setup and installation instructions.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd anasen_fem
|
||||||
|
python3 run.py # mesh → FEM solve → field extraction → ParaView output
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Batch Processing Scripts
|
||||||
|
|
||||||
|
| Script | Purpose |
|
||||||
|
|--------|---------|
|
||||||
|
| `buildEvents.sh <run> <tw>` | Build events from raw .fsu for a single run |
|
||||||
|
| `ProcessRun.sh <run> <tw> <opt>` | Full single-run pipeline: event build (opt=0) or analysis (opt=1) |
|
||||||
|
| `BatchProcess.sh` | Parallel batch processing over a run range via GNU parallel |
|
||||||
|
| `process_mapped_run.sh <start> <end>` | Run `TrackRecon.C` in parallel over a range of mapped files |
|
||||||
|
| `run_sx3.sh/run_27Al.sh/run_17F.sh` | Run `VertexRecon.C` in parallel over a range of mapped files and hAdds them for analysis|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- [ROOT](https://root.cern) ≥ 6.x (TSelector, TChain, TVector3, TF1, TGraph, TSpectrum)
|
||||||
|
- [GNU parallel](https://www.gnu.org/software/parallel/) — for batch scripts
|
||||||
|
- [pycatima](https://github.com/hrosiak/pycatima) — for regenerating energy-loss tables
|
||||||
|
- gmsh + Elmer + ParaView — for FEM simulations only
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Key Files Reference
|
||||||
|
|
||||||
|
| File | Purpose |
|
||||||
|
|------|---------|
|
||||||
|
| `mapping.h` / `mapping_alpha.h` | Hardware→logical channel mapping (beam / alpha-source configs) |
|
||||||
|
| `Armory/EventBuilder.cpp` | Time-window coincidence event builder (compiled binary) |
|
||||||
|
| `Armory/Mapper.cpp` | Channel remapper: SN+ch → detector ID (compiled binary) |
|
||||||
|
| `PreAnalysis.C / .h` | Raw rate and energy checks on mapped data |
|
||||||
|
| `sx3cal/EXFit.C`, `EXFit2.C` | SX3 front/back gain coefficient extraction |
|
||||||
|
| `sx3cal/LRFit.C` | SX3 left-right position calibration |
|
||||||
|
| `sx3cal/{17F,27Al}/` | Per-experiment gain coefficient files (frontgains, backgains, rightgains) |
|
||||||
|
| `GainMatchQQQ.C` | QQQ gain matching |
|
||||||
|
| `Calibration.C / .h` | Absolute energy calibration |
|
||||||
|
| `QQQ_Calcheck.C` | QQQ calibration verification |
|
||||||
|
| `PCGainMatch.C` | PC anode/cathode gain matching |
|
||||||
|
| `FitHistogramsWithTSpectrum_Sequential_Improved.C` | Automated PC anode peak fitting |
|
||||||
|
| `Analyzer.C / .h` | Event-level clustering and PC hit reconstruction, (older in need of rehaul)|
|
||||||
|
| `Analysis.C` | TChain wrapper to run Analyzer over a run range |
|
||||||
|
| `processRun.C` | Single-file wrapper to run Analyzer on one ROOT file |
|
||||||
|
| `MakeVertex.C / .h` | Vertex reconstruction and physics histogram production |
|
||||||
|
| `TrackRecon.C / .h` | Alternate to VertexRecon, to track changes through code, eventaully plan to clean up one for actual data analysis |
|
||||||
|
| `RunTimeSummary.C` | Run-by-run timing/rate summary across a run range |
|
||||||
|
| `Armory/ClassPW.h` | PC wire geometry: crossovers, pseudo-wire, track-plane intersection |
|
||||||
|
| `Armory/Kinematics.h/.cpp` | Two-body reaction kinematics (excitation energy, Q-value) |
|
||||||
|
| `Armory/HistPlotter.h` | Histogram management with named ROOT folders |
|
||||||
|
| `Armory/SX3Geom.h` | SX3 detector geometry |
|
||||||
|
| `Armory/PC_StepLadder_Correction.h` | PC Z-position slope correction |
|
||||||
|
| `eloss_calculations/Eloss.py` | Energy-loss table generator (pycatima) |
|
||||||
|
| `grid_generate.py` | Generates `detector_geometry.dat` from first principles |
|
||||||
|
| `shadowplay.py` | Exports ANASEN geometry to VTK + CSV for ParaView |
|
||||||
|
| `detector_geometry.dat` | Pre-generated detector geometry reference |
|
||||||
|
| `anasen_labels.csv` | Label table for ParaView geometry visualisation |
|
||||||
|
| `anasen_fem/` | FEM electric field simulations for the PC |
|
||||||
140
RunTimeSummary.C
Normal file
140
RunTimeSummary.C
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TH1.h>
|
||||||
|
#include <TH2.h>
|
||||||
|
#include <TString.h>
|
||||||
|
#include <TSystem.h>
|
||||||
|
#include <TCanvas.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
void RunTimeSummary(int startRun, int endRun)
|
||||||
|
{
|
||||||
|
TString fileDir = "/mnt/d/Remapped_files/17F_data/root_data/";
|
||||||
|
TString histName = "AnodeQQQ_Time";
|
||||||
|
TString filePattern = "Run_%03d_mapped_histograms.root";
|
||||||
|
TString filePatternAlt = "ProtonRun_%d_mapped_histograms.root";
|
||||||
|
TString filePatternAlt2 = "Source_%d_mapped_histograms.root";
|
||||||
|
|
||||||
|
int nBinsTime = 0;
|
||||||
|
double timeMin = 0, timeMax = 0;
|
||||||
|
bool foundRef = false;
|
||||||
|
|
||||||
|
for (int r = startRun; r <= endRun; r++)
|
||||||
|
{
|
||||||
|
TString tempName;
|
||||||
|
|
||||||
|
// 1. Try Pattern 1: Run_XXX...
|
||||||
|
tempName = fileDir + Form(filePattern, r);
|
||||||
|
if (gSystem->AccessPathName(tempName))
|
||||||
|
{ // Returns true if MISSING
|
||||||
|
|
||||||
|
// 2. Try Pattern 2: ProtonRun_X...
|
||||||
|
tempName = fileDir + Form(filePatternAlt, r);
|
||||||
|
if (gSystem->AccessPathName(tempName))
|
||||||
|
{
|
||||||
|
|
||||||
|
// 3. Try Pattern 3: Source_X...
|
||||||
|
tempName = fileDir + Form(filePatternAlt2, r);
|
||||||
|
if (gSystem->AccessPathName(tempName))
|
||||||
|
{
|
||||||
|
// All 3 patterns failed. Skip this run.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we get here, 'tempName' holds the valid filename that was found
|
||||||
|
TFile *fTemp = TFile::Open(tempName);
|
||||||
|
if (!fTemp || fTemp->IsZombie())
|
||||||
|
{
|
||||||
|
if (fTemp)
|
||||||
|
delete fTemp;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
TH1F *hRef = (TH1F *)fTemp->Get(histName);
|
||||||
|
if (hRef)
|
||||||
|
{
|
||||||
|
|
||||||
|
nBinsTime = hRef->GetNbinsX();
|
||||||
|
timeMin = hRef->GetXaxis()->GetXmin();
|
||||||
|
timeMax = hRef->GetXaxis()->GetXmax();
|
||||||
|
foundRef = true;
|
||||||
|
|
||||||
|
delete hRef;
|
||||||
|
fTemp->Close();
|
||||||
|
delete fTemp;
|
||||||
|
printf("Reference found in Run %d: %d bins, Range [%.1f, %.1f]\n", r, nBinsTime, timeMin, timeMax);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fTemp->Close();
|
||||||
|
delete fTemp;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!foundRef)
|
||||||
|
{
|
||||||
|
printf("Error: No valid histograms found in the entire range. Exiting.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int nRuns = endRun - startRun + 1;
|
||||||
|
TH2F *hSummary = new TH2F("hSummary",
|
||||||
|
Form("Timing Summary (Runs %d-%d);Timing;Run Number", startRun, endRun),
|
||||||
|
nBinsTime, timeMin, timeMax,
|
||||||
|
nRuns, startRun, endRun + 1);
|
||||||
|
|
||||||
|
for (int run = startRun; run <= endRun; run++)
|
||||||
|
{
|
||||||
|
|
||||||
|
TString filename = fileDir + Form(filePattern, run);
|
||||||
|
|
||||||
|
if (gSystem->AccessPathName(filename))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
TFile *fin = TFile::Open(filename);
|
||||||
|
if (!fin || fin->IsZombie())
|
||||||
|
{
|
||||||
|
if (fin)
|
||||||
|
delete fin;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
TH1F *hin = (TH1F *)fin->Get(histName);
|
||||||
|
|
||||||
|
if (hin)
|
||||||
|
{
|
||||||
|
// Determine which ROW (Y-bin) corresponds to this Run
|
||||||
|
// Note: ROOT bins start at 1.
|
||||||
|
// If startRun=10 and run=10 -> binY=1.
|
||||||
|
int binY_Run = run - startRun + 1;
|
||||||
|
|
||||||
|
// Loop through the Time bins (X-bins in the 1D hist)
|
||||||
|
for (int binX_Time = 1; binX_Time <= hin->GetNbinsX(); binX_Time++)
|
||||||
|
{
|
||||||
|
|
||||||
|
double content = hin->GetBinContent(binX_Time);
|
||||||
|
|
||||||
|
// Copy content to: (Time, Run)
|
||||||
|
if (content > 0)
|
||||||
|
{
|
||||||
|
hSummary->SetBinContent(binX_Time, binY_Run, content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete hin;
|
||||||
|
}
|
||||||
|
|
||||||
|
fin->Close();
|
||||||
|
delete fin;
|
||||||
|
|
||||||
|
if ((run - startRun) % 10 == 0)
|
||||||
|
printf("Stitched Run %d...\n", run);
|
||||||
|
}
|
||||||
|
|
||||||
|
TFile *fOut = new TFile("SummaryPlot.root", "RECREATE");
|
||||||
|
hSummary->Write();
|
||||||
|
|
||||||
|
TCanvas *c1 = new TCanvas("c1", "Time Summary Plot", 1000, 800);
|
||||||
|
hSummary->SetStats(0);
|
||||||
|
hSummary->Draw("COLZ");
|
||||||
|
|
||||||
|
printf("Done! Saved to SummaryPlot.root\n");
|
||||||
|
}
|
||||||
BIN
Timing_Summary_Matplotlib.png
Normal file
BIN
Timing_Summary_Matplotlib.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
4418
TrackRecon.C
4418
TrackRecon.C
File diff suppressed because it is too large
Load Diff
141
TrackRecon.h
Normal file
141
TrackRecon.h
Normal file
|
|
@ -0,0 +1,141 @@
|
||||||
|
#ifndef TrackRecon_h
|
||||||
|
#define TrackRecon_h
|
||||||
|
|
||||||
|
#include <TROOT.h>
|
||||||
|
#include <TChain.h>
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TSelector.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
|
#include "Armory/ClassDet.h"
|
||||||
|
#include "Armory/ClassPW.h"
|
||||||
|
|
||||||
|
class TrackRecon : public TSelector
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TTree *fChain; //! pointer to the analyzed TTree or TChain
|
||||||
|
|
||||||
|
// Declaration of leaf types
|
||||||
|
Det sx3;
|
||||||
|
Det qqq;
|
||||||
|
Det pc;
|
||||||
|
Det misc;
|
||||||
|
|
||||||
|
ULong64_t evID;
|
||||||
|
UInt_t run;
|
||||||
|
|
||||||
|
// List of branches
|
||||||
|
TBranch *b_eventID; //!
|
||||||
|
TBranch *b_run; //!
|
||||||
|
TBranch *b_sx3Multi; //!
|
||||||
|
TBranch *b_sx3ID; //!
|
||||||
|
TBranch *b_sx3Ch; //!
|
||||||
|
TBranch *b_sx3E; //!
|
||||||
|
TBranch *b_sx3T; //!
|
||||||
|
TBranch *b_qqqMulti; //!
|
||||||
|
TBranch *b_qqqID; //!
|
||||||
|
TBranch *b_qqqCh; //!
|
||||||
|
TBranch *b_qqqE; //!
|
||||||
|
TBranch *b_qqqT; //!
|
||||||
|
TBranch *b_pcMulti; //!
|
||||||
|
TBranch *b_pcID; //!
|
||||||
|
TBranch *b_pcCh; //!
|
||||||
|
TBranch *b_pcE; //!
|
||||||
|
TBranch *b_pcT; //!
|
||||||
|
TBranch *b_miscMulti; //!
|
||||||
|
TBranch *b_miscID; //!
|
||||||
|
TBranch *b_miscCh; //!
|
||||||
|
TBranch *b_miscE; //!
|
||||||
|
TBranch *b_miscT; //!
|
||||||
|
TBranch *b_miscTf; //!
|
||||||
|
|
||||||
|
// 1. Geometry Cache
|
||||||
|
Coord Crossover[24][24][2];
|
||||||
|
|
||||||
|
// 2. Persistent Vectors (REQUIRED for the optimized .cxx to work)
|
||||||
|
std::vector<std::pair<int, double>> anodeHits;
|
||||||
|
std::vector<std::pair<int, double>> cathodeHits;
|
||||||
|
std::vector<std::pair<int, double>> corrcatMax;
|
||||||
|
std::vector<std::pair<int, double>> corranoMax;
|
||||||
|
std::vector<double> cathodeTimes;
|
||||||
|
std::vector<double> anodeTimes;
|
||||||
|
std::unordered_map<int, std::tuple<int, double, double>> aWireEvents, cWireEvents;
|
||||||
|
|
||||||
|
TrackRecon(TTree * /*tree*/ = 0) : fChain(0) {}
|
||||||
|
virtual ~TrackRecon() {}
|
||||||
|
virtual Int_t Version() const { return 2; }
|
||||||
|
virtual void Begin(TTree *tree);
|
||||||
|
virtual void SlaveBegin(TTree *tree);
|
||||||
|
virtual void Init(TTree *tree);
|
||||||
|
virtual Bool_t Notify();
|
||||||
|
virtual Bool_t Process(Long64_t entry);
|
||||||
|
virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
|
||||||
|
virtual void SetOption(const char *option) { fOption = option; }
|
||||||
|
virtual void SetObject(TObject *obj) { fObject = obj; }
|
||||||
|
virtual void SetInputList(TList *input) { fInput = input; }
|
||||||
|
virtual TList *GetOutputList() const { return fOutput; }
|
||||||
|
virtual void SlaveTerminate();
|
||||||
|
virtual void Terminate();
|
||||||
|
void OldAnalysis();
|
||||||
|
|
||||||
|
ClassDef(TrackRecon, 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef TrackRecon_cxx
|
||||||
|
void TrackRecon::Init(TTree *tree)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!tree)
|
||||||
|
return;
|
||||||
|
fChain = tree;
|
||||||
|
fChain->SetMakeClass(1);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("evID", &evID, &b_eventID);
|
||||||
|
fChain->SetBranchAddress("run", &run, &b_run);
|
||||||
|
|
||||||
|
sx3.SetDetDimension(24, 12);
|
||||||
|
qqq.SetDetDimension(4, 32);
|
||||||
|
pc.SetDetDimension(2, 24);
|
||||||
|
|
||||||
|
fChain->SetBranchAddress("sx3Multi", &sx3.multi, &b_sx3Multi);
|
||||||
|
fChain->SetBranchAddress("sx3ID", &sx3.id, &b_sx3ID);
|
||||||
|
fChain->SetBranchAddress("sx3Ch", &sx3.ch, &b_sx3Ch);
|
||||||
|
fChain->SetBranchAddress("sx3E", &sx3.e, &b_sx3E);
|
||||||
|
fChain->SetBranchAddress("sx3T", &sx3.t, &b_sx3T);
|
||||||
|
fChain->SetBranchAddress("qqqMulti", &qqq.multi, &b_qqqMulti);
|
||||||
|
fChain->SetBranchAddress("qqqID", &qqq.id, &b_qqqID);
|
||||||
|
fChain->SetBranchAddress("qqqCh", &qqq.ch, &b_qqqCh);
|
||||||
|
fChain->SetBranchAddress("qqqE", &qqq.e, &b_qqqE);
|
||||||
|
fChain->SetBranchAddress("qqqT", &qqq.t, &b_qqqT);
|
||||||
|
fChain->SetBranchAddress("pcMulti", &pc.multi, &b_pcMulti);
|
||||||
|
fChain->SetBranchAddress("pcID", &pc.id, &b_pcID);
|
||||||
|
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
||||||
|
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
||||||
|
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
||||||
|
fChain->SetBranchAddress("miscMulti", &misc.multi, &b_miscMulti);
|
||||||
|
fChain->SetBranchAddress("miscID", &misc.id, &b_miscID);
|
||||||
|
fChain->SetBranchAddress("miscCh", &misc.ch, &b_miscCh);
|
||||||
|
fChain->SetBranchAddress("miscE", &misc.e, &b_miscE);
|
||||||
|
fChain->SetBranchAddress("miscT", &misc.t, &b_miscT);
|
||||||
|
fChain->SetBranchAddress("miscF", &misc.tf, &b_miscTf);
|
||||||
|
}
|
||||||
|
|
||||||
|
Bool_t TrackRecon::Notify()
|
||||||
|
{
|
||||||
|
return kTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TrackRecon::SlaveBegin(TTree * /*tree*/)
|
||||||
|
{
|
||||||
|
// TString option = GetOption();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TrackRecon::SlaveTerminate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif // #ifdef TrackRecon_cxx
|
||||||
BIN
WedgeChVAnode.jpeg
Normal file
BIN
WedgeChVAnode.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 201 KiB |
187
anasen_fem/1dpotplot.py
Executable file
187
anasen_fem/1dpotplot.py
Executable file
|
|
@ -0,0 +1,187 @@
|
||||||
|
#!/home/vsitaraman/ParaView-6.1.0-RC1-MPI-Linux-Python3.12-x86_64/bin/pvbatch
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import numpy as np
|
||||||
|
from paraview.simple import *
|
||||||
|
import paraview.servermanager as sm
|
||||||
|
from paraview.vtk.numpy_interface import dataset_adapter as dsa
|
||||||
|
|
||||||
|
# ==========================================
|
||||||
|
# COMMAND LINE ARGUMENTS
|
||||||
|
# ==========================================
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print("Usage: pvbatch 1dpotplot.py <z_locus in mm>")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
z_loc = float(sys.argv[1])
|
||||||
|
|
||||||
|
INPUT_FILE = f"wires2d/elfield_anasen_t0001.vtu"
|
||||||
|
OUTPUT_CSV = f"anode_to_cathode_1d_{z_loc}.csv"
|
||||||
|
OUTPUT_IMAGE = f"1D_Variation_Plot_{z_loc}.png"
|
||||||
|
|
||||||
|
print(f"--- Starting 1D Potential Extraction for Z = {z_loc} mm ---")
|
||||||
|
|
||||||
|
# ==========================================
|
||||||
|
# 1. EXACT GEOMETRIC CALCULATION
|
||||||
|
# ==========================================
|
||||||
|
print("Calculating theoretical wire coordinates...")
|
||||||
|
|
||||||
|
wireShift = 4.0
|
||||||
|
k = 2 * np.pi / 24.0
|
||||||
|
|
||||||
|
offset_a1 = -10.0 * k
|
||||||
|
offset_c1 = -5.5 * k
|
||||||
|
offset_a2 = offset_a1 + (wireShift * k)
|
||||||
|
offset_c2 = offset_c1 - (wireShift * k)
|
||||||
|
|
||||||
|
t = (z_loc + 174.3) / (2 * 174.3)
|
||||||
|
|
||||||
|
# Anode 0 theoretical position
|
||||||
|
xa_loc = (37.0 * np.cos(offset_a1)) + t * (37.0 * np.cos(offset_a2) - 37.0 * np.cos(offset_a1))
|
||||||
|
ya_loc = (37.0 * np.sin(offset_a1)) + t * (37.0 * np.sin(offset_a2) - 37.0 * np.sin(offset_a1))
|
||||||
|
|
||||||
|
# All Cathodes theoretical positions
|
||||||
|
xc1_all = np.array([42.0 * np.cos(k * i + offset_c1) for i in range(24)])
|
||||||
|
yc1_all = np.array([42.0 * np.sin(k * i + offset_c1) for i in range(24)])
|
||||||
|
xc2_all = np.array([42.0 * np.cos(k * i + offset_c2) for i in range(24)])
|
||||||
|
yc2_all = np.array([42.0 * np.sin(k * i + offset_c2) for i in range(24)])
|
||||||
|
|
||||||
|
xc_loc_all = xc1_all + t * (xc2_all - xc1_all)
|
||||||
|
yc_loc_all = yc1_all + t * (yc2_all - yc1_all)
|
||||||
|
|
||||||
|
# Nearest Cathode theoretical position
|
||||||
|
distances = np.sqrt((xc_loc_all - xa_loc)**2 + (yc_loc_all - ya_loc)**2)
|
||||||
|
nearest_c_idx = np.argmin(distances)
|
||||||
|
xc_loc = xc_loc_all[nearest_c_idx]
|
||||||
|
yc_loc = yc_loc_all[nearest_c_idx]
|
||||||
|
|
||||||
|
# Theoretical targets in meters
|
||||||
|
math_anode = np.array([xa_loc / 1000.0, ya_loc / 1000.0, 0.0])
|
||||||
|
math_cathode = np.array([xc_loc / 1000.0, yc_loc / 1000.0, 0.0])
|
||||||
|
# ==========================================
|
||||||
|
# 2. MESH DATA SNAPPING (Electrode-Constrained)
|
||||||
|
# ==========================================
|
||||||
|
print(f"Loading VTU file: {INPUT_FILE} to snap to electrode nodes...")
|
||||||
|
|
||||||
|
reader = XMLUnstructuredGridReader(FileName=[INPUT_FILE])
|
||||||
|
UpdatePipeline()
|
||||||
|
|
||||||
|
# Fetch data to Python
|
||||||
|
raw_data = sm.Fetch(reader)
|
||||||
|
wrapped_data = dsa.WrapDataObject(raw_data)
|
||||||
|
|
||||||
|
pts = wrapped_data.Points
|
||||||
|
pot = wrapped_data.PointData['potential']
|
||||||
|
|
||||||
|
print("\nPotential range:")
|
||||||
|
print(" min =", np.min(pot))
|
||||||
|
print(" max =", np.max(pot))
|
||||||
|
|
||||||
|
# -------------------------------------------------
|
||||||
|
# Find actual electrode nodes
|
||||||
|
# -------------------------------------------------
|
||||||
|
|
||||||
|
anode_candidates = np.where(pot > 640.0)[0]
|
||||||
|
|
||||||
|
if len(anode_candidates) == 0:
|
||||||
|
raise RuntimeError("No anode nodes found near 650 V")
|
||||||
|
|
||||||
|
cathode_candidates = np.where(np.abs(pot) < 1.0)[0]
|
||||||
|
|
||||||
|
if len(cathode_candidates) == 0:
|
||||||
|
raise RuntimeError("No cathode nodes found near 0 V")
|
||||||
|
|
||||||
|
print(f"Found {len(anode_candidates)} anode nodes")
|
||||||
|
print(f"Found {len(cathode_candidates)} cathode nodes")
|
||||||
|
|
||||||
|
# -------------------------------------------------
|
||||||
|
# Snap theoretical anode location to nearest
|
||||||
|
# actual anode node
|
||||||
|
# -------------------------------------------------
|
||||||
|
|
||||||
|
anode_dist = np.linalg.norm(
|
||||||
|
pts[anode_candidates] - math_anode,
|
||||||
|
axis=1
|
||||||
|
)
|
||||||
|
|
||||||
|
anode_idx = anode_candidates[np.argmin(anode_dist)]
|
||||||
|
|
||||||
|
true_anode_pos = pts[anode_idx]
|
||||||
|
true_anode_pot = pot[anode_idx]
|
||||||
|
|
||||||
|
# -------------------------------------------------
|
||||||
|
# Snap theoretical cathode location to nearest
|
||||||
|
# actual cathode node
|
||||||
|
# -------------------------------------------------
|
||||||
|
|
||||||
|
cathode_dist = np.linalg.norm(
|
||||||
|
pts[cathode_candidates] - math_cathode,
|
||||||
|
axis=1
|
||||||
|
)
|
||||||
|
|
||||||
|
cathode_idx = cathode_candidates[np.argmin(cathode_dist)]
|
||||||
|
|
||||||
|
true_cathode_pos = pts[cathode_idx]
|
||||||
|
true_cathode_pot = pot[cathode_idx]
|
||||||
|
|
||||||
|
# -------------------------------------------------
|
||||||
|
# Diagnostics
|
||||||
|
# -------------------------------------------------
|
||||||
|
|
||||||
|
anode_snap_error = np.linalg.norm(
|
||||||
|
true_anode_pos - math_anode
|
||||||
|
)
|
||||||
|
|
||||||
|
cathode_snap_error = np.linalg.norm(
|
||||||
|
true_cathode_pos - math_cathode
|
||||||
|
)
|
||||||
|
|
||||||
|
print("\nSelected electrode nodes:")
|
||||||
|
print(f"Anode:")
|
||||||
|
print(f" position = {true_anode_pos}")
|
||||||
|
print(f" potential = {true_anode_pot:.3f} V")
|
||||||
|
print(f" distance = {anode_snap_error*1e6:.1f} um")
|
||||||
|
|
||||||
|
print(f"\nCathode:")
|
||||||
|
print(f" position = {true_cathode_pos}")
|
||||||
|
print(f" potential = {true_cathode_pot:.3f} V")
|
||||||
|
print(f" distance = {cathode_snap_error*1e6:.1f} um")
|
||||||
|
# ==========================================
|
||||||
|
# 3. PARAVIEW EXTRACTION & PLOTTING
|
||||||
|
# ==========================================
|
||||||
|
print("Extracting data along the snapped line...")
|
||||||
|
plot_over_line = PlotOverLine(Input=reader)
|
||||||
|
|
||||||
|
# Apply the SNAPPED coordinates (converted to standard Python lists)
|
||||||
|
plot_over_line.Point1 = true_anode_pos.tolist()
|
||||||
|
plot_over_line.Point2 = true_cathode_pos.tolist()
|
||||||
|
plot_over_line.Resolution = 1000
|
||||||
|
|
||||||
|
SaveData(OUTPUT_CSV, proxy=plot_over_line)
|
||||||
|
|
||||||
|
print("Rendering plot...")
|
||||||
|
line_chart_view = CreateView('XYChartView')
|
||||||
|
line_chart_view.ViewSize = [1000, 600]
|
||||||
|
line_chart_view.ChartTitle = f'Potential & E-Field: Anode to Cathode (Z = {z_loc} mm)'
|
||||||
|
line_chart_view.LeftAxisTitle = 'Potential (V)'
|
||||||
|
line_chart_view.BottomAxisTitle = 'Distance from Anode (m)'
|
||||||
|
|
||||||
|
line_display = Show(plot_over_line, line_chart_view)
|
||||||
|
|
||||||
|
# Tell ParaView to draw BOTH variables
|
||||||
|
# line_display.SeriesVisibility = ['potential', 'electric field_Magnitude']
|
||||||
|
line_display.SeriesVisibility = ['potential']
|
||||||
|
|
||||||
|
# Style Potential (Red)
|
||||||
|
line_display.SeriesColor = ['potential', '1.0', '0.0', '0.0']
|
||||||
|
line_display.SeriesLineThickness = ['potential', '3']
|
||||||
|
|
||||||
|
# # Style Electric Field (Blue, Right Axis)
|
||||||
|
# line_display.SeriesColor = ['electric field_Magnitude', '0.0', '0.5', '1.0']
|
||||||
|
# line_display.SeriesLineThickness = ['electric field_Magnitude', '3']
|
||||||
|
# line_display.SeriesPlotCorner = ['electric field_Magnitude', '1']
|
||||||
|
# line_chart_view.RightAxisTitle = 'Electric Field (V/m)'
|
||||||
|
|
||||||
|
SaveScreenshot(OUTPUT_IMAGE, view=line_chart_view)
|
||||||
|
print(f"Saved plot screenshot to: {OUTPUT_IMAGE}")
|
||||||
|
print("--- Extraction Complete ---")
|
||||||
27
anasen_fem/README.md
Executable file
27
anasen_fem/README.md
Executable file
|
|
@ -0,0 +1,27 @@
|
||||||
|
### README for ANASEN fem simulations:
|
||||||
|
|
||||||
|
* There are a few iterations of these simulations that already exist. Be sure to also locate and refer to them if necessary.
|
||||||
|
* Install gmsh and its python api by running (Ubuntu 22.04 LTS)
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install gmsh python3-gmsh
|
||||||
|
```
|
||||||
|
|
||||||
|
* Gmsh gives us the tools to create a meshgrid that samples the 2d space appropriately to plot the field/equipotential lines.
|
||||||
|
* The output file typically has the .msh extension. This is read as input to Elmer, which is the FEM differential-equation solver.
|
||||||
|
|
||||||
|
* Install Elmer via the following steps:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo add-apt-repository ppa:elmer-csc-ubuntu/elmer-csc-ppa
|
||||||
|
sudo apt install elmerfem-csc-eg
|
||||||
|
```
|
||||||
|
|
||||||
|
* Install ParaView for visualizations by downloading from the Linux .tar.gz link at https://www.paraview.org/download/
|
||||||
|
- The current version is tested to work on Paraview 6.1.0. The default version in Ubuntu 22.04 repositories has some trouble with scripting
|
||||||
|
* v0.0.1, March 10 2026
|
||||||
|
- 2d simulations of fields only. gmsh for meshing, elmer for fem, paraview to plot
|
||||||
|
- Before running, open `paraview_plotter.py` to make the bash shebang (#!) point to the location of `pvpython` or `pvbatch`
|
||||||
|
- `python3 run.py` should run everything in order, and is hopefully all the files are self-documenting
|
||||||
|
* v0.0.2, planned TODO
|
||||||
|
- Garfield to take Elmer results and perform charge-transport
|
||||||
2
anasen_fem/clean.sh
Executable file
2
anasen_fem/clean.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
rm wires2d.msh
|
||||||
|
rm wires2d/*
|
||||||
2
anasen_fem/dielectrics.dat
Normal file
2
anasen_fem/dielectrics.dat
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
1
|
||||||
|
13 1.0
|
||||||
107
anasen_fem/garfield_sim.py
Normal file
107
anasen_fem/garfield_sim.py
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
import ROOT
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# 1. FIX: Manually load the Garfield library if it's not in the ROOT namespace
|
||||||
|
# Update this path to your actual installation location
|
||||||
|
garfield_lib_path = "/home/vs19g/garfieldpp/install/lib/libGarfield.so" #penguin path
|
||||||
|
# garfield_lib_path = "/home/vsitaraman/garfieldpp/install/lib/libGarfield.so" #laptop path
|
||||||
|
|
||||||
|
if os.path.exists(garfield_lib_path):
|
||||||
|
ROOT.gSystem.Load(garfield_lib_path)
|
||||||
|
else:
|
||||||
|
print(f"CRITICAL ERROR: {garfield_lib_path} not found.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Verify access
|
||||||
|
try:
|
||||||
|
test_gas = ROOT.Garfield.MediumMagboltz()
|
||||||
|
except AttributeError:
|
||||||
|
print("ERROR: Garfield shared library loaded, but 'Garfield' namespace not found.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# --- 2. GAS SETUP (96% He, 4% CO2) ---
|
||||||
|
gas = ROOT.Garfield.MediumMagboltz()
|
||||||
|
gas_file = "He96_CO2_4_260Torr.gas"
|
||||||
|
|
||||||
|
if not os.path.exists(gas_file):
|
||||||
|
print("Generating new Magboltz gas table (260 Torr)...")
|
||||||
|
# --- Optimized Magboltz Settings ---
|
||||||
|
gas.SetComposition("he", 96.0, "co2", 4.0)
|
||||||
|
gas.SetTemperature(293.15)
|
||||||
|
gas.SetPressure(260.0)
|
||||||
|
|
||||||
|
# 1. Limit the Field Grid:
|
||||||
|
gas.SetFieldGrid(10., 80000., 20, True)
|
||||||
|
|
||||||
|
# 2. Reduce the precision slightly for the first run:
|
||||||
|
gas.GenerateGasTable(8)
|
||||||
|
gas.WriteGasFile(gas_file)
|
||||||
|
else:
|
||||||
|
print(f"Loading existing gas table: {gas_file}")
|
||||||
|
gas.LoadGasFile(gas_file)
|
||||||
|
|
||||||
|
# --- 3. FIELD MAP SETUP ---
|
||||||
|
fm = ROOT.Garfield.ComponentElmer2d()
|
||||||
|
|
||||||
|
|
||||||
|
fm.Initialise("wires2d/mesh.header",
|
||||||
|
"wires2d/mesh.elements",
|
||||||
|
"wires2d/mesh.nodes",
|
||||||
|
"dielectrics.dat",
|
||||||
|
"wires2d/elstatics.result",
|
||||||
|
"mm")
|
||||||
|
|
||||||
|
# Set the medium (Body 13 from your Gmsh script)
|
||||||
|
fm.SetMedium(0, gas)
|
||||||
|
|
||||||
|
# --- 4. SENSOR AND DRIFT SETUP ---
|
||||||
|
sensor = ROOT.Garfield.Sensor()
|
||||||
|
sensor.AddComponent(fm)
|
||||||
|
sensor.SetArea(-50.0, -50.0, -5.0, 50.0, 50.0, 5.0) #hardcoding the sesnsor area to define a psuedo 3d geometry
|
||||||
|
|
||||||
|
# Heavy Ion Drift (RKF) - Best for the general track
|
||||||
|
drift = ROOT.Garfield.DriftLineRKF()
|
||||||
|
drift.SetSensor(sensor)
|
||||||
|
|
||||||
|
# Electron Avalanche (Microscopic) - Best for high-field gain
|
||||||
|
aval = ROOT.Garfield.AvalancheMicroscopic()
|
||||||
|
aval.SetSensor(sensor)
|
||||||
|
|
||||||
|
# --- 5. EXECUTION ---
|
||||||
|
# Starting position (e.g., near the IC wires at r=23mm or closer to Anodes)
|
||||||
|
x0, y0, z0, t0 = 3.50, 0.0, 0.0, 0.0
|
||||||
|
|
||||||
|
print(f"Simulating heavy ion drift from r={x0}...")
|
||||||
|
drift.DriftIon(x0, y0, z0, t0)
|
||||||
|
|
||||||
|
# Create a file to store the heavy ion track
|
||||||
|
with open("heavy_ion_track.csv", "w") as f:
|
||||||
|
f.write("x,y,z,t\n")
|
||||||
|
|
||||||
|
# After running drift.DriftIon(x0, y0, z0, t0):
|
||||||
|
n_points = drift.GetNumberOfDriftLinePoints()
|
||||||
|
for i in range(n_points):
|
||||||
|
xi, yi, zi, ti = ROOT.double(0), ROOT.double(0), ROOT.double(0), ROOT.double(0)
|
||||||
|
drift.GetDriftLinePoint(i, xi, yi, zi, ti)
|
||||||
|
f.write(f"{xi},{yi},{zi},{ti}\n")
|
||||||
|
|
||||||
|
print(f"Simulating electron avalanche from r={x0}...")
|
||||||
|
# AvalancheElectron(x, y, z, t, energy, dx, dy, dz)
|
||||||
|
aval.AvalancheElectron(x0, y0, z0, t0, 0.1, 0.0, 0.0, 0.0)
|
||||||
|
|
||||||
|
with open("avalanche_endpoints.csv", "w") as f:
|
||||||
|
f.write("x,y,z,t\n")
|
||||||
|
|
||||||
|
# After aval.AvalancheElectron(...)
|
||||||
|
n_endpoints = aval.GetNumberOfEndpoints()
|
||||||
|
for i in range(n_endpoints):
|
||||||
|
# Get start and end points of each electron in the avalanche
|
||||||
|
x1, y1, z1, t1, e1 = ROOT.double(0), ROOT.double(0), ROOT.double(0), ROOT.double(0), ROOT.double(0)
|
||||||
|
x2, y2, z2, t2, e2, status = ROOT.double(0), ROOT.double(0), ROOT.double(0), ROOT.double(0), ROOT.double(0), ROOT.int(0)
|
||||||
|
|
||||||
|
aval.GetEndpoint(i, x1, y1, z1, t1, e1, x2, y2, z2, t2, e2, status)
|
||||||
|
# We save the endpoint (x2, y2, z2) where the electron was collected or attached
|
||||||
|
f.write(f"{x2},{y2},{z2},{t2}\n")
|
||||||
|
|
||||||
|
print("Simulation complete.")
|
||||||
114
anasen_fem/junk/wires.py
Executable file
114
anasen_fem/junk/wires.py
Executable file
|
|
@ -0,0 +1,114 @@
|
||||||
|
import numpy as np
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
from mpl_toolkits.mplot3d import Axes3D
|
||||||
|
|
||||||
|
acolors = plt.get_cmap('tab20',24)
|
||||||
|
ccolors = plt.get_cmap('tab20',24)
|
||||||
|
|
||||||
|
k=-2*np.pi/24.
|
||||||
|
offset = 6*k + 3*k #-pi/2
|
||||||
|
xarra_1 = np.array([37*np.cos(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
yarra_1 = np.array([37*np.sin(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
labelsa_1 = np.array([i for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
fig,ax = plt.subplots(figsize=(10,10))
|
||||||
|
ax.invert_yaxis()
|
||||||
|
ax.plot(xarra_1,yarra_1,"x",label="anode, z=-L/2")
|
||||||
|
|
||||||
|
for x,y,label in zip(xarra_1,yarra_1,labelsa_1):
|
||||||
|
ax.text(x,y,label)
|
||||||
|
|
||||||
|
kc=2*np.pi/24.
|
||||||
|
offsetc = -4*kc + 2*kc - np.pi/24 #-pi/4
|
||||||
|
xarrc_1 = np.array([42*np.cos(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
yarrc_1 = np.array([42*np.sin(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
labelsc_1 = np.array([i for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
ax.plot(xarrc_1,yarrc_1,"o",label="cathode, z=-L/2, where they are picked up")
|
||||||
|
|
||||||
|
for x,y,label in zip(xarrc_1,yarrc_1,labelsc_1):
|
||||||
|
ax.text(x,y,label)
|
||||||
|
plt.title("z=-L/2 plane, beam going into the plane along +z, (+x right, +y down)")
|
||||||
|
plt.grid()
|
||||||
|
plt.legend()
|
||||||
|
plt.savefig("plane1.png")
|
||||||
|
plt.show()
|
||||||
|
|
||||||
|
fig,ax = plt.subplots(figsize=(10,10))
|
||||||
|
ax.invert_yaxis()
|
||||||
|
|
||||||
|
offset = offset-3*k
|
||||||
|
xarra_2 = np.array([37*np.cos(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
yarra_2 = np.array([37*np.sin(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
labelsa_2 = np.array([i for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
ax.plot(xarra_2,yarra_2,"x",label="anode, z=+L/2, where they are picked up")
|
||||||
|
|
||||||
|
for x,y,label in zip(xarra_2,yarra_2,labelsa_2):
|
||||||
|
ax.text(x,y,label)
|
||||||
|
|
||||||
|
offsetc = offsetc-3*kc
|
||||||
|
xarrc_2 = np.array([42*np.cos(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
yarrc_2 = np.array([42*np.sin(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
labelsc_2 = np.array([i for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
ax.plot(xarrc_2,yarrc_2,"o",label="cathode, z=+L/2")
|
||||||
|
|
||||||
|
for x,y,label in zip(xarrc_2,yarrc_2,labelsc_2):
|
||||||
|
ax.text(x,y,label)
|
||||||
|
plt.title("z=+L/2 plane, beam going into the plane along +z, (+x right, +y down)")
|
||||||
|
plt.grid()
|
||||||
|
plt.legend()
|
||||||
|
plt.savefig("plane2.png")
|
||||||
|
plt.show()
|
||||||
|
|
||||||
|
fig = plt.figure(figsize=(10,10))
|
||||||
|
ax = fig.add_subplot(111,projection='3d')
|
||||||
|
ax.set_xlabel("x")
|
||||||
|
ax.set_ylabel("y")
|
||||||
|
ax.set_zlabel("z")
|
||||||
|
|
||||||
|
xx_a = np.array([[x1,x2] for x1,x2 in zip(xarra_1,xarra_2)])
|
||||||
|
yy_a = np.array([[y1,y2] for y1,y2 in zip(yarra_1,yarra_2)])
|
||||||
|
zz_a = np.array([[-173.5,173.5] for x1,x2 in zip(xarra_1,xarra_2)])
|
||||||
|
for i,[xx,yy,zz] in enumerate(zip(xx_a,yy_a,zz_a)):
|
||||||
|
ax.plot(xx,yy,zz,'-',color=acolors(i/24))
|
||||||
|
|
||||||
|
for i,[x,y,label] in enumerate(zip(xarra_1,yarra_1,labelsa_1)):
|
||||||
|
ax.text(x,y,-173,"a"+str(label),color=acolors(i/24))
|
||||||
|
for i,[x,y,label] in enumerate(zip(xarra_2,yarra_2,labelsa_2)):
|
||||||
|
ax.text(x,y,+173,"a"+str(label),color=acolors(i/24))
|
||||||
|
|
||||||
|
xx_c = np.array([[x1,x2] for x1,x2 in zip(xarrc_1,xarrc_2)])
|
||||||
|
yy_c = np.array([[y1,y2] for y1,y2 in zip(yarrc_1,yarrc_2)])
|
||||||
|
zz_c = np.array([[-173.5,173.5] for x1,x2 in zip(xarrc_1,xarrc_2)])
|
||||||
|
for i,[xx,yy,zz] in enumerate(zip(xx_c,yy_c,zz_c)):
|
||||||
|
ax.plot(xx,yy,zz,'--',color=ccolors(((47-i)%24)/24))
|
||||||
|
|
||||||
|
for i,[x,y,label] in enumerate(zip(xarrc_1,yarrc_1,labelsc_1)):
|
||||||
|
ax.text(x,y,-173,"c"+str(label),color=ccolors(((25-i)%24)/24))
|
||||||
|
for i,[x,y,label] in enumerate(zip(xarrc_2,yarrc_2,labelsc_2)):
|
||||||
|
ax.text(x,y,+173,"c"+str(label),color=ccolors(((47-i)%24)/24))
|
||||||
|
ax.view_init(elev=-53, azim=-106, roll=18)
|
||||||
|
plt.tight_layout()
|
||||||
|
plt.show()
|
||||||
|
phi_qqq = np.array([[2*np.pi*(-i*16+j+0.5)/(16*4) for i in range(4)] for j in range(16)])
|
||||||
|
print(phi_qqq)
|
||||||
|
#'''
|
||||||
|
for i,[phi1,phi2,phi3,phi4] in enumerate(phi_qqq):
|
||||||
|
ax.plot([50*np.cos(phi1),100*np.cos(phi1)],[50*np.sin(phi1),100*np.sin(phi1)],[100,100],'-',color='red')
|
||||||
|
ax.text(104*np.cos(phi1),104*np.sin(phi1),100,"0_%d"%(i),color="red")
|
||||||
|
|
||||||
|
ax.plot([50*np.cos(phi2),100*np.cos(phi2)],[50*np.sin(phi2),100*np.sin(phi2)],[100,100],'-',color='green')
|
||||||
|
ax.text(104*np.cos(phi2),104*np.sin(phi2),100,"1_%d"%(i),color="green")
|
||||||
|
|
||||||
|
ax.plot([50*np.cos(phi3),100*np.cos(phi3)],[50*np.sin(phi3),100*np.sin(phi3)],[100,100],'-',color='blue')
|
||||||
|
ax.text(104*np.cos(phi3),104*np.sin(phi3),100,"2_%d"%(i),color="blue")
|
||||||
|
|
||||||
|
ax.plot([50*np.cos(phi4),100*np.cos(phi4)],[50*np.sin(phi4),100*np.sin(phi4)],[100,100],'-',color='brown')
|
||||||
|
ax.text(104*np.cos(phi4),104*np.sin(phi4),100,"3_%d"%(i),color="brown")
|
||||||
|
#'''
|
||||||
|
#coords_qqq = np.array([[50*np.cos(phi),100*np.sin(phi),100] for phi in phi_qqq]).T
|
||||||
|
plt.tight_layout()
|
||||||
|
plt.show()
|
||||||
|
|
||||||
71
anasen_fem/junk/wires2d_test.sif
Executable file
71
anasen_fem/junk/wires2d_test.sif
Executable file
|
|
@ -0,0 +1,71 @@
|
||||||
|
Check Keywords Warn
|
||||||
|
|
||||||
|
Header
|
||||||
|
Mesh DB "." "wires2d"
|
||||||
|
End
|
||||||
|
|
||||||
|
Simulation
|
||||||
|
Coordinate System = Cartesian 2D
|
||||||
|
Simulation Type = Steady State
|
||||||
|
Steady State Max Iterations = 1
|
||||||
|
Output File = "elstatics.result"
|
||||||
|
Post File = "elstatics.ep"
|
||||||
|
End
|
||||||
|
|
||||||
|
Constants
|
||||||
|
Permittivity Of Vacuum = 8.8542e-12
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Body 1
|
||||||
|
Target Bodies(1) = 13
|
||||||
|
Equation = 1
|
||||||
|
Material = 1
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Equation 1
|
||||||
|
Active Solvers(2) = 1 2
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Material 1
|
||||||
|
Relative Permittivity = 1
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Solver 1
|
||||||
|
Equation = Electrostatics
|
||||||
|
Procedure = "StatElecSolve" "StatElecSolver"
|
||||||
|
|
||||||
|
Variable = Potential
|
||||||
|
Variable DOFs = 1
|
||||||
|
|
||||||
|
Calculate Electric Field = True
|
||||||
|
Calculate Electric Flux = False
|
||||||
|
|
||||||
|
Linear System Solver = Iterative
|
||||||
|
Linear System Iterative Method = CG
|
||||||
|
Linear System Max Iterations = 500
|
||||||
|
Linear System Convergence Tolerance = 1.0e-8
|
||||||
|
Linear System Preconditioning = ILU1
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Solver 2
|
||||||
|
Equation = Electric Force
|
||||||
|
Procedure = "ElectricForce" "StatElecForce"
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Boundary Condition 1
|
||||||
|
Target Boundaries = 10
|
||||||
|
Potential = 650
|
||||||
|
Calculate Electric Force = True
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Boundary Condition 2
|
||||||
|
Target Boundaries = 20
|
||||||
|
Potential = 0
|
||||||
|
End
|
||||||
91
anasen_fem/junk/wires_gmsh.py
Executable file
91
anasen_fem/junk/wires_gmsh.py
Executable file
|
|
@ -0,0 +1,91 @@
|
||||||
|
import numpy as np
|
||||||
|
import gmsh
|
||||||
|
|
||||||
|
gmsh.initialize()
|
||||||
|
gmsh.model.add("adaptive_mesh")
|
||||||
|
gmsh.option.setNumber('General.NumThreads', 4)
|
||||||
|
#gmsh.option.setNumber("Mesh.Adapt.MaxNumberOfElements", 200000)
|
||||||
|
#gmsh.option.setNumber("Mesh.Adapt.MaxNumberOfNodes", 200000)
|
||||||
|
#gmsh.option.setNumber("Mesh.Adapt.MaxIter",5)
|
||||||
|
#gmsh.option.setNumber("Mesh.MeshSizeMin", 5e-3)
|
||||||
|
#gmsh.option.setNumber("Mesh.MeshSizeMax", 10.0)
|
||||||
|
#gmsh.option.setNumber("Mesh.CharacteristicLengthFromCurvature", 0)
|
||||||
|
|
||||||
|
lc = 0.01
|
||||||
|
|
||||||
|
#anodes, plane 1 at -zmax/2
|
||||||
|
k=-2*np.pi/24.
|
||||||
|
offset = 6*k + 3*k #-pi/2
|
||||||
|
xarra_1 = np.array([37*np.cos(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
yarra_1 = np.array([37*np.sin(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
#cathodes, plane 1 at -zmax/2
|
||||||
|
kc=2*np.pi/24.
|
||||||
|
offsetc = -4*kc + 2*kc - np.pi/24 #-pi/4
|
||||||
|
xarrc_1 = np.array([42*np.cos(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
yarrc_1 = np.array([42*np.sin(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
#anodes, plane 2 at +zmax/2
|
||||||
|
offset = offset-3*k
|
||||||
|
xarra_2 = np.array([37*np.cos(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
yarra_2 = np.array([37*np.sin(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
#cathodes, plane2 at +zmax/2
|
||||||
|
offsetc = offsetc-3*kc
|
||||||
|
xarrc_2 = np.array([42*np.cos(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
yarrc_2 = np.array([42*np.sin(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
pa1 = []
|
||||||
|
pa2 = []
|
||||||
|
pc1 = []
|
||||||
|
pc2 = []
|
||||||
|
|
||||||
|
wire_radius = 0.254 #mm
|
||||||
|
anode_wires = []
|
||||||
|
cathode_wires = []
|
||||||
|
aw_tags = [(3,i) for i in range(24)]
|
||||||
|
cw_tags = [(3,i+24) for i in range(24)]
|
||||||
|
|
||||||
|
for i,[xa,ya,xc,yc,xa2,ya2,xc2,yc2] in enumerate(zip(xarra_1,yarra_1,xarrc_1,yarrc_1,xarra_2,yarra_2,xarrc_2,yarrc_2)):
|
||||||
|
print(i,xa,ya,-178.3,xc,yc,-178.3,xa2,ya2,178.3,xc2,yc2,178.3)
|
||||||
|
anode_wires.append(gmsh.model.occ.addCylinder(xa,ya,-178.3,(xa2-xa),(ya2-ya),178.3*2,wire_radius,i)) #x,y,z of first face center, dx,dy,dz of the axis, then the wire radius
|
||||||
|
cathode_wires.append(gmsh.model.occ.addCylinder(xc,yc,-178.3,(xc2-xc),(yc2-yc),178.3*2,wire_radius,i+24)) #cathode tags 24-47, anode 0-23
|
||||||
|
|
||||||
|
|
||||||
|
anasen_barrel = gmsh.model.occ.addCylinder(0,0,-500,0,0,500+605,300,1234) #tag 1234
|
||||||
|
#anasen_barrel = gmsh.model.occ.addCylinder(0,0,-500,0,0,500+605,300,1234) #tag 1234
|
||||||
|
|
||||||
|
gmsh.model.occ.synchronize()
|
||||||
|
|
||||||
|
all_wires = aw_tags+cw_tags
|
||||||
|
gmsh.model.occ.fragment([(3,1234)],all_wires)
|
||||||
|
gmsh.model.occ.removeAllDuplicates()
|
||||||
|
gmsh.model.occ.synchronize()
|
||||||
|
gmsh.option.setNumber("Geometry.Tolerance", 1e-6)
|
||||||
|
gmsh.option.setNumber("Geometry.OCCFixDegenerated", 1)
|
||||||
|
gmsh.option.setNumber("Geometry.OCCFixSmallEdges", 1)
|
||||||
|
gmsh.option.setNumber("Geometry.OCCFixSmallFaces", 1)
|
||||||
|
|
||||||
|
wire_surfs = []
|
||||||
|
for w in anode_wires + cathode_wires:
|
||||||
|
wire_surfs += [s[1] for s in gmsh.model.getBoundary([(3,w)], oriented=False) if s[0] == 2]
|
||||||
|
#'''
|
||||||
|
f1 = gmsh.model.mesh.field.add("Distance")
|
||||||
|
gmsh.model.mesh.field.setNumbers(f1, "FacesList", wire_surfs) # Example curves
|
||||||
|
f2 = gmsh.model.mesh.field.add("Threshold")
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "InField", f1)
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "SizeMin", 0.05)
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "SizeMax", 5.)
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "DistMin", 1.)
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "DistMax", 20.)
|
||||||
|
gmsh.model.mesh.field.setAsBackgroundMesh(f2)
|
||||||
|
#'''
|
||||||
|
gmsh.option.setNumber("Mesh.Algorithm", 2)
|
||||||
|
gmsh.option.setNumber("Mesh.Algorithm3D", 1) # For 3D meshes
|
||||||
|
|
||||||
|
gmsh.model.mesh.generate(dim=3)
|
||||||
|
#gmsh.model.mesh.refine()
|
||||||
|
#gmsh.model.mesh.refine()
|
||||||
|
#gmsh.model.mesh.refine()
|
||||||
|
gmsh.fltk.run()
|
||||||
|
gmsh.finalize()
|
||||||
87
anasen_fem/junk/wires_gmsh_bc.py
Executable file
87
anasen_fem/junk/wires_gmsh_bc.py
Executable file
|
|
@ -0,0 +1,87 @@
|
||||||
|
import numpy as np
|
||||||
|
import gmsh
|
||||||
|
|
||||||
|
gmsh.initialize()
|
||||||
|
#gmsh.model.add("adaptive_mesh")
|
||||||
|
gmsh.option.setNumber('General.NumThreads', 4)
|
||||||
|
#gmsh.option.setNumber("Mesh.Adapt.MaxNumberOfElements", 200000)
|
||||||
|
#gmsh.option.setNumber("Mesh.Adapt.MaxNumberOfNodes", 200000)
|
||||||
|
#gmsh.option.setNumber("Mesh.Adapt.MaxIter",5)
|
||||||
|
#gmsh.option.setNumber("Mesh.MeshSizeMin", 5e-3)
|
||||||
|
#gmsh.option.setNumber("Mesh.MeshSizeMax", 10.0)
|
||||||
|
gmsh.option.setNumber("Geometry.Tolerance", 1e-2)
|
||||||
|
#gmsh.option.setNumber("Mesh.CharacteristicLengthFromCurvature", 0)
|
||||||
|
|
||||||
|
lc = 0.04
|
||||||
|
#anodes, plane 1 at -zmax/2
|
||||||
|
k=-2*np.pi/24.
|
||||||
|
offset = 6*k + 3*k #-pi/2
|
||||||
|
xarra_1 = np.array([37*np.cos(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
yarra_1 = np.array([37*np.sin(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
#cathodes, plane 1 at -zmax/2
|
||||||
|
kc=2*np.pi/24.
|
||||||
|
offsetc = -4*kc + 2*kc - np.pi/24 #-pi/4
|
||||||
|
xarrc_1 = np.array([42*np.cos(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
yarrc_1 = np.array([42*np.sin(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
#anodes, plane 2 at +zmax/2
|
||||||
|
offset = offset-3*k
|
||||||
|
xarra_2 = np.array([37*np.cos(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
yarra_2 = np.array([37*np.sin(k*i+offset) for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
#cathodes, plane2 at +zmax/2
|
||||||
|
offsetc = offsetc-3*kc
|
||||||
|
xarrc_2 = np.array([42*np.cos(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
yarrc_2 = np.array([42*np.sin(kc*i+offsetc) for i in np.arange(0,24)])
|
||||||
|
|
||||||
|
wire_radius = 0.254 #mm
|
||||||
|
anode_wires = []
|
||||||
|
cathode_wires = []
|
||||||
|
aw_tags = [(3,i) for i in range(24)]
|
||||||
|
cw_tags = [(3,i+24) for i in range(24)]
|
||||||
|
|
||||||
|
for i,[xa,ya,xc,yc,xa2,ya2,xc2,yc2] in enumerate(zip(xarra_1,yarra_1,xarrc_1,yarrc_1,xarra_2,yarra_2,xarrc_2,yarrc_2)):
|
||||||
|
print(i,xa,ya,-178.3,xc,yc,-178.3,xa2,ya2,178.3,xc2,yc2,178.3)
|
||||||
|
pa1 = gmsh.model.occ.addPoint(xa,ya,-178.3,lc)
|
||||||
|
pa2 = gmsh.model.occ.addPoint(xa2,ya2,178.3,lc)
|
||||||
|
pc1 = gmsh.model.occ.addPoint(xc,yc,-178.3,lc)
|
||||||
|
pc2 = gmsh.model.occ.addPoint(xc2,yc2,178.3,lc)
|
||||||
|
linea = gmsh.model.occ.addLine(pa1,pa2)
|
||||||
|
linec = gmsh.model.occ.addLine(pc1,pc2)
|
||||||
|
anode_wires.append(linea)
|
||||||
|
cathode_wires.append(linec)
|
||||||
|
|
||||||
|
#anasen_barrel = gmsh.model.occ.addCylinder(0,0,-500,0,0,500+605,300,1234) #tag 1234
|
||||||
|
anasen_barrel = gmsh.model.occ.addCylinder(0,0,-200, 0,0,400, 300) #tag 1234
|
||||||
|
|
||||||
|
gmsh.model.occ.synchronize()
|
||||||
|
gmsh.model.mesh.embed(1,anode_wires+cathode_wires,3,anasen_barrel)
|
||||||
|
|
||||||
|
f1 = gmsh.model.mesh.field.add("Distance")
|
||||||
|
gmsh.model.mesh.field.setNumbers(f1,"CurvesList",anode_wires+cathode_wires)
|
||||||
|
|
||||||
|
f2 = gmsh.model.mesh.field.add("Threshold")
|
||||||
|
gmsh.model.mesh.field.setNumber(f2,"InField",f1)
|
||||||
|
gmsh.model.mesh.field.setNumber(f2,"SizeMin",0.08)
|
||||||
|
gmsh.model.mesh.field.setNumber(f2,"SizeMax",5)
|
||||||
|
gmsh.model.mesh.field.setNumber(f2,"DistMin",1)
|
||||||
|
gmsh.model.mesh.field.setNumber(f2,"DistMax",20)
|
||||||
|
|
||||||
|
gmsh.model.mesh.field.setAsBackgroundMesh(f2)
|
||||||
|
|
||||||
|
gmsh.model.addPhysicalGroup(1, anode_wires, tag=10)
|
||||||
|
gmsh.model.setPhysicalName(1,10,"anode_wires")
|
||||||
|
|
||||||
|
gmsh.model.addPhysicalGroup(1, cathode_wires, tag=20)
|
||||||
|
gmsh.model.setPhysicalName(1,20,"cathode_wires")
|
||||||
|
|
||||||
|
gmsh.option.setNumber("Mesh.Algorithm",6)
|
||||||
|
gmsh.option.setNumber("Mesh.Algorithm3D", 10) # For 3D meshes
|
||||||
|
|
||||||
|
gmsh.model.mesh.generate(dim=3)
|
||||||
|
gmsh.model.mesh.refine()
|
||||||
|
#gmsh.model.mesh.refine()
|
||||||
|
#gmsh.model.mesh.refine()
|
||||||
|
gmsh.fltk.run()
|
||||||
|
gmsh.finalize()
|
||||||
118
anasen_fem/paraview_plotter.py
Executable file
118
anasen_fem/paraview_plotter.py
Executable file
|
|
@ -0,0 +1,118 @@
|
||||||
|
#!/home/vsitaraman/ParaView-6.1.0-RC1-MPI-Linux-Python3.12-x86_64/bin/pvbatch
|
||||||
|
# #######!/home/vsitaraman/ParaView-6.1.0-MPI-Linux-Python3.12-x86_64/bin/pvbatch
|
||||||
|
import numpy as np
|
||||||
|
import sys
|
||||||
|
from paraview.simple import *
|
||||||
|
|
||||||
|
reader = XMLUnstructuredGridReader(FileName=["wires2d/elfield_anasen_t0001.vtu"])
|
||||||
|
|
||||||
|
contour_filter = Contour(Input=reader,ContourBy = 'potential')
|
||||||
|
contour_filter.Isosurfaces = [i for i in np.arange(0,660,660/40.)]
|
||||||
|
|
||||||
|
renderView = GetActiveViewOrCreate('RenderView')
|
||||||
|
renderView.ViewSize = [2000,2000]
|
||||||
|
renderView.OrientationAxesVisibility = 0 # Hide axis
|
||||||
|
renderView.UseColorPaletteForBackground=0
|
||||||
|
renderView.Background = [0.1, 0.1, 0.1] # Set background to dark gray (RGB 0-1)
|
||||||
|
|
||||||
|
renderView.MultiSamples = 8 # 0 disables it, 4-8 is usually sufficient
|
||||||
|
|
||||||
|
ResetCamera()
|
||||||
|
|
||||||
|
contour_display = Show(contour_filter, renderView)
|
||||||
|
contour_display.LineWidth = 3.0 # Increase this for thicker lines
|
||||||
|
contour_display.RenderLinesAsTubes = 1 # Makes lines look smoother at high res
|
||||||
|
#colorbar
|
||||||
|
contour_display_potentialLUT = GetColorTransferFunction('potential', contour_display, separate=True)
|
||||||
|
contour_display_potentialLUT.ApplyPreset('Cool to Warm', True)
|
||||||
|
contour_display.SetScalarBarVisibility(renderView, True)
|
||||||
|
|
||||||
|
#axesGrid = renderView.AxesGridrfcxgdtv
|
||||||
|
#axesGrid.Visibility = 1
|
||||||
|
#axesGrid.XTitle = "x (mm)"
|
||||||
|
#axesGrid.YTitle = "y (mm)"
|
||||||
|
|
||||||
|
# 1. Get the active view
|
||||||
|
view = GetActiveView()
|
||||||
|
|
||||||
|
# 2. Define your desired coordinate ranges (x_min, x_max, y_min, y_max, z_min, z_max)
|
||||||
|
x_min, x_max = -0.05, 0.05
|
||||||
|
y_min, y_max = -0.05, 0.05
|
||||||
|
z_min, z_max = -0.05, 0.05
|
||||||
|
|
||||||
|
# 3. Calculate Center, Position, and Parallel Scale
|
||||||
|
center = [(x_min + x_max) / 2.0, (y_min + y_max) / 2.0, (z_min + z_max) / 2.0]
|
||||||
|
# Position the camera far away along Z to look at the center
|
||||||
|
position = [center[0], center[1], 1.0]
|
||||||
|
# Parallel scale defines how much of the scene is visible.
|
||||||
|
# It is usually half the height of the viewed area.
|
||||||
|
view.CameraParallelScale = max((x_max - x_min), (y_max - y_min))/1.6
|
||||||
|
|
||||||
|
# 4. Apply settings
|
||||||
|
view.CenterOfRotation = center
|
||||||
|
view.CameraPosition = position
|
||||||
|
view.CameraFocalPoint = center
|
||||||
|
view.CameraViewUp = [0.0, 1.0, 0.0] # Y-axis is up
|
||||||
|
|
||||||
|
# 5. Enable Parallel Projection (optional, often better for exact mapping)
|
||||||
|
view.CameraParallelProjection = 1
|
||||||
|
|
||||||
|
#ResetCamera()
|
||||||
|
Render()
|
||||||
|
|
||||||
|
SaveScreenshot("contour_output.png")
|
||||||
|
|
||||||
|
#make glyps for field lines
|
||||||
|
contour_display.LineWidth = 1.0 # Increase this for thicker lines
|
||||||
|
contour_display.RenderLinesAsTubes = 0 # Makes lines look smoother at high res
|
||||||
|
|
||||||
|
# 1. Get the active view
|
||||||
|
view = GetActiveView()
|
||||||
|
|
||||||
|
# 1. Set the Focal Point to the middle of the quadrant in metres
|
||||||
|
zoom_center = [-0.025, 0.025, 0.0]
|
||||||
|
|
||||||
|
# 2. Tighten the Parallel Scale
|
||||||
|
view.CameraParallelScale = 0.015
|
||||||
|
|
||||||
|
# 3. Position the Camera (0.5m away is fine)
|
||||||
|
view.CameraPosition = [zoom_center[0], zoom_center[1], 0.5]
|
||||||
|
view.CameraFocalPoint = zoom_center
|
||||||
|
view.CameraViewUp = [0.0, 1.0, 0.0]
|
||||||
|
# pot_threshold = Threshold(Input=reader)
|
||||||
|
# pot_threshold.Scalars = ['POINTS', 'potential']
|
||||||
|
# pot_threshold.ThresholdMethod = 'Above Upper Threshold'
|
||||||
|
# pot_threshold.UpperThreshold = 100.0
|
||||||
|
|
||||||
|
# --- 2. Create the Glyph Filter (The Arrows) ---
|
||||||
|
# IMPORTANT: Use 'pot_threshold' as the Input, not the 'reader'
|
||||||
|
glyph = Glyph(Input=contour_filter, GlyphType='Arrow') #
|
||||||
|
# glyph = Glyph(Input=reader, GlyphType='Arrow') #this uses all field line snot just the ones from the equipotential lines shown
|
||||||
|
|
||||||
|
# Orientation Array: Use the 'electric field' vector from Elmer
|
||||||
|
glyph.OrientationArray = ['POINTS', 'electric field']
|
||||||
|
glyph.ScaleArray = ['POINTS', 'No scale array']
|
||||||
|
glyph.ScaleFactor = 0.001
|
||||||
|
|
||||||
|
glyph.GlyphMode = 'Every Nth Point'
|
||||||
|
glyph.Stride = 32
|
||||||
|
|
||||||
|
# --- 3. Display the Glyphs ---
|
||||||
|
glyph_display = Show(glyph, renderView)
|
||||||
|
|
||||||
|
# Set the representation to Surface so we see the full arrow colors
|
||||||
|
glyph_display.Representation = 'Surface'
|
||||||
|
|
||||||
|
|
||||||
|
# This is the critical line: Color the arrows by the 'potential' scalar
|
||||||
|
ColorBy(glyph_display, ('POINTS', 'potential'))
|
||||||
|
glyph_display.LookupTable = contour_display_potentialLUT
|
||||||
|
contour_display_potentialLUT.RescaleTransferFunction(0.0, 660.0)
|
||||||
|
|
||||||
|
# Optional: Disable the scalar bar for the arrows to avoid cluttering
|
||||||
|
# the existing 'potential' scalar bar.
|
||||||
|
glyph_display.SetScalarBarVisibility(renderView, False)
|
||||||
|
|
||||||
|
# --- 4. Final Render ---
|
||||||
|
Render()
|
||||||
|
SaveScreenshot("Field_output.png")
|
||||||
28
anasen_fem/run.py
Executable file
28
anasen_fem/run.py
Executable file
|
|
@ -0,0 +1,28 @@
|
||||||
|
import code
|
||||||
|
import os
|
||||||
|
|
||||||
|
# val=-174.3
|
||||||
|
val=0
|
||||||
|
count=10
|
||||||
|
while val<174.3+0.1:
|
||||||
|
print(val)
|
||||||
|
os.system("python3 wires_gmsh2d_bc.py "+str(val))
|
||||||
|
os.system("ElmerGrid 14 2 wires2d.msh -2d")
|
||||||
|
os.system("ElmerSolver wires2d.sif")
|
||||||
|
os.system("./paraview_plotter.py")
|
||||||
|
# os.system("python3 garfield_sim.py")
|
||||||
|
os.system("cp wires2d.msh wires2d/mesh_files/wires2d%02d_%1.4f.msh"%(count,val))
|
||||||
|
os.system("cp wires2d.sif wires2d/sif_files/wires2d_%02d_%1.4f.sif"%(count,val))
|
||||||
|
os.system("cp wires2d/elfield_anasen_t0001.vtu wires2d/vtu_files/elfield_anasen_%02d_%1.4f.vtu"%(count,val))
|
||||||
|
os.system("cp contour_output.png png/Contour_output_z_%02d_%1.4f.png"%(count,val))
|
||||||
|
os.system("cp Field_output.png png/Field_ouput_z_%02d_%1.4f.png"%(count,val))
|
||||||
|
val=val+17.43
|
||||||
|
count = count + 1
|
||||||
|
break
|
||||||
|
|
||||||
|
# os.system("tar -cvzf wiress2d/mesh.tar.gz wires2d/mesh_files")
|
||||||
|
# os.system("rm -rf wires2d/mesh_files/*")
|
||||||
|
# os.system("tar -cvzf wires2d/sif.tar.gz wires2d/sif_files")
|
||||||
|
# os.system("rm -rf wires2d/sif_files/*")
|
||||||
|
# os.system("tar -cvzf wires2d/vtu.tar.gz wires2d/vtu_files")
|
||||||
|
# os.system("rm -rf wires2d/vtu_files/*")
|
||||||
1
anasen_fem/scalars.dat
Executable file
1
anasen_fem/scalars.dat
Executable file
|
|
@ -0,0 +1 @@
|
||||||
|
8.500000000000E+002
|
||||||
8
anasen_fem/scalars.dat.names
Executable file
8
anasen_fem/scalars.dat.names
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
Metadata for SaveScalars file: ./scalars.dat
|
||||||
|
Elmer version: 26.2
|
||||||
|
Elmer compilation date: 2026-05-14
|
||||||
|
Solver input file: wires2d.sif
|
||||||
|
File started at: 2026/05/19 22:16:54
|
||||||
|
|
||||||
|
Variables in columns of matrix:
|
||||||
|
1: res: potential difference
|
||||||
120
anasen_fem/wires2d.sif
Executable file
120
anasen_fem/wires2d.sif
Executable file
|
|
@ -0,0 +1,120 @@
|
||||||
|
Check Keywords Warn
|
||||||
|
|
||||||
|
Header
|
||||||
|
Mesh DB "." "wires2d"
|
||||||
|
End
|
||||||
|
|
||||||
|
Simulation
|
||||||
|
Coordinate System = Cartesian 2D
|
||||||
|
Simulation Type = Steady State
|
||||||
|
Steady State Max Iterations = 1
|
||||||
|
Output File = "elstatics.result"
|
||||||
|
Post File = "elstatics.ep"
|
||||||
|
Coordinate Scaling = 0.001 ! Converts mm from Gmsh to meters for Elmer
|
||||||
|
End
|
||||||
|
|
||||||
|
Constants
|
||||||
|
Permittivity Of Vacuum = 8.8542e-12
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Body 1
|
||||||
|
Target Bodies(1) = 13
|
||||||
|
Equation = 1
|
||||||
|
Material = 1
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Equation 1
|
||||||
|
Active Solvers(2) = 1 2
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Material 1
|
||||||
|
Relative Permittivity = 1
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
Solver 1
|
||||||
|
Equation = Electrostatics
|
||||||
|
Procedure = "StatElecSolve" "StatElecSolver"
|
||||||
|
|
||||||
|
Variable = Potential
|
||||||
|
Variable DOFs = 1
|
||||||
|
|
||||||
|
Calculate Electric Field = True
|
||||||
|
Calculate Electric Flux = False
|
||||||
|
|
||||||
|
Linear System Solver = Iterative
|
||||||
|
Linear System Iterative Method = CG
|
||||||
|
Linear System Max Iterations = 5000
|
||||||
|
Linear System Convergence Tolerance = 1.0e-8
|
||||||
|
Linear System Preconditioning = ILU1
|
||||||
|
Calculate Vectors = Logical True
|
||||||
|
End
|
||||||
|
|
||||||
|
Solver 2
|
||||||
|
Equation = "Electric Field"
|
||||||
|
Procedure = "FluxSolver" "FluxSolver"
|
||||||
|
|
||||||
|
! Calculate from the potential
|
||||||
|
Target Variable = "Potential"
|
||||||
|
! Name of the output vector field in VTU
|
||||||
|
Flux Variable = String "Electric Field"
|
||||||
|
|
||||||
|
! Use 2D components (x, y)
|
||||||
|
Flux Coefficient = String "Permittivity"
|
||||||
|
|
||||||
|
Calculate Vectors = Logical True
|
||||||
|
End
|
||||||
|
|
||||||
|
Solver 3
|
||||||
|
Equation = Result Output
|
||||||
|
Procedure = "ResultOutputSolve" "ResultOutputSolver"
|
||||||
|
Output File Name = elfield_anasen ! Sets prefix for output files
|
||||||
|
Output Format = Vtu
|
||||||
|
! Optional: Select specific variables to save
|
||||||
|
Scalar Field 1 = Potential
|
||||||
|
Vector Field 1 = Electric Field
|
||||||
|
End
|
||||||
|
|
||||||
|
Solver 4
|
||||||
|
Exec Solver = After All
|
||||||
|
Equation = SaveScalars
|
||||||
|
Procedure = "SaveData" "SaveScalars"
|
||||||
|
Filename = "scalars.dat"
|
||||||
|
End
|
||||||
|
|
||||||
|
Boundary Condition 1
|
||||||
|
Target Boundaries = 1
|
||||||
|
Potential = -200
|
||||||
|
Calculate Electric Force = True
|
||||||
|
End
|
||||||
|
|
||||||
|
Boundary Condition 2
|
||||||
|
Target Boundaries = 2
|
||||||
|
Potential = 150
|
||||||
|
Calculate Electric Force = True
|
||||||
|
End
|
||||||
|
|
||||||
|
Boundary Condition 3
|
||||||
|
Target Boundaries = 3
|
||||||
|
Potential = 250
|
||||||
|
Calculate Electric Force = True
|
||||||
|
End
|
||||||
|
|
||||||
|
Boundary Condition 4
|
||||||
|
Target Boundaries = 10
|
||||||
|
Potential = 0
|
||||||
|
End
|
||||||
|
|
||||||
|
Boundary Condition 5
|
||||||
|
Target Boundaries = 20
|
||||||
|
Potential = 650
|
||||||
|
Calculate Electric Force = True
|
||||||
|
End
|
||||||
|
|
||||||
|
Boundary Condition 6
|
||||||
|
Target Boundaries = 30
|
||||||
|
Potential = 0
|
||||||
|
End
|
||||||
248
anasen_fem/wires_gmsh2d_bc.py
Executable file
248
anasen_fem/wires_gmsh2d_bc.py
Executable file
|
|
@ -0,0 +1,248 @@
|
||||||
|
# This script generates a 2D Gmsh geometry for the ANASEN detector's wire planes, including an optional hot needle and IC wires. The geometry is designed for adaptive meshing, with finer mesh near the wires and coarser mesh in empty space. The script takes a z-locus as a command-line argument to determine the interpolation between the two wire planes.
|
||||||
|
import numpy as np
|
||||||
|
import gmsh, sys
|
||||||
|
|
||||||
|
# --- Configuration Flags ---
|
||||||
|
include_ic_wires = True
|
||||||
|
include_needle = True
|
||||||
|
|
||||||
|
gmsh.initialize()
|
||||||
|
gmsh.model.add("adaptive_mesh")
|
||||||
|
gmsh.option.setNumber("General.NumThreads", 10)
|
||||||
|
# gmsh.option.setNumber("Mesh.Adapt.MaxNumberOfElements", 200000)
|
||||||
|
# gmsh.option.setNumber("Mesh.Adapt.MaxNumberOfNodes", 200000)
|
||||||
|
# gmsh.option.setNumber("Mesh.Adapt.MaxIter",5)
|
||||||
|
# gmsh.option.setNumber("Mesh.MeshSizeMin", 5e-3)
|
||||||
|
# gmsh.option.setNumber("Mesh.MeshSizeMax", 10.0)
|
||||||
|
gmsh.option.setNumber("Geometry.Tolerance", 4e-2)
|
||||||
|
# gmsh.option.setNumber("Mesh.MeshSizeExtendFromBoundary", 0)
|
||||||
|
|
||||||
|
lc = 0.04
|
||||||
|
# z_loc = -174.3
|
||||||
|
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print("Usage: python3 wires_gmsh2d_bc.py <z_locus in mm>")
|
||||||
|
quit()
|
||||||
|
|
||||||
|
z_loc = float(sys.argv[1])
|
||||||
|
|
||||||
|
wireShift = 4.0
|
||||||
|
k = 2 * np.pi / 24.0
|
||||||
|
kg = k/2.0
|
||||||
|
|
||||||
|
# Plane 1 Offsets (-zmax/2)
|
||||||
|
# Anodes: -6*k (base) - 4*k (correction) = -10*k
|
||||||
|
offset_a1 = -6 * k - 4 * k
|
||||||
|
# Cathodes: -6*k (base) + 0.5*k (half-placement)
|
||||||
|
offset_c1 = -6 * k + (k / 2.0)
|
||||||
|
# Guard wires: aligned with cathodes
|
||||||
|
offset_g1 = offset_c1
|
||||||
|
|
||||||
|
# Plane 2 Offsets (+zmax/2) with Twist
|
||||||
|
offset_a2 = offset_a1 + (wireShift * k)
|
||||||
|
offset_c2 = offset_c1 - (wireShift * k)
|
||||||
|
offset_g2 = offset_c2
|
||||||
|
|
||||||
|
# 1 needle, 24 ic1, 24 ic2, 48 guard wires, 24 anodes, 24 cathodes
|
||||||
|
|
||||||
|
# needle at plane 1 at -zmax/2 no rotation
|
||||||
|
xarr_needle = np.array([0])
|
||||||
|
yarr_needle = np.array([0])
|
||||||
|
|
||||||
|
# ic1 wires, plane 1 at -zmax/2 no rotation
|
||||||
|
xarr_i11 = np.array([23 * np.cos(k * i) for i in range(24)])
|
||||||
|
yarr_i11 = np.array([23 * np.sin(k * i) for i in range(24)])
|
||||||
|
|
||||||
|
# ic1 wires, plane 1 at -zmax/2 no rotation
|
||||||
|
xarr_i21 = np.array([23 * np.cos(k * i + k / 2.0) for i in range(24)])
|
||||||
|
yarr_i21 = np.array([23 * np.sin(k * i + k / 2.0) for i in range(24)])
|
||||||
|
|
||||||
|
# --- Coordinate Arrays (Plane 1) ---
|
||||||
|
# Anodes: -k*i (Left-handed twist direction)
|
||||||
|
xarra_1 = np.array([37 * np.cos(-k * i + offset_a1) for i in range(24)])
|
||||||
|
yarra_1 = np.array([37 * np.sin(-k * i + offset_a1) for i in range(24)])
|
||||||
|
|
||||||
|
# Cathodes: +k*i (Right-handed twist direction)
|
||||||
|
xarrc_1 = np.array([42 * np.cos(k * i + offset_c1) for i in range(24)])
|
||||||
|
yarrc_1 = np.array([42 * np.sin(k * i + offset_c1) for i in range(24)])
|
||||||
|
|
||||||
|
# Guard Wires (48 wires, use kg spacing)
|
||||||
|
xarrg_1 = np.array([32 * np.cos(kg * i + offset_g1) for i in range(48)])
|
||||||
|
yarrg_1 = np.array([32 * np.sin(kg * i + offset_g1) for i in range(48)])
|
||||||
|
|
||||||
|
# needle at plane 2 at zmax/2
|
||||||
|
xarr_needle_2 = np.array([0])
|
||||||
|
yarr_needle_2 = np.array([0])
|
||||||
|
|
||||||
|
# #ic1 wires, plane 2 at zmax/2
|
||||||
|
xarr_i12 = np.array([23 * np.cos(k * i) for i in range(24)])
|
||||||
|
yarr_i12 = np.array([23 * np.sin(k * i) for i in range(24)])
|
||||||
|
|
||||||
|
# #ic2 wires, plane 2 at zmax/2
|
||||||
|
xarr_i22 = np.array([23 * np.cos(k * i + k / 2.0) for i in range(24)])
|
||||||
|
yarr_i22 = np.array([23 * np.sin(k * i + k / 2.0) for i in range(24)])
|
||||||
|
|
||||||
|
# --- Coordinate Arrays (Plane 2) ---
|
||||||
|
xarra_2 = np.array([37 * np.cos(-k * i + offset_a2) for i in range(24)])
|
||||||
|
yarra_2 = np.array([37 * np.sin(-k * i + offset_a2) for i in range(24)])
|
||||||
|
|
||||||
|
xarrc_2 = np.array([42 * np.cos(k * i + offset_c2) for i in range(24)])
|
||||||
|
yarrc_2 = np.array([42 * np.sin(k * i + offset_c2) for i in range(24)])
|
||||||
|
|
||||||
|
xarrg_2 = np.array([32 * np.cos(kg * i + offset_g2) for i in range(48)])
|
||||||
|
yarrg_2 = np.array([32 * np.sin(kg * i + offset_g2) for i in range(48)])
|
||||||
|
|
||||||
|
direction_needle_x = xarr_needle_2 - xarr_needle
|
||||||
|
direction_needle_y = yarr_needle_2 - yarr_needle
|
||||||
|
|
||||||
|
direction_ic1_x = xarr_i12 - xarr_i11
|
||||||
|
direction_ic1_y = yarr_i12 - yarr_i11
|
||||||
|
|
||||||
|
direction_ic2_x = xarr_i22 - xarr_i21
|
||||||
|
direction_ic2_y = yarr_i22 - yarr_i21
|
||||||
|
|
||||||
|
direction_guard_x = xarrg_2 - xarrg_1
|
||||||
|
direction_guard_y = yarrg_2 - yarrg_1
|
||||||
|
|
||||||
|
direction_anodes_x = xarra_2 - xarra_1
|
||||||
|
direction_anodes_y = yarra_2 - yarra_1
|
||||||
|
|
||||||
|
direction_cathodes_x = xarrc_2 - xarrc_1
|
||||||
|
direction_cathodes_y = yarrc_2 - yarrc_1
|
||||||
|
|
||||||
|
t = (z_loc + 174.3) / (2 * 174.3) # z=-174.3 is 0, z=+174.3 is 1
|
||||||
|
|
||||||
|
xloc_needle = xarr_needle + t * direction_needle_x
|
||||||
|
yloc_needle = yarr_needle + t * direction_needle_y
|
||||||
|
xloc_i1 = xarr_i11 + t * direction_ic1_x
|
||||||
|
yloc_i1 = yarr_i11 + t * direction_ic1_y
|
||||||
|
xloc_i2 = xarr_i21 + t * direction_ic2_x
|
||||||
|
yloc_i2 = yarr_i21 + t * direction_ic2_y
|
||||||
|
xloc_g = xarrg_1 + t * direction_guard_x
|
||||||
|
yloc_g = yarrg_1 + t * direction_guard_y
|
||||||
|
xloc_a = xarra_1 + t * direction_anodes_x
|
||||||
|
yloc_a = yarra_1 + t * direction_anodes_y
|
||||||
|
xloc_c = xarrc_1 + t * direction_cathodes_x
|
||||||
|
yloc_c = yarrc_1 + t * direction_cathodes_y
|
||||||
|
|
||||||
|
# wire_radius_a = 0.018 #mm
|
||||||
|
# wire_radius_c = 0.0762 #mm
|
||||||
|
# wire_radius_g = 0.0762 #mm
|
||||||
|
wire_radius = 0.254 # mm
|
||||||
|
needle = []
|
||||||
|
ic1_wires = []
|
||||||
|
ic2_wires = []
|
||||||
|
guard_wires = []
|
||||||
|
anode_wires = []
|
||||||
|
cathode_wires = []
|
||||||
|
iw1_tags = [(3, i) for i in range(24)]
|
||||||
|
iw2_tags = [(3, i + 24) for i in range(24)]
|
||||||
|
gw_tags = [(3, i + 48) for i in range(48)]
|
||||||
|
aw_tags = [(3, i) for i in range(24)]
|
||||||
|
cw_tags = [(3, i + 24) for i in range(24)]
|
||||||
|
|
||||||
|
# for i,[xa,ya,xc,yc] in enumerate(zip(xarra_1,yarra_1,xarrc_1,yarrc_1)):
|
||||||
|
# create Hot Needle (1 total)
|
||||||
|
for i, (xn, yn) in enumerate(zip(xloc_needle, yloc_needle)):
|
||||||
|
if include_needle:
|
||||||
|
ndisk = gmsh.model.occ.addDisk(xn, yn, 0, wire_radius, wire_radius)
|
||||||
|
needle.append(ndisk)
|
||||||
|
|
||||||
|
# create Guard Wires (48 total)
|
||||||
|
for xg, yg in zip(xloc_g, yloc_g):
|
||||||
|
gdisk = gmsh.model.occ.addDisk(xg, yg, 0, wire_radius, wire_radius)
|
||||||
|
guard_wires.append(gdisk)
|
||||||
|
|
||||||
|
# create Cathode Wires (24 total)
|
||||||
|
for xc, yc in zip(xloc_c, yloc_c):
|
||||||
|
cdisk = gmsh.model.occ.addDisk(xc, yc, 0, wire_radius, wire_radius)
|
||||||
|
cathode_wires.append(cdisk)
|
||||||
|
|
||||||
|
# create IC Anode and Cathode Wires (24 total each)
|
||||||
|
for i, (xa, ya) in enumerate(zip(xloc_a, yloc_a)):
|
||||||
|
adisk = gmsh.model.occ.addDisk(xa, ya, 0, wire_radius, wire_radius)
|
||||||
|
anode_wires.append(adisk)
|
||||||
|
|
||||||
|
# Place IC wires only if flag is True
|
||||||
|
if include_ic_wires:
|
||||||
|
i1disk = gmsh.model.occ.addDisk(
|
||||||
|
xloc_i1[i], yloc_i1[i], 0, wire_radius, wire_radius
|
||||||
|
)
|
||||||
|
i2disk = gmsh.model.occ.addDisk(
|
||||||
|
xloc_i2[i], yloc_i2[i], 0, wire_radius, wire_radius
|
||||||
|
)
|
||||||
|
ic1_wires.append(i1disk)
|
||||||
|
ic2_wires.append(i2disk)
|
||||||
|
|
||||||
|
anasen_barrel = gmsh.model.occ.addDisk(0, 0, 0, 500, 500)
|
||||||
|
# gmsh.model.occ.synchronize()
|
||||||
|
# gmsh.model.mesh.embed(1,anode_wires+cathode_wires,2,anasen_barrel)
|
||||||
|
|
||||||
|
gmsh.option.setNumber("Geometry.Tolerance", 1e-6)
|
||||||
|
gmsh.option.setNumber("Geometry.OCCFixDegenerated", 1)
|
||||||
|
gmsh.model.occ.synchronize()
|
||||||
|
|
||||||
|
|
||||||
|
# --- Surface Extraction ---
|
||||||
|
def get_surfs(disks):
|
||||||
|
surfs = []
|
||||||
|
for d in disks:
|
||||||
|
surfs += [
|
||||||
|
s[1] for s in gmsh.model.getBoundary([(2, d)], oriented=False) if s[0] == 1
|
||||||
|
]
|
||||||
|
return surfs
|
||||||
|
|
||||||
|
|
||||||
|
needle_surfs = get_surfs(needle) if include_needle else []
|
||||||
|
gwire_surfs = get_surfs(guard_wires)
|
||||||
|
awire_surfs = get_surfs(anode_wires)
|
||||||
|
cwire_surfs = get_surfs(cathode_wires)
|
||||||
|
i1wire_surfs = get_surfs(ic1_wires) if include_ic_wires else []
|
||||||
|
i2wire_surfs = get_surfs(ic2_wires) if include_ic_wires else []
|
||||||
|
|
||||||
|
|
||||||
|
all_active_wire_surfs = (
|
||||||
|
needle_surfs + gwire_surfs + awire_surfs + cwire_surfs + i1wire_surfs + i2wire_surfs
|
||||||
|
)
|
||||||
|
gmsh.model.mesh.embed(1, all_active_wire_surfs, 2, anasen_barrel)
|
||||||
|
|
||||||
|
f1 = gmsh.model.mesh.field.add("Distance")
|
||||||
|
gmsh.model.mesh.field.setNumbers(f1, "CurvesList", all_active_wire_surfs)
|
||||||
|
|
||||||
|
f2 = gmsh.model.mesh.field.add("Threshold")
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "InField", f1)
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "SizeMin", 0.05) # Fine mesh near wires
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "SizeMax", 5.0) # Large mesh in empty space
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "DistMin", 0.5) # Apply SizeMin within 1mm
|
||||||
|
gmsh.model.mesh.field.setNumber(f2, "DistMax", 15.0) # Transition to SizeMax by 20mm
|
||||||
|
|
||||||
|
gmsh.model.mesh.field.setAsBackgroundMesh(f2)
|
||||||
|
|
||||||
|
|
||||||
|
# --- Physical Groups ---
|
||||||
|
# Needle
|
||||||
|
if include_needle:
|
||||||
|
gmsh.model.addPhysicalGroup(1, needle_surfs, tag=1, name="hot_needle")
|
||||||
|
|
||||||
|
# IC Wires
|
||||||
|
if include_ic_wires:
|
||||||
|
gmsh.model.addPhysicalGroup(1, i1wire_surfs, tag=2, name="ic_wire_1")
|
||||||
|
gmsh.model.addPhysicalGroup(1, i2wire_surfs, tag=3, name="ic_wire_2")
|
||||||
|
|
||||||
|
# Proportional Counter Wires
|
||||||
|
gmsh.model.addPhysicalGroup(1, gwire_surfs, tag=10, name="guard_wires")
|
||||||
|
gmsh.model.addPhysicalGroup(1, awire_surfs, tag=20, name="anode_wires")
|
||||||
|
gmsh.model.addPhysicalGroup(1, cwire_surfs, tag=30, name="cathode_wires")
|
||||||
|
|
||||||
|
# Gas Volume (2D)
|
||||||
|
gmsh.model.addPhysicalGroup(2, [anasen_barrel], tag=13, name="gas")
|
||||||
|
|
||||||
|
gmsh.option.setNumber("Mesh.Algorithm", 6)
|
||||||
|
|
||||||
|
gmsh.model.mesh.generate(dim=2)
|
||||||
|
# gmsh.model.mesh.refine()
|
||||||
|
# gmsh.model.mesh.refine()
|
||||||
|
gmsh.model.mesh.setOrder(2)
|
||||||
|
gmsh.write("wires2d.msh")
|
||||||
|
# gmsh.fltk.run()
|
||||||
|
gmsh.finalize()
|
||||||
89
centroids_edited.txt
Normal file
89
centroids_edited.txt
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
HistogramIndex PeakNumber Centroid Amplitude Sigma
|
||||||
|
1 1 922.213
|
||||||
|
1 2 1885.55
|
||||||
|
1 3 2845.53
|
||||||
|
1 4 3810.32
|
||||||
|
2 1 955.591
|
||||||
|
2 2 1953.17
|
||||||
|
2 3 2949.37
|
||||||
|
2 4 3950.79
|
||||||
|
3 1 995.787
|
||||||
|
3 2 2036.58
|
||||||
|
3 3 3076.91
|
||||||
|
3 4 4112.05
|
||||||
|
4 1 1017.48
|
||||||
|
4 2 2080.19
|
||||||
|
4 3 3142.24
|
||||||
|
4 4 4206.1
|
||||||
|
5 1 1022.78
|
||||||
|
5 2 2091.21
|
||||||
|
5 3 3158.28
|
||||||
|
5 4 4226.97
|
||||||
|
6 1 1076.22
|
||||||
|
6 2 2203.37
|
||||||
|
6 3 3329.53
|
||||||
|
6 4 4457.69
|
||||||
|
7 1 977.46
|
||||||
|
7 2 1998.02
|
||||||
|
7 3 3017.36
|
||||||
|
7 4 4040.47
|
||||||
|
8 1 1049.74
|
||||||
|
8 2 2144.38
|
||||||
|
8 3 3238.2
|
||||||
|
8 4 4335.25
|
||||||
|
9 1 1000.59
|
||||||
|
9 2 2046.42
|
||||||
|
9 3 3090.29
|
||||||
|
9 4 4129.63
|
||||||
|
10 1 1014.92
|
||||||
|
10 2 2076.16
|
||||||
|
10 3 3134.59
|
||||||
|
10 4 4213.42
|
||||||
|
11 1 1004.85
|
||||||
|
11 2 2052.88
|
||||||
|
11 3 3100.3
|
||||||
|
11 4 4164.75
|
||||||
|
12 1 945.861
|
||||||
|
12 2 1932.49
|
||||||
|
12 3 2917.95
|
||||||
|
12 4 3955.15
|
||||||
|
13 1 998.307
|
||||||
|
13 2 2040.38
|
||||||
|
13 3 3078.76
|
||||||
|
13 4 4135.51
|
||||||
|
14 1 966.429
|
||||||
|
14 2 1972.15
|
||||||
|
14 3 2974.84
|
||||||
|
14 4 4056.41
|
||||||
|
15 1 958.352
|
||||||
|
15 2 1958.64
|
||||||
|
15 3 2957.7
|
||||||
|
15 4 3970.41
|
||||||
|
16 1 970.732
|
||||||
|
16 2 1977.63
|
||||||
|
16 3 2984.97
|
||||||
|
16 4 4002.56
|
||||||
|
17 1 1013.65
|
||||||
|
17 2 2064.9
|
||||||
|
17 3 3114.19
|
||||||
|
17 4 4190.98
|
||||||
|
18 1 975.538
|
||||||
|
18 2 1990.64
|
||||||
|
18 3 3005.46
|
||||||
|
18 4 4048.99
|
||||||
|
20 1 912.778
|
||||||
|
20 2 1866.83
|
||||||
|
20 3 2819.21
|
||||||
|
20 4 3781.63
|
||||||
|
21 1 1002.36
|
||||||
|
21 2 1989.95
|
||||||
|
21 3 2975.53
|
||||||
|
21 4 3986.71
|
||||||
|
22 1 1075.38
|
||||||
|
22 2 2144.25
|
||||||
|
22 3 3210.17
|
||||||
|
22 4 4312.84
|
||||||
|
23 1 988.828
|
||||||
|
23 2 2016.35
|
||||||
|
23 3 3044.19
|
||||||
|
23 4 4082.41
|
||||||
48
detector_geometry.dat
Normal file
48
detector_geometry.dat
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
=========================================================
|
||||||
|
SX3 BARREL AZIMUTHAL ANGLES (Degrees)
|
||||||
|
=========================================================
|
||||||
|
Det ID | Strip 0 | Strip 1 | Strip 2 | Strip 3 | Det Center
|
||||||
|
---------------------------------------------------------
|
||||||
|
0 | 85.08 | 78.39 | 71.61 | 64.92 | 75.00
|
||||||
|
1 | 55.08 | 48.39 | 41.61 | 34.92 | 45.00
|
||||||
|
2 | 25.08 | 18.39 | 11.61 | 4.92 | 15.00
|
||||||
|
3 | -4.92 | -11.61 | -18.39 | -25.08 | -15.00
|
||||||
|
4 | -34.92 | -41.61 | -48.39 | -55.08 | -45.00
|
||||||
|
5 | -64.92 | -71.61 | -78.39 | -85.08 | -75.00
|
||||||
|
6 | -94.92 | -101.61 | -108.39 | -115.08 | -105.00
|
||||||
|
7 | -124.92 | -131.61 | -138.39 | -145.08 | -135.00
|
||||||
|
8 | -154.92 | -161.61 | -168.39 | -175.08 | -165.00
|
||||||
|
9 | 175.08 | 168.39 | 161.61 | 154.92 | 165.00
|
||||||
|
10 | 145.08 | 138.39 | 131.61 | 124.92 | 135.00
|
||||||
|
11 | 115.08 | 108.39 | 101.61 | 94.92 | 105.00
|
||||||
|
|
||||||
|
|
||||||
|
=========================================================
|
||||||
|
PROPORTIONAL COUNTER WIRE ANGLES (Degrees)
|
||||||
|
=========================================================
|
||||||
|
Wire ID | Anode (-z) | Anode (+z) | Cathode (-z) | Cathode (+z)
|
||||||
|
----------------------------------------------------------------
|
||||||
|
0 | -135.00 | -90.00 | -97.50 | -142.50
|
||||||
|
1 | -150.00 | -105.00 | -82.50 | -127.50
|
||||||
|
2 | -165.00 | -120.00 | -67.50 | -112.50
|
||||||
|
3 | -180.00 | -135.00 | -52.50 | -97.50
|
||||||
|
4 | 165.00 | -150.00 | -37.50 | -82.50
|
||||||
|
5 | 150.00 | -165.00 | -22.50 | -67.50
|
||||||
|
6 | 135.00 | -180.00 | -7.50 | -52.50
|
||||||
|
7 | 120.00 | 165.00 | 7.50 | -37.50
|
||||||
|
8 | 105.00 | 150.00 | 22.50 | -22.50
|
||||||
|
9 | 90.00 | 135.00 | 37.50 | -7.50
|
||||||
|
10 | 75.00 | 120.00 | 52.50 | 7.50
|
||||||
|
11 | 60.00 | 105.00 | 67.50 | 22.50
|
||||||
|
12 | 45.00 | 90.00 | 82.50 | 37.50
|
||||||
|
13 | 30.00 | 75.00 | 97.50 | 52.50
|
||||||
|
14 | 15.00 | 60.00 | 112.50 | 67.50
|
||||||
|
15 | 0.00 | 45.00 | 127.50 | 82.50
|
||||||
|
16 | -15.00 | 30.00 | 142.50 | 97.50
|
||||||
|
17 | -30.00 | 15.00 | 157.50 | 112.50
|
||||||
|
18 | -45.00 | 0.00 | 172.50 | 127.50
|
||||||
|
19 | -60.00 | -15.00 | -172.50 | 142.50
|
||||||
|
20 | -75.00 | -30.00 | -157.50 | 157.50
|
||||||
|
21 | -90.00 | -45.00 | -142.50 | 172.50
|
||||||
|
22 | -105.00 | -60.00 | -127.50 | -172.50
|
||||||
|
23 | -120.00 | -75.00 | -112.50 | -157.50
|
||||||
96
eloss_calculations/Eloss.py
Normal file
96
eloss_calculations/Eloss.py
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
import pycatima as catima
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
# --- 1. Constants ---
|
||||||
|
P_TORR = 250
|
||||||
|
TEMP_K = 293.15
|
||||||
|
R = 8.3144
|
||||||
|
MEV2U = 1.0 / 931.494
|
||||||
|
P_CO2 = 4
|
||||||
|
|
||||||
|
# Gas Density Calculations
|
||||||
|
p_pa = P_TORR * 133.322
|
||||||
|
molar_density = p_pa / (R * TEMP_K)
|
||||||
|
m_he, m_c, m_o= 4.0026, 12.0000, 15.9949
|
||||||
|
m_mix_avg = ((1 - P_CO2 / 100) * m_he) + (P_CO2 / 100 * (m_c + 2*m_o))
|
||||||
|
rho_g_cm3 = (molar_density * m_mix_avg) / 1e6
|
||||||
|
print(f"Gas density at {P_TORR} Torr: {rho_g_cm3:.6e} g/cm^3")
|
||||||
|
|
||||||
|
# --- 2. Material & Step Setup ---
|
||||||
|
material_def = [(m_he, 2, (1 - P_CO2 / 100)), (m_c, 6, P_CO2 / 100), (m_o, 8, 2*P_CO2 / 100)]
|
||||||
|
gas_mix = catima.Material(material_def)
|
||||||
|
gas_mix.density(rho_g_cm3)
|
||||||
|
|
||||||
|
# Thickness step settings
|
||||||
|
step_mg_cm2 = 0.001 # 1 ug/cm2 steps as per your example -- kept fine for
|
||||||
|
# numerical accuracy of the dedx integration itself.
|
||||||
|
step_g_cm2 = step_mg_cm2 / 1000.0
|
||||||
|
max_steps = 1000000000 # Adjust based on how far you want to track
|
||||||
|
|
||||||
|
coarse_step_cm = 0.2 # row spacing over most of the track
|
||||||
|
fine_step_cm = 0.03 # row spacing near the Bragg peak
|
||||||
|
fine_zone_frac = 0.085 # fraction of the *total* range treated as "near the peak"
|
||||||
|
|
||||||
|
def generate_lookup(z, mass_u, e_start_mev, label):
|
||||||
|
filename = f"{label}_lookup_{e_start_mev}MeV_{P_TORR}torr_{P_CO2}pc.dat"
|
||||||
|
header = f"Energy(MeV) \tmg/cm2 \tcm\nStarting Energy: {e_start_mev} MeV"
|
||||||
|
|
||||||
|
# Pass 1: integrate at full precision just to find the total range (needed
|
||||||
|
# to know where the "last fine_zone_frac" of the track begins).
|
||||||
|
projectile = catima.Projectile(mass_u, z)
|
||||||
|
e_u = e_start_mev / mass_u
|
||||||
|
total_thickness_g_cm2 = 0.0
|
||||||
|
while e_u >= 0.0001:
|
||||||
|
projectile.T(e_u)
|
||||||
|
loss_mev = catima.dedx(projectile, gas_mix) * step_g_cm2
|
||||||
|
e_u = (e_u * mass_u - loss_mev) / mass_u
|
||||||
|
total_thickness_g_cm2 += step_g_cm2
|
||||||
|
total_range_cm = total_thickness_g_cm2 / rho_g_cm3
|
||||||
|
fine_zone_start_cm = total_range_cm * (1.0 - fine_zone_frac)
|
||||||
|
|
||||||
|
projectile = catima.Projectile(mass_u, z)
|
||||||
|
current_e_total = e_start_mev
|
||||||
|
current_thickness_g_cm2 = 0.0
|
||||||
|
next_checkpoint_cm = 0.0
|
||||||
|
|
||||||
|
output = []
|
||||||
|
last_dist_cm = None
|
||||||
|
|
||||||
|
def append_row(e_total, thickness_g_cm2, dist_cm):
|
||||||
|
if last_dist_cm is not None and dist_cm <= last_dist_cm:
|
||||||
|
return False
|
||||||
|
output.append([e_total, thickness_g_cm2 * 1000.0, dist_cm])
|
||||||
|
return True
|
||||||
|
|
||||||
|
for i in range(max_steps):
|
||||||
|
dist_cm = current_thickness_g_cm2 / rho_g_cm3
|
||||||
|
if dist_cm >= next_checkpoint_cm:
|
||||||
|
if append_row(current_e_total, current_thickness_g_cm2, dist_cm):
|
||||||
|
last_dist_cm = dist_cm
|
||||||
|
step_cm = fine_step_cm if dist_cm >= fine_zone_start_cm else coarse_step_cm
|
||||||
|
next_checkpoint_cm = dist_cm + step_cm
|
||||||
|
|
||||||
|
e_u = current_e_total / mass_u
|
||||||
|
if e_u < 0.0001: # Stop at ATIMA limit
|
||||||
|
append_row(current_e_total, current_thickness_g_cm2, dist_cm)
|
||||||
|
break
|
||||||
|
|
||||||
|
projectile.T(e_u)
|
||||||
|
# dedx returns MeV / (g/cm2)
|
||||||
|
loss_mev = catima.dedx(projectile, gas_mix) * step_g_cm2
|
||||||
|
|
||||||
|
current_e_total = max(0.0, current_e_total - loss_mev)
|
||||||
|
current_thickness_g_cm2 += step_g_cm2
|
||||||
|
|
||||||
|
np.savetxt(filename, output, fmt='%.6f', delimiter='\t', header=header)
|
||||||
|
print(f"Lookup table created: {filename} ({len(output)} rows, "
|
||||||
|
f"range {total_range_cm:.2f} cm, fine zone below {fine_zone_start_cm:.2f} cm)")
|
||||||
|
|
||||||
|
# --- 3. Run ---
|
||||||
|
# Format: generate_lookup(Z, mass_u, E_start_MeV, label)
|
||||||
|
generate_lookup(1, 1.0078, 30, "proton")
|
||||||
|
generate_lookup(1, 2.01355, 30, "deutron")
|
||||||
|
generate_lookup(2, 4.0026, 50, "alpha")
|
||||||
|
generate_lookup(13,26.9815, 80, "aluminum")
|
||||||
|
generate_lookup(9,17.0021, 70, "fluorine")
|
||||||
|
generate_lookup(8,15.9949, 70, "oxygen")
|
||||||
15189
eloss_calculations/alpha_lookup_50MeV_250torr_3pc.dat
Normal file
15189
eloss_calculations/alpha_lookup_50MeV_250torr_3pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
14328
eloss_calculations/alpha_lookup_50MeV_250torr_4pc.dat
Normal file
14328
eloss_calculations/alpha_lookup_50MeV_250torr_4pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
12596
eloss_calculations/alpha_lookup_50MeV_350torr_3pc.dat
Normal file
12596
eloss_calculations/alpha_lookup_50MeV_350torr_3pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
10527
eloss_calculations/alpha_lookup_50MeV_350torr_4pc.dat
Normal file
10527
eloss_calculations/alpha_lookup_50MeV_350torr_4pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
397
eloss_calculations/aluminum_lookup_80MeV_250torr_3pc.dat
Normal file
397
eloss_calculations/aluminum_lookup_80MeV_250torr_3pc.dat
Normal file
|
|
@ -0,0 +1,397 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 80 MeV
|
||||||
|
80.000000 0.000000 0.000000
|
||||||
|
79.766654 0.015000 0.210854
|
||||||
|
79.532996 0.030000 0.421708
|
||||||
|
79.299025 0.045000 0.632562
|
||||||
|
79.064738 0.060000 0.843416
|
||||||
|
78.830135 0.075000 1.054270
|
||||||
|
78.595215 0.090000 1.265124
|
||||||
|
78.359976 0.105000 1.475978
|
||||||
|
78.124416 0.120000 1.686832
|
||||||
|
77.888535 0.135000 1.897686
|
||||||
|
77.652331 0.150000 2.108540
|
||||||
|
77.415803 0.165000 2.319394
|
||||||
|
77.178950 0.180000 2.530248
|
||||||
|
76.941769 0.195000 2.741102
|
||||||
|
76.704260 0.210000 2.951956
|
||||||
|
76.466421 0.225000 3.162810
|
||||||
|
76.228251 0.240000 3.373664
|
||||||
|
75.989748 0.255000 3.584518
|
||||||
|
75.750912 0.270000 3.795372
|
||||||
|
75.511739 0.285000 4.006226
|
||||||
|
75.272230 0.300000 4.217080
|
||||||
|
75.032383 0.315000 4.427934
|
||||||
|
74.792195 0.330000 4.638788
|
||||||
|
74.551666 0.345000 4.849642
|
||||||
|
74.310794 0.360000 5.060496
|
||||||
|
74.069578 0.375000 5.271350
|
||||||
|
73.828016 0.390000 5.482204
|
||||||
|
73.586107 0.405000 5.693058
|
||||||
|
73.343848 0.420000 5.903912
|
||||||
|
73.101239 0.435000 6.114766
|
||||||
|
72.858278 0.450000 6.325620
|
||||||
|
72.614963 0.465000 6.536474
|
||||||
|
72.371292 0.480000 6.747328
|
||||||
|
72.127265 0.495000 6.958182
|
||||||
|
71.882879 0.510000 7.169036
|
||||||
|
71.638133 0.525000 7.379890
|
||||||
|
71.393026 0.540000 7.590744
|
||||||
|
71.147555 0.555000 7.801598
|
||||||
|
70.901718 0.570000 8.012452
|
||||||
|
70.655515 0.585000 8.223306
|
||||||
|
70.408943 0.600000 8.434160
|
||||||
|
70.162001 0.615000 8.645014
|
||||||
|
69.914687 0.630000 8.855868
|
||||||
|
69.666999 0.645000 9.066722
|
||||||
|
69.418936 0.660000 9.277576
|
||||||
|
69.170496 0.675000 9.488430
|
||||||
|
68.921676 0.690000 9.699284
|
||||||
|
68.672475 0.705000 9.910138
|
||||||
|
68.422892 0.720000 10.120992
|
||||||
|
68.172925 0.735000 10.331846
|
||||||
|
67.922571 0.750000 10.542700
|
||||||
|
67.671828 0.765000 10.753554
|
||||||
|
67.420696 0.780000 10.964408
|
||||||
|
67.169172 0.795000 11.175262
|
||||||
|
66.917254 0.810000 11.386116
|
||||||
|
66.664939 0.825000 11.596970
|
||||||
|
66.412227 0.840000 11.807825
|
||||||
|
66.159116 0.855000 12.018679
|
||||||
|
65.905602 0.870000 12.229533
|
||||||
|
65.651685 0.885000 12.440387
|
||||||
|
65.397362 0.900000 12.651241
|
||||||
|
65.142631 0.915000 12.862095
|
||||||
|
64.887491 0.930000 13.072949
|
||||||
|
64.631938 0.945000 13.283803
|
||||||
|
64.375971 0.960000 13.494657
|
||||||
|
64.119588 0.975000 13.705511
|
||||||
|
63.862787 0.990000 13.916365
|
||||||
|
63.605566 1.005000 14.127219
|
||||||
|
63.347922 1.020000 14.338073
|
||||||
|
63.089853 1.035000 14.548927
|
||||||
|
62.831356 1.050000 14.759781
|
||||||
|
62.572431 1.065000 14.970635
|
||||||
|
62.313074 1.080000 15.181489
|
||||||
|
62.053284 1.095000 15.392343
|
||||||
|
61.793057 1.110000 15.603197
|
||||||
|
61.532392 1.125000 15.814051
|
||||||
|
61.271286 1.140000 16.024905
|
||||||
|
61.009737 1.155000 16.235759
|
||||||
|
60.747742 1.170000 16.446613
|
||||||
|
60.485299 1.185000 16.657467
|
||||||
|
60.222406 1.200000 16.868321
|
||||||
|
59.959060 1.215000 17.079175
|
||||||
|
59.695259 1.230000 17.290029
|
||||||
|
59.431000 1.245000 17.500883
|
||||||
|
59.166280 1.260000 17.711737
|
||||||
|
58.901097 1.275000 17.922591
|
||||||
|
58.635449 1.290000 18.133445
|
||||||
|
58.369332 1.305000 18.344299
|
||||||
|
58.102744 1.320000 18.555153
|
||||||
|
57.835683 1.335000 18.766007
|
||||||
|
57.568146 1.350000 18.976861
|
||||||
|
57.300129 1.365000 19.187715
|
||||||
|
57.031631 1.380000 19.398569
|
||||||
|
56.762648 1.395000 19.609423
|
||||||
|
56.493177 1.410000 19.820277
|
||||||
|
56.223216 1.425000 20.031131
|
||||||
|
55.952762 1.440000 20.241985
|
||||||
|
55.681811 1.455000 20.452839
|
||||||
|
55.410362 1.470000 20.663693
|
||||||
|
55.138410 1.485000 20.874547
|
||||||
|
54.865953 1.500000 21.085401
|
||||||
|
54.592988 1.515000 21.296255
|
||||||
|
54.319511 1.530000 21.507109
|
||||||
|
54.045519 1.545000 21.717963
|
||||||
|
53.771010 1.560000 21.928817
|
||||||
|
53.495980 1.575000 22.139671
|
||||||
|
53.220426 1.590000 22.350525
|
||||||
|
52.944344 1.605000 22.561379
|
||||||
|
52.667731 1.620000 22.772233
|
||||||
|
52.390583 1.635000 22.983087
|
||||||
|
52.112898 1.650000 23.193941
|
||||||
|
51.834672 1.665000 23.404795
|
||||||
|
51.555901 1.680000 23.615649
|
||||||
|
51.276581 1.695000 23.826503
|
||||||
|
50.996710 1.710000 24.037357
|
||||||
|
50.716282 1.725000 24.248211
|
||||||
|
50.435296 1.740000 24.459065
|
||||||
|
50.153746 1.755000 24.669919
|
||||||
|
49.871629 1.770000 24.880773
|
||||||
|
49.588941 1.785000 25.091627
|
||||||
|
49.305678 1.800000 25.302481
|
||||||
|
49.021837 1.815000 25.513335
|
||||||
|
48.737412 1.830000 25.724189
|
||||||
|
48.452400 1.845000 25.935043
|
||||||
|
48.166797 1.860000 26.145897
|
||||||
|
47.880599 1.875000 26.356751
|
||||||
|
47.593801 1.890000 26.567605
|
||||||
|
47.306399 1.905000 26.778459
|
||||||
|
47.018388 1.920000 26.989313
|
||||||
|
46.729764 1.935000 27.200167
|
||||||
|
46.440522 1.950000 27.411021
|
||||||
|
46.150658 1.965000 27.621875
|
||||||
|
45.860166 1.980000 27.832729
|
||||||
|
45.569043 1.995000 28.043583
|
||||||
|
45.277283 2.010000 28.254437
|
||||||
|
44.984881 2.025000 28.465291
|
||||||
|
44.691832 2.040000 28.676145
|
||||||
|
44.398131 2.055000 28.886999
|
||||||
|
44.103773 2.070000 29.097853
|
||||||
|
43.808752 2.085000 29.308707
|
||||||
|
43.513062 2.100000 29.519561
|
||||||
|
43.216700 2.115000 29.730415
|
||||||
|
42.919657 2.130000 29.941269
|
||||||
|
42.621930 2.145000 30.152123
|
||||||
|
42.323512 2.160000 30.362977
|
||||||
|
42.024397 2.175000 30.573831
|
||||||
|
41.724578 2.190000 30.784685
|
||||||
|
41.424051 2.205000 30.995539
|
||||||
|
41.122807 2.220000 31.206393
|
||||||
|
40.820842 2.235000 31.417247
|
||||||
|
40.518147 2.250000 31.628101
|
||||||
|
40.214717 2.265000 31.838955
|
||||||
|
39.910545 2.280000 32.049809
|
||||||
|
39.605623 2.295000 32.260663
|
||||||
|
39.299944 2.310000 32.471517
|
||||||
|
38.993500 2.325000 32.682371
|
||||||
|
38.686285 2.340000 32.893225
|
||||||
|
38.378291 2.355000 33.104079
|
||||||
|
38.069508 2.370000 33.314933
|
||||||
|
37.759930 2.385000 33.525787
|
||||||
|
37.449548 2.400000 33.736641
|
||||||
|
37.138353 2.415000 33.947495
|
||||||
|
36.826337 2.430000 34.158349
|
||||||
|
36.513491 2.445000 34.369203
|
||||||
|
36.199805 2.460000 34.580057
|
||||||
|
35.885269 2.475000 34.790911
|
||||||
|
35.569875 2.490000 35.001765
|
||||||
|
35.253612 2.505000 35.212619
|
||||||
|
34.936469 2.520000 35.423474
|
||||||
|
34.618436 2.535000 35.634328
|
||||||
|
34.299503 2.550000 35.845182
|
||||||
|
33.979657 2.565000 36.056036
|
||||||
|
33.658887 2.580000 36.266890
|
||||||
|
33.337182 2.595000 36.477744
|
||||||
|
33.014528 2.610000 36.688598
|
||||||
|
32.690914 2.625000 36.899452
|
||||||
|
32.366325 2.640000 37.110306
|
||||||
|
32.040748 2.655000 37.321160
|
||||||
|
31.714169 2.670000 37.532014
|
||||||
|
31.386576 2.685000 37.742868
|
||||||
|
31.058108 2.700000 37.953722
|
||||||
|
30.728863 2.715000 38.164576
|
||||||
|
30.398840 2.730000 38.375430
|
||||||
|
30.068036 2.745000 38.586284
|
||||||
|
29.736448 2.760000 38.797138
|
||||||
|
29.404071 2.775000 39.007992
|
||||||
|
29.070902 2.790000 39.218846
|
||||||
|
28.736938 2.805000 39.429700
|
||||||
|
28.402175 2.820000 39.640554
|
||||||
|
28.066610 2.835000 39.851408
|
||||||
|
27.730240 2.850000 40.062262
|
||||||
|
27.393061 2.865000 40.273116
|
||||||
|
27.055071 2.880000 40.483970
|
||||||
|
26.716265 2.895000 40.694824
|
||||||
|
26.376641 2.910000 40.905678
|
||||||
|
26.036197 2.925000 41.116532
|
||||||
|
25.694928 2.940000 41.327386
|
||||||
|
25.352833 2.955000 41.538240
|
||||||
|
25.009908 2.970000 41.749094
|
||||||
|
24.666151 2.985000 41.959948
|
||||||
|
24.321560 3.000000 42.170802
|
||||||
|
23.976132 3.015000 42.381656
|
||||||
|
23.629866 3.030000 42.592510
|
||||||
|
23.282758 3.045000 42.803364
|
||||||
|
22.934808 3.060000 43.014218
|
||||||
|
22.586015 3.075000 43.225072
|
||||||
|
22.236376 3.090000 43.435926
|
||||||
|
21.885892 3.105000 43.646780
|
||||||
|
21.534561 3.120000 43.857634
|
||||||
|
21.182384 3.135000 44.068488
|
||||||
|
20.829361 3.150000 44.279342
|
||||||
|
20.475493 3.165000 44.490196
|
||||||
|
20.120781 3.180000 44.701050
|
||||||
|
19.765227 3.195000 44.911904
|
||||||
|
19.408835 3.210000 45.122758
|
||||||
|
19.051609 3.225000 45.333612
|
||||||
|
18.693552 3.240000 45.544466
|
||||||
|
18.334793 3.255000 45.755320
|
||||||
|
17.975875 3.270000 45.966174
|
||||||
|
17.616919 3.285000 46.177028
|
||||||
|
17.257970 3.300000 46.387882
|
||||||
|
16.899079 3.315000 46.598736
|
||||||
|
16.540297 3.330000 46.809590
|
||||||
|
16.181683 3.345000 47.020444
|
||||||
|
15.823299 3.360000 47.231298
|
||||||
|
15.465212 3.375000 47.442152
|
||||||
|
15.107493 3.390000 47.653006
|
||||||
|
14.750223 3.405000 47.863860
|
||||||
|
14.393487 3.420000 48.074714
|
||||||
|
14.037378 3.435000 48.285568
|
||||||
|
13.681997 3.450000 48.496422
|
||||||
|
13.327455 3.465000 48.707276
|
||||||
|
12.973871 3.480000 48.918130
|
||||||
|
12.621377 3.495000 49.128984
|
||||||
|
12.270117 3.510000 49.339838
|
||||||
|
11.920246 3.525000 49.550692
|
||||||
|
11.571935 3.540000 49.761546
|
||||||
|
11.225370 3.555000 49.972400
|
||||||
|
10.880755 3.570000 50.183254
|
||||||
|
10.538310 3.585000 50.394108
|
||||||
|
10.198276 3.600000 50.604962
|
||||||
|
9.860913 3.615000 50.815816
|
||||||
|
9.526502 3.630000 51.026670
|
||||||
|
9.194786 3.645000 51.237524
|
||||||
|
8.864425 3.660000 51.448378
|
||||||
|
8.535501 3.675000 51.659232
|
||||||
|
8.208281 3.690000 51.870086
|
||||||
|
7.883066 3.705000 52.080940
|
||||||
|
7.560188 3.720000 52.291794
|
||||||
|
7.240018 3.735000 52.502648
|
||||||
|
6.922960 3.750000 52.713502
|
||||||
|
6.609459 3.765000 52.924356
|
||||||
|
6.299994 3.780000 53.135210
|
||||||
|
5.995077 3.795000 53.346064
|
||||||
|
5.695251 3.810000 53.556918
|
||||||
|
5.401081 3.825000 53.767772
|
||||||
|
5.113148 3.840000 53.978626
|
||||||
|
4.832038 3.855000 54.189480
|
||||||
|
4.558329 3.870000 54.400334
|
||||||
|
4.292583 3.885000 54.611188
|
||||||
|
4.035323 3.900000 54.822042
|
||||||
|
3.787028 3.915000 55.032896
|
||||||
|
3.548111 3.930000 55.243750
|
||||||
|
3.318917 3.945000 55.454604
|
||||||
|
3.099704 3.960000 55.665458
|
||||||
|
2.890645 3.975000 55.876312
|
||||||
|
2.691822 3.990000 56.087166
|
||||||
|
2.503225 4.005000 56.298020
|
||||||
|
2.324760 4.020000 56.508874
|
||||||
|
2.156254 4.035000 56.719728
|
||||||
|
1.997466 4.050000 56.930582
|
||||||
|
1.966849 4.053000 56.972753
|
||||||
|
1.936606 4.056000 57.014924
|
||||||
|
1.906734 4.059000 57.057095
|
||||||
|
1.877231 4.062000 57.099266
|
||||||
|
1.848094 4.065000 57.141436
|
||||||
|
1.819319 4.068000 57.183607
|
||||||
|
1.790904 4.071000 57.225778
|
||||||
|
1.762846 4.074000 57.267949
|
||||||
|
1.735142 4.077000 57.310120
|
||||||
|
1.707788 4.080000 57.352290
|
||||||
|
1.680781 4.083000 57.394461
|
||||||
|
1.654118 4.086000 57.436632
|
||||||
|
1.627796 4.089000 57.478803
|
||||||
|
1.601811 4.092000 57.520974
|
||||||
|
1.576161 4.095000 57.563144
|
||||||
|
1.550841 4.098000 57.605315
|
||||||
|
1.525848 4.101000 57.647486
|
||||||
|
1.501179 4.104000 57.689657
|
||||||
|
1.476831 4.107000 57.731828
|
||||||
|
1.452799 4.110000 57.773998
|
||||||
|
1.429081 4.113000 57.816169
|
||||||
|
1.405673 4.116000 57.858340
|
||||||
|
1.382572 4.119000 57.900511
|
||||||
|
1.359773 4.122000 57.942682
|
||||||
|
1.337274 4.125000 57.984852
|
||||||
|
1.315070 4.128000 58.027023
|
||||||
|
1.293159 4.131000 58.069194
|
||||||
|
1.271536 4.134000 58.111365
|
||||||
|
1.250199 4.137000 58.153536
|
||||||
|
1.229144 4.140000 58.195706
|
||||||
|
1.208367 4.143000 58.237877
|
||||||
|
1.187864 4.146000 58.280048
|
||||||
|
1.167633 4.149000 58.322219
|
||||||
|
1.147669 4.152000 58.364390
|
||||||
|
1.127970 4.155000 58.406560
|
||||||
|
1.108531 4.158000 58.448731
|
||||||
|
1.089349 4.161000 58.490902
|
||||||
|
1.070422 4.164000 58.533073
|
||||||
|
1.051744 4.167000 58.575244
|
||||||
|
1.033314 4.170000 58.617414
|
||||||
|
1.015128 4.173000 58.659585
|
||||||
|
0.997181 4.176000 58.701756
|
||||||
|
0.979472 4.179000 58.743927
|
||||||
|
0.961996 4.182000 58.786098
|
||||||
|
0.944750 4.185000 58.828269
|
||||||
|
0.927731 4.188000 58.870439
|
||||||
|
0.910936 4.191000 58.912610
|
||||||
|
0.894362 4.194000 58.954781
|
||||||
|
0.878005 4.197000 58.996952
|
||||||
|
0.861861 4.200000 59.039123
|
||||||
|
0.845928 4.203000 59.081293
|
||||||
|
0.830203 4.206000 59.123464
|
||||||
|
0.814682 4.209000 59.165635
|
||||||
|
0.799363 4.212000 59.207806
|
||||||
|
0.784243 4.215000 59.249977
|
||||||
|
0.769318 4.218000 59.292147
|
||||||
|
0.754585 4.221000 59.334318
|
||||||
|
0.740042 4.224000 59.376489
|
||||||
|
0.725685 4.227000 59.418660
|
||||||
|
0.711512 4.230000 59.460831
|
||||||
|
0.697520 4.233000 59.503001
|
||||||
|
0.683705 4.236000 59.545172
|
||||||
|
0.670065 4.239000 59.587343
|
||||||
|
0.656575 4.242000 59.629514
|
||||||
|
0.643192 4.245000 59.671685
|
||||||
|
0.629914 4.248000 59.713855
|
||||||
|
0.616739 4.251000 59.756026
|
||||||
|
0.603668 4.254000 59.798197
|
||||||
|
0.590700 4.257000 59.840368
|
||||||
|
0.577834 4.260000 59.882539
|
||||||
|
0.565071 4.263000 59.924709
|
||||||
|
0.552409 4.266000 59.966880
|
||||||
|
0.539832 4.269000 60.009051
|
||||||
|
0.527356 4.272000 60.051222
|
||||||
|
0.514979 4.275000 60.093393
|
||||||
|
0.502701 4.278000 60.135563
|
||||||
|
0.490522 4.281000 60.177734
|
||||||
|
0.478441 4.284000 60.219905
|
||||||
|
0.466456 4.287000 60.262076
|
||||||
|
0.454569 4.290000 60.304247
|
||||||
|
0.442777 4.293000 60.346417
|
||||||
|
0.431080 4.296000 60.388588
|
||||||
|
0.419478 4.299000 60.430759
|
||||||
|
0.407969 4.302000 60.472930
|
||||||
|
0.396553 4.305000 60.515101
|
||||||
|
0.385226 4.308000 60.557271
|
||||||
|
0.373989 4.311000 60.599442
|
||||||
|
0.362838 4.314000 60.641613
|
||||||
|
0.351775 4.317000 60.683784
|
||||||
|
0.340796 4.320000 60.725955
|
||||||
|
0.329900 4.323000 60.768125
|
||||||
|
0.319087 4.326000 60.810296
|
||||||
|
0.308354 4.329000 60.852467
|
||||||
|
0.297702 4.332000 60.894638
|
||||||
|
0.287129 4.335000 60.936809
|
||||||
|
0.276633 4.338000 60.978979
|
||||||
|
0.266213 4.341000 61.021150
|
||||||
|
0.255866 4.344000 61.063321
|
||||||
|
0.245592 4.347000 61.105492
|
||||||
|
0.235388 4.350000 61.147663
|
||||||
|
0.225252 4.353000 61.189833
|
||||||
|
0.215182 4.356000 61.232004
|
||||||
|
0.205174 4.359000 61.274175
|
||||||
|
0.195225 4.362000 61.316346
|
||||||
|
0.185333 4.365000 61.358517
|
||||||
|
0.175492 4.368000 61.400687
|
||||||
|
0.165698 4.371000 61.442858
|
||||||
|
0.155946 4.374000 61.485029
|
||||||
|
0.146231 4.377000 61.527200
|
||||||
|
0.136544 4.380000 61.569371
|
||||||
|
0.126878 4.383000 61.611541
|
||||||
|
0.117222 4.386000 61.653712
|
||||||
|
0.107566 4.389000 61.695883
|
||||||
|
0.097894 4.392000 61.738054
|
||||||
|
0.088190 4.395000 61.780225
|
||||||
|
0.078430 4.398000 61.822395
|
||||||
|
0.068587 4.401000 61.864566
|
||||||
|
0.058623 4.404000 61.906737
|
||||||
|
0.048489 4.407000 61.948908
|
||||||
|
0.038115 4.410000 61.991079
|
||||||
|
0.027405 4.413000 62.033249
|
||||||
|
0.016227 4.416000 62.075420
|
||||||
|
0.004537 4.419000 62.117591
|
||||||
|
0.000722 4.420000 62.131648
|
||||||
374
eloss_calculations/aluminum_lookup_80MeV_250torr_4pc.dat
Normal file
374
eloss_calculations/aluminum_lookup_80MeV_250torr_4pc.dat
Normal file
|
|
@ -0,0 +1,374 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 80 MeV
|
||||||
|
80.000000 0.000000 0.000000
|
||||||
|
79.747605 0.016000 0.208857
|
||||||
|
79.494846 0.032000 0.417714
|
||||||
|
79.241720 0.048000 0.626571
|
||||||
|
78.988227 0.064000 0.835428
|
||||||
|
78.734364 0.080000 1.044285
|
||||||
|
78.480130 0.096000 1.253142
|
||||||
|
78.225524 0.112000 1.461999
|
||||||
|
77.970543 0.128000 1.670856
|
||||||
|
77.715186 0.144000 1.879713
|
||||||
|
77.459452 0.160000 2.088570
|
||||||
|
77.203338 0.176000 2.297427
|
||||||
|
76.946842 0.192000 2.506284
|
||||||
|
76.689964 0.208000 2.715141
|
||||||
|
76.432701 0.224000 2.923998
|
||||||
|
76.175051 0.240000 3.132855
|
||||||
|
75.917013 0.256000 3.341712
|
||||||
|
75.658585 0.272000 3.550569
|
||||||
|
75.399765 0.288000 3.759426
|
||||||
|
75.140552 0.304000 3.968283
|
||||||
|
74.880942 0.320000 4.177140
|
||||||
|
74.620935 0.336000 4.385997
|
||||||
|
74.360529 0.352000 4.594854
|
||||||
|
74.099722 0.368000 4.803711
|
||||||
|
73.838511 0.384000 5.012568
|
||||||
|
73.576895 0.400000 5.221425
|
||||||
|
73.314872 0.416000 5.430282
|
||||||
|
73.052440 0.432000 5.639139
|
||||||
|
72.789598 0.448000 5.847996
|
||||||
|
72.526342 0.464000 6.056853
|
||||||
|
72.262671 0.480000 6.265710
|
||||||
|
71.998583 0.496000 6.474567
|
||||||
|
71.734076 0.512000 6.683424
|
||||||
|
71.469148 0.528000 6.892281
|
||||||
|
71.203797 0.544000 7.101138
|
||||||
|
70.938020 0.560000 7.309995
|
||||||
|
70.671816 0.576000 7.518852
|
||||||
|
70.405183 0.592000 7.727709
|
||||||
|
70.138117 0.608000 7.936566
|
||||||
|
69.870618 0.624000 8.145423
|
||||||
|
69.602683 0.640000 8.354280
|
||||||
|
69.334309 0.656000 8.563137
|
||||||
|
69.065495 0.672000 8.771994
|
||||||
|
68.796238 0.688000 8.980851
|
||||||
|
68.526536 0.704000 9.189708
|
||||||
|
68.256387 0.720000 9.398565
|
||||||
|
67.985788 0.736000 9.607422
|
||||||
|
67.714737 0.752000 9.816279
|
||||||
|
67.443232 0.768000 10.025136
|
||||||
|
67.171269 0.784000 10.233993
|
||||||
|
66.898848 0.800000 10.442850
|
||||||
|
66.625965 0.816000 10.651707
|
||||||
|
66.352618 0.832000 10.860564
|
||||||
|
66.078805 0.848000 11.069421
|
||||||
|
65.804523 0.864000 11.278278
|
||||||
|
65.529769 0.880000 11.487135
|
||||||
|
65.254541 0.896000 11.695992
|
||||||
|
64.978836 0.912000 11.904849
|
||||||
|
64.702652 0.928000 12.113706
|
||||||
|
64.425986 0.944000 12.322563
|
||||||
|
64.148836 0.960000 12.531420
|
||||||
|
63.871198 0.976000 12.740277
|
||||||
|
63.593071 0.992000 12.949134
|
||||||
|
63.314451 1.008000 13.157991
|
||||||
|
63.035336 1.024000 13.366848
|
||||||
|
62.755722 1.040000 13.575705
|
||||||
|
62.475608 1.056000 13.784562
|
||||||
|
62.194989 1.072000 13.993419
|
||||||
|
61.913864 1.088000 14.202276
|
||||||
|
61.632230 1.104000 14.411133
|
||||||
|
61.350083 1.120000 14.619990
|
||||||
|
61.067420 1.136000 14.828847
|
||||||
|
60.784239 1.152000 15.037704
|
||||||
|
60.500536 1.168000 15.246561
|
||||||
|
60.216309 1.184000 15.455418
|
||||||
|
59.931554 1.200000 15.664275
|
||||||
|
59.646268 1.216000 15.873132
|
||||||
|
59.360448 1.232000 16.081989
|
||||||
|
59.074091 1.248000 16.290846
|
||||||
|
58.787194 1.264000 16.499703
|
||||||
|
58.499752 1.280000 16.708560
|
||||||
|
58.211764 1.296000 16.917417
|
||||||
|
57.923226 1.312000 17.126274
|
||||||
|
57.634133 1.328000 17.335131
|
||||||
|
57.344484 1.344000 17.543988
|
||||||
|
57.054273 1.360000 17.752845
|
||||||
|
56.763499 1.376000 17.961702
|
||||||
|
56.472156 1.392000 18.170559
|
||||||
|
56.180243 1.408000 18.379416
|
||||||
|
55.887754 1.424000 18.588273
|
||||||
|
55.594687 1.440000 18.797130
|
||||||
|
55.301037 1.456000 19.005987
|
||||||
|
55.006801 1.472000 19.214844
|
||||||
|
54.711975 1.488000 19.423701
|
||||||
|
54.416555 1.504000 19.632558
|
||||||
|
54.120537 1.520000 19.841415
|
||||||
|
53.823917 1.536000 20.050272
|
||||||
|
53.526691 1.552000 20.259129
|
||||||
|
53.228855 1.568000 20.467986
|
||||||
|
52.930406 1.584000 20.676843
|
||||||
|
52.631337 1.600000 20.885700
|
||||||
|
52.331646 1.616000 21.094557
|
||||||
|
52.031329 1.632000 21.303414
|
||||||
|
51.730380 1.648000 21.512271
|
||||||
|
51.428795 1.664000 21.721128
|
||||||
|
51.126569 1.680000 21.929985
|
||||||
|
50.823699 1.696000 22.138842
|
||||||
|
50.520180 1.712000 22.347699
|
||||||
|
50.216006 1.728000 22.556556
|
||||||
|
49.911173 1.744000 22.765413
|
||||||
|
49.605677 1.760000 22.974270
|
||||||
|
49.299511 1.776000 23.183127
|
||||||
|
48.992672 1.792000 23.391984
|
||||||
|
48.685154 1.808000 23.600841
|
||||||
|
48.376952 1.824000 23.809698
|
||||||
|
48.068060 1.840000 24.018555
|
||||||
|
47.758474 1.856000 24.227412
|
||||||
|
47.448188 1.872000 24.436269
|
||||||
|
47.137196 1.888000 24.645126
|
||||||
|
46.825493 1.904000 24.853983
|
||||||
|
46.513073 1.920000 25.062840
|
||||||
|
46.199931 1.936000 25.271697
|
||||||
|
45.886059 1.952000 25.480554
|
||||||
|
45.571453 1.968000 25.689411
|
||||||
|
45.256106 1.984000 25.898268
|
||||||
|
44.940012 2.000000 26.107125
|
||||||
|
44.623165 2.016000 26.315982
|
||||||
|
44.305558 2.032000 26.524839
|
||||||
|
43.987184 2.048000 26.733696
|
||||||
|
43.668037 2.064000 26.942553
|
||||||
|
43.348110 2.080000 27.151410
|
||||||
|
43.027396 2.096000 27.360267
|
||||||
|
42.705888 2.112000 27.569124
|
||||||
|
42.383578 2.128000 27.777981
|
||||||
|
42.060459 2.144000 27.986838
|
||||||
|
41.736523 2.160000 28.195695
|
||||||
|
41.411763 2.176000 28.404552
|
||||||
|
41.086171 2.192000 28.613409
|
||||||
|
40.759738 2.208000 28.822266
|
||||||
|
40.432456 2.224000 29.031123
|
||||||
|
40.104317 2.240000 29.239980
|
||||||
|
39.775311 2.256000 29.448837
|
||||||
|
39.445431 2.272000 29.657694
|
||||||
|
39.114666 2.288000 29.866551
|
||||||
|
38.783008 2.304000 30.075408
|
||||||
|
38.450447 2.320000 30.284265
|
||||||
|
38.116972 2.336000 30.493122
|
||||||
|
37.782575 2.352000 30.701979
|
||||||
|
37.447244 2.368000 30.910836
|
||||||
|
37.110968 2.384000 31.119693
|
||||||
|
36.773737 2.400000 31.328550
|
||||||
|
36.435540 2.416000 31.537407
|
||||||
|
36.096364 2.432000 31.746264
|
||||||
|
35.756199 2.448000 31.955121
|
||||||
|
35.415030 2.464000 32.163978
|
||||||
|
35.072847 2.480000 32.372835
|
||||||
|
34.729635 2.496000 32.581692
|
||||||
|
34.385382 2.512000 32.790549
|
||||||
|
34.040072 2.528000 32.999406
|
||||||
|
33.693693 2.544000 33.208263
|
||||||
|
33.346228 2.560000 33.417120
|
||||||
|
32.997663 2.576000 33.625977
|
||||||
|
32.647981 2.592000 33.834834
|
||||||
|
32.297166 2.608000 34.043691
|
||||||
|
31.945201 2.624000 34.252548
|
||||||
|
31.592067 2.640000 34.461405
|
||||||
|
31.237790 2.656000 34.670262
|
||||||
|
30.882573 2.672000 34.879119
|
||||||
|
30.526456 2.688000 35.087976
|
||||||
|
30.169434 2.704000 35.296833
|
||||||
|
29.811505 2.720000 35.505690
|
||||||
|
29.452662 2.736000 35.714547
|
||||||
|
29.092902 2.752000 35.923404
|
||||||
|
28.732221 2.768000 36.132261
|
||||||
|
28.370614 2.784000 36.341118
|
||||||
|
28.008078 2.800000 36.549975
|
||||||
|
27.644608 2.816000 36.758832
|
||||||
|
27.280200 2.832000 36.967689
|
||||||
|
26.914851 2.848000 37.176546
|
||||||
|
26.548557 2.864000 37.385403
|
||||||
|
26.181314 2.880000 37.594260
|
||||||
|
25.813119 2.896000 37.803117
|
||||||
|
25.443967 2.912000 38.011974
|
||||||
|
25.073857 2.928000 38.220831
|
||||||
|
24.702785 2.944000 38.429688
|
||||||
|
24.330748 2.960000 38.638545
|
||||||
|
23.957743 2.976000 38.847402
|
||||||
|
23.583768 2.992000 39.056259
|
||||||
|
23.208820 3.008000 39.265116
|
||||||
|
22.832899 3.024000 39.473973
|
||||||
|
22.456002 3.040000 39.682830
|
||||||
|
22.078128 3.056000 39.891687
|
||||||
|
21.699277 3.072000 40.100544
|
||||||
|
21.319449 3.088000 40.309401
|
||||||
|
20.938644 3.104000 40.518258
|
||||||
|
20.556862 3.120000 40.727115
|
||||||
|
20.174107 3.136000 40.935972
|
||||||
|
19.790381 3.152000 41.144829
|
||||||
|
19.405688 3.168000 41.353686
|
||||||
|
19.020033 3.184000 41.562543
|
||||||
|
18.633422 3.200000 41.771400
|
||||||
|
18.246103 3.216000 41.980257
|
||||||
|
17.858670 3.232000 42.189114
|
||||||
|
17.471218 3.248000 42.397971
|
||||||
|
17.083807 3.264000 42.606828
|
||||||
|
16.696502 3.280000 42.815685
|
||||||
|
16.309372 3.296000 43.024542
|
||||||
|
15.922493 3.312000 43.233399
|
||||||
|
15.535948 3.328000 43.442256
|
||||||
|
15.149825 3.344000 43.651113
|
||||||
|
14.764224 3.360000 43.859970
|
||||||
|
14.379251 3.376000 44.068827
|
||||||
|
13.995023 3.392000 44.277684
|
||||||
|
13.611669 3.408000 44.486541
|
||||||
|
13.229329 3.424000 44.695398
|
||||||
|
12.848157 3.440000 44.904255
|
||||||
|
12.468322 3.456000 45.113112
|
||||||
|
12.090012 3.472000 45.321969
|
||||||
|
11.713430 3.488000 45.530826
|
||||||
|
11.338802 3.504000 45.739683
|
||||||
|
10.966373 3.520000 45.948540
|
||||||
|
10.596414 3.536000 46.157397
|
||||||
|
10.229222 3.552000 46.366254
|
||||||
|
9.865119 3.568000 46.575111
|
||||||
|
9.504457 3.584000 46.783968
|
||||||
|
9.146817 3.600000 46.992825
|
||||||
|
8.790754 3.616000 47.201682
|
||||||
|
8.436442 3.632000 47.410540
|
||||||
|
8.084225 3.648000 47.619397
|
||||||
|
7.734494 3.664000 47.828254
|
||||||
|
7.387683 3.680000 48.037111
|
||||||
|
7.044277 3.696000 48.245968
|
||||||
|
6.704811 3.712000 48.454825
|
||||||
|
6.369869 3.728000 48.663682
|
||||||
|
6.040079 3.744000 48.872539
|
||||||
|
5.716114 3.760000 49.081396
|
||||||
|
5.398677 3.776000 49.290253
|
||||||
|
5.088493 3.792000 49.499110
|
||||||
|
4.786294 3.808000 49.707967
|
||||||
|
4.492802 3.824000 49.916824
|
||||||
|
4.208709 3.840000 50.125681
|
||||||
|
3.934655 3.856000 50.334538
|
||||||
|
3.671213 3.872000 50.543395
|
||||||
|
3.418865 3.888000 50.752252
|
||||||
|
3.177987 3.904000 50.961109
|
||||||
|
2.948841 3.920000 51.169966
|
||||||
|
2.731568 3.936000 51.378823
|
||||||
|
2.526187 3.952000 51.587680
|
||||||
|
2.332600 3.968000 51.796537
|
||||||
|
2.150600 3.984000 52.005394
|
||||||
|
1.979888 4.000000 52.214251
|
||||||
|
1.949107 4.003000 52.253411
|
||||||
|
1.918706 4.006000 52.292572
|
||||||
|
1.888684 4.009000 52.331733
|
||||||
|
1.859036 4.012000 52.370893
|
||||||
|
1.829761 4.015000 52.410054
|
||||||
|
1.800854 4.018000 52.449215
|
||||||
|
1.772314 4.021000 52.488375
|
||||||
|
1.744136 4.024000 52.527536
|
||||||
|
1.716318 4.027000 52.566697
|
||||||
|
1.688856 4.030000 52.605857
|
||||||
|
1.661747 4.033000 52.645018
|
||||||
|
1.634987 4.036000 52.684179
|
||||||
|
1.608574 4.039000 52.723339
|
||||||
|
1.582503 4.042000 52.762500
|
||||||
|
1.556772 4.045000 52.801661
|
||||||
|
1.531376 4.048000 52.840822
|
||||||
|
1.506313 4.051000 52.879982
|
||||||
|
1.481578 4.054000 52.919143
|
||||||
|
1.457168 4.057000 52.958304
|
||||||
|
1.433080 4.060000 52.997464
|
||||||
|
1.409310 4.063000 53.036625
|
||||||
|
1.385853 4.066000 53.075786
|
||||||
|
1.362708 4.069000 53.114946
|
||||||
|
1.339869 4.072000 53.154107
|
||||||
|
1.317334 4.075000 53.193268
|
||||||
|
1.295099 4.078000 53.232428
|
||||||
|
1.273159 4.081000 53.271589
|
||||||
|
1.251512 4.084000 53.310750
|
||||||
|
1.230154 4.087000 53.349911
|
||||||
|
1.209081 4.090000 53.389071
|
||||||
|
1.188289 4.093000 53.428232
|
||||||
|
1.167776 4.096000 53.467393
|
||||||
|
1.147536 4.099000 53.506553
|
||||||
|
1.127567 4.102000 53.545714
|
||||||
|
1.107866 4.105000 53.584875
|
||||||
|
1.088427 4.108000 53.624035
|
||||||
|
1.069249 4.111000 53.663196
|
||||||
|
1.050327 4.114000 53.702357
|
||||||
|
1.031658 4.117000 53.741517
|
||||||
|
1.013238 4.120000 53.780678
|
||||||
|
0.995065 4.123000 53.819839
|
||||||
|
0.977133 4.126000 53.858999
|
||||||
|
0.959441 4.129000 53.898160
|
||||||
|
0.941984 4.132000 53.937321
|
||||||
|
0.924760 4.135000 53.976482
|
||||||
|
0.907764 4.138000 54.015642
|
||||||
|
0.890994 4.141000 54.054803
|
||||||
|
0.874445 4.144000 54.093964
|
||||||
|
0.858115 4.147000 54.133124
|
||||||
|
0.842000 4.150000 54.172285
|
||||||
|
0.826098 4.153000 54.211446
|
||||||
|
0.810405 4.156000 54.250606
|
||||||
|
0.794918 4.159000 54.289767
|
||||||
|
0.779633 4.162000 54.328928
|
||||||
|
0.764548 4.165000 54.368088
|
||||||
|
0.749659 4.168000 54.407249
|
||||||
|
0.734964 4.171000 54.446410
|
||||||
|
0.720459 4.174000 54.485570
|
||||||
|
0.706141 4.177000 54.524731
|
||||||
|
0.692007 4.180000 54.563892
|
||||||
|
0.678055 4.183000 54.603053
|
||||||
|
0.664278 4.186000 54.642213
|
||||||
|
0.650633 4.189000 54.681374
|
||||||
|
0.637097 4.192000 54.720535
|
||||||
|
0.623670 4.195000 54.759695
|
||||||
|
0.610352 4.198000 54.798856
|
||||||
|
0.597142 4.201000 54.838017
|
||||||
|
0.584039 4.204000 54.877177
|
||||||
|
0.571042 4.207000 54.916338
|
||||||
|
0.558152 4.210000 54.955499
|
||||||
|
0.545363 4.213000 54.994659
|
||||||
|
0.532668 4.216000 55.033820
|
||||||
|
0.520077 4.219000 55.072981
|
||||||
|
0.507589 4.222000 55.112141
|
||||||
|
0.495205 4.225000 55.151302
|
||||||
|
0.482922 4.228000 55.190463
|
||||||
|
0.470741 4.231000 55.229624
|
||||||
|
0.458660 4.234000 55.268784
|
||||||
|
0.446679 4.237000 55.307945
|
||||||
|
0.434797 4.240000 55.347106
|
||||||
|
0.423013 4.243000 55.386266
|
||||||
|
0.411327 4.246000 55.425427
|
||||||
|
0.399736 4.249000 55.464588
|
||||||
|
0.388240 4.252000 55.503748
|
||||||
|
0.376834 4.255000 55.542909
|
||||||
|
0.365519 4.258000 55.582070
|
||||||
|
0.354293 4.261000 55.621230
|
||||||
|
0.343153 4.264000 55.660391
|
||||||
|
0.332099 4.267000 55.699552
|
||||||
|
0.321129 4.270000 55.738712
|
||||||
|
0.310242 4.273000 55.777873
|
||||||
|
0.299437 4.276000 55.817034
|
||||||
|
0.288713 4.279000 55.856195
|
||||||
|
0.278067 4.282000 55.895355
|
||||||
|
0.267499 4.285000 55.934516
|
||||||
|
0.257007 4.288000 55.973677
|
||||||
|
0.246589 4.291000 56.012837
|
||||||
|
0.236242 4.294000 56.051998
|
||||||
|
0.225965 4.297000 56.091159
|
||||||
|
0.215754 4.300000 56.130319
|
||||||
|
0.205608 4.303000 56.169480
|
||||||
|
0.195522 4.306000 56.208641
|
||||||
|
0.185494 4.309000 56.247801
|
||||||
|
0.175518 4.312000 56.286962
|
||||||
|
0.165590 4.315000 56.326123
|
||||||
|
0.155705 4.318000 56.365283
|
||||||
|
0.145857 4.321000 56.404444
|
||||||
|
0.136037 4.324000 56.443605
|
||||||
|
0.126238 4.327000 56.482766
|
||||||
|
0.116450 4.330000 56.521926
|
||||||
|
0.106659 4.333000 56.561087
|
||||||
|
0.096850 4.336000 56.600248
|
||||||
|
0.087006 4.339000 56.639408
|
||||||
|
0.077103 4.342000 56.678569
|
||||||
|
0.067110 4.345000 56.717730
|
||||||
|
0.056987 4.348000 56.756890
|
||||||
|
0.046681 4.351000 56.796051
|
||||||
|
0.036116 4.354000 56.835212
|
||||||
|
0.025188 4.357000 56.874372
|
||||||
|
0.013760 4.360000 56.913533
|
||||||
|
0.001928 4.363000 56.952694
|
||||||
326
eloss_calculations/aluminum_lookup_80MeV_350torr_3pc.dat
Normal file
326
eloss_calculations/aluminum_lookup_80MeV_350torr_3pc.dat
Normal file
|
|
@ -0,0 +1,326 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 80 MeV
|
||||||
|
80.000000 0.000000 0.000000
|
||||||
|
79.688803 0.020000 0.200813
|
||||||
|
79.377050 0.040000 0.401627
|
||||||
|
79.064738 0.060000 0.602440
|
||||||
|
78.751864 0.080000 0.803253
|
||||||
|
78.438424 0.100000 1.004067
|
||||||
|
78.124416 0.120000 1.204880
|
||||||
|
77.809837 0.140000 1.405693
|
||||||
|
77.494682 0.160000 1.606507
|
||||||
|
77.178950 0.180000 1.807320
|
||||||
|
76.862636 0.200000 2.008133
|
||||||
|
76.545737 0.220000 2.208947
|
||||||
|
76.228251 0.240000 2.409760
|
||||||
|
75.910173 0.260000 2.610573
|
||||||
|
75.591501 0.280000 2.811387
|
||||||
|
75.272230 0.300000 3.012200
|
||||||
|
74.952358 0.320000 3.213013
|
||||||
|
74.631881 0.340000 3.413827
|
||||||
|
74.310794 0.360000 3.614640
|
||||||
|
73.989096 0.380000 3.815453
|
||||||
|
73.666782 0.400000 4.016267
|
||||||
|
73.343848 0.420000 4.217080
|
||||||
|
73.020291 0.440000 4.417894
|
||||||
|
72.696107 0.460000 4.618707
|
||||||
|
72.371292 0.480000 4.819520
|
||||||
|
72.045843 0.500000 5.020334
|
||||||
|
71.719756 0.520000 5.221147
|
||||||
|
71.393026 0.540000 5.421960
|
||||||
|
71.065650 0.560000 5.622774
|
||||||
|
70.737624 0.580000 5.823587
|
||||||
|
70.408943 0.600000 6.024400
|
||||||
|
70.079604 0.620000 6.225214
|
||||||
|
69.749604 0.640000 6.426027
|
||||||
|
69.418936 0.660000 6.626840
|
||||||
|
69.087598 0.680000 6.827654
|
||||||
|
68.755585 0.700000 7.028467
|
||||||
|
68.422892 0.720000 7.229280
|
||||||
|
68.089516 0.740000 7.430094
|
||||||
|
67.755452 0.760000 7.630907
|
||||||
|
67.420696 0.780000 7.831720
|
||||||
|
67.085243 0.800000 8.032534
|
||||||
|
66.749088 0.820000 8.233347
|
||||||
|
66.412227 0.840000 8.434160
|
||||||
|
66.074656 0.860000 8.634974
|
||||||
|
65.736369 0.880000 8.835787
|
||||||
|
65.397362 0.900000 9.036600
|
||||||
|
65.057630 0.920000 9.237414
|
||||||
|
64.717168 0.940000 9.438227
|
||||||
|
64.375971 0.960000 9.639040
|
||||||
|
64.034035 0.980000 9.839854
|
||||||
|
63.691353 1.000000 10.040667
|
||||||
|
63.347922 1.020000 10.241480
|
||||||
|
63.003735 1.040000 10.442294
|
||||||
|
62.658787 1.060000 10.643107
|
||||||
|
62.313074 1.080000 10.843920
|
||||||
|
61.966590 1.100000 11.044734
|
||||||
|
61.619329 1.120000 11.245547
|
||||||
|
61.271286 1.140000 11.446360
|
||||||
|
60.922455 1.160000 11.647174
|
||||||
|
60.572830 1.180000 11.847987
|
||||||
|
60.222406 1.200000 12.048801
|
||||||
|
59.871177 1.220000 12.249614
|
||||||
|
59.519137 1.240000 12.450427
|
||||||
|
59.166280 1.260000 12.651241
|
||||||
|
58.812599 1.280000 12.852054
|
||||||
|
58.458090 1.300000 13.052867
|
||||||
|
58.102744 1.320000 13.253681
|
||||||
|
57.746557 1.340000 13.454494
|
||||||
|
57.389521 1.360000 13.655307
|
||||||
|
57.031631 1.380000 13.856121
|
||||||
|
56.672878 1.400000 14.056934
|
||||||
|
56.313258 1.420000 14.257747
|
||||||
|
55.952762 1.440000 14.458561
|
||||||
|
55.591384 1.460000 14.659374
|
||||||
|
55.229117 1.480000 14.860187
|
||||||
|
54.865953 1.500000 15.061001
|
||||||
|
54.501886 1.520000 15.261814
|
||||||
|
54.136907 1.540000 15.462627
|
||||||
|
53.771010 1.560000 15.663441
|
||||||
|
53.404187 1.580000 15.864254
|
||||||
|
53.036430 1.600000 16.065067
|
||||||
|
52.667731 1.620000 16.265881
|
||||||
|
52.298082 1.640000 16.466694
|
||||||
|
51.927475 1.660000 16.667507
|
||||||
|
51.555901 1.680000 16.868321
|
||||||
|
51.183352 1.700000 17.069134
|
||||||
|
50.809820 1.720000 17.269947
|
||||||
|
50.435296 1.740000 17.470761
|
||||||
|
50.059770 1.760000 17.671574
|
||||||
|
49.683234 1.780000 17.872387
|
||||||
|
49.305678 1.800000 18.073201
|
||||||
|
48.927093 1.820000 18.274014
|
||||||
|
48.547470 1.840000 18.474827
|
||||||
|
48.166797 1.860000 18.675641
|
||||||
|
47.785067 1.880000 18.876454
|
||||||
|
47.402267 1.900000 19.077267
|
||||||
|
47.018388 1.920000 19.278081
|
||||||
|
46.633419 1.940000 19.478894
|
||||||
|
46.247348 1.960000 19.679708
|
||||||
|
45.860166 1.980000 19.880521
|
||||||
|
45.471861 2.000000 20.081334
|
||||||
|
45.082420 2.020000 20.282148
|
||||||
|
44.691832 2.040000 20.482961
|
||||||
|
44.300085 2.060000 20.683774
|
||||||
|
43.907166 2.080000 20.884588
|
||||||
|
43.513062 2.100000 21.085401
|
||||||
|
43.117761 2.120000 21.286214
|
||||||
|
42.721249 2.140000 21.487028
|
||||||
|
42.323512 2.160000 21.687841
|
||||||
|
41.924536 2.180000 21.888654
|
||||||
|
41.524306 2.200000 22.089468
|
||||||
|
41.122807 2.220000 22.290281
|
||||||
|
40.720025 2.240000 22.491094
|
||||||
|
40.315943 2.260000 22.691908
|
||||||
|
39.910545 2.280000 22.892721
|
||||||
|
39.503814 2.300000 23.093534
|
||||||
|
39.095734 2.320000 23.294348
|
||||||
|
38.686285 2.340000 23.495161
|
||||||
|
38.275451 2.360000 23.695974
|
||||||
|
37.863212 2.380000 23.896788
|
||||||
|
37.449548 2.400000 24.097601
|
||||||
|
37.034440 2.420000 24.298414
|
||||||
|
36.617866 2.440000 24.499228
|
||||||
|
36.199805 2.460000 24.700041
|
||||||
|
35.780234 2.480000 24.900854
|
||||||
|
35.359130 2.500000 25.101668
|
||||||
|
34.936469 2.520000 25.302481
|
||||||
|
34.512226 2.540000 25.503294
|
||||||
|
34.086374 2.560000 25.704108
|
||||||
|
33.658887 2.580000 25.904921
|
||||||
|
33.229737 2.600000 26.105734
|
||||||
|
32.798893 2.620000 26.306548
|
||||||
|
32.366325 2.640000 26.507361
|
||||||
|
31.932000 2.660000 26.708174
|
||||||
|
31.495886 2.680000 26.908988
|
||||||
|
31.058108 2.700000 27.109801
|
||||||
|
30.618942 2.720000 27.310614
|
||||||
|
30.178391 2.740000 27.511428
|
||||||
|
29.736448 2.760000 27.712241
|
||||||
|
29.293103 2.780000 27.913055
|
||||||
|
28.848348 2.800000 28.113868
|
||||||
|
28.402175 2.820000 28.314681
|
||||||
|
27.954576 2.840000 28.515495
|
||||||
|
27.505544 2.860000 28.716308
|
||||||
|
27.055071 2.880000 28.917121
|
||||||
|
26.603148 2.900000 29.117935
|
||||||
|
26.149770 2.920000 29.318748
|
||||||
|
25.694928 2.940000 29.519561
|
||||||
|
25.238617 2.960000 29.720375
|
||||||
|
24.780830 2.980000 29.921188
|
||||||
|
24.321560 3.000000 30.122001
|
||||||
|
23.860803 3.020000 30.322815
|
||||||
|
23.398554 3.040000 30.523628
|
||||||
|
22.934808 3.060000 30.724441
|
||||||
|
22.469563 3.080000 30.925255
|
||||||
|
22.002814 3.100000 31.126068
|
||||||
|
21.534561 3.120000 31.326881
|
||||||
|
21.064804 3.140000 31.527695
|
||||||
|
20.593543 3.160000 31.728508
|
||||||
|
20.120781 3.180000 31.929321
|
||||||
|
19.646523 3.200000 32.130135
|
||||||
|
19.170777 3.220000 32.330948
|
||||||
|
18.693552 3.240000 32.531761
|
||||||
|
18.215161 3.260000 32.732575
|
||||||
|
17.736573 3.280000 32.933388
|
||||||
|
17.257970 3.300000 33.134201
|
||||||
|
16.779470 3.320000 33.335015
|
||||||
|
16.301199 3.340000 33.535828
|
||||||
|
15.823299 3.360000 33.736641
|
||||||
|
15.345927 3.380000 33.937455
|
||||||
|
14.869258 3.400000 34.138268
|
||||||
|
14.393487 3.420000 34.339081
|
||||||
|
13.918832 3.440000 34.539895
|
||||||
|
13.445535 3.460000 34.740708
|
||||||
|
12.973871 3.480000 34.941521
|
||||||
|
12.504146 3.500000 35.142335
|
||||||
|
12.036705 3.520000 35.343148
|
||||||
|
11.571935 3.540000 35.543962
|
||||||
|
11.110272 3.560000 35.744775
|
||||||
|
10.652203 3.580000 35.945588
|
||||||
|
10.198276 3.600000 36.146402
|
||||||
|
9.749100 3.620000 36.347215
|
||||||
|
9.305192 3.640000 36.548028
|
||||||
|
8.864425 3.660000 36.748842
|
||||||
|
8.426224 3.680000 36.949655
|
||||||
|
7.991228 3.700000 37.150468
|
||||||
|
7.560188 3.720000 37.351282
|
||||||
|
7.133965 3.740000 37.552095
|
||||||
|
6.713536 3.760000 37.752908
|
||||||
|
6.299994 3.780000 37.953722
|
||||||
|
5.894542 3.800000 38.154535
|
||||||
|
5.498474 3.820000 38.355348
|
||||||
|
5.113148 3.840000 38.556162
|
||||||
|
4.739951 3.860000 38.756975
|
||||||
|
4.380247 3.880000 38.957788
|
||||||
|
4.035323 3.900000 39.158602
|
||||||
|
3.706328 3.920000 39.359415
|
||||||
|
3.394217 3.940000 39.560228
|
||||||
|
3.099704 3.960000 39.761042
|
||||||
|
2.823232 3.980000 39.961855
|
||||||
|
2.564958 4.000000 40.162668
|
||||||
|
2.324760 4.020000 40.363482
|
||||||
|
2.102259 4.040000 40.564295
|
||||||
|
1.896859 4.060000 40.765108
|
||||||
|
1.867478 4.063000 40.795230
|
||||||
|
1.838462 4.066000 40.825352
|
||||||
|
1.809808 4.069000 40.855474
|
||||||
|
1.781512 4.072000 40.885596
|
||||||
|
1.753572 4.075000 40.915718
|
||||||
|
1.725985 4.078000 40.945840
|
||||||
|
1.698747 4.081000 40.975962
|
||||||
|
1.671855 4.084000 41.006084
|
||||||
|
1.645306 4.087000 41.036206
|
||||||
|
1.619097 4.090000 41.066328
|
||||||
|
1.593224 4.093000 41.096450
|
||||||
|
1.567684 4.096000 41.126572
|
||||||
|
1.542474 4.099000 41.156694
|
||||||
|
1.517589 4.102000 41.186816
|
||||||
|
1.493028 4.105000 41.216938
|
||||||
|
1.468785 4.108000 41.247060
|
||||||
|
1.444859 4.111000 41.277182
|
||||||
|
1.421244 4.114000 41.307304
|
||||||
|
1.397939 4.117000 41.337426
|
||||||
|
1.374939 4.120000 41.367548
|
||||||
|
1.352240 4.123000 41.397670
|
||||||
|
1.329840 4.126000 41.427792
|
||||||
|
1.307734 4.129000 41.457914
|
||||||
|
1.285919 4.132000 41.488036
|
||||||
|
1.264393 4.135000 41.518158
|
||||||
|
1.243150 4.138000 41.548280
|
||||||
|
1.222187 4.141000 41.578402
|
||||||
|
1.201502 4.144000 41.608524
|
||||||
|
1.181090 4.147000 41.638646
|
||||||
|
1.160949 4.150000 41.668768
|
||||||
|
1.141073 4.153000 41.698890
|
||||||
|
1.121461 4.156000 41.729012
|
||||||
|
1.102109 4.159000 41.759134
|
||||||
|
1.083012 4.162000 41.789256
|
||||||
|
1.064168 4.165000 41.819378
|
||||||
|
1.045574 4.168000 41.849500
|
||||||
|
1.027225 4.171000 41.879622
|
||||||
|
1.009119 4.174000 41.909744
|
||||||
|
0.991252 4.177000 41.939866
|
||||||
|
0.973621 4.180000 41.969988
|
||||||
|
0.956222 4.183000 42.000110
|
||||||
|
0.939052 4.186000 42.030232
|
||||||
|
0.922108 4.189000 42.060354
|
||||||
|
0.905387 4.192000 42.090476
|
||||||
|
0.888885 4.195000 42.120598
|
||||||
|
0.872600 4.198000 42.150720
|
||||||
|
0.856527 4.201000 42.180842
|
||||||
|
0.840663 4.204000 42.210964
|
||||||
|
0.825007 4.207000 42.241086
|
||||||
|
0.809554 4.210000 42.271208
|
||||||
|
0.794301 4.213000 42.301330
|
||||||
|
0.779247 4.216000 42.331452
|
||||||
|
0.764386 4.219000 42.361574
|
||||||
|
0.749717 4.222000 42.391696
|
||||||
|
0.735236 4.225000 42.421818
|
||||||
|
0.720941 4.228000 42.451940
|
||||||
|
0.706828 4.231000 42.482062
|
||||||
|
0.692895 4.234000 42.512184
|
||||||
|
0.679139 4.237000 42.542306
|
||||||
|
0.665555 4.240000 42.572428
|
||||||
|
0.652102 4.243000 42.602550
|
||||||
|
0.638755 4.246000 42.632672
|
||||||
|
0.625511 4.249000 42.662794
|
||||||
|
0.612371 4.252000 42.692916
|
||||||
|
0.599334 4.255000 42.723038
|
||||||
|
0.586400 4.258000 42.753160
|
||||||
|
0.573569 4.261000 42.783282
|
||||||
|
0.560839 4.264000 42.813404
|
||||||
|
0.548205 4.267000 42.843526
|
||||||
|
0.535662 4.270000 42.873648
|
||||||
|
0.523219 4.273000 42.903770
|
||||||
|
0.510875 4.276000 42.933892
|
||||||
|
0.498630 4.279000 42.964014
|
||||||
|
0.486484 4.282000 42.994136
|
||||||
|
0.474435 4.285000 43.024258
|
||||||
|
0.462483 4.288000 43.054381
|
||||||
|
0.450627 4.291000 43.084503
|
||||||
|
0.438867 4.294000 43.114625
|
||||||
|
0.427202 4.297000 43.144747
|
||||||
|
0.415631 4.300000 43.174869
|
||||||
|
0.404153 4.303000 43.204991
|
||||||
|
0.392767 4.306000 43.235113
|
||||||
|
0.381471 4.309000 43.265235
|
||||||
|
0.370262 4.312000 43.295357
|
||||||
|
0.359141 4.315000 43.325479
|
||||||
|
0.348106 4.318000 43.355601
|
||||||
|
0.337155 4.321000 43.385723
|
||||||
|
0.326286 4.324000 43.415845
|
||||||
|
0.315500 4.327000 43.445967
|
||||||
|
0.304795 4.330000 43.476089
|
||||||
|
0.294169 4.333000 43.506211
|
||||||
|
0.283622 4.336000 43.536333
|
||||||
|
0.273151 4.339000 43.566455
|
||||||
|
0.262756 4.342000 43.596577
|
||||||
|
0.252434 4.345000 43.626699
|
||||||
|
0.242183 4.348000 43.656821
|
||||||
|
0.232002 4.351000 43.686943
|
||||||
|
0.221888 4.354000 43.717065
|
||||||
|
0.211839 4.357000 43.747187
|
||||||
|
0.201851 4.360000 43.777309
|
||||||
|
0.191922 4.363000 43.807431
|
||||||
|
0.182047 4.366000 43.837553
|
||||||
|
0.172222 4.369000 43.867675
|
||||||
|
0.162443 4.372000 43.897797
|
||||||
|
0.152704 4.375000 43.927919
|
||||||
|
0.142999 4.378000 43.958041
|
||||||
|
0.133320 4.381000 43.988163
|
||||||
|
0.123659 4.384000 44.018285
|
||||||
|
0.114004 4.387000 44.048407
|
||||||
|
0.104345 4.390000 44.078529
|
||||||
|
0.094664 4.393000 44.108651
|
||||||
|
0.084944 4.396000 44.138773
|
||||||
|
0.075160 4.399000 44.168895
|
||||||
|
0.065281 4.402000 44.199017
|
||||||
|
0.055267 4.405000 44.229139
|
||||||
|
0.045062 4.408000 44.259261
|
||||||
|
0.034588 4.411000 44.289383
|
||||||
|
0.023738 4.414000 44.319505
|
||||||
|
0.012376 4.417000 44.349627
|
||||||
|
0.000722 4.420000 44.379749
|
||||||
275
eloss_calculations/aluminum_lookup_80MeV_350torr_4pc.dat
Normal file
275
eloss_calculations/aluminum_lookup_80MeV_350torr_4pc.dat
Normal file
|
|
@ -0,0 +1,275 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 80 MeV
|
||||||
|
80.000000 0.000000 0.000000
|
||||||
|
79.652863 0.022000 0.205127
|
||||||
|
79.305036 0.044000 0.410255
|
||||||
|
78.956514 0.066000 0.615382
|
||||||
|
78.607294 0.088000 0.820510
|
||||||
|
78.257370 0.110000 1.025637
|
||||||
|
77.906739 0.132000 1.230764
|
||||||
|
77.555397 0.154000 1.435892
|
||||||
|
77.203338 0.176000 1.641019
|
||||||
|
76.850558 0.198000 1.846147
|
||||||
|
76.497053 0.220000 2.051274
|
||||||
|
76.142818 0.242000 2.256402
|
||||||
|
75.787848 0.264000 2.461529
|
||||||
|
75.432139 0.286000 2.666656
|
||||||
|
75.075687 0.308000 2.871784
|
||||||
|
74.718485 0.330000 3.076911
|
||||||
|
74.360529 0.352000 3.282039
|
||||||
|
74.001815 0.374000 3.487166
|
||||||
|
73.642337 0.396000 3.692293
|
||||||
|
73.282091 0.418000 3.897421
|
||||||
|
72.921071 0.440000 4.102548
|
||||||
|
72.559271 0.462000 4.307676
|
||||||
|
72.196688 0.484000 4.512803
|
||||||
|
71.833315 0.506000 4.717930
|
||||||
|
71.469148 0.528000 4.923058
|
||||||
|
71.104181 0.550000 5.128185
|
||||||
|
70.738407 0.572000 5.333313
|
||||||
|
70.371823 0.594000 5.538440
|
||||||
|
70.004422 0.616000 5.743568
|
||||||
|
69.636199 0.638000 5.948695
|
||||||
|
69.267147 0.660000 6.153822
|
||||||
|
68.897262 0.682000 6.358950
|
||||||
|
68.526536 0.704000 6.564077
|
||||||
|
68.154965 0.726000 6.769205
|
||||||
|
67.782542 0.748000 6.974332
|
||||||
|
67.409261 0.770000 7.179459
|
||||||
|
67.035116 0.792000 7.384587
|
||||||
|
66.660101 0.814000 7.589714
|
||||||
|
66.284209 0.836000 7.794842
|
||||||
|
65.907434 0.858000 7.999969
|
||||||
|
65.529769 0.880000 8.205097
|
||||||
|
65.151207 0.902000 8.410224
|
||||||
|
64.771743 0.924000 8.615351
|
||||||
|
64.391369 0.946000 8.820479
|
||||||
|
64.010078 0.968000 9.025606
|
||||||
|
63.627864 0.990000 9.230734
|
||||||
|
63.244719 1.012000 9.435861
|
||||||
|
62.860636 1.034000 9.640988
|
||||||
|
62.475608 1.056000 9.846116
|
||||||
|
62.089627 1.078000 10.051243
|
||||||
|
61.702686 1.100000 10.256371
|
||||||
|
61.314778 1.122000 10.461498
|
||||||
|
60.925894 1.144000 10.666625
|
||||||
|
60.536028 1.166000 10.871753
|
||||||
|
60.145170 1.188000 11.076880
|
||||||
|
59.753313 1.210000 11.282008
|
||||||
|
59.360448 1.232000 11.487135
|
||||||
|
58.966568 1.254000 11.692263
|
||||||
|
58.571664 1.276000 11.897390
|
||||||
|
58.175727 1.298000 12.102517
|
||||||
|
57.778749 1.320000 12.307645
|
||||||
|
57.380720 1.342000 12.512772
|
||||||
|
56.981633 1.364000 12.717900
|
||||||
|
56.581477 1.386000 12.923027
|
||||||
|
56.180243 1.408000 13.128154
|
||||||
|
55.777922 1.430000 13.333282
|
||||||
|
55.374504 1.452000 13.538409
|
||||||
|
54.969980 1.474000 13.743537
|
||||||
|
54.564339 1.496000 13.948664
|
||||||
|
54.157572 1.518000 14.153791
|
||||||
|
53.749667 1.540000 14.358919
|
||||||
|
53.340616 1.562000 14.564046
|
||||||
|
52.930406 1.584000 14.769174
|
||||||
|
52.519026 1.606000 14.974301
|
||||||
|
52.106467 1.628000 15.179429
|
||||||
|
51.692716 1.650000 15.384556
|
||||||
|
51.277762 1.672000 15.589683
|
||||||
|
50.861594 1.694000 15.794811
|
||||||
|
50.444198 1.716000 15.999938
|
||||||
|
50.025563 1.738000 16.205066
|
||||||
|
49.605677 1.760000 16.410193
|
||||||
|
49.184526 1.782000 16.615320
|
||||||
|
48.762097 1.804000 16.820448
|
||||||
|
48.338378 1.826000 17.025575
|
||||||
|
47.913354 1.848000 17.230703
|
||||||
|
47.487012 1.870000 17.435830
|
||||||
|
47.059337 1.892000 17.640958
|
||||||
|
46.630315 1.914000 17.846085
|
||||||
|
46.199931 1.936000 18.051212
|
||||||
|
45.768168 1.958000 18.256340
|
||||||
|
45.335013 1.980000 18.461467
|
||||||
|
44.900448 2.002000 18.666595
|
||||||
|
44.464457 2.024000 18.871722
|
||||||
|
44.027023 2.046000 19.076849
|
||||||
|
43.588129 2.068000 19.281977
|
||||||
|
43.147757 2.090000 19.487104
|
||||||
|
42.705888 2.112000 19.692232
|
||||||
|
42.262504 2.134000 19.897359
|
||||||
|
41.817584 2.156000 20.102486
|
||||||
|
41.371110 2.178000 20.307614
|
||||||
|
40.923060 2.200000 20.512741
|
||||||
|
40.473413 2.222000 20.717869
|
||||||
|
40.022147 2.244000 20.922996
|
||||||
|
39.569239 2.266000 21.128124
|
||||||
|
39.114666 2.288000 21.333251
|
||||||
|
38.658404 2.310000 21.538378
|
||||||
|
38.200427 2.332000 21.743506
|
||||||
|
37.740710 2.354000 21.948633
|
||||||
|
37.279224 2.376000 22.153761
|
||||||
|
36.815944 2.398000 22.358888
|
||||||
|
36.350838 2.420000 22.564015
|
||||||
|
35.883878 2.442000 22.769143
|
||||||
|
35.415030 2.464000 22.974270
|
||||||
|
34.944264 2.486000 23.179398
|
||||||
|
34.471544 2.508000 23.384525
|
||||||
|
33.996834 2.530000 23.589652
|
||||||
|
33.520097 2.552000 23.794780
|
||||||
|
33.041294 2.574000 23.999907
|
||||||
|
32.560384 2.596000 24.205035
|
||||||
|
32.077324 2.618000 24.410162
|
||||||
|
31.592067 2.640000 24.615290
|
||||||
|
31.104689 2.662000 24.820417
|
||||||
|
30.615570 2.684000 25.025544
|
||||||
|
30.124743 2.706000 25.230672
|
||||||
|
29.632198 2.728000 25.435799
|
||||||
|
29.137922 2.750000 25.640927
|
||||||
|
28.641906 2.772000 25.846054
|
||||||
|
28.144138 2.794000 26.051181
|
||||||
|
27.644608 2.816000 26.256309
|
||||||
|
27.143305 2.838000 26.461436
|
||||||
|
26.640219 2.860000 26.666564
|
||||||
|
26.135342 2.882000 26.871691
|
||||||
|
25.628663 2.904000 27.076819
|
||||||
|
25.120174 2.926000 27.281946
|
||||||
|
24.609866 2.948000 27.487073
|
||||||
|
24.097733 2.970000 27.692201
|
||||||
|
23.583768 2.992000 27.897328
|
||||||
|
23.067964 3.014000 28.102456
|
||||||
|
22.550318 3.036000 28.307583
|
||||||
|
22.030825 3.058000 28.512710
|
||||||
|
21.509485 3.080000 28.717838
|
||||||
|
20.986298 3.102000 28.922965
|
||||||
|
20.461265 3.124000 29.128093
|
||||||
|
19.934392 3.146000 29.333220
|
||||||
|
19.405688 3.168000 29.538347
|
||||||
|
18.875166 3.190000 29.743475
|
||||||
|
18.342952 3.212000 29.948602
|
||||||
|
17.810238 3.234000 30.153730
|
||||||
|
17.277504 3.256000 30.358857
|
||||||
|
16.744907 3.278000 30.563985
|
||||||
|
16.212626 3.300000 30.769112
|
||||||
|
15.680858 3.322000 30.974239
|
||||||
|
15.149825 3.344000 31.179367
|
||||||
|
14.619780 3.366000 31.384494
|
||||||
|
14.091004 3.388000 31.589622
|
||||||
|
13.563818 3.410000 31.794749
|
||||||
|
13.038586 3.432000 31.999876
|
||||||
|
12.515722 3.454000 32.205004
|
||||||
|
11.995696 3.476000 32.410131
|
||||||
|
11.479043 3.498000 32.615259
|
||||||
|
10.966373 3.520000 32.820386
|
||||||
|
10.458376 3.542000 33.025513
|
||||||
|
9.955836 3.564000 33.230641
|
||||||
|
9.459634 3.586000 33.435768
|
||||||
|
8.968587 3.608000 33.640896
|
||||||
|
8.480624 3.630000 33.846023
|
||||||
|
7.996543 3.652000 34.051151
|
||||||
|
7.517365 3.674000 34.256278
|
||||||
|
7.044277 3.696000 34.461405
|
||||||
|
6.578645 3.718000 34.666533
|
||||||
|
6.122008 3.740000 34.871660
|
||||||
|
5.676063 3.762000 35.076788
|
||||||
|
5.242633 3.784000 35.281915
|
||||||
|
4.823608 3.806000 35.487042
|
||||||
|
4.420872 3.828000 35.692170
|
||||||
|
4.036211 3.850000 35.897297
|
||||||
|
3.671213 3.872000 36.102425
|
||||||
|
3.327175 3.894000 36.307552
|
||||||
|
3.005018 3.916000 36.512679
|
||||||
|
2.705246 3.938000 36.717807
|
||||||
|
2.427930 3.960000 36.922934
|
||||||
|
2.172726 3.982000 37.128062
|
||||||
|
1.938931 4.004000 37.333189
|
||||||
|
1.898649 4.008000 37.370485
|
||||||
|
1.859036 4.012000 37.407781
|
||||||
|
1.820084 4.016000 37.445077
|
||||||
|
1.781787 4.020000 37.482373
|
||||||
|
1.744136 4.024000 37.519669
|
||||||
|
1.707124 4.028000 37.556965
|
||||||
|
1.670744 4.032000 37.594260
|
||||||
|
1.634987 4.036000 37.631556
|
||||||
|
1.599846 4.040000 37.668852
|
||||||
|
1.565312 4.044000 37.706148
|
||||||
|
1.531376 4.048000 37.743444
|
||||||
|
1.498031 4.052000 37.780740
|
||||||
|
1.465269 4.056000 37.818036
|
||||||
|
1.433080 4.060000 37.855332
|
||||||
|
1.401456 4.064000 37.892628
|
||||||
|
1.370389 4.068000 37.929923
|
||||||
|
1.339869 4.072000 37.967219
|
||||||
|
1.309889 4.076000 38.004515
|
||||||
|
1.280440 4.080000 38.041811
|
||||||
|
1.251512 4.084000 38.079107
|
||||||
|
1.223098 4.088000 38.116403
|
||||||
|
1.195189 4.092000 38.153699
|
||||||
|
1.167776 4.096000 38.190995
|
||||||
|
1.140850 4.100000 38.228291
|
||||||
|
1.114403 4.104000 38.265586
|
||||||
|
1.088427 4.108000 38.302882
|
||||||
|
1.062913 4.112000 38.340178
|
||||||
|
1.037853 4.116000 38.377474
|
||||||
|
1.013238 4.120000 38.414770
|
||||||
|
0.989061 4.124000 38.452066
|
||||||
|
0.965312 4.128000 38.489362
|
||||||
|
0.941984 4.132000 38.526658
|
||||||
|
0.919069 4.136000 38.563954
|
||||||
|
0.896559 4.140000 38.601250
|
||||||
|
0.874445 4.144000 38.638545
|
||||||
|
0.852720 4.148000 38.675841
|
||||||
|
0.831375 4.152000 38.713137
|
||||||
|
0.810405 4.156000 38.750433
|
||||||
|
0.789800 4.160000 38.787729
|
||||||
|
0.769555 4.164000 38.825025
|
||||||
|
0.749659 4.168000 38.862321
|
||||||
|
0.730108 4.172000 38.899617
|
||||||
|
0.710893 4.176000 38.936913
|
||||||
|
0.692007 4.180000 38.974208
|
||||||
|
0.673444 4.184000 39.011504
|
||||||
|
0.655169 4.188000 39.048800
|
||||||
|
0.637097 4.192000 39.086096
|
||||||
|
0.619219 4.196000 39.123392
|
||||||
|
0.601533 4.200000 39.160688
|
||||||
|
0.584039 4.204000 39.197984
|
||||||
|
0.566734 4.208000 39.235280
|
||||||
|
0.549617 4.212000 39.272576
|
||||||
|
0.532668 4.216000 39.309871
|
||||||
|
0.515903 4.220000 39.347167
|
||||||
|
0.499322 4.224000 39.384463
|
||||||
|
0.482922 4.228000 39.421759
|
||||||
|
0.466703 4.232000 39.459055
|
||||||
|
0.450662 4.236000 39.496351
|
||||||
|
0.434797 4.240000 39.533647
|
||||||
|
0.419107 4.244000 39.570943
|
||||||
|
0.403589 4.248000 39.608239
|
||||||
|
0.388240 4.252000 39.645535
|
||||||
|
0.373053 4.256000 39.682830
|
||||||
|
0.358025 4.260000 39.720126
|
||||||
|
0.343153 4.264000 39.757422
|
||||||
|
0.328433 4.268000 39.794718
|
||||||
|
0.313862 4.272000 39.832014
|
||||||
|
0.299437 4.276000 39.869310
|
||||||
|
0.285156 4.280000 39.906606
|
||||||
|
0.271013 4.284000 39.943902
|
||||||
|
0.257007 4.288000 39.981198
|
||||||
|
0.243132 4.292000 40.018493
|
||||||
|
0.229383 4.296000 40.055789
|
||||||
|
0.215754 4.300000 40.093085
|
||||||
|
0.202240 4.304000 40.130381
|
||||||
|
0.188830 4.308000 40.167677
|
||||||
|
0.175518 4.312000 40.204973
|
||||||
|
0.162291 4.316000 40.242269
|
||||||
|
0.149136 4.320000 40.279565
|
||||||
|
0.136037 4.324000 40.316861
|
||||||
|
0.122975 4.328000 40.354156
|
||||||
|
0.109923 4.332000 40.391452
|
||||||
|
0.096850 4.336000 40.428748
|
||||||
|
0.083713 4.340000 40.466044
|
||||||
|
0.070453 4.344000 40.503340
|
||||||
|
0.056987 4.348000 40.540636
|
||||||
|
0.043192 4.352000 40.577932
|
||||||
|
0.028879 4.356000 40.615228
|
||||||
|
0.013760 4.360000 40.652524
|
||||||
|
0.001928 4.363000 40.680496
|
||||||
42386
eloss_calculations/deutron_lookup_30MeV_250torr_3pc.dat
Normal file
42386
eloss_calculations/deutron_lookup_30MeV_250torr_3pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
39969
eloss_calculations/deutron_lookup_30MeV_250torr_4pc.dat
Normal file
39969
eloss_calculations/deutron_lookup_30MeV_250torr_4pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
35151
eloss_calculations/deutron_lookup_30MeV_350torr_3pc.dat
Normal file
35151
eloss_calculations/deutron_lookup_30MeV_350torr_3pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
29371
eloss_calculations/deutron_lookup_30MeV_350torr_4pc.dat
Normal file
29371
eloss_calculations/deutron_lookup_30MeV_350torr_4pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
631
eloss_calculations/fluorine_lookup_70MeV_250torr_3pc.dat
Normal file
631
eloss_calculations/fluorine_lookup_70MeV_250torr_3pc.dat
Normal file
|
|
@ -0,0 +1,631 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 70 MeV
|
||||||
|
70.000000 0.000000 0.000000
|
||||||
|
69.893403 0.015000 0.210854
|
||||||
|
69.786706 0.030000 0.421708
|
||||||
|
69.679907 0.045000 0.632562
|
||||||
|
69.573006 0.060000 0.843416
|
||||||
|
69.466003 0.075000 1.054270
|
||||||
|
69.358898 0.090000 1.265124
|
||||||
|
69.251691 0.105000 1.475978
|
||||||
|
69.144381 0.120000 1.686832
|
||||||
|
69.036968 0.135000 1.897686
|
||||||
|
68.929451 0.150000 2.108540
|
||||||
|
68.821831 0.165000 2.319394
|
||||||
|
68.714106 0.180000 2.530248
|
||||||
|
68.606278 0.195000 2.741102
|
||||||
|
68.498344 0.210000 2.951956
|
||||||
|
68.390306 0.225000 3.162810
|
||||||
|
68.282163 0.240000 3.373664
|
||||||
|
68.173914 0.255000 3.584518
|
||||||
|
68.065559 0.270000 3.795372
|
||||||
|
67.957098 0.285000 4.006226
|
||||||
|
67.848530 0.300000 4.217080
|
||||||
|
67.739856 0.315000 4.427934
|
||||||
|
67.631074 0.330000 4.638788
|
||||||
|
67.522186 0.345000 4.849642
|
||||||
|
67.413189 0.360000 5.060496
|
||||||
|
67.304084 0.375000 5.271350
|
||||||
|
67.194871 0.390000 5.482204
|
||||||
|
67.085549 0.405000 5.693058
|
||||||
|
66.976118 0.420000 5.903912
|
||||||
|
66.866578 0.435000 6.114766
|
||||||
|
66.756928 0.450000 6.325620
|
||||||
|
66.647168 0.465000 6.536474
|
||||||
|
66.537298 0.480000 6.747328
|
||||||
|
66.427316 0.495000 6.958182
|
||||||
|
66.317224 0.510000 7.169036
|
||||||
|
66.207021 0.525000 7.379890
|
||||||
|
66.096705 0.540000 7.590744
|
||||||
|
65.986278 0.555000 7.801598
|
||||||
|
65.875738 0.570000 8.012452
|
||||||
|
65.765085 0.585000 8.223306
|
||||||
|
65.654320 0.600000 8.434160
|
||||||
|
65.543440 0.615000 8.645014
|
||||||
|
65.432447 0.630000 8.855868
|
||||||
|
65.321340 0.645000 9.066722
|
||||||
|
65.210118 0.660000 9.277576
|
||||||
|
65.098782 0.675000 9.488430
|
||||||
|
64.987330 0.690000 9.699284
|
||||||
|
64.875762 0.705000 9.910138
|
||||||
|
64.764079 0.720000 10.120992
|
||||||
|
64.652279 0.735000 10.331846
|
||||||
|
64.540363 0.750000 10.542700
|
||||||
|
64.428329 0.765000 10.753554
|
||||||
|
64.316178 0.780000 10.964408
|
||||||
|
64.203909 0.795000 11.175262
|
||||||
|
64.091522 0.810000 11.386116
|
||||||
|
63.979017 0.825000 11.596970
|
||||||
|
63.866392 0.840000 11.807825
|
||||||
|
63.753649 0.855000 12.018679
|
||||||
|
63.640785 0.870000 12.229533
|
||||||
|
63.527802 0.885000 12.440387
|
||||||
|
63.414698 0.900000 12.651241
|
||||||
|
63.301473 0.915000 12.862095
|
||||||
|
63.188127 0.930000 13.072949
|
||||||
|
63.074659 0.945000 13.283803
|
||||||
|
62.961069 0.960000 13.494657
|
||||||
|
62.847357 0.975000 13.705511
|
||||||
|
62.733521 0.990000 13.916365
|
||||||
|
62.619563 1.005000 14.127219
|
||||||
|
62.505481 1.020000 14.338073
|
||||||
|
62.391275 1.035000 14.548927
|
||||||
|
62.276945 1.050000 14.759781
|
||||||
|
62.162489 1.065000 14.970635
|
||||||
|
62.047909 1.080000 15.181489
|
||||||
|
61.933202 1.095000 15.392343
|
||||||
|
61.818370 1.110000 15.603197
|
||||||
|
61.703411 1.125000 15.814051
|
||||||
|
61.588325 1.140000 16.024905
|
||||||
|
61.473112 1.155000 16.235759
|
||||||
|
61.357771 1.170000 16.446613
|
||||||
|
61.242301 1.185000 16.657467
|
||||||
|
61.126704 1.200000 16.868321
|
||||||
|
61.010976 1.215000 17.079175
|
||||||
|
60.895120 1.230000 17.290029
|
||||||
|
60.779133 1.245000 17.500883
|
||||||
|
60.663016 1.260000 17.711737
|
||||||
|
60.546769 1.275000 17.922591
|
||||||
|
60.430389 1.290000 18.133445
|
||||||
|
60.313879 1.305000 18.344299
|
||||||
|
60.197236 1.320000 18.555153
|
||||||
|
60.080460 1.335000 18.766007
|
||||||
|
59.963551 1.350000 18.976861
|
||||||
|
59.846509 1.365000 19.187715
|
||||||
|
59.729332 1.380000 19.398569
|
||||||
|
59.612021 1.395000 19.609423
|
||||||
|
59.494576 1.410000 19.820277
|
||||||
|
59.376994 1.425000 20.031131
|
||||||
|
59.259277 1.440000 20.241985
|
||||||
|
59.141424 1.455000 20.452839
|
||||||
|
59.023433 1.470000 20.663693
|
||||||
|
58.905305 1.485000 20.874547
|
||||||
|
58.787040 1.500000 21.085401
|
||||||
|
58.668636 1.515000 21.296255
|
||||||
|
58.550093 1.530000 21.507109
|
||||||
|
58.431411 1.545000 21.717963
|
||||||
|
58.312590 1.560000 21.928817
|
||||||
|
58.193627 1.575000 22.139671
|
||||||
|
58.074525 1.590000 22.350525
|
||||||
|
57.955281 1.605000 22.561379
|
||||||
|
57.835895 1.620000 22.772233
|
||||||
|
57.716366 1.635000 22.983087
|
||||||
|
57.596695 1.650000 23.193941
|
||||||
|
57.476881 1.665000 23.404795
|
||||||
|
57.356923 1.680000 23.615649
|
||||||
|
57.236820 1.695000 23.826503
|
||||||
|
57.116573 1.710000 24.037357
|
||||||
|
56.996180 1.725000 24.248211
|
||||||
|
56.875641 1.740000 24.459065
|
||||||
|
56.754956 1.755000 24.669919
|
||||||
|
56.634123 1.770000 24.880773
|
||||||
|
56.513143 1.785000 25.091627
|
||||||
|
56.392015 1.800000 25.302481
|
||||||
|
56.270738 1.815000 25.513335
|
||||||
|
56.149312 1.830000 25.724189
|
||||||
|
56.027737 1.845000 25.935043
|
||||||
|
55.906010 1.860000 26.145897
|
||||||
|
55.784133 1.875000 26.356751
|
||||||
|
55.662105 1.890000 26.567605
|
||||||
|
55.539924 1.905000 26.778459
|
||||||
|
55.417591 1.920000 26.989313
|
||||||
|
55.295105 1.935000 27.200167
|
||||||
|
55.172465 1.950000 27.411021
|
||||||
|
55.049670 1.965000 27.621875
|
||||||
|
54.926721 1.980000 27.832729
|
||||||
|
54.803616 1.995000 28.043583
|
||||||
|
54.680355 2.010000 28.254437
|
||||||
|
54.556937 2.025000 28.465291
|
||||||
|
54.433362 2.040000 28.676145
|
||||||
|
54.309629 2.055000 28.886999
|
||||||
|
54.185737 2.070000 29.097853
|
||||||
|
54.061686 2.085000 29.308707
|
||||||
|
53.937475 2.100000 29.519561
|
||||||
|
53.813104 2.115000 29.730415
|
||||||
|
53.688572 2.130000 29.941269
|
||||||
|
53.563879 2.145000 30.152123
|
||||||
|
53.439022 2.160000 30.362977
|
||||||
|
53.314003 2.175000 30.573831
|
||||||
|
53.188821 2.190000 30.784685
|
||||||
|
53.063474 2.205000 30.995539
|
||||||
|
52.937962 2.220000 31.206393
|
||||||
|
52.812285 2.235000 31.417247
|
||||||
|
52.686441 2.250000 31.628101
|
||||||
|
52.560431 2.265000 31.838955
|
||||||
|
52.434253 2.280000 32.049809
|
||||||
|
52.307907 2.295000 32.260663
|
||||||
|
52.181392 2.310000 32.471517
|
||||||
|
52.054707 2.325000 32.682371
|
||||||
|
51.927852 2.340000 32.893225
|
||||||
|
51.800826 2.355000 33.104079
|
||||||
|
51.673629 2.370000 33.314933
|
||||||
|
51.546259 2.385000 33.525787
|
||||||
|
51.418716 2.400000 33.736641
|
||||||
|
51.290999 2.415000 33.947495
|
||||||
|
51.163108 2.430000 34.158349
|
||||||
|
51.035041 2.445000 34.369203
|
||||||
|
50.906799 2.460000 34.580057
|
||||||
|
50.778379 2.475000 34.790911
|
||||||
|
50.649783 2.490000 35.001765
|
||||||
|
50.521008 2.505000 35.212619
|
||||||
|
50.392054 2.520000 35.423474
|
||||||
|
50.262921 2.535000 35.634328
|
||||||
|
50.133607 2.550000 35.845182
|
||||||
|
50.004111 2.565000 36.056036
|
||||||
|
49.874434 2.580000 36.266890
|
||||||
|
49.744574 2.595000 36.477744
|
||||||
|
49.614531 2.610000 36.688598
|
||||||
|
49.484303 2.625000 36.899452
|
||||||
|
49.353890 2.640000 37.110306
|
||||||
|
49.223292 2.655000 37.321160
|
||||||
|
49.092506 2.670000 37.532014
|
||||||
|
48.961533 2.685000 37.742868
|
||||||
|
48.830372 2.700000 37.953722
|
||||||
|
48.699021 2.715000 38.164576
|
||||||
|
48.567481 2.730000 38.375430
|
||||||
|
48.435749 2.745000 38.586284
|
||||||
|
48.303826 2.760000 38.797138
|
||||||
|
48.171711 2.775000 39.007992
|
||||||
|
48.039402 2.790000 39.218846
|
||||||
|
47.906899 2.805000 39.429700
|
||||||
|
47.774200 2.820000 39.640554
|
||||||
|
47.641306 2.835000 39.851408
|
||||||
|
47.508215 2.850000 40.062262
|
||||||
|
47.374926 2.865000 40.273116
|
||||||
|
47.241438 2.880000 40.483970
|
||||||
|
47.107751 2.895000 40.694824
|
||||||
|
46.973864 2.910000 40.905678
|
||||||
|
46.839775 2.925000 41.116532
|
||||||
|
46.705484 2.940000 41.327386
|
||||||
|
46.570989 2.955000 41.538240
|
||||||
|
46.436291 2.970000 41.749094
|
||||||
|
46.301387 2.985000 41.959948
|
||||||
|
46.166277 3.000000 42.170802
|
||||||
|
46.030961 3.015000 42.381656
|
||||||
|
45.895436 3.030000 42.592510
|
||||||
|
45.759702 3.045000 42.803364
|
||||||
|
45.623759 3.060000 43.014218
|
||||||
|
45.487605 3.075000 43.225072
|
||||||
|
45.351238 3.090000 43.435926
|
||||||
|
45.214659 3.105000 43.646780
|
||||||
|
45.077866 3.120000 43.857634
|
||||||
|
44.940858 3.135000 44.068488
|
||||||
|
44.803634 3.150000 44.279342
|
||||||
|
44.666192 3.165000 44.490196
|
||||||
|
44.528533 3.180000 44.701050
|
||||||
|
44.390655 3.195000 44.911904
|
||||||
|
44.252556 3.210000 45.122758
|
||||||
|
44.114237 3.225000 45.333612
|
||||||
|
43.975694 3.240000 45.544466
|
||||||
|
43.836929 3.255000 45.755320
|
||||||
|
43.697939 3.270000 45.966174
|
||||||
|
43.558723 3.285000 46.177028
|
||||||
|
43.419280 3.300000 46.387882
|
||||||
|
43.279610 3.315000 46.598736
|
||||||
|
43.139711 3.330000 46.809590
|
||||||
|
42.999581 3.345000 47.020444
|
||||||
|
42.859220 3.360000 47.231298
|
||||||
|
42.718626 3.375000 47.442152
|
||||||
|
42.577799 3.390000 47.653006
|
||||||
|
42.436737 3.405000 47.863860
|
||||||
|
42.295439 3.420000 48.074714
|
||||||
|
42.153904 3.435000 48.285568
|
||||||
|
42.012130 3.450000 48.496422
|
||||||
|
41.870116 3.465000 48.707276
|
||||||
|
41.727861 3.480000 48.918130
|
||||||
|
41.585364 3.495000 49.128984
|
||||||
|
41.442624 3.510000 49.339838
|
||||||
|
41.299638 3.525000 49.550692
|
||||||
|
41.156407 3.540000 49.761546
|
||||||
|
41.012928 3.555000 49.972400
|
||||||
|
40.869201 3.570000 50.183254
|
||||||
|
40.725223 3.585000 50.394108
|
||||||
|
40.580994 3.600000 50.604962
|
||||||
|
40.436513 3.615000 50.815816
|
||||||
|
40.291777 3.630000 51.026670
|
||||||
|
40.146786 3.645000 51.237524
|
||||||
|
40.001538 3.660000 51.448378
|
||||||
|
39.856032 3.675000 51.659232
|
||||||
|
39.710266 3.690000 51.870086
|
||||||
|
39.564240 3.705000 52.080940
|
||||||
|
39.417950 3.720000 52.291794
|
||||||
|
39.271397 3.735000 52.502648
|
||||||
|
39.124578 3.750000 52.713502
|
||||||
|
38.977492 3.765000 52.924356
|
||||||
|
38.830138 3.780000 53.135210
|
||||||
|
38.682514 3.795000 53.346064
|
||||||
|
38.534618 3.810000 53.556918
|
||||||
|
38.386449 3.825000 53.767772
|
||||||
|
38.238006 3.840000 53.978626
|
||||||
|
38.089286 3.855000 54.189480
|
||||||
|
37.940289 3.870000 54.400334
|
||||||
|
37.791012 3.885000 54.611188
|
||||||
|
37.641454 3.900000 54.822042
|
||||||
|
37.491614 3.915000 55.032896
|
||||||
|
37.341489 3.930000 55.243750
|
||||||
|
37.191079 3.945000 55.454604
|
||||||
|
37.040380 3.960000 55.665458
|
||||||
|
36.889393 3.975000 55.876312
|
||||||
|
36.738114 3.990000 56.087166
|
||||||
|
36.586542 4.005000 56.298020
|
||||||
|
36.434675 4.020000 56.508874
|
||||||
|
36.282512 4.035000 56.719728
|
||||||
|
36.130051 4.050000 56.930582
|
||||||
|
35.977290 4.065000 57.141436
|
||||||
|
35.824227 4.080000 57.352290
|
||||||
|
35.670860 4.095000 57.563144
|
||||||
|
35.517187 4.110000 57.773998
|
||||||
|
35.363206 4.125000 57.984852
|
||||||
|
35.208916 4.140000 58.195706
|
||||||
|
35.054315 4.155000 58.406560
|
||||||
|
34.899400 4.170000 58.617414
|
||||||
|
34.744170 4.185000 58.828269
|
||||||
|
34.588622 4.200000 59.039123
|
||||||
|
34.432754 4.215000 59.249977
|
||||||
|
34.276565 4.230000 59.460831
|
||||||
|
34.120052 4.245000 59.671685
|
||||||
|
33.963213 4.260000 59.882539
|
||||||
|
33.806046 4.275000 60.093393
|
||||||
|
33.648549 4.290000 60.304247
|
||||||
|
33.490719 4.305000 60.515101
|
||||||
|
33.332555 4.320000 60.725955
|
||||||
|
33.174054 4.335000 60.936809
|
||||||
|
33.015214 4.350000 61.147663
|
||||||
|
32.856032 4.365000 61.358517
|
||||||
|
32.696507 4.380000 61.569371
|
||||||
|
32.536635 4.395000 61.780225
|
||||||
|
32.376414 4.410000 61.991079
|
||||||
|
32.215843 4.425000 62.201933
|
||||||
|
32.054917 4.440000 62.412787
|
||||||
|
31.893636 4.455000 62.623641
|
||||||
|
31.731996 4.470000 62.834495
|
||||||
|
31.569995 4.485000 63.045349
|
||||||
|
31.407630 4.500000 63.256203
|
||||||
|
31.244899 4.515000 63.467057
|
||||||
|
31.081798 4.530000 63.677911
|
||||||
|
30.918326 4.545000 63.888765
|
||||||
|
30.754479 4.560000 64.099619
|
||||||
|
30.590255 4.575000 64.310473
|
||||||
|
30.425650 4.590000 64.521327
|
||||||
|
30.260662 4.605000 64.732181
|
||||||
|
30.095289 4.620000 64.943035
|
||||||
|
29.929526 4.635000 65.153889
|
||||||
|
29.763371 4.650000 65.364743
|
||||||
|
29.596821 4.665000 65.575597
|
||||||
|
29.429873 4.680000 65.786451
|
||||||
|
29.262523 4.695000 65.997305
|
||||||
|
29.094769 4.710000 66.208159
|
||||||
|
28.926607 4.725000 66.419013
|
||||||
|
28.758033 4.740000 66.629867
|
||||||
|
28.589046 4.755000 66.840721
|
||||||
|
28.419640 4.770000 67.051575
|
||||||
|
28.249813 4.785000 67.262429
|
||||||
|
28.079561 4.800000 67.473283
|
||||||
|
27.908880 4.815000 67.684137
|
||||||
|
27.737767 4.830000 67.894991
|
||||||
|
27.566218 4.845000 68.105845
|
||||||
|
27.394230 4.860000 68.316699
|
||||||
|
27.221798 4.875000 68.527553
|
||||||
|
27.048918 4.890000 68.738407
|
||||||
|
26.875587 4.905000 68.949261
|
||||||
|
26.701801 4.920000 69.160115
|
||||||
|
26.527555 4.935000 69.370969
|
||||||
|
26.352844 4.950000 69.581823
|
||||||
|
26.177666 4.965000 69.792677
|
||||||
|
26.002015 4.980000 70.003531
|
||||||
|
25.825887 4.995000 70.214385
|
||||||
|
25.649277 5.010000 70.425239
|
||||||
|
25.472181 5.025000 70.636093
|
||||||
|
25.294594 5.040000 70.846947
|
||||||
|
25.116511 5.055000 71.057801
|
||||||
|
24.937927 5.070000 71.268655
|
||||||
|
24.758837 5.085000 71.479509
|
||||||
|
24.579236 5.100000 71.690363
|
||||||
|
24.399118 5.115000 71.901217
|
||||||
|
24.218479 5.130000 72.112071
|
||||||
|
24.037312 5.145000 72.322925
|
||||||
|
23.855612 5.160000 72.533779
|
||||||
|
23.673374 5.175000 72.744633
|
||||||
|
23.490591 5.190000 72.955487
|
||||||
|
23.307257 5.205000 73.166341
|
||||||
|
23.123366 5.220000 73.377195
|
||||||
|
22.938911 5.235000 73.588049
|
||||||
|
22.753887 5.250000 73.798903
|
||||||
|
22.568286 5.265000 74.009757
|
||||||
|
22.382101 5.280000 74.220611
|
||||||
|
22.195326 5.295000 74.431465
|
||||||
|
22.007953 5.310000 74.642319
|
||||||
|
21.819974 5.325000 74.853173
|
||||||
|
21.631383 5.340000 75.064027
|
||||||
|
21.442171 5.355000 75.274881
|
||||||
|
21.252366 5.370000 75.485735
|
||||||
|
21.062008 5.385000 75.696589
|
||||||
|
20.871094 5.400000 75.907443
|
||||||
|
20.679620 5.415000 76.118297
|
||||||
|
20.487580 5.430000 76.329151
|
||||||
|
20.294971 5.445000 76.540005
|
||||||
|
20.101788 5.460000 76.750859
|
||||||
|
19.908025 5.475000 76.961713
|
||||||
|
19.713678 5.490000 77.172567
|
||||||
|
19.518742 5.505000 77.383421
|
||||||
|
19.323211 5.520000 77.594275
|
||||||
|
19.127081 5.535000 77.805129
|
||||||
|
18.930347 5.550000 78.015983
|
||||||
|
18.733002 5.565000 78.226837
|
||||||
|
18.535043 5.580000 78.437691
|
||||||
|
18.336463 5.595000 78.648545
|
||||||
|
18.137257 5.610000 78.859399
|
||||||
|
17.937419 5.625000 79.070253
|
||||||
|
17.736943 5.640000 79.281107
|
||||||
|
17.535825 5.655000 79.491961
|
||||||
|
17.334058 5.670000 79.702815
|
||||||
|
17.131635 5.685000 79.913669
|
||||||
|
16.928552 5.700000 80.124523
|
||||||
|
16.724802 5.715000 80.335377
|
||||||
|
16.520379 5.730000 80.546231
|
||||||
|
16.315276 5.745000 80.757085
|
||||||
|
16.109488 5.760000 80.967939
|
||||||
|
15.903007 5.775000 81.178793
|
||||||
|
15.695828 5.790000 81.389647
|
||||||
|
15.487943 5.805000 81.600501
|
||||||
|
15.279346 5.820000 81.811355
|
||||||
|
15.070030 5.835000 82.022209
|
||||||
|
14.859989 5.850000 82.233064
|
||||||
|
14.649214 5.865000 82.443918
|
||||||
|
14.437700 5.880000 82.654772
|
||||||
|
14.225439 5.895000 82.865626
|
||||||
|
14.012424 5.910000 83.076480
|
||||||
|
13.798647 5.925000 83.287334
|
||||||
|
13.584102 5.940000 83.498188
|
||||||
|
13.368782 5.955000 83.709042
|
||||||
|
13.152678 5.970000 83.919896
|
||||||
|
12.935784 5.985000 84.130750
|
||||||
|
12.718093 6.000000 84.341604
|
||||||
|
12.499598 6.015000 84.552458
|
||||||
|
12.280291 6.030000 84.763312
|
||||||
|
12.060173 6.045000 84.974166
|
||||||
|
11.839358 6.060000 85.185020
|
||||||
|
11.617896 6.075000 85.395874
|
||||||
|
11.395794 6.090000 85.606728
|
||||||
|
11.173059 6.105000 85.817582
|
||||||
|
10.949697 6.120000 86.028436
|
||||||
|
10.725718 6.135000 86.239290
|
||||||
|
10.501133 6.150000 86.450144
|
||||||
|
10.275954 6.165000 86.660998
|
||||||
|
10.050198 6.180000 86.871852
|
||||||
|
9.823881 6.195000 87.082706
|
||||||
|
9.597025 6.210000 87.293560
|
||||||
|
9.369653 6.225000 87.504414
|
||||||
|
9.141794 6.240000 87.715268
|
||||||
|
8.913480 6.255000 87.926122
|
||||||
|
8.684749 6.270000 88.136976
|
||||||
|
8.455644 6.285000 88.347830
|
||||||
|
8.226217 6.300000 88.558684
|
||||||
|
7.996524 6.315000 88.769538
|
||||||
|
7.766634 6.330000 88.980392
|
||||||
|
7.536623 6.345000 89.191246
|
||||||
|
7.306580 6.360000 89.402100
|
||||||
|
7.076608 6.375000 89.612954
|
||||||
|
6.846448 6.390000 89.823808
|
||||||
|
6.615659 6.405000 90.034662
|
||||||
|
6.384289 6.420000 90.245516
|
||||||
|
6.152420 6.435000 90.456370
|
||||||
|
6.105994 6.438000 90.498541
|
||||||
|
6.059553 6.441000 90.540711
|
||||||
|
6.013098 6.444000 90.582882
|
||||||
|
5.966629 6.447000 90.625053
|
||||||
|
5.920148 6.450000 90.667224
|
||||||
|
5.873656 6.453000 90.709395
|
||||||
|
5.827153 6.456000 90.751565
|
||||||
|
5.780642 6.459000 90.793736
|
||||||
|
5.734122 6.462000 90.835907
|
||||||
|
5.687596 6.465000 90.878078
|
||||||
|
5.641064 6.468000 90.920249
|
||||||
|
5.594528 6.471000 90.962419
|
||||||
|
5.547989 6.474000 91.004590
|
||||||
|
5.501448 6.477000 91.046761
|
||||||
|
5.454908 6.480000 91.088932
|
||||||
|
5.408369 6.483000 91.131103
|
||||||
|
5.361833 6.486000 91.173273
|
||||||
|
5.315301 6.489000 91.215444
|
||||||
|
5.268776 6.492000 91.257615
|
||||||
|
5.222260 6.495000 91.299786
|
||||||
|
5.175752 6.498000 91.341957
|
||||||
|
5.129257 6.501000 91.384127
|
||||||
|
5.082775 6.504000 91.426298
|
||||||
|
5.036309 6.507000 91.468469
|
||||||
|
4.989861 6.510000 91.510640
|
||||||
|
4.943432 6.513000 91.552811
|
||||||
|
4.897025 6.516000 91.594982
|
||||||
|
4.850643 6.519000 91.637152
|
||||||
|
4.804287 6.522000 91.679323
|
||||||
|
4.757959 6.525000 91.721494
|
||||||
|
4.711664 6.528000 91.763665
|
||||||
|
4.665402 6.531000 91.805836
|
||||||
|
4.619177 6.534000 91.848006
|
||||||
|
4.572991 6.537000 91.890177
|
||||||
|
4.526847 6.540000 91.932348
|
||||||
|
4.480748 6.543000 91.974519
|
||||||
|
4.434698 6.546000 92.016690
|
||||||
|
4.388698 6.549000 92.058860
|
||||||
|
4.342752 6.552000 92.101031
|
||||||
|
4.296864 6.555000 92.143202
|
||||||
|
4.251036 6.558000 92.185373
|
||||||
|
4.205272 6.561000 92.227544
|
||||||
|
4.159576 6.564000 92.269714
|
||||||
|
4.113951 6.567000 92.311885
|
||||||
|
4.068401 6.570000 92.354056
|
||||||
|
4.022929 6.573000 92.396227
|
||||||
|
3.977540 6.576000 92.438398
|
||||||
|
3.932236 6.579000 92.480568
|
||||||
|
3.887024 6.582000 92.522739
|
||||||
|
3.841905 6.585000 92.564910
|
||||||
|
3.796886 6.588000 92.607081
|
||||||
|
3.751969 6.591000 92.649252
|
||||||
|
3.707159 6.594000 92.691422
|
||||||
|
3.662462 6.597000 92.733593
|
||||||
|
3.617880 6.600000 92.775764
|
||||||
|
3.573420 6.603000 92.817935
|
||||||
|
3.529085 6.606000 92.860106
|
||||||
|
3.484881 6.609000 92.902276
|
||||||
|
3.440813 6.612000 92.944447
|
||||||
|
3.396884 6.615000 92.986618
|
||||||
|
3.353101 6.618000 93.028789
|
||||||
|
3.309469 6.621000 93.070960
|
||||||
|
3.265992 6.624000 93.113130
|
||||||
|
3.222676 6.627000 93.155301
|
||||||
|
3.179526 6.630000 93.197472
|
||||||
|
3.136547 6.633000 93.239643
|
||||||
|
3.093745 6.636000 93.281814
|
||||||
|
3.051126 6.639000 93.323984
|
||||||
|
3.008694 6.642000 93.366155
|
||||||
|
2.966455 6.645000 93.408326
|
||||||
|
2.924415 6.648000 93.450497
|
||||||
|
2.882580 6.651000 93.492668
|
||||||
|
2.840954 6.654000 93.534838
|
||||||
|
2.799543 6.657000 93.577009
|
||||||
|
2.758354 6.660000 93.619180
|
||||||
|
2.717391 6.663000 93.661351
|
||||||
|
2.676660 6.666000 93.703522
|
||||||
|
2.636167 6.669000 93.745692
|
||||||
|
2.595916 6.672000 93.787863
|
||||||
|
2.555914 6.675000 93.830034
|
||||||
|
2.516166 6.678000 93.872205
|
||||||
|
2.476678 6.681000 93.914376
|
||||||
|
2.437454 6.684000 93.956546
|
||||||
|
2.398499 6.687000 93.998717
|
||||||
|
2.359820 6.690000 94.040888
|
||||||
|
2.321421 6.693000 94.083059
|
||||||
|
2.283307 6.696000 94.125230
|
||||||
|
2.245483 6.699000 94.167400
|
||||||
|
2.207954 6.702000 94.209571
|
||||||
|
2.170724 6.705000 94.251742
|
||||||
|
2.133798 6.708000 94.293913
|
||||||
|
2.097180 6.711000 94.336084
|
||||||
|
2.060875 6.714000 94.378254
|
||||||
|
2.024886 6.717000 94.420425
|
||||||
|
1.989218 6.720000 94.462596
|
||||||
|
1.953875 6.723000 94.504767
|
||||||
|
1.918860 6.726000 94.546938
|
||||||
|
1.884177 6.729000 94.589108
|
||||||
|
1.849828 6.732000 94.631279
|
||||||
|
1.815818 6.735000 94.673450
|
||||||
|
1.782148 6.738000 94.715621
|
||||||
|
1.748823 6.741000 94.757792
|
||||||
|
1.715844 6.744000 94.799962
|
||||||
|
1.683213 6.747000 94.842133
|
||||||
|
1.650934 6.750000 94.884304
|
||||||
|
1.619007 6.753000 94.926475
|
||||||
|
1.587436 6.756000 94.968646
|
||||||
|
1.556220 6.759000 95.010816
|
||||||
|
1.525362 6.762000 95.052987
|
||||||
|
1.494863 6.765000 95.095158
|
||||||
|
1.464724 6.768000 95.137329
|
||||||
|
1.434946 6.771000 95.179500
|
||||||
|
1.405528 6.774000 95.221670
|
||||||
|
1.376473 6.777000 95.263841
|
||||||
|
1.347779 6.780000 95.306012
|
||||||
|
1.319447 6.783000 95.348183
|
||||||
|
1.291476 6.786000 95.390354
|
||||||
|
1.263867 6.789000 95.432524
|
||||||
|
1.236618 6.792000 95.474695
|
||||||
|
1.209730 6.795000 95.516866
|
||||||
|
1.183200 6.798000 95.559037
|
||||||
|
1.157029 6.801000 95.601208
|
||||||
|
1.131214 6.804000 95.643378
|
||||||
|
1.105754 6.807000 95.685549
|
||||||
|
1.080649 6.810000 95.727720
|
||||||
|
1.055895 6.813000 95.769891
|
||||||
|
1.031491 6.816000 95.812062
|
||||||
|
1.007436 6.819000 95.854232
|
||||||
|
0.983727 6.822000 95.896403
|
||||||
|
0.960362 6.825000 95.938574
|
||||||
|
0.937338 6.828000 95.980745
|
||||||
|
0.914654 6.831000 96.022916
|
||||||
|
0.892305 6.834000 96.065086
|
||||||
|
0.870291 6.837000 96.107257
|
||||||
|
0.848607 6.840000 96.149428
|
||||||
|
0.827252 6.843000 96.191599
|
||||||
|
0.806222 6.846000 96.233770
|
||||||
|
0.785514 6.849000 96.275941
|
||||||
|
0.765125 6.852000 96.318111
|
||||||
|
0.745052 6.855000 96.360282
|
||||||
|
0.725291 6.858000 96.402453
|
||||||
|
0.705840 6.861000 96.444624
|
||||||
|
0.686694 6.864000 96.486795
|
||||||
|
0.667852 6.867000 96.528965
|
||||||
|
0.649308 6.870000 96.571136
|
||||||
|
0.631060 6.873000 96.613307
|
||||||
|
0.613104 6.876000 96.655478
|
||||||
|
0.595437 6.879000 96.697649
|
||||||
|
0.578054 6.882000 96.739819
|
||||||
|
0.560953 6.885000 96.781990
|
||||||
|
0.544130 6.888000 96.824161
|
||||||
|
0.527582 6.891000 96.866332
|
||||||
|
0.511303 6.894000 96.908503
|
||||||
|
0.495292 6.897000 96.950673
|
||||||
|
0.479544 6.900000 96.992844
|
||||||
|
0.464056 6.903000 97.035015
|
||||||
|
0.448824 6.906000 97.077186
|
||||||
|
0.433844 6.909000 97.119357
|
||||||
|
0.419112 6.912000 97.161527
|
||||||
|
0.404606 6.915000 97.203698
|
||||||
|
0.390325 6.918000 97.245869
|
||||||
|
0.376267 6.921000 97.288040
|
||||||
|
0.362432 6.924000 97.330211
|
||||||
|
0.348819 6.927000 97.372381
|
||||||
|
0.335428 6.930000 97.414552
|
||||||
|
0.322257 6.933000 97.456723
|
||||||
|
0.309306 6.936000 97.498894
|
||||||
|
0.296574 6.939000 97.541065
|
||||||
|
0.284060 6.942000 97.583235
|
||||||
|
0.271763 6.945000 97.625406
|
||||||
|
0.259682 6.948000 97.667577
|
||||||
|
0.247815 6.951000 97.709748
|
||||||
|
0.236154 6.954000 97.751919
|
||||||
|
0.224700 6.957000 97.794089
|
||||||
|
0.213454 6.960000 97.836260
|
||||||
|
0.202415 6.963000 97.878431
|
||||||
|
0.191581 6.966000 97.920602
|
||||||
|
0.180952 6.969000 97.962773
|
||||||
|
0.170526 6.972000 98.004943
|
||||||
|
0.160301 6.975000 98.047114
|
||||||
|
0.150277 6.978000 98.089285
|
||||||
|
0.140450 6.981000 98.131456
|
||||||
|
0.130818 6.984000 98.173627
|
||||||
|
0.121378 6.987000 98.215797
|
||||||
|
0.112129 6.990000 98.257968
|
||||||
|
0.103064 6.993000 98.300139
|
||||||
|
0.094181 6.996000 98.342310
|
||||||
|
0.085472 6.999000 98.384481
|
||||||
|
0.076932 7.002000 98.426651
|
||||||
|
0.068553 7.005000 98.468822
|
||||||
|
0.060321 7.008000 98.510993
|
||||||
|
0.052224 7.011000 98.553164
|
||||||
|
0.044242 7.014000 98.595335
|
||||||
|
0.036348 7.017000 98.637505
|
||||||
|
0.028501 7.020000 98.679676
|
||||||
|
0.020640 7.023000 98.721847
|
||||||
|
0.012666 7.026000 98.764018
|
||||||
|
0.004433 7.029000 98.806189
|
||||||
|
0.001641 7.030000 98.820246
|
||||||
596
eloss_calculations/fluorine_lookup_70MeV_250torr_4pc.dat
Normal file
596
eloss_calculations/fluorine_lookup_70MeV_250torr_4pc.dat
Normal file
|
|
@ -0,0 +1,596 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 70 MeV
|
||||||
|
70.000000 0.000000 0.000000
|
||||||
|
69.884656 0.016000 0.208857
|
||||||
|
69.769194 0.032000 0.417714
|
||||||
|
69.653613 0.048000 0.626571
|
||||||
|
69.537914 0.064000 0.835428
|
||||||
|
69.422095 0.080000 1.044285
|
||||||
|
69.306157 0.096000 1.253142
|
||||||
|
69.190099 0.112000 1.461999
|
||||||
|
69.073921 0.128000 1.670856
|
||||||
|
68.957622 0.144000 1.879713
|
||||||
|
68.841201 0.160000 2.088570
|
||||||
|
68.724660 0.176000 2.297427
|
||||||
|
68.607996 0.192000 2.506284
|
||||||
|
68.491211 0.208000 2.715141
|
||||||
|
68.374302 0.224000 2.923998
|
||||||
|
68.257271 0.240000 3.132855
|
||||||
|
68.140116 0.256000 3.341712
|
||||||
|
68.022838 0.272000 3.550569
|
||||||
|
67.905435 0.288000 3.759426
|
||||||
|
67.787907 0.304000 3.968283
|
||||||
|
67.670255 0.320000 4.177140
|
||||||
|
67.552477 0.336000 4.385997
|
||||||
|
67.434574 0.352000 4.594854
|
||||||
|
67.316544 0.368000 4.803711
|
||||||
|
67.198388 0.384000 5.012568
|
||||||
|
67.080105 0.400000 5.221425
|
||||||
|
66.961694 0.416000 5.430282
|
||||||
|
66.843155 0.432000 5.639139
|
||||||
|
66.724489 0.448000 5.847996
|
||||||
|
66.605693 0.464000 6.056853
|
||||||
|
66.486769 0.480000 6.265710
|
||||||
|
66.367714 0.496000 6.474567
|
||||||
|
66.248530 0.512000 6.683424
|
||||||
|
66.129216 0.528000 6.892281
|
||||||
|
66.009770 0.544000 7.101138
|
||||||
|
65.890194 0.560000 7.309995
|
||||||
|
65.770486 0.576000 7.518852
|
||||||
|
65.650645 0.592000 7.727709
|
||||||
|
65.530672 0.608000 7.936566
|
||||||
|
65.410566 0.624000 8.145423
|
||||||
|
65.290327 0.640000 8.354280
|
||||||
|
65.169954 0.656000 8.563137
|
||||||
|
65.049446 0.672000 8.771994
|
||||||
|
64.928804 0.688000 8.980851
|
||||||
|
64.808026 0.704000 9.189708
|
||||||
|
64.687112 0.720000 9.398565
|
||||||
|
64.566063 0.736000 9.607422
|
||||||
|
64.444876 0.752000 9.816279
|
||||||
|
64.323553 0.768000 10.025136
|
||||||
|
64.202092 0.784000 10.233993
|
||||||
|
64.080493 0.800000 10.442850
|
||||||
|
63.958755 0.816000 10.651707
|
||||||
|
63.836879 0.832000 10.860564
|
||||||
|
63.714863 0.848000 11.069421
|
||||||
|
63.592707 0.864000 11.278278
|
||||||
|
63.470410 0.880000 11.487135
|
||||||
|
63.347972 0.896000 11.695992
|
||||||
|
63.225394 0.912000 11.904849
|
||||||
|
63.102673 0.928000 12.113706
|
||||||
|
62.979809 0.944000 12.322563
|
||||||
|
62.856803 0.960000 12.531420
|
||||||
|
62.733654 0.976000 12.740277
|
||||||
|
62.610360 0.992000 12.949134
|
||||||
|
62.486922 1.008000 13.157991
|
||||||
|
62.363339 1.024000 13.366848
|
||||||
|
62.239610 1.040000 13.575705
|
||||||
|
62.115736 1.056000 13.784562
|
||||||
|
61.991715 1.072000 13.993419
|
||||||
|
61.867547 1.088000 14.202276
|
||||||
|
61.743231 1.104000 14.411133
|
||||||
|
61.618768 1.120000 14.619990
|
||||||
|
61.494155 1.136000 14.828847
|
||||||
|
61.369394 1.152000 15.037704
|
||||||
|
61.244482 1.168000 15.246561
|
||||||
|
61.119421 1.184000 15.455418
|
||||||
|
60.994209 1.200000 15.664275
|
||||||
|
60.868845 1.216000 15.873132
|
||||||
|
60.743330 1.232000 16.081989
|
||||||
|
60.617662 1.248000 16.290846
|
||||||
|
60.491841 1.264000 16.499703
|
||||||
|
60.365866 1.280000 16.708560
|
||||||
|
60.239737 1.296000 16.917417
|
||||||
|
60.113454 1.312000 17.126274
|
||||||
|
59.987015 1.328000 17.335131
|
||||||
|
59.860420 1.344000 17.543988
|
||||||
|
59.733669 1.360000 17.752845
|
||||||
|
59.606761 1.376000 17.961702
|
||||||
|
59.479695 1.392000 18.170559
|
||||||
|
59.352471 1.408000 18.379416
|
||||||
|
59.225088 1.424000 18.588273
|
||||||
|
59.097546 1.440000 18.797130
|
||||||
|
58.969844 1.456000 19.005987
|
||||||
|
58.841981 1.472000 19.214844
|
||||||
|
58.713957 1.488000 19.423701
|
||||||
|
58.585771 1.504000 19.632558
|
||||||
|
58.457422 1.520000 19.841415
|
||||||
|
58.328911 1.536000 20.050272
|
||||||
|
58.200236 1.552000 20.259129
|
||||||
|
58.071396 1.568000 20.467986
|
||||||
|
57.942391 1.584000 20.676843
|
||||||
|
57.813221 1.600000 20.885700
|
||||||
|
57.683884 1.616000 21.094557
|
||||||
|
57.554381 1.632000 21.303414
|
||||||
|
57.424710 1.648000 21.512271
|
||||||
|
57.294871 1.664000 21.721128
|
||||||
|
57.164862 1.680000 21.929985
|
||||||
|
57.034685 1.696000 22.138842
|
||||||
|
56.904337 1.712000 22.347699
|
||||||
|
56.773818 1.728000 22.556556
|
||||||
|
56.643127 1.744000 22.765413
|
||||||
|
56.512264 1.760000 22.974270
|
||||||
|
56.381229 1.776000 23.183127
|
||||||
|
56.250019 1.792000 23.391984
|
||||||
|
56.118636 1.808000 23.600841
|
||||||
|
55.987077 1.824000 23.809698
|
||||||
|
55.855343 1.840000 24.018555
|
||||||
|
55.723432 1.856000 24.227412
|
||||||
|
55.591343 1.872000 24.436269
|
||||||
|
55.459077 1.888000 24.645126
|
||||||
|
55.326633 1.904000 24.853983
|
||||||
|
55.194009 1.920000 25.062840
|
||||||
|
55.061205 1.936000 25.271697
|
||||||
|
54.928220 1.952000 25.480554
|
||||||
|
54.795053 1.968000 25.689411
|
||||||
|
54.661705 1.984000 25.898268
|
||||||
|
54.528173 2.000000 26.107125
|
||||||
|
54.394457 2.016000 26.315982
|
||||||
|
54.260557 2.032000 26.524839
|
||||||
|
54.126471 2.048000 26.733696
|
||||||
|
53.992199 2.064000 26.942553
|
||||||
|
53.857740 2.080000 27.151410
|
||||||
|
53.723094 2.096000 27.360267
|
||||||
|
53.588259 2.112000 27.569124
|
||||||
|
53.453234 2.128000 27.777981
|
||||||
|
53.318020 2.144000 27.986838
|
||||||
|
53.182614 2.160000 28.195695
|
||||||
|
53.047017 2.176000 28.404552
|
||||||
|
52.911227 2.192000 28.613409
|
||||||
|
52.775244 2.208000 28.822266
|
||||||
|
52.639067 2.224000 29.031123
|
||||||
|
52.502694 2.240000 29.239980
|
||||||
|
52.366125 2.256000 29.448837
|
||||||
|
52.229360 2.272000 29.657694
|
||||||
|
52.092397 2.288000 29.866551
|
||||||
|
51.955236 2.304000 30.075408
|
||||||
|
51.817875 2.320000 30.284265
|
||||||
|
51.680314 2.336000 30.493122
|
||||||
|
51.542552 2.352000 30.701979
|
||||||
|
51.404587 2.368000 30.910836
|
||||||
|
51.266420 2.384000 31.119693
|
||||||
|
51.128049 2.400000 31.328550
|
||||||
|
50.989473 2.416000 31.537407
|
||||||
|
50.850692 2.432000 31.746264
|
||||||
|
50.711704 2.448000 31.955121
|
||||||
|
50.572508 2.464000 32.163978
|
||||||
|
50.433104 2.480000 32.372835
|
||||||
|
50.293490 2.496000 32.581692
|
||||||
|
50.153666 2.512000 32.790549
|
||||||
|
50.013631 2.528000 32.999406
|
||||||
|
49.873383 2.544000 33.208263
|
||||||
|
49.732922 2.560000 33.417120
|
||||||
|
49.592247 2.576000 33.625977
|
||||||
|
49.451357 2.592000 33.834834
|
||||||
|
49.310250 2.608000 34.043691
|
||||||
|
49.168926 2.624000 34.252548
|
||||||
|
49.027384 2.640000 34.461405
|
||||||
|
48.885622 2.656000 34.670262
|
||||||
|
48.743640 2.672000 34.879119
|
||||||
|
48.601437 2.688000 35.087976
|
||||||
|
48.459011 2.704000 35.296833
|
||||||
|
48.316362 2.720000 35.505690
|
||||||
|
48.173488 2.736000 35.714547
|
||||||
|
48.030389 2.752000 35.923404
|
||||||
|
47.887063 2.768000 36.132261
|
||||||
|
47.743509 2.784000 36.341118
|
||||||
|
47.599726 2.800000 36.549975
|
||||||
|
47.455713 2.816000 36.758832
|
||||||
|
47.311469 2.832000 36.967689
|
||||||
|
47.166992 2.848000 37.176546
|
||||||
|
47.022283 2.864000 37.385403
|
||||||
|
46.877338 2.880000 37.594260
|
||||||
|
46.732158 2.896000 37.803117
|
||||||
|
46.586741 2.912000 38.011974
|
||||||
|
46.441086 2.928000 38.220831
|
||||||
|
46.295192 2.944000 38.429688
|
||||||
|
46.149057 2.960000 38.638545
|
||||||
|
46.002681 2.976000 38.847402
|
||||||
|
45.856062 2.992000 39.056259
|
||||||
|
45.709199 3.008000 39.265116
|
||||||
|
45.562090 3.024000 39.473973
|
||||||
|
45.414735 3.040000 39.682830
|
||||||
|
45.267132 3.056000 39.891687
|
||||||
|
45.119280 3.072000 40.100544
|
||||||
|
44.971177 3.088000 40.309401
|
||||||
|
44.822823 3.104000 40.518258
|
||||||
|
44.674216 3.120000 40.727115
|
||||||
|
44.525354 3.136000 40.935972
|
||||||
|
44.376237 3.152000 41.144829
|
||||||
|
44.226863 3.168000 41.353686
|
||||||
|
44.077230 3.184000 41.562543
|
||||||
|
43.927338 3.200000 41.771400
|
||||||
|
43.777185 3.216000 41.980257
|
||||||
|
43.626769 3.232000 42.189114
|
||||||
|
43.476090 3.248000 42.397971
|
||||||
|
43.325145 3.264000 42.606828
|
||||||
|
43.173933 3.280000 42.815685
|
||||||
|
43.022453 3.296000 43.024542
|
||||||
|
42.870704 3.312000 43.233399
|
||||||
|
42.718684 3.328000 43.442256
|
||||||
|
42.566391 3.344000 43.651113
|
||||||
|
42.413823 3.360000 43.859970
|
||||||
|
42.260981 3.376000 44.068827
|
||||||
|
42.107861 3.392000 44.277684
|
||||||
|
41.954463 3.408000 44.486541
|
||||||
|
41.800784 3.424000 44.695398
|
||||||
|
41.646824 3.440000 44.904255
|
||||||
|
41.492580 3.456000 45.113112
|
||||||
|
41.338052 3.472000 45.321969
|
||||||
|
41.183236 3.488000 45.530826
|
||||||
|
41.028133 3.504000 45.739683
|
||||||
|
40.872740 3.520000 45.948540
|
||||||
|
40.717055 3.536000 46.157397
|
||||||
|
40.561077 3.552000 46.366254
|
||||||
|
40.404804 3.568000 46.575111
|
||||||
|
40.248235 3.584000 46.783968
|
||||||
|
40.091367 3.600000 46.992825
|
||||||
|
39.934199 3.616000 47.201682
|
||||||
|
39.776729 3.632000 47.410540
|
||||||
|
39.618956 3.648000 47.619397
|
||||||
|
39.460877 3.664000 47.828254
|
||||||
|
39.302490 3.680000 48.037111
|
||||||
|
39.143795 3.696000 48.245968
|
||||||
|
38.984789 3.712000 48.454825
|
||||||
|
38.825469 3.728000 48.663682
|
||||||
|
38.665835 3.744000 48.872539
|
||||||
|
38.505885 3.760000 49.081396
|
||||||
|
38.345615 3.776000 49.290253
|
||||||
|
38.185025 3.792000 49.499110
|
||||||
|
38.024112 3.808000 49.707967
|
||||||
|
37.862875 3.824000 49.916824
|
||||||
|
37.701311 3.840000 50.125681
|
||||||
|
37.539418 3.856000 50.334538
|
||||||
|
37.377195 3.872000 50.543395
|
||||||
|
37.214638 3.888000 50.752252
|
||||||
|
37.051747 3.904000 50.961109
|
||||||
|
36.888518 3.920000 51.169966
|
||||||
|
36.724950 3.936000 51.378823
|
||||||
|
36.561040 3.952000 51.587680
|
||||||
|
36.396787 3.968000 51.796537
|
||||||
|
36.232188 3.984000 52.005394
|
||||||
|
36.067240 4.000000 52.214251
|
||||||
|
35.901941 4.016000 52.423108
|
||||||
|
35.736290 4.032000 52.631965
|
||||||
|
35.570283 4.048000 52.840822
|
||||||
|
35.403919 4.064000 53.049679
|
||||||
|
35.237194 4.080000 53.258536
|
||||||
|
35.070107 4.096000 53.467393
|
||||||
|
34.902654 4.112000 53.676250
|
||||||
|
34.734834 4.128000 53.885107
|
||||||
|
34.566644 4.144000 54.093964
|
||||||
|
34.398081 4.160000 54.302821
|
||||||
|
34.229143 4.176000 54.511678
|
||||||
|
34.059827 4.192000 54.720535
|
||||||
|
33.890130 4.208000 54.929392
|
||||||
|
33.720050 4.224000 55.138249
|
||||||
|
33.549583 4.240000 55.347106
|
||||||
|
33.378728 4.256000 55.555963
|
||||||
|
33.207481 4.272000 55.764820
|
||||||
|
33.035839 4.288000 55.973677
|
||||||
|
32.863800 4.304000 56.182534
|
||||||
|
32.691360 4.320000 56.391391
|
||||||
|
32.518517 4.336000 56.600248
|
||||||
|
32.345267 4.352000 56.809105
|
||||||
|
32.171608 4.368000 57.017962
|
||||||
|
31.997536 4.384000 57.226819
|
||||||
|
31.823048 4.400000 57.435676
|
||||||
|
31.648142 4.416000 57.644533
|
||||||
|
31.472813 4.432000 57.853390
|
||||||
|
31.297058 4.448000 58.062247
|
||||||
|
31.120874 4.464000 58.271104
|
||||||
|
30.944258 4.480000 58.479961
|
||||||
|
30.767207 4.496000 58.688818
|
||||||
|
30.589716 4.512000 58.897675
|
||||||
|
30.411782 4.528000 59.106532
|
||||||
|
30.233401 4.544000 59.315389
|
||||||
|
30.054571 4.560000 59.524246
|
||||||
|
29.875286 4.576000 59.733103
|
||||||
|
29.695544 4.592000 59.941960
|
||||||
|
29.515340 4.608000 60.150817
|
||||||
|
29.334671 4.624000 60.359674
|
||||||
|
29.153532 4.640000 60.568531
|
||||||
|
28.971920 4.656000 60.777388
|
||||||
|
28.789830 4.672000 60.986245
|
||||||
|
28.607258 4.688000 61.195102
|
||||||
|
28.424200 4.704000 61.403959
|
||||||
|
28.240652 4.720000 61.612816
|
||||||
|
28.056608 4.736000 61.821673
|
||||||
|
27.872066 4.752000 62.030530
|
||||||
|
27.687019 4.768000 62.239387
|
||||||
|
27.501463 4.784000 62.448244
|
||||||
|
27.315394 4.800000 62.657101
|
||||||
|
27.128806 4.816000 62.865958
|
||||||
|
26.941695 4.832000 63.074815
|
||||||
|
26.754056 4.848000 63.283672
|
||||||
|
26.565883 4.864000 63.492529
|
||||||
|
26.377171 4.880000 63.701386
|
||||||
|
26.187915 4.896000 63.910243
|
||||||
|
25.998109 4.912000 64.119100
|
||||||
|
25.807748 4.928000 64.327957
|
||||||
|
25.616826 4.944000 64.536814
|
||||||
|
25.425337 4.960000 64.745671
|
||||||
|
25.233275 4.976000 64.954528
|
||||||
|
25.040634 4.992000 65.163385
|
||||||
|
24.847408 5.008000 65.372242
|
||||||
|
24.653590 5.024000 65.581099
|
||||||
|
24.459174 5.040000 65.789956
|
||||||
|
24.264153 5.056000 65.998813
|
||||||
|
24.068520 5.072000 66.207670
|
||||||
|
23.872269 5.088000 66.416527
|
||||||
|
23.675391 5.104000 66.625384
|
||||||
|
23.477879 5.120000 66.834241
|
||||||
|
23.279727 5.136000 67.043098
|
||||||
|
23.080925 5.152000 67.251955
|
||||||
|
22.881467 5.168000 67.460812
|
||||||
|
22.681343 5.184000 67.669669
|
||||||
|
22.480546 5.200000 67.878526
|
||||||
|
22.279066 5.216000 68.087383
|
||||||
|
22.076895 5.232000 68.296240
|
||||||
|
21.874023 5.248000 68.505097
|
||||||
|
21.670441 5.264000 68.713954
|
||||||
|
21.466139 5.280000 68.922811
|
||||||
|
21.261139 5.296000 69.131668
|
||||||
|
21.055495 5.312000 69.340525
|
||||||
|
20.849204 5.328000 69.549382
|
||||||
|
20.642262 5.344000 69.758239
|
||||||
|
20.434662 5.360000 69.967096
|
||||||
|
20.226398 5.376000 70.175953
|
||||||
|
20.017465 5.392000 70.384810
|
||||||
|
19.807856 5.408000 70.593667
|
||||||
|
19.597566 5.424000 70.802524
|
||||||
|
19.386588 5.440000 71.011381
|
||||||
|
19.174915 5.456000 71.220238
|
||||||
|
18.962541 5.472000 71.429095
|
||||||
|
18.749461 5.488000 71.637952
|
||||||
|
18.535666 5.504000 71.846809
|
||||||
|
18.321151 5.520000 72.055666
|
||||||
|
18.105908 5.536000 72.264523
|
||||||
|
17.889930 5.552000 72.473380
|
||||||
|
17.673211 5.568000 72.682237
|
||||||
|
17.455743 5.584000 72.891094
|
||||||
|
17.237520 5.600000 73.099951
|
||||||
|
17.018532 5.616000 73.308808
|
||||||
|
16.798774 5.632000 73.517665
|
||||||
|
16.578237 5.648000 73.726522
|
||||||
|
16.356914 5.664000 73.935379
|
||||||
|
16.134797 5.680000 74.144236
|
||||||
|
15.911877 5.696000 74.353093
|
||||||
|
15.688147 5.712000 74.561950
|
||||||
|
15.463599 5.728000 74.770807
|
||||||
|
15.238223 5.744000 74.979664
|
||||||
|
15.012013 5.760000 75.188521
|
||||||
|
14.784958 5.776000 75.397378
|
||||||
|
14.557051 5.792000 75.606235
|
||||||
|
14.328283 5.808000 75.815092
|
||||||
|
14.098644 5.824000 76.023949
|
||||||
|
13.868127 5.840000 76.232806
|
||||||
|
13.636721 5.856000 76.441663
|
||||||
|
13.404419 5.872000 76.650520
|
||||||
|
13.171211 5.888000 76.859377
|
||||||
|
12.937089 5.904000 77.068234
|
||||||
|
12.702043 5.920000 77.277091
|
||||||
|
12.466064 5.936000 77.485948
|
||||||
|
12.229146 5.952000 77.694805
|
||||||
|
11.991308 5.968000 77.903662
|
||||||
|
11.752694 5.984000 78.112519
|
||||||
|
11.513336 6.000000 78.321376
|
||||||
|
11.273241 6.016000 78.530233
|
||||||
|
11.032419 6.032000 78.739090
|
||||||
|
10.790881 6.048000 78.947947
|
||||||
|
10.548639 6.064000 79.156804
|
||||||
|
10.305710 6.080000 79.365661
|
||||||
|
10.062112 6.096000 79.574518
|
||||||
|
9.817867 6.112000 79.783375
|
||||||
|
9.573002 6.128000 79.992232
|
||||||
|
9.327547 6.144000 80.201089
|
||||||
|
9.081540 6.160000 80.409946
|
||||||
|
8.835022 6.176000 80.618803
|
||||||
|
8.588042 6.192000 80.827660
|
||||||
|
8.340660 6.208000 81.036517
|
||||||
|
8.092944 6.224000 81.245374
|
||||||
|
7.844971 6.240000 81.454231
|
||||||
|
7.596834 6.256000 81.663088
|
||||||
|
7.348641 6.272000 81.871945
|
||||||
|
7.100515 6.288000 82.080802
|
||||||
|
6.852255 6.304000 82.289659
|
||||||
|
6.603290 6.320000 82.498516
|
||||||
|
6.353665 6.336000 82.707373
|
||||||
|
6.103484 6.352000 82.916230
|
||||||
|
6.056523 6.355000 82.955391
|
||||||
|
6.009547 6.358000 82.994551
|
||||||
|
5.962559 6.361000 83.033712
|
||||||
|
5.915558 6.364000 83.072873
|
||||||
|
5.868547 6.367000 83.112033
|
||||||
|
5.821525 6.370000 83.151194
|
||||||
|
5.774495 6.373000 83.190355
|
||||||
|
5.727457 6.376000 83.229515
|
||||||
|
5.680412 6.379000 83.268676
|
||||||
|
5.633363 6.382000 83.307837
|
||||||
|
5.586310 6.385000 83.346997
|
||||||
|
5.539254 6.388000 83.386158
|
||||||
|
5.492198 6.391000 83.425319
|
||||||
|
5.445143 6.394000 83.464480
|
||||||
|
5.398089 6.397000 83.503640
|
||||||
|
5.351040 6.400000 83.542801
|
||||||
|
5.303996 6.403000 83.581962
|
||||||
|
5.256959 6.406000 83.621122
|
||||||
|
5.209932 6.409000 83.660283
|
||||||
|
5.162915 6.412000 83.699444
|
||||||
|
5.115911 6.415000 83.738604
|
||||||
|
5.068922 6.418000 83.777765
|
||||||
|
5.021950 6.421000 83.816926
|
||||||
|
4.974997 6.424000 83.856086
|
||||||
|
4.928065 6.427000 83.895247
|
||||||
|
4.881157 6.430000 83.934408
|
||||||
|
4.834275 6.433000 83.973568
|
||||||
|
4.787421 6.436000 84.012729
|
||||||
|
4.740597 6.439000 84.051890
|
||||||
|
4.693808 6.442000 84.091051
|
||||||
|
4.647054 6.445000 84.130211
|
||||||
|
4.600339 6.448000 84.169372
|
||||||
|
4.553665 6.451000 84.208533
|
||||||
|
4.507036 6.454000 84.247693
|
||||||
|
4.460455 6.457000 84.286854
|
||||||
|
4.413924 6.460000 84.326015
|
||||||
|
4.367447 6.463000 84.365175
|
||||||
|
4.321028 6.466000 84.404336
|
||||||
|
4.274668 6.469000 84.443497
|
||||||
|
4.228373 6.472000 84.482657
|
||||||
|
4.182144 6.475000 84.521818
|
||||||
|
4.135987 6.478000 84.560979
|
||||||
|
4.089905 6.481000 84.600139
|
||||||
|
4.043901 6.484000 84.639300
|
||||||
|
3.997980 6.487000 84.678461
|
||||||
|
3.952146 6.490000 84.717622
|
||||||
|
3.906402 6.493000 84.756782
|
||||||
|
3.860752 6.496000 84.795943
|
||||||
|
3.815202 6.499000 84.835104
|
||||||
|
3.769756 6.502000 84.874264
|
||||||
|
3.724417 6.505000 84.913425
|
||||||
|
3.679191 6.508000 84.952586
|
||||||
|
3.634082 6.511000 84.991746
|
||||||
|
3.589095 6.514000 85.030907
|
||||||
|
3.544235 6.517000 85.070068
|
||||||
|
3.499507 6.520000 85.109228
|
||||||
|
3.454915 6.523000 85.148389
|
||||||
|
3.410465 6.526000 85.187550
|
||||||
|
3.366162 6.529000 85.226710
|
||||||
|
3.322011 6.532000 85.265871
|
||||||
|
3.278017 6.535000 85.305032
|
||||||
|
3.234187 6.538000 85.344193
|
||||||
|
3.190524 6.541000 85.383353
|
||||||
|
3.147035 6.544000 85.422514
|
||||||
|
3.103725 6.547000 85.461675
|
||||||
|
3.060600 6.550000 85.500835
|
||||||
|
3.017666 6.553000 85.539996
|
||||||
|
2.974927 6.556000 85.579157
|
||||||
|
2.932390 6.559000 85.618317
|
||||||
|
2.890061 6.562000 85.657478
|
||||||
|
2.847945 6.565000 85.696639
|
||||||
|
2.806047 6.568000 85.735799
|
||||||
|
2.764375 6.571000 85.774960
|
||||||
|
2.722932 6.574000 85.814121
|
||||||
|
2.681725 6.577000 85.853281
|
||||||
|
2.640761 6.580000 85.892442
|
||||||
|
2.600043 6.583000 85.931603
|
||||||
|
2.559579 6.586000 85.970764
|
||||||
|
2.519373 6.589000 86.009924
|
||||||
|
2.479432 6.592000 86.049085
|
||||||
|
2.439760 6.595000 86.088246
|
||||||
|
2.400363 6.598000 86.127406
|
||||||
|
2.361246 6.601000 86.166567
|
||||||
|
2.322415 6.604000 86.205728
|
||||||
|
2.283875 6.607000 86.244888
|
||||||
|
2.245630 6.610000 86.284049
|
||||||
|
2.207687 6.613000 86.323210
|
||||||
|
2.170048 6.616000 86.362370
|
||||||
|
2.132720 6.619000 86.401531
|
||||||
|
2.095707 6.622000 86.440692
|
||||||
|
2.059013 6.625000 86.479852
|
||||||
|
2.022642 6.628000 86.519013
|
||||||
|
1.986599 6.631000 86.558174
|
||||||
|
1.950887 6.634000 86.597335
|
||||||
|
1.915510 6.637000 86.636495
|
||||||
|
1.880473 6.640000 86.675656
|
||||||
|
1.845777 6.643000 86.714817
|
||||||
|
1.811427 6.646000 86.753977
|
||||||
|
1.777425 6.649000 86.793138
|
||||||
|
1.743775 6.652000 86.832299
|
||||||
|
1.710478 6.655000 86.871459
|
||||||
|
1.677538 6.658000 86.910620
|
||||||
|
1.644956 6.661000 86.949781
|
||||||
|
1.612736 6.664000 86.988941
|
||||||
|
1.580877 6.667000 87.028102
|
||||||
|
1.549383 6.670000 87.067263
|
||||||
|
1.518254 6.673000 87.106423
|
||||||
|
1.487492 6.676000 87.145584
|
||||||
|
1.457097 6.679000 87.184745
|
||||||
|
1.427071 6.682000 87.223906
|
||||||
|
1.397414 6.685000 87.263066
|
||||||
|
1.368126 6.688000 87.302227
|
||||||
|
1.339208 6.691000 87.341388
|
||||||
|
1.310659 6.694000 87.380548
|
||||||
|
1.282480 6.697000 87.419709
|
||||||
|
1.254669 6.700000 87.458870
|
||||||
|
1.227227 6.703000 87.498030
|
||||||
|
1.200152 6.706000 87.537191
|
||||||
|
1.173444 6.709000 87.576352
|
||||||
|
1.147101 6.712000 87.615512
|
||||||
|
1.121121 6.715000 87.654673
|
||||||
|
1.095505 6.718000 87.693834
|
||||||
|
1.070249 6.721000 87.732994
|
||||||
|
1.045352 6.724000 87.772155
|
||||||
|
1.020813 6.727000 87.811316
|
||||||
|
0.996628 6.730000 87.850477
|
||||||
|
0.972796 6.733000 87.889637
|
||||||
|
0.949315 6.736000 87.928798
|
||||||
|
0.926181 6.739000 87.967959
|
||||||
|
0.903393 6.742000 88.007119
|
||||||
|
0.880948 6.745000 88.046280
|
||||||
|
0.858843 6.748000 88.085441
|
||||||
|
0.837074 6.751000 88.124601
|
||||||
|
0.815640 6.754000 88.163762
|
||||||
|
0.794536 6.757000 88.202923
|
||||||
|
0.773760 6.760000 88.242083
|
||||||
|
0.753309 6.763000 88.281244
|
||||||
|
0.733179 6.766000 88.320405
|
||||||
|
0.713366 6.769000 88.359565
|
||||||
|
0.693868 6.772000 88.398726
|
||||||
|
0.674681 6.775000 88.437887
|
||||||
|
0.655801 6.778000 88.477048
|
||||||
|
0.637225 6.781000 88.516208
|
||||||
|
0.618949 6.784000 88.555369
|
||||||
|
0.600970 6.787000 88.594530
|
||||||
|
0.583283 6.790000 88.633690
|
||||||
|
0.565886 6.793000 88.672851
|
||||||
|
0.548774 6.796000 88.712012
|
||||||
|
0.531945 6.799000 88.751172
|
||||||
|
0.515393 6.802000 88.790333
|
||||||
|
0.499115 6.805000 88.829494
|
||||||
|
0.483108 6.808000 88.868654
|
||||||
|
0.467368 6.811000 88.907815
|
||||||
|
0.451890 6.814000 88.946976
|
||||||
|
0.436672 6.817000 88.986137
|
||||||
|
0.421709 6.820000 89.025297
|
||||||
|
0.406983 6.823000 89.064458
|
||||||
|
0.392488 6.826000 89.103619
|
||||||
|
0.378223 6.829000 89.142779
|
||||||
|
0.364189 6.832000 89.181940
|
||||||
|
0.350383 6.835000 89.221101
|
||||||
|
0.336806 6.838000 89.260261
|
||||||
|
0.323456 6.841000 89.299422
|
||||||
|
0.310332 6.844000 89.338583
|
||||||
|
0.297433 6.847000 89.377743
|
||||||
|
0.284758 6.850000 89.416904
|
||||||
|
0.272306 6.853000 89.456065
|
||||||
|
0.260076 6.856000 89.495225
|
||||||
|
0.248067 6.859000 89.534386
|
||||||
|
0.236267 6.862000 89.573547
|
||||||
|
0.224679 6.865000 89.612708
|
||||||
|
0.213303 6.868000 89.651868
|
||||||
|
0.202139 6.871000 89.691029
|
||||||
|
0.191183 6.874000 89.730190
|
||||||
|
0.180437 6.877000 89.769350
|
||||||
|
0.169897 6.880000 89.808511
|
||||||
|
0.159563 6.883000 89.847672
|
||||||
|
0.149432 6.886000 89.886832
|
||||||
|
0.139503 6.889000 89.925993
|
||||||
|
0.129772 6.892000 89.965154
|
||||||
|
0.120238 6.895000 90.004314
|
||||||
|
0.110897 6.898000 90.043475
|
||||||
|
0.101744 6.901000 90.082636
|
||||||
|
0.092775 6.904000 90.121796
|
||||||
|
0.083985 6.907000 90.160957
|
||||||
|
0.075365 6.910000 90.200118
|
||||||
|
0.066906 6.913000 90.239279
|
||||||
|
0.058597 6.916000 90.278439
|
||||||
|
0.050422 6.919000 90.317600
|
||||||
|
0.042359 6.922000 90.356761
|
||||||
|
0.034378 6.925000 90.395921
|
||||||
|
0.026434 6.928000 90.435082
|
||||||
|
0.018456 6.931000 90.474243
|
||||||
|
0.010329 6.934000 90.513403
|
||||||
|
0.001932 6.937000 90.552564
|
||||||
|
0.000000 6.938000 90.565618
|
||||||
522
eloss_calculations/fluorine_lookup_70MeV_350torr_3pc.dat
Normal file
522
eloss_calculations/fluorine_lookup_70MeV_350torr_3pc.dat
Normal file
|
|
@ -0,0 +1,522 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 70 MeV
|
||||||
|
70.000000 0.000000 0.000000
|
||||||
|
69.857849 0.020000 0.200813
|
||||||
|
69.715518 0.040000 0.401627
|
||||||
|
69.573006 0.060000 0.602440
|
||||||
|
69.430313 0.080000 0.803253
|
||||||
|
69.287438 0.100000 1.004067
|
||||||
|
69.144381 0.120000 1.204880
|
||||||
|
69.001140 0.140000 1.405693
|
||||||
|
68.857716 0.160000 1.606507
|
||||||
|
68.714106 0.180000 1.807320
|
||||||
|
68.570312 0.200000 2.008133
|
||||||
|
68.426331 0.220000 2.208947
|
||||||
|
68.282163 0.240000 2.409760
|
||||||
|
68.137807 0.260000 2.610573
|
||||||
|
67.993263 0.280000 2.811387
|
||||||
|
67.848530 0.300000 3.012200
|
||||||
|
67.703607 0.320000 3.213013
|
||||||
|
67.558494 0.340000 3.413827
|
||||||
|
67.413189 0.360000 3.614640
|
||||||
|
67.267692 0.380000 3.815453
|
||||||
|
67.122002 0.400000 4.016267
|
||||||
|
66.976118 0.420000 4.217080
|
||||||
|
66.830040 0.440000 4.417894
|
||||||
|
66.683767 0.460000 4.618707
|
||||||
|
66.537298 0.480000 4.819520
|
||||||
|
66.390631 0.500000 5.020334
|
||||||
|
66.243768 0.520000 5.221147
|
||||||
|
66.096705 0.540000 5.421960
|
||||||
|
65.949444 0.560000 5.622774
|
||||||
|
65.801982 0.580000 5.823587
|
||||||
|
65.654320 0.600000 6.024400
|
||||||
|
65.506455 0.620000 6.225214
|
||||||
|
65.358389 0.640000 6.426027
|
||||||
|
65.210118 0.660000 6.626840
|
||||||
|
65.061644 0.680000 6.827654
|
||||||
|
64.912964 0.700000 7.028467
|
||||||
|
64.764079 0.720000 7.229280
|
||||||
|
64.614987 0.740000 7.430094
|
||||||
|
64.465687 0.760000 7.630907
|
||||||
|
64.316178 0.780000 7.831720
|
||||||
|
64.166460 0.800000 8.032534
|
||||||
|
64.016532 0.820000 8.233347
|
||||||
|
63.866392 0.840000 8.434160
|
||||||
|
63.716041 0.860000 8.634974
|
||||||
|
63.565476 0.880000 8.835787
|
||||||
|
63.414698 0.900000 9.036600
|
||||||
|
63.263704 0.920000 9.237414
|
||||||
|
63.112495 0.940000 9.438227
|
||||||
|
62.961069 0.960000 9.639040
|
||||||
|
62.809425 0.980000 9.839854
|
||||||
|
62.657563 1.000000 10.040667
|
||||||
|
62.505481 1.020000 10.241480
|
||||||
|
62.353179 1.040000 10.442294
|
||||||
|
62.200655 1.060000 10.643107
|
||||||
|
62.047909 1.080000 10.843920
|
||||||
|
61.894939 1.100000 11.044734
|
||||||
|
61.741745 1.120000 11.245547
|
||||||
|
61.588325 1.140000 11.446360
|
||||||
|
61.434679 1.160000 11.647174
|
||||||
|
61.280806 1.180000 11.847987
|
||||||
|
61.126704 1.200000 12.048801
|
||||||
|
60.972372 1.220000 12.249614
|
||||||
|
60.817810 1.240000 12.450427
|
||||||
|
60.663016 1.260000 12.651241
|
||||||
|
60.507990 1.280000 12.852054
|
||||||
|
60.352730 1.300000 13.052867
|
||||||
|
60.197236 1.320000 13.253681
|
||||||
|
60.041505 1.340000 13.454494
|
||||||
|
59.885538 1.360000 13.655307
|
||||||
|
59.729332 1.380000 13.856121
|
||||||
|
59.572888 1.400000 14.056934
|
||||||
|
59.416203 1.420000 14.257747
|
||||||
|
59.259277 1.440000 14.458561
|
||||||
|
59.102109 1.460000 14.659374
|
||||||
|
58.944697 1.480000 14.860187
|
||||||
|
58.787040 1.500000 15.061001
|
||||||
|
58.629137 1.520000 15.261814
|
||||||
|
58.470987 1.540000 15.462627
|
||||||
|
58.312590 1.560000 15.663441
|
||||||
|
58.153942 1.580000 15.864254
|
||||||
|
57.995044 1.600000 16.065067
|
||||||
|
57.835895 1.620000 16.265881
|
||||||
|
57.676492 1.640000 16.466694
|
||||||
|
57.516835 1.660000 16.667507
|
||||||
|
57.356923 1.680000 16.868321
|
||||||
|
57.196754 1.700000 17.069134
|
||||||
|
57.036327 1.720000 17.269947
|
||||||
|
56.875641 1.740000 17.470761
|
||||||
|
56.714695 1.760000 17.671574
|
||||||
|
56.553486 1.780000 17.872387
|
||||||
|
56.392015 1.800000 18.073201
|
||||||
|
56.230280 1.820000 18.274014
|
||||||
|
56.068279 1.840000 18.474827
|
||||||
|
55.906010 1.860000 18.675641
|
||||||
|
55.743474 1.880000 18.876454
|
||||||
|
55.580668 1.900000 19.077267
|
||||||
|
55.417591 1.920000 19.278081
|
||||||
|
55.254242 1.940000 19.478894
|
||||||
|
55.090619 1.960000 19.679708
|
||||||
|
54.926721 1.980000 19.880521
|
||||||
|
54.762546 2.000000 20.081334
|
||||||
|
54.598094 2.020000 20.282148
|
||||||
|
54.433362 2.040000 20.482961
|
||||||
|
54.268349 2.060000 20.683774
|
||||||
|
54.103054 2.080000 20.884588
|
||||||
|
53.937475 2.100000 21.085401
|
||||||
|
53.771612 2.120000 21.286214
|
||||||
|
53.605461 2.140000 21.487028
|
||||||
|
53.439022 2.160000 21.687841
|
||||||
|
53.272294 2.180000 21.888654
|
||||||
|
53.105275 2.200000 22.089468
|
||||||
|
52.937962 2.220000 22.290281
|
||||||
|
52.770356 2.240000 22.491094
|
||||||
|
52.602453 2.260000 22.691908
|
||||||
|
52.434253 2.280000 22.892721
|
||||||
|
52.265754 2.300000 23.093534
|
||||||
|
52.096954 2.320000 23.294348
|
||||||
|
51.927852 2.340000 23.495161
|
||||||
|
51.758446 2.360000 23.695974
|
||||||
|
51.588735 2.380000 23.896788
|
||||||
|
51.418716 2.400000 24.097601
|
||||||
|
51.248388 2.420000 24.298414
|
||||||
|
51.077749 2.440000 24.499228
|
||||||
|
50.906799 2.460000 24.700041
|
||||||
|
50.735534 2.480000 24.900854
|
||||||
|
50.563953 2.500000 25.101668
|
||||||
|
50.392054 2.520000 25.302481
|
||||||
|
50.219836 2.540000 25.503294
|
||||||
|
50.047297 2.560000 25.704108
|
||||||
|
49.874434 2.580000 25.904921
|
||||||
|
49.701247 2.600000 26.105734
|
||||||
|
49.527733 2.620000 26.306548
|
||||||
|
49.353890 2.640000 26.507361
|
||||||
|
49.179717 2.660000 26.708174
|
||||||
|
49.005212 2.680000 26.908988
|
||||||
|
48.830372 2.700000 27.109801
|
||||||
|
48.655196 2.720000 27.310614
|
||||||
|
48.479681 2.740000 27.511428
|
||||||
|
48.303826 2.760000 27.712241
|
||||||
|
48.127629 2.780000 27.913055
|
||||||
|
47.951088 2.800000 28.113868
|
||||||
|
47.774200 2.820000 28.314681
|
||||||
|
47.596964 2.840000 28.515495
|
||||||
|
47.419378 2.860000 28.716308
|
||||||
|
47.241438 2.880000 28.917121
|
||||||
|
47.063144 2.900000 29.117935
|
||||||
|
46.884494 2.920000 29.318748
|
||||||
|
46.705484 2.940000 29.519561
|
||||||
|
46.526112 2.960000 29.720375
|
||||||
|
46.346378 2.980000 29.921188
|
||||||
|
46.166277 3.000000 30.122001
|
||||||
|
45.985809 3.020000 30.322815
|
||||||
|
45.804970 3.040000 30.523628
|
||||||
|
45.623759 3.060000 30.724441
|
||||||
|
45.442173 3.080000 30.925255
|
||||||
|
45.260209 3.100000 31.126068
|
||||||
|
45.077866 3.120000 31.326881
|
||||||
|
44.895140 3.140000 31.527695
|
||||||
|
44.712030 3.160000 31.728508
|
||||||
|
44.528533 3.180000 31.929321
|
||||||
|
44.344647 3.200000 32.130135
|
||||||
|
44.160368 3.220000 32.330948
|
||||||
|
43.975694 3.240000 32.531761
|
||||||
|
43.790624 3.260000 32.732575
|
||||||
|
43.605153 3.280000 32.933388
|
||||||
|
43.419280 3.300000 33.134201
|
||||||
|
43.233002 3.320000 33.335015
|
||||||
|
43.046316 3.340000 33.535828
|
||||||
|
42.859220 3.360000 33.736641
|
||||||
|
42.671710 3.380000 33.937455
|
||||||
|
42.483784 3.400000 34.138268
|
||||||
|
42.295439 3.420000 34.339081
|
||||||
|
42.106672 3.440000 34.539895
|
||||||
|
41.917480 3.460000 34.740708
|
||||||
|
41.727861 3.480000 34.941521
|
||||||
|
41.537811 3.500000 35.142335
|
||||||
|
41.347327 3.520000 35.343148
|
||||||
|
41.156407 3.540000 35.543962
|
||||||
|
40.965047 3.560000 35.744775
|
||||||
|
40.773244 3.580000 35.945588
|
||||||
|
40.580994 3.600000 36.146402
|
||||||
|
40.388296 3.620000 36.347215
|
||||||
|
40.195145 3.640000 36.548028
|
||||||
|
40.001538 3.660000 36.748842
|
||||||
|
39.807473 3.680000 36.949655
|
||||||
|
39.612944 3.700000 37.150468
|
||||||
|
39.417950 3.720000 37.351282
|
||||||
|
39.222487 3.740000 37.552095
|
||||||
|
39.026550 3.760000 37.752908
|
||||||
|
38.830138 3.780000 37.953722
|
||||||
|
38.633245 3.800000 38.154535
|
||||||
|
38.435869 3.820000 38.355348
|
||||||
|
38.238006 3.840000 38.556162
|
||||||
|
38.039651 3.860000 38.756975
|
||||||
|
37.840802 3.880000 38.957788
|
||||||
|
37.641454 3.900000 39.158602
|
||||||
|
37.441604 3.920000 39.359415
|
||||||
|
37.241247 3.940000 39.560228
|
||||||
|
37.040380 3.960000 39.761042
|
||||||
|
36.838999 3.980000 39.961855
|
||||||
|
36.637098 4.000000 40.162668
|
||||||
|
36.434675 4.020000 40.363482
|
||||||
|
36.231725 4.040000 40.564295
|
||||||
|
36.028244 4.060000 40.765108
|
||||||
|
35.824227 4.080000 40.965922
|
||||||
|
35.619669 4.100000 41.166735
|
||||||
|
35.414567 4.120000 41.367548
|
||||||
|
35.208916 4.140000 41.568362
|
||||||
|
35.002712 4.160000 41.769175
|
||||||
|
34.795948 4.180000 41.969988
|
||||||
|
34.588622 4.200000 42.170802
|
||||||
|
34.380727 4.220000 42.371615
|
||||||
|
34.172259 4.240000 42.572428
|
||||||
|
33.963213 4.260000 42.773242
|
||||||
|
33.753584 4.280000 42.974055
|
||||||
|
33.543366 4.300000 43.174869
|
||||||
|
33.332555 4.320000 43.375682
|
||||||
|
33.121145 4.340000 43.576495
|
||||||
|
32.909131 4.360000 43.777309
|
||||||
|
32.696507 4.380000 43.978122
|
||||||
|
32.483267 4.400000 44.178935
|
||||||
|
32.269406 4.420000 44.379749
|
||||||
|
32.054917 4.440000 44.580562
|
||||||
|
31.839796 4.460000 44.781375
|
||||||
|
31.624036 4.480000 44.982189
|
||||||
|
31.407630 4.500000 45.183002
|
||||||
|
31.190573 4.520000 45.383815
|
||||||
|
30.972858 4.540000 45.584629
|
||||||
|
30.754479 4.560000 45.785442
|
||||||
|
30.535429 4.580000 45.986255
|
||||||
|
30.315701 4.600000 46.187069
|
||||||
|
30.095289 4.620000 46.387882
|
||||||
|
29.874185 4.640000 46.588695
|
||||||
|
29.652382 4.660000 46.789509
|
||||||
|
29.429873 4.680000 46.990322
|
||||||
|
29.206650 4.700000 47.191135
|
||||||
|
28.982706 4.720000 47.391949
|
||||||
|
28.758033 4.740000 47.592762
|
||||||
|
28.532624 4.760000 47.793575
|
||||||
|
28.306469 4.780000 47.994389
|
||||||
|
28.079561 4.800000 48.195202
|
||||||
|
27.851891 4.820000 48.396015
|
||||||
|
27.623450 4.840000 48.596829
|
||||||
|
27.394230 4.860000 48.797642
|
||||||
|
27.164221 4.880000 48.998455
|
||||||
|
26.933415 4.900000 49.199269
|
||||||
|
26.701801 4.920000 49.400082
|
||||||
|
26.469370 4.940000 49.600895
|
||||||
|
26.236111 4.960000 49.801709
|
||||||
|
26.002015 4.980000 50.002522
|
||||||
|
25.767071 5.000000 50.203335
|
||||||
|
25.531267 5.020000 50.404149
|
||||||
|
25.294594 5.040000 50.604962
|
||||||
|
25.057039 5.060000 50.805775
|
||||||
|
24.818590 5.080000 51.006589
|
||||||
|
24.579236 5.100000 51.207402
|
||||||
|
24.338963 5.120000 51.408216
|
||||||
|
24.097760 5.140000 51.609029
|
||||||
|
23.855612 5.160000 51.809842
|
||||||
|
23.612507 5.180000 52.010656
|
||||||
|
23.368430 5.200000 52.211469
|
||||||
|
23.123366 5.220000 52.412282
|
||||||
|
22.877300 5.240000 52.613096
|
||||||
|
22.630217 5.260000 52.813909
|
||||||
|
22.382101 5.280000 53.014722
|
||||||
|
22.132935 5.300000 53.215536
|
||||||
|
21.882702 5.320000 53.416349
|
||||||
|
21.631383 5.340000 53.617162
|
||||||
|
21.378964 5.360000 53.817976
|
||||||
|
21.125522 5.380000 54.018789
|
||||||
|
20.871094 5.400000 54.219602
|
||||||
|
20.615669 5.420000 54.420416
|
||||||
|
20.359238 5.440000 54.621229
|
||||||
|
20.101788 5.460000 54.822042
|
||||||
|
19.843308 5.480000 55.022856
|
||||||
|
19.583786 5.500000 55.223669
|
||||||
|
19.323211 5.520000 55.424482
|
||||||
|
19.061571 5.540000 55.625296
|
||||||
|
18.798852 5.560000 55.826109
|
||||||
|
18.535043 5.580000 56.026922
|
||||||
|
18.270131 5.600000 56.227736
|
||||||
|
18.004102 5.620000 56.428549
|
||||||
|
17.736943 5.640000 56.629362
|
||||||
|
17.468642 5.660000 56.830176
|
||||||
|
17.199183 5.680000 57.030989
|
||||||
|
16.928552 5.700000 57.231802
|
||||||
|
16.656736 5.720000 57.432616
|
||||||
|
16.383720 5.740000 57.633429
|
||||||
|
16.109488 5.760000 57.834242
|
||||||
|
15.834026 5.780000 58.035056
|
||||||
|
15.557317 5.800000 58.235869
|
||||||
|
15.279346 5.820000 58.436682
|
||||||
|
15.000097 5.840000 58.637496
|
||||||
|
14.719554 5.860000 58.838309
|
||||||
|
14.437700 5.880000 59.039123
|
||||||
|
14.154518 5.900000 59.239936
|
||||||
|
13.869991 5.920000 59.440749
|
||||||
|
13.584102 5.940000 59.641563
|
||||||
|
13.296834 5.960000 59.842376
|
||||||
|
13.008170 5.980000 60.043189
|
||||||
|
12.718093 6.000000 60.244003
|
||||||
|
12.426586 6.020000 60.444816
|
||||||
|
12.133632 6.040000 60.645629
|
||||||
|
11.839358 6.060000 60.846443
|
||||||
|
11.543933 6.080000 61.047256
|
||||||
|
11.247374 6.100000 61.248069
|
||||||
|
10.949697 6.120000 61.448883
|
||||||
|
10.650923 6.140000 61.649696
|
||||||
|
10.351079 6.160000 61.850509
|
||||||
|
10.050198 6.180000 62.051323
|
||||||
|
9.748321 6.200000 62.252136
|
||||||
|
9.445499 6.220000 62.452949
|
||||||
|
9.141794 6.240000 62.653763
|
||||||
|
8.837280 6.260000 62.854576
|
||||||
|
8.532051 6.280000 63.055389
|
||||||
|
8.226217 6.300000 63.256203
|
||||||
|
7.919912 6.320000 63.457016
|
||||||
|
7.613301 6.340000 63.657829
|
||||||
|
7.306580 6.360000 63.858643
|
||||||
|
6.999956 6.380000 64.059456
|
||||||
|
6.692656 6.400000 64.260269
|
||||||
|
6.384289 6.420000 64.461083
|
||||||
|
6.075035 6.440000 64.661896
|
||||||
|
6.028585 6.443000 64.692018
|
||||||
|
5.982120 6.446000 64.722140
|
||||||
|
5.935643 6.449000 64.752262
|
||||||
|
5.889155 6.452000 64.782384
|
||||||
|
5.842655 6.455000 64.812506
|
||||||
|
5.796147 6.458000 64.842628
|
||||||
|
5.749629 6.461000 64.872750
|
||||||
|
5.703105 6.464000 64.902872
|
||||||
|
5.656575 6.467000 64.932994
|
||||||
|
5.610040 6.470000 64.963116
|
||||||
|
5.563502 6.473000 64.993238
|
||||||
|
5.516962 6.476000 65.023360
|
||||||
|
5.470421 6.479000 65.053482
|
||||||
|
5.423881 6.482000 65.083604
|
||||||
|
5.377344 6.485000 65.113726
|
||||||
|
5.330811 6.488000 65.143848
|
||||||
|
5.284284 6.491000 65.173970
|
||||||
|
5.237764 6.494000 65.204092
|
||||||
|
5.191254 6.497000 65.234214
|
||||||
|
5.144754 6.500000 65.264336
|
||||||
|
5.098268 6.503000 65.294458
|
||||||
|
5.051796 6.506000 65.324580
|
||||||
|
5.005342 6.509000 65.354702
|
||||||
|
4.958906 6.512000 65.384824
|
||||||
|
4.912492 6.515000 65.414946
|
||||||
|
4.866101 6.518000 65.445068
|
||||||
|
4.819736 6.521000 65.475190
|
||||||
|
4.773399 6.524000 65.505312
|
||||||
|
4.727092 6.527000 65.535434
|
||||||
|
4.680819 6.530000 65.565556
|
||||||
|
4.634581 6.533000 65.595678
|
||||||
|
4.588382 6.536000 65.625800
|
||||||
|
4.542224 6.539000 65.655922
|
||||||
|
4.496110 6.542000 65.686044
|
||||||
|
4.450042 6.545000 65.716166
|
||||||
|
4.404025 6.548000 65.746288
|
||||||
|
4.358061 6.551000 65.776410
|
||||||
|
4.312153 6.554000 65.806532
|
||||||
|
4.266305 6.557000 65.836654
|
||||||
|
4.220520 6.560000 65.866776
|
||||||
|
4.174800 6.563000 65.896898
|
||||||
|
4.129151 6.566000 65.927020
|
||||||
|
4.083576 6.569000 65.957142
|
||||||
|
4.038077 6.572000 65.987264
|
||||||
|
3.992660 6.575000 66.017386
|
||||||
|
3.947328 6.578000 66.047508
|
||||||
|
3.902084 6.581000 66.077630
|
||||||
|
3.856934 6.584000 66.107752
|
||||||
|
3.811881 6.587000 66.137874
|
||||||
|
3.766929 6.590000 66.167996
|
||||||
|
3.722084 6.593000 66.198118
|
||||||
|
3.677348 6.596000 66.228240
|
||||||
|
3.632728 6.599000 66.258362
|
||||||
|
3.588226 6.602000 66.288484
|
||||||
|
3.543849 6.605000 66.318606
|
||||||
|
3.499601 6.608000 66.348728
|
||||||
|
3.455487 6.611000 66.378850
|
||||||
|
3.411511 6.614000 66.408972
|
||||||
|
3.367679 6.617000 66.439094
|
||||||
|
3.323996 6.620000 66.469216
|
||||||
|
3.280466 6.623000 66.499338
|
||||||
|
3.237096 6.626000 66.529460
|
||||||
|
3.193890 6.629000 66.559582
|
||||||
|
3.150854 6.632000 66.589704
|
||||||
|
3.107992 6.635000 66.619826
|
||||||
|
3.065312 6.638000 66.649948
|
||||||
|
3.022817 6.641000 66.680070
|
||||||
|
2.980513 6.644000 66.710192
|
||||||
|
2.938406 6.647000 66.740314
|
||||||
|
2.896502 6.650000 66.770436
|
||||||
|
2.854806 6.653000 66.800558
|
||||||
|
2.813323 6.656000 66.830680
|
||||||
|
2.772059 6.659000 66.860802
|
||||||
|
2.731020 6.662000 66.890924
|
||||||
|
2.690211 6.665000 66.921046
|
||||||
|
2.649638 6.668000 66.951168
|
||||||
|
2.609306 6.671000 66.981290
|
||||||
|
2.569220 6.674000 67.011412
|
||||||
|
2.529387 6.677000 67.041534
|
||||||
|
2.489811 6.680000 67.071656
|
||||||
|
2.450499 6.683000 67.101778
|
||||||
|
2.411454 6.686000 67.131900
|
||||||
|
2.372682 6.689000 67.162022
|
||||||
|
2.334189 6.692000 67.192144
|
||||||
|
2.295980 6.695000 67.222266
|
||||||
|
2.258059 6.698000 67.252388
|
||||||
|
2.220430 6.701000 67.282510
|
||||||
|
2.183100 6.704000 67.312632
|
||||||
|
2.146072 6.707000 67.342754
|
||||||
|
2.109351 6.710000 67.372876
|
||||||
|
2.072941 6.713000 67.402998
|
||||||
|
2.036847 6.716000 67.433120
|
||||||
|
2.001072 6.719000 67.463242
|
||||||
|
1.965620 6.722000 67.493364
|
||||||
|
1.930495 6.725000 67.523486
|
||||||
|
1.895701 6.728000 67.553608
|
||||||
|
1.861240 6.731000 67.583730
|
||||||
|
1.827117 6.734000 67.613852
|
||||||
|
1.793334 6.737000 67.643974
|
||||||
|
1.759893 6.740000 67.674096
|
||||||
|
1.726798 6.743000 67.704218
|
||||||
|
1.694051 6.746000 67.734340
|
||||||
|
1.661655 6.749000 67.764462
|
||||||
|
1.629610 6.752000 67.794584
|
||||||
|
1.597920 6.755000 67.824706
|
||||||
|
1.566586 6.758000 67.854828
|
||||||
|
1.535608 6.761000 67.884950
|
||||||
|
1.504990 6.764000 67.915072
|
||||||
|
1.474730 6.767000 67.945194
|
||||||
|
1.444832 6.770000 67.975316
|
||||||
|
1.415294 6.773000 68.005438
|
||||||
|
1.386118 6.776000 68.035560
|
||||||
|
1.357303 6.779000 68.065682
|
||||||
|
1.328851 6.782000 68.095804
|
||||||
|
1.300760 6.785000 68.125926
|
||||||
|
1.273030 6.788000 68.156048
|
||||||
|
1.245661 6.791000 68.186170
|
||||||
|
1.218653 6.794000 68.216292
|
||||||
|
1.192004 6.797000 68.246414
|
||||||
|
1.165713 6.800000 68.276536
|
||||||
|
1.139779 6.803000 68.306658
|
||||||
|
1.114201 6.806000 68.336780
|
||||||
|
1.088978 6.809000 68.366902
|
||||||
|
1.064107 6.812000 68.397024
|
||||||
|
1.039587 6.815000 68.427146
|
||||||
|
1.015416 6.818000 68.457268
|
||||||
|
0.991592 6.821000 68.487390
|
||||||
|
0.968112 6.824000 68.517512
|
||||||
|
0.944975 6.827000 68.547634
|
||||||
|
0.922178 6.830000 68.577756
|
||||||
|
0.899717 6.833000 68.607878
|
||||||
|
0.877592 6.836000 68.638000
|
||||||
|
0.855799 6.839000 68.668122
|
||||||
|
0.834334 6.842000 68.698244
|
||||||
|
0.813196 6.845000 68.728366
|
||||||
|
0.792381 6.848000 68.758488
|
||||||
|
0.771886 6.851000 68.788610
|
||||||
|
0.751708 6.854000 68.818732
|
||||||
|
0.731843 6.857000 68.848854
|
||||||
|
0.712289 6.860000 68.878976
|
||||||
|
0.693042 6.863000 68.909098
|
||||||
|
0.674099 6.866000 68.939220
|
||||||
|
0.655456 6.869000 68.969342
|
||||||
|
0.637110 6.872000 68.999464
|
||||||
|
0.619057 6.875000 69.029586
|
||||||
|
0.601294 6.878000 69.059708
|
||||||
|
0.583817 6.881000 69.089830
|
||||||
|
0.566623 6.884000 69.119952
|
||||||
|
0.549707 6.887000 69.150074
|
||||||
|
0.533068 6.890000 69.180196
|
||||||
|
0.516700 6.893000 69.210318
|
||||||
|
0.500600 6.896000 69.240440
|
||||||
|
0.484765 6.899000 69.270562
|
||||||
|
0.469190 6.902000 69.300684
|
||||||
|
0.453873 6.905000 69.330806
|
||||||
|
0.438810 6.908000 69.360928
|
||||||
|
0.423996 6.911000 69.391050
|
||||||
|
0.409417 6.914000 69.421172
|
||||||
|
0.395060 6.917000 69.451294
|
||||||
|
0.380928 6.920000 69.481416
|
||||||
|
0.367019 6.923000 69.511538
|
||||||
|
0.353332 6.926000 69.541660
|
||||||
|
0.339867 6.929000 69.571782
|
||||||
|
0.326623 6.932000 69.601904
|
||||||
|
0.313599 6.935000 69.632026
|
||||||
|
0.300794 6.938000 69.662148
|
||||||
|
0.288207 6.941000 69.692270
|
||||||
|
0.275838 6.944000 69.722392
|
||||||
|
0.263685 6.947000 69.752514
|
||||||
|
0.251747 6.950000 69.782636
|
||||||
|
0.240019 6.953000 69.812758
|
||||||
|
0.228495 6.956000 69.842880
|
||||||
|
0.217180 6.959000 69.873002
|
||||||
|
0.206072 6.962000 69.903124
|
||||||
|
0.195169 6.965000 69.933246
|
||||||
|
0.184472 6.968000 69.963368
|
||||||
|
0.173979 6.971000 69.993490
|
||||||
|
0.163687 6.974000 70.023612
|
||||||
|
0.153596 6.977000 70.053734
|
||||||
|
0.143703 6.980000 70.083856
|
||||||
|
0.134007 6.983000 70.113978
|
||||||
|
0.124504 6.986000 70.144100
|
||||||
|
0.115191 6.989000 70.174222
|
||||||
|
0.106065 6.992000 70.204344
|
||||||
|
0.097122 6.995000 70.234466
|
||||||
|
0.088356 6.998000 70.264588
|
||||||
|
0.079761 7.001000 70.294710
|
||||||
|
0.071329 7.004000 70.324832
|
||||||
|
0.063049 7.007000 70.354954
|
||||||
|
0.054910 7.010000 70.385076
|
||||||
|
0.046892 7.013000 70.415198
|
||||||
|
0.038972 7.016000 70.445320
|
||||||
|
0.031114 7.019000 70.475442
|
||||||
|
0.023267 7.022000 70.505564
|
||||||
|
0.015345 7.025000 70.535686
|
||||||
|
0.007214 7.028000 70.565808
|
||||||
|
0.001641 7.030000 70.585890
|
||||||
437
eloss_calculations/fluorine_lookup_70MeV_350torr_4pc.dat
Normal file
437
eloss_calculations/fluorine_lookup_70MeV_350torr_4pc.dat
Normal file
|
|
@ -0,0 +1,437 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 70 MeV
|
||||||
|
70.000000 0.000000 0.000000
|
||||||
|
69.841372 0.022000 0.205127
|
||||||
|
69.682520 0.044000 0.410255
|
||||||
|
69.523443 0.066000 0.615382
|
||||||
|
69.364141 0.088000 0.820510
|
||||||
|
69.204613 0.110000 1.025637
|
||||||
|
69.044857 0.132000 1.230764
|
||||||
|
68.884873 0.154000 1.435892
|
||||||
|
68.724660 0.176000 1.641019
|
||||||
|
68.564216 0.198000 1.846147
|
||||||
|
68.403541 0.220000 2.051274
|
||||||
|
68.242633 0.242000 2.256402
|
||||||
|
68.081492 0.264000 2.461529
|
||||||
|
67.920117 0.286000 2.666656
|
||||||
|
67.758506 0.308000 2.871784
|
||||||
|
67.596659 0.330000 3.076911
|
||||||
|
67.434574 0.352000 3.282039
|
||||||
|
67.272251 0.374000 3.487166
|
||||||
|
67.109688 0.396000 3.692293
|
||||||
|
66.946884 0.418000 3.897421
|
||||||
|
66.783838 0.440000 4.102548
|
||||||
|
66.620550 0.462000 4.307676
|
||||||
|
66.457017 0.484000 4.512803
|
||||||
|
66.293240 0.506000 4.717930
|
||||||
|
66.129216 0.528000 4.923058
|
||||||
|
65.964945 0.550000 5.128185
|
||||||
|
65.800425 0.572000 5.333313
|
||||||
|
65.635656 0.594000 5.538440
|
||||||
|
65.470636 0.616000 5.743568
|
||||||
|
65.305364 0.638000 5.948695
|
||||||
|
65.139839 0.660000 6.153822
|
||||||
|
64.974060 0.682000 6.358950
|
||||||
|
64.808026 0.704000 6.564077
|
||||||
|
64.641735 0.726000 6.769205
|
||||||
|
64.475186 0.748000 6.974332
|
||||||
|
64.308378 0.770000 7.179459
|
||||||
|
64.141310 0.792000 7.384587
|
||||||
|
63.973980 0.814000 7.589714
|
||||||
|
63.806388 0.836000 7.794842
|
||||||
|
63.638531 0.858000 7.999969
|
||||||
|
63.470410 0.880000 8.205097
|
||||||
|
63.302022 0.902000 8.410224
|
||||||
|
63.133366 0.924000 8.615351
|
||||||
|
62.964441 0.946000 8.820479
|
||||||
|
62.795246 0.968000 9.025606
|
||||||
|
62.625780 0.990000 9.230734
|
||||||
|
62.456040 1.012000 9.435861
|
||||||
|
62.286026 1.034000 9.640988
|
||||||
|
62.115736 1.056000 9.846116
|
||||||
|
61.945169 1.078000 10.051243
|
||||||
|
61.774324 1.100000 10.256371
|
||||||
|
61.603199 1.122000 10.461498
|
||||||
|
61.431793 1.144000 10.666625
|
||||||
|
61.260105 1.166000 10.871753
|
||||||
|
61.088132 1.188000 11.076880
|
||||||
|
60.915874 1.210000 11.282008
|
||||||
|
60.743330 1.232000 11.487135
|
||||||
|
60.570497 1.254000 11.692263
|
||||||
|
60.397374 1.276000 11.897390
|
||||||
|
60.223960 1.298000 12.102517
|
||||||
|
60.050254 1.320000 12.307645
|
||||||
|
59.876253 1.342000 12.512772
|
||||||
|
59.701957 1.364000 12.717900
|
||||||
|
59.527363 1.386000 12.923027
|
||||||
|
59.352471 1.408000 13.128154
|
||||||
|
59.177279 1.430000 13.333282
|
||||||
|
59.001785 1.452000 13.538409
|
||||||
|
58.825987 1.474000 13.743537
|
||||||
|
58.649884 1.496000 13.948664
|
||||||
|
58.473475 1.518000 14.153791
|
||||||
|
58.296757 1.540000 14.358919
|
||||||
|
58.119730 1.562000 14.564046
|
||||||
|
57.942391 1.584000 14.769174
|
||||||
|
57.764739 1.606000 14.974301
|
||||||
|
57.586772 1.628000 15.179429
|
||||||
|
57.408489 1.650000 15.384556
|
||||||
|
57.229888 1.672000 15.589683
|
||||||
|
57.050966 1.694000 15.794811
|
||||||
|
56.871723 1.716000 15.999938
|
||||||
|
56.692156 1.738000 16.205066
|
||||||
|
56.512264 1.760000 16.410193
|
||||||
|
56.332046 1.782000 16.615320
|
||||||
|
56.151498 1.804000 16.820448
|
||||||
|
55.970620 1.826000 17.025575
|
||||||
|
55.789409 1.848000 17.230703
|
||||||
|
55.607864 1.870000 17.435830
|
||||||
|
55.425983 1.892000 17.640958
|
||||||
|
55.243764 1.914000 17.846085
|
||||||
|
55.061205 1.936000 18.051212
|
||||||
|
54.878304 1.958000 18.256340
|
||||||
|
54.695059 1.980000 18.461467
|
||||||
|
54.511468 2.002000 18.666595
|
||||||
|
54.327530 2.024000 18.871722
|
||||||
|
54.143242 2.046000 19.076849
|
||||||
|
53.958602 2.068000 19.281977
|
||||||
|
53.773608 2.090000 19.487104
|
||||||
|
53.588259 2.112000 19.692232
|
||||||
|
53.402551 2.134000 19.897359
|
||||||
|
53.216484 2.156000 20.102486
|
||||||
|
53.030054 2.178000 20.307614
|
||||||
|
52.843260 2.200000 20.512741
|
||||||
|
52.656099 2.222000 20.717869
|
||||||
|
52.468570 2.244000 20.922996
|
||||||
|
52.280670 2.266000 21.128124
|
||||||
|
52.092397 2.288000 21.333251
|
||||||
|
51.903749 2.310000 21.538378
|
||||||
|
51.714723 2.332000 21.743506
|
||||||
|
51.525317 2.354000 21.948633
|
||||||
|
51.335529 2.376000 22.153761
|
||||||
|
51.145357 2.398000 22.358888
|
||||||
|
50.954797 2.420000 22.564015
|
||||||
|
50.763848 2.442000 22.769143
|
||||||
|
50.572508 2.464000 22.974270
|
||||||
|
50.380773 2.486000 23.179398
|
||||||
|
50.188642 2.508000 23.384525
|
||||||
|
49.996112 2.530000 23.589652
|
||||||
|
49.803180 2.552000 23.794780
|
||||||
|
49.609843 2.574000 23.999907
|
||||||
|
49.416101 2.596000 24.205035
|
||||||
|
49.221948 2.618000 24.410162
|
||||||
|
49.027384 2.640000 24.615290
|
||||||
|
48.832405 2.662000 24.820417
|
||||||
|
48.637009 2.684000 25.025544
|
||||||
|
48.441192 2.706000 25.230672
|
||||||
|
48.244953 2.728000 25.435799
|
||||||
|
48.048289 2.750000 25.640927
|
||||||
|
47.851195 2.772000 25.846054
|
||||||
|
47.653671 2.794000 26.051181
|
||||||
|
47.455713 2.816000 26.256309
|
||||||
|
47.257317 2.838000 26.461436
|
||||||
|
47.058482 2.860000 26.666564
|
||||||
|
46.859204 2.882000 26.871691
|
||||||
|
46.659479 2.904000 27.076819
|
||||||
|
46.459306 2.926000 27.281946
|
||||||
|
46.258681 2.948000 27.487073
|
||||||
|
46.057601 2.970000 27.692201
|
||||||
|
45.856062 2.992000 27.897328
|
||||||
|
45.654062 3.014000 28.102456
|
||||||
|
45.451597 3.036000 28.307583
|
||||||
|
45.248664 3.058000 28.512710
|
||||||
|
45.045260 3.080000 28.717838
|
||||||
|
44.841381 3.102000 28.922965
|
||||||
|
44.637024 3.124000 29.128093
|
||||||
|
44.432186 3.146000 29.333220
|
||||||
|
44.226863 3.168000 29.538347
|
||||||
|
44.021051 3.190000 29.743475
|
||||||
|
43.814748 3.212000 29.948602
|
||||||
|
43.607949 3.234000 30.153730
|
||||||
|
43.400650 3.256000 30.358857
|
||||||
|
43.192849 3.278000 30.563985
|
||||||
|
42.984541 3.300000 30.769112
|
||||||
|
42.775723 3.322000 30.974239
|
||||||
|
42.566391 3.344000 31.179367
|
||||||
|
42.356540 3.366000 31.384494
|
||||||
|
42.146167 3.388000 31.589622
|
||||||
|
41.935268 3.410000 31.794749
|
||||||
|
41.723839 3.432000 31.999876
|
||||||
|
41.511876 3.454000 32.205004
|
||||||
|
41.299375 3.476000 32.410131
|
||||||
|
41.086331 3.498000 32.615259
|
||||||
|
40.872740 3.520000 32.820386
|
||||||
|
40.658598 3.542000 33.025513
|
||||||
|
40.443900 3.564000 33.230641
|
||||||
|
40.228642 3.586000 33.435768
|
||||||
|
40.012820 3.608000 33.640896
|
||||||
|
39.796429 3.630000 33.846023
|
||||||
|
39.579465 3.652000 34.051151
|
||||||
|
39.361921 3.674000 34.256278
|
||||||
|
39.143795 3.696000 34.461405
|
||||||
|
38.925081 3.718000 34.666533
|
||||||
|
38.705774 3.740000 34.871660
|
||||||
|
38.485868 3.762000 35.076788
|
||||||
|
38.265360 3.784000 35.281915
|
||||||
|
38.044244 3.806000 35.487042
|
||||||
|
37.822515 3.828000 35.692170
|
||||||
|
37.600167 3.850000 35.897297
|
||||||
|
37.377195 3.872000 36.102425
|
||||||
|
37.153593 3.894000 36.307552
|
||||||
|
36.929357 3.916000 36.512679
|
||||||
|
36.704480 3.938000 36.717807
|
||||||
|
36.478957 3.960000 36.922934
|
||||||
|
36.252781 3.982000 37.128062
|
||||||
|
36.025948 4.004000 37.333189
|
||||||
|
35.798451 4.026000 37.538317
|
||||||
|
35.570283 4.048000 37.743444
|
||||||
|
35.341439 4.070000 37.948571
|
||||||
|
35.111913 4.092000 38.153699
|
||||||
|
34.881697 4.114000 38.358826
|
||||||
|
34.650786 4.136000 38.563954
|
||||||
|
34.419172 4.158000 38.769081
|
||||||
|
34.186849 4.180000 38.974208
|
||||||
|
33.953811 4.202000 39.179336
|
||||||
|
33.720050 4.224000 39.384463
|
||||||
|
33.485558 4.246000 39.589591
|
||||||
|
33.250329 4.268000 39.794718
|
||||||
|
33.014356 4.290000 39.999846
|
||||||
|
32.777630 4.312000 40.204973
|
||||||
|
32.540144 4.334000 40.410100
|
||||||
|
32.301891 4.356000 40.615228
|
||||||
|
32.062862 4.378000 40.820355
|
||||||
|
31.823048 4.400000 41.025483
|
||||||
|
31.582443 4.422000 41.230610
|
||||||
|
31.341037 4.444000 41.435737
|
||||||
|
31.098821 4.466000 41.640865
|
||||||
|
30.855787 4.488000 41.845992
|
||||||
|
30.611926 4.510000 42.051120
|
||||||
|
30.367229 4.532000 42.256247
|
||||||
|
30.121685 4.554000 42.461374
|
||||||
|
29.875286 4.576000 42.666502
|
||||||
|
29.628022 4.598000 42.871629
|
||||||
|
29.379882 4.620000 43.076757
|
||||||
|
29.130857 4.642000 43.281884
|
||||||
|
28.880935 4.664000 43.487012
|
||||||
|
28.630106 4.686000 43.692139
|
||||||
|
28.378359 4.708000 43.897266
|
||||||
|
28.125683 4.730000 44.102394
|
||||||
|
27.872066 4.752000 44.307521
|
||||||
|
27.617495 4.774000 44.512649
|
||||||
|
27.361959 4.796000 44.717776
|
||||||
|
27.105446 4.818000 44.922903
|
||||||
|
26.847942 4.840000 45.128031
|
||||||
|
26.589434 4.862000 45.333158
|
||||||
|
26.329908 4.884000 45.538286
|
||||||
|
26.069351 4.906000 45.743413
|
||||||
|
25.807748 4.928000 45.948540
|
||||||
|
25.545084 4.950000 46.153668
|
||||||
|
25.281345 4.972000 46.358795
|
||||||
|
25.016513 4.994000 46.563923
|
||||||
|
24.750574 5.016000 46.769050
|
||||||
|
24.483509 5.038000 46.974178
|
||||||
|
24.215303 5.060000 47.179305
|
||||||
|
23.945936 5.082000 47.384432
|
||||||
|
23.675391 5.104000 47.589560
|
||||||
|
23.403648 5.126000 47.794687
|
||||||
|
23.130687 5.148000 47.999815
|
||||||
|
22.856488 5.170000 48.204942
|
||||||
|
22.581029 5.192000 48.410069
|
||||||
|
22.304289 5.214000 48.615197
|
||||||
|
22.026243 5.236000 48.820324
|
||||||
|
21.746868 5.258000 49.025452
|
||||||
|
21.466139 5.280000 49.230579
|
||||||
|
21.184098 5.302000 49.435707
|
||||||
|
20.900838 5.324000 49.640834
|
||||||
|
20.616348 5.346000 49.845961
|
||||||
|
20.330613 5.368000 50.051089
|
||||||
|
20.043619 5.390000 50.256216
|
||||||
|
19.755348 5.412000 50.461344
|
||||||
|
19.465786 5.434000 50.666471
|
||||||
|
19.174915 5.456000 50.871598
|
||||||
|
18.882719 5.478000 51.076726
|
||||||
|
18.589182 5.500000 51.281853
|
||||||
|
18.294285 5.522000 51.486981
|
||||||
|
17.998011 5.544000 51.692108
|
||||||
|
17.700342 5.566000 51.897235
|
||||||
|
17.401259 5.588000 52.102363
|
||||||
|
17.100743 5.610000 52.307490
|
||||||
|
16.798774 5.632000 52.512618
|
||||||
|
16.495334 5.654000 52.717745
|
||||||
|
16.190401 5.676000 52.922873
|
||||||
|
15.883955 5.698000 53.128000
|
||||||
|
15.575976 5.720000 53.333127
|
||||||
|
15.266441 5.742000 53.538255
|
||||||
|
14.955328 5.764000 53.743382
|
||||||
|
14.642617 5.786000 53.948510
|
||||||
|
14.328283 5.808000 54.153637
|
||||||
|
14.012303 5.830000 54.358764
|
||||||
|
13.694656 5.852000 54.563892
|
||||||
|
13.375318 5.874000 54.769019
|
||||||
|
13.054265 5.896000 54.974147
|
||||||
|
12.731474 5.918000 55.179274
|
||||||
|
12.406923 5.940000 55.384401
|
||||||
|
12.080593 5.962000 55.589529
|
||||||
|
11.752694 5.984000 55.794656
|
||||||
|
11.423386 6.006000 55.999784
|
||||||
|
11.092692 6.028000 56.204911
|
||||||
|
10.760639 6.050000 56.410039
|
||||||
|
10.427259 6.072000 56.615166
|
||||||
|
10.092597 6.094000 56.820293
|
||||||
|
9.756708 6.116000 57.025421
|
||||||
|
9.419660 6.138000 57.230548
|
||||||
|
9.081540 6.160000 57.435676
|
||||||
|
8.742456 6.182000 57.640803
|
||||||
|
8.402540 6.204000 57.845930
|
||||||
|
8.061959 6.226000 58.051058
|
||||||
|
7.720917 6.248000 58.256185
|
||||||
|
7.379664 6.270000 58.461313
|
||||||
|
7.038508 6.292000 58.666440
|
||||||
|
6.696734 6.314000 58.871567
|
||||||
|
6.353665 6.336000 59.076695
|
||||||
|
6.009547 6.358000 59.281822
|
||||||
|
5.946893 6.362000 59.319118
|
||||||
|
5.884218 6.366000 59.356414
|
||||||
|
5.821525 6.370000 59.393710
|
||||||
|
5.758816 6.374000 59.431006
|
||||||
|
5.696094 6.378000 59.468302
|
||||||
|
5.633363 6.382000 59.505598
|
||||||
|
5.570625 6.386000 59.542894
|
||||||
|
5.507884 6.390000 59.580189
|
||||||
|
5.445143 6.394000 59.617485
|
||||||
|
5.382406 6.398000 59.654781
|
||||||
|
5.319676 6.402000 59.692077
|
||||||
|
5.256959 6.406000 59.729373
|
||||||
|
5.194258 6.410000 59.766669
|
||||||
|
5.131578 6.414000 59.803965
|
||||||
|
5.068922 6.418000 59.841261
|
||||||
|
5.006297 6.422000 59.878557
|
||||||
|
4.943707 6.426000 59.915853
|
||||||
|
4.881157 6.430000 59.953148
|
||||||
|
4.818653 6.434000 59.990444
|
||||||
|
4.756202 6.438000 60.027740
|
||||||
|
4.693808 6.442000 60.065036
|
||||||
|
4.631478 6.446000 60.102332
|
||||||
|
4.569218 6.450000 60.139628
|
||||||
|
4.507036 6.454000 60.176924
|
||||||
|
4.444939 6.458000 60.214220
|
||||||
|
4.382934 6.462000 60.251516
|
||||||
|
4.321028 6.466000 60.288811
|
||||||
|
4.259229 6.470000 60.326107
|
||||||
|
4.197546 6.474000 60.363403
|
||||||
|
4.135987 6.478000 60.400699
|
||||||
|
4.074562 6.482000 60.437995
|
||||||
|
4.013278 6.486000 60.475291
|
||||||
|
3.952146 6.490000 60.512587
|
||||||
|
3.891174 6.494000 60.549883
|
||||||
|
3.830374 6.498000 60.587179
|
||||||
|
3.769756 6.502000 60.624474
|
||||||
|
3.709329 6.506000 60.661770
|
||||||
|
3.649105 6.510000 60.699066
|
||||||
|
3.589095 6.514000 60.736362
|
||||||
|
3.529311 6.518000 60.773658
|
||||||
|
3.469763 6.522000 60.810954
|
||||||
|
3.410465 6.526000 60.848250
|
||||||
|
3.351428 6.530000 60.885546
|
||||||
|
3.292664 6.534000 60.922842
|
||||||
|
3.234187 6.538000 60.960138
|
||||||
|
3.176008 6.542000 60.997433
|
||||||
|
3.118142 6.546000 61.034729
|
||||||
|
3.060600 6.550000 61.072025
|
||||||
|
3.003398 6.554000 61.109321
|
||||||
|
2.946547 6.558000 61.146617
|
||||||
|
2.890061 6.562000 61.183913
|
||||||
|
2.833954 6.566000 61.221209
|
||||||
|
2.778240 6.570000 61.258505
|
||||||
|
2.722932 6.574000 61.295801
|
||||||
|
2.668043 6.578000 61.333096
|
||||||
|
2.613588 6.582000 61.370392
|
||||||
|
2.559579 6.586000 61.407688
|
||||||
|
2.506030 6.590000 61.444984
|
||||||
|
2.452953 6.594000 61.482280
|
||||||
|
2.400363 6.598000 61.519576
|
||||||
|
2.348271 6.602000 61.556872
|
||||||
|
2.296689 6.606000 61.594168
|
||||||
|
2.245630 6.610000 61.631464
|
||||||
|
2.195106 6.614000 61.668759
|
||||||
|
2.145128 6.618000 61.706055
|
||||||
|
2.095707 6.622000 61.743351
|
||||||
|
2.046853 6.626000 61.780647
|
||||||
|
1.998577 6.630000 61.817943
|
||||||
|
1.950887 6.634000 61.855239
|
||||||
|
1.903793 6.638000 61.892535
|
||||||
|
1.857304 6.642000 61.929831
|
||||||
|
1.811427 6.646000 61.967127
|
||||||
|
1.766169 6.650000 62.004423
|
||||||
|
1.721537 6.654000 62.041718
|
||||||
|
1.677538 6.658000 62.079014
|
||||||
|
1.634176 6.662000 62.116310
|
||||||
|
1.591456 6.666000 62.153606
|
||||||
|
1.549383 6.670000 62.190902
|
||||||
|
1.507959 6.674000 62.228198
|
||||||
|
1.467188 6.678000 62.265494
|
||||||
|
1.427071 6.682000 62.302790
|
||||||
|
1.387610 6.686000 62.340086
|
||||||
|
1.348806 6.690000 62.377381
|
||||||
|
1.310659 6.694000 62.414677
|
||||||
|
1.273169 6.698000 62.451973
|
||||||
|
1.236334 6.702000 62.489269
|
||||||
|
1.200152 6.706000 62.526565
|
||||||
|
1.164622 6.710000 62.563861
|
||||||
|
1.129741 6.714000 62.601157
|
||||||
|
1.095505 6.718000 62.638453
|
||||||
|
1.061910 6.722000 62.675749
|
||||||
|
1.028953 6.726000 62.713045
|
||||||
|
0.996628 6.730000 62.750340
|
||||||
|
0.964930 6.734000 62.787636
|
||||||
|
0.933854 6.738000 62.824932
|
||||||
|
0.903393 6.742000 62.862228
|
||||||
|
0.873542 6.746000 62.899524
|
||||||
|
0.844293 6.750000 62.936820
|
||||||
|
0.815640 6.754000 62.974116
|
||||||
|
0.787575 6.758000 63.011412
|
||||||
|
0.760090 6.762000 63.048708
|
||||||
|
0.733179 6.766000 63.086003
|
||||||
|
0.706832 6.770000 63.123299
|
||||||
|
0.681042 6.774000 63.160595
|
||||||
|
0.655801 6.778000 63.197891
|
||||||
|
0.631100 6.782000 63.235187
|
||||||
|
0.606930 6.786000 63.272483
|
||||||
|
0.583283 6.790000 63.309779
|
||||||
|
0.560151 6.794000 63.347075
|
||||||
|
0.537523 6.798000 63.384371
|
||||||
|
0.515393 6.802000 63.421666
|
||||||
|
0.493750 6.806000 63.458962
|
||||||
|
0.472585 6.810000 63.496258
|
||||||
|
0.451890 6.814000 63.533554
|
||||||
|
0.431656 6.818000 63.570850
|
||||||
|
0.411866 6.822000 63.608146
|
||||||
|
0.392488 6.826000 63.645442
|
||||||
|
0.373520 6.830000 63.682738
|
||||||
|
0.354960 6.834000 63.720034
|
||||||
|
0.336806 6.838000 63.757330
|
||||||
|
0.319056 6.842000 63.794625
|
||||||
|
0.301707 6.846000 63.831921
|
||||||
|
0.284758 6.850000 63.869217
|
||||||
|
0.268205 6.854000 63.906513
|
||||||
|
0.252045 6.858000 63.943809
|
||||||
|
0.236267 6.862000 63.981105
|
||||||
|
0.220864 6.866000 64.018401
|
||||||
|
0.205837 6.870000 64.055697
|
||||||
|
0.191183 6.874000 64.092993
|
||||||
|
0.176901 6.878000 64.130288
|
||||||
|
0.162985 6.882000 64.167584
|
||||||
|
0.149432 6.886000 64.204880
|
||||||
|
0.136237 6.890000 64.242176
|
||||||
|
0.123395 6.894000 64.279472
|
||||||
|
0.110897 6.898000 64.316768
|
||||||
|
0.098734 6.902000 64.354064
|
||||||
|
0.086895 6.906000 64.391360
|
||||||
|
0.075365 6.910000 64.428656
|
||||||
|
0.064120 6.914000 64.465951
|
||||||
|
0.053133 6.918000 64.503247
|
||||||
|
0.042359 6.922000 64.540543
|
||||||
|
0.031728 6.926000 64.577839
|
||||||
|
0.021125 6.930000 64.615135
|
||||||
|
0.010329 6.934000 64.652431
|
||||||
|
0.000000 6.938000 64.689727
|
||||||
774
eloss_calculations/oxygen_lookup_70MeV_250torr_3pc.dat
Normal file
774
eloss_calculations/oxygen_lookup_70MeV_250torr_3pc.dat
Normal file
|
|
@ -0,0 +1,774 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 70 MeV
|
||||||
|
70.000000 0.000000 0.000000
|
||||||
|
69.916730 0.015000 0.210854
|
||||||
|
69.833395 0.030000 0.421708
|
||||||
|
69.749993 0.045000 0.632562
|
||||||
|
69.666527 0.060000 0.843416
|
||||||
|
69.582994 0.075000 1.054270
|
||||||
|
69.499395 0.090000 1.265124
|
||||||
|
69.415729 0.105000 1.475978
|
||||||
|
69.331997 0.120000 1.686832
|
||||||
|
69.248199 0.135000 1.897686
|
||||||
|
69.164334 0.150000 2.108540
|
||||||
|
69.080402 0.165000 2.319394
|
||||||
|
68.996402 0.180000 2.530248
|
||||||
|
68.912336 0.195000 2.741102
|
||||||
|
68.828202 0.210000 2.951956
|
||||||
|
68.744001 0.225000 3.162810
|
||||||
|
68.659731 0.240000 3.373664
|
||||||
|
68.575394 0.255000 3.584518
|
||||||
|
68.490989 0.270000 3.795372
|
||||||
|
68.406515 0.285000 4.006226
|
||||||
|
68.321974 0.300000 4.217080
|
||||||
|
68.237363 0.315000 4.427934
|
||||||
|
68.152684 0.330000 4.638788
|
||||||
|
68.067936 0.345000 4.849642
|
||||||
|
67.983119 0.360000 5.060496
|
||||||
|
67.898232 0.375000 5.271350
|
||||||
|
67.813276 0.390000 5.482204
|
||||||
|
67.728251 0.405000 5.693058
|
||||||
|
67.643156 0.420000 5.903912
|
||||||
|
67.557990 0.435000 6.114766
|
||||||
|
67.472755 0.450000 6.325620
|
||||||
|
67.387449 0.465000 6.536474
|
||||||
|
67.302073 0.480000 6.747328
|
||||||
|
67.216627 0.495000 6.958182
|
||||||
|
67.131109 0.510000 7.169036
|
||||||
|
67.045520 0.525000 7.379890
|
||||||
|
66.959861 0.540000 7.590744
|
||||||
|
66.874130 0.555000 7.801598
|
||||||
|
66.788327 0.570000 8.012452
|
||||||
|
66.702453 0.585000 8.223306
|
||||||
|
66.616507 0.600000 8.434160
|
||||||
|
66.530488 0.615000 8.645014
|
||||||
|
66.444398 0.630000 8.855868
|
||||||
|
66.358235 0.645000 9.066722
|
||||||
|
66.271999 0.660000 9.277576
|
||||||
|
66.185691 0.675000 9.488430
|
||||||
|
66.099309 0.690000 9.699284
|
||||||
|
66.012855 0.705000 9.910138
|
||||||
|
65.926327 0.720000 10.120992
|
||||||
|
65.839725 0.735000 10.331846
|
||||||
|
65.753050 0.750000 10.542700
|
||||||
|
65.666301 0.765000 10.753554
|
||||||
|
65.579477 0.780000 10.964408
|
||||||
|
65.492580 0.795000 11.175262
|
||||||
|
65.405607 0.810000 11.386116
|
||||||
|
65.318560 0.825000 11.596970
|
||||||
|
65.231439 0.840000 11.807825
|
||||||
|
65.144242 0.855000 12.018679
|
||||||
|
65.056970 0.870000 12.229533
|
||||||
|
64.969622 0.885000 12.440387
|
||||||
|
64.882198 0.900000 12.651241
|
||||||
|
64.794699 0.915000 12.862095
|
||||||
|
64.707124 0.930000 13.072949
|
||||||
|
64.619472 0.945000 13.283803
|
||||||
|
64.531744 0.960000 13.494657
|
||||||
|
64.443939 0.975000 13.705511
|
||||||
|
64.356058 0.990000 13.916365
|
||||||
|
64.268099 1.005000 14.127219
|
||||||
|
64.180063 1.020000 14.338073
|
||||||
|
64.091949 1.035000 14.548927
|
||||||
|
64.003758 1.050000 14.759781
|
||||||
|
63.915489 1.065000 14.970635
|
||||||
|
63.827142 1.080000 15.181489
|
||||||
|
63.738716 1.095000 15.392343
|
||||||
|
63.650212 1.110000 15.603197
|
||||||
|
63.561629 1.125000 15.814051
|
||||||
|
63.472967 1.140000 16.024905
|
||||||
|
63.384226 1.155000 16.235759
|
||||||
|
63.295406 1.170000 16.446613
|
||||||
|
63.206506 1.185000 16.657467
|
||||||
|
63.117526 1.200000 16.868321
|
||||||
|
63.028466 1.215000 17.079175
|
||||||
|
62.939326 1.230000 17.290029
|
||||||
|
62.850105 1.245000 17.500883
|
||||||
|
62.760804 1.260000 17.711737
|
||||||
|
62.671422 1.275000 17.922591
|
||||||
|
62.581958 1.290000 18.133445
|
||||||
|
62.492414 1.305000 18.344299
|
||||||
|
62.402787 1.320000 18.555153
|
||||||
|
62.313079 1.335000 18.766007
|
||||||
|
62.223289 1.350000 18.976861
|
||||||
|
62.133417 1.365000 19.187715
|
||||||
|
62.043462 1.380000 19.398569
|
||||||
|
61.953424 1.395000 19.609423
|
||||||
|
61.863304 1.410000 19.820277
|
||||||
|
61.773100 1.425000 20.031131
|
||||||
|
61.682813 1.440000 20.241985
|
||||||
|
61.592442 1.455000 20.452839
|
||||||
|
61.501988 1.470000 20.663693
|
||||||
|
61.411449 1.485000 20.874547
|
||||||
|
61.320826 1.500000 21.085401
|
||||||
|
61.230119 1.515000 21.296255
|
||||||
|
61.139326 1.530000 21.507109
|
||||||
|
61.048449 1.545000 21.717963
|
||||||
|
60.957486 1.560000 21.928817
|
||||||
|
60.866438 1.575000 22.139671
|
||||||
|
60.775304 1.590000 22.350525
|
||||||
|
60.684083 1.605000 22.561379
|
||||||
|
60.592777 1.620000 22.772233
|
||||||
|
60.501384 1.635000 22.983087
|
||||||
|
60.409905 1.650000 23.193941
|
||||||
|
60.318338 1.665000 23.404795
|
||||||
|
60.226684 1.680000 23.615649
|
||||||
|
60.134942 1.695000 23.826503
|
||||||
|
60.043113 1.710000 24.037357
|
||||||
|
59.951196 1.725000 24.248211
|
||||||
|
59.859190 1.740000 24.459065
|
||||||
|
59.767096 1.755000 24.669919
|
||||||
|
59.674914 1.770000 24.880773
|
||||||
|
59.582642 1.785000 25.091627
|
||||||
|
59.490281 1.800000 25.302481
|
||||||
|
59.397830 1.815000 25.513335
|
||||||
|
59.305289 1.830000 25.724189
|
||||||
|
59.212659 1.845000 25.935043
|
||||||
|
59.119937 1.860000 26.145897
|
||||||
|
59.027126 1.875000 26.356751
|
||||||
|
58.934223 1.890000 26.567605
|
||||||
|
58.841230 1.905000 26.778459
|
||||||
|
58.748144 1.920000 26.989313
|
||||||
|
58.654968 1.935000 27.200167
|
||||||
|
58.561699 1.950000 27.411021
|
||||||
|
58.468338 1.965000 27.621875
|
||||||
|
58.374884 1.980000 27.832729
|
||||||
|
58.281338 1.995000 28.043583
|
||||||
|
58.187698 2.010000 28.254437
|
||||||
|
58.093965 2.025000 28.465291
|
||||||
|
58.000139 2.040000 28.676145
|
||||||
|
57.906219 2.055000 28.886999
|
||||||
|
57.812204 2.070000 29.097853
|
||||||
|
57.718095 2.085000 29.308707
|
||||||
|
57.623891 2.100000 29.519561
|
||||||
|
57.529592 2.115000 29.730415
|
||||||
|
57.435198 2.130000 29.941269
|
||||||
|
57.340708 2.145000 30.152123
|
||||||
|
57.246122 2.160000 30.362977
|
||||||
|
57.151440 2.175000 30.573831
|
||||||
|
57.056661 2.190000 30.784685
|
||||||
|
56.961786 2.205000 30.995539
|
||||||
|
56.866813 2.220000 31.206393
|
||||||
|
56.771743 2.235000 31.417247
|
||||||
|
56.676575 2.250000 31.628101
|
||||||
|
56.581310 2.265000 31.838955
|
||||||
|
56.485945 2.280000 32.049809
|
||||||
|
56.390483 2.295000 32.260663
|
||||||
|
56.294921 2.310000 32.471517
|
||||||
|
56.199260 2.325000 32.682371
|
||||||
|
56.103499 2.340000 32.893225
|
||||||
|
56.007639 2.355000 33.104079
|
||||||
|
55.911678 2.370000 33.314933
|
||||||
|
55.815617 2.385000 33.525787
|
||||||
|
55.719455 2.400000 33.736641
|
||||||
|
55.623192 2.415000 33.947495
|
||||||
|
55.526828 2.430000 34.158349
|
||||||
|
55.430361 2.445000 34.369203
|
||||||
|
55.333793 2.460000 34.580057
|
||||||
|
55.237122 2.475000 34.790911
|
||||||
|
55.140348 2.490000 35.001765
|
||||||
|
55.043471 2.505000 35.212619
|
||||||
|
54.946491 2.520000 35.423474
|
||||||
|
54.849407 2.535000 35.634328
|
||||||
|
54.752219 2.550000 35.845182
|
||||||
|
54.654926 2.565000 36.056036
|
||||||
|
54.557529 2.580000 36.266890
|
||||||
|
54.460026 2.595000 36.477744
|
||||||
|
54.362418 2.610000 36.688598
|
||||||
|
54.264705 2.625000 36.899452
|
||||||
|
54.166885 2.640000 37.110306
|
||||||
|
54.068958 2.655000 37.321160
|
||||||
|
53.970925 2.670000 37.532014
|
||||||
|
53.872785 2.685000 37.742868
|
||||||
|
53.774537 2.700000 37.953722
|
||||||
|
53.676181 2.715000 38.164576
|
||||||
|
53.577717 2.730000 38.375430
|
||||||
|
53.479144 2.745000 38.586284
|
||||||
|
53.380462 2.760000 38.797138
|
||||||
|
53.281671 2.775000 39.007992
|
||||||
|
53.182770 2.790000 39.218846
|
||||||
|
53.083759 2.805000 39.429700
|
||||||
|
52.984637 2.820000 39.640554
|
||||||
|
52.885405 2.835000 39.851408
|
||||||
|
52.786062 2.850000 40.062262
|
||||||
|
52.686607 2.865000 40.273116
|
||||||
|
52.587040 2.880000 40.483970
|
||||||
|
52.487360 2.895000 40.694824
|
||||||
|
52.387568 2.910000 40.905678
|
||||||
|
52.287663 2.925000 41.116532
|
||||||
|
52.187644 2.940000 41.327386
|
||||||
|
52.087512 2.955000 41.538240
|
||||||
|
51.987265 2.970000 41.749094
|
||||||
|
51.886903 2.985000 41.959948
|
||||||
|
51.786427 3.000000 42.170802
|
||||||
|
51.685835 3.015000 42.381656
|
||||||
|
51.585127 3.030000 42.592510
|
||||||
|
51.484302 3.045000 42.803364
|
||||||
|
51.383362 3.060000 43.014218
|
||||||
|
51.282304 3.075000 43.225072
|
||||||
|
51.181128 3.090000 43.435926
|
||||||
|
51.079835 3.105000 43.646780
|
||||||
|
50.978423 3.120000 43.857634
|
||||||
|
50.876893 3.135000 44.068488
|
||||||
|
50.775243 3.150000 44.279342
|
||||||
|
50.673474 3.165000 44.490196
|
||||||
|
50.571585 3.180000 44.701050
|
||||||
|
50.469576 3.195000 44.911904
|
||||||
|
50.367445 3.210000 45.122758
|
||||||
|
50.265194 3.225000 45.333612
|
||||||
|
50.162820 3.240000 45.544466
|
||||||
|
50.060325 3.255000 45.755320
|
||||||
|
49.957706 3.270000 45.966174
|
||||||
|
49.854965 3.285000 46.177028
|
||||||
|
49.752100 3.300000 46.387882
|
||||||
|
49.649112 3.315000 46.598736
|
||||||
|
49.545999 3.330000 46.809590
|
||||||
|
49.442761 3.345000 47.020444
|
||||||
|
49.339398 3.360000 47.231298
|
||||||
|
49.235909 3.375000 47.442152
|
||||||
|
49.132294 3.390000 47.653006
|
||||||
|
49.028552 3.405000 47.863860
|
||||||
|
48.924683 3.420000 48.074714
|
||||||
|
48.820686 3.435000 48.285568
|
||||||
|
48.716561 3.450000 48.496422
|
||||||
|
48.612308 3.465000 48.707276
|
||||||
|
48.507926 3.480000 48.918130
|
||||||
|
48.403414 3.495000 49.128984
|
||||||
|
48.298772 3.510000 49.339838
|
||||||
|
48.194000 3.525000 49.550692
|
||||||
|
48.089096 3.540000 49.761546
|
||||||
|
47.984061 3.555000 49.972400
|
||||||
|
47.878894 3.570000 50.183254
|
||||||
|
47.773595 3.585000 50.394108
|
||||||
|
47.668162 3.600000 50.604962
|
||||||
|
47.562597 3.615000 50.815816
|
||||||
|
47.456897 3.630000 51.026670
|
||||||
|
47.351062 3.645000 51.237524
|
||||||
|
47.245093 3.660000 51.448378
|
||||||
|
47.138988 3.675000 51.659232
|
||||||
|
47.032746 3.690000 51.870086
|
||||||
|
46.926369 3.705000 52.080940
|
||||||
|
46.819854 3.720000 52.291794
|
||||||
|
46.713201 3.735000 52.502648
|
||||||
|
46.606410 3.750000 52.713502
|
||||||
|
46.499480 3.765000 52.924356
|
||||||
|
46.392411 3.780000 53.135210
|
||||||
|
46.285203 3.795000 53.346064
|
||||||
|
46.177853 3.810000 53.556918
|
||||||
|
46.070363 3.825000 53.767772
|
||||||
|
45.962731 3.840000 53.978626
|
||||||
|
45.854958 3.855000 54.189480
|
||||||
|
45.747041 3.870000 54.400334
|
||||||
|
45.638981 3.885000 54.611188
|
||||||
|
45.530778 3.900000 54.822042
|
||||||
|
45.422430 3.915000 55.032896
|
||||||
|
45.313937 3.930000 55.243750
|
||||||
|
45.205299 3.945000 55.454604
|
||||||
|
45.096514 3.960000 55.665458
|
||||||
|
44.987583 3.975000 55.876312
|
||||||
|
44.878504 3.990000 56.087166
|
||||||
|
44.769278 4.005000 56.298020
|
||||||
|
44.659903 4.020000 56.508874
|
||||||
|
44.550378 4.035000 56.719728
|
||||||
|
44.440704 4.050000 56.930582
|
||||||
|
44.330880 4.065000 57.141436
|
||||||
|
44.220904 4.080000 57.352290
|
||||||
|
44.110777 4.095000 57.563144
|
||||||
|
44.000498 4.110000 57.773998
|
||||||
|
43.890066 4.125000 57.984852
|
||||||
|
43.779480 4.140000 58.195706
|
||||||
|
43.668740 4.155000 58.406560
|
||||||
|
43.557845 4.170000 58.617414
|
||||||
|
43.446794 4.185000 58.828269
|
||||||
|
43.335588 4.200000 59.039123
|
||||||
|
43.224224 4.215000 59.249977
|
||||||
|
43.112703 4.230000 59.460831
|
||||||
|
43.001024 4.245000 59.671685
|
||||||
|
42.889186 4.260000 59.882539
|
||||||
|
42.777189 4.275000 60.093393
|
||||||
|
42.665031 4.290000 60.304247
|
||||||
|
42.552712 4.305000 60.515101
|
||||||
|
42.440232 4.320000 60.725955
|
||||||
|
42.327589 4.335000 60.936809
|
||||||
|
42.214784 4.350000 61.147663
|
||||||
|
42.101814 4.365000 61.358517
|
||||||
|
41.988680 4.380000 61.569371
|
||||||
|
41.875381 4.395000 61.780225
|
||||||
|
41.761916 4.410000 61.991079
|
||||||
|
41.648284 4.425000 62.201933
|
||||||
|
41.534485 4.440000 62.412787
|
||||||
|
41.420518 4.455000 62.623641
|
||||||
|
41.306382 4.470000 62.834495
|
||||||
|
41.192076 4.485000 63.045349
|
||||||
|
41.077599 4.500000 63.256203
|
||||||
|
40.962952 4.515000 63.467057
|
||||||
|
40.848132 4.530000 63.677911
|
||||||
|
40.733140 4.545000 63.888765
|
||||||
|
40.617974 4.560000 64.099619
|
||||||
|
40.502633 4.575000 64.310473
|
||||||
|
40.387118 4.590000 64.521327
|
||||||
|
40.271426 4.605000 64.732181
|
||||||
|
40.155558 4.620000 64.943035
|
||||||
|
40.039512 4.635000 65.153889
|
||||||
|
39.923288 4.650000 65.364743
|
||||||
|
39.806884 4.665000 65.575597
|
||||||
|
39.690301 4.680000 65.786451
|
||||||
|
39.573536 4.695000 65.997305
|
||||||
|
39.456589 4.710000 66.208159
|
||||||
|
39.339460 4.725000 66.419013
|
||||||
|
39.222148 4.740000 66.629867
|
||||||
|
39.104650 4.755000 66.840721
|
||||||
|
38.986968 4.770000 67.051575
|
||||||
|
38.869099 4.785000 67.262429
|
||||||
|
38.751044 4.800000 67.473283
|
||||||
|
38.632800 4.815000 67.684137
|
||||||
|
38.514367 4.830000 67.894991
|
||||||
|
38.395745 4.845000 68.105845
|
||||||
|
38.276931 4.860000 68.316699
|
||||||
|
38.157926 4.875000 68.527553
|
||||||
|
38.038729 4.890000 68.738407
|
||||||
|
37.919338 4.905000 68.949261
|
||||||
|
37.799752 4.920000 69.160115
|
||||||
|
37.679971 4.935000 69.370969
|
||||||
|
37.559993 4.950000 69.581823
|
||||||
|
37.439818 4.965000 69.792677
|
||||||
|
37.319444 4.980000 70.003531
|
||||||
|
37.198871 4.995000 70.214385
|
||||||
|
37.078097 5.010000 70.425239
|
||||||
|
36.957122 5.025000 70.636093
|
||||||
|
36.835944 5.040000 70.846947
|
||||||
|
36.714563 5.055000 71.057801
|
||||||
|
36.592977 5.070000 71.268655
|
||||||
|
36.471185 5.085000 71.479509
|
||||||
|
36.349187 5.100000 71.690363
|
||||||
|
36.226981 5.115000 71.901217
|
||||||
|
36.104566 5.130000 72.112071
|
||||||
|
35.981940 5.145000 72.322925
|
||||||
|
35.859104 5.160000 72.533779
|
||||||
|
35.736056 5.175000 72.744633
|
||||||
|
35.612794 5.190000 72.955487
|
||||||
|
35.489318 5.205000 73.166341
|
||||||
|
35.365626 5.220000 73.377195
|
||||||
|
35.241717 5.235000 73.588049
|
||||||
|
35.117590 5.250000 73.798903
|
||||||
|
34.993245 5.265000 74.009757
|
||||||
|
34.868678 5.280000 74.220611
|
||||||
|
34.743891 5.295000 74.431465
|
||||||
|
34.618880 5.310000 74.642319
|
||||||
|
34.493646 5.325000 74.853173
|
||||||
|
34.368186 5.340000 75.064027
|
||||||
|
34.242500 5.355000 75.274881
|
||||||
|
34.116586 5.370000 75.485735
|
||||||
|
33.990443 5.385000 75.696589
|
||||||
|
33.864070 5.400000 75.907443
|
||||||
|
33.737465 5.415000 76.118297
|
||||||
|
33.610628 5.430000 76.329151
|
||||||
|
33.483556 5.445000 76.540005
|
||||||
|
33.356248 5.460000 76.750859
|
||||||
|
33.228704 5.475000 76.961713
|
||||||
|
33.100921 5.490000 77.172567
|
||||||
|
32.972898 5.505000 77.383421
|
||||||
|
32.844635 5.520000 77.594275
|
||||||
|
32.716129 5.535000 77.805129
|
||||||
|
32.587379 5.550000 78.015983
|
||||||
|
32.458384 5.565000 78.226837
|
||||||
|
32.329141 5.580000 78.437691
|
||||||
|
32.199651 5.595000 78.648545
|
||||||
|
32.069911 5.610000 78.859399
|
||||||
|
31.939919 5.625000 79.070253
|
||||||
|
31.809675 5.640000 79.281107
|
||||||
|
31.679176 5.655000 79.491961
|
||||||
|
31.548422 5.670000 79.702815
|
||||||
|
31.417410 5.685000 79.913669
|
||||||
|
31.286138 5.700000 80.124523
|
||||||
|
31.154607 5.715000 80.335377
|
||||||
|
31.022812 5.730000 80.546231
|
||||||
|
30.890754 5.745000 80.757085
|
||||||
|
30.758431 5.760000 80.967939
|
||||||
|
30.625840 5.775000 81.178793
|
||||||
|
30.492980 5.790000 81.389647
|
||||||
|
30.359849 5.805000 81.600501
|
||||||
|
30.226446 5.820000 81.811355
|
||||||
|
30.092768 5.835000 82.022209
|
||||||
|
29.958815 5.850000 82.233064
|
||||||
|
29.824583 5.865000 82.443918
|
||||||
|
29.690072 5.880000 82.654772
|
||||||
|
29.555280 5.895000 82.865626
|
||||||
|
29.420204 5.910000 83.076480
|
||||||
|
29.284843 5.925000 83.287334
|
||||||
|
29.149194 5.940000 83.498188
|
||||||
|
29.013257 5.955000 83.709042
|
||||||
|
28.877028 5.970000 83.919896
|
||||||
|
28.740506 5.985000 84.130750
|
||||||
|
28.603689 6.000000 84.341604
|
||||||
|
28.466575 6.015000 84.552458
|
||||||
|
28.329161 6.030000 84.763312
|
||||||
|
28.191447 6.045000 84.974166
|
||||||
|
28.053428 6.060000 85.185020
|
||||||
|
27.915104 6.075000 85.395874
|
||||||
|
27.776472 6.090000 85.606728
|
||||||
|
27.637530 6.105000 85.817582
|
||||||
|
27.498275 6.120000 86.028436
|
||||||
|
27.358706 6.135000 86.239290
|
||||||
|
27.218820 6.150000 86.450144
|
||||||
|
27.078615 6.165000 86.660998
|
||||||
|
26.938088 6.180000 86.871852
|
||||||
|
26.797237 6.195000 87.082706
|
||||||
|
26.656059 6.210000 87.293560
|
||||||
|
26.514552 6.225000 87.504414
|
||||||
|
26.372713 6.240000 87.715268
|
||||||
|
26.230541 6.255000 87.926122
|
||||||
|
26.088031 6.270000 88.136976
|
||||||
|
25.945183 6.285000 88.347830
|
||||||
|
25.801992 6.300000 88.558684
|
||||||
|
25.658456 6.315000 88.769538
|
||||||
|
25.514572 6.330000 88.980392
|
||||||
|
25.370338 6.345000 89.191246
|
||||||
|
25.225751 6.360000 89.402100
|
||||||
|
25.080808 6.375000 89.612954
|
||||||
|
24.935505 6.390000 89.823808
|
||||||
|
24.789840 6.405000 90.034662
|
||||||
|
24.643810 6.420000 90.245516
|
||||||
|
24.497412 6.435000 90.456370
|
||||||
|
24.350642 6.450000 90.667224
|
||||||
|
24.203497 6.465000 90.878078
|
||||||
|
24.055974 6.480000 91.088932
|
||||||
|
23.908070 6.495000 91.299786
|
||||||
|
23.759781 6.510000 91.510640
|
||||||
|
23.611103 6.525000 91.721494
|
||||||
|
23.462034 6.540000 91.932348
|
||||||
|
23.312569 6.555000 92.143202
|
||||||
|
23.162705 6.570000 92.354056
|
||||||
|
23.012439 6.585000 92.564910
|
||||||
|
22.861766 6.600000 92.775764
|
||||||
|
22.710682 6.615000 92.986618
|
||||||
|
22.559183 6.630000 93.197472
|
||||||
|
22.407266 6.645000 93.408326
|
||||||
|
22.254926 6.660000 93.619180
|
||||||
|
22.102160 6.675000 93.830034
|
||||||
|
21.948962 6.690000 94.040888
|
||||||
|
21.795328 6.705000 94.251742
|
||||||
|
21.641254 6.720000 94.462596
|
||||||
|
21.486736 6.735000 94.673450
|
||||||
|
21.331768 6.750000 94.884304
|
||||||
|
21.176345 6.765000 95.095158
|
||||||
|
21.020463 6.780000 95.306012
|
||||||
|
20.864117 6.795000 95.516866
|
||||||
|
20.707302 6.810000 95.727720
|
||||||
|
20.550011 6.825000 95.938574
|
||||||
|
20.392241 6.840000 96.149428
|
||||||
|
20.233985 6.855000 96.360282
|
||||||
|
20.075242 6.870000 96.571136
|
||||||
|
19.916045 6.885000 96.781990
|
||||||
|
19.756400 6.900000 96.992844
|
||||||
|
19.596305 6.915000 97.203698
|
||||||
|
19.435756 6.930000 97.414552
|
||||||
|
19.274749 6.945000 97.625406
|
||||||
|
19.113279 6.960000 97.836260
|
||||||
|
18.951344 6.975000 98.047114
|
||||||
|
18.788939 6.990000 98.257968
|
||||||
|
18.626060 7.005000 98.468822
|
||||||
|
18.462704 7.020000 98.679676
|
||||||
|
18.298865 7.035000 98.890530
|
||||||
|
18.134541 7.050000 99.101384
|
||||||
|
17.969726 7.065000 99.312238
|
||||||
|
17.804417 7.080000 99.523092
|
||||||
|
17.638608 7.095000 99.733946
|
||||||
|
17.472296 7.110000 99.944800
|
||||||
|
17.305476 7.125000 100.155654
|
||||||
|
17.138144 7.140000 100.366508
|
||||||
|
16.970294 7.155000 100.577362
|
||||||
|
16.801923 7.170000 100.788216
|
||||||
|
16.633024 7.185000 100.999070
|
||||||
|
16.463594 7.200000 101.209924
|
||||||
|
16.293628 7.215000 101.420778
|
||||||
|
16.123120 7.230000 101.631632
|
||||||
|
15.952064 7.245000 101.842486
|
||||||
|
15.780457 7.260000 102.053340
|
||||||
|
15.608293 7.275000 102.264194
|
||||||
|
15.435566 7.290000 102.475048
|
||||||
|
15.262270 7.305000 102.685902
|
||||||
|
15.088401 7.320000 102.896756
|
||||||
|
14.913953 7.335000 103.107610
|
||||||
|
14.738919 7.350000 103.318464
|
||||||
|
14.563294 7.365000 103.529318
|
||||||
|
14.387072 7.380000 103.740172
|
||||||
|
14.210247 7.395000 103.951026
|
||||||
|
14.032812 7.410000 104.161880
|
||||||
|
13.854763 7.425000 104.372734
|
||||||
|
13.676091 7.440000 104.583588
|
||||||
|
13.496791 7.455000 104.794442
|
||||||
|
13.316856 7.470000 105.005296
|
||||||
|
13.136279 7.485000 105.216150
|
||||||
|
12.955055 7.500000 105.427004
|
||||||
|
12.773175 7.515000 105.637858
|
||||||
|
12.590633 7.530000 105.848713
|
||||||
|
12.407423 7.545000 106.059567
|
||||||
|
12.223537 7.560000 106.270421
|
||||||
|
12.038968 7.575000 106.481275
|
||||||
|
11.853709 7.590000 106.692129
|
||||||
|
11.667753 7.605000 106.902983
|
||||||
|
11.481093 7.620000 107.113837
|
||||||
|
11.293722 7.635000 107.324691
|
||||||
|
11.105640 7.650000 107.535545
|
||||||
|
10.916916 7.665000 107.746399
|
||||||
|
10.727574 7.680000 107.957253
|
||||||
|
10.537615 7.695000 108.168107
|
||||||
|
10.347039 7.710000 108.378961
|
||||||
|
10.155849 7.725000 108.589815
|
||||||
|
9.964046 7.740000 108.800669
|
||||||
|
9.771635 7.755000 109.011523
|
||||||
|
9.578620 7.770000 109.222377
|
||||||
|
9.385007 7.785000 109.433231
|
||||||
|
9.190804 7.800000 109.644085
|
||||||
|
8.996021 7.815000 109.854939
|
||||||
|
8.800670 7.830000 110.065793
|
||||||
|
8.604763 7.845000 110.276647
|
||||||
|
8.408319 7.860000 110.487501
|
||||||
|
8.211357 7.875000 110.698355
|
||||||
|
8.013901 7.890000 110.909209
|
||||||
|
7.815978 7.905000 111.120063
|
||||||
|
7.617622 7.920000 111.330917
|
||||||
|
7.418871 7.935000 111.541771
|
||||||
|
7.379077 7.938000 111.583942
|
||||||
|
7.339269 7.941000 111.626112
|
||||||
|
7.299448 7.944000 111.668283
|
||||||
|
7.259614 7.947000 111.710454
|
||||||
|
7.219768 7.950000 111.752625
|
||||||
|
7.179910 7.953000 111.794796
|
||||||
|
7.140040 7.956000 111.836966
|
||||||
|
7.100159 7.959000 111.879137
|
||||||
|
7.060267 7.962000 111.921308
|
||||||
|
7.020358 7.965000 111.963479
|
||||||
|
6.980418 7.968000 112.005650
|
||||||
|
6.940447 7.971000 112.047820
|
||||||
|
6.900445 7.974000 112.089991
|
||||||
|
6.860411 7.977000 112.132162
|
||||||
|
6.820345 7.980000 112.174333
|
||||||
|
6.780247 7.983000 112.216504
|
||||||
|
6.740118 7.986000 112.258674
|
||||||
|
6.699957 7.989000 112.300845
|
||||||
|
6.659765 7.992000 112.343016
|
||||||
|
6.619541 7.995000 112.385187
|
||||||
|
6.579287 7.998000 112.427358
|
||||||
|
6.539002 8.001000 112.469528
|
||||||
|
6.498687 8.004000 112.511699
|
||||||
|
6.458341 8.007000 112.553870
|
||||||
|
6.417965 8.010000 112.596041
|
||||||
|
6.377560 8.013000 112.638212
|
||||||
|
6.337125 8.016000 112.680382
|
||||||
|
6.296661 8.019000 112.722553
|
||||||
|
6.256168 8.022000 112.764724
|
||||||
|
6.215647 8.025000 112.806895
|
||||||
|
6.175097 8.028000 112.849066
|
||||||
|
6.134520 8.031000 112.891236
|
||||||
|
6.093915 8.034000 112.933407
|
||||||
|
6.053283 8.037000 112.975578
|
||||||
|
6.012625 8.040000 113.017749
|
||||||
|
5.971940 8.043000 113.059920
|
||||||
|
5.931230 8.046000 113.102090
|
||||||
|
5.890494 8.049000 113.144261
|
||||||
|
5.849734 8.052000 113.186432
|
||||||
|
5.808949 8.055000 113.228603
|
||||||
|
5.768141 8.058000 113.270774
|
||||||
|
5.727310 8.061000 113.312944
|
||||||
|
5.686456 8.064000 113.355115
|
||||||
|
5.645580 8.067000 113.397286
|
||||||
|
5.604683 8.070000 113.439457
|
||||||
|
5.563765 8.073000 113.481628
|
||||||
|
5.522828 8.076000 113.523798
|
||||||
|
5.481871 8.079000 113.565969
|
||||||
|
5.440896 8.082000 113.608140
|
||||||
|
5.399903 8.085000 113.650311
|
||||||
|
5.358893 8.088000 113.692482
|
||||||
|
5.317868 8.091000 113.734652
|
||||||
|
5.276827 8.094000 113.776823
|
||||||
|
5.235773 8.097000 113.818994
|
||||||
|
5.194705 8.100000 113.861165
|
||||||
|
5.153625 8.103000 113.903336
|
||||||
|
5.112534 8.106000 113.945506
|
||||||
|
5.071432 8.109000 113.987677
|
||||||
|
5.030322 8.112000 114.029848
|
||||||
|
4.989204 8.115000 114.072019
|
||||||
|
4.948080 8.118000 114.114190
|
||||||
|
4.906950 8.121000 114.156360
|
||||||
|
4.865816 8.124000 114.198531
|
||||||
|
4.824679 8.127000 114.240702
|
||||||
|
4.783541 8.130000 114.282873
|
||||||
|
4.742403 8.133000 114.325044
|
||||||
|
4.701266 8.136000 114.367214
|
||||||
|
4.660133 8.139000 114.409385
|
||||||
|
4.619004 8.142000 114.451556
|
||||||
|
4.577882 8.145000 114.493727
|
||||||
|
4.536767 8.148000 114.535898
|
||||||
|
4.495663 8.151000 114.578068
|
||||||
|
4.454569 8.154000 114.620239
|
||||||
|
4.413490 8.157000 114.662410
|
||||||
|
4.372425 8.160000 114.704581
|
||||||
|
4.331378 8.163000 114.746752
|
||||||
|
4.290350 8.166000 114.788922
|
||||||
|
4.249344 8.169000 114.831093
|
||||||
|
4.208361 8.172000 114.873264
|
||||||
|
4.167405 8.175000 114.915435
|
||||||
|
4.126476 8.178000 114.957606
|
||||||
|
4.085578 8.181000 114.999776
|
||||||
|
4.044713 8.184000 115.041947
|
||||||
|
4.003884 8.187000 115.084118
|
||||||
|
3.963092 8.190000 115.126289
|
||||||
|
3.922341 8.193000 115.168460
|
||||||
|
3.881634 8.196000 115.210631
|
||||||
|
3.840973 8.199000 115.252801
|
||||||
|
3.800362 8.202000 115.294972
|
||||||
|
3.759802 8.205000 115.337143
|
||||||
|
3.719297 8.208000 115.379314
|
||||||
|
3.678851 8.211000 115.421485
|
||||||
|
3.638466 8.214000 115.463655
|
||||||
|
3.598146 8.217000 115.505826
|
||||||
|
3.557894 8.220000 115.547997
|
||||||
|
3.517713 8.223000 115.590168
|
||||||
|
3.477606 8.226000 115.632339
|
||||||
|
3.437579 8.229000 115.674509
|
||||||
|
3.397633 8.232000 115.716680
|
||||||
|
3.357773 8.235000 115.758851
|
||||||
|
3.318002 8.238000 115.801022
|
||||||
|
3.278325 8.241000 115.843193
|
||||||
|
3.238744 8.244000 115.885363
|
||||||
|
3.199265 8.247000 115.927534
|
||||||
|
3.159891 8.250000 115.969705
|
||||||
|
3.120627 8.253000 116.011876
|
||||||
|
3.081476 8.256000 116.054047
|
||||||
|
3.042442 8.259000 116.096217
|
||||||
|
3.003531 8.262000 116.138388
|
||||||
|
2.964745 8.265000 116.180559
|
||||||
|
2.926091 8.268000 116.222730
|
||||||
|
2.887572 8.271000 116.264901
|
||||||
|
2.849192 8.274000 116.307071
|
||||||
|
2.810956 8.277000 116.349242
|
||||||
|
2.772869 8.280000 116.391413
|
||||||
|
2.734936 8.283000 116.433584
|
||||||
|
2.697160 8.286000 116.475755
|
||||||
|
2.659548 8.289000 116.517925
|
||||||
|
2.622102 8.292000 116.560096
|
||||||
|
2.584828 8.295000 116.602267
|
||||||
|
2.547732 8.298000 116.644438
|
||||||
|
2.510816 8.301000 116.686609
|
||||||
|
2.474087 8.304000 116.728779
|
||||||
|
2.437548 8.307000 116.770950
|
||||||
|
2.401205 8.310000 116.813121
|
||||||
|
2.365063 8.313000 116.855292
|
||||||
|
2.329125 8.316000 116.897463
|
||||||
|
2.293397 8.319000 116.939633
|
||||||
|
2.257882 8.322000 116.981804
|
||||||
|
2.222587 8.325000 117.023975
|
||||||
|
2.187515 8.328000 117.066146
|
||||||
|
2.152670 8.331000 117.108317
|
||||||
|
2.118057 8.334000 117.150487
|
||||||
|
2.083681 8.337000 117.192658
|
||||||
|
2.049545 8.340000 117.234829
|
||||||
|
2.015654 8.343000 117.277000
|
||||||
|
1.982012 8.346000 117.319171
|
||||||
|
1.948622 8.349000 117.361341
|
||||||
|
1.915490 8.352000 117.403512
|
||||||
|
1.882618 8.355000 117.445683
|
||||||
|
1.850010 8.358000 117.487854
|
||||||
|
1.817670 8.361000 117.530025
|
||||||
|
1.785601 8.364000 117.572195
|
||||||
|
1.753807 8.367000 117.614366
|
||||||
|
1.722290 8.370000 117.656537
|
||||||
|
1.691054 8.373000 117.698708
|
||||||
|
1.660102 8.376000 117.740879
|
||||||
|
1.629437 8.379000 117.783049
|
||||||
|
1.599061 8.382000 117.825220
|
||||||
|
1.568976 8.385000 117.867391
|
||||||
|
1.539186 8.388000 117.909562
|
||||||
|
1.509691 8.391000 117.951733
|
||||||
|
1.480495 8.394000 117.993903
|
||||||
|
1.451599 8.397000 118.036074
|
||||||
|
1.423005 8.400000 118.078245
|
||||||
|
1.394714 8.403000 118.120416
|
||||||
|
1.366728 8.406000 118.162587
|
||||||
|
1.339048 8.409000 118.204757
|
||||||
|
1.311675 8.412000 118.246928
|
||||||
|
1.284610 8.415000 118.289099
|
||||||
|
1.257854 8.418000 118.331270
|
||||||
|
1.231406 8.421000 118.373441
|
||||||
|
1.205269 8.424000 118.415611
|
||||||
|
1.179442 8.427000 118.457782
|
||||||
|
1.153924 8.430000 118.499953
|
||||||
|
1.128717 8.433000 118.542124
|
||||||
|
1.103819 8.436000 118.584295
|
||||||
|
1.079232 8.439000 118.626465
|
||||||
|
1.054953 8.442000 118.668636
|
||||||
|
1.030983 8.445000 118.710807
|
||||||
|
1.007320 8.448000 118.752978
|
||||||
|
0.983964 8.451000 118.795149
|
||||||
|
0.960914 8.454000 118.837319
|
||||||
|
0.938169 8.457000 118.879490
|
||||||
|
0.915727 8.460000 118.921661
|
||||||
|
0.893587 8.463000 118.963832
|
||||||
|
0.871748 8.466000 119.006003
|
||||||
|
0.850208 8.469000 119.048173
|
||||||
|
0.828965 8.472000 119.090344
|
||||||
|
0.808018 8.475000 119.132515
|
||||||
|
0.787364 8.478000 119.174686
|
||||||
|
0.767002 8.481000 119.216857
|
||||||
|
0.746929 8.484000 119.259027
|
||||||
|
0.727144 8.487000 119.301198
|
||||||
|
0.707644 8.490000 119.343369
|
||||||
|
0.688427 8.493000 119.385540
|
||||||
|
0.669490 8.496000 119.427711
|
||||||
|
0.650832 8.499000 119.469881
|
||||||
|
0.632449 8.502000 119.512052
|
||||||
|
0.614339 8.505000 119.554223
|
||||||
|
0.596501 8.508000 119.596394
|
||||||
|
0.578930 8.511000 119.638565
|
||||||
|
0.561624 8.514000 119.680735
|
||||||
|
0.544581 8.517000 119.722906
|
||||||
|
0.527799 8.520000 119.765077
|
||||||
|
0.511273 8.523000 119.807248
|
||||||
|
0.495002 8.526000 119.849419
|
||||||
|
0.478982 8.529000 119.891590
|
||||||
|
0.463211 8.532000 119.933760
|
||||||
|
0.447687 8.535000 119.975931
|
||||||
|
0.432405 8.538000 120.018102
|
||||||
|
0.417364 8.541000 120.060273
|
||||||
|
0.402561 8.544000 120.102444
|
||||||
|
0.387987 8.547000 120.144614
|
||||||
|
0.373648 8.550000 120.186785
|
||||||
|
0.359550 8.553000 120.228956
|
||||||
|
0.345693 8.556000 120.271127
|
||||||
|
0.332077 8.559000 120.313298
|
||||||
|
0.318700 8.562000 120.355468
|
||||||
|
0.305562 8.565000 120.397639
|
||||||
|
0.292663 8.568000 120.439810
|
||||||
|
0.280000 8.571000 120.481981
|
||||||
|
0.267575 8.574000 120.524152
|
||||||
|
0.255385 8.577000 120.566322
|
||||||
|
0.243429 8.580000 120.608493
|
||||||
|
0.231708 8.583000 120.650664
|
||||||
|
0.220218 8.586000 120.692835
|
||||||
|
0.208957 8.589000 120.735006
|
||||||
|
0.197919 8.592000 120.777176
|
||||||
|
0.187105 8.595000 120.819347
|
||||||
|
0.176517 8.598000 120.861518
|
||||||
|
0.166153 8.601000 120.903689
|
||||||
|
0.156014 8.604000 120.945860
|
||||||
|
0.146097 8.607000 120.988030
|
||||||
|
0.136400 8.610000 121.030201
|
||||||
|
0.126923 8.613000 121.072372
|
||||||
|
0.117662 8.616000 121.114543
|
||||||
|
0.108615 8.619000 121.156714
|
||||||
|
0.099780 8.622000 121.198884
|
||||||
|
0.091152 8.625000 121.241055
|
||||||
|
0.082728 8.628000 121.283226
|
||||||
|
0.074502 8.631000 121.325397
|
||||||
|
0.066467 8.634000 121.367568
|
||||||
|
0.058616 8.637000 121.409738
|
||||||
|
0.050936 8.640000 121.451909
|
||||||
|
0.043415 8.643000 121.494080
|
||||||
|
0.036031 8.646000 121.536251
|
||||||
|
0.028755 8.649000 121.578422
|
||||||
|
0.021544 8.652000 121.620592
|
||||||
|
0.014324 8.655000 121.662763
|
||||||
|
0.006975 8.658000 121.704934
|
||||||
|
0.000000 8.661000 121.747105
|
||||||
733
eloss_calculations/oxygen_lookup_70MeV_250torr_4pc.dat
Normal file
733
eloss_calculations/oxygen_lookup_70MeV_250torr_4pc.dat
Normal file
|
|
@ -0,0 +1,733 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 70 MeV
|
||||||
|
70.000000 0.000000 0.000000
|
||||||
|
69.909891 0.016000 0.208857
|
||||||
|
69.819705 0.032000 0.417714
|
||||||
|
69.729442 0.048000 0.626571
|
||||||
|
69.639103 0.064000 0.835428
|
||||||
|
69.548686 0.080000 1.044285
|
||||||
|
69.458192 0.096000 1.253142
|
||||||
|
69.367620 0.112000 1.461999
|
||||||
|
69.276971 0.128000 1.670856
|
||||||
|
69.186244 0.144000 1.879713
|
||||||
|
69.095438 0.160000 2.088570
|
||||||
|
69.004554 0.176000 2.297427
|
||||||
|
68.913592 0.192000 2.506284
|
||||||
|
68.822550 0.208000 2.715141
|
||||||
|
68.731430 0.224000 2.923998
|
||||||
|
68.640230 0.240000 3.132855
|
||||||
|
68.548951 0.256000 3.341712
|
||||||
|
68.457593 0.272000 3.550569
|
||||||
|
68.366154 0.288000 3.759426
|
||||||
|
68.274636 0.304000 3.968283
|
||||||
|
68.183037 0.320000 4.177140
|
||||||
|
68.091358 0.336000 4.385997
|
||||||
|
67.999598 0.352000 4.594854
|
||||||
|
67.907757 0.368000 4.803711
|
||||||
|
67.815835 0.384000 5.012568
|
||||||
|
67.723832 0.400000 5.221425
|
||||||
|
67.631747 0.416000 5.430282
|
||||||
|
67.539581 0.432000 5.639139
|
||||||
|
67.447332 0.448000 5.847996
|
||||||
|
67.355002 0.464000 6.056853
|
||||||
|
67.262589 0.480000 6.265710
|
||||||
|
67.170093 0.496000 6.474567
|
||||||
|
67.077514 0.512000 6.683424
|
||||||
|
66.984852 0.528000 6.892281
|
||||||
|
66.892107 0.544000 7.101138
|
||||||
|
66.799279 0.560000 7.309995
|
||||||
|
66.706366 0.576000 7.518852
|
||||||
|
66.613370 0.592000 7.727709
|
||||||
|
66.520289 0.608000 7.936566
|
||||||
|
66.427124 0.624000 8.145423
|
||||||
|
66.333874 0.640000 8.354280
|
||||||
|
66.240539 0.656000 8.563137
|
||||||
|
66.147119 0.672000 8.771994
|
||||||
|
66.053614 0.688000 8.980851
|
||||||
|
65.960023 0.704000 9.189708
|
||||||
|
65.866346 0.720000 9.398565
|
||||||
|
65.772583 0.736000 9.607422
|
||||||
|
65.678734 0.752000 9.816279
|
||||||
|
65.584798 0.768000 10.025136
|
||||||
|
65.490775 0.784000 10.233993
|
||||||
|
65.396666 0.800000 10.442850
|
||||||
|
65.302468 0.816000 10.651707
|
||||||
|
65.208184 0.832000 10.860564
|
||||||
|
65.113811 0.848000 11.069421
|
||||||
|
65.019351 0.864000 11.278278
|
||||||
|
64.924802 0.880000 11.487135
|
||||||
|
64.830164 0.896000 11.695992
|
||||||
|
64.735438 0.912000 11.904849
|
||||||
|
64.640623 0.928000 12.113706
|
||||||
|
64.545718 0.944000 12.322563
|
||||||
|
64.450724 0.960000 12.531420
|
||||||
|
64.355640 0.976000 12.740277
|
||||||
|
64.260466 0.992000 12.949134
|
||||||
|
64.165202 1.008000 13.157991
|
||||||
|
64.069847 1.024000 13.366848
|
||||||
|
63.974401 1.040000 13.575705
|
||||||
|
63.878864 1.056000 13.784562
|
||||||
|
63.783236 1.072000 13.993419
|
||||||
|
63.687516 1.088000 14.202276
|
||||||
|
63.591704 1.104000 14.411133
|
||||||
|
63.495800 1.120000 14.619990
|
||||||
|
63.399803 1.136000 14.828847
|
||||||
|
63.303714 1.152000 15.037704
|
||||||
|
63.207532 1.168000 15.246561
|
||||||
|
63.111256 1.184000 15.455418
|
||||||
|
63.014887 1.200000 15.664275
|
||||||
|
62.918424 1.216000 15.873132
|
||||||
|
62.821868 1.232000 16.081989
|
||||||
|
62.725216 1.248000 16.290846
|
||||||
|
62.628471 1.264000 16.499703
|
||||||
|
62.531630 1.280000 16.708560
|
||||||
|
62.434694 1.296000 16.917417
|
||||||
|
62.337662 1.312000 17.126274
|
||||||
|
62.240535 1.328000 17.335131
|
||||||
|
62.143312 1.344000 17.543988
|
||||||
|
62.045992 1.360000 17.752845
|
||||||
|
61.948576 1.376000 17.961702
|
||||||
|
61.851063 1.392000 18.170559
|
||||||
|
61.753453 1.408000 18.379416
|
||||||
|
61.655745 1.424000 18.588273
|
||||||
|
61.557939 1.440000 18.797130
|
||||||
|
61.460035 1.456000 19.005987
|
||||||
|
61.362033 1.472000 19.214844
|
||||||
|
61.263933 1.488000 19.423701
|
||||||
|
61.165733 1.504000 19.632558
|
||||||
|
61.067434 1.520000 19.841415
|
||||||
|
60.969035 1.536000 20.050272
|
||||||
|
60.870536 1.552000 20.259129
|
||||||
|
60.771938 1.568000 20.467986
|
||||||
|
60.673238 1.584000 20.676843
|
||||||
|
60.574438 1.600000 20.885700
|
||||||
|
60.475537 1.616000 21.094557
|
||||||
|
60.376535 1.632000 21.303414
|
||||||
|
60.277430 1.648000 21.512271
|
||||||
|
60.178224 1.664000 21.721128
|
||||||
|
60.078915 1.680000 21.929985
|
||||||
|
59.979503 1.696000 22.138842
|
||||||
|
59.879989 1.712000 22.347699
|
||||||
|
59.780371 1.728000 22.556556
|
||||||
|
59.680649 1.744000 22.765413
|
||||||
|
59.580824 1.760000 22.974270
|
||||||
|
59.480894 1.776000 23.183127
|
||||||
|
59.380859 1.792000 23.391984
|
||||||
|
59.280719 1.808000 23.600841
|
||||||
|
59.180474 1.824000 23.809698
|
||||||
|
59.080124 1.840000 24.018555
|
||||||
|
58.979667 1.856000 24.227412
|
||||||
|
58.879104 1.872000 24.436269
|
||||||
|
58.778435 1.888000 24.645126
|
||||||
|
58.677658 1.904000 24.853983
|
||||||
|
58.576774 1.920000 25.062840
|
||||||
|
58.475783 1.936000 25.271697
|
||||||
|
58.374683 1.952000 25.480554
|
||||||
|
58.273475 1.968000 25.689411
|
||||||
|
58.172158 1.984000 25.898268
|
||||||
|
58.070732 2.000000 26.107125
|
||||||
|
57.969197 2.016000 26.315982
|
||||||
|
57.867551 2.032000 26.524839
|
||||||
|
57.765796 2.048000 26.733696
|
||||||
|
57.663930 2.064000 26.942553
|
||||||
|
57.561953 2.080000 27.151410
|
||||||
|
57.459865 2.096000 27.360267
|
||||||
|
57.357665 2.112000 27.569124
|
||||||
|
57.255354 2.128000 27.777981
|
||||||
|
57.152930 2.144000 27.986838
|
||||||
|
57.050393 2.160000 28.195695
|
||||||
|
56.947743 2.176000 28.404552
|
||||||
|
56.844979 2.192000 28.613409
|
||||||
|
56.742102 2.208000 28.822266
|
||||||
|
56.639110 2.224000 29.031123
|
||||||
|
56.536004 2.240000 29.239980
|
||||||
|
56.432783 2.256000 29.448837
|
||||||
|
56.329446 2.272000 29.657694
|
||||||
|
56.225994 2.288000 29.866551
|
||||||
|
56.122425 2.304000 30.075408
|
||||||
|
56.018740 2.320000 30.284265
|
||||||
|
55.914938 2.336000 30.493122
|
||||||
|
55.811019 2.352000 30.701979
|
||||||
|
55.706981 2.368000 30.910836
|
||||||
|
55.602826 2.384000 31.119693
|
||||||
|
55.498552 2.400000 31.328550
|
||||||
|
55.394159 2.416000 31.537407
|
||||||
|
55.289646 2.432000 31.746264
|
||||||
|
55.185014 2.448000 31.955121
|
||||||
|
55.080261 2.464000 32.163978
|
||||||
|
54.975388 2.480000 32.372835
|
||||||
|
54.870394 2.496000 32.581692
|
||||||
|
54.765278 2.512000 32.790549
|
||||||
|
54.660040 2.528000 32.999406
|
||||||
|
54.554680 2.544000 33.208263
|
||||||
|
54.449198 2.560000 33.417120
|
||||||
|
54.343592 2.576000 33.625977
|
||||||
|
54.237862 2.592000 33.834834
|
||||||
|
54.132008 2.608000 34.043691
|
||||||
|
54.026030 2.624000 34.252548
|
||||||
|
53.919927 2.640000 34.461405
|
||||||
|
53.813699 2.656000 34.670262
|
||||||
|
53.707344 2.672000 34.879119
|
||||||
|
53.600863 2.688000 35.087976
|
||||||
|
53.494256 2.704000 35.296833
|
||||||
|
53.387521 2.720000 35.505690
|
||||||
|
53.280659 2.736000 35.714547
|
||||||
|
53.173669 2.752000 35.923404
|
||||||
|
53.066549 2.768000 36.132261
|
||||||
|
52.959301 2.784000 36.341118
|
||||||
|
52.851924 2.800000 36.549975
|
||||||
|
52.744416 2.816000 36.758832
|
||||||
|
52.636778 2.832000 36.967689
|
||||||
|
52.529009 2.848000 37.176546
|
||||||
|
52.421108 2.864000 37.385403
|
||||||
|
52.313076 2.880000 37.594260
|
||||||
|
52.204911 2.896000 37.803117
|
||||||
|
52.096614 2.912000 38.011974
|
||||||
|
51.988182 2.928000 38.220831
|
||||||
|
51.879617 2.944000 38.429688
|
||||||
|
51.770918 2.960000 38.638545
|
||||||
|
51.662084 2.976000 38.847402
|
||||||
|
51.553114 2.992000 39.056259
|
||||||
|
51.444009 3.008000 39.265116
|
||||||
|
51.334767 3.024000 39.473973
|
||||||
|
51.225388 3.040000 39.682830
|
||||||
|
51.115872 3.056000 39.891687
|
||||||
|
51.006217 3.072000 40.100544
|
||||||
|
50.896425 3.088000 40.309401
|
||||||
|
50.786493 3.104000 40.518258
|
||||||
|
50.676421 3.120000 40.727115
|
||||||
|
50.566210 3.136000 40.935972
|
||||||
|
50.455858 3.152000 41.144829
|
||||||
|
50.345365 3.168000 41.353686
|
||||||
|
50.234730 3.184000 41.562543
|
||||||
|
50.123953 3.200000 41.771400
|
||||||
|
50.013033 3.216000 41.980257
|
||||||
|
49.901969 3.232000 42.189114
|
||||||
|
49.790762 3.248000 42.397971
|
||||||
|
49.679410 3.264000 42.606828
|
||||||
|
49.567913 3.280000 42.815685
|
||||||
|
49.456271 3.296000 43.024542
|
||||||
|
49.344482 3.312000 43.233399
|
||||||
|
49.232547 3.328000 43.442256
|
||||||
|
49.120464 3.344000 43.651113
|
||||||
|
49.008233 3.360000 43.859970
|
||||||
|
48.895854 3.376000 44.068827
|
||||||
|
48.783325 3.392000 44.277684
|
||||||
|
48.670647 3.408000 44.486541
|
||||||
|
48.557819 3.424000 44.695398
|
||||||
|
48.444839 3.440000 44.904255
|
||||||
|
48.331708 3.456000 45.113112
|
||||||
|
48.218425 3.472000 45.321969
|
||||||
|
48.104989 3.488000 45.530826
|
||||||
|
47.991400 3.504000 45.739683
|
||||||
|
47.877656 3.520000 45.948540
|
||||||
|
47.763758 3.536000 46.157397
|
||||||
|
47.649705 3.552000 46.366254
|
||||||
|
47.535496 3.568000 46.575111
|
||||||
|
47.421130 3.584000 46.783968
|
||||||
|
47.306607 3.600000 46.992825
|
||||||
|
47.191926 3.616000 47.201682
|
||||||
|
47.077086 3.632000 47.410540
|
||||||
|
46.962087 3.648000 47.619397
|
||||||
|
46.846929 3.664000 47.828254
|
||||||
|
46.731610 3.680000 48.037111
|
||||||
|
46.616129 3.696000 48.245968
|
||||||
|
46.500487 3.712000 48.454825
|
||||||
|
46.384682 3.728000 48.663682
|
||||||
|
46.268714 3.744000 48.872539
|
||||||
|
46.152582 3.760000 49.081396
|
||||||
|
46.036285 3.776000 49.290253
|
||||||
|
45.919823 3.792000 49.499110
|
||||||
|
45.803194 3.808000 49.707967
|
||||||
|
45.686399 3.824000 49.916824
|
||||||
|
45.569437 3.840000 50.125681
|
||||||
|
45.452306 3.856000 50.334538
|
||||||
|
45.335006 3.872000 50.543395
|
||||||
|
45.217536 3.888000 50.752252
|
||||||
|
45.099896 3.904000 50.961109
|
||||||
|
44.982085 3.920000 51.169966
|
||||||
|
44.864102 3.936000 51.378823
|
||||||
|
44.745946 3.952000 51.587680
|
||||||
|
44.627616 3.968000 51.796537
|
||||||
|
44.509113 3.984000 52.005394
|
||||||
|
44.390434 4.000000 52.214251
|
||||||
|
44.271579 4.016000 52.423108
|
||||||
|
44.152548 4.032000 52.631965
|
||||||
|
44.033339 4.048000 52.840822
|
||||||
|
43.913952 4.064000 53.049679
|
||||||
|
43.794386 4.080000 53.258536
|
||||||
|
43.674641 4.096000 53.467393
|
||||||
|
43.554714 4.112000 53.676250
|
||||||
|
43.434606 4.128000 53.885107
|
||||||
|
43.314316 4.144000 54.093964
|
||||||
|
43.193843 4.160000 54.302821
|
||||||
|
43.073186 4.176000 54.511678
|
||||||
|
42.952343 4.192000 54.720535
|
||||||
|
42.831315 4.208000 54.929392
|
||||||
|
42.710101 4.224000 55.138249
|
||||||
|
42.588699 4.240000 55.347106
|
||||||
|
42.467109 4.256000 55.555963
|
||||||
|
42.345330 4.272000 55.764820
|
||||||
|
42.223360 4.288000 55.973677
|
||||||
|
42.101200 4.304000 56.182534
|
||||||
|
41.978847 4.320000 56.391391
|
||||||
|
41.856302 4.336000 56.600248
|
||||||
|
41.733563 4.352000 56.809105
|
||||||
|
41.610630 4.368000 57.017962
|
||||||
|
41.487500 4.384000 57.226819
|
||||||
|
41.364175 4.400000 57.435676
|
||||||
|
41.240651 4.416000 57.644533
|
||||||
|
41.116930 4.432000 57.853390
|
||||||
|
40.993008 4.448000 58.062247
|
||||||
|
40.868887 4.464000 58.271104
|
||||||
|
40.744564 4.480000 58.479961
|
||||||
|
40.620039 4.496000 58.688818
|
||||||
|
40.495310 4.512000 58.897675
|
||||||
|
40.370377 4.528000 59.106532
|
||||||
|
40.245238 4.544000 59.315389
|
||||||
|
40.119893 4.560000 59.524246
|
||||||
|
39.994341 4.576000 59.733103
|
||||||
|
39.868580 4.592000 59.941960
|
||||||
|
39.742609 4.608000 60.150817
|
||||||
|
39.616428 4.624000 60.359674
|
||||||
|
39.490035 4.640000 60.568531
|
||||||
|
39.363430 4.656000 60.777388
|
||||||
|
39.236610 4.672000 60.986245
|
||||||
|
39.109575 4.688000 61.195102
|
||||||
|
38.982325 4.704000 61.403959
|
||||||
|
38.854857 4.720000 61.612816
|
||||||
|
38.727171 4.736000 61.821673
|
||||||
|
38.599265 4.752000 62.030530
|
||||||
|
38.471139 4.768000 62.239387
|
||||||
|
38.342791 4.784000 62.448244
|
||||||
|
38.214220 4.800000 62.657101
|
||||||
|
38.085425 4.816000 62.865958
|
||||||
|
37.956404 4.832000 63.074815
|
||||||
|
37.827157 4.848000 63.283672
|
||||||
|
37.697682 4.864000 63.492529
|
||||||
|
37.567978 4.880000 63.701386
|
||||||
|
37.438044 4.896000 63.910243
|
||||||
|
37.307879 4.912000 64.119100
|
||||||
|
37.177481 4.928000 64.327957
|
||||||
|
37.046848 4.944000 64.536814
|
||||||
|
36.915981 4.960000 64.745671
|
||||||
|
36.784877 4.976000 64.954528
|
||||||
|
36.653535 4.992000 65.163385
|
||||||
|
36.521954 5.008000 65.372242
|
||||||
|
36.390132 5.024000 65.581099
|
||||||
|
36.258068 5.040000 65.789956
|
||||||
|
36.125761 5.056000 65.998813
|
||||||
|
35.993210 5.072000 66.207670
|
||||||
|
35.860412 5.088000 66.416527
|
||||||
|
35.727367 5.104000 66.625384
|
||||||
|
35.594073 5.120000 66.834241
|
||||||
|
35.460529 5.136000 67.043098
|
||||||
|
35.326733 5.152000 67.251955
|
||||||
|
35.192684 5.168000 67.460812
|
||||||
|
35.058380 5.184000 67.669669
|
||||||
|
34.923820 5.200000 67.878526
|
||||||
|
34.789003 5.216000 68.087383
|
||||||
|
34.653926 5.232000 68.296240
|
||||||
|
34.518589 5.248000 68.505097
|
||||||
|
34.382989 5.264000 68.713954
|
||||||
|
34.247126 5.280000 68.922811
|
||||||
|
34.110997 5.296000 69.131668
|
||||||
|
33.974601 5.312000 69.340525
|
||||||
|
33.837936 5.328000 69.549382
|
||||||
|
33.701001 5.344000 69.758239
|
||||||
|
33.563794 5.360000 69.967096
|
||||||
|
33.426314 5.376000 70.175953
|
||||||
|
33.288558 5.392000 70.384810
|
||||||
|
33.150526 5.408000 70.593667
|
||||||
|
33.012214 5.424000 70.802524
|
||||||
|
32.873622 5.440000 71.011381
|
||||||
|
32.734748 5.456000 71.220238
|
||||||
|
32.595590 5.472000 71.429095
|
||||||
|
32.456145 5.488000 71.637952
|
||||||
|
32.316414 5.504000 71.846809
|
||||||
|
32.176392 5.520000 72.055666
|
||||||
|
32.036079 5.536000 72.264523
|
||||||
|
31.895473 5.552000 72.473380
|
||||||
|
31.754572 5.568000 72.682237
|
||||||
|
31.613373 5.584000 72.891094
|
||||||
|
31.471876 5.600000 73.099951
|
||||||
|
31.330077 5.616000 73.308808
|
||||||
|
31.187975 5.632000 73.517665
|
||||||
|
31.045568 5.648000 73.726522
|
||||||
|
30.902854 5.664000 73.935379
|
||||||
|
30.759830 5.680000 74.144236
|
||||||
|
30.616495 5.696000 74.353093
|
||||||
|
30.472846 5.712000 74.561950
|
||||||
|
30.328882 5.728000 74.770807
|
||||||
|
30.184599 5.744000 74.979664
|
||||||
|
30.039997 5.760000 75.188521
|
||||||
|
29.895072 5.776000 75.397378
|
||||||
|
29.749822 5.792000 75.606235
|
||||||
|
29.604246 5.808000 75.815092
|
||||||
|
29.458340 5.824000 76.023949
|
||||||
|
29.312102 5.840000 76.232806
|
||||||
|
29.165530 5.856000 76.441663
|
||||||
|
29.018622 5.872000 76.650520
|
||||||
|
28.871374 5.888000 76.859377
|
||||||
|
28.723785 5.904000 77.068234
|
||||||
|
28.575852 5.920000 77.277091
|
||||||
|
28.427572 5.936000 77.485948
|
||||||
|
28.278943 5.952000 77.694805
|
||||||
|
28.129962 5.968000 77.903662
|
||||||
|
27.980627 5.984000 78.112519
|
||||||
|
27.830933 6.000000 78.321376
|
||||||
|
27.680880 6.016000 78.530233
|
||||||
|
27.530464 6.032000 78.739090
|
||||||
|
27.379682 6.048000 78.947947
|
||||||
|
27.228531 6.064000 79.156804
|
||||||
|
27.077009 6.080000 79.365661
|
||||||
|
26.925112 6.096000 79.574518
|
||||||
|
26.772837 6.112000 79.783375
|
||||||
|
26.620181 6.128000 79.992232
|
||||||
|
26.467142 6.144000 80.201089
|
||||||
|
26.313715 6.160000 80.409946
|
||||||
|
26.159898 6.176000 80.618803
|
||||||
|
26.005688 6.192000 80.827660
|
||||||
|
25.851080 6.208000 81.036517
|
||||||
|
25.696072 6.224000 81.245374
|
||||||
|
25.540660 6.240000 81.454231
|
||||||
|
25.384841 6.256000 81.663088
|
||||||
|
25.228611 6.272000 81.871945
|
||||||
|
25.071966 6.288000 82.080802
|
||||||
|
24.914903 6.304000 82.289659
|
||||||
|
24.757417 6.320000 82.498516
|
||||||
|
24.599506 6.336000 82.707373
|
||||||
|
24.441165 6.352000 82.916230
|
||||||
|
24.282390 6.368000 83.125087
|
||||||
|
24.123177 6.384000 83.333944
|
||||||
|
23.963521 6.400000 83.542801
|
||||||
|
23.803420 6.416000 83.751658
|
||||||
|
23.642867 6.432000 83.960515
|
||||||
|
23.481860 6.448000 84.169372
|
||||||
|
23.320392 6.464000 84.378229
|
||||||
|
23.158461 6.480000 84.587086
|
||||||
|
22.996061 6.496000 84.795943
|
||||||
|
22.833187 6.512000 85.004800
|
||||||
|
22.669834 6.528000 85.213657
|
||||||
|
22.505998 6.544000 85.422514
|
||||||
|
22.341673 6.560000 85.631371
|
||||||
|
22.176854 6.576000 85.840228
|
||||||
|
22.011536 6.592000 86.049085
|
||||||
|
21.845714 6.608000 86.257942
|
||||||
|
21.679380 6.624000 86.466799
|
||||||
|
21.512531 6.640000 86.675656
|
||||||
|
21.345160 6.656000 86.884513
|
||||||
|
21.177261 6.672000 87.093370
|
||||||
|
21.008827 6.688000 87.302227
|
||||||
|
20.839853 6.704000 87.511084
|
||||||
|
20.670332 6.720000 87.719941
|
||||||
|
20.500258 6.736000 87.928798
|
||||||
|
20.329623 6.752000 88.137655
|
||||||
|
20.158420 6.768000 88.346512
|
||||||
|
19.986667 6.784000 88.555369
|
||||||
|
19.814394 6.800000 88.764226
|
||||||
|
19.641599 6.816000 88.973083
|
||||||
|
19.468276 6.832000 89.181940
|
||||||
|
19.294422 6.848000 89.390797
|
||||||
|
19.120032 6.864000 89.599654
|
||||||
|
18.945100 6.880000 89.808511
|
||||||
|
18.769622 6.896000 90.017368
|
||||||
|
18.593593 6.912000 90.226225
|
||||||
|
18.417008 6.928000 90.435082
|
||||||
|
18.239861 6.944000 90.643939
|
||||||
|
18.062148 6.960000 90.852796
|
||||||
|
17.883862 6.976000 91.061653
|
||||||
|
17.705000 6.992000 91.270510
|
||||||
|
17.525554 7.008000 91.479367
|
||||||
|
17.345520 7.024000 91.688224
|
||||||
|
17.164892 7.040000 91.897081
|
||||||
|
16.983664 7.056000 92.105938
|
||||||
|
16.801830 7.072000 92.314795
|
||||||
|
16.619384 7.088000 92.523652
|
||||||
|
16.436320 7.104000 92.732509
|
||||||
|
16.252632 7.120000 92.941366
|
||||||
|
16.068314 7.136000 93.150223
|
||||||
|
15.883359 7.152000 93.359080
|
||||||
|
15.697760 7.168000 93.567937
|
||||||
|
15.511512 7.184000 93.776794
|
||||||
|
15.324606 7.200000 93.985651
|
||||||
|
15.137037 7.216000 94.194508
|
||||||
|
14.948797 7.232000 94.403365
|
||||||
|
14.759879 7.248000 94.612222
|
||||||
|
14.570275 7.264000 94.821079
|
||||||
|
14.379980 7.280000 95.029936
|
||||||
|
14.188984 7.296000 95.238793
|
||||||
|
13.997280 7.312000 95.447650
|
||||||
|
13.804861 7.328000 95.656507
|
||||||
|
13.611718 7.344000 95.865364
|
||||||
|
13.417843 7.360000 96.074221
|
||||||
|
13.223229 7.376000 96.283078
|
||||||
|
13.027867 7.392000 96.491935
|
||||||
|
12.831748 7.408000 96.700792
|
||||||
|
12.634865 7.424000 96.909649
|
||||||
|
12.437208 7.440000 97.118506
|
||||||
|
12.238769 7.456000 97.327363
|
||||||
|
12.039540 7.472000 97.536220
|
||||||
|
11.839510 7.488000 97.745077
|
||||||
|
11.638673 7.504000 97.953934
|
||||||
|
11.437018 7.520000 98.162791
|
||||||
|
11.234538 7.536000 98.371648
|
||||||
|
11.031252 7.552000 98.580505
|
||||||
|
10.827242 7.568000 98.789362
|
||||||
|
10.622517 7.584000 98.998219
|
||||||
|
10.417079 7.600000 99.207076
|
||||||
|
10.210928 7.616000 99.415933
|
||||||
|
10.004069 7.632000 99.624790
|
||||||
|
9.796506 7.648000 99.833647
|
||||||
|
9.588243 7.664000 100.042504
|
||||||
|
9.379290 7.680000 100.251361
|
||||||
|
9.169656 7.696000 100.460218
|
||||||
|
8.959353 7.712000 100.669075
|
||||||
|
8.748397 7.728000 100.877932
|
||||||
|
8.536807 7.744000 101.086789
|
||||||
|
8.324604 7.760000 101.295646
|
||||||
|
8.111816 7.776000 101.504503
|
||||||
|
7.898474 7.792000 101.713360
|
||||||
|
7.684619 7.808000 101.922217
|
||||||
|
7.470294 7.824000 102.131074
|
||||||
|
7.430060 7.827000 102.170235
|
||||||
|
7.389811 7.830000 102.209395
|
||||||
|
7.349549 7.833000 102.248556
|
||||||
|
7.309274 7.836000 102.287717
|
||||||
|
7.268985 7.839000 102.326878
|
||||||
|
7.228684 7.842000 102.366038
|
||||||
|
7.188371 7.845000 102.405199
|
||||||
|
7.148046 7.848000 102.444360
|
||||||
|
7.107710 7.851000 102.483520
|
||||||
|
7.067363 7.854000 102.522681
|
||||||
|
7.027001 7.857000 102.561842
|
||||||
|
6.986609 7.860000 102.601002
|
||||||
|
6.946186 7.863000 102.640163
|
||||||
|
6.905732 7.866000 102.679324
|
||||||
|
6.865247 7.869000 102.718484
|
||||||
|
6.824729 7.872000 102.757645
|
||||||
|
6.784178 7.875000 102.796806
|
||||||
|
6.743596 7.878000 102.835966
|
||||||
|
6.702982 7.881000 102.875127
|
||||||
|
6.662336 7.884000 102.914288
|
||||||
|
6.621658 7.887000 102.953449
|
||||||
|
6.580949 7.890000 102.992609
|
||||||
|
6.540209 7.893000 103.031770
|
||||||
|
6.499438 7.896000 103.070931
|
||||||
|
6.458637 7.899000 103.110091
|
||||||
|
6.417805 7.902000 103.149252
|
||||||
|
6.376943 7.905000 103.188413
|
||||||
|
6.336051 7.908000 103.227573
|
||||||
|
6.295130 7.911000 103.266734
|
||||||
|
6.254179 7.914000 103.305895
|
||||||
|
6.213200 7.917000 103.345055
|
||||||
|
6.172193 7.920000 103.384216
|
||||||
|
6.131157 7.923000 103.423377
|
||||||
|
6.090094 7.926000 103.462537
|
||||||
|
6.049003 7.929000 103.501698
|
||||||
|
6.007885 7.932000 103.540859
|
||||||
|
5.966742 7.935000 103.580020
|
||||||
|
5.925572 7.938000 103.619180
|
||||||
|
5.884376 7.941000 103.658341
|
||||||
|
5.843156 7.944000 103.697502
|
||||||
|
5.801912 7.947000 103.736662
|
||||||
|
5.760644 7.950000 103.775823
|
||||||
|
5.719352 7.953000 103.814984
|
||||||
|
5.678038 7.956000 103.854144
|
||||||
|
5.636702 7.959000 103.893305
|
||||||
|
5.595345 7.962000 103.932466
|
||||||
|
5.553967 7.965000 103.971626
|
||||||
|
5.512570 7.968000 104.010787
|
||||||
|
5.471153 7.971000 104.049948
|
||||||
|
5.429718 7.974000 104.089108
|
||||||
|
5.388266 7.977000 104.128269
|
||||||
|
5.346797 7.980000 104.167430
|
||||||
|
5.305312 7.983000 104.206591
|
||||||
|
5.263812 7.986000 104.245751
|
||||||
|
5.222299 7.989000 104.284912
|
||||||
|
5.180773 7.992000 104.324073
|
||||||
|
5.139235 7.995000 104.363233
|
||||||
|
5.097687 7.998000 104.402394
|
||||||
|
5.056129 8.001000 104.441555
|
||||||
|
5.014562 8.004000 104.480715
|
||||||
|
4.972989 8.007000 104.519876
|
||||||
|
4.931409 8.010000 104.559037
|
||||||
|
4.889825 8.013000 104.598197
|
||||||
|
4.848238 8.016000 104.637358
|
||||||
|
4.806648 8.019000 104.676519
|
||||||
|
4.765059 8.022000 104.715679
|
||||||
|
4.723470 8.025000 104.754840
|
||||||
|
4.681884 8.028000 104.794001
|
||||||
|
4.640302 8.031000 104.833162
|
||||||
|
4.598726 8.034000 104.872322
|
||||||
|
4.557157 8.037000 104.911483
|
||||||
|
4.515598 8.040000 104.950644
|
||||||
|
4.474050 8.043000 104.989804
|
||||||
|
4.432516 8.046000 105.028965
|
||||||
|
4.390996 8.049000 105.068126
|
||||||
|
4.349493 8.052000 105.107286
|
||||||
|
4.308009 8.055000 105.146447
|
||||||
|
4.266547 8.058000 105.185608
|
||||||
|
4.225108 8.061000 105.224768
|
||||||
|
4.183695 8.064000 105.263929
|
||||||
|
4.142310 8.067000 105.303090
|
||||||
|
4.100955 8.070000 105.342250
|
||||||
|
4.059634 8.073000 105.381411
|
||||||
|
4.018348 8.076000 105.420572
|
||||||
|
3.977100 8.079000 105.459733
|
||||||
|
3.935893 8.082000 105.498893
|
||||||
|
3.894730 8.085000 105.538054
|
||||||
|
3.853614 8.088000 105.577215
|
||||||
|
3.812547 8.091000 105.616375
|
||||||
|
3.771532 8.094000 105.655536
|
||||||
|
3.730573 8.097000 105.694697
|
||||||
|
3.689673 8.100000 105.733857
|
||||||
|
3.648835 8.103000 105.773018
|
||||||
|
3.608062 8.106000 105.812179
|
||||||
|
3.567358 8.109000 105.851339
|
||||||
|
3.526726 8.112000 105.890500
|
||||||
|
3.486170 8.115000 105.929661
|
||||||
|
3.445693 8.118000 105.968821
|
||||||
|
3.405299 8.121000 106.007982
|
||||||
|
3.364992 8.124000 106.047143
|
||||||
|
3.324776 8.127000 106.086304
|
||||||
|
3.284655 8.130000 106.125464
|
||||||
|
3.244632 8.133000 106.164625
|
||||||
|
3.204712 8.136000 106.203786
|
||||||
|
3.164899 8.139000 106.242946
|
||||||
|
3.125197 8.142000 106.282107
|
||||||
|
3.085610 8.145000 106.321268
|
||||||
|
3.046144 8.148000 106.360428
|
||||||
|
3.006801 8.151000 106.399589
|
||||||
|
2.967587 8.154000 106.438750
|
||||||
|
2.928506 8.157000 106.477910
|
||||||
|
2.889563 8.160000 106.517071
|
||||||
|
2.850762 8.163000 106.556232
|
||||||
|
2.812108 8.166000 106.595393
|
||||||
|
2.773606 8.169000 106.634553
|
||||||
|
2.735261 8.172000 106.673714
|
||||||
|
2.697076 8.175000 106.712875
|
||||||
|
2.659058 8.178000 106.752035
|
||||||
|
2.621210 8.181000 106.791196
|
||||||
|
2.583538 8.184000 106.830357
|
||||||
|
2.546047 8.187000 106.869517
|
||||||
|
2.508741 8.190000 106.908678
|
||||||
|
2.471625 8.193000 106.947839
|
||||||
|
2.434704 8.196000 106.986999
|
||||||
|
2.397983 8.199000 107.026160
|
||||||
|
2.361467 8.202000 107.065321
|
||||||
|
2.325160 8.205000 107.104481
|
||||||
|
2.289068 8.208000 107.143642
|
||||||
|
2.253195 8.211000 107.182803
|
||||||
|
2.217545 8.214000 107.221964
|
||||||
|
2.182124 8.217000 107.261124
|
||||||
|
2.146936 8.220000 107.300285
|
||||||
|
2.111985 8.223000 107.339446
|
||||||
|
2.077276 8.226000 107.378606
|
||||||
|
2.042814 8.229000 107.417767
|
||||||
|
2.008602 8.232000 107.456928
|
||||||
|
1.974645 8.235000 107.496088
|
||||||
|
1.940946 8.238000 107.535249
|
||||||
|
1.907511 8.241000 107.574410
|
||||||
|
1.874342 8.244000 107.613570
|
||||||
|
1.841444 8.247000 107.652731
|
||||||
|
1.808820 8.250000 107.691892
|
||||||
|
1.776474 8.253000 107.731052
|
||||||
|
1.744409 8.256000 107.770213
|
||||||
|
1.712628 8.259000 107.809374
|
||||||
|
1.681135 8.262000 107.848535
|
||||||
|
1.649933 8.265000 107.887695
|
||||||
|
1.619024 8.268000 107.926856
|
||||||
|
1.588411 8.271000 107.966017
|
||||||
|
1.558096 8.274000 108.005177
|
||||||
|
1.528082 8.277000 108.044338
|
||||||
|
1.498372 8.280000 108.083499
|
||||||
|
1.468967 8.283000 108.122659
|
||||||
|
1.439869 8.286000 108.161820
|
||||||
|
1.411079 8.289000 108.200981
|
||||||
|
1.382600 8.292000 108.240141
|
||||||
|
1.354433 8.295000 108.279302
|
||||||
|
1.326579 8.298000 108.318463
|
||||||
|
1.299038 8.301000 108.357623
|
||||||
|
1.271813 8.304000 108.396784
|
||||||
|
1.244903 8.307000 108.435945
|
||||||
|
1.218309 8.310000 108.475106
|
||||||
|
1.192032 8.313000 108.514266
|
||||||
|
1.166071 8.316000 108.553427
|
||||||
|
1.140428 8.319000 108.592588
|
||||||
|
1.115101 8.322000 108.631748
|
||||||
|
1.090090 8.325000 108.670909
|
||||||
|
1.065395 8.328000 108.710070
|
||||||
|
1.041016 8.331000 108.749230
|
||||||
|
1.016951 8.334000 108.788391
|
||||||
|
0.993201 8.337000 108.827552
|
||||||
|
0.969763 8.340000 108.866712
|
||||||
|
0.946638 8.343000 108.905873
|
||||||
|
0.923823 8.346000 108.945034
|
||||||
|
0.901317 8.349000 108.984194
|
||||||
|
0.879119 8.352000 109.023355
|
||||||
|
0.857227 8.355000 109.062516
|
||||||
|
0.835640 8.358000 109.101677
|
||||||
|
0.814355 8.361000 109.140837
|
||||||
|
0.793372 8.364000 109.179998
|
||||||
|
0.772687 8.367000 109.219159
|
||||||
|
0.752298 8.370000 109.258319
|
||||||
|
0.732205 8.373000 109.297480
|
||||||
|
0.712403 8.376000 109.336641
|
||||||
|
0.692892 8.379000 109.375801
|
||||||
|
0.673668 8.382000 109.414962
|
||||||
|
0.654729 8.385000 109.454123
|
||||||
|
0.636073 8.388000 109.493283
|
||||||
|
0.617697 8.391000 109.532444
|
||||||
|
0.599598 8.394000 109.571605
|
||||||
|
0.581774 8.397000 109.610765
|
||||||
|
0.564222 8.400000 109.649926
|
||||||
|
0.546939 8.403000 109.689087
|
||||||
|
0.529923 8.406000 109.728248
|
||||||
|
0.513170 8.409000 109.767408
|
||||||
|
0.496678 8.412000 109.806569
|
||||||
|
0.480444 8.415000 109.845730
|
||||||
|
0.464465 8.418000 109.884890
|
||||||
|
0.448737 8.421000 109.924051
|
||||||
|
0.433259 8.424000 109.963212
|
||||||
|
0.418028 8.427000 110.002372
|
||||||
|
0.403039 8.430000 110.041533
|
||||||
|
0.388287 8.433000 110.080694
|
||||||
|
0.373775 8.436000 110.119854
|
||||||
|
0.359512 8.439000 110.159015
|
||||||
|
0.345497 8.442000 110.198176
|
||||||
|
0.331729 8.445000 110.237336
|
||||||
|
0.318207 8.448000 110.276497
|
||||||
|
0.304929 8.451000 110.315658
|
||||||
|
0.291896 8.454000 110.354819
|
||||||
|
0.279107 8.457000 110.393979
|
||||||
|
0.266560 8.460000 110.433140
|
||||||
|
0.254254 8.463000 110.472301
|
||||||
|
0.242189 8.466000 110.511461
|
||||||
|
0.230363 8.469000 110.550622
|
||||||
|
0.218772 8.472000 110.589783
|
||||||
|
0.207416 8.475000 110.628943
|
||||||
|
0.196286 8.478000 110.668104
|
||||||
|
0.185384 8.481000 110.707265
|
||||||
|
0.174713 8.484000 110.746425
|
||||||
|
0.164270 8.487000 110.785586
|
||||||
|
0.154056 8.490000 110.824747
|
||||||
|
0.144067 8.493000 110.863907
|
||||||
|
0.134303 8.496000 110.903068
|
||||||
|
0.124762 8.499000 110.942229
|
||||||
|
0.115442 8.502000 110.981390
|
||||||
|
0.106339 8.505000 111.020550
|
||||||
|
0.097451 8.508000 111.059711
|
||||||
|
0.088773 8.511000 111.098872
|
||||||
|
0.080302 8.514000 111.138032
|
||||||
|
0.072031 8.517000 111.177193
|
||||||
|
0.063954 8.520000 111.216354
|
||||||
|
0.056060 8.523000 111.255514
|
||||||
|
0.048338 8.526000 111.294675
|
||||||
|
0.040772 8.529000 111.333836
|
||||||
|
0.033336 8.532000 111.372996
|
||||||
|
0.025998 8.535000 111.412157
|
||||||
|
0.018704 8.538000 111.451318
|
||||||
|
0.011363 8.541000 111.490478
|
||||||
|
0.003838 8.544000 111.529639
|
||||||
|
0.001296 8.545000 111.542693
|
||||||
641
eloss_calculations/oxygen_lookup_70MeV_350torr_3pc.dat
Normal file
641
eloss_calculations/oxygen_lookup_70MeV_350torr_3pc.dat
Normal file
|
|
@ -0,0 +1,641 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 70 MeV
|
||||||
|
70.000000 0.000000 0.000000
|
||||||
|
69.888959 0.020000 0.200813
|
||||||
|
69.777801 0.040000 0.401627
|
||||||
|
69.666527 0.060000 0.602440
|
||||||
|
69.555135 0.080000 0.803253
|
||||||
|
69.443625 0.100000 1.004067
|
||||||
|
69.331997 0.120000 1.204880
|
||||||
|
69.220251 0.140000 1.405693
|
||||||
|
69.108386 0.160000 1.606507
|
||||||
|
68.996402 0.180000 1.807320
|
||||||
|
68.884299 0.200000 2.008133
|
||||||
|
68.772075 0.220000 2.208947
|
||||||
|
68.659731 0.240000 2.409760
|
||||||
|
68.547267 0.260000 2.610573
|
||||||
|
68.434681 0.280000 2.811387
|
||||||
|
68.321974 0.300000 3.012200
|
||||||
|
68.209144 0.320000 3.213013
|
||||||
|
68.096193 0.340000 3.413827
|
||||||
|
67.983119 0.360000 3.614640
|
||||||
|
67.869921 0.380000 3.815453
|
||||||
|
67.756600 0.400000 4.016267
|
||||||
|
67.643156 0.420000 4.217080
|
||||||
|
67.529586 0.440000 4.417894
|
||||||
|
67.415892 0.460000 4.618707
|
||||||
|
67.302073 0.480000 4.819520
|
||||||
|
67.188129 0.500000 5.020334
|
||||||
|
67.074058 0.520000 5.221147
|
||||||
|
66.959861 0.540000 5.421960
|
||||||
|
66.845537 0.560000 5.622774
|
||||||
|
66.731086 0.580000 5.823587
|
||||||
|
66.616507 0.600000 6.024400
|
||||||
|
66.501799 0.620000 6.225214
|
||||||
|
66.386964 0.640000 6.426027
|
||||||
|
66.271999 0.660000 6.626840
|
||||||
|
66.156905 0.680000 6.827654
|
||||||
|
66.041681 0.700000 7.028467
|
||||||
|
65.926327 0.720000 7.229280
|
||||||
|
65.810842 0.740000 7.430094
|
||||||
|
65.695225 0.760000 7.630907
|
||||||
|
65.579477 0.780000 7.831720
|
||||||
|
65.463597 0.800000 8.032534
|
||||||
|
65.347584 0.820000 8.233347
|
||||||
|
65.231439 0.840000 8.434160
|
||||||
|
65.115159 0.860000 8.634974
|
||||||
|
64.998746 0.880000 8.835787
|
||||||
|
64.882198 0.900000 9.036600
|
||||||
|
64.765516 0.920000 9.237414
|
||||||
|
64.648698 0.940000 9.438227
|
||||||
|
64.531744 0.960000 9.639040
|
||||||
|
64.414654 0.980000 9.839854
|
||||||
|
64.297427 1.000000 10.040667
|
||||||
|
64.180063 1.020000 10.241480
|
||||||
|
64.062561 1.040000 10.442294
|
||||||
|
63.944921 1.060000 10.643107
|
||||||
|
63.827142 1.080000 10.843920
|
||||||
|
63.709223 1.100000 11.044734
|
||||||
|
63.591165 1.120000 11.245547
|
||||||
|
63.472967 1.140000 11.446360
|
||||||
|
63.354628 1.160000 11.647174
|
||||||
|
63.236148 1.180000 11.847987
|
||||||
|
63.117526 1.200000 12.048801
|
||||||
|
62.998761 1.220000 12.249614
|
||||||
|
62.879854 1.240000 12.450427
|
||||||
|
62.760804 1.260000 12.651241
|
||||||
|
62.641610 1.280000 12.852054
|
||||||
|
62.522271 1.300000 13.052867
|
||||||
|
62.402787 1.320000 13.253681
|
||||||
|
62.283158 1.340000 13.454494
|
||||||
|
62.163383 1.360000 13.655307
|
||||||
|
62.043462 1.380000 13.856121
|
||||||
|
61.923393 1.400000 14.056934
|
||||||
|
61.803177 1.420000 14.257747
|
||||||
|
61.682813 1.440000 14.458561
|
||||||
|
61.562300 1.460000 14.659374
|
||||||
|
61.441638 1.480000 14.860187
|
||||||
|
61.320826 1.500000 15.061001
|
||||||
|
61.199864 1.520000 15.261814
|
||||||
|
61.078751 1.540000 15.462627
|
||||||
|
60.957486 1.560000 15.663441
|
||||||
|
60.836069 1.580000 15.864254
|
||||||
|
60.714500 1.600000 16.065067
|
||||||
|
60.592777 1.620000 16.265881
|
||||||
|
60.470901 1.640000 16.466694
|
||||||
|
60.348870 1.660000 16.667507
|
||||||
|
60.226684 1.680000 16.868321
|
||||||
|
60.104342 1.700000 17.069134
|
||||||
|
59.981845 1.720000 17.269947
|
||||||
|
59.859190 1.740000 17.470761
|
||||||
|
59.736379 1.760000 17.671574
|
||||||
|
59.613409 1.780000 17.872387
|
||||||
|
59.490281 1.800000 18.073201
|
||||||
|
59.366993 1.820000 18.274014
|
||||||
|
59.243545 1.840000 18.474827
|
||||||
|
59.119937 1.860000 18.675641
|
||||||
|
58.996168 1.880000 18.876454
|
||||||
|
58.872238 1.900000 19.077267
|
||||||
|
58.748144 1.920000 19.278081
|
||||||
|
58.623888 1.940000 19.478894
|
||||||
|
58.499468 1.960000 19.679708
|
||||||
|
58.374884 1.980000 19.880521
|
||||||
|
58.250135 2.000000 20.081334
|
||||||
|
58.125220 2.020000 20.282148
|
||||||
|
58.000139 2.040000 20.482961
|
||||||
|
57.874891 2.060000 20.683774
|
||||||
|
57.749475 2.080000 20.884588
|
||||||
|
57.623891 2.100000 21.085401
|
||||||
|
57.498138 2.120000 21.286214
|
||||||
|
57.372215 2.140000 21.487028
|
||||||
|
57.246122 2.160000 21.687841
|
||||||
|
57.119858 2.180000 21.888654
|
||||||
|
56.993422 2.200000 22.089468
|
||||||
|
56.866813 2.220000 22.290281
|
||||||
|
56.740031 2.240000 22.491094
|
||||||
|
56.613076 2.260000 22.691908
|
||||||
|
56.485945 2.280000 22.892721
|
||||||
|
56.358640 2.300000 23.093534
|
||||||
|
56.231158 2.320000 23.294348
|
||||||
|
56.103499 2.340000 23.495161
|
||||||
|
55.975663 2.360000 23.695974
|
||||||
|
55.847649 2.380000 23.896788
|
||||||
|
55.719455 2.400000 24.097601
|
||||||
|
55.591082 2.420000 24.298414
|
||||||
|
55.462528 2.440000 24.499228
|
||||||
|
55.333793 2.460000 24.700041
|
||||||
|
55.204875 2.480000 24.900854
|
||||||
|
55.075775 2.500000 25.101668
|
||||||
|
54.946491 2.520000 25.302481
|
||||||
|
54.817022 2.540000 25.503294
|
||||||
|
54.687369 2.560000 25.704108
|
||||||
|
54.557529 2.580000 25.904921
|
||||||
|
54.427502 2.600000 26.105734
|
||||||
|
54.297288 2.620000 26.306548
|
||||||
|
54.166885 2.640000 26.507361
|
||||||
|
54.036293 2.660000 26.708174
|
||||||
|
53.905510 2.680000 26.908988
|
||||||
|
53.774537 2.700000 27.109801
|
||||||
|
53.643371 2.720000 27.310614
|
||||||
|
53.512013 2.740000 27.511428
|
||||||
|
53.380462 2.760000 27.712241
|
||||||
|
53.248716 2.780000 27.913055
|
||||||
|
53.116775 2.800000 28.113868
|
||||||
|
52.984637 2.820000 28.314681
|
||||||
|
52.852303 2.840000 28.515495
|
||||||
|
52.719771 2.860000 28.716308
|
||||||
|
52.587040 2.880000 28.917121
|
||||||
|
52.454109 2.900000 29.117935
|
||||||
|
52.320977 2.920000 29.318748
|
||||||
|
52.187644 2.940000 29.519561
|
||||||
|
52.054109 2.960000 29.720375
|
||||||
|
51.920370 2.980000 29.921188
|
||||||
|
51.786427 3.000000 30.122001
|
||||||
|
51.652278 3.020000 30.322815
|
||||||
|
51.517923 3.040000 30.523628
|
||||||
|
51.383362 3.060000 30.724441
|
||||||
|
51.248592 3.080000 30.925255
|
||||||
|
51.113612 3.100000 31.126068
|
||||||
|
50.978423 3.120000 31.326881
|
||||||
|
50.843023 3.140000 31.527695
|
||||||
|
50.707411 3.160000 31.728508
|
||||||
|
50.571585 3.180000 31.929321
|
||||||
|
50.435546 3.200000 32.130135
|
||||||
|
50.299291 3.220000 32.330948
|
||||||
|
50.162820 3.240000 32.531761
|
||||||
|
50.026132 3.260000 32.732575
|
||||||
|
49.889226 3.280000 32.933388
|
||||||
|
49.752100 3.300000 33.134201
|
||||||
|
49.614755 3.320000 33.335015
|
||||||
|
49.477187 3.340000 33.535828
|
||||||
|
49.339398 3.360000 33.736641
|
||||||
|
49.201384 3.380000 33.937455
|
||||||
|
49.063146 3.400000 34.138268
|
||||||
|
48.924683 3.420000 34.339081
|
||||||
|
48.785992 3.440000 34.539895
|
||||||
|
48.647074 3.460000 34.740708
|
||||||
|
48.507926 3.480000 34.941521
|
||||||
|
48.368548 3.500000 35.142335
|
||||||
|
48.228938 3.520000 35.343148
|
||||||
|
48.089096 3.540000 35.543962
|
||||||
|
47.949020 3.560000 35.744775
|
||||||
|
47.808709 3.580000 35.945588
|
||||||
|
47.668162 3.600000 36.146402
|
||||||
|
47.527378 3.620000 36.347215
|
||||||
|
47.386355 3.640000 36.548028
|
||||||
|
47.245093 3.660000 36.748842
|
||||||
|
47.103589 3.680000 36.949655
|
||||||
|
46.961843 3.700000 37.150468
|
||||||
|
46.819854 3.720000 37.351282
|
||||||
|
46.677619 3.740000 37.552095
|
||||||
|
46.535139 3.760000 37.752908
|
||||||
|
46.392411 3.780000 37.953722
|
||||||
|
46.249435 3.800000 38.154535
|
||||||
|
46.106209 3.820000 38.355348
|
||||||
|
45.962731 3.840000 38.556162
|
||||||
|
45.819001 3.860000 38.756975
|
||||||
|
45.675017 3.880000 38.957788
|
||||||
|
45.530778 3.900000 39.158602
|
||||||
|
45.386282 3.920000 39.359415
|
||||||
|
45.241528 3.940000 39.560228
|
||||||
|
45.096514 3.960000 39.761042
|
||||||
|
44.951240 3.980000 39.961855
|
||||||
|
44.805703 4.000000 40.162668
|
||||||
|
44.659903 4.020000 40.363482
|
||||||
|
44.513837 4.040000 40.564295
|
||||||
|
44.367505 4.060000 40.765108
|
||||||
|
44.220904 4.080000 40.965922
|
||||||
|
44.074034 4.100000 41.166735
|
||||||
|
43.926893 4.120000 41.367548
|
||||||
|
43.779480 4.140000 41.568362
|
||||||
|
43.631792 4.160000 41.769175
|
||||||
|
43.483829 4.180000 41.969988
|
||||||
|
43.335588 4.200000 42.170802
|
||||||
|
43.187068 4.220000 42.371615
|
||||||
|
43.038268 4.240000 42.572428
|
||||||
|
42.889186 4.260000 42.773242
|
||||||
|
42.739821 4.280000 42.974055
|
||||||
|
42.590170 4.300000 43.174869
|
||||||
|
42.440232 4.320000 43.375682
|
||||||
|
42.290006 4.340000 43.576495
|
||||||
|
42.139489 4.360000 43.777309
|
||||||
|
41.988680 4.380000 43.978122
|
||||||
|
41.837578 4.400000 44.178935
|
||||||
|
41.686180 4.420000 44.379749
|
||||||
|
41.534485 4.440000 44.580562
|
||||||
|
41.382491 4.460000 44.781375
|
||||||
|
41.230196 4.480000 44.982189
|
||||||
|
41.077599 4.500000 45.183002
|
||||||
|
40.924698 4.520000 45.383815
|
||||||
|
40.771490 4.540000 45.584629
|
||||||
|
40.617974 4.560000 45.785442
|
||||||
|
40.464148 4.580000 45.986255
|
||||||
|
40.310010 4.600000 46.187069
|
||||||
|
40.155558 4.620000 46.387882
|
||||||
|
40.000791 4.640000 46.588695
|
||||||
|
39.845705 4.660000 46.789509
|
||||||
|
39.690301 4.680000 46.990322
|
||||||
|
39.534574 4.700000 47.191135
|
||||||
|
39.378524 4.720000 47.391949
|
||||||
|
39.222148 4.740000 47.592762
|
||||||
|
39.065444 4.760000 47.793575
|
||||||
|
38.908410 4.780000 47.994389
|
||||||
|
38.751044 4.800000 48.195202
|
||||||
|
38.593343 4.820000 48.396015
|
||||||
|
38.435307 4.840000 48.596829
|
||||||
|
38.276931 4.860000 48.797642
|
||||||
|
38.118215 4.880000 48.998455
|
||||||
|
37.959156 4.900000 49.199269
|
||||||
|
37.799752 4.920000 49.400082
|
||||||
|
37.640000 4.940000 49.600895
|
||||||
|
37.479898 4.960000 49.801709
|
||||||
|
37.319444 4.980000 50.002522
|
||||||
|
37.158635 5.000000 50.203335
|
||||||
|
36.997469 5.020000 50.404149
|
||||||
|
36.835944 5.040000 50.604962
|
||||||
|
36.674057 5.060000 50.805775
|
||||||
|
36.511805 5.080000 51.006589
|
||||||
|
36.349187 5.100000 51.207402
|
||||||
|
36.186199 5.120000 51.408216
|
||||||
|
36.022839 5.140000 51.609029
|
||||||
|
35.859104 5.160000 51.809842
|
||||||
|
35.694992 5.180000 52.010656
|
||||||
|
35.530500 5.200000 52.211469
|
||||||
|
35.365626 5.220000 52.412282
|
||||||
|
35.200366 5.240000 52.613096
|
||||||
|
35.034718 5.260000 52.813909
|
||||||
|
34.868678 5.280000 53.014722
|
||||||
|
34.702245 5.300000 53.215536
|
||||||
|
34.535416 5.320000 53.416349
|
||||||
|
34.368186 5.340000 53.617162
|
||||||
|
34.200554 5.360000 53.817976
|
||||||
|
34.032516 5.380000 54.018789
|
||||||
|
33.864070 5.400000 54.219602
|
||||||
|
33.695212 5.420000 54.420416
|
||||||
|
33.525939 5.440000 54.621229
|
||||||
|
33.356248 5.460000 54.822042
|
||||||
|
33.186136 5.480000 55.022856
|
||||||
|
33.015599 5.500000 55.223669
|
||||||
|
32.844635 5.520000 55.424482
|
||||||
|
32.673239 5.540000 55.625296
|
||||||
|
32.501409 5.560000 55.826109
|
||||||
|
32.329141 5.580000 56.026922
|
||||||
|
32.156432 5.600000 56.227736
|
||||||
|
31.983278 5.620000 56.428549
|
||||||
|
31.809675 5.640000 56.629362
|
||||||
|
31.635620 5.660000 56.830176
|
||||||
|
31.461109 5.680000 57.030989
|
||||||
|
31.286138 5.700000 57.231802
|
||||||
|
31.110704 5.720000 57.432616
|
||||||
|
30.934803 5.740000 57.633429
|
||||||
|
30.758431 5.760000 57.834242
|
||||||
|
30.581583 5.780000 58.035056
|
||||||
|
30.404256 5.800000 58.235869
|
||||||
|
30.226446 5.820000 58.436682
|
||||||
|
30.048148 5.840000 58.637496
|
||||||
|
29.869358 5.860000 58.838309
|
||||||
|
29.690072 5.880000 59.039123
|
||||||
|
29.510286 5.900000 59.239936
|
||||||
|
29.329995 5.920000 59.440749
|
||||||
|
29.149194 5.940000 59.641563
|
||||||
|
28.967880 5.960000 59.842376
|
||||||
|
28.786046 5.980000 60.043189
|
||||||
|
28.603689 6.000000 60.244003
|
||||||
|
28.420804 6.020000 60.444816
|
||||||
|
28.237385 6.040000 60.645629
|
||||||
|
28.053428 6.060000 60.846443
|
||||||
|
27.868928 6.080000 61.047256
|
||||||
|
27.683879 6.100000 61.248069
|
||||||
|
27.498275 6.120000 61.448883
|
||||||
|
27.312113 6.140000 61.649696
|
||||||
|
27.125386 6.160000 61.850509
|
||||||
|
26.938088 6.180000 62.051323
|
||||||
|
26.750214 6.200000 62.252136
|
||||||
|
26.561758 6.220000 62.452949
|
||||||
|
26.372713 6.240000 62.653763
|
||||||
|
26.183075 6.260000 62.854576
|
||||||
|
25.992837 6.280000 63.055389
|
||||||
|
25.801992 6.300000 63.256203
|
||||||
|
25.610533 6.320000 63.457016
|
||||||
|
25.418456 6.340000 63.657829
|
||||||
|
25.225751 6.360000 63.858643
|
||||||
|
25.032414 6.380000 64.059456
|
||||||
|
24.838436 6.400000 64.260269
|
||||||
|
24.643810 6.420000 64.461083
|
||||||
|
24.448530 6.440000 64.661896
|
||||||
|
24.252587 6.460000 64.862709
|
||||||
|
24.055974 6.480000 65.063523
|
||||||
|
23.858683 6.500000 65.264336
|
||||||
|
23.660706 6.520000 65.465149
|
||||||
|
23.462034 6.540000 65.665963
|
||||||
|
23.262659 6.560000 65.866776
|
||||||
|
23.062573 6.580000 66.067589
|
||||||
|
22.861766 6.600000 66.268403
|
||||||
|
22.660228 6.620000 66.469216
|
||||||
|
22.457952 6.640000 66.670030
|
||||||
|
22.254926 6.660000 66.870843
|
||||||
|
22.051142 6.680000 67.071656
|
||||||
|
21.846588 6.700000 67.272470
|
||||||
|
21.641254 6.720000 67.473283
|
||||||
|
21.435130 6.740000 67.674096
|
||||||
|
21.228203 6.760000 67.874910
|
||||||
|
21.020463 6.780000 68.075723
|
||||||
|
20.811898 6.800000 68.276536
|
||||||
|
20.602495 6.820000 68.477350
|
||||||
|
20.392241 6.840000 68.678163
|
||||||
|
20.181124 6.860000 68.878976
|
||||||
|
19.969160 6.880000 69.079790
|
||||||
|
19.756400 6.900000 69.280603
|
||||||
|
19.542839 6.920000 69.481416
|
||||||
|
19.328469 6.940000 69.682230
|
||||||
|
19.113279 6.960000 69.883043
|
||||||
|
18.897261 6.980000 70.083856
|
||||||
|
18.680406 7.000000 70.284670
|
||||||
|
18.462704 7.020000 70.485483
|
||||||
|
18.244145 7.040000 70.686296
|
||||||
|
18.024719 7.060000 70.887110
|
||||||
|
17.804417 7.080000 71.087923
|
||||||
|
17.583227 7.100000 71.288736
|
||||||
|
17.361140 7.120000 71.489550
|
||||||
|
17.138144 7.140000 71.690363
|
||||||
|
16.914229 7.160000 71.891176
|
||||||
|
16.689383 7.180000 72.091990
|
||||||
|
16.463594 7.200000 72.292803
|
||||||
|
16.236852 7.220000 72.493616
|
||||||
|
16.009144 7.240000 72.694430
|
||||||
|
15.780457 7.260000 72.895243
|
||||||
|
15.550780 7.280000 73.096056
|
||||||
|
15.320099 7.300000 73.296870
|
||||||
|
15.088401 7.320000 73.497683
|
||||||
|
14.855673 7.340000 73.698496
|
||||||
|
14.621902 7.360000 73.899310
|
||||||
|
14.387072 7.380000 74.100123
|
||||||
|
14.151170 7.400000 74.300936
|
||||||
|
13.914181 7.420000 74.501750
|
||||||
|
13.676091 7.440000 74.702563
|
||||||
|
13.436883 7.460000 74.903377
|
||||||
|
13.196543 7.480000 75.104190
|
||||||
|
12.955055 7.500000 75.305003
|
||||||
|
12.712402 7.520000 75.505817
|
||||||
|
12.468568 7.540000 75.706630
|
||||||
|
12.223537 7.560000 75.907443
|
||||||
|
11.977292 7.580000 76.108257
|
||||||
|
11.729816 7.600000 76.309070
|
||||||
|
11.481093 7.620000 76.509883
|
||||||
|
11.231106 7.640000 76.710697
|
||||||
|
10.979893 7.660000 76.911510
|
||||||
|
10.727574 7.680000 77.112323
|
||||||
|
10.474158 7.700000 77.313137
|
||||||
|
10.219647 7.720000 77.513950
|
||||||
|
9.964046 7.740000 77.714763
|
||||||
|
9.707363 7.760000 77.915577
|
||||||
|
9.449611 7.780000 78.116390
|
||||||
|
9.190804 7.800000 78.317203
|
||||||
|
8.930967 7.820000 78.518017
|
||||||
|
8.670126 7.840000 78.718830
|
||||||
|
8.408319 7.860000 78.919643
|
||||||
|
8.145592 7.880000 79.120457
|
||||||
|
7.882002 7.900000 79.321270
|
||||||
|
7.617622 7.920000 79.522083
|
||||||
|
7.352540 7.940000 79.722897
|
||||||
|
7.312723 7.943000 79.753019
|
||||||
|
7.272893 7.946000 79.783141
|
||||||
|
7.233051 7.949000 79.813263
|
||||||
|
7.193197 7.952000 79.843385
|
||||||
|
7.153331 7.955000 79.873507
|
||||||
|
7.113454 7.958000 79.903629
|
||||||
|
7.073566 7.961000 79.933751
|
||||||
|
7.033665 7.964000 79.963873
|
||||||
|
6.993735 7.967000 79.993995
|
||||||
|
6.953774 7.970000 80.024117
|
||||||
|
6.913782 7.973000 80.054239
|
||||||
|
6.873759 7.976000 80.084361
|
||||||
|
6.833704 7.979000 80.114483
|
||||||
|
6.793617 7.982000 80.144605
|
||||||
|
6.753498 7.985000 80.174727
|
||||||
|
6.713347 7.988000 80.204849
|
||||||
|
6.673166 7.991000 80.234971
|
||||||
|
6.632953 7.994000 80.265093
|
||||||
|
6.592709 7.997000 80.295215
|
||||||
|
6.552434 8.000000 80.325337
|
||||||
|
6.512129 8.003000 80.355459
|
||||||
|
6.471793 8.006000 80.385581
|
||||||
|
6.431427 8.009000 80.415703
|
||||||
|
6.391032 8.012000 80.445825
|
||||||
|
6.350607 8.015000 80.475947
|
||||||
|
6.310152 8.018000 80.506069
|
||||||
|
6.269669 8.021000 80.536191
|
||||||
|
6.229157 8.024000 80.566313
|
||||||
|
6.188617 8.027000 80.596435
|
||||||
|
6.148049 8.030000 80.626557
|
||||||
|
6.107453 8.033000 80.656679
|
||||||
|
6.066830 8.036000 80.686801
|
||||||
|
6.026181 8.039000 80.716923
|
||||||
|
5.985505 8.042000 80.747045
|
||||||
|
5.944803 8.045000 80.777167
|
||||||
|
5.904076 8.048000 80.807289
|
||||||
|
5.863323 8.051000 80.837411
|
||||||
|
5.822547 8.054000 80.867533
|
||||||
|
5.781746 8.057000 80.897655
|
||||||
|
5.740923 8.060000 80.927777
|
||||||
|
5.700076 8.063000 80.957899
|
||||||
|
5.659208 8.066000 80.988021
|
||||||
|
5.618318 8.069000 81.018143
|
||||||
|
5.577407 8.072000 81.048265
|
||||||
|
5.536476 8.075000 81.078387
|
||||||
|
5.495525 8.078000 81.108509
|
||||||
|
5.454556 8.081000 81.138631
|
||||||
|
5.413569 8.084000 81.168753
|
||||||
|
5.372565 8.087000 81.198875
|
||||||
|
5.331545 8.090000 81.228997
|
||||||
|
5.290509 8.093000 81.259119
|
||||||
|
5.249459 8.096000 81.289241
|
||||||
|
5.208395 8.099000 81.319363
|
||||||
|
5.167319 8.102000 81.349485
|
||||||
|
5.126232 8.105000 81.379607
|
||||||
|
5.085134 8.108000 81.409729
|
||||||
|
5.044026 8.111000 81.439851
|
||||||
|
5.002911 8.114000 81.469973
|
||||||
|
4.961788 8.117000 81.500095
|
||||||
|
4.920660 8.120000 81.530217
|
||||||
|
4.879527 8.123000 81.560339
|
||||||
|
4.838391 8.126000 81.590461
|
||||||
|
4.797254 8.129000 81.620583
|
||||||
|
4.756115 8.132000 81.650705
|
||||||
|
4.714978 8.135000 81.680827
|
||||||
|
4.673844 8.138000 81.710949
|
||||||
|
4.632713 8.141000 81.741071
|
||||||
|
4.591588 8.144000 81.771193
|
||||||
|
4.550471 8.147000 81.801315
|
||||||
|
4.509363 8.150000 81.831437
|
||||||
|
4.468266 8.153000 81.861559
|
||||||
|
4.427181 8.156000 81.891681
|
||||||
|
4.386112 8.159000 81.921803
|
||||||
|
4.345058 8.162000 81.951925
|
||||||
|
4.304024 8.165000 81.982047
|
||||||
|
4.263010 8.168000 82.012169
|
||||||
|
4.222020 8.171000 82.042291
|
||||||
|
4.181054 8.174000 82.072413
|
||||||
|
4.140116 8.177000 82.102535
|
||||||
|
4.099207 8.180000 82.132657
|
||||||
|
4.058331 8.183000 82.162779
|
||||||
|
4.017489 8.186000 82.192901
|
||||||
|
3.976685 8.189000 82.223023
|
||||||
|
3.935920 8.192000 82.253145
|
||||||
|
3.895198 8.195000 82.283267
|
||||||
|
3.854522 8.198000 82.313389
|
||||||
|
3.813893 8.201000 82.343511
|
||||||
|
3.773316 8.204000 82.373633
|
||||||
|
3.732793 8.207000 82.403755
|
||||||
|
3.692327 8.210000 82.433877
|
||||||
|
3.651921 8.213000 82.463999
|
||||||
|
3.611579 8.216000 82.494121
|
||||||
|
3.571303 8.219000 82.524243
|
||||||
|
3.531098 8.222000 82.554365
|
||||||
|
3.490967 8.225000 82.584487
|
||||||
|
3.450912 8.228000 82.614609
|
||||||
|
3.410939 8.231000 82.644731
|
||||||
|
3.371050 8.234000 82.674853
|
||||||
|
3.331249 8.237000 82.704975
|
||||||
|
3.291540 8.240000 82.735097
|
||||||
|
3.251927 8.243000 82.765219
|
||||||
|
3.212413 8.246000 82.795341
|
||||||
|
3.173004 8.249000 82.825463
|
||||||
|
3.133702 8.252000 82.855585
|
||||||
|
3.094513 8.255000 82.885707
|
||||||
|
3.055440 8.258000 82.915829
|
||||||
|
3.016487 8.261000 82.945951
|
||||||
|
2.977659 8.264000 82.976073
|
||||||
|
2.938961 8.267000 83.006195
|
||||||
|
2.900396 8.270000 83.036317
|
||||||
|
2.861969 8.273000 83.066439
|
||||||
|
2.823685 8.276000 83.096561
|
||||||
|
2.785548 8.279000 83.126683
|
||||||
|
2.747563 8.282000 83.156805
|
||||||
|
2.709734 8.285000 83.186927
|
||||||
|
2.672067 8.288000 83.217049
|
||||||
|
2.634565 8.291000 83.247171
|
||||||
|
2.597234 8.294000 83.277293
|
||||||
|
2.560077 8.297000 83.307415
|
||||||
|
2.523101 8.300000 83.337537
|
||||||
|
2.486309 8.303000 83.367659
|
||||||
|
2.449706 8.306000 83.397781
|
||||||
|
2.413298 8.309000 83.427903
|
||||||
|
2.377088 8.312000 83.458025
|
||||||
|
2.341081 8.315000 83.488147
|
||||||
|
2.305283 8.318000 83.518269
|
||||||
|
2.269696 8.321000 83.548391
|
||||||
|
2.234328 8.324000 83.578513
|
||||||
|
2.199180 8.327000 83.608635
|
||||||
|
2.164259 8.330000 83.638757
|
||||||
|
2.129569 8.333000 83.668879
|
||||||
|
2.095113 8.336000 83.699001
|
||||||
|
2.060897 8.339000 83.729123
|
||||||
|
2.026923 8.342000 83.759245
|
||||||
|
1.993198 8.345000 83.789367
|
||||||
|
1.959724 8.348000 83.819489
|
||||||
|
1.926505 8.351000 83.849611
|
||||||
|
1.893546 8.354000 83.879733
|
||||||
|
1.860849 8.357000 83.909855
|
||||||
|
1.828420 8.360000 83.939977
|
||||||
|
1.796260 8.363000 83.970099
|
||||||
|
1.764374 8.366000 84.000221
|
||||||
|
1.732764 8.369000 84.030343
|
||||||
|
1.701435 8.372000 84.060465
|
||||||
|
1.670388 8.375000 84.090587
|
||||||
|
1.639627 8.378000 84.120709
|
||||||
|
1.609154 8.381000 84.150831
|
||||||
|
1.578972 8.384000 84.180953
|
||||||
|
1.549083 8.387000 84.211075
|
||||||
|
1.519490 8.390000 84.241197
|
||||||
|
1.490194 8.393000 84.271319
|
||||||
|
1.461198 8.396000 84.301441
|
||||||
|
1.432503 8.399000 84.331563
|
||||||
|
1.404111 8.402000 84.361685
|
||||||
|
1.376023 8.405000 84.391807
|
||||||
|
1.348241 8.408000 84.421929
|
||||||
|
1.320765 8.411000 84.452051
|
||||||
|
1.293597 8.414000 84.482173
|
||||||
|
1.266738 8.417000 84.512295
|
||||||
|
1.240188 8.420000 84.542417
|
||||||
|
1.213947 8.423000 84.572539
|
||||||
|
1.188016 8.426000 84.602661
|
||||||
|
1.162395 8.429000 84.632783
|
||||||
|
1.137085 8.432000 84.662905
|
||||||
|
1.112084 8.435000 84.693027
|
||||||
|
1.087393 8.438000 84.723149
|
||||||
|
1.063011 8.441000 84.753271
|
||||||
|
1.038938 8.444000 84.783393
|
||||||
|
1.015173 8.447000 84.813515
|
||||||
|
0.991715 8.450000 84.843637
|
||||||
|
0.968564 8.453000 84.873759
|
||||||
|
0.945717 8.456000 84.903881
|
||||||
|
0.923174 8.459000 84.934003
|
||||||
|
0.900934 8.462000 84.964125
|
||||||
|
0.878995 8.465000 84.994247
|
||||||
|
0.857355 8.468000 85.024369
|
||||||
|
0.836013 8.471000 85.054491
|
||||||
|
0.814967 8.474000 85.084613
|
||||||
|
0.794216 8.477000 85.114735
|
||||||
|
0.773757 8.480000 85.144857
|
||||||
|
0.753588 8.483000 85.174979
|
||||||
|
0.733707 8.486000 85.205101
|
||||||
|
0.714112 8.489000 85.235223
|
||||||
|
0.694801 8.492000 85.265345
|
||||||
|
0.675771 8.495000 85.295467
|
||||||
|
0.657020 8.498000 85.325589
|
||||||
|
0.638546 8.501000 85.355711
|
||||||
|
0.620346 8.504000 85.385833
|
||||||
|
0.602417 8.507000 85.415955
|
||||||
|
0.584757 8.510000 85.446077
|
||||||
|
0.567363 8.513000 85.476199
|
||||||
|
0.550233 8.516000 85.506321
|
||||||
|
0.533364 8.519000 85.536443
|
||||||
|
0.516753 8.522000 85.566565
|
||||||
|
0.500397 8.525000 85.596687
|
||||||
|
0.484294 8.528000 85.626809
|
||||||
|
0.468441 8.531000 85.656931
|
||||||
|
0.452835 8.534000 85.687053
|
||||||
|
0.437472 8.537000 85.717175
|
||||||
|
0.422352 8.540000 85.747297
|
||||||
|
0.407469 8.543000 85.777419
|
||||||
|
0.392820 8.546000 85.807541
|
||||||
|
0.378401 8.549000 85.837663
|
||||||
|
0.364222 8.552000 85.867785
|
||||||
|
0.350285 8.555000 85.897907
|
||||||
|
0.336589 8.558000 85.928029
|
||||||
|
0.323133 8.561000 85.958151
|
||||||
|
0.309915 8.564000 85.988273
|
||||||
|
0.296936 8.567000 86.018395
|
||||||
|
0.284195 8.570000 86.048517
|
||||||
|
0.271690 8.573000 86.078639
|
||||||
|
0.259422 8.576000 86.108761
|
||||||
|
0.247388 8.579000 86.138883
|
||||||
|
0.235589 8.582000 86.169005
|
||||||
|
0.224022 8.585000 86.199127
|
||||||
|
0.212685 8.588000 86.229249
|
||||||
|
0.201574 8.591000 86.259371
|
||||||
|
0.190684 8.594000 86.289493
|
||||||
|
0.180021 8.597000 86.319615
|
||||||
|
0.169583 8.600000 86.349737
|
||||||
|
0.159369 8.603000 86.379859
|
||||||
|
0.149378 8.606000 86.409981
|
||||||
|
0.139608 8.609000 86.440103
|
||||||
|
0.130058 8.612000 86.470225
|
||||||
|
0.120725 8.615000 86.500347
|
||||||
|
0.111607 8.618000 86.530469
|
||||||
|
0.102702 8.621000 86.560591
|
||||||
|
0.094005 8.624000 86.590713
|
||||||
|
0.085514 8.627000 86.620835
|
||||||
|
0.077222 8.630000 86.650957
|
||||||
|
0.069124 8.633000 86.681079
|
||||||
|
0.061213 8.636000 86.711201
|
||||||
|
0.053478 8.639000 86.741323
|
||||||
|
0.045906 8.642000 86.771445
|
||||||
|
0.038479 8.645000 86.801567
|
||||||
|
0.031171 8.648000 86.831689
|
||||||
|
0.023944 8.651000 86.861811
|
||||||
|
0.016737 8.654000 86.891933
|
||||||
|
0.009449 8.657000 86.922055
|
||||||
|
0.001949 8.660000 86.952177
|
||||||
|
0.000000 8.661000 86.962218
|
||||||
538
eloss_calculations/oxygen_lookup_70MeV_350torr_4pc.dat
Normal file
538
eloss_calculations/oxygen_lookup_70MeV_350torr_4pc.dat
Normal file
|
|
@ -0,0 +1,538 @@
|
||||||
|
# Energy(MeV) mg/cm2 cm
|
||||||
|
# Starting Energy: 70 MeV
|
||||||
|
70.000000 0.000000 0.000000
|
||||||
|
69.876080 0.022000 0.205127
|
||||||
|
69.752015 0.044000 0.410255
|
||||||
|
69.627805 0.066000 0.615382
|
||||||
|
69.503449 0.088000 0.820510
|
||||||
|
69.378946 0.110000 1.025637
|
||||||
|
69.254297 0.132000 1.230764
|
||||||
|
69.129499 0.154000 1.435892
|
||||||
|
69.004554 0.176000 1.641019
|
||||||
|
68.879460 0.198000 1.846147
|
||||||
|
68.754217 0.220000 2.051274
|
||||||
|
68.628825 0.242000 2.256402
|
||||||
|
68.503282 0.264000 2.461529
|
||||||
|
68.377589 0.286000 2.666656
|
||||||
|
68.251744 0.308000 2.871784
|
||||||
|
68.125747 0.330000 3.076911
|
||||||
|
67.999598 0.352000 3.282039
|
||||||
|
67.873296 0.374000 3.487166
|
||||||
|
67.746841 0.396000 3.692293
|
||||||
|
67.620231 0.418000 3.897421
|
||||||
|
67.493467 0.440000 4.102548
|
||||||
|
67.366548 0.462000 4.307676
|
||||||
|
67.239472 0.484000 4.512803
|
||||||
|
67.112241 0.506000 4.717930
|
||||||
|
66.984852 0.528000 4.923058
|
||||||
|
66.857306 0.550000 5.128185
|
||||||
|
66.729602 0.572000 5.333313
|
||||||
|
66.601739 0.594000 5.538440
|
||||||
|
66.473717 0.616000 5.743568
|
||||||
|
66.345535 0.638000 5.948695
|
||||||
|
66.217192 0.660000 6.153822
|
||||||
|
66.088689 0.682000 6.358950
|
||||||
|
65.960023 0.704000 6.564077
|
||||||
|
65.831195 0.726000 6.769205
|
||||||
|
65.702204 0.748000 6.974332
|
||||||
|
65.573050 0.770000 7.179459
|
||||||
|
65.443731 0.792000 7.384587
|
||||||
|
65.314248 0.814000 7.589714
|
||||||
|
65.184599 0.836000 7.794842
|
||||||
|
65.054784 0.858000 7.999969
|
||||||
|
64.924802 0.880000 8.205097
|
||||||
|
64.794652 0.902000 8.410224
|
||||||
|
64.664335 0.924000 8.615351
|
||||||
|
64.533849 0.946000 8.820479
|
||||||
|
64.403193 0.968000 9.025606
|
||||||
|
64.272368 0.990000 9.230734
|
||||||
|
64.141371 1.012000 9.435861
|
||||||
|
64.010204 1.034000 9.640988
|
||||||
|
63.878864 1.056000 9.846116
|
||||||
|
63.747351 1.078000 10.051243
|
||||||
|
63.615665 1.100000 10.256371
|
||||||
|
63.483805 1.122000 10.461498
|
||||||
|
63.351770 1.144000 10.666625
|
||||||
|
63.219560 1.166000 10.871753
|
||||||
|
63.087173 1.188000 11.076880
|
||||||
|
62.954609 1.210000 11.282008
|
||||||
|
62.821868 1.232000 11.487135
|
||||||
|
62.688948 1.254000 11.692263
|
||||||
|
62.555849 1.276000 11.897390
|
||||||
|
62.422570 1.298000 12.102517
|
||||||
|
62.289111 1.320000 12.307645
|
||||||
|
62.155470 1.342000 12.512772
|
||||||
|
62.021647 1.364000 12.717900
|
||||||
|
61.887642 1.386000 12.923027
|
||||||
|
61.753453 1.408000 13.128154
|
||||||
|
61.619079 1.430000 13.333282
|
||||||
|
61.484521 1.452000 13.538409
|
||||||
|
61.349776 1.474000 13.743537
|
||||||
|
61.214845 1.496000 13.948664
|
||||||
|
61.079727 1.518000 14.153791
|
||||||
|
60.944420 1.540000 14.358919
|
||||||
|
60.808924 1.562000 14.564046
|
||||||
|
60.673238 1.584000 14.769174
|
||||||
|
60.537362 1.606000 14.974301
|
||||||
|
60.401295 1.628000 15.179429
|
||||||
|
60.265035 1.650000 15.384556
|
||||||
|
60.128582 1.672000 15.589683
|
||||||
|
59.991935 1.694000 15.794811
|
||||||
|
59.855094 1.716000 15.999938
|
||||||
|
59.718057 1.738000 16.205066
|
||||||
|
59.580824 1.760000 16.410193
|
||||||
|
59.443393 1.782000 16.615320
|
||||||
|
59.305764 1.804000 16.820448
|
||||||
|
59.167936 1.826000 17.025575
|
||||||
|
59.029909 1.848000 17.230703
|
||||||
|
58.891681 1.870000 17.435830
|
||||||
|
58.753251 1.892000 17.640958
|
||||||
|
58.614618 1.914000 17.846085
|
||||||
|
58.475783 1.936000 18.051212
|
||||||
|
58.336743 1.958000 18.256340
|
||||||
|
58.197497 1.980000 18.461467
|
||||||
|
58.058046 2.002000 18.666595
|
||||||
|
57.918388 2.024000 18.871722
|
||||||
|
57.778521 2.046000 19.076849
|
||||||
|
57.638446 2.068000 19.281977
|
||||||
|
57.498161 2.090000 19.487104
|
||||||
|
57.357665 2.112000 19.692232
|
||||||
|
57.216958 2.134000 19.897359
|
||||||
|
57.076038 2.156000 20.102486
|
||||||
|
56.934904 2.178000 20.307614
|
||||||
|
56.793555 2.200000 20.512741
|
||||||
|
56.651991 2.222000 20.717869
|
||||||
|
56.510210 2.244000 20.922996
|
||||||
|
56.368211 2.266000 21.128124
|
||||||
|
56.225994 2.288000 21.333251
|
||||||
|
56.083557 2.310000 21.538378
|
||||||
|
55.940900 2.332000 21.743506
|
||||||
|
55.798020 2.354000 21.948633
|
||||||
|
55.654918 2.376000 22.153761
|
||||||
|
55.511592 2.398000 22.358888
|
||||||
|
55.368042 2.420000 22.564015
|
||||||
|
55.224265 2.442000 22.769143
|
||||||
|
55.080261 2.464000 22.974270
|
||||||
|
54.936029 2.486000 23.179398
|
||||||
|
54.791568 2.508000 23.384525
|
||||||
|
54.646877 2.530000 23.589652
|
||||||
|
54.501954 2.552000 23.794780
|
||||||
|
54.356799 2.574000 23.999907
|
||||||
|
54.211410 2.596000 24.205035
|
||||||
|
54.065787 2.618000 24.410162
|
||||||
|
53.919927 2.640000 24.615290
|
||||||
|
53.773830 2.662000 24.820417
|
||||||
|
53.627495 2.684000 25.025544
|
||||||
|
53.480921 2.706000 25.230672
|
||||||
|
53.334106 2.728000 25.435799
|
||||||
|
53.187049 2.750000 25.640927
|
||||||
|
53.039750 2.772000 25.846054
|
||||||
|
52.892206 2.794000 26.051181
|
||||||
|
52.744416 2.816000 26.256309
|
||||||
|
52.596380 2.838000 26.461436
|
||||||
|
52.448096 2.860000 26.666564
|
||||||
|
52.299563 2.882000 26.871691
|
||||||
|
52.150779 2.904000 27.076819
|
||||||
|
52.001744 2.926000 27.281946
|
||||||
|
51.852455 2.948000 27.487073
|
||||||
|
51.702913 2.970000 27.692201
|
||||||
|
51.553114 2.992000 27.897328
|
||||||
|
51.403059 3.014000 28.102456
|
||||||
|
51.252745 3.036000 28.307583
|
||||||
|
51.102172 3.058000 28.512710
|
||||||
|
50.951338 3.080000 28.717838
|
||||||
|
50.800242 3.102000 28.922965
|
||||||
|
50.648882 3.124000 29.128093
|
||||||
|
50.497256 3.146000 29.333220
|
||||||
|
50.345365 3.168000 29.538347
|
||||||
|
50.193205 3.190000 29.743475
|
||||||
|
50.040776 3.212000 29.948602
|
||||||
|
49.888076 3.234000 30.153730
|
||||||
|
49.735104 3.256000 30.358857
|
||||||
|
49.581858 3.278000 30.563985
|
||||||
|
49.428337 3.300000 30.769112
|
||||||
|
49.274540 3.322000 30.974239
|
||||||
|
49.120464 3.344000 31.179367
|
||||||
|
48.966108 3.366000 31.384494
|
||||||
|
48.811471 3.388000 31.589622
|
||||||
|
48.656552 3.410000 31.794749
|
||||||
|
48.501348 3.432000 31.999876
|
||||||
|
48.345858 3.454000 32.205004
|
||||||
|
48.190080 3.476000 32.410131
|
||||||
|
48.034014 3.498000 32.615259
|
||||||
|
47.877656 3.520000 32.820386
|
||||||
|
47.721006 3.542000 33.025513
|
||||||
|
47.564063 3.564000 33.230641
|
||||||
|
47.406823 3.586000 33.435768
|
||||||
|
47.249286 3.608000 33.640896
|
||||||
|
47.091450 3.630000 33.846023
|
||||||
|
46.933313 3.652000 34.051151
|
||||||
|
46.774873 3.674000 34.256278
|
||||||
|
46.616129 3.696000 34.461405
|
||||||
|
46.457079 3.718000 34.666533
|
||||||
|
46.297721 3.740000 34.871660
|
||||||
|
46.138054 3.762000 35.076788
|
||||||
|
45.978075 3.784000 35.281915
|
||||||
|
45.817782 3.806000 35.487042
|
||||||
|
45.657174 3.828000 35.692170
|
||||||
|
45.496250 3.850000 35.897297
|
||||||
|
45.335006 3.872000 36.102425
|
||||||
|
45.173441 3.894000 36.307552
|
||||||
|
45.011554 3.916000 36.512679
|
||||||
|
44.849342 3.938000 36.717807
|
||||||
|
44.686803 3.960000 36.922934
|
||||||
|
44.523935 3.982000 37.128062
|
||||||
|
44.360737 4.004000 37.333189
|
||||||
|
44.197205 4.026000 37.538317
|
||||||
|
44.033339 4.048000 37.743444
|
||||||
|
43.869136 4.070000 37.948571
|
||||||
|
43.704594 4.092000 38.153699
|
||||||
|
43.539711 4.114000 38.358826
|
||||||
|
43.374484 4.136000 38.563954
|
||||||
|
43.208912 4.158000 38.769081
|
||||||
|
43.042992 4.180000 38.974208
|
||||||
|
42.876723 4.202000 39.179336
|
||||||
|
42.710101 4.224000 39.384463
|
||||||
|
42.543125 4.246000 39.589591
|
||||||
|
42.375792 4.268000 39.794718
|
||||||
|
42.208101 4.290000 39.999846
|
||||||
|
42.040047 4.312000 40.204973
|
||||||
|
41.871631 4.334000 40.410100
|
||||||
|
41.702848 4.356000 40.615228
|
||||||
|
41.533697 4.378000 40.820355
|
||||||
|
41.364175 4.400000 41.025483
|
||||||
|
41.194279 4.422000 41.230610
|
||||||
|
41.024007 4.444000 41.435737
|
||||||
|
40.853357 4.466000 41.640865
|
||||||
|
40.682327 4.488000 41.845992
|
||||||
|
40.510912 4.510000 42.051120
|
||||||
|
40.339111 4.532000 42.256247
|
||||||
|
40.166922 4.554000 42.461374
|
||||||
|
39.994341 4.576000 42.666502
|
||||||
|
39.821365 4.598000 42.871629
|
||||||
|
39.647993 4.620000 43.076757
|
||||||
|
39.474221 4.642000 43.281884
|
||||||
|
39.300047 4.664000 43.487012
|
||||||
|
39.125467 4.686000 43.692139
|
||||||
|
38.950478 4.708000 43.897266
|
||||||
|
38.775079 4.730000 44.102394
|
||||||
|
38.599265 4.752000 44.307521
|
||||||
|
38.423034 4.774000 44.512649
|
||||||
|
38.246383 4.796000 44.717776
|
||||||
|
38.069309 4.818000 44.922903
|
||||||
|
37.891809 4.840000 45.128031
|
||||||
|
37.713879 4.862000 45.333158
|
||||||
|
37.535516 4.884000 45.538286
|
||||||
|
37.356718 4.906000 45.743413
|
||||||
|
37.177481 4.928000 45.948540
|
||||||
|
36.997801 4.950000 46.153668
|
||||||
|
36.817675 4.972000 46.358795
|
||||||
|
36.637100 4.994000 46.563923
|
||||||
|
36.456073 5.016000 46.769050
|
||||||
|
36.274589 5.038000 46.974178
|
||||||
|
36.092646 5.060000 47.179305
|
||||||
|
35.910240 5.082000 47.384432
|
||||||
|
35.727367 5.104000 47.589560
|
||||||
|
35.544023 5.126000 47.794687
|
||||||
|
35.360206 5.148000 47.999815
|
||||||
|
35.175910 5.170000 48.204942
|
||||||
|
34.991132 5.192000 48.410069
|
||||||
|
34.805869 5.214000 48.615197
|
||||||
|
34.620116 5.236000 48.820324
|
||||||
|
34.433870 5.258000 49.025452
|
||||||
|
34.247126 5.280000 49.230579
|
||||||
|
34.059880 5.302000 49.435707
|
||||||
|
33.872128 5.324000 49.640834
|
||||||
|
33.683865 5.346000 49.845961
|
||||||
|
33.495089 5.368000 50.051089
|
||||||
|
33.305793 5.390000 50.256216
|
||||||
|
33.115974 5.412000 50.461344
|
||||||
|
32.925627 5.434000 50.666471
|
||||||
|
32.734748 5.456000 50.871598
|
||||||
|
32.543332 5.478000 51.076726
|
||||||
|
32.351374 5.500000 51.281853
|
||||||
|
32.158869 5.522000 51.486981
|
||||||
|
31.965813 5.544000 51.692108
|
||||||
|
31.772201 5.566000 51.897235
|
||||||
|
31.578027 5.588000 52.102363
|
||||||
|
31.383287 5.610000 52.307490
|
||||||
|
31.187975 5.632000 52.512618
|
||||||
|
30.992086 5.654000 52.717745
|
||||||
|
30.795615 5.676000 52.922873
|
||||||
|
30.598556 5.698000 53.128000
|
||||||
|
30.400904 5.720000 53.333127
|
||||||
|
30.202652 5.742000 53.538255
|
||||||
|
30.003796 5.764000 53.743382
|
||||||
|
29.804329 5.786000 53.948510
|
||||||
|
29.604246 5.808000 54.153637
|
||||||
|
29.403540 5.830000 54.358764
|
||||||
|
29.202205 5.852000 54.563892
|
||||||
|
29.000235 5.874000 54.769019
|
||||||
|
28.797623 5.896000 54.974147
|
||||||
|
28.594363 5.918000 55.179274
|
||||||
|
28.390448 5.940000 55.384401
|
||||||
|
28.185872 5.962000 55.589529
|
||||||
|
27.980627 5.984000 55.794656
|
||||||
|
27.774706 6.006000 55.999784
|
||||||
|
27.568102 6.028000 56.204911
|
||||||
|
27.360808 6.050000 56.410039
|
||||||
|
27.152817 6.072000 56.615166
|
||||||
|
26.944120 6.094000 56.820293
|
||||||
|
26.734709 6.116000 57.025421
|
||||||
|
26.524577 6.138000 57.230548
|
||||||
|
26.313715 6.160000 57.435676
|
||||||
|
26.102116 6.182000 57.640803
|
||||||
|
25.889770 6.204000 57.845930
|
||||||
|
25.676668 6.226000 58.051058
|
||||||
|
25.462802 6.248000 58.256185
|
||||||
|
25.248162 6.270000 58.461313
|
||||||
|
25.032740 6.292000 58.666440
|
||||||
|
24.816524 6.314000 58.871567
|
||||||
|
24.599506 6.336000 59.076695
|
||||||
|
24.381675 6.358000 59.281822
|
||||||
|
24.163021 6.380000 59.486950
|
||||||
|
23.943533 6.402000 59.692077
|
||||||
|
23.723200 6.424000 59.897205
|
||||||
|
23.502011 6.446000 60.102332
|
||||||
|
23.279953 6.468000 60.307459
|
||||||
|
23.057016 6.490000 60.512587
|
||||||
|
22.833187 6.512000 60.717714
|
||||||
|
22.608453 6.534000 60.922842
|
||||||
|
22.382801 6.556000 61.127969
|
||||||
|
22.156217 6.578000 61.333096
|
||||||
|
21.928688 6.600000 61.538224
|
||||||
|
21.700200 6.622000 61.743351
|
||||||
|
21.470737 6.644000 61.948479
|
||||||
|
21.240285 6.666000 62.153606
|
||||||
|
21.008827 6.688000 62.358734
|
||||||
|
20.776347 6.710000 62.563861
|
||||||
|
20.542829 6.732000 62.768988
|
||||||
|
20.308254 6.754000 62.974116
|
||||||
|
20.072609 6.776000 63.179243
|
||||||
|
19.835957 6.798000 63.384371
|
||||||
|
19.598318 6.820000 63.589498
|
||||||
|
19.359680 6.842000 63.794625
|
||||||
|
19.120032 6.864000 63.999753
|
||||||
|
18.879360 6.886000 64.204880
|
||||||
|
18.637652 6.908000 64.410008
|
||||||
|
18.394895 6.930000 64.615135
|
||||||
|
18.151076 6.952000 64.820262
|
||||||
|
17.906180 6.974000 65.025390
|
||||||
|
17.660193 6.996000 65.230517
|
||||||
|
17.413102 7.018000 65.435645
|
||||||
|
17.164892 7.040000 65.640772
|
||||||
|
16.915547 7.062000 65.845900
|
||||||
|
16.665053 7.084000 66.051027
|
||||||
|
16.413394 7.106000 66.256154
|
||||||
|
16.160552 7.128000 66.461282
|
||||||
|
15.906513 7.150000 66.666409
|
||||||
|
15.651259 7.172000 66.871537
|
||||||
|
15.394773 7.194000 67.076664
|
||||||
|
15.137037 7.216000 67.281791
|
||||||
|
14.878032 7.238000 67.486919
|
||||||
|
14.617741 7.260000 67.692046
|
||||||
|
14.356144 7.282000 67.897174
|
||||||
|
14.093221 7.304000 68.102301
|
||||||
|
13.828952 7.326000 68.307428
|
||||||
|
13.563318 7.348000 68.512556
|
||||||
|
13.296297 7.370000 68.717683
|
||||||
|
13.027867 7.392000 68.922811
|
||||||
|
12.758007 7.414000 69.127938
|
||||||
|
12.486695 7.436000 69.333066
|
||||||
|
12.213909 7.458000 69.538193
|
||||||
|
11.939625 7.480000 69.743320
|
||||||
|
11.663822 7.502000 69.948448
|
||||||
|
11.386476 7.524000 70.153575
|
||||||
|
11.107570 7.546000 70.358703
|
||||||
|
10.827242 7.568000 70.563830
|
||||||
|
10.545561 7.590000 70.768957
|
||||||
|
10.262533 7.612000 70.974085
|
||||||
|
9.978162 7.634000 71.179212
|
||||||
|
9.692461 7.656000 71.384340
|
||||||
|
9.405447 7.678000 71.589467
|
||||||
|
9.117143 7.700000 71.794595
|
||||||
|
8.827581 7.722000 71.999722
|
||||||
|
8.536807 7.744000 72.204849
|
||||||
|
8.244875 7.766000 72.409977
|
||||||
|
7.951860 7.788000 72.615104
|
||||||
|
7.657853 7.810000 72.820232
|
||||||
|
7.362971 7.832000 73.025359
|
||||||
|
7.309274 7.836000 73.062655
|
||||||
|
7.255553 7.840000 73.099951
|
||||||
|
7.201810 7.844000 73.137247
|
||||||
|
7.148046 7.848000 73.174543
|
||||||
|
7.094262 7.852000 73.211838
|
||||||
|
7.040458 7.856000 73.249134
|
||||||
|
6.986609 7.860000 73.286430
|
||||||
|
6.932705 7.864000 73.323726
|
||||||
|
6.878746 7.868000 73.361022
|
||||||
|
6.824729 7.872000 73.398318
|
||||||
|
6.770654 7.876000 73.435614
|
||||||
|
6.716523 7.880000 73.472910
|
||||||
|
6.662336 7.884000 73.510206
|
||||||
|
6.608092 7.888000 73.547501
|
||||||
|
6.553792 7.892000 73.584797
|
||||||
|
6.499438 7.896000 73.622093
|
||||||
|
6.445029 7.900000 73.659389
|
||||||
|
6.390567 7.904000 73.696685
|
||||||
|
6.336051 7.908000 73.733981
|
||||||
|
6.281483 7.912000 73.771277
|
||||||
|
6.226863 7.916000 73.808573
|
||||||
|
6.172193 7.920000 73.845869
|
||||||
|
6.117472 7.924000 73.883165
|
||||||
|
6.062703 7.928000 73.920460
|
||||||
|
6.007885 7.932000 73.957756
|
||||||
|
5.953021 7.936000 73.995052
|
||||||
|
5.898111 7.940000 74.032348
|
||||||
|
5.843156 7.944000 74.069644
|
||||||
|
5.788158 7.948000 74.106940
|
||||||
|
5.733119 7.952000 74.144236
|
||||||
|
5.678038 7.956000 74.181532
|
||||||
|
5.622919 7.960000 74.218828
|
||||||
|
5.567762 7.964000 74.256123
|
||||||
|
5.512570 7.968000 74.293419
|
||||||
|
5.457343 7.972000 74.330715
|
||||||
|
5.402085 7.976000 74.368011
|
||||||
|
5.346797 7.980000 74.405307
|
||||||
|
5.291480 7.984000 74.442603
|
||||||
|
5.236138 7.988000 74.479899
|
||||||
|
5.180773 7.992000 74.517195
|
||||||
|
5.125387 7.996000 74.554491
|
||||||
|
5.069982 8.000000 74.591787
|
||||||
|
5.014562 8.004000 74.629082
|
||||||
|
4.959129 8.008000 74.666378
|
||||||
|
4.903687 8.012000 74.703674
|
||||||
|
4.848238 8.016000 74.740970
|
||||||
|
4.792785 8.020000 74.778266
|
||||||
|
4.737333 8.024000 74.815562
|
||||||
|
4.681884 8.028000 74.852858
|
||||||
|
4.626442 8.032000 74.890154
|
||||||
|
4.571013 8.036000 74.927450
|
||||||
|
4.515598 8.040000 74.964745
|
||||||
|
4.460204 8.044000 75.002041
|
||||||
|
4.404834 8.048000 75.039337
|
||||||
|
4.349493 8.052000 75.076633
|
||||||
|
4.294186 8.056000 75.113929
|
||||||
|
4.238918 8.060000 75.151225
|
||||||
|
4.183695 8.064000 75.188521
|
||||||
|
4.128522 8.068000 75.225817
|
||||||
|
4.073404 8.072000 75.263113
|
||||||
|
4.018348 8.076000 75.300408
|
||||||
|
3.963360 8.080000 75.337704
|
||||||
|
3.908446 8.084000 75.375000
|
||||||
|
3.853614 8.088000 75.412296
|
||||||
|
3.798869 8.092000 75.449592
|
||||||
|
3.744220 8.096000 75.486888
|
||||||
|
3.689673 8.100000 75.524184
|
||||||
|
3.635236 8.104000 75.561480
|
||||||
|
3.580918 8.108000 75.598776
|
||||||
|
3.526726 8.112000 75.636072
|
||||||
|
3.472668 8.116000 75.673367
|
||||||
|
3.418754 8.120000 75.710663
|
||||||
|
3.364992 8.124000 75.747959
|
||||||
|
3.311391 8.128000 75.785255
|
||||||
|
3.257962 8.132000 75.822551
|
||||||
|
3.204712 8.136000 75.859847
|
||||||
|
3.151652 8.140000 75.897143
|
||||||
|
3.098793 8.144000 75.934439
|
||||||
|
3.046144 8.148000 75.971735
|
||||||
|
2.993715 8.152000 76.009030
|
||||||
|
2.941518 8.156000 76.046326
|
||||||
|
2.889563 8.160000 76.083622
|
||||||
|
2.837861 8.164000 76.120918
|
||||||
|
2.786423 8.168000 76.158214
|
||||||
|
2.735261 8.172000 76.195510
|
||||||
|
2.684385 8.176000 76.232806
|
||||||
|
2.633807 8.180000 76.270102
|
||||||
|
2.583538 8.184000 76.307398
|
||||||
|
2.533591 8.188000 76.344693
|
||||||
|
2.483975 8.192000 76.381989
|
||||||
|
2.434704 8.196000 76.419285
|
||||||
|
2.385788 8.200000 76.456581
|
||||||
|
2.337239 8.204000 76.493877
|
||||||
|
2.289068 8.208000 76.531173
|
||||||
|
2.241287 8.212000 76.568469
|
||||||
|
2.193906 8.216000 76.605765
|
||||||
|
2.146936 8.220000 76.643061
|
||||||
|
2.100388 8.224000 76.680357
|
||||||
|
2.054274 8.228000 76.717652
|
||||||
|
2.008602 8.232000 76.754948
|
||||||
|
1.963383 8.236000 76.792244
|
||||||
|
1.918627 8.240000 76.829540
|
||||||
|
1.874342 8.244000 76.866836
|
||||||
|
1.830539 8.248000 76.904132
|
||||||
|
1.787225 8.252000 76.941428
|
||||||
|
1.744409 8.256000 76.978724
|
||||||
|
1.702099 8.260000 77.016020
|
||||||
|
1.660301 8.264000 77.053315
|
||||||
|
1.619024 8.268000 77.090611
|
||||||
|
1.578272 8.272000 77.127907
|
||||||
|
1.538053 8.276000 77.165203
|
||||||
|
1.498372 8.280000 77.202499
|
||||||
|
1.459233 8.284000 77.239795
|
||||||
|
1.420641 8.288000 77.277091
|
||||||
|
1.382600 8.292000 77.314387
|
||||||
|
1.345114 8.296000 77.351683
|
||||||
|
1.308184 8.300000 77.388978
|
||||||
|
1.271813 8.304000 77.426274
|
||||||
|
1.236003 8.308000 77.463570
|
||||||
|
1.200756 8.312000 77.500866
|
||||||
|
1.166071 8.316000 77.538162
|
||||||
|
1.131950 8.320000 77.575458
|
||||||
|
1.098392 8.324000 77.612754
|
||||||
|
1.065395 8.328000 77.650050
|
||||||
|
1.032959 8.332000 77.687346
|
||||||
|
1.001083 8.336000 77.724642
|
||||||
|
0.969763 8.340000 77.761937
|
||||||
|
0.938998 8.344000 77.799233
|
||||||
|
0.908785 8.348000 77.836529
|
||||||
|
0.879119 8.352000 77.873825
|
||||||
|
0.849998 8.356000 77.911121
|
||||||
|
0.821417 8.360000 77.948417
|
||||||
|
0.793372 8.364000 77.985713
|
||||||
|
0.765858 8.368000 78.023009
|
||||||
|
0.738870 8.372000 78.060305
|
||||||
|
0.712403 8.376000 78.097600
|
||||||
|
0.686452 8.380000 78.134896
|
||||||
|
0.661011 8.384000 78.172192
|
||||||
|
0.636073 8.388000 78.209488
|
||||||
|
0.611633 8.392000 78.246784
|
||||||
|
0.587685 8.396000 78.284080
|
||||||
|
0.564222 8.400000 78.321376
|
||||||
|
0.541238 8.404000 78.358672
|
||||||
|
0.518725 8.408000 78.395968
|
||||||
|
0.496678 8.412000 78.433264
|
||||||
|
0.475089 8.416000 78.470559
|
||||||
|
0.453952 8.420000 78.507855
|
||||||
|
0.433259 8.424000 78.545151
|
||||||
|
0.413005 8.428000 78.582447
|
||||||
|
0.393179 8.432000 78.619743
|
||||||
|
0.373775 8.436000 78.657039
|
||||||
|
0.354813 8.440000 78.694335
|
||||||
|
0.336291 8.444000 78.731631
|
||||||
|
0.318207 8.448000 78.768927
|
||||||
|
0.300558 8.452000 78.806222
|
||||||
|
0.283343 8.456000 78.843518
|
||||||
|
0.266560 8.460000 78.880814
|
||||||
|
0.250206 8.464000 78.918110
|
||||||
|
0.234278 8.468000 78.955406
|
||||||
|
0.218772 8.472000 78.992702
|
||||||
|
0.203682 8.476000 79.029998
|
||||||
|
0.188993 8.480000 79.067294
|
||||||
|
0.174713 8.484000 79.104590
|
||||||
|
0.160840 8.488000 79.141885
|
||||||
|
0.147372 8.492000 79.179181
|
||||||
|
0.134303 8.496000 79.216477
|
||||||
|
0.121631 8.500000 79.253773
|
||||||
|
0.109349 8.504000 79.291069
|
||||||
|
0.097451 8.508000 79.328365
|
||||||
|
0.085927 8.512000 79.365661
|
||||||
|
0.074766 8.516000 79.402957
|
||||||
|
0.063954 8.520000 79.440253
|
||||||
|
0.053468 8.524000 79.477549
|
||||||
|
0.043278 8.528000 79.514844
|
||||||
|
0.033336 8.532000 79.552140
|
||||||
|
0.023566 8.536000 79.589436
|
||||||
|
0.013823 8.540000 79.626732
|
||||||
|
0.003838 8.544000 79.664028
|
||||||
|
0.001296 8.545000 79.673352
|
||||||
76086
eloss_calculations/proton_lookup_30MeV_250torr_3pc.dat
Normal file
76086
eloss_calculations/proton_lookup_30MeV_250torr_3pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
71703
eloss_calculations/proton_lookup_30MeV_250torr_4pc.dat
Normal file
71703
eloss_calculations/proton_lookup_30MeV_250torr_4pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
63098
eloss_calculations/proton_lookup_30MeV_350torr_3pc.dat
Normal file
63098
eloss_calculations/proton_lookup_30MeV_350torr_3pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
52688
eloss_calculations/proton_lookup_30MeV_350torr_4pc.dat
Normal file
52688
eloss_calculations/proton_lookup_30MeV_350torr_4pc.dat
Normal file
File diff suppressed because it is too large
Load Diff
296
fit_a1c1_cfrac.C
Normal file
296
fit_a1c1_cfrac.C
Normal file
|
|
@ -0,0 +1,296 @@
|
||||||
|
// fit_a1c1_cfrac.C
|
||||||
|
// =============================================================================
|
||||||
|
// Offline per-cell "gain match" for the A1C1 linear centre-fold model.
|
||||||
|
//
|
||||||
|
// The raw cfrac = cpMax/(apSum+cpMax) pedestal floats with the arbitrary
|
||||||
|
// anode/cathode gain, so the model cfrac = cfmin[cell] + k[cell]*fold has to be
|
||||||
|
// re-fit per dataset. This macro does that fit OFFLINE from an already-processed
|
||||||
|
// results file (no reprocessing of raw data), replacing the in-line autocal that
|
||||||
|
// used to live in TrackRecon.C.
|
||||||
|
//
|
||||||
|
// It reads the reference histograms
|
||||||
|
// Benchmark_QQQ_A1C1_cfrac_vs_ref (X = true z = pcz_ref, Y = cfrac)
|
||||||
|
// Benchmark_SX3_A1C1_cfrac_vs_ref
|
||||||
|
// filled from A1C2 events (where the true z is known from the crossover), folds
|
||||||
|
// each cell about its centre (fold = |z - z_centre| / halfcell, in [0,1]) and
|
||||||
|
// does a weighted least-squares fit of cfrac vs fold per cathode cell. QQQ and
|
||||||
|
// SX3 are combined (same proportional-counter cells).
|
||||||
|
//
|
||||||
|
// Output: a per-cell table, paste-ready C++ array literals for TrackRecon.C
|
||||||
|
// (a1c1_cfmin_<DATASET>[7] / a1c1_k_<DATASET>[7]), and optionally a .dat file.
|
||||||
|
//
|
||||||
|
// Usage (compile once with + then call):
|
||||||
|
// root -l -b -q 'fit_a1c1_cfrac.C+("Output_17F/Output_17F.root")' // build
|
||||||
|
// MAIN band: fit_a1c1_cfrac("Output_17F/Output_17F.root","17F",0.25,1.05)
|
||||||
|
// LOW band: fit_a1c1_cfrac("Output_17F/Output_17F.root","17F",0.00,0.25,50,false,"2")
|
||||||
|
// 27Al: fit_a1c1_cfrac("Output_27Al/output_27Al.root","27Al",0.10,1.05)
|
||||||
|
// Args: cfrac_min, cfrac_max (band window), min_counts (per-cell fit threshold),
|
||||||
|
// write_dat (dump a1c1_cfrac_<DATASET>.dat), band ("" main, "2" low band ->
|
||||||
|
// prints a1c1_cfmin2_<DATASET>), all_cells (pool all 7 cells into one fit
|
||||||
|
// and broadcast -- robust when per-cell stats are thin / pedestals uniform).
|
||||||
|
// ALL-CELLS: fit_a1c1_cfrac("Output_cal/17F.root","17F",0.25,1.05,50,false,"",true)
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TH1.h>
|
||||||
|
#include <TH2.h>
|
||||||
|
#include <TKey.h>
|
||||||
|
#include <TDirectory.h>
|
||||||
|
#include <TMath.h>
|
||||||
|
#include <TString.h>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
// cathode wire grid; cell i spans zg[i] (high) .. zg[i+1] (low)
|
||||||
|
const double zg[8] = {147.998, 101.946, 59.7634, 19.6965,
|
||||||
|
-19.6965, -59.7634, -101.946, -147.998};
|
||||||
|
|
||||||
|
int cellOf(double z) {
|
||||||
|
for (int i = 0; i < 7; ++i)
|
||||||
|
if (z <= zg[i] && z > zg[i + 1]) return i;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// recursively search a directory tree for a TH2 by name (folders vary by group)
|
||||||
|
TH2 *findTH2(TDirectory *dir, const std::string &name) {
|
||||||
|
if (TH2 *h = dynamic_cast<TH2 *>(dir->Get(name.c_str()))) return h;
|
||||||
|
TIter next(dir->GetListOfKeys());
|
||||||
|
TKey *key;
|
||||||
|
while ((key = (TKey *)next())) {
|
||||||
|
TObject *obj = key->ReadObj();
|
||||||
|
if (TDirectory *sub = dynamic_cast<TDirectory *>(obj)) {
|
||||||
|
if (TH2 *h = findTH2(sub, name)) return h;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
// cfrac_min/cfrac_max bracket the band to fit: [0.25, 1.05] for the MAIN band,
|
||||||
|
// [0.0, 0.25] for the 17F low (incomplete-integration) band. band="" prints the
|
||||||
|
// a1c1_cfmin_<dataset> arrays; band="2" prints a1c1_cfmin2_<dataset> (the low band).
|
||||||
|
void fit_a1c1_cfrac(const char *filename, const char *dataset = "DATA",
|
||||||
|
double cfrac_min = 0.0, double cfrac_max = 1.05,
|
||||||
|
long min_counts = 50, bool write_dat = false,
|
||||||
|
const char *band = "", bool all_cells = false) {
|
||||||
|
TFile *f = TFile::Open(filename, "READ");
|
||||||
|
if (!f || f->IsZombie()) {
|
||||||
|
std::cerr << "fit_a1c1_cfrac: cannot open " << filename << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *names[2] = {"Benchmark_QQQ_A1C1_cfrac_vs_ref",
|
||||||
|
"Benchmark_SX3_A1C1_cfrac_vs_ref"};
|
||||||
|
|
||||||
|
// weighted OLS accumulators per cell: cfrac = cfmin + k*fold
|
||||||
|
double n[7] = {0}, sf[7] = {0}, sff[7] = {0}, sc[7] = {0}, sfc[7] = {0};
|
||||||
|
|
||||||
|
for (int s = 0; s < 2; ++s) {
|
||||||
|
TH2 *h = findTH2(f, names[s]);
|
||||||
|
if (!h) {
|
||||||
|
std::cout << " (note: " << names[s] << " not found -- skipping)" << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
std::cout << "Using " << names[s] << " (" << h->GetEntries() << " entries)" << std::endl;
|
||||||
|
const int nx = h->GetNbinsX(), ny = h->GetNbinsY();
|
||||||
|
for (int ix = 1; ix <= nx; ++ix) {
|
||||||
|
const double z = h->GetXaxis()->GetBinCenter(ix);
|
||||||
|
const int c = cellOf(z);
|
||||||
|
if (c < 0) continue;
|
||||||
|
const double zc = 0.5 * (zg[c] + zg[c + 1]);
|
||||||
|
const double half = 0.5 * (zg[c] - zg[c + 1]);
|
||||||
|
if (half <= 0.0) continue;
|
||||||
|
const double fold = TMath::Abs(z - zc) / half; // [0,1]
|
||||||
|
for (int iy = 1; iy <= ny; ++iy) {
|
||||||
|
const double w = h->GetBinContent(ix, iy);
|
||||||
|
if (w <= 0.0) continue;
|
||||||
|
const double cfrac = h->GetYaxis()->GetBinCenter(iy);
|
||||||
|
if (cfrac < cfrac_min || cfrac > cfrac_max) continue;
|
||||||
|
n[c] += w;
|
||||||
|
sf[c] += w * fold;
|
||||||
|
sff[c] += w * fold * fold;
|
||||||
|
sc[c] += w * cfrac;
|
||||||
|
sfc[c] += w * fold * cfrac;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// per-cell weighted least-squares; keep a fallback for starved cells
|
||||||
|
const double cfmin_fallback = 0.40, k_fallback = 0.075;
|
||||||
|
double cfmin[7], k[7];
|
||||||
|
|
||||||
|
if (all_cells) {
|
||||||
|
// pool every cell into one fit. fold is already cell-relative (|z-zc|/half),
|
||||||
|
// so pooling the (fold, cfrac) pairs is valid -- robust when per-cell stats
|
||||||
|
// are thin and the pedestals are ~uniform. Same value written to all 7 cells.
|
||||||
|
double N = 0, SF = 0, SFF = 0, SC = 0, SFC = 0;
|
||||||
|
for (int c = 0; c < 7; ++c) { N += n[c]; SF += sf[c]; SFF += sff[c]; SC += sc[c]; SFC += sfc[c]; }
|
||||||
|
double cf = cfmin_fallback, kk = k_fallback;
|
||||||
|
const char *status = "FALLBACK (starved)";
|
||||||
|
if (N > min_counts) {
|
||||||
|
const double denom = N * SFF - SF * SF;
|
||||||
|
if (TMath::Abs(denom) > 1e-9) {
|
||||||
|
const double kfit = (N * SFC - SF * SC) / denom;
|
||||||
|
const double cffit = (SC - kfit * SF) / N;
|
||||||
|
if (kfit > 0.01) { cf = cffit; kk = kfit; status = "fit"; }
|
||||||
|
else status = "FALLBACK (flat k)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int c = 0; c < 7; ++c) { cfmin[c] = cf; k[c] = kk; }
|
||||||
|
printf("\n ALL-CELLS pooled fit: cfmin=%.6f k=%.6f n(eff)=%.0f %s\n", cf, kk, N, status);
|
||||||
|
} else {
|
||||||
|
std::cout << "\n cell cfmin k n(eff) status" << std::endl;
|
||||||
|
std::cout << " ---- --------- --------- -------- ------" << std::endl;
|
||||||
|
for (int c = 0; c < 7; ++c) {
|
||||||
|
double cf = cfmin_fallback, kk = k_fallback;
|
||||||
|
const char *status = "FALLBACK (starved)";
|
||||||
|
if (n[c] > min_counts) {
|
||||||
|
const double denom = n[c] * sff[c] - sf[c] * sf[c];
|
||||||
|
if (TMath::Abs(denom) > 1e-9) {
|
||||||
|
const double kfit = (n[c] * sfc[c] - sf[c] * sc[c]) / denom;
|
||||||
|
const double cffit = (sc[c] - kfit * sf[c]) / n[c];
|
||||||
|
if (kfit > 0.01) { // reject degenerate/flat fit
|
||||||
|
cf = cffit;
|
||||||
|
kk = kfit;
|
||||||
|
status = "fit";
|
||||||
|
} else {
|
||||||
|
status = "FALLBACK (flat k)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cfmin[c] = cf;
|
||||||
|
k[c] = kk;
|
||||||
|
printf(" %d %9.6f %9.6f %8.0f %s\n", c, cf, kk, n[c], status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// paste-ready literals for TrackRecon.C (band="" -> main set, "2" -> low band)
|
||||||
|
printf("\n// ---- paste into TrackRecon.C (cfrac in [%.2f, %.2f]) ----\n", cfrac_min, cfrac_max);
|
||||||
|
printf("static const double a1c1_cfmin%s_%s[7] = {", band, dataset);
|
||||||
|
for (int c = 0; c < 7; ++c) printf("%.6f%s", cfmin[c], c < 6 ? ", " : "};\n");
|
||||||
|
printf("static const double a1c1_k%s_%s[7] = {", band, dataset);
|
||||||
|
for (int c = 0; c < 7; ++c) printf("%.6f%s", k[c], c < 6 ? ", " : "};\n");
|
||||||
|
|
||||||
|
if (write_dat) {
|
||||||
|
const std::string fn = std::string("a1c1_cfrac_") + dataset + ".dat";
|
||||||
|
std::ofstream out(fn);
|
||||||
|
out << "# cell cfmin k (offline fit cfrac = cfmin + k*fold; dataset=" << dataset << ")\n";
|
||||||
|
for (int c = 0; c < 7; ++c) out << c << " " << cfmin[c] << " " << k[c] << "\n";
|
||||||
|
out.close();
|
||||||
|
std::cout << "\nwrote " << fn << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
f->Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
// =============================================================================
|
||||||
|
// REFERENCE-FREE gain match.
|
||||||
|
//
|
||||||
|
// Does NOT use the A1C2 true-z reference. Reads the per-cell A1C1 cfrac
|
||||||
|
// histogram Benchmark_{QQQ,SX3}_trueA1C1_cfrac_vs_cell (cell assignment is pure
|
||||||
|
// geometry) and recovers the constants from the EDGES of each cell's cfrac
|
||||||
|
// distribution: within a cell cfrac = cfmin + k*fold with fold in [0,1], so the
|
||||||
|
// low percentile ~ cfmin (fold->0, cell centre) and the high percentile ~
|
||||||
|
// cfmin+k (fold->1, at the wire). Robust percentiles (plo/phi) are used instead
|
||||||
|
// of min/max.
|
||||||
|
//
|
||||||
|
// This aligns the per-cell pedestals (the actual gain match) WITHOUT a reference,
|
||||||
|
// but it cannot fix the absolute z scale -- it assumes the linear model and that
|
||||||
|
// each cell is illuminated across its length. If shared_k=true, a single
|
||||||
|
// geometric k (median of the per-cell spans) is used for every cell and only the
|
||||||
|
// per-cell cfmin pedestal is taken from the data -- the most robust mode.
|
||||||
|
//
|
||||||
|
// Usage:
|
||||||
|
// root -l -b -q 'fit_a1c1_cfrac.C+("Output_17F/Output_17F.root")' // compile
|
||||||
|
// root -l -b -q 'fit_a1c1_cfrac_reffree("Output_17F/Output_17F.root","17F")'
|
||||||
|
// =============================================================================
|
||||||
|
void fit_a1c1_cfrac_reffree(const char *filename, const char *dataset = "DATA",
|
||||||
|
double plo = 0.05, double phi = 0.95,
|
||||||
|
bool shared_k = false, double min_counts = 50,
|
||||||
|
bool write_dat = false) {
|
||||||
|
TFile *f = TFile::Open(filename, "READ");
|
||||||
|
if (!f || f->IsZombie()) {
|
||||||
|
std::cerr << "fit_a1c1_cfrac_reffree: cannot open " << filename << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *names[2] = {"Benchmark_QQQ_trueA1C1_cfrac_vs_cell",
|
||||||
|
"Benchmark_SX3_trueA1C1_cfrac_vs_cell"};
|
||||||
|
|
||||||
|
// sum the QQQ + SX3 per-cell cfrac histograms into one (cell x cfrac)
|
||||||
|
TH2 *acc = nullptr;
|
||||||
|
for (int s = 0; s < 2; ++s) {
|
||||||
|
TH2 *h = findTH2(f, names[s]);
|
||||||
|
if (!h) {
|
||||||
|
std::cout << " (note: " << names[s] << " not found -- skipping)" << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
std::cout << "Using " << names[s] << " (" << h->GetEntries() << " entries)" << std::endl;
|
||||||
|
if (!acc) { acc = (TH2 *)h->Clone("acc_cfrac_vs_cell"); acc->SetDirectory(nullptr); }
|
||||||
|
else acc->Add(h);
|
||||||
|
}
|
||||||
|
if (!acc) { std::cerr << "no cfrac_vs_cell histograms found" << std::endl; f->Close(); return; }
|
||||||
|
|
||||||
|
const double cfmin_fallback = 0.40, k_fallback = 0.075;
|
||||||
|
double cfmin[7], k[7], span[7];
|
||||||
|
bool ok[7];
|
||||||
|
|
||||||
|
std::cout << "\n cell cfmin cfmin+k k n status" << std::endl;
|
||||||
|
std::cout << " ---- --------- --------- --------- ------ ------" << std::endl;
|
||||||
|
for (int c = 0; c < 7; ++c) {
|
||||||
|
TH1D *proj = acc->ProjectionY(Form("proj_c%d", c), c + 1, c + 1);
|
||||||
|
const double n = proj->Integral();
|
||||||
|
double lo = cfmin_fallback, hi = cfmin_fallback + k_fallback;
|
||||||
|
ok[c] = false;
|
||||||
|
if (n > min_counts) {
|
||||||
|
double q[2], p[2] = {plo, phi};
|
||||||
|
proj->GetQuantiles(2, q, p);
|
||||||
|
lo = q[0];
|
||||||
|
hi = q[1];
|
||||||
|
ok[c] = (hi - lo > 0.01);
|
||||||
|
}
|
||||||
|
cfmin[c] = ok[c] ? lo : cfmin_fallback;
|
||||||
|
span[c] = ok[c] ? (hi - lo) : k_fallback;
|
||||||
|
k[c] = span[c];
|
||||||
|
printf(" %d %9.6f %9.6f %9.6f %6.0f %s\n", c, cfmin[c],
|
||||||
|
cfmin[c] + span[c], span[c], n, ok[c] ? "fit" : "FALLBACK");
|
||||||
|
delete proj;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shared_k) {
|
||||||
|
// median of the well-determined per-cell spans -> one geometric k for all cells
|
||||||
|
double v[7];
|
||||||
|
int m = 0;
|
||||||
|
for (int c = 0; c < 7; ++c) if (ok[c]) v[m++] = span[c];
|
||||||
|
double kg = k_fallback;
|
||||||
|
if (m > 0) {
|
||||||
|
std::sort(v, v + m);
|
||||||
|
kg = (m % 2) ? v[m / 2] : 0.5 * (v[m / 2 - 1] + v[m / 2]);
|
||||||
|
}
|
||||||
|
for (int c = 0; c < 7; ++c) k[c] = kg;
|
||||||
|
std::cout << "\nshared geometric k = " << kg << " (median of " << m << " fitted cells)" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("\n// ---- paste into TrackRecon.C (reference-free gain match) ----\n");
|
||||||
|
printf("static const double a1c1_cfmin_%s[7] = {", dataset);
|
||||||
|
for (int c = 0; c < 7; ++c) printf("%.6f%s", cfmin[c], c < 6 ? ", " : "};\n");
|
||||||
|
printf("static const double a1c1_k_%s[7] = {", dataset);
|
||||||
|
for (int c = 0; c < 7; ++c) printf("%.6f%s", k[c], c < 6 ? ", " : "};\n");
|
||||||
|
|
||||||
|
if (write_dat) {
|
||||||
|
const std::string fn = std::string("a1c1_cfrac_") + dataset + ".dat";
|
||||||
|
std::ofstream out(fn);
|
||||||
|
out << "# cell cfmin k (reference-free gain match, percentiles " << plo << "/" << phi
|
||||||
|
<< "; dataset=" << dataset << ")\n";
|
||||||
|
for (int c = 0; c < 7; ++c) out << c << " " << cfmin[c] << " " << k[c] << "\n";
|
||||||
|
out.close();
|
||||||
|
std::cout << "\nwrote " << fn << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete acc;
|
||||||
|
f->Close();
|
||||||
|
}
|
||||||
41
gmsx3/func1.h
Executable file
41
gmsx3/func1.h
Executable file
|
|
@ -0,0 +1,41 @@
|
||||||
|
#include "TF1.h"
|
||||||
|
|
||||||
|
double model2(double *x, double *par) {
|
||||||
|
/* 'Potential Well' of width 2a from from xx-a to xx+a
|
||||||
|
xx is coordinate about the point of origin, set at x=center
|
||||||
|
v0 is the y-offset of the potential
|
||||||
|
k is the 'steepness' of the potential
|
||||||
|
|
||||||
|
continuous across xx-a and xx+a, and differentiable
|
||||||
|
*/
|
||||||
|
|
||||||
|
double center= par[3];
|
||||||
|
double xx = x[0]-center;
|
||||||
|
double a = TMath::Abs(par[0]);
|
||||||
|
double k = TMath::Abs(par[1]);
|
||||||
|
double v0 = par[2];
|
||||||
|
|
||||||
|
if(xx < -a)
|
||||||
|
return k*(xx+a)*(xx+a) + v0;
|
||||||
|
else if(xx > a)
|
||||||
|
return k*(xx-a)*(xx-a) + v0;
|
||||||
|
else
|
||||||
|
return v0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void func1() {
|
||||||
|
//TF1 f1("bowl",model,-2.,2.,2);
|
||||||
|
TCanvas c("c1","c1",800,600);
|
||||||
|
TF1 f1("bowl",model2,-10.,10.,4);
|
||||||
|
f1.SetMaximum(10);
|
||||||
|
|
||||||
|
for(int i=-4; i<4; i++) {
|
||||||
|
f1.SetParameters(.4,100,2,i); //a, k, v0, center
|
||||||
|
f1.SetNpx(100000);
|
||||||
|
if(i==-4) f1.Draw("L");
|
||||||
|
f1.DrawCopy("L SAME");
|
||||||
|
c.Modified(); c.Update();
|
||||||
|
//c.SaveAs(Form("%d.png",out));
|
||||||
|
while(c.WaitPrimitive());
|
||||||
|
}
|
||||||
|
}
|
||||||
216
gmsx3/intgm_sx3.h
Executable file
216
gmsx3/intgm_sx3.h
Executable file
|
|
@ -0,0 +1,216 @@
|
||||||
|
#include "../Armory/HistPlotter.h"
|
||||||
|
#include <Minuit2/FCNBase.h>
|
||||||
|
#include <Math/Minimizer.h>
|
||||||
|
#include <Math/Factory.h>
|
||||||
|
#include <Math/Functor.h>
|
||||||
|
#include <TMath.h>
|
||||||
|
#include <TPad.h>
|
||||||
|
#include <cassert>
|
||||||
|
#include <vector>
|
||||||
|
#include <array>
|
||||||
|
#include <iostream>
|
||||||
|
#include <TF1.h>
|
||||||
|
#include "func1.h"
|
||||||
|
static long iters=0;
|
||||||
|
|
||||||
|
//class intgm_sx3 : public ROOT::Minuit2::FCNBase {
|
||||||
|
class intgm_sx3 {
|
||||||
|
int N;
|
||||||
|
|
||||||
|
//L.at(0).at(3).at(n) is front strip = 0, back pad = 3, nth datapoint
|
||||||
|
std::array<std::array<std::vector<double>,4>,4> L,R,B;
|
||||||
|
//std::array<std::array<double,5>,4> stripedge; //stripedge.at(i).at(j) is the jth edge of the ith strip. there are five edges for the four strips 'i'=0 to 3, (0,1) (1,2) (2,3) (3,4) for each
|
||||||
|
//the edges are at -2a, -a, 0, a, 2a respectively so we enforce four ratios in the chi2 value - 'a' can be held constant, no need to fit it.
|
||||||
|
|
||||||
|
//assume z = M*(aL-bR)
|
||||||
|
//stripedge[i][1] = max(z) when pad==0 = min(z) when pad==1 this should be -1
|
||||||
|
//stripedge[i][2] = max(z) when pad==1 = min(z) when pad==2. this should be 0
|
||||||
|
//stripedge[i][3] = max(z) when pad==2 = min(z) when pad==3. this should be 1
|
||||||
|
|
||||||
|
//i.e. stripedge[i][j] = max(z) when pad == j-1, min(z) when pad==j, for i= 1,2,3
|
||||||
|
|
||||||
|
//ncounts.at(frontch).at(backch) is the number of (L,R,B) tuples we've filled (frontch,backch) coordinates in the detector
|
||||||
|
std::array<std::array<long,4>,4> ncounts;
|
||||||
|
TH1F *localhists[4][4]; //one histogram for each fc, bc combination
|
||||||
|
HistPlotter *plotter;
|
||||||
|
TF1 *pos_weight[4];
|
||||||
|
TF1 *energywell;
|
||||||
|
public:
|
||||||
|
intgm_sx3() {
|
||||||
|
for(int bc=0; bc<4; bc++) {
|
||||||
|
for(int fc=0; fc<4; fc++) {
|
||||||
|
L[fc][bc].reserve(1000);
|
||||||
|
R[fc][bc].reserve(1000);
|
||||||
|
B[fc][bc].reserve(1000);
|
||||||
|
//localhists[fc][bc] = new TH1F(Form("h_%d_%d",fc,bc),Form("h_%d_%d",fc,bc),1000,-4.,4.);
|
||||||
|
ncounts[fc][bc] = 0;
|
||||||
|
}
|
||||||
|
pos_weight[bc] = new TF1(Form("b_strip%d",bc),model2,-10,10,4); //from -10, to 10, 4 parameters
|
||||||
|
pos_weight[bc]->SetParameters(1.0,10,1.,3-2*bc); //centers at 1, 3.,5,7 Width 2a with a=1.0
|
||||||
|
pos_weight[bc]->SetNpx(1'000'000);
|
||||||
|
}
|
||||||
|
energywell = new TF1("ewell",model2,0,2000,4); //0 to 2000 channels, 4 params
|
||||||
|
energywell->SetParameters(1000,20,1,1500); //center the back E values at 1500 +/- 500
|
||||||
|
energywell->SetNpx(1'000'000);
|
||||||
|
N=0;
|
||||||
|
}
|
||||||
|
void set_plotter(HistPlotter *p) {plotter=p;}
|
||||||
|
void set_iters(long i) { iters=i;}
|
||||||
|
intgm_sx3(HistPlotter *p) : plotter(p) {
|
||||||
|
for(int bc=0; bc<4; bc++) {
|
||||||
|
for(int fc=0; fc<4; fc++) {
|
||||||
|
L[fc][bc].reserve(1000);
|
||||||
|
R[fc][bc].reserve(1000);
|
||||||
|
B[fc][bc].reserve(1000);
|
||||||
|
//localhists[fc][bc] = new TH1F(Form("h_%d_%d",fc,bc),Form("h_%d_%d",fc,bc),1000,-4.,4.);
|
||||||
|
ncounts[fc][bc] = 0;
|
||||||
|
}
|
||||||
|
pos_weight[bc] = new TF1(Form("b_strip%d",bc),model2,-10,10,4); //from -10, to 10, 4 parameters
|
||||||
|
//a/2, k, v0, center
|
||||||
|
pos_weight[bc]->SetParameters(0.92,10,1.,-1.*(3-2*bc)); //centers at 7, 5.,3,1 Width 2a with a=1.0
|
||||||
|
pos_weight[bc]->SetNpx(1'000'000);
|
||||||
|
}
|
||||||
|
energywell = new TF1("ewell",model2,0,8000,4); //0 to 2000 channels, 4 params
|
||||||
|
// energywell->SetParameters(60,10,0,1430); //center the back E values at 1430 +/- 60
|
||||||
|
energywell->SetParameters(400,10,0,5246); //center the back E values at 5486 +/- 600
|
||||||
|
energywell->SetNpx(1'000'000);
|
||||||
|
N=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void fill(int fc, int bc, double leftE, double rightE, double backE) {
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
assert(fc>=0 && fc<=3 && "Front channels should fit the range 0 to 3 inclusive!");
|
||||||
|
assert(bc>=0 && bc<=3 && "Back channels should fit the range 0 to 3 inclusive!");
|
||||||
|
if(leftE>0 && rightE >0 && backE>0) {
|
||||||
|
L[fc][bc].emplace_back(leftE);
|
||||||
|
R[fc][bc].emplace_back(rightE);
|
||||||
|
B[fc][bc].emplace_back(backE);
|
||||||
|
ncounts[fc][bc]+=1;
|
||||||
|
N+=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void print() {
|
||||||
|
for(int i=0; i<16; i++) {
|
||||||
|
std::cout << ncounts[i%4][i/4] << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
inline void plot(std::string comment, const double* params) {
|
||||||
|
std::array<double,4> l,r,b,bo,ro,lo,offset,stretch; //aliases to help with book-keeping
|
||||||
|
std::array<std::array<double,4>,4> back_gains;// back_gains[fc][bc] are for fc,bc firing in combo
|
||||||
|
for(int ctr=0; ctr<4; ctr++) {
|
||||||
|
r[ctr] = params[ctr];
|
||||||
|
}
|
||||||
|
for(int ctr=4; ctr<20; ctr++) {
|
||||||
|
int bch = (ctr-4)%4;
|
||||||
|
int fch = (ctr-4)/4;
|
||||||
|
back_gains[bch][fch] = params[ctr];
|
||||||
|
}
|
||||||
|
for(int ctr=20; ctr<24; ctr++) {
|
||||||
|
stretch[ctr-20] = params[ctr];
|
||||||
|
}
|
||||||
|
for(int ctr=24; ctr<28; ctr++) {
|
||||||
|
l[ctr-24] = params[ctr];
|
||||||
|
}
|
||||||
|
for(int fc=0; fc<4; fc++) {
|
||||||
|
for(int bc=0; bc<4; bc++) {
|
||||||
|
for(int n=0; n<ncounts[fc][bc]; n++) {
|
||||||
|
if(plotter) {
|
||||||
|
double left = l[fc]*L[fc][bc].at(n);
|
||||||
|
double right = r[fc]*R[fc][bc].at(n);
|
||||||
|
double back = back_gains[bc][fc]*B[fc][bc].at(n);
|
||||||
|
//double zpos = (left - right)/(left+right);
|
||||||
|
double zpos = stretch[fc]*(left - right)/(left+right);// + offset[fc]; //back;
|
||||||
|
plotter->Fill2D(Form("normlf_fc%d_%d_%s",fc,bc,comment.c_str()),800,0,1.,800,0,1.,left/back, right/back,"l_vs_r");
|
||||||
|
plotter->Fill2D(Form("normlf_all_%s",comment.c_str()),800, 0, 1., 800, 0, 1.,left/back, right/back);
|
||||||
|
plotter->Fill2D(Form("case_f%d_b%d_%s",fc,bc,comment.c_str()),800,0,8192,800,0,8192,left+right,back,"l_vs_r");
|
||||||
|
plotter->Fill2D(Form("case_all_%s",comment.c_str()),800,0,8192,800,0,8192,left+right,back);
|
||||||
|
//plotter->Fill2D(Form("z_vs_backe_f%d_b%d_%s",fc,bc,comment.c_str()),800,-10,10,800,0,8192,zpos,back,"z_vs_be");
|
||||||
|
plotter->Fill2D(Form("z_vs_backe_all_%s",comment.c_str()),800,-10,10,800,0,8192,zpos,back);
|
||||||
|
} //end if plotter
|
||||||
|
}// end for-n
|
||||||
|
}//end for-bc
|
||||||
|
}//end for-fc
|
||||||
|
}//end plot()
|
||||||
|
|
||||||
|
// double operator()(const std::vector<double>& params) const override{
|
||||||
|
double eval(const double* params) const {
|
||||||
|
iters+=1;
|
||||||
|
|
||||||
|
std::array<double,4> l,r,b,bo,ro,lo, offset, stretch; //aliases to help with book-keeping
|
||||||
|
std::array<std::array<double,4>,4> back_gains;// back_gains[fc][bc] are for fc,bc firing in combo
|
||||||
|
for(int ctr=0; ctr<16; ctr++) {
|
||||||
|
int bch = (ctr)%4;
|
||||||
|
int fch = (ctr)/4;
|
||||||
|
back_gains[bch][fch] = params[ctr];
|
||||||
|
}
|
||||||
|
for(int ctr=16; ctr<20; ctr++) {
|
||||||
|
r[ctr-16] = params[ctr];
|
||||||
|
l[ctr-16] = 1.0;
|
||||||
|
}
|
||||||
|
for(int ctr=20; ctr<24; ctr++) {
|
||||||
|
stretch[ctr-20] = params[ctr];
|
||||||
|
}
|
||||||
|
double result=0, sumcount=0;
|
||||||
|
for(int fc=0; fc<4; fc++) {
|
||||||
|
for(int bc=0; bc<4; bc++) {
|
||||||
|
//if(bc >= 1 || fc >= 1 ) continue;
|
||||||
|
if(ncounts[fc][bc] == 0 && iters ==0) {
|
||||||
|
std::cout << "Missing any data in front:" << fc << " back:" << bc << " combination." << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int n=0; n<ncounts[fc][bc] ; n++) {
|
||||||
|
//double left = l[fc]*L[fc][bc].at(n) + lo[fc];
|
||||||
|
//double right = r[fc]*R[fc][bc].at(n) + ro[fc];
|
||||||
|
//double back = b[bc]*B[fc][bc].at(n) + bo[bc];
|
||||||
|
//double add = TMath::Power(left + right - back,2);
|
||||||
|
if(B[fc][bc].at(n)<100) continue;//ignore events too close to noise threshold
|
||||||
|
|
||||||
|
double left = l[fc]*L[fc][bc].at(n);
|
||||||
|
double right = r[fc]*R[fc][bc].at(n);
|
||||||
|
double back = back_gains[bc][fc]*B[fc][bc].at(n);
|
||||||
|
double lnorm = left/B[fc][bc].at(n);
|
||||||
|
double rnorm = right/B[fc][bc].at(n);
|
||||||
|
|
||||||
|
//double add = TMath::Power(left/back + right/back - 1.0,2);
|
||||||
|
double add = TMath::Power(left + right - back,2);
|
||||||
|
double zpos = stretch[fc]*(left - right)/(left+right); //back;
|
||||||
|
std::cout << zpos << " " << pos_weight[bc]->Eval(zpos) << " " << bc << std::endl;
|
||||||
|
double add_position = pos_weight[bc]->Eval(zpos);
|
||||||
|
double eback_align_penalty = energywell->Eval(back);
|
||||||
|
/* if(back>1000) zmid[fc][bc] += zpos;
|
||||||
|
if(back>1000 && zpos < zmin[fc][bc]) zmin[fc][bc] = zpos;
|
||||||
|
if(back> 1000 && zpos > zmax[fc][bc]) zmax[fc][bc] = zpos;
|
||||||
|
|
||||||
|
if(back>1000) {
|
||||||
|
localhists[fc][bc]->Fill(zpos);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
result += add_position;
|
||||||
|
//result += add;
|
||||||
|
result += eback_align_penalty;
|
||||||
|
sumcount+=1;
|
||||||
|
//if(bc==0) std::cout << add << " " << add_position << " " << zpos << std::endl;
|
||||||
|
//To avoid drift towards (0,0,0) trivial solution. This value ~1 close to (1,1,1)
|
||||||
|
//result+=(1e-3/(TMath::Power(l[fc],2)+TMath::Power(r[fc],2)+TMath::Power(b[bc],2)+1e-9));
|
||||||
|
//result+=(1e-3/(TMath::Power(l[fc],2)+TMath::Power(r[fc],2)+TMath::Power(b[bc],2)+1e-9));
|
||||||
|
} //end for-n
|
||||||
|
} //end for-bc
|
||||||
|
} //end for-fc
|
||||||
|
result/=sumcount; //normalize, so the value doesn't scream
|
||||||
|
if(iters%1'000==0) {
|
||||||
|
std::cout << "iters : " << iters << " params: " << std::endl ;
|
||||||
|
for(int i=0 ; i< 10; i++) std::cout << params[i] << " " << std::flush;
|
||||||
|
std::cout<< std::endl;
|
||||||
|
for(int i=10 ; i< 20; i++) std::cout << params[i] << " " << std::flush;
|
||||||
|
std::cout << std::endl << " result: " << result << std::endl;
|
||||||
|
} //end if
|
||||||
|
return result;
|
||||||
|
} //end eval()
|
||||||
|
|
||||||
|
//double Up() const override { return 1.0; } // Required by minuit2 FCBase
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
338
gmsx3/utilities_orr.h
Executable file
338
gmsx3/utilities_orr.h
Executable file
|
|
@ -0,0 +1,338 @@
|
||||||
|
#ifndef UTILS_ORR_H
|
||||||
|
#define UTILS_ORR_H
|
||||||
|
#include "datatypes.h"
|
||||||
|
#include "HistPlotter.h"
|
||||||
|
#include "Geometry_orr.h" //contains orruba geometry constants
|
||||||
|
#include <cassert>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <vector>
|
||||||
|
//#include <cstring>
|
||||||
|
#include <string>
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <cmath>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <set>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include "TMath.h"
|
||||||
|
#include "counters.h"
|
||||||
|
|
||||||
|
static named_counter oc("named orruba counters");
|
||||||
|
|
||||||
|
inline float get_filesize(std::string filename) {
|
||||||
|
struct stat st;
|
||||||
|
stat(filename.c_str(), &st);
|
||||||
|
return st.st_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
class orruba_params {
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public:
|
||||||
|
int chnum=DEFAULT_NULL; //!< global channel number
|
||||||
|
std::string type = "-";
|
||||||
|
int id=DEFAULT_NULL;
|
||||||
|
int layer=DEFAULT_NULL;
|
||||||
|
int frontback=DEFAULT_NULL;
|
||||||
|
int updown=DEFAULT_NULL;
|
||||||
|
int subid=DEFAULT_NULL;
|
||||||
|
int leftright=DEFAULT_NULL;
|
||||||
|
|
||||||
|
float ped=DEFAULT_NULL;
|
||||||
|
float offset=DEFAULT_NULL;
|
||||||
|
float gain=DEFAULT_NULL;
|
||||||
|
float gain2=DEFAULT_NULL; //for use with sx3's
|
||||||
|
};
|
||||||
|
|
||||||
|
class sx3_geometry_scalefactors {
|
||||||
|
public:
|
||||||
|
//If sx3 has L, R being the left and right extremities, we choose add, stretch here such that
|
||||||
|
// x_mm = (x_raw+add)*stretch; so add=abs(L), stretch=75/(abs(L)+R)
|
||||||
|
float add[4];
|
||||||
|
float stretch[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
class qqq5_finegains {
|
||||||
|
public:
|
||||||
|
std::array<std::pair<float,float>,32> front;
|
||||||
|
//front.at(30).first = slope at clkpos 0, ring 30 for E front layer
|
||||||
|
//front.at(30).second = intercept for the same as above
|
||||||
|
std::array<std::pair<float,float>,4> back;
|
||||||
|
};
|
||||||
|
class sx3_fbgains {
|
||||||
|
public:
|
||||||
|
//Order of indices is [pad][strip]
|
||||||
|
float padoffsets[4][4];
|
||||||
|
float padgains[4][4];
|
||||||
|
|
||||||
|
float stripLoffsets[4][4];
|
||||||
|
float stripLgains[4][4];
|
||||||
|
|
||||||
|
float stripRoffsets[4][4];
|
||||||
|
float stripRgains[4][4];
|
||||||
|
};
|
||||||
|
|
||||||
|
//Metadata ORRUBA needs to know about itself, to be configured at the start
|
||||||
|
extern std::array<orruba_params,MAX_ORRUBA_CHANS> o_params;
|
||||||
|
extern std::array<sx3_fbgains,24> sx3_xtalk_gains; //every sx3 needs to be gainmatched as a frontL-back, frontR-back pair (pad strip pair)
|
||||||
|
extern std::array<sx3_geometry_scalefactors,24> sx3gs;
|
||||||
|
extern std::array<qqq5_finegains,4> qqq5_fg_dE, qqq5_fg_E;
|
||||||
|
|
||||||
|
class type19Raw {
|
||||||
|
public:
|
||||||
|
long int timestamp;
|
||||||
|
std::vector<unsigned short> ch;
|
||||||
|
std::vector<unsigned short> val;
|
||||||
|
|
||||||
|
type19Raw() : timestamp(0), ch(50,0), val(50,0) {} //Reserve 50 for size of these vectors, initial value of zero
|
||||||
|
void print() const {
|
||||||
|
/*
|
||||||
|
print()
|
||||||
|
Prints type19Raw's contents to stdout for monitoring
|
||||||
|
*/
|
||||||
|
std::cout << "------" << std::endl;
|
||||||
|
for(unsigned int ii=0; ii<ch.size(); ii++) {
|
||||||
|
std::cout << ch.at(ii) << " " << val.at(ii) << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class sx3 {
|
||||||
|
public:
|
||||||
|
//TODO: Convert to std::array
|
||||||
|
//Holds all information in an event, including ped subtraction+scaling. back[2].at(0) will have the largest energy seen in ch2, if any
|
||||||
|
std::vector<float> back[4];
|
||||||
|
std::vector<float> frontL[4];
|
||||||
|
std::vector<float> frontR[4];
|
||||||
|
|
||||||
|
double ts = DEFAULT_NULL;
|
||||||
|
//Easy lookup of final calibrated event. Only filled for valid cases, assumed for now to be 1L, 1R, 1B
|
||||||
|
float frontX=DEFAULT_NULL;
|
||||||
|
float frontXmm=DEFAULT_NULL;
|
||||||
|
float frontE=DEFAULT_NULL;
|
||||||
|
float backE=DEFAULT_NULL;
|
||||||
|
int stripF=DEFAULT_NULL;
|
||||||
|
int stripB=DEFAULT_NULL;
|
||||||
|
float frontEL=DEFAULT_NULL;
|
||||||
|
float frontER=DEFAULT_NULL;
|
||||||
|
|
||||||
|
float phi=DEFAULT_NULL; //
|
||||||
|
|
||||||
|
std::set<int> valid_front_chans;
|
||||||
|
std::set<int> valid_back_chans;
|
||||||
|
std::set<int> unmatched_front_chans; //every front channel is unmatched and invalid at first. when it gets matched, it gets removed and sent to valid
|
||||||
|
|
||||||
|
bool foundevent=false;
|
||||||
|
bool valid=false;//valid will be set to false in all cases where we have ambiguity
|
||||||
|
int flags=-1;//flags settable to different types of values to indicate different invalid situations
|
||||||
|
|
||||||
|
void fillevent(const std::string& position, const int subchannel, const float value); //make 'const' what functions don't need to change, helps with performance
|
||||||
|
void validate(const sx3_fbgains&, const sx3_geometry_scalefactors&);
|
||||||
|
};
|
||||||
|
|
||||||
|
class qqq5 {
|
||||||
|
public:
|
||||||
|
//Holds all information in an event, including ped subtraction+scaling. front[2].at(0) will have the largest energy seen in ch2, if any
|
||||||
|
//TODO: Convert to std::array
|
||||||
|
std::vector<float> back[4];
|
||||||
|
std::vector<float> front[32];
|
||||||
|
|
||||||
|
double ts = DEFAULT_NULL;
|
||||||
|
float selftheta=DEFAULT_NULL,selfrho=DEFAULT_NULL;
|
||||||
|
//Easy lookup of the final calibrated event. Only filled for valid cases.
|
||||||
|
double frontE=DEFAULT_NULL;
|
||||||
|
double backE=DEFAULT_NULL;
|
||||||
|
int frontch;
|
||||||
|
int backch;
|
||||||
|
|
||||||
|
std::pair<int,int> adj_front_strips = {-1,-1};
|
||||||
|
std::pair<int,int> adj_back_strips = {-1,-1};
|
||||||
|
std::set<int> valid_front_chans; //list of channels that fire. can inspect size() of these to see if there are front/back events
|
||||||
|
std::set<int> valid_back_chans; // we use std::set since it makes for very readable code
|
||||||
|
|
||||||
|
bool foundevent=false;
|
||||||
|
bool valid=false; //valid will be set to false in all cases where we have ambiguity
|
||||||
|
int flags=-1; //flags settable to different types of values to indicate different invalid situations
|
||||||
|
|
||||||
|
void fillevent(const std::string& position, const int subchannel, const float value); //make 'const' what functions don't need to change, helps with performance
|
||||||
|
void validate();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct orrubaevent {
|
||||||
|
//Every clean, valid charged-particle event will have these four parts
|
||||||
|
float dE=DEFAULT_NULL; //!< true energy-loss in the dE layer. Found by gainmatching ADC readout to alpha data
|
||||||
|
float E=DEFAULT_NULL; //!< energy deposited in the E layer. When summed with dE, gives true energy in keV deposited by the particle in ORRUBA
|
||||||
|
float dE_PID = DEFAULT_NULL; //!< dE scaled for dE-layer's thickness, reducing the spread due to angular straggling by explicitly accounting for it. This will give a sharper pid plot that can be gated on better
|
||||||
|
float dE_linPID = DEFAULT_NULL; //!< dE_PID, but linearized using the prescription described in, say, PhysRevC.90.034601 (2014). dE_linPID = ((dE+E)^a-E^a)^(1/a) where a ~ 1.68 is chosen empirically
|
||||||
|
float Theta=DEFAULT_NULL; //!< Laboratory polar angle of event in radians, deprecated
|
||||||
|
float Phi=DEFAULT_NULL; //!< Lab azimuthal angle of event in radians, deprecated
|
||||||
|
|
||||||
|
//Helpful indices to make dE-E plots
|
||||||
|
std::string type; //!< "endcap" vs "barrel"
|
||||||
|
//!< Identify the position of the detector in the barrel, usually in accordance with the channel map: say we might learn detector is at "Quad 4" or "clk_pos 10", together with 'type'. Useful with HistPlotter class
|
||||||
|
int position=DEFAULT_NULL;
|
||||||
|
int subchdE_1=DEFAULT_NULL, subchdE_2=DEFAULT_NULL; //!< Identify the subchannels corresponding to the two sides of the dE detector. To avoid confusion, 1=strip(sx3), ring(qqq) and 2=pad(sx3), wedge(qqq)
|
||||||
|
int subchE_1=DEFAULT_NULL, subchE_2=DEFAULT_NULL; //!< Identify the subchannels corresponding to the two sides of the E detector. Same convention as above
|
||||||
|
|
||||||
|
float x=DEFAULT_NULL,y=DEFAULT_NULL,z=DEFAULT_NULL; //!< Laboratory x,y,z coordinates of the event from the E layer
|
||||||
|
float r0=DEFAULT_NULL,theta0=DEFAULT_NULL,phi0=DEFAULT_NULL; //!< vector elements from hit to origin for E layer
|
||||||
|
float r1=DEFAULT_NULL,theta1=DEFAULT_NULL,phi1=DEFAULT_NULL; //!< vector elements from hit to origin for dE layer
|
||||||
|
};
|
||||||
|
|
||||||
|
/*TODO:
|
||||||
|
* There will be some use for a class such that it stores
|
||||||
|
PhysicsEvent = <Ex, Brho, THeta4, ...orrubaevent >
|
||||||
|
* Once the 'orrubaevent' structs are made, it should be callable. like
|
||||||
|
std::vector<PhysicsEvent> getPhysicsFromVertices(Kinematics dpkin, std::vector<orrubaevent> orvec);?
|
||||||
|
* should the physics just go sit in orrubaevent? maybe orruba2024 class can have a kinematics object in it?
|
||||||
|
*/
|
||||||
|
|
||||||
|
class orruba2024 {
|
||||||
|
private:
|
||||||
|
//Class expected to be changed for each version of the analysis code
|
||||||
|
public:
|
||||||
|
bool found_trk, found_trkpresc, found_tdcq, found_s800e1, found_s800trg,
|
||||||
|
found_rf, found_gt, found_si, found_siup;
|
||||||
|
|
||||||
|
bool found_de, found_e, found_qqq, found_sx3;//orruba
|
||||||
|
long long timestamp=DEFAULT_NULL;
|
||||||
|
std::vector<type19Raw> o_rawvec;
|
||||||
|
|
||||||
|
std::array<qqq5,4> uendcapE;
|
||||||
|
std::array<qqq5,4> uendcapdE;
|
||||||
|
std::array<sx3,12> ubarrelE;
|
||||||
|
std::array<sx3,12> ubarreldE;
|
||||||
|
|
||||||
|
std::array<sx3,2> dbarrelE;
|
||||||
|
//Results after post-processing, including possible multiplicities
|
||||||
|
std::vector<orrubaevent> events;
|
||||||
|
|
||||||
|
double target_z_offset;
|
||||||
|
|
||||||
|
//void initialize(const std::string & filename1, const std::string& filename2, const std::string& filename3);
|
||||||
|
float tdc_trk = DEFAULT_NULL;
|
||||||
|
float tdc_trksi = DEFAULT_NULL; //trackerpr+si stops are combined into one channel
|
||||||
|
float tdc_trkp = DEFAULT_NULL;
|
||||||
|
float tdc_q = DEFAULT_NULL;
|
||||||
|
float tdc_s800e1 = DEFAULT_NULL;
|
||||||
|
float tdc_s800trg = DEFAULT_NULL;
|
||||||
|
float tdc_rf = DEFAULT_NULL;
|
||||||
|
float tdc_rf_unwrap = DEFAULT_NULL;
|
||||||
|
float tdc_gt = DEFAULT_NULL;
|
||||||
|
float tdc_si = DEFAULT_NULL;
|
||||||
|
float tdc_siup = DEFAULT_NULL;
|
||||||
|
orruba2024(const std::vector<type19Raw>& orvec);
|
||||||
|
void postprocess(); //generates 'events', and performs validations on freshly entered data. performs fine gainmatching for front-back-pairs
|
||||||
|
void print() const {
|
||||||
|
std::cout << Form("TDCs\n trk:%1.4f\ntrkp:%1.4f\nq:%1.4f\ns800e1:%1.4f\ns800trg:%1.4f\nrf:%1.4f\nrfuw:%1.4f\ngt:%1.4f\nsi:%1.4f\nsiup:%1.4f\n-----\nevents_size:%lu\ntimestamp:%lld\nfound_de:%d, found_e:%d\n-------\n-------\n",
|
||||||
|
tdc_trk, tdc_trkp, tdc_q, tdc_s800e1, tdc_s800trg, tdc_rf, tdc_rf_unwrap, tdc_gt, tdc_si, tdc_siup, events.size(), timestamp, found_de, found_e) << std::endl;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class trackingdet {
|
||||||
|
public:
|
||||||
|
double timestamp=DEFAULT_NULL;
|
||||||
|
//TODO: Convert all to std::array
|
||||||
|
std::vector<float> xwires[MAXNWIRES_TRACK];
|
||||||
|
std::vector<float> ywires[MAXNWIRES_TRACK];
|
||||||
|
std::vector<float> xwiresf[MAXNWIRES_TRACK];
|
||||||
|
std::vector<float> ywiresf[MAXNWIRES_TRACK];
|
||||||
|
std::vector<float> xwiresf_nn[MAXNWIRES_TRACK];
|
||||||
|
std::vector<float> ywiresf_nn[MAXNWIRES_TRACK];
|
||||||
|
|
||||||
|
std::vector<float> xtimes[MAXNWIRES_TRACK];
|
||||||
|
std::vector<float> ytimes[MAXNWIRES_TRACK];
|
||||||
|
std::vector<float> xtimesf[MAXNWIRES_TRACK];
|
||||||
|
std::vector<float> ytimesf[MAXNWIRES_TRACK];
|
||||||
|
std::vector<float> cathode;
|
||||||
|
|
||||||
|
int multx; //how many x-wires fired?
|
||||||
|
int multy; //how many y-wires fired?
|
||||||
|
int multxf; //how many filtered x-wires fired?
|
||||||
|
int multyf; //how many filtered y-wires fired?
|
||||||
|
|
||||||
|
int multxt; //how many x-tdcwires fired?
|
||||||
|
int multyt; //how many y-tdcwires fired?
|
||||||
|
|
||||||
|
int multxtf; //how many x-tdcwires fired in window?
|
||||||
|
int multytf; //how many y-tdcwires fired in window?
|
||||||
|
|
||||||
|
float tot_cathode=0;
|
||||||
|
float tot_x=0;
|
||||||
|
float tot_y=0;
|
||||||
|
float tot_anode=0;
|
||||||
|
|
||||||
|
//list of x and y wires fired above energy threshold, within timing gate window
|
||||||
|
std::set<int> list_ywires;
|
||||||
|
std::set<int> list_xwires;
|
||||||
|
|
||||||
|
std::set<int> list_ytwires;
|
||||||
|
std::set<int> list_xtwires;
|
||||||
|
|
||||||
|
//position of the vertex estimated by up to 2 neighbouring wires firing together within window
|
||||||
|
double xpos=DEFAULT_NULL;
|
||||||
|
double ypos=DEFAULT_NULL;
|
||||||
|
bool clean_event = false;
|
||||||
|
int maxnx=-124, maxny=-124;
|
||||||
|
int nnx = 0; //nearest neighbour x wires set this to +/- 1 if present w.r.t. wire maxnx
|
||||||
|
int nny = 0; //nearest neighbour y wires set this to +/- 1 if present w.r.t wire maxny
|
||||||
|
bool clean_event_no_timing = false;
|
||||||
|
bool clean_single_xy_event = false;
|
||||||
|
bool clean_single_xy_event_no_timing = false;
|
||||||
|
void Reset() {
|
||||||
|
/***
|
||||||
|
Resets all data members.
|
||||||
|
**/
|
||||||
|
cathode.clear();
|
||||||
|
for(int i=0; i<MAXNWIRES_TRACK; i++) {
|
||||||
|
xwires[i].clear();
|
||||||
|
ywires[i].clear();
|
||||||
|
xwiresf[i].clear();
|
||||||
|
ywiresf[i].clear();
|
||||||
|
xwiresf_nn[i].clear();
|
||||||
|
ywiresf_nn[i].clear();
|
||||||
|
xtimes[i].clear();
|
||||||
|
ytimes[i].clear();
|
||||||
|
xtimesf[i].clear();
|
||||||
|
ytimesf[i].clear();
|
||||||
|
}
|
||||||
|
list_xwires.clear();
|
||||||
|
list_ywires.clear();
|
||||||
|
list_xtwires.clear();
|
||||||
|
list_ytwires.clear();
|
||||||
|
|
||||||
|
nnx = 0;
|
||||||
|
nny = 0;
|
||||||
|
clean_event_no_timing = false;
|
||||||
|
clean_event = false; //x, y both fire above thresh, xt, yt present within broad coinc window
|
||||||
|
xpos=DEFAULT_NULL;
|
||||||
|
ypos=DEFAULT_NULL;
|
||||||
|
maxnx=-124;
|
||||||
|
maxny=-124;
|
||||||
|
multx=0; //how many x-wires fired?
|
||||||
|
multy=0; //how many y-wires fired?
|
||||||
|
multxf=0; //how many filt x-wires fired?
|
||||||
|
multyf=0; //how many filt y-wires fired?
|
||||||
|
multxt=0; //how many tdc x-wires fired?
|
||||||
|
multyt=0; //how many tdc y-wires fired?
|
||||||
|
multxtf=0; //how many tdc x-wires fired?
|
||||||
|
multytf=0; //how many tdc y-wires fired?
|
||||||
|
}
|
||||||
|
|
||||||
|
trackingdet() {
|
||||||
|
Reset();
|
||||||
|
};
|
||||||
|
trackingdet(const std::vector<type19Raw>& orvec);
|
||||||
|
};
|
||||||
|
|
||||||
|
const float alpha = 0.0;
|
||||||
|
int matchchantype(unsigned short chan, const std::array<orruba_params,MAX_ORRUBA_CHANS>& index, const std::string& label);
|
||||||
|
void initialize_orruba(const std::string & filename1, const std::string& filename2, const std::string& filename3, const std::string& filename4);//,
|
||||||
|
int parse_orruba_data(const unsigned short* buffer, int32_t length, type19Raw& oraw_event);
|
||||||
|
#endif
|
||||||
236
mapping.h
236
mapping.h
|
|
@ -19,25 +19,25 @@ const std::map<int, unsigned short> board = {
|
||||||
{4, 22129},
|
{4, 22129},
|
||||||
{5, 15529},
|
{5, 15529},
|
||||||
{6, 15528},
|
{6, 15528},
|
||||||
|
// {7,89},
|
||||||
{7, 334},
|
{7, 334},
|
||||||
{8, 379},
|
{8, 379},
|
||||||
{9, 325},
|
{9, 325},
|
||||||
{10, 405}
|
{10, 405}};
|
||||||
};
|
|
||||||
const int nBd = board.size();
|
const int nBd = board.size();
|
||||||
|
|
||||||
const int nV1740 = 7;
|
const int nV1740 = 7;
|
||||||
const int nV1725 = 3;
|
const int nV1725 = 4;
|
||||||
|
|
||||||
//+++++++++++++++++++ detID;
|
//+++++++++++++++++++ detID;
|
||||||
// The detectors are seperated into 2 type: SuperX3, QQQ, and PC
|
// The detectors are seperated into 2 type: SuperX3, QQQ, and PC
|
||||||
// the SuperX3 has 24 detectors for each kind, wach detector has 12 channels
|
// the SuperX3 has 24 detectors for each kind, wach detector has 12 channels
|
||||||
// the QQQ has 4 detectors for each kind, each detector has 32 channels
|
// the QQQ has 4 detectors for each kind, each detector has 32 channels
|
||||||
// the PC has 2 types, anode and cathode, each has 24 channels
|
// the PC has 2 types, anode and cathode, each has 24 channels
|
||||||
|
// the MISC has 6 channels, the lollipop IC and siliscon followed by the hotneedle IC, as well as the Rf and MCP
|
||||||
// The detID = Type * 10000 + index * 100 + channel
|
// The detID = Type * 10000 + index * 100 + channel
|
||||||
// fro example, detID(superX3-8, ch-7) = 00807
|
// fro example, detID(superX3-8, ch-7) = 00807
|
||||||
|
|
||||||
|
|
||||||
// use the GenMapping() to get that
|
// use the GenMapping() to get that
|
||||||
const std::vector<int> mapping = {
|
const std::vector<int> mapping = {
|
||||||
|
|
||||||
|
|
@ -63,162 +63,210 @@ const std::vector<int> mapping = {
|
||||||
1906, 1907, 1904, 1905, 1903, 1902, 1901, 1900, 2106, 2107, 2104, 2105, 2103, 2102, 2101, 2100,
|
1906, 1907, 1904, 1905, 1903, 1902, 1901, 1900, 2106, 2107, 2104, 2105, 2103, 2102, 2101, 2100,
|
||||||
//================== 22129
|
//================== 22129
|
||||||
1806, 1807, 1804, 1805, 1803, 1802, 1801, 1800, 2306, 2307, 2304, 2305, 2303, 2302, 2301, 2300,
|
1806, 1807, 1804, 1805, 1803, 1802, 1801, 1800, 2306, 2307, 2304, 2305, 2303, 2302, 2301, 2300,
|
||||||
10016, 10017, 10018, 10019, 10020, 10021, 10022, 10023, 10024, 10025, 10026, 10027, 10028, 10029, 10030, 10031,
|
10031, 10030, 10029, 10028, 10027, 10026, 10025, 10024, 10023, 10022, 10021, 10020, 10019, 10018, 10017, 10016,
|
||||||
|
// 10016, 10017, 10018, 10019, 10020, 10021, 10022, 10023, 10024, 10025, 10026, 10027, 10028, 10029, 10030, 10031,
|
||||||
10116, 10117, 10118, 10119, 10120, 10121, 10122, 10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131,
|
10116, 10117, 10118, 10119, 10120, 10121, 10122, 10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130, 10131,
|
||||||
10015, 10014, 10013, 10012, 10011, 10010, 10009, 10008, 10007, 10006, 10005, 10004, 10003, 10002, 10001, 10000,
|
10015, 10014, 10013, 10012, 10011, 10010, 10009, 10008, 10007, 10006, 10005, 10004, 10003, 10002, 10001, 10000,
|
||||||
//================== 15529
|
//================== 15529
|
||||||
10231, 10230, 10229, 10228, 10227, 10226, 10225, 10224, 10223, 10222, 10221, 10220, 10219, 10218, 10217, 10216,
|
10231, 10230, 10229, 10228, 10227, 10226, 10225, 10224, 10223, 10222, 10221, 10220, 10219, 10218, 10217, 10216,
|
||||||
10115, 10114, 10113, 10112, 10111, 10110, 10109, 10108, 10107, 10106, 10105, 10104, 10103, 10102, 10101, 10100,
|
10100, 10101, 10102, 10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110, 10111, 10112, 10113, 10114, 10115,
|
||||||
10315, 10314, 10313, 10312, 10311, 10310, 10309, 10308, 10307, 10306, 10305, 10304, 10303, 10302, 10301, 10300,
|
// 10115, 10114, 10113, 10112, 10111, 10110, 10109, 10108, 10107, 10106, 10105, 10104, 10103, 10102, 10101, 10100,
|
||||||
|
10300, 10301, 10302, 10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315,
|
||||||
|
// 10315, 10314, 10313, 10312, 10311, 10310, 10309, 10308, 10307, 10306, 10305, 10304, 10303, 10302, 10301, 10300,
|
||||||
10215, 10214, 10213, 10212, 10211, 10210, 10209, 10208, 10207, 10206, 10205, 10204, 10203, 10202, 10201, 10200,
|
10215, 10214, 10213, 10212, 10211, 10210, 10209, 10208, 10207, 10206, 10205, 10204, 10203, 10202, 10201, 10200,
|
||||||
//================== 15528
|
//================== 15528
|
||||||
10316, 10317, 10318, 10319, 10320, 10321, 10322, 10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331,
|
10316, 10317, 10318, 10319, 10320, 10321, 10322, 10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
|
//================== 89
|
||||||
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||||
|
// 30004, -1, 30003, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||||
//================== 334
|
//================== 334
|
||||||
20116, 20117, 20118, 20119, 20120, 20121, 20122, 20123, 20016, 20017, 20018, 20019, 20020, 20021, 20022, 20023,
|
20116, 20117, 20118, 20119, -1, 20121, 20122, 20123, 20016, 20017, 20018, -1, 20020, 20021, 20022, 20023,
|
||||||
//================== 379
|
//================== 379
|
||||||
20000, 20001, 20002, 20003, 20004, 20005, -1, 20007, 20008, -1, 20010, 20011, 20012, 20013, 20014, 20015,
|
-1, 20001, 20002, 20003, 20004, 20005, -1, 20007, 20008, -1, 20010, 20011, 20012, 20013, 20014, 20015,
|
||||||
//================== 325
|
//================== 325
|
||||||
20100, 20101, 20102, 20103, 20104, 20105, 20106, 20107, 20108, 20109, 20110, 20111, 20112, 20113, 20114, 20115,
|
20100, 20101, 20102, 20103, 20104, 20105, 20106, 20107, 20108, 20109, 20110, 20111, 20112, -1, 20114, 20115,
|
||||||
//================== 405
|
//================== 405
|
||||||
20006, -1, -1, 20009, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||||
|
20006, -1, 30005, 20009, -1, 20120, 20000, 20019, 20113, 30000, 30004, 30001, 30002, -1, 30003, -1};
|
||||||
|
|
||||||
};
|
// MCP moved from channel 1 to 2 after Run number 322
|
||||||
|
// MCP and Rf moved to ch 0 and 1 after Run number after Run282
|
||||||
void PrintMapping(){
|
// moved back to ch
|
||||||
|
void PrintMapping()
|
||||||
|
{
|
||||||
|
|
||||||
int digiID = 0;
|
int digiID = 0;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
printf("==================== ID-MAP: \n");
|
printf("==================== ID-MAP: \n");
|
||||||
printf("%11s|", ""); for(int i = 0 ; i < 16; i++ ) printf("%7d|", i);
|
printf("%11s|", "");
|
||||||
|
for (int i = 0; i < 16; i++)
|
||||||
|
printf("%7d|", i);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
for(int i = 0 ; i < 12 + 16*8; i++ ) printf("-");
|
for (int i = 0; i < 12 + 16 * 8; i++)
|
||||||
for(size_t i = 0 ; i < mapping.size(); i ++){
|
printf("-");
|
||||||
if( (i) % 16 == 0 ) {
|
for (size_t i = 0; i < mapping.size(); i++)
|
||||||
|
{
|
||||||
|
if ((i) % 16 == 0)
|
||||||
|
{
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if( digiID < nBd ){
|
if (digiID < nBd)
|
||||||
if( board.at(digiID) > 1000 ) {
|
{
|
||||||
if( count == 3 ) digiID ++;
|
if (board.at(digiID) > 1000)
|
||||||
if( i % 64 == 0 ) {
|
{
|
||||||
|
if (count == 3)
|
||||||
|
digiID++;
|
||||||
|
if (i % 64 == 0)
|
||||||
|
{
|
||||||
printf("%11d|", board.at(digiID));
|
printf("%11d|", board.at(digiID));
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
if( count == 1 ) digiID ++;
|
else
|
||||||
if( i % 16 == 0 ) {
|
{
|
||||||
|
if (count == 1)
|
||||||
|
digiID++;
|
||||||
|
if (i % 16 == 0)
|
||||||
|
{
|
||||||
printf("%11d|", board.at(digiID));
|
printf("%11d|", board.at(digiID));
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( count != 0) printf("%11s|", "");
|
if (count != 0)
|
||||||
count ++;
|
printf("%11s|", "");
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
int typeID = mapping[i] / 10000;
|
int typeID = mapping[i] / 10000;
|
||||||
int detID = (mapping[i] - typeID*10000 )/100;
|
int detID = (mapping[i] - typeID * 10000) / 100;
|
||||||
int ch = mapping[i] - typeID*10000 - detID * 100;
|
int ch = mapping[i] - typeID * 10000 - detID * 100;
|
||||||
|
|
||||||
if( mapping[i] == -1 ) {
|
if (mapping[i] == -1)
|
||||||
|
{
|
||||||
|
|
||||||
printf("%7s|", "");
|
printf("%7s|", "");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
}else{
|
if (typeID == 0)
|
||||||
|
{ // SX3
|
||||||
if( typeID == 0){ // SX3
|
|
||||||
|
|
||||||
printf("\033[36m%3d(%2d)\033[0m|", detID, ch);
|
printf("\033[36m%3d(%2d)\033[0m|", detID, ch);
|
||||||
|
}
|
||||||
}else if( typeID == 1){ // QQQ
|
else if (typeID == 1)
|
||||||
|
{ // QQQ
|
||||||
|
|
||||||
printf("\033[91m%3d(%2d)\033[0m|", detID, ch);
|
printf("\033[91m%3d(%2d)\033[0m|", detID, ch);
|
||||||
|
}
|
||||||
}else if( typeID == 2){ // PC
|
else if (typeID == 2)
|
||||||
|
{ // PC
|
||||||
|
|
||||||
printf("\033[35m%3d(%2d)\033[0m|", detID, ch);
|
printf("\033[35m%3d(%2d)\033[0m|", detID, ch);
|
||||||
|
}
|
||||||
|
else if (typeID == 3)
|
||||||
|
{ // MISC
|
||||||
|
|
||||||
}else{
|
printf("\033[33m%3d(%2d)\033[0m|", detID, ch);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
for(int i = 0 ; i < 12 + 16*8; i++ ) printf("-");
|
for (int i = 0; i < 12 + 16 * 8; i++)
|
||||||
|
printf("-");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GenMapping(std::string mapFile)
|
||||||
void GenMapping(std::string mapFile){
|
{
|
||||||
|
|
||||||
|
|
||||||
std::vector<int> map;
|
std::vector<int> map;
|
||||||
|
|
||||||
|
|
||||||
std::ifstream inputFile(mapFile); // Replace "your_file.txt" with the actual file path
|
std::ifstream inputFile(mapFile); // Replace "your_file.txt" with the actual file path
|
||||||
|
|
||||||
if (!inputFile.is_open()) {
|
if (!inputFile.is_open())
|
||||||
|
{
|
||||||
printf("Error: Could not open the file (%s).\n", mapFile.c_str());
|
printf("Error: Could not open the file (%s).\n", mapFile.c_str());
|
||||||
return ;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string line;
|
std::string line;
|
||||||
|
|
||||||
// Read the file line by line
|
// Read the file line by line
|
||||||
while (std::getline(inputFile, line)) {
|
while (std::getline(inputFile, line))
|
||||||
|
{
|
||||||
std::vector<std::string> words;
|
std::vector<std::string> words;
|
||||||
std::istringstream iss(line);
|
std::istringstream iss(line);
|
||||||
|
|
||||||
// Extract words from the current line
|
// Extract words from the current line
|
||||||
while (true) {
|
while (true)
|
||||||
|
{
|
||||||
std::string word;
|
std::string word;
|
||||||
if (!(iss >> word)) break; // Break if there are no more words
|
if (!(iss >> word))
|
||||||
|
break; // Break if there are no more words
|
||||||
|
|
||||||
word.erase(std::remove_if(word.begin(), word.end(), ::isspace), word.end());
|
word.erase(std::remove_if(word.begin(), word.end(), ::isspace), word.end());
|
||||||
words.push_back(word);
|
words.push_back(word);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( atoi(words[0].c_str()) % 16 == 0 ) printf("=================\n");
|
if (atoi(words[0].c_str()) % 16 == 0)
|
||||||
|
printf("=================\n");
|
||||||
|
|
||||||
|
int detID = atoi(words[1].c_str()) * 100;
|
||||||
int detID = atoi(words[1].c_str())*100;
|
if (words.size() < 5)
|
||||||
if(words.size() < 5 ) printf(" hahhahha %s\n", line.c_str());
|
printf(" hahhahha %s\n", line.c_str());
|
||||||
if( words[2] == "BARREL" ) {
|
if (words[2] == "BARREL")
|
||||||
if( words[3] == "FRONTDOWN" ){
|
{
|
||||||
|
if (words[3] == "FRONTDOWN")
|
||||||
|
{
|
||||||
int chID = atoi(words[4].c_str());
|
int chID = atoi(words[4].c_str());
|
||||||
if( chID % 2 != 0 ) chID -= 1;
|
if (chID % 2 != 0)
|
||||||
|
chID -= 1;
|
||||||
detID += chID;
|
detID += chID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( words[3] == "FRONTUP" ){
|
if (words[3] == "FRONTUP")
|
||||||
|
{
|
||||||
int chID = atoi(words[4].c_str());
|
int chID = atoi(words[4].c_str());
|
||||||
if( chID % 2 == 0 ) chID += 1;
|
if (chID % 2 == 0)
|
||||||
|
chID += 1;
|
||||||
detID += chID;
|
detID += chID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( words[3] == "BACK") detID += atoi(words[4].c_str()) + 8;
|
if (words[3] == "BACK")
|
||||||
|
detID += atoi(words[4].c_str()) + 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( words[2] == "FQQQ" ) {
|
if (words[2] == "FQQQ")
|
||||||
|
{
|
||||||
detID += 10000;
|
detID += 10000;
|
||||||
if( words[3] == "WEDGE") detID += atoi(words[4].c_str());
|
if (words[3] == "WEDGE")
|
||||||
if( words[3] == "RING") detID += atoi(words[4].c_str()) + 16;
|
detID += atoi(words[4].c_str());
|
||||||
|
if (words[3] == "RING")
|
||||||
|
detID += atoi(words[4].c_str()) + 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( words[2] == "PC" ) {
|
if (words[2] == "PC")
|
||||||
|
{
|
||||||
detID += 20000;
|
detID += 20000;
|
||||||
if( words[3] == "ANODE") detID += atoi(words[4].c_str());
|
if (words[3] == "ANODE")
|
||||||
if( words[3] == "CATHODE") detID += 100 + atoi(words[4].c_str());
|
detID += atoi(words[4].c_str());
|
||||||
|
if (words[3] == "CATHODE")
|
||||||
|
detID += 100 + atoi(words[4].c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if( words[2] == "blank") {
|
if(words[2] == "MISC")
|
||||||
|
{
|
||||||
|
detID += 30000;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (words[2] == "blank")
|
||||||
|
{
|
||||||
detID = -1;
|
detID = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -234,29 +282,42 @@ void GenMapping(std::string mapFile){
|
||||||
int digiID = 0;
|
int digiID = 0;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
printf("===============================\n");
|
printf("===============================\n");
|
||||||
for( size_t i = 0; i < ((map.size() +15)/16) * 16; i++){
|
for (size_t i = 0; i < ((map.size() + 15) / 16) * 16; i++)
|
||||||
if( i % 16 == 0) {
|
{
|
||||||
|
if (i % 16 == 0)
|
||||||
|
{
|
||||||
printf("\n");
|
printf("\n");
|
||||||
if( digiID < nBd ){
|
if (digiID < nBd)
|
||||||
if( board.at(digiID) > 1000 ) {
|
{
|
||||||
if( count == 3 ) digiID ++;
|
if (board.at(digiID) > 1000)
|
||||||
if( i % 64 == 0 ) {
|
{
|
||||||
|
if (count == 3)
|
||||||
|
digiID++;
|
||||||
|
if (i % 64 == 0)
|
||||||
|
{
|
||||||
printf(" //================== %d\n", board.at(digiID));
|
printf(" //================== %d\n", board.at(digiID));
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
if( count == 1 ) digiID ++;
|
else
|
||||||
if( i % 16 == 0 ) {
|
{
|
||||||
|
if (count == 1)
|
||||||
|
digiID++;
|
||||||
|
if (i % 16 == 0)
|
||||||
|
{
|
||||||
printf(" //================== %d\n", board.at(digiID));
|
printf(" //================== %d\n", board.at(digiID));
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
count ++;
|
count++;
|
||||||
}
|
}
|
||||||
if( i < map.size() ){
|
if (i < map.size())
|
||||||
|
{
|
||||||
printf(" %5d,", map[i]);
|
printf(" %5d,", map[i]);
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
printf(" %5d,", -1);
|
printf(" %5d,", -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -265,13 +326,14 @@ void GenMapping(std::string mapFile){
|
||||||
printf("sorting mapping and see if there any repeated\n");
|
printf("sorting mapping and see if there any repeated\n");
|
||||||
std::sort(map.begin(), map.end());
|
std::sort(map.begin(), map.end());
|
||||||
|
|
||||||
for( size_t i = 1; i < map.size(); i++){
|
for (size_t i = 1; i < map.size(); i++)
|
||||||
if( map[i] == -1 ) continue;
|
{
|
||||||
if( map[i] == map[i-1] ) printf("%5d \n", map[i]);
|
if (map[i] == -1)
|
||||||
|
continue;
|
||||||
|
if (map[i] == map[i - 1])
|
||||||
|
printf("%5d \n", map[i]);
|
||||||
}
|
}
|
||||||
printf("=========== Done. if nothing show, no repeat. \n");
|
printf("=========== Done. if nothing show, no repeat. \n");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -302,22 +302,22 @@
|
||||||
301 1 FQQQ RING 13
|
301 1 FQQQ RING 13
|
||||||
302 1 FQQQ RING 14
|
302 1 FQQQ RING 14
|
||||||
303 1 FQQQ RING 15
|
303 1 FQQQ RING 15
|
||||||
304 1 FQQQ WEDGE 15
|
304 1 FQQQ WEDGE 0
|
||||||
305 1 FQQQ WEDGE 14
|
305 1 FQQQ WEDGE 1
|
||||||
306 1 FQQQ WEDGE 13
|
306 1 FQQQ WEDGE 2
|
||||||
307 1 FQQQ WEDGE 12
|
307 1 FQQQ WEDGE 3
|
||||||
308 1 FQQQ WEDGE 11
|
308 1 FQQQ WEDGE 4
|
||||||
309 1 FQQQ WEDGE 10
|
309 1 FQQQ WEDGE 5
|
||||||
310 1 FQQQ WEDGE 9
|
310 1 FQQQ WEDGE 6
|
||||||
311 1 FQQQ WEDGE 8
|
311 1 FQQQ WEDGE 7
|
||||||
312 1 FQQQ WEDGE 7
|
312 1 FQQQ WEDGE 8
|
||||||
313 1 FQQQ WEDGE 6
|
313 1 FQQQ WEDGE 9
|
||||||
314 1 FQQQ WEDGE 5
|
314 1 FQQQ WEDGE 10
|
||||||
315 1 FQQQ WEDGE 4
|
315 1 FQQQ WEDGE 11
|
||||||
316 1 FQQQ WEDGE 3
|
316 1 FQQQ WEDGE 12
|
||||||
317 1 FQQQ WEDGE 2
|
317 1 FQQQ WEDGE 13
|
||||||
318 1 FQQQ WEDGE 1
|
318 1 FQQQ WEDGE 14
|
||||||
319 1 FQQQ WEDGE 0
|
319 1 FQQQ WEDGE 15
|
||||||
320 2 FQQQ RING 15
|
320 2 FQQQ RING 15
|
||||||
321 2 FQQQ RING 14
|
321 2 FQQQ RING 14
|
||||||
322 2 FQQQ RING 13
|
322 2 FQQQ RING 13
|
||||||
|
|
@ -366,22 +366,22 @@
|
||||||
365 2 FQQQ WEDGE 2
|
365 2 FQQQ WEDGE 2
|
||||||
366 2 FQQQ WEDGE 1
|
366 2 FQQQ WEDGE 1
|
||||||
367 2 FQQQ WEDGE 0
|
367 2 FQQQ WEDGE 0
|
||||||
368 3 FQQQ WEDGE 15
|
368 3 FQQQ WEDGE 0
|
||||||
369 3 FQQQ WEDGE 14
|
369 3 FQQQ WEDGE 1
|
||||||
370 3 FQQQ WEDGE 13
|
370 3 FQQQ WEDGE 2
|
||||||
371 3 FQQQ WEDGE 12
|
371 3 FQQQ WEDGE 3
|
||||||
372 3 FQQQ WEDGE 11
|
372 3 FQQQ WEDGE 4
|
||||||
373 3 FQQQ WEDGE 10
|
373 3 FQQQ WEDGE 5
|
||||||
374 3 FQQQ WEDGE 9
|
374 3 FQQQ WEDGE 6
|
||||||
375 3 FQQQ WEDGE 8
|
375 3 FQQQ WEDGE 7
|
||||||
376 3 FQQQ WEDGE 7
|
376 3 FQQQ WEDGE 8
|
||||||
377 3 FQQQ WEDGE 6
|
377 3 FQQQ WEDGE 9
|
||||||
378 3 FQQQ WEDGE 5
|
378 3 FQQQ WEDGE 10
|
||||||
379 3 FQQQ WEDGE 4
|
379 3 FQQQ WEDGE 11
|
||||||
380 3 FQQQ WEDGE 3
|
380 3 FQQQ WEDGE 12
|
||||||
381 3 FQQQ WEDGE 2
|
381 3 FQQQ WEDGE 13
|
||||||
382 3 FQQQ WEDGE 1
|
382 3 FQQQ WEDGE 14
|
||||||
383 3 FQQQ WEDGE 0
|
383 3 FQQQ WEDGE 15
|
||||||
384 3 FQQQ RING 0
|
384 3 FQQQ RING 0
|
||||||
385 3 FQQQ RING 1
|
385 3 FQQQ RING 1
|
||||||
386 3 FQQQ RING 2
|
386 3 FQQQ RING 2
|
||||||
|
|
|
||||||
48
pc_energy_calibration.dat
Normal file
48
pc_energy_calibration.dat
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
0 2.270700e-05 0.000000e+00 1
|
||||||
|
1 3.849247e-05 0.000000e+00 1
|
||||||
|
2 2.478595e-05 0.000000e+00 1
|
||||||
|
3 2.418520e-05 0.000000e+00 1
|
||||||
|
4 2.473039e-05 0.000000e+00 1
|
||||||
|
5 6.110646e-05 0.000000e+00 2
|
||||||
|
6 4.489228e-05 0.000000e+00 1
|
||||||
|
7 3.374396e-05 0.000000e+00 1
|
||||||
|
8 3.370297e-05 0.000000e+00 1
|
||||||
|
9 1.000000e+00 0.000000e+00 3
|
||||||
|
10 3.876003e-05 0.000000e+00 1
|
||||||
|
11 2.636256e-05 0.000000e+00 1
|
||||||
|
12 1.000000e+00 0.000000e+00 3
|
||||||
|
13 2.360190e-05 0.000000e+00 1
|
||||||
|
14 2.012292e-05 0.000000e+00 1
|
||||||
|
15 2.554712e-05 0.000000e+00 1
|
||||||
|
16 2.085631e-05 0.000000e+00 1
|
||||||
|
17 3.124900e-05 0.000000e+00 1
|
||||||
|
18 4.364870e-05 0.000000e+00 1
|
||||||
|
19 2.712940e-05 0.000000e+00 2
|
||||||
|
20 3.140230e-05 0.000000e+00 1
|
||||||
|
21 6.818787e-05 0.000000e+00 2
|
||||||
|
22 3.142680e-05 0.000000e+00 2
|
||||||
|
23 7.073949e-05 0.000000e+00 2
|
||||||
|
24 3.024648e-05 0.000000e+00 1
|
||||||
|
25 3.732136e-05 0.000000e+00 1
|
||||||
|
26 3.486437e-05 0.000000e+00 1
|
||||||
|
27 5.511389e-05 0.000000e+00 1
|
||||||
|
28 4.472116e-05 0.000000e+00 1
|
||||||
|
29 3.655778e-05 0.000000e+00 1
|
||||||
|
30 3.579373e-05 0.000000e+00 1
|
||||||
|
31 3.507960e-05 0.000000e+00 1
|
||||||
|
32 3.613826e-05 0.000000e+00 1
|
||||||
|
33 2.886743e-05 0.000000e+00 1
|
||||||
|
34 3.031249e-05 0.000000e+00 1
|
||||||
|
35 2.983830e-05 0.000000e+00 1
|
||||||
|
36 3.735619e-05 0.000000e+00 1
|
||||||
|
37 6.012566e-05 0.000000e+00 2
|
||||||
|
38 3.303600e-05 0.000000e+00 1
|
||||||
|
39 6.039465e-05 0.000000e+00 1
|
||||||
|
40 4.511714e-05 0.000000e+00 1
|
||||||
|
41 5.086580e-05 0.000000e+00 1
|
||||||
|
42 3.765319e-05 0.000000e+00 1
|
||||||
|
43 5.656884e-05 0.000000e+00 1
|
||||||
|
44 1.196229e-04 0.000000e+00 2
|
||||||
|
45 2.972753e-05 0.000000e+00 1
|
||||||
|
46 2.829864e-05 0.000000e+00 1
|
||||||
|
47 3.309860e-05 0.000000e+00 1
|
||||||
67
pccal/anode_gainmatch.C
Normal file
67
pccal/anode_gainmatch.C
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
void anode_gainmatch(){
|
||||||
|
TFile *f = new TFile("../results_run16.root");
|
||||||
|
|
||||||
|
TH2F *pc_index_h2d = (TH2F*)(f->Get("hRawPC/PC_Index_Vs_Energy"));
|
||||||
|
std::cout << pc_index_h2d << std::endl;
|
||||||
|
TCanvas c("c1","c1",0,0,1600,800);
|
||||||
|
//TCanvas c_g("cg","cg",0,900,400,400);
|
||||||
|
c.Divide(2,1);
|
||||||
|
auto c1=c.cd(1);
|
||||||
|
pc_index_h2d->Draw("COLZ");
|
||||||
|
pc_index_h2d->GetYaxis()->SetRangeUser(240,5000);
|
||||||
|
auto c2=c.cd(2);
|
||||||
|
c2->SetLogy();
|
||||||
|
TH1F *h_1d=NULL;
|
||||||
|
int bin_index=1;
|
||||||
|
std::vector<std::vector<double>> all_peaks;
|
||||||
|
std::vector<int> found_wire_list;
|
||||||
|
while(bin_index<=24) {
|
||||||
|
h_1d=(TH1F*)(pc_index_h2d->ProjectionY("_py",bin_index,bin_index));
|
||||||
|
auto c1 = c.cd(1);
|
||||||
|
TBox box(pc_index_h2d->GetXaxis()->GetBinLowEdge(bin_index),0,pc_index_h2d->GetXaxis()->GetBinUpEdge(bin_index),pc_index_h2d->GetYaxis()->GetXmax());
|
||||||
|
box.SetFillColorAlpha(kYellow+3,0.3);
|
||||||
|
box.Draw("SAME");
|
||||||
|
c1->Modified(); c1->Update();
|
||||||
|
//while(c1->WaitPrimitive());
|
||||||
|
|
||||||
|
TSpectrum s;
|
||||||
|
auto c2 = c.cd(2);
|
||||||
|
h_1d->Draw();
|
||||||
|
c2->Modified(); c2->Update();
|
||||||
|
int npeaks = s.Search(h_1d,8,"",0.02); std::cout << npeaks << std::endl;
|
||||||
|
if(npeaks>=3) {
|
||||||
|
std::vector<double> xpeaks(s.GetPositionX(),s.GetPositionX()+npeaks);
|
||||||
|
std::sort(xpeaks.begin(),xpeaks.end(),std::greater());
|
||||||
|
found_wire_list.push_back((int)pc_index_h2d->GetXaxis()->GetBinCenter(bin_index));
|
||||||
|
all_peaks.push_back(xpeaks);
|
||||||
|
}
|
||||||
|
while(c2->WaitPrimitive());
|
||||||
|
bin_index++;
|
||||||
|
}
|
||||||
|
c.cd(2)->SetLogy(kFALSE);
|
||||||
|
gStyle->SetOptFit(1111);
|
||||||
|
|
||||||
|
std::ofstream outfile("anode_gm_coeffs.dat");
|
||||||
|
outfile << found_wire_list.at(0) << " "
|
||||||
|
<< 1.0 << " "
|
||||||
|
<< 0.0 << std::endl;
|
||||||
|
|
||||||
|
for(int i=0; i<all_peaks.size(); i++){
|
||||||
|
if(i==1) continue;
|
||||||
|
TGraph g(all_peaks.at(i).size(), all_peaks.at(i).data(), all_peaks.at(1).data());
|
||||||
|
auto c2 = c.cd(2);
|
||||||
|
g.SetMarkerStyle(20);
|
||||||
|
//g.Print();
|
||||||
|
g.Draw("AP");
|
||||||
|
g.Fit("pol1");
|
||||||
|
outfile << found_wire_list.at(i) << " "
|
||||||
|
<< ((TF1*)g.FindObject("pol1"))->GetParameter(1) << " "
|
||||||
|
<< ((TF1*)g.FindObject("pol1"))->GetParameter(0) << std::endl;
|
||||||
|
c2->Modified();
|
||||||
|
c2->Update();
|
||||||
|
while(c2->WaitPrimitive());
|
||||||
|
}
|
||||||
|
outfile.close();
|
||||||
|
f->Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
24
pccal/anode_gm_coeffs.dat
Normal file
24
pccal/anode_gm_coeffs.dat
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
0 1 0
|
||||||
|
0 0.937314 -16.871
|
||||||
|
2 0.965461 -1.54376
|
||||||
|
3 0.926501 -3.27662
|
||||||
|
4 0.905634 2.54577
|
||||||
|
5 0.905634 -11.0387
|
||||||
|
6 0.853919 6.23079
|
||||||
|
7 0.945588 -9.54044
|
||||||
|
8 0.884454 -11.8262
|
||||||
|
9 0.922501 -3.42538
|
||||||
|
10 0.903053 9.28069
|
||||||
|
11 0.914653 9.87642
|
||||||
|
12 0.965332 13.2526
|
||||||
|
13 0.923847 -3.41775
|
||||||
|
14 0.93845 25.9901
|
||||||
|
15 0.955424 12.324
|
||||||
|
16 0.95116 4.99595
|
||||||
|
17 0.910745 2.86648
|
||||||
|
18 0.941376 4.57217
|
||||||
|
19 0.871622 932.111
|
||||||
|
20 1.00624 7.86358
|
||||||
|
21 0.969834 -45.001
|
||||||
|
22 0.89304 -31.5635
|
||||||
|
23 0.933226 4.02193
|
||||||
69
pccal/cathode_gainmatch.C
Normal file
69
pccal/cathode_gainmatch.C
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
void cathode_gainmatch(){
|
||||||
|
TFile *f = new TFile("../results_run17.root");
|
||||||
|
TH2F *pc_index_h2d = (TH2F*)(f->Get("hRawPC/PC_Index_Vs_Energy"));
|
||||||
|
std::cout << pc_index_h2d << std::endl;
|
||||||
|
TCanvas c("c1","c1",0,0,1600,800);
|
||||||
|
//TCanvas c_g("cg","cg",0,900,400,400);
|
||||||
|
c.Divide(2,1);
|
||||||
|
auto c1=c.cd(1);
|
||||||
|
pc_index_h2d->Draw("COLZ");
|
||||||
|
pc_index_h2d->GetYaxis()->SetRangeUser(600,pc_index_h2d->GetYaxis()->GetXmax());
|
||||||
|
auto c2=c.cd(2);
|
||||||
|
c2->SetLogy();
|
||||||
|
TH1F *h_1d=NULL;
|
||||||
|
int bin_index=25;
|
||||||
|
std::vector<double> pulser_heights = {0.01,0.05,0.1,0.15,0.2,0.25,0.3,0.5};
|
||||||
|
std::vector<std::vector<double>> all_peaks;
|
||||||
|
std::vector<int> found_wire_list;
|
||||||
|
while(bin_index<=48) {
|
||||||
|
h_1d=(TH1F*)(pc_index_h2d->ProjectionY("_py",bin_index,bin_index));
|
||||||
|
auto c1 = c.cd(1);
|
||||||
|
TBox box(pc_index_h2d->GetXaxis()->GetBinLowEdge(bin_index),0,pc_index_h2d->GetXaxis()->GetBinUpEdge(bin_index),pc_index_h2d->GetYaxis()->GetXmax());
|
||||||
|
box.SetFillColorAlpha(kYellow+3,0.3);
|
||||||
|
box.Draw("SAME");
|
||||||
|
c1->Modified(); c1->Update();
|
||||||
|
//while(c1->WaitPrimitive());
|
||||||
|
|
||||||
|
TSpectrum s;
|
||||||
|
auto c2 = c.cd(2);
|
||||||
|
h_1d->Draw();
|
||||||
|
c2->Modified(); c2->Update();
|
||||||
|
int npeaks = s.Search(h_1d,20,"",0.1); std::cout << npeaks << std::endl;
|
||||||
|
if(npeaks==8) {
|
||||||
|
std::vector<double> xpeaks(s.GetPositionX(),s.GetPositionX()+npeaks);
|
||||||
|
for(int i=0; i<8; i++) {
|
||||||
|
std::cout << pc_index_h2d->GetXaxis()->GetBinCenter(bin_index) << " " << xpeaks.at(i) << " " << xpeaks.at(i)/pulser_heights.at(i) << std::endl;
|
||||||
|
}
|
||||||
|
std::sort(xpeaks.begin(),xpeaks.end(),std::greater());
|
||||||
|
found_wire_list.push_back((int)pc_index_h2d->GetXaxis()->GetBinCenter(bin_index));
|
||||||
|
all_peaks.push_back(xpeaks);
|
||||||
|
}
|
||||||
|
while(c2->WaitPrimitive());
|
||||||
|
bin_index++;
|
||||||
|
}
|
||||||
|
c.cd(2)->SetLogy(kFALSE);
|
||||||
|
gStyle->SetOptFit(1111);
|
||||||
|
|
||||||
|
std::ofstream outfile("cathode_gm_coeffs.dat");
|
||||||
|
outfile << found_wire_list.at(0) << " "
|
||||||
|
<< 1.0 << " "
|
||||||
|
<< 0.0 << std::endl;
|
||||||
|
|
||||||
|
for(int i=1; i<all_peaks.size(); i++){
|
||||||
|
TGraph g(all_peaks.at(i).size(), all_peaks.at(i).data(), all_peaks.at(0).data());
|
||||||
|
auto c2 = c.cd(2);
|
||||||
|
g.SetMarkerStyle(20);
|
||||||
|
//g.Print();
|
||||||
|
g.Draw("AP");
|
||||||
|
g.Fit("pol1");
|
||||||
|
outfile << found_wire_list.at(i) << " "
|
||||||
|
<< ((TF1*)g.FindObject("pol1"))->GetParameter(1) << " "
|
||||||
|
<< ((TF1*)g.FindObject("pol1"))->GetParameter(0) << std::endl;
|
||||||
|
c2->Modified();
|
||||||
|
c2->Update();
|
||||||
|
while(c2->WaitPrimitive());
|
||||||
|
}
|
||||||
|
outfile.close();
|
||||||
|
f->Close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
21
pccal/cathode_gm_coeffs.dat
Normal file
21
pccal/cathode_gm_coeffs.dat
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
24 1 0
|
||||||
|
25 0.941896 6.16135
|
||||||
|
26 0.980284 2.86886
|
||||||
|
27 0.983166 -3.82952
|
||||||
|
28 0.978704 -2.89713
|
||||||
|
29 0.964947 2.25786
|
||||||
|
30 0.94514 0.925074
|
||||||
|
31 0.977231 1.6493
|
||||||
|
32 0.919527 5.82742
|
||||||
|
33 0.972243 2.88061
|
||||||
|
34 0.928892 7.61384
|
||||||
|
35 0.947376 -0.644223
|
||||||
|
36 0.875342 6.066
|
||||||
|
38 0.970953 6.262
|
||||||
|
40 0.918408 -3.27891
|
||||||
|
41 0.913619 4.11288
|
||||||
|
42 0.954083 2.21261
|
||||||
|
43 0.993037 5.48924
|
||||||
|
45 0.926406 -19.719
|
||||||
|
46 1.00459 5.14574
|
||||||
|
47 0.942483 5.54183
|
||||||
496
pccal/fit_pc_energy_calibration.C
Normal file
496
pccal/fit_pc_energy_calibration.C
Normal file
|
|
@ -0,0 +1,496 @@
|
||||||
|
#include <TSystemDirectory.h>
|
||||||
|
#include <TSystemFile.h>
|
||||||
|
#include <TList.h>
|
||||||
|
#include <TString.h>
|
||||||
|
#include <TCanvas.h>
|
||||||
|
#include <TH2D.h>
|
||||||
|
#include <TF1.h>
|
||||||
|
#include <TAxis.h>
|
||||||
|
#include <TFile.h>
|
||||||
|
#include <TStyle.h>
|
||||||
|
#include <TSystem.h>
|
||||||
|
#include <TROOT.h>
|
||||||
|
#include <TPaveText.h>
|
||||||
|
#include <TLine.h>
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
// Optional dataset_filter (e.g., "17F" or "27Al") prevents mixing different
|
||||||
|
// gas pressure/temperature environments which causes gain smearing.
|
||||||
|
// Leave blank ("") to pool all files.
|
||||||
|
//
|
||||||
|
// known_dead_wires: wire indices (0-23 anode, 24-47 cathode) known to be
|
||||||
|
// non-functional regardless of what their calibration data looks like. Whatever
|
||||||
|
// slope their own points would produce -- least-squares or robust -- isn't a real
|
||||||
|
// calibration and is excluded here rather than trusted. Update this list as more
|
||||||
|
// dead channels are identified; currently anode 9 and 12.
|
||||||
|
void fit_pc_energy_calibration(const std::string& dataset_filter = "",
|
||||||
|
const std::vector<int>& known_dead_wires = {9, 12})
|
||||||
|
{
|
||||||
|
std::vector<bool> isDead(48, false);
|
||||||
|
for (int w : known_dead_wires)
|
||||||
|
if (w >= 0 && w < 48)
|
||||||
|
isDead[w] = true;
|
||||||
|
|
||||||
|
std::vector<std::pair<double, double>> pts[48]; // [wire] -> (ADC, dE_gas MeV)
|
||||||
|
|
||||||
|
TSystemDirectory dir("pc_calib_raw", "pc_calib_raw");
|
||||||
|
TList *files = dir.GetListOfFiles();
|
||||||
|
if (!files)
|
||||||
|
{
|
||||||
|
std::cerr << "fit_pc_energy_calibration: pc_calib_raw/ not found or empty -- "
|
||||||
|
<< "run TrackRecon.C with PC energy calibration enabled first." << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int nFiles = 0;
|
||||||
|
long long nOverflowCut = 0;
|
||||||
|
long long nOverflowCutPerWire[48] = {0};
|
||||||
|
TIter next(files);
|
||||||
|
TSystemFile *f;
|
||||||
|
|
||||||
|
// Read all points from all files into the single pooled array
|
||||||
|
while ((f = (TSystemFile *)next()))
|
||||||
|
{
|
||||||
|
TString name = f->GetName();
|
||||||
|
if (f->IsDirectory() || !name.BeginsWith("points_") || !name.EndsWith(".dat"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Apply dataset safeguard if requested
|
||||||
|
if (!dataset_filter.empty() && !name.Contains(dataset_filter.c_str()))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
std::ifstream infile(std::string("pc_calib_raw/") + name.Data());
|
||||||
|
if (!infile.is_open())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
int wire;
|
||||||
|
double adc, dE_gas;
|
||||||
|
while (infile >> wire >> adc >> dE_gas)
|
||||||
|
{
|
||||||
|
if (wire >= 0 && wire < 48)
|
||||||
|
{
|
||||||
|
if (adc < 64000.0) {
|
||||||
|
pts[wire].push_back({adc, dE_gas});
|
||||||
|
} else {
|
||||||
|
nOverflowCut++;
|
||||||
|
nOverflowCutPerWire[wire]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
++nFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "fit_pc_energy_calibration: read " << nFiles
|
||||||
|
<< " run file(s) from pc_calib_raw/ (Filter: '" << dataset_filter << "')" << std::endl;
|
||||||
|
std::cout << "fit_pc_energy_calibration: cut " << nOverflowCut
|
||||||
|
<< " points due to ADC >= 64k overflow." << std::endl;
|
||||||
|
std::cout << "fit_pc_energy_calibration: per-wire overflow breakdown (wire: cut / kept):" << std::endl;
|
||||||
|
for (int wire = 0; wire < 48; ++wire)
|
||||||
|
{
|
||||||
|
long long kept = static_cast<long long>(pts[wire].size());
|
||||||
|
if (nOverflowCutPerWire[wire] == 0 && kept == 0)
|
||||||
|
continue;
|
||||||
|
double fracCut = (nOverflowCutPerWire[wire] + kept > 0)
|
||||||
|
? 100.0 * nOverflowCutPerWire[wire] / (nOverflowCutPerWire[wire] + kept)
|
||||||
|
: 0.0;
|
||||||
|
std::cout << " " << (wire < 24 ? "anode " : "cathode ") << (wire < 24 ? wire : wire - 24)
|
||||||
|
<< ": " << nOverflowCutPerWire[wire] << " cut / " << kept << " kept ("
|
||||||
|
<< fracCut << "% cut)" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Adaptive lower-bound cut (anode only) -----------------------------
|
||||||
|
// Raw ADC per wire can be genuinely bimodal (pileup, accidental coincidences,
|
||||||
|
// wrong-topology leakage) with a lower population that would otherwise bias
|
||||||
|
// both the least-squares slope and the median-based peak-matching fallback.
|
||||||
|
// Rather than one fixed ADC cutoff -- which can't be right for every wire at
|
||||||
|
// once when gains differ (the valley between the two populations sits at a
|
||||||
|
// genuinely different absolute ADC per wire) -- this finds each wire's own
|
||||||
|
// dominant peak from a coarse histogram of its own points, preferring the
|
||||||
|
// highest-ADC prominent peak over a lower one, and cuts at the valley just
|
||||||
|
// below it. Points below that valley are dropped before any fit/median runs.
|
||||||
|
const double kPeakProminenceFrac = 0.25; // a local max must reach this fraction
|
||||||
|
// of the tallest bin to count as a peak
|
||||||
|
const int kFloorHistBins = 60;
|
||||||
|
auto findAdaptiveFloor = [&](const std::vector<double> &adcVals) -> double
|
||||||
|
{
|
||||||
|
if (adcVals.size() < 10)
|
||||||
|
return 0.0; // too few points to say anything about shape -- don't cut
|
||||||
|
double maxADC = *std::max_element(adcVals.begin(), adcVals.end());
|
||||||
|
if (maxADC <= 0.0)
|
||||||
|
return 0.0;
|
||||||
|
std::vector<int> hist(kFloorHistBins, 0);
|
||||||
|
double binW = maxADC / kFloorHistBins;
|
||||||
|
for (double v : adcVals)
|
||||||
|
{
|
||||||
|
int b = std::min(kFloorHistBins - 1, static_cast<int>(v / binW));
|
||||||
|
if (b >= 0) hist[b]++;
|
||||||
|
}
|
||||||
|
int tallest = *std::max_element(hist.begin(), hist.end());
|
||||||
|
if (tallest <= 0)
|
||||||
|
return 0.0;
|
||||||
|
|
||||||
|
// Scan from the highest-ADC bin down; the first local maximum that's
|
||||||
|
// prominent enough is taken as "the" peak.
|
||||||
|
int peakBin = -1;
|
||||||
|
for (int b = kFloorHistBins - 1; b >= 1; --b)
|
||||||
|
{
|
||||||
|
if (hist[b] < kPeakProminenceFrac * tallest)
|
||||||
|
continue;
|
||||||
|
bool isLocalMax = hist[b] >= hist[b - 1] && (b == kFloorHistBins - 1 || hist[b] >= hist[b + 1]);
|
||||||
|
if (isLocalMax)
|
||||||
|
{
|
||||||
|
peakBin = b;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (peakBin <= 0)
|
||||||
|
return 0.0; // no clear peak below the top edge -- nothing to cut against
|
||||||
|
|
||||||
|
// Walk down from the peak to the valley: the floor is the bin where the
|
||||||
|
// count stops falling and starts rising again (the start of a lower
|
||||||
|
// population), or the histogram runs out.
|
||||||
|
int valleyBin = peakBin;
|
||||||
|
for (int b = peakBin - 1; b >= 0; --b)
|
||||||
|
{
|
||||||
|
if (hist[b] > hist[valleyBin])
|
||||||
|
break;
|
||||||
|
valleyBin = b;
|
||||||
|
}
|
||||||
|
return valleyBin * binW;
|
||||||
|
};
|
||||||
|
|
||||||
|
std::vector<std::pair<double, double>> ptsFit[48]; // math uses this; pts[] stays raw for display
|
||||||
|
for (int wire = 0; wire < 48; ++wire)
|
||||||
|
ptsFit[wire] = pts[wire];
|
||||||
|
|
||||||
|
std::vector<double> floorADC(48, 0.0);
|
||||||
|
for (int wire = 0; wire < 24; ++wire) // anode only
|
||||||
|
{
|
||||||
|
std::vector<double> adcVals;
|
||||||
|
adcVals.reserve(pts[wire].size());
|
||||||
|
for (const auto &p : pts[wire])
|
||||||
|
adcVals.push_back(p.first);
|
||||||
|
double floor = findAdaptiveFloor(adcVals);
|
||||||
|
if (floor <= 0.0)
|
||||||
|
continue;
|
||||||
|
floorADC[wire] = floor;
|
||||||
|
size_t before = pts[wire].size();
|
||||||
|
std::vector<std::pair<double, double>> kept;
|
||||||
|
kept.reserve(pts[wire].size());
|
||||||
|
for (const auto &p : pts[wire])
|
||||||
|
if (p.first >= floor)
|
||||||
|
kept.push_back(p);
|
||||||
|
ptsFit[wire] = std::move(kept);
|
||||||
|
std::cout << "fit_pc_energy_calibration: anode wire " << wire << " adaptive floor = "
|
||||||
|
<< floor << " ADC -- kept " << ptsFit[wire].size() << "/" << before << " point(s)" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Pass 1: per-wire stats and the standard least-squares fit ---
|
||||||
|
// Split out from plotting so we can look at ALL wires' fitted slopes before
|
||||||
|
// deciding whether any individual one needs the robust fallback below.
|
||||||
|
std::vector<double> slope_lsq(48, 1.0), maxX_arr(48, 0.0), maxY_arr(48, 0.0), n_arr(48, 0.0);
|
||||||
|
std::vector<bool> ok_arr(48, false);
|
||||||
|
|
||||||
|
for (int wire = 0; wire < 48; ++wire)
|
||||||
|
{
|
||||||
|
double n = static_cast<double>(ptsFit[wire].size());
|
||||||
|
n_arr[wire] = n;
|
||||||
|
bool ok = (n >= 2);
|
||||||
|
|
||||||
|
double maxX = 0.0, maxY = 0.0; // display bounds: from the raw (unfiltered) data
|
||||||
|
for (const auto &p : pts[wire])
|
||||||
|
{
|
||||||
|
if (p.first > maxX) maxX = p.first;
|
||||||
|
if (p.second > maxY) maxY = p.second;
|
||||||
|
}
|
||||||
|
maxX_arr[wire] = maxX;
|
||||||
|
maxY_arr[wire] = maxY;
|
||||||
|
|
||||||
|
double sxx = 0, sxy = 0; // fit sums: from the filtered data
|
||||||
|
for (const auto &p : ptsFit[wire])
|
||||||
|
{
|
||||||
|
sxx += p.first * p.first;
|
||||||
|
sxy += p.first * p.second;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
if (std::isfinite(sxx) && std::abs(sxx) > 1e-12)
|
||||||
|
slope_lsq[wire] = sxy / sxx;
|
||||||
|
else
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
ok_arr[wire] = ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto medianOf = [](std::vector<double> v) -> double
|
||||||
|
{
|
||||||
|
if (v.empty())
|
||||||
|
return 0.0;
|
||||||
|
std::sort(v.begin(), v.end());
|
||||||
|
size_t n = v.size();
|
||||||
|
return (n % 2 == 1) ? v[n / 2] : 0.5 * (v[n / 2 - 1] + v[n / 2]);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Median least-squares slope on each side (anode vs cathode gain structures differ,
|
||||||
|
// so they're compared separately, not pooled) -- the reference point for flagging
|
||||||
|
// any single wire's fit as an outlier.
|
||||||
|
std::vector<double> anodeGoodSlopes, cathodeGoodSlopes;
|
||||||
|
for (int wire = 0; wire < 48; ++wire)
|
||||||
|
{
|
||||||
|
if (!ok_arr[wire] || isDead[wire])
|
||||||
|
continue;
|
||||||
|
(wire < 24 ? anodeGoodSlopes : cathodeGoodSlopes).push_back(slope_lsq[wire]);
|
||||||
|
}
|
||||||
|
double medianAnodeSlope = medianOf(anodeGoodSlopes);
|
||||||
|
double medianCathodeSlope = medianOf(cathodeGoodSlopes);
|
||||||
|
|
||||||
|
// A least-squares slope more than this factor away from its side's median (or a
|
||||||
|
// wire with too few points to fit at all) gets a peak-matched slope instead: that
|
||||||
|
// wire's own ADC peak lined up against the A1C2 consensus dE_gas peak pooled from
|
||||||
|
// every trusted wire on its side (computed below). Flagged wires are marked
|
||||||
|
// method=2 in the output file and "PEAK-MATCHED (a1c2 consensus)" in their
|
||||||
|
// diagnostic plot -- check those plots rather than trusting this blindly, since a
|
||||||
|
// genuinely multi-modal raw distribution needs a different fix, not a different average.
|
||||||
|
const double kOutlierRatioHi = 1.75;
|
||||||
|
const double kOutlierRatioLo = 1.0 / kOutlierRatioHi;
|
||||||
|
|
||||||
|
std::cout << "fit_pc_energy_calibration: median anode slope = " << medianAnodeSlope
|
||||||
|
<< ", median cathode slope = " << medianCathodeSlope << std::endl;
|
||||||
|
|
||||||
|
// A1C2 consensus dE_gas peak: the target quantity (Ee - Ex from source-to-SX3
|
||||||
|
// geometry) doesn't depend on which wire recorded the ADC -- it's the same
|
||||||
|
// physical prediction for every event. Pooling it across every wire that DID get
|
||||||
|
// a trusted direct fit ("calibrated using the a1c2 method") gives a far more
|
||||||
|
// precise reference than any single low-statistics wire's own handful of points
|
||||||
|
// could, which is what the wires below actually get matched against.
|
||||||
|
std::vector<bool> isOutlier(48, false);
|
||||||
|
for (int wire = 0; wire < 48; ++wire)
|
||||||
|
{
|
||||||
|
if (!ok_arr[wire] || isDead[wire])
|
||||||
|
continue;
|
||||||
|
double medianSide = (wire < 24) ? medianAnodeSlope : medianCathodeSlope;
|
||||||
|
double ratio = (medianSide > 0.0) ? (slope_lsq[wire] / medianSide) : 1.0;
|
||||||
|
isOutlier[wire] = (medianSide > 0.0) && (ratio > kOutlierRatioHi || ratio < kOutlierRatioLo);
|
||||||
|
}
|
||||||
|
std::vector<double> anodeConsensusPts, cathodeConsensusPts;
|
||||||
|
int nTrustedAnode = 0, nTrustedCathode = 0;
|
||||||
|
for (int wire = 0; wire < 48; ++wire)
|
||||||
|
{
|
||||||
|
if (!ok_arr[wire] || isDead[wire] || isOutlier[wire])
|
||||||
|
continue;
|
||||||
|
auto &bucket = (wire < 24) ? anodeConsensusPts : cathodeConsensusPts;
|
||||||
|
for (const auto &p : ptsFit[wire])
|
||||||
|
bucket.push_back(p.second);
|
||||||
|
(wire < 24 ? nTrustedAnode : nTrustedCathode)++;
|
||||||
|
}
|
||||||
|
double consensusAnodeDEgas = medianOf(anodeConsensusPts);
|
||||||
|
double consensusCathodeDEgas = medianOf(cathodeConsensusPts);
|
||||||
|
std::cout << "fit_pc_energy_calibration: A1C2 consensus anode dE_gas peak = "
|
||||||
|
<< consensusAnodeDEgas << " MeV from " << anodeConsensusPts.size()
|
||||||
|
<< " point(s) across " << nTrustedAnode << " trusted anode wire(s)" << std::endl;
|
||||||
|
std::cout << "fit_pc_energy_calibration: consensus cathode dE_gas peak = "
|
||||||
|
<< consensusCathodeDEgas << " MeV from " << cathodeConsensusPts.size()
|
||||||
|
<< " point(s) across " << nTrustedCathode << " trusted cathode wire(s)" << std::endl;
|
||||||
|
|
||||||
|
// --- Setup ROOT Diagnostic Graphics ---
|
||||||
|
gROOT->SetBatch(kTRUE); // Run silently without popping up windows
|
||||||
|
gStyle->SetOptStat(0);
|
||||||
|
gStyle->SetPalette(kBird);
|
||||||
|
|
||||||
|
// Create output directory for individual PNGs
|
||||||
|
gSystem->mkdir("pc_calib_plots", kTRUE);
|
||||||
|
|
||||||
|
TFile *fOut = new TFile("pc_calib_diagnostics.root", "RECREATE");
|
||||||
|
|
||||||
|
TCanvas *cAnodes = new TCanvas("cAnodes", "Anode Calibrations", 1800, 1200);
|
||||||
|
cAnodes->Divide(6, 4, 0.01, 0.01);
|
||||||
|
|
||||||
|
TCanvas *cCathodes = new TCanvas("cCathodes", "Cathode Calibrations", 1800, 1200);
|
||||||
|
cCathodes->Divide(6, 4, 0.01, 0.01);
|
||||||
|
|
||||||
|
std::string outFilename = dataset_filter.empty()
|
||||||
|
? "pc_energy_calibration.dat"
|
||||||
|
: "pc_energy_calibration_" + dataset_filter + ".dat";
|
||||||
|
std::ofstream outfile(outFilename);
|
||||||
|
outfile << std::scientific << std::setprecision(6);
|
||||||
|
|
||||||
|
// --- Pass 2: finalize each wire's slope (lsq / robust fallback / identity / known-dead), plot, write ---
|
||||||
|
for (int wire = 0; wire < 48; ++wire)
|
||||||
|
{
|
||||||
|
double n = n_arr[wire];
|
||||||
|
bool ok = ok_arr[wire];
|
||||||
|
double slope = 1.0, intercept = 0.0;
|
||||||
|
int method = 0; // 0 = identity/no data, 1 = least-squares, 2 = peak-matched (a1c2 consensus), 3 = known dead
|
||||||
|
|
||||||
|
if (isDead[wire])
|
||||||
|
{
|
||||||
|
method = 3;
|
||||||
|
std::cerr << "fit_pc_energy_calibration: wire " << wire
|
||||||
|
<< " is in known_dead_wires -- writing identity regardless of what its "
|
||||||
|
<< n << " raw point(s) would otherwise fit to." << std::endl;
|
||||||
|
}
|
||||||
|
else if (ok && !isOutlier[wire])
|
||||||
|
{
|
||||||
|
slope = slope_lsq[wire];
|
||||||
|
method = 1;
|
||||||
|
}
|
||||||
|
else if (n >= 1)
|
||||||
|
{
|
||||||
|
// Either the least-squares slope is a >1.75x outlier vs its side's median, or
|
||||||
|
// there weren't even enough points (n<2) to attempt a direct fit at all. Either
|
||||||
|
// way: take this wire's own ADC peak (median of whatever points it has) and line
|
||||||
|
// it up with the A1C2-consensus dE_gas peak from the trusted wires on its side,
|
||||||
|
// rather than trusting a noisy few-point regression or falling back to identity.
|
||||||
|
std::vector<double> xs;
|
||||||
|
xs.reserve(ptsFit[wire].size());
|
||||||
|
for (const auto &p : ptsFit[wire])
|
||||||
|
xs.push_back(p.first);
|
||||||
|
double medX = medianOf(xs);
|
||||||
|
double targetY = (wire < 24) ? consensusAnodeDEgas : consensusCathodeDEgas;
|
||||||
|
|
||||||
|
if (medX > 1e-9 && targetY > 0.0)
|
||||||
|
{
|
||||||
|
slope = targetY / medX;
|
||||||
|
method = 2;
|
||||||
|
std::cerr << "fit_pc_energy_calibration: wire " << wire << " "
|
||||||
|
<< (ok ? "least-squares slope (" + std::to_string(slope_lsq[wire]) + ") is an outlier vs its side's median"
|
||||||
|
: "has too few points (" + std::to_string(static_cast<int>(n)) + ") for a direct fit")
|
||||||
|
<< " -- using peak-matched slope (own ADC median=" << medX
|
||||||
|
<< " vs consensus dE_gas=" << targetY << ") = " << slope
|
||||||
|
<< " instead. Check pc_calib_plots/wire_" << Form("%02d", wire)
|
||||||
|
<< ".png to confirm this makes sense." << std::endl;
|
||||||
|
}
|
||||||
|
else if (ok)
|
||||||
|
{
|
||||||
|
// No usable consensus target (e.g. this side has no trusted wires at all) --
|
||||||
|
// fall back to whatever least-squares gave, even though it was flagged.
|
||||||
|
slope = slope_lsq[wire];
|
||||||
|
method = 1;
|
||||||
|
}
|
||||||
|
// else: n>=1 but medX<=0 and no lsq fit either -- falls through to identity below.
|
||||||
|
}
|
||||||
|
|
||||||
|
if (method == 0 && !isDead[wire]) {
|
||||||
|
std::cerr << "fit_pc_energy_calibration: wire " << wire << " has " << n
|
||||||
|
<< " point(s) and no usable consensus target -- writing identity (slope=1, intercept=0)" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
outfile << wire << " " << slope << " " << intercept << " " << method << "\n";
|
||||||
|
|
||||||
|
// 2. Generate and Fill 2D Density Histogram
|
||||||
|
double maxX = maxX_arr[wire], maxY = maxY_arr[wire];
|
||||||
|
if (maxX <= 0) maxX = 64000.0;
|
||||||
|
if (maxY <= 0) maxY = 10.0;
|
||||||
|
|
||||||
|
TString wName = Form("%s %02d", wire < 24 ? "Anode" : "Cathode", wire < 24 ? wire : wire - 24);
|
||||||
|
TH2D *h2 = new TH2D(Form("h2_wire_%d", wire),
|
||||||
|
wName + "; ADC; dE_{gas} (MeV)",
|
||||||
|
150, 0, maxX * 1.05,
|
||||||
|
150, 0, maxY * 1.05);
|
||||||
|
|
||||||
|
for (const auto &p : pts[wire]) {
|
||||||
|
h2->Fill(p.first, p.second);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Setup Fit Line and Stats Box
|
||||||
|
// Known-dead wires never get a fit line drawn, even if they have raw points
|
||||||
|
// (wire 9 does) -- whatever structure is in that data isn't trusted as real
|
||||||
|
// calibration, but the raw scatter is still worth keeping for reference/crosstalk
|
||||||
|
// diagnosis.
|
||||||
|
TF1 *fitLine = nullptr;
|
||||||
|
TPaveText *pt = nullptr;
|
||||||
|
TLine *floorLine = nullptr;
|
||||||
|
bool drawFit = (n > 0) && !isDead[wire];
|
||||||
|
|
||||||
|
if (drawFit) {
|
||||||
|
fitLine = new TF1(Form("fit_%d", wire), "[0]*x", 0, maxX * 1.05); // Formula is strictly y = m*x
|
||||||
|
fitLine->SetParameter(0, slope);
|
||||||
|
fitLine->SetLineColor(method == 2 ? kMagenta : kRed);
|
||||||
|
fitLine->SetLineWidth(2);
|
||||||
|
|
||||||
|
pt = new TPaveText(0.15, 0.72, 0.55, 0.88, "NDC");
|
||||||
|
pt->SetFillColor(kWhite);
|
||||||
|
pt->SetBorderSize(1);
|
||||||
|
pt->AddText(Form("N = %.0f", n));
|
||||||
|
pt->AddText(Form("m = %.2e", slope));
|
||||||
|
pt->AddText("b = 0 (Fixed)");
|
||||||
|
if (method == 2)
|
||||||
|
pt->AddText("PEAK-MATCHED (a1c2 consensus)");
|
||||||
|
if (floorADC[wire] > 0.0)
|
||||||
|
pt->AddText(Form("floor cut @ %.0f ADC", floorADC[wire]));
|
||||||
|
}
|
||||||
|
// Adaptive floor marker: drawn whenever a cut was found, even for wires
|
||||||
|
// that ended up on the identity/dead path, so it's visible on every plot
|
||||||
|
// where it was computed, not just the ones that used it in a fit.
|
||||||
|
if (wire < 24 && floorADC[wire] > 0.0)
|
||||||
|
{
|
||||||
|
floorLine = new TLine(floorADC[wire], 0, floorADC[wire], maxY * 1.05);
|
||||||
|
floorLine->SetLineColor(kGreen + 2);
|
||||||
|
floorLine->SetLineStyle(2);
|
||||||
|
floorLine->SetLineWidth(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
// 4. Save High-Res Individual PNG
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
TCanvas cTemp("cTemp", "cTemp", 800, 600);
|
||||||
|
cTemp.SetGridx();
|
||||||
|
cTemp.SetGridy();
|
||||||
|
if (drawFit) {
|
||||||
|
h2->Draw("COLZ");
|
||||||
|
fitLine->Draw("SAME");
|
||||||
|
pt->Draw();
|
||||||
|
if (floorLine) floorLine->Draw("SAME");
|
||||||
|
} else if (isDead[wire]) {
|
||||||
|
h2->SetTitle(wName + (n > 0 ? " (KNOWN DEAD -- excluded from fit)" : " (KNOWN DEAD, NO DATA)"));
|
||||||
|
h2->Draw(n > 0 ? "COLZ" : "");
|
||||||
|
if (floorLine) floorLine->Draw("SAME");
|
||||||
|
} else {
|
||||||
|
h2->SetTitle(wName + " (DEAD/NO DATA)");
|
||||||
|
h2->Draw();
|
||||||
|
if (floorLine) floorLine->Draw("SAME");
|
||||||
|
}
|
||||||
|
cTemp.SaveAs(Form("pc_calib_plots/wire_%02d.png", wire));
|
||||||
|
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
// 5. Draw onto Global PDF Canvas
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
TVirtualPad* pad = (wire < 24) ? cAnodes->cd(wire + 1) : cCathodes->cd(wire - 24 + 1);
|
||||||
|
pad->SetGridx();
|
||||||
|
pad->SetGridy();
|
||||||
|
|
||||||
|
if (drawFit)
|
||||||
|
{
|
||||||
|
h2->DrawClone("COLZ");
|
||||||
|
fitLine->DrawClone("SAME");
|
||||||
|
pt->DrawClone();
|
||||||
|
if (floorLine) floorLine->DrawClone("SAME");
|
||||||
|
}
|
||||||
|
else if (n > 0)
|
||||||
|
{
|
||||||
|
h2->DrawClone("COLZ"); // known-dead wire with data: show the raw scatter, no fit
|
||||||
|
if (floorLine) floorLine->DrawClone("SAME");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
h2->DrawClone();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write histogram to ROOT file
|
||||||
|
fOut->cd();
|
||||||
|
h2->Write();
|
||||||
|
}
|
||||||
|
|
||||||
|
outfile.close();
|
||||||
|
|
||||||
|
fOut->Close();
|
||||||
|
|
||||||
|
std::cout << "fit_pc_energy_calibration: wrote " << outFilename << std::endl;
|
||||||
|
std::cout << "fit_pc_energy_calibration: individual high-res PNGs saved to pc_calib_plots/" << std::endl;
|
||||||
|
}
|
||||||
49
pccal/pc_gm_coeffs.dat
Normal file
49
pccal/pc_gm_coeffs.dat
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
#Histogram Number Slope Intercept
|
||||||
|
0 0.937314 -16.871
|
||||||
|
1 0 0
|
||||||
|
2 0.965461 -1.54376
|
||||||
|
3 0.926501 -3.27662
|
||||||
|
4 0.905634 2.54577
|
||||||
|
5 0.905634 -11.0387
|
||||||
|
6 0.853919 6.23079
|
||||||
|
7 0.945588 -9.54044
|
||||||
|
8 0.884454 -11.8262
|
||||||
|
9 0.922501 -3.42538
|
||||||
|
10 0.903053 9.28069
|
||||||
|
11 0.914653 9.87642
|
||||||
|
12 0.965332 13.2526
|
||||||
|
13 0.923847 -3.41775
|
||||||
|
14 0.93845 25.9901
|
||||||
|
15 0.955424 12.324
|
||||||
|
16 0.95116 4.99595
|
||||||
|
17 0.910745 2.86648
|
||||||
|
18 0.941376 4.57217
|
||||||
|
19 0.871622 932.111
|
||||||
|
20 1.00624 7.86358
|
||||||
|
21 0.969834 -45.001
|
||||||
|
22 0.89304 -31.5635
|
||||||
|
23 0.933226 4.02193
|
||||||
|
24 0 0
|
||||||
|
25 0.941896 6.16135
|
||||||
|
26 0.980284 2.86886
|
||||||
|
27 0.983166 -3.82952
|
||||||
|
28 0.978704 -2.89713
|
||||||
|
29 0.964947 2.25786
|
||||||
|
30 0.94514 0.925074
|
||||||
|
31 0.977231 1.6493
|
||||||
|
32 0.919527 5.82742
|
||||||
|
33 0.972243 2.88061
|
||||||
|
34 0.928892 7.61384
|
||||||
|
35 0.947376 -0.644223
|
||||||
|
36 0.875342 6.066
|
||||||
|
37 0 0
|
||||||
|
38 0.970953 6.262
|
||||||
|
39 0 0
|
||||||
|
40 0.918408 -3.27891
|
||||||
|
41 0.913619 4.11288
|
||||||
|
42 0.954083 2.21261
|
||||||
|
43 0.993037 5.48924
|
||||||
|
44 0 0
|
||||||
|
45 0.926406 -19.719
|
||||||
|
46 1.00459 5.14574
|
||||||
|
47 0.942483 5.54183
|
||||||
50
pccal/slope_intercept_26Al.dat
Normal file
50
pccal/slope_intercept_26Al.dat
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
#Histogram Number Slope Intercept
|
||||||
|
#Histogram Number Slope Intercept
|
||||||
|
0 0.931015 -1.35431
|
||||||
|
1 1 -1.87356e-10
|
||||||
|
2 0.964185 1.49989
|
||||||
|
3 0.92638 -1.30621
|
||||||
|
4 0.905569 1.00834
|
||||||
|
5 0.901182 0.470903
|
||||||
|
6 0.853932 3.32687
|
||||||
|
7 0.942785 1.08887
|
||||||
|
8 0.878904 -0.0107433
|
||||||
|
9 0.922662 -2.32259
|
||||||
|
10 0.903343 8.38332
|
||||||
|
11 0.914227 6.56108
|
||||||
|
12 0.961008 23.0982
|
||||||
|
13 0.920976 5.22104
|
||||||
|
14 0.936584 31.5073
|
||||||
|
15 0.959044 5.43267
|
||||||
|
16 0.95263 -0.404053
|
||||||
|
17 0.90953 4.82833
|
||||||
|
18 0.940277 10.3629
|
||||||
|
19 0.86746 -17.8678
|
||||||
|
20 1.00683 4.76371
|
||||||
|
21 0.968342 -43.9496
|
||||||
|
22 0.892882 -32.0742
|
||||||
|
23 0.933615 1.10704
|
||||||
|
24 1 -2.89219e-10
|
||||||
|
25 0.942098 -0.105169
|
||||||
|
26 0.980862 -0.732032
|
||||||
|
27 0.982975 -2.22704
|
||||||
|
28 0.978815 -1.51477
|
||||||
|
29 0.965245 -2.19515
|
||||||
|
30 0.945384 -0.892599
|
||||||
|
31 0.977408 -0.908592
|
||||||
|
32 0.919546 3.25464
|
||||||
|
33 0.972194 2.44956
|
||||||
|
34 0.92852 5.44745
|
||||||
|
35 0.947098 1.40531
|
||||||
|
36 0.875491 -1.13145
|
||||||
|
37 1 0
|
||||||
|
38 0.970862 2.86019
|
||||||
|
39 1 0
|
||||||
|
40 0.91793 -3.80615
|
||||||
|
41 0.913897 -2.12964
|
||||||
|
42 0.954014 -0.760604
|
||||||
|
43 0.993616 -1.40278
|
||||||
|
44 1 0
|
||||||
|
45 0.926169 -21.2016
|
||||||
|
46 1.00577 -2.14281
|
||||||
|
47 0.943312 -1.26464
|
||||||
73
process_mapped_run.sh
Executable file
73
process_mapped_run.sh
Executable file
|
|
@ -0,0 +1,73 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# ==========================================
|
||||||
|
# CONFIGURATION
|
||||||
|
# ==========================================
|
||||||
|
DATA_DIR="/mnt/d/Remapped_files/17F_data/root_data"
|
||||||
|
MACRO="TrackRecon.C"
|
||||||
|
|
||||||
|
# SAFETY SETTINGS
|
||||||
|
JOBS=2 # Keep low (2-4) to prevent WSL crashes
|
||||||
|
MIN_MEM="1G" # Wait if RAM is full
|
||||||
|
# ==========================================
|
||||||
|
|
||||||
|
# 1. CHECK ARGUMENTS
|
||||||
|
if [ "$#" -ne 2 ]; then
|
||||||
|
echo "Usage: $0 <Start_Run> <End_Run>"
|
||||||
|
echo "Example: $0 10 50"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
START_RUN=$1
|
||||||
|
END_RUN=$2
|
||||||
|
|
||||||
|
# 2. COMPILE MACRO
|
||||||
|
# Compiling once is mandatory for parallel execution
|
||||||
|
echo "Compiling ${MACRO}..."
|
||||||
|
root -l -b -q -e "gROOT->ProcessLine(\".L ${MACRO}+\");"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error: Compilation failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 3. DEFINE WORKER FUNCTION
|
||||||
|
run_job() {
|
||||||
|
file_path="$1"
|
||||||
|
macro_name="$2"
|
||||||
|
|
||||||
|
echo "Processing: $file_path"
|
||||||
|
|
||||||
|
# Execute ROOT
|
||||||
|
nice -n 15 root -l -x -b -q "$file_path" -e "tree->Process(\"${macro_name}+\");" > "${file_path}.log" 2>&1
|
||||||
|
}
|
||||||
|
export -f run_job
|
||||||
|
|
||||||
|
# 4. QUEUE BUILDER (The "Skip" Logic is here)
|
||||||
|
echo "Checking runs $START_RUN to $END_RUN..."
|
||||||
|
|
||||||
|
for (( i=$START_RUN; i<=$END_RUN; i++ ))
|
||||||
|
do
|
||||||
|
# Construct the input filename
|
||||||
|
# Logic: Run_0 + number -> Run_0115
|
||||||
|
file="${DATA_DIR}/Run_${i}_mapped.root"
|
||||||
|
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# SKIP LOGIC
|
||||||
|
# We check if the log file exists. If so, we assume it's done.
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
log_file="${file}.log"
|
||||||
|
|
||||||
|
if [ -f "$log_file" ]; then
|
||||||
|
# >&2 redirects to stderr so it doesn't get fed into 'parallel'
|
||||||
|
echo "Skipping Run $i: Log file already exists." >&2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Only add to queue if the INPUT file actually exists
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
echo "$file"
|
||||||
|
else
|
||||||
|
echo "Warning: Input file for run $i not found." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
done | parallel --jobs $JOBS --memfree $MIN_MEM --retries 2 run_job {} "$MACRO"
|
||||||
756
qqq_Calib.dat
Normal file
756
qqq_Calib.dat
Normal file
|
|
@ -0,0 +1,756 @@
|
||||||
|
0 0 0 3.16353
|
||||||
|
0 1 0 3.16353
|
||||||
|
0 2 0 3.15625
|
||||||
|
0 3 0 3.12746
|
||||||
|
0 4 0 3.16353
|
||||||
|
0 5 0 3.15625
|
||||||
|
0 6 0 3.18557
|
||||||
|
0 7 0 3.149
|
||||||
|
0 8 0 3.17819
|
||||||
|
0 9 0 3.149
|
||||||
|
0 10 0 3.12034
|
||||||
|
0 11 0 3.149
|
||||||
|
0 12 0 3.16353
|
||||||
|
0 13 0 3.149
|
||||||
|
0 14 0 3.12034
|
||||||
|
0 15 0 3.12034
|
||||||
|
0 0 2 3.24589
|
||||||
|
0 1 2 3.35714
|
||||||
|
0 2 2 3.36537
|
||||||
|
0 3 2 3.32458
|
||||||
|
0 4 2 3.33266
|
||||||
|
0 5 2 3.30058
|
||||||
|
0 6 2 3.26911
|
||||||
|
0 7 2 3.28477
|
||||||
|
0 8 2 3.27692
|
||||||
|
0 9 2 3.25359
|
||||||
|
0 10 2 3.31654
|
||||||
|
0 11 2 3.26133
|
||||||
|
0 12 2 3.27692
|
||||||
|
0 13 2 3.26133
|
||||||
|
0 14 2 3.28477
|
||||||
|
0 15 2 3.30058
|
||||||
|
0 0 3 3.01736
|
||||||
|
0 1 3 3.05773
|
||||||
|
0 2 3 3.08524
|
||||||
|
0 3 3 3.12034
|
||||||
|
0 4 3 3.06456
|
||||||
|
0 5 3 3.04415
|
||||||
|
0 6 3 3.03741
|
||||||
|
0 7 3 3.07142
|
||||||
|
0 8 3 3.0922
|
||||||
|
0 9 3 3.0307
|
||||||
|
0 10 3 3.05092
|
||||||
|
0 11 3 3.03741
|
||||||
|
0 12 3 3.04415
|
||||||
|
0 13 3 3.03741
|
||||||
|
0 14 3 3.04415
|
||||||
|
0 15 3 3.01736
|
||||||
|
0 0 4 3.15625
|
||||||
|
0 1 4 3.14179
|
||||||
|
0 2 4 3.20044
|
||||||
|
0 3 4 3.17819
|
||||||
|
0 4 4 3.19299
|
||||||
|
0 5 4 3.17819
|
||||||
|
0 6 4 3.15625
|
||||||
|
0 7 4 3.18557
|
||||||
|
0 8 4 3.17084
|
||||||
|
0 9 4 3.149
|
||||||
|
0 10 4 3.18557
|
||||||
|
0 11 4 3.15625
|
||||||
|
0 12 4 3.12746
|
||||||
|
0 13 4 3.15625
|
||||||
|
0 14 4 3.15625
|
||||||
|
0 15 4 3.14179
|
||||||
|
0 0 5 3.16353
|
||||||
|
0 1 5 3.17819
|
||||||
|
0 2 5 3.15625
|
||||||
|
0 3 5 3.18557
|
||||||
|
0 4 5 3.22301
|
||||||
|
0 5 5 3.22301
|
||||||
|
0 6 5 3.17819
|
||||||
|
0 7 5 3.19299
|
||||||
|
0 8 5 3.15625
|
||||||
|
0 9 5 3.17819
|
||||||
|
0 10 5 3.17819
|
||||||
|
0 11 5 3.15625
|
||||||
|
0 12 5 3.13461
|
||||||
|
0 13 5 3.18557
|
||||||
|
0 14 5 3.17819
|
||||||
|
0 15 5 3.17084
|
||||||
|
0 0 6 3.19299
|
||||||
|
0 1 6 3.19299
|
||||||
|
0 2 6 3.19299
|
||||||
|
0 3 6 3.15625
|
||||||
|
0 4 6 3.19299
|
||||||
|
0 5 6 3.20793
|
||||||
|
0 6 6 3.23823
|
||||||
|
0 7 6 3.17084
|
||||||
|
0 8 6 3.149
|
||||||
|
0 9 6 3.15625
|
||||||
|
0 10 6 3.19299
|
||||||
|
0 11 6 3.20044
|
||||||
|
0 12 6 3.11326
|
||||||
|
0 13 6 3.19299
|
||||||
|
0 14 6 3.14179
|
||||||
|
0 15 6 3.20044
|
||||||
|
0 0 7 36.5704
|
||||||
|
0 1 7 3.81471
|
||||||
|
0 2 7 3.75209
|
||||||
|
0 3 7 3.84682
|
||||||
|
0 4 7 3.85764
|
||||||
|
0 5 7 3.85764
|
||||||
|
0 6 7 3.93512
|
||||||
|
0 7 7 3.84682
|
||||||
|
0 8 7 3.81471
|
||||||
|
0 9 7 3.77274
|
||||||
|
0 10 7 3.81471
|
||||||
|
0 11 7 3.80413
|
||||||
|
0 12 7 3.78314
|
||||||
|
0 13 7 3.75209
|
||||||
|
0 14 7 3.78314
|
||||||
|
0 15 7 36.5704
|
||||||
|
0 0 8 3.29265
|
||||||
|
0 1 8 3.26911
|
||||||
|
0 2 8 3.31654
|
||||||
|
0 3 8 3.33266
|
||||||
|
0 4 8 3.29265
|
||||||
|
0 5 8 3.27692
|
||||||
|
0 6 8 3.30854
|
||||||
|
0 7 8 3.36537
|
||||||
|
0 8 8 3.34078
|
||||||
|
0 9 8 3.25359
|
||||||
|
0 10 8 3.28477
|
||||||
|
0 11 8 3.27692
|
||||||
|
0 12 8 3.27692
|
||||||
|
0 13 8 3.24589
|
||||||
|
0 14 8 3.27692
|
||||||
|
0 15 8 3.28477
|
||||||
|
0 0 9 3.18557
|
||||||
|
0 1 9 3.26911
|
||||||
|
0 2 9 3.22301
|
||||||
|
0 3 9 3.22301
|
||||||
|
0 4 9 3.23823
|
||||||
|
0 5 9 3.2306
|
||||||
|
0 6 9 3.21545
|
||||||
|
0 7 9 3.23823
|
||||||
|
0 8 9 3.29265
|
||||||
|
0 9 9 3.30058
|
||||||
|
0 10 9 3.22301
|
||||||
|
0 11 9 3.26911
|
||||||
|
0 12 9 3.22301
|
||||||
|
0 13 9 3.2306
|
||||||
|
0 14 9 3.20044
|
||||||
|
0 15 9 3.23823
|
||||||
|
0 0 10 3.33266
|
||||||
|
0 1 10 3.37365
|
||||||
|
0 2 10 3.36537
|
||||||
|
0 3 10 3.35714
|
||||||
|
0 4 10 3.37365
|
||||||
|
0 5 10 3.30854
|
||||||
|
0 6 10 3.39033
|
||||||
|
0 7 10 3.38197
|
||||||
|
0 8 10 3.31654
|
||||||
|
0 9 10 3.41567
|
||||||
|
0 10 10 3.43277
|
||||||
|
0 11 10 3.37365
|
||||||
|
0 12 10 3.32458
|
||||||
|
0 13 10 3.36537
|
||||||
|
0 14 10 3.30058
|
||||||
|
0 15 10 3.32458
|
||||||
|
0 0 11 3.15625
|
||||||
|
0 1 11 3.20793
|
||||||
|
0 2 11 3.18557
|
||||||
|
0 3 11 3.20044
|
||||||
|
0 4 11 3.23823
|
||||||
|
0 5 11 3.20044
|
||||||
|
0 6 11 3.22301
|
||||||
|
0 7 11 3.24589
|
||||||
|
0 8 11 3.19299
|
||||||
|
0 9 11 3.23823
|
||||||
|
0 10 11 3.28477
|
||||||
|
0 11 11 3.23823
|
||||||
|
0 12 11 3.22301
|
||||||
|
0 13 11 3.22301
|
||||||
|
0 14 11 3.16353
|
||||||
|
0 15 11 3.17084
|
||||||
|
0 0 12 3.23823
|
||||||
|
0 1 12 3.2306
|
||||||
|
0 2 12 3.22301
|
||||||
|
0 3 12 3.19299
|
||||||
|
0 4 12 3.25359
|
||||||
|
0 5 12 3.22301
|
||||||
|
0 6 12 3.20793
|
||||||
|
0 7 12 3.2306
|
||||||
|
0 8 12 3.25359
|
||||||
|
0 9 12 3.26133
|
||||||
|
0 10 12 3.25359
|
||||||
|
0 11 12 3.26911
|
||||||
|
0 12 12 3.24589
|
||||||
|
0 13 12 3.19299
|
||||||
|
0 14 12 3.19299
|
||||||
|
0 15 12 3.21545
|
||||||
|
0 0 13 3.45874
|
||||||
|
0 1 13 3.45004
|
||||||
|
0 2 13 3.40718
|
||||||
|
0 3 13 3.42419
|
||||||
|
0 4 13 3.44138
|
||||||
|
0 5 13 3.39874
|
||||||
|
0 6 13 3.41567
|
||||||
|
0 7 13 3.44138
|
||||||
|
0 8 13 3.41567
|
||||||
|
0 9 13 3.46748
|
||||||
|
0 10 13 3.44138
|
||||||
|
0 11 13 3.45874
|
||||||
|
0 12 13 3.45874
|
||||||
|
0 13 13 3.46748
|
||||||
|
0 14 13 3.42419
|
||||||
|
0 15 13 3.40718
|
||||||
|
0 0 14 3.33266
|
||||||
|
0 1 14 3.34078
|
||||||
|
0 2 14 3.32458
|
||||||
|
0 3 14 3.32458
|
||||||
|
0 4 14 3.34078
|
||||||
|
0 5 14 3.30058
|
||||||
|
0 6 14 3.32458
|
||||||
|
0 7 14 3.34078
|
||||||
|
0 8 14 3.30854
|
||||||
|
0 9 14 3.34078
|
||||||
|
0 10 14 3.35714
|
||||||
|
0 11 14 3.27692
|
||||||
|
0 12 14 3.32458
|
||||||
|
0 13 14 3.39033
|
||||||
|
0 14 14 3.37365
|
||||||
|
0 15 14 3.33266
|
||||||
|
0 0 15 3.18557
|
||||||
|
0 1 15 3.17819
|
||||||
|
0 2 15 3.18557
|
||||||
|
0 3 15 3.20044
|
||||||
|
0 4 15 3.19299
|
||||||
|
0 5 15 3.18557
|
||||||
|
0 6 15 3.20044
|
||||||
|
0 7 15 3.2306
|
||||||
|
0 8 15 3.17084
|
||||||
|
0 9 15 3.23823
|
||||||
|
0 10 15 3.2306
|
||||||
|
0 11 15 3.21545
|
||||||
|
0 12 15 3.2306
|
||||||
|
0 13 15 3.20793
|
||||||
|
0 14 15 3.22301
|
||||||
|
0 15 15 3.26911
|
||||||
|
1 0 0 3.07832
|
||||||
|
1 1 0 3.05773
|
||||||
|
1 2 0 3.05773
|
||||||
|
1 3 0 3.04415
|
||||||
|
1 7 0 3.01736
|
||||||
|
1 8 0 3.03741
|
||||||
|
1 0 1 3.17819
|
||||||
|
1 1 1 3.17084
|
||||||
|
1 2 1 3.15625
|
||||||
|
1 3 1 3.149
|
||||||
|
1 7 1 3.149
|
||||||
|
1 8 1 3.11326
|
||||||
|
1 0 2 3.0922
|
||||||
|
1 1 2 3.0922
|
||||||
|
1 2 2 3.08524
|
||||||
|
1 3 2 3.04415
|
||||||
|
1 7 2 3.07832
|
||||||
|
1 8 2 3.09919
|
||||||
|
1 0 3 3.01074
|
||||||
|
1 1 3 3.04415
|
||||||
|
1 2 3 3.07142
|
||||||
|
1 3 3 3.07142
|
||||||
|
1 7 3 2.98453
|
||||||
|
1 8 3 3.02401
|
||||||
|
1 0 4 3.0922
|
||||||
|
1 1 4 3.0922
|
||||||
|
1 2 4 3.0922
|
||||||
|
1 3 4 3.13461
|
||||||
|
1 7 4 3.05773
|
||||||
|
1 8 4 3.09919
|
||||||
|
1 0 5 3.0307
|
||||||
|
1 1 5 2.99757
|
||||||
|
1 2 5 3.00414
|
||||||
|
1 3 5 3.01074
|
||||||
|
1 7 5 3.03741
|
||||||
|
1 8 5 3.02401
|
||||||
|
1 0 6 3.15625
|
||||||
|
1 1 6 3.15625
|
||||||
|
1 2 6 3.14179
|
||||||
|
1 3 6 3.16353
|
||||||
|
1 7 6 3.16353
|
||||||
|
1 8 6 3.149
|
||||||
|
1 0 7 3.33266
|
||||||
|
1 1 7 3.35714
|
||||||
|
1 2 7 3.35714
|
||||||
|
1 3 7 3.34078
|
||||||
|
1 7 7 3.43277
|
||||||
|
1 8 7 3.37365
|
||||||
|
1 0 8 3.06456
|
||||||
|
1 1 8 3.06456
|
||||||
|
1 2 8 3.05092
|
||||||
|
1 3 8 3.05773
|
||||||
|
1 7 8 3.13461
|
||||||
|
1 8 8 3.12746
|
||||||
|
1 0 9 3.16353
|
||||||
|
1 1 9 3.12034
|
||||||
|
1 2 9 3.16353
|
||||||
|
1 3 9 3.16353
|
||||||
|
1 7 9 3.18557
|
||||||
|
1 8 9 3.18557
|
||||||
|
1 0 10 3.2306
|
||||||
|
1 1 10 3.20793
|
||||||
|
1 2 10 3.21545
|
||||||
|
1 3 10 3.23823
|
||||||
|
1 7 10 3.19299
|
||||||
|
1 8 10 3.24589
|
||||||
|
1 0 11 3.03741
|
||||||
|
1 1 11 3.01736
|
||||||
|
1 2 11 3.0307
|
||||||
|
1 3 11 3.05092
|
||||||
|
1 7 11 3.01736
|
||||||
|
1 8 11 3.07142
|
||||||
|
1 0 12 3.01736
|
||||||
|
1 1 12 3.02401
|
||||||
|
1 2 12 3.02401
|
||||||
|
1 3 12 3.00414
|
||||||
|
1 7 12 2.99757
|
||||||
|
1 8 12 2.99104
|
||||||
|
1 0 13 3.27692
|
||||||
|
1 1 13 3.29265
|
||||||
|
1 2 13 3.30854
|
||||||
|
1 3 13 3.29265
|
||||||
|
1 7 13 3.32458
|
||||||
|
1 8 13 3.27692
|
||||||
|
1 0 14 2.93974
|
||||||
|
1 1 14 2.92719
|
||||||
|
1 2 14 2.93345
|
||||||
|
1 3 14 2.96517
|
||||||
|
1 7 14 2.91475
|
||||||
|
1 8 14 2.97159
|
||||||
|
1 0 15 3.2306
|
||||||
|
1 1 15 3.17084
|
||||||
|
1 2 15 3.23823
|
||||||
|
1 3 15 3.20044
|
||||||
|
1 7 15 3.22301
|
||||||
|
1 8 15 3.20793
|
||||||
|
2 0 0 2.71832
|
||||||
|
2 1 0 2.61466
|
||||||
|
2 2 0 2.63983
|
||||||
|
2 3 0 2.62467
|
||||||
|
2 4 0 2.61466
|
||||||
|
2 5 0 2.64492
|
||||||
|
2 6 0 2.63476
|
||||||
|
2 7 0 2.63476
|
||||||
|
2 8 0 2.63983
|
||||||
|
2 9 0 2.61966
|
||||||
|
2 10 0 2.63476
|
||||||
|
2 11 0 2.64492
|
||||||
|
2 12 0 2.6297
|
||||||
|
2 13 0 2.6297
|
||||||
|
2 14 0 2.59979
|
||||||
|
2 0 1 2.89628
|
||||||
|
2 1 1 2.91475
|
||||||
|
2 2 1 2.84226
|
||||||
|
2 3 1 2.8247
|
||||||
|
2 4 1 2.83053
|
||||||
|
2 5 1 2.83053
|
||||||
|
2 6 1 2.79021
|
||||||
|
2 7 1 2.7959
|
||||||
|
2 8 1 2.8247
|
||||||
|
2 9 1 2.83638
|
||||||
|
2 10 1 2.80735
|
||||||
|
2 11 1 2.84816
|
||||||
|
2 12 1 2.81311
|
||||||
|
2 13 1 2.81311
|
||||||
|
2 14 1 2.79021
|
||||||
|
2 0 2 2.69164
|
||||||
|
2 1 2 2.73458
|
||||||
|
2 2 2 2.72371
|
||||||
|
2 3 2 2.69164
|
||||||
|
2 4 2 2.70225
|
||||||
|
2 5 2 2.70758
|
||||||
|
2 6 2 2.67067
|
||||||
|
2 7 2 2.68111
|
||||||
|
2 8 2 2.68111
|
||||||
|
2 9 2 2.70225
|
||||||
|
2 10 2 2.69164
|
||||||
|
2 11 2 2.68637
|
||||||
|
2 12 2 2.69164
|
||||||
|
2 13 2 2.69164
|
||||||
|
2 14 2 2.65516
|
||||||
|
2 0 3 2.54196
|
||||||
|
2 1 3 2.54196
|
||||||
|
2 2 3 2.58997
|
||||||
|
2 3 3 2.56095
|
||||||
|
2 4 3 2.51862
|
||||||
|
2 5 3 2.52326
|
||||||
|
2 6 3 2.52791
|
||||||
|
2 7 3 2.54669
|
||||||
|
2 8 3 2.52791
|
||||||
|
2 9 3 2.54669
|
||||||
|
2 10 3 2.55618
|
||||||
|
2 11 3 2.52791
|
||||||
|
2 12 3 2.52791
|
||||||
|
2 13 3 2.49117
|
||||||
|
2 14 3 2.51862
|
||||||
|
2 0 4 2.66548
|
||||||
|
2 1 4 2.65003
|
||||||
|
2 2 4 2.64492
|
||||||
|
2 3 4 2.69693
|
||||||
|
2 4 4 2.68637
|
||||||
|
2 5 4 2.63476
|
||||||
|
2 6 4 2.65003
|
||||||
|
2 7 4 2.66031
|
||||||
|
2 8 4 2.62467
|
||||||
|
2 9 4 2.67067
|
||||||
|
2 10 4 2.67588
|
||||||
|
2 11 4 2.67067
|
||||||
|
2 12 4 2.61966
|
||||||
|
2 13 4 2.66031
|
||||||
|
2 14 4 2.61466
|
||||||
|
2 0 5 2.60473
|
||||||
|
2 1 5 2.60969
|
||||||
|
2 2 5 2.61466
|
||||||
|
2 3 5 2.60473
|
||||||
|
2 4 5 2.68637
|
||||||
|
2 5 5 2.68637
|
||||||
|
2 6 5 2.60473
|
||||||
|
2 7 5 2.63983
|
||||||
|
2 8 5 2.59979
|
||||||
|
2 9 5 2.61466
|
||||||
|
2 10 5 2.62467
|
||||||
|
2 11 5 2.6297
|
||||||
|
2 12 5 2.63983
|
||||||
|
2 13 5 2.60969
|
||||||
|
2 14 5 2.60473
|
||||||
|
2 0 6 2.77891
|
||||||
|
2 1 6 2.74553
|
||||||
|
2 2 6 2.74004
|
||||||
|
2 3 6 2.74004
|
||||||
|
2 4 6 2.74004
|
||||||
|
2 5 6 2.81889
|
||||||
|
2 6 6 2.80735
|
||||||
|
2 7 6 2.77891
|
||||||
|
2 8 6 2.76211
|
||||||
|
2 9 6 2.77329
|
||||||
|
2 10 6 2.71294
|
||||||
|
2 11 6 2.74553
|
||||||
|
2 12 6 2.74553
|
||||||
|
2 13 6 2.77329
|
||||||
|
2 14 6 2.75103
|
||||||
|
2 0 7 2.64492
|
||||||
|
2 1 7 2.68111
|
||||||
|
2 2 7 2.64492
|
||||||
|
2 3 7 2.65516
|
||||||
|
2 4 7 2.67067
|
||||||
|
2 5 7 2.64492
|
||||||
|
2 6 7 2.72371
|
||||||
|
2 7 7 2.74553
|
||||||
|
2 8 7 2.6297
|
||||||
|
2 9 7 2.67067
|
||||||
|
2 10 7 2.65003
|
||||||
|
2 11 7 2.66548
|
||||||
|
2 12 7 2.68111
|
||||||
|
2 13 7 2.65516
|
||||||
|
2 14 7 2.67067
|
||||||
|
2 0 8 2.71294
|
||||||
|
2 1 8 2.75656
|
||||||
|
2 2 8 2.75103
|
||||||
|
2 3 8 2.74004
|
||||||
|
2 4 8 2.76769
|
||||||
|
2 5 8 2.71832
|
||||||
|
2 6 8 2.74553
|
||||||
|
2 7 8 2.81311
|
||||||
|
2 8 8 2.83053
|
||||||
|
2 9 8 2.72371
|
||||||
|
2 10 8 2.76211
|
||||||
|
2 11 8 2.77329
|
||||||
|
2 12 8 2.76211
|
||||||
|
2 13 8 2.77329
|
||||||
|
2 14 8 2.76211
|
||||||
|
2 0 10 2.75656
|
||||||
|
2 1 10 2.76769
|
||||||
|
2 2 10 2.77329
|
||||||
|
2 3 10 2.77329
|
||||||
|
2 4 10 2.76769
|
||||||
|
2 5 10 2.71832
|
||||||
|
2 6 10 2.75103
|
||||||
|
2 7 10 2.72371
|
||||||
|
2 8 10 2.77329
|
||||||
|
2 9 10 2.79021
|
||||||
|
2 10 10 2.81311
|
||||||
|
2 11 10 2.72371
|
||||||
|
2 12 10 2.72371
|
||||||
|
2 13 10 2.76211
|
||||||
|
2 14 10 2.76769
|
||||||
|
2 0 11 2.84226
|
||||||
|
2 1 11 2.81311
|
||||||
|
2 2 11 2.81311
|
||||||
|
2 3 11 2.84816
|
||||||
|
2 4 11 2.80735
|
||||||
|
2 5 11 2.86004
|
||||||
|
2 6 11 2.84816
|
||||||
|
2 7 11 2.83638
|
||||||
|
2 8 11 2.85409
|
||||||
|
2 9 11 2.87202
|
||||||
|
2 10 11 2.90857
|
||||||
|
2 11 11 2.87805
|
||||||
|
2 12 11 2.81889
|
||||||
|
2 13 11 2.81889
|
||||||
|
2 14 11 2.83638
|
||||||
|
2 0 12 2.75656
|
||||||
|
2 1 12 2.71832
|
||||||
|
2 2 12 2.72913
|
||||||
|
2 3 12 2.73458
|
||||||
|
2 4 12 2.73458
|
||||||
|
2 5 12 2.76211
|
||||||
|
2 6 12 2.73458
|
||||||
|
2 7 12 2.71832
|
||||||
|
2 8 12 2.75656
|
||||||
|
2 9 12 2.71832
|
||||||
|
2 10 12 2.70758
|
||||||
|
2 11 12 2.75656
|
||||||
|
2 12 12 2.75656
|
||||||
|
2 13 12 2.74553
|
||||||
|
2 14 12 2.74004
|
||||||
|
2 0 13 2.63476
|
||||||
|
2 1 13 2.67067
|
||||||
|
2 2 13 2.66031
|
||||||
|
2 3 13 2.65516
|
||||||
|
2 4 13 2.66548
|
||||||
|
2 5 13 2.61466
|
||||||
|
2 6 13 2.61466
|
||||||
|
2 7 13 2.6297
|
||||||
|
2 8 13 2.64492
|
||||||
|
2 9 13 2.66548
|
||||||
|
2 10 13 2.66548
|
||||||
|
2 11 13 2.65003
|
||||||
|
2 12 13 2.69164
|
||||||
|
2 13 13 2.69693
|
||||||
|
2 14 13 2.62467
|
||||||
|
2 0 14 2.70758
|
||||||
|
2 1 14 2.73458
|
||||||
|
2 2 14 2.71832
|
||||||
|
2 3 14 2.71294
|
||||||
|
2 4 14 2.74553
|
||||||
|
2 5 14 2.71832
|
||||||
|
2 6 14 2.68111
|
||||||
|
2 7 14 2.68637
|
||||||
|
2 8 14 2.72371
|
||||||
|
2 9 14 2.73458
|
||||||
|
2 10 14 2.75656
|
||||||
|
2 11 14 2.72913
|
||||||
|
2 12 14 2.69164
|
||||||
|
2 13 14 2.79021
|
||||||
|
2 14 14 2.76769
|
||||||
|
3 0 0 2.6297
|
||||||
|
3 1 0 2.59487
|
||||||
|
3 2 0 2.60473
|
||||||
|
3 3 0 2.61466
|
||||||
|
3 4 0 2.59487
|
||||||
|
3 5 0 2.59487
|
||||||
|
3 7 0 2.61966
|
||||||
|
3 8 0 2.59979
|
||||||
|
3 9 0 2.59487
|
||||||
|
3 10 0 2.59487
|
||||||
|
3 11 0 2.60969
|
||||||
|
3 12 0 2.57055
|
||||||
|
3 13 0 2.58023
|
||||||
|
3 14 0 2.58997
|
||||||
|
3 15 0 2.60969
|
||||||
|
3 0 2 2.75103
|
||||||
|
3 1 2 2.83053
|
||||||
|
3 2 2 2.81889
|
||||||
|
3 3 2 2.79021
|
||||||
|
3 4 2 2.77891
|
||||||
|
3 5 2 2.78455
|
||||||
|
3 7 2 2.76769
|
||||||
|
3 8 2 2.77329
|
||||||
|
3 9 2 2.73458
|
||||||
|
3 10 2 2.77329
|
||||||
|
3 11 2 2.74004
|
||||||
|
3 12 2 2.76211
|
||||||
|
3 13 2 2.77891
|
||||||
|
3 14 2 2.76211
|
||||||
|
3 15 2 2.74553
|
||||||
|
3 0 3 2.7959
|
||||||
|
3 1 3 2.8247
|
||||||
|
3 2 3 2.86004
|
||||||
|
3 3 3 2.87805
|
||||||
|
3 4 3 2.80735
|
||||||
|
3 5 3 2.8247
|
||||||
|
3 7 3 2.81311
|
||||||
|
3 8 3 2.8247
|
||||||
|
3 9 3 2.8247
|
||||||
|
3 10 3 2.80161
|
||||||
|
3 11 3 2.81889
|
||||||
|
3 12 3 2.8247
|
||||||
|
3 13 3 2.80161
|
||||||
|
3 14 3 2.77329
|
||||||
|
3 15 3 2.80735
|
||||||
|
3 0 4 2.76211
|
||||||
|
3 1 4 2.78455
|
||||||
|
3 2 4 2.81311
|
||||||
|
3 3 4 2.83638
|
||||||
|
3 4 4 2.86602
|
||||||
|
3 5 4 2.79021
|
||||||
|
3 7 4 2.78455
|
||||||
|
3 8 4 2.79021
|
||||||
|
3 9 4 2.77891
|
||||||
|
3 10 4 2.77891
|
||||||
|
3 11 4 2.7959
|
||||||
|
3 12 4 2.77329
|
||||||
|
3 13 4 2.81311
|
||||||
|
3 14 4 2.80161
|
||||||
|
3 15 4 2.80161
|
||||||
|
3 0 5 2.72913
|
||||||
|
3 1 5 2.77329
|
||||||
|
3 2 5 2.75103
|
||||||
|
3 3 5 2.76211
|
||||||
|
3 4 5 2.8247
|
||||||
|
3 5 5 2.79021
|
||||||
|
3 7 5 2.73458
|
||||||
|
3 8 5 2.71294
|
||||||
|
3 9 5 2.72913
|
||||||
|
3 10 5 2.75656
|
||||||
|
3 11 5 2.75656
|
||||||
|
3 12 5 2.73458
|
||||||
|
3 13 5 2.74553
|
||||||
|
3 14 5 2.75103
|
||||||
|
3 15 5 2.74004
|
||||||
|
3 0 7 2.81311
|
||||||
|
3 1 7 2.80161
|
||||||
|
3 2 7 2.81889
|
||||||
|
3 3 7 2.81311
|
||||||
|
3 4 7 2.76769
|
||||||
|
3 5 7 2.83638
|
||||||
|
3 7 7 2.84816
|
||||||
|
3 8 7 2.83053
|
||||||
|
3 9 7 2.77891
|
||||||
|
3 10 7 2.80161
|
||||||
|
3 11 7 2.77891
|
||||||
|
3 12 7 2.81889
|
||||||
|
3 13 7 2.7959
|
||||||
|
3 14 7 2.81311
|
||||||
|
3 15 7 2.78455
|
||||||
|
3 0 8 2.92719
|
||||||
|
3 1 8 2.93345
|
||||||
|
3 2 8 2.91475
|
||||||
|
3 3 8 2.9524
|
||||||
|
3 4 8 2.93345
|
||||||
|
3 5 8 2.9524
|
||||||
|
3 7 8 2.97805
|
||||||
|
3 8 8 2.99757
|
||||||
|
3 9 8 2.96517
|
||||||
|
3 10 8 2.96517
|
||||||
|
3 11 8 2.93345
|
||||||
|
3 12 8 2.9524
|
||||||
|
3 13 8 2.9524
|
||||||
|
3 14 8 2.92719
|
||||||
|
3 15 8 2.96517
|
||||||
|
3 0 9 2.76211
|
||||||
|
3 1 9 2.75656
|
||||||
|
3 2 9 2.79021
|
||||||
|
3 3 9 2.78455
|
||||||
|
3 4 9 2.7959
|
||||||
|
3 5 9 2.76211
|
||||||
|
3 7 9 2.80161
|
||||||
|
3 8 9 2.81889
|
||||||
|
3 9 9 2.86602
|
||||||
|
3 10 9 2.80735
|
||||||
|
3 11 9 2.78455
|
||||||
|
3 12 9 2.7959
|
||||||
|
3 13 9 2.80161
|
||||||
|
3 14 9 2.80161
|
||||||
|
3 15 9 2.80735
|
||||||
|
3 0 10 3.14179
|
||||||
|
3 1 10 3.13461
|
||||||
|
3 2 10 3.17084
|
||||||
|
3 3 10 3.15625
|
||||||
|
3 4 10 3.149
|
||||||
|
3 5 10 3.12746
|
||||||
|
3 7 10 3.17819
|
||||||
|
3 8 10 3.19299
|
||||||
|
3 9 10 3.22301
|
||||||
|
3 10 10 3.2306
|
||||||
|
3 11 10 3.20793
|
||||||
|
3 12 10 3.16353
|
||||||
|
3 13 10 3.17819
|
||||||
|
3 14 10 3.19299
|
||||||
|
3 15 10 3.19299
|
||||||
|
3 0 11 2.99757
|
||||||
|
3 1 11 2.97159
|
||||||
|
3 2 11 3.01074
|
||||||
|
3 3 11 2.99104
|
||||||
|
3 4 11 3.00414
|
||||||
|
3 5 11 3.00414
|
||||||
|
3 7 11 2.9524
|
||||||
|
3 8 11 3.00414
|
||||||
|
3 9 11 2.96517
|
||||||
|
3 10 11 3.0307
|
||||||
|
3 11 11 3.06456
|
||||||
|
3 12 11 3.01074
|
||||||
|
3 13 11 2.99757
|
||||||
|
3 14 11 3.02401
|
||||||
|
3 15 11 2.96517
|
||||||
|
3 0 12 2.87805
|
||||||
|
3 1 12 2.90241
|
||||||
|
3 2 12 2.84816
|
||||||
|
3 3 12 2.87805
|
||||||
|
3 4 12 2.85409
|
||||||
|
3 5 12 2.87805
|
||||||
|
3 7 12 2.87202
|
||||||
|
3 8 12 2.86004
|
||||||
|
3 9 12 2.87202
|
||||||
|
3 10 12 2.90241
|
||||||
|
3 11 12 2.9524
|
||||||
|
3 12 12 2.92096
|
||||||
|
3 13 12 2.90241
|
||||||
|
3 14 12 2.90241
|
||||||
|
3 15 12 2.89018
|
||||||
|
3 0 13 2.92096
|
||||||
|
3 1 13 2.92096
|
||||||
|
3 2 13 2.90241
|
||||||
|
3 3 13 2.91475
|
||||||
|
3 4 13 2.92719
|
||||||
|
3 5 13 2.92719
|
||||||
|
3 7 13 2.89628
|
||||||
|
3 8 13 2.89628
|
||||||
|
3 9 13 2.90857
|
||||||
|
3 10 13 2.92096
|
||||||
|
3 11 13 2.89628
|
||||||
|
3 12 13 2.93345
|
||||||
|
3 13 13 2.99104
|
||||||
|
3 14 13 2.90241
|
||||||
|
3 15 13 2.92096
|
||||||
|
3 0 14 2.77329
|
||||||
|
3 1 14 2.74553
|
||||||
|
3 2 14 2.75656
|
||||||
|
3 3 14 2.78455
|
||||||
|
3 4 14 2.78455
|
||||||
|
3 5 14 2.77891
|
||||||
|
3 7 14 2.77891
|
||||||
|
3 8 14 2.79021
|
||||||
|
3 9 14 2.77891
|
||||||
|
3 10 14 2.76769
|
||||||
|
3 11 14 2.7959
|
||||||
|
3 12 14 2.78455
|
||||||
|
3 13 14 2.84226
|
||||||
|
3 14 14 2.84226
|
||||||
|
3 15 14 2.7959
|
||||||
|
3 0 15 2.91475
|
||||||
|
3 1 15 2.90241
|
||||||
|
3 2 15 2.93345
|
||||||
|
3 3 15 2.93345
|
||||||
|
3 4 15 2.92719
|
||||||
|
3 5 15 2.90857
|
||||||
|
3 7 15 2.95877
|
||||||
|
3 8 15 2.90241
|
||||||
|
3 9 15 2.93345
|
||||||
|
3 10 15 2.94606
|
||||||
|
3 11 15 2.90241
|
||||||
|
3 12 15 2.97159
|
||||||
|
3 13 15 2.90857
|
||||||
|
3 14 15 2.93345
|
||||||
|
3 15 15 2.99757
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user