ALEPH_2002_S4823664.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Tools/ParticleIdUtils.hh" 00005 #include "Rivet/Projections/Beam.hh" 00006 #include "Rivet/Projections/FinalState.hh" 00007 #include "Rivet/Projections/ChargedFinalState.hh" 00008 #include "Rivet/Projections/UnstableFinalState.hh" 00009 00010 namespace Rivet { 00011 00012 00013 /// @brief ALEPH eta/omega fragmentation function paper 00014 /// @author Peter Richardson 00015 class ALEPH_2002_S4823664 : public Analysis { 00016 public: 00017 00018 /// Constructor 00019 ALEPH_2002_S4823664() 00020 : Analysis("ALEPH_2002_S4823664") 00021 {} 00022 00023 00024 /// @name Analysis methods 00025 //@{ 00026 00027 void init() { 00028 addProjection(Beam(), "Beams"); 00029 addProjection(ChargedFinalState(), "FS"); 00030 addProjection(UnstableFinalState(), "UFS"); 00031 _histXpEta = bookHisto1D( 2, 1, 2); 00032 _histXpOmega = bookHisto1D( 3, 1, 2); 00033 } 00034 00035 00036 void analyze(const Event& e) { 00037 // First, veto on leptonic events by requiring at least 4 charged FS particles 00038 const FinalState& fs = applyProjection<FinalState>(e, "FS"); 00039 const size_t numParticles = fs.particles().size(); 00040 00041 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2. 00042 if (numParticles < 2) { 00043 MSG_DEBUG("Failed leptonic event cut"); 00044 vetoEvent; 00045 } 00046 MSG_DEBUG("Passed leptonic event cut"); 00047 00048 // Get event weight for histo filling 00049 const double weight = e.weight(); 00050 00051 // Get beams and average beam momentum 00052 const ParticlePair& beams = applyProjection<Beam>(e, "Beams").beams(); 00053 const double meanBeamMom = ( beams.first.momentum().vector3().mod() + 00054 beams.second.momentum().vector3().mod() ) / 2.0; 00055 MSG_DEBUG("Avg beam momentum = " << meanBeamMom); 00056 00057 // Final state of unstable particles to get particle spectra 00058 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS"); 00059 00060 foreach (const Particle& p, ufs.particles()) { 00061 if(abs(p.pdgId())==221) { 00062 double xp = p.momentum().vector3().mod()/meanBeamMom; 00063 _histXpEta->fill(xp, weight); 00064 } 00065 else if(abs(p.pdgId())==223) { 00066 double xp = p.momentum().vector3().mod()/meanBeamMom; 00067 _histXpOmega->fill(xp, weight); 00068 } 00069 } 00070 } 00071 00072 00073 /// Finalize 00074 void finalize() { 00075 scale(_histXpEta , 1./sumOfWeights()); 00076 scale(_histXpOmega, 1./sumOfWeights()); 00077 } 00078 00079 //@} 00080 00081 00082 private: 00083 00084 Histo1DPtr _histXpEta; 00085 Histo1DPtr _histXpOmega; 00086 //@} 00087 00088 }; 00089 00090 // The hook for the plugin system 00091 DECLARE_RIVET_PLUGIN(ALEPH_2002_S4823664); 00092 00093 } Generated on Fri Dec 21 2012 15:03:38 for The Rivet MC analysis system by ![]() |