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.particles(cmpMomByEta)) { // 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.particles(cmpMomByEta)) { 00051 ((p.eta() > gapcenter) ? mxFourVector : myFourVector) += p.momentum(); 00052 } 00053 const double M2 = max(mxFourVector.mass2(), myFourVector.mass2()); 00054 const double xi = M2/sqr(sqrtS()); // sqrt(s)=7000 GeV, note that units cancel 00055 if (xi < 5e-6) vetoEvent; 00056 00057 _h_sigma->fill(sqrtS()/GeV, weight); 00058 } 00059 00060 00061 void finalize() { 00062 scale(_h_sigma, crossSection()/millibarn/sumOfWeights()); 00063 } 00064 00065 private: 00066 00067 Histo1DPtr _h_sigma; 00068 00069 }; 00070 00071 00072 // The hook for the plugin system 00073 DECLARE_RIVET_PLUGIN(ATLAS_2011_I894867); 00074 00075 } Generated on Tue Mar 24 2015 17:35:23 for The Rivet MC analysis system by ![]() |