Rivet is hosted by Hepforge, IPPP Durham

Rivet analyses reference

ATLAS_2014_I1315949

Distributions sensitive to the underlying event in inclusive Z-boson production at 7 TeV
Experiment: ATLAS (LHC)
Inspire ID: 1315949
Status: VALIDATED
Authors:
  • Deepak Kar
References: Beams: p+ p+
Beam energies: (3500.0, 3500.0) GeV
Run details:
  • p + p -> Z + X ( Z -> mu^+ mu^- or e^+ e^- ). \sqrt{s} = 7 TeV

Charged-particle distributions sensitive to the properties of the underlying event are measured for an inclusive sample of events containing a $Z$-boson, decaying to an electron or muon pair. The measurement is based on data collected using the ATLAS detector at the LHC in protonproton collisions at a centre-of-mass energy of 7 TeV with an integrated luminosity of 4.6 $\text{fb}^{1}$. Distributions of the charged particle multiplicity and of the charged particle transverse momentum are measured in regions of azimuthal angle defined with respect to the $Z$-boson direction.

Source code: ATLAS_2014_I1315949.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
219
220
221
222
223
224
225
226
// -*- C++ -*-
#include "Rivet/Analysis.hh"
#include "Rivet/Projections/FinalState.hh"
#include "Rivet/Projections/ChargedFinalState.hh"
#include "Rivet/Projections/ZFinder.hh"

namespace Rivet {


  class ATLAS_2014_I1315949 : public Analysis {
  public:

    /// Constructor
    ATLAS_2014_I1315949()
      : Analysis("ATLAS_2014_I1315949")
    {    }

    void init() {

      FinalState fs;

      ZFinder zfinder(fs, Cuts::abseta<2.4 && Cuts::pT>20.0*GeV, PID::MUON, 66*GeV, 116*GeV, 0.1, ZFinder::CLUSTERNODECAY);
      declare(zfinder, "ZFinder");

      ChargedFinalState cfs( zfinder.remainingFinalState() );
      declare(cfs, "cfs");


      _h_pTsum_tow    = bookProfile1D( 1, 1, 1);
      _h_pTsum_trv    = bookProfile1D( 1, 1, 2);
      _h_pTsum_away   = bookProfile1D( 1, 1, 3);
      _h_pTsum_tmin   = bookProfile1D( 1, 1, 4);
      _h_pTsum_tmax   = bookProfile1D( 1, 1, 5);
      _h_pTsum_tdif   = bookProfile1D( 1, 1, 6);

      _h_Nchg_tow     = bookProfile1D( 2, 1, 1);
      _h_Nchg_trv     = bookProfile1D( 2, 1, 2);
      _h_Nchg_away    = bookProfile1D( 2, 1, 3);
      _h_Nchg_tmin    = bookProfile1D( 2, 1, 4);
      _h_Nchg_tmax    = bookProfile1D( 2, 1, 5);
      _h_Nchg_tdif    = bookProfile1D( 2, 1, 6);

      _h_pTavg_tow    = bookProfile1D( 3, 1, 1);
      _h_pTavg_trv    = bookProfile1D( 3, 1, 2);
      _h_pTavg_away   = bookProfile1D( 3, 1, 3);

      _h_pTavgvsmult_tow    = bookProfile1D( 4, 1, 1);
      _h_pTavgvsmult_trv    = bookProfile1D( 4, 1, 2);
      _h_pTavgvsmult_away   = bookProfile1D( 4, 1, 3);


      // Book sumpt and nch histos
      for (int i_reg = 0; i_reg < 4; i_reg++) {
        for (int i_bin = 0; i_bin < 6.; i_bin++) {
          _h_ptSum_1D[i_reg][i_bin] = bookHisto1D (5, i_reg+1 , i_bin+1);
          _h_Nchg_1D[i_reg][i_bin] = bookHisto1D (6, i_reg+1 , i_bin+1);
        }
      }
    }


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

      const double weight = event.weight();
      const ZFinder& zfinder = apply<ZFinder>(event, "ZFinder");

      if (zfinder.bosons().size() != 1) vetoEvent;

      double  Zpt   = zfinder.bosons()[0].momentum().pT()/GeV;
      double  Zphi  = zfinder.bosons()[0].momentum().phi();
      double  Zmass = zfinder.bosons()[0].momentum().mass()/GeV;
      if(Zmass < 66. || Zmass > 116.) vetoEvent;

      // Initialise counters for Nch and sumPt for all regions
      int nTowards(0), nTransverse(0), nLeft(0), nRight(0), nTrmin(0), nTrmax(0), nAway(0);
      double ptSumTowards(0.0), ptSumTransverse(0.0), ptSumLeft(0.0), ptSumRight(0.0),
             ptSumTrmin(0.0), ptSumTrmax(0.0), ptSumAway(0.0);

      // The charged particles
      ParticleVector particles = apply<ChargedFinalState>(event, "cfs").particlesByPt(
          Cuts::pT > 0.5*GeV && Cuts::abseta <2.5);

      // Loop over charged particles with pT>500 MeV and |eta|<2.5
      foreach(const Particle& p, particles) {
        double dphi = p.momentum().phi() - Zphi,
               pT   = p.momentum().pT();

        // Get multiples of 2pi right
        for(; std::fabs(dphi) > M_PI; dphi += (dphi > 0. ? -2.*M_PI : 2.*M_PI) );

        // Towards region
        if( std::fabs(dphi) < M_PI/3. ) {
          nTowards++;
          ptSumTowards += pT;
        }
        // Transverse region
        else if( std::fabs(dphi) < 2.*M_PI/3. ) {
          nTransverse++;
          ptSumTransverse += pT;
          if(dphi > 0.) {
            nRight++;
            ptSumRight += pT;
          }
          else {
            nLeft++;
            ptSumLeft += pT;
          }
        }
        // Away region
        else {
          nAway++;
          ptSumAway += pT;
        }
      }

      // TransMAX, TransMIN regions
      if (ptSumLeft > ptSumRight) {
        ptSumTrmax = ptSumLeft;
        ptSumTrmin = ptSumRight;
        nTrmax     = nLeft;
        nTrmin     = nRight;
      }
      else {
	ptSumTrmax = ptSumRight;
	ptSumTrmin = ptSumLeft;
	nTrmax     = nRight;
	nTrmin     = nLeft;
      }

      // min max regions have difference are than all other regions
      const double area = 5.*2./3.*M_PI;

      // Fill sumPt vs. Zpt region profiles
      _h_pTsum_tow->fill( Zpt, ptSumTowards/area,                    weight);
      _h_pTsum_trv->fill( Zpt, ptSumTransverse/area,                 weight);
      _h_pTsum_away->fill(Zpt, ptSumAway/area,                       weight);
      _h_pTsum_tmin->fill(Zpt, ptSumTrmin/(0.5*area),                weight);
      _h_pTsum_tmax->fill(Zpt, ptSumTrmax/(0.5*area),                weight);
      _h_pTsum_tdif->fill(Zpt, (ptSumTrmax - ptSumTrmin)/(0.5*area), weight);

      // Fill Nch vs. Zpt region profiles
      _h_Nchg_tow->fill( Zpt, nTowards/area,                         weight);
      _h_Nchg_trv->fill( Zpt, nTransverse/area,                      weight);
      _h_Nchg_away->fill(Zpt, nAway/area,                            weight);
      _h_Nchg_tmin->fill(Zpt, nTrmin/(0.5*area),                     weight);
      _h_Nchg_tmax->fill(Zpt, nTrmax/(0.5*area),                     weight);
      _h_Nchg_tdif->fill(Zpt, (nTrmax - nTrmin)/(0.5*area),          weight);


      // Fill <pT> vs. ZpT profiles
      _h_pTavg_tow->fill( Zpt, nTowards    > 0.? ptSumTowards/nTowards       : 0., weight);
      _h_pTavg_trv->fill( Zpt, nTransverse > 0.? ptSumTransverse/nTransverse : 0., weight);
      _h_pTavg_away->fill(Zpt, nAway       > 0.? ptSumAway/nAway             : 0., weight);

      // Fill <Nch> vs. ZpT profiles
      _h_pTavgvsmult_tow->fill( nTowards,    nTowards    > 0.? ptSumTowards/nTowards       : 0., weight);
      _h_pTavgvsmult_trv->fill( nTransverse, nTransverse > 0.? ptSumTransverse/nTransverse : 0., weight);
      _h_pTavgvsmult_away->fill(nAway,       nAway       > 0.? ptSumAway/nAway             : 0., weight);

      // Determine Zpt region histo to fill
      int i_bin(0);
      if (inRange(Zpt,0,5)        ) i_bin=0;
      if (inRange(Zpt,5,10)       ) i_bin=1;
      if (inRange(Zpt,10,20)      ) i_bin=2;
      if (inRange(Zpt,20,50)      ) i_bin=3;
      if (inRange(Zpt,50,110)     ) i_bin=4;
      if (Zpt>110) i_bin=5;

      // SumPt histos for Zpt region
      _h_ptSum_1D[0][i_bin]->fill(ptSumTowards/area,     weight);
      _h_ptSum_1D[1][i_bin]->fill(ptSumTransverse/area,  weight);
      _h_ptSum_1D[2][i_bin]->fill(ptSumTrmin/(0.5*area), weight);
      _h_ptSum_1D[3][i_bin]->fill(ptSumTrmax/(0.5*area), weight);

      // Nch histos for Zpt region
      _h_Nchg_1D[0][i_bin]->fill(nTowards/area,          weight);
      _h_Nchg_1D[1][i_bin]->fill(nTransverse/area,       weight);
      _h_Nchg_1D[2][i_bin]->fill(nTrmin/(0.5*area),      weight);
      _h_Nchg_1D[3][i_bin]->fill(nTrmax/(0.5*area),      weight);
    }


    /// Normalise histograms etc., after the run
    void finalize() {
      for(int i_reg = 0; i_reg < 4; i_reg++) {
        for(int i_bin = 0; i_bin < 6; i_bin++) {
          normalize( _h_ptSum_1D[i_reg][i_bin] );
          normalize( _h_Nchg_1D[ i_reg][i_bin] );
        }
      }
    }


  private:

    Profile1DPtr _h_pTsum_tow,
                 _h_pTsum_trv,
                 _h_pTsum_away,
                 _h_pTsum_tmin,
                 _h_pTsum_tmax,
                 _h_pTsum_tdif,

                 _h_Nchg_tow,
                 _h_Nchg_trv,
                 _h_Nchg_away,
                 _h_Nchg_tmin,
                 _h_Nchg_tmax,
                 _h_Nchg_tdif,

                 _h_pTavg_tow,
                 _h_pTavg_trv,
                 _h_pTavg_away,
                 _h_pTavgvsmult_tow,
                 _h_pTavgvsmult_trv,
                 _h_pTavgvsmult_away;

    Histo1DPtr   _h_ptSum_1D[4][6], _h_Nchg_1D[4][6];


  };

  // This global object acts as a hook for the plugin system
  DECLARE_RIVET_PLUGIN(ATLAS_2014_I1315949);

}