Skip to content
Snippets Groups Projects
Commit abd854de authored by Tooba Ali's avatar Tooba Ali Committed by Wouter Deconinck
Browse files

Minimum Q2 values

parent 57cf91ba
No related branches found
No related tags found
1 merge request!156Minimum Q2 values
...@@ -35,12 +35,12 @@ x_bins = [4.09385E-05,6.47862E-05,0.000102535,0.000162619,0.000258118,0.00040911 ...@@ -35,12 +35,12 @@ x_bins = [4.09385E-05,6.47862E-05,0.000102535,0.000162619,0.000258118,0.00040911
#function to construct Q2 correlation plots #function to construct Q2 correlation plots
def Q2correlation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be 'E','DA', or 'JB' def Q2correlation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be 'e','DA', or 'JB'
Q2values_Y = method_Q2values_dict['{}'.format(method)] #Q2 values of the given method, that are mapped onto the y axis Q2values_Y = method_Q2values_dict['{}'.format(method)] #Q2 values of the given method, that are mapped onto the y axis
Q2_List_T = Q2values_T['{}'.format(minq2)] #Truth Q2 values for given minq2, mapped along x axis Q2_List_T = Q2values_T #Truth Q2 values, mapped along x axis
Q2_List_Y = Q2values_Y['{}'.format(minq2)] #method (E/DA/JB) Q2 values for given minq2, mapped along y axis Q2_List_Y = Q2values_Y #method (E/DA/JB) Q2 values, mapped along y axis
T_len = ak.count(Q2_List_T,axis=0) #total number of events in Truth T_len = ak.count(Q2_List_T,axis=0) #total number of events in Truth
Y_len = ak.count(Q2_List_Y,axis=0) #total number of events in method Y_len = ak.count(Q2_List_Y,axis=0) #total number of events in method
...@@ -55,7 +55,7 @@ def Q2correlation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be ...@@ -55,7 +55,7 @@ def Q2correlation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be
Q2_List_Y_F = Q2_List_Y[T_boolean] #filtered method Q2 values Q2_List_Y_F = Q2_List_Y[T_boolean] #filtered method Q2 values
T_Q2s = np.array(ak.flatten(Q2_List_T_F)) #Truth Q2 values, mapped along x axis T_Q2s = np.array(ak.flatten(Q2_List_T_F)) #Truth Q2 values, mapped along x axis
Y_Q2s = np.array(ak.flatten(Q2_List_Y_F)) #methos Q2 values, mapped along y axis Y_Q2s = np.array(ak.flatten(Q2_List_Y_F)) #method Q2 values, mapped along y axis
#2-dimensional histogram, h #2-dimensional histogram, h
h, xedges, yedges = np.histogram2d(x=T_Q2s,y=Y_Q2s, bins=[Q2_bins,Q2_bins]) h, xedges, yedges = np.histogram2d(x=T_Q2s,y=Y_Q2s, bins=[Q2_bins,Q2_bins])
...@@ -77,7 +77,7 @@ def Q2correlation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be ...@@ -77,7 +77,7 @@ def Q2correlation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be
norm_h_text.append(norm_c_text) norm_h_text.append(norm_c_text)
fig = plt.figure() fig = plt.figure()
mplhep.hist2dplot(H=norm_h,norm=mpl.colors.LogNorm(),labels=norm_h_text,xbins=Q2_bins,ybins=Q2_bins,cmax=1,cmin=1e-5) mplhep.hist2dplot(H=norm_h,norm=mpl.colors.LogNorm(vmin= 1e-4, vmax= 1),labels=norm_h_text,xbins=Q2_bins,ybins=Q2_bins)
plt.yscale('log') plt.yscale('log')
plt.xscale('log') plt.xscale('log')
fig.set_figwidth(11) fig.set_figwidth(11)
...@@ -86,17 +86,17 @@ def Q2correlation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be ...@@ -86,17 +86,17 @@ def Q2correlation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be
plt.ylabel('$Q^2$ [$GeV^2$] {}'.format(method_dict['{}'.format(method)])) plt.ylabel('$Q^2$ [$GeV^2$] {}'.format(method_dict['{}'.format(method)]))
plt.title('{} $Q^2$ correlation {}x{} $minQ^2=${}$GeV^2$'.format(method_dict['{}'.format(method)],k,p,minq2)) plt.title('{} $Q^2$ correlation {}x{} $minQ^2=${}$GeV^2$'.format(method_dict['{}'.format(method)],k,p,minq2))
plt.show() plt.show()
plt.savefig(os.path.join(args.outdir, '%gon%g/Q2_correlation_%s_%gx%g_minQ2=%g.png' %(k,p,method,k,p,minq2))) plt.savefig(os.path.join(args.outdir, '%gon%g/minQ2=%g/Q2_correlation_%s_%gx%g_minQ2=%g.png' %(k,p,minq2,method,k,p,minq2)))
#function to construct Bjorken-x correlation plots #function to construct Bjorken-x correlation plots
def Xcorrelation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be 'E','DA', or 'JB' def Xcorrelation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be 'e','DA', or 'JB'
Xvalues_Y = method_Xvalues_dict['{}'.format(method)] #x values of the given method, that are mapped onto the y axis Xvalues_Y = method_Xvalues_dict['{}'.format(method)] #x values of the given method, that are mapped onto the y axis
X_List_T = Xvalues_T['{}'.format(minq2)] #Truth x values for given minq2, mapped along x axis X_List_T = Xvalues_T #Truth x values, mapped along x axis
X_List_Y = Xvalues_Y['{}'.format(minq2)] #method (E/DA/JB) x values for given minq2, mapped along y axis X_List_Y = Xvalues_Y #method (E/DA/JB) x values, mapped along y axis
T_len = ak.count(X_List_T,axis=0) #total number of events in Truth T_len = ak.count(X_List_T,axis=0) #total number of events in Truth
Y_len = ak.count(X_List_Y,axis=0) #total number of events in method Y_len = ak.count(X_List_Y,axis=0) #total number of events in method
...@@ -134,7 +134,7 @@ def Xcorrelation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be ' ...@@ -134,7 +134,7 @@ def Xcorrelation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be '
norm_h_text.append(norm_c_text) norm_h_text.append(norm_c_text)
fig = plt.figure() fig = plt.figure()
mplhep.hist2dplot(H=norm_h,norm=mpl.colors.LogNorm(),labels=norm_h_text,xbins=x_bins,ybins=x_bins,cmax=1,cmin=1e-5) mplhep.hist2dplot(H=norm_h,norm=mpl.colors.LogNorm(vmin= 1e-4, vmax= 1),labels=norm_h_text,xbins=x_bins,ybins=x_bins)
plt.yscale('log') plt.yscale('log')
plt.xscale('log') plt.xscale('log')
fig.set_figwidth(11) fig.set_figwidth(11)
...@@ -143,27 +143,27 @@ def Xcorrelation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be ' ...@@ -143,27 +143,27 @@ def Xcorrelation(minq2,method): #minq2 can be 1,10,100, or 1000; method can be '
plt.ylabel('$x$ {}'.format(method_dict['{}'.format(method)])) plt.ylabel('$x$ {}'.format(method_dict['{}'.format(method)]))
plt.title('{} $x$ correlation {}x{} $minQ^2=${}$GeV^2$'.format(method_dict['{}'.format(method)],k,p,minq2)) plt.title('{} $x$ correlation {}x{} $minQ^2=${}$GeV^2$'.format(method_dict['{}'.format(method)],k,p,minq2))
plt.show() plt.show()
plt.savefig(os.path.join(args.outdir, '%gon%g/x_correlation_%s_%gx%g_minQ2=%g.png' %(k,p,method,k,p,minq2))) plt.savefig(os.path.join(args.outdir, '%gon%g/minQ2=%g/x_correlation_%s_%gx%g_minQ2=%g.png' %(k,p,minq2,method,k,p,minq2)))
keys = ur.concatenate(rec_file + ':events/' + 'InclusiveKinematicsTruth') keys = ur.concatenate(rec_file + ':events/' + 'InclusiveKinematicsTruth')
minq2_1_T = [keys['InclusiveKinematicsTruth.Q2'],keys['InclusiveKinematicsTruth.x']] Truth = [keys['InclusiveKinematicsTruth.Q2'],keys['InclusiveKinematicsTruth.x']]
keys = ur.concatenate(rec_file + ':events/' + 'InclusiveKinematicsElectron') keys = ur.concatenate(rec_file + ':events/' + 'InclusiveKinematicsElectron')
minq2_1_E = [keys['InclusiveKinematicsElectron.Q2'], keys['InclusiveKinematicsElectron.x']] Electron = [keys['InclusiveKinematicsElectron.Q2'], keys['InclusiveKinematicsElectron.x']]
keys = ur.concatenate(rec_file + ':events/' + 'InclusiveKinematicsDA') keys = ur.concatenate(rec_file + ':events/' + 'InclusiveKinematicsDA')
minq2_1_DA = [keys['InclusiveKinematicsDA.Q2'], keys['InclusiveKinematicsDA.x']] DoubleAngle = [keys['InclusiveKinematicsDA.Q2'], keys['InclusiveKinematicsDA.x']]
keys = ur.concatenate(rec_file + ':events/' + 'InclusiveKinematicsJB') keys = ur.concatenate(rec_file + ':events/' + 'InclusiveKinematicsJB')
minq2_1_JB = [keys['InclusiveKinematicsJB.Q2'], keys['InclusiveKinematicsJB.x']] JacquetBlondel = [keys['InclusiveKinematicsJB.Q2'], keys['InclusiveKinematicsJB.x']]
Q2values_T = {'1':minq2_1_T[0]} Q2values_T = Truth[0]
Q2values_E = {'1':minq2_1_E[0]} Q2values_E = Electron[0]
Q2values_DA = {'1':minq2_1_DA[0]} Q2values_DA = DoubleAngle[0]
Q2values_JB = {'1':minq2_1_JB[0]} Q2values_JB = JacquetBlondel[0]
Xvalues_T = {'1':minq2_1_T[1]} Xvalues_T = Truth[1]
Xvalues_E = {'1':minq2_1_E[1]} Xvalues_E = Electron[1]
Xvalues_DA = {'1':minq2_1_DA[1]} Xvalues_DA = DoubleAngle[1]
Xvalues_JB = {'1':minq2_1_JB[1]} Xvalues_JB = JacquetBlondel[1]
method_dict = {'e':'Electron','DA':'Double-Angle','JB':'Jacquet-Blondel'} method_dict = {'e':'Electron','DA':'Double-Angle','JB':'Jacquet-Blondel'}
method_Q2values_dict = {'e':Q2values_E,'DA':Q2values_DA,'JB':Q2values_JB} method_Q2values_dict = {'e':Q2values_E,'DA':Q2values_DA,'JB':Q2values_JB}
......
...@@ -12,13 +12,13 @@ dis:generate: ...@@ -12,13 +12,13 @@ dis:generate:
matrix: matrix:
- EBEAM: 5 - EBEAM: 5
PBEAM: 41 PBEAM: 41
MINQ2: 1 MINQ2: [1, 10, 100]
- EBEAM: 10 - EBEAM: 10
PBEAM: 100 PBEAM: 100
MINQ2: 1 MINQ2: [1, 10, 100, 1000]
- EBEAM: 18 - EBEAM: 18
PBEAM: 275 PBEAM: 275
MINQ2: 1 MINQ2: [1, 10, 100, 1000]
timeout: 1 hours timeout: 1 hours
script: script:
- bash benchmarks/dis/get.sh --config dis_${EBEAM}x${PBEAM}_minQ2=${MINQ2} --ebeam ${EBEAM} --pbeam ${PBEAM} --minq2 ${MINQ2} - bash benchmarks/dis/get.sh --config dis_${EBEAM}x${PBEAM}_minQ2=${MINQ2} --ebeam ${EBEAM} --pbeam ${PBEAM} --minq2 ${MINQ2}
...@@ -31,13 +31,13 @@ dis:simulate: ...@@ -31,13 +31,13 @@ dis:simulate:
matrix: matrix:
- EBEAM: 5 - EBEAM: 5
PBEAM: 41 PBEAM: 41
MINQ2: 1 MINQ2: [1, 10, 100]
- EBEAM: 10 - EBEAM: 10
PBEAM: 100 PBEAM: 100
MINQ2: 1 MINQ2: [1, 10, 100, 1000]
- EBEAM: 18 - EBEAM: 18
PBEAM: 275 PBEAM: 275
MINQ2: 1 MINQ2: [1, 10, 100, 1000]
timeout: 2 hour timeout: 2 hour
script: script:
- bash benchmarks/dis/dis.sh --config dis_${EBEAM}x${PBEAM}_minQ2=${MINQ2} --ebeam ${EBEAM} --pbeam ${PBEAM} --minq2 ${MINQ2} - bash benchmarks/dis/dis.sh --config dis_${EBEAM}x${PBEAM}_minQ2=${MINQ2} --ebeam ${EBEAM} --pbeam ${PBEAM} --minq2 ${MINQ2}
......
...@@ -30,7 +30,7 @@ if [[ ! -d "input" ]] ; then ...@@ -30,7 +30,7 @@ if [[ ! -d "input" ]] ; then
mkdir_local_data_link input mkdir_local_data_link input
fi fi
## Data path for input data (generator-level hepmc file) ## Data path for input data (generator-level hepmc file)
INPUT_PATH="input/${BENCHMARK_TAG}/${BEAM_TAG}" INPUT_PATH="input/${BENCHMARK_TAG}/${BEAM_TAG}/minQ2=${MINQ2}"
mkdir_local_data_link input mkdir_local_data_link input
#export INPUT_PATH=`realpath ${INPUT_PATH}` #export INPUT_PATH=`realpath ${INPUT_PATH}`
mkdir -p "${INPUT_PATH}" mkdir -p "${INPUT_PATH}"
...@@ -45,7 +45,7 @@ echo "TMP_PATH: ${TMP_PATH}" ...@@ -45,7 +45,7 @@ echo "TMP_PATH: ${TMP_PATH}"
## Data path for benchmark output (plots and reconstructed files ## Data path for benchmark output (plots and reconstructed files
## if not too big). ## if not too big).
RESULTS_PATH="results/${BENCHMARK_TAG}/${BEAM_TAG}" RESULTS_PATH="results/${BENCHMARK_TAG}/${BEAM_TAG}/minQ2=${MINQ2}"
mkdir -p ${RESULTS_PATH} mkdir -p ${RESULTS_PATH}
export RESULTS_PATH=`realpath ${RESULTS_PATH}` export RESULTS_PATH=`realpath ${RESULTS_PATH}`
echo "RESULTS_PATH: ${RESULTS_PATH}" echo "RESULTS_PATH: ${RESULTS_PATH}"
......
...@@ -56,7 +56,7 @@ fi ...@@ -56,7 +56,7 @@ fi
## ============================================================================= ## =============================================================================
## Step 3: Copy the file (about 180 lines per event in DIS NC files) ## Step 3: Copy the file (about 180 lines per event in DIS NC files)
nlines=$((180*${JUGGLER_N_EVENTS})) nlines=$((190*${JUGGLER_N_EVENTS}))
DATA_URL=S3/eictest/ATHENA/EVGEN/DIS/NC/${EBEAM}x${PBEAM}/minQ2=${MINQ2}/pythia8NCDIS_${EBEAM}x${PBEAM}_minQ2=${MINQ2}_beamEffects_xAngle=-0.025_hiDiv_vtxfix_1.hepmc DATA_URL=S3/eictest/ATHENA/EVGEN/DIS/NC/${EBEAM}x${PBEAM}/minQ2=${MINQ2}/pythia8NCDIS_${EBEAM}x${PBEAM}_minQ2=${MINQ2}_beamEffects_xAngle=-0.025_hiDiv_vtxfix_1.hepmc
mc config host add S3 https://dtn01.sdcc.bnl.gov:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY} mc config host add S3 https://dtn01.sdcc.bnl.gov:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY}
mc head -n ${nlines} ${DATA_URL} | sanitize_hepmc3 > ${TMP_PATH}/${GEN_TAG}.hepmc mc head -n ${nlines} ${DATA_URL} | sanitize_hepmc3 > ${TMP_PATH}/${GEN_TAG}.hepmc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment