Created
October 18, 2016 20:47
-
-
Save simonspa/6c1427738ff1b236f15a76ba944f876b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Method to analytically approximate the MPV of the Landau distribution, e.g. for charge deposited. | |
When filling histogram, fill with Moyal distribution instead of charge directly: | |
qMoyalvsxmym->fill( xmod, ymod, exp(- Q0 / 3.5) ); | |
where 3.5 is a normalization factor corresponding to <> | |
After filling the histogram, rebin using | |
for(Int_t i = 1; i <= h->GetNbinsX(); i++) { | |
for(Int_t j = 1; j <= h->GetNbinsY(); j++) { | |
double qx = h->GetBinContent(i,j); | |
h->SetBinEntries(h->GetBin(i,j),1); | |
h->SetBinContent(i,j,-3.5*log(qx)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment