JADE_OPAL_2000_S4300807.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 #include "Rivet/Projections/FinalState.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// @brief Jet rates in \f$ e^+ e^- \f$ at OPAL and JADE 00011 /// @author Frank Siegert 00012 class JADE_OPAL_2000_S4300807 : public Analysis { 00013 public: 00014 00015 /// @name Constructors etc. 00016 //@{ 00017 00018 /// Constructor 00019 JADE_OPAL_2000_S4300807() : Analysis("JADE_OPAL_2000_S4300807") { 00020 } 00021 00022 //@} 00023 00024 00025 /// @name Analysis methods 00026 //@{ 00027 00028 void init() { 00029 // Projections 00030 const FinalState fs; 00031 addProjection(fs, "FS"); 00032 FastJets JadeJets = FastJets(fs, FastJets::JADE, 0.7); 00033 FastJets DurhamJets = FastJets(fs, FastJets::DURHAM, 0.7); 00034 JadeJets.useInvisibles(true); 00035 DurhamJets.useInvisibles(true); 00036 addProjection(JadeJets, "JadeJets"); 00037 addProjection(DurhamJets, "DurhamJets"); 00038 00039 // Histos 00040 int offset = 0; 00041 switch (int(sqrtS()/GeV + 0.5)) { 00042 case 35: offset = 7; break; 00043 case 44: offset = 8; break; 00044 case 91: offset = 9; break; 00045 case 133: offset = 10; break; 00046 case 161: offset = 11; break; 00047 case 172: offset = 12; break; 00048 case 183: offset = 13; break; 00049 case 189: offset = 14; break; 00050 default: break; 00051 } 00052 for (size_t i = 0; i < 5; ++i) { 00053 _h_R_Jade[i] = bookHisto1D(offset, 1, i+1); 00054 _h_R_Durham[i] = bookHisto1D(offset+9, 1, i+1); 00055 if (i < 4) _h_y_Durham[i] = bookHisto1D(offset+17, 1, i+1); 00056 } 00057 } 00058 00059 00060 00061 void analyze(const Event& e) { 00062 const double weight = e.weight(); 00063 MSG_DEBUG("Num particles = " << applyProjection<FinalState>(e, "FS").particles().size()); 00064 00065 const FastJets& jadejet = applyProjection<FastJets>(e, "JadeJets"); 00066 if (jadejet.clusterSeq()) { 00067 /// @todo Put this in an index loop? 00068 double y_23 = jadejet.clusterSeq()->exclusive_ymerge_max(2); 00069 double y_34 = jadejet.clusterSeq()->exclusive_ymerge_max(3); 00070 double y_45 = jadejet.clusterSeq()->exclusive_ymerge_max(4); 00071 double y_56 = jadejet.clusterSeq()->exclusive_ymerge_max(5); 00072 00073 for (size_t i = 0; i < _h_R_Jade[0]->numBins(); ++i) { 00074 double ycut = _h_R_Jade[0]->bin(i).midpoint(); 00075 double width = _h_R_Jade[0]->bin(i).width(); 00076 if (y_23 < ycut) { 00077 _h_R_Jade[0]->fill(ycut, weight*width); 00078 } 00079 } 00080 for (size_t i = 0; i < _h_R_Jade[1]->numBins(); ++i) { 00081 double ycut = _h_R_Jade[1]->bin(i).midpoint(); 00082 double width = _h_R_Jade[1]->bin(i).width(); 00083 if (y_34 < ycut && y_23 > ycut) { 00084 _h_R_Jade[1]->fill(ycut, weight*width); 00085 } 00086 } 00087 for (size_t i = 0; i < _h_R_Jade[2]->numBins(); ++i) { 00088 double ycut = _h_R_Jade[2]->bin(i).midpoint(); 00089 double width = _h_R_Jade[2]->bin(i).width(); 00090 if (y_45 < ycut && y_34 > ycut) { 00091 _h_R_Jade[2]->fill(ycut, weight*width); 00092 } 00093 } 00094 for (size_t i = 0; i < _h_R_Jade[3]->numBins(); ++i) { 00095 double ycut = _h_R_Jade[3]->bin(i).midpoint(); 00096 double width = _h_R_Jade[3]->bin(i).width(); 00097 if (y_56 < ycut && y_45 > ycut) { 00098 _h_R_Jade[3]->fill(ycut, weight*width); 00099 } 00100 } 00101 for (size_t i = 0; i < _h_R_Jade[4]->numBins(); ++i) { 00102 double ycut = _h_R_Jade[4]->bin(i).midpoint(); 00103 double width = _h_R_Jade[4]->bin(i).width(); 00104 if (y_56 > ycut) { 00105 _h_R_Jade[4]->fill(ycut, weight*width); 00106 } 00107 } 00108 } 00109 00110 const FastJets& durjet = applyProjection<FastJets>(e, "DurhamJets"); 00111 if (durjet.clusterSeq()) { 00112 /// @todo Put this in an index loop? 00113 double y_23 = durjet.clusterSeq()->exclusive_ymerge_max(2); 00114 double y_34 = durjet.clusterSeq()->exclusive_ymerge_max(3); 00115 double y_45 = durjet.clusterSeq()->exclusive_ymerge_max(4); 00116 double y_56 = durjet.clusterSeq()->exclusive_ymerge_max(5); 00117 00118 _h_y_Durham[0]->fill(y_23, weight); 00119 _h_y_Durham[1]->fill(y_34, weight); 00120 _h_y_Durham[2]->fill(y_45, weight); 00121 _h_y_Durham[3]->fill(y_56, weight); 00122 00123 for (size_t i = 0; i < _h_R_Durham[0]->numBins(); ++i) { 00124 double ycut = _h_R_Durham[0]->bin(i).midpoint(); 00125 double width = _h_R_Durham[0]->bin(i).width(); 00126 if (y_23 < ycut) { 00127 _h_R_Durham[0]->fill(ycut, weight*width); 00128 } 00129 } 00130 for (size_t i = 0; i < _h_R_Durham[1]->numBins(); ++i) { 00131 double ycut = _h_R_Durham[1]->bin(i).midpoint(); 00132 double width = _h_R_Durham[1]->bin(i).width(); 00133 if (y_34 < ycut && y_23 > ycut) { 00134 _h_R_Durham[1]->fill(ycut, weight*width); 00135 } 00136 } 00137 for (size_t i = 0; i < _h_R_Durham[2]->numBins(); ++i) { 00138 double ycut = _h_R_Durham[2]->bin(i).midpoint(); 00139 double width = _h_R_Durham[2]->bin(i).width(); 00140 if (y_45 < ycut && y_34 > ycut) { 00141 _h_R_Durham[2]->fill(ycut, weight*width); 00142 } 00143 } 00144 for (size_t i = 0; i < _h_R_Durham[3]->numBins(); ++i) { 00145 double ycut = _h_R_Durham[3]->bin(i).midpoint(); 00146 double width = _h_R_Durham[3]->bin(i).width(); 00147 if (y_56 < ycut && y_45 > ycut) { 00148 _h_R_Durham[3]->fill(ycut, weight*width); 00149 } 00150 } 00151 for (size_t i = 0; i < _h_R_Durham[4]->numBins(); ++i) { 00152 double ycut = _h_R_Durham[4]->bin(i).midpoint(); 00153 double width = _h_R_Durham[4]->bin(i).width(); 00154 if (y_56 > ycut) { 00155 _h_R_Durham[4]->fill(ycut, weight*width); 00156 } 00157 } 00158 } 00159 } 00160 00161 00162 00163 /// Finalize 00164 void finalize() { 00165 for (size_t n = 0; n < 4; ++n) { 00166 scale(_h_y_Durham[n], 1.0/sumOfWeights()); 00167 } 00168 00169 for (size_t n = 0; n < 5; ++n) { 00170 // Scale integrated jet rates to 100% 00171 scale(_h_R_Jade[n], 100./sumOfWeights()); 00172 scale(_h_R_Durham[n], 100./sumOfWeights()); 00173 } 00174 } 00175 00176 //@} 00177 00178 00179 private: 00180 00181 /// @name Histograms 00182 //@{ 00183 Histo1DPtr _h_R_Jade[5]; 00184 Histo1DPtr _h_R_Durham[5]; 00185 Histo1DPtr _h_y_Durham[4]; 00186 //@} 00187 00188 }; 00189 00190 00191 00192 // The hook for the plugin system 00193 DECLARE_RIVET_PLUGIN(JADE_OPAL_2000_S4300807); 00194 00195 } Generated on Fri Dec 21 2012 15:03:41 for The Rivet MC analysis system by ![]() |