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