rivet is hosted by Hepforge, IPPP Durham
CLEO_2004_S5809304.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include <iostream>
00003 #include "Rivet/Analysis.hh"
00004 #include "Rivet/RivetYODA.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   /// @brief CLEO charmed mesons and baryons from fragmentation
00013   /// @author Peter Richardson
00014   class CLEO_2004_S5809304 : public Analysis {
00015   public:
00016 
00017     CLEO_2004_S5809304()
00018       : Analysis("CLEO_2004_S5809304")
00019     { }
00020 
00021 
00022     void analyze(const Event& e) {
00023       const double weight = e.weight();
00024 
00025       // Loop through unstable FS particles and look for charmed mesons/baryons
00026       const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(e, "UFS");
00027 
00028       const Beam beamproj = applyProjection<Beam>(e, "Beams");
00029       const ParticlePair& beams = beamproj.beams();
00030       FourMomentum mom_tot = beams.first.momentum() + beams.second.momentum();
00031       LorentzTransform cms_boost;
00032       if(mom_tot.vector3().mod()>0.001)
00033     cms_boost = LorentzTransform(-mom_tot.boostVector());
00034       const double s = sqr(beamproj.sqrtS());
00035 
00036       // Particle masses from PDGlive (accessed online 16. Nov. 2009).
00037       foreach (const Particle& p, ufs.particles()) {
00038 
00039         double xp = 0.0;
00040         double mH2 = 0.0;
00041         // 3-momentum in CMS frame
00042         const double mom = cms_boost.transform(p.momentum()).vector3().mod();
00043 
00044         const int PdgId = abs(p.pdgId());
00045         MSG_DEBUG("pdgID = " << PdgId << "  mom = " << mom);
00046         switch (PdgId) {
00047 
00048         case 421:
00049           MSG_DEBUG("D0 found");
00050           mH2 = 3.47763; // 1.86484^2
00051           xp = mom/sqrt(s/4.0 - mH2);
00052           _sigmaD0A->fill(10.6,weight);
00053           _sigmaD0B->fill(10.6,weight);
00054           _histXpD0A->fill(xp, weight);
00055           _histXpD0B->fill(xp, weight);
00056           _histXpTotal->fill(xp, weight);
00057           break;
00058         case 411:
00059           MSG_DEBUG("D+ found");
00060           mH2 = 3.49547; // 1.86962^2
00061           xp = mom/sqrt(s/4.0 - mH2);
00062           _sigmaDPlus->fill(10.6,weight);
00063           _histXpDplus->fill(xp, weight);
00064           _histXpTotal->fill(xp, weight);
00065           break;
00066 
00067         case 413:
00068           MSG_DEBUG("D*+ found");
00069           mH2 = 4.04119; // 2.01027^2
00070           xp = mom/sqrt(s/4.0 - mH2);
00071           _sigmaDStarPlusA->fill(10.6,weight);
00072           _sigmaDStarPlusB->fill(10.6,weight);
00073           _histXpDStarPlusA->fill(xp, weight);
00074           _histXpDStarPlusB->fill(xp, weight);
00075           _histXpTotal->fill(xp, weight);
00076           break;
00077 
00078         case 423:
00079           MSG_DEBUG("D*0 found");
00080           mH2 = 4.02793; // 2.00697**2
00081           xp = mom/sqrt(s/4.0 - mH2);
00082           _sigmaDStar0A->fill(10.6,weight);
00083           _sigmaDStar0B->fill(10.6,weight);
00084           _histXpDStar0A->fill(xp, weight);
00085           _histXpDStar0B->fill(xp, weight);
00086           _histXpTotal->fill(xp, weight);
00087           break;
00088         }
00089       }
00090     } // analyze
00091 
00092 
00093     void finalize() {
00094 
00095       scale(_sigmaDPlus     , crossSection()/picobarn/sumOfWeights());
00096       scale(_sigmaD0A       , crossSection()/picobarn/sumOfWeights());
00097       scale(_sigmaD0B       , crossSection()/picobarn/sumOfWeights());
00098       scale(_sigmaDStarPlusA, crossSection()/picobarn/sumOfWeights());
00099       scale(_sigmaDStarPlusB, crossSection()/picobarn/sumOfWeights());
00100       scale(_sigmaDStar0A   , crossSection()/picobarn/sumOfWeights());
00101       scale(_sigmaDStar0B   , crossSection()/picobarn/sumOfWeights());
00102 
00103       scale(_histXpDplus     , crossSection()/picobarn/sumOfWeights());
00104       scale(_histXpD0A       , crossSection()/picobarn/sumOfWeights());
00105       scale(_histXpD0B       , crossSection()/picobarn/sumOfWeights());
00106       scale(_histXpDStarPlusA, crossSection()/picobarn/sumOfWeights());
00107       scale(_histXpDStarPlusB, crossSection()/picobarn/sumOfWeights());
00108       scale(_histXpDStar0A   , crossSection()/picobarn/sumOfWeights());
00109       scale(_histXpDStar0B   , crossSection()/picobarn/sumOfWeights());
00110       scale(_histXpTotal     , crossSection()/picobarn/sumOfWeights()/4.);
00111     } // finalize
00112 
00113 
00114     void init() {
00115       addProjection(Beam(), "Beams");
00116       addProjection(UnstableFinalState(), "UFS");
00117 
00118       // continuum cross sections
00119       _sigmaDPlus      = bookHisto1D(1,1,1);
00120       _sigmaD0A        = bookHisto1D(1,1,2);
00121       _sigmaD0B        = bookHisto1D(1,1,3);
00122       _sigmaDStarPlusA = bookHisto1D(1,1,4);
00123       _sigmaDStarPlusB = bookHisto1D(1,1,5);
00124       _sigmaDStar0A    = bookHisto1D(1,1,6);
00125       _sigmaDStar0B    = bookHisto1D(1,1,7);
00126 
00127        // histograms for continuum data
00128       _histXpDplus      = bookHisto1D(2, 1, 1);
00129       _histXpD0A        = bookHisto1D(3, 1, 1);
00130       _histXpD0B        = bookHisto1D(4, 1, 1);
00131       _histXpDStarPlusA = bookHisto1D(5, 1, 1);
00132       _histXpDStarPlusB = bookHisto1D(6, 1, 1);
00133       _histXpDStar0A    = bookHisto1D(7, 1, 1);
00134       _histXpDStar0B    = bookHisto1D(8, 1, 1);
00135       _histXpTotal      = bookHisto1D(9, 1, 1);
00136 
00137     } // init
00138 
00139   private:
00140 
00141     //@{
00142     // Histograms for the continuum cross sections
00143     Histo1DPtr _sigmaDPlus     ;
00144     Histo1DPtr _sigmaD0A       ;
00145     Histo1DPtr _sigmaD0B       ;
00146     Histo1DPtr _sigmaDStarPlusA;
00147     Histo1DPtr _sigmaDStarPlusB;
00148     Histo1DPtr _sigmaDStar0A   ;
00149     Histo1DPtr _sigmaDStar0B   ;
00150 
00151     // histograms for continuum data
00152     Histo1DPtr _histXpDplus     ;
00153     Histo1DPtr _histXpD0A       ;
00154     Histo1DPtr _histXpD0B       ;
00155     Histo1DPtr _histXpDStarPlusA;
00156     Histo1DPtr _histXpDStarPlusB;
00157     Histo1DPtr _histXpDStar0A   ;
00158     Histo1DPtr _histXpDStar0B   ;
00159     Histo1DPtr _histXpTotal     ;
00160     //@}
00161 
00162   };
00163 
00164   // The hook for the plugin system
00165   DECLARE_RIVET_PLUGIN(CLEO_2004_S5809304);
00166 
00167 }