Closed jtenavidal closed 3 months ago
First goal: replicate QEL implementation
For pion production: interference between pion photon and electron photon might not be negligible. Box effects. Get delta T magnitude from code. Run radiative corrections code
Also need to quatify number of emited photons close to electron beam from data.
Create app that loops over events, adds weight and modifies outgoing electron energy (and adds photon)
Also run GENIE SAMPLE with radiated flux
The new app is available. Testing:
Compare event record before and after - Stored correctly Compare with Adi's implementation Recreate H plot at 4.32 GeV (and build instructions for it)
How to test with Adi's implementation:
Install it in gvpvm's Tweak code to print out the following
An example of command I am using:
gevgen -p 11 -n 4 -e 4.32 -t 1000010010 -r 1110000100100 --seed 1210931039 --cross-sections /pnfs/genie/persistent/users/jtenavid/e4nu_files/GENIE_Files/Splines/GEM21_11a_00_000/GEM21_11a_00_000_eFreeNucleon_Q2min_08_total_xsec.xml --event-generator-list EM --tune GEM21_11a_00_000 -o e_on_1000010010_4320MeV_0.ghep.root
The setup script I use is in /genie/app/users/jtenavid/Software/genie-v3/setup_GENIE.sh To build the exact version of GENIE I am using, you can do source /genie/app/users/jtenavid/Software/genie-v3/setup_GENIE.sh https://github.com/adishka/Generator.git adi_radcorr /genie/app/users/jtenavid/Software/genie-v3/GeneratorRad/confdir
This should build the same version of GENIE I am using, with the correct configuration directory You will see that MECGenerator.xml has a bug which you have to fix to be able to run events
Fixed implementation. Now available in
https://github.com/e4nu/Generator-Rad, jtv_radcorr
Example:
gevgen -p 11 -n 40 -e 4.32 -t 1000010010 -r 1110000100100 --seed 1210931039 --cross-sections /pnfs/genie/persistent/users/jtenavid/e4nu_files/GENIE_Files/Splines/G18_10a_00_000/G18_10a_00_000_eNuclei_Q2min_002_total_xsec.xml --event-generator-list EMQEradcorr --tune G18_10a_00_000 -o e_on_1000010010_4320MeV_0.ghep.root
File without rad weights but using Q2 min 0.02. Using radiated flux /genie/app/users/jtenavid/Software/genie-v3/GeneratorRad/e_on_1000010010_4320MeV_NoRadWeigh_FluxRad.ghep.root
Testing "simple" weight calculator. With my code (G18_10a, def Q2min, Decayed Flux)
With Adi's calculation
Files
Run GENIE + Radiative Adis approach:
python eAScatteringGridSubmitter.py --jobs-topdir /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/G18_10a/AdiRad/ --total-xsec /pnfs/genie/persistent/users/jtenavid/e4nu_files/GENIE_Files/Splines/G18_10a_00_000/G18_10a_00_000_eFreeNucleon_Q2min_08_total_xsec.xml --config-dir /pnfs/genie/persistent/users/jtenavid/e4nu_files/e4nu-GENIE-config --probe-list 11 --vN-gen-list none --vA-gen-list none --e-ntotevents 10000000 --starting-point 4 --no-ghep-output --gst-output --tune G18_10a_00_000 --e-tgt-list 1000010010 --store-comitinfo --subjob-disk 4GB --subjob-memory 4GB --mainjob-memory 10GB --mainjob-disk 10GB --ebeam-energy 4.325 --git-location https://github.com/e4nu/Generator-Rad --git-branch jtv_radcorr --event-generator-list EMQEradcorr
Run with Radiated Flux
python eAScatteringGridSubmitter.py --jobs-topdir /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/G18_10a/RadCorrFlux/ --total-xsec /pnfs/genie/persistent/users/jtenavid/e4nu_files/GENIE_Files/Splines/G18_10a_00_000/G18_10a_00_000_eFreeNucleon_Q2min_08_total_xsec.xml --config-dir /pnfs/genie/persistent/users/jtenavid/e4nu_files/e4nu-GENIE-config --probe-list 11 --vN-gen-list none --vA-gen-list none --e-ntotevents 10000000 --starting-point 4 --no-ghep-output --gst-output --tune G18_10a_00_000 --e-tgt-list 1000010010 --store-comitinfo --subjob-disk 4GB --subjob-memory 4GB --mainjob-memory 10GB --mainjob-disk 10GB --git-location https://github.com/e4nu/Generator_Q08.git --event-generator-list EMQE --flux /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/G18_10a/RadCorrFlux/radflux_H_4325MeV.root,hradflux --e-minenergy-fluxrange 3.45 --e-maxenergy-fluxrange 4.325
SIMC Way - Adis code
Run with Mono Flux: python eAScatteringGridSubmitter.py --jobs-topdir /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/2024Generation/G18_10a/MonoFlux/ --total-xsec /pnfs/genie/persistent/users/jtenavid/e4nu_files/GENIE_Files/Splines/G18_10a_00_000/G18_10a_00_000_eFreeNucleon_Q2min_08_total_xsec.xml --config-dir /pnfs/genie/persistent/users/jtenavid/e4nu_files/e4nu-GENIE-config --probe-list 11 --vN-gen-list none --vA-gen-list none --e-ntotevents 10000000 --starting-point 4 --no-ghep-output --gst-output --tune G18_10a_00_000 --e-tgt-list 1000010010 --store-comitinfo --subjob-disk 4GB --subjob-memory 4GB --mainjob-memory 10GB --mainjob-disk 10GB --ebeam-energy 4.325 --git-location https://github.com/e4nu/Generator_Q08.git --event-generator-list EMQE
Run radiative corrections on GENIE FILE:
./process_radweights --input-gst-file /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/G18_10a/MonoFlux/master-routine_validation_01-eScattering/e_on_1000010010_4325MeV_0.sh --output-gst-file e_on_1000010010_4325MeV_H_G18_10a_radiated.gst.root --true-EBeam 4.325 --nevents 1000 --target 1000010010 --rad-model simc
SIMC:
SIMPLE:
Running test with id: 75617196.0@jobsub02.fnal.gov
To do: Calculate missing E and momenta from gst files
Simple fixed now. Store and print out difference
Why do I get El so different??
ANSWER: It was a flux issue. Need very thin binning
GEM_21a cannot run. After changing some cases, I still get the error
1705077769 FATAL KineLimits : [s] <Jacobian (332)> : *** Can not compute Jacobian for transforming: <{Q2}|E> --> <QELEvGen>
terminate called after throwing an instance of 'genie::exceptions::InteractionException'
what(): Can not compute Jacobian for transforming: <{Q2}|E> --> <QELEvGen>
Spline issue?
For presentation:
When removing weights and rad cuts it reproduces the results. Acceptance issue?
Most events removed due to :
if ( fabs(delta_e) > DeltaP_CV) { continue; }
if ( fabs(delta_p) > DeltaP_CV) { continue; }
Leave 138 events
if ( fabs(YPTarE) > YPTarAcceptance ) { continue; }
if ( fabs(YPTarP) > YPTarAcceptance ) { continue; }
While the rest is commented:
counter = 9600000
countQEL 20254 countRES 0 countDIS 0
When adding YPTar Acc and e and p acceptance:
counter = 9600000
countQEL 696 countRES 0 countDIS 0
Only YPTar Acc and electron acceptance:
counter = 9600000
countQEL 5134 countRES 0 countDIS 0
counter = 9600000
countQEL 825 countRES 0 countDIS 0
with proton acceptance
Are we flipping theta on the acceptance?
Implement code in my analysis
Implementation seems to have some issue. Due to kElectronMap thing
Aborting!
Error in Efid parameter file! Received parameter type -315694640, which is not found. Aborting!
Error in Efid parameter file! Received parameter type -315694640, which is not found. Aborting!
Error due to fiducial
Set correct fiducial to point to
//printf("Reading fiducial cut parameters for 4.4GeV/2250A ...\n");
sprintf(Filename,"%s/FCP_4GeV.par", ParLocation);
fiducial_par = fopen(Filename,"r");
Running Radiative with Electrons and GEM21
python eAScatteringGridSubmitter.py --jobs-topdir /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/2024Generation/RadCorrValidation --total-xsec /pnfs/genie/persistent/users/jtenavid/e4nu_files/GENIE_Files/2024Splines/GEM21_11a_Dipole_Q2_08_eFreeNucleon.xml --config-dir /pnfs/genie/persistent/users/jtenavid/e4nu_files/e4nu-config-files/e4nu-GENIE-config --probe-list 11 --e-ntotevents 10000000 --flux /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/2024Generation/radflux_H_4325MeV_simple.root,hradflux --e-minenergy-fluxrange 3.4 --e-maxenergy-fluxrange 4.35 --starting-point 4 --no-ghep-output --gst-output --tune GEM21_11a_00_000 --e-tgt-list 1000010010 --store-comitinfo --subjob-disk 3GB --subjob-memory 3GB --mainjob-memory 10GB --mainjob-disk 10GB --git-location https://github.com/e4nu/Generator_Rad_Q2_08.git --submit-jobs --event-generator-list EMQE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Use job id 7645195.0@jobsub04.fnal.gov to retrieve output =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Running mono flux with GEM21
python eAScatteringGridSubmitter.py --jobs-topdir /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/2024Generation/RadValidationMono --total-xsec /pnfs/genie/persistent/users/jtenavid/e4nu_files/GENIE_Files/2024Splines/GEM21_11a_Dipole_Q2_08_eFreeNucleon.xml --config-dir /pnfs/genie/persistent/users/jtenavid/e4nu_files/e4nu-config-files/e4nu-GENIE-config --probe-list 11 --vN-gen-list none --vA-gen-list none --e-ntotevents 10000000 --starting-point 4 --no-ghep-output --gst-output --tune GEM21_11a_00_000 --e-tgt-list 1000010010 --store-comitinfo --subjob-disk 4GB --subjob-memory 4GB --mainjob-memory 10GB --mainjob-disk 10GB --ebeam-energy 4.325 --git-location https://github.com/e4nu/Generator_Q08.git --event-generator-list EMQE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Use job id 75983260.0@jobsub02.fnal.gov to retrieve output =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rerun with Adi's implementation
mkdir /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/2024Generation/RadCorrAdi ; python eAScatteringGridSubmitter.py --jobs-topdir /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/2024Generation/RadCorrAdi --total-xsec /pnfs/genie/persistent/users/jtenavid/e4nu_files/GENIE_Files/2024Splines/G18_10a_Dipole_master_eFreeNucleon.xml --config-dir /pnfs/genie/persistent/users/jtenavid/e4nu_files/e4nu-config-files/e4nu-GENIE-config --probe-list 11 --vN-gen-list none --vA-gen-list none --e-ntotevents 10000000 --starting-point 4 --no-ghep-output --gst-output --tune G18_10a_00_000 --e-tgt-list 1000010010 --store-comitinfo --subjob-disk 4GB --subjob-memory 4GB --mainjob-memory 10GB --mainjob-disk 10GB --ebeam-energy 4.325 --git-location https://github.com/e4nu/Generator-Rad --git-branch jtv_radcorr_simple --event-generator-list EMQEradcorr --store-comitinfo --submit-jobs
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Use job id 75983300.0@jobsub02.fnal.gov to retrieve output =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rad flux in Use job id 7827947.0@jobsub04.fnal.gov to retrieve output =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
We only need to account for phi and (1-hard) We already deal with electron radiation correctly so no need to reweigh it back?
Simple correction running ehre: Use job id 7828732.0@jobsub04.fnal.gov to retrieve output
RUN SAMPLE WITHOUT Q2 cut!!
Seems off now
empty ? /pnfs/genie/persistent/users/jtenavid/e4nu_files/GENIE_Files/2024Generation/GEM21_11c_Dipole_LFG_Q1_01_1GeV_eCarbon.gst.root
Run sample with G18_10a and Radiative correction for all! processes
To run the scripts: ./e4nuanalysis --conf-file ConfFiles/mc_conf/clas6mc_1panalysis_eH_4325MeV.txt
Error 1:
Error in Efid parameter file!
^CReceived parameter type 1903146416, which is not found.
Aborting!
Something is off with the input files. Evcorr seems ok Probbly outgoing proton momentum is off? Rerun previous code w/o acceptance and see if I also see shift there
Also other files now break. WHY??
Unradiated:
Radiated:
For Kirill analysis:
For pion acceptances https://web.mit.edu/~schmidta/www/e2a_maps/
Phi acceptance remove it Only use theta acceptance For rad plot. Then use the same for proton. Same for proton Then set min Q2 for genie to be 0.8. (Use Q2 about 2 for the paper). 1.8 GeV2.
Running spline at 1.8 GeV2 Q2 cut python eAScatteringGridSubmitter.py --jobs-topdir /pnfs/genie/scratch/users/jtenavid/GENIE_e4nu_Generations/2024Generation/Spline18/ --config-dir /pnfs/genie/persistent/users/jtenavid/e4nu_files/e4nu-config-files/e4nu-GENIE-config --probe-list 11 --stopping-point 4 --no-ghep-output --gst-output --tune GEM21_11a_00_000 --e-tgt-list 1000010010 --store-comitinfo --subjob-disk 4GB --subjob-memory 4GB --mainjob-memory 10GB --mainjob-disk 10GB --git-location https://github.com/e4nu/Generator-Q208.git --git-branch Q2-1_8GeV --submit-jobs
8889287.0@jobsub04.fnal.gov
Compute for each case Can I see 2D plot with tail?
New plan. Develop framework which deals with :
It would be good for it to be a separate package which can be included in the e4nu code implementation easily. This allows future users to run this code as well