DELPHI_1995_S3137023.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 DELPHI strange baryon paper 00014 /// @author Hendrik Hoeth 00015 class DELPHI_1995_S3137023 : public Analysis { 00016 public: 00017 00018 /// Constructor 00019 DELPHI_1995_S3137023() 00020 : Analysis("DELPHI_1995_S3137023") 00021 { 00022 _weightedTotalNumXiMinus = 0; 00023 _weightedTotalNumSigma1385Plus = 0; 00024 } 00025 00026 00027 /// @name Analysis methods 00028 //@{ 00029 00030 void init() { 00031 addProjection(Beam(), "Beams"); 00032 addProjection(ChargedFinalState(), "FS"); 00033 addProjection(UnstableFinalState(), "UFS"); 00034 00035 _histXpXiMinus = bookHisto1D(2, 1, 1); 00036 _histXpSigma1385Plus = bookHisto1D(3, 1, 1); 00037 } 00038 00039 00040 void analyze(const Event& e) { 00041 // First, veto on leptonic events by requiring at least 4 charged FS particles 00042 const FinalState& fs = applyProjection<FinalState>(e, "FS"); 00043 const size_t numParticles = fs.particles().size(); 00044 00045 // Even if we only generate hadronic events, we still need a cut on numCharged >= 2. 00046 if (numParticles < 2) { 00047 MSG_DEBUG("Failed leptonic event cut"); 00048 vetoEvent; 00049 } 00050 MSG_DEBUG("Passed leptonic event cut"); 00051 00052 // Get event weight for histo filling 00053 const double weight = e.weight(); 00054 00055 // Get beams and average beam momentum 00056 const ParticlePair& beams = applyProjection<Beam>(e, "Beams").beams(); 00057 const double meanBeamMom = ( beams.first.momentum().vector3().mod() + 00058 beams.second.momentum().vector3().mod() ) / 2.0; 00059 MSG_DEBUG("Avg beam momentum = " << meanBeamMom); 00060 00061 // Final state of unstable particles to get particle spectra 00062 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS"); 00063 00064 foreach (const Particle& p, ufs.particles()) { 00065 const int id = abs(p.pdgId()); 00066 switch (id) { 00067 case 3312: 00068 _histXpXiMinus->fill(p.momentum().vector3().mod()/meanBeamMom, weight); 00069 _weightedTotalNumXiMinus += weight; 00070 break; 00071 case 3114: case 3224: 00072 _histXpSigma1385Plus->fill(p.momentum().vector3().mod()/meanBeamMom, weight); 00073 _weightedTotalNumSigma1385Plus += weight; 00074 break; 00075 } 00076 } 00077 00078 } 00079 00080 00081 /// Finalize 00082 void finalize() { 00083 normalize(_histXpXiMinus , _weightedTotalNumXiMinus/sumOfWeights()); 00084 normalize(_histXpSigma1385Plus , _weightedTotalNumSigma1385Plus/sumOfWeights()); 00085 } 00086 00087 //@} 00088 00089 00090 private: 00091 00092 /// Store the weighted sums of numbers of charged / charged+neutral 00093 /// particles - used to calculate average number of particles for the 00094 /// inclusive single particle distributions' normalisations. 00095 double _weightedTotalNumXiMinus; 00096 double _weightedTotalNumSigma1385Plus; 00097 00098 Histo1DPtr _histXpXiMinus; 00099 Histo1DPtr _histXpSigma1385Plus; 00100 //@} 00101 00102 }; 00103 00104 00105 00106 // The hook for the plugin system 00107 DECLARE_RIVET_PLUGIN(DELPHI_1995_S3137023); 00108 00109 } Generated on Fri Dec 21 2012 15:03:40 for The Rivet MC analysis system by ![]() |