CDF_1994_S2952106.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/FastJets.hh"
00006 #include "Rivet/Projections/VetoedFinalState.hh"
00007 #include "Rivet/Projections/VisibleFinalState.hh"
00008 #include "Rivet/Projections/MissingMomentum.hh"
00009 
00010 namespace Rivet {
00011 
00012 
00013   /// @brief CDF Run I color coherence analysis
00014   /// @author Lars Sonnenschein
00015   /// @todo Apply detector correction factors
00016   class CDF_1994_S2952106 : public Analysis {
00017   public:
00018 
00019     /// Constructor
00020     CDF_1994_S2952106() : Analysis("CDF_1994_S2952106")
00021     {
00022       setBeams(PROTON, ANTIPROTON);
00023       // setNeedsCrossSection(true);
00024     }
00025 
00026 
00027     /// @name Analysis methods
00028     //@{
00029 
00030     void init() {
00031       const FinalState fs(-4.2, 4.2);
00032       addProjection(fs, "FS");
00033       // Veto neutrinos, and muons with pT above 1.0 GeV
00034       VetoedFinalState vfs(fs);
00035       vfs.vetoNeutrinos();
00036       vfs.addVetoPairDetail(MUON, 1.0*GeV, MAXDOUBLE);
00037       addProjection(vfs, "VFS");
00038       addProjection(FastJets(vfs, FastJets::CDFJETCLU, 0.7), "ConeJets");
00039 
00040       /// @todo Use histogram auto-booking
00041 
00042       //const string hname = "HvsDphi";
00043       //const string htitle = "H vs Delta phi";
00044       //_histHvsDphi = bookHistogram2D(hname, htitle, 40, -4., 4., 32, 0., 3.2);
00045 
00046       //const string hname2 = "RvsAlpha";
00047       //const string htitle2 = "R vs alpha";
00048       //_histRvsAlpha = bookHistogram2D(hname2, htitle2, 50, 0., 5., 32, -1.6, 1.6);
00049 
00050       //_histJet1Et  = bookHistogram1D("Jet1Et", 40, 0., 500.);
00051       _histJet1Et  = bookHistogram1D(1,1,1);
00052       //_histJet2Et  = bookHistogram1D("Jet2Et", 40, 0., 500.);
00053       _histJet2Et  = bookHistogram1D(2,1,1);
00054       //_histJet3eta = bookHistogram1D("Jet3eta", 42, -4., 4.);
00055       _histJet3eta = bookHistogram1D(3,1,1);
00056       //_histR23     = bookHistogram1D("R23", 50, 0., 5.);
00057       _histR23     = bookHistogram1D(4,1,1);
00058       //_histAlpha = bookHistogram1D("alpha", 42, -PI/2., PI/2.);
00059       _histAlpha = bookHistogram1D(5,1,1);
00060 
00061       //const string hname8 = "alphaMCvsDat";
00062       //const string htitle8 = "alpha MC vs. Data ";
00063       //_histAlphaMCvsDat = bookHistogram1D(hname8, htitle8, 42, -PI/2., PI/2.);
00064 
00065       /// @todo Need better title
00066       //_histAlphaCDF = bookHistogram1D("alphaCDF", 42, -PI/2., PI/2.);
00067       _histAlphaCDF = bookHistogram1D(6,1,1);
00068 
00069       /// @todo Need better title
00070       //_histAlphaIdeal = bookHistogram1D("alphaIdeal", 42, -PI/2., PI/2.);
00071       _histAlphaIdeal = bookHistogram1D(6,1,2);
00072 
00073 
00074       /// @todo Need better title
00075       //_histR23CDF = bookHistogram1D("R23CDF", 50, 0., 5.);
00076       _histR23CDF = bookHistogram1D(7,1,1);
00077 
00078       /// @todo Need better title
00079       //_histR23Ideal = bookHistogram1D("R23Ideal", 50, 0., 5.);
00080       _histR23Ideal = bookHistogram1D(7,1,2);
00081 
00082 
00083       /// @todo Need better title
00084       //_histJet3etaCDF = bookHistogram1D("Jet3etaCDF", 42, -4., 4.);
00085       _histJet3etaCDF = bookHistogram1D(8,1,1);
00086 
00087       /// @todo Need better title
00088       //_histJet3etaIdeal = bookHistogram1D("Jet3etaIdeal", 42, -4., 4.);
00089       _histJet3etaIdeal = bookHistogram1D(8,1,2);
00090 
00091 
00092       //_histEta3Corr = bookHistogram1D(3,1,1);
00093       const string hnameEta3 = "Eta3Corr";
00094       //const string htitleEta3 = "Eta3Corr";
00095       //_histEta3Corr = bookHistogram1D(hnameEta3, 40, -4., 4.);
00096       _histEta3Corr = bookDataPointSet(hnameEta3);
00097 
00098       //_histR23Corr = bookHistogram1D(4,1,1);
00099       const string hnameR23 = "R23Corr";
00100       //const string htitleR23 = "R23Corr";
00101       //_histR23Corr = bookHistogram1D(hnameR23, 35, 0., 4.375);
00102       _histR23Corr = bookDataPointSet(hnameR23);
00103 
00104       //_histAlphaCorr = bookHistogram1D(5,1,1);
00105       const string hnameAlpha = "AlphaCorr";
00106       //const string htitleAlpha = "AlphaCorr";
00107       //_histAlphaCorr = bookHistogram1D(hnameAlpha, 40, -90., 90.);
00108       _histAlphaCorr = bookDataPointSet(hnameAlpha);
00109 
00110     }
00111 
00112 
00113 
00114     // Do the analysis
00115     void analyze(const Event & event) {
00116       const Jets jets = applyProjection<FastJets>(event, "ConeJets").jetsByPt();
00117       getLog() << Log::DEBUG << "Jet multiplicity before any cuts = " << jets.size() << endl;
00118 
00119       // ETs only from jets:
00120       _Et_sinphi_sum = 0.;
00121       _Et_cosphi_sum = 0.;
00122       _Et_sum = 0.;
00123       for (size_t i=0; i< jets.size(); ++i) {
00124         _Et_sinphi_sum = jets[i].momentum().Et() * sin(jets[i].phi());
00125         _Et_cosphi_sum = jets[i].momentum().Et() * sin(jets[i].phi());
00126         _Et_sum = jets[i].momentum().Et() * sin(jets[i].phi());
00127       }
00128       if (sqrt(_Et_sinphi_sum*_Et_sinphi_sum + _Et_cosphi_sum*_Et_cosphi_sum)/_Et_sum > 6.0)
00129         vetoEvent;
00130 
00131       // Check jet requirements
00132       if (jets.size() < 3) vetoEvent;
00133       if (jets[0].momentum().pT() < 100*GeV) vetoEvent;
00134 
00135       // More jet 1,2,3 checks
00136       FourMomentum pj1(jets[0].momentum()), pj2(jets[1].momentum()), pj3(jets[2].momentum());
00137       if (fabs(pj1.eta()) > 0.7 || fabs(pj2.eta()) > 0.7) vetoEvent;
00138       getLog() << Log::DEBUG << "Jet 1 & 2 eta, pT requirements fulfilled" << endl;
00139 
00140       // Require that jets are back-to-back within 20 degrees in phi
00141       if (deltaPhi(pj1.phi(), pj2.phi()) < 17.0/18.0 * PI) vetoEvent;
00142       getLog() << Log::DEBUG << "Jet 1 & 2 phi requirement fulfilled" << endl;
00143 
00144       const double weight = event.weight();
00145       _histJet1Et->fill(pj1.pT(), weight);
00146       _histJet2Et->fill(pj2.pT(), weight);
00147       _histR23->fill(deltaR(pj2, pj3), weight);
00148       _histJet3eta->fill(pj3.eta(), weight);
00149 
00150       // Next cut only required for alpha studies
00151       if (pj3.pT()/GeV < 10.0) vetoEvent;
00152       getLog() << Log::DEBUG << "3rd jet passes alpha histo pT cut" << endl;
00153 
00154       // Calc and plot alpha
00155       const double dPhi = deltaPhi(pj3.phi(), pj2.phi());
00156       const double dH = sign(pj2.eta()) * (pj3.eta() - pj2.eta());
00157       const double alpha = atan(dH/dPhi);
00158       _histAlpha->fill(alpha*180./PI, weight);
00159     }
00160 
00161 
00162     /// Finalize
00163     void finalize() {
00164 
00165       const double eta3_CDF_sim[] =
00166         { 0.0013, 0.0037, 0.0047, 0.0071, 0.0093,
00167           0.0117, 0.0151, 0.0149, 0.0197, 0.0257,
00168           0.0344, 0.0409, 0.0481, 0.0454, 0.0394,
00169           0.0409, 0.0387, 0.0387, 0.0322, 0.0313,
00170           0.029, 0.0309, 0.0412, 0.0417, 0.0412,
00171           0.0397, 0.0417, 0.0414, 0.0376, 0.0316,
00172           0.027, 0.0186, 0.0186, 0.0132, 0.0127,
00173           0.0106, 0.0071, 0.004, 0.002, 0.0013 };
00174 
00175       const double eta3_CDF_sim_err[] =
00176         { 0.0009, 0.0009, 0.0007, 0.0007, 0.0007,
00177           0.001, 0.0012, 0.0012, 0.0013, 0.0016,
00178           0.0017, 0.002, 0.002, 0.0022, 0.002,
00179           0.002, 0.0018, 0.0018, 0.0016, 0.0017,
00180           0.0017, 0.0019, 0.002, 0.0021, 0.002,
00181           0.002, 0.0019, 0.002, 0.0018, 0.0017,
00182           0.0017, 0.0014, 0.0014, 0.0009, 0.001,
00183           0.0009, 0.0009, 0.0008, 0.0008, 0.0009 };
00184 
00185       const double eta3_Ideal_sim[] =
00186         { 0.0017, 0.003, 0.0033, 0.0062, 0.0062,
00187           0.0112, 0.0177, 0.0164, 0.0196, 0.0274,
00188           0.0351, 0.0413, 0.052, 0.0497, 0.0448,
00189           0.0446, 0.0375, 0.0329, 0.0291, 0.0272,
00190           0.0233, 0.0288, 0.0384, 0.0396, 0.0468,
00191           0.0419, 0.0459, 0.0399, 0.0355, 0.0329,
00192           0.0274, 0.023, 0.0201, 0.012, 0.01,
00193           0.008, 0.0051, 0.0051, 0.001, 0.001 };
00194 
00195       vector<double> xval_eta3, xerr_eta3, yval_eta3, yerr_eta3;
00196       for (int ibin = 0;  ibin < 40; ++ibin) { //x-value + weight=err^2/y-value
00197         xval_eta3.push_back(-4. + (ibin+0.5)*8./40.);
00198         xerr_eta3.push_back(0.5*8./40.);
00199         yval_eta3.push_back(eta3_CDF_sim[ibin]/eta3_Ideal_sim[ibin]);
00200         yerr_eta3.push_back(eta3_CDF_sim_err[ibin]/eta3_Ideal_sim[ibin]);
00201       }
00202       _histEta3Corr->setCoordinate(0, xval_eta3, xerr_eta3);
00203       _histEta3Corr->setCoordinate(1, yval_eta3, yerr_eta3);
00204 
00205 
00206       const double R23_CDF_sim[] =
00207         { 0.0005, 0.0161, 0.057, 0.0762, 0.0723,
00208           0.0705, 0.0598, 0.0563, 0.0557, 0.0579,
00209           0.0538, 0.0522, 0.0486, 0.0449, 0.0418,
00210           0.0361, 0.0326, 0.0304, 0.0252, 0.0212,
00211           0.0173, 0.0176, 0.0145, 0.0127, 0.0103,
00212           0.0065, 0.0049, 0.0045, 0.0035, 0.0029,
00213           0.0024, 0.0014, 0.0011, 0.001, 0.0009 };
00214 
00215       const double R23_CDF_sim_err[] =
00216         { 0.0013, 0.0009, 0.0022, 0.0029, 0.0026,
00217           0.0024, 0.0022, 0.0025, 0.0023, 0.0024,
00218           0.0021, 0.0021, 0.0021, 0.0021, 0.0021,
00219           0.0019, 0.0019, 0.0016, 0.0017, 0.0014,
00220           0.001, 0.0014, 0.0012, 0.0013, 0.001,
00221           0.0011, 0.001, 0.001, 0.001, 0.0011,
00222           0.0011, 0.0009, 0.0008, 0.0008, 0.0009 };
00223 
00224       const double R23_Ideal_sim[] =
00225         { 0.0005, 0.0176, 0.0585, 0.0862, 0.0843,
00226           0.0756, 0.0673, 0.0635, 0.0586, 0.0619,
00227           0.0565, 0.0515, 0.0466, 0.0472, 0.0349,
00228           0.0349, 0.0266, 0.0254, 0.0204, 0.0179,
00229           0.0142, 0.0134, 0.0101, 0.009, 0.008,
00230           0.0034, 0.003, 0.0033, 0.0027, 0.0021,
00231           0.0012, 0.0006, 0.0004, 0.0005, 0.0003 };
00232 
00233       vector<double> xval_R23, xerr_R23, yval_R23, yerr_R23;
00234       for (int ibin = 0;  ibin < 35; ++ibin) { // x-value + weight=err^2/y-value
00235         xval_R23.push_back((ibin+0.5)*4.375/35.);
00236         xerr_R23.push_back(0.5*4.375/35.);
00237         yval_R23.push_back(R23_CDF_sim[ibin]/R23_Ideal_sim[ibin]);
00238         yerr_R23.push_back(R23_CDF_sim_err[ibin]/R23_Ideal_sim[ibin]);
00239       }
00240       _histR23Corr->setCoordinate(0, xval_R23, xerr_R23);
00241       _histR23Corr->setCoordinate(1, yval_R23, yerr_R23);
00242 
00243 
00244       const double alpha_CDF_sim[] =
00245         { 0.0517, 0.0461, 0.049, 0.0452, 0.0451,
00246           0.0435, 0.0317, 0.0287, 0.0294, 0.0261,
00247           0.0231, 0.022, 0.0233, 0.0192, 0.0213,
00248           0.0166, 0.0176, 0.0146, 0.0136, 0.0156,
00249           0.0142, 0.0152, 0.0151, 0.0147, 0.0164,
00250           0.0186, 0.018, 0.021, 0.0198, 0.0189,
00251           0.0197, 0.0211, 0.027, 0.0236, 0.0243,
00252           0.0269, 0.0257, 0.0276, 0.0246, 0.0286 };
00253 
00254       const double alpha_CDF_sim_err[] =
00255         { 0.0024, 0.0025, 0.0024, 0.0024, 0.0024,
00256           0.0022, 0.0019, 0.0018, 0.0019, 0.0016,
00257           0.0017, 0.0017, 0.0019, 0.0013, 0.0017,
00258           0.0014, 0.0016, 0.0013, 0.0012, 0.0009,
00259           0.0014, 0.0014, 0.0014, 0.0014, 0.0014,
00260           0.0015, 0.0014, 0.0016, 0.0016, 0.0015,
00261           0.0016, 0.0016, 0.0019, 0.0017, 0.0019,
00262           0.0018, 0.0018, 0.0018, 0.0018, 0.0019 };
00263 
00264       const double alpha_Ideal_sim[] =
00265         { 0.0552, 0.0558, 0.0583, 0.055, 0.0495,
00266           0.0433, 0.0393, 0.0346, 0.0331, 0.0296,
00267           0.0258, 0.0196, 0.0171, 0.0179, 0.0174,
00268           0.0141, 0.0114, 0.0096, 0.0076, 0.0087,
00269           0.0099, 0.0079, 0.0102, 0.0114, 0.0124,
00270           0.013, 0.0165, 0.016, 0.0177, 0.019,
00271           0.0232, 0.0243, 0.0238, 0.0248, 0.0235,
00272           0.0298, 0.0292, 0.0291, 0.0268, 0.0316 };
00273 
00274       vector<double> xval_alpha, xerr_alpha, yval_alpha, yerr_alpha;
00275       for (int ibin = 0;  ibin < 40; ++ibin) { //x-value + weight=err^2/y-value
00276         xval_alpha.push_back(-90. + (ibin+0.5)*180./40.);
00277         xerr_alpha.push_back(0.5*180./40.);
00278         yval_alpha.push_back(alpha_CDF_sim[ibin]/alpha_Ideal_sim[ibin]);
00279         yerr_alpha.push_back(alpha_CDF_sim_err[ibin]/alpha_Ideal_sim[ibin]);
00280       }
00281       _histAlphaCorr->setCoordinate(0, xval_alpha, xerr_alpha);
00282       _histAlphaCorr->setCoordinate(1, yval_alpha, yerr_alpha);
00283 
00284 
00285       //AIDA::IHistogramFactory& hf = histogramFactory();
00286       //AIDA::IDataPointSetFactory& hf = datapointsetFactory();
00287 
00288       /// @todo Histo factory output paths don't work this way
00289       //hf.multiply(histoDir() + "/d03-x01-y01", *_histJet3eta, *_histEta3Corr);
00290       //hf.multiply("/_histJet3eta", *_histJet3eta, *_histEta3Corr);
00291       //_histJet3eta = hf.multiply("/_histJet3eta", *_histJet3eta, *_histEta3Corr);
00292       //hf.destroy(_histEta3Corr);
00293 
00294       /// @todo Histo factory output paths don't work this way
00295       //hf.multiply(histoDir() + "/d04-x01-y01", *_histR23, *_histR23Corr);
00296       //hf.multiply("/_histR23", *_histR23, *_histR23Corr);
00297       //hf.destroy(_histR23Corr);
00298 
00299       /// @todo Histo factory output paths don't work this way
00300       //hf.multiply(histoDir() + "/d05-x01-y01", *_histAlpha, *_histAlphaCorr);
00301       //hf.multiply("/_histAlpha", *_histAlpha, *_histAlphaCorr);
00302       //hf.destroy(_histAlphaCorr);
00303 
00304 
00305       // //getLog() << Log::INFO << "Cross-section = " << crossSection()/picobarn << " pb" << endl;
00306       // Prefer to norm to ref data via rivet-rescale
00307       // normalize(_histJet1Et, 12.3025); //norm to integral of Ref data
00308       // normalize(_histJet2Et, 12.4565); //norm to integral of Ref data
00309       // normalize(_histJet3eta, 0.19864); //norm to integral of Ref data
00310       // normalize(_histR23, 0.125675); //norm to integral of Ref data
00311       // normalize(_histAlpha, 4.5099); //norm to integral of Ref data
00312     }
00313 
00314     //@}
00315 
00316 
00317   private:
00318 
00319     /// @name Histogram collections
00320     //@{
00321     // AIDA::IHistogram2D* _histHvsDphi;
00322     // AIDA::IHistogram2D* _histRvsAlpha;
00323     AIDA::IHistogram1D* _histJet1Et;
00324     AIDA::IHistogram1D* _histJet2Et;
00325     AIDA::IHistogram1D* _histR23;
00326     AIDA::IHistogram1D* _histJet3eta;
00327     AIDA::IHistogram1D* _histAlpha;
00328 
00329     AIDA::IHistogram1D* _histAlphaIdeal;
00330     AIDA::IHistogram1D* _histAlphaCDF;
00331     AIDA::IHistogram1D* _histR23Ideal;
00332     AIDA::IHistogram1D* _histR23CDF;
00333     AIDA::IHistogram1D* _histJet3etaIdeal;
00334     AIDA::IHistogram1D* _histJet3etaCDF;
00335 
00336     //AIDA::IHistogram1D* _histEta3Corr;
00337     AIDA::IDataPointSet* _histEta3Corr;
00338     //AIDA::IHistogram1D* _histR23Corr;
00339     AIDA::IDataPointSet* _histR23Corr;
00340     //AIDA::IHistogram1D* _histAlphaCorr;
00341     AIDA::IDataPointSet* _histAlphaCorr;
00342     //@}
00343 
00344     /// @name jet MET variables
00345     double _Et_sinphi_sum;
00346     double _Et_cosphi_sum;
00347     double _Et_sum;
00348 
00349   };
00350 
00351 
00352 
00353   // This global object acts as a hook for the plugin system
00354   AnalysisBuilder<CDF_1994_S2952106> plugin_CDF_1994_S2952106;
00355 
00356 }