D0_1996_S3214044.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/FinalState.hh" 00004 #include "Rivet/Projections/FastJets.hh" 00005 #include "Rivet/Math/LorentzTrans.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// @brief D0 topological distributions of 3- and 4-jet events. 00011 class D0_1996_S3214044 : public Analysis { 00012 public: 00013 00014 /// @name Constructors etc. 00015 //@{ 00016 00017 /// Constructor 00018 D0_1996_S3214044() : Analysis("D0_1996_S3214044") 00019 { } 00020 00021 00022 /// @name Analysis methods 00023 //@{ 00024 00025 /// Book histograms 00026 void init() { 00027 const FinalState fs; 00028 declare(fs, "FS"); 00029 /// @todo Use correct jet algorithm --- tried FJ3 D0RunICone but does 00030 // not look as good as the Run2 cone alg used here 00031 declare(FastJets(fs, FastJets::D0ILCONE, 0.7), "ConeJets"); 00032 00033 _h_3j_x3 = bookHisto1D(1, 1, 1); 00034 _h_3j_x5 = bookHisto1D(2, 1, 1); 00035 _h_3j_costheta3 = bookHisto1D(3, 1, 1); 00036 _h_3j_psi = bookHisto1D(4, 1, 1); 00037 _h_3j_mu34 = bookHisto1D(5, 1, 1); 00038 _h_3j_mu35 = bookHisto1D(6, 1, 1); 00039 _h_3j_mu45 = bookHisto1D(7, 1, 1); 00040 00041 _h_4j_x3 = bookHisto1D(8, 1, 1); 00042 _h_4j_x4 = bookHisto1D(9, 1, 1); 00043 _h_4j_x5 = bookHisto1D(10, 1, 1); 00044 _h_4j_x6 = bookHisto1D(11, 1, 1); 00045 _h_4j_costheta3 = bookHisto1D(12, 1, 1); 00046 _h_4j_costheta4 = bookHisto1D(13, 1, 1); 00047 _h_4j_costheta5 = bookHisto1D(14, 1, 1); 00048 _h_4j_costheta6 = bookHisto1D(15, 1, 1); 00049 _h_4j_cosomega34 = bookHisto1D(16, 1, 1); 00050 _h_4j_cosomega35 = bookHisto1D(17, 1, 1); 00051 _h_4j_cosomega36 = bookHisto1D(18, 1, 1); 00052 _h_4j_cosomega45 = bookHisto1D(19, 1, 1); 00053 _h_4j_cosomega46 = bookHisto1D(20, 1, 1); 00054 _h_4j_cosomega56 = bookHisto1D(21, 1, 1); 00055 _h_4j_mu34 = bookHisto1D(22, 1, 1); 00056 _h_4j_mu35 = bookHisto1D(23, 1, 1); 00057 _h_4j_mu36 = bookHisto1D(24, 1, 1); 00058 _h_4j_mu45 = bookHisto1D(25, 1, 1); 00059 _h_4j_mu46 = bookHisto1D(26, 1, 1); 00060 _h_4j_mu56 = bookHisto1D(27, 1, 1); 00061 _h_4j_theta_BZ = bookHisto1D(28, 1, 1); 00062 _h_4j_costheta_NR = bookHisto1D(29, 1, 1); 00063 00064 } 00065 00066 00067 void analyze(const Event& event) { 00068 const double weight = event.weight(); 00069 00070 Jets jets_in = apply<FastJets>(event, "ConeJets") 00071 .jets(Cuts::Et > 20*GeV && Cuts::abseta < 3, cmpMomByEt); 00072 00073 Jets jets_isolated; 00074 for (size_t i = 0; i < jets_in.size(); ++i) { 00075 bool isolated = true; 00076 for (size_t j = 0; j < jets_in.size(); ++j) { 00077 if (i != j && deltaR(jets_in[i], jets_in[j]) < 1.4) { 00078 isolated = false; 00079 break; 00080 } 00081 } 00082 if (isolated) jets_isolated.push_back(jets_in[i]); 00083 } 00084 00085 if (jets_isolated.size() == 0 || jets_isolated[0].Et() < 60.0*GeV) vetoEvent; 00086 00087 if (jets_isolated.size() > 2) _threeJetAnalysis(jets_isolated, weight); 00088 if (jets_isolated.size() > 3) _fourJetAnalysis(jets_isolated, weight); 00089 } 00090 00091 00092 void finalize() { 00093 normalize(_h_3j_x3, 1.0); 00094 normalize(_h_3j_x5, 1.0); 00095 normalize(_h_3j_costheta3, 1.0); 00096 normalize(_h_3j_psi, 1.0); 00097 normalize(_h_3j_mu34, 1.0); 00098 normalize(_h_3j_mu35, 1.0); 00099 normalize(_h_3j_mu45, 1.0); 00100 normalize(_h_4j_x3, 1.0); 00101 normalize(_h_4j_x4, 1.0); 00102 normalize(_h_4j_x5, 1.0); 00103 normalize(_h_4j_x6, 1.0); 00104 normalize(_h_4j_costheta3, 1.0); 00105 normalize(_h_4j_costheta4, 1.0); 00106 normalize(_h_4j_costheta5, 1.0); 00107 normalize(_h_4j_costheta6, 1.0); 00108 normalize(_h_4j_cosomega34, 1.0); 00109 normalize(_h_4j_cosomega35, 1.0); 00110 normalize(_h_4j_cosomega36, 1.0); 00111 normalize(_h_4j_cosomega45, 1.0); 00112 normalize(_h_4j_cosomega46, 1.0); 00113 normalize(_h_4j_cosomega56, 1.0); 00114 normalize(_h_4j_mu34, 1.0); 00115 normalize(_h_4j_mu35, 1.0); 00116 normalize(_h_4j_mu36, 1.0); 00117 normalize(_h_4j_mu45, 1.0); 00118 normalize(_h_4j_mu46, 1.0); 00119 normalize(_h_4j_mu56, 1.0); 00120 normalize(_h_4j_theta_BZ, 1.0); 00121 normalize(_h_4j_costheta_NR, 1.0); 00122 } 00123 00124 //@} 00125 00126 00127 private: 00128 00129 /// @name Helper functions 00130 //@{ 00131 00132 void _threeJetAnalysis(const Jets& jets, const double& weight) { 00133 // >=3 jet events 00134 FourMomentum jjj(jets[0].momentum()+jets[1].momentum()+jets[2].momentum()); 00135 const double sqrts = _safeMass(jjj); 00136 if (sqrts<200*GeV) { 00137 return; 00138 } 00139 00140 const LorentzTransform cms_boost = LorentzTransform::mkFrameTransformFromBeta(jjj.betaVec()); 00141 vector<FourMomentum> jets_boosted; 00142 foreach (Jet jet, jets) { 00143 jets_boosted.push_back(cms_boost.transform(jet.momentum())); 00144 } 00145 std::sort(jets_boosted.begin(), jets_boosted.end(), FourMomentum::byEDescending()); 00146 FourMomentum p3(jets_boosted[0]); 00147 FourMomentum p4(jets_boosted[1]); 00148 FourMomentum p5(jets_boosted[2]); 00149 00150 Vector3 beam1(0.0, 0.0, 1.0); 00151 Vector3 p1xp3 = beam1.cross(p3.p3()); 00152 Vector3 p4xp5 = p4.p3().cross(p5.p3()); 00153 const double cospsi = p1xp3.dot(p4xp5)/p1xp3.mod()/p4xp5.mod(); 00154 00155 _h_3j_x3->fill(2.0*p3.E()/sqrts, weight); 00156 _h_3j_x5->fill(2.0*p5.E()/sqrts, weight); 00157 _h_3j_costheta3->fill(fabs(cos(p3.theta())), weight); 00158 _h_3j_psi->fill(acos(cospsi)/degree, weight); 00159 _h_3j_mu34->fill(_safeMass(FourMomentum(p3+p4))/sqrts, weight); 00160 _h_3j_mu35->fill(_safeMass(FourMomentum(p3+p5))/sqrts, weight); 00161 _h_3j_mu45->fill(_safeMass(FourMomentum(p4+p5))/sqrts, weight); 00162 } 00163 00164 00165 void _fourJetAnalysis(const Jets& jets, const double& weight) { 00166 // >=4 jet events 00167 FourMomentum jjjj(jets[0].momentum() + jets[1].momentum() + jets[2].momentum()+ jets[3].momentum()); 00168 const double sqrts = _safeMass(jjjj); 00169 if (sqrts < 200*GeV) return; 00170 00171 const LorentzTransform cms_boost = LorentzTransform::mkFrameTransformFromBeta(jjjj.betaVec()); 00172 vector<FourMomentum> jets_boosted; 00173 foreach (Jet jet, jets) { 00174 jets_boosted.push_back(cms_boost.transform(jet.momentum())); 00175 } 00176 sort(jets_boosted.begin(), jets_boosted.end(), FourMomentum::byEDescending()); 00177 FourMomentum p3(jets_boosted[0]); 00178 FourMomentum p4(jets_boosted[1]); 00179 FourMomentum p5(jets_boosted[2]); 00180 FourMomentum p6(jets_boosted[3]); 00181 00182 Vector3 p3xp4 = p3.p3().cross(p4.p3()); 00183 Vector3 p5xp6 = p5.p3().cross(p6.p3()); 00184 const double costheta_BZ = p3xp4.dot(p5xp6)/p3xp4.mod()/p5xp6.mod(); 00185 const double costheta_NR = (p3.p3()-p4.p3()).dot(p5.p3()-p6.p3())/ 00186 (p3.p3()-p4.p3()).mod()/(p5.p3()-p6.p3()).mod(); 00187 00188 _h_4j_x3->fill(2.0*p3.E()/sqrts, weight); 00189 _h_4j_x4->fill(2.0*p4.E()/sqrts, weight); 00190 _h_4j_x5->fill(2.0*p5.E()/sqrts, weight); 00191 _h_4j_x6->fill(2.0*p6.E()/sqrts, weight); 00192 _h_4j_costheta3->fill(fabs(cos(p3.theta())), weight); 00193 _h_4j_costheta4->fill(fabs(cos(p4.theta())), weight); 00194 _h_4j_costheta5->fill(fabs(cos(p5.theta())), weight); 00195 _h_4j_costheta6->fill(fabs(cos(p6.theta())), weight); 00196 _h_4j_cosomega34->fill(cos(p3.angle(p4)), weight); 00197 _h_4j_cosomega35->fill(cos(p3.angle(p5)), weight); 00198 _h_4j_cosomega36->fill(cos(p3.angle(p6)), weight); 00199 _h_4j_cosomega45->fill(cos(p4.angle(p5)), weight); 00200 _h_4j_cosomega46->fill(cos(p4.angle(p6)), weight); 00201 _h_4j_cosomega56->fill(cos(p5.angle(p6)), weight); 00202 _h_4j_mu34->fill(_safeMass(FourMomentum(p3+p4))/sqrts, weight); 00203 _h_4j_mu35->fill(_safeMass(FourMomentum(p3+p5))/sqrts, weight); 00204 _h_4j_mu36->fill(_safeMass(FourMomentum(p3+p6))/sqrts, weight); 00205 _h_4j_mu45->fill(_safeMass(FourMomentum(p4+p5))/sqrts, weight); 00206 _h_4j_mu46->fill(_safeMass(FourMomentum(p4+p6))/sqrts, weight); 00207 _h_4j_mu56->fill(_safeMass(FourMomentum(p5+p6))/sqrts, weight); 00208 _h_4j_theta_BZ->fill(acos(fabs(costheta_BZ))/degree, weight); 00209 _h_4j_costheta_NR->fill(fabs(costheta_NR), weight); 00210 00211 } 00212 00213 double _safeMass(const FourMomentum& p) { 00214 double mass2=p.mass2(); 00215 if (mass2>0.0) return sqrt(mass2); 00216 else if (mass2<-1.0e-5) { 00217 MSG_WARNING("m2 = " << m2 << ". Assuming m2=0."); 00218 return 0.0; 00219 } 00220 else return 0.0; 00221 } 00222 00223 private: 00224 00225 /// @name Histograms 00226 //@{ 00227 00228 Histo1DPtr _h_3j_x3; 00229 Histo1DPtr _h_3j_x5; 00230 Histo1DPtr _h_3j_costheta3; 00231 Histo1DPtr _h_3j_psi; 00232 Histo1DPtr _h_3j_mu34; 00233 Histo1DPtr _h_3j_mu35; 00234 Histo1DPtr _h_3j_mu45; 00235 00236 Histo1DPtr _h_4j_x3; 00237 Histo1DPtr _h_4j_x4; 00238 Histo1DPtr _h_4j_x5; 00239 Histo1DPtr _h_4j_x6; 00240 Histo1DPtr _h_4j_costheta3; 00241 Histo1DPtr _h_4j_costheta4; 00242 Histo1DPtr _h_4j_costheta5; 00243 Histo1DPtr _h_4j_costheta6; 00244 Histo1DPtr _h_4j_cosomega34; 00245 Histo1DPtr _h_4j_cosomega35; 00246 Histo1DPtr _h_4j_cosomega36; 00247 Histo1DPtr _h_4j_cosomega45; 00248 Histo1DPtr _h_4j_cosomega46; 00249 Histo1DPtr _h_4j_cosomega56; 00250 Histo1DPtr _h_4j_mu34; 00251 Histo1DPtr _h_4j_mu35; 00252 Histo1DPtr _h_4j_mu36; 00253 Histo1DPtr _h_4j_mu45; 00254 Histo1DPtr _h_4j_mu46; 00255 Histo1DPtr _h_4j_mu56; 00256 Histo1DPtr _h_4j_theta_BZ; 00257 Histo1DPtr _h_4j_costheta_NR; 00258 //@} 00259 00260 }; 00261 00262 00263 00264 // The hook for the plugin system 00265 DECLARE_RIVET_PLUGIN(D0_1996_S3214044); 00266 00267 } Generated on Tue Dec 13 2016 16:32:37 for The Rivet MC analysis system by ![]() |