[Rivet-svn] r2182 - in trunk: . data/anainfo include/Rivet/Projections src/Analyses

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Sat Dec 12 00:15:40 GMT 2009


Author: buckley
Date: Sat Dec 12 00:15:39 2009
New Revision: 2182

Log:
Removing few remaining uses of PVertex in analyses (and many more unnecessary #includes of it and other projections)

Modified:
   trunk/ChangeLog
   trunk/data/anainfo/MC_LEADINGJETS.info
   trunk/data/anainfo/MC_TTBAR.info
   trunk/include/Rivet/Projections/SVertex.hh
   trunk/src/Analyses/CDF_1990_S2089246.cc
   trunk/src/Analyses/CDF_1994_S2952106.cc
   trunk/src/Analyses/CDF_2005_S6217184.cc
   trunk/src/Analyses/CDF_2008_S7541902.cc
   trunk/src/Analyses/CDF_2008_S7782535.cc
   trunk/src/Analyses/D0_2001_S4674421.cc
   trunk/src/Analyses/D0_2008_S6879055.cc
   trunk/src/Analyses/UA1_1990_S2044935.cc

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/ChangeLog	Sat Dec 12 00:15:39 2009	(r2182)
@@ -1,3 +1,9 @@
+2009-12-11  Andy Buckley  <andy at insectnation.org>
+
+	* Removing use of PVertex from few remaining analyses. Still used
+	by SVertex, which is itself hardly used and could maybe be
+	removed...
+
 2009-12-10  Andy Buckley  <andy at insectnation.org>
 
 	* Updating JADE_OPAL to do the histo booking in init(), since

Modified: trunk/data/anainfo/MC_LEADINGJETS.info
==============================================================================
--- trunk/data/anainfo/MC_LEADINGJETS.info	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/data/anainfo/MC_LEADINGJETS.info	Sat Dec 12 00:15:39 2009	(r2182)
@@ -4,10 +4,10 @@
 Authors:
  - Andy Buckley <andy.buckley at cern.ch>
 RunInfo:
-  * LHC pp QCD interactions at 0.9, 10 or 14 TeV.
+  "* LHC pp QCD interactions at 0.9, 10 or 14 TeV.
   * Particles with $c \tau > {}$10 mm should be set stable.
   * Several $pT^\text{min}$ cutoffs are probably required to fill the
-    profile histograms. 
+    profile histograms."
 NumEvents: 1000000
 PtCuts: [0]
 Description:

Modified: trunk/data/anainfo/MC_TTBAR.info
==============================================================================
--- trunk/data/anainfo/MC_TTBAR.info	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/data/anainfo/MC_TTBAR.info	Sat Dec 12 00:15:39 2009	(r2182)
@@ -5,8 +5,8 @@
  - Holger Schulz <hschulz at physik.hu-berlin.de>
  - Andy Buckley <andy.buckley at cern.ch>
 RunInfo:
-  * For Pythia6, set MSEL=6.
-  * For Fortran Herwig/Jimmy select IPROC=1706.
+  "* For Pythia6, set MSEL=6.
+  * For Fortran Herwig/Jimmy select IPROC=1706."
 NumEvents: 10000
 PtCuts: [0]
 Description:

Modified: trunk/include/Rivet/Projections/SVertex.hh
==============================================================================
--- trunk/include/Rivet/Projections/SVertex.hh	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/include/Rivet/Projections/SVertex.hh	Sat Dec 12 00:15:39 2009	(r2182)
@@ -8,17 +8,15 @@
 #include "Rivet/Projections/ChargedFinalState.hh"
 #include "Rivet/Event.hh"
 
-
 namespace Rivet {
 
 
   /**
      @brief Determine secondary vertices.
-  
+     
      Makes use of PVertex projection.
 
      @todo Replace function with a functor to improve equality comparisons.
-     @todo Why does SVertex inherit from PVertex? Anything that can't be done with composition?
 
      Complex cuts on tracks and vertices to validate them have to be provided
      by an external function
@@ -40,7 +38,6 @@
      A list of tagged jets can be obtained via the getTaggedJets() function
   */
   class SVertex : public Projection {
-
   public:
 
     /// @name Standard constructors and destructors.

Modified: trunk/src/Analyses/CDF_1990_S2089246.cc
==============================================================================
--- trunk/src/Analyses/CDF_1990_S2089246.cc	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/src/Analyses/CDF_1990_S2089246.cc	Sat Dec 12 00:15:39 2009	(r2182)
@@ -55,8 +55,7 @@
         _hist_eta->fill(fabs(eta), weight);
       }
     }
- 
- 
+  
  
     /// Finalize
     void finalize() {

Modified: trunk/src/Analyses/CDF_1994_S2952106.cc
==============================================================================
--- trunk/src/Analyses/CDF_1994_S2952106.cc	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/src/Analyses/CDF_1994_S2952106.cc	Sat Dec 12 00:15:39 2009	(r2182)
@@ -5,27 +5,22 @@
 #include "Rivet/Projections/VetoedFinalState.hh"
 #include "Rivet/Projections/TotalVisibleMomentum.hh"
 #include "Rivet/Projections/FastJets.hh"
-#include "Rivet/Projections/PVertex.hh"
 
 namespace Rivet {
 
 
   /* @brief CDF Run I color coherence analysis
    * @author Lars Sonnenschein
+   * @todo BROKEN!
    */
   class CDF_1994_S2952106 : public Analysis {
   public:
 
     /// Constructor
-    CDF_1994_S2952106()
-      : Analysis("CDF_1994_S2952106"),
-        _pvzmax(600*mm), _leadJetPt(100*GeV), _3rdJetPt(10*GeV),
-        _etamax(0.7), _phimin(PI/18.0), _metsetmax(6.0*GeV)
+    CDF_1994_S2952106() : Analysis("CDF_1994_S2952106")
     {
       setBeams(PROTON, ANTIPROTON);
-      setNeedsCrossSection(true);
-         
-      _events3jPassed = 0.0;
+      // setNeedsCrossSection(true);
     }
 
 
@@ -37,7 +32,6 @@
       addProjection(fs, "FS");
       addProjection(FastJets(fs, FastJets::CDFJETCLU, 0.7), "ConeJets");
       addProjection(TotalVisibleMomentum(fs), "CalMET");
-      addProjection(PVertex(), "PV");
    
       // Veto (anti)neutrinos, and muons with pT above 1.0 GeV
       VetoedFinalState vfs(fs);
@@ -92,19 +86,11 @@
     void analyze(const Event & event) {
       const Jets jets = applyProjection<FastJets>(event, "ConeJets").jetsByPt();
       getLog() << Log::DEBUG << "Jet multiplicity before any cuts = " << jets.size() << endl;
-   
-      // Find vertex and check  that its z-component is < 60 cm from the nominal IP
-      const PVertex& pv = applyProjection<PVertex>(event, "PV");
-      if (fabs(pv.position().z())/mm > _pvzmax) {
-        vetoEvent;
-      }
-   
+      
       // Check there isn't too much missing Et
       const TotalVisibleMomentum& caloMissEt = applyProjection<TotalVisibleMomentum>(event, "CalMET");
       getLog() << Log::DEBUG << "Missing pT = " << caloMissEt.momentum().pT()/GeV << " GeV" << endl;
-      if ((caloMissEt.momentum().pT()/GeV) / sqrt(caloMissEt.scalarET()/GeV) > _metsetmax) {
-        vetoEvent;
-      }
+      if ((caloMissEt.momentum().pT()/GeV)/sqrt(caloMissEt.scalarET()/GeV) > 6.0) vetoEvent;
    
       // Check jet requirements
       if (jets.size() < 3) vetoEvent;
@@ -112,10 +98,10 @@
    
       // More jet 1,2,3 checks
       FourMomentum pj1(jets[0].momentum()), pj2(jets[1].momentum()), pj3(jets[2].momentum());
-      if (fabs(pj1.eta()) > _etamax || fabs(pj2.eta()) > _etamax) vetoEvent;
+      if (fabs(pj1.eta()) > 0.7 || fabs(pj2.eta()) > 0.7) vetoEvent;
       getLog() << Log::DEBUG << "Jet 1 & 2 eta, pT requirements fulfilled" << endl;
    
-      if (deltaPhi(pj1.phi(), pj2.phi()) > _phimin) vetoEvent;
+      if (deltaPhi(pj1.phi(), pj2.phi()) > PI/18.0) vetoEvent;
       getLog() << Log::DEBUG << "Jet 1 & 2 phi requirement fulfilled" << endl;
    
       const double weight = event.weight();
@@ -125,9 +111,8 @@
       _histJet3eta->fill(pj3.eta(), weight);
    
       // Next cut only required for alpha studies
-      if (pj3.pT() < _3rdJetPt) vetoEvent;
+      if (pj3.pT()/GeV < 10.0) vetoEvent;
       getLog() << Log::DEBUG << "3rd jet passes alpha histo pT cut" << endl;
-      _events3jPassed += weight;
    
       // Calc and plot alpha
       const double dPhi = deltaPhi(pj3.phi(), pj2.phi());
@@ -154,7 +139,7 @@
       // }
       /// @todo Same correction to be applied for _hisR23 and _histJet3eta histograms
    
-      getLog() << Log::INFO << "Cross-section = " << crossSection()/picobarn << " pb" << endl;
+      //getLog() << Log::INFO << "Cross-section = " << crossSection()/picobarn << " pb" << endl;
       normalize(_histJet1Et);
       normalize(_histJet2Et);
       normalize(_histR23);
@@ -164,36 +149,6 @@
 
     //@}
 
-  private:
-
-    /// Counter for the number of events analysed
-    double _eventsTried;
-
-    /// Counter for the number of  3jet events passed
-    double _events3jPassed;
-
-
-    /// @name Analysis cuts
-    //@{
-    ///Cut on primary vertex z-position (z(PV) < 60 cm)
-    const double _pvzmax;
-
-    /// Min \f$ p_T \f$ of the leading and 3rd leading jets.
-    //@{
-    const double _leadJetPt;
-    const double _3rdJetPt;
-    //@}
-
-    /// Max pseudorapidity range of 2nd and 3rd leading jets.
-    const double _etamax;
-
-    /// Delta phi (azimuthal angle) requirement (transverse back to back'ness).
-    const double _phimin;
-
-    /// MET over sqrt(scalar \f$ E_T \f$) cut requirement.
-    const double _metsetmax;
-    //@}
-
 
   private:
 

Modified: trunk/src/Analyses/CDF_2005_S6217184.cc
==============================================================================
--- trunk/src/Analyses/CDF_2005_S6217184.cc	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/src/Analyses/CDF_2005_S6217184.cc	Sat Dec 12 00:15:39 2009	(r2182)
@@ -3,7 +3,6 @@
 #include "Rivet/RivetAIDA.hh"
 #include "Rivet/Tools/Logging.hh"
 #include "Rivet/Projections/FastJets.hh"
-#include "Rivet/Projections/PVertex.hh"
 #include "Rivet/Projections/TotalVisibleMomentum.hh"
 #include "Rivet/Projections/JetShape.hh"
 
@@ -33,7 +32,6 @@
       addProjection(fs, "FS");
       addProjection(FastJets(fs, FastJets::CDFMIDPOINT, 0.7), "Jets");
       addProjection(TotalVisibleMomentum(fs), "CalMET");
-      addProjection(PVertex(), "PV");
    
       // Veto (anti)neutrinos, and muons with pT above 1.0 GeV
       VetoedFinalState vfs(fs);

Modified: trunk/src/Analyses/CDF_2008_S7541902.cc
==============================================================================
--- trunk/src/Analyses/CDF_2008_S7541902.cc	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/src/Analyses/CDF_2008_S7541902.cc	Sat Dec 12 00:15:39 2009	(r2182)
@@ -6,13 +6,7 @@
 #include "Rivet/Projections/FinalState.hh"
 #include "Rivet/Projections/VetoedFinalState.hh"
 #include "Rivet/Projections/InvMassFinalState.hh"
-#include "Rivet/Projections/ChargedFinalState.hh"
-#include "Rivet/Projections/ChargedLeptons.hh"
-#include "Rivet/Projections/TotalVisibleMomentum.hh"
 #include "Rivet/Projections/FastJets.hh"
-#include "Rivet/Projections/ChargedLeptons.hh"
-#include "Rivet/Projections/PVertex.hh"
-#include "Rivet/Projections/SVertex.hh"
 #include <algorithm>
 
 namespace Rivet {
@@ -24,7 +18,6 @@
   /// as well as the jet multiplicity distribution in W + jets events.
   /// e-Print: arXiv:0711.4044 [hep-ex]
   class CDF_2008_S7541902 : public Analysis {
-
   public:
 
     /// Constructor
@@ -63,7 +56,6 @@
       addProjection(vfs, "VFS");
       addProjection(FastJets(vfs, FastJets::CDFJETCLU, 0.4), "Jets");
 
-
       // Book histograms
       for (int i = 0 ; i < 4 ; ++i) {
         _histJetEt[i] = bookHistogram1D(i+1, 1, 1);

Modified: trunk/src/Analyses/CDF_2008_S7782535.cc
==============================================================================
--- trunk/src/Analyses/CDF_2008_S7782535.cc	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/src/Analyses/CDF_2008_S7782535.cc	Sat Dec 12 00:15:39 2009	(r2182)
@@ -3,9 +3,8 @@
 #include "Rivet/RivetAIDA.hh"
 #include "Rivet/Tools/Logging.hh"
 #include "Rivet/Tools/ParticleIdUtils.hh"
+#include "Rivet/Projections/FinalState.hh"
 #include "Rivet/Projections/FastJets.hh"
-#include "Rivet/Projections/PVertex.hh"
-#include "Rivet/Projections/TotalVisibleMomentum.hh"
 #include "Rivet/Projections/JetShape.hh"
 
 namespace Rivet {
@@ -16,11 +15,11 @@
   public:
 
     /// Constructor
-    CDF_2008_S7782535()
-      : Analysis("CDF_2008_S7782535"),
-        _Rjet(0.7) , _NpTbins(4)
+    CDF_2008_S7782535() : Analysis("CDF_2008_S7782535")
     {
       setBeams(PROTON, ANTIPROTON);
+      _Rjet = 0.7;
+      _NpTbins = 4;
     }
  
 

Modified: trunk/src/Analyses/D0_2001_S4674421.cc
==============================================================================
--- trunk/src/Analyses/D0_2001_S4674421.cc	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/src/Analyses/D0_2001_S4674421.cc	Sat Dec 12 00:15:39 2009	(r2182)
@@ -3,7 +3,6 @@
 #include "Rivet/RivetAIDA.hh"
 #include "Rivet/Tools/Logging.hh"
 #include "Rivet/Tools/ParticleIdUtils.hh"
-#include "Rivet/Projections/PVertex.hh"
 #include "Rivet/Projections/LeadingParticlesFinalState.hh"
 #include "Rivet/Projections/VetoedFinalState.hh"
 
@@ -19,16 +18,7 @@
     //@{
 
     /// Constructor.
-    //  - @c _mwmz = ratio of \f$ mW/mZ \f$ used in the publication analysis
-    //  - @c _brwenu = ratio of \f$ BR(W->e,nu) \f$ used in the publication analysis
-    //  - @c _brzee = ratio of \f$ BR(Z->ee) \f$ used in the publication analysis
-    //  - @c _mZmin = lower Z mass cut used in the publication analysis
-    //  - @c _mZmax = upper Z mass cut used in the publication analysis
-    D0_2001_S4674421()
-      : Analysis("D0_2001_S4674421"),
-        _mwmz(0.8820), _brwenu(0.1073), _brzee(0.033632),
-        _mZmin(75.*GeV), _mZmax(105.*GeV)
-    {
+    D0_2001_S4674421() : Analysis("D0_2001_S4674421") {
       setBeams(PROTON, ANTIPROTON);
       setNeedsCrossSection(true);
     }
@@ -69,6 +59,7 @@
       // Histograms
       _h_dsigdpt_w = bookHistogram1D(1, 1, 1);
       _h_dsigdpt_z = bookHistogram1D(1, 1, 2);
+      /// @todo Can't take this from ref data? 
       vector<double> bins(23);
       bins += 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 25, 30, 35, 40, 50, 60, 70, 80, 100, 120, 160, 200;
       _h_dsigdpt_scaled_z = bookHistogram1D("d01-x01-y03", bins);
@@ -87,12 +78,13 @@
         const ParticleVector& Zdaughters = eeFS.particles();
         const FourMomentum pmom = Zdaughters[0].momentum() + Zdaughters[1].momentum();
         double mass = sqrt(pmom.invariant());
-        if (mass/GeV > _mZmin && mass/GeV < _mZmax) {
+        if (inRange(mass/GeV, 75.0, 105.0)) {
           ++Zcount;
           _eventsFilledZ += weight;
           getLog() << Log::DEBUG << "Z #" << Zcount << " pmom.pT() = " << pmom.pT()/GeV << " GeV" << endl;
+          const double MW_MZ = 0.8820; // Ratio M_W/M_Z
           _h_dsigdpt_z->fill(pmom.pT()/GeV, weight);
-          _h_dsigdpt_scaled_z->fill(pmom.pT()/GeV * _mwmz, weight);
+          _h_dsigdpt_scaled_z->fill(pmom.pT()/GeV * MW_MZ, weight);
         }
       } else {
         // There is no Z -> ee candidate... so this must be a W event, right?
@@ -121,7 +113,7 @@
 
     void finalize() {
       // Get cross-section per event (i.e. per unit weight) from generator
-      const double xSecPerEvent = crossSection()/picobarn / sumOfWeights();
+      const double xSecPerEvent = crossSectionPerEvent()/picobarn;
 
       // Correct W pT distribution to W cross-section
       const double xSecW = xSecPerEvent * _eventsFilledW;
@@ -141,7 +133,8 @@
       } 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.
-        const double scalefactor = (xSecW / wpt_integral) / (xSecZ / zpt_scaled_integral) * (_brzee / _brwenu);
+        const double BRZEE_BRWENU = 0.033632 / 0.1073;
+        const double scalefactor = (xSecW / wpt_integral) / (xSecZ / zpt_scaled_integral) * BRZEE_BRWENU;
         for (int pt = 0; pt < div->size(); ++pt) {
           assert(div->point(pt)->dimension() == 2);
           AIDA::IMeasurement* m = div->point(pt)->coordinate(1);
@@ -162,30 +155,19 @@
     //@}
  
   private:
- 
-    /// Analysis used ratio of mW/mZ
-    const double _mwmz;
- 
-    /// Ratio of \f$ BR(W->e,nu) \f$ used in the publication analysis
-    const double _brwenu;
- 
-    /// Ratio of \f$ \text{BR}( Z \to e^+ e^-) \f$ used in the publication analysis
-    const double _brzee;
- 
-    /// Invariant mass cuts for Z boson candidate (75 GeV < mZ < 105 GeV)
-    const double _mZmin, _mZmax;
-
 
-    // Event counters for cross section normalizations
+    /// @name Event counters for cross section normalizations
+    //@{
     double _eventsFilledW;
     double _eventsFilledZ;
- 
+    //@}
+
     //@{
     /// Histograms
     AIDA::IHistogram1D* _h_dsigdpt_w;
     AIDA::IHistogram1D* _h_dsigdpt_z;
     AIDA::IHistogram1D* _h_dsigdpt_scaled_z;
-   //@}
+    //@}
 
   };
 

Modified: trunk/src/Analyses/D0_2008_S6879055.cc
==============================================================================
--- trunk/src/Analyses/D0_2008_S6879055.cc	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/src/Analyses/D0_2008_S6879055.cc	Sat Dec 12 00:15:39 2009	(r2182)
@@ -6,7 +6,6 @@
 #include "Rivet/Projections/LeadingParticlesFinalState.hh"
 #include "Rivet/Projections/InvMassFinalState.hh"
 #include "Rivet/Projections/VetoedFinalState.hh"
-#include "Rivet/Projections/PVertex.hh"
 #include "Rivet/Projections/FastJets.hh"
 
 namespace Rivet {
@@ -53,10 +52,6 @@
       FastJets jets(vfs, FastJets::D0ILCONE, 0.5, 20.0*GeV);
       addProjection(jets, "Jets");
    
-      // Vertex
-      PVertex vertex;
-      addProjection(vertex, "PrimaryVertex");
-
       _crossSectionRatio = bookHistogram1D(1, 1, 1);
       _pTjet1 = bookHistogram1D(2, 1, 1);
       _pTjet2 = bookHistogram1D(3, 1, 1);
@@ -66,22 +61,11 @@
  
  
     /// Do the analysis
-    void analyze(const Event& event) {
-      const double weight = event.weight();
-   
+    void analyze(const Event& event) {   
       // Skip if the event is empty
       const FinalState& fs = applyProjection<FinalState>(event, "FS");
-      if (fs.empty()) {
-        vetoEvent;
-      }
-   
-      // Check that the primary vertex is within 60 cm in z from (0,0,0)
-      const PVertex& vertex = applyProjection<PVertex>(event, "PrimaryVertex");
-      getLog() << Log::DEBUG << "Primary vertex is at " << vertex.position()/cm << " cm" << endl;
-      if (fabs(vertex.position().z())/cm > 60) {
-        getLog() << Log::DEBUG << "Vertex z-position " << vertex.position().z()/cm << " is outside cuts" << endl;
-        vetoEvent;
-      }
+      if (fs.empty()) vetoEvent;
+      const double weight = event.weight();
    
       // Find the Z candidates
       const InvMassFinalState& invmassfs = applyProjection<InvMassFinalState>(event, "ElectronsFromZ");
@@ -144,12 +128,12 @@
       // Now divide by the inclusive result
       _crossSectionRatio->scale(1.0/_crossSectionRatio->binHeight(0));
    
-      // Normalise jet pT's to integral of data
+      // Normalise jet pTs to integrals of data
       // NB. There is no other way to do this, because these quantities are not
       // detector-corrected
-      normalize(_pTjet1, 10439.0);
-      normalize(_pTjet2, 1461.5);
-      normalize(_pTjet3, 217.0);
+      normalize(_pTjet1, 10439.0); // fixed norm OK
+      normalize(_pTjet2, 1461.5); // fixed norm OK
+      normalize(_pTjet3, 217.0); // fixed norm OK
     }
  
     //@}

Modified: trunk/src/Analyses/UA1_1990_S2044935.cc
==============================================================================
--- trunk/src/Analyses/UA1_1990_S2044935.cc	Fri Dec 11 16:33:59 2009	(r2181)
+++ trunk/src/Analyses/UA1_1990_S2044935.cc	Sat Dec 12 00:15:39 2009	(r2182)
@@ -4,8 +4,6 @@
 #include "Rivet/Tools/ParticleIdUtils.hh"
 #include "Rivet/Projections/FinalState.hh"
 #include "Rivet/Projections/ChargedFinalState.hh"
-#include "Rivet/Projections/Beam.hh"
-#include "Rivet/Projections/PVertex.hh"
 #include "Rivet/Projections/TotalVisibleMomentum.hh"
 
 namespace Rivet {
@@ -32,7 +30,6 @@
     void init() {
       addProjection(ChargedFinalState(-5.5, 5.5), "TriggerFS");
       addProjection(ChargedFinalState(-2.5, 2.5), "TrackFS");
-      addProjection(Beam(), "Beam");
       const FinalState calofs(-6.0, 6.0);
       addProjection(TotalVisibleMomentum(calofs), "Mom");
 


More information about the Rivet-svn mailing list