rivet is hosted by Hepforge, IPPP Durham
ALICE_2014_I1300380.cc
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Projections/UnstableFinalState.hh"
00004 namespace Rivet {
00005 
00006 
00007   class ALICE_2014_I1300380 : public Analysis {
00008   public:
00009 
00010     ALICE_2014_I1300380()
00011       : Analysis("ALICE_2014_I1300380")
00012     {}
00013 
00014 
00015   public:
00016 
00017     void init() {
00018       const UnstableFinalState cfs(Cuts::absrap<0.5);
00019       addProjection(cfs, "CFS");
00020 
00021       // Plots from the paper
00022       _histPtSigmaStarPlus        = bookHisto1D("d01-x01-y01");    // Sigma*+
00023       _histPtSigmaStarMinus       = bookHisto1D("d01-x01-y02");    // Sigma*- 
00024       _histPtSigmaStarPlusAnti    = bookHisto1D("d01-x01-y03");    // anti Sigma*-
00025       _histPtSigmaStarMinusAnti   = bookHisto1D("d01-x01-y04");    // anti Sigma*+
00026       _histPtXiStar               = bookHisto1D("d02-x01-y01");    // 0.5 * (xi star + anti xi star)
00027       _histAveragePt              = bookProfile1D("d03-x01-y01");  // <pT> profile
00028     }
00029 
00030 
00031     void analyze(const Event& event) {
00032       const double weight = event.weight();
00033       const UnstableFinalState& cfs = applyProjection<UnstableFinalState>(event, "CFS");
00034       foreach (const Particle& p, cfs.particles()) {
00035     // protections against mc generators decaying long-lived particles
00036     if ( !(p.hasAncestor(310)  || p.hasAncestor(-310)   || // K0s
00037            p.hasAncestor(130)  || p.hasAncestor(-130)   ||     // K0l
00038            p.hasAncestor(3322) || p.hasAncestor(-3322)  ||     // Xi0
00039            p.hasAncestor(3122) || p.hasAncestor(-3122)  ||     // Lambda
00040            p.hasAncestor(3222) || p.hasAncestor(-3222)  ||     // Sigma+/-
00041            p.hasAncestor(3312) || p.hasAncestor(-3312)  ||     // Xi-/+
00042            p.hasAncestor(3334) || p.hasAncestor(-3334)  ))     // Omega-/+     
00043     {   
00044       int aid = abs(p.pdgId());
00045       if (aid == 211  || // pi+ 
00046           aid == 321  || // K+
00047           aid == 313  || // K*(892)0
00048           aid == 2212 || // proton
00049           aid == 333  ) {  // phi(1020)
00050         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00051       }
00052     } // end if "rejection of long-lived particles"
00053       
00054       
00055         switch (p.pdgId()) {
00056       case 3224:
00057         _histPtSigmaStarPlus->fill(p.pT()/GeV, weight);
00058         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00059         break;
00060       case -3224:
00061         _histPtSigmaStarPlusAnti->fill(p.pT()/GeV, weight);
00062         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00063         break;
00064       case 3114:
00065         _histPtSigmaStarMinus->fill(p.pT()/GeV, weight);
00066         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00067         break;
00068       case -3114:
00069         _histPtSigmaStarMinusAnti->fill(p.pT()/GeV, weight);
00070         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00071         break;
00072       case 3324:
00073         _histPtXiStar->fill(p.pT()/GeV, weight);
00074         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00075         break;
00076       case -3324:
00077         _histPtXiStar->fill(p.pT()/GeV, weight);
00078         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00079         break;
00080       case 3312:
00081         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00082         break;
00083       case -3312:
00084         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00085         break;
00086       case 3334:
00087         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00088         break;
00089       case -3334:
00090         _histAveragePt->fill(p.mass()/GeV, p.pT()/GeV, weight);
00091         break;
00092         }
00093       }
00094     }
00095 
00096 
00097     void finalize() {
00098       scale(_histPtSigmaStarPlus,       1./sumOfWeights());
00099       scale(_histPtSigmaStarPlusAnti,   1./sumOfWeights());
00100       scale(_histPtSigmaStarMinus,      1./sumOfWeights());
00101       scale(_histPtSigmaStarMinusAnti,  1./sumOfWeights());
00102       scale(_histPtXiStar,              1./sumOfWeights()/ 2.); 
00103     }
00104 
00105 
00106   private:
00107     // plots from the paper
00108     Histo1DPtr   _histPtSigmaStarPlus;
00109     Histo1DPtr   _histPtSigmaStarPlusAnti;
00110     Histo1DPtr   _histPtSigmaStarMinus;
00111     Histo1DPtr   _histPtSigmaStarMinusAnti;
00112     Histo1DPtr   _histPtXiStar;
00113     Profile1DPtr _histAveragePt;
00114   };
00115 
00116 
00117 
00118   // The hook for the plugin system
00119   DECLARE_RIVET_PLUGIN(ALICE_2014_I1300380);
00120 }