Skip to content

Commit

Permalink
[RF] Minor typo and doxygen style fixes in RooFit
Browse files Browse the repository at this point in the history
  • Loading branch information
guitargeek committed Jan 18, 2023
1 parent b350fdc commit aeb5eee
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion roofit/RDataFrameHelpers/test/testActionHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TEST(RooAbsDataHelper, SkipEventsOutOfRange) {
auto dataSetRDF = rdf.Book<double>(RooDataSetHelper("dataSetRDF", "dataSetRDF", RooArgSet(x)), {"x"});

// Check if in the creation of the datasets, the entries outside the
// variable range were sucessfully discarded.
// variable range were successfully discarded.
double nPassing = *rdf.Filter("x >= -2 && x <= 2.0").Count();

EXPECT_EQ(dataSetRDF->numEntries(), nPassing);
Expand Down
4 changes: 2 additions & 2 deletions roofit/multiprocess/src/HeatmapAnalyzer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ std::unique_ptr<TH2I> HeatmapAnalyzer::analyze(int analyzed_gradient)
// partial heatmap is the heatmap that will be filled in for the current durations logfile
std::unique_ptr<TH2I> partial_matrix = std::make_unique<TH2I>("partial_heatmap", "", eval_partitions_names_.size(), 0, 1, tasks_names_.size(), 0, 1);

// remove unneccesary components (those that are out of range)
// remove unnecessary components (those that are out of range)
for (auto &&el : durations_json.items()) {
auto beg_interval =
std::upper_bound(durations_json[el.key()].begin(), durations_json[el.key()].end(), gradient_start_t);
Expand Down Expand Up @@ -210,4 +210,4 @@ void HeatmapAnalyzer::sortTaskNames(std::vector<std::string> &task_names)
}

} // namespace MultiProcess
} // namespace RooFit
} // namespace RooFit
4 changes: 2 additions & 2 deletions roofit/multiprocess/src/JobManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ Job *JobManager::get_job_object(std::size_t job_object_id)
/// \return Returns 'true' when removed successfully, 'false' otherwise.
bool JobManager::remove_job_object(std::size_t job_object_id)
{
bool removed_succesfully = job_objects_.erase(job_object_id) == 1;
bool removed_successfully = job_objects_.erase(job_object_id) == 1;
if (job_objects_.empty()) {
instance_.reset(nullptr);
}
return removed_succesfully;
return removed_successfully;
}

ProcessManager &JobManager::process_manager() const
Expand Down
2 changes: 1 addition & 1 deletion roofit/roofitcore/inc/RooAbsPdf.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class RooAbsPdf : public RooAbsReal {


////////////////////////////////////////////////////////////////////////////////
/// As RooAbsPdf::generateBinned(const RooArgSet&, const RooCmdArg&,const RooCmdArg&, const RooCmdArg&,const RooCmdArg&, const RooCmdArg&,const RooCmdArg&)
/// As RooAbsPdf::generateBinned(const RooArgSet&, const RooCmdArg&,const RooCmdArg&, const RooCmdArg&,const RooCmdArg&, const RooCmdArg&,const RooCmdArg&) const.
/// \param[in] whatVars set
/// \param[in] nEvents How many events to generate
/// \param arg1,arg2,arg3,arg4,arg5 ordered arguments
Expand Down
11 changes: 5 additions & 6 deletions roofit/roofitcore/src/RooAbsPdf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ double RooAbsPdf::extendedTerm(double sumEntries, double expected, double sumEnt
/// of this PDF for the given number of observed events.
///
/// This function is a wrapper around
/// RooAbsPdf::extendedTerm(double observed, const RooArgSet* nset), where the
/// RooAbsPdf::extendedTerm(double, const RooArgSet*, double, bool), where the
/// number of observed events and observables to be used as the normalization
/// set for the pdf is extracted from a RooAbsData.
///
Expand Down Expand Up @@ -1042,9 +1042,9 @@ RooAbsReal* RooAbsPdf::createNLL(RooAbsData& data, const RooLinkedList& cmdList)
const bool ext = interpretExtendedCmdArg(*this, pc.getInt("ext")) ;
Int_t numcpu = pc.getInt("numcpu") ;
Int_t numcpu_strategy = pc.getInt("interleave");
// strategy 3 works only for RooSimultaneus.
// strategy 3 works only for RooSimultaneous.
if (numcpu_strategy==3 && !this->InheritsFrom("RooSimultaneous") ) {
coutW(Minimization) << "Cannot use a NumCpu Strategy = 3 when the pdf is not a RooSimultaneus, "
coutW(Minimization) << "Cannot use a NumCpu Strategy = 3 when the pdf is not a RooSimultaneous, "
"falling back to default strategy = 0" << endl;
numcpu_strategy = 0;
}
Expand Down Expand Up @@ -1628,7 +1628,7 @@ RooFitResult* RooAbsPdf::fitTo(RooAbsData& data, const RooLinkedList& cmdList)
return 0 ;
}

// TimingAnalysis works only for RooSimultaneus.
// TimingAnalysis works only for RooSimultaneous.
if (pc.getInt("timingAnalysis") && !this->InheritsFrom("RooSimultaneous") ) {
coutW(Minimization) << "The timingAnalysis feature was built for minimization with RooSimulteneous "
"and is not implemented for other PDF's. Please create a RooSimultenous to "
Expand Down Expand Up @@ -2372,8 +2372,7 @@ bool RooAbsPdf::isDirectGenSafe(const RooAbsArg& arg) const
/// | `Name(const char* name)` | Name of the output dataset
/// | `Verbose(bool flag)` | Print informational messages during event generation
/// | `NumEvents(int nevt)` | Generate specified number of events
/// | `Extended()` | The actual number of events generated will be sampled from a Poisson distribution with mu=nevt.
/// This can be *much* faster for peaked PDFs, but the number of events is not exactly what was requested.
/// | `Extended()` | The actual number of events generated will be sampled from a Poisson distribution with mu=nevt. This can be *much* faster for peaked PDFs, but the number of events is not exactly what was requested.
/// | `ExpectedData()` | Return a binned dataset _without_ statistical fluctuations (also aliased as Asimov())
///

Expand Down
2 changes: 1 addition & 1 deletion roofit/roostats/src/HypoTestInverterResult.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ double HypoTestInverterResult::GetGraphX(const TGraph & graph, double y0, bool l
if (axmin >= axmax ) {

#ifdef DO_DEBUG
std::cout << "No rage given - check if extrapolation is needed " << std::endl;
std::cout << "No range given - check if extrapolation is needed " << std::endl;
#endif

xmin = graph.GetX()[0];
Expand Down
2 changes: 1 addition & 1 deletion roofit/roostats/src/ToyMCImportanceSampler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RooDataSet* ToyMCImportanceSampler::GetSamplingDistributionsSingleWorker(RooArgS
// remember original #toys, but overwrite it temporarily with the #toys per distribution
Int_t allToys = fNToys;

// to keep track of which dataset entry comes form which density, define a roocategory as a label
// to keep track of which dataset entry comes from which density, define a roocategory as a label
RooCategory densityLabel( "densityLabel", "densityLabel" );
densityLabel.defineType( "null", -1 );
for( unsigned int i=0; i < fImportanceDensities.size(); i++ )
Expand Down

0 comments on commit aeb5eee

Please sign in to comment.