# Benchmark GEMC Occupancy Prediction for 11GeV Electron Beam with 0T Solenoid for LH2

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

# Creating root file

Splitting an Isotropic distribution for an 11GeV Electron bean at 0T for the Solenoid field with an LH2 target, we start with 5 files LUND_Spread_00 - LUND_Spread_04. LUND_Spread_00 - LUND_Spread_03 are equally divided with 75000 lines or 25000 Moller events in each file. LUND_Spread_04 has 37731 lines or 12577 Moller events. These LUND files are run in GEMC with:

~/src/CLAS/GEMC/source/gemc -USE_GUI=0 -INPUT_GEN_FILE="LUND,LUND_Spread_LH2_00.LUND" -N=75000 eg12.gcard > tracking.dat


Using the evio file created from the GEMC run:

~/src/CLAS/evioRoot/bin/evio2root eg12.evio eg12.root 25000


LUND_Spread_02 has too many events with respect to the 75000 events GEMC can handle. Initially, LUND_Spread_02 had 25000 Moller events or 75000 lines(Header, Scattered, and Moller) in the file. Do to the scattering and secondary particles, this file is divided into two parts LUND_Spread_02_part_00 and LUND_Spread_02_part_01 of 37500 lines or 12500 Moller events.

The second file is also two large and is similarly split into two parts LUND_Spread_02_part_01_00 and LUND_Spread_02_part_01_01 of 18750 lines or 6250 Moller events.

The root files can be combined with:

hadd 0T_LH2.root ./LUND_Spread_00/eg12.root LUND_Spread_01/eg12.root LUND_Spread_02/eg12_00.evio LUND_Spread_02/eg12_01_00.evio LUND_Spread_02/eg12_01_01.evio LUND_Spread_03/eg12.root LUND_Spread_04/eg12.root


# Verify root file to LUND files

Using the evio2rootAnalysis.C

Checking the output versus the LUND_Spread_LH2_00.LUND, for the first 2 events

Processing evio2rootAnalysis.C...
EVENT # 0  GENPART = 2Detector
Gen part 0 pid  = 11 px  = -0.0113655 py  = -0.00200404 pz  = 10.8681 vx  = 0 vy  = 0 vz  = 0
Gen part 1 pid  = 11 px  = 0.0113655 py  = 0.00200404 pz  = 0.131912 vx  = 0 vy  = 0 vz  = 0
Detector 0 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 2 wire  = 1
Detector 1 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 1 wire  = 1
Detector 2 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 2 wire  = 1
EVENT # 1  GENPART = 2Detector
Gen part 0 pid  = 11 px  = -0.0113654 py  = -0.00200403 pz  = 10.8681 vx  = 0 vy  = 0 vz  = 0
Gen part 1 pid  = 11 px  = 0.0113654 py  = 0.00200403 pz  = 0.13191 vx  = 0 vy  = 0 vz  = 0
Detector 0 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 1 wire  = 1
Detector 1 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 2 wire  = 1
Detector 2 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 4 wire  = 1
Detector 3 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 1 wire  = 1
Detector 4 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 2 wire  = 1
Detector 5 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 3 wire  = 1
Detector 6 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 4 wire  = 1


Similarly, for the file LUND_Spread_LH2_00.LUND the first two events are:

2       1       1       1       1       0.006411440670  -81.074954045618540     -20140.877319449689821  1.625975760324849       -10735.677605378126827
1       -1      1       11      0       0       -0.011365497628610      -0.002004043881097      10.868088162529032      10.868094302146620      0.000511        0       0       0
2       -1      1       11      0       0       0.011365497628610       0.002004043881097       0.131911825606992       0.132416696768492       0.000511        0       0       0
2       1       1       1       1       0.006411635317  -81.076265062091281     -20140.885108455677255  1.625924392583043       -10735.681784681821227
1       -1      1       11      0       0       -0.011365408694758      -0.002004028199659      10.868090252277955      10.868096391798467      0.000511        0       0       0
2       -1      1       11      0       0       0.011365408694758       0.002004028199659       0.131909735858069       0.132414607116645       0.000511        0       0       0


Comparing the z component of the 2nd electron (the Moller electron):

pz  = 0.131912 =0.131911825606992
pz  = 0.13191 = 0.131909735858069


Now looking at events near the 75000 line or the 25000 event in LUND_Spread_LH2_00.LUND

2       1       1       1       1       0.015512662940  -126.956381854310933    -20316.691791682802432  0.674069456130444       -10829.902753852171372
1       -1      1       11      0       0       -0.009132219162024      -0.001610256632004      10.915202925405447      10.915206876383641      0.000511        0       0       0
2       -1      1       11      0       0       0.009132219162024       0.001610256632004       0.084797062730579       0.085304122531470       0.000511        0       0       0
2       1       1       1       1       0.015513249673  -126.958920153079674    -20316.698064870324743  0.674042880804948       -10829.906111934713408
1       -1      1       11      0       0       -0.009132129447618      -0.001610240812933      10.915204604524719      10.915208555424911      0.000511        0       0       0
2       -1      1       11      0       0       0.009132129447618       0.001610240812933       0.084795383611307       0.085302443490199       0.000511        0       0       0



Similarly, for the root file

Processing evio2rootAnalysis.C...
EVENT # 24998  GENPART = 2Detector
Gen part 0 pid  = 11 px  = -0.00913222 py  = -0.00161026 pz  = 10.9152 vx  = 0 vy  = 0 vz  = 0
Gen part 1 pid  = 11 px  = 0.00913222 py  = 0.00161026 pz  = 0.0847971 vx  = 0 vy  = 0 vz  = 0
Detector 0 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 1 wire  = 6
Detector 1 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 1 wire  = 5
Detector 2 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 2 wire  = 6
Detector 3 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 3 wire  = 5
Detector 4 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 4 wire  = 5
Detector 5 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 5 wire  = 4
Detector 6 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 6 wire  = 5
Detector 7 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 6 wire  = 4
Detector 8 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 1 wire  = 6
Detector 9 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 2 wire  = 7
Detector 10 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 2 wire  = 6
Detector 11 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 3 wire  = 6
Detector 12 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 4 wire  = 6
Detector 13 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 5 wire  = 5
Detector 14 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 6 wire  = 5
EVENT # 24999  GENPART = 2Detector
Gen part 0 pid  = 11 px  = -0.00913213 py  = -0.00161024 pz  = 10.9152 vx  = 0 vy  = 0 vz  = 0
Gen part 1 pid  = 11 px  = 0.00913213 py  = 0.00161024 pz  = 0.0847954 vx  = 0 vy  = 0 vz  = 0
Detector 0 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 1 wire  = 5
Detector 1 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 2 wire  = 5
Detector 2 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 3 wire  = 4
Detector 3 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 4 wire  = 5
Detector 4 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 4 wire  = 4
Detector 5 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 5 wire  = 4
Detector 6 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 5 wire  = 3
Detector 7 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 6 wire  = 4
Detector 8 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 1 wire  = 6
Detector 9 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 1 wire  = 5
Detector 10 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 2 wire  = 6
Detector 11 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 3 wire  = 5
Detector 12 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 4 wire  = 5
Detector 13 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 5 wire  = 4
Detector 14 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 6 wire  = 5
Detector 15 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 6 wire  = 4
EVENT # 25000  GENPART = 2Detector
Gen part 0 pid  = 11 px  = -0.00913204 py  = -0.00161022 pz  = 10.9152 vx  = 0 vy  = 0 vz  = 0
Gen part 1 pid  = 11 px  = 0.00913204 py  = 0.00161022 pz  = 0.0847937 vx  = 0 vy  = 0 vz  = 0
Detector 0 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 1 wire  = 2
Detector 1 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 2 wire  = 2
Detector 2 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 3 wire  = 1
Detector 3 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 4 wire  = 2
Detector 4 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 4 wire  = 1
Detector 5 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 5 wire  = 1
Detector 6 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 6 wire  = 1
Detector 7 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 1 wire  = 3
Detector 8 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 1 wire  = 2
Detector 9 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 2 wire  = 3
Detector 10 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 2 wire  = 2
Detector 11 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 3 wire  = 2
Detector 12 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 4 wire  = 2
Detector 13 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 5 wire  = 1
Detector 14 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 6 wire  = 1
Detector 15 dpid  = 11 procID  = 90 sector  = 3 superlayer  = 6 layer  = 1 wire  = 1
Detector 16 dpid  = 11 procID  = 90 sector  = 3 superlayer  = 6 layer  = 2 wire  = 1
Detector 17 dpid  = 11 procID  = 90 sector  = 3 superlayer  = 6 layer  = 3 wire  = 1
Detector 18 dpid  = 11 procID  = 90 sector  = 3 superlayer  = 6 layer  = 4 wire  = 1
Detector 19 dpid  = 11 procID  = 90 sector  = 3 superlayer  = 6 layer  = 5 wire  = 1
Detector 20 dpid  = 11 procID  = 90 sector  = 3 superlayer  = 6 layer  = 6 wire  = 1
EVENT # 25001  GENPART = 2Detector
Gen part 0 pid  = 11 px  = -0.00913195 py  = -0.00161021 pz  = 10.9152 vx  = 0 vy  = 0 vz  = 0
Gen part 1 pid  = 11 px  = 0.00913195 py  = 0.00161021 pz  = 0.084792 vx  = 0 vy  = 0 vz  = 0
Detector 0 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 1 wire  = 6
Detector 1 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 1 wire  = 5
Detector 2 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 2 wire  = 6
Detector 3 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 2 wire  = 5
Detector 4 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 3 wire  = 5
Detector 5 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 4 wire  = 5
Detector 6 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 5 wire  = 4
Detector 7 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 6 wire  = 5
Detector 8 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 1 layer  = 6 wire  = 4
Detector 9 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 1 wire  = 6
Detector 10 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 2 wire  = 6
Detector 11 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 3 wire  = 5
Detector 12 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 4 wire  = 6
Detector 13 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 4 wire  = 5
Detector 14 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 5 wire  = 5
Detector 15 dpid  = 11 procID  = 90 sector  = 1 superlayer  = 2 layer  = 6 wire  = 5
Detector 16 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 5 layer  = 1 wire  = 1
Detector 17 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 5 layer  = 2 wire  = 2
Detector 18 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 5 layer  = 3 wire  = 1
Detector 19 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 5 layer  = 4 wire  = 2
Detector 20 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 5 layer  = 5 wire  = 1
Detector 21 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 5 layer  = 6 wire  = 2
Detector 22 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 5 layer  = 6 wire  = 1
Detector 23 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 6 layer  = 1 wire  = 2
Detector 24 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 6 layer  = 1 wire  = 1
Detector 25 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 6 layer  = 2 wire  = 2
Detector 26 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 6 layer  = 3 wire  = 1
Detector 27 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 6 layer  = 4 wire  = 2
Detector 28 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 6 layer  = 5 wire  = 1
Detector 29 dpid  = 11 procID  = 90 sector  = 6 superlayer  = 6 layer  = 6 wire  = 1

pz  = 0.0847971 = 0.084797062730579
pz  = 0.0847954 = 0.084795383611307
pz  = 0.0847937 = 0.084793704508532
pz  = 0.084792 = 0.084792025422253


Investigating the next sequential file listed in the command hadd, LUND_Spread_LH2_01.LUND, for the first 2 events:

2       1       1       1       1       0.015513922088  -126.961458526835955    -20316.704337997434777  0.674016306955490       -10829.909469984264433
1       -1      1       11      0       0       -0.009132039733185      -0.001610224993858      10.915206283627493      10.915210234449686      0.000511        0       0       0
2       -1      1       11      0       0       0.009132039733185       0.001610224993858       0.084793704508532       0.085300764465423       0.000511        0       0       0
2       1       1       1       1       0.015514506958  -126.963996975584934    -20316.710611063095712  0.673989733548322       -10829.912828000824447
1       -1      1       11      0       0       -0.009131950018723      -0.001610209174778      10.915207962713772      10.915211913457968      0.000511        0       0       0
2       -1      1       11      0       0       0.009131950018723       0.001610209174778       0.084792025422253       0.085299085457143       0.000511        0       0       0



Checking on the sizes for the LUND files:

wc -l LUND_Spread_LH2.LUND