File indexing completed on 2025-05-12 09:05:02
0001
0002 #ifndef RIVET_IMPACTPARAMETERPROJECTION_HH
0003 #define RIVET_IMPACTPARAMETERPROJECTION_HH
0004
0005 #include "Rivet/Projections/SingleValueProjection.hh"
0006 #include "Rivet/Projections/HepMCHeavyIon.hh"
0007
0008
0009 namespace Rivet {
0010
0011 class ImpactParameterProjection: public SingleValueProjection {
0012 public:
0013
0014 using SingleValueProjection::operator=;
0015
0016 ImpactParameterProjection() {
0017 setName("ImpactParameterProjection");
0018 declare(HepMCHeavyIon(), "HepMC");
0019 }
0020
0021
0022 RIVET_DEFAULT_PROJ_CLONE(ImpactParameterProjection);
0023
0024
0025 using Projection::operator =;
0026
0027
0028 protected:
0029
0030 void project(const Event& e) {
0031 clear();
0032 setValue(apply<HepMCHeavyIon>(e, "HepMC").impact_parameter());
0033 }
0034
0035 CmpState compare(const Projection&) const {
0036 return CmpState::EQ;
0037 }
0038
0039 };
0040
0041 }
0042
0043 #endif