arXiv:1611.01927 12th Conference on Quark Confinement and the Hadron Spectrum (Confinement XII)
This is an example of unfolding a one-dimensional distribution. It compares various unfolding methods:
XII Quark Confinement and the Hadron Spectrum 29.8. - 3.9.2016 Thessaloniki, Greece statictics session (+proceedings)
maximum number of iterations: 1000
0
100
200
300
400
500
600
700
800
900
1000
histOutputCtau0_binwU
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 8.93341
NDf = 0
Edm = 2.94432e-07
NCalls = 119
p0 = 2313.03 +/- 81.4706 -80.0337 +82.9445 (Minos)
p1 = 6.07588 +/- 0.0843195 -0.0839209 +0.0847407 (Minos)
p2 = 1.76119 +/- 0.0622688 -0.0617262 +0.0628078 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2313.03 6.07588 1.76119]
histOutputFtau0_binwU
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 8.33089
NDf = 0
Edm = 6.50813e-08
NCalls = 119
p0 = 2292.59 +/- 77.1869 -75.9067 +78.5004 (Minos)
p1 = 6.0667 +/- 0.0821747 -0.0817803 +0.0825885 (Minos)
p2 = 1.77123 +/- 0.0599625 -0.0594568 +0.0604685 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2292.59 6.0667 1.77123]
histOutputFAtau0_binwU
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 8.36913
NDf = 0
Edm = 4.1629e-08
NCalls = 119
p0 = 2300.96 +/- 77.0613 -75.7926 +78.3631 (Minos)
p1 = 6.06894 +/- 0.0818049 -0.0814136 +0.0822153 (Minos)
p2 = 1.77403 +/- 0.0597178 -0.0592155 +0.0602208 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2300.96 6.06894 1.77403]
histOutputFALCurve_binwU
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 22.1459
NDf = 0
Edm = 4.72716e-08
NCalls = 123
p0 = 2175.69 +/- 63.3586 -62.8717 +63.8248 (Minos)
p1 = 6.01392 +/- 0.0830555 -0.08261 +0.08352 (Minos)
p2 = 1.88219 +/- 0.0523609 -0.0516227 +0.0531036 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2175.69 6.01392 1.88219]
histOutputFArho_binwU
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 36.4398
NDf = 0
Edm = 8.28606e-06
NCalls = 122
p0 = 2088.52 +/- 54.3348 -54.0383 +54.6064 (Minos)
p1 = 5.94814 +/- 0.0813071 -0.0810537 +0.0815775 (Minos)
p2 = 1.96606 +/- 0.0470327 -0.0463947 +0.0476727 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2088.52 5.94814 1.96606]
histOutputBBBO
bad global correlation 8 -2.22045e-16
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 19.0585
NDf = 0
Edm = 1.0184e-08
NCalls = 102
p0 = 1963.05 +/- 51.5682 -51.2648 +51.8646 (Minos)
p1 = 5.90214 +/- 0.0816763 -0.0809708 +0.0824027 (Minos)
p2 = 2.07111 +/- 0.0460756 -0.045646 +0.0465268 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1963.05 5.90214 2.07111]
histOutputAgorep0
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 197.953
NDf = 0
Edm = 5.71364e-06
NCalls = 101
p0 = 1707.06 +/- 30.6281 -30.6773 +30.5555 (Minos)
p1 = 5.62399 +/- 0.053215 -0.052652 +0.0537917 (Minos)
p2 = 2.24364 +/- 0.0201552 -0.0199327 +0.0203847 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1707.06 5.62399 2.24364]
histOutputAgorep1
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 118.197
NDf = 0
Edm = 7.06308e-08
NCalls = 120
p0 = 1766.67 +/- 33.976 -33.9516 +33.9857 (Minos)
p1 = 5.8135 +/- 0.0699479 -0.0693366 +0.0706199 (Minos)
p2 = 2.27527 +/- 0.026214 -0.0259602 +0.0264935 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1766.67 5.8135 2.27527]
histOutputAgorep2
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 103.621
NDf = 0
Edm = 1.74229e-07
NCalls = 123
p0 = 1794.2 +/- 35.0632 -35.0418 +35.0726 (Minos)
p1 = 5.89902 +/- 0.0771588 -0.0765447 +0.077804 (Minos)
p2 = 2.27417 +/- 0.0289736 -0.028679 +0.0292851 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1794.2 5.89902 2.27417]
histOutputAgorep3
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 96.8081
NDf = 0
Edm = 2.94101e-06
NCalls = 119
p0 = 1816.25 +/- 35.9125 -35.9098 +35.9051 (Minos)
p1 = 5.93729 +/- 0.0805321 -0.0799526 +0.0811401 (Minos)
p2 = 2.25889 +/- 0.0305052 -0.0301629 +0.0308666 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1816.25 5.93729 2.25889]
histOutputAgorep4
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 91.6257
NDf = 0
Edm = 5.08796e-07
NCalls = 123
p0 = 1836.74 +/- 36.7459 -36.7349 +36.7473 (Minos)
p1 = 5.9568 +/- 0.0823367 -0.0816809 +0.0830262 (Minos)
p2 = 2.2385 +/- 0.0316079 -0.0312164 +0.0320162 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1836.74 5.9568 2.2385]
histOutputAgorep5
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 86.8941
NDf = 0
Edm = 5.19993e-07
NCalls = 120
p0 = 1856.65 +/- 37.6417 -37.6077 +37.665 (Minos)
p1 = 5.96958 +/- 0.0835144 -0.082935 +0.0841269 (Minos)
p2 = 2.2164 +/- 0.0326294 -0.0322428 +0.0330273 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1856.65 5.96958 2.2164]
histOutputAgorep6
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 82.3357
NDf = 0
Edm = 3.22306e-07
NCalls = 115
p0 = 1876.57 +/- 38.6709 -38.6446 +38.6871 (Minos)
p1 = 5.98002 +/- 0.0844752 -0.0837658 +0.0852298 (Minos)
p2 = 2.1935 +/- 0.0337655 -0.0333551 +0.0341892 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1876.57 5.98002 2.1935]
histOutputAgorep7
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 77.8736
NDf = 0
Edm = 2.18856e-07
NCalls = 116
p0 = 1896.9 +/- 39.939 -39.8492 +40.0236 (Minos)
p1 = 5.99052 +/- 0.0854687 -0.0847383 +0.0862587 (Minos)
p2 = 2.16994 +/- 0.0352059 -0.0348797 +0.035563 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1896.9 5.99052 2.16994]
histOutputAgorep8
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 73.4731
NDf = 0
Edm = 7.26757e-08
NCalls = 103
p0 = 1918.35 +/- 41.6429 -41.4587 +41.8498 (Minos)
p1 = 6.0021 +/- 0.0867252 -0.0858723 +0.0876869 (Minos)
p2 = 2.14524 +/- 0.0372357 -0.0371887 +0.0374098 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1918.35 6.0021 2.14524]
histOutputAgorep9
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 69.0987
NDf = 0
Edm = 5.25896e-08
NCalls = 140
p0 = 1941.89 +/- 44.2607 -43.7871 +44.9422 (Minos)
p1 = 6.01603 +/- 0.0887007 -0.0875698 +0.0901215 (Minos)
p2 = 2.11836 +/- 0.0405096 -0.0414649 +0.0401739 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 1941.89 6.01603 2.11836]
histOutputAgorep10
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 42.5138
NDf = 0
Edm = 5.85033e-07
NCalls = 131
p0 = 2382.79 +/- 63.0985 -63.4333 +62.8409 (Minos)
p1 = 6.23206 +/- 0.0749671 -0.0743234 +0.07562 (Minos)
p2 = 1.6911 +/- 0.0410841 -0.0398794 +0.0425078 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2382.79 6.23206 1.6911]
histOutputAgorep11
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 38.7947
NDf = 0
Edm = 3.17021e-08
NCalls = 115
p0 = 2389.25 +/- 65.1256 -65.6257 +64.7417 (Minos)
p1 = 6.21773 +/- 0.0753106 -0.0746172 +0.0760137 (Minos)
p2 = 1.6883 +/- 0.0428048 -0.0413996 +0.0444921 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2389.25 6.21773 1.6883]
histOutputAgorep12
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 35.7239
NDf = 0
Edm = 5.37907e-07
NCalls = 98
p0 = 2392.49 +/- 67.1401 -67.7426 +66.6974 (Minos)
p1 = 6.20537 +/- 0.0756438 -0.0750129 +0.0762805 (Minos)
p2 = 1.68766 +/- 0.0446165 -0.0430544 +0.0465276 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2392.49 6.20537 1.68766]
histOutputAgorep13
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 33.1305
NDf = 0
Edm = 4.98972e-09
NCalls = 108
p0 = 2393.31 +/- 69.1408 -69.9609 +68.5385 (Minos)
p1 = 6.19428 +/- 0.0759759 -0.0752988 +0.0766601 (Minos)
p2 = 1.68865 +/- 0.0464989 -0.0447029 +0.048734 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2393.31 6.19428 1.68865]
histOutputAgorep14
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 30.8966
NDf = 0
Edm = 2.30646e-08
NCalls = 113
p0 = 2392.11 +/- 71.1208 -72.1391 +70.3889 (Minos)
p1 = 6.18428 +/- 0.0763225 -0.075653 +0.0769982 (Minos)
p2 = 1.691 +/- 0.0484382 -0.0464172 +0.0509987 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2392.11 6.18428 1.691]
histOutputAgorep15
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 28.9404
NDf = 0
Edm = 1.4588e-05
NCalls = 101
p0 = 2389.62 +/- 73.0541 -74.5329 +71.9485 (Minos)
p1 = 6.17486 +/- 0.0766853 -0.0758192 +0.0775703 (Minos)
p2 = 1.69423 +/- 0.0503883 -0.0479924 +0.0534617 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2389.62 6.17486 1.69423]
histOutputAgorep16
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 27.2043
NDf = 0
Edm = 2.00744e-08
NCalls = 108
p0 = 2385.53 +/- 74.9256 -76.3679 +73.9118 (Minos)
p1 = 6.1665 +/- 0.0770866 -0.076446 +0.0777358 (Minos)
p2 = 1.69854 +/- 0.052353 -0.0498695 +0.0555839 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2385.53 6.1665 1.69854]
histOutputAgorep17
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 25.6479
NDf = 0
Edm = 7.49292e-06
NCalls = 98
p0 = 2381.07 +/- 76.6574 -78.4476 +75.3746 (Minos)
p1 = 6.15856 +/- 0.0775109 -0.0769803 +0.0780537 (Minos)
p2 = 1.70313 +/- 0.0542145 -0.0514552 +0.0578389 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2381.07 6.15856 1.70313]
histOutputAgorep18
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 24.2424
NDf = 0
Edm = 3.51473e-08
NCalls = 109
p0 = 2375.84 +/- 78.2406 -79.9679 +77.018 (Minos)
p1 = 6.15095 +/- 0.0779577 -0.0773953 +0.0785384 (Minos)
p2 = 1.70817 +/- 0.055982 -0.0531101 +0.0597242 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2375.84 6.15095 1.70817]
histOutputAgorep19
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 22.9669
NDf = 0
Edm = 7.96351e-08
NCalls = 107
p0 = 2370.62 +/- 79.5866 -81.3434 +78.3158 (Minos)
p1 = 6.14388 +/- 0.0784176 -0.0779004 +0.0789615 (Minos)
p2 = 1.71318 +/- 0.0575408 -0.0545378 +0.061404 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2370.62 6.14388 1.71318]
histOutputAgorep20
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 21.8061
NDf = 0
Edm = 6.90999e-08
NCalls = 109
p0 = 2365.46 +/- 80.6738 -82.3344 +79.4269 (Minos)
p1 = 6.13724 +/- 0.0788756 -0.0783743 +0.0794136 (Minos)
p2 = 1.71809 +/- 0.0588664 -0.0558061 +0.0627092 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2365.46 6.13724 1.71809]
histOutputAgorep21
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 20.7482
NDf = 0
Edm = 3.60578e-08
NCalls = 108
p0 = 2360.59 +/- 81.4757 -82.9796 +80.2862 (Minos)
p1 = 6.13112 +/- 0.0793164 -0.0788597 +0.0798191 (Minos)
p2 = 1.72273 +/- 0.05992 -0.0568573 +0.0636503 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2360.59 6.13112 1.72273]
histOutputAgorep22
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 19.7836
NDf = 0
Edm = 1.67419e-07
NCalls = 106
p0 = 2356.12 +/- 81.9995 -83.2875 +80.9154 (Minos)
p1 = 6.1255 +/- 0.0797259 -0.0793155 +0.0801896 (Minos)
p2 = 1.72699 +/- 0.0606994 -0.0576875 +0.0642428 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2356.12 6.1255 1.72699]
histOutputAgorep23
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 18.9042
NDf = 0
Edm = 7.23017e-07
NCalls = 108
p0 = 2352.05 +/- 82.2803 -83.2445 +81.4023 (Minos)
p1 = 6.12036 +/- 0.0800955 -0.0797097 +0.0805351 (Minos)
p2 = 1.73088 +/- 0.0612334 -0.0583585 +0.0644839 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2352.05 6.12036 1.73088]
histOutputAgorep24
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 18.1027
NDf = 0
Edm = 1.12284e-06
NCalls = 108
p0 = 2348.51 +/- 82.3552 -83.0365 +81.6583 (Minos)
p1 = 6.11569 +/- 0.0804179 -0.08004 +0.0808515 (Minos)
p2 = 1.73431 +/- 0.0615464 -0.0588188 +0.0645108 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2348.51 6.11569 1.73431]
histOutputAgorep25
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 17.3722
NDf = 0
Edm = 2.4526e-07
NCalls = 109
p0 = 2345.48 +/- 82.275 -82.7168 +81.7297 (Minos)
p1 = 6.11149 +/- 0.0806932 -0.0803289 +0.0811141 (Minos)
p2 = 1.73731 +/- 0.0616846 -0.0591194 +0.0643657 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2345.48 6.11149 1.73731]
histOutputAgorep30
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 14.582
NDf = 0
Edm = 1.0438e-07
NCalls = 108
p0 = 2335.86 +/- 80.7919 -80.3191 +81.0186 (Minos)
p1 = 6.09634 +/- 0.0815191 -0.0811746 +0.0819027 (Minos)
p2 = 1.74717 +/- 0.0609954 -0.0592501 +0.0625777 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2335.86 6.09634 1.74717]
histOutputAgorep35
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 12.8045
NDf = 0
Edm = 9.34016e-08
NCalls = 98
p0 = 2331.88 +/- 79.1862 -78.3522 +79.82 (Minos)
p1 = 6.08782 +/- 0.081828 -0.0814668 +0.0822162 (Minos)
p2 = 1.75171 +/- 0.0597919 -0.0585402 +0.0608655 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2331.88 6.08782 1.75171]
histOutputAgorep40
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 11.6423
NDf = 0
Edm = 1.02018e-05
NCalls = 100
p0 = 2330.29 +/- 78.0177 -77.0108 +78.86 (Minos)
p1 = 6.08294 +/- 0.0819366 -0.0815303 +0.0823707 (Minos)
p2 = 1.75394 +/- 0.0588235 -0.057927 +0.0595514 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2330.29 6.08294 1.75394]
histOutputAgorep45
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.8611
NDf = 0
Edm = 1.95298e-08
NCalls = 101
p0 = 2329.76 +/- 77.1875 -76.1446 +78.1275 (Minos)
p1 = 6.08016 +/- 0.0819697 -0.0815648 +0.0823947 (Minos)
p2 = 1.75487 +/- 0.0580944 -0.0572715 +0.0588007 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2329.76 6.08016 1.75487]
histOutputAgorep50
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.3233
NDf = 0
Edm = 4.24137e-08
NCalls = 101
p0 = 2329.68 +/- 76.6147 -75.5421 +77.6124 (Minos)
p1 = 6.07856 +/- 0.0819664 -0.0815546 +0.0823986 (Minos)
p2 = 1.75534 +/- 0.0575737 -0.056851 +0.0582026 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2329.68 6.07856 1.75534]
histOutputAgorep55
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.94615
NDf = 0
Edm = 7.72082e-06
NCalls = 97
p0 = 2329.82 +/- 76.2151 -75.1493 +77.2088 (Minos)
p1 = 6.07766 +/- 0.0819447 -0.0814959 +0.0824191 (Minos)
p2 = 1.75557 +/- 0.0571982 -0.0565833 +0.0577231 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2329.82 6.07766 1.75557]
histOutputAgorep60
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.67782
NDf = 0
Edm = 7.72103e-08
NCalls = 103
p0 = 2329.99 +/- 75.9094 -74.8089 +76.9693 (Minos)
p1 = 6.07728 +/- 0.0819216 -0.0815055 +0.0823564 (Minos)
p2 = 1.75556 +/- 0.0569057 -0.0562971 +0.0574508 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2329.99 6.07728 1.75556]
histOutputAgorep65
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.48518
NDf = 0
Edm = 6.83293e-09
NCalls = 104
p0 = 2330.24 +/- 75.6898 -74.6008 +76.7488 (Minos)
p1 = 6.07715 +/- 0.0818931 -0.0814768 +0.0823276 (Minos)
p2 = 1.75548 +/- 0.0566882 -0.0560956 +0.0572289 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2330.24 6.07715 1.75548]
histOutputAgorep70
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.34625
NDf = 0
Edm = 7.40466e-09
NCalls = 104
p0 = 2330.47 +/- 75.5249 -74.4325 +76.5957 (Minos)
p1 = 6.0772 +/- 0.0818641 -0.0814448 +0.0823013 (Minos)
p2 = 1.75538 +/- 0.0565213 -0.055952 +0.0570466 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2330.47 6.0772 1.75538]
histOutputAgorep75
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.24613
NDf = 0
Edm = 3.60652e-06
NCalls = 90
p0 = 2330.57 +/- 75.3959 -74.1813 +76.6033 (Minos)
p1 = 6.07746 +/- 0.081838 -0.0815121 +0.0821732 (Minos)
p2 = 1.75534 +/- 0.0563932 -0.0559364 +0.0568083 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2330.57 6.07746 1.75534]
histOutputAgorep80
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.17445
NDf = 0
Edm = 2.32805e-08
NCalls = 108
p0 = 2330.9 +/- 75.3034 -74.2008 +76.397 (Minos)
p1 = 6.0776 +/- 0.0818089 -0.0813833 +0.0822519 (Minos)
p2 = 1.7551 +/- 0.0562884 -0.0557547 +0.0567898 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2330.9 6.0776 1.7551]
histOutputAgorep85
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.12391
NDf = 0
Edm = 9.66783e-06
NCalls = 97
p0 = 2330.9 +/- 75.2171 -73.9318 +76.523 (Minos)
p1 = 6.07794 +/- 0.081787 -0.0814075 +0.082173 (Minos)
p2 = 1.75504 +/- 0.0562036 -0.0557696 +0.0566162 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2330.9 6.07794 1.75504]
histOutputAgorep90
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.0892
NDf = 0
Edm = 3.80927e-08
NCalls = 105
p0 = 2331.28 +/- 75.1734 -74.086 +76.2571 (Minos)
p1 = 6.07819 +/- 0.0817594 -0.0813249 +0.0822118 (Minos)
p2 = 1.75479 +/- 0.0561416 -0.0556206 +0.0566372 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2331.28 6.07819 1.75479]
histOutputAgorep95
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.06651
NDf = 0
Edm = 7.61055e-07
NCalls = 104
p0 = 2331.46 +/- 75.1317 -74.0559 +76.2015 (Minos)
p1 = 6.07855 +/- 0.0817372 -0.0813378 +0.0821527 (Minos)
p2 = 1.75465 +/- 0.0560907 -0.0555865 +0.0565685 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2331.46 6.07855 1.75465]
histOutputAgorep100
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.05296
NDf = 0
Edm = 1.02031e-05
NCalls = 98
p0 = 2331.55 +/- 75.0899 -73.9714 +76.2204 (Minos)
p1 = 6.07861 +/- 0.0817143 -0.0810451 +0.0824076 (Minos)
p2 = 1.75449 +/- 0.0560425 -0.0555293 +0.0565429 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2331.55 6.07861 1.75449]
histOutputAgorep150
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.12732
NDf = 0
Edm = 3.08835e-10
NCalls = 109
p0 = 2332.43 +/- 75.0022 -73.894 +76.1246 (Minos)
p1 = 6.08166 +/- 0.0815863 -0.0811589 +0.0820312 (Minos)
p2 = 1.75329 +/- 0.0558779 -0.0554108 +0.0563366 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2332.43 6.08166 1.75329]
histOutputAgorep200
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.27969
NDf = 0
Edm = 1.61096e-07
NCalls = 111
p0 = 2332.8 +/- 75.0377 -73.8959 +76.1994 (Minos)
p1 = 6.08337 +/- 0.0815398 -0.0811157 +0.0819812 (Minos)
p2 = 1.75248 +/- 0.0558583 -0.055423 +0.0562881 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2332.8 6.08337 1.75248]
histOutputAgorep250
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.41695
NDf = 0
Edm = 2.24257e-08
NCalls = 110
p0 = 2333.07 +/- 75.0859 -73.9573 +76.2347 (Minos)
p1 = 6.08433 +/- 0.0815362 -0.081113 +0.081977 (Minos)
p2 = 1.75185 +/- 0.0558629 -0.055419 +0.0563031 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.07 6.08433 1.75185]
histOutputAgorep300
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.53327
NDf = 0
Edm = 6.87799e-08
NCalls = 110
p0 = 2333.25 +/- 75.1273 -73.9901 +76.2857 (Minos)
p1 = 6.08484 +/- 0.081555 -0.0811333 +0.0819944 (Minos)
p2 = 1.75138 +/- 0.0558714 -0.0554358 +0.0563036 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.25 6.08484 1.75138]
histOutputAgorep350
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.63207
NDf = 0
Edm = 1.47821e-07
NCalls = 110
p0 = 2333.38 +/- 75.1608 -74.0152 +76.328 (Minos)
p1 = 6.08509 +/- 0.0815843 -0.0811639 +0.0820226 (Minos)
p2 = 1.75103 +/- 0.0558793 -0.0554515 +0.0563036 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.38 6.08509 1.75103]
histOutputAgorep400
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.71683
NDf = 0
Edm = 2.36995e-07
NCalls = 110
p0 = 2333.48 +/- 75.1872 -74.0346 +76.3617 (Minos)
p1 = 6.08518 +/- 0.0816173 -0.0811977 +0.0820549 (Minos)
p2 = 1.75075 +/- 0.0558861 -0.0554647 +0.0563037 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.48 6.08518 1.75075]
histOutputAgorep450
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.7902
NDf = 0
Edm = 3.1333e-07
NCalls = 110
p0 = 2333.55 +/- 75.2079 -74.0499 +76.388 (Minos)
p1 = 6.08518 +/- 0.0816499 -0.0812307 +0.0820871 (Minos)
p2 = 1.75054 +/- 0.0558917 -0.0554751 +0.0563043 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.55 6.08518 1.75054]
histOutputAgorep500
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.85409
NDf = 0
Edm = 3.63948e-07
NCalls = 110
p0 = 2333.59 +/- 75.2241 -74.0622 +76.4083 (Minos)
p1 = 6.08512 +/- 0.0816801 -0.081261 +0.0821172 (Minos)
p2 = 1.75037 +/- 0.0558964 -0.055483 +0.0563054 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.59 6.08512 1.75037]
histOutputAgorep550
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.90995
NDf = 0
Edm = 3.86269e-07
NCalls = 110
p0 = 2333.62 +/- 75.2368 -74.0722 +76.4239 (Minos)
p1 = 6.08502 +/- 0.0817068 -0.0812877 +0.082144 (Minos)
p2 = 1.75025 +/- 0.0559002 -0.0554888 +0.0563071 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.62 6.08502 1.75025]
histOutputAgorep600
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 9.95893
NDf = 0
Edm = 3.84225e-07
NCalls = 110
p0 = 2333.62 +/- 75.2469 -74.0806 +76.4358 (Minos)
p1 = 6.08492 +/- 0.08173 -0.0813106 +0.0821674 (Minos)
p2 = 1.75015 +/- 0.0559032 -0.0554929 +0.056309 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.62 6.08492 1.75015]
histOutputAgorep650
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.0019
NDf = 0
Edm = 3.64513e-07
NCalls = 110
p0 = 2333.62 +/- 75.2551 -74.0877 +76.445 (Minos)
p1 = 6.08481 +/- 0.0817498 -0.0813301 +0.0821875 (Minos)
p2 = 1.75008 +/- 0.0559055 -0.0554956 +0.0563109 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.62 6.08481 1.75008]
histOutputAgorep700
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.0397
NDf = 0
Edm = 3.34043e-07
NCalls = 110
p0 = 2333.61 +/- 75.2616 -74.0938 +76.4522 (Minos)
p1 = 6.0847 +/- 0.0817665 -0.0813465 +0.0822047 (Minos)
p2 = 1.75002 +/- 0.0559072 -0.0554971 +0.0563128 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.61 6.0847 1.75002]
histOutputAgorep750
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.0729
NDf = 0
Edm = 2.98591e-07
NCalls = 110
p0 = 2333.59 +/- 75.2671 -74.0991 +76.4578 (Minos)
p1 = 6.0846 +/- 0.0817807 -0.0813602 +0.0822193 (Minos)
p2 = 1.74997 +/- 0.0559083 -0.0554977 +0.0563144 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.59 6.0846 1.74997]
histOutputAgorep800
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.1021
NDf = 0
Edm = 2.62333e-07
NCalls = 110
p0 = 2333.57 +/- 75.2717 -74.1039 +76.4624 (Minos)
p1 = 6.0845 +/- 0.0817927 -0.0813717 +0.0822317 (Minos)
p2 = 1.74993 +/- 0.0559088 -0.0554975 +0.0563156 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.57 6.0845 1.74993]
histOutputAgorep850
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.1277
NDf = 0
Edm = 2.27907e-07
NCalls = 110
p0 = 2333.54 +/- 75.2758 -74.1082 +76.4661 (Minos)
p1 = 6.08441 +/- 0.0818029 -0.0813815 +0.0822424 (Minos)
p2 = 1.74989 +/- 0.0559088 -0.0554968 +0.0563164 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.54 6.08441 1.74989]
histOutputAgorep900
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.1502
NDf = 0
Edm = 1.96723e-07
NCalls = 110
p0 = 2333.52 +/- 75.2793 -74.1122 +76.4694 (Minos)
p1 = 6.08433 +/- 0.0818116 -0.0813897 +0.0822515 (Minos)
p2 = 1.74986 +/- 0.0559084 -0.0554956 +0.0563168 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.52 6.08433 1.74986]
histOutputAgorep950
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.17
NDf = 0
Edm = 1.69331e-07
NCalls = 110
p0 = 2333.5 +/- 75.2825 -74.1158 +76.4722 (Minos)
p1 = 6.08426 +/- 0.081819 -0.0813967 +0.0822593 (Minos)
p2 = 1.74983 +/- 0.0559077 -0.0554941 +0.0563169 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.5 6.08426 1.74983]
histOutputAgorep1000
****************************************
Minimizer is Minuit2 / Migrad
MinFCN = 10.1874
NDf = 0
Edm = 1.45745e-07
NCalls = 110
p0 = 2333.49 +/- 75.2855 -74.1192 +76.4748 (Minos)
p1 = 6.08419 +/- 0.0818254 -0.0814028 +0.0822661 (Minos)
p2 = 1.7498 +/- 0.0559066 -0.0554924 +0.0563165 (Minos)
fcn flag=0: npar=3 gin=0 par=[ 2333.49 6.08419 1.7498]
"inversion",0.369615,16,0.989,0.687185,13,0.777954,0.843936,6.07588,"±",0.0843195,1.76119,"±",0.0622688
"template",0.220299,16,0.99951,0.640838,13,0.821395,0.834923,6.0667,"±",0.0821747,1.77123,"±",0.0599625
"template+area",0.237251,16,0.999212,0.643779,13,0.818749,0.834905,6.06894,"±",0.0818049,1.77403,"±",0.0597178
"Tikhonov+area",0.567834,16,0.909857,1.70353,13,0.0531425,0.666522,6.01392,"±",0.0830555,1.88219,"±",0.0523609
"min(rhomax)",1.30367,16,0.184004,2.80306,13,0.000506874,0.656519,5.94814,"±",0.0813071,1.96606,"±",0.0470327
"bin-by-bin",4.925,16,2.7358e-10,1.46604,13,0.121301,0,5.90214,"±",0.0816763,2.07111,"±",0.0460756
"iterative, N=0",319.06,16,0,15.2271,13,3.5961e-35,0.849481,5.62399,"±",0.053215,2.24364,"±",0.0201552
"iterative, N=1",111.402,16,0,9.09211,13,4.5692e-19,0.817166,5.8135,"±",0.0699479,2.27527,"±",0.026214
"iterative, N=2",62.992,16,2.31021e-204,7.97086,13,3.28626e-16,0.785917,5.89902,"±",0.0771588,2.27417,"±",0.0289736
"iterative, N=3",41.9938,16,1.22802e-132,7.44678,13,6.87329e-15,0.757593,5.93729,"±",0.0805321,2.25889,"±",0.0305052
"iterative, N=4",30.3819,16,2.83616e-93,7.04813,13,6.82474e-14,0.733895,5.9568,"±",0.0823367,2.2385,"±",0.0316079
"iterative, N=5",23.0971,16,8.57418e-69,6.68416,13,5.46969e-13,0.715893,5.96958,"±",0.0835144,2.2164,"±",0.0326294
"iterative, N=6",18.1625,16,2.24797e-52,6.33352,13,4.0031e-12,0.703607,5.98002,"±",0.0844752,2.1935,"±",0.0337655
"iterative, N=7",14.6425,16,8.54613e-41,5.99028,13,2.76604e-11,0.696048,5.99052,"±",0.0854687,2.16994,"±",0.0352059
"iterative, N=8",12.0361,16,2.49723e-32,5.65178,13,1.83018e-10,0.691821,6.0021,"±",0.0867252,2.14524,"±",0.0372357
"iterative, N=9",10.0504,16,5.68598e-26,5.31529,13,1.17568e-09,0.6897,6.01603,"±",0.0887007,2.11836,"±",0.0405096
"iterative, N=10",8.50328,16,4.25835e-21,3.27029,13,5.39585e-05,0.688825,6.23206,"±",0.0749671,1.6911,"±",0.0410841
"iterative, N=11",7.27553,16,2.68544e-17,2.98421,13,0.000215602,0.688651,6.21773,"±",0.0753106,1.6883,"±",0.0428048
"iterative, N=12",6.28618,16,2.69801e-14,2.74799,13,0.000654782,0.688847,6.20537,"±",0.0756438,1.68766,"±",0.0446165
"iterative, N=13",5.47848,16,6.74681e-12,2.5485,13,0.00162879,0.689213,6.19428,"±",0.0759759,1.68865,"±",0.0464989
"iterative, N=14",4.81161,16,5.78501e-10,2.37666,13,0.00349095,0.68963,6.18428,"±",0.0763225,1.691,"±",0.0484382
"iterative, N=15",4.25556,16,2.15151e-08,2.22618,13,0.00667463,0.690033,6.17486,"±",0.0766853,1.69423,"±",0.0503883
"iterative, N=16",3.78782,16,4.13727e-07,2.09264,13,0.0116635,0.690388,6.1665,"±",0.0770866,1.69854,"±",0.052353
"iterative, N=17",3.3913,16,4.70074e-06,1.97292,13,0.0189482,0.690682,6.15856,"±",0.0775109,1.70313,"±",0.0542145
"iterative, N=18",3.05275,16,3.49724e-05,1.8648,13,0.0289726,0.690913,6.15095,"±",0.0779577,1.70817,"±",0.055982
"iterative, N=19",2.76185,16,0.000184579,1.76668,13,0.0420756,0.691087,6.14388,"±",0.0784176,1.71318,"±",0.0575408
"iterative, N=20",2.51042,16,0.000736128,1.67739,13,0.0584402,0.691212,6.13724,"±",0.0788756,1.71809,"±",0.0588664
"iterative, N=21",2.29192,16,0.00233267,1.59601,13,0.0780608,0.691301,6.13112,"±",0.0793164,1.72273,"±",0.05992
"iterative, N=22",2.10111,16,0.00611486,1.52182,13,0.100738,0.691362,6.1255,"±",0.0797259,1.72699,"±",0.0606994
"iterative, N=23",1.93369,16,0.0136996,1.45417,13,0.126103,0.691407,6.12036,"±",0.0800955,1.73088,"±",0.0612334
"iterative, N=24",1.78617,16,0.0269367,1.39251,13,0.15366,0.691446,6.11569,"±",0.0804179,1.73431,"±",0.0615464
"iterative, N=25",1.65566,16,0.0475044,1.33632,13,0.182842,0.691486,6.11149,"±",0.0806932,1.73731,"±",0.0616846
"iterative, N=30",1.18689,16,0.269169,1.12169,13,0.334167,0.691931,6.09634,"±",0.0815191,1.74717,"±",0.0609954
"iterative, N=35",0.908322,16,0.559059,0.984963,13,0.463022,0.69311,6.08782,"±",0.081828,1.75171,"±",0.0597919
"iterative, N=40",0.732607,16,0.762905,0.895559,13,0.557174,0.695148,6.08294,"±",0.0819366,1.75394,"±",0.0588235
"iterative, N=45",0.616619,16,0.873537,0.835466,13,0.622456,0.69795,6.08016,"±",0.0819697,1.75487,"±",0.0580944
"iterative, N=50",0.537326,16,0.92907,0.794103,13,0.667304,0.701338,6.07856,"±",0.0819664,1.75534,"±",0.0575737
"iterative, N=55",0.481626,16,0.95714,0.765088,13,0.698332,0.705124,6.07766,"±",0.0819447,1.75557,"±",0.0571982
"iterative, N=60",0.441666,16,0.971955,0.744448,13,0.720044,0.709144,6.07728,"±",0.0819216,1.75556,"±",0.0569057
"iterative, N=65",0.412534,16,0.980214,0.729629,13,0.735393,0.713267,6.07715,"±",0.0818931,1.75548,"±",0.0566882
"iterative, N=70",0.391042,16,0.985078,0.718942,13,0.746319,0.717396,6.0772,"±",0.0818641,1.75538,"±",0.0565213
"iterative, N=75",0.375056,16,0.988086,0.71124,13,0.754111,0.72146,6.07746,"±",0.081838,1.75534,"±",0.0563932
"iterative, N=80",0.363112,16,0.990023,0.705727,13,0.759644,0.725414,6.0776,"±",0.0818089,1.7551,"±",0.0562884
"iterative, N=85",0.354178,16,0.991311,0.701839,13,0.763522,0.729226,6.07794,"±",0.081787,1.75504,"±",0.0562036
"iterative, N=90",0.347516,16,0.992188,0.699169,13,0.766174,0.732878,6.07819,"±",0.0817594,1.75479,"±",0.0561416
"iterative, N=95",0.342588,16,0.992792,0.697424,13,0.767902,0.736361,6.07855,"±",0.0817372,1.75465,"±",0.0560907
"iterative, N=100",0.338996,16,0.99321,0.696382,13,0.768932,0.739673,6.07861,"±",0.0817143,1.75449,"±",0.0560425
"iterative, N=150",0.335268,16,0.993624,0.702102,13,0.763261,0.764528,6.08166,"±",0.0815863,1.75329,"±",0.0558779
"iterative, N=200",0.346127,16,0.992362,0.713822,13,0.751507,0.779298,6.08337,"±",0.0815398,1.75248,"±",0.0558583
"iterative, N=250",0.356914,16,0.990931,0.724381,13,0.740775,0.788781,6.08433,"±",0.0815362,1.75185,"±",0.0558629
"iterative, N=300",0.36599,16,0.989579,0.733328,13,0.731582,0.795305,6.08484,"±",0.081555,1.75138,"±",0.0558714
"iterative, N=350",0.373445,16,0.988362,0.740928,13,0.723709,0.800037,6.08509,"±",0.0815843,1.75103,"±",0.0558793
"iterative, N=400",0.379583,16,0.987284,0.747449,13,0.71691,0.803611,6.08518,"±",0.0816173,1.75075,"±",0.0558861
"iterative, N=450",0.384672,16,0.986336,0.753092,13,0.710994,0.806396,6.08518,"±",0.0816499,1.75054,"±",0.0558917
"iterative, N=500",0.388923,16,0.985505,0.758007,13,0.705821,0.808621,6.08512,"±",0.0816801,1.75037,"±",0.0558964
"iterative, N=550",0.3925,16,0.984779,0.762304,13,0.701281,0.810434,6.08502,"±",0.0817068,1.75025,"±",0.0559002
"iterative, N=600",0.395528,16,0.984143,0.766072,13,0.697289,0.811937,6.08492,"±",0.08173,1.75015,"±",0.0559032
"iterative, N=650",0.398104,16,0.983588,0.76938,13,0.693776,0.813199,6.08481,"±",0.0817498,1.75008,"±",0.0559055
"iterative, N=700",0.400304,16,0.983103,0.772286,13,0.690683,0.814272,6.0847,"±",0.0817665,1.75002,"±",0.0559072
"iterative, N=750",0.40219,16,0.982678,0.77484,13,0.687961,0.815194,6.0846,"±",0.0817807,1.74997,"±",0.0559083
"iterative, N=800",0.403812,16,0.982307,0.777084,13,0.685565,0.815995,6.0845,"±",0.0817927,1.74993,"±",0.0559088
"iterative, N=850",0.40521,16,0.981983,0.779056,13,0.683458,0.816697,6.08441,"±",0.0818029,1.74989,"±",0.0559088
"iterative, N=900",0.406417,16,0.9817,0.780788,13,0.681605,0.817318,6.08433,"±",0.0818116,1.74986,"±",0.0559084
"iterative, N=950",0.407463,16,0.981452,0.78231,13,0.679975,0.817871,6.08426,"±",0.081819,1.74983,"±",0.0559077
"iterative, N=1000",0.408369,16,0.981235,0.783648,13,0.678541,0.818368,6.08419,"±",0.0818254,1.7498,"±",0.0559066
#include <iostream>
#include <cmath>
#include <map>
using std::vector, std::pair, std::cout;
#define TEST_INPUT_COVARIANCE
TH2 *AddOverflowXY(
TH2 *
h,
double widthX,
double widthY);
void DrawOverflowX(
TH1 *
h,
double posy);
void DrawOverflowY(
TH1 *
h,
double posx);
double const kLegendFontSize=0.05;
int kNbinC=0;
void DrawPadProbability(
TH2 *
h);
void DrawPadEfficiency(
TH1 *
h);
void DrawPadReco(
TH1 *histMcRec,
TH1 *histMcbgrRec,
TH1 *histDataRec,
TH1 *histDataUnfold,
TH2 *histProbability,
TH2 *histRhoij);
void DrawPadTruth(
TH1 *histMcsigGen,
TH1 *histDataGen,
TH1 *histDataUnfold,
void DrawPadCorrelations(
TH2 *
h,
TH1 *hist[4],
int color,
int style,
int fillStyle);
#ifdef WITH_IDS
#endif
void testUnfold7c()
{
TFile *outputFile=
new TFile(
"testUnfold7_results.root",
"recreate");
TFile *inputFile=
new TFile(
"testUnfold7_histograms.root");
inputFile->
GetObject(
"coarse",coarseBinning);
if((!fineBinning)||(!coarseBinning)) {
cout<<"problem to read binning schemes\n";
}
#define READ(TYPE,binning,name) \
TYPE *name[3]; inputFile->GetObject(#name,name[0]); \
name[0]->Write(); \
if(!name[0]) cout<<"Error reading " #name "\n"; \
CreateHistogramCopies(name,binning);
READ(
TH1,fineBinning,histDataRecF);
READ(
TH1,coarseBinning,histDataRecC);
READ(
TH1,fineBinning,histDataBgrF);
READ(
TH1,coarseBinning,histDataBgrC);
READ(
TH1,coarseBinning,histDataGen);
READ(
TH2,fineBinning,histMcsigGenRecF);
READ(
TH2,coarseBinning,histMcsigGenRecC);
READ(
TH1,fineBinning,histMcsigRecF);
READ(
TH1,coarseBinning,histMcsigRecC);
READ(
TH1,coarseBinning,histMcsigGen);
READ(
TH1,fineBinning,histMcbgrRecF);
READ(
TH1,coarseBinning,histMcbgrRecC);
TH1 *histOutputCLCurve[3];
double tauMin=1.e-4;
double tauMax=1.e-1;
double fBgr=1.0;
double biasScale=1.0;
{
coarseBinning,
coarseBinning);
tunfoldC->
SetInput(histDataRecC[0],biasScale);
histOutputCtau0[0]=tunfoldC->
GetOutput(
"histOutputCtau0");
CreateHistogramCopies(histOutputCtau0,coarseBinning);
histOutputCLCurve[0]=tunfoldC->
GetOutput(
"histOutputCLCurve");
CreateHistogramCopies(histOutputCLCurve,coarseBinning);
}
TH1 *histOutputFLCurve[3];
tauMin=3.E-4;
tauMax=3.E-2;
{
coarseBinning,
fineBinning);
tunfoldF->
SetInput(histDataRecF[0],biasScale);
histOutputFtau0[0]=tunfoldF->
GetOutput(
"histOutputFtau0");
CreateHistogramCopies(histOutputFtau0,coarseBinning);
histOutputFLCurve[0]=tunfoldF->
GetOutput(
"histOutputFLCurve");
CreateHistogramCopies(histOutputFLCurve,coarseBinning);
}
TH1 *histOutputFAtau0[3];
TH1 *histOutputFALCurve[3];
double tauFA,tauFArho;
{
coarseBinning,
fineBinning);
tunfoldFA->
SetInput(histDataRecF[0],biasScale);
histOutputFAtau0[0]=tunfoldFA->
GetOutput(
"histOutputFAtau0");
CreateHistogramCopies(histOutputFAtau0,coarseBinning);
histOutputFArho[0]=tunfoldFA->
GetOutput(
"histOutputFArho");
CreateHistogramCopies(histOutputFArho,coarseBinning);
tunfoldFA->
ScanLcurve(50,tauMin,tauMax,&lCurve,&logTauX,&logTauY,&logTauCurvature);
histOutputFALCurve[0]=tunfoldFA->
GetOutput(
"histOutputFALCurve");
CreateHistogramCopies(histOutputFALCurve,coarseBinning);
}
TH2 *histProbCO=AddOverflowXY(histProbC,widthC,widthC);
TH2 *histProbFO=AddOverflowXY(histProbF,widthC,widthF);
TH1 *histMcsigRecCO=AddOverflowX(histMcsigRecC[2],widthC);
TH1 *histMcbgrRecCO=AddOverflowX(histMcbgrRecC[2],widthC);
histMcbgrRecCO->
Scale(fBgr);
TH1 *histMcRecCO=(
TH1 *)histMcsigRecCO->
Clone(
"histMcRecC0");
histMcRecCO->
Add(histMcsigRecCO,histMcbgrRecCO);
TH1 *histDataRecCO=AddOverflowX(histDataRecC[2],widthC);
TH1 *histMcsigRecFO=AddOverflowX(histMcsigRecF[2],widthF);
TH1 *histMcbgrRecFO=AddOverflowX(histMcbgrRecF[2],widthF);
histMcbgrRecFO->
Scale(fBgr);
TH1 *histMcRecFO=(
TH1 *)histMcsigRecFO->
Clone(
"histMcRecF0");
histMcRecFO->
Add(histMcsigRecFO,histMcbgrRecFO);
TH1 *histDataRecFO=AddOverflowX(histDataRecF[2],widthF);
TH1 *histMcsigGenO=AddOverflowX(histMcsigGen[2],widthC);
TH1 *histDataGenO=AddOverflowX(histDataGen[2],widthC);
TH1 *histOutputCtau0O=AddOverflowX(histOutputCtau0[2],widthC);
TH2 *histRhoCtau0O=AddOverflowXY(histRhoCtau0,widthC,widthC);
TH1 *histOutputFtau0O=AddOverflowX(histOutputFtau0[2],widthC);
TH2 *histRhoFtau0O=AddOverflowXY(histRhoFtau0,widthC,widthC);
TH1 *histOutputFAtau0O=AddOverflowX(histOutputFAtau0[2],widthC);
TH2 *histRhoFAtau0O=AddOverflowXY(histRhoFAtau0,widthC,widthC);
TH1 *histOutputFALCurveO=AddOverflowX(histOutputFALCurve[2],widthC);
TH2 *histRhoFALCurveO=AddOverflowXY(histRhoFALCurve,widthC,widthC);
TH1 *histOutputFArhoO=AddOverflowX(histOutputFArho[2],widthC);
TH2 *histRhoFArhoO=AddOverflowXY(histRhoFArho,widthC,widthC);
TH2 *histRhoBBBO=(
TH2 *)histRhoCtau0O->
Clone(
"histRhoBBBO");
for(
int i=1;i<=histRhoBBBO->
GetNbinsX();i++) {
for(
int j=1;j<=histRhoBBBO->
GetNbinsX();j++) {
}
}
TH1 *histDataBgrsub=(
TH1 *)histDataRecCO->
Clone(
"histDataBgrsub");
histDataBgrsub->
Add(histMcbgrRecCO,-fBgr);
TH1 *histOutputBBBO=(
TH1 *)histDataBgrsub->
Clone(
"histOutputBBBO");
histOutputBBBO->
Divide(histMcsigRecCO);
histOutputBBBO->
Multiply(histMcsigGenO);
int niter=1000;
cout<<"maximum number of iterations: "<<niter<<"\n";
vector <TH1 *>histOutputAgo,histOutputAgorep;
vector <TH2 *>histRhoAgo,histRhoAgorep;
histOutputAgo.push_back((
TH1*)histMcsigGenO->
Clone(
"histOutputAgo-1"));
histOutputAgorep.push_back((
TH1*)histMcsigGenO->
Clone(
"histOutputAgorep-1"));
histRhoAgo.push_back((
TH2*)histRhoBBBO->
Clone(
"histRhoAgo-1"));
histRhoAgorep.push_back((
TH2*)histRhoBBBO->
Clone(
"histRhoAgorep-1"));
nIter.push_back(-1);
for(int i=0;i<nx;i++) {
double epsilonI=0.;
for(int j=0;j<ny;j++) {
}
for(int j=0;j<ny;j++) {
A(j,i)=aji;
AToverEps(i,j)=aji/epsilonI;
}
}
for(int i=0;i<nx;i++) {
(histOutputAgo[0]->GetBinError(i+1)
*histOutputAgo[0]->GetXaxis()->GetBinWidth(i+1),2.);
}
for(int i=0;i<ny;i++) {
}
#define NREPLICA 300
for(int nr=0;nr<NREPLICA;nr++) {
}
for(int i=0;i<nx;i++) {
(*
x[0])(i)=histOutputAgo[0]->GetBinContent(i+1)
*histOutputAgo[0]->GetXaxis()->GetBinWidth(i+1);
for(int nr=1;nr<NREPLICA;nr++) {
}
}
for(int i=0;i<ny;i++) {
for(int nr=1;nr<NREPLICA;nr++) {
}
for(int nr=0;nr<NREPLICA;nr++) {
(*yMb[nr])(i)=(*
y[nr])(i)-
b(i);
}
}
for(int iter=0;iter<=niter;iter++) {
if(!(iter %100)) cout<<iter<<"\n";
for(int nr=0;nr<NREPLICA;nr++) {
for(int j=0;j<ny;j++) {
yOverYrec(j)=(*
y[nr])(j)/yrec(j);
}
for(int i=0;i<nx;i++) {
xx(i) = (*
x[nr])(i) *
f(i);
}
if(nr==0) {
for(int i=0;i<nx;i++) {
for(int j=0;j<ny;j++) {
xdf_dr(i,j) *= (*
x[nr])(i);
}
}
for(int j=0;j<ny;j++) {
dr_dxdy(j,nx+j)=1.0/yrec(j);
for(int i=0;i<nx;i++) {
dr_dxdy(j,i)= -yOverYrec(j)/yrec(j)*A(j,i);
}
}
dxy_dxy.SetSub(0,0,xdf_dr*dr_dxdy);
for(int i=0;i<nx;i++) {
}
for(int i=0;i<ny;i++) {
dxy_dxy(nx+i,nx+i) +=1.0;
}
covAgo= dxy_dxy*VDT;
}
}
if((iter<=25)||
((iter<=100)&&(iter %5==0))||
((iter<=1000)&&(iter %50==0))||
(iter %1000==0)) {
nIter.push_back(iter);
TH1 *
h=(
TH1*)histOutputAgo[0]->Clone
histOutputAgo.push_back(
h);
for(int i=0;i<nx;i++) {
double bw=
h->GetXaxis()->GetBinWidth(i+1);
h->SetBinContent(i+1,(*
x[0])(i)/bw);
}
TH2 *h2=(
TH2*)histRhoAgo[0]->Clone
histRhoAgo.push_back(h2);
for(int i=0;i<nx;i++) {
for(int j=0;j<nx;j++) {
double rho= covAgo(i,j)/
TMath::Sqrt(covAgo(i,i)*covAgo(j,j));
cout<<"bad error matrix: iter="<<iter<<"\n";
exit(0);
}
}
}
h=(
TH1*)histOutputAgo[0]->Clone
h2=(
TH2*)histRhoAgo[0]->Clone
histOutputAgorep.push_back(
h);
histRhoAgorep.push_back(h2);
double w=1./(NREPLICA-1.);
for(int nr=1;nr<NREPLICA;nr++) {
}
for(int nr=1;nr<NREPLICA;nr++) {
for(int i=0;i<nx;i++) {
dx(i,0)= (*
x[nr])(i)-(*
x[0])(i);
}
}
for(int i=0;i<nx;i++) {
double bw=
h->GetXaxis()->GetBinWidth(i+1);
h->SetBinContent(i+1,(*
x[0])(i)/bw);
}
for(int i=0;i<nx;i++) {
for(int j=0;j<nx;j++) {
double rho= covAgorep(i,j)/
cout<<"bad error matrix: iter="<<iter<<"\n";
exit(0);
}
}
}
}
}
#ifdef WITH_IDS
int niterIDS=100;
cout<<"IDS number of iterations: "<<niterIDS<<"\n";
for(int nr=0;nr<NREPLICA;nr++) {
}
for(int iy=0;iy<ny;iy++) {
for(int ix=0;ix<nx;ix++) {
A_IDS(iy,ix)=histMcsigGenRecC[0]->GetBinContent(ix+1,iy+1);
}
}
double lambdaL=0.;
double lambdaU=lambdaUmin;
double lambdaM=lambdaMmin;
histOutputIDS.push_back((
TH1*)histOutputAgo[0]->Clone(
"histOutputIDS-1"));
histRhoIDS.push_back((
TH2*)histRhoAgo[0]->Clone(
"histRhoIDS-1"));
histOutputIDS.push_back((
TH1*)histOutputAgo[0]->Clone(
"histOutputIDS0"));
histRhoIDS.push_back((
TH2*)histRhoAgo[0]->Clone(
"histRhoIDS0"));
for(int iter=1;iter<=niterIDS;iter++) {
if(!(iter %10)) cout<<iter<<"\n";
for(int nr=0;nr<NREPLICA;nr++) {
if(iter==1) {
IDSfirst(yMb[nr],yErr[nr],&A_IDS,lambdaL,unfresIDS[nr],soustr[nr]);
} else {
IDSiterate(yMb[nr],yErr[nr],&A_IDS,Am_IDS[nr],
lambdaU,lambdaM,lambdaS,
unfresIDS[nr],soustr[nr]);
}
}
unsigned ix;
for(ix=0;ix<nIter.size();ix++) {
if(nIter[ix]==iter) break;
}
if(ix<nIter.size()) {
TH1 *
h=(
TH1*)histOutputIDS[0]->Clone
TH2 *h2=(
TH2*)histRhoIDS[0]->Clone
histOutputIDS.push_back(
h);
histRhoIDS.push_back(h2);
double w=1./(NREPLICA-1.);
for(int nr=1;nr<NREPLICA;nr++) {
mean +=
w* (*unfresIDS[nr]);
}
for(int nr=1;nr<NREPLICA;nr++) {
for(int i=0;i<nx;i++) {
dx(i,0)= (*unfresIDS[nr])(i)-(*unfresIDS[0])(i);
}
}
for(int i=0;i<nx;i++) {
double bw=
h->GetXaxis()->GetBinWidth(i+1);
h->SetBinContent(i+1,(*unfresIDS[0])(i)/bw/
}
for(int i=0;i<nx;i++) {
for(int j=0;j<nx;j++) {
double rho= covIDSrep(i,j)/
cout<<"bad error matrix: iter="<<iter<<"\n";
exit(0);
}
}
}
}
}
#endif
subn[0]=
new TPad(
"subn0",
"",0.,0.5,1.,1.);
subn[1]=
new TPad(
"subn1",
"",0.,0.,0.5,0.5);
subn[2]=
new TPad(
"subn2",
"",0.5,0.0,1.,0.5);
for(int i=0;i<3;i++) {
}
subc[0]=
new TPad(
"sub0",
"",0.,0.5,1.,1.);
subc[1]=
new TPad(
"sub1",
"",0.,0.,0.5,0.5);
subc[2]=
new TPad(
"sub2",
"",0.5,0.0,1.,0.5);
for(int i=0;i<3;i++) {
}
DrawPadTruth(histMcsigGenO,histDataGenO,nullptr);
DrawPadReco(histMcRecCO,histMcbgrRecCO,histDataRecCO,nullptr,nullptr,nullptr);
DrawPadProbability(histProbCO);
DrawPadEfficiency(histEfficiencyC);
int iFitInversion=table.size();
DoFit(histOutputCtau0O,histRhoCtau0O,histDataGenO,"inversion",table);
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputCtau0O,"inversion",0.,
&table[table.size()-1].second);
DrawPadCorrelations(histRhoCtau0O,&table);
DrawPadReco(histMcRecCO,histMcbgrRecCO,histDataRecCO,
histOutputCtau0O,histProbCO,histRhoCtau0O);
DoFit(histOutputFtau0O,histRhoFtau0O,histDataGenO,"template",table);
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputFtau0O,"fit",0.,
&table[table.size()-1].second);
DrawPadCorrelations(histRhoFtau0O,&table);
DrawPadReco(histMcRecFO,histMcbgrRecFO,histDataRecFO,
histOutputFtau0O,histProbFO,histRhoFtau0O);
DoFit(histOutputFAtau0O,histRhoFAtau0O,histDataGenO,"template+area",table);
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputFAtau0O,"fit",0.,
&table[table.size()-1].second);
DrawPadCorrelations(histRhoFAtau0O,&table);
DrawPadReco(histMcRecFO,histMcbgrRecFO,histDataRecFO,
histOutputFAtau0O,histProbFO,histRhoFAtau0O);
int iFitFALCurve=table.size();
DoFit(histOutputFALCurveO,histRhoFALCurveO,histDataGenO,"Tikhonov+area",table);
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputFALCurveO,"Tikhonov",tauFA,
&table[table.size()-1].second);
DrawPadCorrelations(histRhoFALCurveO,&table);
DrawPadReco(histMcRecFO,histMcbgrRecFO,histDataRecFO,
histOutputFALCurveO,histProbFO,histRhoFALCurveO);
int iFitFArho=table.size();
DoFit(histOutputFArhoO,histRhoFArhoO,histDataGenO,"min(rhomax)",table);
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputFArhoO,"Tikhonov",tauFArho,
&table[table.size()-1].second);
DrawPadCorrelations(histRhoFArho,&table);
DrawPadReco(histMcRecFO,histMcbgrRecFO,histDataRecFO,
histOutputFArhoO,histProbFO,histRhoFArhoO);
int iFitBinByBin=table.size();
DoFit(histOutputBBBO,histRhoBBBO,histDataGenO,"bin-by-bin",table);
DrawPadReco(histMcRecCO,histMcbgrRecCO,histDataRecCO,
histOutputBBBO,histProbCO,histRhoBBBO);
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputBBBO,"bin-by-bin",0.,
&table[table.size()-1].second);
int iAgoFirstFit=table.size();
for(size_t i=1;i<histRhoAgorep.size();i++) {
bool isFitted=false;
DoFit(histOutputAgorep[i],histRhoAgorep[i],histDataGenO,
isFitted=true;
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputAgorep[i],
isFitted ? &table[table.size()-1].second : nullptr);
DrawPadCorrelations(histRhoAgorep[i],&table);
DrawPadReco(histMcRecCO,histMcbgrRecCO,histDataRecCO,
histOutputAgorep[i],histProbCO,histRhoAgorep[i]);
}
int iAgoLastFit=table.size();
#ifdef WITH_IDS
int iIDSFirstFit=table.size();
for(size_t i=2;i<histRhoIDS.size();i++) {
bool isFitted=false;
DoFit(histOutputIDS[i],histRhoIDS[i],histDataGenO,
isFitted=true;
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputIDS[i],
isFitted ? &table[table.size()-1].second : 0);
DrawPadCorrelations(histRhoIDS[i],&table);
DrawPadReco(histMcRecCO,histMcbgrRecCO,histDataRecCO,
histOutputIDS[i],histProbCO,histRhoIDS[i]);
}
int iIDSLastFit=table.size();
#endif
int nfit=table.size();
TH1D *fitChindf=
new TH1D(
"fitChindf",
";algorithm;#chi^{2}/NDF",nfit,0,nfit);
TH1D *fitNorm=
new TH1D(
"fitNorm",
";algorithm;Landau amplitude [1/GeV]",nfit,0,nfit);
TH1D *fitMu=
new TH1D(
"fitMu",
";algorithm;Landau #mu [GeV]",nfit,0,nfit);
TH1D *fitSigma=
new TH1D(
"fitSigma",
";algorithm;Landau #sigma [GeV]",nfit,0,nfit);
for(int fit=0;fit<nfit;fit++) {
cout<<
"\""<<
f->GetName()<<
"\","<<
r[2]/
r[3]<<
","<<
r[3]
<<","<<chi2/ndf
<<","<<ndf
for(int i=1;i<3;i++) {
cout<<
","<<
f->GetParameter(i)<<
",\"\302\261\","<<
f->GetParError(i);
}
cout<<"\n";
}
lCurve->
SetTitle(
"L curve;log_{10} L_{x};log_{10} L_{y}");
logTauX->
SetTitle(
";log_{10} #tau;log_{10} L_{x}");
logTauY->
SetTitle(
";log_{10} #tau;log_{10} L_{y}");
logTauCurvature->
SetTitle(
";log_{10}(#tau);L curve curvature");
rhoScan->
SetTitle(
";log_{10}(#tau);average(#rho_{i})");
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputFALCurveO,"Tikhonov",tauFA,
&table[iFitFALCurve].second);
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputFArhoO,"Tikhonov",tauFArho,
&table[iFitFArho].second);
GetNiterGraphs(iAgoFirstFit,iAgoFirstFit+1,table,
kRed-2,graphNiterAgoBay,20);
GetNiterGraphs(iAgoFirstFit,iAgoLastFit,table,
kRed,graphNiterAgo,24);
#ifdef WITH_IDS
GetNiterGraphs(iIDSFirstFit,iIDSLastFit,table,
kMagenta,graphNiterIDS,21);
#endif
TH1 *histNiterInversion[4];
GetNiterHist(iFitInversion,table,histNiterInversion,
kCyan,1,1001);
TH1 *histNiterFALCurve[4];
GetNiterHist(iFitFALCurve,table,histNiterFALCurve,
kBlue,2,3353);
GetNiterHist(iFitFArho,table,histNiterFArho,
kAzure-4,3,3353);
TH1 *histNiterBinByBin[4];
GetNiterHist(iFitBinByBin,table,histNiterBinByBin,
kOrange+1,3,3335);
for(int i=0;i<2;i++) {
if(! histNiterInversion[i]) continue;
histNiterInversion[i]->
Draw(
"][");
histNiterFALCurve[i]->
Draw(
"SAME ][");
histNiterFArho[i]->
Draw(
"SAME ][");
histNiterBinByBin[i]->
Draw(
"SAME ][");
graphNiterAgo[i]->
Draw(
"LP");
graphNiterAgoBay[i]->
Draw(
"P");
#ifdef WITH_IDS
graphNiterIDS[i]->
Draw(
"LP");
#endif
if(i==1) {
legend=
new TLegend(0.48,0.28,0.87,0.63);
} else {
legend=
new TLegend(0.45,0.5,0.88,0.88);
}
legend->
AddEntry( histNiterInversion[0],
"inversion",
"l");
legend->
AddEntry( histNiterFALCurve[0],
"Tikhonov L-curve",
"l");
legend->
AddEntry( histNiterFArho[0],
"Tikhonov global cor.",
"l");
legend->
AddEntry( histNiterBinByBin[0],
"bin-by-bin",
"l");
legend->
AddEntry( graphNiterAgoBay[0],
"\"Bayesian\"",
"p");
legend->
AddEntry( graphNiterAgo[0],
"iterative",
"p");
#ifdef WITH_IDS
legend->
AddEntry( graphNiterIDS[0],
"IDS",
"p");
#endif
}
DrawPadTruth(histMcsigGenO,histDataGenO,histOutputFALCurveO,"Tikhonov",tauFA,
&table[iFitFALCurve].second,table[iFitFALCurve].first);
histNiterInversion[3]->
Draw(
"SAME HIST ][");
histNiterFALCurve[3]->
Draw(
"SAME HIST ][");
histNiterFArho[3]->
Draw(
"SAME HIST ][");
histNiterBinByBin[3]->
Draw(
"SAME HIST ][");
double yTrue=1.8;
line=
new TLine(histNiterInversion[3]->GetXaxis()->GetXmin(),
yTrue,
histNiterInversion[3]->GetXaxis()->GetXmax(),
yTrue);
graphNiterAgo[3]->
Draw(
"LP");
graphNiterAgoBay[3]->
Draw(
"P");
#ifdef WITH_IDS
graphNiterIDS[3]->
Draw(
"LP");
#endif
legend=
new TLegend(0.55,0.53,0.95,0.97);
legend->
AddEntry( histNiterInversion[3],
"inversion",
"l");
legend->
AddEntry( histNiterFALCurve[3],
"Tikhonov L-curve",
"l");
legend->
AddEntry( histNiterFArho[3],
"Tikhonov global cor.",
"l");
legend->
AddEntry( histNiterBinByBin[3],
"bin-by-bin",
"l");
legend->
AddEntry( graphNiterAgoBay[3],
"\"Bayesian\"",
"p");
legend->
AddEntry( graphNiterAgo[3],
"iterative",
"p");
#ifdef WITH_IDS
legend->
AddEntry( graphNiterIDS[3],
"IDS",
"p");
#endif
delete outputFile;
}
for(int ifit=iFirst;ifit<iLast;ifit++) {
chi2(ifit-iFirst)=
r[2]/
r[3];
TF1 const *
f=table[ifit].first;
mean(ifit-iFirst)=
f->GetParameter(1);
emean(ifit-iFirst)=
f->GetParError(1);
sigma(ifit-iFirst)=
f->GetParameter(2);
esigma(ifit-iFirst)=
f->GetParError(2);
}
graph[0]=
new TGraph(niter,chi2);
graph[1]=
new TGraph(niter,gcor);
}
}
}
TH1 *hist[4],
int color,
int style,
int fillStyle) {
TF1 const *
f=table[ifit].first;
hist[0]=
new TH1D(table[ifit].first->GetName()+
TString(
"_chi2"),
";iteration;unfold-truth #chi^{2}/N_{D.F.}",1,0.2,1500.);
hist[1]=
new TH1D(table[ifit].first->GetName()+
TString(
"_gcor"),
";iteration;avg(#rho_{i})",1,0.2,1500.);
hist[2]=
new TH1D(table[ifit].first->GetName()+
TString(
"_mu"),
";iteration;parameter #mu",1,0.2,1500.);
hist[3]=
new TH1D(table[ifit].first->GetName()+
TString(
"_sigma"),
";iteration;parameter #sigma",1,0.2,1500.);
if( hist[
h]->GetBinError(1)>0.0) {
}
}
}
}
h[2]=(
TH1 *)
h[1]->Clone(baseName+
"_binw");
for(
Int_t iSrc=0;iSrc<nMax;iSrc++) {
Int_t iDest=binMap[iSrc];
double c=
h[0]->GetBinContent(iSrc)+
h[1]->GetBinContent(iDest);
h[1]->SetBinContent(iDest,
c);
h[1]->SetBinError(iDest,
e);
h[2]->SetBinContent(iDest,
c);
h[2]->SetBinError(iDest,
e);
}
for(
int iDest=0;iDest<=
h[2]->GetNbinsX()+1;iDest++) {
double c=
h[2]->GetBinContent(iDest);
double e=
h[2]->GetBinError(iDest);
if(bw>0.0) {
h[2]->SetBinContent(iDest,
c/bw);
h[2]->SetBinError(iDest,
e/bw);
} else {
}
}
}
}
TH2 *AddOverflowXY(
TH2 *
h,
double widthX,
double widthY) {
double *xBins=new double[nx+2];
double *yBins=new double[ny+2];
for(int i=1;i<=nx;i++) {
xBins[i-1]=
h->GetXaxis()->GetBinLowEdge(i);
}
xBins[nx]=
h->GetXaxis()->GetBinUpEdge(nx);
xBins[nx+1]=xBins[nx]+widthX;
for(int i=1;i<=ny;i++) {
yBins[i-1]=
h->GetYaxis()->GetBinLowEdge(i);
}
yBins[ny]=
h->GetYaxis()->GetBinUpEdge(ny);
yBins[ny+1]=yBins[ny]+widthY;
for(int ix=0;ix<=nx+1;ix++) {
for(int iy=0;iy<=ny+1;iy++) {
r->SetBinContent(ix,iy,
h->GetBinContent(ix,iy));
r->SetBinError(ix,iy,
h->GetBinError(ix,iy));
}
}
delete [] yBins;
delete [] xBins;
}
TH1 *AddOverflowX(
TH1 *
h,
double widthX) {
double *xBins=new double[nx+2];
for(int i=1;i<=nx;i++) {
xBins[i-1]=
h->GetXaxis()->GetBinLowEdge(i);
}
xBins[nx]=
h->GetXaxis()->GetBinUpEdge(nx);
xBins[nx+1]=xBins[nx]+widthX;
for(int ix=0;ix<=nx+1;ix++) {
r->SetBinContent(ix,
h->GetBinContent(ix));
r->SetBinError(ix,
h->GetBinError(ix));
}
delete [] xBins;
}
void DrawOverflowX(
TH1 *
h,
double posy) {
double x1=
h->GetXaxis()->GetBinLowEdge(
h->GetNbinsX());
double x2=
h->GetXaxis()->GetBinUpEdge(
h->GetNbinsX());
double y0=
h->GetYaxis()->GetBinLowEdge(1);
double y2=
h->GetYaxis()->GetBinUpEdge(
h->GetNbinsY());;
if(
h->GetDimension()==1) {
}
double w1=-0.3;
}
void DrawOverflowY(
TH1 *
h,
double posx) {
double x0=
h->GetXaxis()->GetBinLowEdge(1);
double x2=
h->GetXaxis()->GetBinUpEdge(
h->GetNbinsX());
double y1=
h->GetYaxis()->GetBinLowEdge(
h->GetNbinsY());;
double y2=
h->GetYaxis()->GetBinUpEdge(
h->GetNbinsY());;
double w1=-0.3;
}
void DrawPadProbability(
TH2 *
h) {
h->SetTitle(
"migration probabilities;P_{T}(gen) [GeV];P_{T}(rec) [GeV]");
}
void DrawPadEfficiency(
TH1 *
h) {
h->SetTitle(
"efficiency;P_{T}(gen) [GeV];#epsilon");
legEfficiency->
AddEntry(
h,
"reconstruction",
"l");
}
void DrawPadReco(
TH1 *histMcRec,
TH1 *histMcbgrRec,
TH1 *histDataRec,
TH1 *histDataUnfold,
TH2 *histProbability,
TH2 *histRhoij) {
double amax=0.0;
}
histMcRec->
SetTitle(
"Reconstructed;P_{T}(rec);Nevent / GeV");
histMcbgrRec->
Draw(
"SAME HIST");
TH1 * histFoldBack=
nullptr;
if(histDataUnfold && histProbability && histRhoij) {
) {
for(int ix=1;ix<=nrec;ix++) {
double sume2=0.0;
for(
int iy=0;iy<=histProbability->
GetNbinsX()+1;iy++) {
for(
int iy2=0;iy2<=histProbability->
GetNbinsX()+1;iy2++) {
}
}
}
} else {
cout<<"can not fold back: "<<nrec
<<"\n";
exit(0);
}
histFoldBack->
Draw(
"SAME HIST");
}
histDataRec->
Draw(
"SAME");
DrawOverflowX(histMcRec,0.5);
legRec->
AddEntry(histMcRec,
"MC total",
"l");
legRec->
AddEntry(histMcbgrRec,
"background",
"f");
if(histFoldBack) {
int ndf=-kNbinC;
double sumD=0.,sumF=0.,chi2=0.;
for(
int i=1;i<=histDataRec->
GetNbinsX();i++) {
chi2+= pull*pull;
ndf+=1;
}
} else {
legRec->
AddEntry(histDataRec,
"data",
"lp");
}
}
void DrawPadTruth(
TH1 *histMcsigGen,
TH1 *histDataGen,
TH1 *histDataUnfold,
double amin=0.;
double amax=0.;
for(
int i=1;i<=histMcsigGen->
GetNbinsX();i++) {
if(histDataUnfold) {
}
}
histMcsigGen->
SetTitle(
"Truth;P_{T};Nevent / GeV");
histMcsigGen->
Draw(
"HIST");
histDataGen->
Draw(
"SAME HIST");
if(histDataUnfold) {
histDataUnfold->
Draw(
"SAME");
}
DrawOverflowX(histMcsigGen,0.5);
}
legTruth->
AddEntry(histMcsigGen,
"MC",
"l");
if(!histDataUnfold) legTruth->
AddEntry((
TObject *)
nullptr,
" Landau(5,2)",
"");
legTruth->
AddEntry(histDataGen,
"data",
"l");
if(!histDataUnfold) legTruth->
AddEntry((
TObject *)
nullptr,
" Landau(6,1.8)",
"");
if(histDataUnfold) {
if(tau>0) {
}
legTruth->
AddEntry(histDataUnfold,t,
"lp");
("#chi^{2}/%d=%.1f prob=%.3f",
(
int)(*
r)[3],(*
r)[2]/(*
r)[3],
}
}
}
if(histDataUnfold ) {
TPad *subpad =
new TPad(
"subpad",
"",0.35,0.29,0.88,0.68);
amin=0.;
amax=0.;
int istart=11;
for(
int i=istart;i<=histMcsigGen->
GetNbinsX();i++) {
}
copyMcsigGen->
Draw(
"HIST");
copyDataGen->
Draw(
"SAME HIST");
copyDataUnfold->
Draw(
"SAME");
((
TF1 *)
f->Clone())->Draw(
"SAME");
}
}
}
void DrawPadCorrelations(
TH2 *
h,
h->SetTitle(
"correlation coefficients;P_{T}(gen) [GeV];P_{T}(gen) [GeV]");
if(table) {
}
}
if(flag==0) {
cout<<"fcn flag=0: npar="<<npar<<" gin="<<gin<<" par=[";
for(int i=0;i<npar;i++) {
cout<<" "<<u[i];
}
cout<<"]\n";
}
double x0=0,y0=0.;
if(i>0) {
double iy=u[0]*u[2]*(
y1-y0)/(
x1-x0);
}
}
}
cout<<
h->GetName()<<
"\n";
double gcorAvg=0.;
double rhoMin=0.;
double rhoMax=0.;
if(rho) {
(
h->GetBinError(i+1)*
h->GetBinError(j+1));
}
}
if(di(i)>0.0) {
} else {
cout<<"bad eigenvalue i="<<i<<" di="<<di(i)<<"\n";
exit(0);
}
}
int error=0;
error++;
}
if(i==j) continue;
}
}
rhoMin=1.;
rhoMax=-1.;
(
h->GetBinError(i+1)*
h->GetBinError(j+1));
if(i!=j) {
if(rho_ij<rhoMin) rhoMin=rho_ij;
if(rho_ij>rhoMax) rhoMax=rho_ij;
}
}
}
if(di1(i)>0.0) {
d1(i,i)=1./di1(i);
} else {
cout<<"bad eigenvalue i="<<i<<" di1="<<di1(i)<<"\n";
exit(0);
}
}
double gcor2=1.-1./(vinv1(i,i)*
v1(i,i));
if(gcor2>=0.0) {
gcorAvg += gcor;
} else {
cout<<"bad global correlation "<<i<<" "<<gcor2<<"\n";
}
}
}
double xmax=
h->GetXaxis()->GetBinUpEdge(
h->GetNbinsX()-1);
landau->SetParameter(0,6000.);
fcn(
np,
nullptr,
r[0],
landau->GetParameters(),0);
r[1]=
h->GetNbinsX()-1-
landau->GetNpar();
for(
int i=0;i<
h->GetNbinsX()-1;i++) {
if(g_fcnMatrix) {
for(
int j=0;j<
h->GetNbinsX()-1;j++) {
r[2]+=di*dj*(*g_fcnMatrix)(i,j);
}
} else {
double pull=di/
h->GetBinError(i+1);
}
}
if(rho) {
g_fcnHist=nullptr;
delete g_fcnMatrix;
g_fcnMatrix=nullptr;
}
table.push_back(make_pair(landau,
r));
return s;
}
#ifdef WITH_IDS
#include "ids_code.cc"
for(
Int_t i=0; i<N_; i++ ){ (*soustr)[i] = 0.; }
unfres1IDS_ = Unfold(
data, dataErr, A_, N_, lambdaL_, soustr );
}
ModifyMatrix( Am_, A_, unfres2IDS_, dataErr, N_, lambdaM_, soustr, lambdaS_ );
delete unfres2IDS_;
unfres2IDS_ = Unfold(
data, dataErr, Am_, N_, lambdaU_, soustr );
}
#endif
int Int_t
Signed integer 4 bytes (int)
double Double_t
Double 8 bytes.
externInt_t gErrorIgnoreLevel
errors with level below this value will be ignored. Default is kUnset.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char text
Option_t Option_t TPoint TPoint const char y1
TMatrixTSym< Double_t > TMatrixDSym
TMatrixT< Double_t > TMatrixD
R__EXTERN TStyle * gStyle
TVectorT< Double_t > TVectorD
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void SetBinLabel(Int_t bin, const char *label)
Set label for bin.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual void SetRangeUser(Double_t ufirst, Double_t ulast)
Set the viewing range for the axis from ufirst to ulast (in user coordinates, that is,...
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
Bool_t cd() override
Change current directory to "this" directory.
void GetObject(const char *namecycle, T *&ptr)
Get an object with proper type checking.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) override
Write memory objects to this file.
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
A TGraphErrors is a TGraph with error bars.
A TGraph is an object made of two arrays X and Y with npoints each.
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
void SetTitle(const char *title="") override
Change (i.e.
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual Bool_t Multiply(TF1 *f1, Double_t c1=1)
Performs the operation:
void SetTitle(const char *title) override
Change/set the title.
virtual Int_t GetNbinsY() const
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
virtual Int_t GetNbinsX() const
virtual void SetMaximum(Double_t maximum=-1111)
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2),...
virtual void SetBinError(Int_t bin, Double_t error)
Set the bin Error Note that this resets the bin eror option to be of Normal Type and for the non-empt...
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetMinimum(Double_t minimum=-1111)
static void SetDefaultSumw2(Bool_t sumw2=kTRUE)
When this static function is called with sumw2=kTRUE, all new histograms will automatically activate ...
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2),...
2-D histogram with a double per channel (see TH1 documentation)
Service class for 2-D histogram classes.
void SetBinContent(Int_t bin, Double_t content) override
Set bin content.
TH1D * ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along X (integration along Y).
Double_t GetBinContent(Int_t binx, Int_t biny) const override
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
void Draw(Option_t *option="") override
Draw this legend with its current attributes.
Use the TLine constructor to create a simple line.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The most important graphics class in the ROOT system.
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
void SetFillStyle(Style_t fstyle) override
Override TAttFill::FillStyle for TPad because we want to handle style=0 as style 4000.
void SaveAs(const char *filename="", Option_t *option="") const override
Save the pad content in a file.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
void Draw(Option_t *option="") override
Draw Pad in Current pad (re-parent pad if necessary).
virtual void SetBorderSize(Int_t bordersize=4)
Sets the border size of the TPave box and shadow.
Random number generator class based on M.
virtual ULong64_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
Base class for spline implementation containing the Draw/Paint methods.
void Draw(Option_t *option="") override
Draw this function with its current attributes.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Base class for several text objects.
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
Binning schemes for use with the unfolding algorithm TUnfoldDensity.
TH1 * CreateHistogram(const char *histogramName, Bool_t originalAxisBinning=kFALSE, Int_t **binMap=nullptr, const char *histogramTitle=nullptr, const char *axisSteering=nullptr) const
create a THxx histogram capable to hold the bins of this binning node and its children
Double_t GetBinSize(Int_t iBin) const
get N-dimensional bin size
Int_t GetEndBin(void) const
last+1 bin of this node (includes children)
An algorithm to unfold distributions from detector to truth level.
@ kEScanTauRhoAvg
average global correlation coefficient (from TUnfold::GetRhoI())
TH2 * GetRhoIJtotal(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE)
retreive correlation coefficients, including all uncertainties
TH2 * GetProbabilityMatrix(const char *histogramName, const char *histogramTitle=nullptr, Bool_t useAxisBinning=kTRUE) const
get matrix of probabilities in a new histogram
TH1 * GetOutput(const char *histogramName, const char *histogramTitle=nullptr, const char *distributionName=nullptr, const char *projectionMode=nullptr, Bool_t useAxisBinning=kTRUE) const
retreive unfolding result as a new histogram
virtual Int_t ScanTau(Int_t nPoint, Double_t tauMin, Double_t tauMax, TSpline **scanResult, Int_t mode=kEScanTauRhoAvg, const char *distribution=nullptr, const char *projectionMode=nullptr, TGraph **lCurvePlot=nullptr, TSpline **logTauXPlot=nullptr, TSpline **logTauYPlot=nullptr)
scan a function wrt tau and determine the minimum
@ kDensityModeNone
no scale factors, matrix L is similar to unity matrix
void SubtractBackground(const TH1 *hist_bgr, const char *name, Double_t scale=1.0, Double_t scale_error=0.0)
Specify a source of background.
Int_t SetInput(const TH1 *hist_y, Double_t scaleBias=0.0, Double_t oneOverZeroError=0.0, const TH2 *hist_vyy=nullptr, const TH2 *hist_vyy_inv=nullptr) override
Define input data for subsequent calls to DoUnfold(tau)
virtual Double_t DoUnfold(void)
core unfolding algorithm
virtual Int_t ScanLcurve(Int_t nPoint, Double_t tauMin, Double_t tauMax, TGraph **lCurve, TSpline **logTauX=nullptr, TSpline **logTauY=nullptr, TSpline **logTauCurvature=nullptr)
scan the L curve, determine tau and unfold at the final value of tau
@ kEConstraintArea
enforce preservation of the area
@ kEConstraintNone
use no extra constraint
ERegMode
choice of regularisation scheme
@ kRegModeSize
regularise the amplitude of the output distribution
@ kHistMapOutputHoriz
truth level on x-axis of the response matrix
Double_t GetTau(void) const
return regularisation parameter
virtual void SetFCN(void(*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t))
To set the address of the minimization objective function called by the native compiler (see function...
static TVirtualFitter * Fitter(TObject *obj, Int_t maxpar=25)
Static function returning a pointer to the current fitter.
double landau(double x, double mu, double sigma)
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Prob(Double_t chi2, Int_t ndf)
Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf...
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Hypot(Double_t x, Double_t y)
Returns sqrt(x*x + y*y)
Double_t LandauI(Double_t x)
Returns the cumulative (lower tail integral) of the Landau distribution function at point x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
static uint64_t sum(uint64_t i)