00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/Logging.hh"
00004 #include "Rivet/RivetAIDA.hh"
00005 #include "Rivet/Projections/ChargedFinalState.hh"
00006 #include "Rivet/Projections/TriggerCDFRun0Run1.hh"
00007
00008 namespace Rivet {
00009
00010
00011
00012
00013
00014 class CDF_1990_S2089246 : public Analysis {
00015 public:
00016
00017
00018 CDF_1990_S2089246()
00019 : Analysis("CDF_1990_S2089246")
00020 {
00021 setBeams(PROTON, ANTIPROTON);
00022 _sumWTrig = 0;
00023 }
00024
00025
00026
00027
00028
00029 void init() {
00030
00031 addProjection(TriggerCDFRun0Run1(), "Trigger");
00032 addProjection(ChargedFinalState(-3.5, 3.5), "CFS");
00033
00034
00035 if (fuzzyEquals(sqrtS()/GeV, 1800, 1E-3)) {
00036 _hist_eta = bookHistogram1D(3, 1, 1);
00037 } else if (fuzzyEquals(sqrtS()/GeV, 630, 1E-3)) {
00038 _hist_eta = bookHistogram1D(4, 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
00052 const FinalState& fs = applyProjection<FinalState>(event, "CFS");
00053 foreach (const Particle& p, fs.particles()) {
00054 const double eta = p.momentum().pseudorapidity();
00055 _hist_eta->fill(fabs(eta), weight);
00056 }
00057 }
00058
00059
00060
00061 void finalize() {
00062
00063
00064 scale(_hist_eta, 0.5/_sumWTrig);
00065 }
00066
00067
00068
00069
00070 private:
00071
00072
00073
00074 double _sumWTrig;
00075
00076
00077
00078
00079 AIDA::IHistogram1D* _hist_eta;
00080
00081
00082 };
00083
00084
00085
00086
00087 AnalysisBuilder<CDF_1990_S2089246> plugin_CDF_1990_S2089246;
00088
00089 }