diff --git a/analyses/pluginCMS/CMS_2013_I1261026.cc b/analyses/pluginCMS/CMS_2013_I1261026.cc --- a/analyses/pluginCMS/CMS_2013_I1261026.cc +++ b/analyses/pluginCMS/CMS_2013_I1261026.cc @@ -1,237 +1,176 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/FinalState.hh" #include "Rivet/Projections/ChargedFinalState.hh" #include "Rivet/Projections/FastJets.hh" #include "Rivet/Projections/Beam.hh" #include "Rivet/Projections/VetoedFinalState.hh" namespace Rivet { /// Jet and underlying event properties as a function of particle multiplicity class CMS_2013_I1261026 : public Analysis { public: - CMS_2013_I1261026() - : Analysis("CMS_2013_I1261026"), _jetStructNorm(5,0.), _multBinCent(5,0.), - _jetCounter5GeV(5,0.), _jetCounter30GeV(5,0.), _passedEv(5,0.) - { } - + DEFAULT_RIVET_ANALYSIS_CTOR(CMS_2013_I1261026); void init() { FastJets jetpro(ChargedFinalState(-2.4, 2.4, 0.25*GeV), FastJets::ANTIKT, 0.5); declare(jetpro, "Jets"); const ChargedFinalState cfs(-2.4, 2.4, 0.25*GeV); declare(cfs, "CFS250"); // For min bias trigger const ChargedFinalState cfsBSCplus(3.23, 4.65, 500*MeV); declare(cfsBSCplus, "cfsBSCplus"); const ChargedFinalState cfsBSCminus(-4.65, -3.23, 500*MeV); declare(cfsBSCminus, "cfsBSCminus"); // Histograms: _h_AllTrkMeanPt = bookProfile1D(1, 1, 1); _h_SoftTrkMeanPt = bookProfile1D(2, 1, 1); _h_IntrajetTrkMeanPt = bookProfile1D(3, 1, 1); _h_IntrajetLeaderTrkMeanPt = bookProfile1D(4, 1, 1); _h_MeanJetPt = bookProfile1D(5, 1, 1); _h_JetRate5GeV = bookProfile1D(6, 1, 1); _h_JetRate30GeV = bookProfile1D(7, 1, 1); for (int ihist = 0; ihist < 5; ++ihist) { _h_JetSpectrum[ihist] = bookHisto1D(ihist+8, 1, 1); _h_JetStruct[ihist] = bookHisto1D(ihist+13, 1, 1); - - // Temp histograms for distribution parameters and SEM calculation - _th_AllTrkSpectrum[ihist] = Histo1D(200, 0.0, 20.0); - _th_SoftTrkSpectrum[ihist] = Histo1D(100, 0.0, 15.0); - _th_JetTrkSpectrum[ihist] = Histo1D(100, 0.0, 20.0); - _th_JetLTrkSpectrum[ihist] = Histo1D(100, 0.0, 20.0); } - - _multBinCent[0] = 20; - _multBinCent[1] = 40; - _multBinCent[2] = 65; - _multBinCent[3] = 95; - _multBinCent[4] = 125; } /// Perform the per-event analysis void analyze(const Event& event) { const double weight = event.weight(); // MinBias trigger const ChargedFinalState& cfsBSCplus = apply(event, "cfsBSCplus"); if (cfsBSCplus.empty()) vetoEvent; const ChargedFinalState& cfsBSCminus = apply(event, "cfsBSCminus"); if (cfsBSCminus.empty()) vetoEvent; const ChargedFinalState& cfsp = apply(event, "CFS250"); if (cfsp.empty()) vetoEvent; const FastJets& jetpro = apply(event, "Jets"); const Jets& jets = jetpro.jetsByPt(5.0*GeV); const int mult = cfsp.size(); int multbin[6] = { 10, 30, 50, 80, 110, 140 }; for (int ibin = 0; ibin < 5; ++ibin) { if (mult > multbin[ibin] && mult <= multbin[ibin + 1]) { - _passedEv[ibin] += weight; - eventDecomp(event, ibin, weight); - - for (size_t ijets = 0; ijets < jets.size(); ijets++) { + eventDecomp(event, mult, ibin, weight); + unsigned int jetCounter5GeV(0), jetCounter30GeV(0); + for (size_t ijets = 0; ijets < jets.size(); ++ijets) { if (jets[ijets].abseta() < 1.9) { _h_JetSpectrum[ibin]->fill(jets[ijets].pT()/GeV, weight); - if (jets[ijets].pT() > 5*GeV) _jetCounter5GeV[ibin] += weight; - if (jets[ijets].pT() > 30*GeV) _jetCounter30GeV[ibin] += weight; + _h_MeanJetPt->fill(mult, jets[ijets].pT()/GeV, weight); + if (jets[ijets].pT() > 5*GeV) ++jetCounter5GeV; + if (jets[ijets].pT() > 30*GeV) ++jetCounter30GeV; } } + _h_JetRate5GeV->fill( mult, jetCounter5GeV, weight); + _h_JetRate30GeV->fill(mult, jetCounter30GeV, weight); } } + } + + + /// Normalise histograms etc., after the run + void finalize() { + for (size_t i = 0; i < 5; ++i) { + normalize(_h_JetSpectrum[i], 4.0); + normalize(_h_JetStruct[i] , 0.08); + } } - - /// Normalise histograms etc., after the run - void finalize() { - for (size_t i = 0; i < 5; ++i) { - // All trk mean pT vs Nch - _h_AllTrkMeanPt->fill(_multBinCent[i], _th_AllTrkSpectrum[i].xMean(), getMeanError(_th_AllTrkSpectrum[i])); - - // Soft trk mean pT vs Nch - _h_SoftTrkMeanPt->fill(_multBinCent[i], _th_SoftTrkSpectrum[i].xMean(), getMeanError(_th_SoftTrkSpectrum[i])); - - // Intrajet trk mean pT vs Nch - _h_IntrajetTrkMeanPt->fill(_multBinCent[i], _th_JetTrkSpectrum[i].xMean(), getMeanError(_th_JetTrkSpectrum[i])); - - // Intrajet leader trk mean pT vs Nch - _h_IntrajetLeaderTrkMeanPt->fill(_multBinCent[i], _th_JetLTrkSpectrum[i].xMean(), getMeanError(_th_JetLTrkSpectrum[i])); - - // Jet mean pT vs Nch - const double sem = (_h_JetSpectrum[i]->xStdDev())/(sqrt(_h_JetSpectrum[i]->sumW())) / _h_JetSpectrum[i]->xMean(); - _h_MeanJetPt->fill(_multBinCent[i], _h_JetSpectrum[i]->xMean(), sem); - - // Jet rates - double avJetRate5 = _jetCounter5GeV[i] / _passedEv[i]; - double avJetRate30 = _jetCounter30GeV[i] / _passedEv[i]; - - const double sem5 = (_jetCounter5GeV[i] != 0) ? 1 / sqrt(_jetCounter5GeV[i]) : 0; - _h_JetRate5GeV->fill(_multBinCent[i], avJetRate5, sem5); - - const double sem30 = (_jetCounter30GeV[i] != 0) ? 1 / sqrt(_jetCounter30GeV[i]) : 0; - _h_JetRate30GeV->fill(_multBinCent[i], avJetRate30, sem30); - - scale(_h_JetSpectrum[i], 4.0 / _jetCounter5GeV[i]); - scale(_h_JetStruct[i], 0.08 / _jetStructNorm[i]); - } - - } - - - double getMeanError(const Histo1D& hist) { - double sem = hist.xStdErr(); // Standard error of the mean - return sem / hist.xMean(); // relative SEM - } - - - void eventDecomp(const Event& event, size_t ibin, double weight) { + void eventDecomp(const Event& event, int mult, size_t ibin, double weight) { struct TrkInJet { double pt; double eta; double phi; double R; }; TrkInJet jetConstituents[100][100]; //1-st index - the number of the jet, 2-nd index - track in the jet TrkInJet jetsEv[100]; size_t j[100]; size_t jCount = 0; - for (size_t i = 0; i < 100; i++) { + for (size_t i = 0; i < 100; ++i) { j[i] = 0; jetsEv[i].pt = 0; jetsEv[i].eta = 0; jetsEv[i].phi = 0; - for (size_t k = 0; k < 100; k++) { + for (size_t k = 0; k < 100; ++k) { jetConstituents[i][k].pt = 0; jetConstituents[i][k].phi = 0; jetConstituents[i][k].eta = 0; jetConstituents[i][k].R = 0; } } const FastJets& jetpro = apply(event, "Jets"); const Jets& jets = jetpro.jetsByPt(5.0*GeV); // Start event decomp - for (size_t ijets = 0; ijets < jets.size(); ijets++) { + for (size_t ijets = 0; ijets < jets.size(); ++ijets) { jetsEv[ijets].pt = jets[ijets].pT(); jetsEv[ijets].eta = jets[ijets].eta(); jetsEv[ijets].phi = jets[ijets].phi(); - jCount++; + ++jCount; } const ChargedFinalState& cfsp = apply(event, "CFS250"); foreach (const Particle& p, cfsp.particles()) { - _th_AllTrkSpectrum[ibin].fill(p.pT()/GeV, weight); + _h_AllTrkMeanPt->fill(mult, p.pT()/GeV, weight); int flag = 0; - for (size_t i = 0; i < jCount; i++) { + for (size_t i = 0; i < jCount; ++i) { const double delta_phi = deltaPhi(jetsEv[i].phi, p.phi()); const double delta_eta = jetsEv[i].eta - p.eta(); const double R = sqrt(delta_phi * delta_phi + delta_eta * delta_eta); if (R <= 0.5) { - flag++; + ++flag; jetConstituents[i][j[i]].pt = p.pT(); jetConstituents[i][j[i]].R = R; - j[i]++; + ++j[i]; } } - if (flag == 0) _th_SoftTrkSpectrum[ibin].fill(p.pT()/GeV, weight); + if (flag == 0) _h_SoftTrkMeanPt->fill(mult, p.pT()/GeV, weight); } - for (size_t i = 0; i < jCount; i++) { + for (size_t i = 0; i < jCount; ++i) { double ptInjetLeader = 0; if (!inRange(jetsEv[i].eta, -1.9, 1.9)) continue; // only fully reconstructed jets for internal jet studies - for (size_t k = 0; k < j[i]; k++) { - _th_JetTrkSpectrum[ibin].fill(jetConstituents[i][k].pt , weight); + for (size_t k = 0; k < j[i]; ++k) { + _h_IntrajetTrkMeanPt->fill(mult, jetConstituents[i][k].pt , weight); _h_JetStruct[ibin]->fill(jetConstituents[i][k].R, jetConstituents[i][k].pt/jetsEv[i].pt); - _jetStructNorm[ibin] += jetConstituents[i][k].pt / jetsEv[i].pt; if (ptInjetLeader < jetConstituents[i][k].pt) ptInjetLeader = jetConstituents[i][k].pt; } - if (ptInjetLeader != 0) _th_JetLTrkSpectrum[ibin].fill(ptInjetLeader, weight); + if (ptInjetLeader != 0) _h_IntrajetLeaderTrkMeanPt->fill(mult, ptInjetLeader, weight); } } private: - // Counters etc. - vector _jetStructNorm; - vector _multBinCent; - /// @todo Need to handle weights - vector _jetCounter5GeV, _jetCounter30GeV, _passedEv; - Profile1DPtr _h_AllTrkMeanPt, _h_SoftTrkMeanPt; Profile1DPtr _h_IntrajetTrkMeanPt, _h_IntrajetLeaderTrkMeanPt; Profile1DPtr _h_MeanJetPt; Profile1DPtr _h_JetRate5GeV, _h_JetRate30GeV; Histo1DPtr _h_JetSpectrum[5]; Histo1DPtr _h_JetStruct[5]; - // Temp histograms - Histo1D _th_AllTrkSpectrum[5]; - Histo1D _th_SoftTrkSpectrum[5]; - Histo1D _th_JetTrkSpectrum[5]; - Histo1D _th_JetLTrkSpectrum[5]; - }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(CMS_2013_I1261026); } diff --git a/analyses/pluginCMS/CMS_2013_I1261026.info b/analyses/pluginCMS/CMS_2013_I1261026.info --- a/analyses/pluginCMS/CMS_2013_I1261026.info +++ b/analyses/pluginCMS/CMS_2013_I1261026.info @@ -1,47 +1,47 @@ Name: CMS_2013_I1261026 Year: 2013 Summary: Jet and underlying event properties as a function of particle multiplicity Experiment: CMS Collider: LHC InspireID: 1261026 Status: VALIDATED Authors: - Maxim Azarkin References: - Eur.Phys.J. C73 (2013) 2674 - arXiv:1310.4554 - CMS-FSQ-12-022, - CERN-PH-EP-2013-195 RunInfo: QCD MB Beams: [p+, p+] Energies: [7000] NumEvents: 10000000 NeedCrossSection: no Description: 'Characteristics of multi-particle production in proton-proton collisions at $\sqrt{s} = 7$ TeV are studied as a function of the - charged-particle multiplicity ($N_{ch}$). The produced particles are separated + charged-particle multiplicity ($N_\text{ch}$). The produced particles are separated into two classes: those belonging to jets and those belonging to the underlying event. Charged particles are measured with pseudorapidity - $|\eta| < 2.4$ and transverse momentum $p_T > 0.25$ GeV. Jets are + $|\eta| < 2.4$ and transverse momentum $p_\text{T} > 0.25$ GeV. Jets are reconstructed from charged-particles only and required to have - $\pt > 5$ GeV. The distributions of jet \pt, average \pt of charged particles + $p_\text{T} > 5$ GeV. The distributions of jet $p_\text{T}$, average $p_\text{T}$ of charged particles belonging to the underlying event or to jets, jet rates, and jet shapes - are presented as functions of $N_{ch}$.' + are presented as functions of $N_\text{ch}$.' BibKey: Chatrchyan:2013ala BibTeX: '@article{Chatrchyan:2013ala, author = "Chatrchyan, Serguei and others", title = "{Jet and underlying event properties as a function of particle multiplicity in proton-proton collisions at $\sqrt{s} = 7$ TeV}", collaboration = "CMS Collaboration", journal = "Eur.Phys.J.", volume = "C73", pages = "2674", doi = "10.1140/epjc/s10052-013-2674-5", year = "2013", eprint = "1310.4554", archivePrefix = "arXiv", primaryClass = "hep-ex", reportNumber = "CMS-FSQ-12-022, CERN-PH-EP-2013-195", SLACcitation = "%%CITATION = ARXIV:1310.4554;%%",}' diff --git a/analyses/pluginCMS/CMS_2013_I1261026.plot b/analyses/pluginCMS/CMS_2013_I1261026.plot --- a/analyses/pluginCMS/CMS_2013_I1261026.plot +++ b/analyses/pluginCMS/CMS_2013_I1261026.plot @@ -1,101 +1,103 @@ # BEGIN PLOT /CMS_2013_I1261026/d0[1234567]-.* XLabel=$N_\text{ch}$ LegendYPos=0.4 LogY=0 # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d0[12345]-.* -YLabel=$\langle p_T \rangle$ [GeV/$c$] +YLabel=$\langle p_\text{T} \rangle$ [GeV/$c$] # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d01-x01-y01 #Title=CMS, $\sqrt{s}=7$~TeV, $|\eta^\text{ch}| < 2.4$, $p^\text{ch}_T > 0.25$ GeV, all -Title=Mean \pT, all charged particles +Title=Mean $p_\text{T}$, all charged particles # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d02-x01-y01 -Title=CMS, $\sqrt{s}=7$~TeV, $|\eta^{ch.part}| < 2.4$, $p^{ch.part}_T > 0.25$ GeV -Title=Mean \pT, UE charged particles +Title=CMS, $\sqrt{s}=7$~TeV, $|\eta^\text{ch.part}| < 2.4$, $p^\text{ch.part}_\text{T} > 0.25$ GeV +Title=Mean $p_\text{T}$, UE charged particles # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d03-x01-y01 #Title=CMS, $\sqrt{s}=7$~TeV, $|\eta^{ch.jet}| < 1.9$, $p^{ch.jet}_T > 5$ GeV, $p^{ch.part}_T > 0.25$ GeV -Title=Mean \pT, in-jet charged particles +Title=Mean $p_\text{T}$, in-jet charged particles # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d04-x01-y01 #Title=CMS, $\sqrt{s}=7$~TeV, $|\eta^{ch.jet}| < 1.9$, $p^{ch.jet}_T > 5$ GeV, $p^{ch.part}_T > 0.25$ GeV -Title=Mean \pT, leading in-jet charged particle +Title=Mean $p_\text{T}$, leading in-jet charged particle # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d05-x01-y01 -Title=Mean \pT, charged particle jets, $p^{ch.jet}_T > 5$ GeV, $|\eta^{ch.jet}| < 1.9$ +Title=Mean $p_\text{T}$, charged particle jets, $p^\text{ch.jet}_\text{T} > 5$ GeV, $|\eta^\text{ch.jet}| < 1.9$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d0[67]-.* YLabel=Charged jet rate +LegendYPos=0.8 +LegendXPos=0.1 # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d06-x01-y01 -Title=Charged jet rate, $p^\text{ch.jet}_T > 5$ GeV, $|\eta^{ch.jet}| < 1.9$ +Title=Charged jet rate, $p^\text{ch.jet}_T > 5$ GeV, $|\eta^\text{ch.jet}| < 1.9$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d07-x01-y01 -Title=Charged jet rate, $p^\text{ch.jet}_T > 30$ GeV, $|\eta^{ch.jet}| < 1.9$ +Title=Charged jet rate, $p^\text{ch.jet}_T > 30$ GeV, $|\eta^\text{ch.jet}| < 1.9$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d(08|09|10|11|12)-.* -XLabel=$p_T$ [GeV/$c$] +XLabel=$p_\text{T}$ [GeV/$c$] YLabel=$1/N_\text{ch.jet} dN_\text{ch.jet}/dp_T$ [GeV/$c$]$^{-1}$ LogY=1 # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d08-x01-y01 -Title=Jet $p_T$ spectrum, $|\eta^{ch.jet}| < 1.9$, $10 < N_\text{ch} \le 30$ +Title=Jet $p_\text{T}$ spectrum, $|\eta^\text{ch.jet}| < 1.9$, $10 < N_\text{ch} \le 30$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d09-x01-y01 -Title=Jet $p_T$ spectrum, $|\eta^{ch.jet}| < 1.9$, $30 < N_\text{ch} \le 50$ +Title=Jet $p_\text{T}$ spectrum, $|\eta^\text{ch.jet}| < 1.9$, $30 < N_\text{ch} \le 50$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d10-x01-y01 -Title=Jet $p_T$ spectrum, $|\eta^{ch.jet}| < 1.9$, $50 < N_\text{ch} \le 80$ +Title=Jet $p_\text{T}$ spectrum, $|\eta^\text{ch.jet}| < 1.9$, $50 < N_\text{ch} \le 80$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d11-x01-y01 -Title=Jet $p_T$ spectrum, $|\eta^{ch.jet}| < 1.9$, $80 < N_\text{ch} \le 110$ +Title=Jet $\textp_\text{T}$ spectrum, $|\eta^\text{ch.jet}| < 1.9$, $80 < N_\text{ch} \le 110$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d12-x01-y01 -Title=Jet $p_T$ spectrum, $|\eta^{ch.jet}| < 1.9$, $110 < N_\text{ch} \le 140$ +Title=Jet $p_\text{T}$ spectrum, $|\eta^\text{ch.jet}| < 1.9$, $110 < N_\text{ch} \le 140$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d1[34567]-.* XLabel=$R$ YLabel=$\rho$ LogY=0 # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d13-x01-y01 -Title=Intrajet ring $p_{T}$ density, $10 < N_\text{ch} \le 30$ +Title=Intrajet ring $p_\text{T}$ density, $10 < N_\text{ch} \le 30$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d14-x01-y01 -Title=Intrajet ring $p_{T}$ density, $30 < N_\text{ch} \le 50$ +Title=Intrajet ring $p_\text{T}$ density, $30 < N_\text{ch} \le 50$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d15-x01-y01 -Title=Intrajet ring $p_{T}$ density, $50 < N_\text{ch} \le 80$ +Title=Intrajet ring $p_\text{T}$ density, $50 < N_\text{ch} \le 80$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d16-x01-y01 -Title=Intrajet ring $p_{T}$ density, $80 < N_\text{ch} \le 110$ +Title=Intrajet ring $p_\text{T}$ density, $80 < N_\text{ch} \le 110$ # END PLOT # BEGIN PLOT /CMS_2013_I1261026/d17-x01-y01 -Title=Intrajet ring $p_{T}$ density, $110 < N_\text{ch} \le 140$ +Title=Intrajet ring $p_\text{T}$ density, $110 < N_\text{ch} \le 140$ # END PLOT