DELPHI_1995_S3137023.cc
Go to the documentation of this file.00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.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
00014
00015 class DELPHI_1995_S3137023 : public Analysis {
00016 public:
00017
00018
00019 DELPHI_1995_S3137023()
00020 : Analysis("DELPHI_1995_S3137023")
00021 {
00022 _weightedTotalNumXiMinus = 0;
00023 _weightedTotalNumSigma1385Plus = 0;
00024 }
00025
00026
00027
00028
00029
00030 void init() {
00031 addProjection(Beam(), "Beams");
00032 addProjection(ChargedFinalState(), "FS");
00033 addProjection(UnstableFinalState(), "UFS");
00034
00035 _histXpXiMinus = bookHistogram1D(2, 1, 1);
00036 _histXpSigma1385Plus = bookHistogram1D(3, 1, 1);
00037 }
00038
00039
00040 void analyze(const Event& e) {
00041
00042 const FinalState& fs = applyProjection<FinalState>(e, "FS");
00043 const size_t numParticles = fs.particles().size();
00044
00045
00046 if (numParticles < 2) {
00047 MSG_DEBUG("Failed leptonic event cut");
00048 vetoEvent;
00049 }
00050 MSG_DEBUG("Passed leptonic event cut");
00051
00052
00053 const double weight = e.weight();
00054
00055
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
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:
00072 _histXpSigma1385Plus->fill(p.momentum().vector3().mod()/meanBeamMom, weight);
00073 _weightedTotalNumSigma1385Plus += weight;
00074 break;
00075 }
00076 }
00077
00078 }
00079
00080
00081
00082 void finalize() {
00083 normalize(_histXpXiMinus , _weightedTotalNumXiMinus/sumOfWeights());
00084 normalize(_histXpSigma1385Plus , _weightedTotalNumSigma1385Plus/sumOfWeights());
00085 }
00086
00087
00088
00089
00090 private:
00091
00092
00093
00094
00095 double _weightedTotalNumXiMinus;
00096 double _weightedTotalNumSigma1385Plus;
00097
00098 AIDA::IHistogram1D *_histXpXiMinus;
00099 AIDA::IHistogram1D *_histXpSigma1385Plus;
00100
00101
00102 };
00103
00104
00105
00106
00107 DECLARE_RIVET_PLUGIN(DELPHI_1995_S3137023);
00108
00109 }