Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions README/ReleaseNotes/v628/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,34 @@ For more information, see:

The following people have contributed to this new version:

Rahul Balasubramanian, NIKHEF/ATLAS,\
Bertrand Bellenot, CERN/SFT,\
Jakob Blomer, CERN/SFT,\
Patrick Bos, Netherlands eScience Center,\
Rene Brun, CERN/SFT,\
Will Buttinger, RAL/Atlas,\
Carsten D. Burgard, TU Dortmund University/ATLAS,\
Will Buttinger, RAL/ATLAS,\
Philippe Canal, FNAL,\
Olivier Couet, CERN/SFT,\
Michel De Cian, EPFL/LHCb,\
Mattias Ellert, Uppsala University,\
Gerri Ganis, CERN/SFT,\
Andrei Gheata, CERN/SFT,\
Konstantin Gizdov, University of Edinburgh/LHCb,\
Max Goblirsch, CERN/ATLAS,\
Enrico Guiraud, CERN/SFT,\
Stephan Hageboeck, CERN/IT,\
Jonas Hahnfeld, CERN/SFT,\
Fernando Hueso-González, University of Valencia,\
Subham Jyoti, ITER Bhubaneswar,\
Sergey Linev, GSI,\
Javier Lopez-Gomez, CERN/SFT,\
Enrico Lusiani, INFN/CMS,\
Pere Mato, CERN/SFT,\
Lorenzo Moneta, CERN/SFT,\
Nicolas Morange, CNRS/ATLAS,\
Axel Naumann, CERN/SFT,\
Hanna Olvhammar, CERN/SFT,\
Vincenzo Eduardo Padulano, CERN/SFT and UPV,\
Danilo Piparo, CERN/SFT,\
Fons Rademakers, CERN/SFT,\
Expand All @@ -34,7 +48,8 @@ The following people have contributed to this new version:
Garima Singh, Princeton/SFT,\
Matevz Tadel, UCSD/CMS,\
Vassil Vassilev, Princeton/CMS,\
Wouter Verkerke, NIKHEF/Atlas,\
Wouter Verkerke, NIKHEF/ATLAS,\
Zef Wolffs, NIKHEF/ATLAS,\
Ivan Kabadzhov, CERN/SFT,\
David Poulton, Wits/SFT

Expand Down
5 changes: 2 additions & 3 deletions roofit/hs3/test/testHS3HistFactory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <RooStats/HistFactory/Measurement.h>
#include <RooStats/HistFactory/MakeModelAndMeasurementsFast.h>

#include <RooMsgService.h>
#include <RooHelpers.h>

#include <TROOT.h>

Expand Down Expand Up @@ -73,8 +73,7 @@ measurement(std::string const &inputFileName = "test_hs3_histfactory_json_input.

TEST(TestHS3HistFactoryJSON, Create)
{
auto &msg = RooMsgService::instance();
msg.setGlobalKillBelow(RooFit::WARNING);
RooHelpers::LocalChangeMsgLevel changeMsgLvl(RooFit::WARNING);

toJSON(*measurement(), "hf.json");
}
Expand Down
3 changes: 1 addition & 2 deletions roofit/hs3/test/testRooFitHS3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ TEST(RooFitHS3, RooArgusBG)
{
using namespace RooFit;

auto &msg = RooMsgService::instance();
msg.setGlobalKillBelow(RooFit::WARNING);
RooHelpers::LocalChangeMsgLevel changeMsgLvl(RooFit::WARNING);

// --- Observable ---
RooRealVar mes("mes", "m_{ES} (GeV)", 5.20, 5.30);
Expand Down
11 changes: 0 additions & 11 deletions roofit/roofit/inc/RooMomentMorphFuncND.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,6 @@ class RooMomentMorphFuncND : public RooAbsReal {
RooAbsReal *sumFunc(const RooArgSet *nset);
CacheElem *getCache(const RooArgSet *nset) const;

template <typename T>
struct Digits {
typename std::vector<T>::const_iterator begin;
typename std::vector<T>::const_iterator end;
typename std::vector<T>::const_iterator me;
};

template <typename T>
static void cartesian_product(std::vector<std::vector<T>> &out, std::vector<std::vector<T>> &in);
template <typename Iterator>
static bool next_combination(const Iterator first, Iterator k, const Iterator last);
void findShape(const std::vector<double> &x) const;

friend class CacheElem;
Expand Down
104 changes: 104 additions & 0 deletions roofit/roofit/src/RooFit/Detail/Algorithms.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*
* Project: RooFit
*
* Copyright (c) 2022, CERN
*
* Redistribution and use in source and binary forms,
* with or without modification, are permitted according to the terms
* listed in LICENSE (http://roofit.sourceforge.net/license.txt)
*/

#ifndef RooFit_Detail_Algorithms_h
#define RooFit_Detail_Algorithms_h

#include <vector>

namespace RooFit {
namespace Detail {

//_____________________________________________________________________________
// from http://stackoverflow.com/a/5279601
template <typename T>
void cartesianProduct(std::vector<std::vector<T>> &out, std::vector<std::vector<T>> &in)
{
struct Digits {
typename std::vector<T>::const_iterator begin;
typename std::vector<T>::const_iterator end;
typename std::vector<T>::const_iterator me;
};

std::vector<Digits> vd;
vd.reserve(in.size());

for (auto it = in.begin(); it != in.end(); ++it) {
Digits d = {(*it).begin(), (*it).end(), (*it).begin()};
vd.push_back(d);
}

while (true) {
std::vector<T> result;
for (auto it = vd.begin(); it != vd.end(); ++it) {
result.push_back(*(it->me));
}
out.push_back(result);

for (auto it = vd.begin();;) {
++(it->me);
if (it->me == it->end) {
if (it + 1 == vd.end()) {
return;
} else {
it->me = it->begin;
++it;
}
} else {
break;
}
}
}
}

//_____________________________________________________________________________
// from http://stackoverflow.com/a/5097100/8747
template <typename Iterator>
bool nextCombination(const Iterator first, Iterator k, const Iterator last)
{
if ((first == last) || (first == k) || (last == k)) {
return false;
}
Iterator itr1 = first;
Iterator itr2 = last;
++itr1;
if (last == itr1) {
return false;
}
itr1 = last;
--itr1;
itr1 = k;
--itr2;
while (first != itr1) {
if (*--itr1 < *itr2) {
Iterator j = k;
while (!(*itr1 < *j))
++j;
iter_swap(itr1, j);
++itr1;
++j;
itr2 = k;
rotate(itr1, j, last);
while (last != j) {
++j;
++itr2;
}
rotate(k, itr2, last);
return true;
}
}
rotate(first, k, last);
return false;
}

} // namespace Detail
} // namespace RooFit

#endif
Loading