Rivet analyses

Inclusive D0 and D*+- production in deep inelastic e p scattering at HERA

Experiment: H1 (HERA)

Inspire ID: 421105

Status: VALIDATED

Authors: - Muhammad Ibrahim Abdulhamid - Hannes Jung

References: - Z.Phys.C 72 (1996) 593 - DOI: 10.1007/s002880050281,10.1007/BF02909190 - arXiv: hep-ex/9607012 - DESY-96-138

Beams: e- p+, p+ e-

Beam energies: (27.6, 820.0); (820.0, 27.6)GeV

Run details: - Charm production in DIS with Q2> 10 and 0.01 < y < 0.7

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

// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/FastJets.hh"
#include "Rivet/Projections/DISKinematics.hh"
#include "Rivet/Projections/UnstableParticles.hh"
namespace Rivet {


  /// @brief Inclusive D0 and D*+- production in deep inelastic e p scattering at HERA (H1)
  class H1_1996_I421105 : public Analysis {
  public:

    /// Constructor
    RIVET_DEFAULT_ANALYSIS_CTOR(H1_1996_I421105);


    /// @name Analysis methods
    ///@{

    /// Book histograms and initialise projections before the run
    void init() {

      // Declare projections
      declare(DISKinematics(), "Kinematics");
      declare(UnstableParticles(), "UFS");
      declare(FinalState(Cuts::abseta < 4.9), "FS");

      // Book histograms from reference data using HEPData ID (digits in "d01-x01-y01")
      book(_h["p_tD*_norm"], 4, 1, 1);
      book(_h["p_tD*"], 4, 1, 2);
      book(_h["p_tD0_norm"], 5, 1, 1);
      book(_h["p_tD0"], 5, 1, 2);
      book(_h["xD_D*_norm"], 6, 1, 1);
      book(_h["xD_D*"], 6, 1, 2);
      book(_h["xD_D0_norm"], 7, 1, 1);
      book(_h["xD_D0"], 7, 1, 2);
    }


    /// Perform the per-event analysis
    void analyze(const Event& event) {

      /// @todo Do the event by event analysis here
      const DISKinematics& dk = apply<DISKinematics>(event, "Kinematics");
      const LorentzTransform hcmboost = dk.boostHCM();

      // Get the DIS kinematics
      double y = dk.y();
      double W2 = dk.W2()/GeV2;
      double Q2 = dk.Q2()/GeV;

     bool cut ;
     cut = Q2 > 10 && Q2 < 100 && y > 0.01 && y < 0.7 ;
     
     if (! cut ) vetoEvent ;
     bool etacut ;
     for (const Particle& p : apply<UnstableParticles>(event, "UFS").particles()) {
        etacut = abs(p.momentum().eta()) < 1.5 ;
        const FourMomentum hcmMom = hcmboost.transform(p.momentum());
        double p_D ;
        double x_D = 0 ;
        p_D = std::sqrt( hcmMom.px()*hcmMom.px() + hcmMom.py()*hcmMom.py() + hcmMom.pz()*hcmMom.pz() );
        x_D = 2.*p_D/sqrt(W2);
        if (p.abspid() == 421) {
           _h["p_tD0"]->fill(p.momentum().pT()/GeV);
           _h["p_tD0_norm"]->fill(p.momentum().pT()/GeV);
           if (etacut ) _h["xD_D0"]->fill(x_D);
           if (etacut ) _h["xD_D0_norm"]->fill(x_D);
        }
          
        if (p.abspid() == 413) {
          _h["p_tD*"]->fill(p.momentum().pT()/GeV);
          _h["p_tD*_norm"]->fill(p.momentum().pT()/GeV);
          // x_D is defined for the D0
          if (etacut ) _h["xD_D*"]->fill(x_D);
          if (etacut ) _h["xD_D*_norm"]->fill(x_D);
        } 
    }

  }
    /// Normalise histograms etc., after the run
    void finalize() {
        
    
     scale(_h["p_tD*"], crossSection()/nanobarn/sumW()); 
     scale(_h["p_tD0"], crossSection()/nanobarn/sumW()); 
     normalize(_h["p_tD*_norm"]);
     normalize(_h["p_tD0_norm"]);
     
     scale(_h["xD_D*"], crossSection()/nanobarn/sumW()); 
     scale(_h["xD_D0"], crossSection()/nanobarn/sumW()); 
     normalize(_h["xD_D*_norm"]);
     normalize(_h["xD_D0_norm"]);


    }

    ///@}


    /// @name Histograms
    ///@{
    map<string, Histo1DPtr> _h;
    ///@}

  };


  RIVET_DECLARE_PLUGIN(H1_1996_I421105);

}