Public Member Functions |
Protected Member Functions |
Protected Attributes |
Private Attributes |
Friends
DressedLeptons Class Reference Cluster photons from a given FS to all charged particles (typically leptons) More...
Detailed DescriptionCluster photons from a given FS to all charged particles (typically leptons) This stores the original (bare) charged particles and photons as particles() while the newly created clustered lepton objects are accessible as dressedLeptons(). The clustering is done by a delta(R) cone around each bare lepton, with double counting being avoided by only adding a photon to the _closest_ bare lepton if it happens to be within the capture radius of more than one. Definition at line 43 of file DressedLeptons.hh. Member Typedef Documentation
Definition at line 173 of file ParticleFinder.hh.
Definition at line 172 of file ParticleFinder.hh. Constructor & Destructor Documentation
Constructor with a general (and optional) Cut argument. Provide final state projections used to select the photons and bare leptons (wish we had put the first two args the other way around...), a clustering delta(R) cone size around each bare lepton, and an optional cut on the _dressed_ leptons (i.e. the momenta after clustering.) The final two arguments are rarely used. Definition at line 7 of file DressedLeptons.cc. : FinalState(cut), _dRmax(dRmax), _cluster(cluster), _fromDecay(useDecayPhotons) { setName("DressedLeptons"); IdentifiedFinalState photonfs(photons, PID::PHOTON); addProjection(photonfs, "Photons"); IdentifiedFinalState leptonfs(bareleptons); leptonfs.acceptIdPairs({PID::ELECTRON, PID::MUON, PID::TAU}); addProjection(leptonfs, "Leptons"); }
Constructor with a general (and optional) Cut argument
Definition at line 23 of file DressedLeptons.cc. : DressedLeptons(photons, bareleptons, dRmax, cut, cluster, useDecayPhotons) { // setName("DressedLeptons"); // IdentifiedFinalState photonfs(photons, PID::PHOTON); // addProjection(photonfs, "Photons"); // IdentifiedFinalState leptonfs(bareleptons); // leptonfs.acceptIdPairs({PID::ELECTRON, PID::MUON, PID::TAU}); // addProjection(leptonfs, "Leptons"); }
Constructor with numerical eta and pT cuts
Definition at line 39 of file DressedLeptons.cc. : DressedLeptons(photons, bareleptons, dRmax, Cuts::eta > etaMin && Cuts::eta < etaMax && Cuts::pT > pTmin, cluster, useDecayPhotons) { // setName("DressedLeptons"); // IdentifiedFinalState photonfs(photons, PID::PHOTON); // addProjection(photonfs, "Photons"); // IdentifiedFinalState leptonfs(bareleptons); // leptonfs.acceptIdPairs({PID::ELECTRON, PID::MUON, PID::TAU}); // addProjection(leptonfs, "Leptons"); } 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; } Decide if a particle is to be accepted or not. Decide if a particle is to be accepted or not.
Reimplemented in FinalPartons. Definition at line 75 of file FinalState.cc.
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 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.
Clone on the heap. Implements Projection.
Retrieve the dressed leptons (synonym) Definition at line 82 of file DressedLeptons.hh. { return _clusteredLeptons; }
Compare projections. Reimplemented from FinalState. Definition at line 59 of file DressedLeptons.cc. { // Compare the two as final states (for pT and eta cuts) const DressedLeptons& other = dynamic_cast<const DressedLeptons&>(p); int fscmp = FinalState::compare(other); if (fscmp != EQUIVALENT) return fscmp; const PCmp phcmp = mkNamedPCmp(p, "Photons"); if (phcmp != EQUIVALENT) return phcmp; const PCmp sigcmp = mkNamedPCmp(p, "Leptons"); if (sigcmp != EQUIVALENT) return sigcmp; return (cmp(_dRmax, other._dRmax) || cmp(_cluster, other._cluster) || cmp(_fromDecay, other._fromDecay)); }
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. Clone this projection.
Retrieve the dressed leptons. Definition at line 77 of file DressedLeptons.hh. { return _clusteredLeptons; }
Is this final state empty? Definition at line 41 of file ParticleFinder.hh. { return particles().empty(); }
Template-usable interface common to JetAlg. Definition at line 176 of file ParticleFinder.hh. { return particles(); }
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; }
Definition at line 44 of file ParticleFinder.hh. { return particles().empty(); }
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; } Get the final-state particles in no particular order, with no cuts. Definition at line 35 of file ParticleFinder.hh. { return _theParticles; } Get the final-state particles, with optional cuts.
Definition at line 50 of file ParticleFinder.hh.
Get the final-state particles, ordered by supplied sorting function object.
Definition at line 70 of file ParticleFinder.hh. Get the final-state particles, ordered by supplied sorting function object.
Definition at line 80 of file ParticleFinder.hh.
Get the final-state particles, ordered by decreasing
Definition at line 116 of file ParticleFinder.hh.
Get the final-state particles, ordered by decreasing
Definition at line 124 of file ParticleFinder.hh. { return particles(c, cmpMomByEt); }
Get the final-state particles, ordered by increasing
Definition at line 132 of file ParticleFinder.hh. { return particles(c, cmpMomByEta); }
Get the final-state particles, ordered by increasing
Definition at line 140 of file ParticleFinder.hh. { return particles(c, cmpMomByAbsEta); }
Get the final-state particles, ordered by increasing
Definition at line 156 of file ParticleFinder.hh. { return particles(c, cmpMomByAbsRap); }
Get the final-state particles, ordered by decreasing
Definition at line 108 of file ParticleFinder.hh.
Get the final-state particles, ordered by decreasing This is a very common use-case, so is available as syntatic sugar for particles(c, cmpMomByPt). Definition at line 88 of file ParticleFinder.hh. { return particles(c, cmpMomByPt); }
Get the final-state particles, ordered by decreasing This is a very common use-case, so is available as syntatic sugar for particles(Cuts::pT >= ptmin, cmpMomByPt). Definition at line 95 of file ParticleFinder.hh. { return particles(Cuts::pT >= ptmin, cmpMomByPt); }
Get the final-state particles, ordered by increasing
Definition at line 148 of file ParticleFinder.hh. { return particles(c, cmpMomByRap); } Apply the projection on the supplied event. Reimplemented from FinalState. Definition at line 77 of file DressedLeptons.cc. { _theParticles.clear(); _clusteredLeptons.clear(); const FinalState& signal = applyProjection<FinalState>(e, "Leptons"); Particles bareleptons = signal.particles(); if (bareleptons.empty()) return; vector<DressedLepton> allClusteredLeptons; for (size_t i = 0; i < bareleptons.size(); ++i) { allClusteredLeptons.push_back(DressedLepton(bareleptons[i])); } // Match each photon to its closest charged lepton within the dR cone const FinalState& photons = applyProjection<FinalState>(e, "Photons"); for (const Particle& photon : photons.particles()) { // Ignore photon if it's from a hadron/tau decay and we're avoiding those if (!_fromDecay && photon.fromDecay()) continue; const FourMomentum& p_P = photon.momentum(); double dRmin = _dRmax; int idx = -1; for (size_t i = 0; i < bareleptons.size(); ++i) { // Only cluster photons around *charged* signal particles if (bareleptons[i].charge3() == 0) continue; // Find the closest lepton const FourMomentum& p_l = bareleptons[i].momentum(); double dR = deltaR(p_l, p_P); if (dR < dRmin) { dRmin = dR; idx = i; } } if (idx > -1) { if (_cluster) allClusteredLeptons[idx].addPhoton(photon, _cluster); } } for (const DressedLepton& lepton : allClusteredLeptons) { if (accept(lepton)) { _clusteredLeptons.push_back(lepton); _theParticles.push_back(lepton.constituentLepton()); _theParticles += lepton.constituentPhotons(); } } }
Used by derived classes to set their name. Definition at line 121 of file Projection.hh.
Access the projected final-state particles. Definition at line 38 of file ParticleFinder.hh. { return particles().size(); } 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
Flag to forbid projection registration in analyses until the init phase. Definition at line 176 of file ProjectionApplier.hh.
Whether to actually add the photon momenta to clusteredLeptons. Definition at line 99 of file DressedLeptons.hh.
Container which stores the clustered lepton objects. Definition at line 104 of file DressedLeptons.hh. The kinematic cuts cuts. Definition at line 192 of file ParticleFinder.hh.
Maximum cone radius to find photons in. Definition at line 97 of file DressedLeptons.hh.
Whether to include photons from hadron (particularly pi0) decays. Definition at line 101 of file DressedLeptons.hh.
The found particles returned by the particles() methods. Definition at line 195 of file ParticleFinder.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 ![]() |