rivet is hosted by Hepforge, IPPP Durham
ATLAS_2012_I1204784.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/ZFinder.hh"
00004 #include "Rivet/Tools/BinnedHistogram.hh"
00005 
00006 namespace Rivet {
00007 
00008 
00009   /// ATLAS Z phi* measurement
00010   class ATLAS_2012_I1204784 : public Analysis {
00011     public:
00012 
00013       /// Constructor
00014       ATLAS_2012_I1204784()
00015         : Analysis("ATLAS_2012_I1204784")
00016       {      }
00017 
00018 
00019     public:
00020 
00021       /// Book histograms and initialise projections before the run
00022       void init() {
00023         FinalState fs;
00024         Cut cuts = EtaIn(-2.4,2.4) & (Cuts::pT >= 20.0*GeV);
00025         ZFinder zfinder_dressed_el(fs, cuts, PID::ELECTRON, 66*GeV, 116*GeV, 0.1, ZFinder::CLUSTERNODECAY);
00026         addProjection(zfinder_dressed_el, "ZFinder_dressed_el");
00027         ZFinder zfinder_bare_el(fs, cuts, PID::ELECTRON, 66*GeV, 116*GeV, 0.0, ZFinder::NOCLUSTER);
00028         addProjection(zfinder_bare_el, "ZFinder_bare_el");
00029         ZFinder zfinder_dressed_mu(fs, cuts, PID::MUON, 66*GeV, 116*GeV, 0.1, ZFinder::CLUSTERNODECAY);
00030         addProjection(zfinder_dressed_mu, "ZFinder_dressed_mu");
00031         ZFinder zfinder_bare_mu(fs, cuts, PID::MUON, 66*GeV, 116*GeV, 0.0, ZFinder::NOCLUSTER);
00032         addProjection(zfinder_bare_mu, "ZFinder_bare_mu");
00033 
00034         // Book histograms
00035         // Single-differential plots
00036         _hist_zphistar_el_bare = bookHisto1D(1, 1, 1);
00037         _hist_zphistar_mu_bare = bookHisto1D(1, 1, 2);
00038         _hist_zphistar_el_dressed = bookHisto1D(2, 1, 1);
00039         _hist_zphistar_mu_dressed = bookHisto1D(2, 1, 2);
00040 
00041         // Double-differential plots
00042         _h_phistar_el_bare.addHistogram(0.0, 0.8, bookHisto1D(3, 1, 1));
00043         _h_phistar_el_bare.addHistogram(0.8, 1.6, bookHisto1D(3, 1, 2));
00044         _h_phistar_el_bare.addHistogram(1.6, 10.0, bookHisto1D(3, 1, 3));
00045 
00046         _h_phistar_el_dressed.addHistogram(0.0, 0.8, bookHisto1D(3, 2, 1));
00047         _h_phistar_el_dressed.addHistogram(0.8, 1.6, bookHisto1D(3, 2, 2));
00048         _h_phistar_el_dressed.addHistogram(1.6, 10.0, bookHisto1D(3, 2, 3));
00049 
00050         _h_phistar_mu_bare.addHistogram(0.0, 0.8, bookHisto1D(4, 1, 1));
00051         _h_phistar_mu_bare.addHistogram(0.8, 1.6, bookHisto1D(4, 1, 2));
00052         _h_phistar_mu_bare.addHistogram(1.6, 10.0, bookHisto1D(4, 1, 3));
00053 
00054         _h_phistar_mu_dressed.addHistogram(0.0, 0.8, bookHisto1D(4, 2, 1));
00055         _h_phistar_mu_dressed.addHistogram(0.8, 1.6, bookHisto1D(4, 2, 2));
00056         _h_phistar_mu_dressed.addHistogram(1.6, 10.0, bookHisto1D(4, 2, 3));
00057       }
00058 
00059 
00060       /// Perform the per-event analysis
00061       void analyze(const Event& event) {
00062         const double weight = event.weight();
00063 
00064         const ZFinder& zfinder_dressed_el = applyProjection<ZFinder>(event, "ZFinder_dressed_el");
00065         const ZFinder& zfinder_bare_el = applyProjection<ZFinder>(event, "ZFinder_bare_el");
00066         const ZFinder& zfinder_dressed_mu = applyProjection<ZFinder>(event, "ZFinder_dressed_mu");
00067         const ZFinder& zfinder_bare_mu = applyProjection<ZFinder>(event, "ZFinder_bare_mu");
00068 
00069         fillPlots(zfinder_dressed_el, _hist_zphistar_el_dressed, _h_phistar_el_dressed, weight);
00070         fillPlots(zfinder_bare_el, _hist_zphistar_el_bare, _h_phistar_el_bare, weight);
00071         fillPlots(zfinder_dressed_mu, _hist_zphistar_mu_dressed, _h_phistar_mu_dressed, weight);
00072         fillPlots(zfinder_bare_mu, _hist_zphistar_mu_bare, _h_phistar_mu_bare, weight);
00073       }
00074 
00075 
00076       void fillPlots(const ZFinder& zfind, Histo1DPtr hist, BinnedHistogram<double>& binnedHist, double weight) {
00077         if (zfind.bosons().size() != 1) return;
00078         Particles leptons = zfind.constituents(cmpMomByPt);
00079 
00080         const FourMomentum lminus = leptons[0].charge() < 0 ? leptons[0].momentum() : leptons[1].momentum();
00081         const FourMomentum lplus = leptons[0].charge() < 0 ? leptons[1].momentum() : leptons[0].momentum();
00082 
00083         const double phi_acop = M_PI - deltaPhi(lminus, lplus);
00084         const double costhetastar = tanh((lminus.eta()-lplus.eta())/2.0);
00085         const double sin2thetastar = (costhetastar <= 1) ? 1.0 - sqr(costhetastar) : 0;
00086         const double phistar = tan(phi_acop/2.0) * sqrt(sin2thetastar);
00087         hist->fill(phistar, weight);
00088 
00089         binnedHist.fill(zfind.bosons()[0].absrap(), phistar, weight);
00090       }
00091 
00092 
00093       /// Normalise histograms etc., after the run
00094       void finalize() {
00095         normalize(_hist_zphistar_el_dressed);
00096         normalize(_hist_zphistar_el_bare);
00097         normalize(_hist_zphistar_mu_dressed);
00098         normalize(_hist_zphistar_mu_bare);
00099 
00100         foreach (Histo1DPtr hist, _h_phistar_mu_dressed.getHistograms()) { normalize(hist); }
00101         foreach (Histo1DPtr hist, _h_phistar_mu_bare.getHistograms()) { normalize(hist); }
00102         foreach (Histo1DPtr hist, _h_phistar_el_bare.getHistograms()) { normalize(hist); }
00103         foreach (Histo1DPtr hist, _h_phistar_el_dressed.getHistograms()) { normalize(hist); }
00104       }
00105 
00106       //@}
00107 
00108 
00109     private:
00110 
00111       BinnedHistogram<double> _h_phistar_mu_dressed;
00112       BinnedHistogram<double> _h_phistar_mu_bare;
00113       BinnedHistogram<double> _h_phistar_el_dressed;
00114       BinnedHistogram<double> _h_phistar_el_bare;
00115 
00116       Histo1DPtr _hist_zphistar_el_dressed;
00117       Histo1DPtr _hist_zphistar_el_bare;
00118 
00119       Histo1DPtr _hist_zphistar_mu_dressed;
00120       Histo1DPtr _hist_zphistar_mu_bare;
00121 
00122       Histo1DPtr _hist_zphistar_el_bare_1;
00123       Histo1DPtr _hist_zphistar_el_bare_2;
00124       Histo1DPtr _hist_zphistar_el_bare_3;
00125 
00126       Histo1DPtr _hist_zphistar_el_dressed_1;
00127       Histo1DPtr _hist_zphistar_el_dressed_2;
00128       Histo1DPtr _hist_zphistar_el_dressed_3;
00129 
00130       Histo1DPtr _hist_zphistar_mu_bare_1;
00131       Histo1DPtr _hist_zphistar_mu_bare_2;
00132       Histo1DPtr _hist_zphistar_mu_bare_3;
00133 
00134       Histo1DPtr _hist_zphistar_mu_dressed_1;
00135       Histo1DPtr _hist_zphistar_mu_dressed_2;
00136       Histo1DPtr _hist_zphistar_mu_dressed_3;
00137 
00138   };
00139 
00140 
00141   // The hook for the plugin system
00142   DECLARE_RIVET_PLUGIN(ATLAS_2012_I1204784);
00143 
00144 }