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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Oct 20 08:54:44 BST 2011


Author: fsiegert
Date: Thu Oct 20 08:54:44 2011
New Revision: 3451

Log:
Extend API of W/ZFinder to allow for specification of input final state in which to search for leptons/photons.

Modified:
   trunk/include/Rivet/Projections/WFinder.hh
   trunk/include/Rivet/Projections/ZFinder.hh
   trunk/src/Projections/WFinder.cc
   trunk/src/Projections/ZFinder.cc

Modified: trunk/include/Rivet/Projections/WFinder.hh
==============================================================================
--- trunk/include/Rivet/Projections/WFinder.hh	Wed Oct 19 17:16:36 2011	(r3450)
+++ trunk/include/Rivet/Projections/WFinder.hh	Thu Oct 20 08:54:44 2011	(r3451)
@@ -41,7 +41,8 @@
             double missingET,
             double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
             double masstarget=80.4,
-            bool useTransverseMass=false);
+            bool useTransverseMass=false,
+            FinalState inputfs=FinalState());
 
 
     /// Constructor taking multiple eta/pT bounds
@@ -62,7 +63,8 @@
             double missingET,
             double dRmax, bool clusterPhotons=true, bool trackPhotons=false,
             double masstarget=80.4,
-            bool useTransverseMass=false);
+            bool useTransverseMass=false,
+            FinalState inputfs=FinalState());
 
 
     /// Clone on the heap.
@@ -117,7 +119,8 @@
                double missingET,
                double dRmax, bool clusterPhotons, bool trackPhotons,
                double masstarget,
-               bool useTransverseMass);
+               bool useTransverseMass,
+               FinalState inputfs);
 
 
   private:

Modified: trunk/include/Rivet/Projections/ZFinder.hh
==============================================================================
--- trunk/include/Rivet/Projections/ZFinder.hh	Wed Oct 19 17:16:36 2011	(r3450)
+++ trunk/include/Rivet/Projections/ZFinder.hh	Thu Oct 20 08:54:44 2011	(r3451)
@@ -38,7 +38,8 @@
             PdgId pid,
             double minmass, double maxmass,
             double dRmax, bool clusterPhotons, bool trackPhotons,
-            double masstarget=91.2*GeV);
+            double masstarget=91.2*GeV,
+            FinalState inputfs=FinalState());
 
 
     /// Constructor taking multiple eta/pT bounds
@@ -55,7 +56,8 @@
             PdgId pid,
             double minmass, const double maxmass,
             double dRmax, bool clusterPhotons, bool trackPhotons,
-            double masstarget=91.2*GeV);
+            double masstarget=91.2*GeV,
+            FinalState inputfs=FinalState());
 
 
     /// Clone on the heap.
@@ -103,7 +105,8 @@
                double pTmin,  PdgId pid,
                double minmass, double maxmass,
                double dRmax, bool clusterPhotons, bool trackPhotons,
-               double masstarget);
+               double masstarget,
+               FinalState inputfs);
 
     /// Mass cuts to apply to clustered leptons (cf. InvMassFinalState)
     double _minmass, _maxmass, _masstarget;

Modified: trunk/src/Projections/WFinder.cc
==============================================================================
--- trunk/src/Projections/WFinder.cc	Wed Oct 19 17:16:36 2011	(r3450)
+++ trunk/src/Projections/WFinder.cc	Thu Oct 20 08:54:44 2011	(r3451)
@@ -19,11 +19,12 @@
                    double missingET,
                    double dRmax, bool clusterPhotons, bool trackPhotons,
                    double masstarget,
-                   bool useTransverseMass) {
+                   bool useTransverseMass,
+                   FinalState inputfs) {
     vector<pair<double, double> > etaRanges;
     etaRanges += std::make_pair(etaMin, etaMax);
     _init(etaRanges, pTmin, pid, minmass, maxmass, missingET,
-          dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass);
+          dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass, inputfs);
   }
 
 
@@ -34,9 +35,10 @@
                    double missingET,
                    double dRmax, bool clusterPhotons, bool trackPhotons,
                    double masstarget,
-                   bool useTransverseMass) {
+                   bool useTransverseMass,
+                   FinalState inputfs) {
     _init(etaRanges, pTmin, pid, minmass, maxmass, missingET,
-          dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass);
+          dRmax, clusterPhotons, trackPhotons, masstarget, useTransverseMass, inputfs);
   }
 
 
@@ -47,7 +49,8 @@
                       double missingET,
                       double dRmax, bool clusterPhotons, bool trackPhotons,
                       double masstarget,
-                      bool useTransverseMass)
+                      bool useTransverseMass,
+                      FinalState inputfs)
   {
     setName("WFinder");
 
@@ -64,21 +67,20 @@
     assert(abs(_nu_pid) == NU_E || abs(_nu_pid) == NU_MU);
 
     // Don't make pT or eta cuts on the neutrino
-    IdentifiedFinalState neutrinos;
+    IdentifiedFinalState neutrinos(inputfs);
     neutrinos.acceptNeutrinos();
     addProjection(neutrinos, "Neutrinos");
 
     // Lepton clusters
-    FinalState fs;
-    IdentifiedFinalState bareleptons(fs);
+    IdentifiedFinalState bareleptons(inputfs);
     bareleptons.acceptIdPair(pid);
-    LeptonClusters leptons(fs, bareleptons, dRmax,
+    LeptonClusters leptons(inputfs, bareleptons, dRmax,
                            clusterPhotons,
                            etaRanges, pTmin);
     addProjection(leptons, "LeptonClusters");
 
     // Add MissingMomentum proj to calc MET
-    MissingMomentum vismom(fs);
+    MissingMomentum vismom(inputfs);
     addProjection(vismom, "MissingET");
     // Set ETmiss
     _etMiss = missingET;

Modified: trunk/src/Projections/ZFinder.cc
==============================================================================
--- trunk/src/Projections/ZFinder.cc	Wed Oct 19 17:16:36 2011	(r3450)
+++ trunk/src/Projections/ZFinder.cc	Thu Oct 20 08:54:44 2011	(r3451)
@@ -15,10 +15,11 @@
                    PdgId pid,
                    double minmass, double maxmass,
                    double dRmax, bool clusterPhotons, bool trackPhotons,
-                   double masstarget) {
+                   double masstarget,
+                   FinalState inputfs) {
     vector<pair<double, double> > etaRanges;
     etaRanges += std::make_pair(etaMin, etaMax);
-    _init(etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget);
+    _init(etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget, inputfs);
   }
 
 
@@ -27,8 +28,9 @@
                    PdgId pid,
                    double minmass, const double maxmass,
                    double dRmax, bool clusterPhotons, bool trackPhotons,
-                   double masstarget) {
-    _init(etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget);
+                   double masstarget,
+                   FinalState inputfs) {
+    _init(etaRanges, pTmin, pid, minmass, maxmass, dRmax, clusterPhotons, trackPhotons, masstarget, inputfs);
   }
 
 
@@ -36,7 +38,8 @@
                       double pTmin,  PdgId pid,
                       double minmass, double maxmass,
                       double dRmax, bool clusterPhotons, bool trackPhotons,
-                      double masstarget)
+                      double masstarget,
+                      FinalState inputfs)
   {
     setName("ZFinder");
 
@@ -46,10 +49,9 @@
     _pid = pid;
     _trackPhotons = trackPhotons;
 
-    FinalState fs;
-    IdentifiedFinalState bareleptons(fs);
+    IdentifiedFinalState bareleptons(inputfs);
     bareleptons.acceptIdPair(pid);
-    LeptonClusters leptons(fs, bareleptons, dRmax,
+    LeptonClusters leptons(inputfs, bareleptons, dRmax,
                            clusterPhotons,
                            etaRanges, pTmin);
     addProjection(leptons, "LeptonClusters");


More information about the Rivet-svn mailing list