Rivet Analyses Reference

H1_1996_I424463

Transverse momentum spectra of charged particles in DIS (H1 1996)
Experiment: H1 (HERA)
Inspire ID: 424463
Status: VALIDATED
Authors:
  • Suraj Kumar Singh
  • Hannes Jung
References:Beams: e+ p+, p+ e+
Beam energies: (27.5, 820.0); (820.0, 27.5) GeV
    No run details listed

Transverse momentum spectra of charged particles produced in deep inelastic scattering are measured as a function of the kinematic variables x and Q2 using the H1 detector at the epcollider HERA. The data are compared to different patton emission models, either with or without ordering of the emissions in transverse momentum. The data provide evidence for a relatively large amount of patton radiation between the current and the remnant systems.

Source code: H1_1996_I424463.cc
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Tools/ParticleIdUtils.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/DISKinematics.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/DISKinematics.hh"

namespace Rivet {


  /// @brief Transverse momentum spectra of charged particles in DIS (H1 1996)
  class H1_1996_I424463 : public Analysis {
  public:

    /// Constructor
    DEFAULT_RIVET_ANALYSIS_CTOR(H1_1996_I424463);


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

    /// Book histograms and initialise projections before the run
    void init() {
      // Initialise and register projections
      //declare(FinalState(Cuts::abseta < 5 && Cuts::pT > 100*MeV), "FS");

      // Book histograms
      declare(DISLepton(), "Lepton");
      declare(DISKinematics(), "Kinematics");
      declare(ChargedFinalState(), "CFS");
      declare(FinalState(), "FS");


      // Book histograms
      // specify custom binning
      //book(_h["XXXX"], "myh1", 20, 0.0, 100.0);
      //book(_h["YYYY"], "myh2", logspace(20, 1e-2, 1e3));
      //book(_h["ZZZZ"], "myh3", {0.0, 1.0, 2.0, 4.0, 8.0, 16.0});
      // take binning from reference data using HEPData ID (digits in "d01-x01-y01" etc.)

      book(_NevAll, "TMP/Nev_all");
      _h_dndpt_high_eta_bin.resize(10);
      _h_dndpt_low_eta_bin.resize(10);
      _hdndeta_pt1_bin.resize(10);
      _hdndeta_bin.resize(10);
      _hdndptmax_low_eta_bin.resize(8);
      int ixx = 0 ;
      for (size_t ix = 0; ix < 10; ++ix) {
        book(_Nevt_after_cuts[ix], "TMP/Nevt_after_cuts" + to_string(ix));
        book(_h_dndpt_high_eta_bin[ix], ix+1, 1, 1);
        book(_h_dndpt_low_eta_bin[ix], ix+11, 1, 1);
        if (ix != 6 && ix != 9) {
          book(_hdndptmax_low_eta_bin[ixx], ixx+21, 1, 1);
          ixx=ixx+1;
        }
        book(_hdndeta_pt1_bin[ix], ix+29, 1, 1);
        book(_hdndeta_bin[ix],  ix+39, 1, 1);
      }


    }


    /// Perform the per-event analysis
    void analyze(const Event& event) {
      // const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS");
      const FinalState& fs = apply<FinalState>(event, "FS");
      const DISKinematics& dk = applyProjection<DISKinematics>(event, "Kinematics");
      const DISLepton& dl = applyProjection<DISLepton>(event,"Lepton");

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

      // Momentum of the scattered lepton
      FourMomentum leptonMom = dl.out().momentum();
      double enel = leptonMom.E();
      double thel = 180.-leptonMom.angle(dl.in().momentum())/degree;

      _NevAll -> fill() ;

       // cout <<"enel/GeV = "<<enel/GeV<<", thel = "<<thel<<", y = "<<y<<", x = "<<x<<std::endl;
       bool cut = y > 0.05 && Q2 > 5. && Q2 < 100.&& enel > 12. && W2 > 4400. && thel > 157. && thel < 173.;
       if (!cut) vetoEvent;

       int ibin[10] ;
       for ( int i=0; i< 10; i++) {
       ibin[i] = 0; }

       if(5.<Q2&&Q2<50.&&x>0.0001&&x<0.001)    ibin[0]=1;
       if(5.<Q2&&Q2<10.&&x>0.0001&&x<0.0002)   ibin[1]=1;
       if(6.<Q2&&Q2<10.&&x>0.0002&&x<0.0005)   ibin[2]=1;
       if(10.<Q2&&Q2<20.&&x>0.0002&&x<0.0005)  ibin[3]=1;
       if(10.<Q2&&Q2<20.&&x>0.0005&&x<0.0008)  ibin[4]=1;
       if(10.<Q2&&Q2<20.&&x>0.0008&&x<0.0015)  ibin[5]=1;
       if(10.<Q2&&Q2<20.&&x>0.0015&&x<0.004)   ibin[6]=1;
       if(20.<Q2&&Q2<50.&&x>0.0005&&x<0.0014)  ibin[7]=1;
       if(20.<Q2&&Q2<50.&&x>0.0014&&x<0.003)   ibin[8]=1;
       if(20.<Q2&&Q2<50.&&x>0.003&&x<0.01)     ibin[9]=1;

       for ( int i=0; i< 10; i++) { if(ibin[i]==1) _Nevt_after_cuts[i] ->fill(); }

      // Extract the particles other than the lepton
      Particles particles;
      particles.reserve(fs.particles().size());
      ConstGenParticlePtr dislepGP = dl.out().genParticle();
      for (const Particle& p : fs.particles()) {
        ConstGenParticlePtr loopGP = p.genParticle();
        if (loopGP == dislepGP) continue;
        particles.push_back(p);
      }

      // Boost to hadronic CM
      const LorentzTransform hcmboost = dk.boostHCM();

      int mult = 0 ;
      // Loop over the particles
      // long ncharged(0);
      double ptmax_high[10], ptmax_low[10] ;
      for ( int i=0; i< 10; i++) {
       ptmax_high[i] = 0.; ptmax_low[i] = 0.; }
      double EtSum = 0;
      for (size_t ip1 = 0; ip1 < particles.size(); ++ip1) {
         const Particle& p = particles[ip1];

         double eta = p.momentum().pseudorapidity();
         // Boost to hcm
         const FourMomentum hcmMom = hcmboost.transform(p.momentum());

         // apply safety cuts
         if (eta > -5  && eta < 10.) {
            mult = mult + 1;
	      double pThcm =hcmMom.pT() ;
            double etahcm = hcmMom.pseudorapidity();
            // cout << " charge " << PID::charge(p.pid()) << endl;
            if (etahcm > 0. && etahcm < 2.0) {
              EtSum = EtSum + hcmMom.Et();
            }
            if (PID::charge(p.pid()) != 0) {
              if (etahcm > 0.5 && etahcm < 1.5) {
               for ( int i=0; i< 10; i++) {
                  if (ibin[i]==1) {
                    _h_dndpt_low_eta_bin[i] ->fill(pThcm);
                    if (pThcm > ptmax_low[i] ) ptmax_low[i] = pThcm;
                    }
               }

              }
              if (etahcm > 1.5 && etahcm < 2.5){
               for ( int i=0; i< 10; i++) {
                 if (ibin[i]==1) {
                   _h_dndpt_high_eta_bin[i] ->fill(pThcm);
                   if (pThcm > ptmax_high[i] ) ptmax_high[i] = pThcm;
                 }
               }
              }
              for ( int i=0; i< 10; i++) {
              if(ibin[i]==1) _hdndeta_bin[i] ->fill(etahcm);
              if(ibin[i]==1 && pThcm > 1.) _hdndeta_pt1_bin[i] ->fill(etahcm);
              }
           }
         }  // end of loop over the particles
      }
      int ii=0;
      for ( int i=0; i< 10; i++) {
         if (i != 6 && i != 9 ) {
             if( ibin[i]==1 && EtSum > 6. ) {
              _hdndptmax_low_eta_bin[ii] ->fill(ptmax_low[i]);
               // cout << " filling ptmax " << ii << "  " <<  i << endl;
             }
            ii=ii+1;
         }
      }

    }
    /// Normalise histograms etc., after the run
    void finalize() {
    cout << " All events: " << _NevAll->val() << " after cuts: "<<  _Nevt_after_cuts[0]->val() << endl;
    cout << " cut1 events: " << _NevAll->val() << " after cuts: "<<  _Nevt_after_cuts[1]->val() << endl;


     int ii =0;
     for ( int i=0; i< 10; i++) {
        if (_Nevt_after_cuts[i]->val()  != 0) {
            scale(_h_dndpt_high_eta_bin[i], 1./ *_Nevt_after_cuts[i]);
            scale(_h_dndpt_low_eta_bin[i], 1./ *_Nevt_after_cuts[i]);
            scale(_hdndeta_bin[i], 1./ *_Nevt_after_cuts[i]);
            scale(_hdndeta_pt1_bin[i], 1./ *_Nevt_after_cuts[i]); }
        if ( i !=6 && i!=9) {
           // if (_Nevt_after_cuts[i]->val()  != 0) scale(_hdndptmax_low_eta_bin[ii], 1./ *_Nevt_after_cuts[i]); ii=ii+1; };
            if (_Nevt_after_cuts[i]->val()  != 0) normalize(_hdndptmax_low_eta_bin[ii]); ii=ii+1; };
     }
    }

    ///@}


    /// @name Histograms
    ///@{
    map<string, Histo1DPtr> _h;
    map<string, Profile1DPtr> _p;
    map<string, CounterPtr> _c;
    array<CounterPtr,10> _Nevt_after_cuts;
    vector<Histo1DPtr> _h_dndpt_low_eta_bin, _h_dndpt_high_eta_bin;
    vector<Histo1DPtr> _hdndeta_bin, _hdndeta_pt1_bin, _hdndptmax_low_eta_bin;
    CounterPtr _NevAll ;
   ///@}


  };


  DECLARE_RIVET_PLUGIN(H1_1996_I424463);

}