BABAR_2005_S6181155.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 00009 namespace Rivet { 00010 00011 00012 /// @brief BABAR Xi_c baryons from fragmentation 00013 /// @author Peter Richardson 00014 class BABAR_2005_S6181155 : public Analysis { 00015 public: 00016 00017 BABAR_2005_S6181155() 00018 : Analysis("BABAR_2005_S6181155") 00019 { } 00020 00021 00022 void analyze(const Event& e) { 00023 const double weight = e.weight(); 00024 00025 // Loop through unstable FS particles and look for charmed mesons/baryons 00026 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS"); 00027 00028 const Beam beamproj = applyProjection<Beam>(e, "Beams"); 00029 const ParticlePair& beams = beamproj.beams(); 00030 FourMomentum mom_tot = beams.first.momentum() + beams.second.momentum(); 00031 LorentzTransform cms_boost(-mom_tot.boostVector()); 00032 const double s = sqr(beamproj.sqrtS()); 00033 00034 const bool onresonance = fuzzyEquals(beamproj.sqrtS(), 10.58, 2E-3); 00035 00036 foreach (const Particle& p, ufs.particles()) { 00037 // 3-momentum in CMS frame 00038 const double mom = cms_boost.transform(p.momentum()).vector3().mod(); 00039 // only looking at Xi_c^0 00040 if(abs(p.pdgId()) != 4132 ) continue; 00041 if (onresonance) { 00042 _histOnResonanceA_norm->fill(mom,weight); 00043 _histOnResonanceB_norm->fill(mom,weight); 00044 } 00045 else { 00046 _histOffResonance_norm->fill(mom,s/sqr(10.58)*weight); 00047 } 00048 MSG_DEBUG("mom = " << mom); 00049 // off-resonance cross section 00050 if(checkDecay(p.genParticle())) { 00051 if (onresonance) { 00052 _histOnResonanceA->fill(mom,weight); 00053 _histOnResonanceB->fill(mom,weight); 00054 } 00055 else { 00056 _histOffResonance->fill(mom,s/sqr(10.58)*weight); 00057 _sigma->fill(10.6,weight); 00058 } 00059 } 00060 } 00061 } // analyze 00062 00063 void finalize() { 00064 scale(_histOnResonanceA, crossSection()/femtobarn/sumOfWeights()); 00065 scale(_histOnResonanceB, crossSection()/femtobarn/sumOfWeights()); 00066 scale(_histOffResonance, crossSection()/femtobarn/sumOfWeights()); 00067 scale(_sigma , crossSection()/femtobarn/sumOfWeights()); 00068 normalize(_histOnResonanceA_norm); 00069 normalize(_histOnResonanceB_norm); 00070 normalize(_histOffResonance_norm); 00071 } // finalize 00072 00073 00074 void init() { 00075 addProjection(Beam(), "Beams"); 00076 addProjection(UnstableFinalState(), "UFS"); 00077 00078 _histOnResonanceA = bookHisto1D(1,1,1); 00079 _histOnResonanceB = bookHisto1D(2,1,1); 00080 _histOffResonance = bookHisto1D(2,1,2); 00081 _sigma = bookHisto1D(3,1,1); 00082 _histOnResonanceA_norm = bookHisto1D(4,1,1); 00083 _histOnResonanceB_norm = bookHisto1D(5,1,1); 00084 _histOffResonance_norm = bookHisto1D(5,1,2); 00085 00086 } // init 00087 00088 private: 00089 00090 //@{ 00091 /// Histograms 00092 Histo1DPtr _histOnResonanceA; 00093 Histo1DPtr _histOnResonanceB; 00094 Histo1DPtr _histOffResonance; 00095 Histo1DPtr _sigma ; 00096 Histo1DPtr _histOnResonanceA_norm; 00097 Histo1DPtr _histOnResonanceB_norm; 00098 Histo1DPtr _histOffResonance_norm; 00099 //@} 00100 00101 bool checkDecay(const GenParticle & p) { 00102 unsigned int nstable=0,npip=0,npim=0; 00103 unsigned int nXim=0,nXip=0; 00104 findDecayProducts(p,nstable,npip,npim, 00105 nXip,nXim); 00106 int id = p.pdg_id(); 00107 // Xi_c 00108 if(id==4132) { 00109 if(nstable==2&&nXim==1&&npip==1) return true; 00110 } 00111 else if(id==-4132) { 00112 if(nstable==2&&nXip==1&&npim==1) return true; 00113 } 00114 return false; 00115 } 00116 00117 void findDecayProducts(const GenParticle & p, 00118 unsigned int & nstable, 00119 unsigned int & npip, unsigned int & npim, 00120 unsigned int & nXip, unsigned int & nXim) { 00121 const GenVertex* dv = p.end_vertex(); 00122 for (GenVertex::particles_out_const_iterator 00123 pp = dv->particles_out_const_begin(); 00124 pp != dv->particles_out_const_end(); ++pp) { 00125 int id = (*pp)->pdg_id(); 00126 if(id==3312) { 00127 ++nXim; 00128 ++nstable; 00129 } 00130 else if(id==-3312) { 00131 ++nXip; 00132 ++nstable; 00133 } 00134 else if(id==111||id==221) 00135 ++nstable; 00136 else if((*pp)->end_vertex()) 00137 findDecayProducts(**pp,nstable,npip,npim,nXip,nXim); 00138 else { 00139 if(id!=22) ++nstable; 00140 if (id == 211) ++npip; 00141 else if(id == -211) ++npim; 00142 } 00143 } 00144 } 00145 }; 00146 00147 // The hook for the plugin system 00148 DECLARE_RIVET_PLUGIN(BABAR_2005_S6181155); 00149 00150 } Generated on Fri Dec 21 2012 15:03:39 for The Rivet MC analysis system by ![]() |