rivet is hosted by Hepforge, IPPP Durham

## Rivet analyses reference

### ATLAS_2012_I1094061

Measurement of two-particle correlation function at 900 GeV and 7 TeV
Experiment: ATLAS (LHC)
Inspire ID: 1094061
Status: VALIDATED
Authors:
• James Monk
References:
Beams: p+ p+
Beam energies: (450.0, 450.0); (3500.0, 3500.0) GeV
Run details:
• Soft-QCD proton-proton interactions (including diffraction) at 900 GeV or 7 TeV. Generated events should include an average lifetime cut of ctau < 10mm

Two-particle angular correlations are measured in proton-proton collisions at $\sqrt(s)=900$ GeV and 7 TeV. Correlations are determined for charged particles with $p_\perp > 100 MeV$ and $|\eta| < 2.5$. A complicated function of both pseudorapidity and azimuth is observed. Results are obtained from an inclusive sample of events (900 GeV and 7 TeV), as well as a sample satisfying $n_{ch} \ge 20$ (7 TeV only).

Source code: ATLAS_2012_I1094061.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 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/ChargedFinalState.hh" namespace Rivet { /// Two-particle correlation functions in pp collisions at 900 GeV and 7 TeV class ATLAS_2012_I1094061 : public Analysis { /// Container for a pair of foreground and background histos, divided at the end of the analysis struct HistoPair{ enum HistoType { FOREGROUND, BACKGROUND }; HistoPair() : _ana(nullptr) { } void init(int ds, int xaxis, int yaxis, ATLAS_2012_I1094061* ana) { _ana = ana; const string hcode = ana->makeAxisCode(ds, xaxis, yaxis); _h_foreground = ana->bookHisto1D("tmpForeground_" + hcode, ana->refData(ds, xaxis, yaxis)); _h_background = ana->bookHisto1D("tmpBackground_" + hcode, ana->refData(ds, xaxis, yaxis)); _s_final = ana->bookScatter2D(ds, xaxis, yaxis, true); } void fillForeground(double value, double weight) { _h_foreground->fill(value, weight); _h_foreground->fill(-value, weight); } void fillBackground(double value, double weight) { _h_background->fill(value, weight); _h_background->fill(-value, weight); } void fill(double value, double weight, HistoType type) { if (type == FOREGROUND) { fillForeground(value, weight); } else { // type == BACKGROUND fillBackground(value, weight); } } void finalize(double wgtSum, double bgWeight, double avNTracks) { _h_foreground->scaleW(1/wgtSum); _h_background->scaleW(1/bgWeight); _ana->divide(_h_foreground, _h_background, _s_final); for (Point2D& p : _s_final->points()) { p.setY(p.y() - (avNTracks-1)); } } private: ATLAS_2012_I1094061 *_ana; Histo1DPtr _h_foreground; Histo1DPtr _h_background; Scatter2DPtr _s_final; }; public: /// Constructor ATLAS_2012_I1094061() : Analysis("ATLAS_2012_I1094061"), _minpT(100.*MeV), _nVersions(5), _version(0), _etaCut(2.), _phiCut(0.5*M_PI), _historyInclusive(_nVersions, ParticleVector()), _historyN20(_nVersions, ParticleVector()), _historyInclusiveWgts(_nVersions, 0.), _historyN20Wgts(_nVersions, 0.), _particleCountInclusive(0.), _particleCountN20(0.), _weightInclusive(0.), _weightN20(0.), _bgWeightInclusive(0.), _bgWeightN20(0.) { } /// @name Analysis methods //@{ void init() { const ChargedFinalState cfs(-2.5, 2.5, _minpT); declare(cfs, "ChargedParticles"); // Only do the multiplicity > 20 plots for 7 TeV collisions _doN20 = (fabs(sqrtS() - 7000.*GeV) < 0.1*GeV); int yaxis = (_doN20) ? 2: 1; _hp_DEta_0_pi.init(1, 1, yaxis, this); _hp_DEta_0_pi2.init(2, 1, yaxis, this); _hp_DEta_pi2_pi.init(3, 1, yaxis, this); _hp_DPhi_0_2.init(4, 1, yaxis, this); _hp_DPhi_2_5.init(5, 1, yaxis, this); if (_doN20) { yaxis = 3; _hp_N20_DEta_0_pi.init(1, 1, yaxis, this); _hp_N20_DEta_0_pi2.init(2, 1, yaxis, this); _hp_N20_DEta_pi2_pi.init(3, 1, yaxis, this); _hp_N20_DPhi_0_2.init(4, 1, yaxis, this); _hp_N20_DPhi_2_5.init(5, 1, yaxis, this); } } void analyze(const Event& evt) { const ChargedFinalState& cfsProj = apply(evt, "ChargedParticles"); Particles chargedParticles = cfsProj.particles(); if (chargedParticles.size() < 2) vetoEvent; const bool hasN20 = (_doN20 && chargedParticles.size() >= 20); const double dMultiplicity = (double) chargedParticles.size(); const double multiplicityWeightIncr = dMultiplicity * evt.weight(); _weightInclusive += evt.weight(); _particleCountInclusive += multiplicityWeightIncr; if (hasN20) { _weightN20 += evt.weight(); _particleCountN20 += multiplicityWeightIncr; } double fgWeight = 2.*evt.weight() / dMultiplicity; for (Particles::const_iterator p1 = chargedParticles.begin(); p1 != chargedParticles.end(); ++p1) { Particles::const_iterator p2 = p1; ++p2; // Fill the foreground distributions while (p2 != chargedParticles.end()) { fillHistosInclusive(*p1, *p2, fgWeight, HistoPair::FOREGROUND); if (hasN20) fillHistosN20(*p1, *p2, fgWeight, HistoPair::FOREGROUND); ++p2; } // Loop over the history of particles from previous events and fill the background // by correlating those particles with the current event for (size_t version = 0; version != _nVersions; ++version) { const Particles& bgParticles = _historyInclusive[version]; double bgWeight = evt.weight() * _historyInclusiveWgts[version]; for (Particles::const_iterator p2 = bgParticles.begin(); p2 != bgParticles.end(); ++p2) { fillHistosInclusive(*p1, *p2, bgWeight, HistoPair::BACKGROUND); _bgWeightInclusive += bgWeight; } if (!hasN20) continue; const Particles& bgParticlesN20 = _historyN20[version]; bgWeight = evt.weight() * _historyN20Wgts[version]; for (Particles::const_iterator p2 = bgParticlesN20.begin(); p2 != bgParticlesN20.end(); ++p2) { fillHistosN20(*p1, *p2, bgWeight, HistoPair::BACKGROUND); _bgWeightN20 += bgWeight; } } } // Overwrite the history for the version count number _historyInclusive[_version] = chargedParticles; _historyInclusiveWgts[_version] = evt.weight(); if (hasN20) { _historyN20[_version] = chargedParticles; _historyN20Wgts[_version] = evt.weight(); } ++_version; if (_version == _nVersions) _version = 0; } void finalize() { const double avMultiplicity = _particleCountInclusive / _weightInclusive; _hp_DEta_0_pi.finalize(_weightInclusive, _bgWeightInclusive, avMultiplicity); _hp_DEta_0_pi2.finalize(_weightInclusive, _bgWeightInclusive, avMultiplicity); _hp_DEta_pi2_pi.finalize(_weightInclusive,_bgWeightInclusive, avMultiplicity); _hp_DPhi_0_2.finalize(_weightInclusive, _bgWeightInclusive, avMultiplicity); _hp_DPhi_2_5.finalize(_weightInclusive, _bgWeightInclusive, avMultiplicity); if (_doN20) { const double avMultiplicityN20 = _particleCountN20 / _weightN20; _hp_N20_DEta_0_pi.finalize(_weightN20, _bgWeightN20, avMultiplicityN20); _hp_N20_DEta_0_pi2.finalize(_weightN20, _bgWeightN20, avMultiplicityN20); _hp_N20_DEta_pi2_pi.finalize(_weightN20, _bgWeightN20, avMultiplicityN20); _hp_N20_DPhi_0_2.finalize(_weightN20, _bgWeightN20, avMultiplicityN20); _hp_N20_DPhi_2_5.finalize(_weightN20, _bgWeightN20, avMultiplicityN20); } } //@} void fillHistos(const Particle &p1, const Particle &p2, double weight, HistoPair::HistoType type, bool inclusive) { const double dEta = fabs(p1.eta() - p2.eta()); const double dPhi = mapAngle0ToPi(p1.phi() - p2.phi()); const double dPhiShift = TWOPI - dPhi; HistoPair& dEta_0_pi = (inclusive)? _hp_DEta_0_pi :_hp_N20_DEta_0_pi; HistoPair& dPhi_0_2 = (inclusive)? _hp_DPhi_0_2 :_hp_N20_DPhi_0_2; HistoPair& dPhi_2_5 = (inclusive)? _hp_DPhi_2_5 :_hp_N20_DPhi_2_5; HistoPair& dEta_0_pi2 = (inclusive)? _hp_DEta_0_pi2 :_hp_N20_DEta_0_pi2; HistoPair& dEta_pi2_pi = (inclusive)? _hp_DEta_pi2_pi :_hp_N20_DEta_pi2_pi; dEta_0_pi.fill(dEta, weight, type); if (dEta < _etaCut) { dPhi_0_2.fill(dPhi, weight, type); dPhi_0_2.fill(dPhiShift, weight, type); } else { dPhi_2_5.fill(dPhi, weight, type); dPhi_2_5.fill(dPhiShift, weight, type); } if (dPhi < _phiCut) { dEta_0_pi2.fill(dEta, weight, type); } else { dEta_pi2_pi.fill(dEta, weight, type); } } void fillHistosInclusive(const Particle &p1, const Particle &p2, double weight, HistoPair::HistoType type) { fillHistos(p1, p2, weight, type, true); } void fillHistosN20(const Particle &p1, const Particle &p2, double weight, HistoPair::HistoType type) { fillHistos(p1, p2, weight, type, false); } private: /// Cut values double _minpT; /// History versions size_t _nVersions, _version; /// Cut values double _etaCut, _phiCut; /// Vectors of particles from _nVersions previous events, to construct the background correlation. vector _historyInclusive, _historyN20; /// History-event weights vector _historyInclusiveWgts, _historyN20Wgts; double _particleCountInclusive, _particleCountN20; double _weightInclusive, _weightN20; double _bgWeightInclusive, _bgWeightN20; bool _doN20; HistoPair _hp_DEta_0_pi, _hp_DEta_0_pi2, _hp_DEta_pi2_pi; HistoPair _hp_DPhi_0_2, _hp_DPhi_2_5; HistoPair _hp_N20_DEta_0_pi, _hp_N20_DEta_0_pi2, _hp_N20_DEta_pi2_pi; HistoPair _hp_N20_DPhi_0_2, _hp_N20_DPhi_2_5; }; DECLARE_RIVET_PLUGIN(ATLAS_2012_I1094061); }