@@ -482,6 +482,49 @@ def test_polarized_convolution(
482
482
expected_results ,
483
483
)
484
484
485
+ def test_three_convolutions_with_ff (
486
+ self ,
487
+ pdf ,
488
+ download_objects ,
489
+ gridname : str = "SIHP-PP-POLARIZED-STAR-NLO.pineappl.lz4" ,
490
+ ):
491
+ expected_results = [
492
+ - 3.90292729e09 ,
493
+ + 3.43682719e11 ,
494
+ - 3.58390524e10 ,
495
+ - 4.66855347e10 ,
496
+ - 2.15171695e09 ,
497
+ + 1.57010877e10 ,
498
+ ] # Numbers computed using `v1.0.0a2`
499
+
500
+ grid = download_objects (f"{ gridname } " )
501
+ g = Grid .read (grid )
502
+
503
+ # Check the Grid convolutions - can be used to construct `grid.convolve`
504
+ convolutions = g .convolutions
505
+ assert len (convolutions ) == 3
506
+ # Check the polarization
507
+ assert convolutions [0 ].convolution_types .polarized
508
+ assert convolutions [1 ].convolution_types .polarized
509
+ assert not convolutions [2 ].convolution_types .polarized
510
+ # Check if it is timelike
511
+ assert not convolutions [0 ].convolution_types .time_like
512
+ assert not convolutions [1 ].convolution_types .time_like
513
+ assert convolutions [2 ].convolution_types .time_like
514
+ # Check that the initial states are protons
515
+ assert convolutions [0 ].pid == 2212
516
+ assert convolutions [1 ].pid == 2212
517
+ assert convolutions [2 ].pid == 211
518
+
519
+ np .testing .assert_allclose (
520
+ g .convolve (
521
+ pdg_convs = g .convolutions ,
522
+ xfxs = [pdf .polarized_pdf , pdf .polarized_pdf , pdf .ff_set ],
523
+ alphas = pdf .alphasQ ,
524
+ ),
525
+ expected_results ,
526
+ )
527
+
485
528
def test_many_convolutions (self , fake_grids , pdf , nb_convolutions : int = 3 ):
486
529
"""Test for fun many convolutions."""
487
530
expected_results = [
0 commit comments