[Rivet-svn] r3423 - in branches/2011-07-aida2yoda: data/anainfo include/Rivet include/Rivet/Math src/Analyses src/Projections

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Oct 6 22:12:14 BST 2011


Author: hoeth
Date: Thu Oct  6 22:12:14 2011
New Revision: 3423

Log:
merge r3379-3382 and r3422 from trunk

Added:
   branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9108483.info
      - copied unchanged from r3379, trunk/data/anainfo/ATLAS_2011_S9108483.info
   branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9108483.cc
      - copied, changed from r3379, trunk/src/Analyses/ATLAS_2011_S9108483.cc
Modified:
   branches/2011-07-aida2yoda/data/anainfo/Makefile.am
   branches/2011-07-aida2yoda/include/Rivet/Math/MathUtils.hh
   branches/2011-07-aida2yoda/include/Rivet/RivetSTL.hh
   branches/2011-07-aida2yoda/src/Analyses/Makefile.am
   branches/2011-07-aida2yoda/src/Projections/NonHadronicFinalState.cc
   branches/2011-07-aida2yoda/src/Projections/Thrust.cc

Copied: branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9108483.info (from r3379, trunk/data/anainfo/ATLAS_2011_S9108483.info)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2011-07-aida2yoda/data/anainfo/ATLAS_2011_S9108483.info	Thu Oct  6 22:12:14 2011	(r3423, copy of r3379, trunk/data/anainfo/ATLAS_2011_S9108483.info)
@@ -0,0 +1,35 @@
+Name: ATLAS_2011_S9108483
+Year: 2011
+Summary: Long-lived heavy charged particle search
+Experiment: ATLAS
+Collider: LHC
+SpiresID: 9108483
+Status: UNVALIDATED
+Authors:
+ - Peter Richardson <Peter.Richardson at durham.ac.uk>
+References:
+ - arXiv:arXiv:1106.4495
+RunInfo:
+  BSM signal events at 7000 GeV.
+NumEvents: 25000 for BSM signals
+Beams: [p+, p+]
+Energies: [7000]
+Description:
+  'ATLAS search for long-lived heavy charged particles for four different mass cuts. Currently only the slepton search is implemented.'
+BibKey: Aad:2011hz
+BibTeX: '@Article{Aad:2011hz,
+     author    = "Aad, Georges and others",
+ collaboration = "ATLAS",
+     title     = "{Search for Heavy Long-Lived Charged Particles with the
+                  ATLAS detector in pp collisions at sqrt(s) = 7 TeV}",
+     journal   = "Phys. Lett.",
+     volume    = "B703",
+     year      = "2011",
+     pages     = "428-446",
+     eprint    = "1106.4495",
+     archivePrefix = "arXiv",
+     primaryClass  =  "hep-ex",
+     doi       = "10.1016/j.physletb.2011.08.042",
+     SLACcitation  = "%%CITATION = 1106.4495;%%"
+}
+'

Modified: branches/2011-07-aida2yoda/data/anainfo/Makefile.am
==============================================================================
--- branches/2011-07-aida2yoda/data/anainfo/Makefile.am	Thu Oct  6 22:11:17 2011	(r3422)
+++ branches/2011-07-aida2yoda/data/anainfo/Makefile.am	Thu Oct  6 22:12:14 2011	(r3423)
@@ -29,6 +29,7 @@
   ATLAS_2011_S9128077.info \
   ATLAS_2011_S9131140.info \
   ATLAS_2011_I919017.info \
+  ATLAS_2011_S9108483.info \
   BELLE_2006_S6265367.info \
   CDF_1988_S1865951.info \
   CDF_1990_S2089246.info \

Modified: branches/2011-07-aida2yoda/include/Rivet/Math/MathUtils.hh
==============================================================================
--- branches/2011-07-aida2yoda/include/Rivet/Math/MathUtils.hh	Thu Oct  6 22:11:17 2011	(r3422)
+++ branches/2011-07-aida2yoda/include/Rivet/Math/MathUtils.hh	Thu Oct  6 22:12:14 2011	(r3423)
@@ -180,7 +180,7 @@
     assert(exp >= 0);
     if (exp == 0) return (Num) 1;
     else if (exp == 1) return val;
-    else return val * intpow(val, exp-1);
+    return val * intpow(val, exp-1);
   }
 
   /// Find the sign of a number

Modified: branches/2011-07-aida2yoda/include/Rivet/RivetSTL.hh
==============================================================================
--- branches/2011-07-aida2yoda/include/Rivet/RivetSTL.hh	Thu Oct  6 22:11:17 2011	(r3422)
+++ branches/2011-07-aida2yoda/include/Rivet/RivetSTL.hh	Thu Oct  6 22:12:14 2011	(r3423)
@@ -43,6 +43,7 @@
   using std::cin;
   using std::cerr;
   using std::setw;
+  using std::pow;
   using std::endl;
 
 }

Copied and modified: branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9108483.cc (from r3379, trunk/src/Analyses/ATLAS_2011_S9108483.cc)
==============================================================================
--- trunk/src/Analyses/ATLAS_2011_S9108483.cc	Thu Sep 22 08:13:50 2011	(r3379, copy source)
+++ branches/2011-07-aida2yoda/src/Analyses/ATLAS_2011_S9108483.cc	Thu Oct  6 22:12:14 2011	(r3423)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 #include "Rivet/Analysis.hh"
 #include "Rivet/Tools/BinnedHistogram.hh"
-#include "Rivet/RivetAIDA.hh"
+#include "Rivet/RivetYODA.hh"
 #include "Rivet/Math/Constants.hh"
 #include "Rivet/Tools/ParticleIdUtils.hh"
 #include "Rivet/Tools/Logging.hh"
@@ -51,18 +51,18 @@
       addProjection(vfs,"VFS");
 
       /// Book histograms
-      _count_trigger   = bookHistogram1D("count_trigger"  , 1, 0., 1.);
-      _count_event     = bookHistogram1D("count_selection", 1, 0., 1.);
-      _count_quality   = bookHistogram1D("count_quality"  , 1, 0., 1.);
-      _count_beta      = bookHistogram1D("count_beta"     , 1, 0., 1.);
-      _count_90  = bookHistogram1D("count_90" , 1, 0., 1.);
-      _count_110 = bookHistogram1D("count_110", 1, 0., 1.);
-      _count_120 = bookHistogram1D("count_120", 1, 0., 1.);
-      _count_130 = bookHistogram1D("count_130", 1, 0., 1.);
-
-      _hist_beta = bookHistogram1D("beta",1000, 0.,   2.);
-      _hist_time = bookHistogram1D("time",1000, -50,  50.);
-      _hist_mass = bookHistogram1D("mass",  60, 5., 305.);
+      _count_trigger   = bookHisto1D("count_trigger"  , 1, 0., 1.);
+      _count_event     = bookHisto1D("count_selection", 1, 0., 1.);
+      _count_quality   = bookHisto1D("count_quality"  , 1, 0., 1.);
+      _count_beta      = bookHisto1D("count_beta"     , 1, 0., 1.);
+      _count_90  = bookHisto1D("count_90" , 1, 0., 1.);
+      _count_110 = bookHisto1D("count_110", 1, 0., 1.);
+      _count_120 = bookHisto1D("count_120", 1, 0., 1.);
+      _count_130 = bookHisto1D("count_130", 1, 0., 1.);
+
+      _hist_beta = bookHisto1D("beta",1000, 0.,   2.);
+      _hist_time = bookHisto1D("time",1000, -50,  50.);
+      _hist_mass = bookHisto1D("mass",  60, 5., 305.);
     }
 
 
@@ -89,19 +89,19 @@
       // event weight
       const double weight = event.weight();
       // get the charged final-state particles
-      ParticleVector charged = 
-	applyProjection<VetoedFinalState>(event,"VFS").particles();
+      ParticleVector charged =
+        applyProjection<VetoedFinalState>(event,"VFS").particles();
       // need at least two candidates
       if(charged.size()<2) vetoEvent;
       // number passing trigger
       _count_trigger->fill(0.5,weight);
       // Z mass veto
       foreach ( const Particle & mu1,charged ) {
-	foreach ( const Particle & mu2,charged ) {
-	  double mass = (mu1.momentum()+mu2.momentum()).mass();
-	  double diff = abs(mass-91.18);
-	  if(diff<10.) vetoEvent;
-	}
+        foreach ( const Particle & mu2,charged ) {
+          double mass = (mu1.momentum()+mu2.momentum()).mass();
+          double diff = abs(mass-91.18);
+          if(diff<10.) vetoEvent;
+        }
       }
       // number passing first event selection
       _count_event->fill(0.5,weight);
@@ -109,17 +109,17 @@
       // loop over the particles and find muons and heavy charged particles
       map<double,Particle> muonCandidates;
       foreach ( const Particle & mu,charged ) {
-	// calculate the smeared momentum
-	double pT     = mu.momentum().perp2();
-	double pmag   = sqrt(pT+sqr(mu.momentum().z()));
-	pT = sqrt(pT);
- 	double deltap = sqrt( sqr(csag*sqr(pmag)) +
-			      sqr(cms*mu.momentum().t()/GeV));
-	double psmear = rndGauss(deltap,pmag);
-	// keep particles with pT>40
- 	if(psmear/pmag*mu.momentum().perp()<40.*GeV||
-	   psmear/pmag*mu.momentum().perp()>1000.*GeV) continue;
-	muonCandidates.insert(make_pair(psmear,mu));
+        // calculate the smeared momentum
+        double pT     = mu.momentum().perp2();
+        double pmag   = sqrt(pT+sqr(mu.momentum().z()));
+        pT = sqrt(pT);
+        double deltap = sqrt( sqr(csag*sqr(pmag)) +
+                              sqr(cms*mu.momentum().t()/GeV));
+        double psmear = rndGauss(deltap,pmag);
+        // keep particles with pT>40
+        if(psmear/pmag*mu.momentum().perp()<40.*GeV||
+           psmear/pmag*mu.momentum().perp()>1000.*GeV) continue;
+        muonCandidates.insert(make_pair(psmear,mu));
       }
       // require two candidates
       if(muonCandidates.size()<2) vetoEvent;
@@ -128,39 +128,39 @@
       // now do the time of flight
       bool filled = false;
       for(map<double,Particle>::const_iterator it=muonCandidates.begin();
-	  it!=muonCandidates.end();++it) {
-	// true magnitude and pT of momentum
-	double pT     = it->second.momentum().perp2();
-	double pmag   = sqrt(pT+sqr(it->second.momentum().z()));
-	pT = sqrt(pT);
-	// true time difference in ns
-	double deltaT  =tr *(it->second.momentum().t()-pmag)/pT;
- 	// smear it
- 	deltaT = rndGauss(tsmear,deltaT);
-	// beta
-	double beta = 1./(1.+deltaT/tr*pT/pmag);
-	_hist_beta->fill(beta, weight);
-	_hist_time->fill(deltaT, weight);
-	// beta cut
-	if(beta<0.95) continue;
-	// mass
- 	double mass = 2.*pT*it->first*deltaT/tr*(1.+0.5*deltaT/tr*pT/pmag);
-	if(mass<0.) continue;
-	mass = sqrt(mass);
-	filled = true;
-	_hist_mass->fill(mass,weight);
-	if(mass>90. ) {
-	  _count_90 ->fill(0.5,weight);
-	  if(mass>110.) {
-	    _count_110->fill(0.5,weight);
-	    if(mass>120.) {
-	      _count_120->fill(0.5,weight);
-	      if(mass>130.) {
-		_count_130->fill(0.5,weight);
-	      }
-	    }
-	  }
-	}
+          it!=muonCandidates.end();++it) {
+        // true magnitude and pT of momentum
+        double pT     = it->second.momentum().perp2();
+        double pmag   = sqrt(pT+sqr(it->second.momentum().z()));
+        pT = sqrt(pT);
+        // true time difference in ns
+        double deltaT  =tr *(it->second.momentum().t()-pmag)/pT;
+        // smear it
+        deltaT = rndGauss(tsmear,deltaT);
+        // beta
+        double beta = 1./(1.+deltaT/tr*pT/pmag);
+        _hist_beta->fill(beta, weight);
+        _hist_time->fill(deltaT, weight);
+        // beta cut
+        if(beta<0.95) continue;
+        // mass
+        double mass = 2.*pT*it->first*deltaT/tr*(1.+0.5*deltaT/tr*pT/pmag);
+        if(mass<0.) continue;
+        mass = sqrt(mass);
+        filled = true;
+        _hist_mass->fill(mass,weight);
+        if(mass>90. ) {
+          _count_90 ->fill(0.5,weight);
+          if(mass>110.) {
+            _count_110->fill(0.5,weight);
+            if(mass>120.) {
+              _count_120->fill(0.5,weight);
+              if(mass>130.) {
+                _count_130->fill(0.5,weight);
+              }
+            }
+          }
+        }
       }
       if(!filled) vetoEvent;
       // number passing beta cut
@@ -168,11 +168,10 @@
     }
 
     //@}
-    
+
     void finalize() {
       double fact = crossSection()/sumOfWeights()*37;
-      cerr << "testing " << crossSection() << " " 
-	   << sumOfWeights() << " " << fact << "\n";
+      MSG_WARNING("testing " << crossSection() << " " << sumOfWeights() << " " << fact);
       scale(_hist_beta,fact);
       scale(_hist_time,fact);
       scale(_hist_mass,fact);
@@ -190,17 +189,17 @@
 
     /// @name Histograms
     //@{
-    AIDA::IHistogram1D* _hist_beta;
-    AIDA::IHistogram1D* _hist_time;
-    AIDA::IHistogram1D* _hist_mass;
-    AIDA::IHistogram1D* _count_trigger;
-    AIDA::IHistogram1D* _count_event;
-    AIDA::IHistogram1D* _count_quality;
-    AIDA::IHistogram1D* _count_beta;
-    AIDA::IHistogram1D* _count_90;
-    AIDA::IHistogram1D* _count_110;
-    AIDA::IHistogram1D* _count_120;
-    AIDA::IHistogram1D* _count_130;
+    Histo1DPtr _hist_beta;
+    Histo1DPtr _hist_time;
+    Histo1DPtr _hist_mass;
+    Histo1DPtr _count_trigger;
+    Histo1DPtr _count_event;
+    Histo1DPtr _count_quality;
+    Histo1DPtr _count_beta;
+    Histo1DPtr _count_90;
+    Histo1DPtr _count_110;
+    Histo1DPtr _count_120;
+    Histo1DPtr _count_130;
     //@}
 
     // som of weights
@@ -208,8 +207,8 @@
 
   };
 
-  // This global object acts as a hook for the plugin system
-  AnalysisBuilder<ATLAS_2011_S9108483> plugin_ATLAS_2011_S9108483;
+  // The hook for the plugin system
+  DECLARE_RIVET_PLUGIN(ATLAS_2011_S9108483);
 
 
 }

Modified: branches/2011-07-aida2yoda/src/Analyses/Makefile.am
==============================================================================
--- branches/2011-07-aida2yoda/src/Analyses/Makefile.am	Thu Oct  6 22:11:17 2011	(r3422)
+++ branches/2011-07-aida2yoda/src/Analyses/Makefile.am	Thu Oct  6 22:12:14 2011	(r3423)
@@ -67,7 +67,8 @@
     ATLAS_2011_S9019561.cc \
     ATLAS_2011_S9041966.cc \
     ATLAS_2011_CONF_2011_090.cc \
-    ATLAS_2011_CONF_2011_098.cc
+    ATLAS_2011_CONF_2011_098.cc \
+    ATLAS_2011_S9108483.cc
 endif
 
 

Modified: branches/2011-07-aida2yoda/src/Projections/NonHadronicFinalState.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/NonHadronicFinalState.cc	Thu Oct  6 22:11:17 2011	(r3422)
+++ branches/2011-07-aida2yoda/src/Projections/NonHadronicFinalState.cc	Thu Oct  6 22:12:14 2011	(r3423)
@@ -22,7 +22,7 @@
     _theParticles.clear();
     std::remove_copy_if(fs.particles().begin(), fs.particles().end(),
                         std::back_inserter(_theParticles), nonHadronFilter);
-    MSG_DEBUG("Number of hadronic final-state particles = "
+    MSG_DEBUG("Number of non-hadronic final-state particles = "
              << _theParticles.size());
   }
 

Modified: branches/2011-07-aida2yoda/src/Projections/Thrust.cc
==============================================================================
--- branches/2011-07-aida2yoda/src/Projections/Thrust.cc	Thu Oct  6 22:11:17 2011	(r3422)
+++ branches/2011-07-aida2yoda/src/Projections/Thrust.cc	Thu Oct  6 22:12:14 2011	(r3423)
@@ -46,11 +46,10 @@
 
   // Do the general case thrust calculation
   void _calcT(const vector<Vector3>& momenta, double& t, Vector3& taxis) {
-    /* This function implements the iterative algorithm as described in the
-     * Pythia manual. We take eight (four) different starting vectors
-     * constructed from the four (three) leading particles to make sure that
-     * we don't find a local maximum.
-     */
+    // This function implements the iterative algorithm as described in the
+    // Pythia manual. We take eight (four) different starting vectors
+    // constructed from the four (three) leading particles to make sure that
+    // we don't find a local maximum.
     vector<Vector3> p = momenta;
     assert(p.size() >= 3);
     unsigned int n = 3;
@@ -58,13 +57,13 @@
     vector<Vector3> tvec;
     vector<double> tval;
     std::sort(p.begin(), p.end(), mod2Cmp);
-    for (unsigned int i=0 ; i<pow(2,n-1) ; i++) {
+    for (int i = 0 ; i < intpow(2, n-1); ++i) {
       // Create an initial vector from the leading four jets
       Vector3 foo(0,0,0);
-      int sign=i;
-      for (unsigned int k=0 ; k<n ; k++) {
-        (sign%2)==1 ? foo+=p[k] : foo-=p[k];
-        sign/=2;
+      int sign = i;
+      for (unsigned int k = 0 ; k < n ; ++k) {
+        (sign % 2) == 1 ? foo += p[k] : foo -= p[k];
+        sign /= 2;
       }
       foo=foo.unit();
 


More information about the Rivet-svn mailing list