e4nu / e4nuanalysiscode

Placeholder for all e4nu analyses
1 stars 2 forks source link

Background subtraction systematics #124

Open jtenavidal opened 11 months ago

jtenavidal commented 11 months ago

What is the impact of the background subtraction mehtod?

To quantify it, we must be able to configure the background multiplicity from the command line

jtenavidal commented 11 months ago

DONE

jtenavidal commented 11 months ago

Next steps

jtenavidal commented 9 months ago

Fixed Background test. This will be used for systematics. Systematics due to multiiplicity choice are quantified already.

jtenavidal commented 9 months ago

I added a new script that stores the bkg plots in a nice format. Difference is calculated

Example (few events used for calculation) 1p0pi

image
jtenavidal commented 9 months ago
image

When increasing the statistics, the error shows up to be around 20%. It seems too big

jtenavidal commented 9 months ago

Repeating test without acceptance weights: 1p0pi case:

image

It clearly describes it without acceptance!!!

1p1pim

image
jtenavidal commented 9 months ago

Applying acceptance correction after background subtraction, 1p0pi case (1GeV Carbon)

image

This fixes the issue!

jtenavidal commented 9 months ago

zoomed in

image
jtenavidal commented 9 months ago

Acceptance after fiducial before background

jtenavidal commented 9 months ago

I HAVE A FEELING it is the angle shift in the acceptance? somehting else is odd not the method itself makes sense as it is now

jtenavidal commented 9 months ago

https://github.com/e4nu/e4nuanalysiscode/blob/b956d1c2e92e23cd73a4e7a8868dbbb21d1c3396/src/analysis/AnalysisI.cxx#L55

This creates many issues. I need a way to quickly double check. This will also help for the presentation and so on.

  1. Direct comparison with previous analysis. Even store important histograms of previous analysis in git so we can easily compare to it. Validation tool
  2. We need to be able to define this flip in one single place, tired of breaking the code

I will open a separate issue for this

jtenavidal commented 9 months ago

No acceptance

1p0pi 1GeV

image

Contribution from multiplicity 2 bkg

image

Contribution from multiplicity 3 bkg

image

Contribution from multiplicity 4 bkg

image

1p0pi 2GeV, max multiplicity 4

image

1p0pi 2GeV, max mult 4, mult 3 contribution

image

1p0pi 2GeV, max mult 4, mult 2 contribution

image

1p0pi 2GeV, max multiplicity 2

jtenavidal commented 9 months ago
image

1p0pi 2GeV, max multiplicity 2 The agreement improves significantly. It seems there's an issue with higher order multiplicity events

jtenavidal commented 9 months ago

1p0pi 2GeV, 5000000 events, 2 max substraction.

image

Max mult 3

image

Max mult 4

image
jtenavidal commented 9 months ago

TO DO We need a plot showing the method works. For it I need True Reco : true to compare against No Bkg subtracted: how bad we would do Bkg subtracted: min mult +1 , min mult +2 and min mult +3

Total: 5 ROOT files Observable

1p0pi 1GeV

image

1p0pi 2GeV

image
jtenavidal commented 9 months ago

Also need to re-think logic of the background histograms. Are we really storing correctly the plots? If we store it before substraction we have

Also, https://github.com/e4nu/e4nuanalysiscode/blob/7c01d836224d8ebeeedac2e046533ac6db6b72fc/src/physics/Event.cxx#L72

We assume linearity https://github.com/e4nu/e4nuanalysiscode/blob/7c01d836224d8ebeeedac2e046533ac6db6b72fc/src/analysis/AnalysisI.cxx#L235

jtenavidal commented 9 months ago

1p0pi on C, 2GeV

image

Cloure test

jtenavidal commented 9 months ago

For pion prodction Max mult 3

image

MaxMult 4

image
jtenavidal commented 3 months ago

Must have defined binning and bool for bkg debuggging Also the background method must be turned on

jtenavidal commented 3 months ago

only one histogram is stored (not more than one observable)

jtenavidal commented 3 months ago

To do:

I want to do a new test - Correct back acceptance for each hadron, then add it back after rotation

To modify: Compute acceptance and weight event by 1/acceptance here : https://github.com/e4nu/e4nuanalysiscode/blob/7305efbbdcb1f813148dee42da2cd2edd8c307a2/src/analysis/BackgroundI.h#L56

And simply add back here the acc weight: https://github.com/e4nu/e4nuanalysiscode/blob/7305efbbdcb1f813148dee42da2cd2edd8c307a2/src/analysis/BackgroundI.h#L160

jtenavidal commented 3 months ago
image

Can reproduce background