Upload
shanna-sharp
View
220
Download
0
Embed Size (px)
Citation preview
Relational DatabasesRelational Databases
Maintaining Sanity in aMaintaining Sanity in a
Modern Partial Wave AnalysisModern Partial Wave Analysis
Douglas Applegate
April 19, 2023
Carnegie Mellon University
A Brief Discussion ofA Brief Discussion of Numerical Stability inNumerical Stability in
MinuitMinuit
Also:Also:
OutlineOutline
The ProblemThe Problem• Too much information, too many fitsToo much information, too many fits
Advantages of a MySQL solutionAdvantages of a MySQL solution Overview of the database setupOverview of the database setup
Minuit numerical stabilityMinuit numerical stability• Is there a problem?Is there a problem?
Output of a FitOutput of a Fit
What do you need to know?What do you need to know?• LikelihoodLikelihood• Parameter valuesParameter values• Errors on valuesErrors on values
What is nice to have?What is nice to have?• YieldsYields• Cross SectionsCross Sections
for each channel, spin,
projection, etc…
The FitInfo ClassThe FitInfo Class
All fit output in one locationAll fit output in one location No text parsing No text parsing (but we still create a txt file!)(but we still create a txt file!)
ROOT compatibleROOT compatible• Stored in root fileStored in root file
Scaling IssuesScaling Issues
For an analysis:For an analysis:
150 fits X 75 bins X 10 iterations/bin =150 fits X 75 bins X 10 iterations/bin =
112,500112,500 FitInfo root files! FitInfo root files!
Other IssuesOther Issues
Accessibility of informationAccessibility of information• Want to make a dynamic status Want to make a dynamic status
webpagewebpage Code modularityCode modularity
• IO code and analysis code shouldn’t mixIO code and analysis code shouldn’t mix
Solution: Solution: A Relational DatabaseA Relational Database
(MySQL)(MySQL)
The Relational Database SolutionThe Relational Database Solution
Dataset
•Name, Location
W bin
•Range, Flux
Fit
•Name, Location, Description
Iteration
•Number, Likelihood, Location
Amplitude
A Very Fancy Index
Some SQLSome SQL Dataset NameDataset Name
SELECT Name FROM Dataset WHERE Dataset_id = %d;
Best Iteration (in 3 statements)CREATE TEMPORARY TABLE temp_minlh (rec_id int not null
auto_increment primary key, minVal float(10) not null);
INSERT INTO temp_minlh (minVal) SELECT MIN(Likelihood) AS best FROM Iteration WHERE Wbin_id = %d AND Fit_id = %d GROUP BY Fit_id;
SELECT Iteration_number FROM Iteration, temp_minlh WHERE Iteration.Likelihood = minVal AND Wbin_id = %d AND Fit_id = %d GROUP BY Likelihood;
The Relational Database SolutionThe Relational Database Solution
ROOT Users Web Page…
C++ Interface
MySQL
(Index Service)
File System
Stand Alone Apps
Possible applications
C++ Interface ClassC++ Interface Class
ModularityModularity• MySQL code hiddenMySQL code hidden• SQL syntax hiddenSQL syntax hidden• File IO hiddenFile IO hidden• Memory management of FitInfo classes Memory management of FitInfo classes
hiddenhidden LightweightLightweight ROOT compatibleROOT compatible
MinuitMinuitNumerical StabilityNumerical Stability
Is There A Problem?Is There A Problem?
Numerical StabilityNumerical Stability
Are parameter values consistent?Are parameter values consistent? Are reported errors meaningful?Are reported errors meaningful?
Minuit Parameter ValuesMinuit Parameter Values
Yield ValuesYield Values
Yield ValuesYield Values
Errors on YieldsErrors on Yields
Error on YieldsError on Yields
Numerical StabilityNumerical Stability
Are parameter values consistent?Are parameter values consistent?• YesYes
Are reported errors meaningful?Are reported errors meaningful?• Consistent (if HESSE is called)Consistent (if HESSE is called)
ConclusionsConclusions
Relational Databases:Relational Databases:• Organized, easily searchable resultsOrganized, easily searchable results• Code modularityCode modularity• Ease of useEase of use
MinuitMinuit• For a given likelihood, results are For a given likelihood, results are
consistentconsistent• Errors are consistent (with HESSE)Errors are consistent (with HESSE)