ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
tree
geant4-10.6-release
config
environments
examples
advanced
air_shower
amsEcal
brachytherapy
comparison
analysis.C
analysis_oncura.C
compare.C
compare_6711.C
compare_6711_all.C
compare_all.C
convert.C
TG43_relative_dose.C
include
src
Brachy.cc
macro.C
plot_primary.C
ChargeExchangeMC
composite_calorimeter
doiPET
eRosita
gammaknife
gammaray_telescope
hadrontherapy
human_phantom
iort_therapy
lAr_calorimeter
medical_linac
microbeam
microelectronics
nanobeam
purging_magnet
radioprotection
STCyclotron
underground_physics
xray_fluorescence
xray_telescope
basic
extended
source
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
convert.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file convert.C
1
void
ReadASCII
(TString source_file_ascii, TString output_file_root)
2
{
3
4
// This macro converts the results of the simulation stored in ASCII files to ROOT files.
5
ifstream
in
;
6
in.open(source_file_ascii);
7
8
Float_t
x
,
y
,
z
,
edep
;
9
Int_t
nlines
= 0;
10
TFile *
f
=
new
TFile(output_file_root,
"RECREATE"
);
11
TH2F *
h20
=
new
TH2F(
"h20"
,
"h20"
,801,-100.125,100.125, 801, -100.125, 100.125);
12
13
while
(1) {
14
in >> x >> y >> z >>
edep
;
15
if
(!in.good())
break
;
16
// if (edep !=0.) printf("x=%8f, y=%8f, edep=%8f\n",x,y,edep);
17
18
h20->Fill(x,y,edep);
19
nlines++;
20
}
21
printf
(
" found %d points\n"
,nlines);
22
23
in.close();
24
25
f->Write();
26
}
geant4
tree
geant4-10.6-release
examples
advanced
brachytherapy
comparison
convert.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:55
using
1.8.2 with
ECCE GitHub integration