00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Projections/ChargedFinalState.hh"
00005 #include "Rivet/Projections/TriggerCDFRun0Run1.hh"
00006
00007 namespace Rivet {
00008
00009
00010 class CDF_1988_S1865951 : public Analysis {
00011 public:
00012
00013
00014 CDF_1988_S1865951()
00015 : Analysis("CDF_1988_S1865951")
00016 {
00017 setBeams(PROTON, ANTIPROTON);
00018 _sumWTrig = 0;
00019 }
00020
00021
00022
00023
00024
00025
00026 void init() {
00027
00028 addProjection(TriggerCDFRun0Run1(), "Trigger");
00029 const ChargedFinalState cfs(-1.0, 1.0, 0.4*GeV);
00030 addProjection(cfs, "CFS");
00031
00032
00033 if (fuzzyEquals(sqrtS()/GeV, 1800, 1E-3)) {
00034 _hist_pt = bookHistogram1D(1, 1, 1);
00035 } else if (fuzzyEquals(sqrtS()/GeV, 630, 1E-3)) {
00036 _hist_pt = bookHistogram1D(2, 1, 1);
00037 }
00038 }
00039
00040
00041
00042 void analyze(const Event& event) {
00043
00044 const bool trigger = applyProjection<TriggerCDFRun0Run1>(event, "Trigger").minBiasDecision();
00045 if (!trigger) vetoEvent;
00046 const double weight = event.weight();
00047 _sumWTrig += weight;
00048
00049 const FinalState& trackfs = applyProjection<ChargedFinalState>(event, "CFS");
00050 foreach (Particle p, trackfs.particles()) {
00051 const double pt = p.momentum().pT();
00052
00053 const double eff_weight = weight/(2*2*TWOPI*pt);
00054 _hist_pt->fill(pt, eff_weight);
00055 }
00056 }
00057
00058
00059
00060 void finalize() {
00061 scale(_hist_pt, crossSectionPerEvent()/millibarn);
00062 }
00063
00064
00065
00066
00067 private:
00068
00069
00070
00071 double _sumWTrig;
00072
00073
00074
00075
00076 AIDA::IHistogram1D* _hist_pt;
00077
00078
00079 };
00080
00081
00082
00083
00084 AnalysisBuilder<CDF_1988_S1865951> plugin_CDF_1988_S1865951;
00085
00086 }