31{
32 B2WARNING("The method KLMLikelihoodParametersImporter::writeMuidParameters() is temporary unavailable, sorry! :(");
33 return;
37 std::vector<std::string> const hypotheses = {"Positron", "Electron", "Deuteron", "Antideuteron", "Proton", "Antiproton", "PionPlus", "PionMinus", "KaonPlus", "KaonMinus", "MuonPlus", "MuonMinus" };
38 for (unsigned int hypothesis = 0; hypothesis < hypotheses.size(); hypothesis++) {
39 GearDir content(
"/Detector/Muid/MuidParameters//Experiment[@exp=\"0\"]/");
40 content.append(hypotheses[hypothesis]);
42 GearDir outcomeContent(content);
43 outcomeContent.append((boost::format("/LayerProfile/Outcome[@outcome=\"%1%\"]/") % (outcome)).str());
46 break;
47 std::vector<double> layerPDF = outcomeContent.getArray((boost::format("LastLayer[@layer=\"%1%\"]") % (lastLayer)).str());
48 likelihoodParameters->setLongitudinalPDF(hypothesis, outcome, lastLayer, layerPDF);
49 }
50 }
52 GearDir detectorContent(content);
53 if (detector == 0)
54 detectorContent.append("/TransversePDF/BarrelAndEndcap");
55 if (detector == 1)
56 detectorContent.append("/TransversePDF/BarrelOnly");
57 if (detector == 2)
58 detectorContent.append("/TransversePDF/EndcapOnly");
60 double reducedChiSquaredThreshold = detectorContent.getDouble((boost::format("DegreesOfFreedom[@ndof=\"%1%\"]/Tail/Threshold") %
61 (2 * halfNdof)).str());
62 double reducedChiSquaredScaleY = detectorContent.getDouble((boost::format("DegreesOfFreedom[@ndof=\"%1%\"]/Tail/ScaleY") %
63 (2 * halfNdof)).str());
64 double reducedChiSquaredScaleX = detectorContent.getDouble((boost::format("DegreesOfFreedom[@ndof=\"%1%\"]/Tail/ScaleX") %
65 (2 * halfNdof)).str());
66 std::vector<double> reducedChiSquaredPDF = detectorContent.getArray((boost::format("DegreesOfFreedom[@ndof=\"%1%\"]/Histogram") %
67 (2 * halfNdof)).str());
68 likelihoodParameters->setTransversePDF(hypothesis, detector, halfNdof * 2, reducedChiSquaredPDF);
69 likelihoodParameters->setTransverseThreshold(hypothesis, detector, halfNdof * 2, reducedChiSquaredThreshold);
70 likelihoodParameters->setTransverseScaleY(hypothesis, detector, halfNdof * 2, reducedChiSquaredScaleY);
71 likelihoodParameters->setTransverseScaleX(hypothesis, detector, halfNdof * 2, reducedChiSquaredScaleX);
72 }
73 }
74 }
76 likelihoodParameters.
import(Iov);
77}
bool import(const IntervalOfValidity &iov)
Import the object to database.
Class for importing a single object to the database.
void construct(Args &&... params)
Construct an object of type T in this DBImportObjPtr using the provided constructor arguments.
GearDir is the basic class used for accessing the parameter store.
A class that describes the interval of experiments/runs for which an object in the database is valid.