Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zero values for y axis #272

Open
sarahwarad opened this issue Nov 5, 2024 · 5 comments
Open

zero values for y axis #272

sarahwarad opened this issue Nov 5, 2024 · 5 comments
Labels
❓question Further information is requested

Comments

@sarahwarad
Copy link

Question

hello

i generated a process in madgraph then i used madanalysis to plot the mass distribution. I got a histogram with zero values of y axis.
Here you go what i did
in MadGraph
generate p p > z [QCD]
add process p p > z j [QCD]
add process p p > z j j [QCD]
decaying z to leptons ( electrons and muons) with MadSpin
FxFx Cross-Section:

3943.000000 pb.
Number of events after merging: 4515

INFO: The file /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/bin/dyjjj/Events/run_01_decayed_1/events_PYTHIA8_0.hepmc.gz has been generated.
It contains showered and hadronized events in the HEPMC format obtained showering the parton-level event file /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/bin/dyjjj/Events/run_01_decayed_1/events.lhe.gz with PYTHIA8
INFO: Run complete
INFO: Running MadAnalysis5 [arXiv:1206.1599]
INFO: Hadron input files considered:
INFO: --> /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/bin/dyjjj/Events/run_01_decayed_1/events_PYTHIA8_0.hepmc.gz
INFO: MadAnalysis5 now running the reconstruction 'BasicReco'...
INFO: Follow Madanalysis5 run with the following command in a separate terminal:
INFO: tail -f /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/bin/dyjjj/Events/run_01_decayed_1/tag_1_MA5__reco_BasicReco.log
INFO: MadAnalysis5 successfully completed the reconstruction 'BasicReco'. Links to the reconstructed event files are:
INFO: --> /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/bin/dyjjj/Events/run_01_decayed_1/events_PYTHIA8_0_BasicReco.lhe.gz
INFO: MadAnalysis5 now running the 'analysis2_BasicReco' analysis...
INFO: Follow Madanalysis5 run with the following command in a separate terminal:
INFO: tail -f /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/bin/dyjjj/Events/run_01_decayed_1/tag_1_MA5_analysis2_BasicReco.log
ERROR: MadAnalysis5 failed to create PDF output
INFO: MadAnalysis5 successfully completed the analysis 'analysis2_BasicReco'. Reported results are placed in:
INFO: --> /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/bin/dyjjj/Events/run_01_decayed_1/tag_1_MA5_hadron_analysis_analysis2_BasicReco.pdf
INFO: Finished MA5 analyses.

then with MadAnalysis5
from ./ma5 -P

ma5>import /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/bin/dyjjj/Events/run_01_decayed_1/events_PYTHIA8_0_BasicReco.lhe.gz as ss
MA5: -> Storing the file 'events_PYTHIA8_0_BasicReco.lhe.gz' in the dataset 'ss'.
ma5>set ss.xsection = 3943
ma5>set main.lumi = 35.9
ma5>define e = e+ e-
ma5>define mu = mu+ mu-
ma5>select (j) PT > 20
ma5>select (e) PT > 15
ma5>select (mu) PT > 10
ma5>select (j) ABSETA < 2.4
ma5>select (e) ABSETA < 2.5
ma5>select (mu) ABSETA < 2.4
ma5>select (mu) ABSETA < 2.4
ma5>select (e) ABSETA < 2.5
ma5>select (j) ABSETA < 2.4
ma5>select M(e) > 70
ma5>select M(mu) > 70
ma5>plot M(j[1] j[2]) 100 0 1000
ma5>submit

MA5: Creating folder 'ANALYSIS_0'...
MA5: Copying 'SampleAnalyzer' source files...
MA5: Inserting your selection into 'SampleAnalyzer'...
MA5: Writing the list of datasets...
MA5: Writing the command line history...
MA5: Creating Makefiles...
MA5: Compiling 'SampleAnalyzer'...
MA5: Linking 'SampleAnalyzer'...
MA5: Running 'SampleAnalyzer' over dataset 'ss'...
MA5: *******************************************************
* SampleAnalyzer for MadAnalysis 5 - Welcome.
* Initializing all components
- version: 1.10.9 (2023/02/07)
- general: everything is default.
- extracting the list of event samples...
- analyzer 'MadAnalysis5job'
* Running over files ...
* 1/1 /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/bin/dyjjj/Events/run_01_decayed_1/events_PYTHIA8_0_BasicReco.lhe.gz
=> file size: 1.20 Mo
=> sample format: simplified LHE file produced by MadAnalysi5.
=> progress: [===================================]
=> total number of events: 4515 ( analyzed: 4515 ; skipped: 0 )
* Finalizing all components ...
* Total number of processed events: 4515.
* Goodbye.
MA5: *******************************************************
MA5: Checking SampleAnalyzer output...
MA5: Extracting data from the output files...
MA5: Preparing data for the reports ...
MA5: Generating all plots ...
MA5: Generating the HMTL report ...
MA5: -> To open this HTML report, please type 'open'.
MA5: Generating the PDF report ...
MA5-ERROR: PDF file cannot be produced
MA5-ERROR: Please have a look to the log file /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/HEPTools/madanalysis5/madanalysis5/bin/ANALYSIS_0/Output/PDF/MadAnalysis5job_0/latex2.log
MA5: -> To open this PDF report, please type 'open ANALYSIS_0/Output/PDF/MadAnalysis5job_0'.
MA5: Generating the DVI report ...
MA5-ERROR: DVI file cannot be produced
MA5-ERROR: Please have a look to the log file /mainfs/scratch/swa1a19/MG5_aMC_v2_9_21/HEPTools/madanalysis5/madanalysis5/bin/ANALYSIS_0/Output/DVI/MadAnalysis5job_0/latex.log
MA5: Well done! Elapsed time = 58.63 seconds

then i opened ANALYSIS_0/Output/Histos/MadAnalysis5job_0/selection_0.py. No values for y axis, all are zeros.

this is the contact of selection_0.py file
(

# Library import
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,$
# 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.$
# 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="$ss$", rwidth=1.0,\
         color="#5954d8", edgecolor="#5954d8", linewidth=1, linestyle="solid",\
         bottom=None, cumulative=False, density=False, align="mid", orientation="vertical")

)

@sarahwarad sarahwarad added the ❓question Further information is requested label Nov 5, 2024
@BFuks
Copy link
Member

BFuks commented Nov 5, 2024 via email

@sarahwarad
Copy link
Author

Thank you so much for your reply.
i am trying to reproduce figure 3 in this paper https://arxiv.org/abs/1903.00941
They generated Drell Yan with jets in Madgraph then they plotted the mass distribution for 70 GeV < m_{ll}< 110 GeV.
how can i set these limits in Madanalysis in normal mode?

Best regards

Sarah

@BFuks
Copy link
Member

BFuks commented Nov 5, 2024 via email

@sarahwarad
Copy link
Author

Yes. But I already defined the lepton pair
define e = e+ e-
define mu = mu+ mu-
Then i selected the mass limits
select M(e) > 70
select M(mu) > 70

e and mu referred to pair of leptons.

@BFuks
Copy link
Member

BFuks commented Nov 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants