D0_1995_I398175.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/JetShape.hh" 00005 #include "Rivet/Projections/FastJets.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// @brief D0 Run-1 jet shapes measurement 00011 class D0_1995_I398175 : public Analysis { 00012 public: 00013 00014 /// Constructor 00015 DEFAULT_RIVET_ANALYSIS_CTOR(D0_1995_I398175); 00016 00017 00018 /// @name Analysis methods 00019 //@{ 00020 00021 /// Book histograms and initialise projections before the run 00022 void init() { 00023 00024 const FinalState fs(-4.0, 4.0); 00025 declare(fs, "FS"); 00026 // FastJets jets(fs, FastJets::ANTIKT, 0.6); 00027 FastJets jets(fs, FastJets::D0ILCONE, 1.0); 00028 jets.useInvisibles(); 00029 declare(jets, "Jets"); 00030 00031 00032 // Specify jets pT bins 00033 _ptedges = {{ 45.0, 70.0, 105.0, 140.0, 1800.0}}; 00034 00035 // Book histograms 00036 for (size_t ptbin = 0; ptbin < 4; ++ptbin) { 00037 _jsnames_pT[ptbin] = "JetShape" + to_str(ptbin) ; 00038 const JetShape jsp(jets, 0.0, 1.0, 10, _ptedges[ptbin], _ptedges[ptbin+1], 0.0, 0.2, PSEUDORAPIDITY); 00039 declare(jsp, _jsnames_pT[ptbin]); 00040 _h_Rho_pT_central[ptbin] = bookProfile1D(ptbin+1, 1, 1); 00041 } 00042 00043 const JetShape jspfwd0(jets, 0.0, 1.0, 10, 45, 70, 2.5, 3.5, PSEUDORAPIDITY); 00044 declare(jspfwd0, "JetShapeFwd0"); 00045 const JetShape jspfwd1(jets, 0.0, 1.0, 10, 70, 105, 2.5, 3.5, PSEUDORAPIDITY); 00046 declare(jspfwd1, "JetShapeFwd1"); 00047 _h_Rho_pT_forward[0] = bookProfile1D(5, 1, 1); 00048 _h_Rho_pT_forward[1] = bookProfile1D(6, 1, 1); 00049 00050 } 00051 00052 00053 /// Perform the per-event analysis 00054 void analyze(const Event& event) { 00055 00056 // Get jets and require at least one to pass pT and y cuts 00057 const Jets jets = apply<FastJets>(event, "Jets").jetsByPt(Cuts::ptIn(_ptedges.front()*GeV, _ptedges.back()*GeV) ); 00058 MSG_DEBUG("Selecting jets with pT> "<<_ptedges.front()); 00059 MSG_DEBUG("Jet multiplicity before cuts = " << jets.size()); 00060 if (jets.size() == 0){ 00061 MSG_DEBUG("No jets found in required pT and rapidity range"); 00062 vetoEvent; 00063 } 00064 const double weight = event.weight(); 00065 00066 // Calculate and histogram jet shapes 00067 for (size_t ipt = 0; ipt < 4; ++ipt) { 00068 const JetShape& jsipt = apply<JetShape>(event, _jsnames_pT[ipt]); 00069 for (size_t ijet = 0; ijet < jsipt.numJets(); ++ijet) { 00070 for (size_t rbin = 0; rbin < jsipt.numBins(); ++rbin) { 00071 const double r_rho = jsipt.rBinMid(rbin); 00072 MSG_DEBUG(ipt << " " << rbin << " (" << r_rho << ") " << jsipt.diffJetShape(ijet, rbin)); 00073 /// @note Bin width Jacobian factor of 0.7/0.1 = 7 in the differential shapes plot 00074 // _profhistRho_pT[ipt]->fill(r_rho/0.7, (0.7/0.1)*jsipt.diffJetShape(ijet, rbin), weight); 00075 const double r_Psi = jsipt.rBinMax(rbin); 00076 MSG_DEBUG(ipt << " " << rbin << " (" << r_rho << ") " << jsipt.intJetShape(ijet, rbin)); 00077 _h_Rho_pT_central[ipt]->fill(r_Psi/1.0, jsipt.intJetShape(ijet, rbin), weight); 00078 } 00079 } 00080 } 00081 00082 00083 const JetShape& jsiptfwd0 = apply<JetShape>(event, "JetShapeFwd0"); 00084 for (size_t ijet = 0; ijet < jsiptfwd0.numJets(); ++ijet) { 00085 for (size_t rbin = 0; rbin < jsiptfwd0.numBins(); ++rbin) { 00086 const double r_Psi = jsiptfwd0.rBinMax(rbin); 00087 _h_Rho_pT_forward[0]->fill(r_Psi/1.0, jsiptfwd0.intJetShape(ijet, rbin), weight); 00088 } 00089 } 00090 00091 const JetShape& jsiptfwd1 = apply<JetShape>(event, "JetShapeFwd1"); 00092 for (size_t ijet = 0; ijet < jsiptfwd1.numJets(); ++ijet) { 00093 for (size_t rbin = 0; rbin < jsiptfwd1.numBins(); ++rbin) { 00094 const double r_Psi = jsiptfwd1.rBinMax(rbin); 00095 _h_Rho_pT_forward[1]->fill(r_Psi/1.0, jsiptfwd1.intJetShape(ijet, rbin), weight); 00096 } 00097 } 00098 00099 00100 00101 00102 00103 } 00104 00105 /// Normalise histograms etc., after the run 00106 void finalize() { 00107 00108 // scale(_h_YYYY, crossSection()/sumOfWeights()); // norm to cross section 00109 // normalize(_h_YYYY); // normalize to unity 00110 00111 } 00112 00113 //@} 00114 00115 00116 private: 00117 00118 00119 vector<double> _ptedges; 00120 string _jsnames_pT[4]; 00121 /// @name Histograms 00122 //@{ 00123 Profile1DPtr _h_Rho_pT_central[4]; 00124 Profile1DPtr _h_Rho_pT_forward[2]; 00125 00126 //@} 00127 00128 00129 }; 00130 00131 00132 00133 // The hook for the plugin system 00134 DECLARE_RIVET_PLUGIN(D0_1995_I398175); 00135 00136 00137 } Generated on Tue Dec 13 2016 16:32:37 for The Rivet MC analysis system by ![]() |