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       vector<pair<double, double> > eta_e;
00034       eta_e.push_back(std::make_pair(-2.00, -1.52));
00035       eta_e.push_back(std::make_pair(-1.37, 1.37));
00036       eta_e.push_back(std::make_pair(1.52, 2.00));
00037       IdentifiedFinalState elecs(eta_e, 7.0*GeV);
00038       elecs.acceptId(PID::ELECTRON);
00039       elecs.acceptId(PID::POSITRON);
00040       addProjection(elecs, "elecs");
00041 
00042       //projection for muons -- same phase space as above??? Not sure if the crack region has
00043       //to be removed for the muons as well
00044       std::vector<std::pair<double, double> > eta_m;
00045       //eta_m.push_back(make_pair(-2.00,-1.52));
00046       //eta_m.push_back(make_pair(-1.37,1.37));
00047       //eta_m.push_back(make_pair(1.52,2.00));
00048       //IdentifiedFinalState muons(eta_m, 7.0*GeV);
00049       IdentifiedFinalState muons(-2.0, 2.0, 7.0*GeV);
00050       muons.acceptId(PID::MUON);
00051       muons.acceptId(PID::ANTIMUON);
00052       addProjection(muons, "muons");
00053 
00054       // Projection for muons full range
00055       IdentifiedFinalState muons_full(-2.5, 2.5, 4.0*GeV);
00056       muons_full.acceptId(PID::MUON);
00057       muons_full.acceptId(PID::ANTIMUON);
00058       addProjection(muons_full, "muons_full");
00059       const FinalState fs20(-2.0, 2.0, 0.0*GeV);
00060       const FinalState fs25(-2.5, 2.5, 0.0*GeV);
00061 
00062       /// @todo Bare Zs ...
00063       ZFinder zfinder_e(fs20, -2.0, 2.0, 0.0*GeV, PID::ELECTRON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::NOCLUSTER);
00064       addProjection(zfinder_e, "ZFinder_e");
00065       ZFinder zfinder_mu(fs20, -2.0, 2.0, 0.0*GeV, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::NOCLUSTER);
00066       addProjection(zfinder_mu, "ZFinder_mu");
00067       ZFinder zfinder_mufull(fs25, -2.5, 2.5, 0.0*GeV, PID::MUON, 66.0*GeV, 116.0*GeV, 0.1, ZFinder::NOCLUSTER);
00068       addProjection(zfinder_mufull, "ZFinder_mufull");
00069 
00070       /// @todo ... but dressed Ws?
00071       WFinder wfinder_e(fs20, -2.0, 2.0, 0.0*GeV, PID::ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00072       addProjection(wfinder_e, "WFinder_e");
00073       WFinder wfinder_mu(fs20, -2.0, 2.0, 0.0*GeV, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00074       addProjection(wfinder_mu, "WFinder_mu");
00075       WFinder wfinder_mufull(fs25, -2.5, 2.5, 0.0*GeV, PID::MUON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00076       addProjection(wfinder_mufull, "WFinder_mufull");
00077 
00078       // Book histograms
00079       _histPt_elecs      = bookHisto1D(1 ,1 ,1);
00080       _histPt_muons      = bookHisto1D(2 ,1 ,1);
00081       _histPt_muons_full = bookHisto1D(3 ,1 ,1);
00082     }
00083 
00084     /// Perform the per-event analysis
00085     void analyze(const Event& event) {
00086       const double weight = event.weight();
00087 
00088       const FinalState& elecs      = applyProjection<FinalState>(event, "elecs");
00089       const FinalState& muons      = applyProjection<FinalState>(event, "muons");
00090       const FinalState& muons_full = applyProjection<FinalState>(event, "muons_full");
00091 
00092       // Veto event if no lepton is present
00093       if (elecs.size() == 0 && muons.size() == 0 && muons_full.size() == 0) {
00094         vetoEvent;
00095       }
00096 
00097       // Check for W and or Z bosons in event
00098       //
00099       // Z veto
00100       const ZFinder& zfinder_e      = applyProjection<ZFinder>(event, "ZFinder_e");
00101       const ZFinder& zfinder_mu     = applyProjection<ZFinder>(event, "ZFinder_mu");
00102       const ZFinder& zfinder_mufull = applyProjection<ZFinder>(event, "ZFinder_mufull");
00103 
00104       if (zfinder_e.bosons().size() > 0 || zfinder_mu.bosons().size() > 0 || zfinder_mufull.bosons().size() > 0) {
00105           MSG_DEBUG("Num elec Z-bosons found: " << zfinder_e.bosons().size());
00106           MSG_DEBUG("Num muon Z-bosons found: " << zfinder_mu.bosons().size());
00107           MSG_DEBUG("Num muon Z-bosons found (|eta|<2.5): " << zfinder_mufull.bosons().size());
00108           vetoEvent;
00109       }
00110 
00111       // W veto
00112       const WFinder& wfinder_e      = applyProjection<WFinder>(event, "WFinder_e");
00113       const WFinder& wfinder_mu     = applyProjection<WFinder>(event, "WFinder_mu");
00114       const WFinder& wfinder_mufull = applyProjection<WFinder>(event, "WFinder_mufull");
00115 
00116       if (wfinder_e.bosons().size() > 0 || wfinder_mu.bosons().size() > 0 || wfinder_mufull.bosons().size() > 0) {
00117           MSG_DEBUG("Num elec W-bosons found: " << wfinder_e.bosons().size());
00118           MSG_DEBUG("Num muon W-bosons found: " << wfinder_mu.bosons().size());
00119           MSG_DEBUG("Num muon W-bosons found (|eta|<2.5): " << wfinder_mufull.bosons().size());
00120           vetoEvent;
00121       }
00122 
00123 
00124       // Electron histogram
00125       if (elecs.size() > 0) {
00126         foreach (const Particle& ele, elecs.particles()) {
00127           if (ele.pT()*GeV < 26.0) {
00128             _histPt_elecs->fill(ele.pT()*GeV, weight);
00129           }
00130         }
00131       }
00132 
00133       // Muon histogram
00134       if (muons.size() > 0) {
00135         foreach (const Particle& muo, muons.particles()) {
00136           if (muo.pT()*GeV < 26.0) {
00137             _histPt_muons->fill(muo.pT()*GeV, weight);
00138           }
00139         }
00140       }
00141 
00142       // Muon full histogram
00143       if (muons_full.size() > 0) {
00144         foreach (const Particle& muo, muons_full.particles()) {
00145           if (muo.pT()*GeV < 100.0) {
00146             _histPt_muons_full->fill(muo.pT()*GeV, weight);
00147           }
00148         }
00149       }
00150     }
00151 
00152     /// Normalise histograms etc., after the run
00153     void finalize() {
00154 
00155       // Data cross-section is given in nb! x-sections in rivet are in pb!
00156       scale(_histPt_elecs,      crossSection()/nanobarn/sumOfWeights());
00157       scale(_histPt_muons,      crossSection()/nanobarn/sumOfWeights());
00158       scale(_histPt_muons_full, crossSection()/nanobarn/sumOfWeights());
00159     }
00160 
00161 
00162 
00163   private:
00164 
00165     /// @name Histograms
00166     Histo1DPtr _histPt_elecs;
00167     Histo1DPtr _histPt_muons;
00168     Histo1DPtr _histPt_muons_full;
00169   };
00170 
00171 
00172   // The hook for the plugin system
00173   DECLARE_RIVET_PLUGIN(ATLAS_2011_I926145);
00174 
00175 }