STAR_2006_S6860818.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/Logging.hh" 00004 #include "Rivet/Projections/ChargedFinalState.hh" 00005 #include "Rivet/Projections/IdentifiedFinalState.hh" 00006 #include "Rivet/Projections/UnstableFinalState.hh" 00007 #include "Rivet/RivetYODA.hh" 00008 00009 namespace Rivet { 00010 00011 00012 /// @brief STAR strange particle spectra in pp at 200 GeV 00013 class STAR_2006_S6860818 : public Analysis { 00014 public: 00015 00016 /// Constructor 00017 STAR_2006_S6860818() 00018 : Analysis("STAR_2006_S6860818"), 00019 _sumWeightSelected(0.0) 00020 { 00021 for (size_t i = 0; i < 4; i++) { 00022 _nBaryon[i] = 0; 00023 _nAntiBaryon[i] = 0; 00024 _nWeightedBaryon[i] = 0.; 00025 _nWeightedAntiBaryon[i] = 0.; 00026 } 00027 } 00028 00029 /// Book projections and histograms 00030 void init() { 00031 ChargedFinalState bbc1(-5.0,-3.5, 0.0*GeV); // beam-beam-counter trigger 00032 ChargedFinalState bbc2( 3.5, 5.0, 0.0*GeV); // beam-beam-counter trigger 00033 addProjection(bbc1, "BBC1"); 00034 addProjection(bbc2, "BBC2"); 00035 00036 UnstableFinalState ufs(-2.5, 2.5, 0.0*GeV); 00037 addProjection(ufs, "UFS"); 00038 00039 _h_pT_k0s = bookHisto1D(1, 1, 1); 00040 _h_pT_kminus = bookHisto1D(1, 2, 1); 00041 _h_pT_kplus = bookHisto1D(1, 3, 1); 00042 _h_pT_lambda = bookHisto1D(1, 4, 1); 00043 _h_pT_lambdabar = bookHisto1D(1, 5, 1); 00044 _h_pT_ximinus = bookHisto1D(1, 6, 1); 00045 _h_pT_xiplus = bookHisto1D(1, 7, 1); 00046 //_h_pT_omega = bookHisto1D(1, 8, 1); 00047 _h_antibaryon_baryon_ratio = bookScatter2D(2, 1, 1); 00048 _h_lambar_lam = bookScatter2D(2, 2, 1); 00049 _h_xiplus_ximinus = bookScatter2D(2, 3, 1); 00050 _h_pT_vs_mass = bookProfile1D(3, 1, 1); 00051 } 00052 00053 00054 /// Do the analysis 00055 void analyze(const Event& event) { 00056 const ChargedFinalState& bbc1 = applyProjection<ChargedFinalState>(event, "BBC1"); 00057 const ChargedFinalState& bbc2 = applyProjection<ChargedFinalState>(event, "BBC2"); 00058 if (bbc1.size()<1 || bbc2.size()<1) { 00059 MSG_DEBUG("Failed beam-beam-counter trigger"); 00060 vetoEvent; 00061 } 00062 00063 const double weight = event.weight(); 00064 00065 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(event, "UFS"); 00066 foreach (const Particle& p, ufs.particles()) { 00067 if (fabs(p.momentum().rapidity()) < 0.5) { 00068 const PdgId pid = p.pdgId(); 00069 const double pT = p.momentum().pT() / GeV; 00070 switch (abs(pid)) { 00071 case PIPLUS: 00072 if (pid < 0) _h_pT_vs_mass->fill(0.1396, pT, weight); 00073 break; 00074 case PROTON: 00075 if (pid < 0) _h_pT_vs_mass->fill(0.9383, pT, weight); 00076 if (pT > 0.4) { 00077 pid > 0 ? _nBaryon[0]++ : _nAntiBaryon[0]++; 00078 pid > 0 ? _nWeightedBaryon[0]+=weight : _nWeightedAntiBaryon[0]+=weight; 00079 } 00080 break; 00081 case K0S: 00082 if (pT > 0.2) { 00083 _h_pT_k0s->fill(pT, weight/pT); 00084 } 00085 _h_pT_vs_mass->fill(0.5056, pT, weight); 00086 break; 00087 case K0L: 00088 _h_pT_vs_mass->fill(0.5056, pT, weight); 00089 break; 00090 case 113: // rho0(770) 00091 _h_pT_vs_mass->fill(0.7755, pT, weight); 00092 break; 00093 case 313: // K0*(892) 00094 _h_pT_vs_mass->fill(0.8960, pT, weight); 00095 break; 00096 case 333: // phi(1020) 00097 _h_pT_vs_mass->fill(1.0190, pT, weight); 00098 break; 00099 case 3214: // Sigma(1385) 00100 _h_pT_vs_mass->fill(1.3840, pT, weight); 00101 break; 00102 case 3124: // Lambda(1520) 00103 _h_pT_vs_mass->fill(1.5200, pT, weight); 00104 break; 00105 case KPLUS: 00106 if (pid < 0) _h_pT_vs_mass->fill(0.4856, pT, weight); 00107 if (pT > 0.2) { 00108 pid > 0 ? _h_pT_kplus->fill(pT, weight/pT) : _h_pT_kminus->fill(pT, weight/pT); 00109 } 00110 break; 00111 case LAMBDA: 00112 pid > 0 ? _h_pT_vs_mass->fill(1.1050, pT, weight) : _h_pT_vs_mass->fill(1.1250, pT, weight); 00113 if (pT > 0.3) { 00114 pid > 0 ? _h_pT_lambda->fill(pT, weight/pT) : _h_pT_lambdabar->fill(pT, weight/pT); 00115 pid > 0 ? _nBaryon[1]++ : _nAntiBaryon[1]++; 00116 pid > 0 ? _nWeightedBaryon[1]+=weight : _nWeightedAntiBaryon[1]+=weight; 00117 } 00118 break; 00119 case XIMINUS: 00120 pid > 0 ? _h_pT_vs_mass->fill(1.3120, pT, weight) : _h_pT_vs_mass->fill(1.3320, pT, weight); 00121 if (pT > 0.5) { 00122 pid > 0 ? _h_pT_ximinus->fill(pT, weight/pT) : _h_pT_xiplus->fill(pT, weight/pT); 00123 pid > 0 ? _nBaryon[2]++ : _nAntiBaryon[2]++; 00124 pid > 0 ? _nWeightedBaryon[2]+=weight : _nWeightedAntiBaryon[2]+=weight; 00125 } 00126 break; 00127 case OMEGAMINUS: 00128 _h_pT_vs_mass->fill(1.6720, pT, weight); 00129 if (pT > 0.5) { 00130 //_h_pT_omega->fill(pT, weight/pT); 00131 pid > 0 ? _nBaryon[3]++ : _nAntiBaryon[3]++; 00132 pid > 0 ? _nWeightedBaryon[3]+=weight : _nWeightedAntiBaryon[3]+=weight; 00133 } 00134 break; 00135 } 00136 00137 } 00138 } 00139 00140 _sumWeightSelected += event.weight(); 00141 } 00142 00143 00144 /// Finalize 00145 void finalize() { 00146 std::vector<Point2D> points; 00147 for (size_t i=0 ; i<4 ; i++) { 00148 if (_nWeightedBaryon[i]==0 || _nWeightedAntiBaryon[i]==0) { 00149 points.push_back(Point2D(i,0,0.5,0)); 00150 } 00151 else { 00152 double y = _nWeightedAntiBaryon[i]/_nWeightedBaryon[i]; 00153 double dy = sqrt( 1./_nAntiBaryon[i] + 1./_nBaryon[i] ); 00154 points.push_back(Point2D(i,y,0.5,y*dy)); 00155 } 00156 } 00157 _h_antibaryon_baryon_ratio->addPoints( points ); 00158 00159 divide(_h_pT_lambdabar,_h_pT_lambda, 00160 _h_lambar_lam); 00161 00162 divide(_h_pT_xiplus,_h_pT_ximinus, 00163 _h_xiplus_ximinus); 00164 00165 scale(_h_pT_k0s, 1./(2*M_PI*_sumWeightSelected)); 00166 scale(_h_pT_kminus, 1./(2*M_PI*_sumWeightSelected)); 00167 scale(_h_pT_kplus, 1./(2*M_PI*_sumWeightSelected)); 00168 scale(_h_pT_lambda, 1./(2*M_PI*_sumWeightSelected)); 00169 scale(_h_pT_lambdabar, 1./(2*M_PI*_sumWeightSelected)); 00170 scale(_h_pT_ximinus, 1./(2*M_PI*_sumWeightSelected)); 00171 scale(_h_pT_xiplus, 1./(2*M_PI*_sumWeightSelected)); 00172 //scale(_h_pT_omega, 1./(2*M_PI*_sumWeightSelected)); 00173 MSG_DEBUG("sumOfWeights() = " << sumOfWeights()); 00174 MSG_DEBUG("_sumWeightSelected = " << _sumWeightSelected); 00175 } 00176 00177 private: 00178 00179 double _sumWeightSelected; 00180 int _nBaryon[4]; 00181 int _nAntiBaryon[4]; 00182 double _nWeightedBaryon[4]; 00183 double _nWeightedAntiBaryon[4]; 00184 00185 Histo1DPtr _h_pT_k0s; 00186 Histo1DPtr _h_pT_kminus; 00187 Histo1DPtr _h_pT_kplus; 00188 Histo1DPtr _h_pT_lambda; 00189 Histo1DPtr _h_pT_lambdabar; 00190 Histo1DPtr _h_pT_ximinus; 00191 Histo1DPtr _h_pT_xiplus; 00192 //Histo1DPtr _h_pT_omega; 00193 Scatter2DPtr _h_antibaryon_baryon_ratio; 00194 Profile1DPtr _h_pT_vs_mass; 00195 Scatter2DPtr _h_lambar_lam; 00196 Scatter2DPtr _h_xiplus_ximinus; 00197 00198 }; 00199 00200 00201 00202 // The hook for the plugin system 00203 DECLARE_RIVET_PLUGIN(STAR_2006_S6860818); 00204 00205 } Generated on Fri Dec 21 2012 15:03:42 for The Rivet MC analysis system by ![]() |