Rivet analyses referenceOPAL_2004_I648738Quark and gluon jet fragmentation functionsExperiment: OPAL (LEP) Inspire ID: 648738 Status: VALIDATED Authors:
Beam energies: (6.4, 6.4); (13.4, 13.4); (24.0, 24.0); (45.6, 45.6); (46.5, 46.5); (48.5, 48.5); (98.5, 98.5) GeV Run details:
Measurement of the fragmentation functions for quarks and gluons at LEP. Useful for studying the properties of gluon jets and the differences between quark and gluon jets. For the study of gluon jets the fictional $e^+e^-\to g g $ process must be used. The data in histograms labelled "hemisphere fragmentation" are measured from jets defined by hemispheres, with an energy scale defined by $E=\sqrt{s}/2$, while data in histograms named "durham fragmentation" are measured from jets defined by the durham algorithm with $Q_\mathrm{jet}=E_\mathrm{jet}\sin(\theta/2)$ as the energy scale. The rivet analysis defines the jet flavour from the initial quarks, as the data are corrected for impurities, and defines all jets as hemispheres with energy scale $E=\sqrt{s}/2$. Source code: OPAL_2004_I648738.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/ChargedFinalState.hh"
5
6namespace Rivet {
7
8
9 class OPAL_2004_I648738 : public Analysis {
10 public:
11
12 /// Constructor
13 OPAL_2004_I648738()
14 : Analysis("OPAL_2004_I648738"), _sumW(3), _histo_xE(3)
15 { }
16
17
18 /// @name Analysis methods
19 /// @{
20 void init() {
21 declare(FinalState(), "FS");
22 declare(ChargedFinalState(), "CFS");
23 unsigned int ih=0;
24 if (inRange(0.5*sqrtS()/GeV, 4.0, 9.0)) {
25 ih = 1;
26 }
27 else if (inRange(0.5*sqrtS()/GeV, 9.0, 19.0)) {
28 ih = 2;
29 }
30 else if (inRange(0.5*sqrtS()/GeV, 19.0, 30.0)) {
31 ih = 3;
32 }
33 else if (inRange(0.5*sqrtS()/GeV, 45.5, 45.7)) {
34 ih = 5;
35 }
36 else if (inRange(0.5*sqrtS()/GeV, 30.0, 70.0)) {
37 ih = 4;
38 }
39 else if (inRange(0.5*sqrtS()/GeV, 91.5, 104.5)) {
40 ih = 6;
41 }
42 assert(ih>0);
43 // book the histograms
44 book(_histo_xE[0], ih+5,1,1);
45 book(_histo_xE[1], ih+5,1,2);
46 if(ih<5) book(_histo_xE[2] ,ih+5,1,3);
47 book(_sumW[0], "_sumW_0");
48 book(_sumW[1], "_sumW_1");
49 book(_sumW[2], "_sumW_2");
50 }
51
52 /// Perform the per-event analysis
53 void analyze(const Event& event) {
54 // find the initial quarks/gluons
55 Particles initial;
56 for (ConstGenParticlePtr p : HepMCUtils::particles(event.genEvent())) {
57 ConstGenVertexPtr pv = p->production_vertex();
58 const PdgId pid = abs(p->pdg_id());
59 if(!( (pid>=1&&pid<=5) || pid ==21) ) continue;
60 bool passed = false;
61 for (ConstGenParticlePtr pp : HepMCUtils::particles(pv, Relatives::PARENTS)) {
62 const PdgId ppid = abs(pp->pdg_id());
63 passed = (ppid == PID::ELECTRON || ppid == PID::HIGGS ||
64 ppid == PID::ZBOSON || ppid == PID::GAMMA);
65 if(passed) break;
66 }
67 if(passed) initial.push_back(Particle(*p));
68 }
69 if(initial.size()!=2) {
70 vetoEvent;
71 }
72 // type of event
73 unsigned int itype=2;
74 if(initial[0].pid()==-initial[1].pid()) {
75 PdgId pid = abs(initial[0].pid());
76 if(pid>=1&&pid<=4)
77 itype=0;
78 else
79 itype=1;
80 }
81 assert(itype<_histo_xE.size());
82
83 // fill histograms
84 _sumW[itype]->fill(2.);
85 const Particles& chps = apply<FinalState>(event, "CFS").particles();
86 for(const Particle& p : chps) {
87 double xE = 2.*p.E()/sqrtS();
88 _histo_xE[itype]->fill(xE);
89 }
90
91 }
92
93
94 /// Normalise histograms etc., after the run
95 void finalize() {
96 for(unsigned int ix=0;ix<_histo_xE.size();++ix) {
97 if(_sumW[ix]->val()>0.) scale(_histo_xE[ix],1./ *_sumW[ix]);
98 }
99 }
100 /// @}
101
102
103 private:
104
105 vector<CounterPtr> _sumW;
106
107 /// @name Histograms
108 /// @{
109 vector<Histo1DPtr> _histo_xE;
110 /// @}
111
112
113 };
114
115 RIVET_DECLARE_PLUGIN(OPAL_2004_I648738);
116
117}
|