[Rivet-svn] r3414 - in branches/2011-07-aida2yoda: . src/Analyses src/Projections

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Oct 6 14:33:23 BST 2011


Author: hoeth
Date: Thu Oct  6 14:33:22 2011
New Revision: 3414

Log:
merge r3348 and r3350 from trunk

Modified:
   branches/2011-07-aida2yoda/ChangeLog
   branches/2011-07-aida2yoda/src/Analyses/ALEPH_1991_S2435284.cc
   branches/2011-07-aida2yoda/src/Analyses/ALEPH_1996_S3486095.cc
   branches/2011-07-aida2yoda/src/Analyses/ALEPH_2004_S5765862.cc
   branches/2011-07-aida2yoda/src/Analyses/ATLAS_2010_S8894728.cc
   branches/2011-07-aida2yoda/src/Analyses/BELLE_2006_S6265367.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3349578.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_1997_S3541940.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2001_S4751469.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2004_S5839831.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2006_S6653332.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2008_LEADINGJETS.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2008_NOTE_9351.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7540469.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S8095620.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8057893.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8383952.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2010_S8591881_DY.cc
   branches/2011-07-aida2yoda/src/Analyses/CDF_2010_S8591881_QCD.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_1996_S3214044.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2007_S7075677.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7554427.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7662670.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7719523.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7863608.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8202443.cc
   branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8349509.cc
   branches/2011-07-aida2yoda/src/Analyses/DELPHI_1995_S3137023.cc
   branches/2011-07-aida2yoda/src/Analyses/DELPHI_1996_S3430090.cc
   branches/2011-07-aida2yoda/src/Analyses/DELPHI_2002_069_CONF_603.cc
   branches/2011-07-aida2yoda/src/Analyses/DELPHI_2003_WUD_03_11.cc
   branches/2011-07-aida2yoda/src/Analyses/H1_1994_S2919893.cc
   branches/2011-07-aida2yoda/src/Analyses/JADE_1998_S3612880.cc
   branches/2011-07-aida2yoda/src/Analyses/MC_JetAnalysis.cc
   branches/2011-07-aida2yoda/src/Analyses/MC_LEADINGJETS.cc
   branches/2011-07-aida2yoda/src/Analyses/MC_PHOTONJETUE.cc
   branches/2011-07-aida2yoda/src/Analyses/MC_SUSY.cc
   branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc
   branches/2011-07-aida2yoda/src/Analyses/OPAL_1998_S3780481.cc
   branches/2011-07-aida2yoda/src/Analyses/PDG_Hadron_Multiplicities_Ratios.cc
   branches/2011-07-aida2yoda/src/Analyses/SFM_1984_S1178091.cc
   branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6500200.cc
   branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6860818.cc
   branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6870392.cc
   branches/2011-07-aida2yoda/src/Analyses/STAR_2008_S7993412.cc
   branches/2011-07-aida2yoda/src/Analyses/STAR_2009_UE_HELEN.cc
   branches/2011-07-aida2yoda/src/Analyses/TASSO_1990_S2148048.cc
   branches/2011-07-aida2yoda/src/Analyses/UA5_1986_S1583476.cc
   branches/2011-07-aida2yoda/src/Analyses/ZEUS_2001_S4815815.cc
   branches/2011-07-aida2yoda/src/Projections/Beam.cc
   branches/2011-07-aida2yoda/src/Projections/ChargedFinalState.cc
   branches/2011-07-aida2yoda/src/Projections/ClusteredPhotons.cc
   branches/2011-07-aida2yoda/src/Projections/FParameter.cc
   branches/2011-07-aida2yoda/src/Projections/FastJets.cc
   branches/2011-07-aida2yoda/src/Projections/FinalState.cc
   branches/2011-07-aida2yoda/src/Projections/FoxWolframMoments.cc
   branches/2011-07-aida2yoda/src/Projections/HadronicFinalState.cc
   branches/2011-07-aida2yoda/src/Projections/Hemispheres.cc
   branches/2011-07-aida2yoda/src/Projections/InitialQuarks.cc
   branches/2011-07-aida2yoda/src/Projections/JetAlg.cc
   branches/2011-07-aida2yoda/src/Projections/LeadingParticlesFinalState.cc
   branches/2011-07-aida2yoda/src/Projections/MergedFinalState.cc
   branches/2011-07-aida2yoda/src/Projections/NeutralFinalState.cc
   branches/2011-07-aida2yoda/src/Projections/PVertex.cc
   branches/2011-07-aida2yoda/src/Projections/Sphericity.cc
   branches/2011-07-aida2yoda/src/Projections/Thrust.cc
   branches/2011-07-aida2yoda/src/Projections/TriggerCDFRun0Run1.cc
   branches/2011-07-aida2yoda/src/Projections/TriggerCDFRun2.cc
   branches/2011-07-aida2yoda/src/Projections/TriggerUA5.cc
   branches/2011-07-aida2yoda/src/Projections/UnstableFinalState.cc
   branches/2011-07-aida2yoda/src/Projections/VetoedFinalState.cc
   branches/2011-07-aida2yoda/src/Projections/WFinder.cc
   branches/2011-07-aida2yoda/src/Projections/ZFinder.cc

Modified: branches/2011-07-aida2yoda/ChangeLog
==============================================================================
--- branches/2011-07-aida2yoda/ChangeLog	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/ChangeLog	Thu Oct  6 14:33:22 2011	(r3414)
@@ -1,3 +1,8 @@
+2011-09-12  Andy Buckley  <andy at insectnation.org>
+
+	* Removing uses of getLog, cout, cerr, and endl from all standard
+	analyses and projections, except in a very few special cases.
+
 2011-09-10  Andy Buckley  <andy at insectnation.org>
 
 	* Changing the behaviour and interface of the MissingMomentum

Modified: branches/2011-07-aida2yoda/src/Analyses/ALEPH_1991_S2435284.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ALEPH_1991_S2435284.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/ALEPH_1991_S2435284.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -36,7 +36,7 @@
     /// Do the analysis
     void analyze(const Event& event) {
       const Multiplicity& m = applyProjection<Multiplicity>(event, "Mult");
-      getLog() << Log::DEBUG << "Total charged multiplicity = " << m.totalMultiplicity() << endl;
+      MSG_DEBUG("Total charged multiplicity = " << m.totalMultiplicity());
       _histChTot->fill(m.totalMultiplicity(), event.weight());
     }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/ALEPH_1996_S3486095.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ALEPH_1996_S3486095.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/ALEPH_1996_S3486095.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -138,10 +138,10 @@
 
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       if (numParticles < 2) {
-        getLog() << Log::DEBUG << "Failed leptonic event cut" << endl;
+        MSG_DEBUG("Failed leptonic event cut");
         vetoEvent;
       }
-      getLog() << Log::DEBUG << "Passed leptonic event cut" << endl;
+      MSG_DEBUG("Passed leptonic event cut");
 
       // Get event weight for histo filling
       const double weight = e.weight();
@@ -151,17 +151,17 @@
       const ParticlePair& beams = applyProjection<Beam>(e, "Beams").beams();
       const double meanBeamMom = ( beams.first.momentum().vector3().mod() +
                                    beams.second.momentum().vector3().mod() ) / 2.0;
-      getLog() << Log::DEBUG << "Avg beam momentum = " << meanBeamMom << endl;
+      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
 
       // Thrusts
-      getLog() << Log::DEBUG << "Calculating thrust" << endl;
+      MSG_DEBUG("Calculating thrust");
       const Thrust& thrust = applyProjection<Thrust>(e, "Thrust");
       _hist1MinusT->fill(1 - thrust.thrust(), weight);
       _histTMinor->fill(thrust.thrustMinor(), weight);
       _histOblateness->fill(thrust.oblateness(), weight);
 
       // Jets
-      getLog() << Log::DEBUG << "Calculating differential jet rate plots:" << endl;
+      MSG_DEBUG("Calculating differential jet rate plots:");
       const FastJets& durjet = applyProjection<FastJets>(e, "DurhamJets");
       if (durjet.clusterSeq()) {
         double y3 = durjet.clusterSeq()->exclusive_ymerge_max(2);
@@ -169,18 +169,18 @@
       }
 
       // Sphericities
-      getLog() << Log::DEBUG << "Calculating sphericity" << endl;
+      MSG_DEBUG("Calculating sphericity");
       const Sphericity& sphericity = applyProjection<Sphericity>(e, "Sphericity");
       _histSphericity->fill(sphericity.sphericity(), weight);
       _histAplanarity->fill(sphericity.aplanarity(), weight);
 
       // C param
-      getLog() << Log::DEBUG << "Calculating Parisi params" << endl;
+      MSG_DEBUG("Calculating Parisi params");
       const ParisiTensor& parisi = applyProjection<ParisiTensor>(e, "Parisi");
       _histCParam->fill(parisi.C(), weight);
 
       // Hemispheres
-      getLog() << Log::DEBUG << "Calculating hemisphere variables" << endl;
+      MSG_DEBUG("Calculating hemisphere variables");
       const Hemispheres& hemi = applyProjection<Hemispheres>(e, "Hemispheres");
       _histHeavyJetMass->fill(hemi.scaledM2high(), weight);
 
@@ -191,7 +191,7 @@
       double rapt15 = 0.;
       double rapt20 = 0.;
       //int numChParticles = 0;
-      getLog() << Log::DEBUG << "About to iterate over charged FS particles" << endl;
+      MSG_DEBUG("About to iterate over charged FS particles");
       foreach (const Particle& p, fs.particles()) {
         // Get momentum and energy of each particle.
         const Vector3 mom3 = p.momentum().vector3();

Modified: branches/2011-07-aida2yoda/src/Analyses/ALEPH_2004_S5765862.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ALEPH_2004_S5765862.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/ALEPH_2004_S5765862.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -120,7 +120,7 @@
       default:
         _initialisedSpectra=false;
       }
-      if(_initialisedSpectra) {
+      if (_initialisedSpectra) {
         _h_xp = bookHisto1D( 2+offset, 1, 1);
         _h_xi = bookHisto1D(11+offset, 1, 1);
         _h_xe = bookHisto1D(19+offset, 1, 1);
@@ -130,10 +130,9 @@
         _h_rapidityS = bookHisto1D(44+offset, 1, 1);
       }
 
-      if(!_initialisedSpectra && !_initialisedJets) {
-        getLog() << Log::WARNING
-                 << "CMS energy of events sqrt(s) = " << sqrtS()/GeV
-                 <<" doesn't match any available analysis energy ." << endl;
+      if (!_initialisedSpectra && !_initialisedJets) {
+        MSG_WARNING("CoM energy of events sqrt(s) = " << sqrtS()/GeV
+                    << " doesn't match any available analysis energy .");
       }
     }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/ATLAS_2010_S8894728.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ATLAS_2010_S8894728.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/ATLAS_2010_S8894728.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -7,36 +7,6 @@
 namespace Rivet {
 
 
-  namespace {
-
-    inline void _moments_to_stddev(Profile1DPtr moment_profiles[], Scatter2DPtr target_dps) {
-      for (size_t b = 0; b < target_dps->numPoints(); ++b) { // loop over points
-        /// @todo Assuming unit weights here! Should use N_effective = sumW**2/sumW2?
-        const double numentries = moment_profiles[0]->bin(b).numEntries();
-        const double var = moment_profiles[1]->bin(b).mean() - intpow(moment_profiles[0]->bin(b).mean(), 2);
-        const double sd = isZero(var) ? 0 : sqrt(var); //< Numerical safety check
-        target_dps->point(b).setY(sd);
-        if (sd == 0 || numentries < 3) {
-          cerr << "Need at least 3 bin entries and a non-zero central value to calculate "
-               << "an error on standard deviation profiles (bin " << b << ")" << endl;
-          target_dps->point(b).setYErr(0);
-          continue;
-        }
-        // c2(y) = m4(x) - 4 m3(x) m1(x) - m2(x)^2 + 8 m2(x) m1(x)^2 - 4 m1(x)^4
-        const double var_on_var = moment_profiles[3]->bin(b).mean()
-          - 4 * moment_profiles[2]->bin(b).mean() * moment_profiles[0]->bin(b).mean()
-          - intpow(moment_profiles[1]->bin(b).mean(), 2)
-          + 8 * moment_profiles[1]->bin(b).mean() * intpow(moment_profiles[0]->bin(b).mean(), 2)
-          - 4 * intpow(moment_profiles[0]->bin(b).mean(), 4);
-        const double stderr_on_var = sqrt(var_on_var/(numentries-2.0));
-        const double stderr_on_sd = stderr_on_var / (2.0*sd);
-        target_dps->point(b).setYErr(stderr_on_sd);
-      }
-    }
-
-  }
-
-
   class ATLAS_2010_S8894728 : public Analysis {
   public:
 
@@ -282,6 +252,35 @@
 
   private:
 
+
+    inline void _moments_to_stddev(Profile1DPtr moment_profiles[], Scatter2DPtr target_dps) {
+      for (size_t b = 0; b < target_dps->numPoints(); ++b) { // loop over points
+        /// @todo Assuming unit weights here! Should use N_effective = sumW**2/sumW2?
+        const double numentries = moment_profiles[0]->bin(b).numEntries();
+        const double var = moment_profiles[1]->bin(b).mean() - intpow(moment_profiles[0]->bin(b).mean(), 2);
+        const double sd = isZero(var) ? 0 : sqrt(var); //< Numerical safety check
+        target_dps->point(b).setY(sd);
+        if (sd == 0 || numentries < 3) {
+          MSG_WARNING("Need at least 3 bin entries and a non-zero central value to calculate "
+                      << "an error on standard deviation profiles (bin " << b << ")");
+          target_dps->point(b).setYErr(0);
+          continue;
+        }
+        // c2(y) = m4(x) - 4 m3(x) m1(x) - m2(x)^2 + 8 m2(x) m1(x)^2 - 4 m1(x)^4
+        const double var_on_var = moment_profiles[3]->bin(b).mean()
+          - 4 * moment_profiles[2]->bin(b).mean() * moment_profiles[0]->bin(b).mean()
+          - intpow(moment_profiles[1]->bin(b).mean(), 2)
+          + 8 * moment_profiles[1]->bin(b).mean() * intpow(moment_profiles[0]->bin(b).mean(), 2)
+          - 4 * intpow(moment_profiles[0]->bin(b).mean(), 4);
+        const double stderr_on_var = sqrt(var_on_var/(numentries-2.0));
+        const double stderr_on_sd = stderr_on_var / (2.0*sd);
+        target_dps->point(b).setYErr(stderr_on_sd);
+      }
+    }
+
+
+  private:
+
     Profile1DPtr _hist_nch_transverse_500[4];
     Profile1DPtr _hist_nch_toward_500;
     Profile1DPtr _hist_nch_away_500;

Modified: branches/2011-07-aida2yoda/src/Analyses/BELLE_2006_S6265367.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/BELLE_2006_S6265367.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/BELLE_2006_S6265367.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -50,12 +50,12 @@
         const double mom = cms_boost.transform(p.momentum()).vector3().mod();
 
         const int PdgId = abs(p.pdgId());
-        getLog() << Log::DEBUG << "pdgID = " << PdgId << "  mom = " << mom << endl;
+        MSG_DEBUG("pdgID = " << PdgId << "  mom = " << mom);
 
         switch (PdgId) {
 
           case 421:
-            getLog() << Log::DEBUG << "D0 found" << endl;
+            MSG_DEBUG("D0 found");
             mH2 = 3.47763; // 1.86484^2
             xp = mom/sqrt(s/4.0 - mH2);
             if (onresonance)
@@ -65,7 +65,7 @@
             break;
 
           case 411:
-            getLog() << Log::DEBUG << "D+ found" << endl;
+            MSG_DEBUG("D+ found");
             mH2 = 3.49547; // 1.86962^2
             xp = mom/sqrt(s/4.0 - mH2);
             if (onresonance)
@@ -75,7 +75,7 @@
             break;
 
           case 431:
-            getLog() << Log::DEBUG << "D+_s found" << endl;
+            MSG_DEBUG("D+_s found");
             mH2 = 3.87495; // 1.96849^2
             xp = mom/sqrt(s/4.0 - mH2);
             if (onresonance)
@@ -85,7 +85,7 @@
             break;
 
           case 4122:
-            getLog() << Log::DEBUG << "Lambda_c found" << endl;
+            MSG_DEBUG("Lambda_c found");
             mH2 = 5.22780; // 2.28646^2
             xp = mom/sqrt(s/4.0 - mH2);
             if (onresonance)
@@ -95,7 +95,7 @@
             break;
 
           case 413: {
-            getLog() << Log::DEBUG << "D*+ found" << endl;
+            MSG_DEBUG("D*+ found");
             mH2 = 4.04119; // 2.01027^2
             xp = mom/sqrt(s/4.0 - mH2);
 
@@ -127,16 +127,16 @@
               else
                 _histXpDstarplus2Dplus_C->fill(xp, weight);
             } else {
-              getLog() << Log::WARN << "Unexpected D* decay!" << endl;
+              MSG_WARNING("Unexpected D* decay!");
             }
             break;
             }
 
           case 423:
-            getLog() << Log::DEBUG << "D*0 found" << endl;
+            MSG_DEBUG("D*0 found");
             mH2 = 4.02793; // 2.00697**2
             xp = mom/sqrt(s/4.0 - mH2);
-            getLog() << Log::DEBUG << "xp = " << xp << endl;
+            MSG_DEBUG("xp = " << xp);
             if (onresonance)
               _histXpDstar0_R->fill(xp, weight);
             else

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3349578.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3349578.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_1996_S3349578.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -117,7 +117,7 @@
 
 
     void _threeJetAnalysis(const Jets& jets, const double& weight) {
-      getLog() << Log::DEBUG << "3 jet analysis" << std::endl;
+      MSG_DEBUG("3 jet analysis");
 
       double sumEt=0.0;
       FourMomentum jetsystem(0.0, 0.0, 0.0, 0.0);
@@ -174,7 +174,7 @@
 
 
     void _fourJetAnalysis(const Jets& jets, const double& weight) {
-      getLog() << Log::DEBUG << "4 jet analysis" << std::endl;
+      MSG_DEBUG("4 jet analysis");
 
       double sumEt=0.0;
       FourMomentum jetsystem(0.0, 0.0, 0.0, 0.0);
@@ -241,7 +241,7 @@
 
 
     void _fiveJetAnalysis(const Jets& jets, const double& weight) {
-      getLog() << Log::DEBUG << "5 jet analysis" << std::endl;
+      MSG_DEBUG("5 jet analysis");
 
       double sumEt=0.0;
       FourMomentum jetsystem(0.0, 0.0, 0.0, 0.0);
@@ -412,7 +412,7 @@
       double mass2=p.mass2();
       if (mass2>0.0) return sqrt(mass2);
       else if (mass2<-1.0e-5) {
-        getLog() << Log::WARNING << "m2 = " << m2 << ". Assuming m2=0." << endl;
+        MSG_WARNING("m2 = " << m2 << ". Assuming m2=0.");
         return 0.0;
       }
       else return 0.0;

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_1997_S3541940.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_1997_S3541940.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_1997_S3541940.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -236,7 +236,7 @@
       double mass2=p.mass2();
       if (mass2>0.0) return sqrt(mass2);
       else if (mass2<-1.0e-5) {
-        getLog() << Log::WARNING << "m2 = " << m2 << ". Assuming m2=0." << endl;
+        MSG_WARNING("m2 = " << m2 << ". Assuming m2=0.");
         return 0.0;
       }
       else return 0.0;

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2001_S4751469.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2001_S4751469.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2001_S4751469.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -194,13 +194,8 @@
       }
 
       // Log some event details about pT
-      getLog() << Log::DEBUG
-               << "pT [lead; twd, away, trans] = ["
-               << ptLead << "; "
-               << ptSumToward << ", "
-               << ptSumAway << ", "
-               << ptSumTrans << "]"
-               << endl;
+      MSG_DEBUG("pT [lead; twd, away, trans] = [" << ptLead << "; "
+                << ptSumToward << ", " << ptSumAway << ", " << ptSumTrans << "]");
 
       // Update the pT profile histograms
       _ptsumTowardMB->fill(ptLead/GeV, ptSumToward/GeV, weight);
@@ -213,12 +208,8 @@
       _ptsumAwayJ20->fill(ptLead/GeV, ptSumAway/GeV, weight);
 
       // Log some event details about Nch
-      getLog() << Log::DEBUG
-               << "N [twd, away, trans] = ["
-               << numToward << ", "
-               << numTrans << ", "
-               << numAway << "]"
-               << endl;
+      MSG_DEBUG("N [twd, away, trans] = [" << ptLead << "; "
+               << numToward << ", " << numTrans << ", " << numAway << "]");
 
       // Update the N_track profile histograms
       _numTowardMB->fill(ptLead/GeV, numToward, weight);

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2004_S5839831.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2004_S5839831.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2004_S5839831.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -49,9 +49,9 @@
                               const ParticleVector& tracks) {
       const double phiTransPlus = mapAngle0To2Pi(phiLead + PI/2.0);
       const double phiTransMinus = mapAngle0To2Pi(phiLead - PI/2.0);
-      getLog() << Log::DEBUG << "phi_lead = " << phiLead
+      MSG_DEBUG("phi_lead = " << phiLead
                << " -> trans = (" << phiTransPlus
-               << ", " << phiTransMinus << ")" << endl;
+               << ", " << phiTransMinus << ")");
 
       unsigned int numPlus(0), numMinus(0);
       double ptPlus(0), ptMinus(0);
@@ -79,10 +79,10 @@
       rtn.ptMin = (ptPlus >= ptMinus) ? ptMinus : ptPlus;
       rtn.ptDiff = fabs(rtn.ptMax - rtn.ptMin);
 
-      getLog() << Log::DEBUG << "Min cone has " << rtn.numMin << " tracks -> "
-               << "pT_min = " << rtn.ptMin/GeV << " GeV" << endl;
-      getLog() << Log::DEBUG << "Max cone has " << rtn.numMax << " tracks -> "
-               << "pT_max = " << rtn.ptMax/GeV << " GeV" << endl;
+      MSG_DEBUG("Min cone has " << rtn.numMin << " tracks -> "
+               << "pT_min = " << rtn.ptMin/GeV << " GeV");
+      MSG_DEBUG("Max cone has " << rtn.numMax << " tracks -> "
+               << "pT_max = " << rtn.ptMax/GeV << " GeV");
 
       return rtn;
     }
@@ -159,7 +159,7 @@
       const double weight = event.weight();
 
       {
-        getLog() << Log::DEBUG << "Running max/min analysis" << endl;
+        MSG_DEBUG("Running max/min analysis");
         vector<Jet> jets = applyProjection<JetAlg>(event, "Jets").jetsByE();
         if (!jets.empty()) {
           // Leading jet must be in central |eta| < 0.5 region
@@ -167,10 +167,10 @@
           const double etaLead = leadingjet.momentum().eta();
           // Get Et of the leading jet: used to bin histograms
           const double ETlead = leadingjet.EtSum();
-          getLog() << Log::DEBUG << "Leading Et = " << ETlead/GeV << " GeV" << endl;
+          MSG_DEBUG("Leading Et = " << ETlead/GeV << " GeV");
           if (fabs(etaLead) > 0.5 && ETlead < 15*GeV) {
-            getLog() << Log::DEBUG << "Leading jet eta = " << etaLead
-                     << " not in |eta| < 0.5 & pT > 15 GeV" << endl;
+            MSG_DEBUG("Leading jet eta = " << etaLead
+                     << " not in |eta| < 0.5 & pT > 15 GeV");
           } else {
             // Multiplicity & pT distributions for sqrt(s) = 630 GeV, 1800 GeV
             const ParticleVector tracks = applyProjection<FinalState>(event, "TrackFS").particles();
@@ -209,7 +209,7 @@
 
       // Fill min bias total track multiplicity histos
       {
-        getLog() << Log::DEBUG << "Running min bias multiplicity analysis" << endl;
+        MSG_DEBUG("Running min bias multiplicity analysis");
         const ParticleVector mbtracks = applyProjection<FinalState>(event, "MBFS").particles();
         if (fuzzyEquals(sqrtS/GeV, 1800)) {
           _numTracksDbn1800MB->fill(mbtracks.size(), weight);
@@ -236,11 +236,11 @@
       // different set of charged tracks, with |eta| < 1.0, is used here, and all
       // the removed jets must have Et > 5 GeV.
       {
-        getLog() << Log::DEBUG << "Running Swiss Cheese analysis" << endl;
+        MSG_DEBUG("Running Swiss Cheese analysis");
         const ParticleVector cheesetracks = applyProjection<FinalState>(event, "CheeseFS").particles();
         vector<Jet> cheesejets = applyProjection<JetAlg>(event, "Jets").jetsByE();
         if (cheesejets.empty()) {
-          getLog() << Log::DEBUG << "No 'cheese' jets found in event" << endl;
+          MSG_DEBUG("No 'cheese' jets found in event");
           return;
         }
         if (cheesejets.size() > 1 &&
@@ -263,12 +263,12 @@
             // Subtracting 2 leading jets
             const double deltaR1 = deltaR(trackMom, eta1, phi1);
             const double deltaR2 = deltaR(trackMom, eta2, phi2);
-            getLog() << Log::TRACE << "Track vs jet(1): "
+            MSG_TRACE("Track vs jet(1): "
                      << "|(" << trackMom.pseudorapidity() << ", " << trackMom.azimuthalAngle() << ") - "
-                     << "|(" << eta1 << ", " << phi1 << ")| = " << deltaR1 << endl;
-            getLog() << Log::TRACE << "Track vs jet(2): "
+                     << "|(" << eta1 << ", " << phi1 << ")| = " << deltaR1);
+            MSG_TRACE("Track vs jet(2): "
                      << "|(" << trackMom.pseudorapidity() << ", " << trackMom.azimuthalAngle() << ") - "
-                     << "|(" << eta2 << ", " << phi2 << ")| = " << deltaR2 << endl;
+                     << "|(" << eta2 << ", " << phi2 << ")| = " << deltaR2);
             if (deltaR1 > 0.7 && deltaR2 > 0.7) {
               ptSumSub2 += pt;
 
@@ -278,9 +278,9 @@
                 const double eta3 = cheesejets[2].momentum().pseudorapidity();
                 const double phi3 = cheesejets[2].momentum().azimuthalAngle();
                 const double deltaR3 = deltaR(trackMom, eta3, phi3);
-                getLog() << Log::TRACE << "Track vs jet(3): "
+                MSG_TRACE("Track vs jet(3): "
                          << "|(" << trackMom.pseudorapidity() << ", " << trackMom.azimuthalAngle() << ") - "
-                         << "|(" << eta3 << ", " << phi3 << ")| = " << deltaR3 << endl;
+                         << "|(" << eta3 << ", " << phi3 << ")| = " << deltaR3);
                 if (deltaR3 > 0.7) {
                   ptSumSub3 += pt;
                 }

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2005_S6217184.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -77,7 +77,7 @@
         for (size_t ijet = 0; ijet < jsipt.numJets(); ++ijet) {
           for (size_t rbin = 0; rbin < jsipt.numBins(); ++rbin) {
             const double r_rho = jsipt.rBinMid(rbin);
-            // cout << ipt << " " << rbin << " (" << r_rho << ") " << jsipt.diffJetShape(ijet, rbin) << endl;
+            MSG_DEBUG(ipt << " " << rbin << " (" << r_rho << ") " << jsipt.diffJetShape(ijet, rbin));
             /// Bin width Jacobian factor of 0.7/0.1 = 7 in the differential shapes plot
             _profhistRho_pT[ipt]->fill(r_rho/0.7, (0.7/0.1)*jsipt.diffJetShape(ijet, rbin), weight);
             const double r_Psi = jsipt.rBinMax(rbin);

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2006_S6653332.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2006_S6653332.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2006_S6653332.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -102,10 +102,10 @@
 
       // Get jets
       const FastJets& jetpro = applyProjection<FastJets>(event, "Jets");
-      getLog() << Log::DEBUG << "Jet multiplicity before any pT cut = " << jetpro.size() << endl;
+      MSG_DEBUG("Jet multiplicity before any pT cut = " << jetpro.size());
 
       const PseudoJets& jets = jetpro.pseudoJetsByPt();
-      getLog() << Log::DEBUG << "jetlist size = " << jets.size() << endl;
+      MSG_DEBUG("jetlist size = " << jets.size());
 
       int numBJet = 0;
       int numJet  = 0;
@@ -143,9 +143,9 @@
 
     /// Finalize
     void finalize() {
-      getLog() << Log::DEBUG << "Total sum of weights = " << sumOfWeights() << endl;
-      getLog() << Log::DEBUG << "Sum of weights for Z production in mass range = " << _sumWeightsWithZ << endl;
-      getLog() << Log::DEBUG << "Sum of weights for Z+jet production in mass range = " << _sumWeightsWithZJet << endl;
+      MSG_DEBUG("Total sum of weights = " << sumOfWeights());
+      MSG_DEBUG("Sum of weights for Z production in mass range = " << _sumWeightsWithZ);
+      MSG_DEBUG("Sum of weights for Z+jet production in mass range = " << _sumWeightsWithZJet);
 
       scale(_sigmaBJet,crossSection()/sumOfWeights());
       scale(_ratioBJetToZ,1.0/_sumWeightsWithZ);

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_LEADINGJETS.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_LEADINGJETS.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_LEADINGJETS.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -76,24 +76,24 @@
 
       const FinalState& fsj = applyProjection<FinalState>(e, "FSJ");
       if (fsj.particles().size() < 1) {
-        getLog() << Log::DEBUG << "Failed multiplicity cut" << endl;
+        MSG_DEBUG("Failed multiplicity cut");
         vetoEvent;
       }
 
       const Jets& jets = applyProjection<FastJets>(e, "MidpointJets").jetsByPt();
-      getLog() << Log::DEBUG << "Jet multiplicity = " << jets.size() << endl;
+      MSG_DEBUG("Jet multiplicity = " << jets.size());
 
       // We require the leading jet to be within |eta|<2
       if (jets.size() < 1 || fabs(jets[0].momentum().eta()) >= 2) {
-        getLog() << Log::DEBUG << "Failed leading jet cut" << endl;
+        MSG_DEBUG("Failed leading jet cut");
         vetoEvent;
       }
 
       const double jetphi = jets[0].momentum().phi();
       const double jeteta = jets[0].momentum().eta();
       const double jetpT  = jets[0].momentum().pT();
-      getLog() << Log::DEBUG << "Leading jet: pT = " << jetpT
-               << ", eta = " << jeteta << ", phi = " << jetphi << endl;
+      MSG_DEBUG("Leading jet: pT = " << jetpT
+                << ", eta = " << jeteta << ", phi = " << jetphi);
 
       // Get the event weight
       const double weight = e.weight();

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_NOTE_9351.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_NOTE_9351.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_NOTE_9351.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -81,7 +81,7 @@
 
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       if (numParticles < 1) {
-        getLog() << Log::DEBUG << "Failed multiplicity cut" << endl;
+        MSG_DEBUG("Failed multiplicity cut");
         vetoEvent;
       }
 
@@ -92,7 +92,7 @@
       const ParticleVector& leptons = applyProjection<ChargedLeptons>(e, "CL").chargedLeptons();
 
       // We want exactly two leptons of the same flavour.
-      getLog() << Log::DEBUG << "lepton multiplicity = " << leptons.size() << endl;
+      MSG_DEBUG("lepton multiplicity = " << leptons.size());
       if (leptons.size() != 2 || leptons[0].pdgId() != -leptons[1].pdgId() ) vetoEvent;
 
       // Lepton pT > 20 GeV
@@ -101,8 +101,8 @@
       // Lepton pair should have an invariant mass between 70 and 110 and |eta| < 6
       const FourMomentum dilepton = leptons[0].momentum() + leptons[1].momentum();
       if (!inRange(dilepton.mass()/GeV, 70., 110.) || fabs(dilepton.eta()) >= 6) vetoEvent;
-      getLog() << Log::DEBUG << "Dilepton mass = " << mass(dilepton)/GeV << " GeV" << endl;
-      getLog() << Log::DEBUG << "Dilepton pT   = " << pT(dilepton)/GeV << " GeV" << endl;
+      MSG_DEBUG("Dilepton mass = " << mass(dilepton)/GeV << " GeV");
+      MSG_DEBUG("Dilepton pT   = " << pT(dilepton)/GeV << " GeV");
 
       // Calculate the observables
       size_t   numToward(0),     numAway(0);

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7540469.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7540469.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7540469.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -51,8 +51,8 @@
       // Skip if the event is empty
       const FinalState& fs = applyProjection<FinalState>(event, "FS");
       if (fs.empty()) {
-        getLog() << Log::DEBUG << "Skipping event " << event.genEvent().event_number()
-                 << " because no final state pair found " << endl;
+        MSG_DEBUG("Skipping event " << event.genEvent().event_number()
+                 << " because no final state pair found ");
         vetoEvent;
       }
 
@@ -86,8 +86,8 @@
         }
       }
       if (Z_candidates.size() != 1) {
-        getLog() << Log::DEBUG << "Skipping event " << event.genEvent().event_number()
-                 << " because no unique electron pair found " << endl;
+        MSG_DEBUG("Skipping event " << event.genEvent().event_number()
+                 << " because no unique electron pair found ");
         vetoEvent;
       }
 
@@ -131,11 +131,11 @@
           jets_cut.push_back(j);
         }
       }
-      getLog() << Log::DEBUG << "Num jets above 30 GeV = " << jets_cut.size() << endl;
+      MSG_DEBUG("Num jets above 30 GeV = " << jets_cut.size());
 
       // Return if there are no jets:
       if (jets_cut.empty()) {
-        getLog() << Log::DEBUG << "No jets pass cuts " << endl;
+        MSG_DEBUG("No jets pass cuts ");
         vetoEvent;
       }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S7782535.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -49,7 +49,7 @@
     void analyze(const Event& event) {
       const Jets& jets = applyProjection<FastJets>(event, "Jets").jets(_ptedges.front()*GeV, _ptedges.back()*GeV,
                                                                        0.0, 0.7, RAPIDITY);
-      getLog() << Log::DEBUG << "Jet multiplicity before any pT cut = " << jets.size() << endl;
+      MSG_DEBUG("Jet multiplicity before any pT cut = " << jets.size());
       if (jets.size() == 0) {
         MSG_DEBUG("No jets found in required pT range");
         vetoEvent;

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S8095620.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S8095620.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2008_S8095620.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -99,10 +99,10 @@
 
       // Get jets
       const FastJets& jetpro = applyProjection<FastJets>(event, "Jets");
-      getLog() << Log::DEBUG << "Jet multiplicity before any pT cut = " << jetpro.size() << endl;
+      MSG_DEBUG("Jet multiplicity before any pT cut = " << jetpro.size());
 
       const PseudoJets& jets = jetpro.pseudoJetsByPt();
-      getLog() << Log::DEBUG << "jetlist size = " << jets.size() << endl;
+      MSG_DEBUG("jetlist size = " << jets.size());
 
       int numBJet = 0;
       int numJet  = 0;

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8057893.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8057893.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8057893.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -32,9 +32,9 @@
     void CDF_2009_S8057893::analyze(const Event& event) {
       const FastJets& jetpro = applyProjection<FastJets>(e, "MidpointJets");
       const Jets& jets = jetpro.jetsByPt();
-      getLog() << Log::DEBUG << "Jet multiplicity = " << jets.size() << endl;
+      MSG_DEBUG("Jet multiplicity = " << jets.size());
       if (jets.size() < 1) {
-        getLog() << Log::DEBUG << "Failed jet multiplicity cut" << endl;
+        MSG_DEBUG("Failed jet multiplicity cut");
         vetoEvent;
       }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8383952.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8383952.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2009_S8383952.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -59,7 +59,7 @@
         _h_xs->fill(1960.0, weight);
       }
       else {
-        getLog() << Log::DEBUG << "no unique lepton pair found." << endl;
+        MSG_DEBUG("no unique lepton pair found.");
       }
 
     }

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2010_S8591881_DY.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2010_S8591881_DY.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2010_S8591881_DY.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -75,7 +75,7 @@
 
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       if (numParticles < 1) {
-        getLog() << Log::DEBUG << "Failed multiplicity cut" << endl;
+        MSG_DEBUG("Failed multiplicity cut");
         vetoEvent;
       }
 
@@ -86,7 +86,7 @@
       const ParticleVector& leptons = applyProjection<ChargedLeptons>(e, "CL").chargedLeptons();
 
       // We want exactly two leptons of the same flavour.
-      getLog() << Log::DEBUG << "lepton multiplicity = " << leptons.size() << endl;
+      MSG_DEBUG("lepton multiplicity = " << leptons.size());
       if (leptons.size() != 2 || leptons[0].pdgId() != -leptons[1].pdgId() ) vetoEvent;
 
       // Lepton pT > 20 GeV
@@ -95,8 +95,8 @@
       // Lepton pair should have an invariant mass between 70 and 110 and |eta| < 6
       const FourMomentum dilepton = leptons[0].momentum() + leptons[1].momentum();
       if (!inRange(dilepton.mass()/GeV, 70., 110.) || fabs(dilepton.eta()) >= 6) vetoEvent;
-      getLog() << Log::DEBUG << "Dilepton mass = " << mass(dilepton)/GeV << " GeV" << endl;
-      getLog() << Log::DEBUG << "Dilepton pT   = " << pT(dilepton)/GeV << " GeV" << endl;
+      MSG_DEBUG("Dilepton mass = " << mass(dilepton)/GeV << " GeV");
+      MSG_DEBUG("Dilepton pT   = " << pT(dilepton)/GeV << " GeV");
 
       // Calculate the observables
       size_t   numToward(0),     numAway(0);

Modified: branches/2011-07-aida2yoda/src/Analyses/CDF_2010_S8591881_QCD.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/CDF_2010_S8591881_QCD.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/CDF_2010_S8591881_QCD.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -73,24 +73,24 @@
 
       const FinalState& fsj = applyProjection<FinalState>(e, "FSJ");
       if (fsj.particles().size() < 1) {
-        getLog() << Log::DEBUG << "Failed multiplicity cut" << endl;
+        MSG_DEBUG("Failed multiplicity cut");
         vetoEvent;
       }
 
       const Jets& jets = applyProjection<FastJets>(e, "MidpointJets").jetsByPt();
-      getLog() << Log::DEBUG << "Jet multiplicity = " << jets.size() << endl;
+      MSG_DEBUG("Jet multiplicity = " << jets.size());
 
       // We require the leading jet to be within |eta|<2
       if (jets.size() < 1 || fabs(jets[0].momentum().eta()) >= 2) {
-        getLog() << Log::DEBUG << "Failed leading jet cut" << endl;
+        MSG_DEBUG("Failed leading jet cut");
         vetoEvent;
       }
 
       const double jetphi = jets[0].momentum().phi();
       const double jeteta = jets[0].momentum().eta();
       const double jetpT  = jets[0].momentum().pT();
-      getLog() << Log::DEBUG << "Leading jet: pT = " << jetpT
-               << ", eta = " << jeteta << ", phi = " << jetphi << endl;
+      MSG_DEBUG("Leading jet: pT = " << jetpT
+                << ", eta = " << jeteta << ", phi = " << jetphi);
 
       // Get the event weight
       const double weight = e.weight();

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_1996_S3214044.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_1996_S3214044.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_1996_S3214044.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -227,7 +227,7 @@
       double mass2=p.mass2();
       if (mass2>0.0) return sqrt(mass2);
       else if (mass2<-1.0e-5) {
-        getLog() << Log::WARNING << "m2 = " << m2 << ". Assuming m2=0." << endl;
+        MSG_WARNING("m2 = " << m2 << ". Assuming m2=0.");
         return 0.0;
       }
       else return 0.0;

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2001_S4674421.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -77,7 +77,7 @@
         if (inRange(mass/GeV, 75.0, 105.0)) {
           ++Zcount;
           _eventsFilledZ += weight;
-          //getLog() << Log::DEBUG << "Z #" << Zcount << " pmom.pT() = " << pmom.pT()/GeV << " GeV" << endl;
+          //MSG_DEBUG("Z #" << Zcount << " pmom.pT() = " << pmom.pT()/GeV << " GeV");
           _h_dsigdpt_z->fill(pmom.pT()/GeV, weight);
         }
       } else {
@@ -121,7 +121,7 @@
 
       // Divide and scale ratio histos
       if (xSecW == 0 || wpt_integral == 0 || xSecZ == 0 || zpt_integral == 0) {
-        getLog() << Log::WARN << "Not filling ratio plot because input histos are empty" << endl;
+        MSG_WARNING("Not filling ratio plot because input histos are empty");
       } else {
         // Scale factor converts event counts to cross-sections, and inverts the
         // branching ratios since only one decay channel has been analysed for each boson.

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2007_S7075677.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2007_S7075677.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2007_S7075677.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -48,7 +48,7 @@
         }
       }
       else {
-        getLog() << Log::DEBUG << "No unique lepton pair found." << endl;
+        MSG_DEBUG("No unique lepton pair found.");
       }
     }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7554427.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7554427.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7554427.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -52,7 +52,7 @@
         }
       }
       else {
-        getLog() << Log::DEBUG << "no unique lepton pair found." << endl;
+        MSG_DEBUG("No unique lepton pair found.");
       }
 
     }

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7662670.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7662670.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7662670.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -62,7 +62,7 @@
       // Skip if the event is empty
       const FinalState& fs = applyProjection<FinalState>(event, "FS");
       if (fs.empty()) {
-        getLog() << Log::DEBUG << "Empty event!" << endl;
+        MSG_DEBUG("Empty event!");
         vetoEvent;
       }
 
@@ -72,8 +72,8 @@
       foreach (const Jet& j, jetpro.jets(50.0*GeV)) {
         const double pt = j.momentum().pT();
         const double y = fabs(j.momentum().rapidity());
-        getLog() << Log::TRACE << "Filling histos: pT = " << pt/GeV
-            << ", |y| = " << y << endl;
+        MSG_TRACE("Filling histos: pT = " << pt/GeV
+            << ", |y| = " << y);
         if (y < 0.4) {
           _h_dsigdptdy_y00_04->fill(pt/GeV, weight);
         } else if (y < 0.8) {

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7719523.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7719523.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7719523.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -88,7 +88,7 @@
           econe += p.momentum().E();
           // Veto as soon as E_cone gets larger
           if (econe/egamma > 0.07) {
-            getLog() << Log::DEBUG << "Vetoing event because photon is insufficiently isolated" << endl;
+            MSG_DEBUG("Vetoing event because photon is insufficiently isolated");
             vetoEvent;
           }
         }
@@ -108,8 +108,8 @@
       // Veto if leading jet is outside plotted rapidity regions
       const double abs_y1 = fabs(leadingJet.rapidity());
       if (inRange(abs_y1, 0.8, 1.5) || abs_y1 > 2.5) {
-        getLog() << Log::DEBUG << "Leading jet falls outside acceptance range; |y1| = "
-                 << abs_y1 << endl;
+        MSG_DEBUG("Leading jet falls outside acceptance range; |y1| = "
+                  << abs_y1);
         vetoEvent;
       }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7837160.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -50,7 +50,7 @@
     void analyze(const Event & event) {
       const WFinder& wf = applyProjection<WFinder>(event, "WFe");
       if (wf.bosons().size() == 0) {
-        getLog() << Log::DEBUG << "No W candidates found: vetoing" << endl;
+        MSG_DEBUG("No W candidates found: vetoing");
         vetoEvent;
       }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7863608.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7863608.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2008_S7863608.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -68,8 +68,8 @@
 
         // Return if there are no jets:
         if(jets_cut.size()<1) {
-          getLog() << Log::DEBUG << "Skipping event " << e.genEvent().event_number()
-                   << " because no jets pass cuts " << endl;
+          MSG_DEBUG("Skipping event " << e.genEvent().event_number()
+                    << " because no jets pass cuts ");
           vetoEvent;
         }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8202443.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8202443.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8202443.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -86,7 +86,7 @@
         }
       }
       else {
-        getLog() << Log::DEBUG << "no unique lepton pair found." << endl;
+        MSG_DEBUG("no unique lepton pair found.");
       }
 
 
@@ -114,7 +114,7 @@
         }
       }
       else {
-        getLog() << Log::DEBUG << "no unique lepton pair found." << endl;
+        MSG_DEBUG("no unique lepton pair found.");
         vetoEvent;
       }
     }

Modified: branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8349509.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8349509.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/D0_2009_S8349509.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -82,8 +82,8 @@
 
         // Return if there are no jets:
         if (jets.size() < 1) {
-          getLog() << Log::DEBUG << "Skipping event " << event.genEvent().event_number()
-                   << " because no jets pass cuts " << endl;
+          MSG_DEBUG("Skipping event " << event.genEvent().event_number()
+                    << " because no jets pass cuts ");
           vetoEvent;
         }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/DELPHI_1995_S3137023.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/DELPHI_1995_S3137023.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/DELPHI_1995_S3137023.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -44,10 +44,10 @@
 
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       if (numParticles < 2) {
-        getLog() << Log::DEBUG << "Failed leptonic event cut" << endl;
+        MSG_DEBUG("Failed leptonic event cut");
         vetoEvent;
       }
-      getLog() << Log::DEBUG << "Passed leptonic event cut" << endl;
+      MSG_DEBUG("Passed leptonic event cut");
 
       // Get event weight for histo filling
       const double weight = e.weight();
@@ -56,7 +56,7 @@
       const ParticlePair& beams = applyProjection<Beam>(e, "Beams").beams();
       const double meanBeamMom = ( beams.first.momentum().vector3().mod() +
                                    beams.second.momentum().vector3().mod() ) / 2.0;
-      getLog() << Log::DEBUG << "Avg beam momentum = " << meanBeamMom << endl;
+      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
 
       // Final state of unstable particles to get particle spectra
       const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS");

Modified: branches/2011-07-aida2yoda/src/Analyses/DELPHI_1996_S3430090.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/DELPHI_1996_S3430090.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/DELPHI_1996_S3430090.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -151,10 +151,10 @@
       const size_t numParticles = fs.particles().size();
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       if (numParticles < 2) {
-        getLog() << Log::DEBUG << "Failed leptonic event cut" << endl;
+        MSG_DEBUG("Failed leptonic event cut");
         vetoEvent;
       }
-      getLog() << Log::DEBUG << "Passed leptonic event cut" << endl;
+      MSG_DEBUG("Passed leptonic event cut");
       const double weight = e.weight();
       _passedCutWeightSum += weight;
       _weightedTotalPartNum += numParticles * weight;
@@ -163,10 +163,10 @@
       const ParticlePair& beams = applyProjection<Beam>(e, "Beams").beams();
       const double meanBeamMom = ( beams.first.momentum().vector3().mod() +
                                    beams.second.momentum().vector3().mod() ) / 2.0;
-      getLog() << Log::DEBUG << "Avg beam momentum = " << meanBeamMom << endl;
+      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
 
       // Thrusts
-      getLog() << Log::DEBUG << "Calculating thrust" << endl;
+      MSG_DEBUG("Calculating thrust");
       const Thrust& thrust = applyProjection<Thrust>(e, "Thrust");
       _hist1MinusT->fill(1 - thrust.thrust(), weight);
       _histTMajor->fill(thrust.thrustMajor(), weight);
@@ -193,20 +193,20 @@
       }
 
       // Sphericities
-      getLog() << Log::DEBUG << "Calculating sphericity" << endl;
+      MSG_DEBUG("Calculating sphericity");
       const Sphericity& sphericity = applyProjection<Sphericity>(e, "Sphericity");
       _histSphericity->fill(sphericity.sphericity(), weight);
       _histAplanarity->fill(sphericity.aplanarity(), weight);
       _histPlanarity->fill(sphericity.planarity(), weight);
 
       // C & D params
-      getLog() << Log::DEBUG << "Calculating Parisi params" << endl;
+      MSG_DEBUG("Calculating Parisi params");
       const ParisiTensor& parisi = applyProjection<ParisiTensor>(e, "Parisi");
       _histCParam->fill(parisi.C(), weight);
       _histDParam->fill(parisi.D(), weight);
 
       // Hemispheres
-      getLog() << Log::DEBUG << "Calculating hemisphere variables" << endl;
+      MSG_DEBUG("Calculating hemisphere variables");
       const Hemispheres& hemi = applyProjection<Hemispheres>(e, "Hemispheres");
       _histHemiMassH->fill(hemi.scaledM2high(), weight);
       _histHemiMassL->fill(hemi.scaledM2low(), weight);
@@ -219,7 +219,7 @@
       // Iterate over all the charged final state particles.
       double Evis = 0.0;
       double Evis2 = 0.0;
-      getLog() << Log::DEBUG << "About to iterate over charged FS particles" << endl;
+      MSG_DEBUG("About to iterate over charged FS particles");
       foreach (const Particle& p, fs.particles()) {
         // Get momentum and energy of each particle.
         const Vector3 mom3 = p.momentum().vector3();
@@ -253,7 +253,7 @@
         const double rapidityS = 0.5 * std::log((energy + momS) / (energy - momS));
         _histRapidityT->fill(rapidityT, weight);
         _histRapidityS->fill(rapidityS, weight);
-        //cerr << fabs(rapidityT) << " " << scaledMom/GeV << endl;
+        MSG_TRACE(fabs(rapidityT) << " " << scaledMom/GeV);
       }
       Evis2 = Evis*Evis;
 

Modified: branches/2011-07-aida2yoda/src/Analyses/DELPHI_2002_069_CONF_603.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/DELPHI_2002_069_CONF_603.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/DELPHI_2002_069_CONF_603.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -47,10 +47,10 @@
 
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       if (numParticles < 2) {
-        getLog() << Log::DEBUG << "Failed ncharged cut" << endl;
+        MSG_DEBUG("Failed ncharged cut");
         vetoEvent;
       }
-      getLog() << Log::DEBUG << "Passed ncharged cut" << endl;
+      MSG_DEBUG("Passed ncharged cut");
 
       // Get event weight for histo filling
       const double weight = e.weight();
@@ -59,7 +59,7 @@
       const ParticlePair& beams = applyProjection<Beam>(e, "Beams").beams();
       const double meanBeamMom = ( beams.first.momentum().vector3().mod() +
                                    beams.second.momentum().vector3().mod() ) / 2.0;
-      getLog() << Log::DEBUG << "Avg beam momentum = " << meanBeamMom << endl;
+      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
 
 
       foreach (const GenParticle* p, particles(e.genEvent())) {

Modified: branches/2011-07-aida2yoda/src/Analyses/DELPHI_2003_WUD_03_11.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/DELPHI_2003_WUD_03_11.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/DELPHI_2003_WUD_03_11.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -113,10 +113,10 @@
 
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       if (numParticles < 2) {
-        getLog() << Log::DEBUG << "Failed multiplicity cut" << endl;
+        MSG_DEBUG("Failed multiplicity cut");
         vetoEvent;
       }
-      getLog() << Log::DEBUG << "Passed multiplicity cut" << endl;
+      MSG_DEBUG("Passed multiplicity cut");
 
       // Get event weight for histo filling
       const double weight = e.weight();
@@ -162,8 +162,8 @@
       // Normalize inclusive single particle distributions to the average number
       // of charged particles per event.
 
-      getLog() << Log::INFO << "Number of Durham jets = " << _numdurjets << endl;
-      getLog() << Log::INFO << "Number of Jade jets   = " << _numjadejets << endl;
+      MSG_INFO("Number of Durham jets = " << _numdurjets);
+      MSG_INFO("Number of Jade jets   = " << _numjadejets);
 
       /// @todo Scale rather than normalize?
       normalize(_histDurhamBZ      , 0.0785);

Modified: branches/2011-07-aida2yoda/src/Analyses/H1_1994_S2919893.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/H1_1994_S2919893.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/H1_1994_S2919893.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -70,7 +70,8 @@
 
       // Apply the cuts
       // Lepton energy and angle, w2 and forward energy
-      getLog()<<Log::DEBUG<<"enel/GeV = "<<enel/GeV<<", thel = "<<thel<<", w2 = "<<w2<<", efwd/GeV = "<<efwd/GeV<<std::endl;
+      MSG_DEBUG("enel/GeV = " << enel/GeV << ", thel = " << thel
+                << ", w2 = " << w2 << ", efwd/GeV = " << efwd/GeV);
       bool cut = enel/GeV > 14. && thel > 157. && thel < 172.5 && w2 >= 3000. && efwd/GeV > 0.5;
       if (!cut) vetoEvent;
 

Modified: branches/2011-07-aida2yoda/src/Analyses/JADE_1998_S3612880.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/JADE_1998_S3612880.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/JADE_1998_S3612880.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -77,7 +77,7 @@
       const Vector3 & thrustAxis = thrust.thrustAxis ();
       double theta = thrustAxis.theta();
       if ( fabs(cos(theta)) >= 0.8 ) {
-        getLog() << Log::DEBUG << "Failed thrust angle cut: " << fabs(cos(theta)) << endl;
+        MSG_DEBUG("Failed thrust angle cut: " << fabs(cos(theta)));
         vetoEvent;
       }
       // TODO Evis, pmiss, pbal

Modified: branches/2011-07-aida2yoda/src/Analyses/MC_JetAnalysis.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/MC_JetAnalysis.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/MC_JetAnalysis.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -130,8 +130,8 @@
       double m2_i = jets[i].momentum().mass2();
       if (m2_i < 0) {
         if (m2_i < -1e-4) {
-          getLog() << Log::WARNING << "Jet mass2 is negative: " << m2_i << " GeV^2. "
-                   << "Truncating to 0.0, assuming numerical precision is to blame." << endl;
+          MSG_WARNING("Jet mass2 is negative: " << m2_i << " GeV^2. "
+                      << "Truncating to 0.0, assuming numerical precision is to blame.");
         }
         m2_i = 0.0;
       }

Modified: branches/2011-07-aida2yoda/src/Analyses/MC_LEADINGJETS.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/MC_LEADINGJETS.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/MC_LEADINGJETS.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -50,25 +50,25 @@
 
       const FinalState& fsj = applyProjection<FinalState>(e, "FSJ");
       if (fsj.particles().empty()) {
-        getLog() << Log::DEBUG << "Failed multiplicity cut" << endl;
+        MSG_DEBUG("Failed multiplicity cut");
         vetoEvent;
       }
 
       const FastJets& jetpro = applyProjection<FastJets>(e, "Jets");
       const Jets jets = jetpro.jetsByPt();
-      getLog() << Log::DEBUG << "Jet multiplicity = " << jets.size() << endl;
+      MSG_DEBUG("Jet multiplicity = " << jets.size());
 
       // Require the leading jet to be within |eta| < 2
       if (jets.size() < 1 || fabs(jets[0].momentum().pseudorapidity()) > 2) {
-        getLog() << Log::DEBUG << "Failed jet cut" << endl;
+        MSG_DEBUG("Failed jet cut");
         vetoEvent;
       }
 
       const double jetphi = jets[0].momentum().phi();
       const double jetpT  = jets[0].momentum().pT();
-      getLog() << Log::DEBUG << "Leading jet: pT = " << jetpT/GeV << " GeV"
-               << ", eta = " << jets[0].momentum().pseudorapidity()
-               << ", phi = " << jetphi << endl;
+      MSG_DEBUG("Leading jet: pT = " << jetpT/GeV << " GeV"
+                << ", eta = " << jets[0].momentum().pseudorapidity()
+                << ", phi = " << jetphi);
 
       // Get the event weight
       const double weight = e.weight();

Modified: branches/2011-07-aida2yoda/src/Analyses/MC_PHOTONJETUE.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/MC_PHOTONJETUE.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/MC_PHOTONJETUE.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -68,9 +68,9 @@
 
       // Get jets
       const Jets jets = applyProjection<FastJets>(evt, "Jets").jetsByPt();
-      getLog() << Log::DEBUG << "Jet multiplicity = " << jets.size() << endl;
+      MSG_DEBUG("Jet multiplicity = " << jets.size());
       if (jets.size() < 1) {
-        getLog() << Log::DEBUG << "No jets found" << endl;
+        MSG_DEBUG("No jets found");
         vetoEvent;
       }
 
@@ -79,20 +79,20 @@
       const double jeteta = pjet.eta();
       const double jetphi = pjet.phi();
       const double jetpT  = pjet.pT();
-      getLog() << Log::DEBUG << "Leading jet: pT = " << jetpT/GeV << " GeV"
+      MSG_DEBUG("Leading jet: pT = " << jetpT/GeV << " GeV"
                << ", eta = " << jeteta
-               << ", phi = " << jetphi << endl;
+               << ", phi = " << jetphi);
 
       // Require the leading jet to be within |eta| < 2
       if (fabs(jeteta) > 2) {
-        getLog() << Log::DEBUG << "Failed leading jet eta cut" << endl;
+        MSG_DEBUG("Failed leading jet eta cut");
         vetoEvent;
       }
 
       // Get the leading photon
       const FinalState& photonfs = applyProjection<FinalState>(evt, "Photons");
       if (photonfs.size() < 1) {
-        getLog() << Log::DEBUG << "No hard photons found" << endl;
+        MSG_DEBUG("No hard photons found");
         vetoEvent;
       }
       const FourMomentum pgamma = photonfs.particlesByPt().front().momentum();
@@ -106,7 +106,7 @@
         }
       }
       if (!isolated) {
-        getLog() << Log::DEBUG << "Leading photon is not isolated from jets" << endl;
+        MSG_DEBUG("Leading photon is not isolated from jets");
         vetoEvent;
       }
 
@@ -114,9 +114,9 @@
       const double gammaeta = pgamma.eta();
       const double gammaphi = pgamma.phi();
       const double gammapT  = pgamma.pT();
-      getLog() << Log::DEBUG << "Leading photon: pT = " << gammapT/GeV << " GeV"
-               << ", eta = " << gammaeta
-               << ", phi = " << gammaphi << endl;
+      MSG_DEBUG("Leading photon: pT = " << gammapT/GeV << " GeV"
+                << ", eta = " << gammaeta
+                << ", phi = " << gammaphi);
 
       // Get the event weight
       const double weight = evt.weight();

Modified: branches/2011-07-aida2yoda/src/Analyses/MC_SUSY.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/MC_SUSY.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/MC_SUSY.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -110,7 +110,7 @@
     void analyze(const Event& evt) {
       const FinalState& tracks = applyProjection<FinalState>(evt, "Tracks");
       if (tracks.particles().empty()) {
-        getLog() << Log::DEBUG << "Failed multiplicity cut" << endl;
+        MSG_DEBUG("Failed multiplicity cut");
         vetoEvent;
       }
 
@@ -129,7 +129,7 @@
       // Get jets and fill jet histos
       const FastJets& jetpro = applyProjection<FastJets>(evt, "Jets");
       const Jets jets = jetpro.jetsByPt();
-      getLog() << Log::DEBUG << "Jet multiplicity = " << jets.size() << endl;
+      MSG_DEBUG("Jet multiplicity = " << jets.size());
       _hist_n_jet->fill(jets.size(), weight);
       foreach (const Jet& j, jets) {
         const FourMomentum& pj = j.momentum();

Modified: branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/OPAL_1993_S2692198.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -32,10 +32,10 @@
 //       const size_t numParticles = cfs.particles().size();
 
 //       if (numParticles < 4) {
-//         getLog() << Log::DEBUG << "Failed ncharged cut" << endl;
+//         MSG_DEBUG("Failed ncharged cut");
 //         vetoEvent;
 //       }
-//       getLog() << Log::DEBUG << "Passed ncharged cut" << endl;
+//       MSG_DEBUG("Passed ncharged cut");
 
       // Get event weight for histo filling
       const double weight = e.weight();

Modified: branches/2011-07-aida2yoda/src/Analyses/OPAL_1998_S3780481.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/OPAL_1998_S3780481.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/OPAL_1998_S3780481.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -37,10 +37,10 @@
 
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       if (numParticles < 2) {
-        getLog() << Log::DEBUG << "Failed ncharged cut" << endl;
+        MSG_DEBUG("Failed ncharged cut");
         vetoEvent;
       }
-      getLog() << Log::DEBUG << "Passed ncharged cut" << endl;
+      MSG_DEBUG("Passed ncharged cut");
 
       // Get event weight for histo filling
       const double weight = e.weight();
@@ -50,7 +50,7 @@
       const ParticlePair& beams = applyProjection<Beam>(e, "Beams").beams();
       const double meanBeamMom = ( beams.first.momentum().vector3().mod() +
                                    beams.second.momentum().vector3().mod() ) / 2.0;
-      getLog() << Log::DEBUG << "Avg beam momentum = " << meanBeamMom << endl;
+      MSG_DEBUG("Avg beam momentum = " << meanBeamMom);
 
       int flavour = 0;
       const InitialQuarks& iqf = applyProjection<InitialQuarks>(e, "IQF");

Modified: branches/2011-07-aida2yoda/src/Analyses/PDG_Hadron_Multiplicities_Ratios.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/PDG_Hadron_Multiplicities_Ratios.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/PDG_Hadron_Multiplicities_Ratios.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -31,15 +31,15 @@
 
       // Even if we only generate hadronic events, we still need a cut on numCharged >= 2.
       if (numParticles < 2) {
-        getLog() << Log::DEBUG << "Failed leptonic event cut" << endl;
+        MSG_DEBUG("Failed leptonic event cut");
         vetoEvent;
       }
-      getLog() << Log::DEBUG << "Passed leptonic event cut" << endl;
+      MSG_DEBUG("Passed leptonic event cut");
 
       // Get event weight for histo filling
       const double weight = e.weight();
 
-      getLog() << Log::DEBUG << "sqrt(S) = " << sqrtS()/GeV << " GeV" << endl;
+      MSG_DEBUG("sqrt(S) = " << sqrtS()/GeV << " GeV");
 
       // Final state of unstable particles to get particle spectra
       const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS");

Modified: branches/2011-07-aida2yoda/src/Analyses/SFM_1984_S1178091.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/SFM_1984_S1178091.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/SFM_1984_S1178091.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -70,10 +70,9 @@
         if (eta > 0.0) n_right += 1;
         else if (eta < 0.0) n_left += 1;
       }
-      getLog() << Log::DEBUG
-               << "N_left: " << n_left << ", "
-               << "N_right: " << n_right << ", "
-               << "N_large_x: " << n_large_x << endl;
+      MSG_DEBUG("N_left: " << n_left << ", "
+                << "N_right: " << n_right << ", "
+                << "N_large_x: " << n_large_x);
 
       // Not sure about the "=="!
       // @todo Not sure about the "== 1", the paper says no charged particle

Modified: branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6500200.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6500200.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6500200.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -45,7 +45,7 @@
       const ChargedFinalState& bbc1 = applyProjection<ChargedFinalState>(event, "BBC1");
       const ChargedFinalState& bbc2 = applyProjection<ChargedFinalState>(event, "BBC2");
       if (bbc1.size()<1 || bbc2.size()<1) {
-        getLog() << Log::DEBUG << "Failed beam-beam-counter trigger" << std::endl;
+        MSG_DEBUG("Failed beam-beam-counter trigger");
         vetoEvent;
       }
 
@@ -95,10 +95,11 @@
       scale(_h_pT_piminus,    1./(2*M_PI*_sumWeightSelected));
       scale(_h_pT_proton,     1./(2*M_PI*_sumWeightSelected));
       scale(_h_pT_antiproton, 1./(2*M_PI*_sumWeightSelected));
-      getLog() << Log::DEBUG << "sumOfWeights()     = " << sumOfWeights() << std::endl;
-      getLog() << Log::DEBUG << "_sumWeightSelected = " << _sumWeightSelected << std::endl;
+      MSG_DEBUG("sumOfWeights()     = " << sumOfWeights());
+      MSG_DEBUG("_sumWeightSelected = " << _sumWeightSelected);
     }
 
+
   private:
 
     double _sumWeightSelected;

Modified: branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6860818.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6860818.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6860818.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -54,7 +54,7 @@
       const ChargedFinalState& bbc1 = applyProjection<ChargedFinalState>(event, "BBC1");
       const ChargedFinalState& bbc2 = applyProjection<ChargedFinalState>(event, "BBC2");
       if (bbc1.size()<1 || bbc2.size()<1) {
-        getLog() << Log::DEBUG << "Failed beam-beam-counter trigger" << std::endl;
+        MSG_DEBUG("Failed beam-beam-counter trigger");
         vetoEvent;
       }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6870392.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6870392.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/STAR_2006_S6870392.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -42,8 +42,8 @@
       // Skip if the event is empty
       const FinalState& fs = applyProjection<FinalState>(event, "FS");
       if (fs.empty()) {
-        getLog() << Log::DEBUG << "Skipping event " << event.genEvent().event_number()
-                 << " because no final state found " << endl;
+        MSG_DEBUG("Skipping event " << event.genEvent().event_number()
+                  << " because no final state found ");
         vetoEvent;
       }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/STAR_2008_S7993412.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/STAR_2008_S7993412.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/STAR_2008_S7993412.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -34,8 +34,8 @@
       // Skip if the event is empty
       const FinalState& fs = applyProjection<FinalState>(event, "FS");
       if (fs.empty()) {
-        getLog() << Log::DEBUG << "Skipping event " << event.genEvent().event_number()
-                 << " because no final state found " << endl;
+        MSG_DEBUG("Skipping event " << event.genEvent().event_number()
+                  << " because no final state found ");
         vetoEvent;
       }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/STAR_2009_UE_HELEN.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/STAR_2009_UE_HELEN.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/STAR_2009_UE_HELEN.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -62,12 +62,12 @@
     void analyze(const Event& e) {
       const FinalState& cfs = applyProjection<ChargedFinalState>(e, "CFS");
       if (cfs.particles().size() < 1) {
-        getLog() << Log::DEBUG << "Failed multiplicity cut" << endl;
+        MSG_DEBUG("Failed multiplicity cut");
         vetoEvent;
       }
 
       const Jets& alljets = applyProjection<FastJets>(e, "AllJets").jetsByPt();
-      getLog() << Log::DEBUG << "Total jet multiplicity = " << alljets.size() << endl;
+      MSG_DEBUG("Total jet multiplicity = " << alljets.size());
 
       // The jet acceptance region is |eta|<(1-R)=0.3  (with R = jet radius)
       // Jets also must have a neutral energy fraction of < 0.7
@@ -82,7 +82,7 @@
       // WARNING: There is more data in preparation, some of which
       //          does _not_ have this constraint!
       if (jets.size() != 2) {
-        getLog() << Log::DEBUG << "Failed jet multiplicity cut" << endl;
+        MSG_DEBUG("Failed jet multiplicity cut");
         vetoEvent;
       }
 
@@ -93,7 +93,7 @@
       if (deltaPhi(jets[0].momentum().phi(), jets[1].momentum().phi()) <= 5*PI/6 ||
           jets[1].momentum().pT()/jets[0].momentum().pT() <= 0.7)
       {
-        getLog() << Log::DEBUG << "Failed di-jet criteria" << endl;
+        MSG_DEBUG("Failed di-jet criteria");
         vetoEvent;
       }
 

Modified: branches/2011-07-aida2yoda/src/Analyses/TASSO_1990_S2148048.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/TASSO_1990_S2148048.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/TASSO_1990_S2148048.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -86,7 +86,7 @@
       // Condition 1)  --- require at least 5 (4) 'good' tracks
       int nch = cfs.particles().size();
       if ( (int(sqrtS()/GeV) > 27 && nch < 5) || (int(sqrtS()/GeV) <= 27 && nch < 4 ) ) {
-        getLog() << Log::DEBUG << "Failed # good tracks cut: " << nch << endl;
+        MSG_DEBUG("Failed # good tracks cut: " << nch);
         vetoEvent;
       }
       // Condition 2) ---
@@ -97,7 +97,7 @@
         momsum += mom;
       }
       if (momsum <=0.265 * sqrtS()/GeV) {
-        getLog() << Log::DEBUG << "Failed pTsum cut: " << momsum << " < " << 0.265 * sqrtS()/GeV << endl;
+        MSG_DEBUG("Failed pTsum cut: " << momsum << " < " << 0.265 * sqrtS()/GeV);
         vetoEvent;
       }
 
@@ -108,7 +108,7 @@
       //const Vector3 & thrustAxis = thrust.thrustAxis ();
       //double theta = thrustAxis.theta();
       //if ( fabs(cos(theta)) >= 0.8 ) {
-        //getLog() << Log::DEBUG << "Failed thrust angle cut: " << fabs(cos(theta)) << endl;
+        //MSG_DEBUG("Failed thrust angle cut: " << fabs(cos(theta)));
         //vetoEvent;
       //}
 

Modified: branches/2011-07-aida2yoda/src/Analyses/UA5_1986_S1583476.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/UA5_1986_S1583476.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/UA5_1986_S1583476.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -60,7 +60,7 @@
       const int numP = cfs50.size();
       const int ni = (int)floor(static_cast<float>(numP-2)/10.0);
       const int num_idx = min(ni, (int)_sumWn.size()-1);
-      getLog() << Log::TRACE << "Multiplicity index: " << numP << " charged particles -> #" << num_idx << endl;
+      MSG_TRACE("Multiplicity index: " << numP << " charged particles -> #" << num_idx);
 
       // Update weights
       const double weight = event.weight();
@@ -84,11 +84,11 @@
 
     /// Scale histos
     void finalize() {
-      getLog() << Log::DEBUG << "sumW_NSD,inel = " << _sumWTrigNSD << ", " << _sumWTrig << endl;
+      MSG_DEBUG("sumW_NSD,inel = " << _sumWTrigNSD << ", " << _sumWTrig);
       scale(_hist_eta_nsd, 0.5/_sumWTrigNSD);
       scale(_hist_eta_inelastic, 0.5/_sumWTrig);
       //
-      getLog() << Log::DEBUG << "sumW[n] = " << _sumWn << endl;
+      MSG_DEBUG("sumW[n] = " << _sumWn);
       for (size_t i = 0; i < _hists_eta_nsd.size(); ++i) {
         scale(_hists_eta_nsd[i], 0.5/_sumWn[i]);
       }

Modified: branches/2011-07-aida2yoda/src/Analyses/ZEUS_2001_S4815815.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/ZEUS_2001_S4815815.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Analyses/ZEUS_2001_S4815815.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -31,9 +31,9 @@
       addProjection(fs, "FS");
       /// @todo This is the *wrong* jet def: correct it!
       addProjection(FastJets(fs, FastJets::KT, 0.7), "Jets");
-      getLog() << Log::WARN << "This analysis uses the wrong jet definition: the "
+      MSG_WARNING("This analysis uses the wrong jet definition: the "
                << "paper just says 'a cone algorithm was applied to the CAL cells and jets "
-               << "were reconstructed using the energies and positions of these cells'" << endl;
+               << "were reconstructed using the energies and positions of these cells'");
 
       /// @todo This doesn't seem to correspond to the plots in the paper (SPIRES 4730372)
       _histJetEt1 = bookHisto1D("JetET1", 11, 14.0, 75.0);
@@ -44,7 +44,7 @@
     void analyze(const Event& event) {
       const double weight = event.weight();
       const JetAlg& jets = applyProjection<FastJets>(event, "Jets");
-      getLog() << Log::INFO << "Jet multiplicity = " << jets.size() << endl;
+      MSG_INFO("Jet multiplicity = " << jets.size());
       foreach (const Jet& j, jets.jets()) {
         _histJetEt1->fill(j.momentum().pT(), weight);
       }

Modified: branches/2011-07-aida2yoda/src/Projections/Beam.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/Beam.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/Beam.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -62,13 +62,13 @@
       _theBeams.first = Particle(ANY, FourMomentum());
       _theBeams.second = Particle(ANY, FourMomentum());
     }
-    //getLog() << Log::DEBUG << "Beam particle IDs = " << beamIds() << endl;
+    //MSG_DEBUG("Beam particle IDs = " << beamIds());
   }
 
 
   double Beam::sqrtS() const {
     double sqrts = Rivet::sqrtS(beams());
-    //getLog() << Log::DEBUG << "sqrt(s) = " << sqrts/GeV << " GeV" << endl;
+    //MSG_DEBUG("sqrt(s) = " << sqrts/GeV << " GeV");
     return sqrts;
   }
 

Modified: branches/2011-07-aida2yoda/src/Projections/ChargedFinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/ChargedFinalState.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/ChargedFinalState.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -25,7 +25,7 @@
     setName("ChargedFinalState");
     addProjection(FinalState(etaRanges, minpt), "FS");
   }
-  
+
 
   int ChargedFinalState::compare(const Projection& p) const {
     return mkNamedPCmp(p, "FS");
@@ -42,12 +42,10 @@
     _theParticles.clear();
     std::remove_copy_if(fs.particles().begin(), fs.particles().end(),
                         std::back_inserter(_theParticles), chargedParticleFilter);
-    getLog() << Log::DEBUG << "Number of charged final-state particles = "
-             << _theParticles.size() << endl;
+    MSG_DEBUG("Number of charged final-state particles = " << _theParticles.size());
     if (getLog().isActive(Log::TRACE)) {
       for (vector<Particle>::iterator p = _theParticles.begin(); p != _theParticles.end(); ++p) {
-        getLog() << Log::TRACE << "Selected: " << p->pdgId()
-                 << ", charge = " << PID::threeCharge(p->pdgId())/3.0 << endl;
+        MSG_TRACE("Selected: " << p->pdgId() << ", charge = " << PID::threeCharge(p->pdgId())/3.0);
       }
     }
   }

Modified: branches/2011-07-aida2yoda/src/Projections/ClusteredPhotons.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/ClusteredPhotons.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/ClusteredPhotons.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -42,8 +42,8 @@
       }
       if (clustered) _theParticles.push_back(p);
     }
-    getLog() << Log::DEBUG << name() << " found " << _theParticles.size()
-             << " matching photons." << endl;
+    MSG_DEBUG(name() << " found " << _theParticles.size()
+             << " matching photons.");
   }
 
 }

Modified: branches/2011-07-aida2yoda/src/Projections/FParameter.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/FParameter.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/FParameter.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -56,7 +56,7 @@
 
     // Return (with "safe nonsense" sphericity params) if there are no final state particles.
     if (fsmomenta.empty()) {
-      getLog() << Log::DEBUG << "No particles in final state..." << endl;
+      MSG_DEBUG("No particles in final state...");
       clear();
       return;
     }
@@ -69,7 +69,7 @@
 
     // Iterate over all the final state particles.
     Matrix<2> mMom;
-    getLog() << Log::DEBUG << "Number of particles = " << fsperpmomenta.size() << endl;
+    MSG_DEBUG("Number of particles = " << fsperpmomenta.size());
     foreach (const Vector3& p3, fsperpmomenta) {
 
       double prefactor = 1.0/mod(p3);
@@ -83,23 +83,23 @@
       mMom += prefactor * mMomPart;
     }
 
-    getLog() << Log::DEBUG << "Linearised transverse momentum tensor = " << endl << mMom << endl;
+    MSG_DEBUG("Linearised transverse momentum tensor = " << mMom);
 
     // Check that the matrix is symmetric.
     const bool isSymm = mMom.isSymm();
     if (!isSymm) {
-      getLog() << Log::ERROR << "Error: momentum tensor not symmetric:" << endl;
-      getLog() << Log::ERROR << "[0,1] vs. [1,0]: " << mMom.get(0,1) << ", " << mMom.get(1,0) << endl;
-      getLog() << Log::ERROR << "[0,2] vs. [2,0]: " << mMom.get(0,2) << ", " << mMom.get(2,0) << endl;
-      getLog() << Log::ERROR << "[1,2] vs. [2,1]: " << mMom.get(1,2) << ", " << mMom.get(2,1) << endl;
+      MSG_ERROR("Error: momentum tensor not symmetric:");
+      MSG_ERROR("[0,1] vs. [1,0]: " << mMom.get(0,1) << ", " << mMom.get(1,0));
+      MSG_ERROR("[0,2] vs. [2,0]: " << mMom.get(0,2) << ", " << mMom.get(2,0));
+      MSG_ERROR("[1,2] vs. [2,1]: " << mMom.get(1,2) << ", " << mMom.get(2,1));
     }
     // If not symmetric, something's wrong (we made sure the error msg appeared first).
     assert(isSymm);
 
     // Diagonalize momentum matrix.
     const EigenSystem<2> eigen2 = diagonalize(mMom);
-    getLog() << Log::DEBUG << "Diag momentum tensor = " << endl << eigen2.getDiagMatrix() << endl;
- 
+    MSG_DEBUG("Diag momentum tensor = " << eigen2.getDiagMatrix());
+
     // Reset and set eigenvalue parameters.
     _lambdas.clear();
     const EigenSystem<2>::EigenPairs epairs = eigen2.getEigenPairs();
@@ -109,8 +109,8 @@
     }
 
     // Debug output.
-    getLog() << Log::DEBUG << "Lambdas = ("
-             << lambda1() << ", " << lambda2() << ")" << endl;
-    getLog() << Log::DEBUG << "Sum of lambdas = " << lambda1() + lambda2() << endl;
+    MSG_DEBUG("Lambdas = ("
+             << lambda1() << ", " << lambda2() << ")");
+    MSG_DEBUG("Sum of lambdas = " << lambda1() + lambda2());
   }
 }

Modified: branches/2011-07-aida2yoda/src/Projections/FastJets.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/FastJets.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/FastJets.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -12,6 +12,7 @@
     _init1(alg, rparameter, seed_threshold);
   }
 
+
   FastJets::FastJets(const FinalState& fsp, fastjet::JetAlgorithm type,
                      fastjet::RecombinationScheme recom, double rparameter)
     : JetAlg(fsp), _adef(0)
@@ -51,7 +52,6 @@
 
   int FastJets::compare(const Projection& p) const {
     const FastJets& other = dynamic_cast<const FastJets&>(p);
-    // cout << "CMP " << _useInvisibles << endl;
     return \
       (_useInvisibles ? mkNamedPCmp(other, "FS") : mkNamedPCmp(other, "VFS")) ||
       cmp(_jdef.jet_algorithm(), other._jdef.jet_algorithm()) ||

Modified: branches/2011-07-aida2yoda/src/Projections/FinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/FinalState.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/FinalState.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -12,9 +12,9 @@
     setName("FinalState");
     const bool openpt = isZero(minpt);
     const bool openeta = (mineta <= -MAXRAPIDITY && maxeta >= MAXRAPIDITY);
-    getLog() << Log::TRACE << "Check for open FS conditions:" << std::boolalpha
-             << " eta=" << openeta
-             << ", pt=" << openpt << endl;
+    MSG_TRACE("Check for open FS conditions:" << std::boolalpha
+              << " eta=" << openeta
+              << ", pt=" << openpt);
     if (!openeta || !openpt) {
       addProjection(FinalState(), "OpenFS");
       if (!openeta) {
@@ -31,9 +31,9 @@
     const bool openpt = isZero(minpt);
     /// @todo Properly check whether any of these eta ranges (or their combination) are actually open
     const bool openeta = etaRanges.empty();
-    getLog() << Log::TRACE << "Check for open FS conditions:" << std::boolalpha
-             << " eta=" << openeta
-             << ", pt=" << openpt << endl;
+    MSG_TRACE("Check for open FS conditions:" << std::boolalpha
+              << " eta=" << openeta
+              << ", pt=" << openpt);
     if (!openeta || !openpt) {
       addProjection(FinalState(), "OpenFS");
     }
@@ -44,17 +44,17 @@
   int FinalState::compare(const Projection& p) const {
     const FinalState& other = dynamic_cast<const FinalState&>(p);
 
-    //cout << "FS::compare: " << 1 << " " << this << " " << &p << endl;
+    //MSG_TRACE("FS::compare: " << 1 << " " << this << " " << &p);
     std::vector<std::pair<double, double> > eta1(_etaRanges);
     std::vector<std::pair<double, double> > eta2(other._etaRanges);
     std::sort(eta1.begin(), eta1.end());
     std::sort(eta2.begin(), eta2.end());
 
-    //cout << "FS::compare: " << 2 << " " << this << " " << &p << endl;
+    //MSG_TRACE("FS::compare: " << 2 << " " << this << " " << &p);
     if (eta1 < eta2) return ORDERED;
     else if (eta2 < eta1) return UNORDERED;
 
-    //cout << "FS::compare: " << 3 << " " << this << " " << &p << endl;
+    //MSG_TRACE("FS::compare: " << 3 << " " << this << " " << &p);
     return cmp(_ptmin, other._ptmin);
   }
 
@@ -65,11 +65,11 @@
 
     // Handle "open FS" special case
     if (_etaRanges.empty() && _ptmin == 0) {
-      //getLog() << Log::TRACE << "Open FS processing: should only see this once per event ("
-      //         << e.genEvent().event_number() << ")" << endl;
+      //MSG_TRACE("Open FS processing: should only see this once per event ("
+      //           << e.genEvent().event_number() << ")");
       foreach (const GenParticle* p, Rivet::particles(e.genEvent())) {
         if (p->status() == 1) {
-          //cout << "FS GV = " << p->production_vertex() << endl;
+          //MSG_TRACE("FS GV = " << p->production_vertex());
           _theParticles.push_back(Particle(*p));
         }
       }
@@ -81,17 +81,13 @@
     const ParticleVector allstable = applyProjection<FinalState>(e, "OpenFS").particles();
     foreach (const Particle& p, allstable) {
       const bool passed = accept(p);
-//       if (getLog().isActive(Log::TRACE)) {
-//         getLog() << Log::TRACE
-//                  << "Choosing: ID = " << p.pdgId()
-//                  << ", pT = " << p.momentum().pT()
-//                  << ", eta = " << p.momentum().eta()
-//                  << ": result = " << std::boolalpha << passed << endl;
-//       }
+      // MSG_TRACE("Choosing: ID = " << p.pdgId()
+      //           << ", pT = " << p.momentum().pT()
+      //           << ", eta = " << p.momentum().eta()
+      //           << ": result = " << std::boolalpha << passed);
       if (passed) _theParticles.push_back(p);
     }
-    //getLog() << Log::DEBUG << "Number of final-state particles = "
-    //         << _theParticles.size() << endl;
+    //MSG_DEBUG("Number of final-state particles = " << _theParticles.size());
   }
 
 
@@ -119,7 +115,7 @@
       }
       if (!eta_pass) return false;
     }
- 
+
     return true;
   }
 

Modified: branches/2011-07-aida2yoda/src/Projections/FoxWolframMoments.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/FoxWolframMoments.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/FoxWolframMoments.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -4,91 +4,61 @@
 #include "Rivet/Cmp.hh"
 
 namespace Rivet {
- 
+
     int FoxWolframMoments::compare(const Projection& p) const {
         return mkNamedPCmp(p, "FS");
     }
- 
- 
+
+
     void FoxWolframMoments::project(const Event& e) {
-        Log log = getLog();
-     
-        // Project into final state and get total visible momentum
-        const FinalState& fs             = applyProjection<FinalState>(e, "VFS");
-
-/*        const FastJets &jetProjC4   = applyProjection<FastJets>(e, "JetsC4");
-		Jets theJetsC4  = jetProjC4.jetsByPt(20.0);
-     
-        Jets goodJetsC4;
-		foreach(const Jet& jet, theJetsC4)
-		{
-            //const double jetphi = jet.momentum().azimuthalAngle(ZERO_2PI);
-            //const double jeteta = jet.momentum().pseudorapidity();
-            const double jpt    = jet.momentum().pT();
-         
-			if( jpt > 20.0 && goodJetsC4.size() < 4 )// && fabs(jeteta) < 2.5 )
-            {
-                goodJetsC4.push_back(jet);
-            }
-		}
-  */
-        // remember: # pairs = N! / ( r! * (N-r)! )
-     
-        // N.B.: Autocorrelations are included! Treat them separately as diagonal elements.
-        // see: http://cepa.fnal.gov/psm/simulation/mcgen/lund/pythia_manual/pythia6.3/pythia6301/node215.html
-     
-        double sumEnergy = 0.0;
-        for (ParticleVector::const_iterator pi = fs.particles().begin(); pi != fs.particles().end(); ++pi)
-        //for ( Jets::const_iterator pi = goodJetsC4.begin() ; pi != goodJetsC4.end() ; ++pi )
-        {
-            sumEnergy += pi->momentum().E();
-
-            const FourMomentum pi_4 = pi->momentum();
-
-            for (ParticleVector::const_iterator pj = pi+1; pj != fs.particles().end(); ++pj)
-            //for ( Jets::const_iterator pj = pi + 1 ; pj != goodJetsC4.end() ; ++pj )
-            {
-                if ( pi == pj ) continue;
-             
-                const FourMomentum pj_4 = pj->momentum();
-             
-                // Calculate x_ij = cos(theta_ij)
-                double x_ij = 1.0;
-                if ( pi != pj ) {
-                    double denom =  pi_4.vector3().mod() * pj_4.vector3().mod();
-                    x_ij = pi_4.vector3().dot( pj_4.vector3() ) / denom;
-                }
-             
-                //log << Log::DEBUG << "x_ij = " << x_ij << endl;
-             
-                //const double core = fabs( pi_4 * pj_4 ); //  / sumet2 ;
-				const double core = pi_4.vector3().mod() * pi_4.vector3().mod();
-				
-                for ( int order = 0; order < MAXMOMENT ; ++order ) {
-                    // enter a factor 2.0 because ij = ji. Use symmetry to speed up!
-                    _fwmoments[order] += 2.0 * core * gsl_sf_legendre_Pl( order, x_ij ) ;
-                }
-            } // end loop over p_j
-         
-            // Now add autocorrelations
-            // Obviously cos(theta_ij) = 1.0
-            // Note that P_l(1) == 1 for each l
-            for ( int order = 0; order < MAXMOMENT ; ++order ) {
-                    _fwmoments[order] += fabs( pi_4 * pi_4 );
-            }
-        } // end loop over p_i
-     
-     
-        log << Log::DEBUG << "sumEnergy = " << sumEnergy << endl;
-     
-        for ( int order = 0; order < MAXMOMENT ; ++order ) {
-            _fwmoments[order] /= (sumEnergy*sumEnergy);
-        }
-     
-        // Normalize to H0
-        for ( int order = 1; order < MAXMOMENT ; ++order ) {
-            _fwmoments[order] /= _fwmoments[0];
+      // Project into final state and get total visible momentum
+      const FinalState& fs = applyProjection<FinalState>(e, "VFS");
+
+      // remember: # pairs = N! / ( r! * (N-r)! )
+      // N.B.: Autocorrelations are included! Treat them separately as diagonal elements.
+      // see: http://cepa.fnal.gov/psm/simulation/mcgen/lund/pythia_manual/pythia6.3/pythia6301/node215.html
+
+      double sumEnergy = 0.0;
+      for (ParticleVector::const_iterator pi = fs.particles().begin(); pi != fs.particles().end(); ++pi) {
+        sumEnergy += pi->momentum().E();
+        const FourMomentum pi_4 = pi->momentum();
+        for (ParticleVector::const_iterator pj = pi+1; pj != fs.particles().end(); ++pj) {
+          const FourMomentum pj_4 = pj->momentum();
+
+          // Calculate x_ij = cos(theta_ij)
+          double x_ij = 1.0;
+          if ( pi != pj ) {
+            double denom =  pi_4.vector3().mod() * pj_4.vector3().mod();
+            x_ij = pi_4.vector3().dot( pj_4.vector3() ) / denom;
+          }
+
+          //const double core = fabs( pi_4 * pj_4 ); //  / sumet2 ;
+          const double core = pi_4.vector3().mod() * pi_4.vector3().mod();
+
+          for (int order = 0; order < MAXMOMENT; ++order) {
+            // enter a factor 2.0 because ij = ji. Use symmetry to speed up!
+            _fwmoments[order] += 2.0 * core * gsl_sf_legendre_Pl( order, x_ij ) ;
+          }
+        } // end loop over p_j
+
+        // Now add autocorrelations
+        // Obviously cos(theta_ij) = 1.0
+        // Note that P_l(1) == 1 for each l
+        for (int order = 0; order < MAXMOMENT; ++order) {
+          _fwmoments[order] += fabs( pi_4 * pi_4 );
         }
+      } // end loop over p_i
+
+      MSG_DEBUG("sumEnergy = " << sumEnergy);
+
+      for (int order = 0; order < MAXMOMENT; ++order) {
+        _fwmoments[order] /= (sumEnergy*sumEnergy);
+      }
+
+      // Normalize to H0
+      for (int order = 1; order < MAXMOMENT; ++order) {
+        _fwmoments[order] /= _fwmoments[0];
+      }
     }
- 
+
 }

Modified: branches/2011-07-aida2yoda/src/Projections/HadronicFinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/HadronicFinalState.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/HadronicFinalState.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -24,8 +24,8 @@
     _theParticles.clear();
     std::remove_copy_if(fs.particles().begin(), fs.particles().end(),
                         std::back_inserter(_theParticles), hadronFilter);
-    getLog() << Log::DEBUG << "Number of hadronic final-state particles = "
-             << _theParticles.size() << endl;
+    MSG_DEBUG("Number of hadronic final-state particles = "
+             << _theParticles.size());
   }
 
 }

Modified: branches/2011-07-aida2yoda/src/Projections/Hemispheres.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/Hemispheres.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/Hemispheres.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -8,13 +8,13 @@
     // Get thrust axes.
     const AxesDefinition& ax = applyProjection<AxesDefinition>(e, "Axes");
     const Vector3 n = ax.axis1();
-    getLog() << Log::DEBUG << "Thrust axis = " << n << endl;
+    MSG_DEBUG("Thrust axis = " << n);
 
     FourMomentum p4With, p4Against;
     double Evis(0), broadWith(0), broadAgainst(0), broadDenom(0);
     const FinalState& fs = applyProjection<FinalState>(e, ax.getProjection("FS"));
     const ParticleVector& particles = fs.particles();
-    getLog() << Log::DEBUG << "number of particles = " << particles.size() << endl;
+    MSG_DEBUG("number of particles = " << particles.size());
     foreach (const Particle& p, particles) {
       const FourMomentum p4 = p.momentum();
       const Vector3 p3 = p4.vector3();
@@ -36,7 +36,7 @@
       } else {
         // In the incredibly unlikely event that a particle goes exactly along the
         // thrust plane, add half to each hemisphere.
-        getLog() << Log::DEBUG << "Particle split between hemispheres" << endl;
+        MSG_DEBUG("Particle split between hemispheres");
         p4With += 0.5 * p4;
         p4Against += 0.5 * p4;
         broadWith += 0.5 * p3Trans;

Modified: branches/2011-07-aida2yoda/src/Projections/InitialQuarks.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/InitialQuarks.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/InitialQuarks.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -39,30 +39,29 @@
         const int st = p->status();
         const double pT = p->momentum().perp();
         const double eta = p->momentum().eta();
-        getLog() << Log::TRACE << std::boolalpha
-                 << "ID = " << p->pdg_id() << ", status = " << st << ", pT = " << pT
-                 << ", eta = " << eta << ": result = " << passed << endl;
+        MSG_TRACE(std::boolalpha
+                  << "ID = " << p->pdg_id() << ", status = " << st << ", pT = " << pT
+                  << ", eta = " << eta << ": result = " << passed);
         if (pv != 0) {
           foreach (const GenParticle* pp, particles_in(pv)) {
-            getLog() << Log::TRACE << std::boolalpha
-                     << "     parent ID = " << pp->pdg_id() << endl;
+            MSG_TRACE(std::boolalpha << " parent ID = " << pp->pdg_id());
           }
         }
         if (dv != 0) {
           foreach (const GenParticle* pp, particles_out(dv)) {
-            getLog() << Log::TRACE << std::boolalpha
-                     << "     child ID  = " << pp->pdg_id() << endl;
+            MSG_TRACE(std::boolalpha
+                      << " child ID  = " << pp->pdg_id());
           }
         }
       }
       if (passed) _theParticles.push_back(Particle(*p));
     }
-    getLog() << Log::DEBUG << "Number of initial quarks = "
-             << _theParticles.size() << endl;
-    if (! _theParticles.empty())
-      for (size_t i=0 ; i < _theParticles.size() ; i++)
-        getLog() << Log::DEBUG << "Initial quark[" << i << "] = "
-                 << _theParticles[i].pdgId() << std::endl;
+    MSG_DEBUG("Number of initial quarks = " << _theParticles.size());
+    if (!_theParticles.empty()) {
+      for (size_t i = 0; i < _theParticles.size(); i++) {
+        MSG_DEBUG("Initial quark[" << i << "] = " << _theParticles[i].pdgId());
+      }
+    }
   }
 
 

Modified: branches/2011-07-aida2yoda/src/Projections/JetAlg.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/JetAlg.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/JetAlg.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -12,7 +12,7 @@
     setName("JetAlg");
     addProjection(fs, "FS");
     VisibleFinalState vfs(fs);
-    getLog() << Log::DEBUG << "Making visible final state from provided FS" << endl;
+    MSG_DEBUG("Making visible final state from provided FS");
     addProjection(vfs, "VFS");
   }
 

Modified: branches/2011-07-aida2yoda/src/Projections/LeadingParticlesFinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/LeadingParticlesFinalState.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/LeadingParticlesFinalState.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -29,7 +29,7 @@
     map<long, ParticleVector::const_iterator> tmp;
 
     const ParticleVector& particles = fs.particles();
-    getLog() << Log::DEBUG << "Original final state particles size " << particles.size() << endl;
+    MSG_DEBUG("Original final state particles size " << particles.size());
     ParticleVector::const_iterator ifs;
     for (ifs = particles.begin(); ifs != particles.end(); ++ifs) {
       if (inList(*ifs) && FinalState::accept(ifs->genParticle())) {
@@ -50,8 +50,8 @@
     // Loop on the tmp container and fill _theParticles
     map<long, ParticleVector::const_iterator>::const_iterator i;
     for (i = tmp.begin(); i != tmp.end(); ++i) {
-      getLog() << Log::DEBUG << "LeadingParticlesFinalState is accepting particle ID " << i->second->pdgId()
-               << " with momentum " << i->second->momentum() << endl;
+      MSG_DEBUG("LeadingParticlesFinalState is accepting particle ID " << i->second->pdgId()
+               << " with momentum " << i->second->momentum());
       _theParticles.push_back(*(i->second));
     }
   }

Modified: branches/2011-07-aida2yoda/src/Projections/MergedFinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/MergedFinalState.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/MergedFinalState.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -35,11 +35,10 @@
         _theParticles.push_back(pb);
       }
     }
-    getLog() << Log::DEBUG << "Number of particles in the two final states to be merged: = \n"
-             << "   1st final state = " << fsa.particles().size() << endl
-             << "   2nd final state = " << fsb.particles().size() << endl;
-    getLog() << Log::DEBUG << "Number of merged final-state particles = "
-             << _theParticles.size() << endl;
+    MSG_DEBUG("Number of particles in the two final states to be merged: = \n"
+              << "   1st final state = " << fsa.particles().size() << "\n"
+              << "   2nd final state = " << fsb.particles().size());
+    MSG_DEBUG("Number of merged final-state particles = " << _theParticles.size());
   }
 
 

Modified: branches/2011-07-aida2yoda/src/Projections/NeutralFinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/NeutralFinalState.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/NeutralFinalState.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -20,17 +20,13 @@
     foreach (const Particle& p, fs.particles()){
       if ((PID::threeCharge(p.pdgId()) == 0) && (p.momentum().Et() > _Etmin)) {
         _theParticles.push_back(p);
-        if (getLog().isActive(Log::TRACE)) {
-          getLog() << Log::TRACE
-                   << "Selected: ID = " << p.pdgId()
-                   << ", Et = " << p.momentum().Et()
-                   << ", eta = " << p.momentum().eta()
-                   << ", charge = " << PID::threeCharge(p.pdgId())/3.0 << endl;
-        }
+        MSG_TRACE("Selected: ID = " << p.pdgId()
+                  << ", Et = " << p.momentum().Et()
+                  << ", eta = " << p.momentum().eta()
+                  << ", charge = " << PID::threeCharge(p.pdgId())/3.0);
       }
     }
-    getLog() << Log::DEBUG << "Number of neutral final-state particles = "
-             << _theParticles.size() << endl;
+    MSG_DEBUG("Number of neutral final-state particles = " << _theParticles.size());
   }
 
 

Modified: branches/2011-07-aida2yoda/src/Projections/PVertex.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/PVertex.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/PVertex.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -10,7 +10,7 @@
   void PVertex::project(const Event& e) {
     // We'll *try* to do it right, in case any generators are doing the right thing...
     _thePVertex = e.genEvent().signal_process_vertex();
-    getLog() << Log::DEBUG << "PVertex ptr from HepMC = " << _thePVertex << endl;
+    MSG_DEBUG("PVertex ptr from HepMC = " << _thePVertex);
     if (!_thePVertex) {
       // Since no signal vertices are filled in existing Fortran & C++ MC's,
       // the decay vertex from first vertex in event with 2 incoming particles

Modified: branches/2011-07-aida2yoda/src/Projections/Sphericity.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/Sphericity.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/Sphericity.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -67,11 +67,11 @@
 
   // Actually do the calculation
   void Sphericity::_calcSphericity(const vector<Vector3>& fsmomenta) {
-    getLog() << Log::DEBUG << "Calculating sphericity with r = " << _regparam << endl;
+    MSG_DEBUG("Calculating sphericity with r = " << _regparam);
 
     // Return (with "safe nonsense" sphericity params) if there are no final state particles.
     if (fsmomenta.empty()) {
-      getLog() << Log::DEBUG << "No particles in final state..." << endl;
+      MSG_DEBUG("No particles in final state...");
       clear();
       return;
     }
@@ -79,7 +79,7 @@
     // Iterate over all the final state particles.
     Matrix3 mMom;
     double totalMomentum = 0.0;
-    getLog() << Log::DEBUG << "Number of particles = " << fsmomenta.size() << endl;
+    MSG_DEBUG("Number of particles = " << fsmomenta.size());
     foreach (const Vector3& p3, fsmomenta) {
       // Build the (regulated) normalising factor.
       totalMomentum += pow(p3.mod(), _regparam);
@@ -87,7 +87,7 @@
       // Build (regulated) quadratic momentum components.
       const double regfactor = pow(p3.mod(), _regparam-2);
       if (!fuzzyEquals(regfactor, 1.0)) {
-        getLog() << Log::TRACE << "Regfactor (r=" << _regparam << ") = " << regfactor << endl;
+        MSG_TRACE("Regfactor (r=" << _regparam << ") = " << regfactor);
       }
 
       Matrix3 mMomPart;
@@ -101,23 +101,23 @@
 
     // Normalise to total (regulated) momentum.
     mMom /= totalMomentum;
-    getLog() << Log::DEBUG << "Momentum tensor = " << endl << mMom << endl;
+    MSG_DEBUG("Momentum tensor = " << "\n" << mMom);
 
     // Check that the matrix is symmetric.
     const bool isSymm = mMom.isSymm();
     if (!isSymm) {
-      getLog() << Log::ERROR << "Error: momentum tensor not symmetric (r=" << _regparam << ")" << endl;
-      getLog() << Log::ERROR << "[0,1] vs. [1,0]: " << mMom.get(0,1) << ", " << mMom.get(1,0) << endl;
-      getLog() << Log::ERROR << "[0,2] vs. [2,0]: " << mMom.get(0,2) << ", " << mMom.get(2,0) << endl;
-      getLog() << Log::ERROR << "[1,2] vs. [2,1]: " << mMom.get(1,2) << ", " << mMom.get(2,1) << endl;
+      MSG_ERROR("Error: momentum tensor not symmetric (r=" << _regparam << ")");
+      MSG_ERROR("[0,1] vs. [1,0]: " << mMom.get(0,1) << ", " << mMom.get(1,0));
+      MSG_ERROR("[0,2] vs. [2,0]: " << mMom.get(0,2) << ", " << mMom.get(2,0));
+      MSG_ERROR("[1,2] vs. [2,1]: " << mMom.get(1,2) << ", " << mMom.get(2,1));
     }
     // If not symmetric, something's wrong (we made sure the error msg appeared first).
     assert(isSymm);
 
     // Diagonalize momentum matrix.
     const EigenSystem<3> eigen3 = diagonalize(mMom);
-    getLog() << Log::DEBUG << "Diag momentum tensor = " << endl << eigen3.getDiagMatrix() << endl;
- 
+    MSG_DEBUG("Diag momentum tensor = " << "\n" << eigen3.getDiagMatrix());
+
     // Reset and set eigenvalue/vector parameters.
     _lambdas.clear();
     _sphAxes.clear();
@@ -129,13 +129,13 @@
     }
 
     // Debug output.
-    getLog() << Log::DEBUG << "Lambdas = ("
-             << lambda1() << ", " << lambda2() << ", " << lambda3() << ")" << endl;
-    getLog() << Log::DEBUG << "Sum of lambdas = " << lambda1() + lambda2() + lambda3() << endl;
-    getLog() << Log::DEBUG << "Vectors = "
+    MSG_DEBUG("Lambdas = ("
+             << lambda1() << ", " << lambda2() << ", " << lambda3() << ")");
+    MSG_DEBUG("Sum of lambdas = " << lambda1() + lambda2() + lambda3());
+    MSG_DEBUG("Vectors = "
              << sphericityAxis() << ", "
              << sphericityMajorAxis() << ", "
-             << sphericityMinorAxis() << ")" << endl;
+             << sphericityMinorAxis() << ")");
   }
 
 }

Modified: branches/2011-07-aida2yoda/src/Projections/Thrust.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/Thrust.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/Thrust.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -106,7 +106,7 @@
     foreach (const Vector3& p3, fsmomenta) {
       momentumSum += mod(p3);
     }
-    getLog() << Log::DEBUG << "Number of particles = " << fsmomenta.size() << endl;
+    MSG_DEBUG("Number of particles = " << fsmomenta.size());
 
 
     // Clear the caches
@@ -151,12 +151,12 @@
 
     // Get thrust
     _calcT(fsmomenta, val, axis);
-    getLog() << Log::DEBUG << "Mom sum = " << momentumSum << endl;
+    MSG_DEBUG("Mom sum = " << momentumSum);
     _thrusts.push_back(val / momentumSum);
     // Make sure that thrust always points along the +ve z-axis.
     if (axis.z() < 0) axis = -axis;
     axis = axis.unit();
-    getLog() << Log::DEBUG << "Axis = " << axis << endl;
+    MSG_DEBUG("Axis = " << axis);
     _thrustAxes.push_back(axis);
 
     // Get thrust major

Modified: branches/2011-07-aida2yoda/src/Projections/TriggerCDFRun0Run1.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/TriggerCDFRun0Run1.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/TriggerCDFRun0Run1.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -31,9 +31,9 @@
     // Require at least 4 tracks with at least one in each of the forward
     // and backward hemispheres:
     if (n_trig_1 == 0 || n_trig_2 == 0) return;
-    getLog() << Log::DEBUG << "Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2 << endl;
+    MSG_DEBUG("Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2);
     if (n_backward + n_forward < 4 || n_backward == 0 || n_forward == 0) return;
-    getLog() << Log::DEBUG << " Num. forward: " << n_forward  << ", Num. backward: " << n_backward << endl;
+    MSG_DEBUG(" Num. forward: " << n_forward  << ", Num. backward: " << n_backward);
  
     // Trigger success:
     _decision_mb = true;

Modified: branches/2011-07-aida2yoda/src/Projections/TriggerCDFRun2.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/TriggerCDFRun2.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/TriggerCDFRun2.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -24,7 +24,7 @@
     
     // Require at least one charged particle in both -4.7 < eta < -3.7 and 3.7 < eta < 4.7
     if (n_trig_1 == 0 || n_trig_2 == 0) return;
-    getLog() << Log::DEBUG << "Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2 << endl;
+    MSG_DEBUG("Trigger 1: " << n_trig_1 << " Trigger 2: " << n_trig_2);
  
     // Trigger success:
     _decision_mb = true;

Modified: branches/2011-07-aida2yoda/src/Projections/TriggerUA5.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/TriggerUA5.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/TriggerUA5.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -36,7 +36,7 @@
       if (inRange(eta, -5.6, -2.0)) _n_minus++;
       else if (inRange(eta, 2.0, 5.6)) _n_plus++;
     }
-    getLog() << Log::DEBUG << "Trigger -: " << _n_minus << ", Trigger +: " << _n_plus << endl;
+    MSG_DEBUG("Trigger -: " << _n_minus << ", Trigger +: " << _n_plus);
 
     // Common SD/NSD trigger requirement: must activate at least one hodoscope
     if (_n_minus == 0 && _n_plus == 0) return;

Modified: branches/2011-07-aida2yoda/src/Projections/UnstableFinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/UnstableFinalState.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/UnstableFinalState.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -29,22 +29,6 @@
         p->momentum().eta() > _etamin && p->momentum().eta() < _etamax &&
         !IS_PARTON_PDGID(p->pdg_id());
 
-      // DEBUGGING PRINTOUTS FOR HERWIG
-      // if (p->status() == 2) {
-      //   std::cout << "* "
-      //             << "pid=" << p->pdg_id()
-      //             << ", st=" << st
-      //             << ", passed=" << std::boolalpha << passed
-      //             << ", isparton=" << std::boolalpha << (IS_PARTON_PDGID(p->pdg_id())) << std::endl;
-      // }
-      // if (abs(p->pdg_id()) > 3000) {
-      //   std::cout << "% "
-      //             << "pid=" << p->pdg_id()
-      //             << ", st=" << st
-      //             << ", passed=" << std::boolalpha << passed
-      //             << ", isparton=" << std::boolalpha << (IS_PARTON_PDGID(p->pdg_id())) << std::endl;
-      // }
-
       // Avoid double counting by re-marking as unpassed if particle ID == parent ID
       const GenVertex* pv = p->production_vertex();
       const GenVertex* dv = p->end_vertex();

Modified: branches/2011-07-aida2yoda/src/Projections/VetoedFinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/VetoedFinalState.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/VetoedFinalState.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -25,20 +25,19 @@
     _theParticles.clear();
     _theParticles.reserve(fs.particles().size());
     foreach (const Particle& p, fs.particles()) {
-      if (getLog().isActive(Log::DEBUG)) {
+      if (getLog().isActive(Log::TRACE)) {
         vector<long> codes;
         for (VetoDetails::const_iterator code = _vetoCodes.begin(); code != _vetoCodes.end(); ++code) {
           codes.push_back(code->first);
         }
         const string codestr = "{ " + join(codes) + " }";
-        getLog() << Log::TRACE << p.pdgId() << " vs. veto codes = "
-                 << codestr << " (" << codes.size() << ")" << endl;
+        MSG_TRACE(p.pdgId() << " vs. veto codes = " << codestr << " (" << codes.size() << ")");
       }
       const long pdgid = p.pdgId();
       const double pt = p.momentum().pT();
       VetoDetails::iterator iter = _vetoCodes.find(pdgid);
       if (iter == _vetoCodes.end()) {
-        getLog() << Log::TRACE << "Storing with PDG code = " << pdgid << ", pT = " << pt << endl;
+        MSG_TRACE("Storing with PDG code = " << pdgid << ", pT = " << pt);
         _theParticles.push_back(p);
       } else {
         // This particle code is listed as a possible veto... check pT.
@@ -49,14 +48,14 @@
         if (ptrange.first < numeric_limits<double>::max()) rangess << ptrange.second;
         rangess << " - ";
         if (ptrange.second < numeric_limits<double>::max()) rangess << ptrange.second;
-        getLog() << Log::TRACE << "ID = " << pdgid << ", pT range = " << rangess.str();
+        MSG_TRACE("ID = " << pdgid << ", pT range = " << rangess.str());
         stringstream debugline;
         debugline << "with PDG code = " << pdgid << " pT = " << p.momentum().pT();
         if (pt < ptrange.first || pt > ptrange.second) {
-          getLog() << Log::TRACE << "Storing " << debugline.str() << endl;
+          MSG_TRACE("Storing " << debugline.str());
           _theParticles.push_back(p);
         } else {
-          getLog() << Log::TRACE << "Vetoing " << debugline.str() << endl;
+          MSG_TRACE("Vetoing " << debugline.str());
         }
       }
     }
@@ -70,7 +69,7 @@
       start.insert(_theParticles.begin());
       oldMasses.insert(pair<set<ParticleVector::iterator>, FourMomentum>
                        (start, _theParticles.begin()->momentum()));
-   
+
       for (int nParts = 1; nParts != *nIt; ++nParts) {
         for (map<set<ParticleVector::iterator>, FourMomentum>::iterator mIt = oldMasses.begin();
              mIt != oldMasses.end(); ++mIt) {
@@ -103,7 +102,7 @@
         }
       }
     }
- 
+
     for (set<ParticleVector::iterator>::reverse_iterator p = toErase.rbegin(); p != toErase.rend(); ++p) {
       _theParticles.erase(*p);
     }
@@ -125,7 +124,7 @@
         }
       }
     }
-    
+
     // Now veto on the FS
     foreach (const string& ifs, _vetofsnames) {
       const FinalState& vfs = applyProjection<FinalState>(e, ifs);
@@ -135,8 +134,8 @@
         bool found = false;
         for (ParticleVector::const_iterator ipart = vfsp.begin(); ipart != vfsp.end(); ++ipart){
           if (!ipart->hasGenParticle()) continue;
-          getLog() << Log::TRACE << "Comparing barcode " << icheck->genParticle().barcode() 
-                   << " with veto particle " << ipart->genParticle().barcode() << endl;
+          MSG_TRACE("Comparing barcode " << icheck->genParticle().barcode()
+                   << " with veto particle " << ipart->genParticle().barcode());
           if (ipart->genParticle().barcode() == icheck->genParticle().barcode()){
             found = true;
             break;
@@ -145,8 +144,8 @@
         if (found) {
           _theParticles.erase(icheck);
           --icheck;
-        }	
-      }	
+        }
+      }
     }
   }
 

Modified: branches/2011-07-aida2yoda/src/Projections/WFinder.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/WFinder.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/WFinder.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -148,9 +148,10 @@
     stringstream msg;
     string wsign = (wcharge == 1) ? "+" : "-";
     string wstr = "W" + wsign;
-    msg << wstr << " reconstructed from: " << endl
-        << "   " << p1.momentum() << " " << p1.pdgId() << endl
-        << " + " << p2.momentum() << " " << p2.pdgId() << endl;
+    msg << wstr << " reconstructed from: " << "\n"
+        << "   " << p1.momentum() << " " << p1.pdgId() << "\n"
+        << " + " << p2.momentum() << " " << p2.pdgId();
+    MSG_DEBUG(msg.str());
 
     // Check missing ET
     const MissingMomentum& vismom = applyProjection<MissingMomentum>(e, "MissingET");

Modified: branches/2011-07-aida2yoda/src/Projections/ZFinder.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/ZFinder.cc	Thu Oct  6 14:16:00 2011	(r3413)
+++ branches/2011-07-aida2yoda/src/Projections/ZFinder.cc	Thu Oct  6 14:33:22 2011	(r3414)
@@ -98,12 +98,11 @@
     assert(z3charge == 0);
 
     stringstream msg;
-    msg << "Z reconstructed from: " << endl
-        << "   " << l1.momentum() << " " << l1.pdgId() << endl
-        << " + " << l2.momentum() << " " << l2.pdgId() << endl;
-
+    msg << "Z reconstructed from: \n"
+        << "   " << l1.momentum() << " " << l1.pdgId() << "\n"
+        << " + " << l2.momentum() << " " << l2.pdgId();
+    MSG_DEBUG(msg.str());
     _bosons.push_back(Particle(ZBOSON, pZ));
-    MSG_DEBUG(name() << " found one Z");
 
     // Find the LeptonClusters which survived the IMFS cut such that we can
     // extract their original particles


More information about the Rivet-svn mailing list