ATLAS_2010_S8591806.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Projections/ChargedFinalState.hh" 00005 #include "Rivet/Tools/Logging.hh" 00006 00007 namespace Rivet { 00008 00009 00010 /// @brief ATLAS minimum bias analysis at 900 GeV 00011 /// @author Frank Siegert 00012 class ATLAS_2010_S8591806 : public Analysis { 00013 public: 00014 00015 ATLAS_2010_S8591806() 00016 : Analysis("ATLAS_2010_S8591806"), 00017 _Nevt_after_cuts(0.0) 00018 { } 00019 00020 00021 void init() { 00022 ChargedFinalState cfs(-2.5, 2.5, 0.5*GeV); 00023 addProjection(cfs, "CFS"); 00024 00025 _h_dNch_deta = bookHisto1D(2, 1, 1); 00026 _h_dNch_dpT = bookHisto1D(3, 1, 1); 00027 _h_dNevt_dNch = bookHisto1D(4, 1, 1); 00028 _p_meanpT_Nch = bookProfile1D(5, 1, 1); 00029 } 00030 00031 00032 void analyze(const Event& event) { 00033 const double weight = event.weight(); 00034 00035 const ChargedFinalState& charged = applyProjection<ChargedFinalState>(event, "CFS"); 00036 if (charged.size() < 1) { 00037 vetoEvent; 00038 } 00039 _Nevt_after_cuts += weight; 00040 00041 _h_dNevt_dNch->fill(charged.size(), weight); 00042 foreach (const Particle& p, charged.particles()) { 00043 double pT = p.momentum().pT()/GeV; 00044 _h_dNch_deta->fill(p.momentum().eta(), weight); 00045 _h_dNch_dpT->fill(pT, weight/pT); 00046 _p_meanpT_Nch->fill(charged.size(), pT, weight); 00047 } 00048 } 00049 00050 00051 void finalize() { 00052 double deta = 5.0; 00053 scale(_h_dNch_deta, 1.0/_Nevt_after_cuts); 00054 scale(_h_dNch_dpT, 1.0/_Nevt_after_cuts/TWOPI/deta); 00055 scale(_h_dNevt_dNch, 1.0/_Nevt_after_cuts); 00056 } 00057 00058 00059 private: 00060 00061 Histo1DPtr _h_dNch_deta; 00062 Histo1DPtr _h_dNch_dpT; 00063 Histo1DPtr _h_dNevt_dNch; 00064 Profile1DPtr _p_meanpT_Nch; 00065 00066 double _Nevt_after_cuts; 00067 00068 }; 00069 00070 00071 00072 // The hook for the plugin system 00073 DECLARE_RIVET_PLUGIN(ATLAS_2010_S8591806); 00074 00075 } Generated on Fri Dec 21 2012 15:03:38 for The Rivet MC analysis system by ![]() |