CDF_1990_S2089246.cc
Go to the documentation of this file.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 class CDF_1990_S2089246 : public Analysis {
00014 public:
00015
00016
00017 CDF_1990_S2089246()
00018 : Analysis("CDF_1990_S2089246")
00019 {
00020 _sumWTrig = 0;
00021 }
00022
00023
00024
00025
00026
00027 void init() {
00028
00029 addProjection(TriggerCDFRun0Run1(), "Trigger");
00030 addProjection(ChargedFinalState(-3.5, 3.5), "CFS");
00031
00032
00033 if (fuzzyEquals(sqrtS()/GeV, 1800, 1E-3)) {
00034 _hist_eta = bookHistogram1D(3, 1, 1);
00035 } else if (fuzzyEquals(sqrtS()/GeV, 630, 1E-3)) {
00036 _hist_eta = bookHistogram1D(4, 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
00050 const FinalState& fs = applyProjection<FinalState>(event, "CFS");
00051 foreach (const Particle& p, fs.particles()) {
00052 const double eta = p.momentum().pseudorapidity();
00053 _hist_eta->fill(fabs(eta), weight);
00054 }
00055 }
00056
00057
00058
00059 void finalize() {
00060
00061
00062 scale(_hist_eta, 0.5/_sumWTrig);
00063 }
00064
00065
00066
00067
00068 private:
00069
00070
00071
00072 double _sumWTrig;
00073
00074
00075
00076
00077 AIDA::IHistogram1D* _hist_eta;
00078
00079
00080 };
00081
00082
00083
00084
00085 DECLARE_RIVET_PLUGIN(CDF_1990_S2089246);
00086
00087 }