2 #ifndef RIVET_SmearedMET_HH 3 #define RIVET_SmearedMET_HH 5 #include "Rivet/Projection.hh" 6 #include "Rivet/Projections/MissingMomentum.hh" 7 #include "Rivet/Tools/SmearingFunctions.hh" 23 template <
typename V2VFN>
25 : _metSmearFn(metSmearFn)
32 template <
typename V2VFN>
34 : _metSmearFn(metSmearFn)
50 if (get_address(_metSmearFn) == 0)
return cmp((
size_t)
this, (size_t)&p);
51 MSG_TRACE(
"Smear hashes = " << get_address(_metSmearFn) <<
"," << get_address(other._metSmearFn));
52 return mkPCmp(other,
"TruthMET") ||
cmp(get_address(_metSmearFn), get_address(other._metSmearFn));
58 const auto& mm = apply<MissingMomentum>(e,
"TruthMET");
60 if (_metSmearFn) _vet = _metSmearFn(_vet, mm.scalarEt());
123 std::function<Vector3(const Vector3&, double)> _metSmearFn;
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:142
Definition: MC_Cent_pPb.hh:10
CmpState compare(const Projection &p) const
Compare to another SmearedMET.
Definition: SmearedMET.hh:48
const Vector3 vectorMissingEt() const
Convenience vector MET function.
Definition: SmearedMET.hh:102
void reset()
Reset the projection. Smearing functions will be unchanged.
Definition: SmearedMET.hh:115
const Vector3 & vectorPt() const
Definition: SmearedMET.hh:72
void project(const Event &e)
Perform the MET finding & smearing calculation.
Definition: SmearedMET.hh:57
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
Cmp< Projection > mkPCmp(const Projection &otherparent, const std::string &pname) const
const Vector3 & vectorEt() const
Definition: SmearedMET.hh:99
DEFAULT_RIVET_PROJ_CLONE(SmearedMET)
Clone on the heap.
Wrapper projection for smearing missing (transverse) energy/momentum with detector resolutions...
Definition: SmearedMET.hh:14
const Vector3 vectorMissingPt() const
Convenience vector MPT function.
Definition: SmearedMET.hh:75
SmearedMET(const V2VFN &metSmearFn, const Cut &cut)
Constructor from a Cut (on the particles used to determine missing momentum) and a smearing function...
Definition: SmearedMET.hh:33
Calculate missing , etc.
Definition: MissingMomentum.hh:19
SmearedMET(const MissingMomentum &mm, const V2VFN &metSmearFn)
Constructor from a MissingMomentum projection and a smearing function.
Definition: SmearedMET.hh:24
double met() const
Alias for missingEt.
Definition: SmearedMET.hh:109
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:160
double missingPt() const
The vector-summed missing transverse momentum in the event.
Definition: SmearedMET.hh:80
double missingEt() const
The vector-summed missing transverse energy in the event.
Definition: SmearedMET.hh:107
Base class for all Rivet projections.
Definition: Projection.hh:29
Three-dimensional specialisation of Vector.
Definition: Vector3.hh:26
double mod() const
Calculate the modulus of a vector. .
Definition: VectorN.hh:95
Cmp< T > cmp(const T &t1, const T &t2)
Global helper function for easy creation of Cmp objects.
Definition: Cmp.hh:255