Public Types |
Public Member Functions |
Protected Member Functions |
Protected Attributes |
Private Member Functions |
Private Attributes |
Friends
FastJets Class Reference Project out jets found using the FastJet package jet algorithms. More...
Detailed DescriptionProject out jets found using the FastJet package jet algorithms. Definition at line 26 of file FastJets.hh. Member Typedef Documentation
Member Enumeration Documentation
Enum for the treatment of invisible particles: whether to include all, some, or none in jet-finding.
Wrapper enum for selected FastJet jet algorithms.
Definition at line 31 of file FastJets.hh.
Enum for the treatment of muons: whether to include all, some, or none in jet-finding. Definition at line 19 of file JetAlg.hh. { NO_MUONS, DECAY_MUONS, ALL_MUONS }; Constructor & Destructor Documentation
JetDefinition-based constructor with reordered args for easier specification of jet area definition
Definition at line 57 of file FastJets.hh. : FastJets(fsp, jdef, usemuons, useinvis, adef) { }
Native argument constructor, using FastJet alg/scheme enums.
Definition at line 68 of file FastJets.hh. : FastJets(fsp, fastjet::JetDefinition(type, rparameter, recom), usemuons, useinvis, adef) { }
Native argument constructor with reordered args for easier specification of jet area definition
Definition at line 80 of file FastJets.hh. : FastJets(fsp, type, recom, rparameter, usemuons, useinvis, adef) { }
Explicitly pass in an externally-constructed plugin.
Definition at line 92 of file FastJets.hh.
Explicitly pass in an externally-constructed plugin, with reordered args for easier specification of jet area definition.
Definition at line 105 of file FastJets.hh. : FastJets(fsp, plugin, usemuons, useinvis, adef) { }
Convenience constructor using Rivet enums for most common jet algs (including some plugins). For the built-in algs, E-scheme recombination is used. For full control of FastJet built-in jet algs, use the constructors from native-args or a plugin pointer.
Definition at line 120 of file FastJets.hh. Member Function Documentation
Non-templated version of string-based applyProjection, to work around header dependency issue. Definition at line 22 of file ProjectionApplier.cc. { return evt.applyProjection(getProjection(name)); }
Non-templated version of proj-based applyProjection, to work around header dependency issue. Definition at line 28 of file ProjectionApplier.cc. {
return evt.applyProjection(proj);
}
Untemplated function to do the work... Definition at line 34 of file ProjectionApplier.cc. { if (!_allowProjReg) { cerr << "Trying to register projection '" << proj.name() << "' before init phase in '" << this->name() << "'." << endl; exit(2); } const Projection& reg = getProjHandler().registerProjection(*this, proj, name); return reg; }
Shared utility functions to implement constructor behaviour
Definition at line 11 of file FastJets.cc. { setName("FastJets"); addProjection(HeavyHadrons(), "HFHadrons"); addProjection(TauFinder(TauFinder::HADRONIC), "Taus"); }
Definition at line 22 of file FastJets.cc. { MSG_DEBUG("JetAlg = " << alg); MSG_DEBUG("R parameter = " << rparameter); MSG_DEBUG("Seed threshold = " << seed_threshold); if (alg == KT) { _jdef = fastjet::JetDefinition(fastjet::kt_algorithm, rparameter, fastjet::E_scheme); } else if (alg == CAM) { _jdef = fastjet::JetDefinition(fastjet::cambridge_algorithm, rparameter, fastjet::E_scheme); } else if (alg == ANTIKT) { _jdef = fastjet::JetDefinition(fastjet::antikt_algorithm, rparameter, fastjet::E_scheme); } else if (alg == DURHAM) { _jdef = fastjet::JetDefinition(fastjet::ee_kt_algorithm, fastjet::E_scheme); } else { // Plugins: if (alg == SISCONE) { const double OVERLAP_THRESHOLD = 0.75; _plugin.reset(new fastjet::SISConePlugin(rparameter, OVERLAP_THRESHOLD)); // } else if (alg == PXCONE) { // string msg = "PxCone currently not supported, since FastJet doesn't install it by default. "; // msg += "Please notify the Rivet authors if this behaviour should be changed."; // throw Error(msg); // _plugin.reset(new fastjet::PxConePlugin(rparameter)); } else if (alg == ATLASCONE) { const double OVERLAP_THRESHOLD = 0.5; _plugin.reset(new fastjet::ATLASConePlugin(rparameter, seed_threshold, OVERLAP_THRESHOLD)); } else if (alg == CMSCONE) { _plugin.reset(new fastjet::CMSIterativeConePlugin(rparameter, seed_threshold)); } else if (alg == CDFJETCLU) { const double OVERLAP_THRESHOLD = 0.75; _plugin.reset(new fastjet::CDFJetCluPlugin(rparameter, OVERLAP_THRESHOLD, seed_threshold)); } else if (alg == CDFMIDPOINT) { const double OVERLAP_THRESHOLD = 0.5; _plugin.reset(new fastjet::CDFMidPointPlugin(rparameter, OVERLAP_THRESHOLD, seed_threshold)); } else if (alg == D0ILCONE) { const double min_jet_Et = 6.0; _plugin.reset(new fastjet::D0RunIIConePlugin(rparameter, min_jet_Et)); } else if (alg == JADE) { _plugin.reset(new fastjet::JadePlugin()); } else if (alg == TRACKJET) { _plugin.reset(new fastjet::TrackJetPlugin(rparameter)); } _jdef = fastjet::JetDefinition(_plugin.get()); } } Get the jets (unordered) with pT > ptmin.
Implements JetAlg. Definition at line 183 of file FastJets.cc. { Jets rtn; rtn.reserve(pseudojets().size()); foreach (const fastjet::PseudoJet& pj, pseudojets()) { rtn.push_back(_mkJet(pj)); } /// @todo Cache? return rtn; } Function to make Rivet::Jet from fastjet::PseudoJet, including constituent and tag info. Definition at line 205 of file FastJets.cc. { assert(clusterSeq()); // Take the constituents from the cluster sequence, unless the jet was not // associated with the cluster sequence (could be the case for trimmed jets) const PseudoJets parts = (pj.associated_cluster_sequence() == clusterSeq().get()) ? clusterSeq()->constituents(pj) : pj.constituents(); vector<Particle> constituents, tags; constituents.reserve(parts.size()); for (const fastjet::PseudoJet& p : parts) { map<int, Particle>::const_iterator found = _particles.find(p.user_index()); // assert(found != _particles.end()); if (found == _particles.end() && p.is_pure_ghost()) continue; //< Pure FJ ghosts are ok assert(found != _particles.end()); //< Anything else must be known assert(found->first != 0); //< All mapping IDs are pos-def (particles) or neg-def (tags) if (found->first > 0) constituents.push_back(found->second); else if (found->first < 0) tags.push_back(found->second); } return Jet(pj, constituents, tags); }
Add a colliding beam pair. Definition at line 108 of file Projection.hh. { _beamPairs.insert(PdgIdPair(beam1, beam2)); return *this; }
Register a contained projection (user-facing version)
Definition at line 157 of file ProjectionApplier.hh. { return declareProjection(proj, name); }
Apply the supplied projection on event evt (user-facing alias).
Definition at line 80 of file ProjectionApplier.hh. { return applyProjection<PROJ>(evt, proj); }
Apply the supplied projection on event evt (user-facing alias).
Definition at line 92 of file ProjectionApplier.hh. { return applyProjection<PROJ>(evt, proj); }
Apply the supplied projection on event evt (user-facing alias).
Definition at line 104 of file ProjectionApplier.hh. { return applyProjection<PROJ>(evt, name); }
Apply the supplied projection on event evt.
Definition at line 74 of file ProjectionApplier.hh. { return pcast<PROJ>(_applyProjection(evt, proj)); }
Apply the supplied projection on event evt.
Definition at line 86 of file ProjectionApplier.hh. { return pcast<PROJ>(_applyProjection(evt, proj)); }
Apply the named projection on event evt.
Definition at line 98 of file ProjectionApplier.hh. { return pcast<PROJ>(_applyProjection(evt, name)); }
Return the area definition.
Definition at line 234 of file FastJets.hh. { return _adef; } Return the allowed beam pairs on which this projection can operate, not including recursion. Derived classes should ensure that all contained projections are registered in the _projections set for the beam constraint chaining to work.
Definition at line 35 of file Projection.cc. { set<PdgIdPair> ret = _beamPairs; set<ConstProjectionPtr> projs = getProjections(); for (set<ConstProjectionPtr>::const_iterator ip = projs.begin(); ip != projs.end(); ++ip) { ConstProjectionPtr p = *ip; getLog() << Log::TRACE << "Proj addr = " << p << endl; if (p) ret = intersection(ret, p->beamPairs()); } return ret; }
Determine whether this object should be ordered before the object p given as argument. If p is of a different class than this, the before() function of the corresponding type_info objects is used. Otherwise, if the objects are of the same class, the virtual compare(const Projection &) will be returned. Definition at line 24 of file Projection.cc. Do the calculation locally (no caching).
< Ghostify the momentum Definition at line 136 of file FastJets.cc. { _particles.clear(); vector<fastjet::PseudoJet> pjs; MSG_DEBUG("Finding jets from " << fsparticles.size() << " input particles"); /// @todo Use FastJet3's UserInfo system // Store 4 vector data about each particle into FastJet's PseudoJets int counter = 1; for (const Particle& p : fsparticles) { fastjet::PseudoJet pj = p; pj.set_user_index(counter); pjs.push_back(pj); _particles[counter] = p; counter += 1; } // And the same for ghost tagging particles (with negative user indices) counter = 1; for (const Particle& p : tagparticles) { fastjet::PseudoJet pj = p; pj *= 1e-20; ///< Ghostify the momentum pj.set_user_index(-counter); pjs.push_back(pj); _particles[-counter] = p; counter += 1; } // Choose cseq as basic or area-calculating if (_adef) { _cseq.reset(new fastjet::ClusterSequenceArea(pjs, _jdef, *_adef)); } else { _cseq.reset(new fastjet::ClusterSequence(pjs, _jdef)); } MSG_DEBUG("FastJet ClusterSequence constructed; Njets_tot = " << _cseq->inclusive_jets().size() << ", Njets_10 = " << _cseq->inclusive_jets(10*GeV).size()); //< only inefficient in debug mode }
Clone on the heap. Implements Projection.
Return the cluster sequence.
Definition at line 209 of file FastJets.hh. { return _cseq; }
Return the area-enabled cluster sequence (if an area defn exists, otherwise returns a null ptr).
Definition at line 218 of file FastJets.hh.
Compare projections. Implements JetAlg. Definition at line 92 of file FastJets.cc. { const FastJets& other = dynamic_cast<const FastJets&>(p); return \ cmp(_useMuons, other._useMuons) || cmp(_useInvisibles, other._useInvisibles) || 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(_adef, other._adef); }
Register a contained projection (user-facing version)
Definition at line 151 of file ProjectionApplier.hh. { return declareProjection(proj, name); }
Register a contained projection. The type of the argument is used to instantiate a new projection internally: this new object is applied to events rather than the argument object. Hence you are advised to only use locally-scoped Projection objects in your Projection and Analysis constructors, and to avoid polymorphism (e.g. handling
Definition at line 142 of file ProjectionApplier.hh. { const Projection& reg = _declareProjection(proj, name); const PROJ& rtn = dynamic_cast<const PROJ&>(reg); return rtn; } Clone on the heap.
Template-usable interface common to FinalState. Definition at line 221 of file JetAlg.hh. { return jets(); }
Get the named projection, specifying return type via a template argument (user-facing alias).
Definition at line 57 of file ProjectionApplier.hh. { return getProjection<PROJ>(name); } Get a Log object based on the getName() property of the calling projection object. Reimplemented from ProjectionApplier. Definition at line 115 of file Projection.hh. { string logname = "Rivet.Projection." + name(); return Log::getLog(logname); }
Get the named projection, specifying return type via a template argument.
Definition at line 50 of file ProjectionApplier.hh. { const Projection& p = getProjHandler().getProjection(*this, name); return pcast<PROJ>(p); }
Get the named projection (non-templated, so returns as a reference to a Projection base class). Definition at line 61 of file ProjectionApplier.hh. { return getProjHandler().getProjection(*this, name); }
Get the contained projections, including recursion. Definition at line 43 of file ProjectionApplier.hh. { return getProjHandler().getChildProjections(*this, ProjectionHandler::DEEP); }
Get a reference to the ProjectionHandler for this thread. Definition at line 122 of file ProjectionApplier.hh. { return _projhandler; }
Get jets in no guaranteed order, with optional cuts on
Definition at line 85 of file JetAlg.hh. { return filterBy(_jets(), c); // const Jets rawjets = _jets(); // // Just return a copy of rawjets if the cut is open // if (c == Cuts::open()) return rawjets; // // If there is a non-trivial cut... // /// @todo Use an STL erase(remove_if) and lambda function for this // Jets rtn; // rtn.reserve(size()); // foreach (const Jet& j, rawjets) // if (c->accept(j)) rtn.push_back(j); // return rtn; }
Get the jets, ordered by supplied sorting function object, with optional cuts on
Get the jets, ordered by supplied sorting function object, with optional cuts on
Get jets in no guaranteed order, with optional cuts on
Definition at line 173 of file JetAlg.hh. { if (rapscheme == PSEUDORAPIDITY) { return jets((Cuts::pT >= ptmin) & (Cuts::pT < ptmax) & (Cuts::rapIn(rapmin, rapmax))); } else if (rapscheme == RAPIDITY) { return jets((Cuts::pT >= ptmin) & (Cuts::pT < ptmax) & (Cuts::etaIn(rapmin, rapmax))); } throw LogicError("Unknown rapidity scheme. This shouldn't be possible!"); }
Get the jets, ordered by
Get the jets, ordered by
Definition at line 157 of file JetAlg.hh. { return jets(c, cmpMomByEt); }
Get the jets, ordered by
Get the jets, ordered by
This is a very common use-case, so is available as syntatic sugar for jets(c, cmpMomByPt).
Definition at line 126 of file JetAlg.hh. { return jets(c, cmpMomByPt); } Get the jets, ordered by
This is a very common use-case, so is available as syntatic sugar for jets(Cuts::pT >= ptmin, cmpMomByPt).
Definition at line 191 of file JetAlg.hh. { return jets(Cuts::pT >= ptmin, cmpMomByPt); }
Mark object as owned by the _projhandler
Definition at line 111 of file ProjectionApplier.hh. { _owned = true; }
Shortcut to make a named Cmp<Projection> comparison with the Definition at line 47 of file Projection.cc. { return pcmp(*this, otherparent, pname); }
Shortcut to make a named Cmp<Projection> comparison with the
Definition at line 51 of file Projection.cc. { return pcmp(*this, otherparent, pname); }
Get the name of the projection. Implements ProjectionApplier. Definition at line 102 of file Projection.hh. { return _name; }
Perform the projection on the Event.
Implements JetAlg. Definition at line 114 of file FastJets.cc. { // Assemble final state particles const string fskey = (_useInvisibles == JetAlg::NO_INVISIBLES) ? "VFS" : "FS"; Particles fsparticles = applyProjection<FinalState>(e, fskey).particles(); // Remove prompt invisibles if needed (already done by VFS if using NO_INVISIBLES) if (_useInvisibles == JetAlg::DECAY_INVISIBLES) fsparticles.erase( std::remove_if(fsparticles.begin(), fsparticles.end(), isPromptInvisible), fsparticles.end() ); // Remove prompt/all muons if needed if (_useMuons == JetAlg::DECAY_MUONS) fsparticles.erase( std::remove_if(fsparticles.begin(), fsparticles.end(), isPromptMuon), fsparticles.end() ); else if (_useMuons == JetAlg::NO_MUONS) fsparticles.erase( std::remove_if(fsparticles.begin(), fsparticles.end(), isMuon), fsparticles.end() ); // Tagging particles /// @todo Allow the user to specify tag particle kinematic thresholds const Particles chadrons = applyProjection<HeavyHadrons>(e, "HFHadrons").cHadrons(); const Particles bhadrons = applyProjection<HeavyHadrons>(e, "HFHadrons").bHadrons(); const Particles taus = applyProjection<FinalState>(e, "Taus").particles(); calc(fsparticles, chadrons+bhadrons+taus); }
Get the pseudo jets (unordered). Definition at line 200 of file FastJets.cc. { return clusterSeq() ? clusterSeq()->inclusive_jets(ptmin) : PseudoJets(); }
Get the pseudo jets, ordered by Definition at line 185 of file FastJets.hh. { return sorted_by_E(pseudoJets(ptmin)); }
Get the pseudo jets, ordered by Definition at line 178 of file FastJets.hh. { return sorted_by_pt(pseudoJets(ptmin)); }
Get the pseudo jets, ordered by rapidity. Definition at line 192 of file FastJets.hh. { return sorted_by_rapidity(pseudoJets(ptmin)); }
Reset the projection. Jet def, etc. are unchanged.
Implements JetAlg. Definition at line 176 of file FastJets.cc. { _yscales.clear(); _particles.clear(); /// @todo _cseq = fastjet::ClusterSequence(); }
Used by derived classes to set their name. Definition at line 121 of file Projection.hh.
Trim (filter) a jet, keeping tag and constituent info in the resulting jet. Definition at line 193 of file FastJets.cc. { assert(input.pseudojet().associated_cluster_sequence() == clusterSeq().get()); PseudoJet pj = trimmer(input); return _mkJet(pj); }
Include (some) invisible particles in jet construction. The default behaviour is that jets are only constructed from visible particles. Some jet studies, including those from ATLAS, use a definition in which neutrinos from hadron decays are included via MC-based calibrations. Setting this flag to true avoids the automatic restriction to a VisibleFinalState. Definition at line 61 of file JetAlg.hh. { _useInvisibles = useinvis; }
Include (some) invisible particles in jet construction. The default behaviour is that jets are only constructed from visible particles. Some jet studies, including those from ATLAS, use a definition in which neutrinos from hadron decays are included via MC-based calibrations. Setting this flag to true avoids the automatic restriction to a VisibleFinalState.
Definition at line 73 of file JetAlg.hh. { _useInvisibles = useinvis ? DECAY_INVISIBLES : NO_INVISIBLES; }
Use provided jet area definition.
Definition at line 161 of file FastJets.hh. { _adef.reset(adef); }
Include (some) muons in jet construction. The default behaviour is that jets are only constructed from visible particles. Some jet studies, including those from ATLAS, use a definition in which neutrinos from hadron decays are included via MC-based calibrations. Setting this flag to true avoids the automatic restriction to a VisibleFinalState. Definition at line 51 of file JetAlg.hh. { _useMuons = usemuons; } Friends And Related Function Documentation
The Cmp specialization for Projection is a friend. Definition at line 36 of file Projection.hh.
Event is a friend. Definition at line 33 of file Projection.hh. Member Data Documentation
Pointer to user-handled area definition. Definition at line 277 of file FastJets.hh.
Flag to forbid projection registration in analyses until the init phase. Definition at line 176 of file ProjectionApplier.hh.
Cluster sequence. Definition at line 280 of file FastJets.hh.
Jet definition. Definition at line 274 of file FastJets.hh.
set of particles sorted by their PT2 Definition at line 290 of file FastJets.hh.
FastJet external plugin. Definition at line 283 of file FastJets.hh.
Map of vectors of y scales. This is mutable so we can use caching/lazy evaluation. Definition at line 286 of file FastJets.hh. The documentation for this class was generated from the following files: Generated on Tue Dec 13 2016 16:32:47 for The Rivet MC analysis system by ![]() |