Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HNL beam smearing incorrect #594

Open
olantwin opened this issue Jan 30, 2025 · 0 comments
Open

HNL beam smearing incorrect #594

olantwin opened this issue Jan 30, 2025 · 0 comments

Comments

@olantwin
Copy link
Contributor

HNL smearing (2d Gaussian):

if (fsmearBeam>0){
Double_t test = fsmearBeam*fsmearBeam;
Double_t Rsq = test+1.;
while(Rsq>test){
dx = gRandom->Uniform(-1.,1.) * fsmearBeam;
dy = gRandom->Uniform(-1.,1.) * fsmearBeam;
Rsq = dx*dx+dy*dy;
}

MuonBack (circular smearing including beam sweep):

if (fsmearBeam > 0) {
Double_t r = fsmearBeam + 0.8 * gRandom->Gaus();
Double_t _phi = gRandom->Uniform(0., 2.) * TMath::Pi();
dx = r * TMath::Cos(_phi);
dy = r * TMath::Sin(_phi);
}

Should be simple enough to correct, we should probably define this in a single place to avoid different generators getting out of sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant