CDF_1988_S1865951.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ChargedFinalState.hh" 00004 #include "Rivet/Projections/TriggerCDFRun0Run1.hh" 00005 00006 namespace Rivet { 00007 00008 00009 /// @brief CDF track \f$ p_\perp \f$ distributions at 630 and 1800 GeV 00010 class CDF_1988_S1865951 : public Analysis { 00011 public: 00012 00013 /// Constructor 00014 CDF_1988_S1865951() 00015 : Analysis("CDF_1988_S1865951") 00016 { 00017 _sumWTrig = 0; 00018 } 00019 00020 00021 /// @name Analysis methods 00022 //@{ 00023 00024 /// Book histograms and set up projections 00025 void init() { 00026 // Set up projections 00027 addProjection(TriggerCDFRun0Run1(), "Trigger"); 00028 const ChargedFinalState cfs(-1.0, 1.0, 0.4*GeV); 00029 addProjection(cfs, "CFS"); 00030 00031 // Book histo 00032 if (fuzzyEquals(sqrtS()/GeV, 1800, 1E-3)) { 00033 _hist_pt = bookHisto1D(1, 1, 1); 00034 } else if (fuzzyEquals(sqrtS()/GeV, 630, 1E-3)) { 00035 _hist_pt = bookHisto1D(2, 1, 1); 00036 } 00037 } 00038 00039 00040 /// Do the analysis 00041 void analyze(const Event& event) { 00042 // Trigger 00043 const bool trigger = applyProjection<TriggerCDFRun0Run1>(event, "Trigger").minBiasDecision(); 00044 if (!trigger) vetoEvent; 00045 const double weight = event.weight(); 00046 _sumWTrig += weight; 00047 00048 const FinalState& trackfs = applyProjection<ChargedFinalState>(event, "CFS"); 00049 foreach (Particle p, trackfs.particles()) { 00050 const double pt = p.pT()/GeV; 00051 // Effective weight for d3sig/dp3 = weight / ( Delta eta * 2pi * pt ), with Delta(eta) = 2 00052 const double eff_weight = weight/(2*2*TWOPI*pt); 00053 _hist_pt->fill(pt, eff_weight); 00054 } 00055 } 00056 00057 00058 /// Scale histos 00059 void finalize() { 00060 scale(_hist_pt, crossSectionPerEvent()/millibarn); 00061 } 00062 00063 //@} 00064 00065 00066 private: 00067 00068 /// @name Counters 00069 //@{ 00070 double _sumWTrig; 00071 //@} 00072 00073 /// @name Histos 00074 //@{ 00075 Histo1DPtr _hist_pt; 00076 //@} 00077 00078 }; 00079 00080 00081 00082 // The hook for the plugin system 00083 DECLARE_RIVET_PLUGIN(CDF_1988_S1865951); 00084 00085 } Generated on Thu Mar 10 2016 08:29:48 for The Rivet MC analysis system by ![]() |