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