how whizard work

Asked by Andrea Paolo Puppin

Hi, sorry to bother you.
I have a few questions for you:
1)i'm writhing my thesis and i wanna know if there's a manual or an article where you explain(not in detail) how whizard work?because the manual is really big and a lot of things i don't understand
2)when in my input file i set nevents=1000 for example what happens exactly?i wanna study triplet pair production(so electron against photon to generate 2 electrons and one positrons) and i think(please tell me if it's correct) that whizard generates more than 1000 events(which have some enrgy/theta and son on...) until it generates my nevents input(and nevents shuould be equal to =nevents generated by whizard*cross section at the energy/angle i put into intput), is it correct?
and if what i said it's true, is it possible to have the input files generated by whizard so i can study all phase space?
thanks in advance,
Kind regards

Question information

Language:
English Edit question
Status:
Solved
For:
WHIZARD Edit question
Assignee:
Krzysztof Mekala Edit question
Solved by:
Krzysztof Mekala
Solved:
Last query:
Last reply:
Revision history for this message
Andrea Paolo Puppin (2andre3) said :
#1

sorry i forgot answer number 3) this is my code
process eeprovamultifasci = A, e1 => e1,e1,E1

beams = A, e1 => gaussian

beams_momentum = 5 keV, 5 GeV

gaussian_spread1= 0%

gaussian_spread2= 10%

plot E_Theta_Px_Py_E1

plot E_Theta_Px_Py_e1

plot E_Theta_Px_Py_e2

sample_format = lhef

  integrate (eeprovamultifasci)

  scan real y=(0=>20/+1){

     real x= y*0.0001-0.001

     beams_theta = 0,x

     real z=(x*x)/(0.0003)^2

     n_events=10000*exp(-z)

    #?rebuild_events = true

 $sample = sprintf "eeff_%1.3f_%1.3f" (real (x), real (y))

analysis= record E_Theta_Px_Py_E1 (eval E["E1"], eval Theta["E1"], eval Px["E1"],eval Py["E1"]) and

          record E_Theta_Px_Py_e1 (eval E[extract index 1 [e1]], eval Theta[extract index 1 [e1]], eval Px[extract index 1 [e1]],eval Py[extract index 1 [e1]])

          and

          record E_Theta_Px_Py_e2 (eval E[extract index 2 [e1]], eval Theta[extract index 2 [e1]], eval Px[extract index 2 [e1]],eval Py[extract index 2 [e1]])

  simulate (eeprovamultifasci)

}

compile_analysis
what i wanna do is study the TPP(triplet pair production) process.
i know whizard hasn't been written to simulate beam but it's what i wanna try to do.
i wanna simulate electrons (which should be a beam) with some divergence and a photon beam with no divergence.
i wanna my electron beam gaussian in energy(and i said in input file setting the energy spread i think) and angle and for this reason i made a scan which changes the angle of incidence of my electrons from -0.001 degree to 0.001 degree(so a divergence of 1 mrad).
Can you tell me if the code is correct and if the reasoning is sound?of if you have some advice on how to do better(obviously i'm considering beam with no effect of space charge and a lot of others things i'm neglecting)
thanks again

Revision history for this message
Juergen Reuter (j.r.reuter) said :
#4

Hi Andrea,
regarding the way, how WHIZARD works: I think the most concise way of the MC phase space integration and event generation of WHIZARD is explained here:
https://inspirehep.net/literature/1704950
There are also several tutorials, but they do not contain full text explanations, but nevertheless they might be helpful. The most extensive one is probably this one:
https://indico.fnal.gov/event/45413/
And, of course, there are also explanations on how WHIZARD work in several Phd theses:
Bijan Chokoufe Nejad, 2017: https://inspirehep.net/files/be26c708fe3edf2266c6b72a6c484375
Christian Weiss, 2017: https://inspirehep.net/files/2811203d717bb89ee217f3cb6b5f0ac6
Vincent Rothe, 2021: https://inspirehep.net/files/0216c70d28035ecb4218360868cf69ab
Pascal Stienemeier, 2022: https://inspirehep.net/files/8beaa34b01105bfcc91c13ea64bb5048
Pia Bredt, 2022: https://arxiv.org/pdf/2212.04393.pdf

On your second question: if you demand 1k unweighted events, WHIZARD will output 1k unweighted events. In Sec. 11.3 of the manual you find the different normalization conventions, so for unweighted events the sum of the weights is the event number N as default, but there are other options such that the of the event weights will give 1, or the cross section, or the number of events times the cross section.
The cross section itself is in the fiducial phase space volume given by the generator-level cuts, specified in the cuts statement. If you specify selection cuts in a selection statement, the cross section you get from summing up your generated events will be smaller.
The calls needed for the integration of the cross section are not considered in the event file/event number.
Cheers,
    JRR

Revision history for this message
Andrea Paolo Puppin (2andre3) said :
#5

Hi,
thank youi very much for your help.
Can i also ask you another question(if you want i can write on the lanchpad), is it possible to have the input file used for the simulation? i mean i wanna the file with all incoming electron and photon, so i can study also them.
Is it possible?
Kind regards

Inviato da Posta<https://go.microsoft.com/fwlink/?LinkId=550986> per Windows

Da: Juergen Reuter<mailto:<email address hidden>>
Inviato: martedì 16 maggio 2023 15:30
A: <email address hidden><mailto:<email address hidden>>
Oggetto: Re: [Question #706635]: how whizard work

Your question #706635 on WHIZARD changed:
https://answers.launchpad.net/whizard/+question/706635

    Status: Open => Answered

Juergen Reuter proposed the following answer:
Hi Andrea,
regarding the way, how WHIZARD works: I think the most concise way of the MC phase space integration and event generation of WHIZARD is explained here:
https://inspirehep.net/literature/1704950
There are also several tutorials, but they do not contain full text explanations, but nevertheless they might be helpful. The most extensive one is probably this one:
https://indico.fnal.gov/event/45413/
And, of course, there are also explanations on how WHIZARD work in several Phd theses:
Bijan Chokoufe Nejad, 2017: https://inspirehep.net/files/be26c708fe3edf2266c6b72a6c484375
Christian Weiss, 2017: https://inspirehep.net/files/2811203d717bb89ee217f3cb6b5f0ac6
Vincent Rothe, 2021: https://inspirehep.net/files/0216c70d28035ecb4218360868cf69ab
Pascal Stienemeier, 2022: https://inspirehep.net/files/8beaa34b01105bfcc91c13ea64bb5048
Pia Bredt, 2022: https://arxiv.org/pdf/2212.04393.pdf

On your second question: if you demand 1k unweighted events, WHIZARD will output 1k unweighted events. In Sec. 11.3 of the manual you find the different normalization conventions, so for unweighted events the sum of the weights is the event number N as default, but there are other options such that the of the event weights will give 1, or the cross section, or the number of events times the cross section.
The cross section itself is in the fiducial phase space volume given by the generator-level cuts, specified in the cuts statement. If you specify selection cuts in a selection statement, the cross section you get from summing up your generated events will be smaller.
The calls needed for the integration of the cross section are not considered in the event file/event number.
Cheers,
    JRR

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/whizard/+question/706635/+confirm?answer_id=3

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/whizard/+question/706635

You received this question notification because you asked the question.

Revision history for this message
Juergen Reuter (j.r.reuter) said :
#6

You mean that the SINDARIN file to run the process and generate events is part of the event file in terms of comment lines?
We know this feature request, and we will discuss this again at our next meeting. Of course, this depends on the event format, as not all event formats naturally allow for comment lines, but I suppose you mean LHE format specifically.

Revision history for this message
Andrea Paolo Puppin (2andre3) said :
#7

What i mean is, if i’m giving an electron and photon to generate two electrons and one postritron, can i have a file( i don’t know something like.dat) where i can see for every of my photon for exemple theyr energy, divergence,….. and the same for incoming electron which whizard use to generate events?

Inviato da Posta<https://go.microsoft.com/fwlink/?LinkId=550986> per Windows

Da: Juergen Reuter<mailto:<email address hidden>>
Inviato: martedì 16 maggio 2023 15:55
A: <email address hidden><mailto:<email address hidden>>
Oggetto: Re: [Question #706635]: how whizard work

Your question #706635 on WHIZARD changed:
https://answers.launchpad.net/whizard/+question/706635

    Status: Open => Answered

Juergen Reuter proposed the following answer:
You mean that the SINDARIN file to run the process and generate events is part of the event file in terms of comment lines?
We know this feature request, and we will discuss this again at our next meeting. Of course, this depends on the event format, as not all event formats naturally allow for comment lines, but I suppose you mean LHE format specifically.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/whizard/+question/706635/+confirm?answer_id=5

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/whizard/+question/706635

You received this question notification because you asked the question.

Revision history for this message
Juergen Reuter (j.r.reuter) said :
#8

All the information is in the kinematics of the incoming and outgoing particles which are in the event file. In case you have structured beams (e.g. ISR etc.) you might need to specify
?keep_beams = true
or
?keep_remnants = true
to keep all particles in the event files. In case you want to do an analysis you can use the capabilities for defining observables.

Revision history for this message
Andrea Paolo Puppin (2andre3) said :
#9
Revision history for this message
Juergen Reuter (j.r.reuter) said :
#10

There don't seem to be an additional question here (?).

Revision history for this message
Andrea Paolo Puppin (2andre3) said :
#11

can you open these files?

It’s just an easy example.

You're telling me the file. Lhe (in this example) contains all information about incoming particle?

And if it’s this the file, can you explain me how to read it?because i can’t understand what all these numbers represent.

Kind regards

Inviato da Posta<https://go.microsoft.com/fwlink/?LinkId=550986> per Windows

Da: Juergen Reuter<mailto:<email address hidden>>
Inviato: martedì 16 maggio 2023 23:50
A: <email address hidden><mailto:<email address hidden>>
Oggetto: Re: [Question #706635]: how whizard work

Your question #706635 on WHIZARD changed:
https://answers.launchpad.net/whizard/+question/706635

    Status: Open => Answered

Juergen Reuter proposed the following answer:
There don't seem to be an additional question here (?).

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/whizard/+question/706635/+confirm?answer_id=9

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/whizard/+question/706635

You received this question notification because you asked the question.

Revision history for this message
Juergen Reuter (j.r.reuter) said :
#12

The details on the entries for LHE files can be found here:
https://arxiv.org/abs/hep-ph/0609017
and e.g. here:
https://pythia.org/latest-manual/LHEF.html

Revision history for this message
Andrea Paolo Puppin (2andre3) said :
#13

Okay thank you very much i undersood, i have one final question.
I’m doing a simulation and i’m doing a scan on a variable like in the example i posted where i do a scan on the variable y.
The program generates a file .lhe for every different “simulation”(so for y=0, for y=1…. Until y=20). Is it possible to have a single file.lhe where for all the simulation?
Kind regards,

Inviato da Posta<https://go.microsoft.com/fwlink/?LinkId=550986> per Windows

Da: Juergen Reuter<mailto:<email address hidden>>
Inviato: mercoledì 17 maggio 2023 00:40
A: <email address hidden><mailto:<email address hidden>>
Oggetto: Re: [Question #706635]: how whizard work

Your question #706635 on WHIZARD changed:
https://answers.launchpad.net/whizard/+question/706635

    Status: Open => Answered

Juergen Reuter proposed the following answer:
The details on the entries for LHE files can be found here:
https://arxiv.org/abs/hep-ph/0609017
and e.g. here:
https://pythia.org/latest-manual/LHEF.html

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/whizard/+question/706635/+confirm?answer_id=11

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/whizard/+question/706635

You received this question notification because you asked the question.

Revision history for this message
Best Krzysztof Mekala (krzysztofmekala) said :
#14

Hi Andrea,
please note that you specify file names in each iteration in the line:
$sample = sprintf "eeff_%1.3f_%1.3f" (real (x), real (y))

and that's the reason why you get separate files for each step. That's the best way to do it though, as Whizard would overwrite the existing event file in each iteration. If you want to combine a set of LHEF files into one file, it's easily doable using any bash command/programming script/text editor - LHEF is just a text format and you can see on your own what the file content is and decide on your own which way would be the most suitable for your analysis framework (e.g. if you need event headers, how you want to sort your events, etc.).

Regards,
Krzysztof

Revision history for this message
Andrea Paolo Puppin (2andre3) said :
#15

Thanks Krzysztof Mekala, that solved my question.