00001
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
00016
00017 class STAR_2009_UE_HELEN : public Analysis {
00018 public:
00019
00020
00021 STAR_2009_UE_HELEN()
00022 : Analysis("STAR_2009_UE_HELEN")
00023 {
00024 setBeams(PROTON, PROTON);
00025 }
00026
00027
00028
00029
00030
00031 void init() {
00032
00033 const ChargedFinalState cfs(-1.0, 1.0, 0.2*GeV);
00034 addProjection(cfs, "CFS");
00035
00036
00037 const NeutralFinalState nfs(-1.0, 1.0, 0.2*GeV);
00038 addProjection(nfs, "NFS");
00039
00040
00041 VetoedFinalState vfs(nfs);
00042 vfs.vetoNeutrinos();
00043 vfs.addVetoPairId(K0L);
00044 vfs.addVetoPairId(NEUTRON);
00045 addProjection(vfs, "VFS");
00046
00047
00048
00049 const MergedFinalState jfs(cfs, vfs);
00050 addProjection(jfs, "JFS");
00051
00052
00053 addProjection(FastJets(jfs, FastJets::SISCONE, 0.7), "AllJets");
00054
00055
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
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
00074
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
00082
00083
00084 if (jets.size() != 2) {
00085 getLog() << Log::DEBUG << "Failed jet multiplicity cut" << endl;
00086 vetoEvent;
00087 }
00088
00089
00090
00091
00092
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
00101 const double jetphi = jets[0].momentum().phi();
00102 const double jetpT = jets[0].momentum().pT();
00103
00104
00105 const double weight = e.weight();
00106
00107 size_t numTrans1(0), numTrans2(0), numAway(0);
00108
00109
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
00118
00119
00120
00121 if (1.0*rand()/RAND_MAX > 0.87834-exp(-1.48994-0.788432*pT)) {
00122 continue;
00123 }
00124
00125
00126 if (dPhi < PI/3.0) {
00127
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 }
00141
00142
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);
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
00167 AnalysisBuilder<STAR_2009_UE_HELEN> plugin_STAR_2009_UE_HELEN;
00168
00169 }