D0_2006_S6438750.cc
Go to the documentation of this file.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(-0.9, 0.9, 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 vetoEvent;
00057 }
00058 const FourMomentum photon = photonfs.particles().front().momentum();
00059
00060
00061 double E_P = photon.E();
00062 double eta_P = photon.pseudorapidity();
00063 double phi_P = photon.azimuthalAngle();
00064 double econe = 0.0;
00065 foreach (const Particle& p, applyProjection<FinalState>(event, "AllFS").particles()) {
00066 if (deltaR(eta_P, phi_P,
00067 p.momentum().pseudorapidity(), p.momentum().azimuthalAngle()) < 0.4) {
00068 econe += p.momentum().E();
00069 if (econe/E_P > 1.1) {
00070 vetoEvent;
00071 }
00072 }
00073 }
00074
00075
00076 const double weight = event.weight();
00077 _h_pTgamma->fill(photon.pT(), weight);
00078 }
00079
00080
00081
00082
00083 void finalize() {
00084 const double lumi_gen = sumOfWeights()/crossSection();
00085
00086 scale(_h_pTgamma, 1/lumi_gen * 1/1.8);
00087 }
00088
00089
00090
00091
00092 private:
00093
00094
00095
00096 AIDA::IHistogram1D* _h_pTgamma;
00097
00098
00099 };
00100
00101
00102
00103
00104 AnalysisBuilder<D0_2006_S6438750> plugin_D0_2006_S6438750;
00105
00106 }