00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/FinalState.hh"
00006 #include "Rivet/Projections/WFinder.hh"
00007 #include "Rivet/Tools/ParticleIdUtils.hh"
00008
00009
00010 namespace Rivet {
00011
00012
00013 class D0_1998_S3711838 : public Analysis {
00014 public:
00015
00016
00017
00018
00019
00020 D0_1998_S3711838()
00021 : Analysis("D0_1998_S3711838")
00022 {
00023
00024 setBeams(PROTON, ANTIPROTON);
00025
00026
00027 setNeedsCrossSection(false);
00028 }
00029
00030
00031
00032
00033 public:
00034
00035
00036
00037
00038
00039 void init() {
00040
00041 WFinder wfe(-5, 5, 0.0*GeV, ELECTRON, 60.0*GeV, 100.0*GeV, 25.0*GeV, 0.2);
00042 addProjection(wfe, "WFe");
00043
00044
00045 _hist_wpt = bookHistogram1D(1, 1, 1);
00046
00047 }
00048
00049
00050
00051 void analyze(const Event& event) {
00052 const double weight = event.weight();
00053 const WFinder& wf = applyProjection<WFinder>(event, "WFe");
00054 if (wf.size() == 0) {
00055 getLog() << Log::DEBUG << "No W candidates found: vetoing" << endl;
00056 vetoEvent;
00057 }
00058
00059
00060
00061 FourMomentum p_e;
00062 int chg_e = 0;
00063
00064 foreach (const Particle& l, wf.constituentsFinalState().particles()) {
00065 const FourMomentum pl = l.momentum();
00066 if (abs(l.pdgId()) == ELECTRON) {
00067 chg_e = PID::threeCharge(l.pdgId());
00068 p_e = pl;
00069 const double eta_e = fabs(p_e.pseudorapidity());
00070 if ( (pl.Et()/GeV < 25.0) || (eta_e > 1.1) ) {
00071 getLog() << Log::DEBUG << l.pdgId() << " ET,pT,eta: " << pl.Et()/GeV << "," << pl.pT()/GeV << "," << eta_e << " fails electron cut" << endl;
00072 vetoEvent;
00073 }
00074 }
00075
00076 else if (abs(l.pdgId()) == NU_E) {
00077 FourMomentum p_nu = l.momentum();
00078 if (p_nu.Et()/GeV < 25.0) {
00079 getLog() << Log::DEBUG << l.pdgId() << " ET(miss): " << p_nu.Et() << "fails ETmiss cut" << endl;
00080 vetoEvent;
00081 }
00082 }
00083 }
00084 assert(chg_e != 0);
00085
00086 FourMomentum pW = wf.particles()[0].momentum();
00087 getLog() << Log::DEBUG << "Dilepton mass = " << pW.mass()/GeV << " GeV" << endl;
00088 getLog() << Log::DEBUG << "Dilepton pT = " << pW.pT()/GeV << " GeV" << endl;
00089 _hist_wpt->fill(pW.pT()/GeV, weight);
00090
00091 }
00092
00093
00094
00095 void finalize() {
00096
00097 }
00098
00099
00100
00101 private:
00102
00103
00104 AIDA::IHistogram1D *_hist_wpt;
00105
00106 };
00107
00108
00109
00110
00111 AnalysisBuilder<D0_1998_S3711838> plugin_D0_1998_S3711838;
00112
00113
00114 }