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