CMS_2011_S8978280.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Tools/Logging.hh" 00005 #include "Rivet/Projections/UnstableFinalState.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// @brief CMS strange particle spectra (Ks, Lambda, Cascade) in pp at 900 and 7000 GeV 00011 /// @author Kevin Stenson 00012 class CMS_2011_S8978280 : public Analysis { 00013 public: 00014 00015 /// Constructor 00016 CMS_2011_S8978280() : Analysis("CMS_2011_S8978280") {} 00017 00018 00019 void init() { 00020 // Need wide range of eta because cut on rapidity not pseudorapidity 00021 UnstableFinalState ufs(-8.0, 8.0, 0.0*GeV); 00022 addProjection(ufs, "UFS"); 00023 00024 // Particle distributions versus rapidity and transverse momentum 00025 _h_dNKshort_dy = bookHisto1D(1, 1, 1); 00026 _h_dNKshort_dpT = bookHisto1D(2, 1, 1); 00027 _h_dNLambda_dy = bookHisto1D(3, 1, 1); 00028 _h_dNLambda_dpT = bookHisto1D(4, 1, 1); 00029 _h_dNXi_dy = bookHisto1D(5, 1, 1); 00030 _h_dNXi_dpT = bookHisto1D(6, 1, 1); 00031 00032 _h_LampT_KpT = bookScatter2D(7, 1, 1); 00033 _h_XipT_LampT = bookScatter2D(8, 1, 1); 00034 _h_Lamy_Ky = bookScatter2D(9, 1, 1); 00035 _h_Xiy_Lamy = bookScatter2D(10, 1, 1); 00036 00037 } 00038 00039 00040 void analyze(const Event& event) { 00041 const double weight = event.weight(); 00042 00043 const UnstableFinalState& parts = applyProjection<UnstableFinalState>(event, "UFS"); 00044 00045 foreach (const Particle& p, parts.particles()) { 00046 const double pT = p.momentum().pT(); 00047 const double y = fabs(p.momentum().rapidity()); 00048 const PdgId pid = abs(p.pdgId()); 00049 00050 if (y < 2.0) { 00051 switch (pid) { 00052 case K0S: 00053 _h_dNKshort_dy->fill(y, weight); 00054 _h_dNKshort_dpT->fill(pT, weight); 00055 break; 00056 case LAMBDA: 00057 // Lambda should not have Cascade or Omega ancestors since they should not decay. But just in case... 00058 if ( !( p.hasAncestor(3322) || p.hasAncestor(-3322) || p.hasAncestor(3312) || p.hasAncestor(-3312) || p.hasAncestor(3334) || p.hasAncestor(-3334) ) ) { 00059 _h_dNLambda_dy->fill(y, weight); 00060 _h_dNLambda_dpT->fill(pT, weight); 00061 } 00062 break; 00063 case XIMINUS: 00064 // Cascade should not have Omega ancestors since it should not decay. But just in case... 00065 if ( !( p.hasAncestor(3334) || p.hasAncestor(-3334) ) ) { 00066 _h_dNXi_dy->fill(y, weight); 00067 _h_dNXi_dpT->fill(pT, weight); 00068 } 00069 break; 00070 } 00071 } 00072 } 00073 } 00074 00075 00076 void finalize() { 00077 00078 divide(_h_dNLambda_dpT,_h_dNKshort_dpT, 00079 _h_LampT_KpT); 00080 00081 divide(_h_dNXi_dpT,_h_dNLambda_dpT, 00082 _h_XipT_LampT); 00083 00084 divide(_h_dNLambda_dy,_h_dNKshort_dy, 00085 _h_Lamy_Ky); 00086 00087 divide(_h_dNXi_dy,_h_dNLambda_dy, 00088 _h_Xiy_Lamy); 00089 00090 double normpT = 1.0/sumOfWeights(); 00091 double normy = 0.5*normpT; // Accounts for using |y| instead of y 00092 scale(_h_dNKshort_dy, normy); 00093 scale(_h_dNKshort_dpT, normpT); 00094 scale(_h_dNLambda_dy, normy); 00095 scale(_h_dNLambda_dpT, normpT); 00096 scale(_h_dNXi_dy, normy); 00097 scale(_h_dNXi_dpT, normpT); 00098 } 00099 00100 00101 private: 00102 00103 // Particle distributions versus rapidity and transverse momentum 00104 Histo1DPtr _h_dNKshort_dy; 00105 Histo1DPtr _h_dNKshort_dpT; 00106 Histo1DPtr _h_dNLambda_dy; 00107 Histo1DPtr _h_dNLambda_dpT; 00108 Histo1DPtr _h_dNXi_dy; 00109 Histo1DPtr _h_dNXi_dpT; 00110 00111 Scatter2DPtr _h_LampT_KpT; 00112 Scatter2DPtr _h_XipT_LampT; 00113 Scatter2DPtr _h_Lamy_Ky; 00114 Scatter2DPtr _h_Xiy_Lamy; 00115 00116 }; 00117 00118 00119 00120 // The hook for the plugin system 00121 DECLARE_RIVET_PLUGIN(CMS_2011_S8978280); 00122 00123 } Generated on Fri Dec 21 2012 15:03:40 for The Rivet MC analysis system by ![]() |