ALICE_2011_S8909580.cc

Go to the documentation of this file.
00001 #include "Rivet/Analysis.hh"
00002 #include "Rivet/RivetAIDA.hh"
00003 #include "Rivet/Tools/Logging.hh"
00004 #include "Rivet/Projections/FinalState.hh"
00005 #include "Rivet/Projections/UnstableFinalState.hh"
00006 
00007 namespace Rivet {
00008 
00009 
00010   class ALICE_2011_S8909580 : public Analysis {
00011   public:
00012 
00013     ALICE_2011_S8909580()
00014       : Analysis("ALICE_2011_S8909580")
00015     {}
00016 
00017 
00018   public:
00019     void init() {
00020       const UnstableFinalState ufs(-15, 15);
00021       addProjection(ufs, "UFS");
00022 
00023       _histPtK0s        = bookHistogram1D("d01-x01-y01");
00024       _histPtLambda     = bookHistogram1D("d02-x01-y01");
00025       _histPtAntiLambda = bookHistogram1D("d03-x01-y01");
00026       _histPtXi         = bookHistogram1D("d04-x01-y01");
00027       _histPtPhi        = bookHistogram1D("d05-x01-y01");
00028       _temp_h_Lambdas   = bookHistogram1D("temp_h_Lambdas", binEdges("d06-x01-y01"));
00029       _temp_h_Kzeros    = bookHistogram1D("temp_h_Kzeros",  binEdges("d06-x01-y01"));
00030     }
00031 
00032     void analyze(const Event& event) {
00033       const double weight = event.weight();
00034       const UnstableFinalState& ufs = applyProjection<UnstableFinalState>(event, "UFS");
00035 
00036       foreach (const Particle& p, ufs.particles()) {
00037         const double absrap = fabs(p.momentum().rapidity());
00038         const double pT = p.momentum().pT()/GeV;
00039 
00040         if (absrap<0.8) {
00041           switch(p.pdgId()) {
00042             case 3312:
00043             case -3312:
00044               if ( !( p.hasAncestor(3334) || p.hasAncestor(-3334) ) ) {
00045                 _histPtXi->fill(pT, weight);
00046               }
00047               break;
00048             if (absrap<0.75) {
00049               case 310:
00050                 _histPtK0s->fill(pT, weight);
00051                 _temp_h_Kzeros->fill(pT, 2*weight);
00052                 break;
00053               case 3122:
00054                 if ( !( p.hasAncestor(3322) || p.hasAncestor(-3322) ||
00055                         p.hasAncestor(3312) || p.hasAncestor(-3312) ||
00056                         p.hasAncestor(3334) || p.hasAncestor(-3334) ) ) {
00057                   _histPtLambda->fill(pT, weight);
00058                   _temp_h_Lambdas->fill(pT, weight);
00059                 }
00060                 break;
00061               case -3122:
00062                 if ( !( p.hasAncestor(3322) || p.hasAncestor(-3322) ||
00063                         p.hasAncestor(3312) || p.hasAncestor(-3312) ||
00064                         p.hasAncestor(3334) || p.hasAncestor(-3334) ) ) {
00065                   _histPtAntiLambda->fill(pT, weight);
00066                   _temp_h_Lambdas->fill(pT, weight);
00067                 }
00068                 break;
00069             }
00070             if (absrap<0.6) {
00071               case 333:
00072                 _histPtPhi->fill(pT, weight);
00073                 break;
00074             }
00075           }
00076         }
00077       }
00078     }
00079 
00080     void finalize() {
00081       scale(_histPtK0s,        1./(1.5*sumOfWeights()));
00082       scale(_histPtLambda,     1./(1.5*sumOfWeights()));
00083       scale(_histPtAntiLambda, 1./(1.5*sumOfWeights()));
00084       scale(_histPtXi,         1./(1.6*sumOfWeights()));
00085       scale(_histPtPhi,        1./(1.2*sumOfWeights()));
00086 
00087       histogramFactory().divide(histoPath("d06-x01-y01"), *_temp_h_Lambdas, *_temp_h_Kzeros);
00088       histogramFactory().destroy(_temp_h_Lambdas);
00089       histogramFactory().destroy(_temp_h_Kzeros);
00090     }
00091 
00092 
00093   private:
00094 
00095     AIDA::IHistogram1D *_histPtK0s;
00096     AIDA::IHistogram1D *_histPtLambda;
00097     AIDA::IHistogram1D *_histPtAntiLambda;
00098     AIDA::IHistogram1D *_histPtXi;
00099     AIDA::IHistogram1D *_histPtPhi;
00100     AIDA::IHistogram1D *_temp_h_Lambdas;
00101     AIDA::IHistogram1D *_temp_h_Kzeros;
00102 
00103   };
00104 
00105 
00106 
00107   // The hook for the plugin system
00108   DECLARE_RIVET_PLUGIN(ALICE_2011_S8909580);
00109 }