|
[Rivet-svn] r4283 - trunk/src/Analysesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue May 14 21:44:33 BST 2013
Author: buckley Date: Tue May 14 21:44:33 2013 New Revision: 4283 Log: Another easy YODA fix Modified: trunk/src/Analyses/OPAL_2002_S5361494.cc Modified: trunk/src/Analyses/OPAL_2002_S5361494.cc ============================================================================== --- trunk/src/Analyses/OPAL_2002_S5361494.cc Tue May 14 21:40:15 2013 (r4282) +++ trunk/src/Analyses/OPAL_2002_S5361494.cc Tue May 14 21:44:33 2013 (r4283) @@ -92,38 +92,30 @@ void finalize() { - // @todo YODA - //// bottom - //const double avgNumPartsBottom = _weightedTotalChargedPartNumBottom / _weightBottom; - //AIDA::IDataPointSet * multB = bookDataPointSet(1, 1, 1); - //for (int i = 0; i < multB->size(); ++i) { - // if (fuzzyEquals(sqrtS(), multB->point(i)->coordinate(0)->value(), 0.01)) { - // multB->point(i)->coordinate(1)->setValue(avgNumPartsBottom); - // } - //} - //// charm - //const double avgNumPartsCharm = _weightedTotalChargedPartNumCharm / _weightCharm; - //AIDA::IDataPointSet * multC = bookDataPointSet(1, 1, 2); - //for (int i = 0; i < multC->size(); ++i) { - // if (fuzzyEquals(sqrtS(), multC->point(i)->coordinate(0)->value(), 0.01)) { - // multC->point(i)->coordinate(1)->setValue(avgNumPartsCharm); - // } - //} - //// light - //const double avgNumPartsLight = _weightedTotalChargedPartNumLight / _weightLight; - //AIDA::IDataPointSet * multL = bookDataPointSet(1, 1, 3); - //for (int i = 0; i < multL->size(); ++i) { - // if (fuzzyEquals(sqrtS(), multL->point(i)->coordinate(0)->value(), 0.01)) { - // multL->point(i)->coordinate(1)->setValue(avgNumPartsLight); - // } - //} - //// bottom-light - //AIDA::IDataPointSet * multD = bookDataPointSet(1, 1, 4); - //for (int i = 0; i < multD->size(); ++i) { - // if (fuzzyEquals(sqrtS(), multD->point(i)->coordinate(0)->value(), 0.01)) { - // multD->point(i)->coordinate(1)->setValue(avgNumPartsBottom-avgNumPartsLight); - // } - //} + + // Bottom + const double avgNumPartsBottom = _weightedTotalChargedPartNumBottom / _weightBottom; + foreach (Point2D& p, bookScatter2D(1, 1, 1)->points()) { + if (fuzzyEquals(sqrtS(), p.x(), 0.01)) p.setY(avgNumPartsBottom); + } + + // Charm + const double avgNumPartsCharm = _weightedTotalChargedPartNumCharm / _weightCharm; + foreach (Point2D& p, bookScatter2D(1, 1, 2)->points()) { + if (fuzzyEquals(sqrtS(), p.x(), 0.01)) p.setY(avgNumPartsCharm); + } + + // Light + const double avgNumPartsLight = _weightedTotalChargedPartNumLight / _weightLight; + foreach (Point2D& p, bookScatter2D(1, 1, 3)->points()) { + if (fuzzyEquals(sqrtS(), p.x(), 0.01)) p.setY(avgNumPartsLight); + } + + // Bottom - light + foreach (Point2D& p, bookScatter2D(1, 1, 4)->points()) { + if (fuzzyEquals(sqrtS(), p.x(), 0.01)) p.setY(avgNumPartsBottom - avgNumPartsLight); + } + } //@}
More information about the Rivet-svn mailing list |