ATLAS_2011_I894867.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/Projections/FinalState.hh" 00004 00005 namespace Rivet { 00006 00007 00008 class ATLAS_2011_I894867 : public Analysis { 00009 public: 00010 00011 ATLAS_2011_I894867() 00012 : Analysis("ATLAS_2011_I894867") 00013 { } 00014 00015 public: 00016 00017 void init() { 00018 addProjection(FinalState(), "FS"); 00019 _h_sigma = bookHisto1D(1, 1, 1); 00020 } 00021 00022 00023 void analyze(const Event& event) { 00024 const double weight = event.weight(); 00025 00026 const FinalState& fs = applyProjection<FinalState>(event, "FS"); 00027 if (fs.size() < 2) vetoEvent; // need at least two particles to calculate gaps 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.eta(); 00038 } else { 00039 double gap = fabs(p.eta()-etapre); 00040 if (gap > LRG) { 00041 LRG = gap; // largest gap 00042 gapcenter = (p.eta()+etapre)/2.; // find the center of the gap to separate the X and Y systems. 00043 } 00044 etapre = p.eta(); 00045 } 00046 } 00047 00048 00049 FourMomentum mxFourVector, myFourVector; 00050 foreach(const Particle& p, fs.particlesByEta()) { 00051 if (p.eta() > gapcenter) { 00052 mxFourVector += p.momentum(); 00053 } else { 00054 myFourVector += p.momentum(); 00055 } 00056 } 00057 const double M2 = max(mxFourVector.mass2(), myFourVector.mass2()); 00058 const double xi = M2/sqr(sqrtS()); // sqrt(s)=7000 GeV, note that units cancel 00059 if (xi < 5e-6) vetoEvent; 00060 00061 _h_sigma->fill(sqrtS()/GeV, weight); 00062 } 00063 00064 00065 void finalize() { 00066 scale(_h_sigma, crossSection()/millibarn/sumOfWeights()); 00067 } 00068 00069 private: 00070 00071 Histo1DPtr _h_sigma; 00072 00073 }; 00074 00075 00076 // The hook for the plugin system 00077 DECLARE_RIVET_PLUGIN(ATLAS_2011_I894867); 00078 00079 } Generated on Tue Sep 30 2014 19:45:41 for The Rivet MC analysis system by ![]() |