rivet is hosted by Hepforge, IPPP Durham
ATLAS_2011_I926145.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/FinalState.hh"
00004 #include "Rivet/Projections/IdentifiedFinalState.hh"
00005 #include "Rivet/Projections/WFinder.hh"
00006 #include "Rivet/Projections/ZFinder.hh"
00007 
00008 namespace Rivet {
00009 
00010   /// @brief Measurement of electron and muon differential cross section from heavy flavour production
00011   ///
00012   /// lepton cross sections differential in pT
00013   ///
00014   /// @author Paul Bell, Holger Schulz
00015 
00016 
00017   class ATLAS_2011_I926145 : public Analysis {
00018   public:
00019 
00020     /// Constructor
00021     ATLAS_2011_I926145()
00022       : Analysis("ATLAS_2011_I926145")
00023     {
00024     }
00025 
00026 
00027   public:
00028 
00029     /// Book histograms and initialise projections before the run
00030     void init() {
00031 
00032       ///projection for electrons
00033       Cut cuts = (   EtaIn(-2.00, -1.52)
00034            | EtaIn(-1.37,  1.37)
00035            | EtaIn( 1.52,  2.00) ) & (Cuts::pT >= 7.0*GeV);
00036       IdentifiedFinalState elecs(cuts);
00037       elecs.acceptId(PID::ELECTRON);
00038       elecs.acceptId(PID::POSITRON);
00039       addProjection(elecs, "elecs");
00040 
00041       //projection for muons -- same phase space as above??? Not sure if the crack region has
00042       //to be removed for the muons as well
00043       std::vector<std::pair<double, double> > eta_m;
00044       //eta_m.push_back(make_pair(-2.00,-1.52));
00045       //eta_m.push_back(make_pair(-1.37,1.37));
00046       //eta_m.push_back(make_pair(1.52,2.00));
00047       //IdentifiedFinalState muons(eta_m, 7.0*GeV);
00048       IdentifiedFinalState muons(EtaIn(-2.0,2.0) & (Cuts::pT >= 7.0*GeV));
00049       muons.acceptId(PID::MUON);
00050       muons.acceptId(PID::ANTIMUON);
00051       addProjection(muons, "muons");
00052 
00053       //projection for muons full range
00054       IdentifiedFinalState muons_full(EtaIn(-2.5,2.5) & (Cuts::pT >= 4.0*GeV));
00055       muons_full.acceptId(PID::MUON);
00056       muons_full.acceptId(PID::ANTIMUON);
00057       addProjection(muons_full, "muons_full");
00058       Cut cut20 = EtaIn(-2.0,2.0);
00059       Cut cut25 = EtaIn(-2.5,2.5);
00060       const FinalState fs20(cut20);
00061       const FinalState fs25(cut25);
00062 
00063       /// @todo Bare Zs ...
00064       ZFinder zfinder_e(fs20, cut20, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::NOCLUSTER);
00065       addProjection(zfinder_e, "ZFinder_e");
00066       ZFinder zfinder_mu(fs20, cut20, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::NOCLUSTER);
00067       addProjection(zfinder_mu, "ZFinder_mu");
00068       ZFinder zfinder_mufull(fs25, cut25, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::NOCLUSTER);
00069       addProjection(zfinder_mufull, "ZFinder_mufull");
00070 
00071       /// @todo ... but dressed Ws?
00072       WFinder wfinder_e(fs20, cut20, PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00073       addProjection(wfinder_e, "WFinder_e");
00074       WFinder wfinder_mu(fs20, cut20, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00075       addProjection(wfinder_mu, "WFinder_mu");
00076       WFinder wfinder_mufull(fs25, cut25, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00077       addProjection(wfinder_mufull, "WFinder_mufull");
00078 
00079       // Book histograms
00080       _histPt_elecs      = bookHisto1D(1 ,1 ,1);
00081       _histPt_muons      = bookHisto1D(2 ,1 ,1);
00082       _histPt_muons_full = bookHisto1D(3 ,1 ,1);
00083     }
00084 
00085     /// Perform the per-event analysis
00086     void analyze(const Event& event) {
00087       const double weight = event.weight();
00088 
00089       const FinalState& elecs      = applyProjection<FinalState>(event, "elecs");
00090       const FinalState& muons      = applyProjection<FinalState>(event, "muons");
00091       const FinalState& muons_full = applyProjection<FinalState>(event, "muons_full");
00092 
00093       // Veto event if no lepton is present
00094       if (elecs.size() == 0 && muons.size() == 0 && muons_full.size() == 0) {
00095         vetoEvent;
00096       }
00097 
00098       // Check for W and or Z bosons in event
00099       //
00100       // Z veto
00101       const ZFinder& zfinder_e      = applyProjection<ZFinder>(event, "ZFinder_e");
00102       const ZFinder& zfinder_mu     = applyProjection<ZFinder>(event, "ZFinder_mu");
00103       const ZFinder& zfinder_mufull = applyProjection<ZFinder>(event, "ZFinder_mufull");
00104 
00105       if (zfinder_e.bosons().size() > 0 || zfinder_mu.bosons().size() > 0 || zfinder_mufull.bosons().size() > 0) {
00106           MSG_DEBUG("Num elec Z-bosons found: " << zfinder_e.bosons().size());
00107           MSG_DEBUG("Num muon Z-bosons found: " << zfinder_mu.bosons().size());
00108           MSG_DEBUG("Num muon Z-bosons found (|eta|<2.5): " << zfinder_mufull.bosons().size());
00109           vetoEvent;
00110       }
00111 
00112       // W veto
00113       const WFinder& wfinder_e      = applyProjection<WFinder>(event, "WFinder_e");
00114       const WFinder& wfinder_mu     = applyProjection<WFinder>(event, "WFinder_mu");
00115       const WFinder& wfinder_mufull = applyProjection<WFinder>(event, "WFinder_mufull");
00116 
00117       if (wfinder_e.bosons().size() > 0 || wfinder_mu.bosons().size() > 0 || wfinder_mufull.bosons().size() > 0) {
00118           MSG_DEBUG("Num elec W-bosons found: " << wfinder_e.bosons().size());
00119           MSG_DEBUG("Num muon W-bosons found: " << wfinder_mu.bosons().size());
00120           MSG_DEBUG("Num muon W-bosons found (|eta|<2.5): " << wfinder_mufull.bosons().size());
00121           vetoEvent;
00122       }
00123 
00124 
00125       // Electron histogram
00126       if (elecs.size() > 0) {
00127         foreach (const Particle& ele, elecs.particles()) {
00128           if (ele.pT()*GeV < 26.0) {
00129             _histPt_elecs->fill(ele.pT()*GeV, weight);
00130           }
00131         }
00132       }
00133 
00134       // Muon histogram
00135       if (muons.size() > 0) {
00136         foreach (const Particle& muo, muons.particles()) {
00137           if (muo.pT()*GeV < 26.0) {
00138             _histPt_muons->fill(muo.pT()*GeV, weight);
00139           }
00140         }
00141       }
00142 
00143       // Muon full histogram
00144       if (muons_full.size() > 0) {
00145         foreach (const Particle& muo, muons_full.particles()) {
00146           if (muo.pT()*GeV < 100.0) {
00147             _histPt_muons_full->fill(muo.pT()*GeV, weight);
00148           }
00149         }
00150       }
00151     }
00152 
00153     /// Normalise histograms etc., after the run
00154     void finalize() {
00155 
00156       // Data cross-section is given in nb! x-sections in rivet are in pb!
00157       scale(_histPt_elecs,      crossSection()/nanobarn/sumOfWeights());
00158       scale(_histPt_muons,      crossSection()/nanobarn/sumOfWeights());
00159       scale(_histPt_muons_full, crossSection()/nanobarn/sumOfWeights());
00160     }
00161 
00162 
00163 
00164   private:
00165 
00166     /// @name Histograms
00167     Histo1DPtr _histPt_elecs;
00168     Histo1DPtr _histPt_muons;
00169     Histo1DPtr _histPt_muons_full;
00170   };
00171 
00172 
00173   // The hook for the plugin system
00174   DECLARE_RIVET_PLUGIN(ATLAS_2011_I926145);
00175 
00176 }