- genevb's home page
- Posts
- 2024
- 2023
- 2022
- September (1)
- 2021
- 2020
- 2019
- 2018
- 2017
- December (1)
- October (3)
- September (1)
- August (1)
- July (2)
- June (2)
- April (2)
- March (2)
- February (1)
- 2016
- November (2)
- September (1)
- August (2)
- July (1)
- June (2)
- May (2)
- April (1)
- March (5)
- February (2)
- January (1)
- 2015
- December (1)
- October (1)
- September (2)
- June (1)
- May (2)
- April (2)
- March (3)
- February (1)
- January (3)
- 2014
- 2013
- 2012
- 2011
- January (3)
- 2010
- February (4)
- 2009
- 2008
- 2005
- October (1)
- My blog
- Post new blog entry
- All blogs
TPC charge distribution fit to power law
For many years, we have used the following distribution to model space charge in the TPC, taken from StRoot/StDbUtilities/StMagUtilities.cxx:
Charge(i,j) = zterm * ( 3191/(Radius*Radius) + 122.5/Radius - 0.395 ) / 15823 ;
If we try to fit this distribution with 1/rN, we find N=1.71. Here I use 14 bins in radius (coarse binning) and 280 bins (fine binning) in a simple Monte Carlo simulation:
My code (how2pow.C):
Double_t how2pow(Int_t throws=10000000,Int_t nbins=14) { gStyle->SetOptDate(0); gStyle->SetGridColor(kGray); Double_t guess0 = 3000.0*((Double_t) throws)/((Double_t) nbins); Double_t guess1 = 1.75; TF1* powfunc = new TF1("powfunc","[0]/pow(x,[1])",60,200); powfunc->SetParameter(0,guess0); powfunc->SetParameter(1,guess1); powfunc->SetLineColor(2); printf("Guesses: %g/r^%g\n",guess0,guess1); TF1* howfunc = new TF1("howfunc","3191/(x*x)+(122.5/x)-0.395",60,200); TH1D* howhist = new TH1D("hist","charge distribution",nbins,60,200); howhist->SetXTitle("radius [cm]"); howhist->SetMinimum(0); howhist->SetLineColor(4); howhist->SetLineWidth(2); howhist->FillRandom("howfunc",throws); howhist->Fit(powfunc); double N = powfunc->GetParameter(1); return N; } /////////////////////// Processing how2pow.C(1e7,14)... Guesses: 2.14286e+09/r^1.75 FCN=12611.2 FROM MIGRAD STATUS=CONVERGED 68 CALLS 69 TOTAL EDM=1.17285e-08 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 p0 2.27902e+09 9.51785e+06 1.08672e+03 -4.33372e-11 2 p1 1.71146e+00 9.02537e-04 3.74986e-06 6.21831e-01 (Double_t)1.71146365615700979e+00 /////////////////////// Processing how2pow.C(1e7,280)... Guesses: 1.07143e+08/r^1.75 FCN=13354 FROM MIGRAD STATUS=CONVERGED 77 CALLS 78 TOTAL EDM=3.25874e-11 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 p0 1.12629e+08 4.66121e+05 3.22630e+02 -2.24815e-11 2 p1 1.70946e+00 8.94802e-04 3.86066e-06 2.06545e-02 (Double_t)1.70945568207506549e+00
-Gene
Groups:
- genevb's blog
- Login or register to post comments