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