Rivet analyses referenceCDF_2012_NOTE10874CDF energy scan underlying event analysisExperiment: CDF (Tevatron energy scan) Status: VALIDATED Authors:
Beam energies: (150.0, 150.0); (450.0, 450.0); (980.0, 980.0) GeV Run details:
In this analysis the behavior of the underlying event in hard scattering proton-antiproton collisions at 300 GeV, 900 GeV, and 1.96 TeV is studied. The 300 GeV and 900 GeV data are a result of the Tevatron Energy Scan which was performed just before the Tevatron was shut down. The energy ratio histograms can be created from different runs with a merging script available in the Rivet bin directory. Beam energy must be specified (in GeV) as analysis option "ENERGY" when rivet-merging samples. Source code: CDF_2012_NOTE10874.cc 1// -*- C++ -*-
2#include "Rivet/Analysis.hh"
3#include "Rivet/Projections/ChargedFinalState.hh"
4
5
6
7namespace Rivet {
8
9
10 class CDF_2012_NOTE10874 : public Analysis {
11 public:
12
13 CDF_2012_NOTE10874()
14 : Analysis("CDF_2012_NOTE10874")
15 {}
16
17
18 public:
19
20 void init() {
21 const ChargedFinalState cfs((Cuts::etaIn(-1.0, 1.0) && Cuts::pT >= 0.5*GeV));
22 declare(cfs, "CFS");
23
24 int isqrts = -1;
25 if (isCompatibleWithSqrtS(300)) isqrts = 1;
26 else if (isCompatibleWithSqrtS(900)) isqrts = 2;
27 else if (isCompatibleWithSqrtS(1960)) isqrts = 3;
28 assert(isqrts >= 0);
29
30 book(_h_nch_transverse ,1,1,isqrts);
31 book(_h_ptSumDen ,2,1,isqrts);
32 book(_h_avePt ,3,1,isqrts);
33 }
34
35 // Little helper function to identify Delta(phi) regions
36 inline int region_index(double dphi) {
37 assert(inRange(dphi, 0.0, PI, CLOSED, CLOSED));
38 if (dphi < PI/3.0) return 0;
39 if (dphi < 2*PI/3.0) return 1;
40 return 2;
41 }
42
43
44 void analyze(const Event& event) {
45 const ChargedFinalState& cfs = apply<ChargedFinalState>(event, "CFS");
46 if (cfs.size() < 1) {
47 vetoEvent;
48 }
49
50 Particles particles = cfs.particlesByPt();
51 Particle p_lead = particles[0];
52 const double philead = p_lead.phi();
53 const double pTlead = p_lead.pT();
54
55 int tNch = 0;
56 double ptSum = 0.0;
57 for (const Particle& p : particles) {
58 const double pT = p.pT();
59 const double dPhi = deltaPhi(philead, p.phi());
60 const int ir = region_index(dPhi);
61 if (ir==1) {
62 tNch++;
63 ptSum += pT;
64 }
65 }
66
67 const double dEtadPhi = 4.0*PI/3.0;
68
69 _h_nch_transverse->fill(pTlead/GeV, tNch/dEtadPhi);
70 _h_ptSumDen->fill(pTlead/GeV, ptSum/dEtadPhi);
71
72 if (tNch > 0) {
73 _h_avePt->fill(pTlead/GeV, ptSum/tNch);
74 }
75 }
76
77
78 void finalize() {
79 }
80
81
82 private:
83
84 Profile1DPtr _h_nch_transverse, _h_ptSumDen, _h_avePt;
85
86 };
87
88
89 // The hook for the plugin system
90 RIVET_DECLARE_PLUGIN(CDF_2012_NOTE10874);
91
92}
|