# Implementation of the Complex Part of a PDF

**URL:** <https://root-forum.cern.ch/t/implementation-of-the-complex-part-of-a-pdf/64402>\
**Category:** Roofit and RooStats\
**Created:** [November 13, 2025, 11:00am UTC](https://root-forum.cern.ch/t/implementation-of-the-complex-part-of-a-pdf/64402 "2025-11-13T11:00:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustaphaa](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mustaphaa/32/36678_2.png) [@Mustaphaa](https://root-forum.cern.ch/u/Mustaphaa)\
**Post date:** [November 13, 2025, 11:00am UTC](https://root-forum.cern.ch/t/implementation-of-the-complex-part-of-a-pdf/64402/1 "2025-11-13T11:00:38Z")

</div>

Dear Experts,

```auto
I am trying to fit a PDF that has a real part S^0 and a complex part, as shown in the following figure:  

```

![PDF_TOTAL](https://root-forum.cern.ch/uploads/default/optimized/3X/7/1/7145bb1f599eae2b73fd2dfb657e2ff5a456d3dd_2_690x48.jpeg)

I have implemented the real part (S0) using RooAbsPdf (RooClassFactory::makePdfInstance():

```auto
((0.3894e9*1.5*B_f*MP*beta_val*alpha*alpha)/s)* ((0.5 * (3 - pow(beta_val, 2)) * (DV) - 0.5 * (1 - (3 * pow(beta_val, 2))) * (DA) - "
"((1 - pow(beta_val, 2)) * (DVA)) * F + 2 * ((DVA) * G) + "
 "0.5 * ((DV) + (DA) + 2 * (DVA))) * (2 * H1 - H2) + "
"(2 * (2 * (EVA) + (1 - pow(beta_val, 2)) * (EA)) * F + "
 "2 * ((EV) + (EA)) * G - 2 * (2 * (EVA) + (EV) + (EA)) * H1) * costheta + "
  "(0.5 * ((3 - pow(beta_val, 2)) * ((DV) + (DA)) + 6 * ((1 - pow(beta_val, 2)) * (DVA))) * F + "
"2 * (DVA) * G + (-3. / 2.) * (DV + DA+ 2 * DVA) * (2 * H1 - H2)) * pow(costheta, 2) )"
 RooArgList(x, costheta, EVA, EV, EA, DV, DA, DVA, F, G, H1, H2, beta_val,s,B_f,MP,alpha));

```

Now I want to add this part (imaginary part) :  
2i SinthetaW _gamma1_ F\_Ay - 2_i_ SinthetaW _gamma2_ F\_AZ - 2i SinthetaW _gamma3_ F\_BZ

But I don’t know how to implement the complex part! Could you please suggest a way for me to implement it?

where gamma\_i are my parameters to fit.

Best regards,

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [November 13, 2025, 11:15am UTC](https://root-forum.cern.ch/t/implementation-of-the-complex-part-of-a-pdf/64402/2 "2025-11-13T11:15:59Z")

</div>

Let’s ask @jonas for help.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [November 27, 2025, 11:16am UTC](https://root-forum.cern.ch/t/implementation-of-the-complex-part-of-a-pdf/64402/3 "2025-11-27T11:16:57Z")

</div>

Closed on November 27, 2025, 11:16am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
