STAR_2009_UE_HELEN.cc

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