|
[Rivet-svn] r2772 - in trunk: include/Rivet/Projections src/Analyses src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgFri Nov 26 18:47:27 GMT 2010
Author: buckley Date: Fri Nov 26 18:47:27 2010 New Revision: 2772 Log: Several important fixes to yesterday's changes: I knew it was too good to be true -- I was managing to install into a different area than where I was testing from :( More to come Modified: trunk/include/Rivet/Projections/FastJets.hh trunk/include/Rivet/Projections/JetAlg.hh trunk/src/Analyses/CDF_2005_S6217184.cc trunk/src/Analyses/CDF_2008_S7782535.cc trunk/src/Projections/FastJets.cc trunk/src/Projections/JetAlg.cc trunk/src/Projections/JetShape.cc Modified: trunk/include/Rivet/Projections/FastJets.hh ============================================================================== --- trunk/include/Rivet/Projections/FastJets.hh Fri Nov 26 16:17:08 2010 (r2771) +++ trunk/include/Rivet/Projections/FastJets.hh Fri Nov 26 18:47:27 2010 (r2772) @@ -43,8 +43,8 @@ public: /// Wrapper enum for selected Fastjet jet algorithms. enum JetAlgName { KT, CAM, SISCONE, ANTIKT, PXCONE, - CDFJETCLU, CDFMIDPOINT, D0ILCONE, - JADE, DURHAM, TRACKJET }; + CDFJETCLU, CDFMIDPOINT, D0ILCONE, + JADE, DURHAM, TRACKJET }; /// @name Constructors etc. Modified: trunk/include/Rivet/Projections/JetAlg.hh ============================================================================== --- trunk/include/Rivet/Projections/JetAlg.hh Fri Nov 26 16:17:08 2010 (r2771) +++ trunk/include/Rivet/Projections/JetAlg.hh Fri Nov 26 18:47:27 2010 (r2772) @@ -81,10 +81,11 @@ /// Get jets in no guaranteed order, with optional cuts on \f$ p_\perp \f$ and rapidity. /// @todo Introduce MomentumFilter objects for pT, ET, eta, y, etc. filtering, to avoid double-arg ambiguities virtual Jets jets(double ptmin=0.0, double ptmax=MAXDOUBLE, - double rapmin=-MAXDOUBLE, double rapmax=-MAXDOUBLE, + double rapmin=-MAXDOUBLE, double rapmax=MAXDOUBLE, RapScheme rapscheme=PSEUDORAPIDITY) const { const Jets rawjets = _jets(ptmin); Jets rtn; + MSG_DEBUG("Raw jet size (with pTmin cut) = " << rawjets.size()); foreach (const Jet& j, rawjets) { const FourMomentum pj = j.momentum(); if (!inRange(pj.pT(), ptmin, ptmax)) continue; @@ -99,7 +100,7 @@ /// @todo Introduce MomentumFilter objects for pT, ET, eta, y, etc. filtering, to avoid double-arg ambiguities template <typename F> Jets jets(F sorter, double ptmin=0.0, double ptmax=MAXDOUBLE, - double rapmin=-MAXDOUBLE, double rapmax=-MAXDOUBLE, + double rapmin=-MAXDOUBLE, double rapmax=MAXDOUBLE, RapScheme rapscheme=PSEUDORAPIDITY) const { Jets js = jets(ptmin); if (sorter != 0) { @@ -111,7 +112,7 @@ /// Get the jets, ordered by \f$ p_T \f$, with optional cuts on \f$ p_\perp \f$ and rapidity. /// @todo Introduce MomentumFilter objects for pT, ET, eta, y, etc. filtering, to avoid double-arg ambiguities Jets jetsByPt(double ptmin=0.0, double ptmax=MAXDOUBLE, - double rapmin=-MAXDOUBLE, double rapmax=-MAXDOUBLE, + double rapmin=-MAXDOUBLE, double rapmax=MAXDOUBLE, RapScheme rapscheme=PSEUDORAPIDITY) const { return jets(cmpJetsByPt, ptmin, ptmax, rapmin, rapmax, rapscheme); } @@ -119,7 +120,7 @@ /// Get the jets, ordered by \f$ E \f$, with optional cuts on \f$ p_\perp \f$ and rapidity. /// @todo Introduce MomentumFilter objects for pT, ET, eta, y, etc. filtering, to avoid double-arg ambiguities Jets jetsByE(double ptmin=0.0, double ptmax=MAXDOUBLE, - double rapmin=-MAXDOUBLE, double rapmax=-MAXDOUBLE, + double rapmin=-MAXDOUBLE, double rapmax=MAXDOUBLE, RapScheme rapscheme=PSEUDORAPIDITY) const { return jets(cmpJetsByE, ptmin, ptmax, rapmin, rapmax, rapscheme); } @@ -127,7 +128,7 @@ /// Get the jets, ordered by \f$ E_T \f$, with optional cuts on \f$ p_\perp \f$ and rapidity. /// @todo Introduce MomentumFilter objects for pT, ET, eta, y, etc. filtering, to avoid double-arg ambiguities Jets jetsByEt(double ptmin=0.0, double ptmax=MAXDOUBLE, - double rapmin=-MAXDOUBLE, double rapmax=-MAXDOUBLE, + double rapmin=-MAXDOUBLE, double rapmax=MAXDOUBLE, RapScheme rapscheme=PSEUDORAPIDITY) const { return jets(cmpJetsByEt, ptmin, ptmax, rapmin, rapmax, rapscheme); } Modified: trunk/src/Analyses/CDF_2005_S6217184.cc ============================================================================== --- trunk/src/Analyses/CDF_2005_S6217184.cc Fri Nov 26 16:17:08 2010 (r2771) +++ trunk/src/Analyses/CDF_2005_S6217184.cc Fri Nov 26 18:47:27 2010 (r2772) @@ -36,7 +36,7 @@ // Specify pT bins _ptedges += 37.0, 45.0, 55.0, 63.0, 73.0, 84.0, 97.0, 112.0, 128.0, - 148.0, 166.0, 186.0, 208.0, 229.0, 250.0, 277.0, 304.0, 340.0, 380.0; + 148.0, 166.0, 186.0, 208.0, 229.0, 250.0, 277.0, 304.0, 340.0, 380.0; // Register a jet shape projection and histogram for each pT bin for (size_t i = 0; i < 6; ++i) { @@ -53,7 +53,8 @@ } // Final histo - _profhistPsi = bookProfile1D(13, 1, 1); + //_profhistPsi = bookProfile1D(13, 1, 1); + _profhistOneMinusPsi_pT = bookDataPointSet(13, 1, 1); } @@ -62,10 +63,11 @@ void analyze(const Event& evt) { // Get jets and require at least one to pass pT and y cuts - const Jets jets = applyProjection<FastJets>(evt, "Jets").jetsByPt(37, 380, 0.1, 0.7); + const Jets jets = applyProjection<FastJets>(evt, "Jets").jetsByPt(_ptedges.front()*GeV, _ptedges.back()*GeV, + -0.7, 0.7, RAPIDITY); MSG_DEBUG("Jet multiplicity before cuts = " << jets.size()); if (jets.size() == 0) { - MSG_DEBUG("No jets found in required pT range"); + MSG_DEBUG("No jets found in required pT & rapidity range"); vetoEvent; } @@ -76,15 +78,16 @@ const JetShape& jsipt = applyProjection<JetShape>(evt, _jsnames_pT[ipt]); for (size_t rbin = 0; rbin < jsipt.numBins(); ++rbin) { const double r_rho = jsipt.rBinMid(rbin); - _profhistRho_pT[ipt]->fill(r_rho/0.7, (0.7/1.0)*jsipt.diffJetShape(rbin), weight); + cout << ipt << " " << rbin << " " << jsipt.diffJetShape(rbin) << endl; + _profhistRho_pT[ipt]->fill(r_rho/0.7, 0.7*jsipt.diffJetShape(rbin), weight); const double r_Psi = jsipt.rBinMax(rbin); _profhistPsi_pT[ipt]->fill(r_Psi/0.7, jsipt.intJetShape(rbin), weight); } // Final histo is Psi(0.3/R) as a function of jet pT bin /// @todo Can this actually be calculated event by event, or does it need to be assembled in a DPS in finalize? See CDF_2008_S7782535. - const double ptmid = (_ptedges[ipt] + _ptedges[ipt+1])/2.0; - _profhistPsi->fill(ptmid/GeV, jsipt.intJetShape(2), weight); + // const double ptmid = (_ptedges[ipt] + _ptedges[ipt+1])/2.0; + // _profhistPsi->fill(ptmid/GeV, jsipt.intJetShape(2), weight); } } @@ -92,7 +95,17 @@ // Finalize 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 + AIDA::IProfile1D* ph_i = _profhistPsi_pT[i]; + y.push_back(1.0 - ph_i->binHeight(2)); //< Definitely 1-Psi? + ey.push_back(ph_i->binError(1)); + } + _profhistOneMinusPsi_pT->setCoordinate(1, y, ey); + } //@} @@ -116,7 +129,8 @@ //@{ AIDA::IProfile1D* _profhistRho_pT[18]; AIDA::IProfile1D* _profhistPsi_pT[18]; - AIDA::IProfile1D* _profhistPsi; + //AIDA::IProfile1D* _profhistPsi; + AIDA::IDataPointSet* _profhistOneMinusPsi_pT; //@} }; Modified: trunk/src/Analyses/CDF_2008_S7782535.cc ============================================================================== --- trunk/src/Analyses/CDF_2008_S7782535.cc Fri Nov 26 16:17:08 2010 (r2771) +++ trunk/src/Analyses/CDF_2008_S7782535.cc Fri Nov 26 18:47:27 2010 (r2772) @@ -48,7 +48,8 @@ // Do the analysis void analyze(const Event& event) { - const Jets& jets = applyProjection<FastJets>(event, "Jets").jets(_ptedges.front(), _ptedges.back(), 0.0, 0.7); + const Jets& jets = applyProjection<FastJets>(event, "Jets").jets(_ptedges.front()*GeV, _ptedges.back()*GeV, + 0.0, 0.7, RAPIDITY); getLog() << Log::DEBUG << "Jet multiplicity before any pT cut = " << jets.size() << endl; if (jets.size() == 0) { MSG_DEBUG("No jets found in required pT range"); Modified: trunk/src/Projections/FastJets.cc ============================================================================== --- trunk/src/Projections/FastJets.cc Fri Nov 26 16:17:08 2010 (r2771) +++ trunk/src/Projections/FastJets.cc Fri Nov 26 18:47:27 2010 (r2772) @@ -77,6 +77,7 @@ int FastJets::compare(const Projection& p) const { const FastJets& other = dynamic_cast<const FastJets&>(p); + // cout << "CMP " << _useInvisibles << endl; return \ (_useInvisibles ? mkNamedPCmp(other, "FS") : mkNamedPCmp(other, "VFS")) || cmp(_jdef.jet_algorithm(), other._jdef.jet_algorithm()) || Modified: trunk/src/Projections/JetAlg.cc ============================================================================== --- trunk/src/Projections/JetAlg.cc Fri Nov 26 16:17:08 2010 (r2771) +++ trunk/src/Projections/JetAlg.cc Fri Nov 26 18:47:27 2010 (r2772) @@ -10,6 +10,7 @@ : _useInvisibles(false) { setName("JetAlg"); + addProjection(fs, "FS"); VisibleFinalState vfs(fs); getLog() << Log::DEBUG << "Making visible final state from provided FS" << endl; addProjection(vfs, "VFS"); Modified: trunk/src/Projections/JetShape.cc ============================================================================== --- trunk/src/Projections/JetShape.cc Fri Nov 26 16:17:08 2010 (r2771) +++ trunk/src/Projections/JetShape.cc Fri Nov 26 18:47:27 2010 (r2772) @@ -81,8 +81,10 @@ for (size_t i = 0; i < numBins(); ++i) { integral += _diffjetshapes[i]; } - for (size_t i = 0; i < numBins(); ++i) { - _diffjetshapes[i] /= integral; + if (integral > 0) { + for (size_t i = 0; i < numBins(); ++i) { + _diffjetshapes[i] /= integral; + } } }
More information about the Rivet-svn mailing list |