-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:billlee77/DEMPgen
- Loading branch information
Showing
19 changed files
with
6,441 additions
and
1 deletion.
There are no files selected for viewing
Submodule eic_evgen
deleted from
fbf8b3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# A Generic Makefile for compiling ROOT programs | ||
# R. Michaels, [email protected], Aug 2001 See also README !! | ||
# Version of this release | ||
# | ||
ROOTLIBS = $(shell root-config --libs) | ||
ROOTGLIBS = $(shell root-config --cflags --glibs) | ||
ROOTINC = $(shell root-config --incdir) | ||
#CXXFLAGS = -Wall -g -frtti -fexceptions -fPIC -O | ||
CXXFLAGS = -Wall -frtti -fexceptions -fPIC -O | ||
O=eic | ||
|
||
# Linux with g++ | ||
INCLUDES = -I$(ROOTSYS)/include -I$(ROOTINC) | ||
CXX = clang++ | ||
#CXX = g++ | ||
LD = clang++ | ||
#LD = g++ | ||
LDFLAGS = | ||
|
||
LIBS = $(ROOTLIBS) | ||
GLIBS = $(ROOTGLIBS) | ||
|
||
ALL_LIBS = $(GLIBS) $(LIBS) | ||
|
||
# Test code executibles | ||
PROGS = $(O) | ||
|
||
$(O): $(O).cxx | ||
rm -f $@ | ||
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $(O).cxx $(ALL_LIBS) | ||
|
||
|
||
clean: | ||
rm -f *.o core *~ *.d *.tar $(PROGS) | ||
|
||
realclean: clean | ||
rm -f *.d | ||
|
||
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
This is an event generator for deep exclusive electro pion production at EIC. | ||
|
||
First make two directories: | ||
|
||
mkdir LundFiles | ||
mkdir RootFiles | ||
|
||
This generator uses ROOT libraries. To compile please use following command: | ||
|
||
g++ -o eic eic.cxx `root-config --cflags --glibs` | ||
|
||
This generator is valid for: | ||
5.0 < Qsq < 35 GeV^2 | ||
2.0 < w < 10 GeV | ||
0 < -t < 1.3 GeV^2 | ||
|
||
It can generates a root file, a txt file and a dat file. Generation of Root | ||
file is turned off. dat file is written in lund format to use in eic_gemc | ||
|
||
The last line in txt file "Number of lund events" shows how many events | ||
are successfully generated. Use this number in gcard of eic_gemc | ||
|
||
Follwing is the format of dat file: | ||
|
||
ppiOut << "3" | ||
<< " \t " << fPhi // var 1 | ||
<< " \t " << fPhiS // var 2 | ||
<< " \t " << fx // var 3 | ||
<< " \t " << "1" | ||
<< " \t " << fQsq_GeV // var 4 | ||
<< " \t " << fT_GeV // var 5 | ||
<< " \t " << fW_GeV // var 6 | ||
<< " \t " << fEpsilon // var 7 | ||
<< " \t " << fEventWeight // var 8 | ||
<< endl; | ||
|
||
// Pion - | ||
ppiOut << setw(10) << "1" | ||
<< setw(10) << "1" | ||
<< setw(10) << "1" | ||
<< setw(10) << "211" | ||
<< setw(10) << "0" | ||
<< setw(10) << "0" | ||
<< setw(16) << lpiong.X() | ||
<< setw(16) << lpiong.Y() | ||
<< setw(16) << lpiong.Z() | ||
<< setw(16) << lpiong.E() | ||
<< setw(16) << fPion_Mass_GeV | ||
<< setw(16) << fVertex_X | ||
<< setw(16) << fVertex_Y | ||
<< setw(16) << fVertex_Z | ||
<< endl; | ||
|
||
// Electron | ||
ppiOut << setw(10) << "2" | ||
<< setw(10) << "-1" | ||
<< setw(10) << "1" | ||
<< setw(10) << "11" | ||
<< setw(10) << "0" | ||
<< setw(10) << "0" | ||
<< setw(16) << lscatelecg.X() | ||
<< setw(16) << lscatelecg.Y() | ||
<< setw(16) << lscatelecg.Z() | ||
<< setw(16) << lscatelecg.E() | ||
<< setw(16) << fElectron_Mass_GeV | ||
<< setw(16) << fVertex_X | ||
<< setw(16) << fVertex_Y | ||
<< setw(16) << fVertex_Z | ||
<< endl; | ||
|
||
// Neutron | ||
ppiOut << setw(10) << "3" | ||
<< setw(10) << "1" | ||
<< setw(10) << "1" | ||
<< setw(10) << "2112" | ||
<< setw(10) << "0" | ||
<< setw(10) << "0" | ||
<< setw(16) << lneutrong.X() | ||
<< setw(16) << lneutrong.Y() | ||
<< setw(16) << lneutrong.Z() | ||
<< setw(16) << lneutrong.E() | ||
<< setw(16) << fNeutron_Mass_GeV | ||
<< setw(16) << fVertex_X | ||
<< setw(16) << fVertex_Y | ||
<< setw(16) << fVertex_Z | ||
<< endl; | ||
|
||
|
||
Please note that event weight of a single evevnt is normalized to total | ||
events tried so you dont need to know the ratio of events generated to | ||
events tried, just use the "fEventWeight" for each event | ||
|
||
For a quick check just run the follwing command in c-shell | ||
|
||
source ./runEIC.csh | ||
|
||
Note 1: | ||
fEventWeight is a negative number because of the phase space of scattered | ||
elecgron. | ||
|
||
Note 2: | ||
Lets say you generate "N" dat files and then generate "N" root files using | ||
eic_gemc. When you combine these eic_gemc generated "N" files using hadd | ||
command of root (or using your own script) then in your analysis code you | ||
must divide the eighth variable of header tree(which contains the event | ||
event weight) by "N" | ||
|
||
header->SetBranchAddress("var8",&var8); | ||
|
||
weight = -var8->at(0)/300.0; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# eic_evgen | ||
This is an event generator for deep exclusive electro pion production at EIC. | ||
|
||
First make two directories: | ||
|
||
mkdir LundFiles | ||
mkdir RootFiles | ||
|
||
This generator uses ROOT libraries. To compile please use following command: | ||
|
||
g++ -o eic eic.cxx `root-config --cflags --glibs` | ||
|
||
This generator is valid for: | ||
5.0 < Qsq < 35 GeV^2 | ||
2.0 < w < 10 GeV | ||
0 < -t < 1.3 GeV^2 | ||
|
||
It can generates a root file, a txt file and a dat file. Generation of Root | ||
file is turned off. dat file is written in lund format to use in eic_gemc | ||
|
||
The last line in txt file "Number of lund events" shows how many events | ||
are successfully generated. Use this number in gcard of eic_gemc | ||
|
||
Follwing is the format of dat file: | ||
|
||
ppiOut << "3" | ||
<< " \t " << fPhi // var 1 | ||
<< " \t " << fPhiS // var 2 | ||
<< " \t " << fx // var 3 | ||
<< " \t " << "1" | ||
<< " \t " << fQsq_GeV // var 4 | ||
<< " \t " << fT_GeV // var 5 | ||
<< " \t " << fW_GeV // var 6 | ||
<< " \t " << fEpsilon // var 7 | ||
<< " \t " << fEventWeight // var 8 | ||
<< endl; | ||
// Pion - | ||
ppiOut << setw(10) << "1" | ||
<< setw(10) << "1" | ||
<< setw(10) << "1" | ||
<< setw(10) << "211" | ||
<< setw(10) << "0" | ||
<< setw(10) << "0" | ||
<< setw(16) << lpiong.X() | ||
<< setw(16) << lpiong.Y() | ||
<< setw(16) << lpiong.Z() | ||
<< setw(16) << lpiong.E() | ||
<< setw(16) << fPion_Mass_GeV | ||
<< setw(16) << fVertex_X | ||
<< setw(16) << fVertex_Y | ||
<< setw(16) << fVertex_Z | ||
<< endl; | ||
|
||
// Electron | ||
ppiOut << setw(10) << "2" | ||
<< setw(10) << "-1" | ||
<< setw(10) << "1" | ||
<< setw(10) << "11" | ||
<< setw(10) << "0" | ||
<< setw(10) << "0" | ||
<< setw(16) << lscatelecg.X() | ||
<< setw(16) << lscatelecg.Y() | ||
<< setw(16) << lscatelecg.Z() | ||
<< setw(16) << lscatelecg.E() | ||
<< setw(16) << fElectron_Mass_GeV | ||
<< setw(16) << fVertex_X | ||
<< setw(16) << fVertex_Y | ||
<< setw(16) << fVertex_Z | ||
<< endl; | ||
// Neutron | ||
ppiOut << setw(10) << "3" | ||
<< setw(10) << "1" | ||
<< setw(10) << "1" | ||
<< setw(10) << "2112" | ||
<< setw(10) << "0" | ||
<< setw(10) << "0" | ||
<< setw(16) << lneutrong.X() | ||
<< setw(16) << lneutrong.Y() | ||
<< setw(16) << lneutrong.Z() | ||
<< setw(16) << lneutrong.E() | ||
<< setw(16) << fNeutron_Mass_GeV | ||
<< setw(16) << fVertex_X | ||
<< setw(16) << fVertex_Y | ||
<< setw(16) << fVertex_Z | ||
<< endl; | ||
|
||
|
||
Please note that event weight of a single evevnt is normalized to total | ||
events tried so you dont need to know the ratio of events generated to | ||
events tried, just use the "fEventWeight" for each event | ||
|
||
For a quick check just run the follwing command in c-shell | ||
|
||
source ./runEIC.csh | ||
|
||
Note 1: | ||
fEventWeight is a negative number because of the phase space of scattered | ||
elecgron. | ||
|
||
Note 2: | ||
Lets say you generate "N" dat files and then generate "N" root files using | ||
eic_gemc. When you combine these eic_gemc generated "N" files using hadd | ||
command of root (or using your own script) then in your analysis code you | ||
must divide the eighth variable of header tree(which contains the event | ||
event weight) by "N" | ||
|
||
header->SetBranchAddress("var8",&var8); | ||
|
||
weight = -var8->at(0)/300.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
|
||
env = Environment() | ||
|
||
env['CXX'] = 'g++' | ||
|
||
|
||
# # lib_var = os.popen("root-config --libs").read() | ||
|
||
env['CCFLAGS'] = '-DLINUXVERS -g -Wall -DWITH_DEBUG' | ||
|
||
output = os.environ["ROOTSYS"] | ||
|
||
root_sys = os.environ["ROOTSYS"] | ||
root_sys_inc = root_sys + "/include" | ||
|
||
env.Append(CPPPATH =[root_sys_inc, root_sys]) | ||
|
||
root_lib = os.popen("root-config --libs").read() | ||
|
||
env['LIBS'] = 'nsl', 'crypt', 'dl', 'Minuit', 'Xt', 'X11', 'Xpm' | ||
|
||
env.ParseConfig('/home/apps/root/bin/root-config --libs') | ||
|
||
#env.ParseConfig('/usr/bin/root-config --libs') | ||
|
||
env.Program(target = "eic", source = ["main.cc", "eic.cc", "eic_pim.cc", "tssa_sig_Para.cc"]) | ||
|
||
|
Binary file not shown.
Oops, something went wrong.