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