rivet is hosted by Hepforge, IPPP Durham
D0_2008_S7837160.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/Logging.hh"
00004 #include "Rivet/Tools/ParticleIdUtils.hh"
00005 #include "Rivet/Projections/FinalState.hh"
00006 #include "Rivet/Projections/WFinder.hh"
00007 #include "Rivet/Projections/LeadingParticlesFinalState.hh"
00008 #include "Rivet/Projections/IdentifiedFinalState.hh"
00009 #include "Rivet/RivetYODA.hh"
00010 
00011 namespace Rivet {
00012 
00013 
00014   /// @brief D0 Run II measurement of W charge asymmetry
00015   /// @author Andy Buckley
00016   /// @author Gavin Hesketh
00017   class D0_2008_S7837160 : public Analysis {
00018 
00019   public:
00020 
00021     /// Default constructor.
00022     D0_2008_S7837160()
00023       : Analysis("D0_2008_S7837160")
00024     {
00025       // Run II W charge asymmetry
00026     }
00027 
00028 
00029     /// @name Analysis methods
00030     //@{
00031 
00032     // Book histograms and set up projections
00033     void init() {
00034       // Projections
00035       /// @todo Use separate pT and ETmiss cuts in WFinder
00036       FinalState fs;
00037       const WFinder wfe(fs, -5, 5, 25.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00038       addProjection(wfe, "WFe");
00039 
00040       // Cross-section histograms
00041       _h_dsigplus_deta_25_35  = bookHisto1D(1,1,1,"/dsigplus_deta_25_35");
00042       _h_dsigminus_deta_25_35 = bookHisto1D(1,1,1,"/dsigminus_deta_25_35");
00043       _h_dsigplus_deta_35     = bookHisto1D(1,1,1,"/dsigplus_deta_35");
00044       _h_dsigminus_deta_35    = bookHisto1D(1,1,1,"/dsigminus_deta_35");
00045       _h_dsigplus_deta_25     = bookHisto1D(1,1,1,"/dsigplus_deta_25");
00046       _h_dsigminus_deta_25    = bookHisto1D(1,1,1,"/dsigminus_deta_25");
00047 
00048       _h_asym1      = bookScatter2D(1, 1, 1);
00049       _h_asym2      = bookScatter2D(1, 1, 2);
00050       _h_asym3      = bookScatter2D(1, 1, 3);
00051     }
00052 
00053 
00054     /// Do the analysis
00055     void analyze(const Event & event) {
00056       const WFinder& wf = applyProjection<WFinder>(event, "WFe");
00057       if (wf.bosons().size() == 0) {
00058         MSG_DEBUG("No W candidates found: vetoing");
00059         vetoEvent;
00060       }
00061 
00062       // Require that leptons have Et >= 25 GeV
00063       /// @todo Use pT cut in WFinder
00064       /// @todo Any ETmiss cut?
00065       FourMomentum p_e=wf.constituentLeptons()[0].momentum();
00066       int chg_e = PID::threeCharge(wf.constituentLeptons()[0].pdgId());
00067       if (p_e.eta() < 0) chg_e *= -1;
00068       assert(chg_e != 0);
00069 
00070       const double weight = event.weight();
00071       const double eta_e = fabs(p_e.eta());
00072       const double et_e = p_e.Et();
00073       if (et_e < 35*GeV) {
00074         // 25 <= ET < 35
00075         if (chg_e < 0) {
00076           _h_dsigminus_deta_25_35->fill(eta_e, weight);
00077         } else {
00078           _h_dsigplus_deta_25_35->fill(eta_e, weight);
00079         }
00080       } else {
00081         // ET >= 35
00082         if (chg_e < 0) {
00083           _h_dsigminus_deta_35->fill(eta_e, weight);
00084         } else {
00085           _h_dsigplus_deta_35->fill(eta_e, weight);
00086         }
00087       }
00088       // Inclusive: ET >= 25
00089       if (chg_e < 0) {
00090         _h_dsigminus_deta_25->fill(eta_e, weight);
00091       } else {
00092         _h_dsigplus_deta_25->fill(eta_e, weight);
00093       }
00094     }
00095 
00096 
00097     /// Finalize
00098     void finalize() {
00099 
00100       // Construct asymmetry: (dsig+/deta - dsig-/deta) / (dsig+/deta
00101       // + dsig-/deta) for each Et region
00102       divide(*_h_dsigplus_deta_25_35 - *_h_dsigminus_deta_25_35,
00103          *_h_dsigplus_deta_25_35 + *_h_dsigminus_deta_25_35,
00104          _h_asym1);
00105 
00106       divide(*_h_dsigplus_deta_35 - *_h_dsigminus_deta_35,
00107          *_h_dsigplus_deta_35 + *_h_dsigminus_deta_35,
00108          _h_asym2);
00109 
00110       divide(*_h_dsigplus_deta_25 - *_h_dsigminus_deta_25,
00111          *_h_dsigplus_deta_25 + *_h_dsigminus_deta_25,
00112          _h_asym3);
00113 
00114     }
00115 
00116     //@}
00117 
00118 
00119   private:
00120 
00121     /// @name Histograms
00122     //@{
00123     Histo1DPtr _h_dsigplus_deta_25_35, _h_dsigminus_deta_25_35;
00124     Histo1DPtr _h_dsigplus_deta_35, _h_dsigminus_deta_35;
00125     Histo1DPtr _h_dsigplus_deta_25, _h_dsigminus_deta_25;
00126 
00127 
00128     Scatter2DPtr _h_asym1;
00129     Scatter2DPtr _h_asym2;
00130     Scatter2DPtr _h_asym3;
00131     //@}
00132 
00133   };
00134 
00135 
00136 
00137   // The hook for the plugin system
00138   DECLARE_RIVET_PLUGIN(D0_2008_S7837160);
00139 
00140 }