SFM_1984_S1178091.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ChargedFinalState.hh" 00004 00005 namespace Rivet { 00006 00007 00008 /// @brief SFM charged multiplicities in NSD and inelastic minbias events 00009 class SFM_1984_S1178091 : public Analysis { 00010 public: 00011 00012 /// Constructor 00013 SFM_1984_S1178091() : Analysis("SFM_1984_S1178091") {} 00014 00015 00016 /// @name Analysis methods 00017 //@{ 00018 00019 void init() { 00020 // Projections 00021 // 00022 declare(ChargedFinalState(Cuts::absrap<5 && Cuts::pT>250*MeV && Cuts::pT<3*GeV), "FS"); 00023 00024 // Histograms 00025 if (fuzzyEquals(sqrtS()/GeV, 30.4, 1E-1)) { 00026 _hist_multiplicity_inel = bookHisto1D(1, 1, 1); 00027 _hist_multiplicity_nsd = bookHisto1D(2, 1, 1); 00028 } else if (fuzzyEquals(sqrtS(), 44.5, 1E-1)) { 00029 _hist_multiplicity_inel = bookHisto1D(1, 1, 2); 00030 _hist_multiplicity_nsd = bookHisto1D(2, 1, 2); 00031 } else if (fuzzyEquals(sqrtS(), 52.2, 1E-1)) { 00032 _hist_multiplicity_inel = bookHisto1D(1, 1, 3); 00033 _hist_multiplicity_nsd = bookHisto1D(2, 1, 3); 00034 } else if (fuzzyEquals(sqrtS(), 62.2, 1E-1)) { 00035 _hist_multiplicity_inel = bookHisto1D(1, 1, 4); 00036 _hist_multiplicity_nsd = bookHisto1D(2, 1, 4); 00037 } 00038 00039 } 00040 00041 00042 // Analyse each event 00043 void analyze(const Event& event) { 00044 const double weight = event.weight(); 00045 const ChargedFinalState& fs = apply<ChargedFinalState>(event, "FS"); 00046 00047 // Trigger 00048 if (fs.particles().size() <1 ) vetoEvent; 00049 00050 // Event classification: 00051 int n_left(0), n_right(0), n_large_x(0); 00052 foreach (const Particle& p, fs.particles()) { 00053 // Calculate the particles' Feynman x 00054 const double x_feyn = 2.0 * fabs(p.pz())/sqrtS(); 00055 if (x_feyn > 0.8 ) n_large_x += 1; 00056 00057 // Pseudorapidity 00058 const double eta = p.eta(); 00059 if (eta > 0.0) n_right += 1; 00060 else if (eta < 0.0) n_left += 1; 00061 } 00062 MSG_DEBUG("N_left: " << n_left << ", " 00063 << "N_right: " << n_right << ", " 00064 << "N_large_x: " << n_large_x); 00065 00066 00067 // Single diffractive: either one large x particle or 0 particles in the one hemisphere but more than 7 in the other hemisphere 00068 bool isDiffractive = (n_large_x == 1) || ( ((n_left==0) && (fs.particles().size() < 7)) || ((n_right==0) && (fs.particles().size() < 7)) ); 00069 00070 00071 _hist_multiplicity_inel->fill(fs.particles().size(), weight); 00072 if (!isDiffractive) _hist_multiplicity_nsd->fill(fs.particles().size(), weight); 00073 } 00074 00075 00076 void finalize() { 00077 normalize(_hist_multiplicity_inel); 00078 normalize(_hist_multiplicity_nsd); 00079 } 00080 00081 //@} 00082 00083 00084 private: 00085 00086 00087 /// @name Histograms 00088 //@{ 00089 Histo1DPtr _hist_multiplicity_inel; 00090 Histo1DPtr _hist_multiplicity_nsd; 00091 //@} 00092 00093 }; 00094 00095 00096 00097 // The hook for the plugin system 00098 DECLARE_RIVET_PLUGIN(SFM_1984_S1178091); 00099 00100 } Generated on Tue Dec 13 2016 16:32:40 for The Rivet MC analysis system by ![]() |