# Errors occured (getting same significance values for all diffrent crosssection rootfiles)

**URL:** <https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575>\
**Category:** ROOT\
**Tags:** hist\
**Created:** [June 6, 2024, 5:13pm UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575 "2024-06-06T17:13:39Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_Sayed](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ahmed_sayed/32/31955_2.png) [@Ahmed\_Sayed](https://root-forum.cern.ch/u/Ahmed_Sayed)\
**Post date:** [June 6, 2024, 5:13pm UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/1 "2024-06-06T17:13:39Z")

</div>

Hello Dr @couet ,  
I usually find Errors occured (getting same significance values for all diffrent crosssection rootfiles). This is not occured unless if i have only one value for diffrent  
cross scetion. Kindly,please give me a solution for this problem

thanks  
Ahmed Sayed

Notes: for more details I attached screenshot from this error , used root files, analysis file.C,analysis file.h and Used Stack

 ![Screenshot_20240606_194752](https://root-forum.cern.ch/uploads/default/original/3X/2/1/218bb61623a5ed3fe9ee9594419dbcdd6773ceb1.png)  
[bb.root](https://root-forum.cern.ch/uploads/short-url/dHg9tTA6p0GzHOwE2IdOZuXJ5l9.root) (28.8 KB)  
[dataAnalysis.C](https://root-forum.cern.ch/uploads/short-url/wHb0xLB9fZlAbUPi4lHdvuWnHy5.C) (10.6 KB)  
[dataAnalysis.h](https://root-forum.cern.ch/uploads/short-url/vtUBt1DR4dP3npL1w3zXkEAIkPZ.h) (83.6 KB)  
[h\_bb.root](https://root-forum.cern.ch/uploads/short-url/sDKfhmSxif83aXvNw9L3SFEjXb2.root) (16.5 KB)  
[h90BP1\_bb.root](https://root-forum.cern.ch/uploads/short-url/dvU35Ixg73TLfKcB6rdcQSta7EM.root) (21.0 KB)  
[h90BP2\_bb.root](https://root-forum.cern.ch/uploads/short-url/7KLM7wbARUtMaOGxT5VMK5qfPBn.root) (20.9 KB)  
[h95BP1\_bb.root](https://root-forum.cern.ch/uploads/short-url/zgvxTmbcy9CLqDic2gloS7ttOcV.root) (19.8 KB)  
[h95BP3\_bb.root](https://root-forum.cern.ch/uploads/short-url/628FZw2XlOrBEiDYhn1Vl6D7aql.root) (20.4 KB)  
[h96BP1\_bb.root](https://root-forum.cern.ch/uploads/short-url/aZQF0vC5QUrxBswNuAMHMi4jOkJ.root) (19.6 KB)  
[h96BP3\_bb.root](https://root-forum.cern.ch/uploads/short-url/1SPeWahj6I2cPJidaugP7QcQilY.root) (20.2 KB)  
[h96BP2\_bb.root](https://root-forum.cern.ch/uploads/short-url/qCe1Q6oDhc6wCGz9aieRHkKb2EE.root) (19.7 KB)  
[h96BP6\_bb.root](https://root-forum.cern.ch/uploads/short-url/49T9MbF1Weh4lGEuD8OEVhOGFBq.root) (19.6 KB)  
[Stack\_Hist\_Signals.C](https://root-forum.cern.ch/uploads/short-url/pbTkDSe2ZTRrLTlrGW0Gnx3yCbd.C) (11.3 KB)  
[z\_bb.root](https://root-forum.cern.ch/uploads/short-url/9poxo46YAHoso8HYw0jcsXVpGrW.root) (20.0 KB)

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [June 7, 2024, 4:50am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/2 "2024-06-07T04:50:49Z")

</div>

Hi,

Could you please be more specific about the issue you are encountering?

Best,  
D

---

<div class="post-metadata">

**Author:** ![Ahmed\_Sayed](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ahmed_sayed/32/31955_2.png) [@Ahmed\_Sayed](https://root-forum.cern.ch/u/Ahmed_Sayed)\
**Post date:** [June 7, 2024, 4:50pm UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/3 "2024-06-07T16:50:00Z")

</div>

Of course my Sir.In the beginning i used a BLSSM for eight signals Such that h90B1 ,h90BP2 etc .The rest represent backgrounds that use sm-full model for monte carlo  
.The final state for every decay is bb.The channel is proton-proton at 7 TEV at COM . Signals are

p p \< h1, h1 \< b b that has diffrent parameter  
Cards that have same name of root file for simplicity such that h90BP1,h90BP2, etc.And the BGs  
are  
PP \< h , h \< b b  
PP \< z , z \< b b  
PP \< b b / h z

As mentioned below the screenshot significance values are the same for all signals. For more details please kindly ,open  
The stack\_Signal.C to find followed steps to  
Calculate significance.According to observation of signals over backgrounds i calculate signal significance from this relation

Significance =Signal/sqrt(BG) . It is expected that obtain different significance values but unfortunately i get same value for these eight signals . I dont know why ?

Best  
A.Sayed

---

<div class="post-metadata">

**Author:** ![Ahmed\_Sayed](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ahmed_sayed/32/31955_2.png) [@Ahmed\_Sayed](https://root-forum.cern.ch/u/Ahmed_Sayed)\
**Post date:** [June 9, 2024, 9:22pm UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/4 "2024-06-09T21:22:46Z")

</div>

```
Hi @all experts, 

```

I usually find Errors occured (getting same significance values for all diffrent crosssection rootfiles). This is not occured unless if i have only one value for diffrent  
cross scetion. Kindly,please give me a solution for this problem  
.In the beginning i used a BLSSM for eight signals Such that h90B1 ,h90BP2 etc .The rest represent backgrounds that use sm-full model for monte carlo  
.The final state for every decay is bb.The channel is proton-proton at 7 TEV at COM . Signals are

p p \< h1, h1 \< b b that has diffrent parameter  
Cards that have same name of root file for simplicity such that h90BP1,h90BP2, etc.And the BGs  
are  
PP \< h , h \< b b  
PP \< z , z \< b b  
PP \< b b / h z

As mentioned below the screenshot significance values are the same for all signals. For more details please kindly ,open  
The stack\_Signal.C to find followed steps to  
Calculate significance.According to observation of signals over backgrounds i calculate signal significance from this relation

Significance =Signal/sqrt(BG) . It is expected that obtain different significance values but unfortunately i get same value for these eight signals . I dont know why ?

Best  
A.Sayed

[bb.root](https://root-forum.cern.ch/uploads/short-url/dHg9tTA6p0GzHOwE2IdOZuXJ5l9.root) (28.8 KB)  
[dataAnalysis.C](https://root-forum.cern.ch/uploads/short-url/wHb0xLB9fZlAbUPi4lHdvuWnHy5.C) (10.6 KB)  
[dataAnalysis.h](https://root-forum.cern.ch/uploads/short-url/vtUBt1DR4dP3npL1w3zXkEAIkPZ.h) (83.6 KB)  
[h\_bb.root](https://root-forum.cern.ch/uploads/short-url/sDKfhmSxif83aXvNw9L3SFEjXb2.root) (16.5 KB)  
[h90BP1\_bb.root](https://root-forum.cern.ch/uploads/short-url/dvU35Ixg73TLfKcB6rdcQSta7EM.root) (21.0 KB)  
[h90BP2\_bb.root](https://root-forum.cern.ch/uploads/short-url/7KLM7wbARUtMaOGxT5VMK5qfPBn.root) (20.9 KB)  
[h95BP1\_bb.root](https://root-forum.cern.ch/uploads/short-url/zgvxTmbcy9CLqDic2gloS7ttOcV.root) (19.8 KB)  
[h95BP3\_bb.root](https://root-forum.cern.ch/uploads/short-url/628FZw2XlOrBEiDYhn1Vl6D7aql.root) (20.4 KB)  
[h96BP6\_bb.root](https://root-forum.cern.ch/uploads/short-url/49T9MbF1Weh4lGEuD8OEVhOGFBq.root) (19.6 KB)  
[h96BP1\_bb.root](https://root-forum.cern.ch/uploads/short-url/aZQF0vC5QUrxBswNuAMHMi4jOkJ.root) (19.6 KB)  
[h96BP2\_bb.root](https://root-forum.cern.ch/uploads/short-url/qCe1Q6oDhc6wCGz9aieRHkKb2EE.root) (19.7 KB)  
[Stack\_Hist\_Signals.C](https://root-forum.cern.ch/uploads/short-url/pbTkDSe2ZTRrLTlrGW0Gnx3yCbd.C) (11.3 KB)  
[z\_bb.root](https://root-forum.cern.ch/uploads/short-url/9poxo46YAHoso8HYw0jcsXVpGrW.root) (20.0 KB)

---

<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:** [June 10, 2024, 7:29am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/5 "2024-06-10T07:29:01Z")

</div>

I might be mistaken, but based on your description, it seems that your issue isn’t caused by any specific ROOT tools or classes. Instead, it appears to be related to the algorithm and computational techniques you’re using. If you can identify a specific problem or error directly related to ROOT tools, please send us a small reproducible example highlighting the issue.

---

<div class="post-metadata">

**Author:** ![Ahmed\_Sayed](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ahmed_sayed/32/31955_2.png) [@Ahmed\_Sayed](https://root-forum.cern.ch/u/Ahmed_Sayed)\
**Post date:** [June 10, 2024, 8:07am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/6 "2024-06-10T08:07:09Z")

</div>

Ok, in short . please ,kindly Opeth this file (Signal\_stack.C ) the you find this computational values that made me errors.I will send you a screenshot to understand me

thanks  
A.Sayed

 ![2.png](https://root-forum.cern.ch/uploads/default/original/3X/8/a/8a1b96b5c184da5735a5b168ad85a632faa2f4b7.png)

[Stack\_Hist\_Signals.C](https://root-forum.cern.ch/uploads/short-url/hVj6MgZwcEAFjudXDEjs53SPHFz.C) (9.42 KB)

 ![Screenshot_20240610_105849.png](https://root-forum.cern.ch/uploads/default/original/3X/a/4/a4dc593e92dd62cc4f1607a6474945c4b03c414a.png)

---

<div class="post-metadata">

**Author:** ![Ahmed\_Sayed](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ahmed_sayed/32/31955_2.png) [@Ahmed\_Sayed](https://root-forum.cern.ch/u/Ahmed_Sayed)\
**Post date:** [June 10, 2024, 8:12am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/7 "2024-06-10T08:12:52Z")

</div>

Error is found as shown black screenshot (same significance value for diffrent signals). i dont know is this error related to root or a certain mistake in  
computational values.Please check this

thanks  
Ahmed

---

<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:** [June 10, 2024, 8:22am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/8 "2024-06-10T08:22:08Z")

</div>

The file `h96BP3_bb.root` is missing when I execute your macro.

---

<div class="post-metadata">

**Author:** ![Ahmed\_Sayed](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ahmed_sayed/32/31955_2.png) [@Ahmed\_Sayed](https://root-forum.cern.ch/u/Ahmed_Sayed)\
**Post date:** [June 10, 2024, 8:27am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/9 "2024-06-10T08:27:36Z")

</div>

im sorry Doctor. I will send you  
[h96BP3\_bb.root](https://root-forum.cern.ch/uploads/short-url/1SPeWahj6I2cPJidaugP7QcQilY.root) (20.2 KB)  
now

---

<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:** [June 10, 2024, 8:33am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/10 "2024-06-10T08:33:30Z")

</div>

Your code gives me:

```auto
root [0] .x Stack_Hist_Signals.C
Error in <HandleInterpreterException>: Trying to access a pointer that points to an invalid memory address.
Execution of your code was aborted.
In file included from input_line_8:1:
/Users/couet/Downloads/Stack_Hist_Signals.C:87:7: warning: invalid memory pointer passed to a callee:
      hmc[0][i]->SetLineColor(kYellow);
      ^ ~~~~~~~~
root [1] 

```

I have modified the macro as follow:

- the ROOT files paths were not correct in my context
- I removed useless code
- I indented the code.

here it is:

[Stack\_Hist\_Signals.C](https://root-forum.cern.ch/uploads/short-url/xN00XIszsyU9rhMeBbNIIHZBPds.C) (8.2 KB)

---

<div class="post-metadata">

**Author:** ![Ahmed\_Sayed](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ahmed_sayed/32/31955_2.png) [@Ahmed\_Sayed](https://root-forum.cern.ch/u/Ahmed_Sayed)\
**Post date:** [June 10, 2024, 8:54am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/11 "2024-06-10T08:54:06Z")

</div>

But I get same Significance values

 ![Screenshot_20240606_194752](https://root-forum.cern.ch/uploads/default/original/3X/2/1/218bb61623a5ed3fe9ee9594419dbcdd6773ceb1.png)  
[Stack\_Hist\_Signals.C](https://root-forum.cern.ch/uploads/short-url/pbTkDSe2ZTRrLTlrGW0Gnx3yCbd.C) (11.3 KB)

---

<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:** [June 10, 2024, 10:09am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/12 "2024-06-10T10:09:39Z")

</div>

Your example does not work for me. I get this error:

```auto
Processing Stack_Hist_Signals.C...
Error in <HandleInterpreterException>: Trying to access a pointer that points to an invalid memory address.
Execution of your code was aborted.
In file included from input_line_8:1:
/Users/couet/Downloads/Stack_Hist_Signals.C:142:6: warning: invalid memory pointer passed to a callee:
     hmc[0][i]->SetLineColor(kYellow);
     ^ ~~~~~~~~

```

---

<div class="post-metadata">

**Author:** ![yus](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/9fc348/32.png) [@yus](https://root-forum.cern.ch/u/yus)\
**Post date:** [June 10, 2024, 10:18am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/13 "2024-06-10T10:18:31Z")

</div>

Hi,

the issue is that the numerators of all your significances

```auto
double S1= Ns1/sqrt(Nb1+Nb2+Nb3);
double S2= Ns2/sqrt(Nb1+Nb2+Nb3);
double S3= Ns3/sqrt(Nb1+Nb2+Nb3);
double S4= Ns4/sqrt(Nb1+Nb2+Nb3);
double S5= Ns5/sqrt(Nb1+Nb2+Nb3);
double S6= Ns6/sqrt(Nb1+Nb2+Nb3);
double S7= Ns7/sqrt(Nb1+Nb2+Nb3);
double S8= Ns8/sqrt(Nb1+Nb2+Nb3);

```

are the integrals of some histograms

```auto
double Ns1=hmc[0][4]->Integral();
double Ns2=hmc[1][4]->Integral();
double Ns3=hmc[2][4]->Integral();
double Ns4=hmc[3][4]->Integral();
double Ns5=hmc[4][4]->Integral();
double Ns6=hmc[5][4]->Integral();
double Ns7=hmc[6][4]->Integral();
double Ns8=hmc[7][4]->Integral();

```

**after** you have scaled these histograms in such a way that their integral = 1:

```auto
hmc[0][i]->Scale(1/hmc[0][i]->Integral());
hmc[1][i]->Scale(1/hmc[1][i]->Integral());
hmc[2][i]->Scale(1/hmc[2][i]->Integral()); 
hmc[3][i]->Scale(1/hmc[3][i]->Integral());
hmc[4][i]->Scale(1/hmc[4][i]->Integral());
hmc[5][i]->Scale(1/hmc[5][i]->Integral());
hmc[6][i]->Scale(1/hmc[6][i]->Integral());
hmc[7][i]->Scale(1/hmc[7][i]->Integral());
hmc[8][i]->Scale(1/hmc[8][i]->Integral());
hmc[9][i]->Scale(1/hmc[9][i]->Integral());  
hmc[10][i]->Scale(1/hmc[10][i]->Integral());  

```

No wonder all the values are identical…

---

<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:** [June 24, 2024, 10:19am UTC](https://root-forum.cern.ch/t/errors-occured-getting-same-significance-values-for-all-diffrent-crosssection-rootfiles/59575/14 "2024-06-24T10:19:14Z")

</div>

Closed on June 24, 2024, 10:19am UTC

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