whizard is hosted by Hepforge, IPPP Durham

Changes between Initial Version and Version 1 of ExampleEEWW


Ignore:
Timestamp:
May 20, 2010, 5:46:35 PM (15 years ago)
Author:
Juergen Reuter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExampleEEWW

    v1 v1  
     1Define and compile the process
     2
     3{{{
     4model = SM
     5process eeww = "e+", "e-" => "W+", "W-"
     6compile
     7}}}
     8
     9Define the beams and event count (for simulation)
     10
     11{{{
     12sqrts = 200 GeV
     13beams = "e+", "e-"
     14n_events = 100000
     15}}}
     16
     17Tell WHIZARD to retain the W polarization in the generated events
     18
     19{{{
     20polarized "W+", "W-"
     21}}}
     22
     23Loop over e+ / e- helicity (explanations as comments inside the code)
     24
     25{{{
     26scan int hel_ep = (-1, 1) {
     27  scan int hel_em = (-1, 1) {
     28    # Apply the helicity setup
     29    beam_polarization = diagonal_density (hel_ep:1), diagonal_density (hel_em:1)
     30
     31    # (Re)calculate the integral for each initial state polarization
     32    integrate (eeww)
     33
     34    # Define histograms for all different final state helicies. We
     35    # have to automatically generate tags from the initial state
     36    # helicites
     37    string $hist_mm = sprintf "cta%i_%i_-1_-1" (hel_ep, hel_em)
     38    histogram $hist_mm (-1, 1, 0.1) {
     39      $title = sprintf "polarization: %i %i -1 -1" (hel_ep, hel_em)
     40    }
     41    string $hist_ml = sprintf "cta%i_%i_-1_0" (hel_ep, hel_em)
     42    histogram $hist_ml (-1, 1, 0.1) {
     43      $title = sprintf "polarization: %i %i -1  0" (hel_ep, hel_em)
     44    }
     45    string $hist_mp = sprintf "cta%i_%i_-1_1" (hel_ep, hel_em)
     46    histogram $hist_mp (-1, 1, 0.1) {
     47      $title = sprintf "polarization: %i %i -1  1" (hel_ep, hel_em)
     48    }
     49    string $hist_lm = sprintf "cta%i_%i_0_-1" (hel_ep, hel_em)
     50    histogram $hist_lm (-1, 1, 0.1) {
     51      $title = sprintf "polarization: %i %i  0 -1" (hel_ep, hel_em)
     52    }
     53    string $hist_ll = sprintf "cta%i_%i_0_0" (hel_ep, hel_em)
     54    histogram $hist_ll (-1, 1, 0.1) {
     55      $title = sprintf "polarization: %i %i  0  0" (hel_ep, hel_em)
     56    }
     57    string $hist_lp = sprintf "cta%i_%i_0_1" (hel_ep, hel_em)
     58    histogram $hist_lp (-1, 1, 0.1) {
     59      $title = sprintf "polarization: %i %i  0  1" (hel_ep, hel_em)
     60    }
     61    string $hist_pm = sprintf "cta%i_%i_1_-1" (hel_ep, hel_em)
     62    histogram $hist_pm (-1, 1, 0.1) {
     63      $title = sprintf "polarization: %i %i  1 -1" (hel_ep, hel_em)
     64    }
     65    string $hist_pl = sprintf "cta%i_%i_1_0" (hel_ep, hel_em)
     66    histogram $hist_pl (-1, 1, 0.1) {
     67      $title = sprintf "polarization: %i %i  1  0" (hel_ep, hel_em)
     68    }
     69    string $hist_pp = sprintf "cta%i_%i_1_1" (hel_ep, hel_em)
     70    histogram $hist_pp (-1, 1, 0.1) {
     71      $title = sprintf "polarization: %i %i  1  1" (hel_ep, hel_em)
     72    }
     73    # The analysis setup fills the different histograms
     74    analysis =
     75      if (all Hel == -1 ["W+"] and all Hel == -1 ["W-"] ) then
     76        record $hist_mm (eval cos (Theta) ["W+"])
     77      endif; if (all Hel == -1 ["W+"] and all Hel ==  0 ["W-"] ) then
     78        record $hist_ml (eval cos (Theta) ["W+"])
     79      endif; if (all Hel == -1 ["W+"] and all Hel ==  1 ["W-"] ) then
     80        record $hist_mp (eval cos (Theta) ["W+"])
     81      endif; if (all Hel ==  0 ["W+"] and all Hel == -1 ["W-"] ) then
     82        record $hist_lm (eval cos (Theta) ["W+"])
     83      endif; if (all Hel ==  0 ["W+"] and all Hel ==  0 ["W-"] ) then
     84        record $hist_ll (eval cos (Theta) ["W+"])
     85      endif; if (all Hel ==  0 ["W+"] and all Hel ==  1 ["W-"] ) then
     86        record $hist_lp (eval cos (Theta) ["W+"])
     87      endif; if (all Hel ==  1 ["W+"] and all Hel == -1 ["W-"] ) then
     88        record $hist_pm (eval cos (Theta) ["W+"])
     89      endif; if (all Hel ==  1 ["W+"] and all Hel ==  0 ["W-"] ) then
     90        record $hist_pl (eval cos (Theta) ["W+"])
     91      endif; if (all Hel ==  1 ["W+"] and all Hel ==  1 ["W-"] ) then
     92        record $hist_pp (eval cos (Theta) ["W+"])
     93      endif
     94
     95    # Generate events (keep the helicity information). As this takes
     96    # some time, we request status information.
     97    simulate (eeww) {
     98      ?polarized_events = true
     99      checkpoint = 10000
     100    }
     101  }
     102}
     103
     104}}}
     105
     106Write out the generated histograms in eeww_polarized.ps / eeww_polarized.pdf
     107
     108{{{
     109$analysis_filename = "eeww_polarized"
     110write_analysis
     111}}}