diff --git a/roofit/histfactory/inc/RooStats/HistFactory/Measurement.h b/roofit/histfactory/inc/RooStats/HistFactory/Measurement.h index 8c8cf30dc0bd8..8907b200b8f3c 100644 --- a/roofit/histfactory/inc/RooStats/HistFactory/Measurement.h +++ b/roofit/histfactory/inc/RooStats/HistFactory/Measurement.h @@ -650,9 +650,9 @@ extern Channel BadChannel; class Measurement : public TNamed { public: - Measurement(); - /// Measurement( const Measurement& other ); // Copy - Measurement(const char *Name, const char *Title = ""); + Measurement() = default; + /// Constructor specifying name and title of measurement + Measurement(const char *Name, const char *Title = "") : TNamed(Name, Title) {} /// set output prefix void SetOutputFilePrefix(const std::string &prefix) { fOutputFilePrefix = prefix; } @@ -724,7 +724,8 @@ class Measurement : public TNamed { std::vector &GetChannels() { return fChannels; } const std::vector &GetChannels() const { return fChannels; } RooStats::HistFactory::Channel &GetChannel(std::string); - void AddChannel(RooStats::HistFactory::Channel chan); + /// Add a completely configured channel. + void AddChannel(RooStats::HistFactory::Channel chan) { fChannels.push_back(chan); } bool HasChannel(std::string); void writeToFile(TFile *file); @@ -752,10 +753,10 @@ class Measurement : public TNamed { /// Configurables of this measurement std::string fOutputFilePrefix; std::vector fPOI; - double fLumi; - double fLumiRelErr; - int fBinLow; - int fBinHigh; + double fLumi = 1.0; + double fLumiRelErr = 0.1; + int fBinLow = 0; + int fBinHigh = 1; bool fExportOnly = true; std::string fInterpolationScheme; diff --git a/roofit/histfactory/src/Measurement.cxx b/roofit/histfactory/src/Measurement.cxx index bc7b84e43e673..9955131003768 100644 --- a/roofit/histfactory/src/Measurement.cxx +++ b/roofit/histfactory/src/Measurement.cxx @@ -41,29 +41,6 @@ uncertainty or the functional form of constraints on nuisance parameters. namespace RooStats::HistFactory { -/// Standard constructor -Measurement::Measurement() : fLumi(1.0), fLumiRelErr(.10), fBinLow(0), fBinHigh(1) {} - -/* -Measurement::Measurement(const Measurement& other) : - POI( other.POI ), Lumi( other.Lumi ), LumiRelErr( other.LumiRelErr ), - BinLow( other.BinLow ), BinHigh( other.BinHigh ), ExportOnly( other.ExportOnly ), - channels( other.channels ), OutputFilePrefix( other.outputFilePrefix ), - constantParams( other.constantParams ), { ; } -*/ - -/// Standard constructor specifying name and title of measurement -Measurement::Measurement(const char *Name, const char *Title) - : TNamed(Name, Title), fLumi(1.0), fLumiRelErr(.10), fBinLow(0), fBinHigh(1) -{ -} - -/// add a completely configured channel -void Measurement::AddChannel(Channel chan) -{ - fChannels.push_back(chan); -} - /// Set a parameter in the model to be constant. /// the parameter does not have to exist yet, the information will be used when /// the model is actually created. @@ -183,13 +160,6 @@ Channel &Measurement::GetChannel(std::string ChanName) // return BadChannel; } -/* - void Measurement::Print( Option_t* option ) const { - Measurement::Print( std::cout ); - return; - } -*/ - /// Print information about measurement object in tree-like structure to given stream void Measurement::PrintTree(std::ostream &stream) { @@ -270,14 +240,7 @@ void Measurement::PrintXML(std::string directory, std::string newOutputPrefix) // Add the time xml << "