[Rivet-svn] r3562 - trunk/src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Feb 14 23:41:24 GMT 2012


Author: buckley
Date: Tue Feb 14 23:41:23 2012
New Revision: 3562

Log:
Fixing a couple of compiler warnings

Modified:
   trunk/src/Analyses/ALEPH_1999_S4193598.cc
   trunk/src/Analyses/MC_TTBAR.cc

Modified: trunk/src/Analyses/ALEPH_1999_S4193598.cc
==============================================================================
--- trunk/src/Analyses/ALEPH_1999_S4193598.cc	Tue Feb 14 23:01:58 2012	(r3561)
+++ trunk/src/Analyses/ALEPH_1999_S4193598.cc	Tue Feb 14 23:41:23 2012	(r3562)
@@ -8,6 +8,7 @@
 #include "Rivet/Projections/ChargedFinalState.hh"
 #include "Rivet/Projections/UnstableFinalState.hh"
 
+
 bool hasDecayedTo(const HepMC::GenParticle* p, int id1, int id2) {
   bool decision = false;
   HepMC::GenVertex* decV  = p->end_vertex();
@@ -27,6 +28,7 @@
   return hasDecayedTo(p.genParticle(), id1, id2);
 }
 
+
 namespace Rivet {
 
 
@@ -50,14 +52,11 @@
 
     /// Book histograms and initialise projections before the run
     void init() {
-
       addProjection(Beam(), "Beams");
       addProjection(UnstableFinalState(), "UFS");
       addProjection(ChargedFinalState(), "CFS");
 
       _h_Xe_Ds = bookHistogram1D(1, 1, 1);
-
-
     }
 
 
@@ -68,7 +67,7 @@
       // Trigger condition
       const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS");
       if (cfs.size() < 5) vetoEvent;
-      
+
       _sumWpassed += weight;
 
       const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(event, "UFS");
@@ -77,17 +76,15 @@
       const ParticlePair& beams = applyProjection<Beam>(event, "Beams").beams();
       const double meanBeamMom = ( beams.first.momentum().vector3().mod() +
                                    beams.second.momentum().vector3().mod() ) / 2.0/GeV;
-     
-      foreach (const Particle& p, ufs.particles()) {
-        
-        const PdgId pid = fabs(p.pdgId());
 
+      foreach (const Particle& p, ufs.particles()) {
+        const PdgId pid = abs(p.pdgId());
 
         switch (pid) {
         case 413:
 
           // Accept all D*+- decays. Normalisation to D0 + pi+- in finalize()
-          
+
           // Scaled energy.
           const double energy = p.momentum().E()/GeV;
           const double scaledEnergy = energy/meanBeamMom;

Modified: trunk/src/Analyses/MC_TTBAR.cc
==============================================================================
--- trunk/src/Analyses/MC_TTBAR.cc	Tue Feb 14 23:01:58 2012	(r3561)
+++ trunk/src/Analyses/MC_TTBAR.cc	Tue Feb 14 23:41:23 2012	(r3562)
@@ -202,7 +202,7 @@
       _h_t_mass->fill(t2.mass(), weight);
 
       // Placing a cut on the well-known W mass helps to reduce backgrounds
-      if (inRange(W.mass()/GeV, 75, 85)) {
+      if (inRange(W.mass()/GeV, 75.0, 85.0)) {
         MSG_DEBUG("W found with mass " << W.mass()/GeV << " GeV");
         _h_t_mass_W_cut->fill(t1.mass(), weight);
         _h_t_mass_W_cut->fill(t2.mass(), weight);


More information about the Rivet-svn mailing list