[Rivet-svn] r2106 - in trunk: bin include/Rivet/Math pyext src src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Nov 26 20:02:20 GMT 2009


Author: eike
Date: Thu Nov 26 20:02:20 2009
New Revision: 2106

Log:
fixed ticket #370 (at least for STAR_2006_S6500200.aida)

Modified:
   trunk/bin/rivet
   trunk/include/Rivet/Math/LorentzTrans.hh
   trunk/pyext/lighthisto.py
   trunk/src/Analyses/BELLE_2006_S6265367.cc
   trunk/src/Run.cc

Modified: trunk/bin/rivet
==============================================================================
--- trunk/bin/rivet	Thu Nov 26 19:12:28 2009	(r2105)
+++ trunk/bin/rivet	Thu Nov 26 20:02:20 2009	(r2106)
@@ -390,6 +390,7 @@
         EVTNUM += 1
         logNEvt(EVTNUM, starttime, opts.MAXEVTNUM)
         if not run.processEvent(EVTNUM==1):
+            logging.warn("run.processEvent failed for evt #%i!" % (EVTNUM))
             break
         if RECVD_KILL_SIGNAL is not None:
             break

Modified: trunk/include/Rivet/Math/LorentzTrans.hh
==============================================================================
--- trunk/include/Rivet/Math/LorentzTrans.hh	Thu Nov 26 19:12:28 2009	(r2105)
+++ trunk/include/Rivet/Math/LorentzTrans.hh	Thu Nov 26 20:02:20 2009	(r2106)
@@ -1,6 +1,8 @@
 #ifndef RIVET_MATH_LORENTZTRANS
 #define RIVET_MATH_LORENTZTRANS
 
+#include <iostream>
+
 #include "Rivet/Math/MathHeader.hh"
 #include "Rivet/Math/MathUtils.hh"
 #include "Rivet/Math/MatrixN.hh"

Modified: trunk/pyext/lighthisto.py
==============================================================================
--- trunk/pyext/lighthisto.py	Thu Nov 26 19:12:28 2009	(r2105)
+++ trunk/pyext/lighthisto.py	Thu Nov 26 20:02:20 2009	(r2106)
@@ -460,6 +460,9 @@
 
     def updateHistoHeaders(self, hist):
         headers = self.getHeaders(hist.histopath)
-        hist.title = headers["Title"]
-        hist.xlabel = headers["XLabel"]
-        hist.ylabel = headers["YLabel"]
+        if headers.has_key("Title"):
+            hist.title = headers["Title"]
+        if headers.has_key("XLabel"):
+            hist.xlabel = headers["XLabel"]
+        if headers.has_key("YLabel"):
+            hist.ylabel = headers["YLabel"]

Modified: trunk/src/Analyses/BELLE_2006_S6265367.cc
==============================================================================
--- trunk/src/Analyses/BELLE_2006_S6265367.cc	Thu Nov 26 19:12:28 2009	(r2105)
+++ trunk/src/Analyses/BELLE_2006_S6265367.cc	Thu Nov 26 20:02:20 2009	(r2106)
@@ -1,4 +1,5 @@
 // -*- C++ -*-
+#include <iostream>
 #include "Rivet/Analysis.hh"
 #include "Rivet/RivetAIDA.hh"
 #include "Rivet/Tools/ParticleIdUtils.hh"
@@ -18,7 +19,7 @@
     BELLE_2006_S6265367(): Analysis("BELLE_2006_S6265367")
     {
       setBeams(ELECTRON, POSITRON);
-      setNeedsCrossSection(true);
+      // setNeedsCrossSection(true);
     }
 
 
@@ -33,7 +34,11 @@
       const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS");
 
       const Beam beamproj = applyProjection<Beam>(e, "Beams");
-      //const ParticlePair& beams = beamproj.beams();
+      const ParticlePair& beams = beamproj.beams();
+      FourMomentum mom_tot = beamproj.beams().first.momentum() + 
+                             beamproj.beams().second.momentum();
+      LorentzTransform cms_boost(-mom_tot.boostVector());
+
       const double s = beamproj.sqrtS()*beamproj.sqrtS();
 
       // TODO: implement sqrtS() for asymm. beams in beam projection
@@ -43,11 +48,11 @@
       // Particle masses from PDGlive (online 16. Nov. 2009).
       foreach (const Particle& p, ufs.particles()) {
         // TODO: Data is not corrected for branching fractions.
-        // TODO: transform vectors to e+e- rest frame
 
         double xp = 0.0;
         double mH2 = 0.0;
-        const double mom = p.momentum().vector3().mod();
+        // 3-momentum in CMS frame
+        const double mom = cms_boost.transform(p.momentum()).vector3().mod();
 
         const int PdgId = abs(p.pdgId());
         getLog() << Log::DEBUG << "pdgID = " << PdgId << "  mom = " << mom << endl;
@@ -149,21 +154,21 @@
 
 
     void finalize() {
-      normalize(_histXpDstarplus2D0_R, crossSection());
-      normalize(_histXpD0_R, crossSection());
-      normalize(_histXpDplus_R, crossSection());
-      normalize(_histXpDplus_s_R, crossSection());
-      normalize(_histXpLambda_c_R, crossSection());
-      normalize(_histXpDstarplus2Dplus_R, crossSection());
-      normalize(_histXpDstar0_R, crossSection());
-
-      normalize(_histXpDstarplus2D0_C, crossSection());
-      normalize(_histXpD0_C, crossSection());
-      normalize(_histXpDplus_C, crossSection());
-      normalize(_histXpDplus_s_C, crossSection());
-      normalize(_histXpLambda_c_C, crossSection());
-      normalize(_histXpDstarplus2Dplus_C, crossSection());
-      normalize(_histXpDstar0_C, crossSection());
+      // normalize(_histXpDstarplus2D0_R, crossSection());
+      // normalize(_histXpD0_R, crossSection());
+      // normalize(_histXpDplus_R, crossSection());
+      // normalize(_histXpDplus_s_R, crossSection());
+      // normalize(_histXpLambda_c_R, crossSection());
+      // normalize(_histXpDstarplus2Dplus_R, crossSection());
+      // normalize(_histXpDstar0_R, crossSection());
+
+      // normalize(_histXpDstarplus2D0_C, crossSection());
+      // normalize(_histXpD0_C, crossSection());
+      // normalize(_histXpDplus_C, crossSection());
+      // normalize(_histXpDplus_s_C, crossSection());
+      // normalize(_histXpLambda_c_C, crossSection());
+      // normalize(_histXpDstarplus2Dplus_C, crossSection());
+      // normalize(_histXpDstar0_C, crossSection());
     } // finalize
 
 

Modified: trunk/src/Run.cc
==============================================================================
--- trunk/src/Run.cc	Thu Nov 26 19:12:28 2009	(r2105)
+++ trunk/src/Run.cc	Thu Nov 26 20:02:20 2009	(r2106)
@@ -49,6 +49,7 @@
   bool Run::processEvent(bool firstEvent) {
     GenEvent* evt = new GenEvent();
     if (!m_io->fill_next_event(evt)) {
+      Log::getLog("Rivet.Run") << Log::DEBUG << "m_io->fill_next_event failed!" << endl;
       delete evt;
       return false;
     }


More information about the Rivet-svn mailing list