CDF_1997_S3541940.cc

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