CDF_2009_S8233977.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/FinalState.hh"
00006 #include "Rivet/Projections/ChargedFinalState.hh"
00007 #include "Rivet/Projections/TriggerCDFRun2.hh"
00008 
00009 namespace Rivet {
00010 
00011 
00012   /* @brief CDF Run II min-bias cross-section
00013    * @author Hendrik Hoeth
00014    *
00015    * Measurement of \f$ \langle p_T \rangle \f$ vs. \f$ n_\text{ch} \f$,
00016    * the track \f$ p_T \f$ distribution, and the \f$ \sum E_T \f$ distribution.
00017    * Particles are selected within |eta|<1 and with pT>0.4 GeV.
00018    * There is no pT cut for the \f$ \sum E_T \f$ measurement.
00019    *
00020    * @par Run conditions
00021    *
00022    * @arg \f$ \sqrt{s} = \f$ 1960 GeV
00023    * @arg Run with generic QCD events.
00024    * @arg Set particles with c*tau > 10 mm stable
00025    *
00026    */
00027   class CDF_2009_S8233977 : public Analysis {
00028   public:
00029 
00030     /// Constructor
00031     CDF_2009_S8233977()
00032       : Analysis("CDF_2009_S8233977"),
00033         _sumWeightSelected(0.0)
00034     {
00035       setBeams(PROTON, ANTIPROTON);
00036       setNeedsCrossSection(true);
00037     }
00038  
00039  
00040     /// @name Analysis methods
00041     //@{
00042 
00043     /// Book histograms and projections
00044     void init() {
00045       addProjection(TriggerCDFRun2(), "Trigger");
00046       addProjection(FinalState(-1.0, 1.0, 0.0*GeV), "EtFS");
00047       addProjection(ChargedFinalState(-1.0, 1.0, 0.4*GeV), "CFS");
00048 
00049       _hist_pt = bookHistogram1D(1, 1, 1);
00050       _hist_pt_vs_multiplicity = bookProfile1D(2, 1, 1);
00051       _hist_sumEt = bookHistogram1D(3, 1, 1);
00052     }
00053 
00054 
00055  
00056     /// Do the analysis
00057     void analyze(const Event& evt) {
00058       // MinBias Trigger
00059       const bool trigger = applyProjection<TriggerCDFRun2>(evt, "Trigger").minBiasDecision();
00060       if (!trigger) vetoEvent;
00061 
00062       // Get the event weight
00063       const double weight = evt.weight();
00064 
00065       /// @todo The pT and sum(ET) distributions look slightly different from
00066       ///       Niccolo's Monte Carlo plots. Still waiting for his answer.
00067 
00068       const ChargedFinalState& trackfs = applyProjection<ChargedFinalState>(evt, "CFS");
00069       const size_t numParticles = trackfs.size();
00070       foreach (const Particle& p, trackfs.particles()) {
00071         const double pT = p.momentum().pT() / GeV;
00072         _hist_pt_vs_multiplicity->fill(numParticles, pT, weight);
00073      
00074         // The weight for entries in the pT distribution should be weight/(pT*dPhi*dy).
00075         //
00076         // - dPhi = 2*PI
00077         //
00078         // - dy depends on the pT: They calculate y assuming the particle has the
00079         //   pion mass and assuming that eta=1:
00080         //   dy = 2 * 1/2 * ln [(sqrt(m^2 + (a+1)*pT^2) + a*pT) / (sqrt(m^2 + (a+1)*pT^2) - a*pT)]
00081         //   with a = sinh(1).
00082         //
00083         // sinh(1) = 1.1752012
00084         // m(charged pion)^2 = (139.57 MeV)^2 = 0.019479785 GeV^2
00085         const double sinh1 = 1.1752012;
00086         const double apT  = sinh1 * pT;
00087         const double mPi = 139.57*MeV;
00088         const double root = sqrt(mPi*mPi + (1+sinh1)*pT*pT);
00089         const double dy = std::log((root+apT)/(root-apT));
00090         const double dphi = TWOPI;
00091         _hist_pt->fill(pT, weight/(pT*dphi*dy));
00092       }
00093 
00094       // Calc sum(Et) from calo particles
00095       const FinalState& etfs = applyProjection<FinalState>(evt, "EtFS");
00096       double sumEt = 0.0;
00097       foreach (const Particle& p, etfs.particles()) {
00098         sumEt += p.momentum().Et();
00099       }
00100       _hist_sumEt->fill(sumEt, weight);
00101       _sumWeightSelected += evt.weight();
00102     }
00103 
00104  
00105  
00106     /// Normalize histos
00107     void finalize() {
00108       scale(_hist_sumEt, crossSection()/millibarn/(4*M_PI*_sumWeightSelected));
00109       scale(_hist_pt, crossSection()/millibarn/_sumWeightSelected);
00110       getLog() << Log::DEBUG << "sumOfWeights()     = " << sumOfWeights() << std::endl;
00111       getLog() << Log::DEBUG << "_sumWeightSelected = " << _sumWeightSelected << std::endl;
00112     }
00113  
00114     //@}
00115 
00116 
00117   private:
00118 
00119     double _sumWeightSelected;
00120     AIDA::IProfile1D *_hist_pt_vs_multiplicity;
00121     AIDA::IHistogram1D *_hist_pt;
00122     AIDA::IHistogram1D *_hist_sumEt;
00123 
00124   };
00125 
00126 
00127   // This global object acts as a hook for the plugin system
00128   AnalysisBuilder<CDF_2009_S8233977> plugin_CDF_2009_S8233977;
00129 
00130 }