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()
00024 : Analysis("D0_2006_S6438750")
00025 { }
00026
00027
00028
00029
00030
00031
00032
00033 void init() {
00034
00035 FinalState fs;
00036 addProjection(fs, "AllFS");
00037
00038
00039 LeadingParticlesFinalState photonfs(FinalState(-0.9, 0.9, 23.0*GeV));
00040 photonfs.addParticleId(PHOTON);
00041 addProjection(photonfs, "LeadingPhoton");
00042
00043
00044 _h_pTgamma = bookHistogram1D(1, 1, 1);
00045 }
00046
00047
00048
00049 void analyze(const Event& event) {
00050
00051
00052 const FinalState& photonfs = applyProjection<FinalState>(event, "LeadingPhoton");
00053 if (photonfs.particles().size() != 1) {
00054 vetoEvent;
00055 }
00056 const FourMomentum photon = photonfs.particles().front().momentum();
00057
00058
00059 double E_P = photon.E();
00060 double eta_P = photon.pseudorapidity();
00061 double phi_P = photon.azimuthalAngle();
00062 double econe = 0.0;
00063 foreach (const Particle& p, applyProjection<FinalState>(event, "AllFS").particles()) {
00064 if (deltaR(eta_P, phi_P,
00065 p.momentum().pseudorapidity(), p.momentum().azimuthalAngle()) < 0.4) {
00066 econe += p.momentum().E();
00067 if (econe/E_P > 1.1) {
00068 vetoEvent;
00069 }
00070 }
00071 }
00072
00073
00074 const double weight = event.weight();
00075 _h_pTgamma->fill(photon.pT(), weight);
00076 }
00077
00078
00079
00080
00081 void finalize() {
00082 const double lumi_gen = sumOfWeights()/crossSection();
00083
00084 scale(_h_pTgamma, 1/lumi_gen * 1/1.8);
00085 }
00086
00087
00088
00089
00090 private:
00091
00092
00093
00094 AIDA::IHistogram1D* _h_pTgamma;
00095
00096
00097 };
00098
00099
00100
00101
00102 DECLARE_RIVET_PLUGIN(D0_2006_S6438750);
00103
00104 }