diff --git a/analyses/pluginATLAS/ATLAS_2015_I1360290.cc b/analyses/pluginATLAS/ATLAS_2015_I1360290.cc --- a/analyses/pluginATLAS/ATLAS_2015_I1360290.cc +++ b/analyses/pluginATLAS/ATLAS_2015_I1360290.cc @@ -1,129 +1,129 @@ // -*- C++ -*- #include "Rivet/Analysis.hh" #include "Rivet/Projections/ChargedFinalState.hh" #include "Rivet/Tools/AtlasCommon.hh" namespace Rivet { /// @brief Add a short analysis description here class ATLAS_2015_I1360290 : public Analysis { public: /// Constructor DEFAULT_RIVET_ANALYSIS_CTOR(ATLAS_2015_I1360290); /// @name Analysis methods //@{ /// Book histograms and initialise projections before the run void init() { // Initialise and register projections // Centrality projection. declareCentrality(ATLAS::SumET_PBPB_Centrality(), "ATLAS_PBPB_CENTRALITY", "sumETFwd","sumETFwd"); // Trigger projection. declare(ATLAS::MinBiasTrigger(),"Trigger"); // The measured final state. declare(ChargedFinalState (Cuts::abseta < 2. && Cuts::pT > 0.5*GeV && Cuts::pT < 150.0*GeV), "CFS"); taa = {26.3, 20.6, 14.4, 8.73, 5.05, 2.70, 1.34, 0.41}; centData = {5., 10., 20., 30., 40., 50., 60., 80.}; for (int i = 0, N = centData.size(); i < N; ++i) { // eta hists starts from table 55 ( first 1.7 < pT < 2.0) histEta1[centData[i]] = bookHisto1D(55 + i, 1, 1); // From table 64, 6.7 < pT < 7.7 histEta2[centData[i]] = bookHisto1D(64 + i, 1, 1 ); // From table 73, 19.9 < pT < 22.8 histEta3[centData[i]] = bookHisto1D(73 + i, 1, 1 ); // From table 82, 59.8 < pT < 94.8 histEta4[centData[i]] = bookHisto1D(82 + i, 1, 1 ); // pt hists starts from table 2 on hepmc, |eta| < 2.0 histpT[centData[i]] = bookHisto1D(2 + i, 1, 1); // keep track of sow in centrality bins. sow[centData[i]] = bookCounter("sow_" + toString(i)); } } /// Perform the per-event analysis void analyze(const Event& event) { if ( !apply(event, "Trigger")() ) vetoEvent; const double weight = event.weight(); const CentralityProjection& cent = apply(event,"sumETFwd"); double c = cent(); // Find the correct centrality histograms auto hItr1 = histEta1.upper_bound(c); if (hItr1 == histEta1.end()) return; auto hItr2 = histEta2.upper_bound(c); if (hItr2 == histEta2.end()) return; auto hItr3 = histEta3.upper_bound(c); if (hItr3 == histEta3.end()) return; auto hItr4 = histEta4.upper_bound(c); if (hItr4 == histEta4.end()) return; auto hpTItr = histpT.upper_bound(c); if (hpTItr == histpT.end()) return; // Find the correct sow. auto sItr = sow.upper_bound(c); if (sItr == sow.end()) return; sItr->second->fill(weight); for (const auto& p : apply(event,"CFS").particles()) { double pT = p.pT(); double eta = abs(p.eta()); if (pT > 1.7 && pT < 2.0) hItr1->second->fill(eta, weight/2.0); else if (pT > 6.7 && pT < 7.7) hItr2->second->fill(eta, weight/2.0); else if (pT > 19.9 && pT < 22.8) hItr3->second->fill(eta, weight/2.0); else if (pT > 59.8 && pT < 94.8) hItr4->second->fill(eta, weight/2.0); - if (eta < 2) hpTItr->second->fill(pT, weight/2./M_PI/4.); + if (eta < 2) hpTItr->second->fill(pT, weight/2./M_PI/pT/4.); } } /// Normalise histograms etc., after the run void finalize() { for (int i = 0, N = centData.size(); i < N; ++i) { histEta1[centData[i]]->scaleW(1./sow[centData[i]]->sumW()); histEta2[centData[i]]->scaleW(1./sow[centData[i]]->sumW()); histEta3[centData[i]]->scaleW(1./sow[centData[i]]->sumW()); histEta4[centData[i]]->scaleW(1./sow[centData[i]]->sumW()); histpT[centData[i]]->scaleW(1./sow[centData[i]]->sumW()/taa[i]); } } //@} /// @name Histograms //@{ // The centrality binned histograms map histEta1; map histEta2; map histEta3; map histEta4; map histpT; map sow; vector centData; vector taa; //@} }; // The hook for the plugin system DECLARE_RIVET_PLUGIN(ATLAS_2015_I1360290); } diff --git a/analyses/pluginATLAS/ATLAS_PBPB_CENTRALITY.plot b/analyses/pluginATLAS/ATLAS_PBPB_CENTRALITY.plot new file mode 100644 --- /dev/null +++ b/analyses/pluginATLAS/ATLAS_PBPB_CENTRALITY.plot @@ -0,0 +1,11 @@ +# BEGIN PLOT /ATLAS_PBPB_CENTRALITY/sumETFwd +Title=Sum $E_T^{Pb}$ distribution, Pb--Pb $\sqrt{s_{NN}}=2.76$ TeV +XLabel=$\sum E_\perp$ +YLabel=$(1/N_{evt}) \mathrm{d}N/\mathrm{d}\sum E_T^{Pb}$ +# END PLOT +# BEGIN PLOT /ATLAS_PBPB_CENTRALITY/sumETFwd_IMP +Title=Sum $E_T^{Pb}$ distribution, Pb--Pb $\sqrt{s_{NN}}=2.76$ TeV +XLabel=$b$ [fm] +YLabel=$(1/N_{evt}) \mathrm{d}N/\mathrm{d}b$ +# END PLOT +