STAR_2009_UE_HELEN.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/ChargedFinalState.hh" 00004 #include "Rivet/Projections/NeutralFinalState.hh" 00005 #include "Rivet/Projections/MergedFinalState.hh" 00006 #include "Rivet/Projections/VetoedFinalState.hh" 00007 #include "Rivet/Projections/FastJets.hh" 00008 #include "fastjet/SISConePlugin.hh" 00009 00010 namespace Rivet { 00011 00012 00013 /// @brief STAR underlying event 00014 /// @author Hendrik Hoeth 00015 class STAR_2009_UE_HELEN : public Analysis { 00016 public: 00017 00018 /// Constructor 00019 STAR_2009_UE_HELEN() 00020 : Analysis("STAR_2009_UE_HELEN") 00021 { 00022 } 00023 00024 00025 /// @name Analysis methods 00026 //@{ 00027 00028 void init() { 00029 // Charged final state, |eta|<1, pT>0.2GeV 00030 const ChargedFinalState cfs(-1.0, 1.0, 0.2*GeV); 00031 addProjection(cfs, "CFS"); 00032 00033 // Neutral final state, |eta|<1, ET>0.2GeV (needed for the jets) 00034 const NeutralFinalState nfs(-1.0, 1.0, 0.2*GeV); 00035 addProjection(nfs, "NFS"); 00036 00037 // STAR can't see neutrons and K^0_L 00038 VetoedFinalState vfs(nfs); 00039 vfs.vetoNeutrinos(); 00040 vfs.addVetoPairId(PID::K0L); 00041 vfs.addVetoPairId(PID::NEUTRON); 00042 addProjection(vfs, "VFS"); 00043 00044 // Jets are reconstructed from charged and neutral particles, 00045 // and the cuts are different (pT vs. ET), so we need to merge them. 00046 const MergedFinalState jfs(cfs, vfs); 00047 addProjection(jfs, "JFS"); 00048 00049 // SISCone, R = 0.7, overlap_threshold = 0.75 00050 addProjection(FastJets(jfs, FastJets::SISCONE, 0.7), "AllJets"); 00051 00052 // Book histograms 00053 _hist_pmaxnchg = bookProfile1D( 1, 1, 1); 00054 _hist_pminnchg = bookProfile1D( 2, 1, 1); 00055 _hist_anchg = bookProfile1D( 3, 1, 1); 00056 } 00057 00058 00059 // Do the analysis 00060 void analyze(const Event& e) { 00061 const FinalState& cfs = applyProjection<ChargedFinalState>(e, "CFS"); 00062 if (cfs.particles().size() < 1) { 00063 MSG_DEBUG("Failed multiplicity cut"); 00064 vetoEvent; 00065 } 00066 00067 const Jets& alljets = applyProjection<FastJets>(e, "AllJets").jetsByPt(); 00068 MSG_DEBUG("Total jet multiplicity = " << alljets.size()); 00069 00070 // The jet acceptance region is |eta|<(1-R)=0.3 (with R = jet radius) 00071 // Jets also must have a neutral energy fraction of < 0.7 00072 Jets jets; 00073 foreach (const Jet jet, alljets) { 00074 if (jet.neutralEnergy()/jet.totalEnergy() < 0.7 && 00075 fabs(jet.eta()) < 0.3) 00076 jets.push_back(jet); 00077 } 00078 00079 // This analysis requires a di-jet like event. 00080 // WARNING: There is more data in preparation, some of which 00081 // does _not_ have this constraint! 00082 if (jets.size() != 2) { 00083 MSG_DEBUG("Failed jet multiplicity cut"); 00084 vetoEvent; 00085 } 00086 00087 // The di-jet constraints in this analysis are: 00088 // - 2 and only 2 jets in the acceptance region 00089 // - delta(Phi) between the jets is > 150 degrees 00090 // - Pt_awayjet/Pt_towards_jet > 0.7 00091 if (deltaPhi(jets[0].momentum().phi(), jets[1].momentum().phi()) <= 5*PI/6 || 00092 jets[1].pT()/jets[0].pT() <= 0.7) 00093 { 00094 MSG_DEBUG("Failed di-jet criteria"); 00095 vetoEvent; 00096 } 00097 00098 // Now lets start ... 00099 const double jetphi = jets[0].momentum().phi(); 00100 const double jetpT = jets[0].pT(); 00101 00102 // Get the event weight 00103 const double weight = e.weight(); 00104 00105 size_t numTrans1(0), numTrans2(0), numAway(0); 00106 00107 // Calculate all the charged stuff 00108 foreach (const Particle& p, cfs.particles()) { 00109 const double dPhi = deltaPhi(p.momentum().phi(), jetphi); 00110 const double pT = p.pT(); 00111 const double phi = p.momentum().phi(); 00112 double rotatedphi = phi - jetphi; 00113 while (rotatedphi < 0) rotatedphi += 2*PI; 00114 00115 // @TODO: WARNING: The following lines are a hack to correct 00116 // for the STAR tracking efficiency. Once we have the 00117 // final numbers (corrected to hadron level), we need 00118 // to remove this!!!! 00119 if (1.0*rand()/static_cast<double>(RAND_MAX) > 0.87834-exp(-1.48994-0.788432*pT)) { 00120 continue; 00121 } 00122 // -------- end of efficiency hack ------- 00123 00124 if (dPhi < PI/3.0) { 00125 // toward 00126 } 00127 else if (dPhi < 2*PI/3.0) { 00128 if (rotatedphi <= PI) { 00129 ++numTrans1; 00130 } 00131 else { 00132 ++numTrans2; 00133 } 00134 } 00135 else { 00136 ++numAway; 00137 } 00138 } // end charged particle loop 00139 00140 // Fill the histograms 00141 _hist_pmaxnchg->fill(jetpT, (numTrans1>numTrans2 ? numTrans1 : numTrans2)/(2*PI/3), weight); 00142 _hist_pminnchg->fill(jetpT, (numTrans1<numTrans2 ? numTrans1 : numTrans2)/(2*PI/3), weight); 00143 _hist_anchg->fill(jetpT, numAway/(PI*0.7*0.7), weight); // jet area = pi*R^2 00144 00145 } 00146 00147 00148 void finalize() { 00149 // 00150 } 00151 00152 //@} 00153 00154 00155 private: 00156 00157 Profile1DPtr _hist_pmaxnchg; 00158 Profile1DPtr _hist_pminnchg; 00159 Profile1DPtr _hist_anchg; 00160 00161 }; 00162 00163 00164 00165 // The hook for the plugin system 00166 DECLARE_RIVET_PLUGIN(STAR_2009_UE_HELEN); 00167 00168 } Generated on Thu Feb 6 2014 17:38:46 for The Rivet MC analysis system by ![]() |