ALICE_2011_S8909580.cc
Go to the documentation of this file.
00001 #include "Rivet/Analysis.hh" 00002 #include "Rivet/Projections/FinalState.hh" 00003 #include "Rivet/Projections/UnstableFinalState.hh" 00004 00005 namespace Rivet { 00006 00007 00008 class ALICE_2011_S8909580 : public Analysis { 00009 public: 00010 00011 ALICE_2011_S8909580() 00012 : Analysis("ALICE_2011_S8909580") 00013 {} 00014 00015 00016 public: 00017 void init() { 00018 const UnstableFinalState ufs(Cuts::abseta < 15); 00019 addProjection(ufs, "UFS"); 00020 00021 _histPtK0s = bookHisto1D(1, 1, 1); 00022 _histPtLambda = bookHisto1D(2, 1, 1); 00023 _histPtAntiLambda = bookHisto1D(3, 1, 1); 00024 _histPtXi = bookHisto1D(4, 1, 1); 00025 _histPtPhi = bookHisto1D(5, 1, 1); 00026 _temp_h_Lambdas = bookHisto1D("TMP/h_Lambdas", refData(6, 1, 1)); 00027 _temp_h_Kzeros = bookHisto1D("TMP/h_Kzeros", refData(6, 1, 1)); 00028 _h_LamKzero = bookScatter2D(6, 1, 1); 00029 } 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 = p.absrap(); 00038 const double pT = p.pT()/GeV; 00039 00040 if (absrap < 0.8) { 00041 switch(p.pid()) { 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 00081 void finalize() { 00082 scale(_histPtK0s, 1./(1.5*sumOfWeights())); 00083 scale(_histPtLambda, 1./(1.5*sumOfWeights())); 00084 scale(_histPtAntiLambda, 1./(1.5*sumOfWeights())); 00085 scale(_histPtXi, 1./(1.6*sumOfWeights())); 00086 scale(_histPtPhi, 1./(1.2*sumOfWeights())); 00087 divide(_temp_h_Lambdas, _temp_h_Kzeros, _h_LamKzero); 00088 } 00089 00090 00091 private: 00092 00093 Histo1DPtr _histPtK0s, _histPtLambda, _histPtAntiLambda, _histPtXi, _histPtPhi; 00094 Histo1DPtr _temp_h_Lambdas, _temp_h_Kzeros; 00095 Scatter2DPtr _h_LamKzero; 00096 00097 }; 00098 00099 00100 // The hook for the plugin system 00101 DECLARE_RIVET_PLUGIN(ALICE_2011_S8909580); 00102 00103 } Generated on Wed Oct 7 2015 12:09:09 for The Rivet MC analysis system by ![]() |