00001
00002 #include "Rivet/Analysis.hh"
00003 #include "Rivet/Tools/Logging.hh"
00004 #include "Rivet/Projections/FinalState.hh"
00005 #include "Rivet/Projections/LeadingParticlesFinalState.hh"
00006 #include "Rivet/Projections/VetoedFinalState.hh"
00007 #include "Rivet/RivetAIDA.hh"
00008
00009 namespace Rivet {
00010
00011
00012
00013
00014
00015 class D0_2006_S6438750 : public Analysis {
00016
00017 public:
00018
00019
00020
00021
00022
00023 D0_2006_S6438750() : Analysis("D0_2006_S6438750")
00024 {
00025 setBeams(PROTON, ANTIPROTON);
00026 setNeedsCrossSection(true);
00027 }
00028
00029
00030
00031
00032
00033
00034
00035 void init() {
00036
00037 FinalState fs;
00038 addProjection(fs, "AllFS");
00039
00040
00041 LeadingParticlesFinalState photonfs(FinalState(-1.0, 1.0, 23.0*GeV));
00042 photonfs.addParticleId(PHOTON);
00043 addProjection(photonfs, "LeadingPhoton");
00044
00045
00046 _h_pTgamma = bookHistogram1D(1, 1, 1);
00047 }
00048
00049
00050
00051 void analyze(const Event& event) {
00052
00053
00054 const FinalState& photonfs = applyProjection<FinalState>(event, "LeadingPhoton");
00055 if (photonfs.particles().size() != 1) {
00056 getLog() << Log::DEBUG << "No photon found" << endl;
00057 vetoEvent;
00058 }
00059 const FourMomentum photon = photonfs.particles().front().momentum();
00060 if (photon.pT()/GeV < 23) {
00061 getLog() << Log::DEBUG << "Leading photon has pT < 23 GeV: " << photon.pT()/GeV << endl;
00062 vetoEvent;
00063 }
00064
00065
00066 const FinalState& fs = applyProjection<FinalState>(event, "AllFS");
00067 if (fs.empty()) {
00068 vetoEvent;
00069 }
00070
00071
00072 const double egamma = photon.E();
00073
00074 double econe_02 = 0.0;
00075
00076 double econe_02_04 = 0.0;
00077 foreach (const Particle& p, fs.particles()) {
00078 const double dr = deltaR(photon.pseudorapidity(), photon.azimuthalAngle(),
00079 p.momentum().pseudorapidity(), p.momentum().azimuthalAngle());
00080 if (dr < 0.2) {
00081 econe_02 += p.momentum().E();
00082 } else if (dr < 0.4) {
00083 econe_02_04 += p.momentum().E();
00084 }
00085 }
00086
00087
00088 if (econe_02_04/econe_02 > 0.1 || (econe_02-egamma)/egamma > 0.05) {
00089 getLog() << Log::DEBUG << "Vetoing event because photon is insufficiently isolated" << endl;
00090 vetoEvent;
00091 }
00092
00093
00094 const double eta_gamma = fabs(photon.pseudorapidity());
00095 if (eta_gamma > 0.9) {
00096 getLog() << Log::DEBUG << "Leading photon falls outside acceptance range; "
00097 << "|eta_gamma| = " << eta_gamma << endl;
00098 vetoEvent;
00099 }
00100
00101
00102 const double weight = event.weight();
00103 _h_pTgamma->fill(photon.pT(), weight);
00104 }
00105
00106
00107
00108
00109 void finalize() {
00110
00111
00112
00113 const double lumi_gen = sumOfWeights()/crossSection();
00114
00115 scale(_h_pTgamma, 1/lumi_gen * 1/1.8);
00116 }
00117
00118
00119
00120
00121 private:
00122
00123
00124
00125 AIDA::IHistogram1D* _h_pTgamma;
00126
00127
00128 };
00129
00130
00131
00132
00133 AnalysisBuilder<D0_2006_S6438750> plugin_D0_2006_S6438750;
00134
00135 }