ATLAS_2011_I894867.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Projections/FinalState.hh" 00005 00006 namespace Rivet { 00007 00008 00009 class ATLAS_2011_I894867 : public Analysis { 00010 public: 00011 00012 ATLAS_2011_I894867() 00013 : Analysis("ATLAS_2011_I894867") 00014 { } 00015 00016 public: 00017 00018 void init() { 00019 addProjection(FinalState(),"FS"); 00020 _h_sigma = bookHisto1D(1, 1, 1); 00021 } 00022 00023 00024 void analyze(const Event& event) { 00025 const double weight = event.weight(); 00026 00027 const FinalState& fs = applyProjection<FinalState>(event, "FS"); 00028 00029 double gapcenter = 0.; 00030 double LRG = 0.; 00031 double etapre = 0.; 00032 bool first = true; 00033 00034 foreach(const Particle& p, fs.particlesByEta()) { // sorted from minus to plus 00035 if (first) { // First particle 00036 first = false; 00037 etapre = p.momentum().eta(); 00038 } else { 00039 double gap = fabs(p.momentum().eta()-etapre); 00040 if (gap > LRG) { 00041 LRG = gap; // largest gap 00042 gapcenter = (p.momentum().eta()+etapre)/2.; // find the center of the gap to separate the X and Y systems. 00043 } 00044 etapre = p.momentum().eta(); 00045 } 00046 } 00047 00048 FourMomentum MxFourVector(0.,0.,0.,0.); 00049 FourMomentum MyFourVector(0.,0.,0.,0.); 00050 00051 foreach(const Particle& p, fs.particlesByEta()) { 00052 if (p.momentum().eta() > gapcenter) { 00053 MxFourVector += p.momentum(); 00054 } else { 00055 MyFourVector += p.momentum(); 00056 } 00057 } 00058 00059 double Mx2 = FourMomentum(MxFourVector).mass2(); 00060 double My2 = FourMomentum(MyFourVector).mass2(); 00061 00062 const double M2 = (Mx2 > My2 ? Mx2 : My2); 00063 const double xi = M2/(7000*7000); // sqrt(s)=7000 GeV 00064 00065 if (xi < 5*10e-6) vetoEvent; 00066 00067 _h_sigma->fill(7000/GeV, weight); 00068 00069 } 00070 00071 00072 void finalize() { 00073 scale(_h_sigma, crossSection()/millibarn/sumOfWeights()); 00074 } 00075 00076 private: 00077 00078 Histo1DPtr _h_sigma; 00079 00080 }; 00081 00082 00083 // The hook for the plugin system 00084 DECLARE_RIVET_PLUGIN(ATLAS_2011_I894867); 00085 00086 } Generated on Fri Dec 21 2012 15:03:38 for The Rivet MC analysis system by ![]() |