rivet is hosted by Hepforge, IPPP Durham
CDF_1996_S3349578.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 
00006 namespace Rivet {
00007 
00008 
00009   /// @brief CDF properties of high-mass multi-jet events
00010   class CDF_1996_S3349578 : public Analysis {
00011   public:
00012 
00013     /// @name Constructors etc.
00014     //@{
00015 
00016     /// Constructor
00017     CDF_1996_S3349578()
00018       : Analysis("CDF_1996_S3349578")
00019     {
00020     }
00021 
00022     //@}
00023 
00024 
00025     /// @name Analysis methods
00026     //@{
00027 
00028     /// Book histograms and initialise projections before the run
00029     void init() {
00030 
00031       /// Initialise and register projections here
00032       const FinalState fs(-4.2, 4.2);
00033       addProjection(FastJets(fs, FastJets::CDFJETCLU, 0.7), "Jets");
00034 
00035       /// Book histograms here, e.g.:
00036       _h_3_mNJ = bookHisto1D(1, 1, 1);
00037       _h_3_X3 = bookHisto1D(2, 1, 1);
00038       _h_3_X4 = bookHisto1D(3, 1, 1);
00039       _h_3_costheta3 = bookHisto1D(8, 1, 1);
00040       _h_3_psi3 = bookHisto1D(9, 1, 1);
00041       _h_3_f3 = bookHisto1D(14, 1, 1);
00042       _h_3_f4 = bookHisto1D(14, 1, 2);
00043       _h_3_f5 = bookHisto1D(14, 1, 3);
00044 
00045       _h_4_mNJ = bookHisto1D(1, 1, 2);
00046       _h_4_X3 = bookHisto1D(4, 1, 1);
00047       _h_4_X4 = bookHisto1D(5, 1, 1);
00048       _h_4_costheta3 = bookHisto1D(10, 1, 1);
00049       _h_4_psi3 = bookHisto1D(11, 1, 1);
00050       _h_4_f3 = bookHisto1D(15, 1, 1);
00051       _h_4_f4 = bookHisto1D(15, 1, 2);
00052       _h_4_f5 = bookHisto1D(15, 1, 3);
00053       _h_4_XA = bookHisto1D(17, 1, 1);
00054       _h_4_psiAB = bookHisto1D(19, 1, 1);
00055       _h_4_fA = bookHisto1D(21, 1, 1);
00056       _h_4_fB = bookHisto1D(21, 1, 2);
00057 
00058       _h_5_mNJ = bookHisto1D(1, 1, 3);
00059       _h_5_X3 = bookHisto1D(6, 1, 1);
00060       _h_5_X4 = bookHisto1D(7, 1, 1);
00061       _h_5_costheta3 = bookHisto1D(12, 1, 1);
00062       _h_5_psi3 = bookHisto1D(13, 1, 1);
00063       _h_5_f3 = bookHisto1D(16, 1, 1);
00064       _h_5_f4 = bookHisto1D(16, 1, 2);
00065       _h_5_f5 = bookHisto1D(16, 1, 3);
00066       _h_5_XA = bookHisto1D(18, 1, 1);
00067       _h_5_XC = bookHisto1D(18, 1, 2);
00068       _h_5_psiAB = bookHisto1D(20, 1, 1);
00069       _h_5_psiCD = bookHisto1D(20, 1, 2);
00070       _h_5_fA = bookHisto1D(22, 1, 1);
00071       _h_5_fB = bookHisto1D(23, 1, 1);
00072       _h_5_fC = bookHisto1D(24, 1, 1);
00073       _h_5_fD = bookHisto1D(25, 1, 1);
00074 
00075     }
00076 
00077 
00078     void analyze(const Event& event) {
00079       Jets jets;
00080       FourMomentum jetsystem(0.0, 0.0, 0.0, 0.0);
00081       foreach (const Jet& jet, applyProjection<FastJets>(event, "Jets").jets(cmpMomByEt)) {
00082         double Et = jet.Et();
00083         if (Et > 20.0*GeV) {
00084           bool separated = true;
00085           foreach (const Jet& ref, jets) {
00086             if (deltaR(jet, ref) < 0.9) {
00087               separated = false;
00088               break;
00089             }
00090           }
00091           if (!separated) continue;
00092           jets.push_back(jet);
00093           jetsystem += jet.momentum();
00094         }
00095         if (jets.size() >= 5) break;
00096       }
00097       /// @todo include gaussian jet energy resolution smearing?
00098 
00099       const double weight = event.weight();
00100       if (jets.size() > 4) {
00101         _fiveJetAnalysis(jets, weight);
00102         jets.resize(4);
00103       }
00104       if (jets.size() > 3) {
00105         _fourJetAnalysis(jets, weight);
00106         jets.resize(3);
00107       }
00108       if (jets.size() > 2) {
00109         _threeJetAnalysis(jets, weight);
00110       }
00111     }
00112 
00113 
00114     void _threeJetAnalysis(const Jets& jets, const double& weight) {
00115       MSG_DEBUG("3 jet analysis");
00116 
00117       double sumEt=0.0;
00118       FourMomentum jetsystem(0.0, 0.0, 0.0, 0.0);
00119       foreach (const Jet& jet, jets) {
00120         sumEt+=jet.Et();
00121         jetsystem+=jet.momentum();
00122       }
00123       if (sumEt < 420.0*GeV) return;
00124 
00125       const double m3J = _safeMass(jetsystem);
00126       if (m3J<600*GeV) {
00127         return;
00128       }
00129 
00130       LorentzTransform cms_boost(-jetsystem.boostVector());
00131       vector<FourMomentum> jets3;
00132       foreach (Jet jet, jets) {
00133         jets3.push_back(cms_boost.transform(jet.momentum()));
00134       }
00135       std::sort(jets3.begin(), jets3.end(), FourMomentum::byEDescending());
00136       FourMomentum p3(jets3[0]);
00137       FourMomentum p4(jets3[1]);
00138       FourMomentum p5(jets3[2]);
00139 
00140       FourMomentum pAV = cms_boost.transform(_avg_beam_in_lab(m3J, jetsystem.rapidity()));
00141       double costheta3=pAV.p3().unit().dot(p3.p3().unit());
00142       if (fabs(costheta3)>0.6) {
00143         return;
00144       }
00145 
00146       double X3 = 2.0*p3.E()/m3J;
00147       if (X3>0.9) {
00148         return;
00149       }
00150 
00151       const double X4 = 2.0*p4.E()/m3J;
00152       const double psi3 = _psi(p3, pAV, p4, p5);
00153       const double f3 = _safeMass(p3)/m3J;
00154       const double f4 = _safeMass(p4)/m3J;
00155       const double f5 = _safeMass(p5)/m3J;
00156 
00157       _h_3_mNJ->fill(m3J, weight);
00158       _h_3_X3->fill(X3, weight);
00159       _h_3_X4->fill(X4, weight);
00160       _h_3_costheta3->fill(costheta3, weight);
00161       _h_3_psi3->fill(psi3, weight);
00162       _h_3_f3->fill(f3, weight);
00163       _h_3_f4->fill(f4, weight);
00164       _h_3_f5->fill(f5, weight);
00165 
00166     }
00167 
00168 
00169 
00170 
00171     void _fourJetAnalysis(const Jets& jets, const double& weight) {
00172       MSG_DEBUG("4 jet analysis");
00173 
00174       double sumEt=0.0;
00175       FourMomentum jetsystem(0.0, 0.0, 0.0, 0.0);
00176       foreach (const Jet& jet, jets) {
00177         sumEt+=jet.Et();
00178         jetsystem+=jet.momentum();
00179       }
00180       if (sumEt < 420.0*GeV) return;
00181 
00182       const double m4J = _safeMass(jetsystem);
00183       if (m4J < 650*GeV) return;
00184 
00185       LorentzTransform cms_boost(-jetsystem.boostVector());
00186       vector<FourMomentum> jets4;
00187       foreach (Jet jet, jets) {
00188         jets4.push_back(cms_boost.transform(jet.momentum()));
00189       }
00190       std::sort(jets4.begin(), jets4.end(), FourMomentum::byEDescending());
00191 
00192       FourMomentum pA, pB;
00193       vector<FourMomentum> jets3(_reduce(jets4, pA, pB));
00194       std::sort(jets3.begin(), jets3.end(), FourMomentum::byEDescending());
00195       FourMomentum p3(jets3[0]);
00196       FourMomentum p4(jets3[1]);
00197       FourMomentum p5(jets3[2]);
00198 
00199       FourMomentum pAV = cms_boost.transform(_avg_beam_in_lab(m4J, jetsystem.rapidity()));
00200       double costheta3=pAV.p3().unit().dot(p3.p3().unit());
00201       if (fabs(costheta3)>0.8) {
00202         return;
00203       }
00204 
00205       const double X3 = 2.0*p3.E()/m4J;
00206       if (X3>0.9) {
00207         return;
00208       }
00209 
00210       // fill histograms
00211       const double X4 = 2.0*p4.E()/m4J;
00212       const double psi3 = _psi(p3, pAV, p4, p5);
00213       const double f3 = _safeMass(p3)/m4J;
00214       const double f4 = _safeMass(p4)/m4J;
00215       const double f5 = _safeMass(p5)/m4J;
00216       const double fA = _safeMass(pA)/m4J;
00217       const double fB = _safeMass(pB)/m4J;
00218       const double XA = pA.E()/(pA.E()+pB.E());
00219       const double psiAB = _psi(pA, pB, pA+pB, pAV);
00220 
00221       _h_4_mNJ->fill(m4J, weight);
00222       _h_4_X3->fill(X3, weight);
00223       _h_4_X4->fill(X4, weight);
00224       _h_4_costheta3->fill(costheta3, weight);
00225       _h_4_psi3->fill(psi3, weight);
00226       _h_4_f3->fill(f3, weight);
00227       _h_4_f4->fill(f4, weight);
00228       _h_4_f5->fill(f5, weight);
00229       _h_4_XA->fill(XA, weight);
00230       _h_4_psiAB->fill(psiAB, weight);
00231       _h_4_fA->fill(fA, weight);
00232       _h_4_fB->fill(fB, weight);
00233     }
00234 
00235 
00236 
00237 
00238     void _fiveJetAnalysis(const Jets& jets, const double& weight) {
00239       MSG_DEBUG("5 jet analysis");
00240 
00241       double sumEt=0.0;
00242       FourMomentum jetsystem(0.0, 0.0, 0.0, 0.0);
00243       foreach (const Jet& jet, jets) {
00244         sumEt+=jet.Et();
00245         jetsystem+=jet.momentum();
00246       }
00247       if (sumEt < 420.0*GeV) return;
00248 
00249       const double m5J = _safeMass(jetsystem);
00250       if (m5J < 750*GeV) return;
00251 
00252       LorentzTransform cms_boost(-jetsystem.boostVector());
00253       vector<FourMomentum> jets5;
00254       foreach (Jet jet, jets) {
00255         jets5.push_back(cms_boost.transform(jet.momentum()));
00256       }
00257       std::sort(jets5.begin(), jets5.end(), FourMomentum::byEDescending());
00258 
00259       FourMomentum pC, pD;
00260       vector<FourMomentum> jets4(_reduce(jets5, pC, pD));
00261       std::sort(jets4.begin(), jets4.end(), FourMomentum::byEDescending());
00262 
00263       FourMomentum pA, pB;
00264       vector<FourMomentum> jets3(_reduce(jets4, pA, pB));
00265       std::sort(jets3.begin(), jets3.end(), FourMomentum::byEDescending());
00266       FourMomentum p3(jets3[0]);
00267       FourMomentum p4(jets3[1]);
00268       FourMomentum p5(jets3[2]);
00269 
00270       // fill histograms
00271       FourMomentum pAV = cms_boost.transform(_avg_beam_in_lab(m5J, jetsystem.rapidity()));
00272       const double costheta3 = pAV.p3().unit().dot(p3.p3().unit());
00273       const double X3 = 2.0*p3.E()/m5J;
00274       const double X4 = 2.0*p4.E()/m5J;
00275       const double psi3 = _psi(p3, pAV, p4, p5);
00276       const double f3 = _safeMass(p3)/m5J;
00277       const double f4 = _safeMass(p4)/m5J;
00278       const double f5 = _safeMass(p5)/m5J;
00279       const double fA = _safeMass(pA)/m5J;
00280       const double fB = _safeMass(pB)/m5J;
00281       const double XA = pA.E()/(pA.E()+pB.E());
00282       const double psiAB = _psi(pA, pB, pA+pB, pAV);
00283       const double fC = _safeMass(pC)/m5J;
00284       const double fD = _safeMass(pD)/m5J;
00285       const double XC = pC.E()/(pC.E()+pD.E());
00286       const double psiCD = _psi(pC, pD, pC+pD, pAV);
00287 
00288       _h_5_mNJ->fill(m5J, weight);
00289       _h_5_X3->fill(X3, weight);
00290       _h_5_X4->fill(X4, weight);
00291       _h_5_costheta3->fill(costheta3, weight);
00292       _h_5_psi3->fill(psi3, weight);
00293       _h_5_f3->fill(f3, weight);
00294       _h_5_f4->fill(f4, weight);
00295       _h_5_f5->fill(f5, weight);
00296       _h_5_XA->fill(XA, weight);
00297       _h_5_psiAB->fill(psiAB, weight);
00298       _h_5_fA->fill(fA, weight);
00299       _h_5_fB->fill(fB, weight);
00300       _h_5_XC->fill(XC, weight);
00301       _h_5_psiCD->fill(psiCD, weight);
00302       _h_5_fC->fill(fC, weight);
00303       _h_5_fD->fill(fD, weight);
00304     }
00305 
00306 
00307     /// Normalise histograms etc., after the run
00308     void finalize() {
00309 
00310       /// Normalise, scale and otherwise manipulate histograms here
00311       normalize(_h_3_mNJ, 1.0);
00312       normalize(_h_3_X3, 1.0);
00313       normalize(_h_3_X4, 1.0);
00314       normalize(_h_3_costheta3, 1.0);
00315       normalize(_h_3_psi3, 1.0);
00316       normalize(_h_3_f3, 1.0);
00317       normalize(_h_3_f4, 1.0);
00318       normalize(_h_3_f5, 1.0);
00319 
00320       normalize(_h_4_mNJ, 1.0);
00321       normalize(_h_4_X3, 1.0);
00322       normalize(_h_4_X4, 1.0);
00323       normalize(_h_4_costheta3, 1.0);
00324       normalize(_h_4_psi3, 1.0);
00325       normalize(_h_4_f3, 1.0);
00326       normalize(_h_4_f4, 1.0);
00327       normalize(_h_4_f5, 1.0);
00328       normalize(_h_4_XA, 1.0);
00329       normalize(_h_4_psiAB, 1.0);
00330       normalize(_h_4_fA, 1.0);
00331       normalize(_h_4_fB, 1.0);
00332 
00333       normalize(_h_5_mNJ, 1.0);
00334       normalize(_h_5_X3, 1.0);
00335       normalize(_h_5_X4, 1.0);
00336       normalize(_h_5_costheta3, 1.0);
00337       normalize(_h_5_psi3, 1.0);
00338       normalize(_h_5_f3, 1.0);
00339       normalize(_h_5_f4, 1.0);
00340       normalize(_h_5_f5, 1.0);
00341       normalize(_h_5_XA, 1.0);
00342       normalize(_h_5_XC, 1.0);
00343       normalize(_h_5_psiAB, 1.0);
00344       normalize(_h_5_psiCD, 1.0);
00345       normalize(_h_5_fA, 1.0);
00346       normalize(_h_5_fB, 1.0);
00347       normalize(_h_5_fC, 1.0);
00348       normalize(_h_5_fD, 1.0);
00349 
00350     }
00351 
00352     //@}
00353 
00354 
00355   private:
00356     vector<FourMomentum> _reduce(const vector<FourMomentum>& jets,
00357                                  FourMomentum& combined1,
00358                                  FourMomentum& combined2) {
00359       double minMass2 = 1e9;
00360       size_t idx1(jets.size()), idx2(jets.size());
00361       for (size_t i=0; i<jets.size(); ++i) {
00362         for (size_t j=i+1; j<jets.size(); ++j) {
00363           double mass2 = FourMomentum(jets[i]+jets[j]).mass2();
00364           if (mass2<minMass2) {
00365             idx1=i;
00366             idx2=j;
00367           }
00368         }
00369       }
00370       vector<FourMomentum> newjets;
00371       for (size_t i=0; i<jets.size(); ++i) {
00372         if (i!=idx1 && i!=idx2) newjets.push_back(jets[i]);
00373       }
00374       newjets.push_back(jets[idx1]+jets[idx2]);
00375       combined1 = jets[idx1];
00376       combined2 = jets[idx2];
00377       return newjets;
00378     }
00379 
00380     FourMomentum _avg_beam_in_lab(const double& m, const double& y) {
00381       const double mt = m/2.0;
00382       FourMomentum beam1(mt, 0, 0, mt);
00383       FourMomentum beam2(mt, 0, 0, -mt);
00384       if (fabs(y)>1e-3) {
00385         FourMomentum boostvec(cosh(y), 0.0, 0.0, sinh(y));
00386         LorentzTransform cms_boost(-boostvec.boostVector());
00387         cms_boost = cms_boost.inverse();
00388         beam1=cms_boost.transform(beam1);
00389         beam2=cms_boost.transform(beam2);
00390       }
00391       if (beam1.E()>beam2.E()) {
00392         return beam1-beam2;
00393       }
00394       else {
00395         return beam2-beam1;
00396       }
00397     }
00398 
00399     double _psi(const FourMomentum& p1, const FourMomentum& p2,
00400                 const FourMomentum& p3, const FourMomentum& p4) {
00401       Vector3 p1xp2 = p1.p3().cross(p2.p3());
00402       Vector3 p3xp4 = p3.p3().cross(p4.p3());
00403       return mapAngle0ToPi(acos(p1xp2.unit().dot(p3xp4.unit())));
00404     }
00405 
00406     double _safeMass(const FourMomentum& p) {
00407       double mass2=p.mass2();
00408       if (mass2>0.0) return sqrt(mass2);
00409       else if (mass2<-1.0e-5) {
00410         MSG_WARNING("m2 = " << m2 << ". Assuming m2=0.");
00411         return 0.0;
00412       }
00413       else return 0.0;
00414     }
00415 
00416 
00417   private:
00418 
00419     /// @name Histograms
00420     //@{
00421     Histo1DPtr _h_3_mNJ;
00422     Histo1DPtr _h_3_X3;
00423     Histo1DPtr _h_3_X4;
00424     Histo1DPtr _h_3_costheta3;
00425     Histo1DPtr _h_3_psi3;
00426     Histo1DPtr _h_3_f3;
00427     Histo1DPtr _h_3_f4;
00428     Histo1DPtr _h_3_f5;
00429 
00430     Histo1DPtr _h_4_mNJ;
00431     Histo1DPtr _h_4_X3;
00432     Histo1DPtr _h_4_X4;
00433     Histo1DPtr _h_4_costheta3;
00434     Histo1DPtr _h_4_psi3;
00435     Histo1DPtr _h_4_f3;
00436     Histo1DPtr _h_4_f4;
00437     Histo1DPtr _h_4_f5;
00438     Histo1DPtr _h_4_XA;
00439     Histo1DPtr _h_4_psiAB;
00440     Histo1DPtr _h_4_fA;
00441     Histo1DPtr _h_4_fB;
00442 
00443     Histo1DPtr _h_5_mNJ;
00444     Histo1DPtr _h_5_X3;
00445     Histo1DPtr _h_5_X4;
00446     Histo1DPtr _h_5_costheta3;
00447     Histo1DPtr _h_5_psi3;
00448     Histo1DPtr _h_5_f3;
00449     Histo1DPtr _h_5_f4;
00450     Histo1DPtr _h_5_f5;
00451     Histo1DPtr _h_5_XA;
00452     Histo1DPtr _h_5_XC;
00453     Histo1DPtr _h_5_psiAB;
00454     Histo1DPtr _h_5_psiCD;
00455     Histo1DPtr _h_5_fA;
00456     Histo1DPtr _h_5_fB;
00457     Histo1DPtr _h_5_fC;
00458     Histo1DPtr _h_5_fD;
00459     //@}
00460 
00461   };
00462 
00463 
00464 
00465   // The hook for the plugin system
00466   DECLARE_RIVET_PLUGIN(CDF_1996_S3349578);
00467 
00468 }