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