Open sarahwarad opened 2 days ago
Hi Sarah,
Could you please provide us information so that we could reproduce the problem?
Regards,
Benjamin
thank you so much for your reply
can you clarify which information you need?
best regards Sarah
Hi Sarah,
As I wrote, I need to be able to reproduce your problem. I therefore need your version of the code, a small sample of events representative to what you analysed, the MA5 script used, etc.
Regards,
Benjamin
OK that is what I did:
Process p p > l+ l- /a [QCD] ; p p > l+ l- j /a [QCD] ; p p > l+ l- j /a [QCD] Run at p-p collider (6500.0 + 6500.0 GeV) Number of events generated: 10000 Total cross section: 5.603e+03 +- 1.9e+01 pb
In MA card
@MG5aMC stdout_lvl=INFO
@MG5aMC inputs = .hepmc, .hep, .stdhep, .lhco, *.fifo
@MG5aMC reconstruction_name = BasicReco @MG5aMC reco_output = lhe
define invisible = 14 -12 -16 16 12 -14 set main.fastsim.package = fastjet set main.fastsim.algorithm = antikt set main.fastsim.radius = 0.4 set main.fastsim.ptmin = 5.0
set main.fastsim.bjet_id.matching_dr = 0.4 set main.fastsim.bjet_id.efficiency = 1.0 set main.fastsim.bjet_id.misid_cjet = 0.0 set main.fastsim.bjet_id.misid_ljet = 0.0
set main.fastsim.tau_id.efficiency = 1.0 set main.fastsim.tau_id.misid_ljet = 0.0
@MG5aMC analysis_name = analysis2
@MG5aMC set_reconstructions = ['BasicReco']
set main.stacking_method = normalize2one
define e = e+ e- define mu = mu+ mu- select (j) PT > 20 select (b) PT > 20 select (e) PT > 10 select (mu) PT > 10 select (j) ABSETA < 2.5 select (b) ABSETA < 2.5 select (e) ABSETA < 2.5 select (mu) ABSETA < 2.5
plot MET 40 0 500 plot THT 40 0 500
plot PT(j[1]) 40 0 500 [logY] plot ETA(j[1]) 40 -10 10 [logY] plot MT_MET(j[1]) 40 0 500 [logY] plot PT(j[2]) 40 0 500 [logY] plot ETA(j[2]) 40 -10 10 [logY] plot MT_MET(j[2]) 40 0 500 [logY]
plot PT(e[1]) 40 0 500 [logY] plot PT(e[2]) 40 0 500 [logY] plot ETA(e[2]) 40 -10 10 [logY] plot MT_MET(e[2]) 40 0 500 [logY] plot PT(mu[1]) 40 0 500 [logY] plot ETA(mu[1]) 40 -10 10 [logY] plot MT_MET(mu[1]) 40 0 500 [logY] plot PT(mu[2]) 40 0 500 [logY] plot ETA(mu[2]) 40 -10 10 [logY] plot MT_MET(mu[2]) 40 0 500 [logY]
plot M(e[1] e[2]) 40 0 500 [logY] plot M(e[1] mu[1]) 40 0 500 [logY] plot M(e[1] mu[2]) 40 0 500 [logY] plot M(e[2] mu[1]) 40 0 500 [logY] plot M(e[2] mu[2]) 40 0 500 [logY] plot M(j[1] e[1]) 40 0 500 [logY] plot M(j[1] e[2]) 40 0 500 [logY] plot M(j[1] j[2]) 40 0 500 [logY] plot M(j[1] mu[1]) 40 0 500 [logY] plot M(j[1] mu[2]) 40 0 500 [logY] plot M(j[2] e[1]) 40 0 500 [logY] plot M(j[2] e[2]) 40 0 500 [logY] plot M(j[2] mu[1]) 40 0 500 [logY] plot M(j[2] mu[2]) 40 0 500 [logY] plot M(mu[1] mu[2]) 40 0 500 [logY]
plot DELTAR(e[1],e[2]) 40 0 10 [logY] plot DELTAR(e[1],mu[1]) 40 0 10 [logY] plot DELTAR(e[1],mu[2]) 40 0 10 [logY] plot DELTAR(e[2],mu[1]) 40 0 10 [logY] plot DELTAR(e[2],mu[2]) 40 0 10 [logY] plot DELTAR(j[1],e[1]) 40 0 10 [logY] plot DELTAR(j[1],e[2]) 40 0 10 [logY] plot DELTAR(j[1],j[2]) 40 0 10 [logY]
then from MA I did
import /mainfs/scratch/swa1a19/MG5_aMC_v3_3_1/bin/dyjj/Events/run_01/events_PYTHIA8_0.hepmc.gz define e = e+ e- define mu = mu+ mu- select (j) PT > 20 select (mu) PT > 10 select (e) PT > 15 select (j) ABSETA < 2.4 select (e) ABSETA < 2.5 select (mu) ABSETA < 2.4 select (j) DELTAR(j) = 0.4 select (l) DELTAR(l) = 0.3 select (mu) DELTAR(l) = 0.3 define l+ = mu+ e+ define l- = mu- e- define l= l+ l- select (j) PT > 20 select (mu) PT > 10 select (l) DELTAR(l) = 0.3 plot M(j[1] j[2]) 100 0 1000 submit
then in the file bin/ANALYSIS_0/Output/Histos/MadAnalysis5job_0/selection_0.py
all values of Y axis are zeros
import numpy
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
# Library version
matplotlib_version = matplotlib.__version__
numpy_version = numpy.__version__
# Histo binning
xBinning = numpy.linspace(0.0,1000.0,101,endpoint=True)
# Creating data sequence: middle of each bin
xData = numpy.array([5.0,15.0,25.0,35.0,45.0,55.0,65.0,75.0,85.0,95.0,105.0,115.0,125.0,135.0,145.0,155.0,165.0,175.0,185.0,195.0,205.0,215.0,225.0,235.0,245.0,255.0,265.0,275.0,285.0,295.0,305.0,315)
# Creating weights for histo: y1_M_0
y1_M_0_weights = numpy.array([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0)
# Creating a new Canvas
fig = plt.figure(figsize=(8.75,6.25),dpi=80)
frame = gridspec.GridSpec(1,1)
pad = fig.add_subplot(frame[0])
# Creating a new Stack
pad.hist(x=xData, bins=xBinning, weights=y1_M_0_weights,\
label="$defaultset$", rwidth=1.0,\
color="#5954d8", edgecolor="#5954d8", linewidth=1, linestyle="solid",\
bottom=None, cumulative=False, density=False, align="mid", orientation="vertical")
# Axis
plt.rc('text',usetex=False)
plt.xlabel(r"$M$ $[ j_{1} j_{2} ]$ $(GeV/c^{2})$ ",\
fontsize=16,color="black")
plt.ylabel(r"$\mathrm{Events}$ $(\mathcal{L}_{\mathrm{int}} = 10\ \mathrm{fb}^{-1})$ ",\
fontsize=16,color="black")
# Boundary of y-axis
ymax=(y1_M_0_weights).max()*1.1
ymin=0 # linear scale
#ymin=min([x for x in (y1_M_0_weights) if x])/100. # log scale
plt.gca().set_ylim(ymin,ymax)
# Log/Linear scale for X-axis
plt.gca().set_xscale("linear")
#plt.gca().set_xscale("log",nonpositive="clip")
# Log/Linear scale for Y-axis
plt.gca().set_yscale("linear")
#plt.gca().set_yscale("log",nonpositive="clip")
# Saving the image
plt.savefig('../../HTML/MadAnalysis5job_0/selection_0.png')
plt.savefig('../../PDF/MadAnalysis5job_0/selection_0.png')
plt.savefig('../../DVI/MadAnalysis5job_0/selection_0.eps')
Hi Sarah,
Please, share an event file with O(10) events, and the MA5 script you use to analyse it as a file. Otherwise, this will be too much of a burden for me...
Cheers,
Benjamin
Question
Hello I hope you are doing well.
I use MA with MG. after generating a process and run MA, in the file bin/ANALYSIS_0/Output/Histos/MadAnalysis5job_0/selection_0.py, there is the code written in python language but all values in y1_M_0_weights are zeros. although the cross section is 3015 pb.
Can you help with this issue, please?