00001
00002 #include <iostream>
00003 #include "Rivet/Analysis.hh"
00004 #include "Rivet/RivetAIDA.hh"
00005 #include "Rivet/Tools/ParticleIdUtils.hh"
00006 #include "Rivet/Projections/Beam.hh"
00007 #include "Rivet/Projections/UnstableFinalState.hh"
00008
00009 namespace Rivet {
00010
00011
00012
00013
00014
00015 class BELLE_2006_S6265367 : public Analysis {
00016 public:
00017
00018 BELLE_2006_S6265367()
00019 : Analysis("BELLE_2006_S6265367")
00020 { }
00021
00022
00023 void analyze(const Event& e) {
00024 const double weight = e.weight();
00025
00026
00027 const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS");
00028
00029 const Beam beamproj = applyProjection<Beam>(e, "Beams");
00030 const ParticlePair& beams = beamproj.beams();
00031 FourMomentum mom_tot = beams.first.momentum() + beams.second.momentum();
00032 LorentzTransform cms_boost(-mom_tot.boostVector());
00033 const double s = sqr(beamproj.sqrtS());
00034
00035 const bool onresonance = true;
00036
00037
00038
00039 foreach (const Particle& p, ufs.particles()) {
00040
00041
00042 double xp = 0.0;
00043 double mH2 = 0.0;
00044
00045 const double mom = cms_boost.transform(p.momentum()).vector3().mod();
00046
00047 const int PdgId = abs(p.pdgId());
00048 MSG_DEBUG("pdgID = " << PdgId << " mom = " << mom);
00049
00050 switch (PdgId) {
00051
00052 case 421:
00053 MSG_DEBUG("D0 found");
00054 mH2 = 3.47763;
00055 xp = mom/sqrt(s/4.0 - mH2);
00056 if (onresonance)
00057 _histXpD0_R->fill(xp, weight);
00058 else
00059 _histXpD0_C->fill(xp, weight);
00060 break;
00061
00062 case 411:
00063 MSG_DEBUG("D+ found");
00064 mH2 = 3.49547;
00065 xp = mom/sqrt(s/4.0 - mH2);
00066 if (onresonance)
00067 _histXpDplus_R->fill(xp, weight);
00068 else
00069 _histXpDplus_C->fill(xp, weight);
00070 break;
00071
00072 case 431:
00073 MSG_DEBUG("D+_s found");
00074 mH2 = 3.87495;
00075 xp = mom/sqrt(s/4.0 - mH2);
00076 if (onresonance)
00077 _histXpDplus_s_R->fill(xp, weight);
00078 else
00079 _histXpDplus_s_C->fill(xp, weight);
00080 break;
00081
00082 case 4122:
00083 MSG_DEBUG("Lambda_c found");
00084 mH2 = 5.22780;
00085 xp = mom/sqrt(s/4.0 - mH2);
00086 if (onresonance)
00087 _histXpLambda_c_R->fill(xp, weight);
00088 else
00089 _histXpLambda_c_C->fill(xp, weight);
00090 break;
00091
00092 case 413: {
00093 MSG_DEBUG("D*+ found");
00094 mH2 = 4.04119;
00095 xp = mom/sqrt(s/4.0 - mH2);
00096
00097 const GenVertex* dv = p.genParticle().end_vertex();
00098 bool D0decay(false), Pi0decay(false), Piplusdecay(false), Dplusdecay(false);
00099
00100 for (GenVertex::particles_out_const_iterator
00101 pp = dv->particles_out_const_begin();
00102 pp != dv->particles_out_const_end(); ++pp) {
00103 if (abs((*pp)->pdg_id()) == 421) {
00104 D0decay = true;
00105 } else if (abs((*pp)->pdg_id()) == 411) {
00106 Dplusdecay = true;
00107 } else if (abs((*pp)->pdg_id()) == 111) {
00108 Pi0decay = true;
00109 } else if (abs((*pp)->pdg_id()) == 211) {
00110 Piplusdecay = true;
00111 }
00112 }
00113
00114 if (D0decay && Piplusdecay) {
00115 if (onresonance)
00116 _histXpDstarplus2D0_R->fill(xp, weight);
00117 else
00118 _histXpDstarplus2D0_C->fill(xp, weight);
00119 } else if (Dplusdecay && Pi0decay) {
00120 if (onresonance)
00121 _histXpDstarplus2Dplus_R->fill(xp, weight);
00122 else
00123 _histXpDstarplus2Dplus_C->fill(xp, weight);
00124 } else {
00125 MSG_WARNING("Unexpected D* decay!");
00126 }
00127 break;
00128 }
00129
00130 case 423:
00131 MSG_DEBUG("D*0 found");
00132 mH2 = 4.02793;
00133 xp = mom/sqrt(s/4.0 - mH2);
00134 MSG_DEBUG("xp = " << xp);
00135 if (onresonance)
00136 _histXpDstar0_R->fill(xp, weight);
00137 else
00138 _histXpDstar0_C->fill(xp, weight);
00139 break;
00140 }
00141
00142 }
00143 }
00144
00145
00146 void finalize() {
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162 }
00163
00164
00165 void init() {
00166 addProjection(Beam(), "Beams");
00167 addProjection(UnstableFinalState(-1.3170, 1.9008), "UFS");
00168
00169
00170 _histXpDstarplus2D0_C = bookHistogram1D(2, 1, 1);
00171 _histXpD0_C = bookHistogram1D(3, 1, 1);
00172 _histXpDplus_C = bookHistogram1D(4, 1, 1);
00173 _histXpDplus_s_C = bookHistogram1D(5, 1, 1);
00174 _histXpLambda_c_C = bookHistogram1D(6, 1, 1);
00175 _histXpDstarplus2Dplus_C = bookHistogram1D(7, 1, 1);
00176 _histXpDstar0_C = bookHistogram1D(8, 1, 1);
00177
00178
00179 _histXpDstarplus2D0_R = bookHistogram1D(9, 1, 1);
00180 _histXpD0_R = bookHistogram1D(10, 1, 1);
00181 _histXpDplus_R = bookHistogram1D(11, 1, 1);
00182 _histXpDplus_s_R = bookHistogram1D(12, 1, 1);
00183 _histXpLambda_c_R = bookHistogram1D(13, 1, 1);
00184 _histXpDstarplus2Dplus_R = bookHistogram1D(14, 1, 1);
00185 _histXpDstar0_R = bookHistogram1D(15, 1, 1);
00186
00187 }
00188
00189 private:
00190
00191
00192
00193
00194 AIDA::IHistogram1D* _histXpDstarplus2D0_C;
00195 AIDA::IHistogram1D* _histXpD0_C;
00196 AIDA::IHistogram1D* _histXpDplus_C;
00197 AIDA::IHistogram1D* _histXpDplus_s_C;
00198 AIDA::IHistogram1D* _histXpLambda_c_C;
00199 AIDA::IHistogram1D* _histXpDstarplus2Dplus_C;
00200 AIDA::IHistogram1D* _histXpDstar0_C;
00201
00202
00203 AIDA::IHistogram1D* _histXpDstarplus2D0_R;
00204 AIDA::IHistogram1D* _histXpD0_R;
00205 AIDA::IHistogram1D* _histXpDplus_R;
00206 AIDA::IHistogram1D* _histXpDplus_s_R;
00207 AIDA::IHistogram1D* _histXpLambda_c_R;
00208 AIDA::IHistogram1D* _histXpDstarplus2Dplus_R;
00209 AIDA::IHistogram1D* _histXpDstar0_R;
00210
00211 };
00212
00213
00214
00215 DECLARE_RIVET_PLUGIN(BELLE_2006_S6265367);
00216
00217 }