[Rivet-svn] r2339 - in trunk: include/Rivet/Projections src/Analyses src/Projections

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Mar 18 11:19:16 GMT 2010


Author: fsiegert
Date: Thu Mar 18 11:19:14 2010
New Revision: 2339

Log:
Slightly horrifying bugfix with respect to the pTmin argument of the
FastJets projection constructor:
pTmin was only used in the D0ILCone case where it specifies some kind of
internal(!) parameter of the jet algorithm. It is nothing like a pTmin
cut on the final jets which is what some analyses assumed though.
This commit removes the pTmin argument from the FastJets constructor and
adapts all analyses to properly require jetsBy*(pTmin).
Also I tried to unify jetfinders where allowed such that they can be
cached.

Modified:
   trunk/include/Rivet/Projections/FastJets.hh
   trunk/src/Analyses/CDF_2006_S6450792.cc
   trunk/src/Analyses/CDF_2008_S7828950.cc
   trunk/src/Analyses/D0_1996_S3214044.cc
   trunk/src/Analyses/D0_1996_S3324664.cc
   trunk/src/Analyses/D0_2004_S5992206.cc
   trunk/src/Analyses/D0_2008_S6879055.cc
   trunk/src/Analyses/D0_2008_S7662670.cc
   trunk/src/Analyses/D0_2008_S7863608.cc
   trunk/src/Analyses/D0_2009_S8202443.cc
   trunk/src/Analyses/D0_2009_S8349509.cc
   trunk/src/Analyses/D0_2010_S8566488.cc
   trunk/src/Analyses/MC_JETS.cc
   trunk/src/Analyses/MC_PHOTONJETS.cc
   trunk/src/Analyses/MC_WJETS.cc
   trunk/src/Analyses/MC_ZJETS.cc
   trunk/src/Analyses/STAR_2006_S6870392.cc
   trunk/src/Projections/FastJets.cc

Modified: trunk/include/Rivet/Projections/FastJets.hh
==============================================================================
--- trunk/include/Rivet/Projections/FastJets.hh	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/include/Rivet/Projections/FastJets.hh	Thu Mar 18 11:19:14 2010	(r2339)
@@ -47,7 +47,7 @@
     /// E-scheme recombination is used. For full control of
     /// FastJet built-in jet algs, use the native arg constructor.
     FastJets(const FinalState& fsp, JetAlgName alg,
-             double rparameter, double pTmin=0.0, double seed_threshold=1.0);
+             double rparameter, double seed_threshold=1.0);
 
     /// Native argument constructor, using FastJet alg/scheme enums.
     FastJets(const FinalState& fsp, fastjet::JetAlgorithm type,

Modified: trunk/src/Analyses/CDF_2006_S6450792.cc
==============================================================================
--- trunk/src/Analyses/CDF_2006_S6450792.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/CDF_2006_S6450792.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -22,14 +22,14 @@
  
     void init() {
       FinalState fs;
-      addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.7, 61.0*GeV), "ConeFinder");
+      addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.7), "ConeFinder");
 
       _h_jet_pt = bookHistogram1D(1, 1, 1);
     }
 
 
     void analyze(const Event& event) {
-      const Jets& jets = applyProjection<JetAlg>(event, "ConeFinder").jets();
+      const Jets& jets = applyProjection<JetAlg>(event, "ConeFinder").jets(61.0*GeV);
       foreach (const Jet& jet, jets) {
         double y = fabs(jet.momentum().rapidity());
         if (inRange(y, 0.1, 0.7)) {

Modified: trunk/src/Analyses/CDF_2008_S7828950.cc
==============================================================================
--- trunk/src/Analyses/CDF_2008_S7828950.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/CDF_2008_S7828950.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -31,7 +31,7 @@
     // Book histos and set counters for number of events passed in each one
     void init() {
       const FinalState fs;
-      addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.7, 62.0*GeV), "JetsM07");
+      addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.7), "JetsM07");
 
       /// @todo What actually are these histos showing?
       _binnedHistosR07.addHistogram(  0, 0.1, bookHistogram1D(1, 1, 1));
@@ -51,7 +51,7 @@
     // Do the analysis
     void analyze(const Event& event) {
       const double weight = event.weight();
-      foreach (const Jet& jet, applyProjection<FastJets>(event, "JetsM07").jets()) {
+      foreach (const Jet& jet, applyProjection<FastJets>(event, "JetsM07").jets(62.0*GeV)) {
         _binnedHistosR07.fill(fabs(jet.momentum().rapidity()), jet.momentum().pT(), weight);
       }
     }

Modified: trunk/src/Analyses/D0_1996_S3214044.cc
==============================================================================
--- trunk/src/Analyses/D0_1996_S3214044.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/D0_1996_S3214044.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -30,10 +30,10 @@
 
     /// Book histograms
     void init() {
-      const FinalState fs(-4.5, 4.5);
+      const FinalState fs;
       addProjection(fs, "FS");
       /// @todo Use correct jet algorithm
-      addProjection(FastJets(fs, FastJets::D0ILCONE, 0.7, 20.0*GeV), "ConeJets");
+      addProjection(FastJets(fs, FastJets::D0ILCONE, 0.7), "ConeJets");
    
       _h_3j_x3 = bookHistogram1D(1, 1, 1);
       _h_3j_x5 = bookHistogram1D(2, 1, 1);
@@ -73,7 +73,7 @@
       const double weight = event.weight();
    
       Jets jets_in;
-      foreach (const Jet& jet, applyProjection<FastJets>(event, "ConeJets").jetsByEt()) {
+      foreach (const Jet& jet, applyProjection<FastJets>(event, "ConeJets").jetsByEt(20.0*GeV)) {
         if (fabs(jet.momentum().eta()) < 3.0) {
           jets_in.push_back(jet);
         }

Modified: trunk/src/Analyses/D0_1996_S3324664.cc
==============================================================================
--- trunk/src/Analyses/D0_1996_S3324664.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/D0_1996_S3324664.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -26,10 +26,10 @@
     //@{
 
     void init() {
-      const FinalState fs(-3.2, 3.2);
+      const FinalState fs;
       addProjection(fs, "FS");
       /// @todo Use correct jet algorithm
-      addProjection(FastJets(fs, FastJets::D0ILCONE, 0.7, 20.0*GeV), "ConeJets");
+      addProjection(FastJets(fs, FastJets::D0ILCONE, 0.7), "ConeJets");
 
       _h_deta = bookHistogram1D(1, 1, 1);
       _h_dphi.addHistogram(0.0, 2.0, bookHistogram1D(2, 1, 1));
@@ -43,7 +43,7 @@
       const double weight = event.weight();
    
       Jets jets;
-      foreach (const Jet& jet, applyProjection<FastJets>(event, "ConeJets").jets()) {
+      foreach (const Jet& jet, applyProjection<FastJets>(event, "ConeJets").jets(20.0*GeV)) {
         if (fabs(jet.momentum().eta()) < 3.0) {
           jets.push_back(jet);
         }

Modified: trunk/src/Analyses/D0_2004_S5992206.cc
==============================================================================
--- trunk/src/Analyses/D0_2004_S5992206.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/D0_2004_S5992206.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -45,7 +45,7 @@
       // Final state for jets, mET etc.
       const FinalState fs(-3.0, 3.0);
       addProjection(fs, "FS");
-      addProjection(FastJets(fs, FastJets::D0ILCONE, 0.7, 6*GeV), "Jets");
+      addProjection(FastJets(FinalState(), FastJets::D0ILCONE, 0.7), "Jets");
       addProjection(TotalVisibleMomentum(fs), "CalMET");
    
       // Veto neutrinos, and muons with pT above 1.0 GeV

Modified: trunk/src/Analyses/D0_2008_S6879055.cc
==============================================================================
--- trunk/src/Analyses/D0_2008_S6879055.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/D0_2008_S6879055.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -49,7 +49,7 @@
       addProjection(vfs, "JetFS");
    
       // Jet finder
-      FastJets jets(vfs, FastJets::D0ILCONE, 0.5, 20.0*GeV);
+      FastJets jets(vfs, FastJets::D0ILCONE, 0.5);
       addProjection(jets, "Jets");
    
       _crossSectionRatio = bookHistogram1D(1, 1, 1);

Modified: trunk/src/Analyses/D0_2008_S7662670.cc
==============================================================================
--- trunk/src/Analyses/D0_2008_S7662670.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/D0_2008_S7662670.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -38,11 +38,11 @@
     {
    
       // Full final state
-      FinalState fs(-5.0, 5.0);
+      FinalState fs;
       addProjection(fs, "FS");
 
       // Jets
-      FastJets jetpro(fs, FastJets::D0ILCONE, 0.7, 6*GeV);
+      FastJets jetpro(fs, FastJets::D0ILCONE, 0.7);
       addProjection(jetpro, "Jets");
 
       // Book histograms
@@ -69,32 +69,24 @@
    
       // Find the jets
       const JetAlg& jetpro = applyProjection<JetAlg>(event, "Jets");
-      // If there are no jets, skip the event
-      if (jetpro.jets().size() == 0) {
-        getLog() << Log::DEBUG << "No jets found" << endl;
-        vetoEvent;
-      }
-
       // Fill histo for each jet
-      foreach (const Jet& j, jetpro.jets()) {
+      foreach (const Jet& j, jetpro.jets(50.0*GeV)) {
         const double pt = j.momentum().pT();
         const double y = fabs(j.momentum().rapidity());
-        if (pt/GeV > 50) {
-          getLog() << Log::TRACE << "Filling histos: pT = " << pt/GeV
-                   << ", |y| = " << y << endl;
-          if (y < 0.4) {
-            _h_dsigdptdy_y00_04->fill(pt/GeV, weight);
-          } else if (y < 0.8) {
-            _h_dsigdptdy_y04_08->fill(pt/GeV, weight);
-          } else if (y < 1.2) {
-            _h_dsigdptdy_y08_12->fill(pt/GeV, weight);
-          } else if (y < 1.6) {
-            _h_dsigdptdy_y12_16->fill(pt/GeV, weight);
-          } else if (y < 2.0) {
-            _h_dsigdptdy_y16_20->fill(pt/GeV, weight);
-          } else if (y < 2.4) {
-            _h_dsigdptdy_y20_24->fill(pt/GeV, weight);
-          }
+        getLog() << Log::TRACE << "Filling histos: pT = " << pt/GeV
+            << ", |y| = " << y << endl;
+        if (y < 0.4) {
+          _h_dsigdptdy_y00_04->fill(pt/GeV, weight);
+        } else if (y < 0.8) {
+          _h_dsigdptdy_y04_08->fill(pt/GeV, weight);
+        } else if (y < 1.2) {
+          _h_dsigdptdy_y08_12->fill(pt/GeV, weight);
+        } else if (y < 1.6) {
+          _h_dsigdptdy_y12_16->fill(pt/GeV, weight);
+        } else if (y < 2.0) {
+          _h_dsigdptdy_y16_20->fill(pt/GeV, weight);
+        } else if (y < 2.4) {
+          _h_dsigdptdy_y20_24->fill(pt/GeV, weight);
         }
       }
    

Modified: trunk/src/Analyses/D0_2008_S7863608.cc
==============================================================================
--- trunk/src/Analyses/D0_2008_S7863608.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/D0_2008_S7863608.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -34,7 +34,7 @@
       ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2);
       addProjection(zfinder, "ZFinder");
    
-      FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5, 20.0*GeV);
+      FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
       addProjection(conefinder, "ConeFinder");
 
       _h_jet_pT_cross_section = bookHistogram1D(1, 1, 1);

Modified: trunk/src/Analyses/D0_2009_S8202443.cc
==============================================================================
--- trunk/src/Analyses/D0_2009_S8202443.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/D0_2009_S8202443.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -39,13 +39,13 @@
                                   65.0*GeV, 115.0*GeV, 0.2);
       addProjection(zfinder_constrained, "ZFinderConstrained");
       FastJets conefinder_constrained(zfinder_constrained.remainingFinalState(),
-                                      FastJets::D0ILCONE, 0.5, 20.0*GeV);
+                                      FastJets::D0ILCONE, 0.5);
       addProjection(conefinder_constrained, "ConeFinderConstrained");
    
       // Unconstrained leptons
       ZFinder zfinder(FinalState(), ELECTRON, 65.0*GeV, 115.0*GeV, 0.2);
       addProjection(zfinder, "ZFinder");
-      FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5, 20.0*GeV);
+      FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
       addProjection(conefinder, "ConeFinder");
 
       _h_jet1_pT_constrained = bookHistogram1D(1, 1, 1);

Modified: trunk/src/Analyses/D0_2009_S8349509.cc
==============================================================================
--- trunk/src/Analyses/D0_2009_S8349509.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/D0_2009_S8349509.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -32,7 +32,7 @@
       ZFinder zfinder(-1.7, 1.7, 15.0*GeV, MUON, 65.0*GeV, 115.0*GeV, 0.2);
       addProjection(zfinder, "ZFinder");
    
-      FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5, 20.0*GeV);
+      FastJets conefinder(zfinder.remainingFinalState(), FastJets::D0ILCONE, 0.5);
       addProjection(conefinder, "ConeFinder");
    
       _h_dphi_jet_Z25 = bookHistogram1D(1, 1, 1);
@@ -57,7 +57,7 @@
         _inclusive_Z_sumofweights += weight;
      
         Jets jets;
-        foreach (const Jet& j, applyProjection<JetAlg>(event, "ConeFinder").jetsByPt()) {
+        foreach (const Jet& j, applyProjection<JetAlg>(event, "ConeFinder").jetsByPt(20.0*GeV)) {
           if (fabs(j.momentum().pseudorapidity()) < 2.8) {
             jets.push_back(j);
             break;

Modified: trunk/src/Analyses/D0_2010_S8566488.cc
==============================================================================
--- trunk/src/Analyses/D0_2010_S8566488.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/D0_2010_S8566488.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -34,7 +34,7 @@
     /// Book histograms and initialise projections before the run
     void init() {
 
-      FinalState fs(-4.2, 4.2);
+      FinalState fs;
       FastJets conefinder(fs, FastJets::D0ILCONE, 0.7);
       addProjection(conefinder, "ConeFinder");
 

Modified: trunk/src/Analyses/MC_JETS.cc
==============================================================================
--- trunk/src/Analyses/MC_JETS.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/MC_JETS.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -22,7 +22,7 @@
 
     void init() {
       FinalState fs;
-      FastJets jetpro(fs, FastJets::KT, 0.7, 20.0*GeV);
+      FastJets jetpro(fs, FastJets::KT, 0.7);
       addProjection(jetpro, "Jets");
       
       MC_JetAnalysis::init();

Modified: trunk/src/Analyses/MC_PHOTONJETS.cc
==============================================================================
--- trunk/src/Analyses/MC_PHOTONJETS.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/MC_PHOTONJETS.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -36,7 +36,7 @@
       VetoedFinalState vfs(fs);
       vfs.addVetoOnThisFinalState(photonfs);
       addProjection(vfs, "JetFS");
-      FastJets jetpro(vfs, FastJets::KT, 0.7, 20.0*GeV);
+      FastJets jetpro(vfs, FastJets::KT, 0.7);
       addProjection(jetpro, "Jets");
 
       _h_photon_pT = bookHistogram1D("photon_pT", logBinEdges(50, 1.0, 0.5*sqrtS()));

Modified: trunk/src/Analyses/MC_WJETS.cc
==============================================================================
--- trunk/src/Analyses/MC_WJETS.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/MC_WJETS.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -26,7 +26,7 @@
     void init() {
       WFinder wfinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
       addProjection(wfinder, "WFinder");
-      FastJets jetpro(wfinder.remainingFinalState(), FastJets::KT, 0.7, 20.0*GeV);
+      FastJets jetpro(wfinder.remainingFinalState(), FastJets::KT, 0.7);
       addProjection(jetpro, "Jets");
 
       _h_W_mass = bookHistogram1D("W_mass", 50, 55.0, 105.0);

Modified: trunk/src/Analyses/MC_ZJETS.cc
==============================================================================
--- trunk/src/Analyses/MC_ZJETS.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/MC_ZJETS.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -26,7 +26,7 @@
     void init() {
       ZFinder zfinder(-3.5, 3.5, 25.0*GeV, ELECTRON, 65.0*GeV, 115.0*GeV, 0.2);
       addProjection(zfinder, "ZFinder");
-      FastJets jetpro(zfinder.remainingFinalState(), FastJets::KT, 0.7, 20.0*GeV);
+      FastJets jetpro(zfinder.remainingFinalState(), FastJets::KT, 0.7);
       addProjection(jetpro, "Jets");
 
       _h_Z_mass = bookHistogram1D("Z_mass", 50, 66.0, 116.0);

Modified: trunk/src/Analyses/STAR_2006_S6870392.cc
==============================================================================
--- trunk/src/Analyses/STAR_2006_S6870392.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Analyses/STAR_2006_S6870392.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -28,7 +28,7 @@
       FinalState fs(-2.0, 2.0);
       addProjection(fs, "FS");
       // R=0.4, pTmin=0, seed_threshold=0.5:
-      addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.4, 0.0, 0.5), "MidpointJets");
+      addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.4, 0.5), "MidpointJets");
 
       _h_jet_pT_MB = bookHistogram1D(1, 1, 1);
       _h_jet_pT_HT = bookHistogram1D(2, 1, 1);

Modified: trunk/src/Projections/FastJets.cc
==============================================================================
--- trunk/src/Projections/FastJets.cc	Thu Mar 18 10:01:56 2010	(r2338)
+++ trunk/src/Projections/FastJets.cc	Thu Mar 18 11:19:14 2010	(r2339)
@@ -16,12 +16,11 @@
 namespace Rivet {
 
 
-  FastJets::FastJets(const FinalState& fsp, JetAlgName alg, double rparameter, double pTmin, double seed_threshold)
+  FastJets::FastJets(const FinalState& fsp, JetAlgName alg, double rparameter, double seed_threshold)
     : JetAlg(fsp)
   {
     setName("FastJets");
     getLog() << Log::DEBUG << "R parameter = " << rparameter << endl;
-    getLog() << Log::DEBUG << "pT_min = " << pTmin << endl;
     getLog() << Log::DEBUG << "Seed threshold = " << seed_threshold << endl;
     //addProjection(fsp, "FS");
     if (alg == KT) {
@@ -47,10 +46,8 @@
         const double OVERLAP_THRESHOLD = 0.75;
         _plugin.reset(new fastjet::CDFMidPointPlugin(rparameter, OVERLAP_THRESHOLD, seed_threshold));
       } else if (alg == D0ILCONE) {
-        // There's a numerical instability in the D0 IL cone which makes it really hate a pTmin of zero!
-        const double MIN_ET = pTmin + (isZero(pTmin) ? 1E-10 : 0.0);
-        assert(MIN_ET > 1E-11);
-        _plugin.reset(new fastjet::D0RunIIConePlugin(rparameter, MIN_ET));
+        const double min_jet_Et = 6.0;
+        _plugin.reset(new fastjet::D0RunIIConePlugin(rparameter, min_jet_Et));
       } else if (alg == JADE) {
         _plugin.reset(new fastjet::JadePlugin());
       } else if (alg == TRACKJET) {


More information about the Rivet-svn mailing list