JADE_1998_S3612880.cc
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #include "Rivet/Analysis.hh" 00003 #include "Rivet/RivetYODA.hh" 00004 #include "Rivet/Tools/Logging.hh" 00005 #include "Rivet/Projections/Thrust.hh" 00006 #include "Rivet/Projections/FastJets.hh" 00007 #include "Rivet/Projections/Hemispheres.hh" 00008 #include "Rivet/Projections/ChargedFinalState.hh" 00009 /// @todo Include more projections as required, e.g. ChargedFinalState, FastJets, ZFinder... 00010 00011 namespace Rivet { 00012 00013 00014 class JADE_1998_S3612880 : public Analysis { 00015 public: 00016 00017 /// @name Constructors etc. 00018 //@{ 00019 00020 /// Constructor 00021 JADE_1998_S3612880() 00022 : Analysis("JADE_1998_S3612880") 00023 { 00024 /// @todo Set whether your finalize method needs the generator cross section 00025 } 00026 00027 00028 00029 /// Book histograms and initialise projections before the run 00030 void init() { 00031 const ChargedFinalState cfs(-MAXRAPIDITY, MAXRAPIDITY, 0.1/GeV); 00032 addProjection(cfs, "CFS"); 00033 addProjection(FastJets(cfs, FastJets::DURHAM, 0.7), "DurhamJets"); 00034 00035 // Thrust 00036 const Thrust thrust(cfs); 00037 addProjection(thrust, "Thrust"); 00038 addProjection(Hemispheres(thrust), "Hemispheres"); 00039 00040 // Histos 00041 int offset = 0; 00042 switch (int(sqrtS()/GeV)) { 00043 00044 case 44: 00045 offset = 0; 00046 _h_thrust = bookHisto1D( 2+offset, 1, 1); 00047 _h_MH = bookHisto1D( 3 + offset, 1, 1); 00048 _h_BT = bookHisto1D( 4 + offset, 1, 1); 00049 _h_BW = bookHisto1D( 5 + offset, 1, 1); 00050 _h_y23 = bookHisto1D(10, 1, 1); 00051 break; 00052 case 35: 00053 offset = 4; 00054 _h_thrust = bookHisto1D( 2+offset, 1, 1); 00055 _h_MH = bookHisto1D( 3 + offset, 1, 1); 00056 _h_BT = bookHisto1D( 4 + offset, 1, 1); 00057 _h_BW = bookHisto1D( 5 + offset, 1, 1); 00058 _h_y23 = bookHisto1D(11, 1, 1); 00059 break; 00060 case 22: 00061 _h_y23 = bookHisto1D(12, 1, 1); 00062 break; 00063 } 00064 } 00065 00066 00067 /// Perform the per-event analysis 00068 void analyze(const Event& event) { 00069 const double weight = event.weight(); 00070 const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS"); 00071 00072 // JADE hadronic event selection TODO: move this into a trigger definition 00073 if (cfs.particles().size() < 3 ) { 00074 vetoEvent; 00075 } 00076 const Thrust& thrust = applyProjection<Thrust>(event, "Thrust"); 00077 const Vector3 & thrustAxis = thrust.thrustAxis (); 00078 double theta = thrustAxis.theta(); 00079 if ( fabs(cos(theta)) >= 0.8 ) { 00080 MSG_DEBUG("Failed thrust angle cut: " << fabs(cos(theta))); 00081 vetoEvent; 00082 } 00083 // TODO Evis, pmiss, pbal 00084 00085 const Hemispheres& hemi = applyProjection<Hemispheres>(event, "Hemispheres"); 00086 const FastJets& durjet = applyProjection<FastJets>(event, "DurhamJets"); 00087 00088 double y23 = durjet.clusterSeq()->exclusive_ymerge_max(2); 00089 00090 // Make sure we don't run into a segfault by trying to fill non-existing histos 00091 int s = int(sqrtS()/GeV); 00092 if (s == 44 || s == 35) { 00093 _h_thrust->fill(1. - thrust.thrust(), weight); 00094 _h_MH->fill(sqrt(hemi.scaledM2high()), weight); 00095 _h_BT->fill(hemi.Bsum(), weight); 00096 _h_BW->fill(hemi.Bmax(), weight); 00097 } 00098 _h_y23->fill(y23, weight); 00099 } 00100 00101 /// Normalise histograms etc., after the run 00102 void finalize() { 00103 // Make sure we don't try to normalise non-existing histos 00104 int s = int(sqrtS()/GeV); 00105 if (s == 44 || s == 35) { 00106 normalize(_h_thrust); 00107 normalize(_h_MH); 00108 normalize(_h_BT); 00109 normalize(_h_BW); 00110 } 00111 normalize(_h_y23); 00112 00113 00114 } 00115 00116 //@} 00117 00118 00119 private: 00120 00121 Histo1DPtr _h_thrust; 00122 Histo1DPtr _h_MH; 00123 Histo1DPtr _h_BT; 00124 Histo1DPtr _h_BW; 00125 Histo1DPtr _h_y23; 00126 00127 00128 }; 00129 00130 00131 00132 // The hook for the plugin system 00133 DECLARE_RIVET_PLUGIN(JADE_1998_S3612880); 00134 00135 } Generated on Fri Dec 21 2012 15:03:41 for The Rivet MC analysis system by ![]() |