Skip to content

Commit

Permalink
Do not put temporary TF1 into ROOT's global function pool
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr15Jones committed May 9, 2017
1 parent 8359aa3 commit c74b9dd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions RecoVertex/BeamSpotProducer/src/PVFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,10 @@ bool PVFitter::runFitter() {
TH1F *h1PVz = (TH1F*) hPVx->ProjectionY("h1PVz", 0, -1, "e");

//Use our own copy for thread safety
TF1 gausx("localGausX","gaus");
TF1 gausy("localGausY","gaus");
TF1 gausz("localGausZ","gaus");
// also do not add to global list of functions
TF1 gausx("localGausX","gaus",false);
TF1 gausy("localGausY","gaus",false);
TF1 gausz("localGausZ","gaus",false);

h1PVx->Fit(&gausx,"QLMN0");
h1PVy->Fit(&gausy,"QLMN0");
Expand Down

0 comments on commit c74b9dd

Please sign in to comment.