CDF_2002_S4796047.cc
Go to the documentation of this file.00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/RivetAIDA.hh"
00004 #include "Rivet/Tools/Logging.hh"
00005 #include "Rivet/Projections/Beam.hh"
00006 #include "Rivet/Projections/ChargedFinalState.hh"
00007 #include "Rivet/Projections/TriggerCDFRun0Run1.hh"
00008
00009 namespace Rivet {
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 class CDF_2002_S4796047 : public Analysis {
00029 public:
00030
00031
00032 CDF_2002_S4796047()
00033 : Analysis("CDF_2002_S4796047")
00034 {
00035 _sumWTrig = 0;
00036 }
00037
00038
00039
00040
00041
00042
00043 void init() {
00044 addProjection(TriggerCDFRun0Run1(), "Trigger");
00045 const ChargedFinalState cfs(-1.0, 1.0, 0.4*GeV);
00046 addProjection(cfs, "FS");
00047
00048
00049 if (fuzzyEquals(sqrtS()/GeV, 630)) {
00050 _hist_multiplicity = bookHistogram1D(1, 1, 1);
00051 _hist_pt_vs_multiplicity = bookProfile1D(3, 1, 1);
00052 } else if (fuzzyEquals(sqrtS()/GeV, 1800)) {
00053 _hist_multiplicity = bookHistogram1D(2, 1, 1);
00054 _hist_pt_vs_multiplicity = bookProfile1D(4, 1, 1);
00055 }
00056 }
00057
00058
00059
00060 void analyze(const Event& evt) {
00061
00062 const bool trigger = applyProjection<TriggerCDFRun0Run1>(evt, "Trigger").minBiasDecision();
00063 if (!trigger) vetoEvent;
00064 const double weight = evt.weight();
00065 _sumWTrig += weight;
00066
00067
00068 const ChargedFinalState& fs = applyProjection<ChargedFinalState>(evt, "FS");
00069 const size_t numParticles = fs.particles().size();
00070
00071
00072 _hist_multiplicity->fill(numParticles, weight);
00073
00074
00075 foreach (const Particle& p, fs.particles()) {
00076 const double pT = p.momentum().pT();
00077 _hist_pt_vs_multiplicity->fill(numParticles, pT/GeV, weight);
00078 }
00079
00080 }
00081
00082
00083 void finalize() {
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094 if (fuzzyEquals(sqrtS()/GeV, 630)) {
00095 normalize(_hist_multiplicity, 3.21167);
00096 } else if (fuzzyEquals(sqrtS()/GeV, 1800)) {
00097 normalize(_hist_multiplicity, 4.19121);
00098 }
00099 }
00100
00101
00102
00103
00104 private:
00105
00106
00107
00108 double _sumWTrig;
00109
00110
00111
00112
00113 AIDA::IHistogram1D* _hist_multiplicity;
00114 AIDA::IProfile1D* _hist_pt_vs_multiplicity;
00115
00116
00117 };
00118
00119
00120
00121
00122 DECLARE_RIVET_PLUGIN(CDF_2002_S4796047);
00123
00124 }