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