ATLAS_2011_S8924791.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.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/JetShape.hh" 00009 00010 namespace Rivet { 00011 00012 00013 /// @brief ATLAS jet shape analysis 00014 /// @author Andy Buckley, Judith Katzy, Francesc Vives 00015 class ATLAS_2011_S8924791 : public Analysis { 00016 public: 00017 00018 /// Constructor 00019 ATLAS_2011_S8924791() 00020 : Analysis("ATLAS_2011_S8924791") 00021 { 00022 } 00023 00024 00025 /// @name Analysis methods 00026 //@{ 00027 00028 void init() { 00029 // Set up projections 00030 const FinalState fs(-5.0, 5.0); 00031 addProjection(fs, "FS"); 00032 FastJets fj(fs, FastJets::ANTIKT, 0.6); 00033 fj.useInvisibles(); 00034 addProjection(fj, "Jets"); 00035 00036 // Specify pT bins 00037 _ptedges += 30.0, 40.0, 60.0, 80.0, 110.0, 160.0, 210.0, 260.0, 310.0, 400.0, 500.0, 600.0; 00038 _yedges += 0.0, 0.3, 0.8, 1.2, 2.1, 2.8; 00039 00040 00041 // Register a jet shape projection and histogram for each pT bin 00042 for (size_t i = 0; i < 11; ++i) { 00043 for (size_t j = 0; j < 6; ++j) { 00044 if (i==8 && j==4) continue; 00045 if (i==9 && j==4) continue; 00046 if (i==10 && j!=5) continue; 00047 stringstream ss; ss << "JetShape" << i << j; 00048 const string pname = ss.str(); 00049 _jsnames_pT[i][j] = pname; 00050 00051 if (j < 5) { 00052 const JetShape jsp(fj, 0.0, 0.7, 7, _ptedges[i], _ptedges[i+1], _yedges[j], _yedges[j+1], RAPIDITY); 00053 addProjection(jsp, pname); 00054 } else { 00055 const JetShape jsp(fj, 0.0, 0.7, 7, _ptedges[i], _ptedges[i+1], _yedges.front(), _yedges.back(), RAPIDITY); 00056 addProjection(jsp, pname); 00057 } 00058 _profhistRho_pT[i][j] = bookProfile1D(i+1, j+1, 1); 00059 _profhistPsi_pT[i][j] = bookProfile1D(i+1, j+1, 2); 00060 } 00061 } 00062 } 00063 00064 00065 00066 /// Do the analysis 00067 void analyze(const Event& evt) { 00068 00069 // Get jets and require at least one to pass pT and y cuts 00070 const Jets jets = applyProjection<FastJets>(evt, "Jets").jetsByPt(_ptedges.front()*GeV, _ptedges.back()*GeV, 00071 -2.8, 2.8, RAPIDITY); 00072 MSG_DEBUG("Jet multiplicity before cuts = " << jets.size()); 00073 if (jets.size() == 0) { 00074 MSG_DEBUG("No jets found in required pT & rapidity range"); 00075 vetoEvent; 00076 } 00077 // Calculate and histogram jet shapes 00078 const double weight = evt.weight(); 00079 00080 for (size_t ipt = 0; ipt < 11; ++ipt) { 00081 for (size_t jy = 0; jy < 6; ++jy) { 00082 if (ipt==8 && jy==4) continue; 00083 if (ipt==9 && jy==4) continue; 00084 if (ipt==10 && jy!=5) continue; 00085 const JetShape& jsipt = applyProjection<JetShape>(evt, _jsnames_pT[ipt][jy]); 00086 for (size_t ijet = 0; ijet < jsipt.numJets(); ++ijet) { 00087 for (size_t rbin = 0; rbin < jsipt.numBins(); ++rbin) { 00088 const double r_rho = jsipt.rBinMid(rbin); 00089 _profhistRho_pT[ipt][jy]->fill(r_rho, (1./0.1)*jsipt.diffJetShape(ijet, rbin), weight); 00090 const double r_Psi = jsipt.rBinMid(rbin); 00091 _profhistPsi_pT[ipt][jy]->fill(r_Psi, jsipt.intJetShape(ijet, rbin), weight); 00092 } 00093 } 00094 } 00095 } 00096 } 00097 00098 00099 // Finalize 00100 void finalize() { 00101 } 00102 00103 //@} 00104 00105 00106 private: 00107 00108 /// @name Analysis data 00109 //@{ 00110 00111 /// Jet \f$ p_\perp\f$ bins. 00112 vector<double> _ptedges; // This can't be a raw array if we want to initialise it non-painfully 00113 vector<double> _yedges; 00114 00115 /// JetShape projection name for each \f$p_\perp\f$ bin. 00116 string _jsnames_pT[11][6]; 00117 00118 //@} 00119 00120 /// @name Histograms 00121 //@{ 00122 Profile1DPtr _profhistRho_pT[11][6]; 00123 Profile1DPtr _profhistPsi_pT[11][6]; 00124 //@} 00125 00126 }; 00127 00128 00129 00130 // The hook for the plugin system 00131 DECLARE_RIVET_PLUGIN(ATLAS_2011_S8924791); 00132 00133 } Generated on Fri Dec 21 2012 15:03:38 for The Rivet MC analysis system by ![]() |