rivet is hosted by Hepforge, IPPP Durham
CMS_2011_I954992.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/ChargedFinalState.hh"
00004 #include "Rivet/Projections/IdentifiedFinalState.hh"
00005 
00006 namespace Rivet {
00007 
00008 
00009   class CMS_2011_I954992 : public Analysis {
00010   public:
00011 
00012     CMS_2011_I954992()
00013       : Analysis("CMS_2011_I954992")
00014     {    }
00015 
00016 
00017   public:
00018 
00019     void init() {
00020       ChargedFinalState cfs(-2.4, 2.4, 0.0*GeV);
00021       addProjection(cfs,"CFS");
00022 
00023       /// Get muons which pass the initial kinematic cuts
00024       IdentifiedFinalState muon_fs(-2.1, 2.1, 4.0*GeV);
00025       muon_fs.acceptIdPair(PID::MUON);
00026       addProjection(muon_fs, "PID::MUON_FS");
00027 
00028       _h_sigma = bookHisto1D(1,1,1);
00029     }
00030 
00031 
00032     void analyze(const Event& event) {
00033       const double weight = event.weight();
00034 
00035       const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS");
00036       if (cfs.size() != 2) vetoEvent; // no other charged particles in 2.4
00037 
00038       const Particles& muonFS = applyProjection<IdentifiedFinalState>(event, "PID::MUON_FS").particles();
00039       if(muonFS.size() != 2) vetoEvent;
00040 
00041       if(PID::charge(muonFS[0]) != PID::charge(muonFS[1])) {
00042          const double dimuon_mass = (muonFS[0].momentum() + muonFS[1].momentum()).mass();
00043          const double v_angle     = muonFS[0].momentum().angle(muonFS[1].momentum());
00044          const double dPhi        = deltaPhi(muonFS[0], muonFS[1]);
00045          const double deltaPt     = fabs(muonFS[0].pT() - muonFS[1].pT());
00046 
00047          if (dimuon_mass >= 11.5*GeV &&
00048              v_angle < 0.95*PI       &&
00049              dPhi    > 0.9*PI        &&
00050              deltaPt < 1.*GeV        ) {
00051            _h_sigma->fill(sqrtS()/GeV, weight);
00052          }
00053       }
00054     }
00055 
00056 
00057     /// Normalise histograms etc., after the run
00058     void finalize() {
00059       scale(_h_sigma, crossSection()/picobarn/sumOfWeights());
00060     }
00061 
00062   private:
00063 
00064     Histo1DPtr _h_sigma;
00065 
00066   };
00067 
00068 
00069   // The hook for the plugin system
00070   DECLARE_RIVET_PLUGIN(CMS_2011_I954992);
00071 
00072 }