Opened 11 years ago
Closed 11 years ago
#559 closed defect (fixed)
Broken beam polarization
Reported by: | Juergen Reuter | Owned by: | kilian |
---|---|---|---|
Priority: | P1 | Milestone: | v2.2.0 |
Component: | core | Version: | 2.1.1 |
Severity: | critical | Keywords: | |
Cc: |
Description (last modified by )
Revive beam polarization
Change History (17)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Summary: | Missing beam properties → Missing beam polarization |
Beam momenta, beam angle (theta, phi), crossing angle are in a separate ticket (#579). This ticket is dedicated only to beam polarization. WK, please assign!
comment:3 Changed 11 years ago by
Status: | new → assigned |
---|
Already under construction.
The syntax for beam polarization is new and, hopefully, useful. We should discuss it before the actual release.
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I modified the example eeww_polarized.sin from the old to the new syntax:
beam_polarization = diagonal_density (hel_ep:1), diagonal_density (hel_em:1)
to
beams_pol_density = @(hel_ep), @(hel_em)
Then, however I get the error message:
n_events = 100000 | Particle W+ declared as polarized | Particle W- declared as polarized [user variable] hel_ep = -1 + IDENTIFIER <variable> = hel_em ****************************************************************************** *** ERROR: This variable is undefined at this point ****************************************************************************** ****************************************************************************** ****************************************************************************** *** WHIZARD BUG: histogram: name expression not implemented (yet) ****************************************************************************** ****************************************************************************** | There were 1 error(s) and no warnings. WHIZARD run aborted.
(the second one clearly being a different problem. But somehow, beam polarization not yet works as intended. :(((
comment:6 Changed 11 years ago by
Leaving out the histogram stuff results in:
[user variable] hel_ep = -1 + IDENTIFIER <variable> = hel_em ****************************************************************************** *** ERROR: This variable is undefined at this point ****************************************************************************** [user variable] hel_em = -1 ****************************************************************************** ****************************************************************************** *** FATAL ERROR: Evaluating density matrix: undefined index ****************************************************************************** ****************************************************************************** | There were 1 error(s) and no warnings. WHIZARD run aborted.
which shows the problem.
comment:7 Changed 11 years ago by
Priority: | P3 → P0 |
---|---|
Severity: | normal → critical |
Summary: | Missing beam polarization → Broken beam polarization |
Almost none of the given examples is working!!! Parameters are simply not respected. E.g. the density matrix with the complex values has completely wrong entries. Variables are just not carried through.
comment:8 Changed 11 years ago by
I finally understood the code. Beam_polarization == unpolarized. The code is set up in a way that all entries are always 1. Great. Flapp. Flapp.
comment:9 Changed 11 years ago by
Priority: | P0 → P1 |
---|
comment:10 Changed 11 years ago by
Nope, also thought first that this is the issue. But apparently. the magic with the n_index vs. n_expr is completely screwed up. I'll add the correct values for the beam pols.
comment:11 Changed 11 years ago by
@JR: I did get your message that there's another bug. I can go through the beam-pol example on Monday.
comment:12 Changed 11 years ago by
r5256: Correct values for beam polarization matrices.
??? I don't get what you mean by those numbers. But I admit that I didn't write the documentation yet. Let's get this straight on Monday.
comment:13 Changed 11 years ago by
Well, my assumption is that the complex number being displayed after the helicity entry hel(i), hel(j) in the polarization entry is the entry of the beam polarization density matrix. For the last example in the beam_setup_1.sin file these should be 1/2, (1-i)/sqrt(2) and 1/2, but not 1, 1, 1. Correct? See my email for my confusion.
comment:14 Changed 11 years ago by
The complex values are broken, yes. I was puzzled by your new ref-file entries with pure imaginary values on the diagonal. I guess these are mistakes.
As said, I'll reconsider and fix this asap.
comment:15 Changed 11 years ago by
Ok, maybe the one with the imaginary units is wrong, but I still haven't completely understood the notation. Still stymied also with the setup for the energy scan in #500.
comment:16 Changed 11 years ago by
Ok, hopefully fixed in r5259.
The root cause was a mismatch in the syntax rule vs. parser, which caused the value entry to be dropped. Unfortunately, the resulting matrices were formally valid, so the sanity check didn't fail. And the further bugs in the handler of expressions vs. values couldn't even trigger ...
The notation is not changed. The meaning is i:j:x => rho(i,j) = x for each entry, where i:j => i:j:1 and i => i:i:1 is assumed. Also note that the normalization of the whole matrix is done by the program, so the user doesn't have to care. The relative normalization of off-diag vs. on-diag counts, however.
comment:17 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Last build was ok, next attempt at closing this ticket.
... and beam polarization. We discussed this, and a tentative (simplified) syntax is
for a diagonal density matrix, and
for a generic density matrix, etc. The second beam would be appended, and additional parameters like
beam_polarization_fraction
,beam_polarization_theta
, etc. would add options.This replaces the previous setup which has a lot of different syntax rules, and is (to me) confusing.