Rivet API documentation
![]() |
Rivet 4.1.3
|
EventMixingFinalState.hh
146 weighted_shuffle(mixParticles.begin(), mixParticles.end(), weights.begin(), weights.end(), rng());
147 Particles tmp = vector<Particle>(mixParticles.begin(), mixParticles.begin() + size_t(ceil(mixParticles.size() / 2)));
Used together with the percentile-based analysis objects Percentile and PercentileXaxis.
Definition CentralityProjection.hh:27
virtual void calculateMixingObs(const Projection *mProj)=0
size_t nMix
The number of event to mix with.
Definition EventMixingFinalState.hh:196
bool unitWeights
Using unit weights or not.
Definition EventMixingFinalState.hh:202
vector< MixEvent > getMixingEvents() const
Return a vector of mixing events.
Definition EventMixingFinalState.hh:106
MixMap mixEvents
The event map.
Definition EventMixingFinalState.hh:199
EventMixingBase(const Projection &mixObsProj, const ParticleFinder &mix, size_t nMixIn, double oMin, double oMax, double deltao, const size_t defaultIdx)
Constructor.
Definition EventMixingFinalState.hh:74
void project(const Event &e)
Perform the projection on the Event.
Definition EventMixingFinalState.hh:162
double mObs
The mixing observable of the current event.
Definition EventMixingFinalState.hh:190
bool hasMixingEvents() const
Definition EventMixingFinalState.hh:98
virtual const Particles particles() const
Return a vector of particles from the mixing events.
Definition EventMixingFinalState.hh:117
CmpState compare(const Projection &p) const
Compare with other projections.
Definition EventMixingFinalState.hh:184
virtual void calculateMixingObs(const Projection *mProj)
Calculate the mixing observable.
Definition EventMixingFinalState.hh:254
virtual void calculateMixingObs(const Projection *mProj)
Calculate the mixing observable.
Definition EventMixingFinalState.hh:228
std::valarray< double > weights() const
The generation weights associated with the event.
Base class for projections which return subsets of an event's particles.
Definition ParticleFinder.hh:11
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > apply(const Event &evt, const Projection &proj) const
Apply the supplied projection on event evt.
Definition ProjectionApplier.hh:119
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version).
Definition ProjectionApplier.hh:184
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:148
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
#define MSG_DEBUG(x)
Debug messaging, not enabled by default, using MSG_LVL.
Definition Logging.hh:182
#define MSG_WARNING(x)
Warning messages for non-fatal bad things, using MSG_LVL.
Definition Logging.hh:187
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:653
Definition MC_CENT_PPB_Projections.hh:10
void weighted_shuffle(RandomAccessIterator first, RandomAccessIterator last, WeightIterator fw, WeightIterator lw, RandomNumberGenerator &g)
Make an event mixed together from several events.
Definition EventMixingFinalState.hh:40
pair< Particles, double > MixEvent
A MixEvent is a vector of particles with and associated weight.
Definition EventMixingFinalState.hh:55
std::mt19937 & rng()
Return a thread-safe random number generator (mainly for internal use).
Generated on for Rivet by
