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^- ) at 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 proton--proton collisions at a centre-of-mass energy of 7 TeV with an integrated luminosity of 4.6 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// -*- C++ -*-
  2#include "Rivet/Analysis.hh"
  3#include "Rivet/Projections/FinalState.hh"
  4#include "Rivet/Projections/ChargedFinalState.hh"
  5#include "Rivet/Projections/ZFinder.hh"
  6
  7namespace Rivet {
  8
  9
 10  class ATLAS_2014_I1315949 : public Analysis {
 11  public:
 12
 13    /// Constructor
 14    RIVET_DEFAULT_ANALYSIS_CTOR(ATLAS_2014_I1315949);
 15
 16    void init() {
 17
 18      FinalState fs;
 19
 20      ZFinder zfinder(fs, Cuts::abseta<2.4 && Cuts::pT>20.0*GeV, PID::MUON, 66*GeV, 116*GeV, 0.1, ZFinder::ClusterPhotons::NODECAY);
 21      declare(zfinder, "ZFinder");
 22
 23      ChargedFinalState cfs( zfinder.remainingFinalState() );
 24      declare(cfs, "cfs");
 25
 26
 27      book(_h_pTsum_tow    , 67, 1, 1);
 28      book(_h_pTsum_trv    , 68, 1, 1);
 29      book(_h_pTsum_away   , 69, 1, 1);
 30      book(_h_pTsum_tmin   , 70, 1, 1);
 31      book(_h_pTsum_tmax   , 71, 1, 1);
 32      book(_h_pTsum_tdif   ,125, 1, 1);
 33
 34      book(_h_Nchg_tow     , 72, 1, 1);
 35      book(_h_Nchg_trv     , 73, 1, 1);
 36      book(_h_Nchg_away    , 74, 1, 1);
 37      book(_h_Nchg_tmin    , 75, 1, 1);
 38      book(_h_Nchg_tmax    , 82, 1, 1);
 39      book(_h_Nchg_tdif    ,126, 1, 1);
 40
 41      book(_h_pTavg_tow    ,113, 1, 1);
 42      book(_h_pTavg_trv    ,114, 1, 1);
 43      book(_h_pTavg_away   ,115, 1, 1);
 44
 45      book(_h_pTavgvsmult_tow , 116, 1, 1);
 46      book(_h_pTavgvsmult_trv , 117, 1, 1);
 47      book(_h_pTavgvsmult_away, 118, 1, 1);
 48
 49
 50      // Book sumpt and nch histos
 51      for (size_t id = 0; id < 6.; ++id) {
 52        book(_h_ptSum_1D[0][id], 76 + id, 1, 1);
 53        book(_h_ptSum_1D[1][id],107 + id, 1, 1);
 54        book(_h_ptSum_1D[2][id],119 + id, 1, 1);
 55        book(_h_ptSum_1D[3][id],127 + id, 1, 1);
 56        book(_h_Nchg_1D[0][id],  83 + id, 1, 1);
 57        book(_h_Nchg_1D[1][id],  89 + id, 1, 1);
 58        book(_h_Nchg_1D[2][id],  95 + id, 1, 1);
 59        book(_h_Nchg_1D[3][id], 101 + id, 1, 1);
 60      }
 61    }
 62
 63
 64    /// Perform the per-event analysis
 65    void analyze(const Event& event) {
 66
 67      const ZFinder& zfinder = apply<ZFinder>(event, "ZFinder");
 68
 69      if (zfinder.bosons().size() != 1) vetoEvent;
 70
 71      double  Zpt   = zfinder.bosons()[0].momentum().pT()/GeV;
 72      double  Zphi  = zfinder.bosons()[0].momentum().phi(MINUSPI_PLUSPI);
 73      double  Zmass = zfinder.bosons()[0].momentum().mass()/GeV;
 74      if(Zmass < 66. || Zmass > 116.) vetoEvent;
 75
 76      // Initialise counters for Nch and sumPt for all regions
 77      int nTowards(0), nTransverse(0), nLeft(0), nRight(0), nTrmin(0), nTrmax(0), nAway(0);
 78      double ptSumTowards(0.0), ptSumTransverse(0.0), ptSumLeft(0.0), ptSumRight(0.0),
 79             ptSumTrmin(0.0), ptSumTrmax(0.0), ptSumAway(0.0);
 80
 81      // The charged particles
 82      Particles particles = apply<ChargedFinalState>(event, "cfs").particlesByPt(
 83          Cuts::pT > 0.5*GeV && Cuts::abseta <2.5);
 84
 85      // Loop over charged particles with pT>500 MeV and |eta|<2.5
 86      for (const Particle& p : particles) {
 87        double dphi = p.momentum().phi(MINUSPI_PLUSPI) - Zphi;
 88        double pT   = p.momentum().pT();
 89
 90        // Get multiples of 2pi right
 91        for(; std::fabs(dphi) > M_PI; dphi += (dphi > 0. ? -2.*M_PI : 2.*M_PI) );
 92
 93        // Towards region
 94        if( std::fabs(dphi) < M_PI/3. ) {
 95          nTowards++;
 96          ptSumTowards += pT;
 97        }
 98        // Transverse region
 99        else if( std::fabs(dphi) < 2.*M_PI/3. ) {
100          nTransverse++;
101          ptSumTransverse += pT;
102          if(dphi > 0.) {
103            nRight++;
104            ptSumRight += pT;
105          }
106          else {
107            nLeft++;
108            ptSumLeft += pT;
109          }
110        }
111        // Away region
112        else {
113          nAway++;
114          ptSumAway += pT;
115        }
116      }
117
118      // TransMAX, TransMIN regions
119      if (ptSumLeft > ptSumRight) {
120        ptSumTrmax = ptSumLeft;
121        ptSumTrmin = ptSumRight;
122        nTrmax     = nLeft;
123        nTrmin     = nRight;
124      }
125      else {
126	ptSumTrmax = ptSumRight;
127	ptSumTrmin = ptSumLeft;
128	nTrmax     = nRight;
129	nTrmin     = nLeft;
130      }
131
132      // min max regions have difference are than all other regions
133      const double area = 5.*2./3.*M_PI;
134
135      // Fill sumPt vs. Zpt region profiles
136      _h_pTsum_tow->fill( Zpt, ptSumTowards/area);
137      _h_pTsum_trv->fill( Zpt, ptSumTransverse/area);
138      _h_pTsum_away->fill(Zpt, ptSumAway/area);
139      _h_pTsum_tmin->fill(Zpt, ptSumTrmin/(0.5*area));
140      _h_pTsum_tmax->fill(Zpt, ptSumTrmax/(0.5*area));
141      _h_pTsum_tdif->fill(Zpt, (ptSumTrmax - ptSumTrmin)/(0.5*area));
142
143      // Fill Nch vs. Zpt region profiles
144      _h_Nchg_tow->fill( Zpt, nTowards/area);
145      _h_Nchg_trv->fill( Zpt, nTransverse/area);
146      _h_Nchg_away->fill(Zpt, nAway/area);
147      _h_Nchg_tmin->fill(Zpt, nTrmin/(0.5*area));
148      _h_Nchg_tmax->fill(Zpt, nTrmax/(0.5*area));
149      _h_Nchg_tdif->fill(Zpt, (nTrmax - nTrmin)/(0.5*area));
150
151
152      // Fill <pT> vs. ZpT profiles
153      _h_pTavg_tow->fill( Zpt, nTowards    > 0.? ptSumTowards/nTowards       : 0.);
154      _h_pTavg_trv->fill( Zpt, nTransverse > 0.? ptSumTransverse/nTransverse : 0.);
155      _h_pTavg_away->fill(Zpt, nAway       > 0.? ptSumAway/nAway             : 0.);
156
157      // Fill <Nch> vs. ZpT profiles
158      _h_pTavgvsmult_tow->fill( nTowards,    nTowards    > 0.? ptSumTowards/nTowards       : 0.);
159      _h_pTavgvsmult_trv->fill( nTransverse, nTransverse > 0.? ptSumTransverse/nTransverse : 0.);
160      _h_pTavgvsmult_away->fill(nAway,       nAway       > 0.? ptSumAway/nAway             : 0.);
161
162      // Determine Zpt region histo to fill
163      int i_bin(0);
164      if (inRange(Zpt,0,5)        ) i_bin=0;
165      if (inRange(Zpt,5,10)       ) i_bin=1;
166      if (inRange(Zpt,10,20)      ) i_bin=2;
167      if (inRange(Zpt,20,50)      ) i_bin=3;
168      if (inRange(Zpt,50,110)     ) i_bin=4;
169      if (Zpt>110) i_bin=5;
170
171      // SumPt histos for Zpt region
172      _h_ptSum_1D[0][i_bin]->fill(ptSumTowards/area);
173      _h_ptSum_1D[1][i_bin]->fill(ptSumTransverse/area);
174      _h_ptSum_1D[2][i_bin]->fill(ptSumTrmin/(0.5*area));
175      _h_ptSum_1D[3][i_bin]->fill(ptSumTrmax/(0.5*area));
176
177      // Nch histos for Zpt region
178      _h_Nchg_1D[0][i_bin]->fill(nTowards/area);
179      _h_Nchg_1D[1][i_bin]->fill(nTransverse/area);
180      _h_Nchg_1D[2][i_bin]->fill(nTrmin/(0.5*area));
181      _h_Nchg_1D[3][i_bin]->fill(nTrmax/(0.5*area));
182    }
183
184
185    /// Normalise histograms etc., after the run
186    void finalize() {
187      for(int i_reg = 0; i_reg < 4; i_reg++) {
188        for(int i_bin = 0; i_bin < 6; i_bin++) {
189          normalize( _h_ptSum_1D[i_reg][i_bin] );
190          normalize( _h_Nchg_1D[ i_reg][i_bin] );
191        }
192      }
193    }
194
195
196  private:
197
198    Profile1DPtr _h_pTsum_tow,
199                 _h_pTsum_trv,
200                 _h_pTsum_away,
201                 _h_pTsum_tmin,
202                 _h_pTsum_tmax,
203                 _h_pTsum_tdif,
204
205                 _h_Nchg_tow,
206                 _h_Nchg_trv,
207                 _h_Nchg_away,
208                 _h_Nchg_tmin,
209                 _h_Nchg_tmax,
210                 _h_Nchg_tdif,
211
212                 _h_pTavg_tow,
213                 _h_pTavg_trv,
214                 _h_pTavg_away,
215                 _h_pTavgvsmult_tow,
216                 _h_pTavgvsmult_trv,
217                 _h_pTavgvsmult_away;
218
219    Histo1DPtr   _h_ptSum_1D[4][6], _h_Nchg_1D[4][6];
220
221
222  };
223
224
225  RIVET_DECLARE_PLUGIN(ATLAS_2014_I1315949);
226
227}