|
[Rivet-svn] r3223 - branches/2011-07-aida2yoda/src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Jul 19 19:57:24 BST 2011
Author: dgrell Date: Tue Jul 19 19:57:23 2011 New Revision: 3223 Log: Tevatron done Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3418421.cc branches/2011-07-aida2yoda/src/Analyses/CDF_2001_S4751469.cc branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc branches/2011-07-aida2yoda/src/Analyses/CDF_2006_S6653332.cc branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S8095620.cc branches/2011-07-aida2yoda/src/Analyses/D0_1996_S3324664.cc branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc branches/2011-07-aida2yoda/src/Analyses/D0_2008_S6879055.cc branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7719523.cc branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc branches/2011-07-aida2yoda/src/Analyses/Makefile.am Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_1994_S2952106.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -6,7 +6,6 @@ #include "Rivet/Projections/VetoedFinalState.hh" #include "Rivet/Projections/VisibleFinalState.hh" #include "Rivet/Projections/MissingMomentum.hh" -#include "LWH/Histogram1D.h" namespace Rivet { @@ -122,14 +121,13 @@ 0.0351, 0.0413, 0.0520, 0.0497, 0.0448, 0.0446, 0.0375, 0.0329, 0.0291, 0.0272, 0.0233, 0.0288, 0.0384, 0.0396, 0.0468, 0.0419, 0.0459, 0.0399, 0.0355, 0.0329, 0.0274, 0.0230, 0.0201, 0.0120, 0.0100, 0.0080, 0.0051, 0.0051, 0.0010, 0.0010 }; - vector<double> yval_eta3, yerr_eta3; + vector<Point2D> points; for (size_t i = 0; i < 40; ++i) { const double yval = _tmphistJet3eta->bin(i).area() * (eta3_CDF_sim[i]/eta3_Ideal_sim[i]); - yval_eta3.push_back(yval/_sumw); - const double yerr = _tmphistJet3eta->binError(i) * (eta3_CDF_sim_err[i]/eta3_Ideal_sim[i]); - yerr_eta3.push_back(yerr/_sumw); + const double yerr = _tmphistJet3eta->bin(i).areaError() * (eta3_CDF_sim_err[i]/eta3_Ideal_sim[i]); + points.push_back(Point2D(0, yval/_sumw, 0, yerr/_sumw)); } - _histJet3eta->setCoordinate(1, yval_eta3, yerr_eta3); + _histJet3eta->addPoints(points); // R23 correction const double R23_CDF_sim[] = @@ -147,14 +145,13 @@ 0.0565, 0.0515, 0.0466, 0.0472, 0.0349, 0.0349, 0.0266, 0.0254, 0.0204, 0.0179, 0.0142, 0.0134, 0.0101, 0.0090, 0.0080, 0.0034, 0.0030, 0.0033, 0.0027, 0.0021, 0.0012, 0.0006, 0.0004, 0.0005, 0.0003 }; - vector<double> yval_R23, yerr_R23; + points.clear(); for (size_t i = 0; i < 35; ++i) { const double yval = _tmphistR23->bin(i).area() * (R23_CDF_sim[i]/R23_Ideal_sim[i]); - yval_R23.push_back(yval/_sumw); - const double yerr = _tmphistR23->binError(i) * (R23_CDF_sim_err[i]/R23_Ideal_sim[i]); - yerr_R23.push_back(yerr/_sumw); + const double yerr = _tmphistR23->bin(i).areaError() * (R23_CDF_sim_err[i]/R23_Ideal_sim[i]); + points.push_back(Point2D(0, yval/_sumw, 0, yerr/_sumw)); } - _histR23->setCoordinate(1, yval_R23, yerr_R23); + _histR23->addPoints(points); // alpha correction const double alpha_CDF_sim[] = @@ -172,14 +169,13 @@ 0.0258, 0.0196, 0.0171, 0.0179, 0.0174, 0.0141, 0.0114, 0.0096, 0.0076, 0.0087, 0.0099, 0.0079, 0.0102, 0.0114, 0.0124, 0.0130, 0.0165, 0.0160, 0.0177, 0.0190, 0.0232, 0.0243, 0.0238, 0.0248, 0.0235, 0.0298, 0.0292, 0.0291, 0.0268, 0.0316 }; - vector<double> yval_alpha, yerr_alpha; + points.clear(); for (size_t i = 0; i < 40; ++i) { const double yval = _tmphistAlpha->bin(i).area() * (alpha_CDF_sim[i]/alpha_Ideal_sim[i]); - yval_alpha.push_back(yval/_sumw); - const double yerr = _tmphistAlpha->binError(i) * (alpha_CDF_sim_err[i]/alpha_Ideal_sim[i]); - yerr_alpha.push_back(yerr/_sumw); + const double yerr = _tmphistAlpha->bin(i).areaError() * (alpha_CDF_sim_err[i]/alpha_Ideal_sim[i]); + points.push_back(Point2D(0, yval/_sumw, 0, yerr/_sumw)); } - _histAlpha->setCoordinate(1, yval_alpha, yerr_alpha); + _histAlpha->addPoints(points); } //@} Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3418421.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3418421.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3418421.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -43,8 +43,8 @@ _h_chi.addHistogram(625.0, 1800.0, bookHisto1D(1, 1, 5)); _h_ratio = bookScatter2D(2,1,1,"","",""); - _chi_above_25.resize(_h_ratio->size()); - _chi_below_25.resize(_h_ratio->size()); + _chi_above_25.resize(_h_ratio->numPoints()); + _chi_below_25.resize(_h_ratio->numPoints()); } @@ -68,21 +68,22 @@ double m = FourMomentum(jet1+jet2).mass(); _h_chi.fill(m, chi, weight); - // fill ratio counter - if (m > _h_ratio->lowerExtent(0) && m < _h_ratio->upperExtent(0)) { - int bin=-1; - for (int i=0; i<_h_ratio->size(); ++i) { - AIDA::IMeasurement* x = _h_ratio->point(i)->coordinate(0); - if (m > x->value()-x->errorMinus() && m < x->value()+x->errorPlus()) { - bin=i; - break; - } - } - if (bin>-1) { - if (chi>2.5) _chi_above_25[bin] += weight; - else _chi_below_25[bin] += weight; - } - } + // \todo YODA extents + // // fill ratio counter + // if (m > _h_ratio->lowerExtent(0) && m < _h_ratio->upperExtent(0)) { + // int bin=-1; + // for (size_t i=0; i<_h_ratio->numPoints(); ++i) { + // AIDA::IMeasurement* x = _h_ratio->point(i)->coordinate(0); + // if (m > x->value()-x->errorMinus() && m < x->value()+x->errorPlus()) { + // bin=i; + // break; + // } + // } + // if (bin>-1) { + // if (chi>2.5) _chi_above_25[bin] += weight; + // else _chi_below_25[bin] += weight; + // } + // } } @@ -93,8 +94,8 @@ normalize(hist); } - for (int bin=0; bin<_h_ratio->size(); ++bin) { - _h_ratio->point(bin)->coordinate(1)->setValue(_chi_below_25[bin]/_chi_above_25[bin]); + for (size_t bin=0; bin<_h_ratio->numPoints(); ++bin) { + _h_ratio->point(bin).setY(_chi_below_25[bin]/_chi_above_25[bin]); /// @todo calculate errors while analysing and fill them here as well } } Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2001_S4751469.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_2001_S4751469.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_2001_S4751469.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -11,7 +11,6 @@ #include "Rivet/Projections/ConstLossyFinalState.hh" #include "Rivet/Projections/FastJets.hh" #include "Rivet/Projections/TriggerCDFRun0Run1.hh" -#include "LWH/Profile1D.h" namespace Rivet { @@ -130,8 +129,8 @@ // Temporary histos that bin N and pT in dphi /// @todo Copy the permanent histos to get the binnings more robustly - LWH::Profile1D hist_num_dphi_2(50, 0, 180), hist_num_dphi_5(50, 0, 180), hist_num_dphi_30(50, 0, 180); - LWH::Profile1D hist_pt_dphi_2(50, 0, 180), hist_pt_dphi_5(50, 0, 180), hist_pt_dphi_30(50, 0, 180); + Profile1D hist_num_dphi_2(50, 0, 180), hist_num_dphi_5(50, 0, 180), hist_num_dphi_30(50, 0, 180); + Profile1D hist_pt_dphi_2(50, 0, 180), hist_pt_dphi_5(50, 0, 180), hist_pt_dphi_30(50, 0, 180); foreach (const Particle& p, fs.particles()) { // Calculate DeltaPhi(p,leadingJet) @@ -183,16 +182,16 @@ // Update the "proper" dphi profile histograms for (int i = 0; i < 50; i++) { if (ptLead/GeV > 2.0) { - _numvsDeltaPhi2->fill(hist_num_dphi_2.bin(i).xMean(), hist_num_dphi_2.bin(i).area(), weight); - _pTvsDeltaPhi2->fill(hist_pt_dphi_2.bin(i).xMean(), hist_pt_dphi_2.bin(i).area(), weight); + _numvsDeltaPhi2->fill(hist_num_dphi_2.bin(i).xMean(), hist_num_dphi_2.bin(i).mean(), weight); + _pTvsDeltaPhi2->fill(hist_pt_dphi_2.bin(i).xMean(), hist_pt_dphi_2.bin(i).mean(), weight); } if (ptLead/GeV > 5.0) { - _numvsDeltaPhi5->fill(hist_num_dphi_5.bin(i).xMean(), hist_num_dphi_5.bin(i).area(), weight); - _pTvsDeltaPhi5->fill(hist_pt_dphi_5.bin(i).xMean(), hist_pt_dphi_5.bin(i).area(), weight); + _numvsDeltaPhi5->fill(hist_num_dphi_5.bin(i).xMean(), hist_num_dphi_5.bin(i).mean(), weight); + _pTvsDeltaPhi5->fill(hist_pt_dphi_5.bin(i).xMean(), hist_pt_dphi_5.bin(i).mean(), weight); } if (ptLead/GeV > 30.0) { - _numvsDeltaPhi30->fill(hist_num_dphi_30.bin(i).xMean(), hist_num_dphi_30.bin(i).area(), weight); - _pTvsDeltaPhi30->fill(hist_pt_dphi_30.bin(i).xMean(), hist_pt_dphi_30.bin(i).area(), weight); + _numvsDeltaPhi30->fill(hist_num_dphi_30.bin(i).xMean(), hist_num_dphi_30.bin(i).mean(), weight); + _pTvsDeltaPhi30->fill(hist_pt_dphi_30.bin(i).xMean(), hist_pt_dphi_30.bin(i).mean(), weight); } } Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -94,15 +94,14 @@ void finalize() { // Construct final 1-Psi(0.3/0.7) profile from Psi profiles - vector<double> y, ey; + vector<Point2D> points; for (size_t i = 0; i < _ptedges.size()-1; ++i) { // Get entry for rad_Psi = 0.2 bin Profile1DPtr ph_i = _profhistPsi_pT[i]; - y.push_back(ph_i->bin(2).area()); - ey.push_back(ph_i->binError(1)); - } - _profhistPsi_vs_pT->setCoordinate(1, y, ey); + _profhistPsi_vs_pT->point(i).setY(ph_i->bin(2).mean()); + _profhistPsi_vs_pT->point(i).setYErr(ph_i->bin(1).stdErr()); + } } //@} Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2006_S6653332.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_2006_S6653332.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_2006_S6653332.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -149,9 +149,9 @@ getLog() << Log::DEBUG << "Sum of weights for Z production in mass range = " << _sumWeightsWithZ << endl; getLog() << Log::DEBUG << "Sum of weights for Z+jet production in mass range = " << _sumWeightsWithZJet << endl; - _sigmaBJet->scale(crossSection()/sumOfWeights()); - _ratioBJetToZ->scale(1.0/_sumWeightsWithZ); - _ratioBJetToJet->scale(1.0/_sumWeightsWithZJet); + scale(_sigmaBJet,crossSection()/sumOfWeights()); + scale(_ratioBJetToZ,1.0/_sumWeightsWithZ); + scale(_ratioBJetToJet,1.0/_sumWeightsWithZJet); } //@} Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7541902.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -124,46 +124,46 @@ void finalize() { const double xsec = crossSection()/sumOfWeights(); // Get the x-axis for the ratio plots - /// @todo Replace with autobooking etc. once YODA in place - std::vector<double> xval; xval.push_back(_xpoint); - std::vector<double> xerr; xerr.push_back(.5); - // Fill the first ratio histogram using the special normalisation histogram for the total cross section - double ratio1to0 = 0.; - if (_histJetMultNorm->bin(0).area() > 0.) ratio1to0 = _histJetMult[0]->bin(0).area()/_histJetMultNorm->bin(0).area(); - // Get the fractional error on the ratio histogram - double frac_err1to0 = 0.; - if (_histJetMult[0]->bin(0).area() > 0.) frac_err1to0 = _histJetMult[0]->binError(0)/_histJetMult[0]->bin(0).area(); - if (_histJetMultNorm->bin(0).area() > 0.) { - frac_err1to0 *= frac_err1to0; - frac_err1to0 += pow(_histJetMultNorm->binError(0)/_histJetMultNorm->bin(0).area(),2.); - frac_err1to0 = sqrt(frac_err1to0); - } + /// @todo YODA Replace with autobooking etc. once YODA in place + // std::vector<double> xval; xval.push_back(_xpoint); + // std::vector<double> xerr; xerr.push_back(.5); + // // Fill the first ratio histogram using the special normalisation histogram for the total cross section + // double ratio1to0 = 0.; + // if (_histJetMultNorm->bin(0).area() > 0.) ratio1to0 = _histJetMult[0]->bin(0).area()/_histJetMultNorm->bin(0).area(); + // // Get the fractional error on the ratio histogram + // double frac_err1to0 = 0.; + // if (_histJetMult[0]->bin(0).area() > 0.) frac_err1to0 = _histJetMult[0]->bin(0).areaError()/_histJetMult[0]->bin(0).area(); + // if (_histJetMultNorm->bin(0).area() > 0.) { + // frac_err1to0 *= frac_err1to0; + // frac_err1to0 += pow(_histJetMultNorm->bin(0).areaError()/_histJetMultNorm->bin(0).area(),2.); + // frac_err1to0 = sqrt(frac_err1to0); + // } - /// @todo Replace with autobooking etc. once YODA in place - vector<double> yval[4]; yval[0].push_back(ratio1to0); - vector<double> yerr[4]; yerr[0].push_back(ratio1to0*frac_err1to0); - _histJetMultRatio[0]->setCoordinate(0,xval,xerr); - _histJetMultRatio[0]->setCoordinate(1,yval[0],yerr[0]); - for (int i = 0; i < 4; ++i) { - if (i < 3) { - float ratio = 0.0; - if (_histJetMult[i]->bin(0).area() > 0.0) ratio = _histJetMult[i+1]->bin(0).area()/_histJetMult[i]->bin(0).area(); - float frac_err = 0.0; - if (_histJetMult[i]->bin(0).area() > 0.0) frac_err = _histJetMult[i]->binError(0)/_histJetMult[i]->bin(0).area(); - if (_histJetMult[i+1]->bin(0).area() > 0.0) { - frac_err *= frac_err; - frac_err += pow(_histJetMult[i+1]->binError(0)/_histJetMult[i+1]->bin(0).area(),2.); - frac_err = sqrt(frac_err); - } - yval[i+1].push_back(ratio); - yerr[i+1].push_back(ratio*frac_err); - _histJetMultRatio[i+1]->setCoordinate(0,xval,xerr); - _histJetMultRatio[i+1]->setCoordinate(1,yval[i+1],yerr[i+1]); - } - _histJetEt[i]->scale(xsec); - _histJetMult[i]->scale(xsec); - } - _histJetMultNorm->scale(xsec); + // /// @todo Replace with autobooking etc. once YODA in place + // vector<double> yval[4]; yval[0].push_back(ratio1to0); + // vector<double> yerr[4]; yerr[0].push_back(ratio1to0*frac_err1to0); + // _histJetMultRatio[0]->setCoordinate(0,xval,xerr); + // _histJetMultRatio[0]->setCoordinate(1,yval[0],yerr[0]); + // for (int i = 0; i < 4; ++i) { + // if (i < 3) { + // float ratio = 0.0; + // if (_histJetMult[i]->bin(0).area() > 0.0) ratio = _histJetMult[i+1]->bin(0).area()/_histJetMult[i]->bin(0).area(); + // float frac_err = 0.0; + // if (_histJetMult[i]->bin(0).area() > 0.0) frac_err = _histJetMult[i]->binError(0)/_histJetMult[i]->bin(0).area(); + // if (_histJetMult[i+1]->bin(0).area() > 0.0) { + // frac_err *= frac_err; + // frac_err += pow(_histJetMult[i+1]->binError(0)/_histJetMult[i+1]->bin(0).area(),2.); + // frac_err = sqrt(frac_err); + // } + // yval[i+1].push_back(ratio); + // yerr[i+1].push_back(ratio*frac_err); + // _histJetMultRatio[i+1]->setCoordinate(0,xval,xerr); + // _histJetMultRatio[i+1]->setCoordinate(1,yval[i+1],yerr[i+1]); + // } + // _histJetEt[i]->scale(xsec); + // _histJetMult[i]->scale(xsec); + // } + // _histJetMultNorm->scale(xsec); } //@} Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -97,14 +97,12 @@ void finalize() { // Construct final 1-Psi(0.3/0.7) profile from Psi profiles - vector<double> y, ey; for (size_t i = 0; i < _ptedges.size()-1; ++i) { // Get entry for rad_Psi = 0.2 bin Profile1DPtr ph_i = _h_Psi_pT[i]; - y.push_back(1.0 - ph_i->bin(1).area()); - ey.push_back(ph_i->binError(1)); + _h_OneMinusPsi_vs_pT->point(i).setY(1.0 - ph_i->bin(1).mean()); + _h_OneMinusPsi_vs_pT->point(i).setYErr(ph_i->bin(1).stdErr()); } - _h_OneMinusPsi_vs_pT->setCoordinate(1, y, ey); } Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S8095620.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S8095620.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S8095620.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -148,12 +148,12 @@ // Z cross sections. double Scale = 1.0; if (_sumWeightSelected != 0.0) Scale = 1.0/_sumWeightSelected; - _dStot->scale(Scale); - _dSdET->scale(Scale); - _dSdETA->scale(Scale); - _dSdNJet->scale(Scale); - _dSdNbJet->scale(Scale); - _dSdZpT->scale(Scale); + scale(_dStot,Scale); + scale(_dSdET,Scale); + scale(_dSdETA,Scale); + scale(_dSdNJet,Scale); + scale(_dSdNbJet,Scale); + scale(_dSdZpT,Scale); } //@} Modified: branches/2011-07-aida2yoda/src/Analyses/D0_1996_S3324664.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_1996_S3324664.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/D0_1996_S3324664.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -91,7 +91,7 @@ // I have no idea what this is normalised to... in the paper it says unity! /// @todo Understand this! - foreach (IHistogram1D* histo, _h_dphi.getHistograms()) { + foreach (Histo1DPtr histo, _h_dphi.getHistograms()) { /// @todo Prefer to scale rather than normalize, if possible normalize(histo, 0.0798); } Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -124,37 +124,28 @@ if (xSecW == 0 || wpt_integral == 0 || xSecZ == 0 || zpt_integral == 0) { getLog() << Log::WARN << "Not filling ratio plot because input histos are empty" << endl; } else { - std::vector<double> xval; - std::vector<double> xerr; - std::vector<double> yval; - std::vector<double> yerr; - // Scale factor converts event counts to cross-sections, and inverts the // branching ratios since only one decay channel has been analysed for each boson. // Oh, and we put MW/MZ in, like they do in the paper. const double MW_MZ = 0.8820; // Ratio M_W/M_Z const double BRZEE_BRWENU = 0.033632 / 0.1073; // Ratio of branching fractions const double scalefactor = (xSecW / wpt_integral) / (xSecZ / zpt_integral) * MW_MZ * BRZEE_BRWENU; - for (int ibin=0; ibin<_h_dsigdpt_scaled_z->size(); ibin++) { - /// @todo I would love to use axis().binMidPoint(ibin) here, but this #*&$*^%$ LWH IAxis doesn't have it!!!! - /// It's only in Axis and VariAxis, but doesn't get passed through to the user. I WANT YODA!!! *SIGH* - xval.push_back(0.5*(_h_dsigdpt_w->axis().binUpperEdge(ibin)+_h_dsigdpt_w->axis().binLowerEdge(ibin))); - xerr.push_back(0.5*_h_dsigdpt_w->axis().binWidth(ibin)); + for (size_t ibin=0; ibin<_h_dsigdpt_scaled_z->numPoints(); ibin++) { if (_h_dsigdpt_w->bin(ibin).area() == 0 || _h_dsigdpt_z->bin(ibin).area() == 0) { - yval.push_back(0.); - yerr.push_back(0.); + _h_dsigdpt_scaled_z->point(ibin) = Point2D(_h_dsigdpt_w->bin(ibin).midpoint(), 0., + _h_dsigdpt_w->bin(ibin).width(), 0.); } else { - yval.push_back(scalefactor * _h_dsigdpt_w->bin(ibin).area() / _h_dsigdpt_z->bin(ibin).area()); + double yval = scalefactor * _h_dsigdpt_w->bin(ibin).area() / _h_dsigdpt_z->bin(ibin).area(); double dy2 = 0.; // binWidth(ibin) is needed because binHeight is actually sumofweights. It's AIDA. Don't ask. :-(((( - dy2 += pow(_h_dsigdpt_w->binError(ibin)/_h_dsigdpt_w->bin(ibin).area()*_h_dsigdpt_w->axis().binWidth(ibin),2); - dy2 += pow(_h_dsigdpt_z->binError(ibin)/_h_dsigdpt_z->bin(ibin).area()*_h_dsigdpt_z->axis().binWidth(ibin),2); + dy2 += pow(_h_dsigdpt_w->bin(ibin).areaError()/_h_dsigdpt_w->bin(ibin).height(),2); + dy2 += pow(_h_dsigdpt_z->bin(ibin).areaError()/_h_dsigdpt_z->bin(ibin).height(),2); double dy = scalefactor * _h_dsigdpt_w->bin(ibin).area()/_h_dsigdpt_z->bin(ibin).area() * sqrt(dy2); - yerr.push_back(dy); + + _h_dsigdpt_scaled_z->point(ibin) = Point2D(_h_dsigdpt_w->bin(ibin).midpoint(), yval, + _h_dsigdpt_w->bin(ibin).width(), dy); } } - _h_dsigdpt_scaled_z->setCoordinate(0, xval, xerr); - _h_dsigdpt_scaled_z->setCoordinate(1, yval, yerr); } // Normalize non-ratio histos Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S6879055.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S6879055.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S6879055.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -95,7 +95,7 @@ /// Finalize void finalize() { // Now divide by the inclusive result - _crossSectionRatio->scale(1.0/_crossSectionRatio->bin(0).area()); + scale(_crossSectionRatio,1.0/_crossSectionRatio->bin(0).area()); // Normalise jet pTs to integrals of data // NB. There is no other way to do this, because these quantities are not Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7719523.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7719523.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7719523.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -140,23 +140,24 @@ const double dy_jet_central = 1.6; const double dy_jet_forward = 2.0; + // \todo YODA divide // Cross-section ratios (6 plots) // Central/central and forward/forward ratios - AIDA::IHistogramFactory& hf = histogramFactory(); - const string dir = histoDir(); + // AIDA::IHistogramFactory& hf = histogramFactory(); + // const string dir = histoDir(); - hf.divide(dir + "/d05-x01-y01", *_h_central_opp_cross_section, *_h_central_same_cross_section); - hf.divide(dir + "/d08-x01-y01", *_h_forward_opp_cross_section, *_h_forward_same_cross_section); + // hf.divide(dir + "/d05-x01-y01", *_h_central_opp_cross_section, *_h_central_same_cross_section); + // hf.divide(dir + "/d08-x01-y01", *_h_forward_opp_cross_section, *_h_forward_same_cross_section); - // Central/forward ratio combinations - hf.divide(dir + "/d06-x01-y01", *_h_central_same_cross_section, - *_h_forward_same_cross_section)->scale(dy_jet_forward/dy_jet_central, 1); - hf.divide(dir + "/d07-x01-y01", *_h_central_opp_cross_section, - *_h_forward_same_cross_section)->scale(dy_jet_forward/dy_jet_central, 1); - hf.divide(dir + "/d09-x01-y01", *_h_central_same_cross_section, - *_h_forward_opp_cross_section)->scale(dy_jet_forward/dy_jet_central, 1); - hf.divide(dir + "/d10-x01-y01", *_h_central_opp_cross_section, - *_h_forward_opp_cross_section)->scale(dy_jet_forward/dy_jet_central, 1); + // // Central/forward ratio combinations + // hf.divide(dir + "/d06-x01-y01", *_h_central_same_cross_section, + // *_h_forward_same_cross_section)->scale(dy_jet_forward/dy_jet_central, 1); + // hf.divide(dir + "/d07-x01-y01", *_h_central_opp_cross_section, + // *_h_forward_same_cross_section)->scale(dy_jet_forward/dy_jet_central, 1); + // hf.divide(dir + "/d09-x01-y01", *_h_central_same_cross_section, + // *_h_forward_opp_cross_section)->scale(dy_jet_forward/dy_jet_central, 1); + // hf.divide(dir + "/d10-x01-y01", *_h_central_opp_cross_section, + // *_h_forward_opp_cross_section)->scale(dy_jet_forward/dy_jet_central, 1); // Use generator cross section for remaining histograms // Each of these needs the additional factor 2 because the Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc Tue Jul 19 19:57:23 2011 (r3223) @@ -8,9 +8,6 @@ #include "Rivet/Projections/IdentifiedFinalState.hh" #include "Rivet/RivetYODA.hh" -#include "LWH/Histogram1D.h" -#include "LWH/HistogramFactory.h" - namespace Rivet { @@ -96,40 +93,39 @@ /// Finalize void finalize() { + // \todo YODA divide // Construct asymmetry: (dsig+/deta - dsig-/deta) / (dsig+/deta + dsig-/deta) for each Et region - AIDA::IHistogramFactory& hf = histogramFactory(); - - IHistogram1D* num25_35 = hf.subtract("/num25_35", *_h_dsigplus_deta_25_35, *_h_dsigminus_deta_25_35); - num25_35->scale(100.); - IHistogram1D* denom25_35 = hf.add("/denom25_35", *_h_dsigplus_deta_25_35, *_h_dsigminus_deta_25_35); - assert(num25_35 && denom25_35); - hf.divide(histoDir() + "/d01-x01-y01", *num25_35, *denom25_35); - hf.destroy(num25_35); - hf.destroy(denom25_35); - // - IHistogram1D* num35 = hf.subtract("/num35", *_h_dsigplus_deta_35, *_h_dsigminus_deta_35); - num35->scale(100.); - IHistogram1D* denom35 = hf.add("/denom35", *_h_dsigplus_deta_35, *_h_dsigminus_deta_35); - assert(num35 && denom35); - hf.divide(histoDir() + "/d01-x01-y02", *num35, *denom35); - hf.destroy(num35); - hf.destroy(denom35); - // - IHistogram1D* num25 = hf.subtract("/num25", *_h_dsigplus_deta_25, *_h_dsigminus_deta_25); - num25->scale(100.); - IHistogram1D* denom25 = hf.add("/denom25", *_h_dsigplus_deta_25, *_h_dsigminus_deta_25); - assert(num25 && denom25); - hf.divide(histoDir() + "/d01-x01-y03", *num25, *denom25); - hf.destroy(num25); - hf.destroy(denom25); - - // Delete raw histos - hf.destroy(_h_dsigplus_deta_25_35); - hf.destroy(_h_dsigminus_deta_25_35); - hf.destroy(_h_dsigplus_deta_35); - hf.destroy(_h_dsigminus_deta_35); - hf.destroy(_h_dsigplus_deta_25); - hf.destroy(_h_dsigminus_deta_25); + // IHistogram1D* num25_35 = hf.subtract("/num25_35", *_h_dsigplus_deta_25_35, *_h_dsigminus_deta_25_35); + // num25_35->scale(100.); + // IHistogram1D* denom25_35 = hf.add("/denom25_35", *_h_dsigplus_deta_25_35, *_h_dsigminus_deta_25_35); + // assert(num25_35 && denom25_35); + // hf.divide(histoDir() + "/d01-x01-y01", *num25_35, *denom25_35); + // hf.destroy(num25_35); + // hf.destroy(denom25_35); + // // + // IHistogram1D* num35 = hf.subtract("/num35", *_h_dsigplus_deta_35, *_h_dsigminus_deta_35); + // num35->scale(100.); + // IHistogram1D* denom35 = hf.add("/denom35", *_h_dsigplus_deta_35, *_h_dsigminus_deta_35); + // assert(num35 && denom35); + // hf.divide(histoDir() + "/d01-x01-y02", *num35, *denom35); + // hf.destroy(num35); + // hf.destroy(denom35); + // // + // IHistogram1D* num25 = hf.subtract("/num25", *_h_dsigplus_deta_25, *_h_dsigminus_deta_25); + // num25->scale(100.); + // IHistogram1D* denom25 = hf.add("/denom25", *_h_dsigplus_deta_25, *_h_dsigminus_deta_25); + // assert(num25 && denom25); + // hf.divide(histoDir() + "/d01-x01-y03", *num25, *denom25); + // hf.destroy(num25); + // hf.destroy(denom25); + + // // Delete raw histos + // hf.destroy(_h_dsigplus_deta_25_35); + // hf.destroy(_h_dsigminus_deta_25_35); + // hf.destroy(_h_dsigplus_deta_35); + // hf.destroy(_h_dsigminus_deta_35); + // hf.destroy(_h_dsigplus_deta_25); + // hf.destroy(_h_dsigminus_deta_25); } //@} Modified: branches/2011-07-aida2yoda/src/Analyses/Makefile.am ============================================================================== --- branches/2011-07-aida2yoda/src/Analyses/Makefile.am Tue Jul 19 19:54:58 2011 (r3222) +++ branches/2011-07-aida2yoda/src/Analyses/Makefile.am Tue Jul 19 19:57:23 2011 (r3223) @@ -80,79 +80,79 @@ endif -# lib_LTLIBRARIES += RivetCDFAnalyses.la -# RivetCDFAnalyses_la_SOURCES = \ -# CDF_1988_S1865951.cc \ -# CDF_1990_S2089246.cc \ -# CDF_1994_S2952106.cc \ -# CDF_1996_S3418421.cc \ -# CDF_1998_S3618439.cc \ -# CDF_2000_S4155203.cc \ -# CDF_2000_S4266730.cc \ -# CDF_2001_S4517016.cc \ -# CDF_2001_S4563131.cc \ -# CDF_2001_S4751469.cc \ -# CDF_2002_S4796047.cc \ -# CDF_2004_S5839831.cc \ -# CDF_2005_S6080774.cc \ -# CDF_2005_S6217184.cc \ -# CDF_2006_S6450792.cc \ -# CDF_2006_S6653332.cc \ -# CDF_2007_S7057202.cc \ -# CDF_2008_S7540469.cc \ -# CDF_2008_S7828950.cc \ -# CDF_2008_S8093652.cc \ -# CDF_2008_S8095620.cc \ -# CDF_2009_S8233977.cc \ -# CDF_2009_S8383952.cc \ -# CDF_2009_S8436959.cc \ -# CDF_2010_S8591881_DY.cc \ -# CDF_2010_S8591881_QCD.cc -# if ENABLE_PRELIMINARY -# RivetCDFAnalyses_la_SOURCES += \ -# CDF_2009_NOTE_9936.cc -# endif -# if ENABLE_OBSOLETE -# RivetCDFAnalyses_la_SOURCES += \ -# CDF_2008_LEADINGJETS.cc \ -# CDF_2008_NOTE_9351.cc -# endif -# if ENABLE_UNVALIDATED -# RivetCDFAnalyses_la_SOURCES += \ -# CDF_1993_S2742446.cc \ -# CDF_1996_S3108457.cc \ -# CDF_1996_S3349578.cc \ -# CDF_1997_S3541940.cc \ -# CDF_2008_S7541902.cc \ -# CDF_2008_S7782535.cc -# endif - - -# lib_LTLIBRARIES += RivetD0Analyses.la -# RivetD0Analyses_la_SOURCES = \ -# D0_2000_S4480767.cc \ -# D0_2001_S4674421.cc \ -# D0_2004_S5992206.cc \ -# D0_2006_S6438750.cc \ -# D0_2007_S7075677.cc \ -# D0_2008_S6879055.cc \ -# D0_2008_S7554427.cc \ -# D0_2008_S7662670.cc \ -# D0_2008_S7719523.cc \ -# D0_2008_S7837160.cc \ -# D0_2008_S7863608.cc \ -# D0_2009_S8202443.cc \ -# D0_2009_S8320160.cc \ -# D0_2009_S8349509.cc \ -# D0_2010_S8566488.cc \ -# D0_2010_S8570965.cc \ -# D0_2010_S8671338.cc \ -# D0_2010_S8821313.cc -# if ENABLE_UNVALIDATED -# RivetD0Analyses_la_SOURCES += \ -# D0_1996_S3214044.cc \ -# D0_1996_S3324664.cc -# endif +lib_LTLIBRARIES += RivetCDFAnalyses.la +RivetCDFAnalyses_la_SOURCES = \ + CDF_1988_S1865951.cc \ + CDF_1990_S2089246.cc \ + CDF_1994_S2952106.cc \ + CDF_1996_S3418421.cc \ + CDF_1998_S3618439.cc \ + CDF_2000_S4155203.cc \ + CDF_2000_S4266730.cc \ + CDF_2001_S4517016.cc \ + CDF_2001_S4563131.cc \ + CDF_2001_S4751469.cc \ + CDF_2002_S4796047.cc \ + CDF_2004_S5839831.cc \ + CDF_2005_S6080774.cc \ + CDF_2005_S6217184.cc \ + CDF_2006_S6450792.cc \ + CDF_2006_S6653332.cc \ + CDF_2007_S7057202.cc \ + CDF_2008_S7540469.cc \ + CDF_2008_S7828950.cc \ + CDF_2008_S8093652.cc \ + CDF_2008_S8095620.cc \ + CDF_2009_S8233977.cc \ + CDF_2009_S8383952.cc \ + CDF_2009_S8436959.cc \ + CDF_2010_S8591881_DY.cc \ + CDF_2010_S8591881_QCD.cc +if ENABLE_PRELIMINARY +RivetCDFAnalyses_la_SOURCES += \ + CDF_2009_NOTE_9936.cc +endif +if ENABLE_OBSOLETE +RivetCDFAnalyses_la_SOURCES += \ + CDF_2008_LEADINGJETS.cc \ + CDF_2008_NOTE_9351.cc +endif +if ENABLE_UNVALIDATED +RivetCDFAnalyses_la_SOURCES += \ + CDF_1993_S2742446.cc \ + CDF_1996_S3108457.cc \ + CDF_1996_S3349578.cc \ + CDF_1997_S3541940.cc \ + CDF_2008_S7541902.cc \ + CDF_2008_S7782535.cc +endif + + +lib_LTLIBRARIES += RivetD0Analyses.la +RivetD0Analyses_la_SOURCES = \ + D0_2000_S4480767.cc \ + D0_2001_S4674421.cc \ + D0_2004_S5992206.cc \ + D0_2006_S6438750.cc \ + D0_2007_S7075677.cc \ + D0_2008_S6879055.cc \ + D0_2008_S7554427.cc \ + D0_2008_S7662670.cc \ + D0_2008_S7719523.cc \ + D0_2008_S7837160.cc \ + D0_2008_S7863608.cc \ + D0_2009_S8202443.cc \ + D0_2009_S8320160.cc \ + D0_2009_S8349509.cc \ + D0_2010_S8566488.cc \ + D0_2010_S8570965.cc \ + D0_2010_S8671338.cc \ + D0_2010_S8821313.cc +if ENABLE_UNVALIDATED +RivetD0Analyses_la_SOURCES += \ + D0_1996_S3214044.cc \ + D0_1996_S3324664.cc +endif lib_LTLIBRARIES += RivetHERAAnalyses.la
More information about the Rivet-svn mailing list |