Rivet analyses referenceH1_1996_I421105Inclusive D0 and D*+- production in deep inelastic e p scattering at HERAExperiment: H1 (HERA) Inspire ID: 421105 Status: VALIDATED Authors:
Beam energies: (27.6, 820.0); (820.0, 27.6) GeV Run details:
First results on inclusive D0 and D* production in deep inelastic ep scattering are reported using data collected by the H1 experiment at HERA in 1994. Source code: H1_1996_I421105.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/FinalState.hh"
4#include "Rivet/Projections/FastJets.hh"
5#include "Rivet/Projections/DISKinematics.hh"
6#include "Rivet/Projections/UnstableParticles.hh"
7namespace Rivet {
8
9
10 /// @brief Inclusive D0 and D*+- production in deep inelastic e p scattering at HERA (H1)
11 class H1_1996_I421105 : public Analysis {
12 public:
13
14 /// Constructor
15 RIVET_DEFAULT_ANALYSIS_CTOR(H1_1996_I421105);
16
17
18 /// @name Analysis methods
19 ///@{
20
21 /// Book histograms and initialise projections before the run
22 void init() {
23
24 // Declare projections
25 declare(DISKinematics(), "Kinematics");
26 declare(UnstableParticles(), "UFS");
27 declare(FinalState(Cuts::abseta < 4.9), "FS");
28
29 // Book histograms from reference data using HEPData ID (digits in "d01-x01-y01")
30 book(_h["p_tD*_norm"], 4, 1, 1);
31 book(_h["p_tD*"], 4, 1, 2);
32 book(_h["p_tD0_norm"], 5, 1, 1);
33 book(_h["p_tD0"], 5, 1, 2);
34 book(_h["xD_D*_norm"], 6, 1, 1);
35 book(_h["xD_D*"], 6, 1, 2);
36 book(_h["xD_D0_norm"], 7, 1, 1);
37 book(_h["xD_D0"], 7, 1, 2);
38 }
39
40
41 /// Perform the per-event analysis
42 void analyze(const Event& event) {
43
44 /// @todo Do the event by event analysis here
45 const DISKinematics& dk = apply<DISKinematics>(event, "Kinematics");
46 const LorentzTransform hcmboost = dk.boostHCM();
47
48 // Get the DIS kinematics
49 double y = dk.y();
50 double W2 = dk.W2()/GeV2;
51 double Q2 = dk.Q2()/GeV;
52
53 bool cut ;
54 cut = Q2 > 10 && Q2 < 100 && y > 0.01 && y < 0.7 ;
55
56 if (! cut ) vetoEvent ;
57 bool etacut ;
58 for (const Particle& p : apply<UnstableParticles>(event, "UFS").particles()) {
59 etacut = abs(p.momentum().eta()) < 1.5 ;
60 const FourMomentum hcmMom = hcmboost.transform(p.momentum());
61 double p_D ;
62 double x_D = 0 ;
63 p_D = std::sqrt( hcmMom.px()*hcmMom.px() + hcmMom.py()*hcmMom.py() + hcmMom.pz()*hcmMom.pz() );
64 x_D = 2.*p_D/sqrt(W2);
65 if (p.abspid() == 421) {
66 _h["p_tD0"]->fill(p.momentum().pT()/GeV);
67 _h["p_tD0_norm"]->fill(p.momentum().pT()/GeV);
68 if (etacut ) _h["xD_D0"]->fill(x_D);
69 if (etacut ) _h["xD_D0_norm"]->fill(x_D);
70 }
71
72 if (p.abspid() == 413) {
73 _h["p_tD*"]->fill(p.momentum().pT()/GeV);
74 _h["p_tD*_norm"]->fill(p.momentum().pT()/GeV);
75 // x_D is defined for the D0
76 if (etacut ) _h["xD_D*"]->fill(x_D);
77 if (etacut ) _h["xD_D*_norm"]->fill(x_D);
78 }
79 }
80
81 }
82 /// Normalise histograms etc., after the run
83 void finalize() {
84
85
86 scale(_h["p_tD*"], crossSection()/nanobarn/sumW());
87 scale(_h["p_tD0"], crossSection()/nanobarn/sumW());
88 normalize(_h["p_tD*_norm"]);
89 normalize(_h["p_tD0_norm"]);
90
91 scale(_h["xD_D*"], crossSection()/nanobarn/sumW());
92 scale(_h["xD_D0"], crossSection()/nanobarn/sumW());
93 normalize(_h["xD_D*_norm"]);
94 normalize(_h["xD_D0_norm"]);
95
96
97 }
98
99 ///@}
100
101
102 /// @name Histograms
103 ///@{
104 map<string, Histo1DPtr> _h;
105 ///@}
106
107 };
108
109
110 RIVET_DECLARE_PLUGIN(H1_1996_I421105);
111
112}
|