|
[Rivet-svn] r1939 - in trunk: . include/Rivet/Projections src/Analyses src/Projectionsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Oct 19 18:31:29 BST 2009
Author: hoeth Date: Mon Oct 19 18:31:29 2009 New Revision: 1939 Log: Set the default for split-merge in SISCone to 0.75. Fix the STAR_2009_UE_HELEN analysis. Modified: trunk/ChangeLog trunk/include/Rivet/Projections/FastJets.hh trunk/src/Analyses/STAR_2009_UE_HELEN.cc trunk/src/Projections/FastJets.cc Modified: trunk/ChangeLog ============================================================================== --- trunk/ChangeLog Mon Oct 19 16:20:22 2009 (r1938) +++ trunk/ChangeLog Mon Oct 19 18:31:29 2009 (r1939) @@ -19,6 +19,10 @@ * Fixing most open issues with the STAR_2009_UE_HELEN analysis. There is only one question left, regarding the away region. + * Set the default split-merge value for SISCone in our FastJets + projection to the recommended (but not Fastjet-default!) value + of 0.75. + 2009-10-17 Andy Buckley <andy at insectnation.org> * Adding parsing of units in cross-sections passed to the "-x" Modified: trunk/include/Rivet/Projections/FastJets.hh ============================================================================== --- trunk/include/Rivet/Projections/FastJets.hh Mon Oct 19 16:20:22 2009 (r1938) +++ trunk/include/Rivet/Projections/FastJets.hh Mon Oct 19 18:31:29 2009 (r1939) @@ -23,18 +23,18 @@ inline FourMomentum momentum(const fastjet::PseudoJet& pj) { return FourMomentum(pj.E(), pj.px(), pj.py(), pj.pz()); } - + /// Typedef for a collection of PseudoJets. typedef vector<fastjet::PseudoJet> PseudoJets; - + /// Project out jets found using fastJet package. class FastJets : public JetAlg { public: /// Wrapper enum for selected Fastjet jet algorithms. - enum JetAlgName { KT, CAM, SISCONE, ANTIKT, PXCONE, + enum JetAlgName { KT, CAM, SISCONE, ANTIKT, PXCONE, CDFJETCLU, CDFMIDPOINT, D0ILCONE, JADE, DURHAM, TRACKJET }; @@ -82,7 +82,7 @@ /// Get the jets (unordered). Jets jets(double ptmin = 0.0) const; - + /// Get the jets, ordered by \f$ p_T \f$. Jets jetsByPt(double ptmin = 0.0) const; @@ -134,14 +134,14 @@ private: Jets _pseudojetsToJets(const PseudoJets& pjets) const; - - protected: + + protected: /// Perform the projection on the Event. void project(const Event& e); /// Compare projections. - int compare(const Projection& p) const; + int compare(const Projection& p) const; public: @@ -158,15 +158,15 @@ shared_ptr<fastjet::ClusterSequence> _cseq; /// FastJet external plugin - shared_ptr<fastjet::JetDefinition::Plugin> _plugin; - + shared_ptr<fastjet::JetDefinition::Plugin> _plugin; + /// Map of vectors of y scales. This is mutable so we can use caching/lazy evaluation. mutable map<int, vector<double> > _yscales; - + /// set of particles sorted by their PT2 //set<Particle, ParticleBase::byPTAscending> _particles; map<int, Particle> _particles; - + }; } Modified: trunk/src/Analyses/STAR_2009_UE_HELEN.cc ============================================================================== --- trunk/src/Analyses/STAR_2009_UE_HELEN.cc Mon Oct 19 16:20:22 2009 (r1938) +++ trunk/src/Analyses/STAR_2009_UE_HELEN.cc Mon Oct 19 18:31:29 2009 (r1939) @@ -50,9 +50,8 @@ const MergedFinalState jfs(cfs, vfs); addProjection(jfs, "JFS"); - // Split-merge is 0.75, so we need to initialize the plugin manually: - // R = 0.7, overlap_threshold = 0.75 - addProjection(FastJets(jfs, fastjet::SISConePlugin(0.7, 0.75)), "AllJets"); + // SISCone, R = 0.7, overlap_threshold = 0.75 + addProjection(FastJets(jfs, FastJets::SISCONE, 0.7), "AllJets"); // Book histograms _hist_pmaxnchg = bookProfile1D( 1, 1, 1); Modified: trunk/src/Projections/FastJets.cc ============================================================================== --- trunk/src/Projections/FastJets.cc Mon Oct 19 16:20:22 2009 (r1938) +++ trunk/src/Projections/FastJets.cc Mon Oct 19 18:31:29 2009 (r1939) @@ -16,7 +16,7 @@ namespace Rivet { - FastJets::FastJets(const FinalState& fsp, JetAlgName alg, double rparameter, double pTmin, double seed_threshold) + FastJets::FastJets(const FinalState& fsp, JetAlgName alg, double rparameter, double pTmin, double seed_threshold) : JetAlg(fsp) { setName("FastJets"); @@ -35,7 +35,7 @@ } else { // Plugins: if (alg == SISCONE) { - const double OVERLAP_THRESHOLD = 0.5; + const double OVERLAP_THRESHOLD = 0.75; _plugin.reset(new fastjet::SISConePlugin(rparameter, OVERLAP_THRESHOLD)); } else if (alg == PXCONE) { throw Error("PxCone currently not supported, since FastJet doesn't install it by default"); @@ -82,26 +82,26 @@ } -// FastJets::FastJets(const FastJets& other) +// FastJets::FastJets(const FastJets& other) // : JetAlg // //_cseq(other._cseq), // _jdef(other._jdef), // _plugin(other._plugin), // _yscales(other._yscales) -// { +// { // setName("FastJets"); // } - - + + int FastJets::compare(const Projection& p) const { const FastJets& other = dynamic_cast<const FastJets&>(p); return \ - mkNamedPCmp(other, "FS") || + mkNamedPCmp(other, "FS") || cmp(_jdef.jet_algorithm(), other._jdef.jet_algorithm()) || cmp(_jdef.recombination_scheme(), other._jdef.recombination_scheme()) || cmp(_jdef.plugin(), other._jdef.plugin()) || - cmp(_jdef.R(), other._jdef.R()); - } + cmp(_jdef.R(), other._jdef.R()); + } @@ -113,7 +113,7 @@ void FastJets::calc(const ParticleVector& ps) { _particles.clear(); - vector<fastjet::PseudoJet> vecs; + vector<fastjet::PseudoJet> vecs; // Store 4 vector data about each particle into vecs int counter = 1; foreach (const Particle& p, ps) { @@ -146,7 +146,7 @@ } - void FastJets::reset() { + void FastJets::reset() { _yscales.clear(); _particles.clear(); /// @todo _cseq = fastjet::ClusterSequence(); @@ -158,7 +158,7 @@ return _cseq->inclusive_jets(ptmin).size(); } else { return 0; - } + } } @@ -206,13 +206,13 @@ _yscales.insert(make_pair( jet.cluster_hist_index(), yMergeVals )); return yMergeVals; } - - fastjet::PseudoJet FastJets::splitJet(fastjet::PseudoJet jet, double& last_R) const { + + fastjet::PseudoJet FastJets::splitJet(fastjet::PseudoJet jet, double& last_R) const { // Sanity cuts if (jet.E() <= 0 || _cseq->constituents(jet).size() <= 1) { - return jet; + return jet; } // Build a new cluster sequence just using the consituents of this jet. @@ -226,12 +226,12 @@ fastjet::PseudoJet parent1, parent2; fastjet::PseudoJet split(0.0, 0.0, 0.0, 0.0); while (cs.has_parents(remadeJet, parent1, parent2)) { - getLog() << Log::DEBUG << "Parents:" << parent1.m() << "," << parent2.m() << endl; + getLog() << Log::DEBUG << "Parents:" << parent1.m() << "," << parent2.m() << endl; if (parent1.m2() < parent2.m2()) { fastjet::PseudoJet tmp; tmp = parent1; parent1 = parent2; parent2 = tmp; } - + double ktdist = parent1.kt_distance(parent2); double rtycut2 = 0.3*0.3; if (parent1.m() < ((2.0*remadeJet.m())/3.0) && ktdist > rtycut2*remadeJet.m2()) { @@ -241,22 +241,22 @@ } } - last_R = 0.5 * sqrt(parent1.squared_distance(parent2)); + last_R = 0.5 * sqrt(parent1.squared_distance(parent2)); split.reset(remadeJet.px(), remadeJet.py(), remadeJet.pz(), remadeJet.E()); return split; } - fastjet::PseudoJet FastJets::filterJet(fastjet::PseudoJet jet, - double& stingy_R, const double def_R) const { + fastjet::PseudoJet FastJets::filterJet(fastjet::PseudoJet jet, + double& stingy_R, const double def_R) const { assert(clusterSeq()); - if (jet.E() <= 0.0 || clusterSeq()->constituents(jet).size() == 0) { - return jet; + if (jet.E() <= 0.0 || clusterSeq()->constituents(jet).size() == 0) { + return jet; } - if (stingy_R == 0.0) { - stingy_R = def_R; + if (stingy_R == 0.0) { + stingy_R = def_R; } stingy_R = def_R < stingy_R ? def_R : stingy_R; @@ -266,13 +266,13 @@ //stingy_jet_def.set_recombiner(&recom); fastjet::ClusterSequence scs(clusterSeq()->constituents(jet), stingy_jet_def); std::vector<fastjet::PseudoJet> stingy_jets = sorted_by_pt(scs.inclusive_jets()); - + fastjet::PseudoJet reconst_jet(0.0, 0.0, 0.0, 0.0); - + for (unsigned isj = 0; isj < std::min(3U, (unsigned int) stingy_jets.size()); ++isj) { reconst_jet += stingy_jets[isj]; - } + } return reconst_jet; } - + }
More information about the Rivet-svn mailing list |