CDF_1996_S3418421.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Tools/BinnedHistogram.hh" 00004 #include "Rivet/Projections/FinalState.hh" 00005 #include "Rivet/Projections/FastJets.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// @brief CDF dijet angular distributions 00011 class CDF_1996_S3418421 : public Analysis { 00012 public: 00013 00014 /// @name Constructors etc. 00015 //@{ 00016 00017 /// Constructor 00018 CDF_1996_S3418421() 00019 : Analysis("CDF_1996_S3418421") 00020 { 00021 } 00022 00023 //@} 00024 00025 00026 public: 00027 00028 /// @name Analysis methods 00029 //@{ 00030 00031 /// Book histograms and initialise projections before the run 00032 void init() { 00033 FinalState fs(-4.2, 4.2); 00034 addProjection(FastJets(fs, FastJets::CDFJETCLU, 0.7), "Jets"); 00035 00036 _h_chi.addHistogram(241.0, 300.0, bookHisto1D(1, 1, 1)); 00037 _h_chi.addHistogram(300.0, 400.0, bookHisto1D(1, 1, 2)); 00038 _h_chi.addHistogram(400.0, 517.0, bookHisto1D(1, 1, 3)); 00039 _h_chi.addHistogram(517.0, 625.0, bookHisto1D(1, 1, 4)); 00040 _h_chi.addHistogram(625.0, 1800.0, bookHisto1D(1, 1, 5)); 00041 _h_ratio = bookScatter2D(2, 1, 1); 00042 _htmp_chi_above_25 = bookHisto1D("TMP/chiabove25", refData(2, 1, 1)); 00043 _htmp_chi_below_25 = bookHisto1D("TMP/chibelow25", refData(2, 1, 1)); 00044 } 00045 00046 00047 /// Perform the per-event analysis 00048 void analyze(const Event& event) { 00049 const double weight = event.weight(); 00050 00051 Jets jets = applyProjection<FastJets>(event, "Jets").jetsByPt(50.0*GeV); 00052 if (jets.size() < 2) vetoEvent; 00053 00054 const FourMomentum jet1 = jets[0].momentum(); 00055 const FourMomentum jet2 = jets[1].momentum(); 00056 const double eta1 = jet1.eta(); 00057 const double eta2 = jet2.eta(); 00058 const double chi = exp(fabs(eta1 - eta2)); 00059 if (fabs(eta2) > 2.0 || fabs(eta1) > 2.0 || chi > 5.0) vetoEvent; 00060 00061 double m = FourMomentum(jet1 + jet2).mass(); 00062 _h_chi.fill(m, chi, weight); 00063 00064 // Fill ratio numerator or denominator depending on chi value 00065 ((chi > 2.5) ? _htmp_chi_above_25 : _htmp_chi_below_25)->fill(m/GeV, weight); 00066 } 00067 00068 00069 /// Normalise histograms etc., after the run 00070 void finalize() { 00071 foreach (Histo1DPtr hist, _h_chi.getHistograms()) { 00072 normalize(hist); 00073 } 00074 divide(_htmp_chi_below_25, _htmp_chi_above_25, _h_ratio); 00075 } 00076 00077 //@} 00078 00079 private: 00080 00081 /// @name Histograms 00082 //@{ 00083 BinnedHistogram<double> _h_chi; 00084 Histo1DPtr _htmp_chi_above_25, _htmp_chi_below_25; 00085 Scatter2DPtr _h_ratio; 00086 //@} 00087 00088 }; 00089 00090 00091 00092 // The hook for the plugin system 00093 DECLARE_RIVET_PLUGIN(CDF_1996_S3418421); 00094 00095 } Generated on Thu Feb 6 2014 17:38:42 for The Rivet MC analysis system by ![]() |