Event weighting


PART 1
Analytical exercise for Bin Migration. Test1.


Fig.1 Plotted analytical functions are:
1a- events 'generated' according to exp dist, 1b- events 'reconstructed' as (generated*resolution) with resolution gaus(1,0.5);
2a- 'generated' flat distribution, 2b- flat dist reconstructed as (flat*resolution)
3a. flat distribution weighted with fnc from 1a,3. flat dist weighted and reconstructed


Fig1a Above example for one single bin:



pT2 resolution




Analytical exercise for Bin Migration. Test3.

Fig.3 Left- reconstructed events from Exponential distribution with resolution=0.5;
Middle - reconstructed events from flat distribution with res = 0.5;
Right - ratio of Exponential Rec to Flat Rec.

Fig.3a Above ratio taken as weight and applied to flat distributions (right)




Analytical exercise for Bin Migration with pT2 resolution. Test2.

Fig.2a Taking pT2 resolution sigma = 0.25, determine weight from reconstructed kinematics.

Fig.2b



Fig.2c. Iteration #2: determine second weight by taking ration of Rec Exponantial to Rec Flat weighted by iteration #1:

Fig.2d At second iteration result converges :



PART 2
Event weighting with real data

1. Concider real DATA and REC from Lepto 2photon events inside 3 sigma of Pi0mass (sigma differesfor data & rec ).
Evaluated weight for rec pT2 does not lead to a convergent result after 4 iterations. On each figure left hand side plot
corresponds to the pT2 distribution of DATA(black) and REC w/ Weight_i (color), where i=0, 1, 2 ... number
of the iteration step.

Fig.1a: i=5 evaluations of pT2 weights for 2photon events inside 3sigma Mass:


Fig.1b: 5th iteration of weigth in case when weight is applied in power alpha each time before
the next new evaluation.Best choice corresponds to alpha=1.5:





2. Consider pT2 resolution inside 3sigma Pi0mass:
Fig.2 pT2 resolution(red) fitted with gaus:


3. Consider events inside and outside the pT2 resolution and construct weight for them (background siband substr + z>0.4).
Fig.3: top - resonstructed events selected inside 1sigma of resolution;
midle - rec events inside 3sigma resolution; bottom - outside 3 sigma, less than 6sigma:





NOTE: in fig 1-3 pT2 was falsly calculated as photons' energy correction was assumed to have the same functional dependence as in data:
Further results are corrected for that.


4. Compare sampling fraction for the reconstructed photons.
Fig.4a: Erec/Egen vs Erec. Top - orange line is a constant fit to the mean value in Y,
yellow line - a constant sampling fraction used in data; bottom - pol fit as a fnc of (Erec/const), equival of energy correction:



Fig.4b: 2photon mass distribution using: left - sampling faction = 0.28; right - fnc(Erec/0.28):



5 Resolution calculted with correct smapling fraction, temporarly taken as a constant = 0.28:
Fig.5 Resolution of pT2: top - smpling taken from data (grey), sampling calculted for rec events - red;
middle - background sideband subtracted(yellow) ; bottom- background sideband subtracted with z>0.4 (yellow);




6.After Cleaning up the background under resolution distribution and choosing:
pi0 with their background subtracted inside 3sigma + Angle cut of (gen,rec) > 3* + z>0.4
try weight iteration on this sample
Fig.6 Data(black); Rec with weight in power alpha=1.5 after 1st and 2nd iteration. Right plot - weight for the 3rd iteration










* O L D * T E S T S *

Fig.X Test with smearing and weighteting




Analytical exercise with 'real' fnc

Fig.2a _2PHOTON_ distributions from Gen and Rec(exp1+exp2 fit), Data(exp1+exp2+1/x^4) for D :

Fig.2b 2photon in Pi0 MASS RANGE distributions from Gen, Rec, Data for D (all fitted with exp1+exp2) :

Fig.3a Functions obtained from Fig2a for fitting 2PHOTON inv mass as f(pT2):

Fig.3a Functions obtained from Fig2a for fitting 2photon in PI0 MASS RANGE as f(pT2):

Fig.4 Weightening of fnc from Fig.2a. Note: the result of 'weightening' of red curve(REC) by the w(mom_gen)
is not correct, since REC and GEN are independently randomnly generated.


Assighing weight for each GEN and REC event

Fig5a. Adding weight from Fig.3a to the 'tree' that selects events after the GSIM.
Plotting histos with weight for gen and same for rec yields:


Fig.5b Wegiht check in the tree:




Fig6.Fitting weighted REC events, and taking ratio of DAT/RECW:


Fig.7 Resolution test: