rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

SLD_1999_I469925

Production of $\pi^+$, $K^+$, $K^0$, $K^{*0}$, $\Phi$, $p$ and $\Lambda^0$ in hadronic $Z^0$ decay
Experiment: SLD (SLC)
Inspire ID: 469925
Status: VALIDATED
Authors:
  • Peter Richardson
References:
  • Phys.Rev.D59:052001,1999
  • hep-ex/9805029
Beams: e+ e-
Beam energies: (45.6, 45.6) GeV
Run details:
  • Hadronic Z decay events generated on the Z pole ($\sqrt{s} = 91.2$ GeV)

Measurement of scaled momentum distributions and fragmentation functions in flavour tagged events at SLC. SLD measured these observables in uds-, c-, and b-events separately. An inclusive measurement is also included.

Source code: SLD_1999_I469925.cc
  1// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/Beam.hh"
  4#include "Rivet/Projections/FinalState.hh"
  5#include "Rivet/Projections/UnstableParticles.hh"
  6#include "Rivet/Projections/ChargedFinalState.hh"
  7#include "Rivet/Projections/Thrust.hh"
  8
  9#define I_KNOW_THE_INITIAL_QUARKS_PROJECTION_IS_DODGY_BUT_NEED_TO_USE_IT
 10#include "Rivet/Projections/InitialQuarks.hh"
 11
 12namespace Rivet {
 13
 14
 15  /// @brief SLD flavour-dependent fragmentation paper
 16  ///
 17  /// @author Peter Richardson
 18  class SLD_1999_I469925 : public Analysis {
 19  public:
 20
 21    /// Constructor
 22    RIVET_DEFAULT_ANALYSIS_CTOR(SLD_1999_I469925);
 23
 24
 25    /// @name Analysis methods
 26    /// @{
 27
 28    void analyze(const Event& e) {
 29      // First, veto on leptonic events by requiring at least 4 charged FS particles
 30      const FinalState& fs = apply<FinalState>(e, "FS");
 31      const size_t numParticles = fs.particles().size();
 32
 33      // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
 34      if (numParticles < 2) {
 35        MSG_DEBUG("Failed ncharged cut");
 36        vetoEvent;
 37      }
 38      MSG_DEBUG("Passed ncharged cut");
 39
 40      // Get beams and average beam momentum
 41      const ParticlePair& beams = apply<Beam>(e, "Beams").beams();
 42      const double meanBeamMom = ( beams.first.p3().mod() +
 43                                   beams.second.p3().mod() ) / 2.0;
 44      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
 45      int flavour = 0;
 46      const InitialQuarks& iqf = apply<InitialQuarks>(e, "IQF");
 47
 48      // If we only have two quarks (qqbar), just take the flavour.
 49      // If we have more than two quarks, look for the highest energetic q-qbar pair.
 50      /// @todo Can we make this based on hadron flavour instead?
 51      Particles quarks;
 52      if (iqf.particles().size() == 2) {
 53        flavour = iqf.particles().front().abspid();
 54        quarks = iqf.particles();
 55      } else {
 56        map<int, Particle > quarkmap;
 57        for (const Particle& p : iqf.particles()) {
 58          if (quarkmap.find(p.pid()) == quarkmap.end()) quarkmap[p.pid()] = p;
 59          else if (quarkmap[p.pid()].E() < p.E()) quarkmap[p.pid()] = p;
 60        }
 61        double maxenergy = 0.;
 62        for (int i = 1; i <= 5; ++i) {
 63          double energy(0.);
 64          if (quarkmap.find( i) != quarkmap.end())
 65            energy += quarkmap[ i].E();
 66          if (quarkmap.find(-i) != quarkmap.end())
 67            energy += quarkmap[-i].E();
 68          if (energy > maxenergy)
 69            flavour = i;
 70        }
 71        if (quarkmap.find(flavour) != quarkmap.end())
 72          quarks.push_back(quarkmap[flavour]);
 73        if (quarkmap.find(-flavour) != quarkmap.end())
 74          quarks.push_back(quarkmap[-flavour]);
 75      }
 76      switch (flavour) {
 77      case PID::DQUARK:
 78      case PID::UQUARK:
 79      case PID::SQUARK:
 80        _SumOfudsWeights->fill();
 81        break;
 82      case PID::CQUARK:
 83        _SumOfcWeights->fill();
 84        break;
 85      case PID::BQUARK:
 86        _SumOfbWeights->fill();
 87        break;
 88      }
 89      // thrust axis for projections
 90      Vector3 axis = apply<Thrust>(e, "Thrust").thrustAxis();
 91      double dot(0.);
 92      if (!quarks.empty()) {
 93        dot = quarks[0].p3().dot(axis);
 94        if (quarks[0].pid() < 0) dot *= -1;
 95      }
 96      vector<unsigned int> multTmp = {0,0,0,0,0,0,0};
 97      for (const Particle& p : fs.particles()) {
 98        const double xp = p.p3().mod()/meanBeamMom;
 99        // if in quark or antiquark hemisphere
100        bool quark = p.p3().dot(axis)*dot > 0.;
101        _h_XpChargedN->fill(xp);
102        _temp_XpChargedN1->fill(xp);
103        _temp_XpChargedN2->fill(xp);
104        _temp_XpChargedN3->fill(xp);
105        int id = p.abspid();
106        // charged pions
107        if (id == PID::PIPLUS) {
108          _h_XpPiPlusN->fill(xp);
109          ++multTmp[0];
110          switch (flavour) {
111          case PID::DQUARK:
112          case PID::UQUARK:
113          case PID::SQUARK:
114            _h_XpPiPlusLight->fill(xp);
115            if( ( quark && p.pid()>0 ) || ( !quark && p.pid()<0 ))
116              _h_RPiPlus->fill(xp);
117            else
118              _h_RPiMinus->fill(xp);
119            break;
120          case PID::CQUARK:
121            _h_XpPiPlusCharm->fill(xp);
122            break;
123          case PID::BQUARK:
124            _h_XpPiPlusBottom->fill(xp);
125            break;
126          }
127        }
128        else if (id == PID::KPLUS) {
129          _h_XpKPlusN->fill(xp);
130          ++multTmp[1];
131          switch (flavour) {
132          case PID::DQUARK:
133          case PID::UQUARK:
134          case PID::SQUARK:
135            _temp_XpKPlusLight->fill(xp);
136            _h_XpKPlusLight->fill(xp);
137            if( ( quark && p.pid()>0 ) || ( !quark && p.pid()<0 ))
138              _h_RKPlus->fill(xp);
139            else
140              _h_RKMinus->fill(xp);
141            break;
142         break;
143          case PID::CQUARK:
144            _h_XpKPlusCharm->fill(xp);
145            _temp_XpKPlusCharm->fill(xp);
146            break;
147          case PID::BQUARK:
148            _h_XpKPlusBottom->fill(xp);
149            break;
150          }
151        }
152        else if (id == PID::PROTON) {
153          _h_XpProtonN->fill(xp);
154          ++multTmp[5];
155          switch (flavour) {
156          case PID::DQUARK:
157          case PID::UQUARK:
158          case PID::SQUARK:
159            _temp_XpProtonLight->fill(xp);
160            _h_XpProtonLight->fill(xp);
161            if( ( quark && p.pid()>0 ) || ( !quark && p.pid()<0 ))
162              _h_RProton->fill(xp);
163            else
164              _h_RPBar  ->fill(xp);
165            break;
166         break;
167          case PID::CQUARK:
168            _temp_XpProtonCharm->fill(xp);
169            _h_XpProtonCharm->fill(xp);
170            break;
171          case PID::BQUARK:
172            _h_XpProtonBottom->fill(xp);
173            break;
174          }
175        }
176      }
177
178      const UnstableParticles& ufs = apply<UnstableParticles>(e, "UFS");
179      for (const Particle& p : ufs.particles()) {
180        const double xp = p.p3().mod()/meanBeamMom;
181        // if in quark or antiquark hemisphere
182        bool quark = p.p3().dot(axis)*dot>0.;
183        int id = p.abspid();
184        if (id == PID::LAMBDA) {
185          ++multTmp[6];
186          _h_XpLambdaN->fill(xp);
187          switch (flavour) {
188          case PID::DQUARK:
189          case PID::UQUARK:
190          case PID::SQUARK:
191            _h_XpLambdaLight->fill(xp);
192            if( ( quark && p.pid()>0 ) || ( !quark && p.pid()<0 ))
193              _h_RLambda->fill(xp);
194            else
195              _h_RLBar  ->fill(xp);
196            break;
197          case PID::CQUARK:
198            _h_XpLambdaCharm->fill(xp);
199            break;
200          case PID::BQUARK:
201            _h_XpLambdaBottom->fill(xp);
202            break;
203          }
204        }
205        else if (id == 313) {
206          ++multTmp[3];
207          _h_XpKStar0N->fill(xp);
208          switch (flavour) {
209          case PID::DQUARK:
210          case PID::UQUARK:
211          case PID::SQUARK:
212            _temp_XpKStar0Light->fill(xp);
213            _h_XpKStar0Light->fill(xp);
214            if ( ( quark && p.pid()>0 ) || ( !quark && p.pid()<0 ))
215              _h_RKS0   ->fill(xp);
216            else
217              _h_RKSBar0->fill(xp);
218            break;
219            break;
220          case PID::CQUARK:
221            _temp_XpKStar0Charm->fill(xp);
222            _h_XpKStar0Charm->fill(xp);
223            break;
224          case PID::BQUARK:
225            _h_XpKStar0Bottom->fill(xp);
226            break;
227          }
228        }
229        else if (id == 333) {
230          ++multTmp[4];
231          _h_XpPhiN->fill(xp);
232          switch (flavour) {
233          case PID::DQUARK:
234          case PID::UQUARK:
235          case PID::SQUARK:
236            _h_XpPhiLight->fill(xp);
237            break;
238          case PID::CQUARK:
239            _h_XpPhiCharm->fill(xp);
240            break;
241          case PID::BQUARK:
242            _h_XpPhiBottom->fill(xp);
243            break;
244          }
245        }
246        else if (id == PID::K0S || id == PID::K0L) {
247          ++multTmp[2];
248          _h_XpK0N->fill(xp);
249          switch (flavour) {
250          case PID::DQUARK:
251          case PID::UQUARK:
252          case PID::SQUARK:
253            _h_XpK0Light->fill(xp);
254            break;
255          case PID::CQUARK:
256            _h_XpK0Charm->fill(xp);
257            break;
258          case PID::BQUARK:
259            _h_XpK0Bottom->fill(xp);
260            break;
261          }
262        }
263      }
264      if(_labels.empty()) _labels=_mult[0]->xEdges();
265      for(unsigned int ix=0;ix<7;++ix) {
266        _mult[0]->fill(_labels[ix],multTmp[ix]);
267        switch (flavour) {
268        case PID::DQUARK:
269        case PID::UQUARK:
270        case PID::SQUARK:
271          _mult[1]->fill(_labels[ix],multTmp[ix]);
272          break;
273        case PID::CQUARK:
274          _mult[2]->fill(_labels[ix],multTmp[ix]);
275          break;
276        case PID::BQUARK:
277          _mult[3]->fill(_labels[ix],multTmp[ix]);
278          break;
279        }
280      }
281    }
282
283
284    void init() {
285      // Projections
286      declare(Beam(), "Beams");
287      declare(ChargedFinalState(), "FS");
288      declare(UnstableParticles(), "UFS");
289      declare(InitialQuarks(), "IQF");
290      declare(Thrust(FinalState()), "Thrust");
291
292      book(_temp_XpChargedN1 ,"TMP/XpChargedN1", refData( 1, 1, 1));
293      book(_temp_XpChargedN2 ,"TMP/XpChargedN2", refData( 2, 1, 1));
294      book(_temp_XpChargedN3 ,"TMP/XpChargedN3", refData( 3, 1, 1));
295
296      book(_h_XpPiPlusN      , 1, 1, 2);
297      book(_h_XpKPlusN       , 2, 1, 2);
298      book(_h_XpProtonN      , 3, 1, 2);
299      book(_h_XpChargedN     , 4, 1, 1);
300      book(_h_XpK0N          , 5, 1, 1);
301      book(_h_XpLambdaN      , 7, 1, 1);
302      book(_h_XpKStar0N      , 8, 1, 1);
303      book(_h_XpPhiN         , 9, 1, 1);
304
305      book(_h_XpPiPlusLight  ,10, 1, 1);
306      book(_h_XpPiPlusCharm  ,10, 1, 2);
307      book(_h_XpPiPlusBottom ,10, 1, 3);
308      book(_h_XpKPlusLight   ,12, 1, 1);
309      book(_h_XpKPlusCharm   ,12, 1, 2);
310      book(_h_XpKPlusBottom  ,12, 1, 3);
311      book(_h_XpKStar0Light  ,14, 1, 1);
312      book(_h_XpKStar0Charm  ,14, 1, 2);
313      book(_h_XpKStar0Bottom ,14, 1, 3);
314      book(_h_XpProtonLight  ,16, 1, 1);
315      book(_h_XpProtonCharm  ,16, 1, 2);
316      book(_h_XpProtonBottom ,16, 1, 3);
317      book(_h_XpLambdaLight  ,18, 1, 1);
318      book(_h_XpLambdaCharm  ,18, 1, 2);
319      book(_h_XpLambdaBottom ,18, 1, 3);
320      book(_h_XpK0Light      ,20, 1, 1);
321      book(_h_XpK0Charm      ,20, 1, 2);
322      book(_h_XpK0Bottom     ,20, 1, 3);
323      book(_h_XpPhiLight     ,22, 1, 1);
324      book(_h_XpPhiCharm     ,22, 1, 2);
325      book(_h_XpPhiBottom    ,22, 1, 3);
326
327      book(_temp_XpKPlusCharm   ,"TMP/XpKPlusCharm", refData(13, 1, 1));
328      book(_temp_XpKPlusLight   ,"TMP/XpKPlusLight", refData(13, 1, 1));
329      book(_temp_XpKStar0Charm  ,"TMP/XpKStar0Charm", refData(15, 1, 1));
330      book(_temp_XpKStar0Light  ,"TMP/XpKStar0Light", refData(15, 1, 1));
331      book(_temp_XpProtonCharm  ,"TMP/XpProtonCharm", refData(17, 1, 1));
332      book(_temp_XpProtonLight  ,"TMP/XpProtonLight", refData(17, 1, 1));
333
334      book(_h_RPiPlus  , 26, 1, 1);
335      book(_h_RPiMinus , 26, 1, 2);
336      book(_h_RKS0     , 28, 1, 1);
337      book(_h_RKSBar0  , 28, 1, 2);
338      book(_h_RKPlus   , 30, 1, 1);
339      book(_h_RKMinus  , 30, 1, 2);
340      book(_h_RProton  , 32, 1, 1);
341      book(_h_RPBar    , 32, 1, 2);
342      book(_h_RLambda  , 34, 1, 1);
343      book(_h_RLBar    , 34, 1, 2);
344
345      book(_s_Xp_PiPl_Ch      , 1, 1, 1);
346      book(_s_Xp_KPl_Ch       , 2, 1, 1);
347      book(_s_Xp_Pr_Ch        , 3, 1, 1);
348      book(_s_Xp_PiPlCh_PiPlLi, 11, 1, 1);
349      book(_s_Xp_PiPlBo_PiPlLi, 11, 1, 2);
350      book(_s_Xp_KPlCh_KPlLi  , 13, 1, 1);
351      book(_s_Xp_KPlBo_KPlLi  , 13, 1, 2);
352      book(_s_Xp_KS0Ch_KS0Li  , 15, 1, 1);
353      book(_s_Xp_KS0Bo_KS0Li  , 15, 1, 2);
354      book(_s_Xp_PrCh_PrLi    , 17, 1, 1);
355      book(_s_Xp_PrBo_PrLi    , 17, 1, 2);
356      book(_s_Xp_LaCh_LaLi    , 19, 1, 1);
357      book(_s_Xp_LaBo_LaLi    , 19, 1, 2);
358      book(_s_Xp_K0Ch_K0Li    , 21, 1, 1);
359      book(_s_Xp_K0Bo_K0Li    , 21, 1, 2);
360      book(_s_Xp_PhiCh_PhiLi  , 23, 1, 1);
361      book(_s_Xp_PhiBo_PhiLi  , 23, 1, 2);
362
363      book(_s_PiM_PiP   , 27, 1, 1);
364      book(_s_KSBar0_KS0, 29, 1, 1);
365      book(_s_KM_KP     , 31, 1, 1);
366      book(_s_Pr_PBar   , 33, 1, 1);
367      book(_s_Lam_LBar  , 35, 1, 1);
368
369      book(_SumOfudsWeights, "_SumOfudsWeights");
370      book(_SumOfcWeights, "_SumOfcWeights");
371      book(_SumOfbWeights, "_SumOfbWeights");
372
373      for ( size_t i=0; i<4; ++i)
374        book(_mult[i],24,1,1+i);
375    }
376
377
378    /// Finalize
379    void finalize() {
380      // Get the ratio plots sorted out first
381      divide(_h_XpPiPlusN, _temp_XpChargedN1, _s_Xp_PiPl_Ch);
382      divide(_h_XpKPlusN, _temp_XpChargedN2, _s_Xp_KPl_Ch);
383      divide(_h_XpProtonN, _temp_XpChargedN3, _s_Xp_Pr_Ch);
384      divide(_h_XpPiPlusCharm, _h_XpPiPlusLight, _s_Xp_PiPlCh_PiPlLi);
385      _s_Xp_PiPlCh_PiPlLi->scale(dbl(*_SumOfudsWeights / *_SumOfcWeights));
386      divide(_h_XpPiPlusBottom, _h_XpPiPlusLight, _s_Xp_PiPlBo_PiPlLi);
387       _s_Xp_PiPlBo_PiPlLi->scale(dbl(*_SumOfudsWeights / *_SumOfbWeights));
388      divide(_temp_XpKPlusCharm , _temp_XpKPlusLight, _s_Xp_KPlCh_KPlLi);
389      _s_Xp_KPlCh_KPlLi->scale(dbl(*_SumOfudsWeights / *_SumOfcWeights));
390      divide(_h_XpKPlusBottom, _h_XpKPlusLight, _s_Xp_KPlBo_KPlLi);
391       _s_Xp_KPlBo_KPlLi->scale(dbl(*_SumOfudsWeights / *_SumOfbWeights));
392      divide(_temp_XpKStar0Charm, _temp_XpKStar0Light, _s_Xp_KS0Ch_KS0Li);
393      _s_Xp_KS0Ch_KS0Li->scale(dbl(*_SumOfudsWeights / *_SumOfcWeights));
394      divide(_h_XpKStar0Bottom, _h_XpKStar0Light, _s_Xp_KS0Bo_KS0Li);
395      _s_Xp_KS0Bo_KS0Li->scale(dbl(*_SumOfudsWeights / *_SumOfbWeights));
396      divide(_temp_XpProtonCharm, _temp_XpProtonLight, _s_Xp_PrCh_PrLi);
397      _s_Xp_PrCh_PrLi->scale(dbl(*_SumOfudsWeights / *_SumOfcWeights));
398      divide(_h_XpProtonBottom, _h_XpProtonLight, _s_Xp_PrBo_PrLi);
399      _s_Xp_PrBo_PrLi->scale(dbl(*_SumOfudsWeights / *_SumOfbWeights));
400      divide(_h_XpLambdaCharm, _h_XpLambdaLight, _s_Xp_LaCh_LaLi);
401      _s_Xp_LaCh_LaLi->scale(dbl(*_SumOfudsWeights / *_SumOfcWeights));
402      divide(_h_XpLambdaBottom, _h_XpLambdaLight, _s_Xp_LaBo_LaLi);
403      _s_Xp_LaBo_LaLi->scale(dbl(*_SumOfudsWeights / *_SumOfbWeights));
404      divide(_h_XpK0Charm, _h_XpK0Light, _s_Xp_K0Ch_K0Li);
405      _s_Xp_K0Ch_K0Li->scale(dbl(*_SumOfudsWeights / *_SumOfcWeights));
406      divide(_h_XpK0Bottom, _h_XpK0Light, _s_Xp_K0Bo_K0Li);
407      _s_Xp_K0Bo_K0Li->scale(dbl(*_SumOfudsWeights / *_SumOfbWeights));
408      divide(_h_XpPhiCharm, _h_XpPhiLight, _s_Xp_PhiCh_PhiLi);
409      _s_Xp_PhiCh_PhiLi->scale(dbl(*_SumOfudsWeights / *_SumOfcWeights));
410      divide(_h_XpPhiBottom, _h_XpPhiLight, _s_Xp_PhiBo_PhiLi);
411      _s_Xp_PhiBo_PhiLi->scale(dbl(*_SumOfudsWeights / *_SumOfbWeights));
412
413      // Then the leading particles
414      divide(*_h_RPiMinus - *_h_RPiPlus, *_h_RPiMinus + *_h_RPiPlus, _s_PiM_PiP);
415      divide(*_h_RKSBar0 - *_h_RKS0, *_h_RKSBar0 + *_h_RKS0, _s_KSBar0_KS0);
416      divide(*_h_RKMinus - *_h_RKPlus, *_h_RKMinus + *_h_RKPlus, _s_KM_KP);
417      divide(*_h_RProton - *_h_RPBar, *_h_RProton + *_h_RPBar, _s_Pr_PBar);
418      divide(*_h_RLambda - *_h_RLBar, *_h_RLambda + *_h_RLBar, _s_Lam_LBar);
419
420      // Then the rest
421      scale(_h_XpPiPlusN,      1/sumOfWeights());
422      scale(_h_XpKPlusN,       1/sumOfWeights());
423      scale(_h_XpProtonN,      1/sumOfWeights());
424      scale(_h_XpChargedN,     1/sumOfWeights());
425      scale(_h_XpK0N,          1/sumOfWeights());
426      scale(_h_XpLambdaN,      1/sumOfWeights());
427      scale(_h_XpKStar0N,      1/sumOfWeights());
428      scale(_h_XpPhiN,         1/sumOfWeights());
429      scale(_h_XpPiPlusLight,  1 / *_SumOfudsWeights);
430      scale(_h_XpPiPlusCharm,  1 / *_SumOfcWeights);
431      scale(_h_XpPiPlusBottom, 1 / *_SumOfbWeights);
432      scale(_h_XpKPlusLight,   1 / *_SumOfudsWeights);
433      scale(_h_XpKPlusCharm,   1 / *_SumOfcWeights);
434      scale(_h_XpKPlusBottom,  1 / *_SumOfbWeights);
435      scale(_h_XpKStar0Light,  1 / *_SumOfudsWeights);
436      scale(_h_XpKStar0Charm,  1 / *_SumOfcWeights);
437      scale(_h_XpKStar0Bottom, 1 / *_SumOfbWeights);
438      scale(_h_XpProtonLight,  1 / *_SumOfudsWeights);
439      scale(_h_XpProtonCharm,  1 / *_SumOfcWeights);
440      scale(_h_XpProtonBottom, 1 / *_SumOfbWeights);
441      scale(_h_XpLambdaLight,  1 / *_SumOfudsWeights);
442      scale(_h_XpLambdaCharm,  1 / *_SumOfcWeights);
443      scale(_h_XpLambdaBottom, 1 / *_SumOfbWeights);
444      scale(_h_XpK0Light,      1 / *_SumOfudsWeights);
445      scale(_h_XpK0Charm,      1 / *_SumOfcWeights);
446      scale(_h_XpK0Bottom,     1 / *_SumOfbWeights);
447      scale(_h_XpPhiLight,     1 / *_SumOfudsWeights);
448      scale(_h_XpPhiCharm ,    1 / *_SumOfcWeights);
449      scale(_h_XpPhiBottom,    1 / *_SumOfbWeights);
450      scale(_h_RPiPlus,        1 / *_SumOfudsWeights);
451      scale(_h_RPiMinus,       1 / *_SumOfudsWeights);
452      scale(_h_RKS0,           1 / *_SumOfudsWeights);
453      scale(_h_RKSBar0,        1 / *_SumOfudsWeights);
454      scale(_h_RKPlus,         1 / *_SumOfudsWeights);
455      scale(_h_RKMinus,        1 / *_SumOfudsWeights);
456      scale(_h_RProton,        1 / *_SumOfudsWeights);
457      scale(_h_RPBar,          1 / *_SumOfudsWeights);
458      scale(_h_RLambda,        1 / *_SumOfudsWeights);
459      scale(_h_RLBar,          1 / *_SumOfudsWeights);
460
461      // Multiplicities
462      BinnedEstimatePtr<string> diffCharm,diffBottom;
463      book(diffCharm ,25,1,1);
464      book(diffBottom,25,1,2);
465      for(unsigned int ix=0;ix<7;++ix) {
466        const double val1 = _mult[2]->bin(ix+1).mean(2)-_mult[1]->bin(ix+1).mean(2);
467        const double err1 = sqrt(sqr(_mult[2]->bin(ix+1).stdErr(2))+sqr(_mult[1]->bin(ix+1).stdErr(2)));
468        diffCharm->bin(ix+1).set(val1,err1);
469        const double val2 = _mult[3]->bin(ix+1).mean(2)-_mult[1]->bin(ix+1).mean(2);
470        const double err2 = sqrt(sqr(_mult[3]->bin(ix+1).stdErr(2))+sqr(_mult[1]->bin(ix+1).stdErr(2)));
471        diffBottom->bin(ix+1).set(val2,err2);
472      }
473    }
474
475    /// @}
476
477
478  private:
479
480    /// Store the weighted sums of numbers of charged / charged+neutral
481    /// particles. Used to calculate average number of particles for the
482    /// inclusive single particle distributions' normalisations.
483    CounterPtr _SumOfudsWeights, _SumOfcWeights, _SumOfbWeights;
484
485    Histo1DPtr _h_XpPiPlusSig, _h_XpPiPlusN;
486    Histo1DPtr _h_XpKPlusSig, _h_XpKPlusN;
487    Histo1DPtr _h_XpProtonSig, _h_XpProtonN;
488    Histo1DPtr _h_XpChargedN;
489    Histo1DPtr _h_XpK0N, _h_XpLambdaN;
490    Histo1DPtr _h_XpKStar0N, _h_XpPhiN;
491    Histo1DPtr _h_XpPiPlusLight, _h_XpPiPlusCharm, _h_XpPiPlusBottom;
492    Histo1DPtr _h_XpKPlusLight, _h_XpKPlusCharm, _h_XpKPlusBottom;
493    Histo1DPtr _h_XpKStar0Light, _h_XpKStar0Charm, _h_XpKStar0Bottom;
494    Histo1DPtr _h_XpProtonLight, _h_XpProtonCharm, _h_XpProtonBottom;
495    Histo1DPtr _h_XpLambdaLight, _h_XpLambdaCharm, _h_XpLambdaBottom;
496    Histo1DPtr _h_XpK0Light, _h_XpK0Charm, _h_XpK0Bottom;
497    Histo1DPtr _h_XpPhiLight, _h_XpPhiCharm, _h_XpPhiBottom;
498
499    Histo1DPtr _temp_XpChargedN1, _temp_XpChargedN2, _temp_XpChargedN3;
500    Histo1DPtr _temp_XpKPlusCharm , _temp_XpKPlusLight;
501    Histo1DPtr _temp_XpKStar0Charm, _temp_XpKStar0Light;
502    Histo1DPtr _temp_XpProtonCharm, _temp_XpProtonLight;
503
504    Histo1DPtr _h_RPiPlus, _h_RPiMinus;
505    Histo1DPtr _h_RKS0, _h_RKSBar0;
506    Histo1DPtr _h_RKPlus, _h_RKMinus;
507    Histo1DPtr _h_RProton, _h_RPBar;
508    Histo1DPtr _h_RLambda, _h_RLBar;
509
510    Estimate1DPtr _s_Xp_PiPl_Ch, _s_Xp_KPl_Ch,  _s_Xp_Pr_Ch;
511    Estimate1DPtr _s_Xp_PiPlCh_PiPlLi, _s_Xp_PiPlBo_PiPlLi;
512    Estimate1DPtr _s_Xp_KPlCh_KPlLi, _s_Xp_KPlBo_KPlLi;
513    Estimate1DPtr _s_Xp_KS0Ch_KS0Li, _s_Xp_KS0Bo_KS0Li;
514    Estimate1DPtr _s_Xp_PrCh_PrLi, _s_Xp_PrBo_PrLi;
515    Estimate1DPtr _s_Xp_LaCh_LaLi, _s_Xp_LaBo_LaLi;
516    Estimate1DPtr _s_Xp_K0Ch_K0Li, _s_Xp_K0Bo_K0Li;
517    Estimate1DPtr _s_Xp_PhiCh_PhiLi, _s_Xp_PhiBo_PhiLi;
518
519    Estimate1DPtr _s_PiM_PiP, _s_KSBar0_KS0, _s_KM_KP, _s_Pr_PBar, _s_Lam_LBar;
520    BinnedProfilePtr<string> _mult[4];
521    vector<string> _labels;
522    /// @}
523  };
524
525
526
527  RIVET_DECLARE_ALIASED_PLUGIN(SLD_1999_I469925, SLD_1999_S3743934);
528
529}