00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/FinalState.hh"
00006 #include "Rivet/Projections/FastJets.hh"
00007
00008 namespace Rivet {
00009
00010
00011 class CDF_1997_S3541940 : public Analysis {
00012 public:
00013
00014 CDF_1997_S3541940()
00015 : Analysis("CDF_1997_S3541940")
00016 {
00017 setBeams(PROTON, ANTIPROTON);
00018 }
00019
00020
00021 public:
00022
00023 void init() {
00024
00025 const FinalState fs(-4.2, 4.2);
00026 addProjection(FastJets(fs, FastJets::CDFJETCLU, 0.7), "Jets");
00027
00028 _h_m6J = bookHistogram1D(1, 1, 1);
00029 _h_X3ppp = bookHistogram1D(2, 1, 1);
00030 _h_X4ppp = bookHistogram1D(3, 1, 1);
00031 _h_costheta3ppp = bookHistogram1D(4, 1, 1);
00032 _h_psi3ppp = bookHistogram1D(5, 1, 1);
00033 _h_f3ppp = bookHistogram1D(6, 1, 1);
00034 _h_f4ppp = bookHistogram1D(6, 1, 2);
00035 _h_f5ppp = bookHistogram1D(6, 1, 3);
00036 _h_XApp = bookHistogram1D(7, 1, 1);
00037 _h_XCp = bookHistogram1D(8, 1, 1);
00038 _h_XE = bookHistogram1D(9, 1, 1);
00039 _h_psiAppBpp = bookHistogram1D(10, 1, 1);
00040 _h_psiCpDp = bookHistogram1D(11, 1, 1);
00041 _h_psiEF = bookHistogram1D(12, 1, 1);
00042 _h_fApp = bookHistogram1D(13, 1, 1);
00043 _h_fBpp = bookHistogram1D(14, 1, 1);
00044 _h_fCp = bookHistogram1D(15, 1, 1);
00045 _h_fDp = bookHistogram1D(16, 1, 1);
00046 _h_fE = bookHistogram1D(17, 1, 1);
00047 _h_fF = bookHistogram1D(18, 1, 1);
00048 }
00049
00050
00051 void analyze(const Event& event) {
00052 const double weight = event.weight();
00053
00054 Jets jets;
00055 double sumEt = 0.0;
00056 FourMomentum jetsystem(0.0, 0.0, 0.0, 0.0);
00057 foreach (const Jet& jet, applyProjection<FastJets>(event, "Jets").jetsByEt()) {
00058 double Et = jet.momentum().Et();
00059 double eta = fabs(jet.momentum().eta());
00060 if (Et > 20.0*GeV && eta<3.0) {
00061 bool separated=true;
00062 foreach (const Jet& ref, jets) {
00063 if (deltaR(jet.momentum(), ref.momentum())<0.9) {
00064 separated=false;
00065 break;
00066 }
00067 }
00068 if (!separated) continue;
00069 jets.push_back(jet);
00070 sumEt += Et;
00071 jetsystem += jet.momentum();
00072 }
00073 if (jets.size()>=6) break;
00074 }
00075
00076 if (jets.size()<6) {
00077 vetoEvent;
00078 }
00079
00080 if (sumEt<320.0*GeV) {
00081 vetoEvent;
00082 }
00083
00084 double m6J=_safeMass(jetsystem);
00085 if (m6J<520.0*GeV) {
00086 vetoEvent;
00087 }
00088
00089 LorentzTransform cms_boost(-jetsystem.boostVector());
00090 vector<FourMomentum> jets6;
00091 foreach (Jet jet, jets) {
00092 jets6.push_back(cms_boost.transform(jet.momentum()));
00093 }
00094 std::sort(jets6.begin(), jets6.end(), FourMomentum::byEDescending());
00095
00096 FourMomentum pE, pF;
00097 vector<FourMomentum> jets5(_reduce(jets6, pE, pF));
00098 std::sort(jets5.begin(), jets5.end(), FourMomentum::byEDescending());
00099
00100 FourMomentum pCp, pDp;
00101 vector<FourMomentum> jets4(_reduce(jets5, pCp, pDp));
00102 std::sort(jets4.begin(), jets4.end(), FourMomentum::byEDescending());
00103
00104 FourMomentum pApp, pBpp;
00105 vector<FourMomentum> jets3(_reduce(jets4, pApp, pBpp));
00106 std::sort(jets3.begin(), jets3.end(), FourMomentum::byEDescending());
00107 FourMomentum p3ppp(jets3[0]);
00108 FourMomentum p4ppp(jets3[1]);
00109 FourMomentum p5ppp(jets3[2]);
00110
00111 double X3ppp = 2.0*p3ppp.E()/m6J;
00112 if (X3ppp>0.9) {
00113 vetoEvent;
00114 }
00115
00116 FourMomentum pAV = cms_boost.transform(_avg_beam_in_lab(m6J, jetsystem.rapidity()));
00117 double costheta3ppp=pAV.vector3().unit().dot(p3ppp.vector3().unit());
00118 if (fabs(costheta3ppp)>0.9) {
00119 vetoEvent;
00120 }
00121
00122
00123 _h_m6J->fill(m6J, weight);
00124 _h_X3ppp->fill(X3ppp, weight);
00125 _h_X4ppp->fill(2.0*p4ppp.E()/m6J, weight);
00126 _h_costheta3ppp->fill(costheta3ppp, weight);
00127 double psi3ppp=_psi(p3ppp, pAV, p4ppp, p5ppp);
00128 _h_psi3ppp->fill(psi3ppp, weight);
00129 _h_f3ppp->fill(_safeMass(p3ppp)/m6J, weight);
00130 _h_f4ppp->fill(_safeMass(p4ppp)/m6J, weight);
00131 _h_f5ppp->fill(_safeMass(p5ppp)/m6J, weight);
00132
00133
00134 _h_fApp->fill(_safeMass(pApp)/m6J, weight);
00135 _h_fBpp->fill(_safeMass(pApp)/m6J, weight);
00136 _h_XApp->fill(pApp.E()/(pApp.E()+pBpp.E()), weight);
00137 double psiAppBpp=_psi(pApp, pBpp, pApp+pBpp, pAV);
00138 _h_psiAppBpp->fill(psiAppBpp, weight);
00139
00140
00141 _h_fCp->fill(_safeMass(pCp)/m6J, weight);
00142 _h_fDp->fill(_safeMass(pDp)/m6J, weight);
00143 _h_XCp->fill(pCp.E()/(pCp.E()+pDp.E()), weight);
00144 double psiCpDp=_psi(pCp, pDp, pCp+pDp, pAV);
00145 _h_psiCpDp->fill(psiCpDp, weight);
00146
00147
00148 _h_fE->fill(_safeMass(pE)/m6J, weight);
00149 _h_fF->fill(_safeMass(pF)/m6J, weight);
00150 _h_XE->fill(pE.E()/(pE.E()+pF.E()), weight);
00151 double psiEF=_psi(pE, pF, pE+pF, pAV);
00152 _h_psiEF->fill(psiEF, weight);
00153 }
00154
00155
00156 void finalize() {
00157
00158 normalize(_h_m6J);
00159 normalize(_h_X3ppp);
00160 normalize(_h_X4ppp);
00161 normalize(_h_costheta3ppp);
00162 normalize(_h_psi3ppp);
00163 normalize(_h_f3ppp);
00164 normalize(_h_f4ppp);
00165 normalize(_h_f5ppp);
00166 normalize(_h_XApp);
00167 normalize(_h_XCp);
00168 normalize(_h_XE);
00169 normalize(_h_psiAppBpp);
00170 normalize(_h_psiCpDp);
00171 normalize(_h_psiEF);
00172 normalize(_h_fApp);
00173 normalize(_h_fBpp);
00174 normalize(_h_fCp);
00175 normalize(_h_fDp);
00176 normalize(_h_fE);
00177 normalize(_h_fF);
00178
00179 }
00180
00181
00182
00183 private:
00184
00185 vector<FourMomentum> _reduce(const vector<FourMomentum>& jets,
00186 FourMomentum& combined1,
00187 FourMomentum& combined2) {
00188 double minMass2 = 1e9;
00189 size_t idx1(jets.size()), idx2(jets.size());
00190 for (size_t i=0; i<jets.size(); ++i) {
00191 for (size_t j=i+1; j<jets.size(); ++j) {
00192 double mass2 = FourMomentum(jets[i]+jets[j]).mass2();
00193 if (mass2<minMass2) {
00194 idx1=i;
00195 idx2=j;
00196 }
00197 }
00198 }
00199 vector<FourMomentum> newjets;
00200 for (size_t i=0; i<jets.size(); ++i) {
00201 if (i!=idx1 && i!=idx2) newjets.push_back(jets[i]);
00202 }
00203 newjets.push_back(jets[idx1]+jets[idx2]);
00204 combined1 = jets[idx1];
00205 combined2 = jets[idx2];
00206 return newjets;
00207 }
00208
00209 FourMomentum _avg_beam_in_lab(const double& m, const double& y) {
00210 const double mt = m/2.0;
00211 FourMomentum beam1(mt, 0, 0, mt);
00212 FourMomentum beam2(mt, 0, 0, -mt);
00213 if (fabs(y)>1e-3) {
00214 FourMomentum boostvec(cosh(y), 0.0, 0.0, sinh(y));
00215 LorentzTransform cms_boost(-boostvec.boostVector());
00216 cms_boost = cms_boost.inverse();
00217 beam1=cms_boost.transform(beam1);
00218 beam2=cms_boost.transform(beam2);
00219 }
00220 if (beam1.E()>beam2.E()) {
00221 return beam1-beam2;
00222 }
00223 else {
00224 return beam2-beam1;
00225 }
00226 }
00227
00228 double _psi(const FourMomentum& p1, const FourMomentum& p2,
00229 const FourMomentum& p3, const FourMomentum& p4) {
00230 Vector3 p1xp2 = p1.vector3().cross(p2.vector3());
00231 Vector3 p3xp4 = p3.vector3().cross(p4.vector3());
00232 return mapAngle0ToPi(acos(p1xp2.unit().dot(p3xp4.unit())));
00233 }
00234
00235 double _safeMass(const FourMomentum& p) {
00236 double mass2=p.mass2();
00237 if (mass2>0.0) return sqrt(mass2);
00238 else if (mass2<-1.0e-5) {
00239 getLog() << Log::WARNING << "m2 = " << m2 << ". Assuming m2=0." << endl;
00240 return 0.0;
00241 }
00242 else return 0.0;
00243 }
00244
00245
00246 private:
00247
00248 AIDA::IHistogram1D *_h_m6J;
00249 AIDA::IHistogram1D *_h_X3ppp;
00250 AIDA::IHistogram1D *_h_X4ppp;
00251 AIDA::IHistogram1D *_h_costheta3ppp;
00252 AIDA::IHistogram1D *_h_psi3ppp;
00253 AIDA::IHistogram1D *_h_f3ppp;
00254 AIDA::IHistogram1D *_h_f4ppp;
00255 AIDA::IHistogram1D *_h_f5ppp;
00256 AIDA::IHistogram1D *_h_XApp;
00257 AIDA::IHistogram1D *_h_XCp;
00258 AIDA::IHistogram1D *_h_XE;
00259 AIDA::IHistogram1D *_h_psiAppBpp;
00260 AIDA::IHistogram1D *_h_psiCpDp;
00261 AIDA::IHistogram1D *_h_psiEF;
00262 AIDA::IHistogram1D *_h_fApp;
00263 AIDA::IHistogram1D *_h_fBpp;
00264 AIDA::IHistogram1D *_h_fCp;
00265 AIDA::IHistogram1D *_h_fDp;
00266 AIDA::IHistogram1D *_h_fE;
00267 AIDA::IHistogram1D *_h_fF;
00268
00269 };
00270
00271
00272
00273
00274 AnalysisBuilder<CDF_1997_S3541940> plugin_CDF_1997_S3541940;
00275
00276
00277 }