GithubHelp home page GithubHelp logo

Comments (3)

TomasDado avatar TomasDado commented on June 7, 2024

Hi, I managed to prepare a relatively simple code that reproduces the issue:

void crash() {
  RooStats::HistFactory::Measurement meas("mwe","mwe");
  meas.SetOutputFilePrefix("./");
  meas.SetPOI("signalStrength");
  meas.SetLumi(1);
  meas.AddConstantParam("Lumi");

  RooStats::HistFactory::Channel chan1("channel1");
  chan1.SetData("","");
  RooStats::HistFactory::Sample sample1("sample1");
  sample1.SetHistoName("emu_OS_1b_Ma");
  sample1.SetHistoPath("");
  sample1.SetInputFile("BLIND_separate_tt_Z_29IFB_Apr_29_histos.root");
  sample1.SetNormalizeByTheory(false);
  sample1.AddNormFactor("signalStrength", 1, 0.8, 1.2);
  sample1.AddNormFactor("b", 0.543, 0.5, 0.6);
  sample1.AddOverallSys("Dummy",1,1);

  RooStats::HistFactory::Sample sample2("sample2");
  sample2.SetHistoName("emu_OS_1b_Mb");
  sample2.SetHistoPath("");
  sample2.SetInputFile("BLIND_separate_tt_Z_29IFB_Apr_29_histos.root");
  sample2.SetNormalizeByTheory(false);
  sample2.AddNormFactor("signalStrength", 1, 0.8, 1.2);
  sample2.AddNormFactor("minusONE", -1, -1.1, -0.9);
  sample2.AddNormFactor("b2", 0.2950, 0.0, 1.0);
  sample2.AddOverallSys("Dummy",1,1);

  chan1.AddSample(sample1);
  chan1.AddSample(sample2);

  RooStats::HistFactory::Channel chan2("channel2");
  chan2.SetData("","");
  RooStats::HistFactory::Sample sample3("sample3");
  sample3.SetHistoName("emu_OS_2b_Mc");
  sample3.SetHistoPath("");
  sample3.SetInputFile("BLIND_separate_tt_Z_29IFB_Apr_29_histos.root");
  sample3.SetNormalizeByTheory(false);
  sample2.AddNormFactor("signalStrength", 1, 0.8, 1.2);
  sample3.AddNormFactor("b2", 0.2950, 0.0, 1.0);
  sample3.AddOverallSys("Dummy",1,1);
  chan2.AddSample(sample3);

  meas.AddPreprocessFunction("b2","b*b","b[0.543,0.0,1.0]");
  meas.AddConstantParam("minusONE");
  meas.AddChannel(chan1);
  meas.AddChannel(chan2);
  meas.CollectHistograms();
  RooStats::HistFactory::MakeModelAndMeasurementFast(meas);
}

The code and the input can be found here: /afs/cern.ch/user/t/tdado/public/ROOT_issue_14225

It is probably not the simplest example, but it is realistic (the histograms and the setup come from an actual measurement). Note that using only the first channel does not lead to a crash.

I hope this helps, let me know if I can do more.

from root.

will-cern avatar will-cern commented on June 7, 2024

Am skeptical this could ever have worked even in older releases, because looking at the code I see the method "MakeSingleChannelWorkspace" where the measurement object is passed, and therefore it is assuming any parameter in the constant list must be present in the channel???

Tomas do you get the same error message about "cannot find the variable" in 6.28, but it succeeds? It might be blind luck that it did.

If so the fix is a simple one to just skip over said variable if its not found in the channel.

from root.

TomasDado avatar TomasDado commented on June 7, 2024

Indeed, I get the same error in 6.28.04! I also noticed this error:

[#2] ERROR:HistFactory -- could not corresponding auxiliary measurement  nom_minusONE

But it is amazing that it never crashed in 6.28 even with O(20) runs on different machines/OS/gcc versions

from root.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.