ARGUS_1993_S2789213.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include <iostream> 00003 #include "Rivet/Analysis.hh" 00004 #include "Rivet/Projections/Beam.hh" 00005 #include "Rivet/Projections/UnstableFinalState.hh" 00006 #include "Rivet/ParticleName.hh" 00007 00008 namespace Rivet { 00009 00010 00011 /// @brief ARGUS vector meson production 00012 /// @author Peter Richardson 00013 class ARGUS_1993_S2789213 : public Analysis { 00014 public: 00015 00016 ARGUS_1993_S2789213() 00017 : Analysis("ARGUS_1993_S2789213"), 00018 _weightSum_cont(0.),_weightSum_Ups1(0.),_weightSum_Ups4(0.) 00019 { } 00020 00021 00022 void init() { 00023 addProjection(Beam(), "Beams"); 00024 addProjection(UnstableFinalState(), "UFS"); 00025 00026 _mult_cont_Omega = bookHisto1D( 1, 1, 1); 00027 _mult_cont_Rho0 = bookHisto1D( 1, 1, 2); 00028 _mult_cont_KStar0 = bookHisto1D( 1, 1, 3); 00029 _mult_cont_KStarPlus = bookHisto1D( 1, 1, 4); 00030 _mult_cont_Phi = bookHisto1D( 1, 1, 5); 00031 00032 _mult_Ups1_Omega = bookHisto1D( 2, 1, 1); 00033 _mult_Ups1_Rho0 = bookHisto1D( 2, 1, 2); 00034 _mult_Ups1_KStar0 = bookHisto1D( 2, 1, 3); 00035 _mult_Ups1_KStarPlus = bookHisto1D( 2, 1, 4); 00036 _mult_Ups1_Phi = bookHisto1D( 2, 1, 5); 00037 00038 _mult_Ups4_Omega = bookHisto1D( 3, 1, 1); 00039 _mult_Ups4_Rho0 = bookHisto1D( 3, 1, 2); 00040 _mult_Ups4_KStar0 = bookHisto1D( 3, 1, 3); 00041 _mult_Ups4_KStarPlus = bookHisto1D( 3, 1, 4); 00042 _mult_Ups4_Phi = bookHisto1D( 3, 1, 5); 00043 00044 _hist_cont_KStarPlus = bookHisto1D( 4, 1, 1); 00045 _hist_Ups1_KStarPlus = bookHisto1D( 5, 1, 1); 00046 _hist_Ups4_KStarPlus = bookHisto1D( 6, 1, 1); 00047 00048 _hist_cont_KStar0 = bookHisto1D( 7, 1, 1); 00049 _hist_Ups1_KStar0 = bookHisto1D( 8, 1, 1); 00050 _hist_Ups4_KStar0 = bookHisto1D( 9, 1, 1); 00051 00052 _hist_cont_Rho0 = bookHisto1D(10, 1, 1); 00053 _hist_Ups1_Rho0 = bookHisto1D(11, 1, 1); 00054 _hist_Ups4_Rho0 = bookHisto1D(12, 1, 1); 00055 00056 _hist_cont_Omega = bookHisto1D(13, 1, 1); 00057 _hist_Ups1_Omega = bookHisto1D(14, 1, 1); 00058 } // init 00059 00060 00061 void analyze(const Event& e) { 00062 const double weight = e.weight(); 00063 00064 const Beam beamproj = applyProjection<Beam>(e, "Beams"); 00065 const double s = sqr(beamproj.sqrtS()); 00066 const double roots = sqrt(s); 00067 00068 // Find the upsilons 00069 Particles upsilons; 00070 // First in unstable final state 00071 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS"); 00072 foreach (const Particle& p, ufs.particles()) 00073 if (p.pid() == 300553 || p.pid() == 553) upsilons.push_back(p); 00074 // Then in whole event if that failed 00075 if (upsilons.empty()) { 00076 foreach (GenParticle* p, Rivet::particles(e.genEvent())) { 00077 if (p->pdg_id() != 300553 && p->pdg_id() != 553) continue; 00078 const GenVertex* pv = p->production_vertex(); 00079 bool passed = true; 00080 if (pv) { 00081 /// @todo Use better looping 00082 for (GenVertex::particles_in_const_iterator pp = pv->particles_in_const_begin() ; pp != pv->particles_in_const_end() ; ++pp) { 00083 if ( p->pdg_id() == (*pp)->pdg_id() ) { 00084 passed = false; 00085 break; 00086 } 00087 } 00088 } 00089 if (passed) upsilons.push_back(Particle(*p)); 00090 } 00091 } 00092 00093 // continuum 00094 if (upsilons.empty()) { 00095 _weightSum_cont += weight; 00096 unsigned int nOmega(0),nRho0(0),nKStar0(0),nKStarPlus(0),nPhi(0); 00097 foreach (const Particle& p, ufs.particles()) { 00098 int id = p.abspid(); 00099 double xp = 2.*p.E()/roots; 00100 double beta = p.p3().mod()/p.E(); 00101 if (id == 113) { 00102 _hist_cont_Rho0->fill(xp,weight/beta); 00103 ++nRho0; 00104 } 00105 else if (id == 313) { 00106 _hist_cont_KStar0->fill(xp,weight/beta); 00107 ++nKStar0; 00108 } 00109 else if (id == 223) { 00110 _hist_cont_Omega->fill(xp,weight/beta); 00111 ++nOmega; 00112 } 00113 else if (id == 323) { 00114 _hist_cont_KStarPlus->fill(xp,weight/beta); 00115 ++nKStarPlus; 00116 } 00117 else if (id == 333) { 00118 ++nPhi; 00119 } 00120 } 00121 /// @todo Replace with Counters and fill one-point Scatters at the end 00122 _mult_cont_Omega ->fill(10.45,weight*nOmega ); 00123 _mult_cont_Rho0 ->fill(10.45,weight*nRho0 ); 00124 _mult_cont_KStar0 ->fill(10.45,weight*nKStar0 ); 00125 _mult_cont_KStarPlus->fill(10.45,weight*nKStarPlus); 00126 _mult_cont_Phi ->fill(10.45,weight*nPhi ); 00127 } 00128 else { 00129 // find an upsilon 00130 foreach (const Particle& ups, upsilons) { 00131 int parentId = ups.pid(); 00132 if (parentId == 553) 00133 _weightSum_Ups1 += weight; 00134 else 00135 _weightSum_Ups4 += weight; 00136 Particles unstable; 00137 // find the decay products we want 00138 findDecayProducts(ups.genParticle(),unstable); 00139 LorentzTransform cms_boost; 00140 if (ups.p3().mod() > 0.001) 00141 cms_boost = LorentzTransform(-ups.momentum().boostVector()); 00142 double mass = ups.mass(); 00143 unsigned int nOmega(0),nRho0(0),nKStar0(0),nKStarPlus(0),nPhi(0); 00144 foreach(const Particle & p , unstable) { 00145 int id = p.abspid(); 00146 FourMomentum p2 = cms_boost.transform(p.momentum()); 00147 double xp = 2.*p2.E()/mass; 00148 double beta = p2.p3().mod()/p2.E(); 00149 if (id == 113) { 00150 if (parentId == 553) _hist_Ups1_Rho0->fill(xp,weight/beta); 00151 else _hist_Ups4_Rho0->fill(xp,weight/beta); 00152 ++nRho0; 00153 } 00154 else if (id == 313) { 00155 if (parentId == 553) _hist_Ups1_KStar0->fill(xp,weight/beta); 00156 else _hist_Ups4_KStar0->fill(xp,weight/beta); 00157 ++nKStar0; 00158 } 00159 else if (id == 223) { 00160 if (parentId == 553) _hist_Ups1_Omega->fill(xp,weight/beta); 00161 ++nOmega; 00162 } 00163 else if (id == 323) { 00164 if (parentId == 553) _hist_Ups1_KStarPlus->fill(xp,weight/beta); 00165 else _hist_Ups4_KStarPlus->fill(xp,weight/beta); 00166 ++nKStarPlus; 00167 } 00168 else if (id == 333) { 00169 ++nPhi; 00170 } 00171 } 00172 if (parentId == 553) { 00173 _mult_Ups1_Omega ->fill(9.46,weight*nOmega ); 00174 _mult_Ups1_Rho0 ->fill(9.46,weight*nRho0 ); 00175 _mult_Ups1_KStar0 ->fill(9.46,weight*nKStar0 ); 00176 _mult_Ups1_KStarPlus->fill(9.46,weight*nKStarPlus); 00177 _mult_Ups1_Phi ->fill(9.46,weight*nPhi ); 00178 } 00179 else { 00180 _mult_Ups4_Omega ->fill(10.58,weight*nOmega ); 00181 _mult_Ups4_Rho0 ->fill(10.58,weight*nRho0 ); 00182 _mult_Ups4_KStar0 ->fill(10.58,weight*nKStar0 ); 00183 _mult_Ups4_KStarPlus->fill(10.58,weight*nKStarPlus); 00184 _mult_Ups4_Phi ->fill(10.58,weight*nPhi ); 00185 } 00186 } 00187 } 00188 } // analyze 00189 00190 00191 void finalize() { 00192 if (_weightSum_cont > 0.) { 00193 /// @todo Replace with Counters and fill one-point Scatters at the end 00194 scale(_mult_cont_Omega , 1./_weightSum_cont); 00195 scale(_mult_cont_Rho0 , 1./_weightSum_cont); 00196 scale(_mult_cont_KStar0 , 1./_weightSum_cont); 00197 scale(_mult_cont_KStarPlus, 1./_weightSum_cont); 00198 scale(_mult_cont_Phi , 1./_weightSum_cont); 00199 scale(_hist_cont_KStarPlus, 1./_weightSum_cont); 00200 scale(_hist_cont_KStar0 , 1./_weightSum_cont); 00201 scale(_hist_cont_Rho0 , 1./_weightSum_cont); 00202 scale(_hist_cont_Omega , 1./_weightSum_cont); 00203 } 00204 if (_weightSum_Ups1 > 0.) { 00205 /// @todo Replace with Counters and fill one-point Scatters at the end 00206 scale(_mult_Ups1_Omega , 1./_weightSum_Ups1); 00207 scale(_mult_Ups1_Rho0 , 1./_weightSum_Ups1); 00208 scale(_mult_Ups1_KStar0 , 1./_weightSum_Ups1); 00209 scale(_mult_Ups1_KStarPlus, 1./_weightSum_Ups1); 00210 scale(_mult_Ups1_Phi , 1./_weightSum_Ups1); 00211 scale(_hist_Ups1_KStarPlus, 1./_weightSum_Ups1); 00212 scale(_hist_Ups1_KStar0 , 1./_weightSum_Ups1); 00213 scale(_hist_Ups1_Rho0 , 1./_weightSum_Ups1); 00214 scale(_hist_Ups1_Omega , 1./_weightSum_Ups1); 00215 } 00216 if (_weightSum_Ups4 > 0.) { 00217 /// @todo Replace with Counters and fill one-point Scatters at the end 00218 scale(_mult_Ups4_Omega , 1./_weightSum_Ups4); 00219 scale(_mult_Ups4_Rho0 , 1./_weightSum_Ups4); 00220 scale(_mult_Ups4_KStar0 , 1./_weightSum_Ups4); 00221 scale(_mult_Ups4_KStarPlus, 1./_weightSum_Ups4); 00222 scale(_mult_Ups4_Phi , 1./_weightSum_Ups4); 00223 scale(_hist_Ups4_KStarPlus, 1./_weightSum_Ups4); 00224 scale(_hist_Ups4_KStar0 , 1./_weightSum_Ups4); 00225 scale(_hist_Ups4_Rho0 , 1./_weightSum_Ups4); 00226 } 00227 } // finalize 00228 00229 00230 private: 00231 00232 //@{ 00233 Histo1DPtr _mult_cont_Omega ; 00234 Histo1DPtr _mult_cont_Rho0 ; 00235 Histo1DPtr _mult_cont_KStar0 ; 00236 Histo1DPtr _mult_cont_KStarPlus; 00237 Histo1DPtr _mult_cont_Phi ; 00238 00239 Histo1DPtr _mult_Ups1_Omega ; 00240 Histo1DPtr _mult_Ups1_Rho0 ; 00241 Histo1DPtr _mult_Ups1_KStar0 ; 00242 Histo1DPtr _mult_Ups1_KStarPlus; 00243 Histo1DPtr _mult_Ups1_Phi ; 00244 00245 Histo1DPtr _mult_Ups4_Omega ; 00246 Histo1DPtr _mult_Ups4_Rho0 ; 00247 Histo1DPtr _mult_Ups4_KStar0 ; 00248 Histo1DPtr _mult_Ups4_KStarPlus; 00249 Histo1DPtr _mult_Ups4_Phi ; 00250 00251 Histo1DPtr _hist_cont_KStarPlus; 00252 Histo1DPtr _hist_Ups1_KStarPlus; 00253 Histo1DPtr _hist_Ups4_KStarPlus; 00254 00255 Histo1DPtr _hist_cont_KStar0 ; 00256 Histo1DPtr _hist_Ups1_KStar0 ; 00257 Histo1DPtr _hist_Ups4_KStar0 ; 00258 00259 Histo1DPtr _hist_cont_Rho0 ; 00260 Histo1DPtr _hist_Ups1_Rho0 ; 00261 Histo1DPtr _hist_Ups4_Rho0 ; 00262 00263 Histo1DPtr _hist_cont_Omega ; 00264 Histo1DPtr _hist_Ups1_Omega ; 00265 00266 double _weightSum_cont,_weightSum_Ups1,_weightSum_Ups4; 00267 //@} 00268 00269 00270 void findDecayProducts(const GenParticle* p, Particles& unstable) { 00271 const GenVertex* dv = p->end_vertex(); 00272 /// @todo Use better looping 00273 for (GenVertex::particles_out_const_iterator pp = dv->particles_out_const_begin(); pp != dv->particles_out_const_end(); ++pp) { 00274 int id = abs((*pp)->pdg_id()); 00275 if (id == 113 || id == 313 || id == 323 || 00276 id == 333 || id == 223 ) { 00277 unstable.push_back(Particle(*pp)); 00278 } 00279 else if ((*pp)->end_vertex()) 00280 findDecayProducts(*pp, unstable); 00281 } 00282 } 00283 00284 }; 00285 00286 00287 // The hook for the plugin system 00288 DECLARE_RIVET_PLUGIN(ARGUS_1993_S2789213); 00289 00290 } Generated on Tue Sep 30 2014 19:45:41 for The Rivet MC analysis system by ![]() |