forked from JeffersonLab/DEMPgen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbill_notes
85 lines (45 loc) · 3.88 KB
/
bill_notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Note Feb 24th, 2020:
Work on eic_evgen
1. Initiating process for massive input parameters are separated into a different eic_pim.cc. Global parameters are now decleared in the eic_pim.h and defined in eic_pim.cc.
2. eic.cc are not made into a function can be called, my the main.cc.
3. tssa_sigL_Para.h and tssa_sigT_Para.h are not merged into tssa_sig_Para.h, the headers properly declared in the header files and functions are defined in tssa_sig_Para.cc.
/*--------------------------------------------------*/
Note Feb 25, 2020:
1. eic_evgen is included as part of the DEMP_EvGen
/*--------------------------------------------------*/
Note Mar 5, 2020:
1. Generator name change DEMP_EvGen to DEMPgen
2. Main function in eiv_evgen is modified to accept Config.json file
/*--------------------------------------------------*/
Note Mar 30, 2020:
1. Coding structure changes:
Old code: DEMP->EIC->PiPlus_production_routine
New code: DEMP->EIC->Reaction_rountine->XXX_production_routine
Note that at the Reaction_rountine, it takes care of determining which sub process is selected, and the particle type is now an option in the Json configuration file.
The event loop is intentionally left at the each sub process level, since one may want to have a customized output or other actions at the end of the run (like as in the PiPlus case, Ahmed really wanted to know how many events at a certain Q2 or W cuts).
2. Sub process subroutine dir added.
Note that for all subroutines, the source files are stored under:
DEMPgen/src/eic_evgen/process_routine/
Note that we currently have Pi0_prod.cc, and PiPlus_prod.cc. The header file for the function is store in DEMPgen/src/eic_evgen/reaction_rountine.h.
To create a new subroutine, one just have to declare the daughter class in reaction_rountine.h (with only process_reaction and customized Get_cross_section functions), add a if statement in the reaction_rountine.cc and create a new XXX_prod.cc file.
3. The original PionPlus process routine (written by Ahmed) is now made to be generic. The code will determine which produced particle and which recoiled nucleon automatically. Ahmed's code are now converted to the Mother process routine, which other sub process routine can give borrow its structure and functions.
I compared the functionality of new generic form of the code and old, and yes, they are exactly the same (with the same set of parameter, the numerical calculated results are 100% match ). However, the distribution are not 100% same due to how the random number generator is defined. If Stephen can further validate this would be fantastic.
4. Using the particleType.h (under include/) and naming the produced particle.
particleType.h is the particle data base used by GlueX analysis software, which has large data base of particle mass. The new code now uses the same naming convention as the GlueX.
In terms of the particle naming in the Json file, it is extremely flexible. As an example: pi+, Pi+, piplus, PiPlus, Piplus, are all acceptable form of pi+. Same goes for all other changed particles such as k+, etc. pi, pi0, Pi0, PI0, Pion0, are all acceptable form of pi0. The code will standardize the names and get the particle mass from the library.
5. In terms of performance compared to the old code, the new code run quite a bit faster see performance comparison
----------------------------------------
New code test:
Time : Real time 0:03:50, CP time 230.730
Event: 100000000
Recorded events: 1768
Memory used: 0.2G
---------------------------------------
Org code test:
Time : Real time 0:05:45, CP time 344.940
Event: 100000000
Recorded events: 1708
Memory used: 0.1G
----------------------------------------
6: Random generator is now initiallied during the sub process routine initialiation, in the reaction class.
7. Now, the recoil nucleon and produced particle X will assigned with the PDG type ID automatically when outputing the LUND files.