UA5_1988_S1867512.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/Beam.hh" 00005 #include "Rivet/Projections/TriggerUA5.hh" 00006 00007 namespace Rivet { 00008 00009 00010 namespace { 00011 /// @brief Helper function to fill correlation points into scatter plot 00012 Point2D correlation_helper(double x, double xerr, const vector<int> & nf, const vector<int> & nb, double sumWPassed) { 00013 return Point2D(x, correlation(nf, nb), xerr, correlation_err(nf, nb)/sqrt(sumWPassed)); 00014 } 00015 } 00016 00017 00018 /// @brief UA5 charged particle correlations at 200, 546 and 900 GeV 00019 class UA5_1988_S1867512 : public Analysis { 00020 public: 00021 00022 UA5_1988_S1867512() 00023 : Analysis("UA5_1988_S1867512"), _sumWPassed(0) 00024 { } 00025 00026 00027 /// @name Analysis methods 00028 //@{ 00029 00030 void init() { 00031 // Projections 00032 declare(TriggerUA5(), "Trigger"); 00033 00034 // Symmetric eta interval 00035 declare(ChargedFinalState(-0.5, 0.5), "CFS05"); 00036 00037 // Asymmetric intervals first 00038 // Forward eta intervals 00039 declare(ChargedFinalState(0.0, 1.0), "CFS10F"); 00040 declare(ChargedFinalState(0.5, 1.5), "CFS15F"); 00041 declare(ChargedFinalState(1.0, 2.0), "CFS20F"); 00042 declare(ChargedFinalState(1.5, 2.5), "CFS25F"); 00043 declare(ChargedFinalState(2.0, 3.0), "CFS30F"); 00044 declare(ChargedFinalState(2.5, 3.5), "CFS35F"); 00045 declare(ChargedFinalState(3.0, 4.0), "CFS40F"); 00046 00047 // Backward eta intervals 00048 declare(ChargedFinalState(-1.0, 0.0), "CFS10B"); 00049 declare(ChargedFinalState(-1.5, -0.5), "CFS15B"); 00050 declare(ChargedFinalState(-2.0, -1.0), "CFS20B"); 00051 declare(ChargedFinalState(-2.5, -1.5), "CFS25B"); 00052 declare(ChargedFinalState(-3.0, -2.0), "CFS30B"); 00053 declare(ChargedFinalState(-3.5, -2.5), "CFS35B"); 00054 declare(ChargedFinalState(-4.0, -3.0), "CFS40B"); 00055 00056 // Histogram booking, we have sqrt(s) = 200, 546 and 900 GeV 00057 // TODO use Scatter2D to be able to output errors 00058 if (fuzzyEquals(sqrtS()/GeV, 200.0, 1E-4)) { 00059 _hist_correl = bookScatter2D(2, 1, 1); 00060 _hist_correl_asym = bookScatter2D(3, 1, 1); 00061 } else if (fuzzyEquals(sqrtS()/GeV, 546.0, 1E-4)) { 00062 _hist_correl = bookScatter2D(2, 1, 2); 00063 _hist_correl_asym = bookScatter2D(3, 1, 2); 00064 } else if (fuzzyEquals(sqrtS()/GeV, 900.0, 1E-4)) { 00065 _hist_correl = bookScatter2D(2, 1, 3); 00066 _hist_correl_asym = bookScatter2D(3, 1, 3); 00067 } 00068 } 00069 00070 00071 void analyze(const Event& event) { 00072 // Trigger 00073 const bool trigger = apply<TriggerUA5>(event, "Trigger").nsdDecision(); 00074 if (!trigger) vetoEvent; 00075 _sumWPassed += event.weight(); 00076 00077 // Count forward/backward particles 00078 n_10f.push_back(apply<ChargedFinalState>(event, "CFS10F").size()); 00079 n_15f.push_back(apply<ChargedFinalState>(event, "CFS15F").size()); 00080 n_20f.push_back(apply<ChargedFinalState>(event, "CFS20F").size()); 00081 n_25f.push_back(apply<ChargedFinalState>(event, "CFS25F").size()); 00082 n_30f.push_back(apply<ChargedFinalState>(event, "CFS30F").size()); 00083 n_35f.push_back(apply<ChargedFinalState>(event, "CFS35F").size()); 00084 n_40f.push_back(apply<ChargedFinalState>(event, "CFS40F").size()); 00085 // 00086 n_10b.push_back(apply<ChargedFinalState>(event, "CFS10B").size()); 00087 n_15b.push_back(apply<ChargedFinalState>(event, "CFS15B").size()); 00088 n_20b.push_back(apply<ChargedFinalState>(event, "CFS20B").size()); 00089 n_25b.push_back(apply<ChargedFinalState>(event, "CFS25B").size()); 00090 n_30b.push_back(apply<ChargedFinalState>(event, "CFS30B").size()); 00091 n_35b.push_back(apply<ChargedFinalState>(event, "CFS35B").size()); 00092 n_40b.push_back(apply<ChargedFinalState>(event, "CFS40B").size()); 00093 // 00094 n_05 .push_back(apply<ChargedFinalState>(event, "CFS05").size()); 00095 } 00096 00097 00098 void finalize() { 00099 // The correlation strength is defined in formulas 00100 // 4.1 and 4.2 00101 00102 // Fill histos, gap width histo comes first 00103 // * Set the errors as Delta b / sqrt(sumWPassed) with 00104 // Delta b being the absolute uncertainty of b according to 00105 // Gaussian error-propagation (linear limit) and assuming 00106 // Poissonian uncertainties for the number of particles in 00107 // the eta-intervals 00108 // 00109 00110 // Define vectors to be able to fill Scatter2Ds 00111 vector<Point2D> points; 00112 // Fill the y-value vector 00113 points.push_back(correlation_helper(0, 0.5, n_10f, n_10b, _sumWPassed)); 00114 points.push_back(correlation_helper(1, 0.5, n_15f, n_15b, _sumWPassed)); 00115 points.push_back(correlation_helper(2, 0.5, n_20f, n_20b, _sumWPassed)); 00116 points.push_back(correlation_helper(3, 0.5, n_25f, n_25b, _sumWPassed)); 00117 points.push_back(correlation_helper(4, 0.5, n_30f, n_30b, _sumWPassed)); 00118 points.push_back(correlation_helper(5, 0.5, n_35f, n_35b, _sumWPassed)); 00119 points.push_back(correlation_helper(6, 0.5, n_40f, n_40b, _sumWPassed)); 00120 00121 // Fill the DPS 00122 _hist_correl->addPoints(points); 00123 00124 // Fill gap-center histo (Fig 15) 00125 // 00126 // The first bin contains the c_str strengths of 00127 // the gap size histo that has ane eta gap of two 00128 // 00129 // Now do the other histo -- clear already defined vectors first 00130 points.clear(); 00131 00132 points.push_back(correlation_helper(0, 0.25, n_20f, n_20b, _sumWPassed)); 00133 points.push_back(correlation_helper(0.5, 0.25, n_25f, n_15b, _sumWPassed)); 00134 points.push_back(correlation_helper(1, 0.25, n_30f, n_10b, _sumWPassed)); 00135 points.push_back(correlation_helper(1.5, 0.25, n_35f, n_05 , _sumWPassed)); 00136 points.push_back(correlation_helper(2, 0.25, n_40f, n_10f, _sumWPassed)); 00137 00138 // Fill in correlation strength for assymetric intervals, 00139 // see Tab. 5 00140 // Fill the DPS 00141 _hist_correl_asym->addPoints(points); 00142 } 00143 00144 //@} 00145 00146 00147 private: 00148 00149 /// @name Counters 00150 //@{ 00151 double _sumWPassed; 00152 //@} 00153 00154 00155 /// @name Vectors for storing the number of particles in the different eta intervals per event. 00156 /// @todo Is there a better way? 00157 //@{ 00158 std::vector<int> n_10f; 00159 std::vector<int> n_15f; 00160 std::vector<int> n_20f; 00161 std::vector<int> n_25f; 00162 std::vector<int> n_30f; 00163 std::vector<int> n_35f; 00164 std::vector<int> n_40f; 00165 // 00166 std::vector<int> n_10b; 00167 std::vector<int> n_15b; 00168 std::vector<int> n_20b; 00169 std::vector<int> n_25b; 00170 std::vector<int> n_30b; 00171 std::vector<int> n_35b; 00172 std::vector<int> n_40b; 00173 // 00174 std::vector<int> n_05; 00175 //@} 00176 00177 00178 /// @name Histograms 00179 //@{ 00180 // Symmetric eta intervals 00181 Scatter2DPtr _hist_correl; 00182 // For asymmetric eta intervals 00183 Scatter2DPtr _hist_correl_asym; 00184 //@} 00185 00186 }; 00187 00188 00189 00190 // The hook for the plugin system 00191 DECLARE_RIVET_PLUGIN(UA5_1988_S1867512); 00192 00193 } Generated on Tue Dec 13 2016 16:32:41 for The Rivet MC analysis system by ![]() |