Compare commits

...

132 Commits

Author SHA1 Message Date
James Szalkie 3a0c04b1c0 saving work again, refining and benchmarking energy loss and deposition 2026-06-18 15:40:15 -04:00
James Szalkie 4db59641cd refining energy loss with Lise 2026-06-17 12:03:07 -04:00
james szalkie bcaa540a95 expanded dual-plotter into multi-plotter 2026-06-15 14:31:46 -04:00
James Szalkie 7fb4fc542c screwy plot 2026-06-05 16:00:31 -04:00
James Szalkie 19928ac432 QQQ data 2026-06-05 15:47:35 -04:00
James Szalkie e4a490245c python structure fixes 2026-06-05 14:14:21 -04:00
James Szalkie 92d831678e QQQ 2026-06-04 17:26:34 -04:00
James Szalkie 151e649fe9 concatation fix 2026-06-04 12:36:19 -04:00
James Szalkie 258306d442 sausage eliminated 2026-06-04 12:16:54 -04:00
James Szalkie d94795ae33 expanded analysis 2026-06-03 10:35:26 -04:00
James Szalkie 7b489612f6 more plotting troubleshooting 2026-05-29 16:48:53 -04:00
James Szalkie 4feca6c104 sequential decay 2026-05-28 11:40:52 -04:00
James Szalkie d2953531ef Cleaned up old Eloss functions in favor of new program 2026-05-27 13:18:51 -04:00
james szalkie b4eb81a0ec OS checker on makefile 2026-05-26 12:25:38 -04:00
James Szalkie f001bb21e0 fixed memory issues and dual plotting 2026-05-26 10:55:34 -04:00
James Szalkie b1a53e9047 debug workflow of python app 2026-05-22 14:41:23 -04:00
James Szalkie 17e36ad451 Streamlined, save new data as root file 2026-05-22 14:04:52 -04:00
James Szalkie 804c89b320 Name resolved particles for isotopes 2026-05-21 12:36:23 -04:00
James Szalkie 6ef916ba1c cmd line feature for eloss app 2026-05-21 11:59:47 -04:00
James Szalkie ca33ba17b3 energy loss app 2026-05-20 16:54:28 -04:00
James Szalkie f317505721 new analysis and comments 2026-05-19 16:00:49 -04:00
James Szalkie 168904b260 eloss calculator 2026-05-18 15:11:08 -04:00
James Szalkie 8d08b0d355 Expanded analysis capabilities and script 2026-05-14 14:52:22 -04:00
James Szalkie 851d044f25 Plot full kientic energy spectrum 2026-05-13 13:48:41 -04:00
James Szalkie f0f5b57afc Catima data source and new Eloss table generator 2026-05-12 16:01:10 -04:00
James Szalkie 36f9958562 new eloss function 2026-05-11 12:57:30 -04:00
James Szalkie 8cf637d0dd change desnity from pressure 2026-04-20 17:18:09 -04:00
James Szalkie 049365a549 E vs dE plotter 2026-04-20 15:31:53 -04:00
James Szalkie fe112a6004 updated root script 2026-04-20 13:37:31 -04:00
James Szalkie 38ac66a721 NIST stopping table file 2026-04-20 11:11:36 -04:00
James Szalkie 10a210cbab Energy loss loop 2026-04-14 16:04:58 -04:00
James Szalkie 36b230d23a energy loss table plot 2026-04-13 16:04:00 -04:00
James Szalkie 2bd5b18f63 rearranged energy loss settings, added macro script, updated mass plotter 2026-04-13 15:44:39 -04:00
James Szalkie 9ae1c99200 He 2026-04-09 15:13:16 -04:00
James Szalkie 0337877dda fixed detached head ugh 2026-04-09 13:09:20 -04:00
James Szalkie 1339218088 vis 2 2026-04-02 15:56:55 -04:00
James Szalkie 5c48fd699f Vis enabled 2026-04-02 15:18:38 -04:00
James Szalkie 4bbb1399cc two trees, cleaned up 2026-04-02 12:50:48 -04:00
James Szalkie 6e969434da energy dep comments 2026-03-30 15:21:44 -04:00
James Szalkie e78b378e05 Energy deposition 2026-03-30 10:59:14 -04:00
James Szalkie a0f0a7083d redo 2026-03-30 10:49:41 -04:00
James Szalkie e3ffe56351 ROOT tinkering 2026-03-12 12:00:38 -04:00
Vignesh Sitaraman 9af7e70f26 modified: MakeVertex.C 2026-03-06 16:09:28 -05:00
Vignesh Sitaraman 6e6d281dd3 modified: MakeVertex.C hist scale changed 2026-03-06 16:00:27 -05:00
Vignesh Sitaraman 411ef2d9de modified: MakeVertex.C implemented diagnostics to compare the behaviour of singleton cathodes vs events with higher multiplicty 2026-03-06 15:56:48 -05:00
Vignesh Sitaraman cbd4bf42a7 modified: MakeVertex.C 2026-02-26 12:42:02 -05:00
Vignesh Sitaraman 601caa3881 modified: MakeVertex.C 2026-02-24 21:06:24 -05:00
Vignesh Sitaraman 2938411c35 modified: .gitignore
new file:   ELoss/Eloss_17F
	new file:   ELoss/Eloss_27Al
	new file:   ELoss/Eloss_alpha
	new file:   ELoss/Eloss_p
	modified:   MakeVertex.C
	deleted:    MakeVertex.C:Zone.Identifier
	deleted:    MakeVertex.h:Zone.Identifier
2026-02-24 11:59:01 -05:00
Vignesh Sitaraman 8c2657255c modified: Armory/ClassPW.h
new file:   Armory/SX3Geom.h
	modified:   MakeVertex.C
	renamed:    sx3cal/sx3cal/EXFit.C -> sx3cal/EXFit.C
	renamed:    sx3cal/sx3cal/LRFit.C -> sx3cal/LRFit.C
	renamed:    sx3cal/sx3cal/backgains.dat -> sx3cal/backgains.dat
	renamed:    sx3cal/sx3cal/backgains.dat.unity -> sx3cal/backgains.dat.unity
	renamed:    sx3cal/sx3cal/frontgains.dat -> sx3cal/frontgains.dat
	renamed:    sx3cal/sx3cal/frontgains.dat.unity -> sx3cal/frontgains.dat.unity
	renamed:    sx3cal/sx3cal/rightgains.dat -> sx3cal/rightgains.dat
	renamed:    sx3cal/sx3cal/rightgains.dat.unity -> sx3cal/rightgains.dat.unity
2026-02-19 14:49:49 -05:00
Vignesh Sitaraman 00f8460e36 modified: MakeVertex.C
new file:   sx3cal/sx3cal/EXFit.C
	new file:   sx3cal/sx3cal/LRFit.C
	new file:   sx3cal/sx3cal/backgains.dat
	new file:   sx3cal/sx3cal/backgains.dat.unity
	new file:   sx3cal/sx3cal/frontgains.dat
	new file:   sx3cal/sx3cal/frontgains.dat.unity
	new file:   sx3cal/sx3cal/rightgains.dat
	new file:   sx3cal/sx3cal/rightgains.dat.unity
2026-02-18 16:01:55 -05:00
Vignesh Sitaraman 7260d42d8d modified: Armory/ANASEN_model.C
modified:   Armory/ClassPW.h
	modified:   MakeVertex.C
	modified:   TrackRecon.C
2026-02-18 12:06:54 -05:00
Vignesh Sitaraman 4401ae8eb2 new file: MakeVertex.C
new file:   MakeVertex.C:Zone.Identifier
	new file:   MakeVertex.h
	new file:   MakeVertex.h:Zone.Identifier
	modified:   TrackRecon.C
2026-02-11 15:08:11 -05:00
Vignesh Sitaraman 282aa5ecea modified: .gitignore
new file:   Armory/ClassData.h
	new file:   Armory/Hit.h
	modified:   Armory/Makefile
	new file:   Armory/fsuReader.h
	new file:   Armory/macro.h
	new file:   BatchProcess.sh
	modified:   ProcessRun.sh
	modified:   process_mapped_run.sh
2026-02-10 17:01:27 -05:00
Vignesh Sitaraman 9f949edd00 new file: RunTimeSummary.C
new file:   Timing_Summary_Matplotlib.png
	modified:   TrackRecon.C
	modified:   process_mapped_run.sh
2026-02-09 16:11:07 -05:00
Vignesh Sitaraman 56cc900b61 modified: .gitignore
modified:   TrackRecon.C
	deleted:    batchproces_mapped_run.sh
	modified:   process_mapped_run.sh
2026-02-05 15:20:17 -05:00
Vignesh Sitaraman 17ab8c884a modified: TrackRecon.C
new file:   batchproces_mapped_run.sh
	new file:   process_mapped_run.sh
2026-01-30 10:53:34 -05:00
Vignesh Sitaraman 67199cdb60 modified: QQQ_Calcheck.C
modified:   TrackRecon.C
	new file:   qqq_Calib.dat
	new file:   qqq_GainMatch.dat
	renamed:    slope_intercept_cathode.txt -> slope_intercept_cathode.dat
	renamed:    slope_intercept_results.txt -> slope_intercept_results.dat
	renamed:    slope_intercept_results_anode.txt -> slope_intercept_results_anode.dat
2026-01-28 14:27:42 -05:00
Vignesh Sitaraman ac035370b4 modified: QQQ_Calcheck.C made changes to bring it in line with the new consistent Wedge-Ring mapping
modified:   TrackRecon.C
2026-01-25 14:15:45 -05:00
Vignesh Sitaraman c4b543bdeb modified: ProcessRun.sh
modified:   TrackRecon.C
	modified:   mapping.h corrrrected QQQ0 rings
2026-01-25 11:23:27 -05:00
Vignesh Sitaraman 0a8432e4e3 modified: TrackRecon.C phi and theta plots for PC and QQQ included 2026-01-23 17:55:55 -05:00
Vignesh Sitaraman 0883ebdb6e modified: Armory/Makefile
deleted:    Armory/README.md
	modified:   Calibration.C Sudarsan pointed out that the gain match and calibration stages have the ring and wedge swapped, so I fixed that.
	modified:   ProcessRun.sh changes for running on laptop
	modified:   TrackRecon.C same inconsistency as in Calibration.C fixed
	deleted:    makeplots.C not used anymore
	modified:   mapping.h corrected teh mapping for the QQQs poptentially, need to confirm
	modified:   mapping_old.txt
2026-01-22 15:07:10 -05:00
Vignesh Sitaraman 9c20c4abfe modified: TrackRecon.C QQQ wedge channels flipped but the energy gains have not, thus QQQ energy needs to be recalibrated. 2026-01-21 11:56:32 -05:00
Vignesh Sitaraman 13bfafe9c4 modified: Armory/ClassPW.h
modified:   TrackRecon.C
2026-01-18 15:41:54 -05:00
Vignesh Sitaraman 22e32c7ebc Refactor plotting logic in TrackRecon::Process for clarity and added neighbour checks for anode and cathode hits 2026-01-16 16:36:25 -05:00
Vignesh Sitaraman 4599ad2a38 modified: TrackRecon.C 2026-01-13 17:55:27 -05:00
Vignesh Sitaraman c1ffaa8340 modified: TrackRecon.C 2026-01-13 17:51:01 -05:00
Vignesh Sitaraman 19286055ea modified: TrackRecon.C inlcuded timing plots for the PC 2026-01-13 12:04:14 -05:00
Vignesh Sitaraman 82c2127b4d modified: TrackRecon.C included test cases for 1,2,&3 cathode events. Also stopped sorting the cathode anmd anodehits arrays. 2026-01-09 15:49:32 -05:00
Vignesh Sitaraman d81e35d5e4 modified: Analyzer.C
modified:   TrackRecon.C Reconstruction only for the QQQ tracks
	new file:   TrackRecon.h
2025-12-19 11:56:10 -05:00
Vignesh Sitaraman 97880940be modified: .gitignore
modified:   .vscode/settings.json
	modified:   Analyzer.C
	modified:   Calibration.C
	modified:   GainMatchQQQ.C
	modified:   QQQ_Calcheck.C
2025-12-16 15:41:21 -05:00
Vignesh Sitaraman aee3a2467d modified: Calibration.C
modified:   GainMatchQQQ.C
	modified:   QQQ_Calcheck.C
	modified:   makeplots.C
2025-12-01 13:49:23 -05:00
Vignesh Sitaraman c32215e293 modified: .vscode/settings.json
modified:   Calibration.C
	modified:   GainMatchQQQ.C
	new file:   QQQ_Calcheck.C
	new file:   QQQ_Calcheck.h
	new file:   makeplots.C
2025-11-26 11:32:16 -05:00
Vignesh Sitaraman 535afcb704 modified: Calibration.C
modified:   GainMatchQQQ.C
2025-11-17 18:33:11 -05:00
Vignesh Sitaraman 0773b9e6cc modified: .gitignore
modified:   .vscode/settings.json
	renamed:    HistPlotter.h -> Armory/HistPlotter.h
	new file:   Armory/LICENSE
	new file:   Armory/README.md
	modified:   Calibration.C
	modified:   GainMatchQQQ.C
	modified:   GainMatchSX3.C
	modified:   sx3_GainMatchfront.txt
2025-11-17 09:33:08 -05:00
Vignesh Sitaraman 7582731de4 new file: sx3_BackGains.txt
new file:   sx3_GainMatchfront.txt
2025-10-29 17:47:40 -04:00
Vignesh Sitaraman 49de3b64a8 modified: Analyzer.C
modified:   GainMatchSX3.C
	modified:   GainMatchSX3Front.C
	new file:   HistPlotter.h
2025-10-29 17:42:54 -04:00
Vignesh Sitaraman 61473ca14e modified: Calibration.C use both front and back gains
modified:   GainMatchSX3.C changed structure a bit
	modified:   GainMatchSX3Front.C removed some redundant code that I was trying out
2025-10-06 15:11:31 -04:00
Vignesh Sitaraman ecd755e09c modified: Calibration.C looking at 1d hists for sx3 backs 2025-09-30 15:45:16 -04:00
Vignesh Sitaraman 265ebd3372 modified: Calibration.C
modified:   GainMatchQQQ.C
	modified:   GainMatchSX3.C
	modified:   GainMatchSX3Front.C trying out not doing back gainmatching to see if that improves fits.
2025-09-30 15:17:00 -04:00
Vignesh Sitaraman afef56df12 modified: Analyzer.C
modified:   GainMatchSX3.C
2025-09-22 13:31:22 -04:00
Vignesh Sitaraman 579f4e4f6c modified: .vscode/settings.json
modified:   GainMatchSX3.C to make the calib a 2 factor calib insteade of inlcuding the fronts
	modified:   GainMatchSX3Front.C chcanged the readout for the  new back calib
2025-09-18 13:28:02 -04:00
Vignesh Sitaraman d59b22ff78 modified: Calibration.C 2025-09-17 13:42:12 -04:00
Vignesh Sitaraman 49610e9c2f modified: Calibration.C 2025-09-17 13:22:11 -04:00
Vignesh Sitaraman fa4b1dd2f5 new file: Calibration.C
renamed:    GainMatch.h -> Calibration.h
	renamed:    GainMatch.C -> GainMatchQQQ.C
	new file:   GainMatchQQQ.h
2025-09-04 14:56:55 -04:00
Vignesh Sitaraman 877f765357 modified: GainMatchSX3Front.C 2025-08-20 17:09:01 -07:00
Vignesh Sitaraman 06fbc1afd9 modified: GainMatchSX3.C
modified:   GainMatchSX3Front.C
2025-08-20 15:25:40 -07:00
Vignesh Sitaraman b44ffd7fdf modified: .vscode/c_cpp_properties.json made changes to include the laptop
modified:   GainMatchSX3.C included flags to allow interactive mode and verbose fit
	modified:   GainMatchSX3Front.C included flags to allow interactive mode and verbose fit
2025-07-31 12:07:07 -04:00
Vignesh Sitaraman 3d0d176f5a modified: GainMatchSX3.C
modified:   GainMatchSX3Front.C
    changes made to the GainMatchSX3.C and GainMatchSX3Front.C files to include reduced Chisquared and fixed uncertainties for the gain matching process.
2025-07-24 16:12:46 -04:00
Vignesh Sitaraman 4fc05ea338 new file: GainMatchSX3Front.C using a 2 step fit for the same method, going to implement a inverse fit now wherein the fronts are fit first and then the sum is fit against the backs.
new file:   GainMatchSX3Front.h
	new file:   GainMatchSX3Front1.C
2025-07-21 11:19:27 -04:00
Vignesh Sitaraman dd2ec66db1 modified: GainMatchSX3.C multidimfit now runs but does not work as expected,
the fit curve is empty.
2025-07-09 15:30:12 -04:00
Vignesh Sitaraman a8d4e8f0f6 modified: GainMatchSX3.C multidimfit WIP 2025-07-08 13:53:00 -04:00
Vignesh Sitaraman 2864036ec8 fix: correct include path formatting in c_cpp_properties.json 2025-06-10 11:31:08 -04:00
Vignesh Sitaraman 050cb425d5 modified: GainMatchSX3.C 2025-06-10 11:24:01 -04:00
Vignesh Sitaraman fb355a3cc4 modified: GainMatchSX3.C
changes made to GainMatchSX3  when I found a bug in the way the sx3 condition was being checked
2025-06-10 11:18:08 -04:00
Vignesh Sitaraman 5b43d60b30 modified: GainMatchSX3.C changed terminate to accomodate for events which don't have a back but have more than 3 SX3hits 2025-05-27 13:29:01 -04:00
Vignesh Sitaraman e86ab5ed4d modified: GainMatchSX3.C gainmatching of backs fixed. fronts in progress 2025-05-19 13:16:22 -04:00
Vignesh Sitaraman 9cadfdd191 modified: GainMatchSX3.C 2025-05-13 13:32:22 -04:00
Vignesh Sitaraman d4582d80ff modified: GainMatch.C
new file:   GainMatchSX3.C
	new file:   GainMatchSX3.h
2025-05-12 17:21:25 -04:00
Vignesh Sitaraman 18870ed82b modified: GainMatch.C 2025-04-25 16:18:58 -04:00
Vignesh Sitaraman 5c1c5348f4 modified: GainMatch.C QQQs now show up as gain matched. 2025-04-25 15:41:10 -04:00
Vignesh Sitaraman 65ab69ebe6 modified: GainMatch.C 2025-04-24 10:48:14 -04:00
Vignesh Sitaraman 1df7470ca1 modified: .vscode/settings.json 2025-04-10 09:51:36 -04:00
Vignesh Sitaraman a7a765c059 modified: Analyzer.C
new file:   GainMatch.C
	new file:   GainMatch.h
2025-04-10 09:50:54 -04:00
Vignesh Sitaraman 39e8f41ab1 modified: Analyzer.C implemented basic trackreconstruction
modified:   Armory/ANASEN_model.C changed qqq radii
	modified:   Armory/ClassPW.h implemented basic trackreconstruction
2025-02-27 10:34:41 -05:00
Vignesh Sitaraman 9225620426 modified: Analyzer.C
modified:   Armory/ClassPW.h edited to account for the 4 wire offset instead of 3 in cathodes. This has been crossreferenced using the alpha source data in QQQ coinincidence to confirm
    the position of the source.
2025-02-21 15:40:52 -05:00
Vignesh Sitaraman 2225b3a942 modified: .gitignore 2025-02-17 17:06:33 -05:00
Vignesh Sitaraman 6cfb38b564 modified: Analyzer.C 2025-02-17 17:03:58 -05:00
Vignesh Sitaraman cb72c14ca4 modified: Analyzer.C modfied the algorithm for selection of valid cathodes, the section is now based on geometry
modified:   Armory/ClassPW.h the rotation of the cathodes was reversed
2025-02-17 16:59:08 -05:00
Vignesh Sitaraman 5995081396 modified: Analyzer.C
modified:   Armory/ClassPW.h
    adjusted the Cathode geometry to  incorporate the offsett of 3 wires
2025-02-05 14:59:02 -05:00
Vignesh Sitaraman d623e0cd17 modified: Analyzer.C
made changes to correct for geomtry and eliminating redundant variables to a make the  code more readable
	modified:   Armory/ClassPW.h
    made changes to correct for the fact that the physical geometry of the detector is not the same as the geometry in the simulation, it is reversed and has an offset of 3
2025-02-05 08:23:23 -05:00
Vignesh Sitaraman 8d7322cf5a modified: Analyzer.C 2025-02-03 10:32:07 -05:00
Vignesh Sitaraman 699b0f8701 modified: Analyzer.C
HPZProjection implemented, testing seems to result in a plot with 0s. Need to debug
2025-01-31 09:25:37 -05:00
Vignesh Sitaraman 02213caaee modified: Analyzer.C
implementation of function to fgiure out the cqreelated cathodes in events
2025-01-28 10:19:14 -05:00
Vignesh Sitaraman 56a6389b4f modified: Analyzer.C
modified the analyser to include gain matching for the anodes and the cathodes
	modified:   FitHistogramsWithTSpectrum_Sequential_Improved.C
	modified:   MatchAndPlotCentroids.C
	modified:   centroids.txt
	modified:   slope_intercept_results.txt
2025-01-27 16:34:39 -05:00
Vignesh Sitaraman b99ad4e4d7 new file: FitHistogramsWithTSpectrum_Sequential_Improved.C
new file:   MatchAndPlotCentroids.C
	new file:   centroids.txt
	new file:   centroids_edited.txt
	new file:   slope_intercept_cathode.txt
	new file:   slope_intercept_results.txt
	new file:   slope_intercept_results_anode.txt
2025-01-27 15:11:27 -05:00
Vignesh Sitaraman a5dfa2ecd3 modified: .vscode/settings.json
modified:   Analyzer.C
	modified:   Analyzer.h
	modified:   ProcessRun.sh
2025-01-27 10:55:22 -05:00
Vignesh Sitaraman 26e943adc8 modified: .vscode/settings.json
modified:   Analyzer.C
2025-01-27 09:51:25 -05:00
vs19g 42e093b104 modified: .vscode/c_cpp_properties.json
modified:   .vscode/settings.json
	modified:   Analyzer.C
	new file:   Armory/#ClassPW.h#
	modified:   Armory/ClassDet.h
	modified:   Armory/ClassPW.h
	modified:   Armory/Mapper.cpp
2025-01-17 11:18:07 -05:00
dirac 3129339647 modified: Analyzer.C
modified:   ProcessRun.sh
	modified:   mapping.h
2024-11-05 08:48:21 -05:00
dirac 7a70340b18 modified: Analyzer.C
modified:   mapping.h
2024-10-30 09:28:01 -04:00
dirac a10081ea81 modified: .vscode/settings.json
modified:   Analyzer.C
	modified:   Analyzer.h
	modified:   Armory/ClassDet.h
	modified:   Armory/ClassPW.h
	modified:   Armory/Mapper.cpp
	modified:   PCGainMatch.C
	modified:   ProcessRun.sh
	modified:   mapping.h
2024-10-25 15:02:59 -04:00
vs19g 4cb8a2c48c new file: Analyzer1.C
new file:   Analyzer1.h
2024-10-04 12:43:24 -04:00
vs19g fe6dbee171 Refactor PCGainMatch.C and Analyzer.C for improved efficiency and readability 2024-10-01 14:13:53 -04:00
vs19g 7805481ead Refactor PCGainMatch.C and Analyzer.C for improved efficiency and readability 2024-09-16 10:25:13 -04:00
vs19g 511b4aa808 modified: PCGainMatch.C 2024-09-06 15:06:32 -04:00
vs19g 43233ceb02 modified: PCGainMatch.C 2024-09-06 14:32:22 -04:00
vs19g 68fc36a8f6 modified: PCGainMatch.C 2024-09-03 16:41:17 -04:00
vs19g a6e754b958 modified: Analyzer.C
new file:   PCGainMatch.C
	new file:   PCGainMatch.h
2024-08-28 10:49:36 -04:00
vs19g 48ede97992 modified: Analyzer.C implemented cuts and histograms for the 2D histograms 2024-08-26 11:41:06 -04:00
vs19g f0a393abe2 modified: Analyzer.C 2024-08-26 10:34:13 -04:00
vs19g 4ba9c73b98 modified: Analyzer.C 2024-08-26 10:33:29 -04:00
vs19g 238ec8961e modified: Analyzer.C 2024-08-26 10:33:29 -04:00
132 changed files with 974706 additions and 4572 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

21
.gitignore vendored
View File

@ -4,9 +4,28 @@ EventBuilder*
*.pcm *.pcm
*.root *.root
*.exe *.exe
*.txt
*.err
*.seq
*.png
*.pdf
Mapper Mapper
AnasenMS AnasenMS
Armory/anasenMS
data/ data/
data_proton/ data_proton/
Sudarshan/
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
qqq_gains_det3.dat
qqq_relative_gains.dat
Armory/CorrelateQQQ.h
QQQStage2.C

View File

@ -1,23 +1,24 @@
{ {
"configurations": [ "configurations": [
{ {
"name": "splitpole", "name": "Linux",
"includePath": [ "includePath": [
"${workspaceFolder}/**", "${workspaceFolder}/**",
"/home/splitpole/cern/root/**" "/opt/root-6.36.06/include",
"/home/jamesszalkie/anasen/Armory"
], ],
"defines": [], "defines": [],
"compilerPath": "/usr/bin/gcc", "compilerPath": "/usr/bin/g++",
"cStandard": "c17", "cStandard": "c11",
"cppStandard": "gnu++17", "cppStandard": "c++17",
"intelliSenseMode": "linux-gcc-x64" "intelliSenseMode": "gcc-x64"
}, },
{ {
"name": "Ryan", "name": "Hades",
"includePath": [ "includePath": [
"${workspaceFolder}/**", "${workspaceFolder}/**",
"/home/ryan/Downloads/root_build/**", "/usr/include/x86_64-linux-gnu/qt6/**",
"/home/ryan/Downloads/root_build/include" "/usr/local/cern/root_v6.26.06/include/**"
], ],
"defines": [], "defines": [],
"compilerPath": "/usr/bin/gcc", "compilerPath": "/usr/bin/gcc",
@ -29,7 +30,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 +40,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 +53,38 @@
"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": [
"${workspaceFolder}/**",
"/home/vsitaraman/root/include/**"
], ],
"defines": [], "defines": [],
"compilerPath": "/usr/bin/gcc", "compilerPath": "/usr/bin/gcc",

40
.vscode/settings.json vendored
View File

@ -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"
} }

File diff suppressed because it is too large Load Diff

View File

@ -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);
} }

402
Analyzer1.C Normal file
View File

@ -0,0 +1,402 @@
#define Analyzer1_cxx
#include "Analyzer1.h"
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
#include <TMath.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;
int padID = 0;
SX3 sx3_contr;
PW pw_contr;
TVector3 hitPos;
bool HitNonZero;
TH1F * hZProj;
void Analyzer1::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, 400, 0, 4000); 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", "Z Projection", 1200, -600, 600);
hanVScatsum = new TH2F("hanVScatsum", "Anode vs Cathode Sum; Anode E; Cathode E", 400,0 , 10000, 400, 0 , 16000);
sx3_contr.ConstructGeo();
pw_contr.ConstructGeo();
}
Bool_t Analyzer1::Process(Long64_t entry){
// 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
// //======================= SX3
std::vector<std::pair<int, int>> ID; // first = id, 2nd = index
for( int i = 0; i < sx3.multi; i ++){
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 ){
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(pc.index[j]==4){
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(pc.index[k]<24 && pc.e[k]>50 ){
hqqqVpcE->Fill( qqq.e[i], pc.e[k] );
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
hqqqVpcIndex->Fill( qqq.index[i], pc.index[j] );
}
// }
}
// if( qqq.used[i] == true ) continue;
//if( qqq.id[i] == qqq.id[j] && (16 - qqq.ch[i]) * (16 - qqq.ch[j]) < 0 ){ // must be same detector and wedge and ring
if( qqq.id[i] == qqq.id[j] ){ // must be same detector
int chWedge = -1;
int chRing = -1;
if( qqq.ch[i] < qqq.ch[j]){
chRing = qqq.ch[j] - 16;
chWedge = qqq.ch[i];
}else{
chRing = qqq.ch[i];
chWedge = qqq.ch[j] - 16;
}
// printf(" ID : %d , chWedge : %d, chRing : %d \n", qqq.id[i], chWedge, chRing);
double theta = -TMath::Pi()/2 + 2*TMath::Pi()/16/4.*(qqq.id[i]*16 + chWedge +0.5);
double rho = 10.+40./16.*(chRing+0.5);
// if(qqq.e[i]>50){
hqqqPolar->Fill( theta, rho);
// }
// qqq.used[i] = true;
// qqq.used[j] = true;
if( !HitNonZero ){
double x = rho * TMath::Cos(theta);
double y = rho * TMath::Sin(theta);
hitPos.SetXYZ(x, y, 23 + 75 + 30);
HitNonZero = true;
}
}
}
}
// //======================= PC
ID.clear();
int counter=0;
std::vector<std::pair<int, double>> E;
E.clear();
for( int i = 0; i < pc.multi; i ++){
if( pc.e[i] > 100 ) ID.push_back(std::pair<int, int>(pc.id[i], i));
if( pc.e[i] > 100 ) E.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
hpcIndexVE->Fill( pc.index[i], pc.e[i] );
for( int j = i+1; j < pc.multi; j++){
hpcCoin->Fill( pc.index[i], pc.index[j]);
}
}
// for( size_t i = 0; i < E.size(); i++) printf("%zu | %d %d \n", i, E[i].first, E[i].second );
if( E.size()>=3 ){
int aID = 0;
int cID = 0;
float aE = 0;
float cE = 0;
bool multi_an =false;
// if( ID[0].first < 1 ) {
// aID = pc.ch[ID[0].second];
// cID = pc.ch[ID[1].second];
// }else{
// cID = pc.ch[ID[0].second];
// aID = pc.ch[ID[1].second];
// }
// printf("anode= %d, cathode = %d\n", aID, cID);
// for( int k = 0; k < qqq.multi; k++){
// if(qqq.index[k]==75 && pc.index[k]==2 && pc.e[k]>100){
for(int l=0;l<E.size();l++){
if(E[l].first<24 ){
if(!multi_an){
aE = E[l].second;
}
multi_an=true;
}
else if (E[l].first>=24){
cE = E[l].second + cE;
}
}
// }
// }
hanVScatsum->Fill(aE,cE);
if( ID[0].first < 1 ) {
aID = pc.ch[ID[0].second];
cID = pc.ch[ID[1].second];
}else{
cID = pc.ch[ID[0].second];
aID = pc.ch[ID[1].second];
}
if( HitNonZero){
pw_contr.CalTrack( hitPos, aID, cID);
hZProj->Fill(pw_contr.GetZ0());
}
}
//########################################################### Track constrcution
//############################## DO THE KINEMATICS
return kTRUE;
}
void Analyzer1::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);
// hZProj->Draw();
hanVScatsum->Draw("colz");
}

114
Analyzer1.h Normal file
View File

@ -0,0 +1,114 @@
#ifndef Analyzer1_h
#define Analyzer1_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <TSelector.h>
#include "Armory/ClassDet.h"
class Analyzer1 : 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; //!
Analyzer1(TTree * /*tree*/ =0) : fChain(0) { }
virtual ~Analyzer1() { }
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(Analyzer1,0);
};
#endif
#ifdef Analyzer1_cxx
void Analyzer1::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 Analyzer1::Notify(){
return kTRUE;
}
void Analyzer1::SlaveBegin(TTree * /*tree*/){
TString option = GetOption();
}
void Analyzer1::SlaveTerminate(){
}
#endif // #ifdef Analyzer_cxx

BIN
Armory/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -26,23 +26,35 @@ void ANASEN_model(int anodeID1 = -1, int anodeID2 = -1, int cathodeID1 = -1, int
TGeoVolume *worldBox = geom->MakeBox("ROOT", Vacuum, worldx, worldy, worldz); TGeoVolume *worldBox = geom->MakeBox("ROOT", Vacuum, worldx, worldy, worldz);
geom->SetTopVolume(worldBox); geom->SetTopVolume(worldBox);
//--- making axis //--- making axis (X=red, Y=green, Z=blue)
TGeoVolume *axisX = geom->MakeTube("axisX", Al, 0, 0.1, 5.); Double_t axisLen = 100.;
axisX->SetLineColor(1); TGeoVolume *axisX = geom->MakeTube("axisX", Al, 0, 0.1, axisLen/2);
worldBox->AddNode(axisX, 1, new TGeoCombiTrans(5, 0, 0., new TGeoRotation("rotA", 90., 90., 0.))); axisX->SetLineColor(kRed);
worldBox->AddNode(axisX, 1, new TGeoCombiTrans(axisLen/2, 0, 0., new TGeoRotation("rotA", 90., 90., 0.)));
TGeoVolume *axisY = geom->MakeTube("axisY", Al, 0, 0.1, 5.); TGeoVolume *axisY = geom->MakeTube("axisY", Al, 0, 0.1, axisLen/2);
axisY->SetLineColor(1); axisY->SetLineColor(kGreen);
worldBox->AddNode(axisY, 1, new TGeoCombiTrans(0, 5, 0., new TGeoRotation("rotB", 0., 90., 0.))); worldBox->AddNode(axisY, 1, new TGeoCombiTrans(0, axisLen/2, 0., new TGeoRotation("rotB", 0., 90., 0.)));
TGeoVolume *axisZ = geom->MakeTube("axisZ", Al, 0, 0.1, 5.); TGeoVolume *axisZ = geom->MakeTube("axisZ", Al, 0, 0.1, axisLen/2);
axisZ->SetLineColor(1); axisZ->SetLineColor(kBlue);
worldBox->AddNode(axisZ, 1, new TGeoTranslation(0, 0, 5)); worldBox->AddNode(axisZ, 1, new TGeoTranslation(0, 0, axisLen/2));
//--- axis labels (draw as TPolyMarker3D + text because TGeo does not label directly)
TPolyMarker3D *marker = new TPolyMarker3D();
marker->SetMarkerSize(1.2);
marker->SetMarkerColor(kRed);
marker->SetPoint(0, axisLen, 0, 0); // X
marker->SetMarkerColor(kGreen);
marker->SetPoint(1, 0, axisLen, 0); // Y
marker->SetMarkerColor(kBlue);
marker->SetPoint(2, 0, 0, axisLen); // Z
marker->Draw();
//--- 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 +115,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++){
@ -119,3 +131,5 @@ void ANASEN_model(int anodeID1 = -1, int anodeID2 = -1, int cathodeID1 = -1, int
geom->SetVisLevel(4); geom->SetVisLevel(4);
worldBox->Draw("ogle"); worldBox->Draw("ogle");
} }

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.AnasenMS</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@ -0,0 +1,5 @@
---
triple: 'arm64-apple-darwin'
binary-path: AnasenMS
relocations: []
...

View File

@ -15,6 +15,9 @@
#include "ClassSX3.h" #include "ClassSX3.h"
#include "ClassPW.h" #include "ClassPW.h"
#include "ClassQQQ.h"
//to not include certain wires in the simulation, pass the anode and cathode IDs to the constructor, e.g. for anode wires 5-10, pass anodeID1 = 5, anodeID2 = 10, and for cathode wires 20-25, pass cathodeID1 = 20, cathodeID2 = 25. To include all wires, pass -1 for all IDs.
class ANASEN{ class ANASEN{
public: public:
@ -41,11 +44,15 @@ public:
PW * GetPW() {return pw;} PW * GetPW() {return pw;}
SX3 * GetSX3() {return sx3;} SX3 * GetSX3() {return sx3;}
QQQ * GetQQQ() {return qqq;}
TGeoManager * GetGeoManager() {return geom;}
TGeoVolume * GetWorldBox() {return worldBox;}
private: private:
PW * pw; PW * pw;
SX3 * sx3; SX3 * sx3;
QQQ * qqq;
double sigmaA, sigmaC; // pw double sigmaA, sigmaC; // pw
double sigmaW, sigmaL; // sx3 double sigmaW, sigmaL; // sx3
@ -73,7 +80,7 @@ inline ANASEN::ANASEN(){
pw = new PW(); pw = new PW();
sx3 = new SX3(); sx3 = new SX3();
qqq = new QQQ();
CalGeometry(); CalGeometry();
geom = nullptr; geom = nullptr;
@ -106,17 +113,21 @@ inline void ANASEN::Construct3DModel(int anodeID1, int anodeID2, int cathodeID1,
geom = new TGeoManager("Detector", "ANASEN"); geom = new TGeoManager("Detector", "ANASEN");
//--- define some materials //--- define some materials
TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0); //TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0); //name, A, Z, density
TGeoMaterial *matHe = new TGeoMaterial("He", 4.0026, 2, 0.000861);
TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7); TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7);
TGeoMaterial *matSi = new TGeoMaterial("Si", 28.085,14,2.33);
//--- define some media //--- define some media
TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); //TGeoMedium *Vacuum = new TGeoMedium("Vacuum",1, matVacuum); //name, number of materials, material
TGeoMedium *He = new TGeoMedium("He",2, matHe);
TGeoMedium *Al = new TGeoMedium("Root Material",2, matAl); TGeoMedium *Al = new TGeoMedium("Root Material",2, matAl);
TGeoMedium *Si = new TGeoMedium("Si",3, matSi);
//--- make the top container volume //--- make the top container volume
Double_t worldx = 200.; //mm Double_t worldx = 200.; //mm
Double_t worldy = 200.; //mm Double_t worldy = 200.; //mm
Double_t worldz = 200.; //mm Double_t worldz = 200.; //mm
worldBox = geom->MakeBox("ROOT", Vacuum, worldx, worldy, worldz); worldBox = geom->MakeBox("ROOT", He, worldx, worldy, worldz); // name, medium, x half-length, y half-length, z half-length
geom->SetTopVolume(worldBox); geom->SetTopVolume(worldBox);
//--- making axis //--- making axis
@ -181,7 +192,7 @@ inline void ANASEN::Construct3DModel(int anodeID1, int anodeID2, int cathodeID1,
new TGeoRotation("rot1", wirePhi , wireTheta, 0.))); new TGeoRotation("rot1", wirePhi , wireTheta, 0.)));
} }
TGeoVolume * sx3Det = geom->MakeBox("box", Al, 0.1, sx3->GetWidth()/2, sx3->GetLength()/2); TGeoVolume * sx3Det = geom->MakeBox("box", Si, 0.1, sx3->GetWidth()/2, sx3->GetLength()/2);
sx3Det->SetLineColor(kGreen+3); sx3Det->SetLineColor(kGreen+3);
for( int i = 0; i < sx3->GetNumDet(); i++){ for( int i = 0; i < sx3->GetNumDet(); i++){
@ -228,6 +239,7 @@ inline void ANASEN::DrawTrack(TVector3 pos, TVector3 direction, bool drawEstima
pw->FindWireID(pos, direction); pw->FindWireID(pos, direction);
sx3->FindSX3Pos(pos, direction); sx3->FindSX3Pos(pos, direction);
qqq->FindQQQPos(pos, direction);
std::pair<short, short> wireID = pw->GetNearestID(); std::pair<short, short> wireID = pw->GetNearestID();

1270
Armory/ClassData.h Normal file

File diff suppressed because it is too large Load Diff

354
Armory/ClassPW.h Normal file → Executable file
View File

@ -2,17 +2,24 @@
#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{ std::vector<int> skipAnodes = {};
std::vector<int> skipCathodes = {};
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,8 +31,21 @@ struct PWHitInfo{
} }
}; };
struct Coord
{
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 class PW
{ // proportional wire
public: public:
PW() { ClearHitInfo(); }; PW() { ClearHitInfo(); };
~PW() {}; ~PW() {};
@ -36,12 +56,23 @@ public:
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; }
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
TVector3 GetTrackPos() const { return trackPos; } TVector3 GetTrackPos() const { return trackPos; }
TVector3 GetTrackVec() const { return trackVec; } TVector3 GetTrackVec() const { return trackVec; }
double GetTrackTheta() const { return trackVec.Theta(); } double GetTrackTheta() const { return trackVec.Theta(); }
double GetTrackPhi() const { return trackVec.Phi(); } double GetTrackPhi() const { return trackVec.Phi(); }
double GetZ0(); double GetZ0();
inline std::tuple<std::pair<TVector3, TVector3>, double, double, double> GetPseudoWire(const std::vector<std::tuple<int,double,double>>& cluster, std::string type);
inline std::tuple<TVector3,double,double,double,double,double,double,double>
FindCrossoverProperties(const std::vector<std::tuple<int,double,double>>& a_cluster, const std::vector<std::tuple<int,double,double>>& c_cluster);
inline std::vector<std::vector<std::tuple<int,double,double>>>
Make_Clusters(std::unordered_map<int,std::tuple<int,double,double>> wireEvents);
int GetNumWire() const { return nWire; } int GetNumWire() const { return nWire; }
double GetDeltaAngle() const { return dAngle; } double GetDeltaAngle() const { return dAngle; }
double GetAnodeLength() const { return anodeLength; } double GetAnodeLength() const { return anodeLength; }
@ -63,11 +94,11 @@ public:
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);
void CalTrack2(TVector3 sx3Pos, PWHitInfo hitInfo, double sigmaA, double sigmaC, bool verbose);
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,7 +111,6 @@ public:
} }
private: private:
PWHitInfo hitInfo; PWHitInfo hitInfo;
TVector3 trackPos; TVector3 trackPos;
@ -88,7 +118,8 @@ private:
const int nWire = 24; const int nWire = 24;
const int wireShift = 3; const int wireShift = 3;
const float zLen = 380; //mm //const float zLen = 380; // mm
const float zLen = 348.6; // mm
const float radiusA = 37; const float radiusA = 37;
const float radiusC = 43; const float radiusC = 43;
@ -96,23 +127,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();
@ -124,7 +157,8 @@ inline void PW::ConstructGeo(){
// anode wire shift is right-hand. // anode wire shift is right-hand.
// cathode wire shift is left-hand. // cathode wire shift is left-hand.
for(int i = 0; i < nWire; i++ ){ for (int i = 0; i < nWire; i++)
{
// Anode rotate right-hand // Anode rotate right-hand
p1.first.SetXYZ(radiusA * TMath::Cos(TMath::TwoPi() / nWire * (i) + TMath::PiOver2()), p1.first.SetXYZ(radiusA * TMath::Cos(TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
radiusA * TMath::Sin(TMath::TwoPi() / nWire * (i) + TMath::PiOver2()), radiusA * TMath::Sin(TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
@ -134,38 +168,205 @@ inline void PW::ConstructGeo(){
-zLen / 2); -zLen / 2);
An.push_back(p1); An.push_back(p1);
// Cathod rotate left-hand // Cathod rotate left-hand with the 3 wire offset accounted for (+1 from the calculated offset from the PC coincidence spectrum)
q1.first.SetXYZ( radiusC * TMath::Cos( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()), q1.first.SetXYZ(radiusC * TMath::Cos(TMath::TwoPi() / nWire * (i + wireShift + 1) + TMath::PiOver2()),
radiusC * TMath::Sin( TMath::TwoPi() / nWire * (i) + TMath::PiOver2()), radiusC * TMath::Sin(TMath::TwoPi() / nWire * (i + wireShift + 1) + TMath::PiOver2()),
zLen / 2); zLen / 2);
q1.second.SetXYZ( radiusC * TMath::Cos( TMath::TwoPi() / nWire * (i - wireShift) + TMath::PiOver2()), q1.second.SetXYZ(radiusC * TMath::Cos(TMath::TwoPi() / nWire * (i + 1) + TMath::PiOver2()),
radiusC * TMath::Sin( TMath::TwoPi() / nWire * (i - wireShift) + TMath::PiOver2()), radiusC * TMath::Sin(TMath::TwoPi() / nWire * (i + 1) + TMath::PiOver2()),
-zLen / 2); -zLen / 2);
Ca.push_back(q1); Ca.push_back(q1);
} }
// correcting for the fact that the order of the cathode wires is reversed
std::reverse(Ca.begin(), Ca.end());
// adjusting for the 3 wire offset, the rbegin and rend are used as the rotation of the wires is done in the opposite direction i.e. 1,2,3 -> 3,1,2
// NOT NECESSARY ANY MORE, HAS BEEN IMCORPORATED INTO THE WIREOFFSET IN THE BEGINNING
// std::rotate(Ca.rbegin(), Ca.rbegin() + 4, Ca.rend());
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 std::vector<std::vector<std::tuple<int,double,double>>>
PW::Make_Clusters(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[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)
{
//to skip certain wires, add their IDs to the skipAnodes and skipCathodes vectors above, then in this function, add a check to set the distance to a large number if the wire ID is in the skip list, e.g. if(std::find(skipAnodes.begin(), skipAnodes.end(), i) != skipAnodes.end()) { disA = 99999999; } to skip anode wire i, and if(std::find(skipCathodes.begin(), skipCathodes.end(), i) != skipCathodes.end()) { disC = 99999999; } to skip cathode wire i.
//do this on the line before the line "if (phiS < phi && phi < phiL)" in the anode and cathode loops below, respectively, so that the wires will be marked as invalid and not used in track reconstruction
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)
if( phiS < phi && phi < phiL) { phiS = phiS - TMath::TwoPi();
if(std::find(skipAnodes.begin(), skipAnodes.end(), i) != skipAnodes.end()) { // check if the current anode wire ID is in the skipAnodes vector
disA = 99999999;
}
if (phiS < phi && phi < phiL) // check if the track direction is within the angular range of the wire
{
disA = Distance(pos, pos + direction, An[i].first, An[i].second); disA = Distance(pos, pos + direction, An[i].first, An[i].second);
if( disA < hitInfo.nearestDist.first ){ if (disA < hitInfo.nearestDist.first)
{
hitInfo.nearestDist.first = disA; hitInfo.nearestDist.first = disA;
hitInfo.nearestWire.first = i; hitInfo.nearestWire.first = i;
} }
@ -175,53 +376,73 @@ inline void PW::FindWireID(TVector3 pos, TVector3 direction, bool verbose ){
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(std::find(skipCathodes.begin(), skipCathodes.end(), i) != skipCathodes.end()) { // check if the current cathode wire ID is in the skipCathodes vector
if( phi < 0 && phiS > phiL ) phiS = phiS - TMath::TwoPi(); disC = 99999999;
}
if (phi > 0 && phiS > phiL)
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); disC = Distance(pos, pos + direction, Ca[i].first, Ca[i].second);
if( disC < hitInfo.nearestDist.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,11 +452,13 @@ 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 sx3Pos, PWHitInfo hitInfo, double sigmaA, double sigmaC, bool verbose)
{
trackPos = sx3Pos; trackPos = sx3Pos;
@ -267,36 +490,31 @@ inline void PW::CalTrack2(TVector3 sx3Pos, PWHitInfo hitInfo, double sigmaA, dou
// 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 double PW::GetZ0(){ /*inline TVector3 PW::CalTrack3(TVector3 siPos, TVector3 anodeInt, bool verbose)
{
double x = trackPos.X(); TVector3 v = anodeInt-siPos;
double y = trackPos.Y(); double t_minimum = -1.0*(siPos.X()*v.X()+siPos.Y()*v.Y())/(v.X()*v.X()+v.Y()*v.Y());
double rho = TMath::Sqrt(x*x + y*y); TVector3 vector_closest_to_z = siPos + t_minimum*v;
double theta = trackVec.Theta();
return trackPos.Z() - rho / TMath::Tan(theta); return vector_closest_to_z;
if (verbose)
printf("X slope = %f and Y slope = %f \n", mx, my);
}*/
} inline double PW::GetZ0()
{
inline double PW::CircularMean(std::vector<std::pair<int, double>> wireList){ [[maybe_unused]]double x = trackPos.X();
[[maybe_unused]]double y = trackPos.Y();
//use unit vector, wireID start from Zero [[maybe_unused]]double rho = TMath::Sqrt(x * x + y * y);
double xCom = 0, yCom = 0; [[maybe_unused]]double theta = trackVec.Theta();
for( size_t i = 0; i < wireList.size() ; i++){
xCom += TMath::Cos(TMath::TwoPi() * wireList[i].first / nWire) * wireList[i].second;
yCom += TMath::Sin(TMath::TwoPi() * wireList[i].first / nWire) * wireList[i].second;
}
//calculate the angle of the summed unit vectors
double angle = TMath::ATan2(yCom, xCom);
if( angle < 0 ) angle += TMath::TwoPi(); // convert the angle from 0 to 2 pi
return angle/ TMath::TwoPi() * nWire;
return trackVec.Z();
} }
#endif #endif

288
Armory/ClassQQQ.h Normal file
View File

@ -0,0 +1,288 @@
#ifndef ClassQQQ_h
#define ClassQQQ_h
#include <cstdio>
#include <TMath.h>
#include <TVector3.h>
#include <TRandom.h>
#include "TGeoManager.h"
#include "TGeoVolume.h"
#include "TGeoBBox.h"
class QQQ{
public:
QQQ(){Clear();};
~QQQ(){}
short GetID() const {return id;}
short GetChUp() const {return chUp;}
short GetChDn() const {return chDn;}
short GetChBk() const {return chBk;}
TVector3 GetHitPos() const {return hitPos;}
TVector3 GetHitPosWithSigma(double sigmaY_mm, double sigmaZ_mm);
double GetZFrac() const {return zFrac;} // range from -0.5 to 0.5
void Clear();
void ConstructGeo();
void FindQQQPos(TVector3 pos, TVector3 direction, bool verbose = false);
void CalQQQPos(unsigned short ID, unsigned short chUp, unsigned short chDown, unsigned short chBack, float eUp, float eDown);
double GetNumDet() const {return numDet;}
void Print(){
if( id == -1 ){
printf("Did not hit any QQQ.\n");
}else{
printf("ID: %d, U,D,B: %d %d %d| zFrac : %.2f\n", id, chUp, chDn, chBk, zFrac);
printf("Hit Pos: %.2f, %.2f, %.2f\n", hitPos.X(), hitPos.Y(), hitPos.Z());
}
}
// void CalZFrac(){
// zFrac = (eUp - eDn)/(eUp + eDn);
// }
private:
const int numDet = 4;
const float qqqR1 = 50;
const float qqqR2 = 100;
const float qqqZPos = 23 + 75 + 30;
short id; // -1 when no hit
short chUp;
short chDn;
short chBk;
double zFrac; // from +1 (downstream) to -1 (upstream)
double eUp;
double eDn;
double eBk;
TVector3 hitPos;
TGeoManager *geom;
TGeoVolume *worldBox;
TGeoMedium *Al;
// helper function to calculate intersection between line segments, return pair of (fraction along line1, fraction along line2) where the intersection occurs. If no intersection, return (0, -1).
std::pair<double, double> Intersect(TVector3 p1, TVector3 p2, TVector3 q1, TVector3 q2, bool verbose){
//see https://nukephysik101.wordpress.com/2023/12/30/intersect-between-2-line-segments/
//zero all z-component
TVector3 a0 = p1; a0.SetZ(0);
TVector3 a1 = p2; a1.SetZ(0);
TVector3 b0 = q1; b0.SetZ(0);
TVector3 b1 = q2; b1.SetZ(0);
double h = 0, k = 0; // placeholder values, implementation of intersection logic
if( verbose ) printf(" ----h, k : %f, %f\n", h, k);
return std::pair<double,double>(h,k);
}
};
inline void QQQ::Clear(){
id = -1;
chUp = -1;
chDn = -1;
chBk = -1;
zFrac = TMath::QuietNaN();
eUp = TMath::QuietNaN();
eDn = TMath::QuietNaN();
eBk = TMath::QuietNaN();
}
inline void QQQ::ConstructGeo(){
TGeoVolume *qqq = geom->MakeTubs("qqq", Al, qqqR1, qqqR2, 0.5, 5, 85);
qqq->SetLineColor(7);
for( int i = 0; i < 4; i++){
worldBox->AddNode(qqq, i+1, new TGeoCombiTrans( 0,
0,
qqqZPos,
new TGeoRotation("rot1", 360/4 * (i), 0., 0.)));
}
}
inline void QQQ::FindQQQPos(TVector3 pos,
TVector3 direction,
bool verbose){
id = -1;
chUp = -1;
chDn = -1;
chBk = -1;
//--------------------------------------------
// Intersect trajectory with QQQ plane
//--------------------------------------------
if( TMath::Abs(direction.Z()) < 1e-10 ) return;
double t = (qqqZPos - pos.Z()) / direction.Z();
if( t <= 0 ) return;
hitPos = pos + t * direction;
//--------------------------------------------
// Cylindrical coordinates
//--------------------------------------------
double x = hitPos.X();
double y = hitPos.Y();
double r = TMath::Sqrt(x*x + y*y);
if( r < qqqR1 || r > qqqR2 ) return;
double phi = hitPos.Phi() * TMath::RadToDeg();
if( phi < 0 ) phi += 360.0;
//--------------------------------------------
// Determine detector ID
//--------------------------------------------
id = -1;
for(int det = 0; det < 4; det++){
double phiMin = det*90.0 + 5.0;
double phiMax = phiMin + 85.0;
if( phi >= phiMin && phi <= phiMax ){
id = det;
break;
}
}
if( id < 0 ) return;
//--------------------------------------------
// Ring number (32 strips)
//--------------------------------------------
const double ringWidth =
(qqqR2 - qqqR1)/32.0;
int ring =
(int)((r - qqqR1)/ringWidth);
if( ring < 0 ) ring = 0;
if( ring > 31 ) ring = 31;
//--------------------------------------------
// Sector number (4 strips)
//--------------------------------------------
double localPhi =
phi - (id*90.0 + 5.0);
int sector =
(int)(localPhi/(85.0/4.0));
if( sector < 0 ) sector = 0;
if( sector > 3 ) sector = 3;
chBk = ring;
chDn = sector;
chUp = sector;
zFrac = 0.0;
if(verbose){
printf("\nQQQ Hit\n");
printf(" ID = %d\n", id);
printf(" Ring = %d\n", ring);
printf(" Sector = %d\n", sector);
printf(" r = %.2f mm\n", r);
printf(" phi = %.2f deg\n", phi);
hitPos.Print();
}
}
/*s
inline TVector3 QQQ::GetHitPosWithSigma(double sigmaY_mm, double sigmaZ_mm){
double phi = SNorml[id%numDet].Phi();
TVector3 haha = hitPos;
haha.RotateZ(-phi);
double y = haha.Y() + gRandom->Gaus(0, sigmaY_mm);
if( sigmaY_mm < 0 ){
double deltaW = width/4;
y = TMath::Floor((haha.Y()-deltaW)/deltaW)*deltaW + deltaW*1.5; // when ever land on each strip, set the position to be center of the strip.
if( y >= 25 ) y = 15;
}
double z = haha.Z() + gRandom->Gaus(0, sigmaZ_mm);
if( sigmaZ_mm < 0 ){
haha.Z();
double delta = length/4;
int sign = z > 0 ? 1 : -1;
z = TMath::Floor( (abs(z)-gap/2)/delta )*delta + 0.5 * delta + gap/2;
if( z >= 107.375 ) z = 88.625;
z = sign * z;
}
haha.SetY(y);
haha.SetZ(z);
haha.RotateZ(phi);
return haha;
}*/
inline void QQQ::CalQQQPos(unsigned short ID,
unsigned short chUp,
unsigned short chDown,
unsigned short chBack,
float eUp,
float eDown){
hitPos.Clear();
if( ID > 3 ) return;
if( chBack > 31 ) return;
if( chDown > 3 ) return;
const double ringWidth =
(qqqR2 - qqqR1)/32.0;
double r =
qqqR1 + (chBack + 0.5)*ringWidth;
const double sectorWidth =
85.0/4.0;
double phiDeg =
ID*90.0 + 5.0 +
(chDown + 0.5)*sectorWidth;
double phi =
phiDeg * TMath::DegToRad();
hitPos.SetXYZ(
r*TMath::Cos(phi),
r*TMath::Sin(phi),
qqqZPos
);
id = ID;
chBk = chBack;
chDn = chDown;
chUp = chUp;
}
#endif

View File

@ -57,8 +57,8 @@ private:
const int numDet = 12; const int numDet = 12;
const float radius = 88; const float radius = 88;
const float width = 40; const float width = 40;
const float length = 75; const float length = 75; // 75
const float gap = 46; const float gap = 46; // 46
short id; // -1 when no hit short id; // -1 when no hit
short chUp; short chUp;

View File

@ -16,7 +16,6 @@
#include "Isotope.h" #include "Isotope.h"
class ReactionConfig{ class ReactionConfig{
public: public:
ReactionConfig(){} ReactionConfig(){}
@ -47,9 +46,9 @@ public:
std::vector<float> beamEx; ///excitation_energy_of_A[MeV] std::vector<float> beamEx; ///excitation_energy_of_A[MeV]
void SetReaction(int beamA, int beamZ, void SetReaction(int beamA, int beamZ, // projectile
int targetA, int targetZ, int targetA, int targetZ, // target
int recoilA, int recoilZ, float beamEnergy_AMeV){ int recoilA, int recoilZ, float beamEnergy_AMeV){ // light recoil, e.g. alpha
this->beamA = beamA; this->beamA = beamA;
this->beamZ = beamZ; this->beamZ = beamZ;
this->targetA = targetA; this->targetA = targetA;
@ -176,10 +175,10 @@ public:
void SetA(int A, int Z, double Ex); void SetA(int A, int Z, double Ex);
void Seta(int A, int Z); void Seta(int A, int Z);
void Setb(int A, int Z); void Setb(int A, int Z);
void SetB(int A, int Z); void SetB(int A, int Z, double Ex);
void SetIncidentEnergyAngle(double KEA, double theta, double phi); void SetIncidentEnergyAngle(double KEA, double theta, double phi);
void SetExA(double Ex); void SetExA(double Ex); // excitation energy of A in MeV
void SetExB(double Ex); void SetExB(double Ex); // excitation energy of B in MeV
void SetReactionFromFile(string settingFile); void SetReactionFromFile(string settingFile);
TString GetReactionName(); TString GetReactionName();
@ -246,8 +245,8 @@ TransferReaction::TransferReaction(){
SetA(24, 12, 0); SetA(24, 12, 0);
Seta(4,2); Seta(4,2);
Setb(1,1); Setb(1,1);
SetB(27,13); SetB(27,13, 0);
TA = 2.5; TA = 2.5; // MeV/u
T = TA * reaction.beamA; T = TA * reaction.beamA;
ExA = 0; ExA = 0;
@ -301,17 +300,19 @@ void TransferReaction::Setb(int A, int Z){
isReady = false; isReady = false;
isBSet = false; isBSet = false;
} }
void TransferReaction::SetB(int A, int Z){ void TransferReaction::SetB(int A, int Z, double Ex = 0){
Isotope temp (A, Z); Isotope temp (A, Z);
mB = temp.Mass; double mB0 = temp.Mass; // ground state mass
mB = mB0;
reaction.recoilHeavyA = A; reaction.recoilHeavyA = A;
reaction.recoilHeavyZ = Z; reaction.recoilHeavyZ = Z;
nameB = temp.Name; nameB = temp.Name;
ExB = Ex;
isReady = false; isReady = false;
isBSet = true; isBSet = true;
} }
void TransferReaction::SetIncidentEnergyAngle(double KEA, double theta, double phi){ void TransferReaction::SetIncidentEnergyAngle(double KEA, double theta, double phi){ // KEA in MeV/u, theta and phi in degree
this->TA = KEA; this->TA = KEA;
this->T = TA * reaction.beamA; this->T = TA * reaction.beamA;
this->thetaIN = theta; this->thetaIN = theta;
@ -390,7 +391,8 @@ void TransferReaction::CalReactionConstant(){
beta = k / (mA + ExA + ma + T); beta = k / (mA + ExA + ma + T);
gamma = 1 / TMath::Sqrt(1- beta * beta); gamma = 1 / TMath::Sqrt(1- beta * beta);
Etot = TMath::Sqrt(TMath::Power(mA + ExA + ma + T,2) - k * k); Etot = TMath::Sqrt(TMath::Power(mA + ExA + ma + T,2) - k * k);
p = TMath::Sqrt( (Etot*Etot - TMath::Power(mb + mB + ExB,2)) * (Etot*Etot - TMath::Power(mb - mB - ExB,2)) ) / 2 / Etot; double mBtot = mB + ExB;
p = TMath::Sqrt( (Etot*Etot - TMath::Power(mb + mBtot,2)) * (Etot*Etot - TMath::Power(mb - mBtot,2)) ) / 2 / Etot;
PA.SetXYZM(0, 0, k, mA + ExA); PA.SetXYZM(0, 0, k, mA + ExA);
PA.RotateY(thetaIN); PA.RotateY(thetaIN);

414
Armory/HistPlotter.h Normal file
View File

@ -0,0 +1,414 @@
#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 <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::unordered_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::unordered_map<std::string, std::vector<double>> onedimcache;
std::unordered_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(); //!< 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;
}
}
/*! \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() {
/*! \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
}
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
View 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

674
Armory/LICENSE Normal file
View 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>.

View File

@ -1,28 +1,74 @@
######################################################################## ########################################################################
# # Cross-platform Makefile (macOS + Linux)
# ########################################################################
#########################################################################
CC = g++ UNAME_S := $(shell uname -s)
#COPTS = -fPIC -DLINUX -O2 -std=c++17 -lpthread ########################################################################
COPTS = -fPIC -DLINUX -g -O0 -Wall -std=c++17 -lpthread # Defaults
########################################################################
ROOTLIBS = `root-config --cflags --glibs` ifeq ($(UNAME_S),Darwin)
ALL = Mapper AnasenMS ########################################################################
# macOS (Homebrew + Apple Clang)
########################################################################
######################################################################### SDKROOT := $(shell xcrun --show-sdk-path)
CXX := clang++
ROOTCFLAGS := $(shell root-config --cflags | sed 's/-stdlib=libc++//g')
ROOTLIBS := $(shell root-config --libs | sed 's/-stdlib=libc++//g')
CXXFLAGS := -g -O0 -Wall -std=c++17 -fPIC
CXXFLAGS += $(ROOTCFLAGS)
CXXFLAGS += -isysroot $(SDKROOT)
CXXFLAGS += -I$(SDKROOT)/usr/include/c++/v1
LDFLAGS := $(shell root-config --glibs) -lGeom -lEve -lGui
else
########################################################################
# Linux (system g++)
########################################################################
CXX := g++
COPTS := -fPIC -DLINUX -g -O0 -Wall -std=c++17 -pthread
ROOTCFLAGS := $(shell root-config --cflags)
ROOTLIBS := $(shell root-config --libs)
CXXFLAGS := $(COPTS) $(ROOTCFLAGS)
LDFLAGS := $(ROOTLIBS) -lGeom -lEve -lGui
endif
########################################################################
# Targets
########################################################################
ALL = Mapper EventBuilder AnasenMS
all: $(ALL) all: $(ALL)
clean: clean:
/bin/rm -f $(OBJS) $(ALL) /bin/rm -f $(ALL)
########################################################################
# Build rules
########################################################################
Mapper: Mapper.cpp ../mapping.h ClassDet.h Mapper: Mapper.cpp ../mapping.h ClassDet.h
@echo "--------- making Mapper" @echo "--------- making Mapper"
$(CC) $(COPTS) -o Mapper Mapper.cpp $(ROOTLIBS) $(CXX) $(CXXFLAGS) Mapper.cpp -o Mapper $(LDFLAGS)
AnasenMS : constant.h Isotope.h ClassTransfer.h ClassSX3.h ClassPW.h ClassAnasen.h anasenMS.cpp EventBuilder: EventBuilder.cpp ClassData.h fsuReader.h Hit.h
@echo "--------- making EventBuilder"
$(CXX) $(CXXFLAGS) EventBuilder.cpp -o EventBuilder $(LDFLAGS)
AnasenMS: anasenMS.cpp constant.h Isotope.h ClassTransfer.h ClassSX3.h ClassPW.h ClassAnasen.h
@echo "--------- making ANASEN Monte Carlo" @echo "--------- making ANASEN Monte Carlo"
$(CC) $(COPTS) -o AnasenMS anasenMS.cpp $(ROOTLIBS) $(CXX) $(CXXFLAGS) anasenMS.cpp -o AnasenMS $(LDFLAGS)

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.Mapper</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@ -0,0 +1,5 @@
---
triple: 'arm64-apple-darwin'
binary-path: Mapper
relocations: []
...

75
Armory/README_anasenMS.md Normal file
View File

@ -0,0 +1,75 @@
# ANASEN Monte Carlo (anasenMS.cpp)
## Overview
`anasenMS.cpp` is a standalone Monte Carlo simulation for an ANASEN-style detector setup. It generates transfer reaction kinematics, propagates products to a wire chamber (PW) and a silicon array (SX3), reconstructs tracks, and writes output to a ROOT tree.
## Requirements
- ROOT (e.g. `root-config` for compile flags)
- C++ compiler (gcc/g++)
- Project includes: `ClassTransfer.h`, `ClassAnasen.h`, plus their dependent implementation files.
## Build
In `Armory` directory:
the directory contains a make file
Run `make AnasenMS` and it will automatically run
```bash
g++ -O2 -o anasenMS anasenMS.cpp ClassTransfer.cpp ClassAnasen.cpp ... `root-config --cflags --libs`
```
(Adjust source file list based on actual project layout.)
## Run
```bash
./anasenMS [numEvents] vis(optional)
```
- `numEvents`: optional integer, default `1000000`
- Outputs: `SimAnasen1.root` containing `tree1` and `tree2`
tree1 contains pre-energy loss calculations
tree2 contains post-energy loss calculations (subject to change)
## What the code does
- Detector geometry is built within ClassAnasen.h
-To assign dead channels (anode/cathode/SX3), add ID's to IsDead<detector> boolean functions at top of simulation,
inside the set
- Initializes reaction: `TransferReaction transfer`
- `SetA(24,12,0)` target
- `SetIncidentEnergyAngle(10,0,0)` beam energy and direction
- `Seta`, `Setb` reaction fragment indices
- Sets excitation lists: `ExAList`, `ExList`
- Vertex and resolution settings:
- `vertexX/Y/Z` ranges
- `sigmaSX3_W`, `sigmaSX3_L`, `sigmaPW_A`, `sigmaPW_C`
- Loads energy loss tables from `../ELoss/` using `TGraph` for interpolation
- Prepares ROOT output tree and branches for truth/reconstructed
- Loop over events:
- Sample excitation and CM direction
- `transfer.Event(thetaCM, phiCM)` outputs `TLorentzVector` products
- Compute lab angles/energies
- Random vertex inside target volume
- Run detector response:
- `pw->FindWireID(...)`
- `sx3->FindSX3Pos(...)`
- Read out wire hits and SX3 channel + depth
- Apply position smearing for SX3
- **Apply energy loss** to light particle using interpolated dE/dx from table, based on path length from vertex to hit
- Reconstruct track via `pw->CalTrack` and `pw->CalTrack2`
- Fill ROOT tree
- At end: write tree, close file, clean up
## Notes
- Important methods are from:
- `ClassTransfer` (`SetA`, `SetIncidentEnergyAngle`, `Seta`, `Setb`, `SetExA`, `SetExB`, `CalReactionConstant`, `Event`)
- `ClassAnasen` / `SX3` / `PW` (`FindWireID`, `FindSX3Pos`, `GetHitInfo`, `CalTrack`, `CalTrack2`, `GetTrackTheta`, `GetTrackPhi`, `GetZ0`, `GetHitPosWithSigma`, `GetID`, etc.)
- Optional: change excitation lists, vertex spread, and sigma values to mimic different beam/target conditions.

183
Armory/SX3Geom.h Executable file
View File

@ -0,0 +1,183 @@
#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);
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
*/
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

134
Armory/aarootscript.C Normal file
View File

@ -0,0 +1,134 @@
#include "TFile.h"
#include "TTree.h"
#include "TGraph.h"
#include "TLegend.h"
#include "TCanvas.h"
#include "TH1D.h"
#include "TObjArray.h"
#include "TBranch.h"
#include <iostream>
#include <fstream>
void aarootscript(int argument = 0) {
std::cout << "\n\n\n";
std::cout << "=========================================\n";
std::cout << "========= ANASEN Root Script =========\n";
std::cout << "=========================================\n";
TFile *f = new TFile("SimAnasen1.root");
TTree *tree1 = (TTree*)f->Get("tree");
if (!tree1) {
std::cerr << "Error: tree1 not found in the file!" << std::endl;
return;
}
TTree *tree2 = (TTree*)f->Get("tree2");
TTreeReader reader("tree");
TTreeReaderValue<double> Tb1(reader, "Tb"); // this line will read the "Tb" branch from the tree and save it as
TTreeReaderValue<double> TB1(reader, "TB"); // this line will read the "TB" branch from the tree and save it as Tb1
//add Tb1 and TB1 together
double totalSum = 0;
while (reader.Next()) {
totalSum += *Tb1;
}
std::cout << "Total Sum: " << totalSum << std::endl;
TTreeReader reader2("tree2");
TTreeReaderValue<double> Tb2(reader2, "Tb");
double totalSum2 = 0;
int zeroCount = 0;
while (reader2.Next()) {
totalSum2 += *Tb2;
if (*Tb2 == 0) {
zeroCount++;
}
}
std::cout << "Total Sum: " << totalSum2 << std::endl;
std::cout << "Difference: " << totalSum - totalSum2 << std::endl;
std::cout << "Zero Count: " << zeroCount << std::endl;
//std::cout << "Making histograms..." << std::endl;
gErrorIgnoreLevel = 2001;
gROOT->ProcessLine(".x histcomp.C");
std::cout << "=========================================\n";
if (argument == 1) {
if (tree1) {
gROOT->ProcessLine("tree->Print();");
} else {
std::cout << "Tree1 not found!" << std::endl;
}
}
if (argument == 2) {
if (tree2) {
gROOT->ProcessLine("tree2->Print();");
} else {
std::cout << "Tree2 not found!" << std::endl;
}
}
std::cout << "Creating Tb vs dEb plot..." << std::endl;
// Readers for both trees
TTreeReader r1(tree1);
TTreeReader r2(tree2);
TTreeReaderValue<double> Tb_val(r1, "Tb");
TTreeReaderValue<double> TB_val(r2, "TB");
TTreeReaderValue<double> dEb_val(r2, "dEb");
std::vector<double> x; // Tb (tree1)
std::vector<double> y; // dEb (tree2)
// Loop over both trees simultaneously
while (r1.Next() && r2.Next()) {
x.push_back(*Tb_val);
y.push_back(*dEb_val);
}
std::cout << "x length: " << x.size() << ", y length: " << y.size() << std::endl;
std::ofstream outfile("Tb_dEb_data.txt");
if (!outfile.is_open()) {
std::cerr << "Error: Could not open output file!" << std::endl;
return;
}
for (size_t i = 0; i < x.size(); i++) {
outfile << x[i] << " " << y[i] << "\n";
}
outfile.close();
std::cout << "Data written to Tb_dEb_data.txt" << std::endl;
/*
// Create graph
TGraph *gr = new TGraph(x.size(), &x[0], &y[0]);
gr->SetTitle("Tb (tree1) vs dEb (tree2);Tb;dEb");
gr->SetMarkerStyle(20);
// Draw
TCanvas *c1 = new TCanvas("c1", "Tb vs dEb", 800, 600);
gr->Draw("AP");
c1->Update();
c1->SaveAs("Tb_vs_dEb.png");
std::cout << "Plot saved as Tb_vs_dEb.pdf" << std::endl;
std::cout << "\n\n\n";
delete c1;
delete gr;*/
}

111
Armory/analyze.C Normal file
View File

@ -0,0 +1,111 @@
#include "TFile.h"
#include "TTree.h"
#include "TCanvas.h"
#include "TH1D.h"
#include "TLegend.h"
#include "TString.h"
#include "TStyle.h"
#include <iostream>
void analyze(const char* filename = "SimAnasen1.root")
{
gStyle->SetOptStat(1);
TFile *f = TFile::Open(filename);
if (!f || f->IsZombie()) {
std::cerr << "ERROR: cannot open file " << filename << std::endl;
return;
}
TTree *tree = (TTree*)f->Get("tree");
TTree *tree2 = (TTree*)f->Get("tree2");
if (!tree) {
std::cerr << "ERROR: tree not found\n";
return;
}
std::cout << "\n===== BASIC TREE INFO =====\n";
tree->Print();
// Event inspection tools
std::cout << "\n===== FIRST 10 EVENTS =====\n";
tree->Scan("Tb:TB:anodeID[0]:cathodeID[0]:sx3ID", "", "", 10);
std::cout << "\n===== SINGLE EVENT EXAMPLE (0) =====\n";
tree->Show(0);
// Quick detector gating examples
std::cout << "\n===== GATED STATS =====\n";
std::cout << "Events with anodeID[0]==5: "
<< tree->GetEntries("anodeID[0]==5") << std::endl;
std::cout << "Events with sx3ID>=0: "
<< tree->GetEntries("sx3ID>=0") << std::endl;
// Tb vs TB comparison histogram
TCanvas *c1 = new TCanvas("c1","Tb vs TB",800,600);
//set min and max from tree values
double min = tree->GetMinimum("Tb");
double max = tree->GetMaximum("TB");
min = min - max*0.1;
max = max * 1.1;
TH1D *hTb = new TH1D("hTb","Tb and TB;Energy (MeV);Counts",200,min,max); //arguments are name, title (with axis labels), number of bins, x-min, x-max
TH1D *hTB = new TH1D("hTB","",200,min,max);
tree->Draw("Tb>>hTb","","goff");
tree->Draw("TB>>hTB","","goff");
hTb->SetLineColor(kRed);
hTB->SetLineColor(kBlue);
hTb->Draw("HIST");
hTB->Draw("HIST SAME");
TLegend *leg = new TLegend(0.65,0.75,0.88,0.88);
leg->AddEntry(hTb,"Tb (light)","l");
leg->AddEntry(hTB,"TB (heavy)","l");
leg->Draw();
c1->SaveAs("Tb_TB_compare.png");
// 4. Detector-gated histogram
TCanvas *c2 = new TCanvas("c2","Anode gated Tb",800,600);
double min2 = tree->GetMinimum("Tb");
double max2 = tree->GetMaximum("Tb");
min2 = min2 - max2*0.1;
max2 = max2 * 1.1;
TH1D *hGate = new TH1D("hGate","Tb (anodeID[0]==5);Energy;Counts",200,min2,max2);
tree->Draw("Tb>>hGate","anodeID[0]==5","goff");
hGate->SetLineColor(kGreen+2);
hGate->Draw("HIST");
c2->SaveAs("Tb_anode5.png");
// Tb vs TB correlation (with gate)
TCanvas *c3 = new TCanvas("c3","dEb vs SX3z",800,600);
tree->Draw("TB:Tb>>h2(200,min,max,200,min,max)","","COLZ"); //arguments are "y:x>>histogram(bins,xmin,xmax,bins,ymin,ymax)", "selection", "options"
c3->SaveAs("Tb_vs_TB.png");
// Make gated trees
TFile *out = new TFile("gated_output.root","RECREATE");
TTree *t_anode5 = tree->CopyTree("anodeID[0]==5");
t_anode5->Write("tree_anode5");
TTree *t_sx3valid = tree->CopyTree("sx3ID>=0");
t_sx3valid->Write("tree_sx3valid");
out->Close();
std::cout << "\n===== DONE =====\n";
std::cout << "Saved plots + gated trees in gated_output.root\n";
}

View File

@ -0,0 +1,632 @@
#include "TRandom.h" // ROOT random number generators, gRandom
#include "TFile.h" // ROOT file I/O
#include "TTree.h" // ROOT tree storage
#include "TH1.h" // 1D histograms
#include "TH2.h" // 2D histograms
#include "TStyle.h" // ROOT plotting style controls
#include "TCanvas.h" // ROOT canvas drawing
#include "TBenchmark.h" // timing measurement
#include "TGraph.h" // for energy loss interpolation
#include <cstring>
#include "TApplication.h" // ROOT app loop
#include "ClassTransfer.h" // Reaction kinematics and MC event generation
#include "ClassAnasen.h" // ANASEN detector model classes (SX3, PW, etc.)
#include <stdio.h>
#include <stdlib.h>
#include <set>
#include "TLegend.h"
#include "TH1D.h"
#include "TObjArray.h"
#include "TBranch.h"
#include <iostream>
#include <fstream>
//======== Generate light particle based on reaction
// calculate real and reconstructed tracks and Q-value uncertainty
// Function to load energy loss table from file
TGraph* LoadELoss(const char* filename) {
TGraph* g = new TGraph(filename, "%lg %lg");
return g;
}
bool IsDeadAnode(int id){
static std::set<int> dead = {}; // add dead anode IDs here, 0-23
return dead.count(id);
}
bool IsDeadCathode(int id){
static std::set<int> dead = {}; // add dead cathode IDs here, 0-23
return dead.count(id);
}
bool IsDeadSX3(int id){
static std::set<int> dead = {}; // add dead SX3 IDs here, 0-23 1,7,9,3
return dead.count(id);
}
// Simulate sequential two-body decay of an unstable parent in its rest frame.
// The parent is boosted from the lab frame, the daughter (A1,Z1) is returned in lab frame,
// and the emitted ejectile (A2,Z2) is written to ejectileOut.
TLorentzVector SimulateSequentialDecay(const TLorentzVector &parent,
int daughterA, int daughterZ,
int ejectA, int ejectZ,
TLorentzVector &ejectileOut){
Isotope daughter(daughterA, daughterZ);
Isotope ejectile(ejectA, ejectZ);
double M = parent.M();
double mD = daughter.Mass;
double mE = ejectile.Mass;
double sqM = M * M;
double sum = mD + mE;
double diff = mD - mE;
double p2 = (sqM - sum*sum) * (sqM - diff*diff) / (4.0 * sqM);
if( p2 < 0 ) p2 = 0;
double p = TMath::Sqrt(p2);
double cosTheta = 2.0 * gRandom->Rndm() - 1.0;
double theta = TMath::ACos(cosTheta);
double phi = gRandom->Rndm() * TMath::TwoPi();
TVector3 v;
v.SetMagThetaPhi(p, theta, phi);
TLorentzVector daughterLab;
daughterLab.SetVectM(v, mD);
TLorentzVector ejectileLab;
ejectileLab.SetVectM(-v, mE);
TVector3 boost = parent.BoostVector();
daughterLab.Boost(boost);
ejectileLab.Boost(boost);
ejectileOut = ejectileLab;
return daughterLab;
}
int main(int argc, char **argv){
printf("=========================================\n");
printf("=== ANASEN Monte Carlo ===\n");
printf("=========================================\n");
// number of events can be overridden from command line
int numEvent = 1000000;
if( argc >= 2 ) numEvent = atoi(argv[1]);
// Reaction setup for 18Ne + 4He -> p + 21Na*.
// The heavy product 21Na* is then decayed to 20Ne + p in the simulation.
TransferReaction transfer;
transfer.SetA(18, 10, 0); // 18Ne
transfer.SetIncidentEnergyAngle(4.4, 0, 0); // KEA in MeV/u, theta and phi in degree
transfer.Seta(4, 2); // 4He target
transfer.Setb(1, 1); // outgoing proton from the primary transfer
transfer.SetB(21, 11); // 21Na* heavy product
bool enableSequentialDecay = true;
const int decayDaughterA = 20;
const int decayDaughterZ = 10;
const int decayEjectA = 1;
const int decayEjectZ = 1;
// Excited state lists (projectile and heavy-product excitation states)
std::vector<float> ExAList = {0}; // 18Ne projectile excitations in MeV
std::vector<float> ExList = {2.5}; // 21Na* excitation in MeV (above proton separation threshold)
// define vertex position uniform distribution ranges (mm)
double vertexXRange[2] = { -5, 5}; // mm
double vertexYRange[2] = { -5, 5};
double vertexZRange[2] = { -100, 100};
// detector resolution / uncertainty parameters
double sigmaSX3_W = -1; // mm, if < 0 use mid-point (no spread in SX3 horizontal dimension)
double sigmaSX3_L = 3; // mm, vertical spread for SX3
double sigmaPW_A = 0; // normalized anode uncertainty term (0-1)
double sigmaPW_C = 0; // normalized cathode uncertainty term (0-1)
// status printout
printf("------------ Vertex :\n");
printf("X : %7.2f - %7.2f mm\n", vertexXRange[0], vertexXRange[1]);
printf("Y : %7.2f - %7.2f mm\n", vertexYRange[0], vertexYRange[1]);
printf("Z : %7.2f - %7.2f mm\n", vertexZRange[0], vertexZRange[1]);
printf("------------ Uncertainty :\n");
printf(" SX3 horizontal : %.1f\n", sigmaSX3_W);
printf(" SX3 vertical : %.1f\n", sigmaSX3_L);
printf(" Anode : %.1f mm\n", sigmaPW_A);
printf(" Cathode : %.1f mm\n", sigmaPW_C);
printf(" num_eve : %d \n",numEvent);
// calculates energy/momentum/kinematics constants for transfer reaction
transfer.CalReactionConstant();
printf("Primary reaction: %s at %.2f MeV/u\n", transfer.GetReactionName().Data(), 4.4);
printf("Sequential decay enabled: %s\n", enableSequentialDecay ? "yes" : "no");
int nExA = ExAList.size();
int nEx = ExList.size();
// optional visualization control: pass "vis" as 3rd arg
bool enableVis = (argc >= 3 && strcmp(argv[2], "vis") == 0);
TApplication *app = nullptr;
if(enableVis){
app = new TApplication("anasenVis", &argc, argv);
}
// storage for tracks during simulation (for visualization)
std::vector<TVector3> visTrackVertex, visTrackDir, visTrackHitPos;
std::vector<std::pair<int,int>> visTrackWires; // {anodeID, cathodeID}
// create detector representation in memory
ANASEN * anasen = new ANASEN(); // top-level detector object
SX3 * sx3 = anasen->GetSX3(); // silicon array part
PW * pw = anasen->GetPW(); // proportional wire chamber part
// output file + trees
TString saveFileName = "SimAnasen1.root";
printf("\e[32m#################################### building Tree in %s\e[0m\n", saveFileName.Data());
TFile * saveFile = new TFile(saveFileName, "recreate");
TTree * tree1 = new TTree("tree1", "tree1");
TTree * tree2 = new TTree("tree2", "tree2");
// beam and CM variables saved in tree
double KEA;
double KEA2;
tree1->Branch("beamKEA", &KEA, "beamKEA/D");
tree2->Branch("beamKEA", &KEA2, "beamKEA/D");
double thetaCM, phiCM;
double thetaCM2, phiCM2;
tree1->Branch("thetaCM", &thetaCM, "thetaCM/D");
tree1->Branch("phiCM", &phiCM, "phiCM/D");
tree2->Branch("thetaCM", &thetaCM2, "thetaCM/D");
tree2->Branch("phiCM", &phiCM2, "phiCM/D");
// outgoing particles in lab frame (light/heavy)
double thetab, phib;
double Tb;
double thetaB, phiB, TB;
std::array<double, 2> T;
tree1->Branch("thetab", &thetab, "thetab/D"); // polar angle of light particle in lab frame
tree1->Branch("phib", &phib, "phib/D"); // azimuthal angle of light particle in lab frame
tree1->Branch("Tb", &Tb, "Tb/D"); // kinetic energy of light particle at vertex (before energy loss)
tree1->Branch("thetaB", &thetaB, "thetaB/D");
tree1->Branch("phiB", &phiB, "phiB/D");
tree1->Branch("TB", &TB, "TB/D"); // kinetic energy of heavy particle at vertex
tree1->Branch("T", &T, "T/D"); // placeholder for true Q-value, currently set to 0 for simplicity
double thetab2, phib2;
double Tb2;
double thetaB2, phiB2, TB2;
std::array<double, 2> T2;
tree2->Branch("thetab", &thetab2, "thetab/D");
tree2->Branch("phib", &phib2, "phib/D");
tree2->Branch("Tb", &Tb2, "Tb/D");
tree2->Branch("thetaB", &thetaB2, "thetaB/D");
tree2->Branch("phiB", &phiB2, "phiB/D");
tree2->Branch("TB", &TB2, "TB/D");
tree2->Branch("T", &T2, "T/D");
// excitation state identifiers
int ExAID;
double ExA;
tree1->Branch("ExAID", &ExAID, "ExAID/I"); // projectile excitation state ID
tree1->Branch("ExA", &ExA, "ExA/D"); // projectile excitation energy in MeV
int ExAID2;
double ExA2;
tree2->Branch("ExAID", &ExAID2, "ExAID/I");
tree2->Branch("ExA", &ExA2, "ExA/D");
int ExID;
double Ex;
tree1->Branch("ExID", &ExID, "ExID/I"); // target excitation state ID
tree1->Branch("Ex", &Ex, "Ex/D"); // target excitation energy in MeV
int ExID2;
double Ex2;
tree2->Branch("ExID", &ExID2, "ExID/I");
tree2->Branch("Ex", &Ex2, "Ex/D");
// true vertex position in target volume
double vertexX, vertexY, vertexZ;
tree1->Branch("vX", &vertexX, "VertexX/D"); // true vertex X position in mm
tree1->Branch("vY", &vertexY, "VertexY/D"); // true vertex Y position in mm
tree1->Branch("vZ", &vertexZ, "VertexZ/D"); // true vertex Z position in mm
double vertexX2, vertexY2, vertexZ2;
tree2->Branch("vX", &vertexX2, "VertexX/D");
tree2->Branch("vY", &vertexY2, "VertexY/D");
tree2->Branch("vZ", &vertexZ2, "VertexZ/D");
// reconstructed SX3 hit position
double sx3X, sx3Y, sx3Z;
tree1->Branch("sx3X", &sx3X, "sx3X/D"); // reconstructed X position from SX3 (with optional smearing)
tree1->Branch("sx3Y", &sx3Y, "sx3Y/D"); // reconstructed Y position from SX3 (with optional smearing)
tree1->Branch("sx3Z", &sx3Z, "sx3Z/D"); // reconstructed Z position from SX3 (with optional smearing)
double sx3X2, sx3Y2, sx3Z2;
tree2->Branch("sx3X", &sx3X2, "sx3X/D");
tree2->Branch("sx3Y", &sx3Y2, "sx3Y/D");
tree2->Branch("sx3Z", &sx3Z2, "sx3Z/D");
// PW nearest and next nearest wires
int anodeID[2], cathodeID[2];
int anodeID2[2], cathodeID2[2];
tree1->Branch("aID", anodeID, "anodeID/I"); // anodeID[0] is nearest anode wire, anodeID[1] is next nearest anode wire
tree1->Branch("cID", cathodeID, "cathodeID/I"); // cathodeID[0] is nearest cathode wire, cathodeID[1] is next nearest cathode wire
tree2->Branch("aID", anodeID2, "anodeID/I");
tree2->Branch("cID", cathodeID2, "cathodeID/I");
// distances to nearest wires
double anodeDist[2], cathodeDist[2];
double anodeDist2[2], cathodeDist2[2];
tree1->Branch("aDist", anodeDist, "anodeDist/D");
tree1->Branch("cDist", cathodeDist, "cathodeDist/D");
tree2->Branch("aDist", anodeDist2, "anodeDist/D");
tree2->Branch("cDist", cathodeDist2, "cathodeDist/D");
// SX3 channel assignment and Z fraction (depth) information
int sx3ID, sx3Up, sx3Dn, sx3Bk;
double sx3ZFrac;
int sx3ID2, sx3Up2, sx3Dn2, sx3Bk2;
double sx3ZFrac2;
tree1->Branch("sx3ID", &sx3ID, "sx3ID/I");
tree1->Branch("sx3Up", &sx3Up, "sx3Up/I");
tree1->Branch("sx3Dn", &sx3Dn, "sx3Dn/I");
tree1->Branch("sx3Bk", &sx3Bk, "sx3Bk/I");
tree1->Branch("sx3ZFrac", &sx3ZFrac, "sx3ZFrac/D");
tree2->Branch("sx3ID", &sx3ID2, "sx3ID/I");
tree2->Branch("sx3Up", &sx3Up2, "sx3Up/I");
tree2->Branch("sx3Dn", &sx3Dn2, "sx3Dn/I");
tree2->Branch("sx3Bk", &sx3Bk2, "sx3Bk/I");
tree2->Branch("sx3ZFrac", &sx3ZFrac2, "sx3ZFrac/D");
// reconstructed angles from PW track fit, method 1 and 2
double reTheta, rePhi;
double reTheta2, rePhi2;
tree1->Branch("reTheta", &reTheta, "reconstucted_theta/D");
tree1->Branch("rePhi", &rePhi, "reconstucted_phi/D");
tree2->Branch("reTheta", &reTheta2, "reconstucted_theta/D");
tree2->Branch("rePhi", &rePhi2, "reconstucted_phi/D");
double reTheta1, rePhi1;
double reTheta12, rePhi12;
tree1->Branch("reTheta1", &reTheta1, "reconstucted_theta1/D");
tree1->Branch("rePhi1", &rePhi1, "reconstucted_phi1/D");
tree2->Branch("reTheta1", &reTheta12, "reconstucted_theta1/D");
tree2->Branch("rePhi1", &rePhi12, "reconstucted_phi1/D");
// reconstructed vertex Z from PW fit
double z0;
double z02;
tree1->Branch("z0", &z0, "reconstucted_Z/D");
tree2->Branch("z0", &z02, "reconstucted_Z/D");
//========timer
TBenchmark clock;
bool shown ;
clock.Reset();
clock.Start("timer");
shown = false;
//================================= Calculate event loop
for( int i = 0; i < numEvent ; i++){
// randomly sample target/projectile excitations
ExAID = gRandom->Integer(nExA);
ExA = ExAList[ExAID];
transfer.SetExA(ExA);
ExID = gRandom->Integer(nEx);
Ex = ExList[ExID];
transfer.SetExB(Ex);
// recalc kinematic constants for chosen states
transfer.CalReactionConstant();
// isotropic CM direction
thetaCM = TMath::ACos(2 * gRandom->Rndm() - 1) ;
phiCM = (gRandom->Rndm() - 0.5) * TMath::TwoPi();
//==== Calculate reaction kinematics in lab frame for the primary transfer
TLorentzVector * output = transfer.Event(thetaCM, phiCM); // returns array of outputs
TLorentzVector Pb = output[2]; // primary proton from transfer
TLorentzVector PB = output[3]; // excited 21Na* heavy product
thetab = Pb.Theta() * TMath::RadToDeg();
Tb = (Pb.E() - Pb.M()); // kinetic energy of the light proton from the primary transfer
thetaB = PB.Theta() * TMath::RadToDeg();
TB = (PB.E() - PB.M());
phib = Pb.Phi() * TMath::RadToDeg();
phiB = PB.Phi() * TMath::RadToDeg();
T[0] = Tb;
T[1] = TB;
// prepare secondary proton from 21Na* sequential decay
TLorentzVector decayProton;
TLorentzVector heavy20;
if(enableSequentialDecay){
heavy20 = SimulateSequentialDecay(PB, decayDaughterA, decayDaughterZ,
decayEjectA, decayEjectZ, decayProton);
thetab2 = decayProton.Theta() * TMath::RadToDeg();
phib2 = decayProton.Phi() * TMath::RadToDeg();
Tb2 = decayProton.E() - decayProton.M();
thetaB2 = heavy20.Theta() * TMath::RadToDeg();
phiB2 = heavy20.Phi() * TMath::RadToDeg();
TB2 = heavy20.E() - heavy20.M();
T2[0] = Tb2;
T2[1] = TB2;
} else {
thetab2 = TMath::QuietNaN();
phib2 = TMath::QuietNaN();
Tb2 = TMath::QuietNaN();
thetaB2 = TMath::QuietNaN();
phiB2 = TMath::QuietNaN();
TB2 = TMath::QuietNaN();
T2[0] = TMath::QuietNaN();
T2[1] = TMath::QuietNaN();
}
delete [] output;
// vertex position in target volume
vertexX = (vertexXRange[1]- vertexXRange[0])*gRandom->Rndm() + vertexXRange[0];
vertexY = (vertexYRange[1]- vertexYRange[0])*gRandom->Rndm() + vertexYRange[0];
vertexZ = (vertexZRange[1]- vertexZRange[0])*gRandom->Rndm() + vertexZRange[0];
TVector3 vertex(vertexX, vertexY, vertexZ);
// set direction vector from lab angle
TVector3 dir(1, 0, 0);
dir.SetTheta(thetab * TMath::DegToRad());
dir.SetPhi(phib * TMath::DegToRad());
// run detector response models for PW and SX3
pw->FindWireID(vertex, dir, false);
sx3->FindSX3Pos(vertex, dir, false);
PWHitInfo hitInfo = pw->GetHitInfo();
anodeID[0] = hitInfo.nearestWire.first; // nearest anode wire ID
cathodeID[0] = hitInfo.nearestWire.second; // nearest cathode wire ID
anodeID[1] = hitInfo.nextNearestWire.first; // next nearest anode wire ID
cathodeID[1] = hitInfo.nextNearestWire.second; // next nearest cathode wire ID
anodeDist[1] = hitInfo.nextNearestDist.first; // distance to next nearest anode wire
cathodeDist[1] = hitInfo.nextNearestDist.second; // distance to next nearest cathode wire
if(IsDeadAnode(anodeID[0])) continue;
if(IsDeadCathode(cathodeID[0])) continue;
// SX3 hit channel info and depth fraction
sx3ID = sx3->GetID();
if(IsDeadSX3(sx3ID)) continue;
anodeDist[0] = hitInfo.nearestDist.first; // distance to nearest anode wire
cathodeDist[0] = hitInfo.nearestDist.second; // distance to nearest cathode wire
if( sx3ID >= 0 ){
sx3Up = sx3->GetChUp();
sx3Dn = sx3->GetChDn();
sx3Bk = sx3->GetChBk();
sx3ZFrac = sx3->GetZFrac();
// apply intrinsic detector resolution to true SX3 hit position
// for no smearing comment out and use GetHitPos();
TVector3 hitPos = sx3->GetHitPosWithSigma(sigmaSX3_W, sigmaSX3_L);
sx3X = hitPos.X();
sx3Y = hitPos.Y();
sx3Z = hitPos.Z();
// store track data for visualization if enabled
if(enableVis){
visTrackVertex.push_back(vertex);
visTrackDir.push_back(dir);
visTrackHitPos.push_back(hitPos);
visTrackWires.push_back({anodeID[0], cathodeID[0]});
}
// reconstruct track from PW readings + SX3 hit
pw->CalTrack(hitPos, anodeID[0], cathodeID[0], false);
reTheta = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi = pw->GetTrackPhi() * TMath::RadToDeg();
// alternative track algorithm with uncertainty parameters
pw->CalTrack2(hitPos, hitInfo, sigmaPW_A, sigmaPW_C, false);
reTheta1 = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi1 = pw->GetTrackPhi() * TMath::RadToDeg();
z0 = pw->GetZ0();
tree1->Fill();
// fill tree2 using the secondary proton (proton 2) track
TVector3 dir2(1, 0, 0);
dir2.SetTheta(thetab2 * TMath::DegToRad());
dir2.SetPhi(phib2 * TMath::DegToRad());
pw->FindWireID(vertex, dir2, false);
sx3->FindSX3Pos(vertex, dir2, false);
PWHitInfo hitInfo2 = pw->GetHitInfo();
anodeID2[0] = hitInfo2.nearestWire.first;
cathodeID2[0] = hitInfo2.nearestWire.second;
anodeID2[1] = hitInfo2.nextNearestWire.first;
cathodeID2[1] = hitInfo2.nextNearestWire.second;
anodeDist2[1] = hitInfo2.nextNearestDist.first;
cathodeDist2[1] = hitInfo2.nextNearestDist.second;
if(IsDeadAnode(anodeID2[0]) || IsDeadCathode(cathodeID2[0])){
sx3ID2 = -1;
} else {
sx3ID2 = sx3->GetID();
}
if(sx3ID2 < 0 || IsDeadSX3(sx3ID2)){
sx3ID2 = -1;
sx3Up2 = -1;
sx3Dn2 = -1;
sx3Bk2 = -1;
sx3ZFrac2 = TMath::QuietNaN();
sx3X2 = TMath::QuietNaN();
sx3Y2 = TMath::QuietNaN();
sx3Z2 = TMath::QuietNaN();
anodeDist2[0] = TMath::QuietNaN();
cathodeDist2[0] = TMath::QuietNaN();
reTheta2 = TMath::QuietNaN();
rePhi2 = TMath::QuietNaN();
reTheta12 = TMath::QuietNaN();
rePhi12 = TMath::QuietNaN();
z02 = TMath::QuietNaN();
} else {
anodeDist2[0] = hitInfo2.nearestDist.first;
cathodeDist2[0] = hitInfo2.nearestDist.second;
sx3Up2 = sx3->GetChUp();
sx3Dn2 = sx3->GetChDn();
sx3Bk2 = sx3->GetChBk();
sx3ZFrac2 = sx3->GetZFrac();
TVector3 hitPos2 = sx3->GetHitPosWithSigma(sigmaSX3_W, sigmaSX3_L);
sx3X2 = hitPos2.X();
sx3Y2 = hitPos2.Y();
sx3Z2 = hitPos2.Z();
pw->CalTrack(hitPos2, anodeID2[0], cathodeID2[0], false);
reTheta2 = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi2 = pw->GetTrackPhi() * TMath::RadToDeg();
pw->CalTrack2(hitPos2, hitInfo2, sigmaPW_A, sigmaPW_C, false);
reTheta12 = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi12 = pw->GetTrackPhi() * TMath::RadToDeg();
z02 = pw->GetZ0();
}
// copy common event info to tree2
KEA2 = KEA;
thetaCM2 = thetaCM;
phiCM2 = phiCM;
ExAID2 = ExAID;
ExA2 = ExA;
ExID2 = ExID;
Ex2 = Ex;
vertexX2 = vertexX;
vertexY2 = vertexY;
vertexZ2 = vertexZ;
tree2->Fill();
}else{
// no valid SX3 hit: mark clearly invalid
sx3Up = -1;
sx3Dn = -1;
sx3Bk = -1;
sx3ZFrac = TMath::QuietNaN();
sx3X = TMath::QuietNaN();
sx3Y = TMath::QuietNaN();
sx3Z = TMath::QuietNaN();
reTheta = TMath::QuietNaN();
rePhi = TMath::QuietNaN();
reTheta1 = TMath::QuietNaN();
rePhi1 = TMath::QuietNaN();
z0 = TMath::QuietNaN();
//Tb = -12354567; // mark kinetic energy as invalid for no hit case
// fill tree with original data (no energy loss for these events)
//comment out tree fill for no hit case
//tree->Fill();
}
//#################################################################### Timer
// measure elapsed real time and print progress roughly every 10 sec
clock.Stop("timer");
Double_t time = clock.GetRealTime("timer");
clock.Start("timer");
if ( !shown ) {
if (fmod(time, 10) < 1 ){
printf( "%10d[%2d%%]| %8.2f sec | expect: %5.1f min \n", i, TMath::Nint((i+1)*100./numEvent), time , numEvent*time/(i+1)/60);
shown = 1;
}
} else {
if (fmod(time, 10) > 9 ){
shown = 0;
}
}
}
// write results to ROOT file and close
tree1->Write("", TObject::kOverwrite);
tree2->Write("", TObject::kOverwrite);
int count1 = tree1->GetEntries();
int count2 = tree2->GetEntries();
saveFile->Close();
printf("=============== done. saved as %s. tree1 entries: %d, tree2 entries: %d\n", saveFileName.Data(), count1, count2);
if(enableVis){ // to enable visualization, run with 3rd argument "vis", e.g. "./anasenMC 1000 vis"
printf("Displaying geometry with %zu tracks from simulation\n", visTrackVertex.size());
// Build full geometry with all wires
anasen->DrawAnasen(0, 23, 0, 23, -1, true);
// Add all stored tracks to the geometry
TGeoManager *geom = anasen->GetGeoManager();
TGeoVolume *worldBox = anasen->GetWorldBox();
if(geom && worldBox && visTrackVertex.size() > 0){
int trackNodeID = 500; // start node IDs for tracks
for(size_t iTrack = 0; iTrack < visTrackVertex.size(); ++iTrack){
TVector3 vertex = visTrackVertex[iTrack];
TVector3 dir = visTrackDir[iTrack];
TVector3 hitPos = visTrackHitPos[iTrack];
double theta = dir.Theta() * TMath::RadToDeg();
double phi = dir.Phi() * TMath::RadToDeg();
// Add a line marker at the vertex
TGeoVolume *startMarker = geom->MakeSphere("startMarker", 0, 0, 2.0);
startMarker->SetLineColor(kBlack);
worldBox->AddNode(startMarker, trackNodeID,
new TGeoCombiTrans(vertex.X(), vertex.Y(), vertex.Z(),
new TGeoRotation("rot", 0, 0, 0)));
trackNodeID++;
// Add track line from vertex toward hit position
TGeoVolume *trackLine = geom->MakeTube("trackLine", 0, 0, 0.08, 150.0);
trackLine->SetLineColor(kBlue);
worldBox->AddNode(trackLine, trackNodeID,
new TGeoCombiTrans(vertex.X(), vertex.Y(), vertex.Z(),
new TGeoRotation("rotTrack", phi + 90, theta, 0)));
trackNodeID++;
// Add hit position marker
TGeoVolume *hitMarker = geom->MakeSphere("hitMarker", 0, 0, 2.0);
hitMarker->SetLineColor(kRed);
worldBox->AddNode(hitMarker, trackNodeID,
new TGeoCombiTrans(hitPos.X(), hitPos.Y(), hitPos.Z(),
new TGeoRotation("rotHit", 0, 0, 0)));
trackNodeID++;
}
// Redraw geometry with all tracks
geom->CloseGeometry();
geom->SetVisLevel(4);
worldBox->Draw("ogle");
}
if(app){
printf("Entering ROOT event loop\n");
app->Run();
}
}
delete anasen;
return 0;
}

View File

@ -1,18 +1,90 @@
#include "TRandom.h" #include "TRandom.h" // ROOT random number generators, gRandom
#include "TFile.h" #include "TFile.h" // ROOT file I/O
#include "TTree.h" #include "TTree.h" // ROOT tree storage
#include "TH1.h" #include "TH1.h" // 1D histograms
#include "TH2.h" #include "TH2.h" // 2D histograms
#include "TStyle.h" #include "TStyle.h" // ROOT plotting style controls
#include "TCanvas.h" #include "TCanvas.h" // ROOT canvas drawing
#include "TBenchmark.h" #include "TBenchmark.h" // timing measurement
#include "TGraph.h" // for energy loss interpolation
#include <cstring>
#include "TApplication.h" // ROOT app loop
#include "ClassTransfer.h" // Reaction kinematics and MC event generation
#include "ClassAnasen.h" // ANASEN detector model classes (SX3, PW, etc.)
#include "ClassQQQ.h" // QQQ detector model class
#include <stdio.h>
#include <stdlib.h>
#include <set>
#include "TLegend.h"
#include "TH1D.h"
#include "TObjArray.h"
#include "TBranch.h"
#include <iostream>
#include <fstream>
#include "ClassTransfer.h" //======== Generate light particle based on reaction
#include "ClassAnasen.h" // calculate real and reconstructed tracks and Q-value uncertainty
//======== Gerneate light particle based on reaction // Function to load energy loss table from file
// find out the CalTrack and the real track TGraph* LoadELoss(const char* filename) {
// find out the Q-value uncertaintly TGraph* g = new TGraph(filename, "%lg %lg");
return g;
}
bool IsDeadAnode(int id){
static std::set<int> dead = {}; // add dead anode IDs here, 0-23
return dead.count(id);
}
bool IsDeadCathode(int id){
static std::set<int> dead = {}; // add dead cathode IDs here, 0-23
return dead.count(id);
}
bool IsDeadSX3(int id){
static std::set<int> dead = {}; // add dead SX3 IDs here, 0-23 1,7,9,3
return dead.count(id);
}
// Simulate sequential two-body decay of an unstable parent in its rest frame.
TLorentzVector SimulateSequentialDecay(const TLorentzVector &parent,
int daughterA, int daughterZ,
int ejectA, int ejectZ,
TLorentzVector &ejectileOut){
Isotope daughter(daughterA, daughterZ);
Isotope ejectile(ejectA, ejectZ);
double M = parent.M();
double mD = daughter.Mass;
double mE = ejectile.Mass;
double sqM = M * M;
double sum = mD + mE;
double diff = mD - mE;
double p2 = (sqM - sum*sum) * (sqM - diff*diff) / (4.0 * sqM); // two-body decay momentum squared
if( p2 < 0 ) p2 = 0; // handle unphysical case where parent mass is less than sum of daughter and ejectile masses
double p = TMath::Sqrt(p2); // two-body decay momentum
double cosTheta = 2.0 * gRandom->Rndm() - 1.0; // isotropic decay in parent rest frame
double theta = TMath::ACos(cosTheta); // polar angle of daughter in parent rest frame
double phi = gRandom->Rndm() * TMath::TwoPi(); // azimuthal angle of daughter in parent rest frame
TVector3 v; // momentum vector of daughter in parent rest frame
v.SetMagThetaPhi(p, theta, phi); // daughter momentum in parent rest frame
TLorentzVector daughterLab; // daughter 4-vector in lab frame, initialized with momentum from decay and mass of daughter
daughterLab.SetVectM(v, mD); // set daughter 4-vector in parent rest frame, then boost to lab frame
TLorentzVector ejectileLab; // ejectile 4-vector in lab frame, initialized with momentum opposite to daughter and mass of ejectile
ejectileLab.SetVectM(-v, mE); // set ejectile 4-vector in parent rest frame, then boost to lab frame
TVector3 boost = parent.BoostVector(); // boost vector to go from parent rest frame to lab frame
daughterLab.Boost(boost); // boost daughter to lab frame
ejectileLab.Boost(boost); // boost ejectile to lab frame
ejectileOut = ejectileLab; // return ejectile in lab frame
return daughterLab;
}
int main(int argc, char **argv){ int main(int argc, char **argv){
@ -20,33 +92,43 @@ int main(int argc, char **argv){
printf("=== ANASEN Monte Carlo ===\n"); printf("=== ANASEN Monte Carlo ===\n");
printf("=========================================\n"); printf("=========================================\n");
// number of events can be overridden from command line
int numEvent = 1000000; int numEvent = 1000000;
if( argc >= 2 ) numEvent = atoi(argv[1]); if( argc >= 2 ) numEvent = atoi(argv[1]);
//Reaction
TransferReaction transfer; TransferReaction transfer;
transfer.SetA(24,12, 0); //To set beam energy loss, use energy loss app, and create table with target isotope, set Initial beam energy as max energy
transfer.SetIncidentEnergyAngle(10, 0, 0); transfer.SetA(27, 13, 0); // 18Ne projectile
transfer.Seta( 4, 2); TGraph* elossBeam = LoadELoss("../ELoss/HeLoss/E_vs_x_Al-27.dat");
transfer.Setb( 1, 1); transfer.Seta(4, 2); // 4He target
transfer.Setb(1, 1); // outgoing proton from the primary transfer
transfer.SetB(30, 14); // 21Na* heavy product
const double beamA = 27; // mass number of 27Al beam
//TODO add alpha source bool enableSequentialDecay = false; // turning to false to disable sequential decay for now, can be set to true to enable
const int decayDaughterA = 20;
const int decayDaughterZ = 10;
const int decayEjectA = 1;
const int decayEjectZ = 1;
std::vector<float> ExAList = {0}; // Excited state lists (projectile and heavy-product excitation states)
std::vector<float> ExList = {0, 1, 2}; std::vector<float> ExAList = {0}; // 18Ne projectile excitations in MeV
std::vector<float> ExList = {0}; // 21Na* excitation in MeV
double vertexXRange[2] = { -5, 5}; // mm // define vertex position uniform distribution ranges (mm)
double vertexYRange[2] = { -5, 5}; double vertexXRange[2] = { -5, 5}; // mm - 5, 5
double vertexZRange[2] = { -100, 100}; double vertexYRange[2] = { -5, 5}; // -5, 5
double vertexZRange[2] = { -174.3, 174.3}; // -174.3, 174.3 (full length of gas volume, centered at 0)
const double beamEntranceZ = -280; //vertexZRange[0]; // mm, assumed beam entrance into the gas
double sigmaSX3_W = -1; // mm, < 0 use mid-point
double sigmaSX3_L = 3; // mm, < 0 use mid-point
double sigmaPW_A = 0; // from 0 to 1.
double sigmaPW_C = 0; // from 0 to 1.
//################################################### // detector resolution / uncertainty parameters
double sigmaSX3_W = 0; // mm, if < 0 use mid-point (no spread in SX3 horizontal dimension)
double sigmaSX3_L = 0; // mm, vertical spread for SX3
double sigmaPW_A = 0; // normalized anode uncertainty term (0-1)
double sigmaPW_C = 0; // normalized cathode uncertainty term (0-1)
// status printout
printf("------------ Vertex :\n"); printf("------------ Vertex :\n");
printf("X : %7.2f - %7.2f mm\n", vertexXRange[0], vertexXRange[1]); printf("X : %7.2f - %7.2f mm\n", vertexXRange[0], vertexXRange[1]);
printf("Y : %7.2f - %7.2f mm\n", vertexYRange[0], vertexYRange[1]); printf("Y : %7.2f - %7.2f mm\n", vertexYRange[0], vertexYRange[1]);
@ -57,83 +139,194 @@ int main(int argc, char **argv){
printf(" Anode : %.1f mm\n", sigmaPW_A); printf(" Anode : %.1f mm\n", sigmaPW_A);
printf(" Cathode : %.1f mm\n", sigmaPW_C); printf(" Cathode : %.1f mm\n", sigmaPW_C);
printf(" num_eve : %d \n",numEvent); printf(" num_eve : %d \n",numEvent);
// calculates energy/momentum/kinematics constants for transfer reaction
transfer.CalReactionConstant(); transfer.CalReactionConstant();
int nExA = ExAList.size(); int nExA = ExAList.size();
int nEx = ExList.size(); int nEx = ExList.size();
ANASEN * anasen = new ANASEN(); // optional visualization control: pass "vis" as 3rd arg
SX3 * sx3 = anasen->GetSX3(); bool enableVis = (argc >= 3 && strcmp(argv[2], "vis") == 0);
PW * pw = anasen->GetPW(); TApplication *app = nullptr;
if(enableVis){
app = new TApplication("anasenVis", &argc, argv);
}
// storage for tracks during simulation (for visualization)
std::vector<TVector3> visTrackVertex, visTrackDir, visTrackHitPos;
std::vector<std::pair<int,int>> visTrackWires; // {anodeID, cathodeID}
// create detector representation in memory
ANASEN * anasen = new ANASEN(); // top-level detector object
SX3 * sx3 = anasen->GetSX3(); // silicon array part
PW * pw = anasen->GetPW(); // proportional wire chamber part
QQQ * qqq = anasen->GetQQQ(); // optional QQQ detector part, not used in this simulation but can be enabled for visualization
// output file + trees
TString saveFileName = "SimAnasen1.root"; TString saveFileName = "SimAnasen1.root";
printf("\e[32m#################################### building Tree in %s\e[0m\n", saveFileName.Data()); printf("\e[32m#################################### building Tree in %s\e[0m\n", saveFileName.Data());
TFile * saveFile = new TFile(saveFileName, "recreate"); TFile * saveFile = new TFile(saveFileName, "recreate");
TTree * tree = new TTree("tree", "tree"); TTree * tree1 = new TTree("tree1", "tree1");
TTree * tree2 = new TTree("tree2", "tree2");
// beam and CM variables saved in tree
double KEA; double KEA;
tree->Branch("beamKEA", &KEA, "beamKEA/D"); double KEA2;
double beamPath_cm;
double beamEnergy;
double beamEnergyLoss;
tree1->Branch("beamKEA", &KEA, "beamKEA/D");
tree2->Branch("beamKEA", &KEA2, "beamKEA/D");
tree1->Branch("beamPath_cm", &beamPath_cm, "beamPath_cm/D");
tree2->Branch("beamPath_cm", &beamPath_cm, "beamPath_cm/D");
tree1->Branch("beamEnergy", &beamEnergy, "beamEnergy/D");
tree2->Branch("beamEnergy", &beamEnergy, "beamEnergy/D");
tree1->Branch("beamEnergyLoss", &beamEnergyLoss, "beamEnergyLoss/D");
tree2->Branch("beamEnergyLoss", &beamEnergyLoss, "beamEnergyLoss/D");
double thetaCM, phiCM; double thetaCM, phiCM;
tree->Branch("thetaCM", &thetaCM, "thetaCM/D"); double thetaCM2, phiCM2;
tree->Branch("phiCM", &phiCM, "phiCM/D"); tree1->Branch("thetaCM", &thetaCM, "thetaCM/D");
tree1->Branch("phiCM", &phiCM, "phiCM/D");
tree2->Branch("thetaCM", &thetaCM2, "thetaCM/D");
tree2->Branch("phiCM", &phiCM2, "phiCM/D");
double thetab, phib, Tb; // outgoing particles in lab frame (light/heavy)
double thetaB, phiB, TB; double thetab, phib, Tb, qqqTb;
tree->Branch("thetab", &thetab, "thetab/D"); double thetaB, phiB, TB, qqqTB;
tree->Branch("phib", &phib, "phib/D"); std::array<double, 2> T;
tree->Branch("Tb", &Tb, "Tb/D"); tree1->Branch("thetab", &thetab, "thetab/D"); // polar angle of light particle in lab frame
tree->Branch("thetaB", &thetaB, "thetaB/D"); tree1->Branch("phib", &phib, "phib/D"); // azimuthal angle of light particle in lab frame
tree->Branch("phiB", &phiB, "phiB/D"); tree1->Branch("Tb", &Tb, "Tb/D"); // kinetic energy of light particle at vertex (before energy loss)
tree->Branch("TB", &TB, "TB/D"); tree1->Branch("thetaB", &thetaB, "thetaB/D");
tree1->Branch("phiB", &phiB, "phiB/D");
tree1->Branch("TB", &TB, "TB/D"); // kinetic energy of heavy particle at vertex (before energy loss)
tree1->Branch("T", &T, "T/D"); // placeholder for true Q-value, currently set to 0 for simplicity
tree1->Branch("qqqTb", &qqqTb, "qqqTb/D"); // kinetic energy of light particle at vertex (before energy loss) for events where the light particle hits the QQQ, currently set to 0 for simplicity
tree1->Branch("qqqTB", &qqqTB, "qqqTB/D"); // kinetic energy of heavy particle at vertex (before energy loss) for events where the light
double thetab2, phib2, Tb2, qqqTb2;
double thetaB2, phiB2, TB2, qqqTB2;
std::array<double, 2> T2;
tree2->Branch("thetab", &thetab2, "thetab/D");
tree2->Branch("phib", &phib2, "phib/D");
tree2->Branch("Tb", &Tb2, "Tb/D");
tree2->Branch("thetaB", &thetaB2, "thetaB/D");
tree2->Branch("phiB", &phiB2, "phiB/D");
tree2->Branch("TB", &TB2, "TB/D");
tree2->Branch("T", &T2, "T/D");
tree2->Branch("qqqTb", &qqqTb2, "qqqTb/D");
tree2->Branch("qqqTB", &qqqTB2, "qqqTB/D");
// excitation state identifiers
int ExAID; int ExAID;
double ExA; double ExA;
tree->Branch("ExAID", &ExAID, "ExAID/I"); tree1->Branch("ExAID", &ExAID, "ExAID/I"); // projectile excitation state ID
tree->Branch("ExA", &ExA, "ExA/D"); tree1->Branch("ExA", &ExA, "ExA/D"); // projectile excitation energy in MeV
int ExAID2;
double ExA2;
tree2->Branch("ExAID", &ExAID2, "ExAID/I");
tree2->Branch("ExA", &ExA2, "ExA/D");
int ExID; int ExID;
double Ex; double Ex;
tree->Branch("ExID", &ExID, "ExID/I"); tree1->Branch("ExID", &ExID, "ExID/I"); // target excitation state ID
tree->Branch("Ex", &Ex, "Ex/D"); tree1->Branch("Ex", &Ex, "Ex/D"); // target excitation energy in MeV
int ExID2;
double Ex2;
tree2->Branch("ExID", &ExID2, "ExID/I");
tree2->Branch("Ex", &Ex2, "Ex/D");
// true vertex position in target volume
double vertexX, vertexY, vertexZ; double vertexX, vertexY, vertexZ;
tree->Branch("vX", &vertexX, "VertexX/D"); tree1->Branch("vX", &vertexX, "VertexX/D"); // true vertex X position in mm
tree->Branch("vY", &vertexY, "VertexY/D"); tree1->Branch("vY", &vertexY, "VertexY/D"); // true vertex Y position in mm
tree->Branch("vZ", &vertexZ, "VertexZ/D"); tree1->Branch("vZ", &vertexZ, "VertexZ/D"); // true vertex Z position in mm
double vertexX2, vertexY2, vertexZ2;
tree2->Branch("vX", &vertexX2, "VertexX/D");
tree2->Branch("vY", &vertexY2, "VertexY/D");
tree2->Branch("vZ", &vertexZ2, "VertexZ/D");
// reconstructed SX3 hit position
double sx3X, sx3Y, sx3Z; double sx3X, sx3Y, sx3Z;
tree->Branch("sx3X", &sx3X, "sx3X/D"); tree1->Branch("sx3X", &sx3X, "sx3X/D"); // reconstructed X position from SX3 (with optional smearing) in mm
tree->Branch("sx3Y", &sx3Y, "sx3Y/D"); tree1->Branch("sx3Y", &sx3Y, "sx3Y/D"); // reconstructed Y position from SX3 (with optional smearing)
tree->Branch("sx3Z", &sx3Z, "sx3Z/D"); tree1->Branch("sx3Z", &sx3Z, "sx3Z/D"); // reconstructed Z position from SX3 (with optional smearing)
double sx3X2, sx3Y2, sx3Z2;
tree2->Branch("sx3X", &sx3X2, "sx3X/D");
tree2->Branch("sx3Y", &sx3Y2, "sx3Y/D");
tree2->Branch("sx3Z", &sx3Z2, "sx3Z/D");
double qqqX, qqqY, qqqZ;
tree1->Branch("qqqX", &qqqX, "qqqX/D"); // reconstructed X position from QQQ (with optional smearing) in mm
tree1->Branch("qqqY", &qqqY, "qqqY/D"); // reconstructed Y position from QQQ (with optional smearing)
tree1->Branch("qqqZ", &qqqZ, "qqqZ/D"); // reconstructed Z position from QQQ (with optional smearing)
double qqqX2, qqqY2, qqqZ2;
tree2->Branch("qqqX", &qqqX2, "qqqX/D");
tree2->Branch("qqqY", &qqqY2, "qqqY/D");
tree2->Branch("qqqZ", &qqqZ2, "qqqZ/D");
// PW nearest and next nearest wires
int anodeID[2], cathodeID[2]; int anodeID[2], cathodeID[2];
tree->Branch("aID", anodeID, "anodeID/I"); int anodeID2[2], cathodeID2[2];
tree->Branch("cID", cathodeID, "cathodeID/I"); tree1->Branch("aID", anodeID, "anodeID/I"); // anodeID[0] is nearest anode wire, anodeID[1] is next nearest anode wire
tree1->Branch("cID", cathodeID, "cathodeID/I"); // cathodeID[0] is nearest cathode wire, cathodeID[1] is next nearest cathode wire
tree2->Branch("aID", anodeID2, "anodeID/I");
tree2->Branch("cID", cathodeID2, "cathodeID/I");
// distances to nearest wires
double anodeDist[2], cathodeDist[2]; double anodeDist[2], cathodeDist[2];
tree->Branch("aDist", anodeDist, "anodeDist/D"); double anodeDist2[2], cathodeDist2[2];
tree->Branch("cDist", cathodeDist, "cathodeDist/D"); tree1->Branch("aDist", anodeDist, "anodeDist/D");
tree1->Branch("cDist", cathodeDist, "cathodeDist/D");
tree2->Branch("aDist", anodeDist2, "anodeDist/D");
tree2->Branch("cDist", cathodeDist2, "cathodeDist/D");
int sx3ID, sx3Up, sx3Dn, sx3Bk; // SX3 channel assignment and Z fraction (depth) information
int sx3ID, sx3Up, sx3Dn, sx3Bk, qqqID;
double sx3ZFrac; double sx3ZFrac;
tree->Branch("sx3ID", &sx3ID, "sx3ID/I"); int sx3ID2, sx3Up2, sx3Dn2, sx3Bk2, qqqID2;
tree->Branch("sx3Up", &sx3Up, "sx3Up/I"); double sx3ZFrac2;
tree->Branch("sx3Dn", &sx3Dn, "sx3Dn/I"); tree1->Branch("sx3ID", &sx3ID, "sx3ID/I");
tree->Branch("sx3Bk", &sx3Bk, "sx3Bk/I"); tree1->Branch("qqqID", &qqqID, "qqqID/I");
tree->Branch("sx3ZFrac", &sx3ZFrac, "sx3ZFrac/D"); tree1->Branch("sx3Up", &sx3Up, "sx3Up/I");
tree1->Branch("sx3Dn", &sx3Dn, "sx3Dn/I");
tree1->Branch("sx3Bk", &sx3Bk, "sx3Bk/I");
tree1->Branch("sx3ZFrac", &sx3ZFrac, "sx3ZFrac/D");
tree2->Branch("sx3ID", &sx3ID2, "sx3ID/I");
tree2->Branch("qqqID", &qqqID2, "qqqID/I");
tree2->Branch("sx3Up", &sx3Up2, "sx3Up/I");
tree2->Branch("sx3Dn", &sx3Dn2, "sx3Dn/I");
tree2->Branch("sx3Bk", &sx3Bk2, "sx3Bk/I");
tree2->Branch("sx3ZFrac", &sx3ZFrac2, "sx3ZFrac/D");
// reconstructed angles from PW track fit, method 1 and 2
double reTheta, rePhi; double reTheta, rePhi;
tree->Branch("reTheta", &reTheta, "reconstucted_theta/D"); double reTheta2, rePhi2;
tree->Branch("rePhi", &rePhi, "reconstucted_phi/D"); tree1->Branch("reTheta", &reTheta, "reconstucted_theta/D");
tree1->Branch("rePhi", &rePhi, "reconstucted_phi/D");
tree2->Branch("reTheta", &reTheta2, "reconstucted_theta/D");
tree2->Branch("rePhi", &rePhi2, "reconstucted_phi/D");
double reTheta1, rePhi1; double reTheta1, rePhi1;
tree->Branch("reTheta1", &reTheta1, "reconstucted_theta1/D"); double reTheta12, rePhi12;
tree->Branch("rePhi1", &rePhi1, "reconstucted_phi1/D"); tree1->Branch("reTheta1", &reTheta1, "reconstucted_theta1/D");
tree1->Branch("rePhi1", &rePhi1, "reconstucted_phi1/D");
tree2->Branch("reTheta1", &reTheta12, "reconstucted_theta1/D");
tree2->Branch("rePhi1", &rePhi12, "reconstucted_phi1/D");
// reconstructed vertex Z from PW fit
double z0; double z0;
tree->Branch("z0", &z0, "reconstucted_Z/D"); double z02;
tree1->Branch("z0", &z0, "reconstucted_Z/D");
tree2->Branch("z0", &z02, "reconstucted_Z/D");
//========timer //========timer
TBenchmark clock; TBenchmark clock;
@ -142,9 +335,10 @@ int main(int argc, char **argv){
clock.Start("timer"); clock.Start("timer");
shown = false; shown = false;
//================================= Calculate event //================================= Calculate event loop
for( int i = 0; i < numEvent ; i++){ for( int i = 0; i < numEvent ; i++){
// randomly sample target/projectile excitations
ExAID = gRandom->Integer(nExA); ExAID = gRandom->Integer(nExA);
ExA = ExAList[ExAID]; ExA = ExAList[ExAID];
transfer.SetExA(ExA); transfer.SetExA(ExA);
@ -153,77 +347,214 @@ int main(int argc, char **argv){
Ex = ExList[ExID]; Ex = ExList[ExID];
transfer.SetExB(Ex); transfer.SetExB(Ex);
// recalc kinematic constants for chosen states
transfer.CalReactionConstant(); transfer.CalReactionConstant();
thetaCM = TMath::ACos(2 * gRandom->Rndm() - 1) ; // vertex position in target volume
phiCM = (gRandom->Rndm() - 0.5) * TMath::TwoPi();
//==== Calculate reaction
TLorentzVector * output = transfer.Event(thetaCM, phiCM);
TLorentzVector Pb = output[2];
TLorentzVector PB = output[3];
thetab = Pb.Theta() * TMath::RadToDeg();
thetaB = PB.Theta() * TMath::RadToDeg();
Tb = Pb.E() - Pb.M();
TB = PB.E() - PB.M();
phib = Pb.Phi() * TMath::RadToDeg();
phiB = PB.Phi() * TMath::RadToDeg();
vertexX = (vertexXRange[1]- vertexXRange[0])*gRandom->Rndm() + vertexXRange[0]; vertexX = (vertexXRange[1]- vertexXRange[0])*gRandom->Rndm() + vertexXRange[0];
vertexY = (vertexYRange[1]- vertexYRange[0])*gRandom->Rndm() + vertexYRange[0]; vertexY = (vertexYRange[1]- vertexYRange[0])*gRandom->Rndm() + vertexYRange[0];
vertexZ = (vertexZRange[1]- vertexZRange[0])*gRandom->Rndm() + vertexZRange[0]; vertexZ = (vertexZRange[1]- vertexZRange[0])*gRandom->Rndm() + vertexZRange[0];
TVector3 vertex(vertexX, vertexY, vertexZ); TVector3 vertex(vertexX, vertexY, vertexZ);
// compute beam energy at the event vertex from the gas path length
beamPath_cm = TVector3(vertexZ - beamEntranceZ, vertexX, vertexY).Mag() * 0.1;
if( beamPath_cm < 0 ) beamPath_cm = 0;
beamEnergy = elossBeam->Eval(beamPath_cm); // MeV
beamEnergyLoss = elossBeam->Eval(0.0) - beamEnergy;
KEA = beamEnergy / beamA;
transfer.SetIncidentEnergyAngle(KEA, 0, 0);
transfer.CalReactionConstant();
// isotropic CM direction
thetaCM = TMath::ACos(2 * gRandom->Rndm() - 1) ; // polar angle in CM frame
phiCM = (gRandom->Rndm() - 0.5) * TMath::TwoPi();
//==== Calculate reaction kinematics in lab frame for the primary transfer
TLorentzVector * output = transfer.Event(thetaCM, phiCM); // returns array of outputs
TLorentzVector Pb = output[2]; // primary proton from transfer
TLorentzVector PB = output[3]; // excited 21Na* heavy product
thetab = Pb.Theta() * TMath::RadToDeg();
Tb = (Pb.E() - Pb.M()); // kinetic energy of the light proton from the primary transfer
thetaB = PB.Theta() * TMath::RadToDeg();
TB = (PB.E() - PB.M());
phib = Pb.Phi() * TMath::RadToDeg();
phiB = PB.Phi() * TMath::RadToDeg();
T[0] = Tb;
T[1] = TB;
//secondary decay
TLorentzVector decayProton;
TLorentzVector heavy20;
if(enableSequentialDecay){
heavy20 = SimulateSequentialDecay(PB, decayDaughterA, decayDaughterZ,
decayEjectA, decayEjectZ, decayProton);
thetab2 = decayProton.Theta() * TMath::RadToDeg();
phib2 = decayProton.Phi() * TMath::RadToDeg();
Tb2 = decayProton.E() - decayProton.M();
thetaB2 = heavy20.Theta() * TMath::RadToDeg();
phiB2 = heavy20.Phi() * TMath::RadToDeg();
TB2 = heavy20.E() - heavy20.M();
T2[0] = Tb2;
T2[1] = TB2;
} else {
thetab2 = TMath::QuietNaN();
phib2 = TMath::QuietNaN();
Tb2 = TMath::QuietNaN();
thetaB2 = TMath::QuietNaN();
phiB2 = TMath::QuietNaN();
TB2 = TMath::QuietNaN();
T2[0] = TMath::QuietNaN();
T2[1] = TMath::QuietNaN();
}
delete [] output;
// set direction vector from lab angle
TVector3 dir(1, 0, 0); TVector3 dir(1, 0, 0);
dir.SetTheta(thetab * TMath::DegToRad()); dir.SetTheta(thetab * TMath::DegToRad());
dir.SetPhi(phib * TMath::DegToRad()); dir.SetPhi(phib * TMath::DegToRad());
// run detector response models for PW and SX3
pw->FindWireID(vertex, dir, false); pw->FindWireID(vertex, dir, false);
sx3->FindSX3Pos(vertex, dir, false); sx3->FindSX3Pos(vertex, dir, false);
qqq->FindQQQPos(vertex, dir, false);
PWHitInfo hitInfo = pw->GetHitInfo(); PWHitInfo hitInfo = pw->GetHitInfo();
anodeID[0] = hitInfo.nearestWire.first; anodeID[0] = hitInfo.nearestWire.first; // nearest anode wire ID
cathodeID[0] = hitInfo.nearestWire.second; cathodeID[0] = hitInfo.nearestWire.second; // nearest cathode wire ID
anodeID[1] = hitInfo.nextNearestWire.first; anodeID[1] = hitInfo.nextNearestWire.first; // next nearest anode wire ID
cathodeID[1] = hitInfo.nextNearestWire.second; cathodeID[1] = hitInfo.nextNearestWire.second; // next nearest cathode wire ID
anodeDist[0] = hitInfo.nearestDist.first; anodeDist[1] = hitInfo.nextNearestDist.first; // distance to next nearest anode wire
cathodeDist[0] = hitInfo.nearestDist.second; cathodeDist[1] = hitInfo.nextNearestDist.second; // distance to next nearest cathode wire
anodeDist[1] = hitInfo.nextNearestDist.first;
cathodeDist[1] = hitInfo.nextNearestDist.second;
if(IsDeadAnode(anodeID[0])) continue;
if(IsDeadCathode(cathodeID[0])) continue;
// SX3 hit channel info and depth fraction
sx3ID = sx3->GetID(); sx3ID = sx3->GetID();
qqqID = qqq->GetID();
if(IsDeadSX3(sx3ID)) continue;
anodeDist[0] = hitInfo.nearestDist.first; // distance to nearest anode wire
cathodeDist[0] = hitInfo.nearestDist.second; // distance to nearest cathode wire
//start HERE
if( sx3ID >= 0 ){ if( sx3ID >= 0 ){
sx3Up = sx3->GetChUp(); sx3Up = sx3->GetChUp();
sx3Dn = sx3->GetChDn(); sx3Dn = sx3->GetChDn();
sx3Bk = sx3->GetChBk(); sx3Bk = sx3->GetChBk();
sx3ZFrac = sx3->GetZFrac(); sx3ZFrac = sx3->GetZFrac();
//Introduce uncertaity // apply intrinsic detector resolution to true SX3 hit position
// TVector3 hitPos = sx3->GetHitPos(); // for no smearing comment out and use GetHitPos();
TVector3 hitPos = sx3->GetHitPosWithSigma(sigmaSX3_W, sigmaSX3_L); TVector3 hitPos = sx3->GetHitPosWithSigma(sigmaSX3_W, sigmaSX3_L);
sx3X = hitPos.X(); sx3X = hitPos.X();
sx3Y = hitPos.Y(); sx3Y = hitPos.Y();
sx3Z = hitPos.Z(); sx3Z = hitPos.Z();
// store track data for visualization if enabled
if(enableVis){
visTrackVertex.push_back(vertex);
visTrackDir.push_back(dir);
visTrackHitPos.push_back(hitPos);
visTrackWires.push_back({anodeID[0], cathodeID[0]});
}
// reconstruct track from PW readings + SX3 hit
pw->CalTrack(hitPos, anodeID[0], cathodeID[0], false); pw->CalTrack(hitPos, anodeID[0], cathodeID[0], false);
reTheta = pw->GetTrackTheta() * TMath::RadToDeg(); reTheta = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi = pw->GetTrackPhi() * TMath::RadToDeg(); rePhi = pw->GetTrackPhi() * TMath::RadToDeg();
// alternative track algorithm with uncertainty parameters
pw->CalTrack2(hitPos, hitInfo, sigmaPW_A, sigmaPW_C, false); pw->CalTrack2(hitPos, hitInfo, sigmaPW_A, sigmaPW_C, false);
reTheta1 = pw->GetTrackTheta() * TMath::RadToDeg(); reTheta1 = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi1 = pw->GetTrackPhi() * TMath::RadToDeg(); rePhi1 = pw->GetTrackPhi() * TMath::RadToDeg();
z0 = pw->GetZ0(); z0 = pw->GetZ0();
tree1->Fill();
// fill tree2 using the secondary proton from 21Na* decay
TVector3 dir2(1, 0, 0);
dir2.SetTheta(thetab2 * TMath::DegToRad());
dir2.SetPhi(phib2 * TMath::DegToRad());
pw->FindWireID(vertex, dir2, false);
sx3->FindSX3Pos(vertex, dir2, false);
PWHitInfo hitInfo2 = pw->GetHitInfo();
anodeID2[0] = hitInfo2.nearestWire.first;
cathodeID2[0] = hitInfo2.nearestWire.second;
anodeID2[1] = hitInfo2.nextNearestWire.first;
cathodeID2[1] = hitInfo2.nextNearestWire.second;
anodeDist2[1] = hitInfo2.nextNearestDist.first;
cathodeDist2[1] = hitInfo2.nextNearestDist.second;
if(IsDeadAnode(anodeID2[0]) || IsDeadCathode(cathodeID2[0])){
sx3ID2 = -1;
} else { } else {
sx3ID2 = sx3->GetID();
}
if(sx3ID2 < 0 || IsDeadSX3(sx3ID2)){
sx3ID2 = -1;
sx3Up2 = -1;
sx3Dn2 = -1;
sx3Bk2 = -1;
sx3ZFrac2 = TMath::QuietNaN();
sx3X2 = TMath::QuietNaN();
sx3Y2 = TMath::QuietNaN();
sx3Z2 = TMath::QuietNaN();
anodeDist2[0] = TMath::QuietNaN();
cathodeDist2[0] = TMath::QuietNaN();
reTheta2 = TMath::QuietNaN();
rePhi2 = TMath::QuietNaN();
reTheta12 = TMath::QuietNaN();
rePhi12 = TMath::QuietNaN();
z02 = TMath::QuietNaN();
} else {
anodeDist2[0] = hitInfo2.nearestDist.first;
cathodeDist2[0] = hitInfo2.nearestDist.second;
sx3Up2 = sx3->GetChUp();
sx3Dn2 = sx3->GetChDn();
sx3Bk2 = sx3->GetChBk();
sx3ZFrac2 = sx3->GetZFrac();
TVector3 hitPos2 = sx3->GetHitPosWithSigma(sigmaSX3_W, sigmaSX3_L);
sx3X2 = hitPos2.X();
sx3Y2 = hitPos2.Y();
sx3Z2 = hitPos2.Z();
pw->CalTrack(hitPos2, anodeID2[0], cathodeID2[0], false);
reTheta2 = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi2 = pw->GetTrackPhi() * TMath::RadToDeg();
pw->CalTrack2(hitPos2, hitInfo2, sigmaPW_A, sigmaPW_C, false);
reTheta12 = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi12 = pw->GetTrackPhi() * TMath::RadToDeg();
z02 = pw->GetZ0();
}
KEA2 = KEA;
thetaCM2 = thetaCM;
phiCM2 = phiCM;
ExAID2 = ExAID;
ExA2 = ExA;
ExID2 = ExID;
Ex2 = Ex;
vertexX2 = vertexX;
vertexY2 = vertexY;
vertexZ2 = vertexZ;
qqqX = TMath::QuietNaN();
qqqY = TMath::QuietNaN();
qqqZ = TMath::QuietNaN();
tree2->Fill();
}else if (false){//(qqqID >= 0){
// handle QQQ hit case
sx3Up = -1; sx3Up = -1;
sx3Dn = -1; sx3Dn = -1;
sx3Bk = -1; sx3Bk = -1;
@ -233,23 +564,96 @@ int main(int argc, char **argv){
sx3Y = TMath::QuietNaN(); sx3Y = TMath::QuietNaN();
sx3Z = TMath::QuietNaN(); sx3Z = TMath::QuietNaN();
// for( int i = 0; i < 12; i++){ reTheta = TMath::QuietNaN();
// sx3Index[i] = -1; rePhi = TMath::QuietNaN();
// } reTheta1 = TMath::QuietNaN();
rePhi1 = TMath::QuietNaN();
z0 = TMath::QuietNaN();
qqqTb = Tb; // for simplicity, using the same kinetic energy for QQQ hit events, can be modified to simulate energy loss if desired
qqqTB = TB;
Tb = TMath::QuietNaN(); // mark kinetic energy as invalid for SX3 hit case
TB = TMath::QuietNaN();
TVector3 hitPos = qqq->GetHitPos();
qqqX = hitPos.X();
qqqY = hitPos.Y();
qqqZ = hitPos.Z();
if(enableVis){
visTrackVertex.push_back(vertex);
visTrackDir.push_back(dir);
visTrackHitPos.push_back(hitPos);
//visTrackWires.push_back({anodeID[0], cathodeID[0]});
}
tree1->Fill();
TVector3 dir2(1, 0, 0);
dir2.SetTheta(thetab2 * TMath::DegToRad());
dir2.SetPhi(phib2 * TMath::DegToRad());
qqq->FindQQQPos(vertex, dir2, false);
if(qqqID2 < 0){
qqqID2 = -1;
qqqX2 = TMath::QuietNaN();
qqqY2 = TMath::QuietNaN();
qqqZ2 = TMath::QuietNaN();
anodeDist2[0] = TMath::QuietNaN();
cathodeDist2[0] = TMath::QuietNaN();
reTheta2 = TMath::QuietNaN();
rePhi2 = TMath::QuietNaN();
reTheta12 = TMath::QuietNaN();
rePhi12 = TMath::QuietNaN();
z02 = TMath::QuietNaN();
anodeID2[0] = TMath::QuietNaN(); // no valid anode wire for QQQ hit case
cathodeID2[0] = TMath::QuietNaN(); // no valid cathode wire for QQQ hit case
anodeID2[1] = TMath::QuietNaN(); // no valid next nearest anode wire for QQQ hit case
cathodeID2[1] = TMath::QuietNaN(); // no valid next nearest cathode wire for QQQ hit case
anodeDist2[1] = TMath::QuietNaN();
cathodeDist2[1] = TMath::QuietNaN();
}
KEA2 = KEA;
thetaCM2 = thetaCM;
phiCM2 = phiCM;
ExAID2 = ExAID;
ExA2 = ExA;
ExID2 = ExID;
Ex2 = Ex;
vertexX2 = vertexX;
vertexY2 = vertexY;
vertexZ2 = vertexZ;
tree2->Fill();
}else{
// no valid SX3 hit: mark clearly invalid
sx3Up = -1;
sx3Dn = -1;
sx3Bk = -1;
sx3ZFrac = TMath::QuietNaN();
sx3X = TMath::QuietNaN();
sx3Y = TMath::QuietNaN();
sx3Z = TMath::QuietNaN();
reTheta = TMath::QuietNaN(); reTheta = TMath::QuietNaN();
rePhi = TMath::QuietNaN(); rePhi = TMath::QuietNaN();
reTheta1 = TMath::QuietNaN(); reTheta1 = TMath::QuietNaN();
rePhi1 = TMath::QuietNaN(); rePhi1 = TMath::QuietNaN();
z0 = TMath::QuietNaN(); z0 = TMath::QuietNaN();
Tb = TMath::QuietNaN(); // mark kinetic energy as invalid for no hit case
TB = TMath::QuietNaN();
// fill tree with original data (no energy loss for these events)
//comment out tree fill for no hit case
//tree1->Fill();
} }
tree->Fill();
//#################################################################### Timer //#################################################################### Timer
// measure elapsed real time and print progress roughly every 10 sec
clock.Stop("timer"); clock.Stop("timer");
Double_t time = clock.GetRealTime("timer"); Double_t time = clock.GetRealTime("timer");
clock.Start("timer"); clock.Start("timer");
@ -267,14 +671,76 @@ int main(int argc, char **argv){
} }
tree->Write(); // write results to ROOT file and close
int count = tree->GetEntries(); tree1->Write("", TObject::kOverwrite);
tree2->Write("", TObject::kOverwrite);
int count1 = tree1->GetEntries();
int count2 = tree2->GetEntries();
saveFile->Close(); saveFile->Close();
printf("=============== done. saved as %s. count(hit==1) : %d\n", saveFileName.Data(), count); printf("=============== done. saved as %s. tree1 entries: %d, tree2 entries: %d\n", saveFileName.Data(), count1, count2);
if(enableVis){ // to enable visualization, run with 3rd argument "vis", e.g. "./anasenMC 1000 vis"
printf("Displaying geometry with %zu tracks from simulation\n", visTrackVertex.size());
// Build full geometry with all wires
anasen->DrawAnasen(0, 23, 0, 23, -1, true);
// Add all stored tracks to the geometry
TGeoManager *geom = anasen->GetGeoManager();
TGeoVolume *worldBox = anasen->GetWorldBox();
if(geom && worldBox && visTrackVertex.size() > 0){
int trackNodeID = 500; // start node IDs for tracks
for(size_t iTrack = 0; iTrack < visTrackVertex.size(); ++iTrack){
TVector3 vertex = visTrackVertex[iTrack];
TVector3 dir = visTrackDir[iTrack];
TVector3 hitPos = visTrackHitPos[iTrack];
double theta = dir.Theta() * TMath::RadToDeg();
double phi = dir.Phi() * TMath::RadToDeg();
// Add a line marker at the vertex
TGeoVolume *startMarker = geom->MakeSphere("startMarker", 0, 0, 2.0);
startMarker->SetLineColor(kBlack);
worldBox->AddNode(startMarker, trackNodeID,
new TGeoCombiTrans(vertex.X(), vertex.Y(), vertex.Z(),
new TGeoRotation("rot", 0, 0, 0)));
trackNodeID++;
// Add track line from vertex toward hit position
TGeoVolume *trackLine = geom->MakeTube("trackLine", 0, 0, 0.08, 150.0);
trackLine->SetLineColor(kBlue);
worldBox->AddNode(trackLine, trackNodeID,
new TGeoCombiTrans(vertex.X(), vertex.Y(), vertex.Z(),
new TGeoRotation("rotTrack", phi + 90, theta, 0)));
trackNodeID++;
// Add hit position marker
TGeoVolume *hitMarker = geom->MakeSphere("hitMarker", 0, 0, 2.0);
hitMarker->SetLineColor(kRed);
worldBox->AddNode(hitMarker, trackNodeID,
new TGeoCombiTrans(hitPos.X(), hitPos.Y(), hitPos.Z(),
new TGeoRotation("rotHit", 0, 0, 0)));
trackNodeID++;
}
// Redraw geometry with all tracks
geom->CloseGeometry();
geom->SetVisLevel(4);
worldBox->Draw("ogle");
}
if(app){
printf("Entering ROOT event loop\n");
app->Run();
}
}
delete anasen; delete anasen;
return 0; return 0;
} }

178
Armory/histcomp.C Normal file
View File

@ -0,0 +1,178 @@
void histcomp() {
gROOT->SetBatch(kTRUE);
// Open file
TFile *f = new TFile("SimAnasen1.root");
// Get trees (MAKE SURE names are correct)
TTree *tree1 = (TTree*)f->Get("tree");
TTree *tree2 = (TTree*)f->Get("tree2");
if (!tree1 || !tree2) {
printf("Error: could not find trees. Check names!\n");
return;
}
// Create output directory (overwrite-safe)
gSystem->Exec("mkdir -p plots");
// Get list of branches
TObjArray *branches = tree1->GetListOfBranches();
int nBranches = branches->GetEntries();
//int nBranches = 1;
// Loop over branches
for (int i = 0; i < nBranches; i++) {
TBranch *br = (TBranch*)branches->At(i);
TString name = br->GetName();
//printf("Processing branch: %s\n", name.Data());
// Create histograms (auto-range using Draw first)
TString h1name = "h1_" + name;
TString h2name = "h2_" + name;
// Temporary draw to get range
double min, max;
if(name == "T"){
//Get minimum value of T[0] and use as min
min = tree2->GetMinimum("Tb");
max = tree1->GetMaximum("TB");
}else{
tree1->Draw(name, "", "goff");
min = fmin(tree1->GetMinimum(name),
tree2->GetMinimum(name));
max = fmax(tree1->GetMaximum(name),
tree2->GetMaximum(name));
}
//if (min == max) continue; // skip constant branches
// Expand range slightly
double margin = 0.1 * (max - min);
min -= margin;
max += margin;
TH1D *h1 = new TH1D(h1name, name, 100, min, max);
TH1D *h2 = new TH1D(h2name, name, 100, min, max);
// Fill histograms
if(name == "T"){
// Fill both array elements into same histogram
tree1->Draw("Tb>>+" + h1name, "", "goff");
tree1->Draw("TB>>+" + h1name, "", "goff");
tree2->Draw("Tb>>+" + h2name, "", "goff");
tree2->Draw("TB>>+" + h2name, "", "goff");
}else{
tree1->Draw(name + ">>" + h1name, "", "goff");
tree2->Draw(name + ">>" + h2name, "", "goff");
}
// Style
h1->SetLineColor(kRed);
h1->SetLineWidth(2);
h2->SetLineColor(kBlue);
h2->SetLineWidth(2);
// Normalize (optional but useful)
//if (h1->GetEntries() > 0) h1->Scale(1.0 / h1->GetEntries());
//if (h2->GetEntries() > 0) h2->Scale(1.0 / h2->GetEntries());
// Canvas
TCanvas *c = new TCanvas("c", name, 900, 600); //arguments are (name, title, width, height)
c->SetRightMargin(0.18);
c->Modified();
c->Update();
h1->SetTitle(name + ";"+name+";Counts");
h1->Draw("HIST");
h2->Draw("HIST SAME");
gPad->Update();
TPaveStats *st = (TPaveStats*)h1->FindObject("stats");
st->SetX1NDC(0.85); // New X start (left)
st->SetY1NDC(0.5); // New Y start (bottom)
st->SetX2NDC(0.98); // New X end (right)
st->SetY2NDC(0.8); // New Y end (top)
st->Draw();
gPad->Modified();
gPad->Update();
// Legend
TLegend *leg = new TLegend(0.65 + .2,0.75 + .1,0.88 + .1,0.88 + .1);
leg->AddEntry(h1, "tree1", "l");
leg->AddEntry(h2, "tree2", "l");
leg->Draw();
//to plot both as one histogram in root, can use tree2->Draw("T(0)"); for light particle and tree2->Draw("T(1)") for heavy particle
// Save plot (overwrite each run)
TString filename = "plots/" + name + ".png";
c->SaveAs(filename);
// Optional: save log plots as well
if (false) { // set to True to also save log plots
c->SetLogy(1);
h1->SetTitle(name + " (log);"+name+";Counts");
c->SaveAs("plots/" + name + "_logy.png");
c->SetLogy(0);
c->SetLogx(1);
h1->SetTitle(name + " (log);"+name+";Counts");
c->SaveAs("plots/" + name + "_logx.png");
// Clean up
delete c;
delete h1;
delete h2;
}
}
// dEb on y, SX3z on x
TH2D *h2d = new TH2D("h2d", "dEb vs SX3z;SX3z (cm);dEb (MeV)", 500, tree2->GetMinimum("sx3Z"), tree2->GetMaximum("sx3Z"), 500, tree2->GetMinimum("dEb"), tree2->GetMaximum("dEb")); //arguments are (name, title, xbins, xlow, xup, ybins, ylow, yup)
tree2->Draw("dEb:sx3Z>>h2d", "", "goff"); // arguments are "y:x>>histogram", "selection", "options"
TCanvas *c2d = new TCanvas("c2d", "dEb vs SX3z", 900, 600);
h2d->Draw("COLZ");
c2d->SaveAs("plots/dEb_vs_SX3z.png");
TH2D *h2z = new TH2D("h2z", "dEb vs z0", 500, tree2->GetMinimum("z0"), tree2->GetMaximum("z0"), 500, tree2->GetMinimum("dEb"), tree2->GetMaximum("dEb"));
tree2->Draw("dEb:z0>>h2z", "", "goff"); // arguments are "y:x>>histogram", "selection", "options"
TCanvas *c2z = new TCanvas("c2z", "dEb vs z0", 900, 600);
h2z->Draw("COLZ");
c2z->SaveAs("plots/dEb_vs_z0.png");
TH2D *h2theta = new TH2D("h2theta", "dEb vs reTheta", 500, tree2->GetMinimum("reTheta"), tree2->GetMaximum("reTheta"), 500, tree2->GetMinimum("dEb"), tree2->GetMaximum("dEb"));
tree2->Draw("dEb:reTheta>>h2theta", "", "goff"); // arguments are "y:x>>histogram", "selection", "options"
TCanvas *c2theta = new TCanvas("c2theta", "dEb vs reTheta", 900, 600);
h2theta->Draw("COLZ");
c2theta->SaveAs("plots/dEb_vs_reTheta.png");
TH2D *h2phi = new TH2D("h2phi", "dEb vs rePhi", 500, tree2->GetMinimum("rePhi"), tree2->GetMaximum("rePhi"), 500, tree2->GetMinimum("dEb"), tree2->GetMaximum("dEb"));
tree2->Draw("dEb:rePhi>>h2phi", "", "goff"); // arguments are "y:x>>histogram", "selection", "options"
TCanvas *c2phi = new TCanvas("c2phi", "dEb vs rePhi", 900, 600);
h2phi->Draw("COLZ");
c2phi->SaveAs("plots/dEb_vs_rePhi.png");
TH2D *h2dE = new TH2D("h2dE", "dEb vs Tb", 500, tree2->GetMinimum("Tb"), tree2->GetMaximum("Tb"), 500, tree2->GetMinimum("dEb"), tree2->GetMaximum("dEb"));
tree2->Draw("dEb:Tb>>h2dE", "", "goff"); // arguments are "y:x>>histogram", "selection", "options"
TCanvas *c2dE = new TCanvas("c2dE", "dEb vs Tb", 900, 600);
h2dE->Draw("COLZ");
c2dE->SaveAs("plots/dEb_vs_Tb.png");
printf("Done! Plots saved in ./plots/\n");
}

56
Armory/macro.h Normal file
View 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

File diff suppressed because it is too large Load Diff

4
Armory/run_script.C Normal file
View File

@ -0,0 +1,4 @@
.L ANASEN_model.C
.L anasenMS_root.cpp+
ANASEN_model();
Run(10);

61
Armory/vis_helpers.h Normal file
View File

@ -0,0 +1,61 @@
#ifndef VIS_HELPERS_H
#define VIS_HELPERS_H
#include <TSystem.h>
#include <TEvePointSet.h>
#include <TTree.h>
#include <vector>
#include <mutex>
static TEvePointSet* gVisPts = nullptr;
static std::mutex gVisMutex;
// Recommended: call once after opening TEve and adding a point set to gEve
inline void SetVisPointSet(TEvePointSet* pts) { gVisPts = pts; }
inline void UpdateVisPointSet(const std::vector<double>& x,
const std::vector<double>& y,
const std::vector<double>& z)
{
if(!gVisPts) return;
std::lock_guard<std::mutex> lk(gVisMutex);
gVisPts->Reset();
size_t n = std::min({x.size(), y.size(), z.size()});
for(size_t i=0; i<n; ++i) gVisPts->SetNextPoint(x[i], y[i], z[i]);
if(gEve) {
gEve->Redraw3D();
gSystem->ProcessEvents();
}
}
// Fill a tree with pointlists (one entry per event); must have branches defined once by caller
inline void RecordTreeXYZ(TTree* outTree,
const std::vector<double>& x,
const std::vector<double>& y,
const std::vector<double>& z)
{
if(!outTree) return;
static std::vector<double> tx, ty, tz;
tx = x;
ty = y;
tz = z;
if(outTree->GetBranch("x") == nullptr) outTree->Branch("x", &tx);
if(outTree->GetBranch("y") == nullptr) outTree->Branch("y", &ty);
if(outTree->GetBranch("z") == nullptr) outTree->Branch("z", &tz);
// Do NOT call SetBranchAddress() for the branch we are filling.
outTree->Fill();
outTree->GetCurrentFile()->Flush();
}
inline void PushEventAndRecord(const std::vector<double>& x,
const std::vector<double>& y,
const std::vector<double>& z,
TTree* outTree = nullptr)
{
if(outTree) RecordTreeXYZ(outTree, x, y, z);
UpdateVisPointSet(x,y,z);
}
#endif // VIS_HELPERS_H

BIN
Armory/vis_inproc Executable file

Binary file not shown.

65
Armory/vis_inproc.cpp Normal file
View File

@ -0,0 +1,65 @@
//In-ROOT sim data
// vis_inproc.cpp
#include <TApplication.h>
#include <TGeoManager.h>
#include <TEveManager.h>
#include <TEvePointSet.h>
#include <TSystem.h>
#include <TRandom3.h>
#include <thread>
#include <chrono>
#include <vector>
#include <iostream>
void runSimulationAndUpdate(TEvePointSet* pts){
TRandom3 rnd(0);
for(int ev=0; ev<10000; ++ev){
pts->Reset();
int n = 100;
for(int i=0;i<n;++i){
double x = rnd.Uniform(-50,50);
double y = rnd.Uniform(-50,50);
double z = rnd.Uniform(-50,50);
pts->SetNextPoint(x,y,z);
}
gEve->Redraw3D();
gSystem->ProcessEvents();
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}
void StartVis(const char* geomfile=nullptr){
int argc=0; char** argv=nullptr;
TApplication app("app",&argc,argv);
if(geomfile) TGeoManager::Import(geomfile);
TEveManager::Create();
TEvePointSet *pts = new TEvePointSet("hits");
gEve->AddElement(pts);
// runSimulationAndUpdate(pts); // or leave update API to caller
app.Run();
}
int main(int argc, char** argv){
TApplication app("app",&argc,argv);
if(argc>1) TGeoManager::Import(argv[1]);
TEveManager::Create();
TEvePointSet *pts = new TEvePointSet("hits");
pts->SetMarkerStyle(20);
pts->SetMarkerSize(1.2);
pts->SetMarkerColor(kRed);
gEve->AddElement(pts);
// Option A: run simulation in same thread but yield to event loop inside the sim
runSimulationAndUpdate(pts);
// Option B: run sim in a separate thread (only if sim avoids ROOT globals)
// std::thread simThread(runSimulationAndUpdate, pts);
// simThread.detach();
app.Run();
return 0;
}

6
BatchProcess.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
#parallel -j 6 echo ./ProcessRun.sh {1} 2000 0 ::: {020..400}
#parallel --results log/log_{}.txt --ctag -j 6 ./ProcessRun.sh {1} 2000 0 ::: {020..400} # for 17F
parallel --results log/log_{}.txt --ctag -j 6 ./ProcessRun.sh {1} 2000 0 ::: {001..021}

270
Calibration.C Normal file
View File

@ -0,0 +1,270 @@
#define Calibration_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 Calibration::Begin(TTree * /*tree*/)
{
plotter = new HistPlotter("Calib.root", "TFILE");
// ----------------------- Load QQQ Gains
{
std::string filename = "qqq_GainMatch.txt";
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 Calibration::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 Calibration::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.txt");
if (!outFile.is_open())
{
std::cerr << "Error opening qqq_Calib.txt!" << std::endl;
return;
}
//----------------------------------------------------------------------
// 1. Create perchannel 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.txt\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
Calibration.h Normal file
View File

@ -0,0 +1,114 @@
#ifndef Calibration_h
#define Calibration_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <TSelector.h>
#include "Armory/ClassDet.h"
class Calibration : 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; //!
Calibration(TTree * /*tree*/ =0) : fChain(0) { }
virtual ~Calibration() { }
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(Calibration,0);
};
#endif
#ifdef Calibration_cxx
void Calibration::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 Calibration::Notify(){
return kTRUE;
}
void Calibration::SlaveBegin(TTree * /*tree*/){
TString option = GetOption();
}
void Calibration::SlaveTerminate(){
}
#endif // #ifdef Calibration_cxx

131
DetectorConstruction.cc Normal file
View File

@ -0,0 +1,131 @@
#include "DetectorConstruction.hh"
#include "G4RunManager.hh"
#include "G4NistManager.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4SystemOfUnits.hh"
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
DetectorConstruction::DetectorConstruction()
: G4VUserDetectorConstruction(),
fScoringVolume(nullptr)
{}
DetectorConstruction::~DetectorConstruction()
{}
G4VPhysicalVolume* DetectorConstruction::Construct()
{
// Get nist material manager
G4NistManager* nist = G4NistManager::Instance();
// Materials
G4Material* vacuum = nist->FindOrBuildMaterial("G4_Galactic");
G4Material* al = nist->FindOrBuildMaterial("G4_Al");
// World
G4double worldx = 200.*mm;
G4double worldy = 200.*mm;
G4double worldz = 200.*mm;
G4Box* solidWorld = new G4Box("World", worldx, worldy, worldz);
G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, vacuum, "World");
G4VPhysicalVolume* physWorld = new G4PVPlacement(0, G4ThreeVector(), logicWorld, "World", 0, false, 0, true);
// Axes (optional, for visualization)
G4Tubs* solidAxis = new G4Tubs("Axis", 0, 0.1*mm, 5.*mm, 0, 360*deg);
G4LogicalVolume* logicAxisX = new G4LogicalVolume(solidAxis, al, "AxisX");
G4LogicalVolume* logicAxisY = new G4LogicalVolume(solidAxis, al, "AxisY");
G4LogicalVolume* logicAxisZ = new G4LogicalVolume(solidAxis, al, "AxisZ");
G4RotationMatrix* rotX = new G4RotationMatrix();
rotX->rotateY(90*deg);
rotX->rotateZ(90*deg);
new G4PVPlacement(rotX, G4ThreeVector(5*mm, 0, 0), logicAxisX, "AxisX", logicWorld, false, 0);
G4RotationMatrix* rotY = new G4RotationMatrix();
rotY->rotateX(90*deg);
new G4PVPlacement(rotY, G4ThreeVector(0, 5*mm, 0), logicAxisY, "AxisY", logicWorld, false, 0);
new G4PVPlacement(0, G4ThreeVector(0, 0, 5*mm), logicAxisZ, "AxisZ", logicWorld, false, 0);
// ANASEN geometry
const int nWire = 24;
const int wireShift = 3;
const G4double zLen = 350.*mm;
const G4double radiusA = 38.*mm;
const G4double radiusC = 43.*mm;
G4double dAngle = wireShift * 2 * CLHEP::pi / nWire;
G4double radiusAnew = radiusA * cos(dAngle / 2.);
G4double wireALength = sqrt(zLen*zLen + pow(2 * radiusA * sin(dAngle/2.), 2));
G4double wireATheta = atan2(2 * radiusA * sin(dAngle / 2.), zLen);
G4Tubs* solidPC_A = new G4Tubs("PC_A", 0, 0.01*mm, wireALength/2., 0, 360*deg);
G4LogicalVolume* logicPC_A = new G4LogicalVolume(solidPC_A, al, "PC_A");
for(int i = 0; i < nWire; i++){
G4double phi = 2 * CLHEP::pi / nWire * i + dAngle / 2.;
G4ThreeVector pos(radiusAnew * cos(phi), radiusAnew * sin(phi), 0);
G4RotationMatrix* rot = new G4RotationMatrix();
rot->rotateZ(360./nWire * (i + wireShift/2.) * deg);
rot->rotateY(wireATheta);
new G4PVPlacement(rot, pos, logicPC_A, "PC_A", logicWorld, false, i);
}
G4double radiusCnew = radiusC * cos(dAngle / 2.);
G4double wireCLength = sqrt(zLen*zLen + pow(2 * radiusC * sin(dAngle/2.), 2));
G4double wireCTheta = atan2(2 * radiusC * sin(dAngle / 2.), zLen);
G4Tubs* solidPC_C = new G4Tubs("PC_C", 0, 0.01*mm, wireCLength/2., 0, 360*deg);
G4LogicalVolume* logicPC_C = new G4LogicalVolume(solidPC_C, al, "PC_C");
for(int i = 0; i < nWire; i++){
G4double phi = 2 * CLHEP::pi / nWire * i - dAngle/2.;
G4ThreeVector pos(radiusCnew * cos(phi), radiusCnew * sin(phi), 0);
G4RotationMatrix* rot = new G4RotationMatrix();
rot->rotateZ(360./nWire * (i - wireShift/2.) * deg);
rot->rotateY(-wireCTheta);
new G4PVPlacement(rot, pos, logicPC_C, "PC_C", logicWorld, false, i);
}
const int nSX3 = 12;
const G4double sx3Radius = 88.*mm;
const G4double sx3Width = 40.*mm;
const G4double sx3Length = 75.*mm;
const G4double sx3Gap = 5.*mm;
G4Box* solidSX3 = new G4Box("SX3", 0.1*mm, sx3Width/2., sx3Length/2.);
G4LogicalVolume* logicSX3 = new G4LogicalVolume(solidSX3, al, "SX3");
fScoringVolume = logicSX3;
for(int i = 0; i < nSX3; i++){
G4double phi = 2 * CLHEP::pi / nSX3 * (i + 0.5);
G4ThreeVector pos1(sx3Radius * cos(phi), sx3Radius * sin(phi), sx3Length/2. + sx3Gap);
G4RotationMatrix* rot1 = new G4RotationMatrix();
rot1->rotateZ(360./nSX3 * (i + 0.5) * deg);
new G4PVPlacement(rot1, pos1, logicSX3, "SX3_front", logicWorld, false, 2*i);
G4ThreeVector pos2(sx3Radius * cos(phi), sx3Radius * sin(phi), -sx3Length/2. - sx3Gap);
G4RotationMatrix* rot2 = new G4RotationMatrix();
rot2->rotateZ(360./nSX3 * (i + 0.5) * deg);
new G4PVPlacement(rot2, pos2, logicSX3, "SX3_back", logicWorld, false, 2*i+1);
}
const G4double qqqR1 = 50.*mm;
const G4double qqqR2 = 100.*mm;
G4Tubs* solidQQQ = new G4Tubs("QQQ", qqqR1, qqqR2, 0.5*mm, 5*deg, 85*deg);
G4LogicalVolume* logicQQQ = new G4LogicalVolume(solidQQQ, al, "QQQ");
for(int i = 0; i < 4; i++){
G4ThreeVector pos(0, 0, 100.*mm);
G4RotationMatrix* rot = new G4RotationMatrix();
rot->rotateZ(360./4 * i * deg);
new G4PVPlacement(rot, pos, logicQQQ, "QQQ", logicWorld, false, i);
}
return physWorld;
}

20
DetectorConstruction.hh Normal file
View File

@ -0,0 +1,20 @@
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
DetectorConstruction();
virtual ~DetectorConstruction();
virtual G4VPhysicalVolume* Construct();
G4LogicalVolume* GetScoringVolume() const { return fScoringVolume; }
private:
G4LogicalVolume* fScoringVolume;
};
#endif

BIN
ELoss/.DS_Store vendored Normal file

Binary file not shown.

BIN
ELoss/7MeVprotonbeam.zip Normal file

Binary file not shown.

BIN
ELoss/AlSi.zip Normal file

Binary file not shown.

131
ELoss/EXtable.py Normal file
View File

@ -0,0 +1,131 @@
import pycatima as catima
import numpy as np
import pandas as pd
from scipy.interpolate import interp1d
from scipy.integrate import cumulative_trapezoid
import matplotlib.pyplot as plt
# GAS SETUP
P_TORR = 400
TEMP_K = 293.15
R = 8.3144
# Gas density
p_pa = P_TORR * 133.322
molar_density = p_pa / (R * TEMP_K)
m_he = 4.0026
m_c = 12.0000
m_o = 15.9949
m_mix_avg = (0.96 * m_he) + (0.04 * (m_c + 2*m_o))
rho_g_cm3 = (molar_density * m_mix_avg) / 1e6
print(f"Gas density = {rho_g_cm3:.6e} g/cm^3")
# MATERIAL
material_def = [
(m_he, 2, 0.96),
(m_c, 6, 0.04),
(m_o, 8, 0.08)
]
gas_mix = catima.Material(material_def)
gas_mix.density(rho_g_cm3)
# FUNCTION
def make_E_vs_x(
z,
mass_u,
emax_mev,
label,
npoints=500
):
projectile = catima.Projectile(mass_u, z)
# Energy grid
E = np.linspace(0.01, emax_mev, npoints)
# Stopping power array
S_mass = np.zeros_like(E)
for i, energy in enumerate(E):
projectile.T(energy / mass_u)
# MeV / (g/cm^2)
S_mass[i] = catima.dedx(projectile, gas_mix)
# Convert to MeV/cm
S_linear = S_mass * rho_g_cm3
# Sort descending energy
sort_idx = np.argsort(E)[::-1]
E = E[sort_idx]
S_linear = S_linear[sort_idx]
# Integrate dx/dE = 1/S(E)
invS = 1.0 / S_linear
x = cumulative_trapezoid(
invS,
E,
initial=0
)
x = -x
# Output table
output = pd.DataFrame({
"Distance_cm": x,
"Energy_MeV": E
})
outfile = f"E_vs_x_{label}.dat"
output.to_csv(
outfile,
sep='\t',
index=False
)
print(f"Saved: {outfile}")
return x, E
# RUN
#proton parameters: z=1, mass_u=1.0078, emax_mev=20
#alpha parameters: z=2, mass_u=4.0026, emax_mev=40
x, E = make_E_vs_x(
z=1,
mass_u=1.0078,
emax_mev=20,
label="proton"
)
x, E = make_E_vs_x(
z=2,
mass_u=4.0026,
emax_mev=40,
label="alpha"
)
# PLOT
plt.figure(figsize=(8,6))
plt.plot(x, E)
plt.xlabel("Distance in Gas (cm)")
plt.ylabel("Energy (MeV)")
plt.title("Energy Loss Curve")
plt.grid(True)
plt.show()
#gives data in units of Energy (MeV) and Distance (cm). To convert to E(x), you can use the cumulative energy

248
ELoss/Eloss.cpp Normal file
View File

@ -0,0 +1,248 @@
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <map>
#include <cmath>
#include <memory>
#include <sstream>
#include <algorithm>
#include <filesystem>
// ROOT
#include "TFile.h"
#include "TTree.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TCanvas.h"
// Catima
#include <catima/catima.h>
using namespace std;
/* =========================
GLOBAL STRUCTURES
========================= */
struct Particle {
int z;
double mass_u;
double emax;
string name;
};
map<string, Particle> particles = {
{"alpha", {2, 4.0026, 40, "alpha"}},
{"proton", {1, 1.0078, 20, "proton"}},
{"deuteron", {1, 2.0141, 30, "deuteron"}}
};
/* =========================
INTERPOLATION STORAGE
========================= */
struct EnergyTable {
vector<double> x;
vector<double> E;
};
map<string, EnergyTable> table_cache;
/* Linear interpolation */
double interp(const vector<double>& x, const vector<double>& y, double xi) {
if (xi <= x.front()) return y.front();
if (xi >= x.back()) return y.back();
auto it = upper_bound(x.begin(), x.end(), xi);
int i = distance(x.begin(), it) - 1;
double x0 = x[i], x1 = x[i+1];
double y0 = y[i], y1 = y[i+1];
return y0 + (y1 - y0) * (xi - x0) / (x1 - x0);
}
/* =========================
ENERGY TABLE GENERATION
========================= */
void make_E_vs_x(int z, double mass_u, double emax, string label, int npoints, double P_torr, double T) {
double R = 8.3144;
double p_pa = P_torr * 133.322;
double molar_density = p_pa / (R * T);
double m_he = 4.0026;
double m_c = 12.0;
double m_o = 15.9949;
double m_mix = 0.96*m_he + 0.04*(m_c + 2*m_o);
double rho = (molar_density * m_mix) / 1e6;
catima::Material gas({
{m_he, 2, 0.96},
{m_c, 6, 0.04},
{m_o, 8, 0.08}
});
gas.density(rho);
catima::Projectile proj(mass_u, z);
vector<double> E(npoints);
vector<double> S(npoints);
for (int i = 0; i < npoints; i++) {
E[i] = 0.01 + i * (emax / npoints);
proj.T(E[i] / mass_u);
S[i] = catima::dedx(proj, gas) * rho;
}
reverse(E.begin(), E.end());
reverse(S.begin(), S.end());
vector<double> x(npoints, 0.0);
for (int i = 1; i < npoints; i++) {
double invS = 1.0 / S[i];
x[i] = x[i-1] + 0.5 * (invS + 1.0/S[i-1]) * (E[i] - E[i-1]);
}
ofstream out("E_vs_x_" + label + ".dat");
for (int i = 0; i < npoints; i++) {
out << x[i] << "\t" << E[i] << "\n";
}
cout << "Saved E_vs_x_" << label << ".dat\n";
}
/* =========================
LOAD TABLE
========================= */
EnergyTable load_table(string fname) {
EnergyTable t;
ifstream in(fname);
double x, E;
while (in >> x >> E) {
t.x.push_back(x);
t.E.push_back(E);
}
return t;
}
/* =========================
GET TABLE
========================= */
EnergyTable& get_table(string particle) {
if (!table_cache.count(particle)) {
table_cache[particle] = load_table("E_vs_x_" + particle + ".dat");
}
return table_cache[particle];
}
/* =========================
ENERGY FUNCTIONS
========================= */
double energy_loss(string p, double Ei, double dx) {
auto &t = get_table(p);
double xi = interp(t.E, t.x, Ei);
double xf = xi + dx;
double Ef = interp(t.x, t.E, xf);
return max(Ef, 0.0);
}
double energy_reconstruction(string p, double Ef, double dx) {
auto &t = get_table(p);
double xf = interp(t.E, t.x, Ef);
double xi = xf - dx;
double Ei = interp(t.x, t.E, xi);
return max(Ei, 0.0);
}
double energy_distance(string p, double Ei, double Ef) {
auto &t = get_table(p);
double xi = interp(t.E, t.x, Ei);
double xf = interp(t.E, t.x, Ef);
return fabs(xf - xi);
}
/* =========================
ROOT FILE ANALYSIS
========================= */
void process_file(string filename) {
TFile f(filename.c_str());
TTree *tree = (TTree*)f.Get("tree");
double Tb, thetab, sx3Z;
tree->SetBranchAddress("Tb", &Tb);
tree->SetBranchAddress("thetab", &thetab);
tree->SetBranchAddress("sx3Z", &sx3Z);
vector<double> Ei, theta, sx3;
Long64_t n = tree->GetEntries();
for (Long64_t i = 0; i < n; i++) {
tree->GetEntry(i);
double th = thetab * M_PI / 180.0;
if (sin(th) == 0) continue;
Ei.push_back(Tb);
theta.push_back(th);
sx3.push_back(sx3Z);
}
cout << "Processed " << Ei.size() << " events\n";
}
/* =========================
MAIN CLI (simplified)
========================= */
int main() {
string cmd;
cout << "C++ PCEnergy Shell\n";
while (true) {
cout << ">> ";
getline(cin, cmd);
if (cmd == "exit") break;
if (cmd.rfind("make table", 0) == 0) {
string name = cmd.substr(11);
auto p = particles[name];
make_E_vs_x(p.z, p.mass_u, p.emax, p.name, 500, 400, 293.15);
}
else if (cmd.rfind("energy loss", 0) == 0) {
cout << "Use API call version in compiled mode\n";
}
else {
cout << "Unknown command\n";
}
}
return 0;
}

121
ELoss/Eloss_HeAlpha Normal file
View File

@ -0,0 +1,121 @@
1.00E-03 3.82E+02
1.50E-03 3.68E+02
2.00E-03 3.60E+02
2.50E-03 3.57E+02
3.00E-03 3.57E+02
4.00E-03 3.62E+02
5.00E-03 3.70E+02
6.00E-03 3.81E+02
7.00E-03 3.94E+02
8.00E-03 4.07E+02
9.00E-03 4.20E+02
1.00E-02 4.34E+02
1.25E-02 4.69E+02
1.50E-02 5.03E+02
1.75E-02 5.36E+02
2.00E-02 5.69E+02
2.25E-02 6.01E+02
2.50E-02 6.32E+02
2.75E-02 6.62E+02
3.00E-02 6.91E+02
3.50E-02 7.47E+02
4.00E-02 8.01E+02
4.50E-02 8.53E+02
5.00E-02 9.02E+02
5.50E-02 9.49E+02
6.00E-02 9.95E+02
6.50E-02 1.04E+03
7.00E-02 1.08E+03
7.50E-02 1.12E+03
8.00E-02 1.16E+03
8.50E-02 1.20E+03
9.00E-02 1.24E+03
9.50E-02 1.28E+03
1.00E-01 1.31E+03
1.25E-01 1.48E+03
1.50E-01 1.63E+03
1.75E-01 1.76E+03
2.00E-01 1.88E+03
2.25E-01 1.98E+03
2.50E-01 2.08E+03
2.75E-01 2.16E+03
3.00E-01 2.24E+03
3.50E-01 2.37E+03
4.00E-01 2.47E+03
4.50E-01 2.54E+03
5.00E-01 2.59E+03
5.50E-01 2.63E+03
6.00E-01 2.65E+03
6.50E-01 2.66E+03
7.00E-01 2.65E+03
7.50E-01 2.64E+03
8.00E-01 2.62E+03
8.50E-01 2.60E+03
9.00E-01 2.57E+03
9.50E-01 2.54E+03
1.00E+00 2.51E+03
1.25E+00 2.33E+03
1.50E+00 2.14E+03
1.75E+00 1.98E+03
2.00E+00 1.83E+03
2.25E+00 1.71E+03
2.50E+00 1.59E+03
2.75E+00 1.49E+03
3.00E+00 1.40E+03
3.50E+00 1.25E+03
4.00E+00 1.13E+03
4.50E+00 1.03E+03
5.00E+00 9.54E+02
5.50E+00 8.87E+02
6.00E+00 8.30E+02
6.50E+00 7.80E+02
7.00E+00 7.37E+02
7.50E+00 6.98E+02
8.00E+00 6.64E+02
8.50E+00 6.33E+02
9.00E+00 6.06E+02
9.50E+00 5.80E+02
1.00E+01 5.57E+02
1.25E+01 4.67E+02
1.50E+01 4.04E+02
1.75E+01 3.56E+02
2.00E+01 3.20E+02
2.50E+01 2.67E+02
2.75E+01 2.47E+02
3.00E+01 2.30E+02
3.50E+01 2.02E+02
4.00E+01 1.81E+02
4.50E+01 1.65E+02
5.00E+01 1.51E+02
5.50E+01 1.39E+02
6.00E+01 1.30E+02
6.50E+01 1.21E+02
7.00E+01 1.14E+02
7.50E+01 1.08E+02
8.00E+01 1.02E+02
8.50E+01 9.72E+01
9.00E+01 9.27E+01
9.50E+01 8.86E+01
1.00E+02 8.50E+01
1.25E+02 7.07E+01
1.50E+02 6.09E+01
1.75E+02 5.37E+01
2.00E+02 4.82E+01
2.25E+02 4.39E+01
2.50E+02 4.04E+01
2.75E+02 3.74E+01
3.00E+02 3.50E+01
3.50E+02 3.11E+01
4.00E+02 2.81E+01
4.50E+02 2.57E+01
5.00E+02 2.38E+01
5.50E+02 2.22E+01
6.00E+02 2.09E+01
6.50E+02 1.98E+01
7.00E+02 1.88E+01
7.50E+02 1.80E+01
8.00E+02 1.72E+01
8.50E+02 1.66E+01
9.00E+02 1.60E+01
9.50E+02 1.55E+01
1.00E+03 1.50E+01

1000
ELoss/Eloss_HeProton Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,133 @@
Distance_cm Energy_MeV
-0.0 10000.0
5389774.75443511 9000.0
10855647.976939568 8000.0
16399799.429078534 7000.0
22024503.893759202 6000.0
27746439.525929503 5000.0
33568523.97924803 4000.0
39479505.49998565 3000.0
42465232.64965547 2500.0
45458635.19045554 2000.0
48421801.341954604 1500.0
51264380.18730769 1000.0
51538310.854370475 950.0
51809056.07244193 900.0
52076066.51597537 850.0
52338857.31093465 800.0
52596975.52453359 750.0
52850042.63171125 700.0
53097197.84366988 650.0
53338197.88222988 600.0
53571964.718051545 550.0
53797134.59432279 500.0
54013123.12525151 450.0
54218488.681383975 400.0
54411632.1250669 350.0
54590900.82324512 300.0
54674749.274030656 275.0
54754256.7635274 250.0
54829072.96640371 225.0
54898883.947833 200.0
54963248.91418915 175.0
55021660.73144465 150.0
55073591.66506018 125.0
55118462.172014125 100.0
55126542.009983145 95.0
55134303.789901204 90.0
55141742.9111429 85.0
55148854.714513645 80.0
55155631.22054315 75.0
55162063.40008629 70.0
55168143.093377516 65.0
55173859.24063356 60.0
55179217.07482415 55.0
55184209.24504438 50.0
55188808.61217146 45.0
55193010.79257213 40.0
55196805.62161694 35.0
55200176.011313476 30.0
55201698.2656194 27.5
55203109.909383446 25.0
55205596.537658684 20.0
55206667.294212274 17.5
55207618.48544631 15.0
55208446.88368818 12.5
55209148.32167941 10.0
55209272.99713796 9.5
55209392.30237793 9.0
55209506.23213812 8.5
55209614.84207803 8.0
55209718.062790126 7.5
55209815.742544316 7.0
55209907.85777273 6.5
55209994.36717252 6.0
55210075.180298805 5.5
55210150.22437268 5.0
55210219.4022728 4.5
55210282.630938694 4.0
55210339.8877284 3.5
55210391.020879395 3.0
55210414.18692252 2.75
55210435.72461827 2.5
55210455.64593725 2.25
55210473.89066913 2.0
55210490.431652516 1.75
55210505.225633934 1.5
55210518.22121416 1.25
55210529.400417954 1.0
55210531.41404439 0.95
55210533.35055263 0.9
55210535.20681682 0.85
55210536.98353343 0.8
55210538.682475016 0.75
55210540.30109701 0.7
55210541.836545736 0.65
55210543.287729986 0.6
55210544.65540986 0.55
55210545.937436916 0.5
55210547.13151188 0.45
55210548.23633637 0.4
55210549.24931867 0.35
55210550.16842291 0.3
55210550.592340045 0.275
55210550.99210096 0.25
55210551.36786262 0.225
55210551.719991796 0.2
55210552.04937974 0.175
55210552.35762383 0.15
55210552.64763077 0.125
55210552.9230082 0.1
55210552.97653193 0.095
55210553.029809006 0.09
55210553.08284391 0.085
55210553.13563664 0.08
55210553.18842938 0.075
55210553.24146428 0.07
55210553.294741355 0.065
55210553.348516345 0.06
55210553.40304525 0.055
55210553.45835695 0.05
55210553.51474285 0.045
55210553.57262797 0.04
55210553.63261063 0.035
55210553.695258826 0.03
55210553.727836125 0.0275
55210553.76145144 0.025
55210553.79627961 0.0225
55210553.832593 0.02
55210553.87069793 0.0175
55210553.911007315 0.015
55210553.954146795 0.0125
55210554.00104025 0.01
55210554.021164455 0.009
55210554.04239499 0.008
55210554.06492518 0.007
55210554.08902819 0.006
55210554.11508502 0.005
55210554.14362026 0.004
55210554.17551789 0.003
55210554.19311401 0.0025
55210554.21218867 0.002
55210554.23317281 0.0015
55210554.25667492 0.001

View File

@ -0,0 +1,122 @@
Distance_cm Energy_MeV
-0.0 1000.0
38090.24265357861 950.0
74970.65178025051 900.0
110609.72374756227 850.0
144982.69086113444 800.0
177995.20260308465 750.0
209570.9996173871 700.0
239680.33175059053 650.0
268237.80575094 600.0
295209.9123122635 550.0
320489.19563622813 500.0
343987.25387062563 450.0
365618.4078917277 400.0
385287.841529391 350.0
402920.17875570967 300.0
410949.998222299 275.0
418425.3819566142 250.0
425326.008920567 225.0
431645.1046300599 200.0
437360.67691461876 175.0
442448.12394963385 150.0
446885.4980521254 125.0
450646.96400049457 100.0
451316.28419787926 95.0
451957.2298491922 90.0
452569.1796854077 85.0
453152.5707252523 80.0
453706.0893323338 75.0
454229.64302234026 70.0
454724.311798022 65.0
455187.63266045594 60.0
455619.87866210006 55.0
456021.06220334885 50.0
456389.32941057585 45.0
456725.72511147766 40.0
457029.88762390387 35.0
457299.87371961994 30.0
457421.77280618943 27.5
457534.9246840642 25.0
457734.41127965244 20.0
457820.5609423128 17.5
457897.27749702823 15.0
457964.30094574887 12.5
458021.45338128274 10.0
458031.67251620576 9.5
458041.47014381184 9.0
458050.8486102679 8.5
458059.8085490814 8.0
458068.3413273997 7.5
458076.4409698491 7.0
458084.1032909443 6.5
458091.3241694552 6.0
458098.0959899924 5.5
458104.41310307384 5.0
458110.2757390081 4.5
458115.6643265186 4.0
458120.5567648235 3.5
458124.953645527 3.0
458126.96500826493 2.75
458128.85245274403 2.5
458130.6145406349 2.25
458132.256880079 2.0
458133.7834459798 1.75
458135.1950897439 1.5
458136.4965912958 1.25
458137.69808799133 1.0
458137.92808426364 0.95
458138.15537980536 0.9
458138.38003730914 0.85
458138.60253869527 0.8
458138.8233480066 0.75
458139.04290270153 0.7
458139.2616304426 0.65
458139.4803581836 0.6
458139.700331072 0.55
458139.9228422575 0.5
458140.1492653625 0.45
458140.3811350161 0.4
458140.6212044783 0.35
458140.8733442866 0.3
458141.0053697707 0.275
458141.1423808325 0.25
458141.2855021647 0.225
458141.43604882533 0.2
458141.5957608915 0.175
458141.76731704 0.15
458141.9544791492 0.125
458142.1633982047 0.1
458142.2082474724 0.095
458142.2543479838 0.09
458142.3019607871 0.085
458142.3511884961 0.08
458142.40214453876 0.075
458142.4549547324 0.07
458142.5097591571 0.065
458142.56686030654 0.06
458142.6266386429 0.055
458142.6894257576 0.05
458142.7556563149 0.045
458142.82594587334 0.04
458142.9010657205 0.035
458142.9819561412 0.03
458143.0248967919 0.0275
458143.06979883165 0.025
458143.1169267642 0.0225
458143.16659811663 0.02
458143.21919888444 0.0175
458143.27514753735 0.015
458143.3349655939 0.0125
458143.399372441 0.01
458143.4265797572 0.009
458143.454674733 0.008
458143.4836821286 0.007
458143.51366321446 0.006
458143.54460034927 0.005
458143.5763374784 0.004
458143.6086461392 0.003
458143.6249128085 0.0025
458143.6411117 0.002
458143.6570674755 0.0015
458143.67255874246 0.001

268
ELoss/Graveyard/Eloss_17F Normal file
View File

@ -0,0 +1,268 @@
0.017002095 0.00676442
0.03400419 0.0135288
0.085010476 0.032227
0.136016762 0.0489265
0.170020952 0.0592235
0.255031428 0.0823584
0.340041904 0.102374
0.42505238 0.120086
0.510062856 0.135943
0.595073332 0.150461
0.680083808 0.164011
0.765094284 0.176885
0.85010476 0.189282
0.935115236 0.201176
1.020125712 0.212518
1.190146664 0.233962
1.360167616 0.254045
1.530188568 0.27299
1.70020952 0.291072
2.040251424 0.325807
2.380293328 0.359536
2.720335232 0.392589
3.060377136 0.425159
3.40041904 0.457286
4.2505238 0.536817
5.10062856 0.615601
5.95073332 0.693052
6.80083808 0.769499
7.65094284 0.845324
8.5010476 0.920793
10.20125712 1.07377
11.90146664 1.23229
13.60167616 1.39414
15.30188568 1.55782
17.0020952 1.72459
21.252619 2.15811
25.5031428 2.61883
29.7536666 3.10864
34.0041904 3.62853
38.2547142 4.17854
42.505238 4.75843
51.0062856 6.00863
59.5073332 7.38089
68.0083808 8.87668
76.5094284 10.4957
85.010476 12.2377
93.5115236 14.1011
102.0125712 16.0845
110.5136188 18.1875
119.0146664 20.4097
127.515714 22.7505
136.0167616 25.2096
144.5178092 27.7867
153.0188568 30.4814
161.5199044 33.2935
170.020952 36.2195
187.0230472 42.214
204.0251424 48.6246
221.0272376 55.449
238.0293328 62.6845
255.031428 70.3284
272.0335232 78.3781
289.0356184 86.8308
306.0377136 95.684
323.0398088 104.935
340.041904 114.581
357.0439992 124.619
374.0460944 135.048
391.0481896 145.863
408.0502848 157.064
425.05238 168.647
459.0565704 192.95
493.0607608 218.753
527.0649512 246.038
561.0691416 274.787
595.073332 304.983
646.0796176 352.95
697.0859032 404.079
748.0921888 458.315
799.0984744 515.608
850.10476 575.909
935.115236 682.969
1020.125712 798.048
1105.136188 920.949
1190.146664 1051.49
1275.15714 1189.49
1360.167616 1334.78
1445.178092 1487.21
1530.188568 1646.62
1615.199044 1812.86
1700.20952 1985.8
1785.219996 2165.29
1870.230472 2351.2
1955.240948 2543.42
2040.251424 2741.82
2125.2619 2946.27
2210.272376 3156.67
2295.282852 3372.91
2380.293328 3594.88
2465.303804 3822.47
2550.31428 4055.59
2635.324756 4294.14
2720.335232 4538.01
2805.345708 4787.13
2890.356184 5041.4
2975.36666 5300.73
3060.377136 5565.04
3145.387612 5834.24
3230.398088 6108.26
3315.408564 6387.01
3400.41904 6670.42
3570.439992 7250.92
3740.460944 7849.17
3910.481896 8464.62
4080.502848 9096.74
4250.5238 9745.02
4420.544752 10409
4590.565704 11088.2
4760.586656 11782.1
4930.607608 12490.4
5100.62856 13212.7
5270.649512 13948.5
5440.670464 14697.4
5610.691416 15459.2
5780.712368 16233.4
5950.73332 17019.7
6120.754272 17817.8
6290.775224 18627.3
6460.796176 19448
6630.817128 20279.6
6800.83808 21121.8
6970.859032 21974.2
7140.879984 22836.7
7310.900936 23709
7480.921888 24590.9
7650.94284 25482
7820.963792 26382.2
7990.984744 27291.2
8161.005696 28208.8
8331.026648 29134.9
8501.0476 30069.1
8841.089504 31961.3
9181.131408 33884
9521.173312 35835.8
9861.215216 37815.1
10201.25712 39820.8
10541.29902 41851.6
10881.34093 43906.4
11221.38283 45984.1
11561.42474 48083.6
11901.46664 50203.9
12241.50854 52344.2
12581.55045 54503.4
12921.59235 56680.8
13261.63426 58875.5
13601.67616 61086.7
13941.71806 63313.8
14281.75997 65556.1
14621.80187 67812.7
14961.84378 70083.2
15301.88568 72366.9
15641.92758 74663.1
15981.96949 76971.4
16322.01139 79291.2
16662.0533 81622
17002.0952 83963.3
17342.1371 86314.6
17682.17901 88675.4
18022.22091 91045.4
18362.26282 93424
18702.30472 95811
19042.34662 98205.9
19382.38853 100608
19722.43043 103018
20062.47234 105434
20402.51424 107857
20742.55614 110286
21082.59805 112721
21422.63995 115162
21762.68186 117608
22102.72376 120059
22442.76566 122514
22782.80757 124975
23122.84947 127439
23462.89138 129908
23802.93328 132380
24142.97518 134856
24483.01709 137335
24823.05899 139817
25163.1009 142303
25503.1428 144791
25843.1847 147281
26183.22661 149774
26523.26851 152270
26863.31042 154767
27203.35232 157266
27543.39422 159767
27883.43613 162270
28223.47803 164774
28563.51994 167279
28903.56184 169786
29753.6666 176056
30603.77136 182331
31453.87612 188609
32303.98088 194888
33154.08564 201166
34004.1904 207442
35704.39992 219984
37404.60944 232503
39104.81896 244992
40805.02848 257444
42505.238 269853
44205.44752 282214
45905.65704 294523
47605.86656 306775
49306.07608 318968
51006.2856 331099
54406.70464 355166
57807.12368 378963
61207.54272 402479
64607.96176 425709
68008.3808 448649
71408.79984 471298
74809.21888 493655
78209.63792 515723
81610.05696 537503
85010.476 558999
89260.9998 585475
93511.5236 611522
102012.5712 662361
110513.6188 711594
119014.6664 759299
127515.714 805555
136016.7616 850436
144517.8092 894016
153018.8568 936363
161519.9044 977541
170020.952 1.02E+06
187023.0472 1.09E+06
204025.1424 1.17E+06
221027.2376 1.24E+06
238029.3328 1.30E+06
255031.428 1.37E+06
272033.5232 1.43E+06
289035.6184 1.49E+06
306037.7136 1.54E+06
323039.8088 1.60E+06
340041.904 1.65E+06
357043.9992 1.70E+06
374046.0944 1.75E+06
391048.1896 1.80E+06
408050.2848 1.84E+06
425052.38 1.89E+06
442054.4752 1.93E+06
459056.5704 1.98E+06
476058.6656 2.02E+06
493060.7608 2.06E+06
510062.856 2.10E+06
544067.0464 2.17E+06
578071.2368 2.24E+06
612075.4272 2.31E+06
646079.6176 2.38E+06
680083.808 2.44E+06
714087.9984 2.50E+06
748092.1888 2.56E+06
782096.3792 2.61E+06
816100.5696 2.67E+06
850104.76 2.72E+06

268
ELoss/Graveyard/Eloss_27Al Normal file
View File

@ -0,0 +1,268 @@
0.026981539 1087.74
0.053963078 2175.49
0.134907695 5438.8
0.215852312 8557.19
0.26981539 10540.7
0.404723085 15079.2
0.53963078 19011.9
0.674538475 22467.9
0.80944617 25531.3
0.944353865 28303.5
1.07926156 30859.2
1.214169255 33253.7
1.34907695 35529.1
1.483984645 37685.6
1.61889234 39719.2
1.88870773 43505.2
2.15852312 46980.1
2.42833851 50199.6
2.6981539 53228.6
3.23778468 58941.2
3.77741546 64372.8
4.31704624 69606.4
4.85667702 74683.1
5.3963078 79618
6.74538475 91580.1
8.0944617 103093
9.44353865 114105
10.7926156 124746
12.14169255 135119
13.4907695 145269
16.1889234 165367
18.8870773 185754
21.5852312 206324
24.2833851 226926
26.981539 247688
33.72692375 300998
40.4723085 357029
47.21769325 416359
53.963078 478956
60.70846275 544719
67.4538475 613499
80.944617 759812
94.4353865 917732
107.926156 1.09E+06
121.4169255 1.27E+06
134.907695 1.46E+06
148.3984645 1.67E+06
161.889234 1.88E+06
175.3800035 2.11E+06
188.870773 2.35E+06
202.3615425 2.60E+06
215.852312 2.86E+06
229.3430815 3.13E+06
242.833851 3.41E+06
256.3246205 3.71E+06
269.81539 4.01E+06
296.796929 4.64E+06
323.778468 5.30E+06
350.760007 6.00E+06
377.741546 6.74E+06
404.723085 7.53E+06
431.704624 8.35E+06
458.686163 9.21E+06
485.667702 1.01E+07
512.649241 1.10E+07
539.63078 1.20E+07
566.612319 1.30E+07
593.593858 1.41E+07
620.575397 1.52E+07
647.556936 1.63E+07
674.538475 1.75E+07
728.501553 1.99E+07
782.464631 2.25E+07
836.427709 2.52E+07
890.390787 2.81E+07
944.353865 3.11E+07
1025.298482 3.59E+07
1106.243099 4.10E+07
1187.187716 4.64E+07
1268.132333 5.21E+07
1349.07695 5.81E+07
1483.984645 6.88E+07
1618.89234 8.02E+07
1753.800035 9.24E+07
1888.70773 1.05E+08
2023.615425 1.19E+08
2158.52312 1.34E+08
2293.430815 1.49E+08
2428.33851 1.65E+08
2563.246205 1.81E+08
2698.1539 1.98E+08
2833.061595 2.16E+08
2967.96929 2.35E+08
3102.876985 2.54E+08
3237.78468 2.73E+08
3372.692375 2.94E+08
3507.60007 3.15E+08
3642.507765 3.36E+08
3777.41546 3.58E+08
3912.323155 3.81E+08
4047.23085 4.04E+08
4182.138545 4.27E+08
4317.04624 4.52E+08
4451.953935 4.76E+08
4586.86163 5.02E+08
4721.769325 5.27E+08
4856.67702 5.54E+08
4991.584715 5.80E+08
5126.49241 6.08E+08
5261.400105 6.35E+08
5396.3078 6.64E+08
5666.12319 7.21E+08
5935.93858 7.81E+08
6205.75397 8.42E+08
6475.56936 9.04E+08
6745.38475 9.69E+08
7015.20014 1.03E+09
7285.01553 1.10E+09
7554.83092 1.17E+09
7824.64631 1.24E+09
8094.4617 1.31E+09
8364.27709 1.39E+09
8634.09248 1.46E+09
8903.90787 1.54E+09
9173.72326 1.61E+09
9443.53865 1.69E+09
9713.35404 1.77E+09
9983.16943 1.85E+09
10252.98482 1.93E+09
10522.80021 2.02E+09
10792.6156 2.10E+09
11062.43099 2.18E+09
11332.24638 2.27E+09
11602.06177 2.36E+09
11871.87716 2.44E+09
12141.69255 2.53E+09
12411.50794 2.62E+09
12681.32333 2.71E+09
12951.13872 2.80E+09
13220.95411 2.89E+09
13490.7695 2.99E+09
14030.40028 3.18E+09
14570.03106 3.37E+09
15109.66184 3.56E+09
15649.29262 3.76E+09
16188.9234 3.96E+09
16728.55418 4.16E+09
17268.18496 4.36E+09
17807.81574 4.57E+09
18347.44652 4.78E+09
18887.0773 4.99E+09
19426.70808 5.20E+09
19966.33886 5.41E+09
20505.96964 5.63E+09
21045.60042 5.85E+09
21585.2312 6.07E+09
22124.86198 6.29E+09
22664.49276 6.51E+09
23204.12354 6.74E+09
23743.75432 6.96E+09
24283.3851 7.19E+09
24823.01588 7.42E+09
25362.64666 7.65E+09
25902.27744 7.88E+09
26441.90822 8.11E+09
26981.539 8.34E+09
27521.16978 8.57E+09
28060.80056 8.81E+09
28600.43134 9.04E+09
29140.06212 9.28E+09
29679.6929 9.52E+09
30219.32368 9.75E+09
30758.95446 9.99E+09
31298.58524 1.02E+10
31838.21602 1.05E+10
32377.8468 1.07E+10
32917.47758 1.10E+10
33457.10836 1.12E+10
33996.73914 1.14E+10
34536.36992 1.17E+10
35076.0007 1.19E+10
35615.63148 1.22E+10
36155.26226 1.24E+10
36694.89304 1.27E+10
37234.52382 1.29E+10
37774.1546 1.31E+10
38313.78538 1.34E+10
38853.41616 1.36E+10
39393.04694 1.39E+10
39932.67772 1.41E+10
40472.3085 1.44E+10
41011.93928 1.46E+10
41551.57006 1.49E+10
42091.20084 1.51E+10
42630.83162 1.54E+10
43170.4624 1.56E+10
43710.09318 1.59E+10
44249.72396 1.61E+10
44789.35474 1.64E+10
45328.98552 1.66E+10
45868.6163 1.69E+10
47217.69325 1.75E+10
48566.7702 1.81E+10
49915.84715 1.87E+10
51264.9241 1.94E+10
52614.00105 2.00E+10
53963.078 2.06E+10
56661.2319 2.19E+10
59359.3858 2.31E+10
62057.5397 2.43E+10
64755.6936 2.56E+10
67453.8475 2.68E+10
70152.0014 2.80E+10
72850.1553 2.93E+10
75548.3092 3.05E+10
78246.4631 3.17E+10
80944.617 3.29E+10
86340.9248 3.53E+10
91737.2326 3.76E+10
97133.5404 4.00E+10
102529.8482 4.23E+10
107926.156 4.46E+10
113322.4638 4.68E+10
118718.7716 4.90E+10
124115.0794 5.12E+10
129511.3872 5.34E+10
134907.695 5.55E+10
141653.0798 5.82E+10
148398.4645 6.07E+10
161889.234 6.58E+10
175380.0035 7.07E+10
188870.773 7.54E+10
202361.5425 8.00E+10
215852.312 8.45E+10
229343.0815 8.88E+10
242833.851 9.30E+10
256324.6205 9.71E+10
269815.39 1.01E+11
296796.929 1.09E+11
323778.468 1.16E+11
350760.007 1.23E+11
377741.546 1.30E+11
404723.085 1.36E+11
431704.624 1.42E+11
458686.163 1.48E+11
485667.702 1.53E+11
512649.241 1.59E+11
539630.78 1.64E+11
566612.319 1.69E+11
593593.858 1.74E+11
620575.397 1.79E+11
647556.936 1.83E+11
674538.475 1.88E+11
701520.014 1.92E+11
728501.553 1.96E+11
755483.092 2.00E+11
782464.631 2.04E+11
809446.17 2.08E+11
863409.248 2.16E+11
917372.326 2.23E+11
971335.404 2.29E+11
1025298.482 2.36E+11
1079261.56 2.42E+11
1133224.638 2.48E+11
1187187.716 2.54E+11
1241150.794 2.59E+11
1295113.872 2.65E+11
1349076.95 2.70E+11

345
ELoss/Graveyard/Eloss_alpha Normal file
View File

@ -0,0 +1,345 @@
0.053103695 11959.9
0.116582129 19201.1
0.180060563 24466.2
0.243538998 28696
0.307017432 32395.8
0.370495866 35815.8
0.4339739 39049.4
0.497451133 42211.1
0.560932369 45315.6
0.624409603 48392.9
0.687886836 51473.4
0.751368072 54567.7
0.814845305 57693.8
0.878322539 60883.5
0.941803775 64073.2
1.005281008 67274.6
1.068758242 70625.6
1.132235475 73976.6
1.195716711 77327.7
1.259193944 80859
1.322671178 84405.9
1.386152414 87952.9
1.449629647 91666.6
1.513106881 95430.9
1.576588117 99195.1
1.64006535 103102
1.703542583 107097
1.767019817 111093
1.830501053 115200
1.893978286 119436
1.95745552 123672
2.020936756 128023
2.084413989 132632
2.147891222 137241
2.211372458 141849
2.274849692 146458
2.338326925 151067
2.401804159 155677
2.465285395 160793
2.528762628 165908
2.592239861 171023
2.655721097 176139
2.719198331 181254
2.782675564 186369
2.8461568 191841
2.909634034 197468
2.973111267 203094
3.0365885 208721
3.100069736 214347
3.16354697 219973
3.227024203 225800
3.290505439 231938
3.353982673 238075
3.417459906 244212
3.480941142 250349
3.544418375 256486
3.607895609 262668
3.671372842 269313
3.734854078 275958
3.798331312 282603
3.861808545 289248
3.925289781 295893
3.988767014 302538
4.05223224 309870
4.115713476 317394
4.179194712 324917
4.242675948 332441
4.306157184 339965
4.36963842 347488
4.433119656 355012
4.496600892 362535
4.560082128 370059
4.623563364 377583
4.6870446 385106
4.750525836 392630
4.813967046 400154
4.877448282 407677
4.940929518 415201
5.004410754 422747
5.06789199 431506
5.131373226 440265
5.194854462 449023
5.258335698 457782
5.321816934 466541
5.38529817 475299
5.448779406 484058
5.512260642 492817
5.575741878 501575
5.639223114 510334
5.70270435 519093
5.76614556 527851
5.829626796 536610
5.893108032 545369
5.956589268 554127
6.020070504 563195
6.08355174 573167
6.147032976 583139
6.210514212 593110
6.273995448 603082
6.337476684 613054
6.40095792 623026
6.464439156 632997
6.527920392 642969
6.591401628 652941
6.654842838 662913
6.718324074 672885
6.78180531 682856
6.845286546 692828
6.908767782 702800
6.972249018 712772
7.035730254 723331
7.09921149 734498
7.162692726 745666
7.226173962 756833
7.289655198 768000
7.353136434 779168
7.41661767 790335
7.480098906 801502
7.543540116 812670
7.607021352 823837
7.670502588 835004
7.733983824 846172
7.79746506 857339
7.860946296 868507
7.924427532 879674
7.987908768 890841
8.051390004 902868
8.11487124 915217
8.178352476 927566
8.241833712 939915
8.305314948 952263
8.368796184 964612
8.43227742 976961
8.49571863 989310
8.559199866 1.00E+06
8.622681102 1.01E+06
8.686162338 1.03E+06
8.749643574 1.04E+06
8.81312481 1.05E+06
8.876606046 1.06E+06
8.940087282 1.08E+06
9.003568518 1.09E+06
9.067049754 1.10E+06
9.13053099 1.12E+06
9.194012226 1.13E+06
9.257493462 1.14E+06
9.320974698 1.16E+06
9.384415908 1.17E+06
9.447897144 1.18E+06
9.51137838 1.20E+06
9.574859616 1.21E+06
9.638340852 1.22E+06
9.701822088 1.24E+06
9.765303324 1.25E+06
9.82878456 1.26E+06
9.892265796 1.28E+06
9.955747032 1.29E+06
10.01922827 1.30E+06
10.0827095 1.32E+06
10.14619074 1.34E+06
10.20967198 1.35E+06
10.27311319 1.37E+06
10.33659442 1.38E+06
10.40007566 1.40E+06
10.46355689 1.41E+06
10.52703813 1.43E+06
10.59051937 1.44E+06
10.6540006 1.46E+06
10.71748184 1.47E+06
10.78096307 1.49E+06
10.84444431 1.50E+06
10.90792555 1.52E+06
10.97140678 1.53E+06
11.03488802 1.55E+06
11.09836925 1.56E+06
11.16185049 1.58E+06
11.2252917 1.59E+06
11.28877294 1.61E+06
11.35225417 1.62E+06
11.41573541 1.64E+06
11.47921664 1.66E+06
11.54269788 1.67E+06
11.60617912 1.69E+06
11.66966035 1.70E+06
11.73314159 1.72E+06
11.79662282 1.73E+06
11.86010406 1.75E+06
11.9235853 1.76E+06
11.98706653 1.78E+06
12.05054777 1.79E+06
12.11398898 1.81E+06
12.17747021 1.83E+06
12.24095145 1.85E+06
12.30443269 1.86E+06
12.36791392 1.88E+06
12.43139516 1.90E+06
12.49487639 1.92E+06
12.55835763 1.93E+06
12.62183887 1.95E+06
12.6853201 1.97E+06
12.74880134 1.99E+06
12.81228257 2.00E+06
12.87576381 2.02E+06
12.93924505 2.04E+06
13.00268626 2.06E+06
13.06616749 2.07E+06
13.12964873 2.09E+06
13.19312996 2.11E+06
13.2566112 2.13E+06
13.32009244 2.14E+06
13.38357367 2.16E+06
13.44705491 2.18E+06
13.51053614 2.20E+06
13.57401738 2.22E+06
13.63749862 2.23E+06
13.70097985 2.25E+06
13.76446109 2.27E+06
13.82794232 2.29E+06
13.89142356 2.30E+06
13.95486477 2.32E+06
14.01834601 2.34E+06
14.08182724 2.36E+06
14.14530848 2.38E+06
14.20878971 2.40E+06
14.27227095 2.42E+06
14.33575219 2.44E+06
14.39923342 2.46E+06
14.46271466 2.48E+06
14.52619589 2.50E+06
14.58967713 2.52E+06
14.65315837 2.54E+06
14.7166396 2.56E+06
14.78012084 2.58E+06
14.84356205 2.60E+06
14.90704328 2.62E+06
14.97052452 2.63E+06
15.03400576 2.65E+06
15.09748699 2.67E+06
15.16096823 2.69E+06
15.22444946 2.71E+06
15.2879307 2.73E+06
15.35141194 2.75E+06
15.41489317 2.77E+06
15.47837441 2.79E+06
15.54185564 2.81E+06
15.60533688 2.83E+06
15.66881812 2.85E+06
15.73225933 2.87E+06
15.79574056 2.89E+06
15.8592218 2.91E+06
15.92270303 2.93E+06
15.98618427 2.95E+06
16.04966551 2.97E+06
16.11314674 2.99E+06
16.17662798 3.02E+06
16.24010921 3.04E+06
16.30359045 3.06E+06
16.36707169 3.08E+06
16.43055292 3.10E+06
16.49403416 3.13E+06
16.55751539 3.15E+06
16.6209566 3.17E+06
16.68443784 3.19E+06
16.74791908 3.21E+06
16.81140031 3.24E+06
16.87488155 3.26E+06
16.93836278 3.28E+06
17.00184402 3.30E+06
17.06532526 3.32E+06
17.12880649 3.35E+06
17.19228773 3.37E+06
17.25576896 3.39E+06
17.3192502 3.41E+06
17.38273144 3.43E+06
17.44621267 3.46E+06
17.50969391 3.48E+06
17.57313512 3.50E+06
17.63661635 3.52E+06
17.70009759 3.54E+06
17.76357883 3.57E+06
17.82706006 3.59E+06
17.8905413 3.61E+06
17.95402253 3.63E+06
18.01750377 3.65E+06
18.08098501 3.68E+06
18.14446624 3.70E+06
18.20794748 3.73E+06
18.27142871 3.75E+06
18.33490995 3.78E+06
18.39839119 3.80E+06
18.4618324 3.82E+06
18.52531363 3.85E+06
18.58879487 3.87E+06
18.6522761 3.90E+06
18.71575734 3.92E+06
18.77923858 3.95E+06
18.84271981 3.97E+06
18.90620105 3.99E+06
18.96968228 4.02E+06
19.03316352 4.04E+06
19.09664476 4.07E+06
19.16012599 4.09E+06
19.22360723 4.11E+06
19.28708846 4.14E+06
19.35052967 4.16E+06
19.41401091 4.19E+06
19.47749215 4.21E+06
19.54097338 4.24E+06
19.60445462 4.26E+06
19.66793585 4.28E+06
19.73141709 4.31E+06
19.79489833 4.33E+06
19.85837956 4.36E+06
19.9218608 4.38E+06
19.98534203 4.41E+06
20.04882327 4.43E+06
20.11230451 4.46E+06
20.17578574 4.48E+06
20.23926698 4.51E+06
20.30270819 4.54E+06
20.36618942 4.56E+06
20.42967066 4.59E+06
20.4931519 4.62E+06
20.55663313 4.64E+06
20.62011437 4.67E+06
20.6835956 4.69E+06
20.74707684 4.72E+06
20.81055808 4.75E+06
20.87403931 4.77E+06
20.93752055 4.80E+06
21.00100178 4.83E+06
21.06448302 4.85E+06
21.12796426 4.88E+06
21.19140547 4.91E+06
21.2548867 4.93E+06
21.31836794 4.96E+06
21.38184917 4.98E+06
21.44533041 5.01E+06
21.50881165 5.04E+06
21.57229288 5.06E+06
21.63577412 5.09E+06
21.69925535 5.12E+06
21.76273659 5.14E+06
21.82621783 5.17E+06
21.88969906 5.20E+06

268
ELoss/Graveyard/Eloss_p Normal file
View File

@ -0,0 +1,268 @@
0.00100784 0.00455783
0.00201568 0.00911567
0.0050392 0.0197891
0.00806272 0.0284591
0.0100784 0.0336328
0.0151176 0.0449321
0.0201568 0.0545806
0.025196 0.0631952
0.0302352 0.071111
0.0352744 0.0785363
0.0403136 0.0856119
0.0453528 0.0924397
0.050392 0.0990962
0.0554312 0.105641
0.0604704 0.112122
0.0705488 0.125041
0.0806272 0.138091
0.0907056 0.151435
0.100784 0.16519
0.1209408 0.194217
0.1410976 0.225513
0.1612544 0.25917
0.1814112 0.295144
0.201568 0.333333
0.25196 0.4377
0.302352 0.55345
0.352744 0.679377
0.403136 0.814707
0.453528 0.958947
0.50392 1.11177
0.604704 1.44231
0.705488 1.80513
0.806272 2.19946
0.907056 2.62475
1.00784 3.08057
1.2598 4.35139
1.51176 5.80613
1.76372 7.44108
2.01568 9.25315
2.26764 11.2397
2.5196 13.3984
3.02352 18.2246
3.52744 23.7179
4.03136 29.8671
4.53528 36.6625
5.0392 44.0961
5.54312 52.1607
6.04704 60.8501
6.55096 70.1587
7.05488 80.0814
7.5588 90.6136
8.06272 101.751
8.56664 113.49
9.07056 125.827
9.57448 138.759
10.0784 152.267
11.08624 180.081
12.09408 209.992
13.10192 241.974
14.10976 276.006
15.1176 312.066
16.12544 350.134
17.13328 390.189
18.14112 432.214
19.14896 476.19
20.1568 522.101
21.16464 569.93
22.17248 619.661
23.18032 671.279
24.18816 724.77
25.196 780.118
27.21168 896.334
29.22736 1019.82
31.24304 1150.48
33.25872 1288.2
35.2744 1432.91
38.29792 1662.88
41.32144 1908.07
44.34496 2168.23
47.36848 2443.1
50.392 2732.43
55.4312 3246.18
60.4704 3798.47
65.5096 4388.33
70.5488 5014.87
75.588 5677.25
80.6272 6374.65
85.6664 7106.3
90.7056 7871.46
95.7448 8669.43
100.784 9499.52
105.8232 10361.1
110.8624 11253.5
115.9016 12176.2
120.9408 13128.5
125.98 14109.9
131.0192 15119.8
136.0584 16157.8
141.0976 17223.3
146.1368 18315.7
151.176 19434.7
156.2152 20579.8
161.2544 21750.4
166.2936 22946.2
171.3328 24166.7
176.372 25411.6
181.4112 26680.3
186.4504 27972.5
191.4896 29287.8
196.5288 30625.8
201.568 31986.2
211.6464 34772.7
221.7248 37644.4
231.8032 40598.6
241.8816 43632.8
251.96 46744.7
262.0384 49931.8
272.1168 53192
282.1952 56523.1
292.2736 59923.1
302.352 63390
312.4304 66921.8
322.5088 70516.9
332.5872 74173.4
342.6656 77889.7
352.744 81664
362.8224 85494.9
372.9008 89380.9
382.9792 93320.4
393.0576 97312.1
403.136 101355
413.2144 105447
423.2928 109587
433.3712 113774
443.4496 118007
453.528 122284
463.6064 126605
473.6848 130969
483.7632 135373
493.8416 139818
503.92 144303
524.0768 153386
544.2336 162615
564.3904 171984
584.5472 181485
604.704 191113
624.8608 200861
645.0176 210724
665.1744 220697
685.3312 230775
705.488 240953
725.6448 251226
745.8016 261591
765.9584 272043
786.1152 282578
806.272 293192
826.4288 303883
846.5856 314646
866.7424 325478
886.8992 336377
907.056 347338
927.2128 358361
947.3696 369441
967.5264 380577
987.6832 391765
1007.84 403003
1027.9968 414290
1048.1536 425622
1068.3104 436998
1088.4672 448416
1108.624 459874
1128.7808 471370
1148.9376 482902
1169.0944 494468
1189.2512 506067
1209.408 517698
1229.5648 529358
1249.7216 541047
1269.8784 552762
1290.0352 564502
1310.192 576267
1330.3488 588055
1350.5056 599864
1370.6624 611694
1390.8192 623543
1410.976 635410
1431.1328 647295
1451.2896 659195
1471.4464 671111
1491.6032 683041
1511.76 694984
1531.9168 706940
1552.0736 718907
1572.2304 730885
1592.3872 742872
1612.544 754869
1632.7008 766874
1652.8576 778887
1673.0144 790907
1693.1712 802933
1713.328 814964
1763.72 845063
1814.112 875184
1864.504 905318
1914.896 935457
1965.288 965594
2015.68 995721
2116.464 1.06E+06
2217.248 1.12E+06
2318.032 1.18E+06
2418.816 1.24E+06
2519.6 1.30E+06
2620.384 1.35E+06
2721.168 1.41E+06
2821.952 1.47E+06
2922.736 1.53E+06
3023.52 1.59E+06
3225.088 1.70E+06
3426.656 1.82E+06
3628.224 1.93E+06
3829.792 2.04E+06
4031.36 2.15E+06
4232.928 2.26E+06
4434.496 2.37E+06
4636.064 2.48E+06
4837.632 2.58E+06
5039.2 2.68E+06
5291.16 2.81E+06
5543.12 2.94E+06
6047.04 3.18E+06
6550.96 3.42E+06
7054.88 3.64E+06
7558.8 3.87E+06
8062.72 4.08E+06
8566.64 4.29E+06
9070.56 4.49E+06
9574.48 4.69E+06
10078.4 4.88E+06
11086.24 5.25E+06
12094.08 5.61E+06
13101.92 5.94E+06
14109.76 6.26E+06
15117.6 6.57E+06
16125.44 6.86E+06
17133.28 7.14E+06
18141.12 7.41E+06
19148.96 7.67E+06
20156.8 7.93E+06
21164.64 8.17E+06
22172.48 8.41E+06
23180.32 8.63E+06
24188.16 8.86E+06
25196 9.07E+06
26203.84 9.28E+06
27211.68 9.48E+06
28219.52 9.68E+06
29227.36 9.87E+06
30235.2 1.01E+07
32250.88 1.04E+07
34266.56 1.08E+07
36282.24 1.11E+07
38297.92 1.14E+07
40313.6 1.17E+07
42329.28 1.20E+07
44344.96 1.23E+07
46360.64 1.25E+07
48376.32 1.28E+07
50392 1.30E+07

View File

@ -0,0 +1,108 @@
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import sys
from scipy.interpolate import interp1d
from scipy.integrate import cumulative_trapezoid
if len(sys.argv) > 1:
density = float(sys.argv[1])
print(f"Using user-provided density: {density} g/cm^3")
else:
density = (2.1525e-7) * 400 # default density (g/cm^3)
print(f"No density provided, using default: {density} g/cm^3")
filename = "/home/jamesszalkie/anasen/ELoss/Eloss_HeProton"
delimiter = '\t'
# Number of header lines to skip
skiprows = 0
data = pd.read_csv(
filename,
delimiter=delimiter,
skiprows=skiprows,
comment='#',
header=None
)
# Extract columns
data = data.dropna()
data[0] = pd.to_numeric(data[0], errors='coerce')
data[1] = pd.to_numeric(data[1], errors='coerce')
data = data.dropna()
E = np.array(data[0], dtype=float)
S_mass = np.array(data[1], dtype=float)
# Convert:
# (MeV cm^2/g) * (g/cm^3) = MeV/cm
S_linear = S_mass * density
sort_idx = np.argsort(E)[::-1]
E = E[sort_idx]
S_linear = S_linear[sort_idx]
invS = 1.0 / S_linear
x = cumulative_trapezoid(
invS,
E,
initial=0
)
x = -x
E_of_x = interp1d(
x,
E,
bounds_error=False,
fill_value=0.0
)
x_of_E = interp1d(
E,
x,
bounds_error=False,
fill_value="extrapolate"
)
output = pd.DataFrame({
"Distance_cm": x,
"Energy_MeV": E
})
output.to_csv("/home/jamesszalkie/anasen/ELoss/E_vs_x_heavy", index=False, sep='\t')
print("Saved E(x) dataset to:")
print("/home/jamesszalkie/anasen/ELoss/E_vs_x_heavy")
initial_energy = 10.0 # MeV
distance = 5.0 # cm
remaining_energy = E_of_x(distance)
print("\nExample:")
print(f"Initial Energy: {initial_energy:.3f} MeV")
print(f"Distance traveled: {distance:.3f} cm")
print(f"Remaining energy: {remaining_energy:.3f} MeV")
plt.figure(figsize=(8,6))
plt.plot(x, E)
plt.xlabel("Distance in Helium (cm)")
plt.ylabel("Proton Energy (MeV)")
plt.title("Proton Energy Loss in Helium")
plt.grid(True)
plt.show()

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 56.0
0.052815297998978813 55.88779559118236
0.1055905973100307 55.77559118236473
0.1583258903802704 55.663386773547096
0.21102116958648773 55.551182364729456
0.2636764272343416 55.438977955911824
0.3162916555575771 55.326773547094184
0.3688668467171828 55.21456913827655
0.4214019928005909 55.10236472945891
0.47389708582081397 54.99016032064128
0.5263521177156208 54.87795591182365
0.5787670803466686 54.76575150300601
0.6311419654986241 54.653547094188376
0.6834767648783074 54.541342685370736
0.7357714701137744 54.429138276553104
0.7880260727534378 54.31693386773547
0.8402405642651443 54.20472945891783
0.8924149360352387 54.0925250501002
0.944549179367651 53.98032064128256
0.9966432854829212 53.86811623246493
1.0486972455172614 53.755911823647295
1.1007110505215727 53.643707414829656
1.1526846914604507 53.531503006012024
1.20461815921121 53.419298597194384
1.2565114445628474 53.30709418837675
1.3083645382150408 53.19488977955912
1.3601774307771037 53.08268537074148
1.4119501127669243 52.97048096192385
1.463682574609925 52.85827655310621
1.5153748066379593 52.746072144288576
1.567026799088244 52.63386773547094
1.6186385421022436 52.521663326653304
1.670210025724541 52.40945891783567
1.721741239901727 52.29725450901803
1.7732321744812256 52.1850501002004
1.8246828192101567 52.07284569138276
1.8760931637341314 51.96064128256513
1.927463197596081 51.848436873747495
1.978792910235038 51.736232464929856
2.0300822909849012 51.62402805611222
2.0813313290732176 51.511823647294584
2.1325400136198995 51.39961923847695
2.183708333635973 51.28741482965932
2.2348362780222772 51.17521042084168
2.2859238355681497 51.06300601202405
2.336970994950123 50.95080160320641
2.387977744730558 50.838597194388775
2.438944073356305 50.72639278557114
2.48986996915732 50.6141883767535
2.540755420345257 50.50198396793587
2.591600415012079 50.38977955911823
2.6424049411285973 50.2775751503006
2.6931689865430437 50.16537074148297
2.743892538979591 50.05316633266533
2.7945755860368515 49.940961923847695
2.8452181151863907 49.828757515030055
2.895820113771171 49.71655310621242
2.9463815690040245 49.60434869739479
2.9969024679660703 49.49214428857715
3.047382797605115 49.37993987975952
3.097822544734061 49.26773547094188
3.1482216960292444 49.15553106212425
3.1985802380288035 49.043326653306615
3.248898157130988 48.931122244488975
3.2991754395924473 48.81891783567134
3.34941207152653 48.7067134268537
3.3996080389015098 48.59450901803607
3.449763327538836 48.48230460921844
3.4998779231113293 48.3701002004008
3.549951811141353 48.25789579158317
3.599984976998989 48.14569138276553
3.649977405900146 48.033486973947895
3.69992908290469 47.921282565130255
3.7498399929144948 47.80907815631262
3.7997101206715236 47.69687374749499
3.8495394507558416 47.58466933867735
3.8993279675836097 47.47246492985972
3.949075655405078 47.36026052104208
3.9987824983025053 47.24805611222445
4.0484484801880996 47.135851703406814
4.098073584801896 47.023647294589175
4.147657795709606 46.91144288577154
4.197201096300471 46.7992384769539
4.246703469785037 46.68703406813627
4.296164899192943 46.57482965931864
4.345585367370656 46.462625250501
4.394964856979166 46.350420841683366
4.4443033504916825 46.23821643286573
4.493600830191258 46.126012024048094
4.542857278168415 46.01380761523046
4.59207267631872 45.90160320641282
4.641247006340315 45.78939879759519
4.69038024973145 45.67719438877755
4.7394723877879334 45.56498997995992
4.788523401600594 45.452785571142286
4.837533272052677 45.340581162324646
4.886501979817199 45.228376753507014
4.935429505354305 45.116172344689375
4.984315828908534 45.00396793587174
5.033160930506101 44.8917635270541
5.081964789952087 44.77955911823647
5.130727386827641 44.66735470941884
5.179448700487107 44.5551503006012
5.2281287100551115 44.442945891783566
5.276767394423643 44.33074148296593
5.325364732249039 44.218537074148294
5.373920701948983 44.10633266533066
5.422435281699426 43.99412825651302
5.470908449431454 43.88192384769539
5.519340182828163 43.76971943887775
5.56773045932142 43.65751503006012
5.616079256088642 43.545310621242486
5.664386550049487 43.433106212424846
5.712652317862504 43.320901803607214
5.760876535921761 43.208697394789574
5.809059180353383 43.09649298597194
5.857200227012084 42.98428857715431
5.905299651477617 42.87208416833667
5.953357429051175 42.75987975951904
6.00137353475177 42.6476753507014
6.049347943312518 42.535470941883766
6.097280629176907 42.42326653306613
6.145171566494986 42.311062124248494
6.193020729119503 42.19885771543086
6.240828090602008 42.08665330661322
6.28859362418886 41.97444889779559
6.336317302817222 41.86224448897796
6.383999099110961 41.75004008016032
6.431638985376499 41.637835671342685
6.479236933598619 41.525631262525046
6.526792915436181 41.41342685370741
6.5743069022178044 41.30122244488978
6.621778864937472 41.18901803607214
6.669208774250055 41.07681362725451
6.716596600466817 40.96460921843687
6.763942313550791 40.85240480961924
6.811245883112151 40.7402004008016
6.858507278403459 40.627995991983965
6.905726468314888 40.51579158316633
6.952903421369345 40.403587174348694
7.000038105717523 40.29138276553106
7.047130489132908 40.17917835671342
7.0941805390066675 40.06697394789579
7.1411882223425085 39.95476953907816
7.188153505751427 39.84256513026052
7.235076355446383 39.730360721442885
7.281956737236922 39.618156312625246
7.328794616523677 39.50595190380761
7.375589958292823 39.39374749498998
7.42234272711043 39.28154308617234
7.469052887116726 39.16933867735471
7.515720402020305 39.05713426853707
7.562345235092199 38.94492985971944
7.608927349159911 38.832725450901805
7.65546670660133 38.720521042084165
7.701963269338546 38.60831663326653
7.748416998831609 38.49611222444889
7.794827856072147 38.38390781563126
7.84119580157693 38.27170340681363
7.8875207953813105 38.15949899799599
7.93380279703256 38.04729458917836
7.980041765583141 37.93509018036072
8.026237659583824 37.822885771543085
8.072390437076756 37.710681362725445
8.118500055588365 37.59847695390781
8.164566472122216 37.48627254509018
8.210589643151712 37.37406813627254
8.256569524612697 37.26186372745491
8.30250607189597 37.14965931863727
8.348399239839635 37.03745490981964
8.394248982721392 36.925250501002004
8.44005525425066 36.813046092184365
8.485818007560606 36.70084168336673
8.531537195200055 36.58863727454909
8.577212769125245 36.47643286573146
8.622844680691497 36.36422845691383
8.66843288064473 36.25202404809619
8.71397731911284 36.13981963927856
8.759477945596975 36.02761523046092
8.804934708962643 35.915410821643285
8.850347557430705 35.80320641282565
8.895716438568222 35.69100200400801
8.941041299279147 35.57879759519038
8.986322085794903 35.46659318637274
9.031558743664776 35.35438877755511
9.076751217746201 35.242184368737476
9.121899452194862 35.12997995991984
9.167003390454646 35.017775551102204
9.212062975247466 34.905571142284565
9.257078148562886 34.79336673346693
9.302048851647621 34.6811623246493
9.346975024994844 34.56895791583166
9.391856608333338 34.45675350701403
9.436693540616496 34.34454909819639
9.481485760011104 34.232344689378756
9.526233203886006 34.120140280561124
9.570935808800549 34.007935871743484
9.61559351049285 33.89573146292585
9.660206243867915 33.78352705410821
9.704773942985517 33.67132264529058
9.749296541047942 33.55911823647294
9.79377397038749 33.44691382765531
9.838206162453819 33.334709418837676
9.882593047801073 33.222505010020036
9.9269345560748 33.110300601202404
9.971230615998685 32.998096192384764
10.015481155361053 32.88589178356713
10.059686101001184 32.7736873747495
10.103845378795386 32.66148296593186
10.14795891364286 32.54927855711423
10.192026629451359 32.43707414829659
10.236048449122583 32.324869739478956
10.280024294537387 32.21266533066132
10.323954086540729 32.100460921843684
10.36783774492637 31.988256513026055
10.411675188421379 31.87605210420842
10.455466334670342 31.763847695390783
10.499211100219352 31.651643286573147
10.542909400499736 31.53943887775551
10.58656187430735 31.42723446893788
10.630173907648182 31.315030060120243
10.673750236013444 31.202825651302607
10.717291311677098 31.09062124248497
10.760797605551154 30.978416833667335
10.804269181920384 30.8662124248497
10.847706070488819 30.754008016032067
10.891108301167506 30.64180360721443
10.93447590407696 30.529599198396795
10.977808909549687 30.41739478957916
11.02110734813278 30.305190380761523
11.064371250590591 30.19298597194389
11.107600647907484 30.080781563126255
11.150795571290654 29.96857715430862
11.193956052173057 29.856372745490983
11.237082122216401 29.744168336673347
11.280173813314253 29.63196392785571
11.323231157595215 29.51975951903808
11.366254187426232 29.407555110220443
11.409242935415975 29.295350701402807
11.452197434418341 29.18314629258517
11.495117717536075 29.070941883767535
11.538003818124494 28.958737474949903
11.580855769795347 28.846533066132267
11.62367360642079 28.73432865731463
11.666457362137493 28.622124248496995
11.709207071350903 28.50991983967936
11.751922768739623 28.397715430861727
11.794604489259967 28.28551102204409
11.837252268150642 28.173306613226455
11.879866140937624 28.06110220440882
11.922446143439172 27.948897795591183
11.964992311771045 27.83669338677355
12.007504682351886 27.724488977955914
12.049983291908795 27.61228456913828
12.092428177483118 27.500080160320643
12.134839376436423 27.387875751503007
12.177216926456708 27.27567134268537
12.219560865564826 27.16346693386774
12.261871232121155 27.051262525050102
12.304148064832493 26.939058116232466
12.346391402759227 26.82685370741483
12.38860128532277 26.714649298597195
12.430777752313254 26.602444889779562
12.472920843897542 26.490240480961926
12.51503060062751 26.37803607214429
12.557107063448672 26.265831663326654
12.59915027370912 26.15362725450902
12.641160273168797 26.041422845691383
12.683137104009154 25.92921843687375
12.725080808843147 25.817014028056114
12.766991430725648 25.70480961923848
12.808869013164244 25.592605210420842
12.85071360013047 25.480400801603206
12.892525236071473 25.368196392785574
12.934303965922146 25.255991983967938
12.976049835117731 25.143787575150302
13.017762889606928 25.031583166332666
13.059443175865526 24.91937875751503
13.101090740910578 24.807174348697398
13.142705632315142 24.694969939879762
13.184287898223618 24.582765531062126
13.2258375873677 24.47056112224449
13.267354749082982 24.358356713426854
13.308839433326224 24.24615230460922
13.350291690693341 24.133947895791586
13.391711572438107 24.02174348697395
13.433099130491629 23.909539078156314
13.474454417482638 23.797334669338678
13.515777486758594 23.685130260521042
13.55706839240767 23.57292585170341
13.598327189281658 23.460721442885774
13.639553933019803 23.348517034068138
13.680748680073647 23.236312625250502
13.721911487732903 23.124108216432866
13.763042414152416 23.011903807615234
13.804141518380243 22.899699398797598
13.845208860386927 22.78749498997996
13.886244501095991 22.675290581162326
13.927248502415729 22.56308617234469
13.96822092727234 22.450881763527054
14.00916183964446 22.33867735470942
14.050071304599175 22.226472945891786
14.090949388329554 22.11426853707415
14.131796158193788 22.002064128256514
14.172611682756015 21.889859719438878
14.213396031828871 21.777655310621245
14.254149276517897 21.66545090180361
14.294871489267825 21.553246492985974
14.335562743910895 21.441042084168338
14.376223115717227 21.3288376753507
14.416852681447397 21.21663326653307
14.457451519407284 21.104428857715433
14.498019709505302 20.992224448897797
14.53855733331212 20.88002004008016
14.579064474123003 20.767815631262525
14.619541217022855 20.655611222444893
14.659987648954136 20.543406813627257
14.700403858787737 20.43120240480962
14.740789937396992 20.318997995991985
14.781145977734926 20.20679358717435
14.821472074914942 20.094589178356713
14.861768326295044 19.98238476953908
14.902034831565821 19.870180360721445
14.942271692842311 19.75797595190381
14.982479014759965 19.645771543086173
15.022656904574886 19.533567134268537
15.062805472268527 19.421362725450905
15.102924830657098 19.30915831663327
15.143015095505845 19.196953907815633
15.183076385648478 19.084749498997997
15.223108823111968 18.97254509018036
15.263112533246959 18.860340681362725
15.303087644864076 18.748136272545093
15.343034290376401 18.635931863727457
15.38295644081475 18.52372745490982
15.422865843589294 18.411523046092185
15.462770717047414 18.29931863727455
15.502672438842733 18.187114228456917
15.542572249745133 18.07490981963928
15.582470624462971 17.962705410821645
15.62236804180139 17.85050100200401
15.662264991356187 17.738296593186373
15.702161973877395 17.62609218436874
15.742059501648013 17.513887775551105
15.781958098878563 17.40168336673347
15.821858302118265 17.289478957915833
15.861760660683585 17.177274549098197
15.901665737105002 17.065070140280564
15.941574107592885 16.95286573146293
15.981486362523354 16.840661322645293
16.02140310694515 16.728456913827657
16.061324961108514 16.61625250501002
16.101252561017123 16.504048096192385
16.14118655900427 16.391843687374752
16.18112762433447 16.279639278557116
16.221076443831688 16.16743486973948
16.261033722535654 16.055230460921845
16.301000184387533 15.943026052104209
16.34097657294651 15.830821643286573
16.38096365213885 15.718617234468939
16.420962207041057 15.606412825651303
16.4609730446989 15.494208416833667
16.50099699498415 15.382004008016033
16.54103491149097 15.269799599198397
16.581087672474037 15.15759519038076
16.621156181830543 15.045390781563126
16.661241370128437 14.93318637274549
16.701344195683316 14.820981963927855
16.741465645686535 14.70877755511022
16.78160673738735 14.596573146292585
16.821768519331897 14.48436873747495
16.861952072662184 14.372164328657314
16.902158512478298 14.259959919839678
16.942388989267304 14.147755511022044
16.982644690402545 14.035551102204408
17.022926841717194 13.923346693386774
17.063236709156246 13.811142284569138
17.10357560051134 13.698937875751502
17.1439448672431 13.586733466933868
17.18434590639596 13.474529058116232
17.22478016261082 13.362324649298596
17.265249130241106 13.250120240480962
17.305754355578333 13.137915831663326
17.346297439193513 13.02571142284569
17.386880038401248 12.913507014028056
17.427503869853837 12.80130260521042
17.46817071227313 12.689098196392786
17.50888240932846 12.57689378757515
17.549640872669542 12.464689378757514
17.590448085123775 12.35248496993988
17.63130610406819 12.240280561122244
17.67221706498683 12.12807615230461
17.713183185225255 12.015871743486974
17.754206767954628 11.903667334669338
17.79529020635877 11.791462925851704
17.836435988058575 11.679258517034068
17.87764669978913 11.567054108216432
17.91892503234622 11.454849699398798
17.96027378581999 11.342645290581162
18.00169587513492 11.230440881763526
18.043194335916866 11.118236472945892
18.084772330709338 11.006032064128256
18.12643315556315 10.893827655310622
18.16818024702527 10.781623246492986
18.210017189554996 10.66941883767535
18.251947723397702 10.557214428857716
18.293975752948963 10.44501002004008
18.336105355644623 10.332805611222446
18.378340791415287 10.22060120240481
18.42068651274707 10.108396793587174
18.46314717539402 9.99619238476954
18.505727649791545 9.883987975951904
18.548433033224633 9.771783567134268
18.59126866280939 9.659579158316633
18.634240129351724 9.547374749498998
18.677349937327634 9.435170340681362
18.720556707457863 9.322965931863727
18.763821201585774 9.210761523046092
18.807143460441527 9.098557114228457
18.850523192188298 8.986352705410821
18.893963812948048 8.874148296593185
18.9374693533894 8.761943887775551
18.9810440567396 8.649739478957915
19.024692391268403 8.537535070140281
19.068419063605692 8.425330661322645
19.11222903295814 8.31312625250501
19.156127526296373 8.200921843687375
19.20012005459077 8.08871743486974
19.24421243018142 7.976513026052104
19.288410785376175 7.864308617234469
19.332721592379777 7.752104208416833
19.377151684667407 7.639899799599198
19.421708279927426 7.527695390781563
19.466399004710787 7.415490981963927
19.51123192093895 7.303286573146292
19.55621555443816 7.191082164328657
19.60135892568588 7.078877755511022
19.646671582975372 6.966673346693387
19.69216363822727 6.854468937875751
19.73784580570246 6.742264529058116
19.78372944389977 6.630060120240481
19.829826600954664 6.517855711422845
19.876150063892357 6.40565130260521
19.922713412131046 6.293446893787575
19.969531075679072 6.18124248496994
20.01661839852468 6.069038076152305
20.06399170777979 5.956833667334669
20.111668389210962 5.844629258517034
20.159666969873346 5.732424849699399
20.208007208658074 5.620220440881763
20.256710195673225 5.508016032064128
20.305798461504796 5.395811623246493
20.355296097550877 5.283607214428858
20.40522888879253 5.171402805611223
20.455624460563524 5.059198396793587
20.50651244111299 4.946993987975952
20.557924642027025 4.834789579158317
20.609895258894884 4.722585170340681
20.662461094982234 4.610380761523046
20.7156618111199 4.498176352705411
20.769540205545724 4.385971943887776
20.824142528067696 4.2737675350701405
20.879518833670392 4.161563126252505
20.935723381591462 4.0493587174348695
20.992815086985296 3.9371543086172345
21.050858033610158 3.824949899799599
21.109922057578444 3.7127454909819635
21.170083414166925 3.6005410821643284
21.231425542084505 3.4883366733466934
21.294039942554154 3.376132264529058
21.358027194231855 3.2639278557114224
21.423498129552172 3.1517234468937874
21.49057520381045 3.0395190380761523
21.559394095499496 2.927314629258517
21.63010558555564 2.8151102204408813
21.702877774826224 2.7029058116232463
21.77789871404056 2.5907014028056112
21.855379539923316 2.4784969939879757
21.93555823629466 2.3662925851703402
22.018704172060023 2.254088176352705
22.105123611666524 2.14188376753507
22.195166451719505 2.0296793587174347
22.289234515323805 1.9174749498997996
22.387791840713213 1.8052705410821643
22.491377543021446 1.693066132264529
22.600622021403503 1.5808617234468938
22.716267546088446 1.4686573146292585
22.839194612699472 1.3564529058116233
22.97045591382958 1.244248496993988
23.1113203493425 1.1320440881763527
23.26333009784264 1.0198396793587174
23.42837407410928 0.9076352705410822
23.60877459418035 0.7954308617234469
23.80739893905294 0.6832264529058116
24.023785816650847 0.5710220440881764
24.256520336667478 0.4588176352705411
24.507587273383727 0.3466132264529058
24.77890950188695 0.23440881763527055
25.067836657270067 0.12220440881763527
25.33748895949536 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 30.0
0.010398267192679597 29.9398997995992
0.020800979435306326 29.879799599198396
0.03120816278189447 29.819699398797596
0.04161984349592919 29.759599198396792
0.05203604805258358 29.699498997995992
0.06245680314097256 29.63939879759519
0.07288213566642858 29.579298597194388
0.08331207275280568 29.519198396793588
0.0937466417448185 29.459098196392784
0.10418587021040124 29.398997995991984
0.11462978594310534 29.338897795591183
0.12507841696452118 29.27879759519038
0.13553179152673006 29.21869739478958
0.1459899381147927 29.15859719438878
0.15645288544926336 29.098496993987975
0.16692066248873594 29.038396793587175
0.17739329843242813 28.97829659318637
0.18787082272278927 28.91819639278557
0.19835326504815046 28.85809619238477
0.20884065534540208 28.797995991983967
0.21933302380270547 28.737895791583167
0.22983040086224538 28.677795591182363
0.24033281722300814 28.617695390781563
0.2508403038436048 28.557595190380763
0.26135289194512407 28.49749498997996
0.2718706130140221 28.43739478957916
0.28239349880505543 28.377294589178355
0.29292158134424234 28.317194388777555
0.3034548929318719 28.257094188376755
0.3139934661455455 28.19699398797595
0.32453733384325795 28.13689378757515
0.3350865291665238 28.07679358717435
0.3456410855435391 28.016693386773547
0.3562010366923838 27.956593186372746
0.3667664166242724 27.896492985971943
0.37733725964683773 27.836392785571142
0.38791360036746697 27.776292585170342
0.3984954736966749 27.71619238476954
0.4090829148515216 27.656092184368738
0.4196759593590817 27.595991983967934
0.4302746430599491 27.535891783567134
0.44087900211179815 27.475791583166334
0.451489072992985 27.41569138276553
0.46210489250619724 27.35559118236473
0.4727264977821574 27.295490981963926
0.4833539262833673 27.235390781563126
0.4939872158079107 27.175290581162326
0.5046264044933009 27.115190380761522
0.5152715308203797 27.05509018036072
0.525922633617274 26.99498997995992
0.5365797520634001 26.934889779559118
0.5472429256935216 26.874789579158318
0.5579121944018681 26.814689378757514
0.5685875984463002 26.754589178356714
0.5792691784525404 26.694488977955913
0.5899569754184544 26.63438877755511
0.6006510307183908 26.57428857715431
0.6113513861075862 26.514188376753506
0.6220580837266209 26.454088176352705
0.6327711661059436 26.393987975951905
0.6434906761704541 26.3338877755511
0.6542166572441456 26.2737875751503
0.6649491530548198 26.213687374749497
0.6756882077388559 26.153587174348697
0.6864338658460543 26.093486973947897
0.6971861723445425 26.033386773547093
0.7079451726257471 25.973286573146293
0.7187109125094413 25.913186372745493
0.7294834382488564 25.85308617234469
0.7402627965358648 25.79298597194389
0.7510490345062407 25.732885771543085
0.7618421997449859 25.672785571142285
0.7726423402917384 25.612685370741485
0.7834495046462513 25.55258517034068
0.7942637417739485 25.49248496993988
0.8050851011115646 25.432384769539077
0.815913632572855 25.372284569138277
0.8267493865543964 25.312184368737476
0.8375924139414631 25.252084168336673
0.8484427661139858 25.191983967935872
0.859300494952603 25.13188376753507
0.8701656528447873 25.07178356713427
0.8810382926910707 25.011683366733468
0.8919184679113505 24.951583166332664
0.9028062324512875 24.891482965931864
0.9137016407888005 24.831382765531064
0.9246047479406487 24.77128256513026
0.9355156094691104 24.71118236472946
0.9464342814887629 24.651082164328656
0.9573608206733517 24.590981963927856
0.9682952842627699 24.530881763527056
0.9792377300701313 24.470781563126252
0.9901882164889474 24.41068136272545
1.001146802500416 24.350581162324648
1.0121135476808063 24.290480961923848
1.0230885122089624 24.230380761523048
1.0340717568739104 24.170280561122244
1.0450633430825784 24.110180360721444
1.056063332867636 24.05008016032064
1.0670717888954413 23.98997995991984
1.078088774474114 23.92987975951904
1.0891143535617247 23.869779559118236
1.1001485907746027 23.809679358717435
1.1111915513957777 23.749579158316635
1.122243301383539 23.68947895791583
1.133303907380124 23.62937875751503
1.1443734367205463 23.569278557114227
1.1554519574415423 23.509178356713427
1.166539538290668 23.449078156312627
1.1776362487355239 23.388977955911823
1.1887421589731204 23.328877755511023
1.1998573399393933 23.26877755511022
1.2109818633188538 23.20867735470942
1.2221158015543967 23.14857715430862
1.2332592278572512 23.088476953907815
1.2444122162170856 23.028376753507015
1.2555748414122743 22.96827655310621
1.2667471790203124 22.90817635270541
1.2779293054284027 22.84807615230461
1.2891212978441993 22.787975951903807
1.3003232343067188 22.727875751503007
1.3115351936974278 22.667775551102206
1.3227572557514968 22.607675350701403
1.3339895010692322 22.547575150300602
1.3452320111276916 22.4874749498998
1.3564848682924755 22.427374749499
1.3677481558297124 22.367274549098198
1.3790219579182283 22.307174348697394
1.3903063596619087 22.247074148296594
1.4016014471022642 22.18697394789579
1.4129073072311862 22.12687374749499
1.424224028003917 22.06677354709419
1.4355516983522203 22.006673346693386
1.4468904081977643 21.946573146292586
1.4582402484657262 21.886472945891782
1.4696013110986073 21.826372745490982
1.4809736890702807 21.76627254509018
1.492357476400262 21.706172344689378
1.5037527681682112 21.646072144288578
1.5151596605286768 21.585971943887778
1.526578250726077 21.525871743486974
1.5380086371099253 21.465771543086174
1.5494509191503139 21.40567134268537
1.5609051974536423 21.34557114228457
1.5723715737786168 21.28547094188377
1.583850151052507 21.225370741482966
1.5953410333876747 21.165270541082165
1.606844326098385 21.10517034068136
1.6183601357178858 21.04507014028056
1.6298885700157888 20.98496993987976
1.6414297380157308 20.924869739478957
1.6529837500133366 20.864769539078157
1.6645507175944907 20.804669338677353
1.6761307536539094 20.744569138276553
1.6877239724140387 20.684468937875753
1.6993304894442678 20.62436873747495
1.7109504216804714 20.56426853707415
1.722583887444893 20.50416833667335
1.7342310064663649 20.444068136272545
1.7458918999008755 20.383967935871745
1.7575666903525013 20.32386773547094
1.7692555018946912 20.26376753507014
1.7809584600919304 20.20366733466934
1.792675692021777 20.143567134268537
1.804407326297284 20.083466933867737
1.8161534930898215 20.023366733466933
1.8279143241522915 19.963266533066133
1.8396899528427617 19.903166332665332
1.8514805141485127 19.84306613226453
1.863286144710511 19.78296593186373
1.8751069828483264 19.722865731462925
1.8869431685854847 19.662765531062124
1.8987948436752833 19.602665330661324
1.9106621516270674 19.54256513026052
1.922545237732978 19.48246492985972
1.9344442490951907 19.42236472945892
1.9463593346536447 19.362264529058116
1.958290645214274 19.302164328657316
1.9702383334777633 19.242064128256512
1.9822025540688202 19.181963927855712
1.9941834635659956 19.12186372745491
2.0061799931686224 19.061763527054108
2.018189273776437 19.001663326653308
2.0302096342605225 18.941563126252504
2.042241176017122 18.881462925851704
2.0542840016871904 18.821362725450903
2.066338215174412 18.7612625250501
2.0784039216635213 18.7011623246493
2.0904812276389375 18.641062124248496
2.1025702409037006 18.580961923847696
2.1146709404076454 18.520861723446895
2.1267832178091113 18.46076152304609
2.1389070591902346 18.40066132264529
2.1510425383648597 18.34056112224449
2.1631897653658836 18.280460921843687
2.1753488516069717 18.220360721442887
2.187519909902894 18.160260521042083
2.199703054490194 18.100160320641283
2.2118984010482237 18.040060120240483
2.224106066720528 17.97995991983968
2.2363261701366 17.91985971943888
2.248558831434013 17.859759519038075
2.260804172280927 17.799659318637275
2.273062315898996 17.739559118236475
2.285333387086661 17.67945891783567
2.2976175122428524 17.61935871743487
2.309914819391113 17.559258517034067
2.322225438204131 17.499158316633267
2.3345495000287144 17.439058116232466
2.3468871379111986 17.378957915831663
2.3592384866233034 17.318857715430862
2.3716036826884532 17.258757515030062
2.3839828644085586 17.19865731462926
2.3963761718912746 17.13855711422846
2.4087837470777553 17.078456913827655
2.421205733770893 17.018356713426854
2.433642277664077 16.958256513026054
2.4460935263704635 16.89815631262525
2.458559629452776 16.83805611222445
2.4710407384536515 16.777955911823646
2.4835370069265323 16.717855711422846
2.4960485904671286 16.657755511022046
2.5085756467454523 16.597655310621242
2.52111833553844 16.537555110220442
2.533676818763184 16.477454909819638
2.5462512605107666 16.417354709418838
2.558841827080734 16.357254509018038
2.5714486870162045 16.297154308617234
2.584072011139633 16.237054108216434
2.59671197258925 16.176953907815633
2.6093687468561813 16.11685370741483
2.6220425118222668 16.05675350701403
2.6347334477986033 15.996653306613226
2.6474417375648067 15.936553106212424
2.6601675664090343 15.876452905811622
2.6729111221687627 15.81635270541082
2.6856725952723526 15.75625250501002
2.6984521787814137 15.696152304609218
2.711250068433985 15.636052104208416
2.724066462688553 15.575951903807614
2.7369015627689257 15.515851703406813
2.749755572709985 15.455751503006011
2.762628699404328 15.39565130260521
2.775521152649831 15.335551102204407
2.7884331451981477 15.275450901803605
2.8013648928041692 15.215350701402805
2.814316614276465 15.155250501002003
2.8272885315287266 15.095150300601201
2.840280869632244 15.0350501002004
2.8532938568694317 14.974949899799599
2.8663277247884373 14.914849699398797
2.8793827082588463 14.854749498997995
2.8924590455285255 14.794649298597193
2.9055569782816164 14.734549098196391
2.9186767516977197 14.67444889779559
2.9318186145122898 14.614348697394789
2.9449828190782728 14.554248496993987
2.9581696214290205 14.494148296593185
2.971379281342507 14.434048096192384
2.984612062406884 14.373947895791582
2.9978682320874026 14.31384769539078
3.011148061794743 14.253747494989979
3.0244518269547798 14.193647294589177
3.037779807079822 14.133547094188376
3.051132285841369 14.073446893787574
3.064509551144408 14.013346693386772
3.077911895203306 13.95324649298597
3.091339614619329 13.89314629258517
3.104793010459831 13.833046092184368
3.118272388339158 13.772945891783566
3.1317780585013035 13.712845691382764
3.145310335904374 13.652745490981962
3.158869540306896 13.592645290581162
3.1724559963560246 13.53254509018036
3.1860700336776957 13.472444889779558
3.199711986968775 13.412344689378756
3.213382196091258 13.352244488977956
3.227081006168576 13.292144288577154
3.2408087676840527 13.232044088176352
3.2545658365815884 13.17194388777555
3.268352574368613 13.111843687374748
3.2821693482213776 13.051743486973947
3.2960165310926497 12.991643286573145
3.309894501821866 12.931543086172343
3.323803645247824 12.871442885771541
3.3377443523239694 12.811342685370741
3.3517170202363613 12.75124248496994
3.3657220525243754 12.691142284569137
3.3797598592042344 12.631042084168335
3.3938308568954363 12.570941883767533
3.4079354689501606 12.510841683366733
3.422074125585744 12.450741482965931
3.4362472640202983 12.390641282565129
3.4504553286115733 12.330541082164327
3.464698770999146 12.270440881763527
3.478978050250038 12.210340681362725
3.4932936330078523 12.150240480961923
3.5076459936455366 12.090140280561121
3.5220356144218763 12.030040080160319
3.5364629856418195 11.969939879759519
3.5509286058207565 11.909839679358717
3.5654329818528563 11.849739478957915
3.579976629183589 11.789639278557113
3.5945600719865545 11.729539078156312
3.6091838433447445 11.66943887775551
3.6238484854363664 11.609338677354708
3.638554549725373 11.549238476953906
3.653302597156832 11.489138276553104
3.668093198357285 11.429038076152304
3.682926933840248 11.368937875751502
3.697804394217002 11.3088376753507
3.7127261804128464 11.248737474949898
3.7276929038889772 11.188637274549098
3.7427051868701624 11.128537074148296
3.757763662578393 11.068436873747494
3.772868975472704 11.008336673346692
3.7880217814953476 10.94823647294589
3.8032227483245253 10.88813627254509
3.8184725556338837 10.828036072144288
3.8337718953589848 10.767935871743486
3.8491214719709825 10.707835671342684
3.8645220027577234 10.647735470941884
3.8799742181125234 10.587635270541082
3.8954788618308553 10.52753507014028
3.9110366914152173 10.467434869739478
3.926648478388437 10.407334669338676
3.942315008615698 10.347234468937875
3.95803708263557 10.287134268537073
3.9738155160003386 10.227034068136271
3.989651139625952 10.16693386773547
4.005544800151901 10.10683366733467
4.021497360311363 10.046733466933867
4.037509699311966 9.986633266533065
4.053582713227517 9.926533066132263
4.069717315401089 9.866432865731461
4.085914436859838 9.806332665330661
4.102175026741963 9.746232464929859
4.118500052736225 9.686132264529057
4.134890501534466 9.626032064128255
4.151347379297577 9.565931863727455
4.167871712135395 9.505831663326653
4.18446454660101 9.44573146292585
4.201126950200002 9.385631262525049
4.217860011915137 9.325531062124247
4.2346648427470805 9.265430861723447
4.251542576271694 9.205330661322645
4.2684943692145305 9.145230460921843
4.285521402043143 9.08513026052104
4.302624879577864 9.02503006012024
4.3198060316217335 8.964929859719438
4.337066113610283 8.904829659318636
4.354406407281915 8.844729458917834
4.371828221369644 8.784629258517032
4.389332892315009 8.724529058116232
4.406921785004982 8.66442885771543
4.424596293532762 8.604328657314628
4.442357841983343 8.544228456913826
4.460207885244835 8.484128256513026
4.478147909846509 8.424028056112224
4.496179434824604 8.363927855711422
4.514304012616988 8.30382765531062
4.532523229987804 8.243727454909818
4.550838708983265 8.183627254509018
4.5692521079198505 8.123527054108216
4.587765122406189 8.063426853707414
4.606379486399968 8.003326653306614
4.625096973301292 7.943226452905811
4.643919397083955 7.88312625250501
4.662848613466177 7.823026052104208
4.68188652112241 7.7629258517034065
4.701035062937915 7.7028256513026045
4.720296227307869 7.6427254509018026
4.739672049482848 7.5826252505010014
4.759164612962647 7.5225250501001995
4.778776050940441 7.462424849699398
4.798508547799436 7.402324649298596
4.818364340664223 7.342224448897795
4.838345721009188 7.282124248496993
4.8584550363264105 7.222024048096192
4.878694691855636 7.16192384769539
4.899067152379003 7.101823647294588
4.919574944083359 7.041723446893787
4.940220656493125 6.981623246492985
4.961006944476825 6.921523046092184
4.981936530330547 6.861422845691382
5.003012205941749 6.801322645290581
5.0242368350370405 6.741222444889779
5.045613355517686 6.681122244488978
5.067144781886832 6.621022044088176
5.088834207772605 6.560921843687374
5.11068480855149 6.500821643286573
5.132699844076576 6.440721442885771
5.154882661515527 6.3806212424849695
5.177236698303363 6.3205210420841675
5.1997654852154085 6.260420841683366
5.222472649566042 6.200320641282564
5.245361918539159 6.140220440881763
5.268437122656598 6.080120240480961
5.291702199391051 6.020020040080159
5.315161196930383 5.959919839679358
5.338818278100599 5.899819639278556
5.362677724455089 5.839719438877755
5.386743940538188 5.779619238476953
5.4110214583314935 5.719519038076152
5.435514941891848 5.65941883767535
5.4602291921903126 5.599318637274549
5.485169152162013 5.539218436873747
5.510339911977175 5.479118236472945
5.535746714544275 5.419018036072144
5.561394961256746 5.358917835671342
5.587290217995284 5.298817635270541
5.613438221398434 5.238717434869739
5.639844885414749 5.178617234468938
5.666516308150517 5.118517034068136
5.6934587790277345 5.0584168336673345
5.720678786267731 4.9983166332665325
5.7481830247166235 4.9382164328657305
5.775978404029525 4.878116232464929
5.804072057231269 4.818016032064127
5.832471349672207 4.757915831663326
5.861183888398488 4.697815631262524
5.89021753195708 4.637715430861723
5.919580400656656 4.577615230460921
5.9492808873063066 4.51751503006012
5.979327668454919 4.457414829659318
6.009729716154863 4.397314629258516
6.040496310274437 4.337214428857715
6.071637051384256 4.277114228456913
6.103161874243419 4.217014028056112
6.135081061911913 4.15691382765531
6.167405260516083 4.096813627254509
6.2001454946943255 4.036713426853707
6.233313183750211 3.9766132264529053
6.266920158540047 3.9165130260521037
6.3009786791213545 3.856412825651302
6.335501453187842 3.7963126252505006
6.370501655314983 3.736212424849699
6.405992947038321 3.6761122244488975
6.441989497783825 3.616012024048096
6.478506006665961 3.555911823647294
6.515556821337948 3.4958116232464924
6.553157724667555 3.435711422845691
6.591326000462975 3.3756112224448893
6.6300786953566915 3.3155110220440878
6.669432959801074 3.255410821643286
6.709407140984182 3.1953106212424847
6.750020836902975 3.135210420841683
6.791293858381061 3.0751102204408816
6.833246778542392 3.0150100200400796
6.8759009619881635 2.954909819639278
6.9192785941951875 2.8948096192384765
6.9634027109065135 2.834709418837675
7.008297227226829 2.7746092184368734
7.053986966064946 2.714509018036072
7.100497685481046 2.6544088176352703
7.147832212830546 2.5943086172344687
7.196016729765171 2.534208416833667
7.245102172030724 2.474108216432865
7.295117966607676 2.4140080160320636
7.346094534536747 2.353907815631262
7.39806328922834 2.2938076152304605
7.451056625177686 2.233707414829659
7.505107894730031 2.1736072144288574
7.560251370046329 2.113507014028056
7.616522186824774 2.0534068136272543
7.673735492241875 1.9933066132264528
7.731604416123739 1.9332064128256512
7.790050413143916 1.8731062124248496
7.849084863800276 1.813006012024048
7.908719086321332 1.7529058116232463
7.968964254033829 1.6928056112224448
8.029831293231306 1.6327054108216432
8.091330757154696 1.5726052104208417
8.153472670633517 1.51250501002004
8.216265205671247 1.4524048096192383
8.279702214626303 1.3923046092184368
8.343763101288797 1.3322044088176352
8.408437721154936 1.2721042084168337
8.473728451056758 1.212004008016032
8.539636796564132 1.1519038076152304
8.60616138718314 1.0918036072144288
8.673297200490053 1.0317034068136273
8.74103458371211 0.9716032064128256
8.809358014235114 0.911503006012024
8.878244521381253 0.8514028056112224
8.947661665602816 0.7913026052104208
9.017564935092919 0.7312024048096192
9.087894369598201 0.6711022044088176
9.158570151103621 0.611002004008016
9.229486803113845 0.5509018036072144
9.30050550477334 0.4908016032064128
9.371443845235783 0.4307014028056112
9.442062128517856 0.3706012024048096
9.512045189718247 0.310501002004008
9.580979095216339 0.2504008016032064
9.64832548979696 0.1903006012024048
9.713416829819925 0.1302004008016032
9.775658571172649 0.0701002004008016
9.840427371690073 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 42.82
0.1253066290957655 42.73420841683367
0.25046072905153527 42.64841683366734
0.37546229782093876 42.56262525050101
0.5003113333504398 42.476833667334674
0.6250078335789916 42.39104208416834
0.7495517964376327 42.30525050100201
0.8739432198490851 42.219458917835674
0.9981821017273447 42.13366733466934
1.1222684399772636 42.04787575150301
1.2462022324941247 41.96208416833667
1.369983477163207 41.87629258517034
1.493612171859333 41.790501002004014
1.6170883144464583 41.70470941883768
1.7404119027771503 41.61891783567135
1.8635829346921604 41.533126252505014
1.9866014080199357 41.44733466933868
2.109467320576131 41.36154308617235
2.2321806701631135 41.27575150300601
2.3547414545694556 41.18995991983968
2.47714967156942 41.10416833667335
2.599405318922432 41.01837675350701
2.721508394372536 40.93258517034069
2.8434588956478883 40.84679358717435
2.9652568204601404 40.76100200400802
3.0869021665039122 40.67521042084169
3.208394931456204 40.58941883767535
3.3297351129758073 40.50362725450902
3.450922708702706 40.41783567134269
3.571957716257464 40.33204408817635
3.692840133240601 40.24625250501002
3.813569957231961 40.160460921843686
3.934147185790053 40.07466933867736
4.054571816451433 39.98887775551103
4.174843846729972 39.90308617234469
4.294963274116216 39.81729458917836
4.414930096076671 39.731503006012026
4.534744310053103 39.64571142284569
4.654405913461808 39.55991983967936
4.773914903692879 39.474128256513026
4.893271278109454 39.38833667334669
5.012475034046952 39.30254509018036
5.131526168812287 39.21675350701403
5.2504246796831096 39.1309619238477
5.369170563906945 39.045170340681366
5.487763818700406 38.95937875751503
5.606204441248349 38.8735871743487
5.724492428703016 38.787795591182366
5.842627778183168 38.70200400801603
5.9606104867731995 38.6162124248497
6.078440551522235 38.530420841683366
6.196117969443211 38.44462925851703
6.313642737511934 38.358837675350706
6.431014852666161 38.27304609218437
6.548234311804575 38.18725450901804
6.665301111785833 38.101462925851706
6.782215249427555 38.01567134268537
6.898976721505291 37.92987975951904
7.015585524751485 37.844088176352706
7.132041655854405 37.75829659318637
7.248345111457067 37.67250501002004
7.36449588815612 37.58671342685371
7.480493982500761 37.50092184368738
7.596339390991535 37.415130260521046
7.712032110079209 37.32933867735471
7.827572136163578 37.24354709418838
7.942959465592258 37.157755511022046
8.058194094659454 37.07196392785571
8.17327601960471 36.98617234468938
8.288205236611635 36.900380761523046
8.402981741806602 36.81458917835671
8.517605531257422 36.728797595190386
8.63207660097203 36.64300601202405
8.74639494689706 36.55721442885772
8.860560564916492 36.471422845691386
8.97457345085021 36.38563126252505
9.088433600452566 36.29983967935872
9.202141009410902 36.214048096192386
9.315695673344049 36.12825651302605
9.429097587800802 36.04246492985972
9.54234674825836 35.956673346693385
9.655443150120737 35.87088176352706
9.768386788717184 35.785090180360726
9.881177659300489 35.69929859719439
9.993815757045347 35.61350701402806
10.106301077046643 35.527715430861726
10.21863361431772 35.44192384769539
10.330813363788613 35.35613226452906
10.44284032030425 35.270340681362725
10.554714478622623 35.18454909819639
10.666435833412924 35.09875751503006
10.778004379253638 35.01296593186373
10.889420110630642 34.9271743486974
11.000683021935192 34.841382765531066
11.111793107461944 34.75559118236473
11.222750361406915 34.6697995991984
11.333554777865395 34.584008016032065
11.44420635082984 34.49821643286573
11.55470507418771 34.4124248496994
11.665050941719285 34.326633266533065
11.775243947095417 34.24084168336673
11.885284083875261 34.155050100200405
11.995171345503984 34.06925851703407
12.104905725310358 33.98346693386774
12.21448721650439 33.897675350701405
12.32391581217487 33.81188376753507
12.433191505286882 33.72609218436874
12.542314288679256 33.640300601202405
12.651284155062005 33.55450901803607
12.760101097013676 33.46871743486974
12.868765106978683 33.382925851703405
12.977276177264566 33.29713426853708
13.085634300039247 33.211342685370745
13.193839467328155 33.12555110220441
13.301891671011374 33.03975951903808
13.409790902820703 32.953967935871745
13.517537154336667 32.86817635270541
13.625130416985478 32.78238476953908
13.73257068203593 32.696593186372745
13.839857940596254 32.61080160320641
13.946992183610881 32.525010020040085
14.053973401857217 32.43921843687375
14.160801585942249 32.35342685370742
14.267476726299185 32.267635270541085
14.373998813183993 32.18184368737475
14.480367836671876 32.09605210420842
14.586583786653682 32.010260521042085
14.692646652832249 31.924468937875755
14.798556424718699 31.838677354709425
14.904313091628635 31.75288577154309
15.009916642678277 31.66709418837676
15.115367066780538 31.581302605210425
15.220664352641016 31.49551102204409
15.325808488753914 31.40971943887776
15.430799463397895 31.32392785571143
15.535637264631829 31.238136272545095
15.640321880290495 31.15234468937876
15.744853297980185 31.066553106212428
15.849231505074231 30.980761523046098
15.953456488708454 30.894969939879765
16.057528235776505 30.80917835671343
16.161446732925146 30.723386773547098
16.26521196654943 30.637595190380765
16.368823922787787 30.551803607214435
16.472282587517043 30.4660120240481
16.575587946347294 30.380220440881768
16.67873998461674 30.294428857715435
16.781738687386387 30.2086372745491
16.884584039434653 30.12284569138277
16.9872760252519 30.037054108216438
17.089814629034823 29.951262525050105
17.192199834680743 29.86547094188377
17.29443162578182 29.77967935871744
17.39650998561914 29.693887775551108
17.498434897156663 29.608096192384775
17.6002063430351 29.52230460921844
17.701824305565648 29.436513026052108
17.8032887667236 29.350721442885778
17.90459970814188 29.264929859719444
18.005757111104373 29.17913827655311
18.10676095653921 29.093346693386778
18.20761122501187 29.007555110220444
18.308307896718183 28.921763527054114
18.408850951477188 28.83597194388778
18.509240368723834 28.750180360721448
18.609476127501576 28.664388777555114
18.709558206454805 28.57859719438878
18.809486583821133 28.49280561122245
18.909261237423564 28.407014028056118
19.008882144662454 28.321222444889784
19.108349282507362 28.23543086172345
19.20766262748873 28.149639278557117
19.3068221556894 28.063847695390788
19.405827842735977 27.978056112224454
19.504679663790007 27.89226452905812
19.60337759353899 27.806472945891787
19.701921606187234 27.720681362725454
19.800311675446505 27.634889779559124
19.89854777452653 27.54909819639279
19.99662987612527 27.463306613226457
20.09455795241903 27.377515030060124
20.19233197505239 27.29172344689379
20.28995191512789 27.20593186372746
20.387417743195584 27.120140280561127
20.48472942924231 27.034348697394794
20.581886942680807 26.94855711422846
20.67889025233859 26.862765531062127
20.775739326446615 26.776973947895797
20.87243413262773 26.691182364729464
20.968974637884873 26.60539078156313
21.06536080858905 26.519599198396797
21.161592610467075 26.433807615230464
21.257670008589077 26.348016032064134
21.353592967355738 26.2622244488978
21.449361450485277 26.176432865731467
21.544975421000203 26.090641282565134
21.640434841213764 26.0048496993988
21.735739672716164 25.91905811623247
21.830889876360477 25.833266533066137
21.925885412248277 25.747474949899804
22.020726239715 25.66168336673347
22.11541231731499 25.575891783567137
22.209943602806266 25.490100200400807
22.304320053134962 25.404308617234474
22.398541624419458 25.31851703406814
22.492608271934188 25.232725450901807
22.58651995009313 25.146933867735473
22.680276612432948 25.061142284569144
22.773878211595804 24.97535070140281
22.8673246993118 24.889559118236477
22.96061602638109 24.803767535070143
23.05375214265558 24.717975951903814
23.14673299702033 24.63218436873748
23.23955853737449 24.546392785571147
23.33222871061189 24.460601202404813
23.42474346260124 24.37480961923848
23.517102738165875 24.28901803607215
23.609306481063157 24.203226452905817
23.701354633963366 24.117434869739483
23.793247138428203 24.03164328657315
23.884983934888858 23.945851703406817
23.976564962623577 23.860060120240487
24.067990159734816 23.774268537074153
24.159259463125863 23.68847695390782
24.250372808477017 23.602685370741487
24.341330130221245 23.516893787575153
24.432131361519335 23.431102204408823
24.522776434234544 23.34531062124249
24.613265278906667 23.259519038076157
24.703597824725612 23.173727454909823
24.793773999504396 23.08793587174349
24.883793729651554 23.00214428857716
24.973656940143005 22.916352705410826
25.063363554493275 22.830561122244493
25.152913494726135 22.74476953907816
25.24230668134462 22.658977955911826
25.331543033300385 22.573186372745496
25.42062246796244 22.487394789579163
25.509544901085167 22.40160320641283
25.598310246775718 22.315811623246496
25.686918417460642 22.230020040080163
25.775369323851855 22.144228456913833
25.86366287491185 22.0584368737475
25.951798977818136 21.972645290581166
26.03977753792696 21.886853707414833
26.12759845873619 21.8010621242485
26.215261641847437 21.71527054108217
26.30276698692732 21.629478957915836
26.39011439166791 21.543687374749503
26.477303751746305 21.45789579158317
26.56433496078331 21.372104208416836
26.65120791030123 21.286312625250506
26.737922489680756 21.200521042084173
26.824478586116832 21.11472945891784
26.91087608457364 21.028937875751506
26.997114867738535 20.943146292585173
27.083194815974984 20.857354709418843
27.169115807274473 20.77156312625251
27.25487771720731 20.685771543086176
27.3404804188724 20.599979959919843
27.42592378284583 20.51418837675351
27.51120767712838 20.42839679358718
27.596331967091807 20.342605210420846
27.681296515423963 20.256813627254513
27.76610118207267 20.17102204408818
27.850745824188344 20.085230460921846
27.935230296065317 19.999438877755516
28.019554449081866 19.913647294589182
28.103718131638857 19.82785571142285
28.187721189097022 19.742064128256516
28.27156346371283 19.656272545090182
28.355244794572872 19.570480961923852
28.438765017526798 19.48468937875752
28.522123965118695 19.398897795591186
28.605321466516916 19.313106212424852
28.68835734744232 19.22731462925852
28.771231430094858 19.14152304609219
28.853943533078493 19.055731462925856
28.936493471324376 18.969939879759522
29.01888105601229 18.88414829659319
29.101106094490266 18.79835671342686
29.183168390192378 18.712565130260526
29.265067742554585 18.626773547094192
29.3468039469287 18.54098196392786
29.42837679449431 18.455190380761525
29.509786072168705 18.369398797595196
29.591031562514694 18.283607214428862
29.67211304364626 18.19781563126253
29.75303028913206 18.112024048096195
29.833783067896654 18.026232464929862
29.91437114411944 17.940440881763532
29.994794277131216 17.8546492985972
30.075052221308336 17.768857715430865
30.15514472596438 17.683066132264532
30.235071535239282 17.5972745490982
30.31483238798586 17.51148296593187
30.394427017653687 17.425691382765535
30.473861297823554 17.339899799599202
30.553142947210066 17.25410821643287
30.63227411605424 17.168316633266535
30.711255243600842 17.082525050100205
30.790086328535562 16.996733466933872
30.86876736892077 16.91094188376754
30.947298362180778 16.825150300601205
31.025679305086957 16.73935871743487
31.103910193742728 16.653567134268542
31.181991023568454 16.56777555110221
31.259921789286196 16.481983967935875
31.3377024849044 16.39619238476954
31.415333103702515 16.31040080160321
31.49281363821552 16.22460921843688
31.570144080218462 16.138817635270545
31.647324420710902 16.05302605210421
31.72435464990142 15.967234468937876
31.8012347571921 15.881442885771545
31.877964731163075 15.795651302605211
31.954544559557153 15.70985971943888
32.03097422926451 15.624068136272546
32.10725372630753 15.538276553106213
32.183383035825855 15.452484969939881
32.25936214206152 15.366693386773548
32.33519102834444 15.280901803607216
32.41086967707813 15.195110220440883
32.48639806972576 15.10931863727455
32.561776186796536 15.023527054108218
32.6370040078326 14.937735470941885
32.71208151139635 14.851943887775553
32.787008675058296 14.76615230460922
32.86178547538556 14.680360721442888
32.93641188793105 14.594569138276555
33.01088788722337 14.508777555110221
33.08521344675756 14.42298597194389
33.159388538986796 14.337194388777556
33.233413135315075 14.251402805611225
33.307287206091 14.165611222444891
33.381010720602816 14.079819639278558
33.45458364707478 13.994028056112226
33.52800595266495 13.908236472945893
33.601277603464624 13.822444889779561
33.67439856449945 13.736653306613228
33.747368799732435 13.650861723446894
33.82018827206902 13.565070140280563
33.892856943364336 13.47927855711423
33.965374774432874 13.393486973947898
34.037741725060734 13.307695390781564
34.109957754020705 13.22190380761523
34.18202281909034 13.1361122244489
34.253936877073365 13.050320641282566
34.32569988382453 12.964529058116234
34.39731179427836 12.8787374749499
34.46877256248196 12.792945891783567
34.540082141632226 12.707154308617236
34.61124048411786 12.621362725450902
34.682247541566454 12.53557114228457
34.75310326489713 12.449779559118237
34.82380760437902 12.363987975951906
34.894360509696206 12.278196392785572
34.96476193001937 12.192404809619239
35.03501181408488 12.106613226452907
35.105110110281686 12.020821643286574
35.17505676674668 11.935030060120242
35.244851731469126 11.849238476953909
35.314494952404786 11.763446893787576
35.383986377600486 11.677655310621244
35.453325955329866 11.59186372745491
35.52251363424108 11.506072144288579
35.591549363517345 11.420280561122246
35.66043309305126 11.334488977955912
35.72916477363385 11.24869739478958
35.797744357159374 11.162905811623247
35.866171796847105 11.077114228456916
35.93444704748115 10.991322645290582
36.00257006566971 10.905531062124249
36.070540810125095 10.819739478957917
36.138359241966 10.733947895791584
36.20602532504354 10.648156312625252
36.27353902629283 10.562364729458919
36.34090031611183 10.476573146292585
36.40810916876941 10.390781563126254
36.47516556284471 10.30498997995992
36.54206948169996 10.219198396793589
36.60882091398918 10.133406813627255
36.67541985420521 10.047615230460922
36.74186630326787 9.96182364729459
36.80816026915608 9.876032064128257
36.87430176758709 9.790240480961925
36.9402908227461 9.704448897795592
37.006127468069906 9.618657314629258
37.07181174708833 9.532865731462927
37.1373437143276 9.447074148296593
37.20272916905411 9.361282565130262
37.26797675933494 9.275490981963928
37.33309012847224 9.189699398797597
37.398070285292086 9.103907815631263
37.46291773240203 9.01811623246493
37.527633000717685 8.932324649298598
37.592216651340415 8.846533066132265
37.65666927756368 8.760741482965933
37.72099150701718 8.6749498997996
37.78518400395867 8.589158316633267
37.84924747172412 8.503366733466935
37.91318265534775 8.417575150300602
37.97699034436413 8.33178356713427
38.04067137580594 8.245991983967937
38.10422663741147 8.160200400801603
38.16765707105759 8.074408817635272
38.23096367643484 7.988617234468938
38.29414751498274 7.902825651302606
38.35720971410489 7.817034068136273
38.420151471685 7.731242484969941
38.482974060926736 7.645450901803608
38.54567883554216 7.559659318637275
38.6082672353157 7.473867735470942
38.67074079207265 7.38807615230461
38.733101136083974 7.302284569138277
38.795350002941625 7.216492985971945
38.85748924094182 7.130701402805612
38.91952081901682 7.044909819639279
38.9814468352595 6.959118236472946
39.04326952608887 6.873326653306614
39.10499127610925 6.787535070140281
39.166614628720424 6.701743486973949
39.22814229754168 6.615951903807615
39.28957717871848 6.530160320641283
39.35092236418705 6.44436873747495
39.41218115597956 6.358577154308618
39.47335708166071 6.272785571142285
39.53445391099549 6.186993987975953
39.5954653781818 6.101202404809619
39.65635724114077 6.015410821643287
39.71710183675489 5.929619238476954
39.77769779796367 5.843827655310622
39.83814637917637 5.758036072144289
39.89844965476232 5.672244488977956
39.9586099077926 5.5864529058116235
40.018629646867886 5.500661322645291
40.07851162427874 5.414869739478958
40.138258855612065 5.329078156312626
40.19787464092837 5.2432865731462925
40.25736258764703 5.15749498997996
40.3167266352907 5.0717034068136275
40.375971082255596 4.985911823647295
40.43510061479213 4.9001202404809625
40.49412033840004 4.814328657314629
40.55303581186471 4.728537074148297
40.61185308418661 4.642745490981964
40.670578734684575 4.556953907815632
40.72921991658635 4.471162324649299
40.78778440445705 4.385370741482967
40.846280645858656 4.299579158316633
40.90471781768247 4.213787575150301
40.96310588765215 4.127995991983968
41.02145568155941 4.042204408817636
41.07977895686838 3.9564128256513027
41.13808848341046 3.87062124248497
41.19639813199078 3.7848296593186372
41.25472297184284 3.6990380761523047
41.31307937800252 3.6132464929859722
41.371485149830036 3.5274549098196393
41.42995964209279 3.4416633266533068
41.488523910239174 3.3558717434869743
41.54720087174925 3.2700801603206413
41.60601548575131 3.184288577154309
41.66499495345326 3.0984969939879763
41.72416894236683 3.0127054108216433
41.783569837816025 2.926913827655311
41.843233025838174 2.841122244488978
41.9031972123299 2.7553306613226454
41.963504784192 2.669539078156313
42.024202219324486 2.58374749498998
42.08534055366527 2.4979559118236474
42.14697591511581 2.4121643286573144
42.209170136236764 2.326372745490982
42.271991460131844 2.2405811623246494
42.335515357109664 2.1547895791583165
42.39982547370629 2.068997995991984
42.46501474071347 1.9832064128256515
42.53118667332464 1.8974148296593187
42.598456904837846 1.8116232464929862
42.6669550061728 1.7258316633266535
42.7368266576443 1.6400400801603208
42.80823625822887 1.5542484969939883
42.88137008274485 1.4684569138276555
42.95644013153293 1.3826653306613228
43.03368886422277 1.29687374749499
43.11339507482985 1.2110821643286573
43.195881258766626 1.1252905811623248
43.2815229577175 1.039498997995992
43.37076076920711 0.9537074148296594
43.46411601392595 0.8679158316633268
43.56221153586788 0.7821242484969941
43.66579989869254 0.6963326653306614
43.7758025933236 0.6105410821643287
43.89336632865798 0.5247494989979961
44.019947285520644 0.4389579158316634
44.15744455614658 0.3531663326653307
44.31040818247419 0.26737474949899803
44.48735181159537 0.18158316633266536
44.70389791126603 0.09579158316633267
44.98408614316132 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 42.82
0.11805569609279197 42.73420841683367
0.23597861826135275 42.64841683366734
0.353768762631506 42.56262525050101
0.4714261252746706 42.476833667334674
0.58895070220695 42.39104208416834
0.7063424893881578 42.30525050100201
0.8236014827208391 42.219458917835674
0.9407276780492773 42.13366733466934
1.0577210711584852 42.04787575150301
1.1745816577731822 41.96208416833667
1.291309433556755 41.87629258517034
1.4079043941101932 41.790501002004014
1.524366534971058 41.70470941883768
1.6406958516123378 41.61891783567135
1.756892339441384 41.533126252505014
1.8729559937987823 41.44733466933868
1.988886809957216 41.36154308617235
2.104684783120313 41.27575150300601
2.220349908421475 41.18995991983968
2.335882180922691 41.10416833667335
2.4512815956133274 41.01837675350701
2.5665481474088985 40.93258517034069
2.681681831149859 40.84679358717435
2.796682641600287 40.76100200400802
2.9115505734466396 40.67521042084169
3.0262856212964464 40.58941883767535
3.1408877796769885 40.50362725450902
3.255357043033959 40.41783567134269
3.369693405730105 40.33204408817635
3.4838968620438453 40.24625250501002
3.597967406167872 40.160460921843686
3.7119050322077167 40.07466933867736
3.8257097341803474 39.98887775551103
3.939381506012644 39.90308617234469
4.0529203415399495 39.81729458917836
4.166326234504551 39.731503006012026
4.279599178554146 39.64571142284569
4.392739167240287 39.55991983967936
4.505746194016802 39.474128256513026
4.618620252238188 39.38833667334669
4.731361335157986 39.30254509018036
4.843969435927121 39.21675350701403
4.956444547592253 39.1309619238477
5.068786663094028 39.045170340681366
5.180995775265379 38.95937875751503
5.293071876829765 38.8735871743487
5.405014960399384 38.787795591182366
5.516825018473369 38.70200400801603
5.628502043435949 38.6162124248497
5.740046027554583 38.530420841683366
5.851456962978067 38.44462925851703
5.962734841734602 38.358837675350706
6.073879655729882 38.27304609218437
6.184891396745052 38.18725450901804
6.295770056434738 38.101462925851706
6.406515626324992 38.01567134268537
6.517128097811218 37.92987975951904
6.627607462156071 37.844088176352706
6.737953710487311 37.75829659318637
6.848166833795639 37.67250501002004
6.958246822932479 37.58671342685371
7.068193668607782 37.50092184368738
7.178007361387692 37.415130260521046
7.287687891692281 37.32933867735471
7.397235249793193 37.24354709418838
7.506649425811266 37.157755511022046
7.615930409714118 37.07196392785571
7.725078191313693 36.98617234468938
7.8340927602637676 36.900380761523046
7.942974106057426 36.81458917835671
8.05172221802448 36.728797595190386
8.160337085328896 36.64300601202405
8.268818696966093 36.55721442885772
8.377167041760291 36.471422845691386
8.485382108361767 36.38563126252505
8.593463885244082 36.29983967935872
8.701412360701267 36.214048096192386
8.80922752284496 36.12825651302605
8.916909359601497 36.04246492985972
9.02445785870897 35.956673346693385
9.131873007714212 35.87088176352706
9.239154793969796 35.785090180360726
9.346303204630885 35.69929859719439
9.453318226652137 35.61350701402806
9.560199846784496 35.527715430861726
9.666948051571964 35.44192384769539
9.773562827348307 35.35613226452906
9.880044160233712 35.270340681362725
9.9863920361314 35.18454909819639
10.092606440724175 35.09875751503006
10.198687359470917 35.01296593186373
10.304634777603056 34.9271743486974
10.410448680120913 34.841382765531066
10.516129051790067 34.75559118236473
10.621675877137612 34.6697995991984
10.72708914044838 34.584008016032065
10.832368825761087 34.49821643286573
10.937514916864433 34.4124248496994
11.04252739729313 34.326633266533065
11.14740625032387 34.24084168336673
11.252151458971225 34.155050100200405
11.356763005983513 34.06925851703407
11.461240873838525 33.98346693386774
11.565585044739267 33.897675350701405
11.66979550060958 33.81188376753507
11.773872223089715 33.72609218436874
11.877815193531829 33.640300601202405
11.981624392995403 33.55450901803607
12.0852998022426 33.46871743486974
12.188841401733539 33.382925851703405
12.292249171621487 33.29713426853708
12.395523091748018 33.211342685370745
12.498663141638003 33.12555110220441
12.601669300494613 33.03975951903808
12.704541547194198 32.953967935871745
12.807279860281078 32.86817635270541
12.90988421796227 32.78238476953908
13.012354598102117 32.696593186372745
13.114690978216833 32.61080160320641
13.21689333546895 32.525010020040085
13.318961646661716 32.43921843687375
13.420895888233328 32.35342685370742
13.522696036251139 32.267635270541085
13.624362066405741 32.18184368737475
13.725893954004952 32.09605210420842
13.827291673967714 32.010260521042085
13.928555200817874 31.924468937875755
14.029684508677894 31.838677354709425
14.130679571262426 31.75288577154309
14.23154036187179 31.66709418837676
14.332266853385356 31.581302605210425
14.432859018254812 31.49551102204409
14.533316828497309 31.40971943887776
14.633640255688526 31.32392785571143
14.733829270955571 31.238136272545095
14.833883844969804 31.15234468937876
14.93380394793953 31.066553106212428
15.033589549602565 30.980761523046098
15.133240619218693 30.894969939879765
15.232757125561973 30.80917835671343
15.33213903691294 30.723386773547098
15.431386321050674 30.637595190380765
15.53049894524472 30.551803607214435
15.629476876246903 30.4660120240481
15.72832008028297 30.380220440881768
15.827028523044115 30.294428857715435
15.925602169678363 30.2086372745491
16.024040984781795 30.12284569138277
16.122344932389645 30.037054108216438
16.220513975967222 29.951262525050105
16.318548078400703 29.86547094188377
16.416447201987754 29.77967935871744
16.514211308428013 29.693887775551108
16.611840358813378 29.608096192384775
16.70933431361816 29.52230460921844
16.806693132689066 29.436513026052108
16.90391677523499 29.350721442885778
17.001005199816667 29.264929859719444
17.097958364336108 29.17913827655311
17.19477622602589 29.093346693386778
17.291458741438245 29.007555110220444
17.388005866433957 28.921763527054114
17.48441755617111 28.83597194388778
17.580693765093564 28.750180360721448
17.676834446919322 28.664388777555114
17.772839554628636 28.57859719438878
17.86870904045192 28.49280561122245
17.9644428558575 28.407014028056118
18.060040951539058 28.321222444889784
18.155503277402968 28.23543086172345
18.25082978255532 28.149639278557117
18.34602041528879 28.063847695390788
18.44107512306924 27.978056112224454
18.53599385252208 27.89226452905812
18.630776549418428 27.806472945891787
18.72542315866101 27.720681362725454
18.81993362426979 27.634889779559124
18.914307889367414 27.54909819639279
19.008545896164307 27.463306613226457
19.10264758594359 27.377515030060124
19.19661289904569 27.29172344689379
19.290441774852685 27.20593186372746
19.3841341517724 27.120140280561127
19.47768996722217 27.034348697394794
19.571109157612355 26.94855711422846
19.66439165832957 26.862765531062127
19.757537403719585 26.776973947895797
19.850546327069953 26.691182364729464
19.9434183605923 26.60539078156313
20.036153435404326 26.519599198396797
20.12875148151147 26.433807615230464
20.22121242778824 26.348016032064134
20.31353620195927 26.2622244488978
20.405722730579917 26.176432865731467
20.49777193901664 26.090641282565134
20.589683751426943 26.0048496993988
20.681458090738985 25.91905811623247
20.773094878630843 25.833266533066137
20.864594035509352 25.747474949899804
20.955955480488605 25.66168336673347
21.047179131368047 25.575891783567137
21.13826490461018 25.490100200400807
21.22921271531786 25.404308617234474
21.32002247721118 25.31851703406814
21.410694102603916 25.232725450901807
21.501227502379596 25.146933867735473
21.59162258596707 25.061142284569144
21.68187926131568 24.97535070140281
21.77199743486994 24.889559118236477
21.8619770115438 24.803767535070143
21.95181789469437 24.717975951903814
22.041519986095235 24.63218436873748
22.131083185909223 24.546392785571147
22.2205073926607 24.460601202404813
22.309792503207348 24.37480961923848
22.39893841271141 24.28901803607215
22.487945014610435 24.203226452905817
22.57681220058744 24.117434869739483
22.66553986054054 24.03164328657315
22.75412788255202 23.945851703406817
22.84257615285681 23.860060120240487
22.930884555810422 23.774268537074153
23.019052973856205 23.68847695390782
23.107081287492072 23.602685370741487
23.194969375236553 23.516893787575153
23.28271711359423 23.431102204408823
23.370324377020548 23.34531062124249
23.4577910378859 23.259519038076157
23.54511696643911 23.173727454909823
23.632302030770173 23.08793587174349
23.719346096772327 23.00214428857716
23.80624902810341 22.916352705410826
23.89301068614644 22.830561122244493
23.979630929969517 22.74476953907816
24.06610961628491 22.658977955911826
24.15244659940739 22.573186372745496
24.238641731211803 22.487394789579163
24.32469486108975 22.40160320641283
24.410605835905535 22.315811623246496
24.496374499951223 22.230020040080163
24.58200069490085 22.144228456913833
24.667484259763764 22.0584368737475
24.752825030837062 21.972645290581166
24.83802284165712 21.886853707414833
24.923077522950216 21.8010621242485
25.007988902582152 21.71527054108217
25.09275680550698 21.629478957915836
25.177381053714665 21.543687374749503
25.261861466177805 21.45789579158317
25.346197858797286 21.372104208416836
25.430390044346886 21.286312625250506
25.514437832416856 21.200521042084173
25.598343372429525 21.11472945891784
25.68211315407838 21.028937875751506
25.76575174457193 20.943146292585173
25.849259714096803 20.857354709418843
25.932637309541242 20.77156312625251
26.01588453001807 20.685771543086176
26.09900137427483 20.599979959919843
26.181987840686656 20.51418837675351
26.26484392724908 20.42839679358718
26.347569631570803 20.342605210420846
26.4301649508664 20.256813627254513
26.512629881948982 20.17102204408818
26.594964421222837 20.085230460921846
26.677168564676 19.999438877755516
26.759242307872814 19.913647294589182
26.841185645946457 19.82785571142285
26.922998573591435 19.742064128256516
27.004681085056077 19.656272545090182
27.086233174135007 19.570480961923852
27.167654834161624 19.48468937875752
27.24894605800056 19.398897795591186
27.33010683804017 19.313106212424852
27.411137166185043 19.22731462925852
27.492037033848522 19.14152304609219
27.57280643194529 19.055731462925856
27.653445350883956 18.969939879759522
27.733953780559755 18.88414829659319
27.814331710347265 18.79835671342686
27.89457912909325 18.712565130260526
27.97469602510955 18.626773547094192
28.054682386166128 18.54098196392786
28.134538199484183 18.455190380761525
28.214263451729447 18.369398797595196
28.293858129005628 18.283607214428862
28.37332221684798 18.19781563126253
28.45265570021712 18.112024048096195
28.531858563493024 18.026232464929862
28.61093079046924 17.940440881763532
28.68987236434739 17.8546492985972
28.76868326773191 17.768857715430865
28.847363482625095 17.683066132264532
28.92591299042251 17.5972745490982
29.004331771908685 17.51148296593187
29.08261980725326 17.425691382765535
29.16077707600749 17.339899799599202
29.238803557101242 17.25410821643287
29.316699228840438 17.168316633266535
29.394464068905037 17.082525050100205
29.472098054347583 16.996733466933872
29.54960116159232 16.91094188376754
29.626973366434985 16.825150300601205
29.70421464404327 16.73935871743487
29.781324968958035 16.653567134268542
29.85830431509532 16.56777555110221
29.935152655749167 16.481983967935875
30.011869963595387 16.39619238476954
30.08845621069628 16.31040080160321
30.16491136850636 16.22460921843688
30.241235407879245 16.138817635270545
30.317428299075633 16.05302605210421
30.393490011772595 15.967234468937876
30.469420515074162 15.881442885771545
30.545219777523357 15.795651302605211
30.62088776711569 15.70985971943888
30.696424451314304 15.624068136272546
30.77182979706679 15.538276553106213
30.84710377082382 15.452484969939881
30.922246338559727 15.366693386773548
30.99725746579507 15.280901803607216
31.07213711762144 15.195110220440883
31.146885258728513 15.10931863727455
31.22150185343356 15.023527054108218
31.295986865713566 14.937735470941885
31.37034025924007 14.851943887775553
31.444561997416937 14.76615230460922
31.518652043421206 14.680360721442888
31.592610360247228 14.594569138276555
31.66643691075425 14.508777555110221
31.7401316577177 14.42298597194389
31.813694563884358 14.337194388777556
31.887125592031623 14.251402805611225
31.960424705031212 14.165611222444891
32.03359186591741 14.079819639278558
32.10662703796027 13.994028056112226
32.179530184744 13.908236472945893
32.25230127025078 13.822444889779561
32.324940258950456 13.736653306613228
32.39744711589633 13.650861723446894
32.469821806827504 13.565070140280563
32.54206429827807 13.47927855711423
32.614174557693595 13.393486973947898
32.68615255355532 13.307695390781564
32.75799825551248 13.22190380761523
32.82971163452334 13.1361122244489
32.901292663005215 13.050320641282566
32.972741314994266 12.964529058116234
33.04405756631545 12.8787374749499
33.11524139476328 12.792945891783567
33.186292780293996 12.707154308617236
33.25721170522985 12.621362725450902
33.327998154476134 12.53557114228457
33.39865211575176 12.449779559118237
33.46917357983412 12.363987975951906
33.53956254081907 12.278196392785572
33.60981899639692 12.192404809619239
33.67994294814533 12.106613226452907
33.74993440184014 12.020821643286574
33.81979336778508 11.935030060120242
33.88951986116157 11.849238476953909
33.959113902399636 11.763446893787576
34.02857551757133 11.677655310621244
34.0979047388078 11.59186372745491
34.167101604741454 11.506072144288579
34.23616802338304 11.420280561122246
34.30511127877856 11.334488977955912
34.37393720363919 11.24869739478958
34.44264671487873 11.162905811623247
34.51124046849496 11.077114228456916
34.57971882202794 10.991322645290582
34.648082149486754 10.905531062124249
34.71633084224327 10.819739478957917
34.78446530997601 10.733947895791584
34.852485981666845 10.648156312625252
34.920393306653935 10.562364729458919
34.98818775574391 10.476573146292585
35.055869822386974 10.390781563126254
35.123440023918626 10.30498997995992
35.1908989028719 10.219198396793589
35.25824702836442 10.133406813627255
35.32548499756465 10.047615230460922
35.39261343724221 9.96182364729459
35.4596330054073 9.876032064128257
35.52654439304457 9.790240480961925
35.593348325947325 9.704448897795592
35.660045566658106 9.618657314629258
35.72663691652224 9.532865731462927
35.79312321786134 9.447074148296593
35.859505356274234 9.361282565130262
35.92578426307318 9.275490981963928
35.991960917864084 9.189699398797597
36.05803635127954 9.103907815631263
36.124011647874646 9.01811623246493
36.18988794919584 8.932324649298598
36.25566645703399 8.846533066132265
36.32134843687352 8.760741482965933
36.38693522155054 8.6749498997996
36.45242821513342 8.589158316633267
36.5178288970408 8.503366733466935
36.58313882641247 8.417575150300602
36.64835964675037 8.33178356713427
36.7134930908477 8.245991983967937
36.77854098602582 8.160200400801603
36.84350525970006 8.074408817635272
36.908387945297086 7.988617234468938
36.97319118854833 7.902825651302606
37.03791725418594 7.817034068136273
37.102568533069814 7.731242484969941
37.16714754977645 7.645450901803608
37.23165697068315 7.559659318637275
37.296099612583546 7.473867735470942
37.3604588968638 7.38807615230461
37.42470431162644 7.302284569138277
37.4888218028035 7.216492985971945
37.55280990353413 7.130701402805612
37.61666939937871 7.044909819639279
37.68040171662944 6.959118236472946
37.74400839984512 6.873326653306614
37.80749111965541 6.787535070140281
37.87085168106867 6.701743486973949
37.93409203231815 6.615951903807615
37.99721427428394 6.530160320641283
38.06022067053137 6.44436873747495
38.123113658009466 6.358577154308618
38.18589585845703 6.272785571142285
38.24857009056772 6.186993987975953
38.311139382969756 6.101202404809619
38.37360698808099 6.015410821643287
38.435976396905026 5.929619238476954
38.49825135484027 5.843827655310622
38.56043587857996 5.758036072144289
38.62253427418869 5.672244488977956
38.68455115644868 5.5864529058116235
38.7464914695781 5.500661322645291
38.80836050943348 5.414869739478958
38.870163947319234 5.329078156312626
38.93190785553981 5.2432865731462925
38.99359873484339 5.15749498997996
39.055243543921726 5.0717034068136275
39.116849731147916 4.985911823647295
39.17842526875315 4.9001202404809625
39.239978689665676 4.814328657314629
39.30151912725952 4.728537074148297
39.3630563582887 4.642745490981964
39.42460084931409 4.556953907815632
39.4861638069658 4.471162324649299
39.54775723242492 4.385370741482967
39.60939398055459 4.299579158316633
39.67108782416329 4.213787575150301
39.732853523943845 4.127995991983968
39.794706904700924 4.042204408817636
39.85666493855927 3.9564128256513027
39.918745835936875 3.87062124248497
39.98096914517284 3.7848296593186372
40.04335586182223 3.6990380761523047
40.10592854877206 3.6132464929859722
40.16871146849785 3.5274549098196393
40.231730728972465 3.4416633266533068
40.29501444496455 3.3558717434869743
40.35859291672775 3.2700801603206413
40.422498828393174 3.184288577154309
40.486767468744674 3.0984969939879763
40.551436977491726 3.0127054108216433
40.616548620672134 2.926913827655311
40.68214709943468 2.841122244488978
40.74828089719228 2.7553306613226454
40.81500267102752 2.669539078156313
40.88236969431013 2.58374749498998
40.95044435879488 2.4979559118236474
41.01929474606661 2.4121643286573144
41.08899528016014 2.326372745490982
41.15962747560352 2.2405811623246494
41.231280798138314 2.1547895791583165
41.304053659125664 2.068997995991984
41.378054569371855 1.9832064128256515
41.453403484095276 1.8974148296593187
41.530233378407864 1.8116232464929862
41.608692102544246 1.7258316633266535
41.68894457889956 1.6400400801603208
41.77117541979916 1.5542484969939883
41.855592067342734 1.4684569138276555
41.94242858685405 1.3826653306613228
42.031950286696514 1.29687374749499
42.12445939442829 1.2110821643286573
42.220302100117344 1.1252905811623248
42.31987739427955 1.039498997995992
42.423648300291056 0.9537074148296594
42.53215636317217 0.8679158316633268
42.646040668433116 0.7821242484969941
42.76606333791741 0.6963326653306614
42.89314460389153 0.6105410821643287
43.02841265887782 0.5247494989979961
43.17327756020756 0.4389579158316634
43.330829725471716 0.3531663326653307
43.5065660928558 0.26737474949899803
43.70860855237439 0.18158316633266536
43.95235326660341 0.09579158316633267
44.25102111629877 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 80.0
0.16713525463015264 79.83969939879759
0.33406473805004305 79.6793987975952
0.5007884444544184 79.51909819639279
0.6673063680316278 79.35879759519038
0.8336185029635974 79.19849699398797
0.9997248434257149 79.03819639278558
1.1656253835868005 78.87789579158317
1.3313201176089287 78.71759519038076
1.4968090396473945 78.55729458917835
1.662092143850605 78.39699398797595
1.8271694243599683 78.23669338677355
1.9920408753098522 78.07639278557114
2.1567064908273967 77.91609218436874
2.3211662650324683 77.75579158316633
2.485420192037525 77.59549098196393
2.6494682659475672 77.43519038076153
2.813310480859938 77.27488977955912
2.97694683086427 77.11458917835671
3.1403773100423384 76.95428857715432
3.303601912468001 76.79398797595191
3.466620632206991 76.6336873747495
3.6294334633168486 76.47338677354709
3.7920403998467678 76.3130861723447
3.9544414358375213 76.15278557114229
4.116636565321244 75.99248496993988
4.278625782321351 75.83218436873747
4.440409080852373 75.67188376753508
4.601986454919871 75.51158316633267
4.763357898520203 75.35128256513026
4.924523405640434 75.19098196392785
5.085482970258169 75.03068136272545
5.246236586341382 74.87038076152305
5.406784247848318 74.71008016032064
5.567125948727237 74.54977955911824
5.727261682916312 74.38947895791583
5.8871914443434274 74.22917835671343
6.0469152269260595 74.06887775551102
6.206433024571017 73.90857715430862
6.365744831174311 73.74827655310621
6.524850640620946 73.58797595190381
6.683750446784783 73.4276753507014
6.842444243528258 73.267374749499
7.0009320247022435 73.10707414829659
7.1592137841458126 72.9467735470942
7.31728951568609 72.78647294589179
7.475159213137954 72.62617234468938
7.632822870303875 72.46587174348697
7.790280480973665 72.30557114228458
7.947532038924305 72.14527054108217
8.10457753791963 71.98496993987976
8.261416971710144 71.82466933867735
8.418050334032769 71.66436873747494
8.574477618610576 71.50406813627255
8.73069881915259 71.34376753507014
8.886713929353444 71.18346693386773
9.042522942893175 71.02316633266533
9.198125853436917 70.86286573146293
9.353522654634682 70.70256513026052
9.508713340120996 70.54226452905812
9.66369790351466 70.38196392785571
9.818476338418428 70.22166332665331
9.973048638418758 70.0613627254509
10.127414797085422 69.9010621242485
10.28157480797124 69.74076152304609
10.43552866461173 69.5804609218437
10.589276360524838 69.42016032064129
10.742817889210507 69.25985971943888
10.896153244150392 69.09955911823647
11.049282418807483 68.93925851703408
11.202205406625788 68.77895791583167
11.354922201029893 68.61865731462926
11.50743279542463 68.45835671342685
11.659737183194682 68.29805611222444
11.811835357704176 68.13775551102205
11.96372731229633 67.97745490981964
12.115413040292964 67.81715430861723
12.266892534994133 67.65685370741483
12.418165789677664 67.49655310621243
12.569232797598776 67.33625250501002
12.72009355198955 67.17595190380761
12.870748046058516 67.0156513026052
13.021196272990165 66.85535070140281
13.17143822594452 66.6950501002004
13.321473898056563 66.534749498998
13.471303282435787 66.37444889779559
13.62092637216566 66.2141482965932
13.770343160303154 66.05384769539079
13.919553639878124 65.89354709418838
14.068557803892825 65.73324649298597
14.217355645321316 65.57294589178358
14.365947157108948 65.41264529058117
14.514332332171698 65.25234468937876
14.662511163395624 65.09204408817635
14.810483643636248 64.93174348697394
14.958249765717909 64.77144288577155
15.105809522433189 64.61114228456914
15.253162906542174 64.45084168336673
15.400309910771849 64.29054108216432
15.547250527815386 64.13024048096193
15.69398475033151 63.969939879759515
15.840512570943682 63.80963927855711
15.986833982239466 63.649338677354706
16.132948976769757 63.4890380761523
16.278857547048005 63.3287374749499
16.42455968554947 63.16843687374749
16.570055384710404 63.00813627254509
16.71534463692726 62.84783567134268
16.86042743455584 62.68753507014028
17.005303769910494 62.52723446893787
17.149973635263198 62.36693386773547
17.294437022842725 62.20663326653306
17.438693924833697 62.04633266533066
17.5827443333757 61.88603206412825
17.726588240562307 61.72573146292585
17.870225638440154 61.56543086172344
18.013656519007906 61.405130260521034
18.156880874215283 61.24482965931863
18.299898695962035 61.084529058116225
18.442709976096864 60.92422845691382
18.58531470641638 60.763927855711415
18.72771287866396 60.603627254509014
18.869904484528682 60.443326653306606
19.01188951564411 60.283026052104205
19.15366796358719 60.1227254509018
19.295239819876986 59.962424849699396
19.436605075973514 59.80212424849699
19.57776372327643 59.641823647294586
19.718715753123806 59.48152304609218
19.859461156790765 59.32122244488978
19.999999925488197 59.16092184368737
20.140332050361344 59.00062124248497
20.28045752248844 58.84032064128256
20.420376332879247 58.68002004008016
20.560088472473627 58.51971943887775
20.69959393214001 58.35941883767535
20.83889270267392 58.19911823647294
20.977984774796354 58.03881763527053
21.116870139152223 57.87851703406813
21.25554878630873 57.718216432865724
21.394020706753658 57.55791583166332
21.53228589089372 57.397615230460914
21.670344329052767 57.23731462925851
21.808196011470045 57.077014028056105
21.945840928298335 56.916713426853704
22.083279069602135 56.756412825651296
22.220510425355712 56.596112224448895
22.357534985441198 56.43581162324649
22.49435273964655 56.275511022044086
22.630963677663576 56.11521042084168
22.767367789085785 55.954909819639276
22.90356506340633 55.79460921843687
23.03955549001576 55.63430861723447
23.175339058199874 55.47400801603206
23.310915757137373 55.31370741482966
23.446285575897594 55.15340681362725
23.58144850343808 54.99310621242485
23.716404528602197 54.83280561122244
23.851153640116614 54.67250501002003
23.985695826588763 54.51220440881763
24.12003107650427 54.35190380761522
24.254159378224237 54.19160320641282
24.388080719982597 54.03130260521041
24.52179508988326 53.87100200400801
24.655302475897322 53.710701402805604
24.788602865860124 53.5504008016032
24.921696247468297 53.390100200400795
25.0545826082767 53.229799599198394
25.187261935695332 53.069498997995986
25.319734216986117 52.909198396793585
25.45199943925968 52.748897795591176
25.58405758947199 52.588597194388775
25.715908654420975 52.42829659318637
25.847552620743016 52.267995991983966
25.978989474909405 52.10769539078156
26.11021920322267 51.94739478957916
26.24124179181288 51.78709418837675
26.372057226633782 51.62679358717435
26.502665493458952 51.46649298597194
26.633066577877752 51.30619238476954
26.763260465291278 51.14589178356713
26.893247140908148 50.98559118236472
27.023026589740244 50.82529058116232
27.152598796598348 50.66498997995991
27.281963746087623 50.50468937875751
27.411121422603074 50.3443887775551
27.540071810324818 50.1840881763527
27.668814893213327 50.023787575150294
27.797350655004475 49.86348697394789
27.92567907920456 49.703186372745485
28.05380014908511 49.542885771543084
28.18171384767767 49.382585170340676
28.309420157768376 49.222284569138274
28.43691906189247 49.061983967935866
28.564210542328635 48.901683366733465
28.69129458109325 48.74138276553106
28.818171159934437 48.581082164328656
28.944840260326067 48.42078156312625
29.071301863461503 48.26048096192385
29.197555950247317 48.10018036072144
29.323602501296758 47.93987975951904
29.449441496923143 47.77957915831663
29.57507291713302 47.61927855711422
29.700496741619226 47.45897795591182
29.82571294975377 47.29867735470941
29.95072152058049 47.13837675350701
30.075522432807634 46.9780761523046
30.20011566480015 46.8177755511022
30.32450119457191 46.65747494989979
30.448678999777613 46.49717434869739
30.57264905770465 46.336873747494984
30.696411345264607 46.17657314629258
30.819965838984718 46.016272545090175
30.94331251499898 45.85597194388777
31.066451349039156 45.695671342685365
31.189382316425476 45.535370741482964
31.3121053920572 45.375070140280556
31.43462055040285 45.214769539078155
31.556927765490304 45.05446893787575
31.679027010896565 44.894168336673346
31.800918259737347 44.73386773547094
31.92260148465635 44.57356713426854
32.04407665781432 44.41326653306613
32.16534375087781 44.25296593186372
32.28640273500765 44.09266533066132
32.4072535808472 43.93236472945891
32.52789625851022 43.77206412825651
32.64833073756853 43.6117635270541
32.76855698703928 43.4514629258517
32.888574975372 43.29116232464929
33.00838467043521 43.13086172344689
33.12798603950282 42.97056112224448
33.247379049240074 42.81026052104208
33.36656366568924 42.649959919839674
33.48553985425489 42.48965931863727
33.60430757968881 42.329358717434864
33.72286680607454 42.16905811623246
33.841217496811566 42.008757515030055
33.959359614598995 41.848456913827654
34.07729312141897 41.688156312625246
34.19501797851952 41.527855711422845
34.31253414639713 41.36755511022044
34.42984158477867 41.207254509018036
34.54694025260308 41.04695390781563
34.66383010800239 40.88665330661322
34.78051110828239 40.72635270541082
34.896983209902785 40.56605210420841
35.013246368456734 40.40575150300601
35.12930053865002 40.2454509018036
35.245145674279534 40.0851503006012
35.360781728211336 39.92484969939879
35.47620865235801 39.76454909819639
35.59142639765558 39.60424849699398
35.706434914039676 39.44394789579158
35.82123415042119 39.28364729458917
35.93582405466124 39.12334669338677
36.050204573545514 38.96304609218436
36.16437565275787 38.80274549098196
36.27833723685334 38.642444889779554
36.39208926923033 38.48214428857715
36.50563169210217 38.321843687374745
36.61896444646781 38.161543086172344
36.73208747208184 38.001242484969936
36.84500070742364 37.840941883767535
36.95770408966574 37.68064128256513
37.070197554641325 37.52034068136272
37.18248103681086 37.36004008016032
37.294554469227855 37.19973947895791
37.40641778350363 37.03943887775551
37.51807090977123 36.8791382765531
37.62951377664829 36.7188376753507
37.740746311198905 36.55853707414829
37.851768438894496 36.39823647294589
37.96258008357358 36.23793587174348
38.07318116740042 36.07763527054108
38.18357161082264 35.91733466933867
38.29375133252751 35.75703406813627
38.40372024939723 35.59673346693386
38.51347827646278 35.43643286573146
38.623025326856656 35.27613226452905
38.732361311764194 35.11583166332665
38.841486140373604 34.955531062124244
38.950399719824546 34.79523046092184
39.05910195515535 34.634929859719435
39.16759274924867 34.474629258517034
39.275872002775714 34.314328657314626
39.3839396141388 34.15402805611222
39.491795479412346 33.993727454909816
39.59943949228223 33.83342685370741
39.70687154398332 33.67312625250501
39.81409152323534 33.5128256513026
39.92109931617683 33.3525250501002
40.02789480629727 33.19222444889779
40.13447787436722 33.03192384769539
40.24084839836649 32.87162324649298
40.34700625341019 32.71132264529058
40.45295131167273 32.55102204408817
40.55868344230947 32.39072144288577
40.6642025113763 32.23042084168336
40.76950838174669 32.07012024048096
40.87460091302642 31.909819639278556
40.97947996146579 31.74951903807615
41.08414537986927 31.589218436873747
41.18859701750243 31.428917835671342
41.292834719996215 31.268617234468937
41.396858329248325 31.108316633266533
41.50066768332168 30.948016032064128
41.604262616339874 30.787715430861724
41.707642958379516 30.62741482965932
41.81080853535932 30.467114228456914
41.91375916892593 30.30681362725451
42.01649467633623 30.146513026052105
42.11901487033617 29.9862124248497
42.22131955903592 29.825911823647296
42.32340854578118 29.66561122244489
42.42528162902067 29.505310621242486
42.52693860216951 29.345010020040082
42.628379253468445 29.184709418837677
42.72960336583878 29.02440881763527
42.830610716732785 28.864108216432864
42.9314010779796 28.70380761523046
43.03197421562627 28.543507014028055
43.13232988977391 28.38320641282565
43.23246785440877 28.222905811623246
43.33238785722805 28.06260521042084
43.43208963946024 27.902304609218437
43.53157293567985 27.742004008016032
43.63083747361634 27.581703406813627
43.72988297395699 27.421402805611223
43.828709150143595 27.261102204408818
43.927315708162666 27.100801603206413
44.02570234632903 26.94050100200401
44.123868755062475 26.780200400801604
44.221814616657355 26.6198997995992
44.31953960504472 26.459599198396795
44.4170433855469 26.29929859719439
44.514325614624134 26.138997995991986
44.611385939613086 25.97869739478958
44.70822399845685 25.818396793587176
44.804839419426244 25.65809619238477
44.901231820832024 25.497795591182363
44.99740081072773 25.33749498997996
45.09334598660287 25.177194388777554
45.189066935065966 25.01689378757515
45.28456323151731 24.856593186372745
45.37983443981088 24.69629258517034
45.47488011190513 24.535991983967936
45.56969978750229 24.37569138276553
45.66429299367563 24.215390781563126
45.75865924448445 24.05509018036072
45.85279804057618 23.894789579158317
45.94670886877532 23.734488977955913
46.04039120165851 23.574188376753508
46.13384449711553 23.413887775551103
46.227068197895484 23.2535871743487
46.320061731137756 23.093286573146294
46.41282450788721 22.93298597194389
46.50535592259301 22.772685370741485
46.59765535259054 22.61238476953908
46.68972828343022 22.452084168336675
46.781591894934756 22.29178356713427
46.873258589408394 22.131482965931863
46.964729457462816 21.971182364729458
47.05600463342356 21.810881763527053
47.14708425265793 21.65058116232465
47.2379684515823 21.490280561122244
47.32865736767084 21.32997995991984
47.41915113946602 21.169679358717435
47.509449906590845 21.00937875751503
47.59955380976344 20.849078156312626
47.689462990813915 20.68877755511022
47.779177592704045 20.528476953907816
47.86869775955004 20.36817635270541
47.95802363664879 20.207875751503007
48.04715537050797 20.047575150300602
48.13609310888054 19.887274549098198
48.22483700080402 19.726973947895793
48.31338719664531 19.56667334669339
48.4017438481514 19.406372745490984
48.48990710850689 19.24607214428858
48.577877132398925 19.085771543086175
48.665654076090405 18.92547094188377
48.7532380975024 18.76517034068136
48.84062935630667 18.604869739478957
48.927828014029565 18.444569138276552
49.01483423416827 18.284268537074148
49.10164818232089 18.123967935871743
49.18827002633179 17.96366733466934
49.27469993645373 17.803366733466934
49.36093808552857 17.64306613226453
49.446984649188565 17.482765531062125
49.53283980608019 17.32246492985972
49.618503738113006 17.162164328657315
49.70397663073599 17.00186372745491
49.78925867324422 16.841563126252506
49.87435005911901 16.6812625250501
49.95925098640481 16.520961923847697
50.043961658126726 16.360661322645292
50.12848228275268 16.200360721442888
50.212813074704805 16.040060120240483
50.29695425492496 15.879759519038075
50.380906051499935 15.71945891783567
50.46466870035226 15.559158316633265
50.54824244600334 15.39885771543086
50.63162754241612 15.238557114228456
50.714824253925336 15.078256513026052
50.797832856264215 14.917955911823647
50.88065363769728 14.757655310621242
50.96328690027001 14.597354709418838
51.04573296118719 14.437054108216431
51.127992154332844 14.276753507014027
51.21006483194625 14.116452905811622
51.29195136646969 13.956152304609217
51.373652152585464 13.795851703406813
51.45516760946135 13.635551102204408
51.53649818322577 13.475250501002003
51.617644349696086 13.314949899799599
51.69860661738592 13.154649298597194
51.77938553082005 12.99434869739479
51.859997377378576 12.834048096192385
51.940470139903056 12.673747494989978
52.020817710343564 12.513446893787574
52.101043131727295 12.35314629258517
52.18114871928441 12.192845691382765
52.26113691037399 12.03254509018036
52.341010274159125 11.872244488977955
52.42077152218919 11.71194388777555
52.50042351998291 11.551643286573146
52.57996929971611 11.391342685370741
52.659412074129975 11.231042084168337
52.73875525178858 11.07074148296593
52.8180024538295 10.910440881763526
52.89715753236777 10.750140280561121
52.9762245907325 10.589839679358716
53.05520800573647 10.429539078156312
53.1341124522032 10.269238476953907
53.21294293000315 10.108937875751502
53.291704793881614 9.948637274549098
53.37040378639588 9.788336673346693
53.44904607431941 9.628036072144289
53.527638288916116 9.467735470941884
53.60618757054037 9.307434869739478
53.68470161807782 9.147134268537073
53.76318874381103 8.986833667334668
53.841657934373046 8.826533066132264
53.920118918543174 8.666232464929859
53.99858224274524 8.505931863727454
54.07705935523119 8.34563126252505
54.1555627000758 8.185330661322645
54.23410582227539 8.02503006012024
54.31270348543876 7.864729458917835
54.39137180378868 7.70442885771543
54.47012839046343 7.544128256513026
54.54899252442924 7.383827655310621
54.62798533869604 7.2235270541082155
54.70713003298487 7.063226452905811
54.78639077236708 6.902925851703406
54.8656671752427 6.742625250501002
54.94490987977844 6.582324649298597
55.02413071285859 6.422024048096192
55.10334829033552 6.261723446893787
55.18258344018353 6.101422845691382
55.26185947485493 5.9411222444889775
55.34120250050544 5.780821643286573
55.420641768914145 5.620521042084168
55.50021007903053 5.460220440881763
55.579944236439935 5.299919839679358
55.65988558071507 5.1396192384769535
55.74008059270073 4.979318637274549
55.82058159637453 4.819018036072144
55.90144757318593 4.658717434869739
55.98274511089628 4.498416833667334
56.06454951418689 4.338116232464929
56.14694611102537 4.177815631262525
56.23003179746609 4.01751503006012
56.313916874873435 3.857214428857715
56.39872724841941 3.6969138276553104
56.48460707541674 3.5366132264529053
56.57172197844761 3.3763126252505007
56.66026297398809 3.216012024048096
56.75045131617868 3.055711422845691
56.842544523282776 2.8954108216432863
56.936843949828585 2.7351102204408813
57.03370440364967 2.5748096192384766
57.133546504624924 2.414509018036072
57.23687277369295 2.254208416833667
57.344288880173586 2.0939078156312623
57.4565321519782 1.9336072144288576
57.57451052057477 1.7733066132264528
57.69935680289275 1.6130060120240481
57.832506115155404 1.4527054108216433
57.975809220578434 1.2924048096192384
58.13170362498847 1.1321042084168336
58.30348118145025 0.9718036072144288
58.49572437647055 0.8115030060120241
58.715052349153865 0.6512024048096192
58.97145636708799 0.4909018036072144
59.276292273963826 0.3306012024048096
59.64908939725906 0.1703006012024048
60.08468062361392 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 30.0
0.052651013393708285 29.9398997995992
0.10525461748285375 29.879799599198396
0.15781080300447103 29.819699398797596
0.2103195605954823 29.759599198396792
0.2627808807915441 29.699498997995992
0.31519475402592745 29.63939879759519
0.36756117062835314 29.579298597194388
0.4198801208238139 29.519198396793588
0.47215159473141266 29.459098196392784
0.5243755823631412 29.398997995991984
0.5765520736226902 29.338897795591183
0.6286810583042146 29.27879759519038
0.6807625260910832 29.21869739478958
0.7327964665546425 29.15859719438878
0.7847828691529368 29.098496993987975
0.8367217232294137 29.038396793587175
0.888613018011644 28.97829659318637
0.9404567426099812 28.91819639278557
0.9922528860162498 28.85809619238477
1.044001437102388 28.797995991983967
1.0957023846190732 28.737895791583167
1.1473557171943631 28.677795591182363
1.198961423332272 28.617695390781563
1.2505194914113784 28.557595190380763
1.302029909683383 28.49749498997996
1.3534926662716509 28.43739478957916
1.4049077491697652 28.377294589178355
1.4562751462400192 28.317194388777555
1.5075948452119332 28.257094188376755
1.5588668336807256 28.19699398797595
1.6100910991057638 28.13689378757515
1.661267628809024 28.07679358717435
1.7123964099735052 28.016693386773547
1.7634774296416227 27.956593186372746
1.8145106747136137 27.896492985971943
1.8654961319458774 27.836392785571142
1.9164337879493394 27.776292585170342
1.9673236291877672 27.71619238476954
2.018165641976064 27.656092184368738
2.0689598124785724 27.595991983967934
2.1197061267073107 27.535891783567134
2.1704045705202346 27.475791583166334
2.2210551296194465 27.41569138276553
2.2716577895493817 27.35559118236473
2.322212535695004 27.295490981963926
2.372719353279933 27.235390781563126
2.4231782273645925 27.175290581162326
2.473589142844309 27.115190380761522
2.523952084447382 27.05509018036072
2.5742670367331613 26.99498997995992
2.624533984090072 26.934889779559118
2.674752910733614 26.874789579158318
2.7249238007043686 26.814689378757514
2.775046637865933 26.754589178356714
2.8251214059028764 26.694488977955913
2.875148088318639 26.63438877755511
2.9251266684334043 26.57428857715431
2.9750571293819776 26.514188376753506
3.0249394541115886 26.454088176352705
3.074773625379716 26.393987975951905
3.124559625751851 26.3338877755511
3.1742974375992348 26.2737875751503
3.2239870430965984 26.213687374749497
3.2736284242198264 26.153587174348697
3.3232215627436377 26.093486973947897
3.3727664402392086 26.033386773547093
3.4222630380717622 25.973286573146293
3.471711337398158 25.913186372745493
3.5211113191644214 25.85308617234469
3.5704629641032444 25.79298597194389
3.6197662527314813 25.732885771543085
3.669021165347572 25.672785571142285
3.7182276820289726 25.612685370741485
3.7673857826295274 25.55258517034068
3.816495446776806 25.49248496993988
3.8655566538694357 25.432384769539077
3.9145693830743564 25.372284569138277
3.9635336133240835 25.312184368737476
4.012449323313908 25.252084168336673
4.061316491499062 25.191983967935872
4.110135096091869 25.13188376753507
4.158905115058829 25.07178356713427
4.207626526117694 25.011683366733468
4.256299306734485 24.951583166332664
4.304923434120474 24.891482965931864
4.353498885229143 24.831382765531064
4.402025636753089 24.77128256513026
4.4505036651208805 24.71118236472946
4.4989329464939045 24.651082164328656
4.547313456763136 24.590981963927856
4.595645171545898 24.530881763527056
4.64392806618256 24.470781563126252
4.692162115733187 24.41068136272545
4.740347294974183 24.350581162324648
4.788483578394833 24.290480961923848
4.83657094019386 24.230380761523048
4.884609354275897 24.170280561122244
4.932598794247916 24.110180360721444
4.980539233415643 24.05008016032064
5.028430644779875 23.98997995991984
5.0762730010328045 23.92987975951904
5.124066274554252 23.869779559118236
5.171810437407863 23.809679358717435
5.219505461337271 23.749579158316635
5.267151317762194 23.68947895791583
5.314747977774467 23.62937875751503
5.362295412134068 23.569278557114227
5.409793591265029 23.509178356713427
5.4572424852513555 23.449078156312627
5.504642063832851 23.388977955911823
5.551992296400889 23.328877755511023
5.599293151994164 23.26877755511022
5.646544599294334 23.20867735470942
5.693746606621654 23.14857715430862
5.740899141930527 23.088476953907815
5.788002172804984 23.028376753507015
5.835055666454149 22.96827655310621
5.882059589707585 22.90817635270541
5.9290139090106315 22.84807615230461
5.97591859041965 22.787975951903807
6.022773599597203 22.727875751503007
6.069578901807197 22.667775551102206
6.1163344619099345 22.607675350701403
6.163040244357103 22.547575150300602
6.209696213186718 22.4874749498998
6.256302332017967 22.427374749499
6.302858564046016 22.367274549098198
6.349364872036728 22.307174348697394
6.395821218321302 22.247074148296594
6.442227564790878 22.18697394789579
6.488583872891018 22.12687374749499
6.534890103616164 22.06677354709419
6.581146217503985 22.006673346693386
6.627352174629655 21.946573146292586
6.67350793460008 21.886472945891782
6.719613456548004 21.826372745490982
6.765668699126079 21.76627254509018
6.811673620500827 21.706172344689378
6.857628178346522 21.646072144288578
6.903532329839011 21.585971943887778
6.949386031649433 21.525871743486974
6.995189239937844 21.465771543086174
7.040942295595286 21.40567134268537
7.086647665496997 21.34557114228457
7.13230745400135 21.28547094188377
7.177921796553886 21.225370741482966
7.223490916286008 21.165270541082165
7.26901490358472 21.10517034068136
7.314493762996238 21.04507014028056
7.359927499045281 20.98496993987976
7.405316116234585 20.924869739478957
7.450659619044412 20.864769539078157
7.495958011932095 20.804669338677353
7.541211299331531 20.744569138276553
7.5864194856527165 20.684468937875753
7.631582575281262 20.62436873747495
7.676700572577895 20.56426853707415
7.721773481877998 20.50416833667335
7.766801307491118 20.444068136272545
7.811784053700475 20.383967935871745
7.856721724762499 20.32386773547094
7.901614324906334 20.26376753507014
7.946461858333375 20.20366733466934
7.991264329216784 20.143567134268537
8.03602174170101 20.083466933867737
8.080734099901335 20.023366733466933
8.125401407903388 19.963266533066133
8.170023669762696 19.903166332665332
8.214600889504215 19.84306613226453
8.25913307112187 19.78296593186373
8.303620218578116 19.722865731462925
8.34806233580348 19.662765531062124
8.392459426696128 19.602665330661324
8.436811495121432 19.54256513026052
8.481118544911535 19.48246492985972
8.525380579864938 19.42236472945892
8.569597603746097 19.362264529058116
8.613769620284994 19.302164328657316
8.657896633176781 19.242064128256512
8.701978646081361 19.181963927855712
8.746015662623046 19.12186372745491
8.790007686390181 19.061763527054108
8.833954720934793 19.001663326653308
8.877856769772274 18.941563126252504
8.921713836381036 18.881462925851704
8.965525924202229 18.821362725450903
9.009293036639443 18.7612625250501
9.053015177058423 18.7011623246493
9.09669234878684 18.641062124248496
9.140324555114027 18.580961923847696
9.183911799290787 18.520861723446895
9.227454084529187 18.46076152304609
9.270951414002385 18.40066132264529
9.314403790844485 18.34056112224449
9.357811218150422 18.280460921843687
9.401173698975843 18.220360721442887
9.44449123633706 18.160260521042083
9.487763833210993 18.100160320641283
9.530991492535174 18.040060120240483
9.574174217207762 17.97995991983968
9.617312010087595 17.91985971943888
9.660404873994294 17.859759519038075
9.703452811708374 17.799659318637275
9.746455825971434 17.739559118236475
9.789413919486352 17.67945891783567
9.832327094917531 17.61935871743487
9.875195354891218 17.559258517034067
9.918018701995825 17.499158316633267
9.96079713878234 17.439058116232466
10.003530667764768 17.378957915831663
10.046219291420616 17.318857715430862
10.088863012191478 17.258757515030062
10.131461832483629 17.19865731462926
10.174015754668703 17.13855711422846
10.216524781084454 17.078456913827655
10.25898891403554 17.018356713426854
10.301408155794428 16.958256513026054
10.343782508602343 16.89815631262525
10.386111974670287 16.83805611222445
10.42839655618017 16.777955911823646
10.470636255285994 16.717855711422846
10.512831074115148 16.657755511022046
10.554981014769783 16.597655310621242
10.597086079328276 16.537555110220442
10.639146269846819 16.477454909819638
10.681161588361073 16.417354709418838
10.72313203688798 16.357254509018038
10.765057617427646 16.297154308617234
10.80693833196535 16.237054108216434
10.848774182473706 16.176953907815633
10.890565170914916 16.11685370741483
10.932311299243171 16.05675350701403
10.974012569407204 15.996653306613226
11.015668983352963 15.936553106212424
11.057280543026458 15.876452905811622
11.098847250376751 15.81635270541082
11.140369107359119 15.75625250501002
11.181846115938383 15.696152304609218
11.223278278092414 15.636052104208416
11.26466559581583 15.575951903807614
11.306008071123877 15.515851703406813
11.347305706056527 15.455751503006011
11.388558502682763 15.39565130260521
11.429766463105093 15.335551102204407
11.470929589464298 15.275450901803605
11.512047883944405 15.215350701402805
11.553121348777907 15.155250501002003
11.594149986251239 15.095150300601201
11.63513379871052 15.0350501002004
11.676072788567573 14.974949899799599
11.716966958306237 14.914849699398797
11.757816310488959 14.854749498997995
11.798620847763717 14.794649298597193
11.839380572871262 14.734549098196391
11.88009548865269 14.67444889779559
11.920765598057377 14.614348697394789
11.961390904151258 14.554248496993987
12.001971410125506 14.494148296593185
12.042507119305592 14.434048096192384
12.08299803516076 14.373947895791582
12.123444161313925 14.31384769539078
12.163845501552018 14.253747494989979
12.204202059836788 14.193647294589177
12.244513840316083 14.133547094188376
12.284780847335638 14.073446893787574
12.325003085451366 14.013346693386772
12.3651805594422 13.95324649298597
12.405313274323488 13.89314629258517
12.445401235360979 13.833046092184368
12.485444448085405 13.772945891783566
12.525442918307693 13.712845691382764
12.565396652134842 13.652745490981962
12.60530565598647 13.592645290581162
12.645169936612076 13.53254509018036
12.684989501109028 13.472444889779558
12.724764356941327 13.412344689378756
12.764494511959157 13.352244488977956
12.804179974419272 13.292144288577154
12.84382075300623 13.232044088176352
12.883416856854534 13.17194388777555
12.92296829557169 13.111843687374748
12.962475079262239 13.051743486973947
13.001937218552793 12.991643286573145
13.041354724618113 12.931543086172343
13.08072760920827 12.871442885771541
13.120055884676937 12.811342685370741
13.159339564010867 12.75124248496994
13.19857866086057 12.691142284569137
13.23777318957227 12.631042084168335
13.276923165221186 12.570941883767533
13.31602860364618 12.510841683366733
13.355089521485827 12.450741482965931
13.394105936215976 12.390641282565129
13.433077866188851 12.330541082164327
13.472005330673758 12.270440881763527
13.510888349899455 12.210340681362725
13.54972694509826 12.150240480961923
13.58852113855197 12.090140280561121
13.62727095363964 12.030040080160319
13.665976414887329 11.969939879759519
13.704637548019877 11.909839679358717
13.743256062940366 11.849739478957915
13.781835022926161 11.789639278557113
13.820375863383351 11.729539078156312
13.858878918873584 11.66943887775551
13.897344526378886 11.609338677354708
13.935772811423202 11.549238476953906
13.974163883866613 11.489138276553104
14.012517856375245 11.429038076152304
14.05083484451863 11.368937875751502
14.089114966870694 11.3088376753507
14.127358345114601 11.248737474949898
14.165565104151536 11.188637274549098
14.203735372213647 11.128537074148296
14.241869280981248 11.068436873747494
14.27996696570452 11.008336673346692
14.318028565329845 10.94823647294589
14.35605422263097 10.88813627254509
14.39404408434522 10.828036072144288
14.431998301314925 10.767935871743486
14.469917028634317 10.707835671342684
14.507800425802081 10.647735470941884
14.545648656879829 10.587635270541082
14.583461890656695 10.52753507014028
14.621240300820357 10.467434869739478
14.658984066134705 10.407334669338676
14.696693370624452 10.347234468937875
14.734368403766984 10.287134268537073
14.772009360691724 10.227034068136271
14.809616442387352 10.16693386773547
14.847189855917186 10.10683366733467
14.884729814643105 10.046733466933867
14.922236538458314 9.986633266533065
14.959710254029385 9.926533066132263
14.99715119504794 9.866432865731461
15.034559602492376 9.806332665330661
15.071935724900097 9.746232464929859
15.109279818650661 9.686132264529057
15.146592148260345 9.626032064128255
15.183872986688604 9.565931863727455
15.221122615656956 9.505831663326653
15.258341325980803 9.44573146292585
15.29552941791479 9.385631262525049
15.332687201512266 9.325531062124247
15.369814996999501 9.265430861723447
15.406913135165269 9.205330661322645
15.443981957766503 9.145230460921843
15.48102181795076 9.08513026052104
15.518033080696194 9.02503006012024
15.55501612326988 8.964929859719438
15.591971335705276 8.904829659318636
15.628899121299723 8.844729458917834
15.665799897132864 8.784629258517032
15.702674094606971 8.724529058116232
15.739522160010177 8.66442885771543
15.776344555103648 8.604328657314628
15.813141757733849 8.544228456913826
15.849914262471042 8.484128256513026
15.886662581275273 8.424028056112224
15.923387244191112 8.363927855711422
15.96008880007255 8.30382765531062
15.996767817339455 8.243727454909818
16.033424884767133 8.183627254509018
16.070060612310552 8.123527054108216
16.106675631964965 8.063426853707414
16.14327059866464 8.003326653306614
16.179846191221642 7.943226452905811
16.21640311330658 7.88312625250501
16.25294209447345 7.823026052104208
16.289463891230763 7.7629258517034065
16.325969288161296 7.7028256513026045
16.362459099092902 7.6427254509018026
16.39893416832305 7.5826252505010014
16.43539537189978 7.5225250501001995
16.47183419239667 7.462424849699398
16.508237759471026 7.402324649298596
16.544602176255456 7.342224448897795
16.58092673258943 7.282124248496993
16.617210879139403 7.222024048096192
16.65345499929609 7.16192384769539
16.689659529623274 7.101823647294588
16.725824929766162 7.041723446893787
16.761951683504535 6.981623246492985
16.798040299853504 6.921523046092184
16.834091314214223 6.861422845691382
16.870105289576962 6.801322645290581
16.906082817779108 6.741222444889779
16.942024520820816 6.681122244488978
16.97793105224114 6.621022044088176
17.013803098557695 6.560921843687374
17.049641380773032 6.500821643286573
17.085446655951092 6.440721442885771
17.12121971886735 6.3806212424849695
17.156961403736403 6.3205210420841675
17.192672586021033 6.260420841683366
17.228354184327024 6.200320641282564
17.264007162388204 6.140220440881763
17.29963253114655 6.080120240480961
17.33523135093243 6.020020040080159
17.370804733750404 5.959919839679358
17.40635384567635 5.899819639278556
17.441879909372012 5.839719438877755
17.477384206723578 5.779619238476953
17.51286808161113 5.719519038076152
17.548332942816526 5.65941883767535
17.583780267077497 5.599318637274549
17.619211602296556 5.539218436873747
17.654628570913633 5.479118236472945
17.690032873452232 5.419018036072144
17.72542629224935 5.358917835671342
17.760810695380354 5.298817635270541
17.796188040790643 5.238717434869739
17.831560380646874 5.178617234468938
17.86692986592146 5.118517034068136
17.902298751225082 5.0584168336673345
17.937669399903026 4.9983166332665325
17.973044289412407 4.9382164328657305
18.008426016998676 4.878116232464929
18.043817305691206 4.818016032064127
18.07922101063934 4.757915831663326
18.11464012581201 4.697815631262524
18.150077791085927 4.637715430861723
18.185537299749356 4.577615230460921
18.221022106450786 4.51751503006012
18.256535835624256 4.457414829659318
18.292082290425814 4.397314629258516
18.32766546221859 4.337214428857715
18.36328954064721 4.277114228456913
18.398958924345923 4.217014028056112
18.434678232328825 4.15691382765531
18.470452316114873 4.096813627254509
18.506286272645415 4.036713426853707
18.542185458057176 3.9766132264529053
18.578155502379754 3.9165130260521037
18.614202325233208 3.856412825651302
18.650332152608772 3.7963126252505006
18.686551534823867 3.736212424849699
18.72286736575171 3.6761122244488975
18.759286903436095 3.616012024048096
18.795817792213143 3.555911823647294
18.832468086474766 3.4958116232464924
18.86924627622268 3.435711422845691
18.906161314577957 3.3756112224448893
18.943222647429096 3.3155110220440878
18.98044024542188 3.255410821643286
19.01782463851726 3.1953106212424847
19.055386953369325 3.135210420841683
19.093138953804882 3.0751102204408816
19.131093084719335 3.0150100200400796
19.169262519741537 2.954909819639278
19.20766121306333 2.8948096192384765
19.24630395587883 2.834709418837675
19.285206437934903 2.7746092184368734
19.32438531475887 2.714509018036072
19.36385828120401 2.6544088176352703
19.40364415203905 2.5943086172344687
19.443762950407024 2.534208416833667
19.48423600509371 2.474108216432865
19.525086057679346 2.4140080160320636
19.56633738080297 2.353907815631262
19.60801590895064 2.2938076152304605
19.650149383392158 2.233707414829659
19.692767513142186 2.1736072144288574
19.735902154118154 2.113507014028056
19.77958750901902 2.0534068136272543
19.823860350867363 1.9933066132264528
19.868760273657152 1.9332064128256512
19.91432997414938 1.8731062124248496
19.960615569580714 1.813006012024048
20.007666956925902 1.7529058116232463
20.05553822042021 1.6928056112224448
20.10428809535225 1.6327054108216432
20.153980497741962 1.5726052104208417
20.204685131504952 1.51250501002004
20.256478187178995 1.4524048096192383
20.309443149393047 1.3923046092184368
20.36367173418176 1.3322044088176352
20.41926498224455 1.2721042084168337
20.476334540665004 1.212004008016032
20.53500417392331 1.1519038076152304
20.595411555920382 1.0918036072144288
20.65771040913399 1.0317034068136273
20.72207307630054 0.9716032064128256
20.78869363613522 0.911503006012024
20.857791710484666 0.8514028056112224
20.929617160332423 0.7913026052104208
21.004455938944822 0.7312024048096192
21.082637472557057 0.6711022044088176
21.164544088764963 0.611002004008016
21.2506232363417 0.5509018036072144
21.3414035790452 0.4908016032064128
21.43751656361322 0.4307014028056112
21.539867115390376 0.3706012024048096
21.649851723612265 0.310501002004008
21.769409840797884 0.2504008016032064
21.901129589141746 0.1903006012024048
22.049078753931113 0.1302004008016032
22.21955789919757 0.0701002004008016
22.408691722238586 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 30.0
0.008818846933632015 29.9398997995992
0.01764484381007798 29.879799599198396
0.026478007464179557 29.819699398797596
0.03531835479469083 29.759599198396792
0.04416590276460051 29.699498997995992
0.05302066840146401 29.63939879759519
0.06188266879773232 29.579298597194388
0.07075192111108296 29.519198396793588
0.07962844256475818 29.459098196392784
0.0885122504478975 29.398997995991984
0.09740336211588006 29.338897795591183
0.106301794990664 29.27879759519038
0.1152075665611278 29.21869739478958
0.12412069438341859 29.15859719438878
0.13304119608129797 29.098496993987975
0.14196908934648975 29.038396793587175
0.1509043919390354 28.97829659318637
0.15984712168764365 28.91819639278557
0.16879729649005026 28.85809619238477
0.17775493431337477 28.797995991983967
0.18672005319447946 28.737895791583167
0.19569267124033585 28.677795591182363
0.20467280662838558 28.617695390781563
0.2136604776069115 28.557595190380763
0.22265570249540587 28.49749498997996
0.23165849968494062 28.43739478957916
0.2406688876385457 28.377294589178355
0.24968688489158125 28.317194388777555
0.25871251005212076 28.257094188376755
0.2677457818013307 28.19699398797595
0.2767867188938529 28.13689378757515
0.2858353401581944 28.07679358717435
0.294891664497114 28.016693386773547
0.3039557108880125 27.956593186372746
0.3130274983833297 27.896492985971943
0.3221070461109367 27.836392785571142
0.33119437327453805 27.776292585170342
0.3402894991540715 27.71619238476954
0.3493924431061101 27.656092184368738
0.3585032245642726 27.595991983967934
0.36762186303962757 27.535891783567134
0.37674837812110906 27.475791583166334
0.38588278947592897 27.41569138276553
0.39502511684999214 27.35559118236473
0.4041753800683197 27.295490981963926
0.4133335990354667 27.235390781563126
0.42249979373595054 27.175290581162326
0.4316739842346772 27.115190380761522
0.44085619067736925 27.05509018036072
0.4500464332910026 26.99498997995992
0.45924473238424 26.934889779559118
0.4684511083478684 26.874789579158318
0.47766558165524353 26.814689378757514
0.48688817286273 26.754589178356714
0.4961189026101518 26.694488977955913
0.5053577916212405 26.63438877755511
0.5146048607040862 26.57428857715431
0.5238601307515968 26.514188376753506
0.5331236227419522 26.454088176352705
0.5423953577390698 26.393987975951905
0.5516753568930661 26.3338877755511
0.5609636414407237 26.2737875751503
0.5702602327059644 26.213687374749497
0.5795651521003183 26.153587174348697
0.5888784211234045 26.093486973947897
0.598200061363408 26.033386773547093
0.6075300944975609 25.973286573146293
0.6168685422926312 25.913186372745493
0.6262154266054099 25.85308617234469
0.6355707693832005 25.79298597194389
0.6449345926643183 25.732885771543085
0.654306918578584 25.672785571142285
0.6636877693478287 25.612685370741485
0.6730771672863965 25.55258517034068
0.682475134801651 25.49248496993988
0.6918816943944897 25.432384769539077
0.7012968686598539 25.372284569138277
0.7107206802872502 25.312184368737476
0.7201531520612697 25.252084168336673
0.7295943068621104 25.191983967935872
0.7390441676661083 25.13188376753507
0.7485027575462644 25.07178356713427
0.7579700996727826 25.011683366733468
0.767446217313606 24.951583166332664
0.7769311338349557 24.891482965931864
0.7864248727018797 24.831382765531064
0.7959274574787986 24.77128256513026
0.8054389118300559 24.71118236472946
0.8149592595204772 24.651082164328656
0.8244885244159239 24.590981963927856
0.8340267304838598 24.530881763527056
0.8435739017939152 24.470781563126252
0.8531300625184547 24.41068136272545
0.862695236933154 24.350581162324648
0.8722694494175726 24.290480961923848
0.8818527244557378 24.230380761523048
0.8914450866367276 24.170280561122244
0.9010465606552563 24.110180360721444
0.9106571713122708 24.05008016032064
0.9202769435155405 23.98997995991984
0.9299059022802615 23.92987975951904
0.9395440727296573 23.869779559118236
0.9491914800955841 23.809679358717435
0.9588481497191446 23.749579158316635
0.9685141070513014 23.68947895791583
0.9781893776534932 23.62937875751503
0.9878739871982617 23.569278557114227
0.9975679614698729 23.509178356713427
1.0072713263649518 23.449078156312627
1.0169841078931146 23.388977955911823
1.0267063321776055 23.328877755511023
1.036438025455943 23.26877755511022
1.0461792140805617 23.20867735470942
1.0559299245194664 23.14857715430862
1.0656901833568857 23.088476953907815
1.0754600172939284 23.028376753507015
1.0852394531492502 22.96827655310621
1.0950285178597163 22.90817635270541
1.1048272384810767 22.84807615230461
1.1146356421886394 22.787975951903807
1.1244537562779486 22.727875751503007
1.1342816081654719 22.667775551102206
1.1441192253892862 22.607675350701403
1.1539666356097689 22.547575150300602
1.1638238666102985 22.4874749498998
1.1736909462979503 22.427374749499
1.183567902704207 22.367274549098198
1.1934547639856652 22.307174348697394
1.2033515584247487 22.247074148296594
1.213258314430431 22.18697394789579
1.2231750605389526 22.12687374749499
1.2331018254145538 22.06677354709419
1.2430386378502036 22.006673346693386
1.2529855267683345 21.946573146292586
1.2629425212215877 21.886472945891782
1.2729096503935533 21.826372745490982
1.2828869435995243 21.76627254509018
1.2928744302872492 21.706172344689378
1.302872140037689 21.646072144288578
1.3128801025657846 21.585971943887778
1.3228983477212226 21.525871743486974
1.3329269054892066 21.465771543086174
1.3429658059912384 21.40567134268537
1.353015079485895 21.34557114228457
1.3630747563696204 21.28547094188377
1.3731448671775135 21.225370741482966
1.3832254425841237 21.165270541082165
1.393316513404255 21.10517034068136
1.4034181105937669 21.04507014028056
1.413530265250388 20.98496993987976
1.42365300861453 20.924869739478957
1.4337863720701047 20.864769539078157
1.4439303871453528 20.804669338677353
1.4540850855136684 20.744569138276553
1.4642504989944363 20.684468937875753
1.4744266595538695 20.62436873747495
1.484613599305851 20.56426853707415
1.4948113505127842 20.50416833667335
1.5050199455864461 20.444068136272545
1.5152394170888417 20.383967935871745
1.5254697977330711 20.32386773547094
1.5357111203841929 20.26376753507014
1.5459634180600998 20.20366733466934
1.5562267239323941 20.143567134268537
1.5665010713272678 20.083466933867737
1.5767864937263931 20.023366733466933
1.58708302476781 19.963266533066133
1.5973906982468258 19.903166332665332
1.6077095481169148 19.84306613226453
1.6180396084906223 19.78296593186373
1.62838091364048 19.722865731462925
1.638733497999916 19.662765531062124
1.649097396164179 19.602665330661324
1.659472642891263 19.54256513026052
1.6698592731028337 19.48246492985972
1.6802573218851675 19.42236472945892
1.690666824490089 19.362264529058116
1.7010878163359127 19.302164328657316
1.7115203330083961 19.242064128256512
1.721964410261689 19.181963927855712
1.732420084019294 19.12186372745491
1.74288739037503 19.061763527054108
1.7533663655939946 19.001663326653308
1.7638570461135432 18.941563126252504
1.7743594685442583 18.881462925851704
1.784873669670936 18.821362725450903
1.7953996864535693 18.7612625250501
1.8059375560283364 18.7011623246493
1.8164873157085992 18.641062124248496
1.8270490029858972 18.580961923847696
1.837622655530955 18.520861723446895
1.8482083111946876 18.46076152304609
1.8588060080092113 18.40066132264529
1.8694157841888621 18.34056112224449
1.8800376781312147 18.280460921843687
1.8906717284181045 18.220360721442887
1.9013179738166603 18.160260521042083
1.9119764532803323 18.100160320641283
1.9226472059499315 18.040060120240483
1.933330271154669 17.97995991983968
1.944025688413197 17.91985971943888
1.9547334974346622 17.859759519038075
1.9654537381197508 17.799659318637275
1.9761864505617484 17.739559118236475
1.9869316750475963 17.67945891783567
1.9976894520589517 17.61935871743487
2.008459822273257 17.559258517034067
2.019242826564803 17.499158316633267
2.0300385060058055 17.439058116232466
2.040846901867477 17.378957915831663
2.051668055621102 17.318857715430862
2.062502008939123 17.258757515030062
2.0733488036962195 17.19865731462926
2.0842084819703928 17.13855711422846
2.0950810860440576 17.078456913827655
2.105966658405128 17.018356713426854
2.1168652417481146 16.958256513026054
2.127776878975216 16.89815631262525
2.138701613197414 16.83805611222445
2.1496394877355764 16.777955911823646
2.1605905461215524 16.717855711422846
2.1715548320992766 16.657755511022046
2.1825323896258704 16.597655310621242
2.193523262872744 16.537555110220442
2.2045274962267047 16.477454909819638
2.215545134291057 16.417354709418838
2.2265762218867136 16.357254509018038
2.2376208040532974 16.297154308617234
2.248678926050248 16.237054108216434
2.25975063335793 16.176953907815633
2.270835971678736 16.11685370741483
2.2819349869381913 16.05675350701403
2.2930477252860606 15.996653306613226
2.3041742330974477 15.936553106212424
2.3153145569738993 15.876452905811622
2.326468743744504 15.81635270541082
2.3376368404669896 15.75625250501002
2.348818894428821 15.696152304609218
2.3600149531482906 15.636052104208416
2.37122506437561 15.575951903807614
2.3824492760939977 15.515851703406813
2.3936876365207613 15.455751503006011
2.4049401941083786 15.39565130260521
2.4162069975455713 15.335551102204407
2.4274880957583775 15.275450901803605
2.4387835379112173 15.215350701402805
2.450093373407953 15.155250501002003
2.461417651892943 15.095150300601201
2.4727564232520924 15.0350501002004
2.484109737613891 14.974949899799599
2.4954776453504524 14.914849699398797
2.506860197078537 14.854749498997995
2.5182574436605734 14.794649298597193
2.529669436205667 14.734549098196391
2.5410962260706005 14.67444889779559
2.5525378648608283 14.614348697394789
2.563994404431454 14.554248496993987
2.5754658968882027 14.494148296593185
2.5869523945883777 14.434048096192384
2.59845395014181 14.373947895791582
2.6099706164117893 14.31384769539078
2.621502446515987 14.253747494989979
2.63304949382736 14.193647294589177
2.6446118119750452 14.133547094188376
2.6561894548452347 14.073446893787574
2.667782476582034 14.013346693386772
2.679390931588307 13.95324649298597
2.6910148745265 13.89314629258517
2.7026543603194497 13.833046092184368
2.714309444151167 13.772945891783566
2.7259801814676052 13.712845691382764
2.737666627977405 13.652745490981962
2.749368839652617 13.592645290581162
2.7610868727294005 13.53254509018036
2.772820783708699 13.472444889779558
2.78457062935689 13.412344689378756
2.796336466706408 13.352244488977956
2.8081183530563396 13.292144288577154
2.8199163459729917 13.232044088176352
2.831730503290427 13.17194388777555
2.8435608831109715 13.111843687374748
2.8554075438056867 13.051743486973947
2.8672705440148105 12.991643286573145
2.8791499426481604 12.931543086172343
2.8910457988855027 12.871442885771541
2.902958172176882 12.811342685370741
2.914887122242914 12.75124248496994
2.9268327090750317 12.691142284569137
2.938794992935696 12.631042084168335
2.950774034358557 12.570941883767533
2.962769894148571 12.510841683366733
2.974782633382072 12.450741482965931
2.9868123134067885 12.390641282565129
2.9988589958418146 12.330541082164327
3.010922742577524 12.270440881763527
3.0230036157754303 12.210340681362725
3.03510167786799 12.150240480961923
3.047216991558345 12.090140280561121
3.0593496198200043 12.030040080160319
3.071499625896462 11.969939879759519
3.0836670733007487 11.909839679358717
3.0958520258149127 11.849739478957915
3.1080545474894317 11.789639278557113
3.120274702642551 11.729539078156312
3.1325125558595452 11.66943887775551
3.1447681719918976 11.609338677354708
3.1570416161564014 11.549238476953906
3.1693329537341746 11.489138276553104
3.1816422503695856 11.429038076152304
3.1939695719690913 11.368937875751502
3.2063149846999743 11.3088376753507
3.2186785549889896 11.248737474949898
3.2310603495209045 11.188637274549098
3.2434604352369387 11.128537074148296
3.255878879333091 11.068436873747494
3.2683157492583557 11.008336673346692
3.2807711127128263 10.94823647294589
3.2932450376456726 10.88813627254509
3.305737592253 10.828036072144288
3.318248844975574 10.767935871743486
3.3307788644964162 10.707835671342684
3.3433277197382605 10.647735470941884
3.355895479860868 10.587635270541082
3.368482214258191 10.52753507014028
3.3810879925553907 10.467434869739478
3.3937128846056916 10.407334669338676
3.406356960487075 10.347234468937875
3.419020290498805 10.287134268537073
3.4317029451577774 10.227034068136271
3.44440499519469 10.16693386773547
3.4571265115500256 10.10683366733467
3.469867565369845 10.046733466933867
3.482628228001374 9.986633266533065
3.495408570988391 9.926533066132263
3.508208666066399 9.866432865731461
3.5210285851575756 9.806332665330661
3.533868400365498 9.746232464929859
3.5467281839696305 9.686132264529057
3.559608008419569 9.626032064128255
3.5725079463290346 9.565931863727455
3.5854280704696087 9.505831663326653
3.598368453764195 9.44573146292585
3.611329169280207 9.385631262525049
3.62431029022247 9.325531062124247
3.637311889925822 9.265430861723447
3.6503340418474126 9.205330661322645
3.663376819558683 9.145230460921843
3.6764402967370193 9.08513026052104
3.6895245471570672 9.02503006012024
3.702629644681701 8.964929859719438
3.7157556632526263 8.904829659318636
3.7289026768806153 8.844729458917834
3.7420707596353546 8.784629258517032
3.7552599856348956 8.724529058116232
3.7684704290346978 8.66442885771543
3.7817021640162416 8.604328657314628
3.7949552647752114 8.544228456913826
3.8082298055092196 8.484128256513026
3.8215258604050706 8.424028056112224
3.8348435036255366 8.363927855711422
3.848182809295641 8.30382765531062
3.861543851488427 8.243727454909818
3.874926704210195 8.183627254509018
3.8883314413851977 8.123527054108216
3.901758136839765 8.063426853707414
3.9152068642858517 8.003326653306614
3.9286776973039843 7.943226452905811
3.9421707093255844 7.88312625250501
3.955685973614661 7.823026052104208
3.9692235632488346 7.7629258517034065
3.9827835510996934 7.7028256513026045
3.9963660098124394 7.6427254509018026
4.009971011784819 7.5826252505010014
4.023598629145308 7.5225250501001995
4.037248933730534 7.462424849699398
4.050921997061905 7.402324649298596
4.06461789032143 7.342224448897795
4.078336684326703 7.282124248496993
4.0920784495050215 7.222024048096192
4.1058432558666285 7.16192384769539
4.119631172977035 7.101823647294588
4.1334422699284135 7.041723446893787
4.147276615310022 6.981623246492985
4.161134277177648 6.921523046092184
4.175015323022027 6.861422845691382
4.188919819736228 6.801322645290581
4.202847833581961 6.741222444889779
4.216799430154799 6.681122244488978
4.230774674348265 6.621022044088176
4.244773630316774 6.560921843687374
4.2587963614374 6.500821643286573
4.272842930270433 6.440721442885771
4.286913398518706 6.3806212424849695
4.301007826985675 6.3205210420841675
4.315126275532203 6.260420841683366
4.329268803032054 6.200320641282564
4.343435467326052 6.140220440881763
4.357626325174891 6.080120240480961
4.37184143221058 6.020020040080159
4.386080842886501 5.959919839679358
4.400344610426064 5.899819639278556
4.414632786769952 5.839719438877755
4.428945422521945 5.779619238476953
4.443282566893307 5.719519038076152
4.457644267645758 5.65941883767535
4.472030571033008 5.599318637274549
4.486441521740884 5.539218436873747
4.500877162826056 5.479118236472945
4.51533753565338 5.419018036072144
4.529822679831908 5.358917835671342
4.544332633149585 5.298817635270541
4.558867431506699 5.238717434869739
4.573427108848142 5.178617234468938
4.588011697094564 5.118517034068136
4.602621226072509 5.0584168336673345
4.617255723443647 4.9983166332665325
4.631915214633234 4.9382164328657305
4.646599722757951 4.878116232464929
4.661309268553305 4.818016032064127
4.676043870300791 4.757915831663326
4.690803543755072 4.697815631262524
4.705588302071431 4.637715430861723
4.720398155733834 4.577615230460921
4.735233112483956 4.51751503006012
4.750093177251589 4.457414829659318
4.764978352086908 4.397314629258516
4.779888636095144 4.337214428857715
4.794824025374276 4.277114228456913
4.809784512956444 4.217014028056112
4.824770088753898 4.15691382765531
4.839780739510376 4.096813627254509
4.854816448758964 4.036713426853707
4.869877196787599 3.9766132264529053
4.884962960613572 3.9165130260521037
4.900073713968518 3.856412825651302
4.915209427295664 3.7963126252505006
4.93037006776125 3.736212424849699
4.945555599282391 3.6761122244488975
4.9607659825738954 3.616012024048096
4.976001175216936 3.555911823647294
4.99126113175287 3.4958116232464924
5.006545803805942 3.435711422845691
5.021855140239168 3.3756112224448893
5.037189087348272 3.3155110220440878
5.0525475890992615 3.255410821643286
5.067930587416046 3.1953106212424847
5.08333802252541 3.135210420841683
5.098769833367759 3.0751102204408816
5.114225958083285 3.0150100200400796
5.129706334584687 2.954909819639278
5.145210901229256 2.8948096192384765
5.160739597605135 2.834709418837675
5.176292365448891 2.7746092184368734
5.191869149714274 2.714509018036072
5.207469899815255 2.6544088176352703
5.223094571070234 2.5943086172344687
5.238743126378853 2.534208416833667
5.2544155381681525 2.474108216432865
5.270111790651279 2.4140080160320636
5.2858318824495285 2.353907815631262
5.301575829637782 2.2938076152304605
5.317343669284444 2.233707414829659
5.333135463570448 2.1736072144288574
5.348951304588276 2.113507014028056
5.364791319941908 2.0534068136272543
5.380655679293227 1.9933066132264528
5.396544602030721 1.9332064128256512
5.41245836627406 1.8731062124248496
5.428397319475189 1.813006012024048
5.444361890935819 1.7529058116232463
5.460352606636131 1.6928056112224448
5.476370106865082 1.6327054108216432
5.492415167265453 1.5726052104208417
5.5084887240658045 1.51250501002004
5.524591904479336 1.4524048096192383
5.540726063523833 1.3923046092184368
5.55689282888243 1.3322044088176352
5.573094155917648 1.2721042084168337
5.589332395623474 1.212004008016032
5.605610379229797 1.1519038076152304
5.62193152447737 1.0918036072144288
5.638299970439646 1.0317034068136273
5.65472075046283 0.9716032064128256
5.671200016780702 0.911503006012024
5.687745336383035 0.8514028056112224
5.704366087040997 0.7913026052104208
5.721073997233064 0.7312024048096192
5.737883898085511 0.6711022044088176
5.754814796934465 0.611002004008016
5.771891455796115 0.5509018036072144
5.789146795528705 0.4908016032064128
5.806625718833779 0.4307014028056112
5.824391525731484 0.3706012024048096
5.842537451951242 0.310501002004008
5.861209439209045 0.2504008016032064
5.880657398856515 0.1903006012024048
5.901376929316023 0.1302004008016032
5.9246843442936035 0.0701002004008016
5.962056767736793 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
11879.008507650315 0.1
11878.481648916826 0.30020040080160326
11877.889358084234 0.5004008016032064
11877.14419152254 0.7006012024048097
11876.243093566243 0.9008016032064129
11875.192552168632 1.1010020040080162
11873.998732460594 1.3012024048096196
11872.666252291932 1.5014028056112227
11871.198430895727 1.701603206412826
11869.597681789839 1.901803607214429
11867.865818560009 2.1020040080160323
11866.004262243572 2.3022044088176354
11864.014175857343 2.502404809619239
11861.896550367532 2.7026052104208422
11859.652259434426 2.9028056112224454
11857.282094315713 3.1030060120240486
11854.786786194802 3.3032064128256517
11852.167020532901 3.503406813627255
11849.423446354382 3.703607214428858
11846.556682311282 3.9038076152304613
11843.567320701984 4.104008016032064
11840.455930193983 4.304208416833667
11837.223057729954 4.50440881763527
11833.869229923002 4.7046092184368735
11830.394954135576 4.904809619238478
11826.800719364885 5.105010020040081
11823.086997011427 5.305210420841684
11819.254241577584 5.505410821643287
11815.302891324269 5.70561122244489
11811.233368901621 5.9058116232464934
11807.046081962239 6.106012024048097
11802.741423760875 6.3062124248497
11798.319773741876 6.506412825651303
11793.781498114078 6.706613226452906
11789.126950412241 6.906813627254509
11784.356472043744 7.1070140280561125
11779.470392819298 7.307214428857716
11774.469031466571 7.507414829659319
11769.352696125843 7.707615230460922
11764.121684827027 7.907815631262525
11758.776285947675 8.108016032064128
11753.316778651762 8.308216432865732
11747.743433309288 8.508416833667335
11742.056511896846 8.708617234468939
11736.256268379522 8.908817635270541
11730.34294907451 9.109018036072145
11724.316792996991 9.309218436873747
11718.17803218887 9.509418837675351
11711.926892030951 9.709619238476956
11705.563591539289 9.909819639278558
11699.08792480424 10.110020040080162
11692.499360888267 10.310220440881764
11685.797815429769 10.510420841683368
11678.983553312324 10.71062124248497
11672.056839135257 10.910821643286575
11665.017937814386 11.111022044088177
11657.867114418383 11.311222444889781
11650.604633226 11.511422845691383
11643.230758170645 11.711623246492987
11635.745754182148 11.91182364729459
11628.149886879517 12.112024048096194
11620.443422383125 12.312224448897796
11612.626625408711 12.5124248496994
11604.699760909443 12.712625250501002
11596.663096137214 12.912825651302606
11588.516899120712 13.11302605210421
11580.261438695687 13.313226452905813
11571.896982534096 13.513426853707417
11563.423798383497 13.713627254509019
11554.842156628112 13.913827655310623
11546.152329142464 14.114028056112225
11537.354588845574 14.31422845691383
11528.449209249662 14.514428857715432
11519.436462321988 14.714629258517036
11510.316621353259 14.914829659318638
11501.089963162327 15.115030060120242
11491.756765783051 15.315230460921844
11482.317308493957 15.515430861723448
11472.771871627308 15.71563126252505
11463.120733434325 15.915831663326655
11453.36417339151 16.11603206412826
11443.502475374968 16.316232464929865
11433.535924607782 16.516432865731467
11423.46480767708 16.71663326653307
11413.289412549286 16.91683366733467
11403.010026836706 17.117034068136277
11392.626937178957 17.31723446893788
11382.140433083243 17.517434869739482
11371.550807558444 17.717635270541084
11360.858355034263 17.91783567134269
11350.063371367278 18.118036072144292
11339.166153845685 18.318236472945895
11328.167000037185 18.518436873747497
11317.066205661768 18.718637274549103
11305.864068760882 18.918837675350705
11294.560891822915 19.119038076152307
11283.156978765737 19.319238476953913
11271.652634934855 19.519438877755515
11260.048167100615 19.719639278557118
11248.343883454518 19.91983967935872
11236.540091334495 20.120040080160326
11224.637096937477 20.320240480961928
11212.635209882597 20.52044088176353
11200.534743483153 20.720641282565133
11188.336012436679 20.92084168336674
11176.039332816792 21.12104208416834
11163.64502206439 21.321242484969943
11151.153398978238 21.521442885771545
11138.564783449614 21.72164328657315
11125.879491955431 21.921843687374754
11113.09784232221 22.122044088176356
11100.220158208296 22.322244488977958
11087.246764569665 22.522444889779564
11074.177987647496 22.722645290581166
11061.01415495531 22.92284569138277
11047.75559526571 23.123046092184374
11034.402638596706 23.323246492985977
11020.955616197694 23.52344689378758
11007.4148558008 23.72364729458918
10993.780685629672 23.923847695390787
10980.053439615012 24.12404809619239
10966.233453353856 24.32424849699399
10952.321063595764 24.524448897795594
10938.316608226995 24.7246492985972
10924.220426254416 24.924849699398802
10910.032857789169 25.125050100200404
10895.7542440301 25.325250501002007
10881.384927246983 25.525450901803612
10866.925245387496 25.725651302605215
10852.375537144546 25.925851703406817
10837.736147411073 26.126052104208423
10823.007422176644 26.326252505010025
10808.189708412297 26.526452905811627
10793.283354052766 26.72665330661323
10778.288707978556 26.926853707414836
10763.206119997896 27.127054108216438
10748.03594082856 27.32725450901804
10732.778522079585 27.527454909819642
10717.434214980147 27.727655310621248
10702.003367159703 27.92785571142285
10686.486328160114 28.128056112224453
10670.883452617401 28.328256513026055
10655.19509596412 28.52845691382766
10639.421614410616 28.728657314629263
10623.563364926233 28.928857715430865
10607.620705220463 29.12905811623247
10591.59399372405 29.329258517034074
10575.483589570053 29.529458917835676
10559.289852574886 29.729659318637278
10543.013143219317 29.929859719438884
10526.651563037221 30.130060120240486
10510.20189586913 30.33026052104209
10493.663065258415 30.53046092184369
10477.03519254507 30.730661322645297
10460.318398422982 30.9308617234469
10443.512802948637 31.1310621242485
10426.618525549628 31.331262525050104
10409.635685033 31.53146292585171
10392.564399593413 31.73166332665331
10375.404786821146 31.931863727454914
10358.156963709927 32.132064128256516
10340.821046664627 32.33226452905812
10323.397151508776 32.53246492985973
10305.88538868201 32.73266533066133
10288.285867527495 32.93286573146293
10270.59870159446 33.13306613226453
10252.824004365088 33.33326653306614
10234.96188877595 33.53346693386774
10217.012467224682 33.73366733466934
10198.97585157655 33.93386773547095
10180.85215317088 34.13406813627255
10162.641482827366 34.33426853707415
10144.343950852275 34.53446893787576
10125.959667044515 34.73466933867736
10107.488740701605 34.93486973947896
10088.93128062553 35.13507014028057
10070.287394200577 35.33527054108217
10051.557184368954 35.53547094188377
10032.740754484552 35.73567134268538
10013.838211348508 35.93587174348698
9994.84966129436 36.13607214428858
9975.775210193304 36.33627254509019
9956.614963459351 36.53647294589179
9937.369026054392 36.736673346693394
9918.037502493184 36.93687374749499
9898.620496848243 37.1370741482966
9879.118112754657 37.337274549098204
9859.530453414807 37.5374749498998
9839.857621603025 37.73767535070141
9820.099719670157 37.937875751503014
9800.256849548061 38.13807615230461
9780.329111331617 38.33827655310622
9760.316601610335 38.538476953907825
9740.219417958111 38.738677354709424
9720.037660610255 38.93887775551103
9699.771429404624 39.13907815631263
9679.420823785684 39.339278557114234
9658.985942808518 39.53947895791584
9638.466885142756 39.73967935871744
9617.863749076449 39.939879759519044
9597.176632519882 40.14008016032065
9576.405633009326 40.34028056112225
9555.550847710727 40.540480961923855
9534.612373423346 40.740681362725454
9513.590306583332 40.94088176352706
9492.484743267249 41.141082164328665
9471.295779195543 41.341282565130264
9450.023508958064 41.54148296593187
9428.66802339687 41.741683366733476
9407.229413758534 41.941883767535074
9385.707774318042 42.14208416833668
9364.10319901096 42.342284569138286
9342.415781436603 42.542484969939885
9320.645614861147 42.74268537074149
9298.792792220709 42.94288577154309
9276.857406124369 43.143086172344695
9254.839548857151 43.3432865731463
9232.73931238297 43.5434869739479
9210.556788347512 43.743687374749506
9188.29206808111 43.94388777555111
9165.945242601538 44.14408817635271
9143.516402616797 44.344288577154316
9121.005638527846 44.544488977955915
9098.413040431295 44.74468937875752
9075.738698122064 44.94488977955913
9052.982698399548 45.145090180360725
9030.14512657386 45.34529058116233
9007.22607033428 45.54549098196394
8984.225618248154 45.745691382765536
8961.143858593983 45.94589178356714
8937.980879363875 46.14609218436875
8914.73676826595 46.346292585170346
8891.41161272672 46.54649298597195
8868.005499893437 46.74669338677355
8844.518516636399 46.946893787575156
8820.950749551243 47.14709418837676
8797.302284961192 47.34729458917836
8773.573208919279 47.54749498997997
8749.76360721054 47.74769539078157
8725.873565354183 47.94789579158317
8701.903168605715 48.14809619238478
8677.852501959063 48.34829659318638
8653.721650148647 48.54849699398798
8629.510697651434 48.74869739478959
8605.219726053176 48.948897795591186
8580.848815699766 49.14909819639279
8556.398049301437 49.3492985971944
8531.867510285381 49.549498997996
8507.257281831313 49.7496993987976
8482.567446873376 49.94989979959921
8457.798088102012 50.15010020040081
8432.949287965823 50.35030060120241
8408.0211286734 50.55050100200401
8383.013692195133 50.75070140280562
8357.927060265 50.95090180360722
8332.76131438233 51.15110220440882
8307.516535813544 51.35130260521043
8282.192805593886 51.551503006012034
8256.79020452912 51.75170340681363
8231.308813197204 51.95190380761524
8205.748711949962 52.152104208416844
8180.109980914722 52.35230460921844
8154.392699995932 52.55250501002005
8128.596948876771 52.75270541082165
8102.722806464328 52.95290581162325
8076.770348630511 53.15310621242486
8050.739651569825 53.35330661322646
8024.630794061591 53.553507014028064
7998.443854671665 53.75370741482967
7972.178911753927 53.95390781563127
7945.836043451756 54.154108216432874
7919.415327699491 54.35430861723447
7892.91684222387 54.55450901803608
7866.340664545458 54.754709418837685
7839.686871980058 54.95490981963928
7812.955541640097 55.15511022044089
7786.146750436014 55.355310621242495
7759.2605750776165 55.555511022044094
7732.297092075424 55.7557114228457
7705.25637774201 55.955911823647305
7678.138508193311 56.156112224448904
7650.943559349932 56.35631262525051
7623.6716069384365 56.55651302605211
7596.322726492617 56.756713426853715
7568.8969933547605 56.95691382765532
7541.394482676892 57.15711422845692
7513.815269422007 57.357314629258525
7486.159425634977 57.55751503006013
7458.427022732758 57.75771543086173
7430.618134662398 57.957915831663335
7402.73283561326 58.15811623246494
7374.771199591707 58.35831663326654
7346.733300422255 58.558517034068146
7318.619211748723 58.758717434869745
7290.429007035357 58.95891783567135
7262.162759567962 59.159118236472956
7233.820542454997 59.359318637274555
7205.402428628678 59.55951903807616
7176.908490846064 59.75971943887777
7148.33880169013 59.959919839679365
7119.6934335708265 60.16012024048097
7090.972458726138 60.36032064128257
7062.175949223119 60.560521042084176
7033.303976958926 60.76072144288578
7004.356613661842 60.96092184368738
6975.333930892279 61.161122244488986
6946.236000043783 61.36132264529059
6917.0628923440245 61.56152304609219
6887.814678855773 61.7617234468938
6858.491430477874 61.9619238476954
6829.093217946205 62.162124248497
6799.620109808876 62.36232464929861
6770.0721734993185 62.562525050100206
6740.449478303776 62.76272545090181
6710.752094290113 62.96292585170342
6680.980091367936 63.163126252505016
6651.133539289501 63.36332665330662
6621.212507650607 63.56352705410823
6591.21706589149 63.76372745490983
6561.1472832976915 63.96392785571143
6531.003229000943 64.16412825651302
6500.784971980012 64.36432865731463
6470.492581061572 64.56452905811624
6440.12612492104 64.76472945891784
6409.685672083417 64.96492985971945
6379.171290924116 65.16513026052104
6348.583049669784 65.36533066132264
6317.921016399121 65.56553106212425
6287.1852590436865 65.76573146292586
6256.375845388693 65.96593186372746
6225.492843073807 66.16613226452905
6194.536319593922 66.36633266533066
6163.506342299947 66.56653306613227
6132.402978399577 66.76673346693387
6101.226294958045 66.96693386773548
6069.976358898894 67.16713426853707
6038.65323700471 67.36733466933867
6007.256994629157 67.56753507014028
5975.787695465551 67.76773547094189
5944.245404346103 67.96793587174349
5912.63018747482 68.1681362725451
5880.94211091845 68.36833667334669
5849.181240607187 68.5685370741483
5817.347642335379 68.7687374749499
5785.4413817622235 68.96893787575151
5753.462524412459 69.16913827655311
5721.411135677053 69.3693386773547
5689.28728081387 69.56953907815631
5657.09102494836 69.76973947895792
5624.822433074218 69.96993987975952
5592.481570054043 70.17014028056113
5560.068500619999 70.37034068136273
5527.5832893744655 70.57054108216433
5495.026000790671 70.77074148296593
5462.396699213348 70.97094188376754
5429.695448859357 71.17114228456914
5396.922313818317 71.37134268537075
5364.077358053229 71.57154308617234
5331.160645401085 71.77174348697395
5298.172239573497 71.97194388777555
5265.11220415729 72.17214428857716
5231.980602615109 72.37234468937876
5198.777498286017 72.57254509018037
5165.502954386087 72.77274549098196
5132.157034008982 72.97294589178357
5098.739800059335 73.17314629258517
5065.251312731275 73.37334669338678
5031.691632155844 73.57354709418838
4998.060820923624 73.77374749498998
4964.358941505686 73.97394789579158
4930.586056254156 74.17414829659319
4896.742227402764 74.3743486973948
4862.827517067395 74.5745490981964
4828.841987246633 74.774749498998
4794.785699822304 74.9749498997996
4760.658716560006 75.1751503006012
4726.461099109651 75.37535070140281
4692.192909005985 75.57555110220441
4657.854207669115 75.77575150300602
4623.4450564050285 75.97595190380761
4588.965516406102 76.17615230460922
4554.415648751625 76.37635270541082
4519.795514408297 76.57655310621243
4485.1051742307345 76.77675350701404
4450.344688961969 76.97695390781564
4415.514119233946 77.17715430861723
4380.613525568006 77.37735470941884
4345.642968375386 77.57755511022044
4310.602507957697 77.77775551102205
4275.492204507402 77.97795591182366
4240.312118108298 78.17815631262525
4205.062308735978 78.37835671342685
4169.742836258317 78.57855711422846
4134.353760435923 78.77875751503007
4098.895140922606 78.97895791583167
4063.367037265837 79.17915831663326
4027.769508423686 79.37935871743487
3992.1026112059826 79.57955911823647
3956.3664027926984 79.77975951903808
3920.5609422937127 79.97995991983969
3884.6862887148327 80.18016032064129
3848.742500958235 80.38036072144288
3812.72963782289 80.58056112224449
3776.647758005008 80.7807615230461
3740.496920098461 80.9809619238477
3704.2771825952063 81.1811623246493
3667.9886038857135 81.3813627254509
3631.6312422593733 81.5815631262525
3595.205155904929 81.78176352705411
3558.7104029108796 81.98196392785572
3522.147041265891 82.18216432865732
3485.515128859204 82.38236472945893
3448.8147234810426 82.58256513026052
3412.0458828230016 82.78276553106213
3375.208664478463 82.98296593186373
3338.30312594298 83.18316633266534
3301.329324614673 83.38336673346694
3264.2873177946217 83.58356713426853
3227.1771626872414 83.78376753507014
3189.9989164006834 83.98396793587175
3152.7526359472063 84.18416833667335
3115.438378243557 84.38436873747496
3078.056200111348 84.58456913827656
3040.6061582774328 84.78476953907816
3003.088309374266 84.98496993987976
2965.5027099402882 85.18517034068137
2927.849416420282 85.38537074148297
2890.128485165737 85.58557114228458
2852.339972435213 85.78577154308617
2814.4839343946887 85.98597194388778
2776.560425295369 86.18617234468938
2738.569498704741 86.38637274549099
2700.511209914036 86.5865731462926
2662.3856147078777 86.7867735470942
2624.1927687800967 86.98697394789579
2585.932727734064 87.1871743486974
2547.6055470830493 87.387374749499
2509.2112822505483 87.58757515030061
2470.749988570623 87.78777555110221
2432.2217212882388 87.9879759519038
2393.626535559586 88.18817635270541
2354.964486452426 88.38837675350702
2316.2356289464096 88.58857715430862
2277.4400179334034 88.78877755511023
2238.5777082178183 88.98897795591182
2199.6487545169184 89.18917835671343
2160.6532114611587 89.38937875751503
2121.591133594489 89.58957915831664
2082.4625753746736 89.78977955911824
2043.267591173604 89.98997995991985
2004.0062352776124 90.19018036072144
1964.6785618877702 90.39038076152305
1925.2846251202113 90.59058116232465
1885.824479006426 90.79078156312626
1846.2981774935668 90.99098196392787
1806.7057744447532 91.19118236472946
1767.0473236393586 91.39138276553106
1727.322878773325 91.59158316633267
1687.5324934594476 91.79178356713427
1647.6762212276694 91.99198396793588
1607.7541155253748 92.19218436873749
1567.7662297176812 92.39238476953908
1527.712617087716 92.59258517034068
1487.593330836919 92.79278557114229
1447.4084240853167 92.9929859719439
1407.1579498718065 93.1931863727455
1366.8419600001707 93.39338677354709
1326.4605050402083 93.5935871743487
1286.0136366293173 93.7937875751503
1245.501407471903 93.99398797595191
1204.9238701926479 94.19418837675352
1164.2810773367846 94.39438877755512
1123.5730813703683 94.59458917835671
1082.7999346805339 94.79478957915832
1041.9616895757808 94.99498997995993
1001.0583982862274 95.19519038076153
960.0901129638768 95.39539078156314
919.0568856828825 95.59559118236473
877.9587684397974 95.79579158316633
836.7958131538503 95.99599198396794
795.5680716671917 96.19619238476955
754.2755957451527 96.39639278557115
712.9184370764995 96.59659318637276
671.4966472736891 96.79679358717435
630.010277873109 96.99699398797596
588.4593803353448 97.19719438877756
546.8440060454168 97.39739478957917
505.16420631302947 97.59759519038077
463.42003237282046 97.79779559118236
421.61153538459234 97.99799599198397
379.738766433573 98.19819639278558
337.80177653064504 98.39839679358718
295.8006166125883 98.59859719438879
253.7353375423214 98.79879759519038
211.6059901091263 98.99899799599199
169.41262502890226 99.19919839679359
127.15529294438761 99.3993987975952
84.83404442539577 99.5995991983968
42.4489299690467 99.79979959919841
-0.0 100.0

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 30.0
14.089882852423957 29.9398997995992
28.155316365275546 29.879799599198396
42.19629139023553 29.819699398797596
56.21279878590178 29.759599198396792
70.20482941777054 29.699498997995992
84.17237415822999 29.63939879759519
98.11542388654539 29.579298597194388
112.03396948884405 29.519198396793588
125.92800185810842 29.459098196392784
139.7975118941566 29.398997995991984
153.64249050363512 29.338897795591183
167.4629286000033 29.27879759519038
181.25881710351737 29.21869739478958
195.03014696540498 29.15859719438878
208.7769092998971 29.098496993987975
222.49909520081445 29.038396793587175
236.19669560952178 28.97829659318637
249.8697014741326 28.91819639278557
263.5181037495005 28.85809619238477
277.1418933972022 28.797995991983967
290.7410613855207 28.737895791583167
304.3155986894361 28.677795591182363
317.86549629060414 28.617695390781563
331.39074517734673 28.557595190380763
344.89133634463445 28.49749498997996
358.36726079406856 28.43739478957916
371.81850953387107 28.377294589178355
385.2450735788627 28.317194388777555
398.6469439504522 28.257094188376755
412.0241116766185 28.19699398797595
425.37656779189126 28.13689378757515
438.7043033373401 28.07679358717435
452.0073093605549 28.016693386773547
465.28557691562725 27.956593186372746
478.5390970631386 27.896492985971943
491.76786087013727 27.836392785571142
504.97185941012646 27.776292585170342
518.1510837630447 27.71619238476954
531.3055250152455 27.656092184368738
544.435174259486 27.595991983967934
557.5400225949016 27.535891783567134
570.6200611269945 27.475791583166334
583.6752809676125 27.41569138276553
596.7056732349282 27.35559118236473
609.7112290534263 27.295490981963926
622.6919395538785 27.235390781563126
635.6477958733299 27.175290581162326
648.5787891550779 27.115190380761522
661.4849105486503 27.05509018036072
674.3661512097912 26.99498997995992
687.2225023004382 26.934889779559118
700.0539550443857 26.874789579158318
712.8605007620341 26.814689378757514
725.6421307210958 26.754589178356714
738.3988361018279 26.694488977955913
751.1306080906076 26.63438877755511
763.8374378799095 26.57428857715431
776.5193166682905 26.514188376753506
789.1762356603624 26.454088176352705
801.8081860667771 26.393987975951905
814.4151591042026 26.3338877755511
826.9971459952999 26.2737875751503
839.5541379687065 26.213687374749497
852.0861262590093 26.153587174348697
864.5931021067282 26.093486973947897
877.0750567582916 26.033386773547093
889.5319814660124 25.973286573146293
901.9638674880708 25.913186372745493
914.3707060884891 25.85308617234469
926.7524885371075 25.79298597194389
939.1092061095669 25.732885771543085
951.44085008728 25.672785571142285
963.7474117574136 25.612685370741485
976.0288824128639 25.55258517034068
988.2852533522309 25.49248496993988
1000.5165158798005 25.432384769539077
1012.7226613055152 25.372284569138277
1024.9036809449556 25.312184368737476
1037.0595661193151 25.252084168336673
1049.190308155374 25.191983967935872
1061.29589838548 25.13188376753507
1073.3763281475196 25.07178356713427
1085.4315887848984 25.011683366733468
1097.461671646515 24.951583166332664
1109.4665680867345 24.891482965931864
1121.4462694653687 24.831382765531064
1133.4007672095206 24.77128256513026
1145.3300527985748 24.71118236472946
1157.2341176521356 24.651082164328656
1169.1129531449974 24.590981963927856
1180.9665506573087 24.530881763527056
1192.794901574546 24.470781563126252
1204.5979972874864 24.41068136272545
1216.3758291921881 24.350581162324648
1228.1283886899591 24.290480961923848
1239.855667187337 24.230380761523048
1251.5576560960626 24.170280561122244
1263.2343468330512 24.110180360721444
1274.8857308203735 24.05008016032064
1286.5117994852242 23.98997995991984
1298.1125442599011 23.92987975951904
1309.6879565817785 23.869779559118236
1321.238027893279 23.809679358717435
1332.7627496418525 23.749579158316635
1344.2621132799488 23.68947895791583
1355.7361102649904 23.62937875751503
1367.184732059351 23.569278557114227
1378.6079701303254 23.509178356713427
1390.0058159501084 23.449078156312627
1401.378260995768 23.388977955911823
1412.7252967492173 23.328877755511023
1424.0469146971943 23.26877755511022
1435.3431063312316 23.20867735470942
1446.6138631476351 23.14857715430862
1457.8591766474574 23.088476953907815
1469.0790383364708 23.028376753507015
1480.2734397251468 22.96827655310621
1491.442372328626 22.90817635270541
1502.5858276984884 22.84807615230461
1513.703797428071 22.787975951903807
1524.7962730800823 22.727875751503007
1535.863246181255 22.667775551102206
1546.9047082629086 22.607675350701403
1557.9206508609238 22.547575150300602
1568.9110655157228 22.4874749498998
1579.8759437722406 22.427374749499
1590.815277179906 22.367274549098198
1601.7290572926167 22.307174348697394
1612.6172756687145 22.247074148296594
1623.4799238709663 22.18697394789579
1634.3169934665375 22.12687374749499
1645.1284760269732 22.06677354709419
1655.9143631281752 22.006673346693386
1666.6746463503782 21.946573146292586
1677.409317278133 21.886472945891782
1688.1183675002803 21.826372745490982
1698.801788609935 21.76627254509018
1709.4595722044637 21.706172344689378
1720.091709885463 21.646072144288578
1730.6981932587441 21.585971943887778
1741.2790139343124 21.525871743486974
1751.834163526346 21.465771543086174
1762.3636336531831 21.40567134268537
1772.8674159372995 21.34557114228457
1783.3455020052954 21.28547094188377
1793.797883487878 21.225370741482966
1804.2245520198426 21.165270541082165
1814.6254992400632 21.10517034068136
1825.0007168129628 21.04507014028056
1835.3501964080901 20.98496993987976
1845.6739296740227 20.924869739478957
1855.9719082587885 20.864769539078157
1866.244123814472 20.804669338677353
1876.4905679971985 20.744569138276553
1886.711232467128 20.684468937875753
1896.9061088884446 20.62436873747495
1907.075188929346 20.56426853707415
1917.2184642620396 20.50416833667335
1927.3359265627344 20.444068136272545
1937.4275675116337 20.383967935871745
1947.4933787929347 20.32386773547094
1957.5333520948204 20.26376753507014
1967.5474791094616 20.20366733466934
1977.535751533014 20.143567134268537
1987.4983196315702 20.083466933867737
1997.4353414947439 20.023366733466933
2007.3468174548623 19.963266533066133
2017.2327408185645 19.903166332665332
2027.093104866731 19.84306613226453
2036.927902854304 19.78296593186373
2046.7371280101102 19.722865731462925
2056.5207735366744 19.662765531062124
2066.2788326100394 19.602665330661324
2076.0112983795775 19.54256513026052
2085.718163967801 19.48246492985972
2095.399422470177 19.42236472945892
2105.0550669549316 19.362264529058116
2114.6850904628564 19.302164328657316
2124.2894860071146 19.242064128256512
2133.8682465730403 19.181963927855712
2143.4213651179416 19.12186372745491
2152.9488345708965 19.061763527054108
2162.450647832548 19.001663326653308
2171.9267977749005 18.941563126252504
2181.3772772411075 18.881462925851704
2190.8020790452642 18.821362725450903
2200.2011959721935 18.7612625250501
2209.574620777228 18.7011623246493
2218.9223461859974 18.641062124248496
2228.2443648942026 18.580961923847696
2237.5406695673983 18.520861723446895
2246.8112528407664 18.46076152304609
2256.056107318887 18.40066132264529
2265.2752255755113 18.34056112224449
2274.468600153329 18.280460921843687
2283.6362235637307 18.220360721442887
2292.7780882865745 18.160260521042083
2301.8941867699423 18.100160320641283
2310.9845114298996 18.040060120240483
2320.0490546502497 17.97995991983968
2329.087808782283 17.91985971943888
2338.10076614453 17.859759519038075
2347.087919022504 17.799659318637275
2356.049259668446 17.739559118236475
2364.984780301066 17.67945891783567
2373.8944731052775 17.61935871743487
2382.7783302319344 17.559258517034067
2391.636343797561 17.499158316633267
2400.468505884081 17.439058116232466
2409.274808538543 17.378957915831663
2418.0552437728393 17.318857715430862
2426.809803563429 17.258757515030062
2435.5384798510504 17.19865731462926
2444.2412645404324 17.13855711422846
2452.9181495000057 17.078456913827655
2461.569126561605 17.018356713426854
2470.194187520173 16.958256513026054
2478.7933241334567 16.89815631262525
2487.366528121702 16.83805611222445
2495.913791167345 16.777955911823646
2504.4351049146985 16.717855711422846
2512.930460969635 16.657755511022046
2521.3998508992663 16.597655310621242
2529.8432662316177 16.537555110220442
2538.2606984553013 16.477454909819638
2546.652139019181 16.417354709418838
2555.0175793320373 16.357254509018038
2563.3570107622263 16.297154308617234
2571.6704246373315 16.237054108216434
2579.957812243818 16.176953907815633
2588.2191648266767 16.11685370741483
2596.454473589064 16.05675350701403
2604.663729691942 15.996653306613226
2612.846924253708 15.936553106212424
2621.0040483498233 15.876452905811622
2629.135093012435 15.81635270541082
2637.2400492299944 15.75625250501002
2645.318907946871 15.696152304609218
2653.3716600629577 15.636052104208416
2661.398296433275 15.575951903807614
2669.3988078675684 15.515851703406813
2677.373185129901 15.455751503006011
2685.3214189382375 15.39565130260521
2693.2434999640295 15.335551102204407
2701.1394188317877 15.275450901803605
2709.0091661186525 15.215350701402805
2716.8527323539597 15.155250501002003
2724.6701080187963 15.095150300601201
2732.4612835455537 15.0350501002004
2740.2262493174735 14.974949899799599
2747.964995668188 14.914849699398797
2755.6775128812515 14.854749498997995
2763.363791189669 14.794649298597193
2771.0238207754155 14.734549098196391
2778.6575917689497 14.67444889779559
2786.265094248721 14.614348697394789
2793.8463182406695 14.554248496993987
2801.401253717716 14.494148296593185
2808.92989059925 14.434048096192384
2816.432218750608 14.373947895791582
2823.908227982541 14.31384769539078
2831.3579080506797 14.253747494989979
2838.7812486549883 14.193647294589177
2846.178239439211 14.133547094188376
2853.5488699903126 14.073446893787574
2860.893129837906 14.013346693386772
2868.211008453677 13.95324649298597
2875.502495250796 13.89314629258517
2882.767579583323 13.833046092184368
2890.0062507456028 13.772945891783566
2897.218497971652 13.712845691382764
2904.404310434536 13.652745490981962
2911.563677245735 13.592645290581162
2918.696587454505 13.53254509018036
2925.8030300472215 13.472444889779558
2932.8829939467205 13.412344689378756
2939.936468011623 13.352244488977956
2946.963441035656 13.292144288577154
2953.9639017469526 13.232044088176352
2960.9378388073515 13.17194388777555
2967.8852408116786 13.111843687374748
2974.806096287019 13.051743486973947
2981.700393691979 12.991643286573145
2988.5681214159326 12.931543086172343
2995.409267778258 12.871442885771541
3002.2238210275605 12.811342685370741
3009.011769340886 12.75124248496994
3015.7731008229152 12.691142284569137
3022.507803505149 12.631042084168335
3029.215865345079 12.570941883767533
3035.8972742253436 12.510841683366733
3042.552017952872 12.450741482965931
3049.1800842580087 12.390641282565129
3055.781460793627 12.330541082164327
3062.3561351342264 12.270440881763527
3068.904094775015 12.210340681362725
3075.4253271309726 12.150240480961923
3081.919819535901 12.090140280561121
3088.387559241455 12.030040080160319
3094.8285334161587 11.969939879759519
3101.2427291444014 11.909839679358717
3107.630133425416 11.849739478957915
3113.9907331722407 11.789639278557113
3120.32451521066 11.729539078156312
3126.6314662781274 11.66943887775551
3132.9115730226654 11.609338677354708
3139.1648220017496 11.549238476953906
3145.3911996811676 11.489138276553104
3151.5906924338597 11.429038076152304
3157.7632865387345 11.368937875751502
3163.9089681794653 11.3088376753507
3170.02772344326 11.248737474949898
3176.119538319609 11.188637274549098
3182.1843986990098 11.128537074148296
3188.2222903716633 11.068436873747494
3194.233199026148 11.008336673346692
3200.217110248065 10.94823647294589
3206.1740095186574 10.88813627254509
3212.103882213402 10.828036072144288
3218.006713600571 10.767935871743486
3223.8824888397667 10.707835671342684
3229.7311929804227 10.647735470941884
3235.5528109602783 10.587635270541082
3241.347327603816 10.52753507014028
3247.1147276206716 10.467434869739478
3252.8549956040056 10.407334669338676
3258.5681160288436 10.347234468937875
3264.2540732503803 10.287134268537073
3269.9128515022435 10.227034068136271
3275.544434894725 10.16693386773547
3281.1488074129697 10.10683366733467
3286.725952915127 10.046733466933867
3292.275855130457 9.986633266533065
3297.798497657397 9.926533066132263
3303.2938639615863 9.866432865731461
3308.7619373738403 9.806332665330661
3314.202701088083 9.746232464929859
3319.6161381592283 9.686132264529057
3325.002231501014 9.626032064128255
3330.3609638837847 9.565931863727455
3335.6923179322193 9.505831663326653
3340.996276123007 9.44573146292585
3346.272820782468 9.385631262525049
3351.5219340841113 9.325531062124247
3356.7435980461382 9.265430861723447
3361.9377945288825 9.205330661322645
3367.104505232183 9.145230460921843
3372.2437116926953 9.08513026052104
3377.3553952811326 9.02503006012024
3382.439537199436 8.964929859719438
3387.496118477872 8.904829659318636
3392.525119972055 8.844729458917834
3397.52652235989 8.784629258517032
3402.5003061384355 8.724529058116232
3407.4464516206835 8.66442885771543
3412.36493893225 8.604328657314628
3417.2557480079763 8.544228456913826
3422.1188585884393 8.484128256513026
3426.954250216361 8.424028056112224
3431.7619022329195 8.363927855711422
3436.541793773958 8.30382765531062
3441.293903766081 8.243727454909818
3446.0182109226403 8.183627254509018
3450.714693739607 8.123527054108216
3455.383330491317 8.063426853707414
3460.0240992260938 8.003326653306614
3464.636977761742 7.943226452905811
3469.221943680898 7.88312625250501
3473.778974326248 7.823026052104208
3478.3080467955874 7.7629258517034065
3482.8091379367384 7.7028256513026045
3487.282224342298 7.6427254509018026
3491.727282344224 7.5826252505010014
3496.144288008246 7.5225250501001995
3500.533217128094 7.462424849699398
3504.8940452195397 7.402324649298596
3509.2267475142394 7.342224448897795
3513.5312989533695 7.282124248496993
3517.807674181048 7.222024048096192
3522.055847537531 7.16192384769539
3526.275793052174 7.101823647294588
3530.4674844361443 7.041723446893787
3534.630895074881 6.981623246492985
3538.7659980202807 6.921523046092184
3542.872765982602 6.861422845691382
3546.951171322076 6.801322645290581
3551.001186040205 6.741222444889779
3555.0227817707364 6.681122244488978
3559.0159297702935 6.621022044088176
3562.9806009086515 6.560921843687374
3566.9167656586337 6.500821643286573
3570.824394085613 6.440721442885771
3574.7034558366 6.3806212424849695
3578.553920128889 6.3205210420841675
3582.3757557382464 6.260420841683366
3586.1689309866156 6.200320641282564
3589.9334137293063 6.140220440881763
3593.669171341649 6.080120240480961
3597.3761707050794 6.020020040080159
3601.0543781926235 5.959919839679358
3604.7037596537493 5.899819639278556
3608.324280398549 5.839719438877755
3611.915905181214 5.779619238476953
3615.47859818276 5.719519038076152
3619.0123229929613 5.65941883767535
3622.517042591445 5.599318637274549
3625.992719327893 5.539218436873747
3629.439314901307 5.479118236472945
3632.8567903382645 5.419018036072144
3636.245105970115 5.358917835671342
3639.6042214090476 5.298817635270541
3642.934095522954 5.238717434869739
3646.2346864090164 5.178617234468938
3649.50595136593 5.118517034068136
3652.7478468646777 5.0584168336673345
3655.96032851776 4.9983166332665325
3659.1433510467696 4.9382164328657305
3662.2968682482083 4.878116232464929
3665.42083295742 4.818016032064127
3668.5151970105094 4.757915831663326
3671.579911204108 4.697815631262524
3674.6149252528326 4.637715430861723
3677.620187744269 4.577615230460921
3680.5956460913103 4.51751503006012
3683.5412464816413 4.457414829659318
3686.456933824174 4.397314629258516
3689.3426516921922 4.337214428857715
3692.1983422629646 4.277114228456913
3695.023946253552 4.217014028056112
3697.8194028525168 4.15691382765531
3700.584649647213 4.096813627254509
3703.3196225463066 4.036713426853707
3706.02425569715 3.9766132264529053
3708.6984813975923 3.9165130260521037
3711.3422300017755 3.856412825651302
3713.9554298194203 3.7963126252505006
3716.5380070080664 3.736212424849699
3719.089885457676 3.6761122244488975
3721.6109866669563 3.616012024048096
3724.1012296107046 3.555911823647294
3726.5605305974004 3.4958116232464924
3728.9888031162136 3.435711422845691
3731.3859576725094 3.3756112224448893
3733.751901610851 3.3155110220440878
3736.08653892441 3.255410821643286
3738.3897700496013 3.1953106212424847
3740.6614916446383 3.135210420841683
3742.901596350615 3.0751102204408816
3745.109972533583 3.0150100200400796
3747.286504005979 2.954909819639278
3749.431069725623 2.8948096192384765
3751.5435434703786 2.834709418837675
3753.623793486448 2.7746092184368734
3755.6716821081313 2.714509018036072
3757.6870653467904 2.6544088176352703
3759.669792446667 2.5943086172344687
3761.6197054051486 2.534208416833667
3763.536638455088 2.474108216432865
3765.4204175068694 2.4140080160320636
3767.2708595480995 2.353907815631262
3769.087771999158 2.2938076152304605
3770.8709520234124 2.233707414829659
3772.62018579174 2.1736072144288574
3774.335247702272 2.113507014028056
3776.015899558036 2.0534068136272543
3777.661889707671 1.9933066132264528
3779.272952157839 1.9332064128256512
3780.848805670644 1.8731062124248496
3782.3891528657578 1.813006012024048
3783.893679355528 1.7529058116232463
3785.3620529528444 1.6928056112224448
3786.793923006835 1.6327054108216432
3788.188919941773 1.5726052104208417
3789.5466551013337 1.51250501002004
3790.866721035523 1.4524048096192383
3792.1486924135265 1.3923046092184368
3793.392127805453 1.3322044088176352
3794.5965726530294 1.2721042084168337
3795.7615638481902 1.212004008016032
3796.886636464305 1.1519038076152304
3797.9713333435043 1.0918036072144288
3799.015218442045 1.0317034068136273
3800.0178950818704 0.9716032064128256
3800.9790305605156 0.911503006012024
3801.8983889478027 0.8514028056112224
3802.775874371839 0.7913026052104208
3803.6115877198786 0.7312024048096192
3804.4059005617996 0.6711022044088176
3805.1595514872242 0.611002004008016
3805.8737724650236 0.5509018036072144
3806.550457473208 0.4908016032064128
3807.192395219626 0.4307014028056112
3807.803608806523 0.3706012024048096
3808.3898947944404 0.310501002004008
3808.9597831215788 0.2504008016032064
3809.526527937985 0.1903006012024048
3810.113216615151 0.1302004008016032
3810.7716094230364 0.0701002004008016
3811.711312109104 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
415.12027017063957 0.1
414.9745497743671 0.10981963927855712
414.82926800812766 0.11963927855711423
414.6838815279147 0.12945891783567134
414.53793446410515 0.13927855711422846
414.3910392082459 0.14909819639278557
414.24286262701526 0.1589178356713427
414.09311591452206 0.16873747494989982
413.9415469525039 0.17855711422845694
413.7879344412185 0.18837675350701405
413.63208330703776 0.19819639278557116
413.473821047838 0.20801603206412828
413.3129947788348 0.2178356713426854
413.14946880960855 0.2276553106212425
412.9831226296827 0.23747494989979961
412.81384921253454 0.24729458917835673
412.6415535709642 0.25711422845691384
412.466151513335 0.26693386773547095
412.287568562277 0.27675350701402807
412.10573900635603 0.2865731462925852
411.92060506183765 0.2963927855711423
411.732116126658 0.3062124248496994
411.5402281124841 0.3160320641282565
411.34490284361993 0.32585170340681363
411.14610751372254 0.3356713426853708
410.9438141929932 0.3454909819639279
410.7379993798316 0.355310621242485
410.5286435919723 0.36513026052104214
410.3157309929328 0.37494989979959925
410.0992490502412 0.38476953907815636
409.87918822242113 0.3945891783567135
409.6555416721174 0.4044088176352706
409.42830500307554 0.4142284569138277
409.19747601895557 0.4240480961923848
408.9630545021806 0.43386773547094193
408.72504201120523 0.44368737474949904
408.48344169474194 0.45350701402805615
408.23825812161687 0.46332665330661327
407.98949712503855 0.4731462925851704
407.7371656601643 0.4829659318637275
407.48127167393517 0.4927855711422846
407.2218239862306 0.5026052104208417
406.95883218146383 0.5124248496993988
406.69230650980336 0.522244488977956
406.42225779726664 0.5320641282565131
406.1486973639843 0.5418837675350702
405.87163694998566 0.5517034068136273
405.5910886479022 0.5615230460921844
405.30706484202943 0.5713426853707415
405.01957815322845 0.5811623246492986
404.72864138918646 0.5909819639278557
404.4342674995914 0.6008016032064128
404.13646953580826 0.61062124248497
403.83526061467654 0.6204408817635271
403.5306538860765 0.6302605210420842
403.22266250393994 0.6400801603206413
402.91129960040513 0.6498997995991984
402.59657826283996 0.6597194388777555
402.27851151347903 0.6695390781563126
401.95711229144047 0.6793587174348698
401.6323934369073 0.6891783567134269
401.30436767727576 0.698997995991984
400.97304761508883 0.7088176352705411
400.63844571758915 0.7186372745490982
400.3005743077377 0.7284569138276553
399.9594455565597 0.7382765531062124
399.6150714766888 0.7480961923847695
399.26746391699345 0.7579158316633267
398.91663455817763 0.7677354709418838
398.56259490925936 0.7775551102204409
398.205356304837 0.787374749498998
397.8449299030624 0.7971943887775551
397.48132668424716 0.8070140280561122
397.1145574500338 0.8168336673346693
396.7446328230712 0.8266533066132264
396.37156324713817 0.8364729458917836
395.9953589876643 0.8462925851703407
395.616030132602 0.8561122244488978
395.23358659360844 0.8659318637274549
394.8480381074987 0.875751503006012
394.45939423793675 0.8855711422845691
394.0676643773319 0.8953907815631262
393.67285774891417 0.9052104208416833
393.274983408962 0.9150300601202405
392.8740502491597 0.9248496993987976
392.47006699906467 0.9346693386773547
392.06304222866464 0.9444889779559118
391.6529843510094 0.9543086172344689
391.2399016249012 0.964128256513026
390.8238021576307 0.9739478957915831
390.4046939077466 0.9837675350701403
389.9825846878477 0.9935871743486974
389.55748216738857 1.0034068136272545
389.1293938754896 1.0132264529058117
388.6983272037443 1.0230460921843687
388.264289409017 1.032865731462926
387.8272876162249 1.0426853707414832
387.3873288211 1.0525050100200402
386.94441989292545 1.0623246492985974
386.4985675772427 1.0721442885771544
386.0497784985266 1.0819639278557116
385.59805916282477 1.0917835671342686
385.1434159603589 1.1016032064128258
384.68585516808605 1.1114228456913828
384.2253829522184 1.12124248496994
383.76200537069917 1.131062124248497
383.2957283756344 1.1408817635270543
382.82655781567917 1.1507014028056113
382.3544994383779 1.1605210420841685
381.8795588924577 1.1703406813627255
381.401741730075 1.1801603206412827
380.9210534090153 1.1899799599198397
380.4374992948454 1.199799599198397
379.95108466301883 1.209619238476954
379.46181470093455 1.2194388777555112
378.9696945099492 1.2292585170340682
378.4747291073432 1.2390781563126254
377.9769234282413 1.2488977955911824
377.47628232748815 1.2587174348697396
376.9728105814794 1.2685370741482966
376.466512889949 1.2783567134268539
375.95739387771334 1.2881763527054109
375.44545809637316 1.297995991983968
374.9307100259736 1.307815631262525
374.4131540766236 1.3176352705410823
373.89279459007497 1.3274549098196393
373.3696358412624 1.3372745490981965
372.8436820398049 1.3470941883767535
372.3149373314695 1.3569138276553108
371.78340579959826 1.366733466933868
371.2490914664992 1.376553106212425
370.71199829480184 1.3863727454909822
370.172130188779 1.3961923847695392
369.6294909956341 1.4060120240480964
369.08408450675654 1.4158316633266534
368.5359144589445 1.4256513026052107
367.984984535597 1.4354709418837677
367.43129836787546 1.445290581162325
366.87485953583536 1.455110220440882
366.3156715695294 1.4649298597194391
365.75373795008227 1.4747494989979961
365.18906211073806 1.4845691382765533
364.6216474378811 1.4943887775551103
364.05149727203064 1.5042084168336676
363.4786149088103 1.5140280561122246
362.9030035998928 1.5238476953907818
362.32466655392096 1.5336673346693388
361.74360693740493 1.543486973947896
361.15982787559716 1.553306613226453
360.5733324533448 1.5631262525050102
359.98412371592116 1.5729458917835673
359.3922046698356 1.5827655310621245
358.79757828362375 1.5925851703406815
358.2002474886171 1.6024048096192387
357.6002151796943 1.6122244488977957
356.99748421601294 1.622044088176353
356.39205742172334 1.63186372745491
355.7839375866649 1.6416833667334672
355.17312746704476 1.6515030060120242
354.5596297861001 1.6613226452905814
353.94344723474376 1.6711422845691384
353.32458247219427 1.6809619238476956
352.70303812659034 1.6907815631262526
352.07881679559034 1.7006012024048098
351.45192104695735 1.7104208416833668
350.8223534191297 1.720240480961924
350.190116421778 1.730060120240481
349.55521253634856 1.7398797595190383
348.9176442165939 1.7496993987975953
348.2774138890904 1.7595190380761525
347.6345239537437 1.7693386773547095
346.98897678428204 1.7791583166332667
346.34077472873787 1.7889779559118237
345.6899201099181 1.798797595190381
345.03641522586344 1.808617234468938
344.38026235029656 1.8184368737474952
343.7214637330603 1.8282565130260522
343.06002160054527 1.8380761523046094
342.3959381561077 1.8478957915831664
341.72921558047756 1.8577154308617236
341.05985603215737 1.8675350701402806
340.3878616478118 1.8773547094188379
339.7132345426484 1.8871743486973949
339.03597681078963 1.896993987975952
338.3560905256364 1.906813627254509
337.6735777402235 1.9166332665330663
336.98844048756706 1.9264529058116233
336.30068078100413 1.9362725450901805
335.6103006145246 1.9460921843687375
334.9173019630959 1.9559118236472948
334.2216867829805 1.9657314629258518
333.5234570120463 1.975551102204409
332.8226145700703 1.9853707414829662
332.11916135903556 1.9951903807615232
331.4130992634216 2.00501002004008
330.70443015048875 2.0148296593186372
329.99315587055617 2.0246492985971947
329.27927825727403 2.0344689378757517
328.56279912788943 2.0442885771543087
327.84372028350725 2.0541082164328657
327.122043509345 2.063927855711423
326.3977705749827 2.07374749498998
325.6709032346068 2.083567134268537
324.94144322724975 2.093386773547094
324.20939227702405 2.1032064128256516
323.47475209335175 2.1130260521042086
322.73752437118884 2.1228456913827656
321.99771079124525 2.132665330661323
321.2553130202004 2.14248496993988
320.51033271091404 2.152304609218437
319.7627715026331 2.162124248496994
319.01263102119395 2.1719438877755515
318.25991287922136 2.1817635270541085
317.5046186763223 2.1915831663326655
316.7467499992768 2.2014028056112225
315.9863084222246 2.21122244488978
315.22329550684833 2.221042084168337
314.4577128025525 2.230861723446894
313.6895618466398 2.240681362725451
312.9188441644831 2.2505010020040084
312.145561269695 2.2603206412825654
311.36971466429304 2.2701402805611224
310.59130583886247 2.2799599198396794
309.81033627271563 2.289779559118237
309.02680743404846 2.299599198396794
308.24072078009357 2.309418837675351
307.4520777572708 2.319238476953908
306.66087980133466 2.3290581162324653
305.86712833751955 2.3388777555110223
305.0708247806813 2.3486973947895793
304.27197053543676 2.3585170340681363
303.4705669963008 2.3683366733466937
302.6666155478204 2.3781563126252507
301.8601175647064 2.3879759519038077
301.0510744119629 2.3977955911823647
300.2394874450143 2.407615230460922
299.4253580098301 2.417434869739479
298.6086874430471 2.427254509018036
297.78947707208954 2.437074148296593
296.96772821528737 2.4468937875751506
296.1434421819921 2.4567134268537076
295.31662027269056 2.4665330661322646
294.48726377911674 2.4763527054108216
293.65537398436163 2.486172344689379
292.82095216298126 2.495991983967936
291.9839995811025 2.505811623246493
291.14451749652744 2.51563126252505
290.3025071588354 2.5254509018036075
289.4579698094839 2.5352705410821645
288.61090668190735 2.5450901803607215
287.76131900161397 2.5549098196392785
286.9092079862815 2.564729458917836
286.0545748458511 2.574549098196393
285.1974207826194 2.58436873747495
284.3377469913293 2.594188376753507
283.47555465925916 2.6040080160320644
282.6108449663104 2.6138276553106214
281.7436190850938 2.6236472945891784
280.8738781810143 2.633466933867736
280.00162341235415 2.643286573146293
279.1268559303553 2.65310621242485
278.24957687929975 2.662925851703407
277.36978739658895 2.6727454909819643
276.48748861282206 2.6825651302605213
275.60268165187244 2.6923847695390783
274.7153676309634 2.7022044088176354
273.82554766074236 2.712024048096193
272.9332228453543 2.72184368737475
272.0383942825134 2.731663326653307
271.14106306357417 2.741482965931864
270.2412302736009 2.7513026052104212
269.3388969914365 2.7611222444889783
268.43406428977 2.7709418837675353
267.52673323520287 2.7807615230460923
266.61690488831476 2.7905811623246497
265.7045803037278 2.8004008016032067
264.78976053017016 2.8102204408817637
263.87244661053825 2.8200400801603207
262.9526395819585 2.829859719438878
262.0303404758481 2.839679358717435
261.1055503179742 2.849498997995992
260.1782701285131 2.859318637274549
259.2485009221079 2.8691382765531066
258.3162437079258 2.8789579158316636
257.381499489714 2.8887775551102206
256.444269265855 2.8985971943887776
255.50455402942134 2.908416833667335
254.56235476822928 2.918236472945892
253.6176724648916 2.928056112224449
252.67050809686984 2.937875751503006
251.72086263652562 2.9476953907815635
250.7687370511715 2.9575150300601205
249.81413230312066 2.9673346693386775
248.85704934973617 2.9771543086172345
247.89748914347953 2.986973947895792
246.93545263195853 2.996793587174349
245.97094075797423 3.006613226452906
245.00395445956752 3.016432865731463
244.03449467006484 3.0262525050100204
243.06256231812358 3.0360721442885774
242.08815832777628 3.0458917835671344
241.11128361847472 3.0557114228456914
240.1319391051332 3.065531062124249
239.15012569817134 3.075350701402806
238.165844303556 3.085170340681363
237.17909582284295 3.09498997995992
236.18988115321775 3.1048096192384773
235.1982011875364 3.1146292585170343
234.20405681436486 3.1244488977955913
233.20744891801863 3.1342685370741483
232.20837837860142 3.1440881763527058
231.20684607204362 3.1539078156312628
230.20285287013976 3.1637274549098198
229.19639964058607 3.1735470941883768
228.18748724701706 3.183366733466934
227.17611654904204 3.193186372745491
226.16228840228064 3.203006012024048
225.14600365839834 3.2128256513026052
224.1272631651413 3.2226452905811627
223.10606776637093 3.2324649298597197
222.08241830209764 3.2422845691382767
221.05631560851447 3.252104208416834
220.02776051803042 3.261923847695391
218.99675385930283 3.271743486973948
217.96329645726985 3.281563126252505
216.9273891331822 3.2913827655310626
215.88903270463484 3.3012024048096196
214.84822798559776 3.3110220440881766
213.80497578644685 3.3208416833667336
212.7592769139941 3.330661322645291
211.71113217151773 3.340480961923848
210.6605423587914 3.350300601202405
209.6075082721136 3.360120240480962
208.55203070433646 3.3699398797595195
207.49411044489432 3.3797595190380765
206.43374827983158 3.3895791583166335
205.37094499183073 3.3993987975951905
204.3057013602396 3.409218436873748
203.23801816109872 3.419038076152305
202.16789616716787 3.428857715430862
201.09533614795265 3.438677354709419
200.02033886973055 3.4484969939879764
198.94290509557703 3.4583166332665334
197.8630355853907 3.4681362725450904
196.78073109591875 3.4779559118236474
195.69599238078183 3.487775551102205
194.60882019049882 3.497595190380762
193.51921527251096 3.507414829659319
192.42717837120603 3.517234468937876
191.3327102279421 3.5270541082164333
190.2358115810712 3.5368737474949903
189.13648316596232 3.5466933867735473
188.03472571502448 3.5565130260521043
186.93053995772945 3.5663326653306617
185.82392662063435 3.5761523046092187
184.71488642740354 3.5859719438877757
183.60342009883078 3.5957915831663327
182.48952835286084 3.60561122244489
181.3732119046111 3.615430861723447
180.25447146639257 3.625250501002004
179.1333077477309 3.635070140280561
178.0097214553872 3.6448897795591186
176.8837132933786 3.6547094188376756
175.75528396299842 3.6645290581162326
174.6244341628362 3.6743486973947896
173.4911645887976 3.684168336673347
172.35547593412423 3.693987975951904
171.21736888941265 3.703807615230461
170.07684414263392 3.713627254509018
168.93390237915236 3.7234468937875755
167.7885442817446 3.7332665330661325
166.64077053061789 3.7430861723446895
165.49058180342857 3.7529058116232465
164.33797877530034 3.762725450901804
163.18296211884234 3.772545090180361
162.02553250416668 3.782364729458918
160.8656905989062 3.792184368737475
159.70343706823198 3.8020040080160324
158.53877257487053 3.8118236472945894
157.3716977791208 3.8216432865731464
156.20221333887113 3.8314629258517034
155.03031990961594 3.841282565130261
153.8560181444724 3.851102204408818
152.67930869419655 3.860921843687375
151.5001922071997 3.8707414829659323
150.3186693295645 3.8805611222444893
149.1347407050606 3.8903807615230463
147.94840697516057 3.9002004008016034
146.75966877905523 3.910020040080161
145.56852675366946 3.919839679358718
144.37498153367693 3.929659318637275
143.17903375151548 3.939478957915832
141.98068403740197 3.9492985971943892
140.77993301934728 3.9591182364729463
139.57678132317054 3.9689378757515033
138.37122957251393 3.9787575150300603
137.1632783888569 3.9885771543086177
135.9529283915306 3.9983967935871747
134.7401801977316 4.008216432865732
133.5250344225361 4.018036072144288
132.30749167891338 4.027855711422846
131.08755257774 4.037675350701403
129.86521772781308 4.04749498997996
128.64048773586325 4.057314629258517
127.41336320656869 4.067134268537075
126.18384474256789 4.076953907815631
124.95193294447232 4.086773547094189
123.71762841088015 4.096593186372745
122.4809317383881 4.106412825651303
121.24184352160495 4.116232464929859
120.00036435316322 4.126052104208417
118.75649482373234 4.135871743486974
117.51023552203061 4.145691382765531
116.26158703483705 4.155511022044088
115.0105499470041 4.1653306613226455
113.75712484146928 4.175150300601202
112.50131229926667 4.1849699398797595
111.24311289953944 4.194789579158316
109.98252721955056 4.2046092184368735
108.7195558346951 4.214428857715431
107.45419931851131 4.2242484969939875
106.1864582426916 4.234068136272545
104.91633317709439 4.243887775551102
103.64382468975488 4.253707414829659
102.36893334689574 4.263527054108216
101.09165971293878 4.273346693386773
99.8120043505148 4.28316633266533
98.52996782047519 4.292985971943888
97.24555068190213 4.302805611222444
95.95875349211875 4.312625250501002
94.66957680670028 4.322444889779559
93.37802117948402 4.332264529058116
92.08408716257924 4.342084168336673
90.78777530637808 4.35190380761523
89.48908615956478 4.361723446893787
88.18802026912635 4.371543086172345
86.88457818036223 4.381362725450901
85.57876043689357 4.391182364729459
84.27056758067384 4.401002004008016
82.96000015199793 4.410821643286573
81.64705868951144 4.42064128256513
80.33174373022094 4.430460921843687
79.0140558095024 4.440280561122244
77.69399546111131 4.450100200400802
76.37156321719159 4.459919839679358
75.0467596082843 4.469739478957916
73.7195851633375 4.479559118236473
72.3900404097148 4.48937875751503
71.05812587320396 4.499198396793587
69.72384207802646 4.509018036072145
68.38718954684586 4.518837675350701
67.04816880077612 4.528657314629259
65.70678035939113 4.538476953907815
64.3630247407322 4.548296593186373
63.016902461317436 4.55811623246493
61.66841403614978 4.567935871743487
60.31755997872494 4.577755511022044
58.96434080104042 4.5875751503006015
57.608757013603345 4.597394789579158
56.25080912543821 4.6072144288577155
54.89049764409581 4.617034068136272
53.52782307566026 4.6268537074148295
52.16278592475778 4.636673346693387
50.7953866945642 4.6464929859719435
49.42562588681239 4.656312625250501
48.05350400180075 4.666132264529058
46.67902153840052 4.675951903807615
45.302178994063006 4.685771543086172
43.92297686482803 4.695591182364729
42.541415645330424 4.705410821643286
41.15749582880834 4.715230460921844
39.77121790711025 4.7250501002004
38.3825823707019 4.734869739478958
36.99158970867431 4.744689378757515
35.59824040875063 4.754509018036072
34.202534957292876 4.764328657314629
32.804473839309935 4.774148296593186
31.404057538463572 4.783967935871743
30.001286537076307 4.793787575150301
28.596161316137973 4.803607214428857
27.188682355312192 4.813426853707415
25.778850132943976 4.823246492985972
24.366665126066103 4.833066132264529
22.95212781040546 4.842885771543086
21.5352386603906 4.852705410821643
20.11599814915733 4.8625250501002
18.69440674855618 4.872344689378758
17.27046492915853 4.882164328657314
15.844173160262686 4.891983967935872
14.415531909901079 4.901803607214429
12.984541644846235 4.911623246492986
11.551202830616717 4.921442885771543
10.1155159314843 4.9312625250501
8.677481410479157 4.941082164328657
7.2370997293969515 4.9509018036072145
5.794371348804583 4.960721442885771
4.349296728045881 4.9705410821643286
2.9018763252484305 4.980360721442886
1.4521105973291792 4.9901803607214426
-0.0 5.0

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
97453.31750051567 0.1
97449.91050165569 0.30020040080160326
97445.33801715527 0.5004008016032064
97439.31685598179 0.7006012024048097
97431.92419718682 0.9008016032064129
97423.2500255452 1.1010020040080162
97413.35973326255 1.3012024048096196
97402.29904347868 1.5014028056112227
97390.100989897 1.701603206412826
97376.7905233895 1.901803607214429
97362.38728340289 2.1020040080160323
97346.9072740867 2.3022044088176354
97330.36390963994 2.502404809619239
97312.76869073027 2.7026052104208422
97294.13165848835 2.9028056112224454
97274.46170977002 3.1030060120240486
97253.76682293994 3.3032064128256517
97232.05422409625 3.503406813627255
97209.33051248471 3.703607214428858
97185.60175719918 3.9038076152304613
97160.87357319005 4.104008016032064
97135.15118203398 4.304208416833667
97108.43946125945 4.50440881763527
97080.74298492425 4.7046092184368735
97052.06605739785 4.904809619238478
97022.41274178887 5.105010020040081
96991.78688409664 5.305210420841684
96960.19213390762 5.505410821643287
96927.63196226943 5.70561122244489
96894.10967723644 5.9058116232464934
96859.6284374771 6.106012024048097
96824.19126425427 6.3062124248497
96787.80105202956 6.506412825651303
96750.46057789579 6.706613226452906
96712.17251000495 6.906813627254509
96672.93941513002 7.1070140280561125
96632.76376547579 7.307214428857716
96591.64794483532 7.507414829659319
96549.59425417332 7.707615230460922
96506.60491670566 7.907815631262525
96462.68208253375 8.108016032064128
96417.82783288446 8.308216432865732
96372.04418399898 8.508416833667335
96325.33309070821 8.708617234468939
96277.69644972758 8.908817635270541
96229.13610269959 9.109018036072145
96179.65383900923 9.309218436873747
96129.25139839425 9.509418837675351
96077.93047336939 9.709619238476956
96025.6927114821 9.909819639278558
95972.53645998183 10.110020040080162
95918.45753098349 10.310220440881764
95863.45520104794 10.510420841683368
95807.53147061572 10.71062124248497
95750.68834716901 10.910821643286575
95692.927846526 11.111022044088177
95634.25199250798 11.311222444889781
95574.66281493555 11.511422845691383
95514.1623506571 11.711623246492987
95452.75264653932 11.91182364729459
95390.43575888341 12.112024048096194
95327.21375310734 12.312224448897796
95263.08869968461 12.5124248496994
95198.0626778194 12.712625250501002
95132.13778003502 12.912825651302606
95065.31610894999 13.11302605210421
94997.59977743571 13.313226452905813
94928.99090439001 13.513426853707417
94859.491617535 13.713627254509019
94789.10405910341 13.913827655310623
94717.83038340398 14.114028056112225
94645.67275591566 14.31422845691383
94572.63335235942 14.514428857715432
94498.71435405467 14.714629258517036
94423.9179542824 14.914829659318638
94348.24636318267 15.115030060120242
94271.70180270929 15.315230460921844
94194.28650673236 15.515430861723448
94116.00272064743 15.71563126252505
94036.85269446662 15.915831663326655
93956.83869015436 16.11603206412826
93875.96298866578 16.316232464929865
93794.22788320394 16.516432865731467
93711.6356792634 16.71663326653307
93628.18869466498 16.91683366733467
93543.8892556921 17.117034068136277
93458.73969570523 17.31723446893788
93372.74236368008 17.517434869739482
93285.89962560251 17.717635270541084
93198.21385981374 17.91783567134269
93109.6874569986 18.118036072144292
93020.32282016693 18.318236472945895
92930.12236203573 18.518436873747497
92839.08850021994 18.718637274549103
92747.22366654628 18.918837675350705
92654.53031177848 19.119038076152307
92561.01089880045 19.319238476953913
92466.66790256224 19.519438877755515
92371.50381002076 19.719639278557118
92275.52112007557 19.91983967935872
92178.72233836331 20.120040080160326
92081.10997654592 20.320240480961928
91982.68656257154 20.52044088176353
91883.4546412233 20.720641282565133
91783.41676882387 20.92084168336674
91682.57551314565 21.12104208416834
91580.93345331737 21.321242484969943
91478.49317972703 21.521442885771545
91375.2572933383 21.72164328657315
91271.22839531767 21.921843687374754
91166.40909783336 22.122044088176356
91060.8020342091 22.322244488977958
90954.4098484835 22.522444889779564
90847.23519529484 22.722645290581166
90739.2807397635 22.92284569138277
90630.54915737177 23.123046092184374
90521.04313384129 23.323246492985977
90410.76536500831 23.52344689378758
90299.71854576955 23.72364729458918
90187.90537923975 23.923847695390787
90075.32858869349 24.12404809619239
89961.9909081415 24.32424849699399
89847.89508104621 24.524448897795594
89733.04386018576 24.7246492985972
89617.44000751627 24.924849699398802
89501.08629403266 25.125050100200404
89383.98549962812 25.325250501002007
89266.14041295205 25.525450901803612
89147.5538187191 25.725651302605215
89028.2285094319 25.925851703406817
88908.16729800771 26.126052104208423
88787.37300576142 26.326252505010025
88665.84846203041 26.526452905811627
88543.59650402625 26.72665330661323
88420.6199766854 26.926853707414836
88296.92173251919 27.127054108216438
88172.50463146302 27.32725450901804
88047.3715407249 27.527454909819642
87921.5253316708 27.727655310621248
87794.96887210112 27.92785571142285
87667.70503917661 28.128056112224453
87539.73672683338 28.328256513026055
87411.06683550983 28.52845691382766
87281.69827199244 28.728657314629263
87151.63394926101 28.928857715430865
87020.87678633381 29.12905811623247
86889.42970811238 29.329258517034074
86757.29564522617 29.529458917835676
86624.47753387706 29.729659318637278
86490.97831568372 29.929859719438884
86356.78251990817 30.130060120240486
86221.86393900485 30.33026052104209
86086.21380446485 30.53046092184369
85949.83310594337 30.730661322645297
85812.72282782393 30.9308617234469
85674.88394928917 31.1310621242485
85536.31744439033 31.331262525050104
85397.02428211522 31.53146292585171
85257.00542645487 31.73166332665331
85116.2618364687 31.931863727454914
84974.79446634847 32.132064128256516
84832.60426548094 32.33226452905812
84689.69217850921 32.53246492985973
84546.05913368604 32.73266533066133
84401.70605335022 32.93286573146293
84256.63386687303 33.13306613226453
84110.8435002977 33.33326653306614
83964.33587521374 33.53346693386774
83817.11190881139 33.73366733466934
83669.17251393518 33.93386773547095
83520.51859913634 34.13406813627255
83371.1510687244 34.33426853707415
83221.07082281761 34.53446893787576
83070.2787573926 34.73466933867736
82918.77576433304 34.93486973947896
82766.56273147742 35.13507014028057
82613.6405403744 35.33527054108217
82460.01005884605 35.53547094188377
82305.67215300597 35.73567134268538
82150.62769478685 35.93587174348698
81994.87755230295 36.13607214428858
81838.42258989303 36.33627254509019
81681.2636681624 36.53647294589179
81523.4016440243 36.736673346693394
81364.83737074057 36.93687374749499
81205.57169796158 37.1370741482966
81045.60547176555 37.337274549098204
80884.93953469707 37.5374749498998
80723.57472580507 37.73767535070141
80561.51188068016 37.937875751503014
80398.75183149126 38.13807615230461
80235.29540344507 38.33827655310622
80071.14341061543 38.538476953907825
79906.29666725684 38.738677354709424
79740.75599204509 38.93887775551103
79574.52220040915 39.13907815631263
79407.5961045644 39.339278557114234
79239.97851354533 39.53947895791584
79071.67023323757 39.73967935871744
78902.67206640964 39.939879759519044
78732.98481274398 40.14008016032065
78562.60926886764 40.34028056112225
78391.5462283824 40.540480961923855
78219.79648189449 40.740681362725454
78047.36081704377 40.94088176352706
77874.2400185325 41.141082164328665
77700.43486815371 41.341282565130264
77525.9461428297 41.54148296593187
77350.77460793799 41.741683366733476
77174.9210279485 41.941883767535074
76998.38617315212 42.14208416833668
76821.17081106611 42.342284569138286
76643.27570645997 42.542484969939885
76464.7016213809 42.74268537074149
76285.44931517889 42.94288577154309
76105.51954453146 43.143086172344695
75924.913063468 43.3432865731463
75743.63062339381 43.5434869739479
75561.67297311369 43.743687374749506
75379.04085885537 43.94388777555111
75195.7350242924 44.14408817635271
75011.75621056686 44.344288577154316
74827.10515631168 44.544488977955915
74641.78259767262 44.74468937875752
74455.78926833006 44.94488977955913
74269.12589249008 45.145090180360725
74081.79318882586 45.34529058116233
73893.79188057792 45.54549098196394
73705.12269165432 45.745691382765536
73515.78634360207 45.94589178356714
73325.78355562713 46.14609218436875
73135.1150446141 46.346292585170346
72943.78152514559 46.54649298597195
72751.78370952152 46.74669338677355
72559.12230777787 46.946893787575156
72365.79802770546 47.14709418837676
72171.81157486832 47.34729458917836
71977.16365262182 47.54749498997997
71781.85496213066 47.74769539078157
71585.88620238651 47.94789579158317
71389.25807022549 48.14809619238478
71191.97126034544 48.34829659318638
70994.02646532285 48.54849699398798
70795.4243756297 48.74869739478959
70596.16567264317 48.948897795591186
70396.25103304656 49.14909819639279
70195.68113842132 49.3492985971944
69994.45667087862 49.549498997996
69792.57831050611 49.7496993987976
69590.04673538354 49.94989979959921
69386.86262159805 50.15010020040081
69183.02664325932 50.35030060120241
68978.53947251465 50.55050100200401
68773.40177956362 50.75070140280562
68567.6142326728 50.95090180360722
68361.17749819014 51.15110220440882
68154.09224055921 51.35130260521043
67946.35912233332 51.551503006012034
67737.97880418939 51.75170340681363
67528.9519449417 51.95190380761524
67319.27920155552 52.152104208416844
67108.96122916046 52.35230460921844
66897.99868106375 52.55250501002005
66686.39220876335 52.75270541082165
66474.14246045137 52.95290581162325
66261.25007489354 53.15310621242486
66047.71569054745 53.35330661322646
65833.53995170847 53.553507014028064
65618.72350092612 53.75370741482967
65403.26697901625 53.95390781563127
65187.17102507312 54.154108216432874
64970.43627648137 54.35430861723447
64753.06336892774 54.55450901803608
64535.052936412765 54.754709418837685
64316.40561126232 54.95490981963928
64097.12202413896 55.15511022044089
63877.20280405323 55.355310621242495
63656.64857837481 55.555511022044094
63435.45997284346 55.7557114228457
63213.63761158004 55.955911823647305
62991.18211709715 56.156112224448904
62768.094110309874 56.35631262525051
62544.37421054627 56.55651302605211
62320.02303555782 56.756713426853715
62095.0412015297 56.95691382765532
61869.42932309103 57.15711422845692
61643.188013324914 57.357314629258525
61416.317876210924 57.55751503006013
61188.819512979295 57.75771543086173
60960.69353087025 57.957915831663335
60731.94053679952 58.15811623246494
60502.5611361858 58.35831663326654
60272.55593296022 58.558517034068146
60041.92552957571 58.758717434869745
59810.67052701624 58.95891783567135
59578.791524806 59.159118236472956
59346.28912101847 59.359318637274555
59113.163912285316 59.55951903807616
58879.41649380538 59.75971943887777
58645.04745935339 59.959919839679365
58410.05740128865 60.16012024048097
58174.44691056371 60.36032064128257
57938.21657673281 60.560521042084176
57701.36698796036 60.76072144288578
57463.89873102927 60.96092184368738
57225.812391349195 61.161122244488986
56987.108552964746 61.36132264529059
56747.78779856357 61.56152304609219
56507.850709484344 61.7617234468938
56267.29786572476 61.9619238476954
56026.12984594934 62.162124248497
55784.347221766206 62.36232464929861
55541.95056076795 62.562525050100206
55298.9404349319 62.76272545090181
55055.31741759462 62.96292585170342
54811.08208079778 63.163126252505016
54566.23499529556 63.36332665330662
54320.776730562015 63.56352705410823
54074.70785479832 63.76372745490983
53828.028934939925 63.96392785571143
53580.740536663776 64.16412825651302
53332.84322439524 64.36432865731463
53084.33756131522 64.56452905811624
52835.224109366995 64.76472945891784
52585.50342926312 64.96492985971945
52335.176080492194 65.16513026052104
52084.24262132556 65.36533066132264
51832.703608824064 65.56553106212425
51580.559598844564 65.76573146292586
51327.811146046515 65.96593186372746
51074.45880389847 66.16613226452905
50820.503124684416 66.36633266533066
50565.944659510234 66.56653306613227
50310.78395830997 66.76673346693387
50055.021569852055 66.96693386773548
49798.65804174553 67.16713426853707
49541.69392044613 67.36733466933867
49284.129747538034 67.56753507014028
49025.96605906889 67.76773547094189
48767.203393643475 67.96793587174349
48507.84229310062 68.1681362725451
48247.883298155866 68.36833667334669
47987.326948407186 68.5685370741483
47726.17378234086 68.7687374749499
47464.42433733712 68.96893787575151
47202.07914967581 69.16913827655311
46939.13875454201 69.3693386773547
46675.60368603153 69.56953907815631
46411.47447715652 69.76973947895792
46146.75165985086 69.96993987975952
45881.4357649756 70.17014028056113
45615.52732232431 70.37034068136273
45349.026860628444 70.57054108216433
45081.93490756251 70.77074148296593
44814.25198974941 70.97094188376754
44545.97863276561 71.17114228456914
44277.11536114621 71.37134268537075
44007.66269839012 71.57154308617234
43737.62116696503 71.77174348697395
43466.99128831251 71.97194388777555
43195.77358285292 72.17214428857716
42923.968569990364 72.37234468937876
42651.57676811756 72.57254509018037
42378.5986946207 72.77274549098196
42105.034865884205 72.97294589178357
41830.885797096904 73.17314629258517
41556.1519948018 73.37334669338678
41280.83396472454 73.57354709418838
41004.932219232986 73.77374749498998
40728.44726971677 73.97394789579158
40451.37962659196 74.17414829659319
40173.729799305474 74.3743486973948
39895.498296339676 74.5745490981964
39616.68562521677 74.774749498998
39337.29229250329 74.9749498997996
39057.318803814385 75.1751503006012
38776.7656638183 75.37535070140281
38495.63337624063 75.57555110220441
38213.92244386859 75.77575150300602
37931.63336855533 75.97595190380761
37648.766651224054 76.17615230460922
37365.3227918723 76.37635270541082
37081.30228957605 76.57655310621243
36796.70564249386 76.77675350701404
36511.533347870914 76.97695390781564
36225.78590204316 77.17715430861723
35939.46380044118 77.37735470941884
35652.567537594376 77.57755511022044
35365.09760713478 77.77775551102205
35077.054501801074 77.97795591182366
34788.43871344244 78.17815631262525
34499.25073302241 78.37835671342685
34209.49105062279 78.57855711422846
33919.16015544741 78.77875751503007
33628.258535825924 78.97895791583167
33336.78667921757 79.17915831663326
33044.74507075617 79.37935871743487
32752.134188549855 79.57955911823647
32458.95451128073 79.77975951903808
32165.206522912737 79.97995991983969
31870.89070655783 80.18016032064129
31576.007544479573 80.38036072144288
31280.55751809662 80.58056112224449
30984.541107986373 80.7807615230461
30687.958793888418 80.9809619238477
30390.811054708018 81.1811623246493
30093.098368519593 81.3813627254509
29794.821212570067 81.5815631262525
29495.9800632824 81.78176352705411
29196.575396258893 81.98196392785572
28896.60768628456 82.18216432865732
28596.077407330453 82.38236472945893
28294.985032557008 82.58256513026052
27993.331034317234 82.78276553106213
27691.115884160106 82.98296593186373
27388.340052833715 83.18316633266534
27085.004010288503 83.38336673346694
26781.108225680484 83.58356713426853
26476.653167374316 83.78376753507014
26171.639302946583 83.98396793587175
25866.06709918884 84.18416833667335
25559.93702211072 84.38436873747496
25253.24953694303 84.58456913827656
24946.00510814082 84.78476953907816
24638.204199386346 84.98496993987976
24329.847273592204 85.18517034068137
24020.93479290425 85.38537074148297
23711.467218704584 85.58557114228458
23401.445011614538 85.78577154308617
23090.868631497517 85.98597194388778
22779.738531840892 86.18617234468938
22468.055163554553 86.38637274549099
22155.818982397814 86.5865731462926
21843.030445186545 86.7867735470942
21529.690007993224 86.98697394789579
21215.798126149653 87.1871743486974
20901.35525424989 87.387374749499
20586.361846152944 87.58757515030061
20270.818354985546 87.78777555110221
19954.725233144916 87.9879759519038
19638.082932301397 88.18817635270541
19320.891903401287 88.38837675350702
19003.152596669443 88.58857715430862
18684.865461611964 88.78877755511023
18366.030947018866 88.98897795591182
18046.64950096663 89.18917835671343
17726.721570820933 89.38937875751503
17406.24760323919 89.58957915831664
17085.228044173116 89.78977955911824
16763.663338871327 89.98997995991985
16441.55393188189 90.19018036072144
16118.900267054756 90.39038076152305
15795.702787544433 90.59058116232465
15471.961935812378 90.79078156312626
15147.678153629504 90.99098196392787
14822.851882078668 91.19118236472946
14497.483561557034 91.39138276553106
14171.57363177864 91.59158316633267
13845.122531776726 91.79178356713427
13518.130699906162 91.99198396793588
13190.598573845835 92.19218436873749
12862.526590601045 92.39238476953908
12533.91518650577 92.59258517034068
12204.764797225149 92.79278557114229
11875.075857757713 92.9929859719439
11544.848802437731 93.1931863727455
11214.084061304686 93.39338677354709
10882.782060108175 93.5935871743487
10550.943227553173 93.7937875751503
10218.567995299509 93.99398797595191
9885.656794354163 94.19418837675352
9552.21005507349 94.39438877755512
9218.22820716546 94.59458917835671
8883.711679691762 94.79478957915832
8548.660901070132 94.99498997995993
8213.07629907644 95.19519038076153
7876.958300846869 95.39539078156314
7540.307332880089 95.59559118236473
7203.123821039293 95.79579158316633
6865.4081905544635 95.99599198396794
6527.160866024388 96.19619238476955
6188.382271418776 96.39639278557115
5849.072830080345 96.59659318637276
5509.2329647269125 96.79679358717435
5168.863097453363 96.99699398797596
4827.963649733833 97.19719438877756
4486.535042423657 97.39739478957917
4144.577695761404 97.59759519038077
3802.09202937092 97.79779559118236
3459.078462263223 97.99799599198397
3115.5374128386397 98.19819639278558
2771.469298888681 98.39839679358718
2426.874537598029 98.59859719438879
2081.7535455465145 98.79879759519038
1736.1067387109595 98.99899799599199
1389.934532467251 99.19919839679359
1043.237341592163 99.3993987975952
696.0155802652857 99.5995991983968
348.2696620709229 99.79979959919841
-0.0 100.0

1708
ELoss/PCEnergyAnalysis.py Normal file

File diff suppressed because it is too large Load Diff

BIN
ELoss/PCEnergyAnalysis.zip Normal file

Binary file not shown.

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
0.0052592906193615965 0.1
0.005256548760366959 0.10981963927855712
0.005253813942426374 0.11963927855711423
0.005251076075550516 0.12945891783567134
0.005248327436122693 0.13927855711422846
0.005245562072251752 0.14909819639278557
0.005242775375898601 0.1589178356713427
0.005239963768008947 0.16873747494989982
0.0052371244627769575 0.17855711422845694
0.0052342552888350775 0.18837675350701405
0.005231354552299548 0.19819639278557116
0.005228420931128786 0.20801603206412828
0.005225453393225606 0.2178356713426854
0.005222451132730192 0.2276553106212425
0.00521941352035695 0.23747494989979961
0.005216340064634455 0.24729458917835673
0.005213230381643349 0.25711422845691384
0.005210084171394999 0.26693386773547095
0.0052069011994078035 0.27675350701402807
0.005203681282354828 0.2865731462925852
0.0052004242769009 0.2963927855711423
0.005197130071037272 0.3062124248496994
0.005193798577370305 0.3160320641282565
0.005190429727936938 0.32585170340681363
0.005187023470211062 0.3356713426853708
0.005183579764036811 0.3454909819639279
0.005180098579281475 0.355310621242485
0.005176579894045341 0.36513026052104214
0.005173023693301013 0.37494989979959925
0.005169429967862482 0.38476953907815636
0.005165798713606087 0.3945891783567135
0.005162129930882717 0.4044088176352706
0.005158423624074152 0.4142284569138277
0.005154679801257077 0.4240480961923848
0.005150898473946656 0.43386773547094193
0.005147079656898115 0.44368737474949904
0.00514322336794987 0.45350701402805615
0.005139329627895782 0.46332665330661327
0.005135398460377175 0.4731462925851704
0.0051314298917877164 0.4829659318637275
0.005127423951186091 0.4927855711422846
0.005123380670212857 0.5026052104208417
0.00511930008300895 0.5124248496993988
0.005115182226134147 0.522244488977956
0.00511102713848443 0.5320641282565131
0.005106834861207642 0.5418837675350702
0.0051026054376171835 0.5517034068136273
0.00509833891310374 0.5615230460921844
0.005094035335045194 0.5713426853707415
0.005089694752714996 0.5811623246492986
0.00508531721718935 0.5909819639278557
0.005080902781253586 0.6008016032064128
0.005076451499308135 0.61062124248497
0.005071963427274492 0.6204408817635271
0.005067438622501573 0.6302605210420842
0.005062877143672814 0.6400801603206413
0.005058279050714358 0.6498997995991984
0.00505364440470464 0.6597194388777555
0.005048973267785634 0.6695390781563126
0.005044265703076013 0.6793587174348698
0.005039521774586427 0.6891783567134269
0.005034741547137075 0.698997995991984
0.005029925086277724 0.7088176352705411
0.0050250724582102954 0.7186372745490982
0.005020183729714108 0.7284569138276553
0.005015258968073855 0.7382765531062124
0.005010298241010367 0.7480961923847695
0.00500530161661418 0.7579158316633267
0.005000269163281941 0.7677354709418838
0.004995200949655631 0.7775551102204409
0.004990097044564602 0.787374749498998
0.004984957516970395 0.7971943887775551
0.004979782435914307 0.8070140280561122
0.004974571870467649 0.8168336673346693
0.004969325889684659 0.8266533066132264
0.004964044562557995 0.8364729458917836
0.004958727957976745 0.8462925851703407
0.004953376144686894 0.8561122244488978
0.00494798919125416 0.8659318637274549
0.004942567166029134 0.875751503006012
0.004937110137114648 0.8855711422845691
0.0049316181723352785 0.8953907815631262
0.00492609133920892 0.9052104208416833
0.004920529704920346 0.9150300601202405
0.0049149333362966665 0.9248496993987976
0.004909302299784622 0.9346693386773547
0.00490363666142962 0.9444889779559118
0.004897936486856439 0.9543086172344689
0.004892201841251538 0.964128256513026
0.004886432789346874 0.9739478957915831
0.00488062939540518 0.9837675350701403
0.0048747917232066125 0.9935871743486974
0.0048689198360367105 1.0034068136272545
0.0048630137966756 1.0132264529058117
0.00485707366738837 1.0230460921843687
0.004851099509916574 1.032865731462926
0.004845091385470772 1.0426853707414832
0.004839049354724087 1.0525050100200402
0.004832973477806687 1.0623246492985974
0.00482686381430117 1.0721442885771544
0.004820720423238764 1.0819639278557116
0.004814543363096337 1.0917835671342686
0.004808332691794127 1.1016032064128258
0.0048020884666941785 1.1114228456913828
0.004795810744599414 1.12124248496994
0.004789499581753336 1.131062124248497
0.00478315503384027 1.1408817635270543
0.004776777155986167 1.1507014028056113
0.00477036600275988 1.1605210420841685
0.004763921628174911 1.1703406813627255
0.004757444085691586 1.1801603206412827
0.004750933428219624 1.1899799599198397
0.004744389708121076 1.199799599198397
0.004737812977213606 1.209619238476954
0.004731203286774083 1.2194388777555112
0.0047245606875424605 1.2292585170340682
0.004717885229725927 1.2390781563126254
0.0047111769630032935 1.2488977955911824
0.004704435936529599 1.2587174348697396
0.00469766219894093 1.2685370741482966
0.004690855798359406 1.2783567134268539
0.004684016782398344 1.2881763527054109
0.0046771451981675585 1.297995991983968
0.004670241092278802 1.307815631262525
0.004663304510851317 1.3176352705410823
0.004656335499517493 1.3274549098196393
0.004649334103428611 1.3372745490981965
0.0046423003672606674 1.3470941883767535
0.004635234335220262 1.3569138276553108
0.004628136051050541 1.366733466933868
0.00462100555803718 1.376553106212425
0.00461384289901441 1.3863727454909822
0.004606648116371062 1.3961923847695392
0.004599421252056631 1.4060120240480964
0.0045921623475873525 1.4158316633266534
0.004584871444052275 1.4256513026052107
0.0045775485821193335 1.4354709418837677
0.004570193802041411 1.445290581162325
0.004562807143662382 1.455110220440882
0.004555388646423133 1.4649298597194391
0.004547938349367564 1.4747494989979961
0.004540456291148543 1.4845691382765533
0.004532942510033841 1.4943887775551103
0.0045253970439120186 1.5042084168336676
0.0045178199302982665 1.5140280561122246
0.004510211206340209 1.5238476953907818
0.004502570908823647 1.5336673346693388
0.004494899074178258 1.543486973947896
0.004487195738483234 1.553306613226453
0.004479460937472864 1.5631262525050102
0.004471694706542063 1.5729458917835673
0.004463897080751828 1.5827655310621245
0.004456068094834644 1.5925851703406815
0.004448207783199819 1.6024048096192387
0.004440316179938754 1.6122244488977957
0.004432393318830145 1.622044088176353
0.004424439233345127 1.63186372745491
0.004416453956652334 1.6416833667334672
0.004408437521622904 1.6515030060120242
0.004400389960835409 1.6613226452905814
0.004392311306580712 1.6711422845691384
0.00438420159086676 1.6809619238476956
0.0043760608454233045 1.6907815631262526
0.004367889101706547 1.7006012024048098
0.004359686390903719 1.7104208416833668
0.004351452743937591 1.720240480961924
0.00434318819147091 1.730060120240481
0.0043348927639107636 1.7398797595190383
0.004326566491412882 1.7496993987975953
0.0043182094038858605 1.7595190380761525
0.004309821530995321 1.7693386773547095
0.004301402902167999 1.7791583166332667
0.004292953546595768 1.7889779559118237
0.0042844734932395885 1.798797595190381
0.004275962770833396 1.808617234468938
0.004267421407887918 1.8184368737474952
0.004258849432694431 1.8282565130260522
0.00425024687332844 1.8380761523046094
0.004241613757653309 1.8478957915831664
0.004232950113323814 1.8577154308617236
0.00422425596778964 1.8675350701402806
0.0042155313482988115 1.8773547094188379
0.004206776281901066 1.8871743486973949
0.0041979907954511585 1.896993987975952
0.004189174915612116 1.906813627254509
0.0041803286688584206 1.9166332665330663
0.0041714520814791455 1.9264529058116233
0.004162545179581024 1.9362725450901805
0.004153607989091466 1.9460921843687375
0.004144640535761517 1.9559118236472948
0.004135642845168764 1.9657314629258518
0.00412661494272018 1.975551102204409
0.004117556853654925 1.9853707414829662
0.004108468603047083 1.9951903807615232
0.004099350215808357 2.00501002004008
0.004090201716690703 2.0148296593186372
0.0040810231302889225 2.0246492985971947
0.0040718144810432 2.0344689378757517
0.004062575793241592 2.0442885771543087
0.004053307091022471 2.0541082164328657
0.0040440083983769165 2.063927855711423
0.00403467973915107 2.07374749498998
0.004025321137048432 2.083567134268537
0.004015932615632119 2.093386773547094
0.004006514198327083 2.1032064128256516
0.00399706590842228 2.1130260521042086
0.003987587769072796 2.1228456913827656
0.003978079803301934 2.132665330661323
0.003968542034003265 2.14248496993988
0.003958974483942624 2.152304609218437
0.003949377175760086 2.162124248496994
0.003939750131971884 2.1719438877755515
0.003930093374972305 2.1817635270541085
0.003920406927035538 2.1915831663326655
0.003910690810317491 2.2014028056112225
0.0039009450468575685 2.21122244488978
0.0038911696585804184 2.221042084168337
0.003881364667297638 2.230861723446894
0.0038715300947094523 2.240681362725451
0.0038616659624063536 2.2505010020040084
0.003851772291870715 2.2603206412825654
0.0038418491044783635 2.2701402805611224
0.00383189642150013 2.2799599198396794
0.003821914264103362 2.289779559118237
0.0038119026533534116 2.299599198396794
0.0038018616102150882 2.309418837675351
0.003791791155554088 2.319238476953908
0.00378169131013839 2.3290581162324653
0.0037715620946396295 2.3388777555110223
0.0037614035296344383 2.3486973947895793
0.0037512156356057625 2.3585170340681363
0.0037409984329441525 2.3683366733466937
0.0037307519419490284 2.3781563126252507
0.0037204761828299178 2.3879759519038077
0.0037101711757076715 2.3977955911823647
0.003699836940615653 2.407615230460922
0.0036894734975009076 2.417434869739479
0.0036790808662253032 2.427254509018036
0.0036686590665666527 2.437074148296593
0.0036582081182198116 2.4468937875751506
0.003647728040797757 2.4567134268537076
0.0036372188538326394 2.4665330661322646
0.003626680576776821 2.4763527054108216
0.0036161132290038855 2.486172344689379
0.0036055168298096373 2.495991983967936
0.0035948913984130697 2.505811623246493
0.003584236953957324 2.51563126252505
0.003573553515510623 2.5254509018036075
0.0035628411020671917 2.5352705410821645
0.0035520997325481527 2.5450901803607215
0.0035413294258024104 2.5549098196392785
0.003530530200607514 2.564729458917836
0.003519702075670507 2.574549098196393
0.0035088450696287555 2.58436873747495
0.003497959201050763 2.594188376753507
0.0034870444884369687 2.6040080160320644
0.0034761009502205327 2.6138276553106214
0.0034651286047680994 2.6236472945891784
0.0034541274703805518 2.633466933867736
0.003443097565293751 2.643286573146293
0.003432038907679257 2.65310621242485
0.003420951515645038 2.662925851703407
0.0034098354072361675 2.6727454909819643
0.0033986906004355062 2.6825651302605213
0.0033875171131643694 2.6923847695390783
0.003376314963283184 2.7022044088176354
0.003365084168592131 2.712024048096193
0.003353824746831778 2.72184368737475
0.0033425367156836947 2.731663326653307
0.0033312200927710627 2.741482965931864
0.0033198748956592694 2.7513026052104212
0.003308501141856493 2.7611222444889783
0.0032970988488142724 2.7709418837675353
0.003285668033928072 2.7807615230460923
0.00327420871453783 2.7905811623246497
0.003262720907928503 2.8004008016032067
0.0032512046313305904 2.8102204408817637
0.0032396599019206603 2.8200400801603207
0.003228086736821857 2.829859719438878
0.0032164851531044027 2.839679358717435
0.0032048551677860897 2.849498997995992
0.003193196797832761 2.859318637274549
0.003181510060158784 2.8691382765531066
0.003169794971627518 2.8789579158316636
0.003158051549051766 2.8887775551102206
0.0031462798091942234 2.8985971943887776
0.0031344797687679177 2.908416833667335
0.0031226514444366404 2.918236472945892
0.0031107948528153674 2.928056112224449
0.0030989100104706767 2.937875751503006
0.0030869969339211542 2.9476953907815635
0.0030750556396377973 2.9575150300601205
0.003063086144044404 2.9673346693386775
0.0030510884635179614 2.9771543086172345
0.0030390626143890227 2.986973947895792
0.003027008612942083 2.996793587174349
0.003014926475415939 3.006613226452906
0.0030028162180040533 3.016432865731463
0.002990677856854903 3.0262525050100204
0.0029785114080723304 3.0360721442885774
0.0029663168877158766 3.0458917835671344
0.002954094311801122 3.0557114228456914
0.00294184369630001 3.065531062124249
0.002929565057141173 3.075350701402806
0.0029172584102102467 3.085170340681363
0.002904923771350182 3.09498997995992
0.00289256115636155 3.1048096192384773
0.0028801705810028474 3.1146292585170343
0.002867752060990785 3.1244488977955913
0.0028553056120005815 3.1342685370741483
0.002842831249666251 3.1440881763527058
0.0028303289895808804 3.1539078156312628
0.0028177988472969065 3.1637274549098198
0.0028052408383263876 3.1735470941883768
0.0027926549781412684 3.183366733466934
0.002780041282173646 3.193186372745491
0.0027673997658160233 3.203006012024048
0.0027547304444215655 3.2128256513026052
0.0027420333333043477 3.2226452905811627
0.0027293084477396034 3.2324649298597197
0.002716555802963962 3.2422845691382767
0.0027037754141756875 3.252104208416834
0.002690967296534915 3.261923847695391
0.002678131465163875 3.271743486973948
0.0026652679351471253 3.281563126252505
0.0026523767215317685 3.2913827655310626
0.0026394578393276764 3.3012024048096196
0.0026265113035077 3.3110220440881766
0.0026135371290078864 3.3208416833667336
0.002600535330727684 3.330661322645291
0.0025875059235301525 3.340480961923848
0.0025744489222421607 3.350300601202405
0.002561364341654589 3.360120240480962
0.0025482521965225252 3.3699398797595195
0.002535112501565458 3.3797595190380765
0.002521945271467467 3.3895791583166335
0.0025087505208774103 3.3993987975951905
0.00249552826440911 3.409218436873748
0.0024822785166415356 3.419038076152305
0.0024690012921189802 3.428857715430862
0.0024556966053512403 3.438677354709419
0.0024423644708137884 3.4484969939879764
0.002429004902947947 3.4583166332665334
0.002415617916161056 3.4681362725450904
0.0024022035248266395 3.4779559118236474
0.0023887617432845716 3.487775551102205
0.0023752925858412394 3.497595190380762
0.002361796066769701 3.507414829659319
0.0023482722003098444 3.517234468937876
0.0023347210006685426 3.5270541082164333
0.0023211424820198095 3.5368737474949903
0.0023075366585049487 3.5466933867735473
0.002293903544232704 3.5565130260521043
0.0022802431532794065 3.5663326653306617
0.002266555499689122 3.5761523046092187
0.002252840597473792 3.5859719438877757
0.0022390984606133774 3.5957915831663327
0.0022253291030559963 3.60561122244489
0.0022115325387180667 3.615430861723447
0.0021977087814844375 3.625250501002004
0.0021838578452085264 3.635070140280561
0.0021699797437124517 3.6448897795591186
0.0021560744907871657 3.6547094188376756
0.0021421421001925813 3.6645290581162326
0.0021281825856577026 3.6743486973947896
0.00211419596088075 3.684168336673347
0.0021001822395292882 3.693987975951904
0.002086141435240346 3.703807615230461
0.002072073561620541 3.713627254509018
0.002057978632246199 3.7234468937875755
0.002043856660663477 3.7332665330661325
0.002029707660388475 3.7430861723446895
0.002015531644907358 3.7529058116232465
0.002001328627676468 3.762725450901804
0.0019870986221224417 3.772545090180361
0.0019728416416423204 3.782364729458918
0.001958557699603662 3.792184368737475
0.0019442468093446516 3.8020040080160324
0.0019299089841742134 3.8118236472945894
0.0019155442373721143 3.8216432865731464
0.0019011525821890738 3.8314629258517034
0.0018867340318468682 3.841282565130261
0.0018722885995384382 3.851102204408818
0.001857816298427989 3.860921843687375
0.0018433171416510942 3.8707414829659323
0.0018287911423148003 3.8805611222444893
0.0018142383134977225 3.8903807615230463
0.0017996586682501473 3.9002004008016034
0.0017850522195941299 3.910020040080161
0.0017704189805235946 3.919839679358718
0.0017557589640044278 3.929659318637275
0.001741072182974576 3.939478957915832
0.0017263586503441402 3.9492985971943892
0.0017116183789954722 3.9591182364729463
0.001696851381783264 3.9689378757515033
0.0016820576715346426 3.9787575150300603
0.0016672372610492614 3.9885771543086177
0.0016523901630993926 3.9983967935871747
0.0016375163904300133 4.008216432865732
0.0016226159557588987 4.018036072144288
0.0016076888717767063 4.027855711422846
0.0015927351511470695 4.037675350701403
0.0015777548065066818 4.04749498997996
0.0015627478504653782 4.057314629258517
0.00154771429560623 4.067134268537075
0.0015326541544856249 4.076953907815631
0.0015175674396333471 4.086773547094189
0.0015024541635526715 4.096593186372745
0.0014873143387204343 4.106412825651303
0.0014721479775871274 4.116232464929859
0.0014569550925769685 4.126052104208417
0.0014417356960879917 4.135871743486974
0.0014264898004921246 4.145691382765531
0.0014112174181352632 4.155511022044088
0.0013959185613373597 4.1653306613226455
0.001380593242392498 4.175150300601202
0.0013652414735689663 4.1849699398797595
0.0013498632671093453 4.194789579158316
0.001334458635230574 4.2046092184368735
0.0013190275901240364 4.214428857715431
0.0013035701439556323 4.2242484969939875
0.0012880863088658501 4.234068136272545
0.0012725760969698493 4.243887775551102
0.0012570395203575309 4.253707414829659
0.0012414765910936075 4.263527054108216
0.001225887321217687 4.273346693386773
0.0012102717227443337 4.28316633266533
0.001194629807663152 4.292985971943888
0.0011789615879388535 4.302805611222444
0.0011632670755113246 4.312625250501002
0.001147546282295707 4.322444889779559
0.0011317992201824636 4.332264529058116
0.001116025901037446 4.342084168336673
0.0011002263367019727 4.35190380761523
0.0010844005389928895 4.361723446893787
0.0010685485197026476 4.371543086172345
0.001052670290599368 4.381362725450901
0.001036765863426907 4.391182364729459
0.0010208352499049317 4.401002004008016
0.0010048784617289843 4.410821643286573
0.000988895510570545 4.42064128256513
0.0009728864080771096 4.430460921843687
0.0009568511658722434 4.440280561122244
0.0009407897955556596 4.450100200400802
0.0009247023087032793 4.459919839679358
0.0009085887168672941 4.469739478957916
0.0008924490315762398 4.479559118236473
0.0008762832643350567 4.48937875751503
0.0008600914266251507 4.499198396793587
0.0008438735299044659 4.509018036072145
0.0008276295856075447 4.518837675350701
0.0008113596051455875 4.528657314629259
0.0007950635999065256 4.538476953907815
0.0007787415812550738 4.548296593186373
0.0007623935605328027 4.55811623246493
0.0007460195490581976 4.567935871743487
0.0007296195581267161 4.577755511022044
0.0007131935990108595 4.5875751503006015
0.0006967416829602295 4.597394789579158
0.000680263821201586 4.6072144288577155
0.0006637600249389184 4.617034068136272
0.0006472303053534951 4.6268537074148295
0.0006306746736039344 4.636673346693387
0.0006140931408262603 4.6464929859719435
0.0005974857181339592 4.656312625250501
0.0005808524166180481 4.666132264529058
0.0005641932473471302 4.675951903807615
0.00054750822136745 4.685771543086172
0.000530797349702963 4.695591182364729
0.0005140606433553829 4.705410821643286
0.0004972981133042507 4.715230460921844
0.00048050977050698927 4.7250501002004
0.00046369562589895693 4.734869739478958
0.0004468556903935147 4.744689378757515
0.0004299899748820798 4.754509018036072
0.00041309849023417886 4.764328657314629
0.00039618124729751597 4.774148296593186
0.00037923825689801794 4.783967935871743
0.0003622695298399022 4.793787575150301
0.0003452750769057288 4.803607214428857
0.0003282549088564528 4.813426853707415
0.00031120903643149005 4.823246492985972
0.0002941374703487686 4.833066132264529
0.00027704022130478037 4.842885771543086
0.00025991729997464785 4.852705410821643
0.0002427687170121675 4.8625250501002
0.00022559448304987605 4.872344689378758
0.0002083946086991013 4.882164328657314
0.00019116910455001257 4.891983967935872
0.00017391798117168496 4.901803607214429
0.00015664124911214964 4.911623246492986
0.00013933891889844366 4.921442885771543
0.0001220110010366754 4.9312625250501
0.00010465750601206631 4.941082164328657
8.727844428901596e-05 4.9509018036072145
6.98738263111513e-05 4.960721442885771
5.244366250137568e-05 4.9705410821643286
3.498796326193187e-05 4.980360721442886
1.7506738974450796e-05 4.9901803607214426
-0.0 5.0

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 50.0
0.004378786639187832 49.899819639278554
0.00875076770652868 49.799639278557116
0.01311593945952968 49.69945891783567
0.017474298149756096 49.599278557114225
0.021825840022808636 49.49909819639279
0.026170561318300586 49.39891783567134
0.030508458269831996 49.298737474949895
0.03483952710496651 49.19855711422846
0.03916376404520805 49.09837675350701
0.04348116530597424 48.99819639278557
0.04779172709657429 48.89801603206413
0.052095445626067105 48.79783567134268
0.05639231721726812 48.69765531062124
0.06068233818060062 48.5974749498998
0.06496550470003762 48.49729458917835
0.06924181295331647 48.397114228456914
0.07351125911191421 48.29693386773547
0.07777383934101972 48.19675350701403
0.08202954979951033 48.096573146292585
0.08627838663992354 47.99639278557114
0.09052034600843178 47.8962124248497
0.09475542404481686 47.796032064128255
0.09898361688244162 47.69585170340681
0.10320492064822404 47.59567134268537
0.1074193314626112 47.495490981963925
0.11162684543955016 47.39531062124249
0.11582745868646294 47.29513026052104
0.12002116730421697 47.194949899799596
0.12420796738709837 47.09476953907816
0.12838785502278496 46.99458917835671
0.1325608262923164 46.89440881763527
0.13672687727006697 46.79422845691383
0.14088600402371784 46.69404809619238
0.1450382026142266 46.593867735470944
0.14918346909580057 46.4936873747495
0.153321799515866 46.39350701402805
0.15745318991503948 46.293326653306615
0.1615776363270996 46.19314629258517
0.16569513477895548 46.09296593186372
0.16980568129061785 45.992785571142285
0.1739092718751699 45.89260521042084
0.17800590253873505 45.7924248496994
0.18209556928044876 45.692244488977956
0.18617826809242588 45.59206412825651
0.1902539949597307 45.49188376753507
0.1943227458603466 45.391703406813626
0.19838451676514313 45.29152304609218
0.20243930363784532 45.19134268537074
0.20648710243500276 45.0911623246493
0.21052790912536126 44.99098196392786
0.21456171978401153 44.89080160320641
0.21858853045899374 44.79062124248497
0.22260833707708655 44.69044088176353
0.22662113555773017 44.59026052104208
0.23062692181299144 44.49008016032064
0.23462569174753137 44.3898997995992
0.23861744125857234 44.28971943887775
0.2426021662358626 44.18953907815631
0.2465798625616429 44.08935871743487
0.25055052611061324 43.989178356713424
0.25451415274989597 43.888997995991986
0.2584707383390034 43.78881763527054
0.26242027872980084 43.688637274549095
0.2663627697664718 43.588456913827656
0.27029820728548337 43.48827655310621
0.27422658711554876 43.388096192384765
0.2781479050775918 43.28791583166333
0.28206215698471143 43.18773547094188
0.2859693386421432 43.08755511022044
0.28986944584722424 42.987374749499
0.2937624743893545 42.88719438877755
0.2976484200499597 42.78701402805611
0.30152727860245465 42.68683366733467
0.30539904581220323 42.58665330661322
0.30926371743648123 42.486472945891784
0.31312128922443816 42.38629258517034
0.31697175691705665 42.2861122244489
0.3208151162471153 42.185931863727454
0.3246513629391472 42.08575150300601
0.32848049270940105 41.98557114228457
0.3323025012658017 41.885390781563125
0.33611738430790805 41.78521042084168
0.3399251375268733 41.68503006012024
0.3437257566054045 41.584849699398795
0.34751923724505895 41.48466933867736
0.3513055752526099 41.38448897795591
0.3550847663984913 41.284308617234466
0.35885680633035044 41.18412825651303
0.3626216906871775 41.08394789579158
0.3663794150992604 40.983767535070136
0.3701299751881427 40.8835871743487
0.3738733665665804 40.78340681362725
0.377609584838496 40.683226452905814
0.3813386255989364 40.58304609218437
0.38506048443402624 40.48286573146292
0.38877515692092357 40.382685370741484
0.39248263862777516 40.28250501002004
0.39618292511366904 40.18232464929859
0.39987601192858924 40.082144288577155
0.4035618946133699 39.98196392785571
0.4072405686996464 39.88178356713427
0.4109120297098105 39.781603206412825
0.4145762731569603 39.68142284569138
0.4182332945448532 39.58124248496994
0.42188308936785834 39.481062124248496
0.42552565311090584 39.38088176352705
0.4291609812494385 39.28070140280561
0.4327890692493629 39.180521042084166
0.43640991256699724 39.08034068136273
0.44002350664902323 38.98016032064128
0.4436298469324332 38.87997995991984
0.44722892884447946 38.7797995991984
0.45082074780262343 38.67961923847695
0.4544052992144818 38.57943887775551
0.4579825784777747 38.47925851703407
0.4615525809802732 38.37907815631262
0.46511530209974455 38.27889779559118
0.46867073734863296 38.17871743486974
0.472218882234734 38.078537074148294
0.4757597321104479 37.978356713426855
0.47929328231199714 37.87817635270541
0.48281952816532414 37.777995991983964
0.48633846498603595 37.677815631262526
0.48985008807934793 37.57763527054108
0.49335439274002507 37.477454909819635
0.4968513742523249 37.377274549098196
0.5003410278899398 37.27709418837675
0.5038233489159368 37.17691382765531
0.5072983325826997 37.07673346693387
0.5107659741318681 36.97655310621242
0.5142262687942771 36.87637274549098
0.5176792117898977 36.77619238476954
0.5211247983277737 36.67601202404809
0.5245630236059602 36.57583166332665
0.5279938828114621 36.47565130260521
0.5314173711201692 36.37547094188377
0.5348334836967945 36.275290581162324
0.5382422156948082 36.17511022044088
0.5416435622563738 36.07492985971944
0.545037518512283 35.974749498997994
0.5484240795818888 35.87456913827655
0.5518032405730393 35.77438877755511
0.5551749965820113 35.674208416833665
0.558539342693441 35.574028056112226
0.561896273980257 35.47384769539078
0.5652457855036102 35.373667334669335
0.5685878723507413 35.2734869739479
0.571922529719821 35.17330661322645
0.5752497527585242 35.073126252505006
0.5785695364790485 34.97294589178357
0.5818818758814585 34.87276553106212
0.5851867659536106 34.77258517034068
0.5884842016710817 34.67240480961924
0.5917741779970929 34.57222444889779
0.595056689882435 34.472044088176354
0.5983317322653937 34.37186372745491
0.6015993000716716 34.27168336673346
0.6048593882143114 34.171503006012024
0.6081119915936187 34.07132264529058
0.611357105097082 33.97114228456914
0.6145947235992943 33.870961923847695
0.6178248419618723 33.77078156312625
0.6210474550333746 33.67060120240481
0.6242625576492217 33.570420841683365
0.6274701446316117 33.47024048096192
0.6306702107894371 33.37006012024048
0.6338627509182018 33.269879759519036
0.6370477597999339 33.1696993987976
0.6402252322031018 33.06951903807615
0.6433951628825259 32.969338677354706
0.6465575465792912 32.86915831663327
0.6497123780206598 32.76897795591182
0.6528596519199801 32.66879759519038
0.6559993629765968 32.56861723446894
0.6591315060182708 32.46843687374749
0.6622560758886191 32.368256513026054
0.6653730672738065 32.26807615230461
0.6684824748149141 32.16789579158316
0.6715842931385516 32.067715430861725
0.6746785168567621 31.967535070140283
0.6777651405669236 31.86735470941884
0.6808441588516522 31.767174348697395
0.6839155662787016 31.666993987975953
0.6869793574008647 31.56681362725451
0.690035526755871 31.46663326653307
0.6930840688662854 31.366452905811624
0.6961249782394039 31.26627254509018
0.6991582493671503 31.16609218436874
0.7021838767259699 31.065911823647298
0.7052018547767233 30.965731462925852
0.7082121779645777 30.86555110220441
0.7112148407188996 30.76537074148297
0.7142098374531433 30.665190380761526
0.7171971625647399 30.56501002004008
0.7201768104349849 30.46482965931864
0.7231487754289248 30.364649298597197
0.726113051895241 30.264468937875755
0.7290696341661349 30.16428857715431
0.732018516557209 30.064108216432867
0.7349595790349305 29.963927855711425
0.7378924994260475 29.863747494989983
0.7408170715941045 29.763567134268538
0.743733293237923 29.663386773547096
0.7466411620553653 29.563206412825654
0.7495406757431321 29.46302605210421
0.7524318319965594 29.362845691382766
0.7553146285094136 29.262665330661324
0.7581890629736842 29.162484969939882
0.7610551330793747 29.06230460921844
0.763912836514291 28.962124248496995
0.7667621709638281 28.861943887775553
0.769603134110755 28.76176352705411
0.7724357236349964 28.66158316633267
0.7752599372134134 28.561402805611223
0.7780757725195809 28.46122244488978
0.7808832272235643 28.36104208416834
0.783682298991692 28.260861723446897
0.786472985486327 28.16068136272545
0.7892552843656355 28.06050100200401
0.7920291932833536 27.960320641282568
0.7947947098885513 27.860140280561126
0.7975518318253938 27.75995991983968
0.8003005567735901 27.65977955911824
0.8030408825415281 27.559599198396796
0.8057728068883477 27.459418837675354
0.8084963274303307 27.35923847695391
0.8112114417776556 27.259058116232467
0.8139181475341445 27.158877755511025
0.8166164422970066 27.058697394789583
0.8193063236565786 26.958517034068137
0.8219877891960629 26.858336673346695
0.8246608364912625 26.758156312625253
0.8273254631103141 26.65797595190381
0.8299816666134163 26.557795591182366
0.8326294445525569 26.457615230460924
0.835268794471236 26.357434869739482
0.8378997139041863 26.25725450901804
0.8405222003770906 26.157074148296594
0.8431362514062954 26.056893787575152
0.8457418644985227 25.95671342685371
0.8483390371505769 25.85653306613227
0.8509277668490495 25.756352705410823
0.85350805107002 25.65617234468938
0.8560798872787538 25.55599198396794
0.8586432730506636 25.455811623246493
0.8611982059916057 25.35563126252505
0.863744683571363 25.25545090180361
0.8662827032027395 25.155270541082167
0.8688122622861959 25.05509018036072
0.8713333582095261 24.95490981963928
0.8738459883475292 24.854729458917838
0.8763501500616785 24.754549098196396
0.8788458406997848 24.65436873747495
0.8813330575956575 24.55418837675351
0.8838117980687611 24.454008016032066
0.8862820594238672 24.353827655310624
0.8887438389507025 24.25364729458918
0.8911971339235925 24.153466933867737
0.8936419416011009 24.053286573146295
0.8960782592256649 23.953106212424853
0.8985060840232253 23.852925851703407
0.9009254132028525 23.752745490981965
0.9033362439563677 23.652565130260523
0.9057385734579597 23.55238476953908
0.9081323990047281 23.452204408817636
0.9105177178870636 23.352024048096194
0.912894527232385 23.251843687374752
0.9152628241339815 23.15166332665331
0.9176226056655601 23.051482965931864
0.9199738688808309 22.951302605210422
0.9223166108130889 22.85112224448898
0.9246508284747894 22.75094188376754
0.9269765188571177 22.650761523046093
0.9292936789295534 22.55058116232465
0.9316023056394294 22.45040080160321
0.9339023959114842 22.350220440881767
0.936193946647409 22.25004008016032
0.9384769547253882 22.14985971943888
0.9407514169996342 22.049679358717437
0.9430173302999153 21.949498997995995
0.945274691431078 21.84931863727455
0.9475234971725619 21.749138276553108
0.9497637443687355 21.648957915831666
0.9519954298901928 21.548777555110224
0.9542185504863813 21.44859719438878
0.9564331028233178 21.348416833667336
0.9586390835391349 21.248236472945894
0.9608364892435534 21.148056112224452
0.9630253165173494 21.047875751503007
0.965205561911812 20.947695390781565
0.9673772219481945 20.847515030060123
0.9695402931171576 20.74733466933868
0.9716947718782039 20.647154308617235
0.9738406546591042 20.546973947895793
0.9759779378553171 20.44679358717435
0.9781066178293978 20.34661322645291
0.9802266909103999 20.246432865731464
0.9823381533932676 20.146252505010022
0.9844410015382189 20.04607214428858
0.9865352316732084 19.945891783567138
0.9886208401195973 19.845711422845692
0.9906978230554083 19.74553106212425
0.9927661765883945 19.64535070140281
0.9948258967884128 19.545170340681366
0.9968769796867495 19.44498997995992
0.9989194212754353 19.34480961923848
1.0009532175065503 19.244629258517037
1.0029783642915173 19.14444889779559
1.0049948575003844 19.04426853707415
1.0070026929610971 18.944088176352707
1.0090018664587581 18.843907815631265
1.0109923737348758 18.74372745490982
1.0129742104866004 18.643547094188378
1.014947372365949 18.543366733466936
1.0169118550054936 18.443186372745494
1.0188676540881876 18.34300601202405
1.0208147652191135 18.242825651302606
1.0227531838540618 18.142645290581164
1.0246829053996827 18.042464929859722
1.0266039252126324 17.942284569138277
1.0285162385987048 17.842104208416835
1.030419840811949 17.741923847695393
1.0323147270537718 17.64174348697395
1.0342008924720267 17.541563126252505
1.0360783321600848 17.441382765531063
1.0379470411558935 17.34120240480962
1.0398070144410168 17.24102204408818
1.04165824693966 17.140841683366734
1.0435007335176785 17.040661322645292
1.0453344690799629 16.94048096192385
1.047159448481804 16.840300601202408
1.0489756664145922 16.740120240480962
1.0507831174923994 16.63993987975952
1.0525817962658008 16.53975951903808
1.0543716972207755 16.439579158316636
1.0561528147775883 16.33939879759519
1.057925143289652 16.23921843687375
1.0596886770423692 16.139038076152307
1.0614434102519545 16.038857715430865
1.063189337064235 15.93867735470942
1.064926451553429 15.838496993987976
1.066654747720905 15.738316633266534
1.0683742195591335 15.63813627254509
1.070084861017233 15.537955911823648
1.071786665898042 15.437775551102204
1.0734796278899927 15.337595190380762
1.0751637406021983 15.237414829659318
1.0768389975630686 15.137234468937876
1.0785053922189025 15.037054108216433
1.0801629179324546 14.93687374749499
1.0818115679814748 14.836693386773547
1.0834513355572222 14.736513026052105
1.0850822137629514 14.636332665330661
1.0867041956123706 14.53615230460922
1.0883172740675364 14.435971943887775
1.0899214420423737 14.335791583166333
1.0915166923123587 14.23561122244489
1.0931030175077903 14.135430861723448
1.0946804101613798 14.035250501002004
1.096248862706532 13.935070140280562
1.0978083674755945 13.834889779559118
1.0993589166980755 13.734709418837676
1.1009005024988292 13.634529058116232
1.1024331168962072 13.53434869739479
1.1039567518001778 13.434168336673347
1.1054713990252893 13.333987975951905
1.1069770503285596 13.233807615230461
1.1084736973329308 13.133627254509019
1.109961331485467 13.033446893787575
1.1114399441150404 12.933266533066133
1.112909526430239 12.83308617234469
1.1143700695172385 12.732905811623246
1.1158215643376366 12.632725450901804
1.1172640017262527 12.53254509018036
1.1186973723888878 12.432364729458918
1.1201216669000482 12.332184368737474
1.1215368757453277 12.232004008016032
1.1229429892784188 12.131823647294588
1.1243399976647273 12.031643286573146
1.1257278909196546 11.931462925851703
1.1271066589155108 11.83128256513026
1.1284762913790176 11.731102204408817
1.1298367778887777 11.630921843687375
1.1311881078727086 11.530741482965931
1.1325302706054439 11.43056112224449
1.1338632552152603 11.330380761523045
1.1351870506942188 11.230200400801603
1.1365016458579245 11.13002004008016
1.1378070293300906 11.029839679358718
1.1391031895678674 10.929659318637274
1.1403901148590787 10.829478957915832
1.1416677933194403 10.729298597194388
1.1429362128897633 10.629118236472946
1.1441953613331464 10.528937875751502
1.1454452262378678 10.42875751503006
1.1466857950114941 10.328577154308617
1.1479170548637694 10.228396793587175
1.149138992806993 10.128216432865731
1.1503515956619395 10.028036072144289
1.1515549251257298 9.927855711422845
1.1527490698801786 9.827675350701403
1.1539340410059442 9.72749498997996
1.1551098198506815 9.627314629258517
1.1562763875193183 9.527134268537074
1.1574337248683244 9.426953907815632
1.1585818124997829 9.326773547094188
1.1597206307552559 9.226593186372746
1.160850159709435 9.126412825651302
1.1619703791635658 9.02623246492986
1.1630812686386378 8.926052104208416
1.1641828073683251 8.825871743486974
1.165274974291671 8.72569138276553
1.1663577480454983 8.625511022044089
1.167431106956537 8.525330661322645
1.168495029033252 8.425150300601203
1.169549491957358 8.32496993987976
1.1705944730750024 8.224789579158317
1.171629949387605 8.124609218436873
1.1726558975423291 8.024428857715431
1.173672293822172 7.924248496993988
1.1746791141356485 7.824068136272545
1.1756763340060503 7.723887775551102
1.1766639285602545 7.623707414829659
1.1776418725170574 7.523527054108216
1.1786101401750093 7.423346693386773
1.1795687053997173 7.3231663326653305
1.1805175416105893 7.222985971943888
1.1814566217669862 7.122805611222445
1.1823859183537433 7.022625250501002
1.1833054033660295 6.922444889779559
1.1842150482934979 6.822264529058116
1.1851148241036873 6.722084168336673
1.1860047012246273 6.62190380761523
1.1868846495265943 6.5217234468937875
1.1877546383029671 6.421543086172345
1.188614636250118 6.321362725450902
1.1894646114462804 6.221182364729459
1.1903045313293192 6.121002004008016
1.1911343626733304 6.020821643286573
1.191954071563988 5.92064128256513
1.1927636233725478 5.820460921843687
1.1935629827284115 5.7202805611222445
1.1943521134901456 5.620100200400802
1.1951309787148363 5.519919839679359
1.195899540625657 5.419739478957916
1.1966577605775062 5.319559118236473
1.1974055990205634 5.21937875751503
1.1981430154615957 5.119198396793587
1.1988699684228266 5.019018036072144
1.1995864153981652 4.9188376753507015
1.2002923128065663 4.818657314629259
1.20098761594227 4.718476953907816
1.2016722789216412 4.618296593186373
1.2023462546262966 4.51811623246493
1.2030094946421719 4.417935871743487
1.2036619491941365 4.317755511022044
1.204303567075722 4.217575150300601
1.2049342955734668 4.1173947895791585
1.2055540803853235 4.017214428857716
1.2061628655324994 3.9170340681362723
1.2067605932640098 3.8168537074148294
1.207347203953132 3.7166733466933866
1.2079226359848245 3.6164929859719437
1.2084868256330354 3.516312625250501
1.2090397069266652 3.416132264529058
1.2095812115027464 3.315951903807615
1.2101112684451718 3.215771543086172
1.210629804107013 3.1155911823647293
1.211136741914132 3.0154108216432864
1.2116320021473632 2.9152304609218436
1.2121155017000211 2.8150501002004007
1.2125871538068478 2.714869739478958
1.2130468677396993 2.614689378757515
1.2134945484642499 2.514509018036072
1.2139300962506792 2.414328657314629
1.214353406229614 2.3141482965931863
1.2147643678823794 2.2139679358717435
1.215162864451668 2.1137875751503006
1.2155487722547722 2.0136072144288577
1.2159219598761006 1.9134268537074148
1.2162822872081471 1.813246492985972
1.2166296042993492 1.713066132264529
1.2169637499517303 1.6128857715430862
1.2172845499881375 1.5127054108216433
1.2175918150737752 1.4125250501002005
1.2178853379217933 1.3123446893787576
1.218164889624104 1.2121643286573147
1.2184302147010109 1.1119839679358718
1.2186810242085024 1.011803607214429
1.218916985785684 0.911623246492986
1.2191377086754844 0.8114428857715431
1.219342720114329 0.7112625250501002
1.2195314262564192 0.6110821643286574
1.219703044546292 0.5109018036072145
1.219856484462173 0.41072144288577156
1.2199901564814954 0.3105410821643287
1.2201018788072322 0.21036072144288578
1.2201907999130286 0.11018036072144288
1.2203012352876765 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 40.0
3.3168136638228574 39.91985971943888
6.627897879905463 39.83971943887776
9.933251562889753 39.75957915831663
13.232873624423497 39.679438877755516
16.526762973147783 39.59929859719439
19.8149185146818 39.519158316633266
23.09733915161019 39.43901803607215
26.374023783470314 39.358877755511024
29.644971306736817 39.2787374749499
32.910180614808766 39.19859719438878
36.169650597996686 39.11845691382766
39.42338014350692 39.03831663326653
42.67136813542852 38.958176352705415
45.9136134547201 38.87803607214429
49.15011497919392 38.797895791583166
52.38087158350261 38.71775551102205
55.60588213912573 38.63761523046092
58.8251455143537 38.5574749498998
62.03866057427424 38.47733466933868
65.2464261807587 38.39719438877756
68.44844119244583 38.31705410821643
71.64470446472787 38.236913827655314
74.83521484973677 38.15677354709419
78.01997119632735 38.07663326653307
81.19897235006462 37.99649298597195
84.37221715320692 37.91635270541082
87.53970444469165 37.836212424849705
90.701433060121 37.75607214428858
93.85740183174507 37.675931863727456
97.00760958844737 37.59579158316634
100.15205515573032 37.515651302605214
103.29073735569816 37.43551102204409
106.42365500704213 37.35537074148297
109.55080692502582 37.27523046092185
112.67219192146771 37.19509018036072
115.78780880472625 37.114949899799605
118.89765637968482 37.03480961923848
122.00173344773411 36.954669338677355
125.10003880675694 36.87452905811624
128.19257125111295 36.79438877755511
131.27932957162074 36.71424849699399
134.36031255554238 36.63410821643287
137.43551898656793 36.553967935871746
140.50494764479728 36.47382765531062
143.56859730672446 36.393687374749504
146.62646674522176 36.31354709418838
149.67855472952147 36.233406813627255
152.7248600251998 36.15326653306614
155.76538139416087 36.07312625250501
158.80011759461806 35.99298597194389
161.82906738107778 35.91284569138277
164.8522295043231 35.832705410821646
167.86960271139492 35.75256513026052
170.88118574557538 35.672424849699404
173.88697734637125 35.59228456913828
176.88697624949492 35.512144288577154
179.8811811868474 35.43200400801604
182.86959088650167 35.35186372745491
185.852204072683 35.27172344689379
188.82901946575214 35.19158316633267
191.80003578218796 35.111442885771545
194.76525173456793 35.03130260521042
197.72466603155064 34.9511623246493
200.67827737785848 34.87102204408818
203.62608447425757 34.790881763527054
206.56808601754025 34.710741482965936
209.50428070050725 34.63060120240481
212.43466721194756 34.55046092184369
215.3592442366204 34.47032064128257
218.2780104552374 34.390180360721445
221.19096454444184 34.31004008016032
224.0981051767907 34.2298997995992
226.99943102073627 34.14975951903808
229.89494074060525 34.06961923847695
232.78463299658046 33.989478957915836
235.66850644468212 33.90933867735471
238.54655973674684 33.829198396793586
241.41879152040886 33.74905811623247
244.28520043908105 33.668917835671344
247.14578513193376 33.58877755511022
250.00054423387556 33.5086372745491
252.84947637553412 33.42849699398798
255.69258018323467 33.34835671342685
258.5298542789805 33.268216432865735
261.3612972804335 33.18807615230461
264.1869078008924 33.107935871743486
267.0066844492728 33.02779559118237
269.82062583008775 32.94765531062124
272.6287305434252 32.86751503006012
275.4309971849283 32.787374749499
278.2274243457751 32.70723446893788
281.0180106126562 32.62709418837675
283.80275456775445 32.546953907815634
286.58165478872445 32.46681362725451
289.35470984867 32.386673346693385
292.12191831612313 32.30653306613227
294.88327875502387 32.22639278557114
297.63878972469655 32.146252505010025
300.3884497798303 32.0661122244489
303.13225747045544 31.98597194388778
305.8702113419229 31.90583166332666
308.6023099348818 31.825691382765537
311.3285517852574 31.745551102204413
314.0489354242286 31.66541082164329
316.7634593782064 31.58527054108217
319.4721221688111 31.505130260521046
322.17492231284956 31.424989979959925
324.8718583222932 31.344849699398804
327.56292870425506 31.26470941883768
330.2481319609667 31.184569138276558
332.92746658975597 31.104428857715437
335.6009310830236 31.024288577154312
338.26852392822 30.94414829659319
340.93024360782243 30.86400801603207
343.5860885993116 30.783867735470945
346.23605737514794 30.703727454909824
348.8801484027486 30.623587174348703
351.5183601444636 30.543446893787582
354.1506910575522 30.463306613226457
356.77713959415865 30.383166332665336
359.3977042012891 30.303026052104215
362.0123833207872 30.22288577154309
364.62117538930937 30.14274549098197
367.22407883830175 30.06260521042085
369.82109209397515 29.982464929859724
372.41221357728045 29.902324649298603
374.99744170388465 29.82218436873748
377.57677488414606 29.742044088176357
380.1502115230892 29.661903807615236
382.7177500203804 29.581763527054115
385.2793887703029 29.50162324649299
387.8351261617312 29.42148296593187
390.3849605781067 29.341342685370748
392.92889039741226 29.261202404809623
395.4669139921462 29.181062124248502
397.99902972929783 29.10092184368738
400.5252359703214 29.020781563126256
403.0455310711102 28.940641282565135
405.55991338197157 28.860501002004014
408.06838124760054 28.78036072144289
410.5709330070536 28.70022044088177
413.06756699372346 28.620080160320647
415.55828153531246 28.539939879759523
418.043074953806 28.4597995991984
420.5219455654469 28.37965931863728
422.9948916807087 28.299519038076156
425.46191160426855 28.219378757515035
427.92300363498157 28.139238476953913
430.3781660658535 28.05909819639279
432.8273971840138 27.978957915831668
435.27069527068915 27.898817635270547
437.70805860117616 27.818677354709425
440.13948544481434 27.7385370741483
442.5649740649586 27.65839679358718
444.9845227189526 27.57825651302606
447.3981296581007 27.498116232464934
449.80579312764064 27.417975951903813
452.20751136671623 27.33783567134269
454.60328260834945 27.257695390781567
456.99310507941243 27.177555110220446
459.37697700060016 27.097414829659325
461.75489658640225 27.0172745490982
464.12686204507446 26.93713426853708
466.4928715786113 26.856993987975958
468.85292338271745 26.776853707414833
471.20701564677915 26.696713426853712
473.5551465538364 26.61657314629259
475.89731428055404 26.536432865731467
478.2335169971932 26.456292585170345
480.5637528675828 26.376152304609224
482.88802004909087 26.2960120240481
485.20631669259507 26.21587174348698
487.5186409424546 26.135731462925857
489.82499093648084 26.055591182364733
492.12536480590785 25.97545090180361
494.4197606753639 25.89531062124249
496.7081766628418 25.815170340681366
498.9906108796695 25.735030060120245
501.26706143048074 25.654889779559124
503.53752641318584 25.574749498998
505.80200391894147 25.494609218436878
508.0604920321216 25.414468937875757
510.3129888302875 25.334328657314632
512.5594923841576 25.25418837675351
514.8000007575781 25.17404809619239
517.0345120074929 25.093907815631265
519.263024183913 25.013767535070144
521.485535329887 24.933627254509023
523.7020434814707 24.853486973947902
525.9125466676966 24.773346693386777
528.1170429105435 24.693206412825656
530.3155302249065 24.613066132264535
532.5080066185662 24.53292585170341
534.6944700921579 24.45278557114229
536.874918639141 24.37264529058117
539.049350245769 24.292505010020044
541.2177628910574 24.212364729458923
543.3801545467539 24.1322244488978
545.5365231773071 24.052084168336677
547.6868667398351 23.971943887775556
549.8311831840947 23.891803607214435
551.9694704524508 23.81166332665331
554.1017264798438 23.73152304609219
556.2279491937597 23.651382765531068
558.3481365141979 23.571242484969943
560.4622863536397 23.491102204408822
562.5703966170173 23.4109619238477
564.6724652016819 23.330821643286576
566.7684899973718 23.250681362725455
568.8584688861811 23.170541082164334
570.9423997425275 23.09040080160321
573.0202804331207 23.01026052104209
575.0921088169301 22.930120240480967
577.1578827451534 22.849979959919843
579.2176000611835 22.76983967935872
581.2712586005771 22.6896993987976
583.3188561910223 22.609559118236476
585.3603906523058 22.529418837675355
587.395859796281 22.449278557114233
589.4252614268355 22.36913827655311
591.4485933398578 22.288997995991988
593.4658533232055 22.208857715430867
595.477039156672 22.128717434869742
597.4821486119538 22.04857715430862
599.4811794526174 21.9684368737475
601.4741294340668 21.88829659318638
603.4609963035094 21.808156312625254
605.4417777999238 21.728016032064133
607.4164716540256 21.647875751503012
609.3850755882347 21.567735470941887
611.347587316641 21.487595190380766
613.3040045449715 21.407454909819645
615.2543249705558 21.32731462925852
617.1985462822927 21.2471743486974
619.1366661606158 21.167034068136278
621.0686822774599 21.086893787575153
622.9945922962256 21.006753507014032
624.9143938717464 20.92661322645291
626.8280846502527 20.846472945891787
628.7356622693376 20.766332665330665
630.6371243579222 20.686192384769544
632.5324685362203 20.60605210420842
634.4216924157031 20.5259118236473
636.3047935990636 20.445771543086178
638.1817696801814 20.365631262525053
640.0526182440865 20.28549098196393
641.917336866923 20.20535070140281
643.7759231159138 20.125210420841686
645.6283745493226 20.045070140280565
647.4746887164185 19.964929859719444
649.3148631574383 19.88478957915832
651.1488954035487 19.804649298597198
652.9767829768102 19.724509018036077
654.7985233901377 19.644368737474952
656.6141141472626 19.56422845691383
658.4235527426952 19.48408817635271
660.2268366616846 19.403947895791585
662.0239633801801 19.323807615230464
663.8149303647915 19.243667334669343
665.5997350727489 19.16352705410822
667.3783749518619 19.083386773547097
669.1508474404794 19.003246492985976
670.9171499674477 18.923106212424855
672.6772799520687 18.84296593186373
674.4312348040572 18.76282565130261
676.1790119234986 18.68268537074149
677.9206087008047 18.602545090180364
679.6560225166695 18.522404809619243
681.3852507420253 18.44226452905812
683.1082907379961 18.362124248496997
684.825139855852 18.281983967935876
686.5357954369622 18.201843687374755
688.2402548127476 18.12170340681363
689.9385153046316 18.04156312625251
691.6305742239912 17.961422845691388
693.3164288721068 17.881282565130263
694.9960765401108 17.801142284569142
696.6695145089353 17.72100200400802
698.3367400492591 17.640861723446896
699.9977504214529 17.560721442885775
701.6525428755243 17.480581162324654
703.3011146510609 17.40044088176353
704.9434629771719 17.32030060120241
706.5795850724293 17.240160320641287
708.2094781448071 17.160020040080163
709.8331393916186 17.07987975951904
711.4505659994533 16.99973947895792
713.0617551441111 16.919599198396796
714.6667039905352 16.839458917835675
716.2654096927438 16.759318637274554
717.8578693937587 16.67917835671343
719.444080225533 16.599038076152308
721.024039308876 16.518897795591187
722.5977437533771 16.438757515030062
724.1651906573258 16.35861723446894
725.7263771076302 16.27847695390782
727.2813001797341 16.198336673346695
728.8299569375288 16.118196392785574
730.3723444332649 16.038056112224453
731.9084597074597 15.957915831663328
733.4382997888018 15.877775551102205
734.9618616940534 15.797635270541084
736.4791424279477 15.717494989979961
737.9901389830849 15.637354709418839
739.4948483398224 15.557214428857717
740.9932674661634 15.477074148296595
742.4853933176395 15.396933867735472
743.9712228371906 15.31679358717435
745.45075295504 15.236653306613228
746.9239805885646 15.156513026052107
748.3909026421609 15.076372745490984
749.8515160071054 14.99623246492986
751.3058175614104 14.91609218436874
752.7538041696743 14.835951903807617
754.1954726829248 14.755811623246494
755.6308199384583 14.675671342685373
757.0598427596718 14.59553106212425
758.4825379558876 14.515390781563127
759.8989023221725 14.435250501002006
761.3089326391491 14.355110220440883
762.7126256727994 14.27496993987976
764.1099781742607 14.19482965931864
765.5009868796137 14.114689378757516
766.885648509661 14.034549098196393
768.2639597696974 13.954408817635272
769.6359173492704 13.87426853707415
771.0015179219305 13.794128256513028
772.3607581449721 13.713987975951905
773.7136346591625 13.633847695390783
775.0601440884598 13.553707414829661
776.4002830397195 13.473567134268539
777.7340481023883 13.393426853707416
779.0614358481847 13.313286573146295
780.3824428307662 13.233146292585172
781.6970655853826 13.153006012024049
783.0053006285136 13.072865731462928
784.3071444574922 12.992725450901805
785.60259355011 12.912585170340682
786.8916443642072 12.83244488977956
788.1742933372436 12.752304609218438
789.4505368858518 12.672164328657315
790.7203714053696 12.592024048096194
791.9837932693544 12.511883767535071
793.2407988290729 12.43174348697395
794.4913844129718 12.351603206412827
795.7355463261227 12.271462925851704
796.973280849644 12.191322645290583
798.2045842400963 12.11118236472946
799.429452728852 12.031042084168337
800.6478825214355 11.950901803607216
801.8598697968359 11.870761523046093
803.0654107067878 11.79062124248497
804.2645013750199 11.71048096192385
805.4571378964712 11.630340681362727
806.6433163364709 11.550200400801604
807.8230327298825 11.470060120240483
808.996283080209 11.38991983967936
810.1630633586577 11.309779559118237
811.3233695031636 11.229639278557116
812.477197417368 11.149498997995993
813.6245429695516 11.06935871743487
814.7654019915193 10.989218436873749
815.8997702774344 10.909078156312626
817.0276435825998 10.828937875751505
818.1490176221846 10.748797595190382
819.2638880698923 10.66865731462926
820.3722505565687 10.588517034068138
821.4741006687464 10.508376753507015
822.5694339471231 10.428236472945892
823.6582458849706 10.348096192384771
824.740531926471 10.267955911823648
825.8162874649771 10.187815631262525
826.8855078411927 10.107675350701404
827.9481883412708 10.027535070140281
829.0043241948232 9.947394789579159
830.0539105728401 9.867254509018037
831.0969425855137 9.787114228456915
832.1334152799617 9.706973947895792
833.1633236378465 9.62683366733467
834.1866625728848 9.546693386773548
835.2034269282424 9.466553106212427
836.2136114738096 9.386412825651304
837.2172109033501 9.30627254509018
838.2142198315192 9.22613226452906
839.2046327907448 9.145991983967937
840.1884442279628 9.065851703406814
841.165648501204 8.985711422845693
842.1362398760216 8.90557114228457
843.1002125217543 8.825430861723447
844.0575605076173 8.745290581162326
845.0082777986116 8.665150300601203
845.9523582512454 8.58501002004008
846.8897956090566 8.50486973947896
847.8205834979296 8.424729458917836
848.7447154211957 8.344589178356713
849.6621847545064 8.264448897795592
850.5729847404713 8.18430861723447
851.4771084830486 8.104168336673347
852.3745489416771 8.024028056112225
853.2652989251382 7.943887775551103
854.1493510851362 7.863747494989981
855.0266979095848 7.783607214428859
855.8973317155845 7.703466933867736
856.7612446420812 7.623326653306614
857.618428642189 7.543186372745492
858.4688754751639 7.46304609218437
859.3125766980149 7.382905811623247
860.149523656735 7.302765531062125
860.9797074771382 7.222625250501003
861.803119055286 7.14248496993988
862.6197490474872 7.062344689378758
863.4295878598543 6.982204408817636
864.2326256373995 6.902064128256514
865.028852252653 6.821923847695391
865.8182572937881 6.741783567134269
866.6008300522332 6.661643286573147
867.3765595097566 6.581503006012024
868.1454343250053 6.501362725450902
868.9074428194826 6.42122244488978
869.6625729629483 6.3410821643286575
870.4108123582267 6.2609418837675355
871.1521482254104 6.1808016032064135
871.8865673854444 6.1006613226452915
872.6140562430837 6.020521042084169
873.3346007692144 5.940380761523047
874.0481864825335 5.860240480961925
874.7547984305863 5.780100200400802
875.4544211701624 5.69995991983968
876.1470387470584 5.619819639278558
876.832634675221 5.539679358717435
877.5111919152888 5.459539078156313
878.1826928525622 5.379398797595191
878.8471192744391 5.299258517034069
879.5044523473654 5.219118236472946
880.1546725933622 5.138977955911824
880.79775986621 5.058837675350702
881.4336933273827 4.978697394789579
882.0624514218533 4.898557114228457
882.6840118539104 4.818416833667335
883.2983515631593 4.738276553106213
883.9054467009124 4.65813627254509
884.5052726072154 4.577995991983968
885.0978037887983 4.497855711422846
885.6830138982988 4.4177154308617235
886.2608757151638 4.3375751503006015
886.8313611287117 4.2574348697394795
887.3944411239196 4.177294589178357
887.9500857706033 4.097154308617235
888.4982642167707 4.017014028056113
889.0389446870676 3.93687374749499
889.5720944873926 3.8567334669338678
890.0976800169467 3.7765931863727458
890.6156667891962 3.6964529058116233
891.1260194634918 3.6163126252505013
891.6287018893812 3.536172344689379
892.1236771660092 3.456032064128257
892.6109077194183 3.3758917835671345
893.0903554010513 3.295751503006012
893.5619816113408 3.21561122244489
894.0257474529553 3.1354709418837676
894.4816139190865 3.0553306613226456
894.9295421231245 2.975190380761523
895.3694935772153 2.8950501002004008
895.8014305285548 2.8149098196392788
896.225316363901 2.7347695390781563
896.6411160947243 2.6546292585170344
897.0487969377401 2.574488977955912
897.4483290083564 2.4943486973947895
897.8396861479281 2.4142084168336675
898.2228469097687 2.334068136272545
898.5977957337949 2.253927855711423
898.9645243456974 2.1737875751503006
899.3230334239131 2.093647294589178
899.6733345868216 2.013507014028056
900.015452764022 1.933366733466934
900.3494290299925 1.8532264529058118
900.6753239969484 1.7730861723446896
900.9932218877797 1.6929458917835674
901.3032354417734 1.6128056112224451
901.6055118486687 1.532665330661323
901.9002399653972 1.4525250501002005
902.1876591521553 1.3723847695390783
902.4680701819481 1.292244488977956
902.7418488488331 1.2121042084168339
903.0094631542546 1.1319639278557116
903.2714953361993 1.0518236472945892
903.5286706029773 0.971683366733467
903.781895381209 0.8915430861723448
904.032309435413 0.8114028056112226
904.2813588341609 0.7312625250501003
904.5309013671109 0.651122244488978
904.7833647033009 0.5709819639278558
905.0419952299258 0.4908416833667335
905.3112754590231 0.4107014028056113
905.5976925055561 0.330561122244489
905.9113738277266 0.25042084168336676
906.2705145196951 0.17028056112224452
906.7180616804087 0.09014028056112225
907.5636766533732 0.01

View File

@ -0,0 +1,501 @@
Distance_cm Energy_MeV
-0.0 20.0
12.004960341817172 19.95993987975952
23.98964201736537 19.919879759519038
35.95403279928156 19.87981963927856
47.8981204715152 19.839759519038076
59.82189282933158 19.799699398797596
71.72533767933199 19.759639278557113
83.60844283945664 19.719579158316634
95.47119613900456 19.67951903807615
107.31358541863614 19.63945891783567
119.1355985303925 19.59939879759519
130.93722333769784 19.55933867735471
142.7184477153773 19.51927855711423
154.47925954966414 19.479218436873747
166.21964673820682 19.439158316633268
177.93959719008618 19.399098196392785
189.63909882581686 19.359038076152306
201.31813957736523 19.318977955911823
212.97670738815043 19.278917835671344
224.61479021306178 19.23885771543086
236.23237601845952 19.19879759519038
247.82945278219168 19.1587374749499
259.4060084935945 19.11867735470942
270.96203115350795 19.07861723446894
282.4975087742806 19.038557114228457
294.01242937977463 18.998496993987978
305.5067810053806 18.958436873747495
316.9805516980169 18.918376753507015
328.43372951614475 18.878316633266532
339.8663025297676 18.838256513026053
351.2782588204458 18.79819639278557
362.669586481295 18.75813627254509
374.0402736170009 18.718076152304608
385.39030834381686 18.67801603206413
396.7196787895775 18.63795591182365
408.0283731549779 18.597895791583166
419.31637982576467 18.557835671342687
430.58368713504734 18.517775551102204
441.8302832511163 18.477715430861725
453.05615635388847 18.437655310621242
464.2612946349039 18.397595190380763
475.44568629733817 18.35753507014028
486.6093195559983 18.3174749498998
497.75218263733467 18.277414829659318
508.87426377943666 18.237354709418838
519.9755512320438 18.197294589178355
531.0560332565411 18.157234468937876
542.1156981259685 18.117174348697397
553.1545341250206 18.077114228456914
564.1725295500464 18.037054108216434
575.1696727090575 17.99699398797595
586.1459519217227 17.956933867735472
597.1013555193769 17.91687374749499
608.0358718450148 17.87681362725451
618.9494892532997 17.836753507014027
629.8421961105564 17.796693386773548
640.7139807947792 17.756633266533065
651.5648316956248 17.716573146292586
662.3947372144183 17.676513026052106
673.2036857641508 17.636452905811623
683.9916657694749 17.596392785571144
694.7586656667115 17.55633266533066
705.50467390384 17.51627254509018
716.2296789405049 17.4762124248497
726.9336692480065 17.43615230460922
737.6166333093062 17.396092184368737
748.2785596190165 17.356032064128257
758.919436683406 17.315971943887774
769.5392530203891 17.275911823647295
780.1379971595287 17.235851703406816
790.7156576420305 17.195791583166333
801.2722230462253 17.155731462925853
811.8076821486147 17.11567134268537
822.3220237086892 17.07561122244489
832.8152363078991 17.03555110220441
843.2873085393342 16.99549098196393
853.7382290077255 16.955430861723446
864.1679863294327 16.915370741482967
874.5765691324449 16.875310621242484
884.9639660563674 16.835250501002005
895.3301657524224 16.79519038076152
905.6751568834343 16.755130260521042
915.9989281238289 16.715070140280563
926.3014681596235 16.67501002004008
936.5827656884155 16.6349498997996
946.8428094193811 16.594889779559118
957.0815880732588 16.55482965931864
967.2990903823483 16.514769539078156
977.4953050904932 16.474709418837676
987.6702209530791 16.434649298597193
997.8238267370164 16.394589178356714
1007.9561112207365 16.35452905811623
1018.0670631941748 16.314468937875752
1028.156671458765 16.274408817635273
1038.2249248274256 16.23434869739479
1048.2718121245452 16.19428857715431
1058.2973221859763 16.154228456913827
1068.3014438590164 16.114168336673348
1078.2841660024014 16.074108216432865
1088.2454774862856 16.034048096192386
1098.1853671922354 15.993987975951903
1108.103824013208 15.953927855711422
1118.0008368535425 15.91386773547094
1127.8763946289428 15.87380761523046
1137.7304862664625 15.833747494989979
1147.5631008529945 15.793687374749497
1157.3742275229429 15.753627254509016
1167.1638552701836 15.713567134268535
1176.9319730603706 15.673507014028054
1186.6785698704548 15.633446893787573
1196.4036346886658 15.593386773547094
1206.1071565144957 15.553326653306613
1215.7891243586785 15.513266533066131
1225.449527243173 15.47320641282565
1235.0883542011434 15.43314629258517
1244.70559427694 15.393086172344688
1254.3012365260793 15.353026052104207
1263.8752700152234 15.312965931863726
1273.4276838221597 15.272905811623245
1282.9584670357797 15.232845691382764
1292.4676087560574 15.192785571142283
1301.955098094027 15.152725450901803
1311.4209241717626 15.112665330661322
1320.8650761223519 15.072605210420841
1330.2875430898753 15.03254509018036
1339.6883142293823 14.992484969939879
1349.0673787068665 14.952424849699398
1358.424725699242 14.912364729458917
1367.7603443943174 14.872304609218435
1377.0742239907715 14.832244488977954
1386.3663536981269 14.792184368737473
1395.6367227367234 14.752124248496992
1404.8853203376923 14.712064128256511
1414.1121357429279 14.672004008016032
1423.317158205062 14.63194388777555
1432.5003769965256 14.59188376753507
1441.6617815512257 14.551823647294588
1450.8013613011033 14.511763527054107
1459.9191055344168 14.471703406813626
1469.01500355005 14.431643286573145
1478.0890446574824 14.391583166332664
1487.1412181767578 14.351523046092183
1496.1715134384535 14.311462925851702
1505.1799197836492 14.27140280561122
1514.1664265638938 14.23134268537074
1523.1310231411737 14.19128256513026
1532.0736988878805 14.151222444889779
1540.9944431867757 14.111162324649298
1549.8932454309581 14.071102204408817
1558.7700950238293 14.031042084168336
1567.6249813790587 13.990981963927855
1576.457893920548 13.950921843687373
1585.2688220823961 13.910861723446892
1594.0577553088622 13.870801603206411
1602.8246830543294 13.83074148296593
1611.5695947832678 13.790681362725449
1620.292479970196 13.75062124248497
1628.9933280996452 13.710561122244489
1637.6721286661177 13.670501002004007
1646.3288711740504 13.630440881763526
1654.9635451377737 13.590380761523045
1663.576140081473 13.550320641282564
1672.1666455391476 13.510260521042083
1680.7350510545693 13.470200400801602
1689.2813462744693 13.43014028056112
1697.8055208897172 13.39008016032064
1706.30756450391 13.350020040080159
1714.787466692128 13.309959919839677
1723.2452170390538 13.269899799599198
1731.6808051389326 13.229839679358717
1740.0942205955243 13.189779559118236
1748.485453022062 13.149719438877755
1756.8544920412062 13.109659318637274
1765.201327285 13.069599198396793
1773.5259483948237 13.029539078156311
1781.8283450213487 12.98947895791583
1790.1085068244913 12.94941883767535
1798.366423473366 12.909358717434868
1806.6020846462386 12.869298597194387
1814.815480030478 12.829238476953906
1823.006599322509 12.789178356713427
1831.1754322277643 12.749118236472945
1839.3219684606352 12.709058116232464
1847.4461977444223 12.668997995991983
1855.5481098112878 12.628937875751502
1863.627694402204 12.588877755511021
1871.684941266905 12.54881763527054
1879.719840163835 12.508757515030059
1887.7323808600984 12.468697394789578
1895.722553131409 12.428637274549097
1903.6903468185924 12.388577154308615
1911.6357518099082 12.348517034068136
1919.5587579416467 12.308456913827655
1927.4593550157244 12.268396793587174
1935.3375328424584 12.228336673346693
1943.193281240514 12.188276553106212
1951.0265900368515 12.14821643286573
1958.8374490666745 12.10815631262525
1966.6258481733762 12.068096192384768
1974.391777208487 12.028036072144287
1982.1352260316207 11.987975951903806
1989.8561845104227 11.947915831663325
1997.554642520515 11.907855711422844
2005.2305899454436 11.867795591182364
2012.8840166766263 11.827735470941883
2020.5149126132972 11.787675350701402
2028.123267662455 11.747615230460921
2035.7090717388087 11.70755511022044
2043.2723147647253 11.667494989979959
2050.812986670176 11.627434869739478
2058.3310773926833 11.587374749498997
2065.826576877268 11.547314629258516
2073.299475076398 11.507254509018034
2080.749761949933 11.467194388777553
2088.1774274945883 11.427134268537074
2095.5824617448034 11.387074148296593
2102.9648547087063 11.347014028056112
2110.324596367168 11.30695390781563
2117.661676708255 11.26689378757515
2124.9760857271804 11.226833667334668
2132.267813426253 11.186773547094187
2139.536849814829 11.146713426853706
2146.783184909265 11.106653306613225
2154.0068087328677 11.066593186372744
2161.2077113158493 11.026533066132263
2168.385882695281 10.986472945891782
2175.541312915047 10.946412825651302
2182.6739920258024 10.906352705410821
2189.783910084928 10.86629258517034
2196.8710571564884 10.82623246492986
2203.935423311192 10.786172344689378
2210.9769986263514 10.746112224448897
2217.9957731858435 10.706052104208416
2224.9917370800736 10.665991983967935
2231.96488040594 10.625931863727454
2238.9151932668 10.585871743486972
2245.842665778164 10.545811623246491
2252.7472880775113 10.50575150300601
2259.629050298767 10.465691382765531
2266.4879425624626 10.42563126252505
2273.323954995514 10.385571142284569
2280.1370777312027 10.345511022044088
2286.9273009091526 10.305450901803606
2293.6946146753153 10.265390781563125
2300.4390091819537 10.225330661322644
2307.1604745876293 10.185270541082163
2313.859001057194 10.145210420841682
2320.534578761782 10.105150300601201
2327.1872451995137 10.06509018036072
2333.817138037164 10.02503006012024
2340.424348582387 9.98496993987976
2347.00886891868 9.944909819639278
2353.5706910889135 9.904849699398797
2360.1098070949556 9.864789579158316
2366.626208897291 9.824729458917835
2373.119888414632 9.784669338677354
2379.59083752353 9.744609218436873
2386.0390480579763 9.704549098196392
2392.464511809 9.66448897795591
2398.8672205242597 9.62442885771543
2405.2471659076296 9.584368737474948
2411.6043396187792 9.544308617234469
2417.93873327275 9.504248496993988
2424.250338439522 9.464188376753507
2430.539146643575 9.424128256513026
2436.805149363448 9.384068136272544
2443.048338031286 9.344008016032063
2449.268704032386 9.303947895791582
2455.46623870473 9.263887775551101
2461.64093333852 9.22382765531062
2467.792779175697 9.183767535070139
2473.9217674094593 9.143707414829658
2480.0278891837715 9.103647294589177
2486.1111355928656 9.063587174348697
2492.171497680737 9.023527054108216
2498.20896644063 8.983466933867735
2504.223532814517 8.943406813627254
2510.2151876925723 8.903346693386773
2516.1839219126327 8.863286573146292
2522.129726259655 8.82322645290581
2528.0525914651616 8.78316633266533
2533.9525082066802 8.743106212424848
2539.829467107172 8.703046092184367
2545.6834587344556 8.662985971943886
2551.5144736006155 8.622925851703407
2557.3225021614085 8.582865731462926
2563.107534815654 8.542805611222445
2568.8695619046202 8.502745490981964
2574.6085737113963 8.462685370741482
2580.3245604602585 8.422625250501001
2586.0175123160216 8.38256513026052
2591.687419383384 8.342505010020039
2597.3342717062606 8.302444889779558
2602.9580592671027 8.262384769539077
2608.558771986211 8.222324649298596
2614.1363997210337 8.182264529058115
2619.6909322654533 8.142204408817635
2625.2223593490653 8.102144288577154
2630.7306706364384 8.062084168336673
2636.2158557263683 8.022024048096192
2641.677904151115 7.981963927855711
2647.1168053756282 7.94190380761523
2652.5325487967607 7.901843687374749
2657.925123742466 7.8617835671342675
2663.2945194709832 7.821723446893786
2668.640725170008 7.781663326653306
2673.9637299558485 7.741603206412825
2679.2635228725658 7.701543086172344
2684.5400928911 7.661482965931863
2689.7934289083805 7.621422845691382
2695.023519746421 7.5813627254509015
2700.2303541513957 7.54130260521042
2705.4139207927014 7.501242484969939
2710.5742082620013 7.461182364729458
2715.711205072251 7.421122244488977
2720.824899656706 7.381062124248496
2725.9152803679126 7.341002004008016
2730.982335476679 7.300941883767535
2736.026053171025 7.2608817635270535
2741.046421555114 7.220821643286572
2746.0434286481654 7.180761523046091
2751.017062383342 7.14070140280561
2755.9673106066207 7.10064128256513
2760.8941610756383 7.060581162324649
2765.7976014585147 7.020521042084168
2770.6776193326546 6.980460921843687
2775.5342021835236 6.9404008016032055
2780.3673374034 6.900340681362724
2785.1770122901034 6.860280561122244
2789.9632140456947 6.820220440881763
2794.7259297751502 6.780160320641282
2799.4651464850117 6.740100200400801
2804.1808510820033 6.70004008016032
2808.8730303716234 6.659979959919839
2813.5416710567056 6.619919839679358
2818.186759735949 6.579859719438877
2822.8082829024183 6.539799599198396
2827.4062269420097 6.499739478957915
2831.9805781318855 6.459679358717434
2836.531322638874 6.419619238476953
2841.0584465178335 6.379559118236473
2845.5619357099827 6.3394989979959915
2850.0417760411897 6.29943887775551
2854.4979532202265 6.259378757515029
2858.930452836981 6.219318637274548
2863.339260360632 6.179258517034068
2867.7243611377776 6.139198396793587
2872.085740390524 6.099138276553106
2876.4233832145273 6.059078156312625
2880.737274576992 6.0190180360721435
2885.0273993146184 5.978957915831662
2889.293742131504 5.938897795591182
2893.5362875969927 5.898837675350701
2897.7550201434724 5.85877755511022
2901.9499240641176 5.818717434869739
2906.1209835105788 5.778657314629258
2910.26818249061 5.738597194388777
2914.3915048656413 5.698537074148296
2918.490934348287 5.658476953907815
2922.566454499789 5.618416833667334
2926.618048727399 5.578356713426853
2930.6457002816874 5.538296593186372
2934.6493922537834 5.498236472945891
2938.6291075725435 5.458176352705411
2942.5848290016415 5.4181162324649295
2946.5165391365817 5.378056112224448
2950.4242204016314 5.337995991983967
2954.3078550466657 5.297935871743486
2958.167425143929 5.257875751503005
2962.0029125847027 5.217815631262525
2965.8142990758797 5.177755511022044
2969.6015661364413 5.137695390781563
2973.364695093831 5.0976352705410815
2977.103667080224 5.0575751503006
2980.8184630286873 5.01751503006012
2984.5090636692235 4.977454909819639
2988.1754495246973 4.937394789579158
2991.817600906638 4.897334669338677
2995.435497910913 4.857274549098196
2999.0291204132686 4.817214428857715
3002.598448064728 4.777154308617234
3006.1434602868467 4.737094188376753
3009.6641362668147 4.697034068136272
3013.1604549523995 4.656973947895791
3016.6323950467254 4.61691382765531
3020.079935002878 4.576853707414829
3023.50305301833 4.5367935871743486
3026.901727029177 4.496733466933867
3030.2759347041765 4.456673346693386
3033.6256534385807 4.416613226452905
3036.950860347752 4.376553106212424
3040.2515322605536 4.336492985971943
3043.527645712502 4.296432865731463
3046.7791769386704 4.256372745490982
3050.0061018663323 4.2163126252505005
3053.208396107331 4.176252505010019
3056.3860349501592 4.136192384769538
3059.538993351741 4.096132264529057
3062.6672459288893 4.056072144288577
3065.770766949438 4.016012024048096
3068.8495303230115 3.9759519038076148
3071.9035095914332 3.9358917835671337
3074.9326779187368 3.895831663326653
3077.9370080807676 3.855771543086172
3080.9164724543493 3.8157114228456908
3083.8710430059905 3.77565130260521
3086.800691280106 3.735591182364729
3089.705388386725 3.695531062124248
3092.5851049886537 3.655470941883767
3095.4398112880654 3.615410821643286
3098.269477012478 3.575350701402805
3101.074071400087 3.5352905811623243
3103.853563184408 3.495230460921843
3106.6079205781925 3.455170340681362
3109.3371112565665 3.4151102204408814
3112.0411023393444 3.3750501002004003
3114.719860372463 3.334989979959919
3117.3733513084767 3.2949298597194385
3120.001540486058 3.2548697394789574
3122.604392608425 3.2148096192384763
3125.181871720631 3.1747494989979956
3127.733941185635 3.1346893787575145
3130.2605636590615 3.094629258517034
3132.761701062565 3.0545691382765527
3135.2373145556885 3.0145090180360716
3137.6873645061128 2.974448897795591
3140.1118104581683 2.93438877755511
3142.5106110994843 2.8943286573146287
3144.883724225627 2.854268537074148
3147.2311067025703 2.814208416833667
3149.552714426832 2.774148296593186
3151.848502283076 2.734088176352705
3154.1184240989833 2.694028056112224
3156.3624325971628 2.653967935871743
3158.5804793438456 2.6139078156312623
3160.772514694097 2.573847695390781
3162.938487733234 2.5337875751503
3165.078346214121 2.4937274549098194
3167.192036489969 2.4536673346693383
3169.2795034422275 2.413607214428857
3171.3406904031267 2.3735470941883765
3173.3755390723504 2.3334869739478954
3175.3839894272974 2.2934268537074143
3177.3659796262973 2.2533667334669336
3179.321445904103 2.2133066132264525
3181.2503224588754 2.1732464929859714
3183.1525413298145 2.1331863727454907
3185.0280322644658 2.0931262525050096
3186.8767225746346 2.0530661322645285
3188.698536979705 2.013006012024048
3190.493397436011 1.972945891783567
3192.2612229507567 1.932885771543086
3194.0019293787764 1.8928256513026052
3195.715429200238 1.852765531062124
3197.4016312771373 1.8127054108216432
3199.0604405861745 1.7726452905811623
3200.691757925294 1.7325851703406812
3202.2954795908404 1.6925250501002003
3203.8714970218916 1.6524649298597194
3205.4196964079156 1.6124048096192383
3206.939958255419 1.5723446893787574
3208.4321569087438 1.5322845691382765
3209.8961600196076 1.4922244488977956
3211.331827959366 1.4521643286573145
3212.739013167362 1.4121042084168336
3214.1175594280726 1.3720440881763527
3215.4673010691545 1.3319839679358716
3216.7880620719543 1.2919238476953907
3218.0796550856808 1.2518637274549098
3219.341880336359 1.2118036072144287
3220.5745244220984 1.1717434869739478
3221.777358987393 1.131683366733467
3222.950139271537 1.0916232464929858
3224.0926025304434 1.051563126252505
3225.204466338055 1.011503006012024
3226.285426784458 0.971442885771543
3227.335156604663 0.931382765531062
3228.353303297527 0.8913226452905811
3229.339487332344 0.8512625250501001
3230.2933005968616 0.8112024048096191
3231.214305322723 0.7711422845691382
3232.1020338436997 0.7310821643286572
3232.9559897137706 0.6910220440881764
3233.7756509569062 0.6509619238476954
3234.5604765658722 0.6109018036072144
3235.30991784901 0.5708416833667335
3236.0234368864194 0.5307815631262525
3236.7005352545007 0.4907214428857715
3237.340797377451 0.4506613226452906
3237.9439544585052 0.4106012024048096
3238.509977099474 0.37054108216432863
3239.039207832505 0.3304809619238477
3239.532549955435 0.29042084168336674
3239.9917393995006 0.25036072144288574
3240.419750968563 0.2103006012024048
3240.821457352705 0.17024048096192385
3241.204868151086 0.13018036072144287
3241.5840701519737 0.09012024048096191
3241.989400353421 0.05006012024048096
3242.5361575547254 0.01

Binary file not shown.

View File

@ -0,0 +1,518 @@
#include "TRandom.h" // ROOT random number generators, gRandom
#include "TFile.h" // ROOT file I/O
#include "TTree.h" // ROOT tree storage
#include "TH1.h" // 1D histograms
#include "TH2.h" // 2D histograms
#include "TStyle.h" // ROOT plotting style controls
#include "TCanvas.h" // ROOT canvas drawing
#include "TBenchmark.h" // timing measurement
#include "TGraph.h" // for energy loss interpolation
#include <cstring>
#include "TApplication.h" // ROOT app loop
#include "ClassTransfer.h" // Reaction kinematics and MC event generation
#include "ClassAnasen.h" // ANASEN detector model classes (SX3, PW, etc.)
#include <stdio.h>
#include <stdlib.h>
#include <set>
#include "TLegend.h"
#include "TH1D.h"
#include "TObjArray.h"
#include "TBranch.h"
#include <iostream>
#include <fstream>
//======== Generate light particle based on reaction
// calculate real and reconstructed tracks and Q-value uncertainty
// Function to load energy loss table from file
TGraph* LoadELoss(const char* filename) {
TGraph* g = new TGraph(filename, "%lg %lg");
return g;
}
bool IsDeadAnode(int id){
static std::set<int> dead = {}; // add dead anode IDs here, 0-23
return dead.count(id);
}
bool IsDeadCathode(int id){
static std::set<int> dead = {}; // add dead cathode IDs here, 0-23
return dead.count(id);
}
bool IsDeadSX3(int id){
static std::set<int> dead = {}; // add dead SX3 IDs here, 0-23 1,7,9,3
return dead.count(id);
}
static std::set<pair<int,int>> ReactionProductb = { {1,1} }; // add reaction product b (light particle) A,Z pairs here, e.g. {1,1} for proton, {4,2} for alpha
int main(int argc, char **argv){
printf("=========================================\n");
printf("=== ANASEN Monte Carlo ===\n");
printf("=========================================\n");
// number of events can be overridden from command line
int numEvent = 1000000;
if( argc >= 2 ) numEvent = atoi(argv[1]);
// load energy loss tables (assume units: E in MeV, dE/dx in MeV/(mg/cm^2), density in mg/cm^3)
TGraph* elossAlpha = LoadELoss("../ELoss/E_vs_x_alpha.dat"); // for light particle (alpha)
TGraph* elossProton = LoadELoss("../ELoss/E_vs_x_proton.dat"); // for heavy particle (proton)
TGraph *invgAlpha = new TGraph(elossAlpha->GetN(), elossAlpha->GetY(), elossAlpha->GetX());
TGraph *invgProton = new TGraph(elossProton->GetN(), elossProton->GetY(), elossProton->GetX());
//Plot energy loss tables (sanity check), vis will not work if this is ran without X11 display (e.g. on cluster), so comment out if running in headless mode
auto c1 = new TCanvas("c1", "Graph Example", 800, 600);
auto g = elossAlpha;
g->SetTitle("Energy Loss Table (Alpha);cm;Kinetic Energy (MeV)");
g->Draw("ALP");
g->SetLineColor(kRed);
//c1->SetLogy();
//c1->SetLogx();
c1->Print("eloss_alpha.png");
auto c2 = new TCanvas("c2", "Graph Example", 800, 600);
auto g2 = elossProton;
g2->SetTitle("Energy Loss Table (Proton);cm;Kinetic Energy (MeV)");
g2->Draw("ALP");
g2->SetLineColor(kBlue);
c2->Print("eloss_proton.png");
// Reaction setup: projectile + target configuration, energy, and product IDs
TransferReaction transfer;
transfer.SetA(18, 10, 0); // e.g., 24Mg (Z=12) with 0 excitation
transfer.SetIncidentEnergyAngle((4.4), 0, 0); // arguments are KEA in MeV/u, theta and phi in degree
transfer.Seta( 4, 2); // identify reaction product a in internal indexing e.g., 4He (alpha)
transfer.Setb(ReactionProductb.begin()->first, ReactionProductb.begin()->second); // identify reaction product b e.g., 1H (proton)
transfer.SetB(21, 11); // identify reaction product B e.g., 23Na (Z=11)
// TODO add alpha source or alternative reaction channel selection
// Excited state lists (target and projectile/excited products)
std::vector<float> ExAList = {0}; // projectile excitation states in MeV
std::vector<float> ExList = {0}; // target excitation states in MeV
// define vertex position uniform distribution ranges (mm)
double vertexXRange[2] = { -5, 5}; // mm
double vertexYRange[2] = { -5, 5};
double vertexZRange[2] = { -100, 100};
// detector resolution / uncertainty parameters
double sigmaSX3_W = -1; // mm, if < 0 use mid-point (no spread in SX3 horizontal dimension)
double sigmaSX3_L = 3; // mm, vertical spread for SX3
double sigmaPW_A = 0; // normalized anode uncertainty term (0-1)
double sigmaPW_C = 0; // normalized cathode uncertainty term (0-1)
// status printout
printf("------------ Vertex :\n");
printf("X : %7.2f - %7.2f mm\n", vertexXRange[0], vertexXRange[1]);
printf("Y : %7.2f - %7.2f mm\n", vertexYRange[0], vertexYRange[1]);
printf("Z : %7.2f - %7.2f mm\n", vertexZRange[0], vertexZRange[1]);
printf("------------ Uncertainty :\n");
printf(" SX3 horizontal : %.1f\n", sigmaSX3_W);
printf(" SX3 vertical : %.1f\n", sigmaSX3_L);
printf(" Anode : %.1f mm\n", sigmaPW_A);
printf(" Cathode : %.1f mm\n", sigmaPW_C);
printf(" num_eve : %d \n",numEvent);
// calculates energy/momentum/kinematics constants for transfer reaction
transfer.CalReactionConstant();
int nExA = ExAList.size();
int nEx = ExList.size();
// optional visualization control: pass "vis" as 3rd arg
bool enableVis = (argc >= 3 && strcmp(argv[2], "vis") == 0);
TApplication *app = nullptr;
if(enableVis){
app = new TApplication("anasenVis", &argc, argv);
}
// storage for tracks during simulation (for visualization)
std::vector<TVector3> visTrackVertex, visTrackDir, visTrackHitPos;
std::vector<std::pair<int,int>> visTrackWires; // {anodeID, cathodeID}
// create detector representation in memory
ANASEN * anasen = new ANASEN(); // top-level detector object
SX3 * sx3 = anasen->GetSX3(); // silicon array part
PW * pw = anasen->GetPW(); // proportional wire chamber part
// output file + tree
TString saveFileName = "SimAnasen1.root";
printf("\e[32m#################################### building Tree in %s\e[0m\n", saveFileName.Data());
TFile * saveFile = new TFile(saveFileName, "recreate");
TTree * tree = new TTree("tree", "tree");
// beam and CM variables saved in tree
double KEA;
tree->Branch("beamKEA", &KEA, "beamKEA/D");
double thetaCM, phiCM;
tree->Branch("thetaCM", &thetaCM, "thetaCM/D");
tree->Branch("phiCM", &phiCM, "phiCM/D");
// outgoing particles in lab frame (light/heavy)
double thetab, phib, Tb;
double thetaB, phiB, TB;
double dEb;
double dEB;
std::array<double, 2> T;
tree->Branch("thetab", &thetab, "thetab/D"); // polar angle of light particle in lab frame
tree->Branch("phib", &phib, "phib/D"); // azimuthal angle of light particle in lab frame
tree->Branch("Tb", &Tb, "Tb/D"); // kinetic energy of light particle at vertex (before energy loss)
tree->Branch("thetaB", &thetaB, "thetaB/D");
tree->Branch("phiB", &phiB, "phiB/D");
tree->Branch("TB", &TB, "TB/D"); // kinetic energy of heavy particle at vertex (before energy loss)
tree->Branch("dEb", &dEb, "dEb/D");
tree->Branch("dEB", &dEB, "dEB/D"); // placeholder for heavy particle energy loss, currently set equal to light particle loss for simplicity
tree->Branch("T", &T, "T/D"); // placeholder for true Q-value, currently set to 0 for simplicity
// excitation state identifiers
int ExAID;
double ExA;
tree->Branch("ExAID", &ExAID, "ExAID/I"); // projectile excitation state ID
tree->Branch("ExA", &ExA, "ExA/D"); // projectile excitation energy in MeV
int ExID;
double Ex;
tree->Branch("ExID", &ExID, "ExID/I"); // target excitation state ID
tree->Branch("Ex", &Ex, "Ex/D"); // target excitation energy in MeV
// true vertex position in target volume
double vertexX, vertexY, vertexZ;
tree->Branch("vX", &vertexX, "VertexX/D"); // true vertex X position in mm
tree->Branch("vY", &vertexY, "VertexY/D"); // true vertex Y position in mm
tree->Branch("vZ", &vertexZ, "VertexZ/D"); // true vertex Z position in mm
// reconstructed SX3 hit position
double sx3X, sx3Y, sx3Z;
tree->Branch("sx3X", &sx3X, "sx3X/D"); // reconstructed X position from SX3 (with optional smearing)
tree->Branch("sx3Y", &sx3Y, "sx3Y/D"); // reconstructed Y position from SX3 (with optional smearing)
tree->Branch("sx3Z", &sx3Z, "sx3Z/D"); // reconstructed Z position from SX3 (with optional smearing)
// PW nearest and next nearest wires
int anodeID[2], cathodeID[2];
tree->Branch("aID", anodeID, "anodeID/I"); // anodeID[0] is nearest anode wire, anodeID[1] is next nearest anode wire
tree->Branch("cID", cathodeID, "cathodeID/I"); // cathodeID[0] is nearest cathode wire, cathodeID[1] is next nearest cathode wire
// distances to nearest wires
double anodeDist[2], cathodeDist[2];
tree->Branch("aDist", anodeDist, "anodeDist/D");
tree->Branch("cDist", cathodeDist, "cathodeDist/D");
// SX3 channel assignment and Z fraction (depth) information
int sx3ID, sx3Up, sx3Dn, sx3Bk;
double sx3ZFrac;
tree->Branch("sx3ID", &sx3ID, "sx3ID/I");
tree->Branch("sx3Up", &sx3Up, "sx3Up/I");
tree->Branch("sx3Dn", &sx3Dn, "sx3Dn/I");
tree->Branch("sx3Bk", &sx3Bk, "sx3Bk/I");
tree->Branch("sx3ZFrac", &sx3ZFrac, "sx3ZFrac/D");
// reconstructed angles from PW track fit, method 1 and 2
double reTheta, rePhi;
tree->Branch("reTheta", &reTheta, "reconstucted_theta/D");
tree->Branch("rePhi", &rePhi, "reconstucted_phi/D");
double reTheta1, rePhi1;
tree->Branch("reTheta1", &reTheta1, "reconstucted_theta1/D");
tree->Branch("rePhi1", &rePhi1, "reconstucted_phi1/D");
// reconstructed vertex Z from PW fit
double z0;
tree->Branch("z0", &z0, "reconstucted_Z/D");
TTree* tree2 = tree->CloneTree(0);
tree2->SetName("tree2");
//========timer
TBenchmark clock;
bool shown ;
clock.Reset();
clock.Start("timer");
shown = false;
int ELossTotal = 0;
//================================= Calculate event loop
for( int i = 0; i < numEvent ; i++){
// randomly sample target/projectile excitations
ExAID = gRandom->Integer(nExA);
ExA = ExAList[ExAID];
transfer.SetExA(ExA);
ExID = gRandom->Integer(nEx);
Ex = ExList[ExID];
transfer.SetExB(Ex);
// recalc kinematic constants for chosen states
transfer.CalReactionConstant();
// isotropic CM direction
thetaCM = TMath::ACos(2 * gRandom->Rndm() - 1) ;
phiCM = (gRandom->Rndm() - 0.5) * TMath::TwoPi();
//==== Calculate reaction kinematics in lab frame
TLorentzVector * output = transfer.Event(thetaCM, phiCM); // returns array of outputs
TLorentzVector Pb = output[2]; // light particle or product A
TLorentzVector PB = output[3]; // heavy particle or product B
thetab = Pb.Theta() * TMath::RadToDeg();
thetaB = PB.Theta() * TMath::RadToDeg();
Tb = (Pb.E() - Pb.M()); // kinetic energy of light particle at vertex (before energy loss) units of MeV
TB = (PB.E() - PB.M());
T[0] = Tb;
T[1] = TB;
//if (Tb < 1.5) {
// //skip event if light particle energy after loss is below detection threshold of 1.5 MeV
// continue;
//}
phib = Pb.Phi() * TMath::RadToDeg();
phiB = PB.Phi() * TMath::RadToDeg();
// vertex position in target volume
vertexX = (vertexXRange[1]- vertexXRange[0])*gRandom->Rndm() + vertexXRange[0];
vertexY = (vertexYRange[1]- vertexYRange[0])*gRandom->Rndm() + vertexYRange[0];
vertexZ = (vertexZRange[1]- vertexZRange[0])*gRandom->Rndm() + vertexZRange[0];
TVector3 vertex(vertexX, vertexY, vertexZ);
// set direction vector from lab angle
TVector3 dir(1, 0, 0);
dir.SetTheta(thetab * TMath::DegToRad());
dir.SetPhi(phib * TMath::DegToRad());
// run detector response models for PW and SX3
pw->FindWireID(vertex, dir, false);
sx3->FindSX3Pos(vertex, dir, false);
PWHitInfo hitInfo = pw->GetHitInfo();
anodeID[0] = hitInfo.nearestWire.first; // nearest anode wire ID
cathodeID[0] = hitInfo.nearestWire.second; // nearest cathode wire ID
anodeID[1] = hitInfo.nextNearestWire.first; // next nearest anode wire ID
cathodeID[1] = hitInfo.nextNearestWire.second; // next nearest cathode wire ID
anodeDist[1] = hitInfo.nextNearestDist.first; // distance to next nearest anode wire
cathodeDist[1] = hitInfo.nextNearestDist.second; // distance to next nearest cathode wire
if(IsDeadAnode(anodeID[0])) continue;
if(IsDeadCathode(cathodeID[0])) continue;
// SX3 hit channel info and depth fraction
sx3ID = sx3->GetID();
if(IsDeadSX3(sx3ID)) continue;
anodeDist[0] = hitInfo.nearestDist.first; // distance to nearest anode wire
cathodeDist[0] = hitInfo.nearestDist.second; // distance to nearest cathode wire
if( sx3ID >= 0 ){
sx3Up = sx3->GetChUp();
sx3Dn = sx3->GetChDn();
sx3Bk = sx3->GetChBk();
sx3ZFrac = sx3->GetZFrac();
// apply intrinsic detector resolution to true SX3 hit position
// for no smearing comment out and use GetHitPos();
TVector3 hitPos = sx3->GetHitPosWithSigma(sigmaSX3_W, sigmaSX3_L);
sx3X = hitPos.X();
sx3Y = hitPos.Y();
sx3Z = hitPos.Z();
// store track data for visualization if enabled
if(enableVis){
visTrackVertex.push_back(vertex);
visTrackDir.push_back(dir);
visTrackHitPos.push_back(hitPos);
visTrackWires.push_back({anodeID[0], cathodeID[0]});
}
// reconstruct track from PW readings + SX3 hit
pw->CalTrack(hitPos, anodeID[0], cathodeID[0], false);
reTheta = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi = pw->GetTrackPhi() * TMath::RadToDeg();
// alternative track algorithm with uncertainty parameters
pw->CalTrack2(hitPos, hitInfo, sigmaPW_A, sigmaPW_C, false);
reTheta1 = pw->GetTrackTheta() * TMath::RadToDeg();
rePhi1 = pw->GetTrackPhi() * TMath::RadToDeg();
z0 = pw->GetZ0();
dEb = 0;
dEB = 0;
tree->Fill();
//Energy loss
double dl = (hitPos - vertex).Mag(); // path length in units of cm
if (numEvent <= 100){
//printf("Event %d: Ekin before loss = %f MeV, distance = %f cm\n", i, Tb, dl);
//printf("Total T before loss: %f MeV\n", T);
}
double tb_temp = Tb;
dEb = tb_temp - Tb; // total energy loss
if (ReactionProductb.count({4, 2})){ // if light particle is alpha, use alpha energy loss table
double x0b = invgAlpha->Eval(Tb);
x0b = x0b + dl;
Tb = elossAlpha->Eval(x0b);
} else if (ReactionProductb.count({1, 1})){ // if light particle is proton, use proton energy loss table
double x0b = invgProton->Eval(Tb);
x0b = x0b + dl;
Tb = elossProton->Eval(x0b);
} else {
// for other particle types, can add additional energy loss tables or use a generic approximation
// for now, we will just apply a simple linear energy loss as a placeholder
double dE_dx = 5; // MeV/cm, placeholder value for energy loss per unit length
Tb = Tb - dE_dx * dl;
}
//if (Tb < 0) {
// Tb = TMath::QuietNaN();
//}
dEb = tb_temp - Tb; // total energy loss
// fill tree2 with energy loss adjusted data
//Fill T so it can make a histogram of both Tb and TB in root script
T[0] = Tb;
T[1] = 0;
//to plot both as one histogram in root, can use tree2->Draw("T(0)"); for light particle and tree2->Draw("T(1)") for heavy particle
tree2->Fill();
if (numEvent <= 10){
//printf("Event %d: Tb after energy loss = %f MeV, energy loss = %f MeV\n", i, Tb, tb_temp - Tb);
} //to give in scientific notation, use %e instead of %f in the printf format string. For example: printf("Event %d: Tb after energy loss = %e MeV, energy loss = %e MeV\n", i, Tb, tb_temp - Tb);
ELossTotal += (tb_temp - Tb);
}else{
// no valid SX3 hit: mark clearly invalid
sx3Up = -1;
sx3Dn = -1;
sx3Bk = -1;
sx3ZFrac = TMath::QuietNaN();
sx3X = TMath::QuietNaN();
sx3Y = TMath::QuietNaN();
sx3Z = TMath::QuietNaN();
reTheta = TMath::QuietNaN();
rePhi = TMath::QuietNaN();
reTheta1 = TMath::QuietNaN();
rePhi1 = TMath::QuietNaN();
z0 = TMath::QuietNaN();
dEb = TMath::QuietNaN();
dEB = TMath::QuietNaN();
//Tb = -12354567; // mark kinetic energy as invalid for no hit case
// fill tree with original data (no energy loss for these events)
//comment out tree fill for no hit case
//tree->Fill();
//tree2->Fill();
}
//#################################################################### Timer
// measure elapsed real time and print progress roughly every 10 sec
clock.Stop("timer");
Double_t time = clock.GetRealTime("timer");
clock.Start("timer");
if ( !shown ) {
if (fmod(time, 10) < 1 ){
printf( "%10d[%2d%%]| %8.2f sec | expect: %5.1f min \n", i, TMath::Nint((i+1)*100./numEvent), time , numEvent*time/(i+1)/60);
shown = 1;
}
} else {
if (fmod(time, 10) > 9 ){
shown = 0;
}
}
}
// write results to ROOT file and close
//tree->Write();
//tree2->Write();
tree->Write("", TObject::kOverwrite);
tree2->Write("", TObject::kOverwrite);
int count = tree->GetEntries();
int count2 = tree2->GetEntries();
saveFile->Close();
printf("=============== done. saved as %s. tree entries: %d, tree2 entries: %d\n", saveFileName.Data(), count, count2);
printf("Total energy loss across all events: %f MeV\n", (double)ELossTotal);
printf("Average energy loss across events: %f MeV\n", (double)ELossTotal / count);
if(enableVis){ // to enable visualization, run with 3rd argument "vis", e.g. "./anasenMC 1000 vis"
printf("Displaying geometry with %zu tracks from simulation\n", visTrackVertex.size());
// Build full geometry with all wires
anasen->DrawAnasen(0, 23, 0, 23, -1, true);
// Add all stored tracks to the geometry
TGeoManager *geom = anasen->GetGeoManager();
TGeoVolume *worldBox = anasen->GetWorldBox();
if(geom && worldBox && visTrackVertex.size() > 0){
int trackNodeID = 500; // start node IDs for tracks
for(size_t iTrack = 0; iTrack < visTrackVertex.size(); ++iTrack){
TVector3 vertex = visTrackVertex[iTrack];
TVector3 dir = visTrackDir[iTrack];
TVector3 hitPos = visTrackHitPos[iTrack];
double theta = dir.Theta() * TMath::RadToDeg();
double phi = dir.Phi() * TMath::RadToDeg();
// Add a line marker at the vertex
TGeoVolume *startMarker = geom->MakeSphere("startMarker", 0, 0, 2.0);
startMarker->SetLineColor(kBlack);
worldBox->AddNode(startMarker, trackNodeID,
new TGeoCombiTrans(vertex.X(), vertex.Y(), vertex.Z(),
new TGeoRotation("rot", 0, 0, 0)));
trackNodeID++;
// Add track line from vertex toward hit position
TGeoVolume *trackLine = geom->MakeTube("trackLine", 0, 0, 0.08, 150.0);
trackLine->SetLineColor(kBlue);
worldBox->AddNode(trackLine, trackNodeID,
new TGeoCombiTrans(vertex.X(), vertex.Y(), vertex.Z(),
new TGeoRotation("rotTrack", phi + 90, theta, 0)));
trackNodeID++;
// Add hit position marker
TGeoVolume *hitMarker = geom->MakeSphere("hitMarker", 0, 0, 2.0);
hitMarker->SetLineColor(kRed);
worldBox->AddNode(hitMarker, trackNodeID,
new TGeoCombiTrans(hitPos.X(), hitPos.Y(), hitPos.Z(),
new TGeoRotation("rotHit", 0, 0, 0)));
trackNodeID++;
}
// Redraw geometry with all tracks
geom->CloseGeometry();
geom->SetVisLevel(4);
worldBox->Draw("ogle");
}
if(app){
printf("Entering ROOT event loop\n");
app->Run();
}
}
delete anasen;
delete elossAlpha;
delete elossProton;
return 0;
}

Binary file not shown.

179
ELoss/eloss.py Normal file
View File

@ -0,0 +1,179 @@
#!/usr/bin/env python3
import numpy as np
import pandas as pd
from scipy.interpolate import interp1d
import argparse
#python3 eloss.py E_vs_X_table.txt --Ei <starting energy> --Ef <final energy>
#python3 eloss.py E_vs_X_table.txt --Ei <starting energy> --dx <distance traveled>
#python3 eloss.py E_vs_X_table.txt --Ef <final energy> --dx <distance traveled>
def load_table(filename):
"""
Load table with columns:
x(cm) E(MeV)
Returns:
x_array, E_array
"""
data = pd.read_csv(
filename,
sep='\s+',
comment="#",
header=None,
skiprows=1
)
x = data.iloc[:, 0].values
E = data.iloc[:, 1].values
return x, E
def build_interpolators(x, E):
# E(x)
E_of_x = interp1d(
x,
E,
bounds_error=False,
fill_value=0.0
)
# x(E)
x_of_E = interp1d(
E[::-1], # reverse so energy increases
x[::-1],
bounds_error=False,
fill_value="extrapolate"
)
return E_of_x, x_of_E
def distance_traveled(Ei, Ef, x_of_E):
xi = float(x_of_E(Ei))
xf = float(x_of_E(Ef))
return abs(xf - xi)
def final_energy(Ei, dx, x_of_E, E_of_x):
xi = float(x_of_E(Ei))
xf = xi + dx
Ef = float(E_of_x(xf))
return max(Ef, 0.0)
def initial_energy(Ef, dx, x_of_E, E_of_x):
xf = float(x_of_E(Ef))
xi = xf - dx
Ei = float(E_of_x(xi))
return max(Ei, 0.0)
def main():
parser = argparse.ArgumentParser(
description="Energy-distance calculator using E vs X tables"
)
parser.add_argument(
"table",
help="E vs X table file"
)
parser.add_argument(
"--Ei",
type=float,
help="Initial energy (MeV)"
)
parser.add_argument(
"--Ef",
type=float,
help="Final energy (MeV)"
)
parser.add_argument(
"--dx",
type=float,
help="Distance traveled (cm)"
)
args = parser.parse_args()
# Count supplied variables
supplied = [
args.Ei is not None,
args.Ef is not None,
args.dx is not None
]
if sum(supplied) != 2:
print("\nERROR:")
print("Supply exactly TWO of: Ei, Ef, dx\n")
return
# Load table, skip the first row
x, E = load_table(args.table)
# Build interpolators
E_of_x, x_of_E = build_interpolators(x, E)
if args.Ei is not None and args.Ef is not None:
dx = distance_traveled(
args.Ei,
args.Ef,
x_of_E
)
print(f"\nDistance traveled: {dx:.6f} cm")
elif args.Ei is not None and args.dx is not None:
Ef = final_energy(
args.Ei,
args.dx,
x_of_E,
E_of_x
)
print(f"\nFinal energy: {Ef:.6f} MeV")
elif args.Ef is not None and args.dx is not None:
Ei = initial_energy(
args.Ef,
args.dx,
x_of_E,
E_of_x
)
print(f"\nInitial energy: {Ei:.6f} MeV")
elif args.Ei is not None and args.Ef is not None and args.dx is not None:
print("\nERROR: Supply exactly TWO of: Ei, Ef, dx\n")
return
elif args.help:
parser.print_help()
return
# ============================================================
# Run
# ============================================================
if __name__ == "__main__":
main()

View 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
View 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.txt");
// Benchmark/Debug file
std::ofstream benchFile("benchmark_diff.txt");
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
View 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

432
GainMatchSX3.C Normal file
View File

@ -0,0 +1,432 @@
#define GainMatchSX3_cxx
#include "GainMatchSX3.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 <TProfile.h>
#include "Armory/ClassSX3.h"
#include "Armory/HistPlotter.h"
#include <TGraphErrors.h>
#include "TVector3.h"
TH2F *hSX3FvsB;
TH2F *hSX3FvsB_g;
TH2F *hsx3IndexVE;
TH2F *hsx3IndexVE_g;
TH2F *hSX3;
TH2F *hsx3Coin;
int padID = 0;
SX3 sx3_contr;
TCutG *cut;
TCutG *cut1;
std::map<std::tuple<int, int, int, int>, std::vector<std::tuple<double, double, double>>> dataPoints;
std::map<std::tuple<int, int, int, int>, int> comboCounts;
const int MAX_DET = 24;
const int MAX_UP = 4;
const int MAX_DOWN = 4;
const int MAX_BK = 4;
double frontGainUp[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{0}}}};
double frontGainDown[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{0}}}};
bool frontGainValid[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{false}}}};
TCanvas c("canvas", "canvas", 800, 600);
// ==== Configuration Flags ====
const bool interactiveMode = true; // If true: show canvas + wait for user
const bool verboseFit = true; // If true: print fit summary and chi²
const bool drawCanvases = true; // If false: canvases won't be drawn at all
// HistPlotter plotter("SX3GainMatchBack.root");
void GainMatchSX3::Begin(TTree * /*tree*/)
{
TString option = GetOption();
hSX3FvsB = new TH2F("hSX3FvsB", "SX3 Front vs Back; Front E; Back E", 400, 0, 16000, 400, 0, 16000);
hSX3FvsB_g = new TH2F("hSX3FvsB_g", "SX3 Front vs Back; Front E; Back E", 400, 0, 16000, 400, 0, 16000);
hsx3IndexVE = new TH2F("hsx3IndexVE", "SX3 index vs Energy; sx3 index ; Energy", 24 * 12, 0, 24 * 12, 400, 0, 5000);
hsx3IndexVE_g = new TH2F("hsx3IndexVE_g", "SX3 index vs Energy; sx3 index ; Energy", 24 * 12, 0, 24 * 12, 400, 0, 5000);
hSX3 = new TH2F("hSX3", "SX3 Front v Back; Fronts; Backs", 8, 0, 8, 4, 0, 4);
hsx3Coin = new TH2F("hsx3Coin", "SX3 Coincident", 24 * 12, 0, 24 * 12, 24 * 12, 0, 24 * 12);
sx3_contr.ConstructGeo();
// Load the TCutG object
TFile *cutFile = TFile::Open("sx3cut.root");
if (!cutFile || cutFile->IsZombie())
{
std::cerr << "Error: Could not open sx3cut.root" << std::endl;
return;
}
cut = dynamic_cast<TCutG *>(cutFile->Get("sx3cut"));
if (!cut)
{
std::cerr << "Error: Could not find TCutG named 'sx3cut' in sx3cut.root" << std::endl;
return;
}
cut->SetName("sx3cut"); // Ensure the cut has the correct name
// Load the TCutG object
TFile *cutFile1 = TFile::Open("UvD.root");
bool cut1Loaded = (cut1 != nullptr);
cut1 = dynamic_cast<TCutG *>(cutFile1->Get("UvD"));
if (!cut1)
{
std::cerr << "Error: Could not find TCutG named 'UvD' in UvD.root" << std::endl;
return;
}
cut1->SetName("UvD");
// plotter.ReadCuts("cuts.txt");
std::string filename = "sx3_GainMatchfront.txt";
// std::string filename = "sx3_GainMatchfront.txt";
std::ifstream infile(filename);
if (!infile.is_open())
{
std::cerr << "Error opening " << filename << "!" << std::endl;
return;
}
int id, bk, u, d;
double gainup, gaindown;
while (infile >> id >> bk >> u >> d >> gainup >> gaindown)
{
frontGainUp[id][bk][u][d] = gainup;
frontGainDown[id][bk][u][d] = gaindown;
frontGainValid[id][bk][u][d] = true;
if(frontGainValid[id][bk][u][d]) {
// std::cout << "Loaded front gain for Det" << id << " Bk" << bk << " U" << u << " D" << d
// << ": Up=" << gainup << ", Down=" << gaindown << std::endl;
}
else {
std::cout << "No valid front gain for Det" << id << " Bk" << bk << " U" << u << " D" << d << std::endl;
}
}
}
Bool_t GainMatchSX3::Process(Long64_t 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();
std::vector<std::pair<int, int>> ID;
for (int i = 0; i < sx3.multi; i++)
{
// for (int j = i + 1; j < sx3.multi; j++)
// {
// if (sx3.id[i] == 3)
// hsx3Coin->Fill(sx3.index[i], sx3.index[j]);
// }
if (sx3.e[i] > 100)
{
ID.push_back(std::pair<int, int>(sx3.id[i], i));
hsx3IndexVE->Fill(sx3.index[i], sx3.e[i]);
}
}
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; });
// start with the first entry in the sorted array: channels that belong to the same detector are together in sequenmce
std::vector<std::pair<int, int>> sx3ID;
sx3ID.push_back(ID[0]);
bool found = false;
for (size_t i = 1; i < ID.size(); i++)
{ // Check if id of i belongs to the same detector and then add it to the detector ID vector
if (ID[i].first == sx3ID.back().first)
{ // count the nunmber of hits that belong to the same detector
sx3ID.push_back(ID[i]);
if (sx3ID.size() >= 3)
{
found = true;
}
}
else
{ // the next event does not belong to the same detector, abandon the first event and continue with the next one
if (!found)
{
sx3ID.clear();
sx3ID.push_back(ID[i]);
}
}
}
if (found)
{
int sx3ChUp = -1, sx3ChDn = -1, sx3ChBk = -1;
float sx3EUp = 0.0, sx3EDn = 0.0, sx3EBk = 0.0;
// Build the correlated set once
for (size_t i = 0; i < sx3ID.size(); i++)
{
if (sx3.e[i] > 100)
{
int index = sx3ID[i].second;
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] - 8;
sx3EBk = sx3.e[index];
}
}
}
// Only if we found all three channels do we proceed
if (sx3ChUp >= 0 && sx3ChDn >= 0 && sx3ChBk >= 0)
{
// Fill once per correlated set
hSX3->Fill(sx3ChDn + 4, sx3ChBk);
hSX3->Fill(sx3ChUp, sx3ChBk);
hSX3FvsB->Fill(sx3EUp + sx3EDn, sx3EBk);
if (frontGainValid[sx3ID[0].first][sx3ChBk][sx3ChUp / 2][sx3ChDn / 2])
{
sx3EUp *= frontGainUp[sx3ID[0].first][sx3ChBk][sx3ChUp / 2][sx3ChDn / 2];
sx3EDn *= frontGainDown[sx3ID[0].first][sx3ChBk][sx3ChUp / 2][sx3ChDn / 2];
}
else
{
// printf("No front gain for Det%d Bk%d U%d D%d\n", sx3ID[0].first, sx3ChBk, sx3ChUp / 2, sx3ChDn / 2);
sx3EUp = sx3EDn = 0.;
}
// plotter.Fill2D("hSX3F", 400, 0, 16000, 400, 0, 16000, sx3EUp + sx3EDn, sx3EBk);
// Pick detector ID from one of the correlated hits (all same detector)
int detID = sx3ID[0].first;
TString histName = Form("hSX3FVB_id%d_U%d_D%d_B%d", detID, sx3ChUp, sx3ChDn, sx3ChBk);
TString histName1 = Form("UnCorr_id%d_U%d-D%dvsB%d", detID, sx3ChUp, sx3ChDn, sx3ChBk);
TH2F *hist2d = (TH2F *)gDirectory->Get(histName);
TH2F *hist2d1 = (TH2F *)gDirectory->Get(histName1);
if (!hist2d)
{
hist2d = new TH2F(histName, histName,
400, 0, 16000, 400, 0, 16000);
}
if (!hist2d1)
{
hist2d1 = new TH2F(histName1, histName1,
800, -1, 1, 800, 0, 4000);
}
if (sx3EBk > 100 || sx3EUp > 100 || sx3EDn > 100)
{
hSX3FvsB_g->Fill(sx3EUp + sx3EDn, sx3EBk);
// Use the correlated triplet directly
dataPoints[{detID, sx3ChBk, sx3ChUp, sx3ChDn}]
.emplace_back(sx3EBk, sx3EUp, sx3EDn);
}
hist2d->Fill(sx3EUp + sx3EDn, sx3EBk);
hist2d1->Fill((sx3EUp - sx3EDn) / (sx3EUp + sx3EDn), sx3EBk);
}
}
}
return kTRUE;
}
const double GAIN_ACCEPTANCE_THRESHOLD = 0.3;
void GainMatchSX3::Terminate()
{
double backSlope[MAX_DET][MAX_BK] = {{0}};
bool backSlopeValid[MAX_DET][MAX_BK] = {{false}};
std::ofstream outFile("sx3_BackGains0.txt");
if (!outFile.is_open())
{
std::cerr << "Error opening sx3_BackGains.txt for writing!" << std::endl;
return;
}
// === Gain fit: (Up+Dn) vs Back, grouped by [id][bk] ===
for (int id = 0; id < MAX_DET; id++)
{
for (int bk = 0; bk < MAX_BK; bk++)
{
std::vector<double> bkE, udE;
// Collect all (Up+Dn, Back) for this id,bk
for (const auto &kv : dataPoints)
{
auto [cid, cbk, u, d] = kv.first;
if (cid != id || cbk != bk)
continue;
for (const auto &pr : kv.second)
{
double eBk, eUp, eDn;
std::tie(eBk, eUp, eDn) = pr;
if ((eBk < 100) || (eUp < 100) || (eDn < 100))
continue;
bkE.push_back(eBk);
udE.push_back(eUp + eDn);
}
}
if (bkE.size() < 5)
continue; // not enough statistics
// Build graph with errors
const double fixedError = 0.0; // ADC channels
std::vector<double> exVals(udE.size(), 0.0); // no x error
std::vector<double> eyVals(udE.size(), fixedError); // constant y error
TGraphErrors g(udE.size(), udE.data(), bkE.data(),
exVals.data(), eyVals.data());
TF1 f("f", "[0]*x", 0, 16000);
// f.SetParameter(0, 1.0); // initial slope
if (drawCanvases)
{
g.SetTitle(Form("Detector %d Back %d: (Up+Dn) vs Back", id, bk));
g.SetMarkerStyle(20);
g.SetMarkerColor(kBlue);
g.Draw("AP");
g.Fit(&f, interactiveMode ? "Q" : "QNR");
if (verboseFit)
{
double chi2 = f.GetChisquare();
int ndf = f.GetNDF();
double reducedChi2 = (ndf != 0) ? chi2 / ndf : -1;
std::cout << Form("Det%d Back%d → Slope: %.4f | χ²/ndf = %.2f/%d = %.2f",
id, bk, f.GetParameter(0), chi2, ndf, reducedChi2)
<< std::endl;
}
if (interactiveMode)
{
c.Update();
gPad->WaitPrimitive();
}
else
{
c.Close();
}
}
else
{
g.Fit(&f, "QNR");
}
double slope = 1 / f.GetParameter(0);
if (std::abs(slope - 1.0) < 0.3) // sanity check
{
backSlope[id][bk] = slope;
backSlopeValid[id][bk] = true;
outFile << id << " " << bk << " " << slope << "\n";
printf("Back slope Det%d Bk%d → %.4f\n", id, bk, slope);
}
else
{
std::cerr << "Warning: Bad slope for Det" << id << " Bk" << bk
<< " slope=" << slope << std::endl;
}
}
}
outFile.close();
std::cout << "Back gain matching complete." << std::endl;
// === Create histograms ===
TH2F *hFVB = new TH2F("hFVB", "Corrected Up+Dn vs Corrected Back;Up+Dn E;Corrected Back E",
600, 0, 16000, 600, 0, 16000);
TH2F *hAsym = new TH2F("hAsym", "Up vs Dn divide corrected back;Up/Back E;Dn/Back E",
400, 0.0, 1.0, 400, 0.0, 1.0);
TH2F *hAsymUnorm = new TH2F("hAsymUnorm", "Up vs Dn;Up E;Dn E",
800, 0.0, 4000.0, 800, 0.0, 4000.0);
// Fill histograms using corrected back energies
for (const auto &kv : dataPoints)
{
auto [id, bk, u, d] = kv.first;
if (!backSlopeValid[id][bk])
continue;
double slope = backSlope[id][bk];
for (const auto &pr : kv.second)
{
double eBk, eUp, eDn;
std::tie(eBk, eUp, eDn) = pr;
double updn = eUp + eDn;
if (updn == 0 || eBk == 0)
continue;
double correctedBack = eBk * slope;
double asym = (eUp - eDn) / updn;
hFVB->Fill(updn, correctedBack);
hAsym->Fill(eUp / correctedBack, eDn / correctedBack);
hAsymUnorm->Fill(eUp, eDn);
TString histNamex = Form("CorrBack_id%d_U%d-D%dvsB%d", id, u, d, bk);
TH2F *hist2dx = (TH2F *)gDirectory->Get(histNamex);
if (!hist2dx)
{
hist2dx = new TH2F(histNamex, histNamex,
800, -1, 1, 800, 0, 4000);
}
hist2dx->Fill((eUp - eDn) / (eUp + eDn), correctedBack);
}
}
// plotter.FlushToDisk();
}

114
GainMatchSX3.h Normal file
View File

@ -0,0 +1,114 @@
#ifndef GainMatchSX3_h
#define GainMatchSX3_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <TSelector.h>
#include "Armory/ClassDet.h"
class GainMatchSX3 : 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; //!
GainMatchSX3(TTree * /*tree*/ =0) : fChain(0) { }
virtual ~GainMatchSX3() { }
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(GainMatchSX3,0);
};
#endif
#ifdef GainMatchSX3_cxx
void GainMatchSX3::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 GainMatchSX3::Notify(){
return kTRUE;
}
void GainMatchSX3::SlaveBegin(TTree * /*tree*/){
TString option = GetOption();
}
void GainMatchSX3::SlaveTerminate(){
}
#endif // #ifdef GainMatchSX3_cxx

420
GainMatchSX3Front.C Normal file
View File

@ -0,0 +1,420 @@
#define GainMatchSX3Front_cxx
#include "GainMatchSX3Front.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 <TProfile.h>
#include "Armory/ClassSX3.h"
#include "TGraphErrors.h"
#include "TMultiDimFit.h"
#include "TVector3.h"
TH2F *hSX3FvsB;
TH2F *hSX3FvsB_g;
TH2F *hsx3IndexVE;
TH2F *hsx3IndexVE_g;
TH2F *hSX3;
TH2F *hsx3Coin;
int padID = 0;
SX3 sx3_contr;
TCutG *cut;
TCutG *cut1;
std::map<std::tuple<int, int, int, int>, std::vector<std::tuple<double, double, double>>> dataPoints;
TCanvas c(Form("canvas"), "Fit", 800, 600);
// Gain arrays
const int MAX_DET = 24;
const int MAX_UP = 4;
const int MAX_DOWN = 4;
const int MAX_BK = 4;
double backGain[MAX_DET][MAX_BK] = {{0}};
bool backGainValid[MAX_DET][MAX_BK] = {{false}};
double frontGain[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{0}}}};
bool frontGainValid[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{false}}}};
double uvdslope[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{0}}}};
// ==== Configuration Flags ====
const bool interactiveMode = true; // If true: show canvas + wait for user
const bool verboseFit = true; // If true: print fit summary and chi²
const bool drawCanvases = true; // If false: canvases won't be drawn at all
void GainMatchSX3Front::Begin(TTree * /*tree*/)
{
TString option = GetOption();
hSX3FvsB = new TH2F("hSX3FvsB", "SX3 Front vs Back; Front E; Back E", 800, 0, 16000, 800, 0, 16000);
hSX3FvsB_g = new TH2F("hSX3FvsB_g", "SX3 Front vs Back; Front E; Back E", 800, 0, 16000, 800, 0, 16000);
hsx3IndexVE = new TH2F("hsx3IndexVE", "SX3 index vs Energy; sx3 index ; Energy", 24 * 12, 0, 24 * 12, 400, 0, 5000);
hsx3IndexVE_g = new TH2F("hsx3IndexVE_g", "SX3 index vs Energy; sx3 index ; Energy", 24 * 12, 0, 24 * 12, 400, 0, 5000);
hSX3 = new TH2F("hSX3", "SX3 Front v Back; Fronts; Backs", 8, 0, 8, 4, 0, 4);
hsx3Coin = new TH2F("hsx3Coin", "SX3 Coincident", 24 * 12, 0, 24 * 12, 24 * 12, 0, 24 * 12);
sx3_contr.ConstructGeo();
// Load the TCutG object
TFile *cutFile = TFile::Open("sx3cut.root");
bool cutLoaded = (cut != nullptr);
cut = dynamic_cast<TCutG *>(cutFile->Get("sx3cut"));
if (!cut)
{
std::cerr << "Error: Could not find TCutG named 'sx3cut' in sx3cut.root" << std::endl;
return;
}
cut->SetName("sx3cut"); // Ensure the cut has the correct name
// Load the TCutG object
TFile *cutFile1 = TFile::Open("UvD.root");
bool cut1Loaded = (cut1 != nullptr);
cut1 = dynamic_cast<TCutG *>(cutFile1->Get("UvD"));
if (!cut1)
{
std::cerr << "Error: Could not find TCutG named 'UvD' in UvD.root" << std::endl;
return;
}
cut1->SetName("UvD");
std::string filename = "sx3_BackGains.txt";
std::ifstream infile(filename);
if (!infile.is_open())
{
std::cerr << "Error opening " << filename << "!" << std::endl;
return;
}
int id, bk;
double gain;
while (infile >> id >> bk >> gain)
{
backGain[id][bk] = gain;
if (backGain[id][bk] > 0)
backGainValid[id][bk] = true;
else
backGainValid[id][bk] = false;
}
SX3 sx3_contr;
}
Bool_t GainMatchSX3Front::Process(Long64_t entry)
{
b_sx3Multi->GetEntry(entry);
b_sx3ID->GetEntry(entry);
b_sx3Ch->GetEntry(entry);
b_sx3E->GetEntry(entry);
b_sx3T->GetEntry(entry);
sx3.CalIndex();
std::vector<std::pair<int, int>> ID;
for (int i = 0; i < sx3.multi; i++)
{
for (int j = i + 1; j < sx3.multi; j++)
{
// if (sx3.id[i] == 3)
hsx3Coin->Fill(sx3.index[i], sx3.index[j]);
}
if (sx3.e[i] > 100)
{
ID.push_back(std::pair<int, int>(sx3.id[i], i));
hsx3IndexVE->Fill(sx3.index[i], sx3.e[i]);
}
}
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; });
// start with the first entry in the sorted array: channels that belong to the same detector are together in sequenmce
std::vector<std::pair<int, int>> sx3ID;
sx3ID.push_back(ID[0]);
bool found = false;
for (size_t i = 1; i < ID.size(); i++)
{ // Check if id of i belongs to the same detector and then add it to the detector ID vector
if (ID[i].first == sx3ID.back().first)
{ // count the nunmber of hits that belong to the same detector
sx3ID.push_back(ID[i]);
if (sx3ID.size() >= 3)
{
found = true;
}
}
else
{ // the next event does not belong to the same detector, abandon the first event and continue with the next one
if (!found)
{
sx3ID.clear();
sx3ID.push_back(ID[i]);
}
}
}
if (found)
{
int sx3ChUp = -1, sx3ChDn = -1, sx3ChBk = -1;
float sx3EUp = 0.0, sx3EDn = 0.0, sx3EBk = 0.0;
for (size_t i = 0; i < sx3ID.size(); i++)
{
int index = sx3ID[i].second;
// Check the channel number and assign it to the appropriate channel type
if (sx3.ch[index] < 8)
{
if (sx3.ch[index] % 2 == 0)
{
sx3ChDn = sx3.ch[index] / 2;
sx3EDn = sx3.e[index];
}
else
{
sx3ChUp = sx3.ch[index] / 2;
sx3EUp = sx3.e[index];
}
}
else
{
sx3ChBk = sx3.ch[index] - 8;
// if (sx3ChBk == 2)
// printf("Found back channel Det %d Back %d \n", sx3.id[index], sx3ChBk);
sx3EBk = sx3.e[index];
}
}
for (int i = 0; i < sx3.multi; i++)
{
// If we have a valid front and back channel, fill the histograms
hSX3->Fill(sx3ChDn + 4, sx3ChBk);
hSX3->Fill(sx3ChUp, sx3ChBk);
// Fill the histogram for the front vs back
hSX3FvsB->Fill(sx3EUp + sx3EDn, sx3EBk);
if (sx3.e[i] > 100 && sx3.id[i] == 3)
{
// back gain correction
// Fill the histogram for the front vs back with gain correction
// hSX3FvsB_g->Fill(sx3EUp + sx3EDn, sx3EBk);
// // Fill the index vs energy histogram
// hsx3IndexVE_g->Fill(sx3.index[i], sx3.e[i]);
// }
// {
TString histName = Form("hSX3FVB_id%d_U%d_D%d_B%d", sx3.id[i], sx3ChUp, sx3ChDn, sx3ChBk);
TH2F *hist2d = (TH2F *)gDirectory->Get(histName);
if (!hist2d)
{
hist2d = new TH2F(histName, Form("hSX3FVB_id%d_U%d_D%d_B%d", sx3.id[i], sx3ChUp, sx3ChDn, sx3ChBk), 400, 0, 16000, 400, 0, 16000);
}
// if (sx3ChBk == 2)
// printf("Found back channel Det %d Back %d \n", sx3.id[i], sx3ChBk);
hsx3IndexVE_g->Fill(sx3.index[i], sx3.e[i]);
hSX3FvsB_g->Fill(sx3EUp + sx3EDn, sx3EBk);
hist2d->Fill(sx3EUp + sx3EDn, sx3EBk);
if (cut && cut->IsInside(sx3EUp + sx3EDn, sx3EBk) && cut1 && cut1->IsInside(sx3EUp / sx3EBk, sx3EDn / sx3EBk))
{
if (backGainValid[sx3.id[i]][sx3ChBk])
{
sx3EBk *= backGain[sx3.id[i]][sx3ChBk];
}
// Accumulate data for gain matching
dataPoints[{sx3.id[i], sx3ChBk, sx3ChUp, sx3ChDn}].emplace_back(sx3EBk, sx3EUp, sx3EDn);
}
}
}
}
}
return kTRUE;
}
void GainMatchSX3Front::Terminate()
{
std::map<std::tuple<int, int, int, int>, TVectorD> fitCoefficients;
// === Gain matching ===
std::ofstream outFile("sx3_GainMatchfront.txt");
if (!outFile.is_open())
{
std::cerr << "Error opening output file!" << std::endl;
return;
}
TH2F *hUvD = new TH2F("hUvD", " UvD; Up/CorrBack; Down/CorrBack", 600, 0, 1, 600, 0, 1);
for (const auto &kv : dataPoints)
{
auto [id, bk, u, d] = kv.first;
const auto &pts = kv.second;
if (pts.size() < 50)
continue;
std::vector<double> uE, dE, udE, corrBkE;
for (const auto &pr : pts)
{
double eBkCorr, eUp, eDn;
std::tie(eBkCorr, eUp, eDn) = pr;
if ((eBkCorr < 100) || (eUp < 100) || (eDn < 100))
continue; // Skip if any energy is zero
uE.push_back(eUp / eBkCorr);
dE.push_back(eDn / eBkCorr);
udE.push_back(eUp + eDn);
corrBkE.push_back(eBkCorr);
hUvD->Fill(eUp / eBkCorr, eDn / eBkCorr);
}
if (uE.size() < 5 || dE.size() < 5 || corrBkE.size() < 5)
continue; // Ensure we have enough points for fitting
// TGraph g(udE.size(), udE.data(), corrBkE.data());
// TF1 f("f", "[0]*x", 0, 20000);
// f.SetParameter(0, 1.0); // Initial guess for the gain
// g.Fit(&f, "R");
const double fixedError = 0.0; // in ADC channels
std::vector<double> xVals, yVals, exVals, eyVals;
// Build data with fixed error
for (size_t i = 0; i < udE.size(); ++i)
{
double x = uE[i]; // front energy
double y = dE[i]; // back energy
xVals.push_back(x);
yVals.push_back(y);
exVals.push_back(fixedError); // error in up energy
eyVals.push_back(0.); // error in down energy
}
// Build TGraphErrors with errors
TGraphErrors g(xVals.size(), xVals.data(), yVals.data(), exVals.data(), eyVals.data());
TF1 f("f", "[0]*x+[1]", 0, 16000);
f.SetParameter(0, -1.0); // Initial guess
if (drawCanvases)
{
g.SetTitle(Form("Detector %d: U%d D%d B%d", id, u, d, bk));
g.SetMarkerStyle(20);
g.SetMarkerColor(kBlue);
g.Draw("AP");
g.Fit(&f, interactiveMode ? "Q" : "QNR"); // 'R' avoids refit, 'N' skips drawing
if (verboseFit)
{
double chi2 = f.GetChisquare();
int ndf = f.GetNDF();
double reducedChi2 = (ndf != 0) ? chi2 / ndf : -1;
std::cout << Form("Det%d U%d D%d B%d → Gain: %.4f | χ²/ndf = %.2f/%d = %.2f",
id, u, d, bk, f.GetParameter(0), chi2, ndf, reducedChi2)
<< std::endl;
}
if (interactiveMode)
{
c.Update();
gPad->WaitPrimitive();
}
else
{
c.Close(); // Optionally avoid clutter in batch
}
}
else
{
g.Fit(&f, "QNR");
}
double slope = f.GetParameter(0);
double intercept = f.GetParameter(1);
// printf("Front gain Det%d Back%d Up%dDn%d → %.4f\n", id, bk, u, d, frontGain[id][bk][u][d]);
if (std::abs(slope + 1.0) < 0.3) // sanity check
{
frontGain[id][bk][u][d] = slope;
frontGainValid[id][bk][u][d] = true;
outFile << id << " " << bk << " " << u << " " << d << " " << TMath::Abs(slope)/intercept << " " << 1.0/intercept << std::endl;
printf("Back slope Det%d Bk%d → %.4f\n", id, bk, slope);
}
else
{
std::cerr << "Warning: Bad slope for Det" << id << " Bk" << bk
<< " slope=" << f.GetParameter(0) << std::endl;
}
}
outFile.close();
std::cout << "Gain matching complete." << std::endl;
// === Stage 3: Create corrected histogram ===
TH2F *hCorrectedFvB = new TH2F("hCorrectedFvB", "Corrected;Corrected Front Sum;Corrected Back", 800, 0, 8000, 800, 0, 8000);
TH2F *hCorrectedUvD = new TH2F("hCorrectedUvD", "Corrected UvD; UvD Up; UvD Down", 600, 0, 1, 600, 0, 1);
for (const auto &kv : dataPoints)
{
auto [id, bk, u, d] = kv.first;
double front;
if (frontGainValid[id][bk][u][d])
front = frontGain[id][bk][u][d];
else
continue;
for (const auto &pr : kv.second)
{
double eBk, eUp, eDn;
std::tie(eBk, eUp, eDn) = pr;
double corrUp = eUp * front;
// double corrDn = eDn * front;
hCorrectedFvB->Fill(corrUp + eDn, eBk);
hCorrectedUvD->Fill(corrUp / eBk, eDn / eBk);
}
}
// // === Final canvas ===
// gStyle->SetOptStat(1110);
// TCanvas *c1 = new TCanvas("c1", "Gain Correction Results", 1200, 600);
// c1->Divide(2, 1);
// c1->cd(1);
// hSX3FvsB_g->SetTitle("Before Correction (Gated)");
// hSX3FvsB_g->GetXaxis()->SetTitle("Measured Front Sum (E_Up + E_Dn)");
// hSX3FvsB_g->GetYaxis()->SetTitle("Measured Back E");
// hSX3FvsB_g->Draw("colz");
// c1->cd(2);
// hCorrectedFvB->SetTitle("After Correction");
// hCorrectedFvB->Draw("colz");
// TF1 *diag = new TF1("diag", "x", 0, 40000);
// diag->SetLineColor(kRed);
// diag->SetLineWidth(2);
// diag->Draw("same");
std::cout << "Terminate() completed successfully." << std::endl;
}

104
GainMatchSX3Front.h Normal file
View File

@ -0,0 +1,104 @@
#ifndef GainMatchSX3Front_h
#define GainMatchSX3Front_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <TSelector.h>
#include "Armory/ClassDet.h"
class GainMatchSX3Front : 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; //!
GainMatchSX3Front(TTree * /*tree*/ =0) : fChain(0) { }
virtual ~GainMatchSX3Front() { }
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(GainMatchSX3Front,0);
};
#endif
#ifdef GainMatchSX3Front_cxx
void GainMatchSX3Front::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);
}
Bool_t GainMatchSX3Front::Notify(){
return kTRUE;
}
void GainMatchSX3Front::SlaveBegin(TTree * /*tree*/){
TString option = GetOption();
}
void GainMatchSX3Front::SlaveTerminate(){
}
#endif // #ifdef GainMatchSX3Front_cxx

245
GainMatchSX3Front1.C Normal file
View File

@ -0,0 +1,245 @@
#define GainMatchSX3_cxx
#include "GainMatchSX3.h"
#include "Armory/ClassSX3.h"
#include <TFile.h>
#include <TTree.h>
#include <TGraph.h>
#include <TF1.h>
#include <TH2F.h>
#include <TCanvas.h>
#include <TStyle.h>
#include <TApplication.h>
#include <map>
#include <vector>
#include <tuple>
#include <fstream>
#include <iostream>
#include <algorithm>
// Constants
const int MAX_DET = 24;
const int MAX_BK = 4;
const int MAX_UP = 4;
const int MAX_DOWN = 4;
// Gain arrays
double backGain[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{0}}}};
bool backGainValid[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{false}}}};
double frontGain[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{0}}}};
bool frontGainValid[MAX_DET][MAX_BK][MAX_UP][MAX_DOWN] = {{{{false}}}};
// Data container
std::map<std::tuple<int, int, int, int>, std::vector<std::tuple<double, double, double>>> dataPoints;
// Load back gains
void LoadBackGains(const std::string &filename)
{
std::ifstream infile(filename);
if (!infile.is_open())
{
std::cerr << "Error opening " << filename << "!" << std::endl;
return;
}
int id, bk, u, d;
double gain;
while (infile >> id >> bk >> u >> d >> gain)
{
backGain[id][bk][u][d] = gain;
backGainValid[id][bk][u][d] = true;
}
infile.close();
std::cout << "Loaded back gains from " << filename << std::endl;
SX3 sx3_contr;
}
// Front gain matching function
Bool_t GainMatchSX3::Process(Long64_t entry)
{
// Link SX3 branches
b_sx3Multi->GetEntry(entry);
b_sx3ID->GetEntry(entry);
b_sx3Ch->GetEntry(entry);
b_sx3E->GetEntry(entry);
b_sx3T->GetEntry(entry);
sx3.CalIndex();
Long64_t nentries = tree->GetEntries(Long64_t entry);
std::cout << "Total entries: " << nentries << std::endl;
TH2F *hBefore = new TH2F("hBefore", "Before Correction;E_Up+E_Dn;Back Energy", 400, 0, 40000, 400, 0, 40000);
TH2F *hAfter = new TH2F("hAfter", "After Correction;E_Up+E_Dn;Corrected Back Energy", 400, 0, 40000, 400, 0, 40000);
for (Long64_t entry = 0; entry < nentries; ++entry)
{
tree->GetEntry(entry);
sx3.CalIndex();
std::vector<std::pair<int, int>> ID;
for (int i = 0; i < sx3.multi; i++)
{
if (sx3.e[i] > 100)
{
ID.push_back({sx3.id[i], i});
}
}
if (ID.empty())
continue;
// Sort by id
std::sort(ID.begin(), ID.end(), [](auto &a, auto &b) { return a.first < b.first; });
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]);
}
}
if (!found)
continue;
int sx3ChUp = -1, sx3ChDn = -1, sx3ChBk = -1;
float sx3EUp = 0.0, sx3EDn = 0.0, sx3EBk = 0.0;
int sx3id = sx3ID[0].first;
for (auto &[id, idx] : sx3ID)
{
if (sx3.ch[idx] < 8)
{
if (sx3.ch[idx] % 2 == 0)
{
sx3ChDn = sx3.ch[idx] / 2;
sx3EDn = sx3.e[idx];
}
else
{
sx3ChUp = sx3.ch[idx] / 2;
sx3EUp = sx3.e[idx];
}
}
else
{
sx3ChBk = sx3.ch[idx] - 8;
sx3EBk = sx3.e[idx];
}
}
if (sx3ChUp < 0 || sx3ChDn < 0 || sx3ChBk < 0)
continue;
if (!backGainValid[sx3id][sx3ChBk][sx3ChUp][sx3ChDn])
continue;
double corrBk = sx3EBk * backGain[sx3id][sx3ChBk][sx3ChUp][sx3ChDn];
hBefore->Fill(sx3EUp + sx3EDn, sx3EBk);
hAfter->Fill(sx3EUp + sx3EDn, corrBk);
dataPoints[{sx3id, sx3ChBk, sx3ChUp, sx3ChDn}].emplace_back(corrBk, sx3EUp, sx3EDn);
}
// === Fit front gains ===
std::ofstream outFile("sx3_GainMatchfront.txt");
if (!outFile.is_open())
{
std::cerr << "Error opening sx3_GainMatchfront.txt!" << std::endl;
return;
}
for (const auto &kv : dataPoints)
{
auto [id, bk, u, d] = kv.first;
const auto &pts = kv.second;
if (pts.size() < 5)
continue;
std::vector<double> udE, corrBkE;
for (const auto &pr : pts)
{
double eBkCorr, eUp, eDn;
std::tie(eBkCorr, eUp, eDn) = pr;
udE.push_back(eUp + eDn);
corrBkE.push_back(eBkCorr);
}
TGraph g(udE.size(), udE.data(), corrBkE.data());
TF1 f("f", "[0]*x", 0, 40000);
g.Fit(&f, "QNR");
frontGain[id][bk][u][d] = f.GetParameter(0);
frontGainValid[id][bk][u][d] = true;
outFile << id << " " << bk << " " << u << " " << d << " " << frontGain[id][bk][u][d] << std::endl;
printf("Front gain Det%d Back%d Up%dDn%d → %.4f\n", id, bk, u, d, frontGain[id][bk][u][d]);
}
outFile.close();
std::cout << "Front gain matching complete." << std::endl;
// === Draw diagnostic plots ===
gStyle->SetOptStat(1110);
TCanvas *c = new TCanvas("c", "Gain Matching Diagnostics", 1200, 600);
c->Divide(2, 1);
c->cd(1);
hBefore->Draw("colz");
TF1 *diag1 = new TF1("diag1", "x", 0, 40000);
diag1->SetLineColor(kRed);
diag1->Draw("same");
c->cd(2);
hAfter->Draw("colz");
TF1 *diag2 = new TF1("diag2", "x", 0, 40000);
diag2->SetLineColor(kRed);
diag2->Draw("same");
}
int main(int argc, char **argv)
{
TApplication app("app", &argc, argv);
// Load back gains
LoadBackGains("sx3_GainMatchback.txt");
// Open tree
TFile *f = TFile::Open("input_tree.root"); // <<< Change file name
if (!f || f->IsZombie())
{
std::cerr << "Cannot open input_tree.root!" << std::endl;
return 1;
}
TTree *tree = (TTree *)f->Get("tree");
if (!tree)
{
std::cerr << "Tree not found!" << std::endl;
return 1;
}
// Run front gain matching
GainMatchSX3(tree);
app.Run();
return 0;
}

1090
MakeVertex.C Executable file

File diff suppressed because it is too large Load Diff

132
MakeVertex.h Normal file
View File

@ -0,0 +1,132 @@
#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);
}
Bool_t MakeVertex::Notify(){
return kTRUE;
}
void MakeVertex::SlaveBegin(TTree * /*tree*/){
// TString option = GetOption();
}
void MakeVertex::SlaveTerminate(){
}
#endif // #ifdef MakeVertex_cxx

133
MatchAndPlotCentroids.C Normal file
View File

@ -0,0 +1,133 @@
#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.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.txt");
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
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
TCanvas *c1 = new TCanvas(Form("c_centroid_1_vs_%d", targetHist), Form("Centroid 1 vs %d", targetHist), 800, 600);
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); // Full circle marker
graph->SetMarkerSize(1.0);
graph->SetMarkerColor(kBlue);
// 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
View 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
View 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

View File

@ -1,27 +1,34 @@
#!/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
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
fileList=`\ls -1 ${rawFolder}/*SourceRun_${runID}_*.fsu`
./EventBuilder ${timeWindow} 0 0 100000000 ${fileList}
outFile=${rawFolder}/*${runID}*${timeWindow}.root outFile=${rawFolder}/*${runID}*${timeWindow}.root
mv -vf ${outFile} ${rootFolder}/. mv -vf ${outFile} ${rootFolder}/.
./Mapper ${rootFolder}/*${runID}*${timeWindow}.root ./Mapper ${rootFolder}/*${runID}*${timeWindow}.root
fi
root "processRun.C(\"${rootFolder}/Run_${runID}_mapped.root\")" # root "processRun.C(\"${rootFolder}/Run_${runID}_mapped.root\")"

167
QQQ_Calcheck.C Normal file
View 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
View 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

140
RunTimeSummary.C Normal file
View 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");
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -1,65 +1,188 @@
#define Analyzer_cxx #define TrackRecon_cxx
#include "TrackRecon.h"
#include "Armory/ClassPW.h"
#include "Armory/HistPlotter.h"
#include "Analyzer.h"
#include <TH2.h> #include <TH2.h>
#include <TStyle.h> #include <TStyle.h>
#include <TCanvas.h> #include <TCanvas.h>
#include <TMath.h> #include <TMath.h>
#include "TVector3.h"
#include <fstream>
#include <iostream>
#include <sstream>
#include <map>
#include <utility> #include <utility>
#include <algorithm> #include <algorithm>
#include "Armory/ClassSX3.h" // Global instances
#include "Armory/ClassPC1An.h" PW pw_contr;
PW pwinstance;
#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;
int padID = 0;
SX3 sx3_contr;
PC pw_contr;
TVector3 hitPos; TVector3 hitPos;
double qqqenergy,qqqtime;
// Calibration globals
const int MAX_QQQ = 4;
const int MAX_RING = 16;
const int MAX_WEDGE = 16;
double qqqGain[MAX_QQQ][MAX_RING][MAX_WEDGE] = {{{0}}};
bool qqqGainValid[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}}};
// TCutg *cutQQQ;
// PC Arrays
double pcSlope[48];
double pcIntercept[48];
HistPlotter *plotter;
bool HitNonZero; bool HitNonZero;
bool sx3ecut;
bool qqqEcut;
TH1F * hZProj; void TrackRecon::Begin(TTree *tree)
{ // get file name
std::cout << tree->GetCurrentFile()->GetName() << std::endl;
// get substring from file name to identify run number
void Analyzer::Begin(TTree * /*tree*/){
TString option = GetOption(); TString option = GetOption();
std::string treefilename(tree->GetCurrentFile()->GetName());
hZProj = new TH1F("hZProj", "Z Projection", 200, -600, 600); plotter = new HistPlotter(treefilename.substr(0, treefilename.length() - std::string(".root").length()) + "_histograms.root", "TFILE");
// plotter = new HistPlotter("Analyzer.root", "TFILE");
sx3_contr.ConstructGeo();
pw_contr.ConstructGeo(); pw_contr.ConstructGeo();
pwinstance.ConstructGeo();
// ---------------------------------------------------------
// 1. CRITICAL FIX: Initialize PC Arrays to Default (Raw)
// ---------------------------------------------------------
for (int i = 0; i < 48; i++)
{
pcSlope[i] = 1.0; // Default slope = 1 (preserves Raw energy)
pcIntercept[i] = 0.0; // Default intercept = 0
} }
// Calculate Crossover Geometry ONCE
TVector3 a, c, diff;
double a2, ac, c2, adiff, cdiff, denom, alpha;
for (size_t i = 0; i < pwinstance.An.size(); i++)
{
a = pwinstance.An[i].first - pwinstance.An[i].second;
for (size_t j = 0; j < pwinstance.Ca.size(); j++)
{
c = pwinstance.Ca[j].first - pwinstance.Ca[j].second;
diff = pwinstance.An[i].first - pwinstance.Ca[j].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;
Bool_t Analyzer::Process(Long64_t entry){ Crossover[i][j][0].x = pwinstance.An[i].first.X() + alpha * a.X();
Crossover[i][j][0].y = pwinstance.An[i].first.Y() + alpha * a.Y();
Crossover[i][j][0].z = pwinstance.An[i].first.Z() + alpha * a.Z();
// if ( entry > 100 ) return kTRUE; if (Crossover[i][j][0].z < -190 || Crossover[i][j][0].z > 190 || (i + j) % 24 == 12)
{
Crossover[i][j][0].z = 9999999;
}
Crossover[i][j][1].x = alpha;
Crossover[i][j][1].y = 0;
}
}
// Load PC Calibrations
std::ifstream inputFile("slope_intercept_results.dat");
if (inputFile.is_open())
{
std::string line;
int index;
double slope, intercept;
while (std::getline(inputFile, line))
{
std::stringstream ss(line);
ss >> index >> slope >> intercept;
if (index >= 0 && index <= 47)
{
pcSlope[index] = slope;
pcIntercept[index] = intercept;
}
}
inputFile.close();
}
else
{
std::cerr << "Error opening slope_intercept.txt" << std::endl;
}
// Load QQQ Cuts from file
// {
// std::string filename = "QQQ_PCCut.root";
// TFile *cutFile = TFile::Open(filename.c_str(), "READ");
// if (cutFile && !cutFile->IsZombie())
// {
// cutQQQ = (TCutg *)cutFile->Get("cutQQQPC");
// if (cutQQQ)
// {
// std::cout << "Loaded QQQ PC cut from " << filename << std::endl;
// }
// else
// {
// std::cerr << "Error: cutQQQPC not found in " << filename << std::endl;
// }
// cutFile->Close();
// }
// }
// ... (Load QQQ Gains and Calibs - same as before) ...
{
std::string filename = "qqq_GainMatch.dat";
std::ifstream infile(filename);
if (infile.is_open())
{
int det, ring, wedge;
double gainw, gainr;
while (infile >> det >> wedge >> ring >> gainw >> gainr)
{
qqqGain[det][wedge][ring] = gainw;
qqqGainValid[det][wedge][ring] = (gainw > 0);
// std::cout << "QQQ Gain Loaded: Det " << det << " Ring " << ring << " Wedge " << wedge << " GainW " << gainw << " GainR " << gainr << std::endl;
}
infile.close();
}
}
{
std::string filename = "qqq_Calib.dat";
std::ifstream infile(filename);
if (infile.is_open())
{
int det, ring, wedge;
double slope;
while (infile >> det >> wedge >> ring >> slope)
{
qqqCalib[det][wedge][ring] = slope;
qqqCalibValid[det][wedge][ring] = (slope > 0);
// std::cout << "QQQ Calib Loaded: Det " << det << " Ring " << ring << " Wedge " << wedge << " Slope " << slope << std::endl;
}
infile.close();
}
}
}
Bool_t TrackRecon::Process(Long64_t entry)
{
hitPos.Clear(); hitPos.Clear();
HitNonZero = false; HitNonZero = false;
bool qqq1000cut = false;
// if( entry > 1) return kTRUE;
// printf("################### ev : %llu \n", entry);
b_sx3Multi->GetEntry(entry); b_sx3Multi->GetEntry(entry);
b_sx3ID->GetEntry(entry); b_sx3ID->GetEntry(entry);
b_sx3Ch->GetEntry(entry); b_sx3Ch->GetEntry(entry);
@ -80,224 +203,558 @@ Bool_t Analyzer::Process(Long64_t entry){
qqq.CalIndex(); qqq.CalIndex();
pc.CalIndex(); pc.CalIndex();
// sx3.Print(); // QQQ Processing
//########################################################### Raw data int qqqCount = 0;
// //======================= SX3 int qqqAdjCh = 0;
qqqenergy=-1;
qqqtime=-1;
std::vector<std::pair<int, int>> ID; // first = id, 2nd = index // REMOVE WHEN RERUNNING USING THE NEW CALIBRATION FILE
// for (int i = 0; i < qqq.multi; i++)
// {
// if ((qqq.id[i] == 3 || qqq.id[i] == 1) && qqq.ch[i] < 16)
// {
// qqq.ch[i] = 16 - qqq.ch[i];
// }
// }
// for (int i = 0; i < qqq.multi; i++)
// {
// if (qqq.id[i] == 0 && qqq.ch[i] >= 16)
// {
// qqq.ch[i] = 31 - qqq.ch[i] + 16;
// }
// }
if( ID.size() > 0 ){ bool PCQQQTimeCut = false;
std::sort(ID.begin(), ID.end(), [](const std::pair<int, int> & a, const std::pair<int, int> & b) { for (int i = 0; i < qqq.multi; i++)
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; plotter->Fill2D("QQQ_Index_Vs_Energy", 16 * 8, 0, 16 * 8, 2000, 0, 16000, qqq.index[i], qqq.e[i], "hRawQQQ");
sx3ID.push_back(ID[0]);
bool found = false; for (int j = 0; j < qqq.multi; j++)
for( size_t i = 1; i < ID.size(); i++){ {
if( ID[i].first == sx3ID.back().first) { if (j == i)
sx3ID.push_back(ID[i]); continue;
if( sx3ID.size() >= 3) { plotter->Fill2D("QQQ_Coincidence_Matrix", 16 * 8, 0, 16 * 8, 16 * 8, 0, 16 * 8, qqq.index[i], qqq.index[j], "hRawQQQ");
found = true;
}
}else{
if( !found ){
sx3ID.clear();
sx3ID.push_back(ID[i]);
}
}
} }
// printf("---------- sx3ID Multi : %zu \n", sx3ID.size()); for (int k = 0; k < pc.multi; k++)
{
if( found ){ if (pc.index[k] < 24 && pc.e[k] > 50)
int sx3ChUp, sx3ChDn, sx3ChBk; {
float sx3EUp, sx3EDn; plotter->Fill2D("QQQ_Vs_Anode_Energy", 400, 0, 4000, 1000, 0, 16000, qqq.e[i], pc.e[k], "hRawQQQ");
// printf("------ sx3 ID : %d, multi: %zu\n", sx3ID[0].first, sx3ID.size()); plotter->Fill2D("QQQ_Vs_PC_Index", 16 * 8, 0, 16 * 8, 24, 0, 24, qqq.index[i], pc.index[k], "hRawQQQ");
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 ){
hsx3VpcE->Fill( sx3.e[i], pc.e[j] );
// hpcIndexVE->Fill( pc.index[i], pc.e[i] );
} }
else if (pc.index[k] >= 24 && pc.e[k] > 50)
{
plotter->Fill2D("QQQ_Vs_Cathode_Energy", 400, 0, 4000, 1000, 0, 16000, qqq.e[i], pc.e[k], "hRawQQQ");
} }
} }
sx3_contr.CalSX3Pos(sx3ID[0].first, sx3ChUp, sx3ChDn, sx3ChBk, sx3EUp, sx3EDn); for (int j = i + 1; j < qqq.multi; j++)
hitPos = sx3_contr.GetHitPos(); {
HitNonZero = true; if (qqq.id[i] == qqq.id[j])
// hitPos.Print(); {
} qqqCount++;
}
// //======================= QQQ
for( int i = 0; i < qqq.multi; i ++){
for( int j = i + 1; j < qqq.multi; j++){
if( qqq.id[i] == qqq.id[j] ){ // must be same detector
int chWedge = -1; int chWedge = -1;
int chRing = -1; int chRing = -1;
if( qqq.ch[i] < qqq.ch[j]){ double eWedge = 0.0;
chRing = qqq.ch[j] - 16; double eWedgeMeV = 0.0;
double eRing = 0.0;
double eRingMeV = 0.0;
double tRing = 0.0;
double tWedge = 0.0;
if (qqq.ch[i] < 16 && qqq.ch[j] >= 16 && qqqGainValid[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16])
{
chWedge = qqq.ch[i]; chWedge = qqq.ch[i];
}else{ eWedge = qqq.e[i] * qqqGain[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16];
chRing = qqq.ch[i]; chRing = qqq.ch[j] - 16;
chWedge = qqq.ch[j] - 16; eRing = qqq.e[j];
tRing = static_cast<double>(qqq.t[j]);
tWedge = static_cast<double>(qqq.t[i]);
}
else if (qqq.ch[j] < 16 && qqq.ch[i] >= 16 && qqqGainValid[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16])
{
chWedge = qqq.ch[j];
eWedge = qqq.e[j] * qqqGain[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16];
chRing = qqq.ch[i] - 16;
eRing = qqq.e[i];
tRing = static_cast<double>(qqq.t[i]);
tWedge = static_cast<double>(qqq.t[j]);
}
else
continue;
plotter->Fill1D("Wedgetime_Vs_Ringtime", 100, -1000, 1000, tWedge - tRing, "hTiming");
plotter->Fill2D("RingE_vs_Index", 16 * 4, 0, 16 * 4, 1000, 0, 16000, chRing + qqq.id[i] * 16, eRing, "hRawQQQ");
plotter->Fill2D("WedgeE_vs_Index", 16 * 4, 0, 16 * 4, 1000, 0, 16000, chWedge + qqq.id[i] * 16, eWedge, "hRawQQQ");
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;
plotter->Fill2D("WedgeE_Vs_RingECal", 1000, 0, 10, 1000, 0, 10, eWedgeMeV, eRingMeV, "hCalQQQ");
if(qqq.multi>2 ) plotter->Fill2D("WedgeE_Vs_RingECal_mulit>2", 1000, 0, 10, 1000, 0, 10, eWedgeMeV, eRingMeV, "hCalQQQ");
if(qqq.multi==2 ) plotter->Fill2D("WedgeE_Vs_RingECal_mulit=2", 1000, 0, 10, 1000, 0, 10, eWedgeMeV, eRingMeV, "hCalQQQ");
for (int k = 0; k < pc.multi; k++)
{
plotter->Fill2D("RingCh_vs_Anode_Index", 16 * 4, 0, 16 * 4, 24, 0, 24, chRing + qqq.id[i] * 16, pc.index[k], "hRawQQQ");
plotter->Fill2D("WedgeCh_vs_Anode_Index", 16 * 4, 0, 16 * 4, 24, 0, 24, chWedge + qqq.id[i] * 16, pc.index[k], "hRawQQQ");
plotter->Fill2D("WedgeCh_vs_Anode_Index" + std::to_string(qqq.id[i]), 16 * 4, 0, 16 * 4, 24, 0, 24, chWedge + qqq.id[i] * 16, pc.index[k]);
plotter->Fill2D("RingCh_vs_Cathode_Index", 16 * 4, 0, 16 * 4, 24, 24, 48, chRing + qqq.id[i] * 16, pc.index[k], "hRawQQQ");
plotter->Fill2D("WedgeCh_vs_Cathode_Index", 16 * 4, 0, 16 * 4, 24, 24, 48, chWedge + qqq.id[i] * 16, pc.index[k], "hRawQQQ");
if (pc.index[k] < 24 && pc.e[k] > 50)
{
// plotter->Fill2D("QQQ_CalibW_Vs_PC_Energy", 1000, 0, 16, 2000, 0, 30000, eWedgeMeV, pc.e[k], "hCalQQQ");
// plotter->Fill2D("QQQ_CalibR_Vs_PC_Energy", 1000, 0, 16, 2000, 0, 30000, eRingMeV, pc.e[k], "hCalQQQ");
// if (tRing - static_cast<double>(pc.t[k]) < 0 && tRing - static_cast<double>(pc.t[k]) > -600)
// // {
// // plotter->Fill2D("QQQ_CalibW_Vs_PC_Energy_Tight", 1000, 0, 16, 2000, 0, 30000, eWedgeMeV, pc.e[k], "hCalQQQ");
// // plotter->Fill2D("QQQ_CalibR_Vs_PC_Energy_Tight", 1000, 0, 16, 2000, 0, 30000, eRingMeV, pc.e[k], "hCalQQQ");
// // }
// // else
// // {
// // plotter->Fill2D("QQQ_CalibW_Vs_PC_Energy_OffTime", 1000, 0, 16, 2000, 0, 30000, eWedgeMeV, pc.e[k], "hCalQQQ");
// // plotter->Fill2D("QQQ_CalibR_Vs_PC_Energy_OffTime", 1000, 0, 16, 2000, 0, 30000, eRingMeV, pc.e[k], "hCalQQQ");
// // }
plotter->Fill2D("Timing_Difference_QQQR_Anode_vRing", 1250, -2500, 2500, 16, 0, 16, tRing - static_cast<double>(pc.t[k]), chRing, "hTiming");
plotter->Fill2D("DelT_Vs_QQQRingECal", 500, -2500, 2500, 1000, 0, 10, tRing - static_cast<double>(pc.t[k]), eRingMeV, "hTiming");
plotter->Fill2D("CalibratedQQQEvsAnodeE_R", 1000, 0, 10, 2000, 0, 30000, eRingMeV, pc.e[k], "hPCQQQ");
plotter->Fill2D("CalibratedQQQEvsAnodeE_W", 1000, 0, 10, 2000, 0, 30000, eWedgeMeV, pc.e[k], "hPCQQQ");
if (tRing - static_cast<double>(pc.t[k]) < -150) // 27Al
// if (tRing - static_cast<double>(pc.t[k]) < -75 && tRing - static_cast<double>(pc.t[k]) > -145) // 17F
{
PCQQQTimeCut = true;
}
} }
// printf(" ID : %d , chWedge : %d, chRing : %d \n", qqq.id[i], chWedge, chRing); if (pc.index[k] >= 24 && pc.e[k] > 50)
{
plotter->Fill2D("Timing_Difference_QQQR_Cathode_vRing", 1250, -2500, 2500, 16, 0, 16, tRing - static_cast<double>(pc.t[k]), chRing, "hTiming");
}
}
double theta = -TMath::Pi() / 2 + 2 * TMath::Pi() / 16 / 4. * (qqq.id[i] * 16 + chWedge + 0.5); double theta = -TMath::Pi() / 2 + 2 * TMath::Pi() / 16 / 4. * (qqq.id[i] * 16 + chWedge + 0.5);
double rho = 10.+40./16.*(chRing+0.5); double rho = 50. + 50. / 16. * (chRing + 0.5);
// if(qqq.e[i]>50){
hqqqPolar->Fill( theta, rho);
// }
// qqq.used[i] = true;
// qqq.used[j] = true;
if( !HitNonZero ){ plotter->Fill2D("QQQPolarPlot", 16 * 4, -TMath::Pi(), TMath::Pi(), 32, 40, 100, theta, rho, "hCalQQQ");
plotter->Fill2D("QQQCartesianPlot", 200, -100, 100, 200, -100, 100, rho * TMath::Cos(theta), rho * TMath::Sin(theta), "hCalQQQ");
plotter->Fill2D("QQQCartesianPlot" + std::to_string(qqq.id[i]), 200, -100, 100, 200, -100, 100, rho * TMath::Cos(theta), rho * TMath::Sin(theta), "hCalQQQ");
if (PCQQQTimeCut)
{
plotter->Fill2D("PC_XY_Projection_QQQ_TimeCut" + std::to_string(qqq.id[i]), 400, -100, 100, 400, -100, 100, rho * TMath::Cos(theta), rho * TMath::Sin(theta), "hPCQQQ");
}
plotter->Fill2D("PC_XY_Projection_QQQ" + std::to_string(qqq.id[i]), 400, -100, 100, 400, -100, 100, rho * TMath::Cos(theta), rho * TMath::Sin(theta), "hPCQQQ");
if (!HitNonZero)
{
double x = rho * TMath::Cos(theta); double x = rho * TMath::Cos(theta);
double y = rho * TMath::Sin(theta); double y = rho * TMath::Sin(theta);
hitPos.SetXYZ(x, y, 23 + 75 + 30); hitPos.SetXYZ(x, y, 23 + 75 + 30);
qqqenergy = eRingMeV;
qqqtime = tRing;
HitNonZero = true; HitNonZero = true;
} }
} }
} }
}
// //======================= PC
PCHit_1An hitInfo;
ID.clear();
int counter=0;
std::vector<std::pair<int, double>> E;
E.clear();
if( E.size()==3 ){
float aE = 0;
float cE = 0;
bool multi_an =false;
for(int l=0;l<E.size();l++){
if(E[l].first<24 && E[l].first!=20 && E[l].first!=12){
if(!multi_an){
aE = E[l].second;
}
multi_an=true;
}
else {
cE = E[l].second + cE;
}
}
// printf("anode= %d, cathode = %d\n", aID, cID);
// }
if( ID[0].first < 1 ) {
aID = pc.ch[ID[0].second];
cID = pc.ch[ID[1].second];
}else{
cID = pc.ch[ID[0].second];
aID = pc.ch[ID[1].second];
} }
hanVScatsum->Fill(aE,cE); plotter->Fill1D("QQQ_Multiplicity", 10, 0, 10, qqqCount, "hRawQQQ");
if( HitNonZero){ // PC Gain Matching and Filling
pw_contr.CalTrack3( hitPos, hitinfo, cID); double anodeT = -99999;
hZProj->Fill(pw_contr.GetZ0()); double cathodeT = 99999;
int anodeIndex = -1;
int cathodeIndex = -1;
for (int i = 0; i < pc.multi; i++)
{
if (pc.e[i] > 10)
{
plotter->Fill2D("PC_Index_Vs_Energy", 48, 0, 48, 2000, 0, 30000, pc.index[i], static_cast<double>(pc.e[i]), "hRawPC");
} }
// } if (pc.index[i] < 48)
{
pc.e[i] = pcSlope[pc.index[i]] * pc.e[i] + pcIntercept[pc.index[i]];
plotter->Fill2D("PC_Index_VS_GainMatched_Energy", 48, 0, 48, 2000, 0, 30000, pc.index[i], pc.e[i], "hGMPC");
} }
if (pc.index[i] < 24)
{
anodeT = static_cast<double>(pc.t[i]);
anodeIndex = pc.index[i];
}
else
{
cathodeT = static_cast<double>(pc.t[i]);
cathodeIndex = pc.index[i] - 24;
}
if (anodeT != -99999 && cathodeT != 99999)
{
for (int j = 0; j < qqq.multi; j++)
{
plotter->Fill1D("AC_Time_qqq_coin", 500, -2500, 2500, anodeT - cathodeT, "hTiming");
// plotter->Fill2D("AC_Time_Vs_QQQ_ch", 500, -2500, 2500, 16 * 8, 0, 16 * 8, anodeT - cathodeT, qqq.ch[j], "hTiming");
plotter->Fill2D("AC_Time_vs_AIndex", 500, -2500, 2500, 24, 0, 24, anodeT - cathodeT, anodeIndex, "hTiming");
plotter->Fill2D("AC_Time_vs_CIndex", 500, -2500, 2500, 24, 0, 24, anodeT - cathodeT, cathodeIndex, "hTiming");
// plotter->Fill1D("AC_Time_A" + std::to_string(anodeIndex) + "_C" + std::to_string(cathodeIndex), 200, -1000, 1000, anodeT - cathodeT, "TimingPC");
}
//########################################################### Track constrcution for (int j = 0; j < sx3.multi; j++)
{
plotter->Fill1D("AC_Time_sx3_coinc", 500, -2500, 2500, anodeT - cathodeT, "hTiming");
}
plotter->Fill1D("AC_Time", 500, -2500, 2500, anodeT - cathodeT, "hTiming");
}
//############################## DO THE KINEMATICS for (int j = i + 1; j < pc.multi; j++)
{
// plotter->Fill2D("PC_Coincidence_Matrix_anodeMinusCathode_lt_-200_" + std::to_string(anodeT - cathodeT < -200), 48, 0, 48, 48, 0, 48, pc.index[i], pc.index[j], "hRawPC");
if(pc.e[i]>50 && pc.e[j]>50)
plotter->Fill2D("Anode_V_Anode", 24, 0, 24, 24, 0, 24, pc.index[i], pc.index[j], "hRawPC");
}
}
anodeHits.clear();
cathodeHits.clear();
corrcatMax.clear();
int aID = 0;
int cID = 0;
double aE = 0;
double cE = 0;
double aESum = 0;
double cESum = 0;
double aEMax = 0;
int aIDMax = 0;
for (int i = 0; i < pc.multi; i++)
{
// if (pc.e[i] > 100)
{
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] - 24, pc.e[i]));
}
}
// std::sort(anodeHits.begin(), anodeHits.end(), [](const std::pair<int, double> &a, const std::pair<int, double> &b)
// { return a.second > b.second; });
// std::sort(cathodeHits.begin(), cathodeHits.end(), [](const std::pair<int, double> &a, const std::pair<int, double> &b)
// { return a.second > b.second; });
if (anodeHits.size() >= 1 && cathodeHits.size() >= 1)
{
// 2. CRITICAL FIX: Define reference vector 'a'
// In Analyzer.cxx, 'a' was left over from the loop. We use the first anode wire as reference here.
// (Assuming pwinstance.An is populated and wires are generally parallel).
TVector3 refAnode = pwinstance.An[0].first - pwinstance.An[0].second;
{
for (const auto &anode : anodeHits)
{
aID = anode.first;
aE = anode.second;
aESum += aE;
if (aE > aEMax)
{
aEMax = aE;
aIDMax = aID;
}
}
for (const auto &cathode : cathodeHits)
{
cID = cathode.first;
cE = cathode.second;
plotter->Fill2D("AnodeMax_Vs_Cathode_Coincidence_Matrix", 24, 0, 24, 24, 0, 24, aIDMax, cID, "hRawPC");
plotter->Fill2D("Anode_Vs_Cathode_Coincidence_Matrix", 24, 0, 24, 24, 0, 24, aID, cID, "hRawPC");
plotter->Fill2D("Anode_vs_CathodeE", 2000, 0, 30000, 2000, 0, 30000, aE, cE, "hGMPC");
// plotter->Fill2D("CathodeMult_V_CathodeE", 6, 0, 6, 2000, 0, 30000, cathodeHits.size(), cE, "hGMPC");
for (int j = -4; j < 3; j++)
{
if ((aIDMax + 24 + j) % 24 == 23 - cID)
{
corrcatMax.push_back(std::pair<int, double>(cID, cE));
cESum += cE;
}
}
}
}
}
TVector3 anodeIntersection;
anodeIntersection.Clear();
if (corrcatMax.size() > 0)
{
double x = 0, y = 0, z = 0;
for (const auto &corr : corrcatMax)
{
if (Crossover[aIDMax][corr.first][0].z > 9000000)
continue;
if (cESum > 0)
{
x += (corr.second) / cESum * Crossover[aIDMax][corr.first][0].x;
y += (corr.second) / cESum * Crossover[aIDMax][corr.first][0].y;
z += (corr.second) / cESum * Crossover[aIDMax][corr.first][0].z;
}
}
if (x == 0 && y == 0 && z == 0)
;
// to ignore events with no valid crossover points
else
anodeIntersection = TVector3(x, y, z);
// std::cout << "Anode Intersection: " << anodeIntersection.X() << ", " << anodeIntersection.Y() << ", " << anodeIntersection.Z() << std::endl;
}
bool PCQQQPhiCut = false;
// flip the algorithm for cathode 1 multi anode events
if ((hitPos.Phi() > (anodeIntersection.Phi() - TMath::PiOver4())) && (hitPos.Phi() < (anodeIntersection.Phi() + TMath::PiOver4())))
{
PCQQQPhiCut = true;
}
for (double AIz = 20; AIz <= 100; AIz += 5.0)
{
TVector3 TargetPos(0, 0, AIz);
if (PCQQQPhiCut && anodeIntersection.Perp() != 0 && cathodeHits.size() >= 2)
// TVector3 anodePosAtZ(anodeIntersection.X() * (AIz / anodeIntersection.Z()), anodeIntersection.Y() * (AIz / anodeIntersection.Z()), AIz);
// TVector3 anodePosAtZ(anodeIntersection.X(), anodeIntersection.Y(),anodeIntersection.Z() + AIz);
plotter->Fill2D("Inttheta_vs_QQQtheta_TC" + std::to_string(PCQQQTimeCut) + "_TZ" + std::to_string(AIz), 180, 0, 180, 90, 0, 90, (anodeIntersection - TargetPos).Theta() * 180. / TMath::Pi(),
(hitPos - TargetPos).Theta() * 180. / TMath::Pi(), "TPosVariation");
}
if (anodeIntersection.Perp() != 0)
{
plotter->Fill1D("PC_Z_Projection", 600, -300, 300, anodeIntersection.Z(), "hPCzQQQ");
plotter->Fill2D("Z_Proj_VsDelTime", 600, -300, 300, 200, -2000, 2000, anodeIntersection.Z(), anodeT - cathodeT, "hPCzQQQ");
plotter->Fill2D("IntPhi_vs_QQQphi", 100, -200, 200, 80, -200, 200, anodeIntersection.Phi() * 180. / TMath::Pi(), hitPos.Phi() * 180. / TMath::Pi(), "hPCQQQ");
plotter->Fill1D("IntRho", 200, 0, 100, anodeIntersection.Perp(), "hRawPC");
plotter->Fill2D("Inttheta_vs_QQQtheta", 90, 0, 180, 20, 0, 45, anodeIntersection.Theta() * 180. / TMath::Pi(), hitPos.Theta() * 180. / TMath::Pi(), "hPCQQQ");
plotter->Fill2D("Inttheta_vs_QQQtheta_TC" + std::to_string(PCQQQTimeCut), 90, 0, 180, 20, 0, 45, anodeIntersection.Theta() * 180. / TMath::Pi(), hitPos.Theta() * 180. / TMath::Pi(), "hPCQQQ");
plotter->Fill2D("IntPhi_vs_QQQphi_TC" + std::to_string(PCQQQTimeCut) + "PhiC" + std::to_string(PCQQQPhiCut), 100, -200, 200, 80, -200, 200, anodeIntersection.Phi() * 180. / TMath::Pi(), hitPos.Phi() * 180. / TMath::Pi(), "hPCQQQ");
}
if (anodeIntersection.Perp() != 0 && cathodeHits.size() >= 2)
plotter->Fill1D("PC_Z_Projection_TC" + std::to_string(PCQQQTimeCut) + "PhiC" + std::to_string(PCQQQPhiCut), 600, -300, 300, anodeIntersection.Z(), "hPCzQQQ");
if (anodeIntersection.Perp() != 0 && cathodeHits.size() == 1)
{
plotter->Fill1D("PC_Z_proj_1C", 600, -300, 300, anodeIntersection.Z(), "hPCzQQQ");
plotter->Fill2D("IntersectionPhi_vs_AnodeZ_1C", 400, -200, 200, 600, -300, 300, anodeIntersection.Phi() * 180. / TMath::Pi(), anodeIntersection.Z(), "hPCzQQQ");
}
if (anodeIntersection.Perp() != 0 && cathodeHits.size() == 2)
{
plotter->Fill1D("PC_Z_proj_2C", 600, -300, 300, anodeIntersection.Z(), "hPCzQQQ");
plotter->Fill2D("IntersectionPhi_vs_AnodeZ_2C", 400, -200, 200, 600, -300, 300, anodeIntersection.Phi() * 180. / TMath::Pi(), anodeIntersection.Z(), "hPCzQQQ");
}
if (anodeIntersection.Perp() != 0 && cathodeHits.size() > 2)
{
plotter->Fill1D("PC_Z_proj_nC", 600, -300, 300, anodeIntersection.Z(), "hPCzQQQ");
plotter->Fill2D("IntersectionPhi_vs_AnodeZ_nC", 400, -200, 200, 600, -300, 300, anodeIntersection.Phi() * 180. / TMath::Pi(), anodeIntersection.Z(), "hPCzQQQ");
}
if (anodeHits.size() > 0 && cathodeHits.size() > 0)
plotter->Fill2D("AHits_vs_CHits", 12, 0, 11, 6, 0, 5, anodeHits.size(), cathodeHits.size(), "hRawPC");
// make another plot with nearest neighbour constraint
bool hasNeighbourAnodes = false;
bool hasNeighbourCathodes = false;
// 1. Check Anodes for neighbours (including wrap-around 0-23)
for (size_t i = 0; i < anodeHits.size(); i++)
{
for (size_t j = i + 1; j < anodeHits.size(); j++)
{
int diff = std::abs(anodeHits[i].first - anodeHits[j].first);
if (diff == 1 || diff == 23)
{ // 23 handles the cylindrical wrap
hasNeighbourAnodes = true;
break;
}
}
if (hasNeighbourAnodes)
break;
}
// 2. Check Cathodes for neighbours (including wrap-around 0-23)
for (size_t i = 0; i < cathodeHits.size(); i++)
{
for (size_t j = i + 1; j < cathodeHits.size(); j++)
{
int diff = std::abs(cathodeHits[i].first - cathodeHits[j].first);
if (diff == 1 || diff == 23)
{
hasNeighbourCathodes = true;
break;
}
}
if (hasNeighbourCathodes)
break;
}
// ---------------------------------------------------------
// FILL PLOTS
// ---------------------------------------------------------
if (anodeHits.size() > 0 && cathodeHits.size() > 0)
{
// plotter->Fill2D("AHits_vs_CHits_NA" + std::to_string(hasNeighbourAnodes), 12, 0, 11, 6, 0, 5, anodeHits.size(), cathodeHits.size(), "hRawPC");
// plotter->Fill2D("AHits_vs_CHits_NC" + std::to_string(hasNeighbourCathodes), 12, 0, 11, 6, 0, 5, anodeHits.size(), cathodeHits.size(), "hRawPC");
// Constraint Plot: Only fill if BOTH planes have adjacent hits
// This effectively removes events with only isolated single-wire hits (noise)
if (hasNeighbourAnodes && hasNeighbourCathodes)
{
plotter->Fill2D("AHits_vs_CHits_NN", 12, 0, 11, 6, 0, 5, anodeHits.size(), cathodeHits.size(), "hRawPC");
}
}
if (HitNonZero && anodeIntersection.Z() != 0)
{
pw_contr.CalTrack2(hitPos, anodeIntersection);
plotter->Fill1D("VertexRecon", 600, -300, 300, pw_contr.GetZ0());
if (PCQQQPhiCut && PCQQQTimeCut)
{
if (cathodeHits.size() == 2)
plotter->Fill1D("VertexRecon_TC_PhiC_2C", 600, -300, 300, pw_contr.GetZ0());
}
plotter->Fill1D("VertexRecon_TC" + std::to_string(PCQQQTimeCut) + "_PhiC" + std::to_string(PCQQQPhiCut), 600, -300, 300, pw_contr.GetZ0());
}
for (int i = 0; i < qqq.multi; i++)
{
if (PCQQQTimeCut)
{
plotter->Fill2D("PC_XY_Projection_QQQ_TimeCut" + std::to_string(qqq.id[i]), 400, -100, 100, 400, -100, 100, anodeIntersection.X(), anodeIntersection.Y(), "hPCQQQ");
}
plotter->Fill2D("PC_XY_Projection_QQQ" + std::to_string(qqq.id[i]), 400, -100, 100, 400, -100, 100, anodeIntersection.X(), anodeIntersection.Y(), "hPCQQQ");
for (int j = i + 1; j < qqq.multi; j++)
{
if (qqq.id[i] == qqq.id[j])
{
int chWedge = -1;
int chRing = -1;
double eWedge = 0.0;
double eWedgeMeV = 0.0;
double eRing = 0.0;
double eRingMeV = 0.0;
double tRing = 0.0;
int qqqID = -1;
if (qqq.ch[i] < 16 && qqq.ch[j] >= 16 && qqqGainValid[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16])
{
chWedge = qqq.ch[i];
eWedge = qqq.e[i] * qqqGain[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16];
chRing = qqq.ch[j] - 16;
eRing = qqq.e[j];
tRing = static_cast<double>(qqq.t[j]);
qqqID = qqq.id[i];
}
else if (qqq.ch[j] < 16 && qqq.ch[i] >= 16 && qqqGainValid[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16])
{
chWedge = qqq.ch[j];
eWedge = qqq.e[j] * qqqGain[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16];
chRing = qqq.ch[i] - 16;
tRing = static_cast<double>(qqq.t[i]);
eRing = qqq.e[i];
qqqID = qqq.id[i];
}
else
continue;
if (qqqCalibValid[qqq.id[i]][chRing][chWedge])
{
eWedgeMeV = eWedge * qqqCalib[qqq.id[i]][chRing][chWedge] / 1000;
eRingMeV = eRing * qqqCalib[qqq.id[i]][chRing][chWedge] / 1000;
}
else
continue;
// if (anodeIntersection.Z() != 0)
{
plotter->Fill2D("PC_Z_vs_QQQRing", 600, -300, 300, 16, 0, 16, anodeIntersection.Z(), chRing, "hPCzQQQ");
}
if (anodeIntersection.Z() != 0 && cathodeHits.size() == 2)
{
plotter->Fill2D("PC_Z_vs_QQQRing_2C", 600, -300, 300, 16, 0, 16, anodeIntersection.Z(), chRing, "hPCzQQQ");
plotter->Fill2D("PC_Z_vs_QQQRing_2C" + std::to_string(qqq.id[i]), 600, -300, 300, 16, 0, 16, anodeIntersection.Z(), chRing, "hPCzQQQ");
plotter->Fill2D("PC_Z_vs_QQQWedge_2C", 600, -300, 300, 16, 0, 16, anodeIntersection.Z(), chWedge, "hPCzQQQ");
}
plotter->Fill2D("Vertex_V_QQQRing", 600, -300, 300, 16, 0, 16, pw_contr.GetZ0(), chRing, "hPCQQQ");
double phi = TMath::ATan2(anodeIntersection.Y(), anodeIntersection.X()) * 180. / TMath::Pi();
// while (phi > 180)
// phi -= 180;
// while (phi < -180)
// phi += 180;
plotter->Fill2D("PolarAngle_Vs_QQQWedge" + std::to_string(qqqID), 360, -360, 360, 16, 0, 16, phi, chWedge, "hPCQQQ");
// plotter->Fill2D("EdE_PC_vs_QQQ_timegate_ls1000"+std::to_string())
plotter->Fill2D("PC_Z_vs_QQQRing_Det" + std::to_string(qqqID), 600, -300, 300, 16, 0, 16, anodeIntersection.Z(), chRing, "hPCQQQ");
for (int k = 0; k < pc.multi; k++)
{
if (pc.index[k] >= 24)
continue;
plotter->Fill2D("CalibratedQQQE_RvsAnodeE_TC" + std::to_string(PCQQQTimeCut) + "PhiC" + std::to_string(PCQQQPhiCut), 1000, 0, 10, 2000, 0, 30000, eRingMeV, pc.e[k], "hPCQQQ");
plotter->Fill2D("CalibratedQQQE_WvsAnodeE_TC" + std::to_string(PCQQQTimeCut) + "PhiC" + std::to_string(PCQQQPhiCut), 1000, 0, 10, 2000, 0, 30000, eWedgeMeV, pc.e[k], "hPCQQQ");
plotter->Fill2D("AnodeQQQ_dTimevsdPhi", 200, -2000, 2000, 80, -200, 200, tRing - static_cast<double>(pc.t[k]), (hitPos.Phi() - anodeIntersection.Phi()) * 180. / TMath::Pi(), "hTiming");
plotter->Fill1D("AnodeQQQ_Time", 200, -2000, 2000, tRing - static_cast<double>(pc.t[k]));
}
}
}
}
TVector3 guessVertex(0, 0, 90.);
// rho=40.0 mm is halfway between the cathodes(rho=42) and anodes(rho=37)
double pcz_guess = 42.0 / TMath::Tan((hitPos - guessVertex).Theta()) + guessVertex.Z(); // this is ideally kept to be all QQQ+userinput for calibration of pcz
if (PCQQQTimeCut && PCQQQPhiCut && hitPos.Perp() > 0 && anodeIntersection.Perp() > 0 && cathodeHits.size() >= 2)
{
plotter->Fill2D("pczguess_vs_qqqE", 100, 0, 200, 800, 0, 20, pcz_guess, qqqenergy, "pczguess");
// plotter->Fill2D("pczguess_vs_pcz_rad="+std::to_string(hitPos.Perp()),100,0,200,150,0,200,pcz_guess,anodeIntersection.Z(),"pczguess"); //entirely qqq-derived position vs entirely PC derived position
plotter->Fill2D("pczguess_vs_pcz_phi=" + std::to_string(hitPos.Phi() * 180. / M_PI), 100, 0, 200, 150, 0, 200, pcz_guess, anodeIntersection.Z() / 0.8, "pczguess"); // entirely qqq-derived position vs entirely PC derived position
plotter->Fill2D("pczguess_vs_pcz", 100, 0, 200, 150, 0, 200, pcz_guess, anodeIntersection.Z() / 0.8);
plotter->Fill2D("pcz_vs_pcPhi_rad=" + std::to_string(hitPos.Perp()), 360, 0, 360, 150, 0, 200, anodeIntersection.Phi() * 180. / M_PI, anodeIntersection.Z() / 0.8, "pczguess");
}
for (int i = 0; i < sx3.multi; i++)
{
// plotting sx3 strip hits vs anode phi
if (sx3.ch[i] < 8)
plotter->Fill2D("AnodePhi_vs_SX3Strip", 100, -200, 200, 8 * 24, 0, 8 * 24, anodeIntersection.Phi() * 180. / TMath::Pi(), sx3.id[i] * 8 + sx3.ch[i]);
}
if (anodeIntersection.Z() != 0 && cathodeHits.size() == 3)
{
plotter->Fill1D("PC_Z_proj_3C", 600, -300, 300, anodeIntersection.Z(), "hPCzQQQ");
}
plotter->Fill2D("AnodeMaxE_Vs_Cathode_Sum_Energy", 2000, 0, 30000, 2000, 0, 30000, aEMax, cESum, "hGMPC");
plotter->Fill1D("Correlated_Cathode_MaxAnode", 6, 0, 5, corrcatMax.size(), "hGMPC");
plotter->Fill2D("Correlated_Cathode_VS_MaxAnodeEnergy", 6, 0, 5, 2000, 0, 30000, corrcatMax.size(), aEMax, "hGMPC");
plotter->Fill1D("AnodeHits", 12, 0, 11, anodeHits.size(), "hGMPC");
plotter->Fill2D("AnodeMaxE_vs_AnodeHits", 12, 0, 11, 2000, 0, 30000, anodeHits.size(), aEMax, "hGMPC");
if (anodeHits.size() < 1)
{
plotter->Fill1D("NoAnodeHits_CathodeHits", 6, 0, 5, cathodeHits.size(), "hGMPC");
}
return kTRUE; return kTRUE;
} }
void Analyzer::Terminate(){ void TrackRecon::Terminate()
{
gStyle->SetOptStat("neiou"); plotter->FlushToDisk();
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);
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);
hZProj->Draw();
// hanVScatsum->Draw("colz");
} }

127
TrackRecon.h Normal file
View File

@ -0,0 +1,127 @@
#ifndef TrackRecon_h
#define TrackRecon_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <TSelector.h>
#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 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;
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();
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);
}
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

97
centroids.txt Normal file
View File

@ -0,0 +1,97 @@
HistogramIndex PeakNumber Centroid Amplitude Sigma
0 1 991.118
0 2 2026.83
0 3 3060.26
0 4 4092.45
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
19 1 1082.91
19 2 2194.08
19 3 3303.65
19 4 4411.32
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

89
centroids_edited.txt Normal file
View 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

Some files were not shown because too many files have changed in this diff Show More