TASSO_1990_S2148048.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/Beam.hh" 00006 #include "Rivet/Projections/Thrust.hh" 00007 #include "Rivet/Projections/Sphericity.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 TASSO_1990_S2148048 : public Analysis { 00015 public: 00016 00017 /// @name Constructors etc. 00018 //@{ 00019 00020 /// Constructor 00021 TASSO_1990_S2148048() 00022 : Analysis("TASSO_1990_S2148048") 00023 { 00024 /// @todo Set whether your finalize method needs the generator cross section 00025 //_sumWPassed = 0; 00026 } 00027 00028 //@} 00029 00030 00031 public: 00032 00033 /// @name Analysis methods 00034 //@{ 00035 00036 /// Book histograms and initialise projections before the run 00037 void init() { 00038 const ChargedFinalState cfs(-MAXRAPIDITY, MAXRAPIDITY, 0.1/GeV); 00039 addProjection(cfs, "CFS"); 00040 00041 //// Beams -- needed for x_p calculation 00042 //addProjection(Beam(), "Beams"); 00043 00044 // Thrust 00045 addProjection(Thrust(cfs), "Thrust"); 00046 00047 // For Sphericity and the like 00048 addProjection(Sphericity(cfs), "Sphericity"); 00049 00050 // Histos 00051 int offset = 0; 00052 switch (int(sqrtS()/GeV)) { 00053 case 14: 00054 offset = 0; 00055 break; 00056 case 22: 00057 offset = 1; 00058 break; 00059 case 35: 00060 offset = 2; 00061 break; 00062 case 44: 00063 offset = 3; 00064 break; 00065 } 00066 //_h_xp = bookHisto1D( 2, 1, 1+offset); 00067 _h_sphericity = bookHisto1D( 6, 1, 1+offset); 00068 _h_aplanarity = bookHisto1D( 7, 1, 1+offset); 00069 _h_thrust = bookHisto1D( 8, 1, 1+offset); 00070 } 00071 00072 00073 00074 /// Perform the per-event analysis 00075 void analyze(const Event& event) { 00076 const double weight = event.weight(); 00077 const ChargedFinalState& cfs = applyProjection<ChargedFinalState>(event, "CFS"); 00078 00079 //// Get beams and average beam momentum 00080 //const ParticlePair& beams = applyProjection<Beam>(event, "Beams").beams(); 00081 //const double meanBeamMom = ( beams.first.momentum().vector3().mod() + 00082 //beams.second.momentum().vector3().mod() ) / 2.0; 00083 00084 // TASSO hadronic event selection TODO: move this into a trigger definition 00085 // See page 2 in publication 00086 // Condition 1) --- require at least 5 (4) 'good' tracks 00087 int nch = cfs.particles().size(); 00088 if ( (int(sqrtS()/GeV) > 27 && nch < 5) || (int(sqrtS()/GeV) <= 27 && nch < 4 ) ) { 00089 MSG_DEBUG("Failed # good tracks cut: " << nch); 00090 vetoEvent; 00091 } 00092 // Condition 2) --- 00093 // Condition 5) --- scalar momentum (not pT!!!) sum >= 0.265*s 00094 double momsum = 0.0; 00095 foreach (const Particle& p, cfs.particles()) { 00096 const double mom = p.momentum().vector3().mod(); 00097 momsum += mom; 00098 } 00099 if (momsum <=0.265 * sqrtS()/GeV) { 00100 MSG_DEBUG("Failed pTsum cut: " << momsum << " < " << 0.265 * sqrtS()/GeV); 00101 vetoEvent; 00102 } 00103 00104 // Raise counter for events that pass trigger conditions 00105 //_sumWPassed += event.weight(); 00106 00107 const Thrust& thrust = applyProjection<Thrust>(event, "Thrust"); 00108 //const Vector3 & thrustAxis = thrust.thrustAxis (); 00109 //double theta = thrustAxis.theta(); 00110 //if ( fabs(cos(theta)) >= 0.8 ) { 00111 //MSG_DEBUG("Failed thrust angle cut: " << fabs(cos(theta))); 00112 //vetoEvent; 00113 //} 00114 00115 const Sphericity& sphericity = applyProjection<Sphericity>(event, "Sphericity"); 00116 00117 //// Fill histograms in order of appearance in paper 00118 //foreach (const Particle& p, cfs.particles()) { 00119 //// Get momentum and energy of each particle. 00120 //const Vector3 mom3 = p.momentum().vector3(); 00121 //// Scaled momenta. 00122 //const double mom = mom3.mod(); 00123 //const double scaledMom = mom/meanBeamMom; 00124 //_h_xp->fill(scaledMom, weight); 00125 //} 00126 // 00127 _h_sphericity->fill(sphericity.sphericity(), weight); 00128 _h_aplanarity->fill(sphericity.aplanarity(), weight); 00129 _h_thrust->fill(thrust.thrust(), weight); 00130 } 00131 00132 00133 /// Normalise histograms etc., after the run 00134 void finalize() { 00135 //scale(_h_xp, _sumWPassed/(crossSection()*sumOfWeights())); 00136 normalize(_h_sphericity); 00137 normalize(_h_aplanarity); 00138 normalize(_h_thrust ); 00139 } 00140 00141 //@} 00142 00143 00144 private: 00145 00146 // Data members like post-cuts event weight counters go here 00147 00148 //double _sumWPassed; 00149 00150 private: 00151 00152 /// @name Histograms 00153 //@{ 00154 Histo1DPtr _h_xp ; 00155 Histo1DPtr _h_sphericity; 00156 Histo1DPtr _h_aplanarity; 00157 Histo1DPtr _h_thrust ; 00158 //@} 00159 00160 00161 }; 00162 00163 00164 00165 // The hook for the plugin system 00166 DECLARE_RIVET_PLUGIN(TASSO_1990_S2148048); 00167 00168 } Generated on Fri Dec 21 2012 15:03:42 for The Rivet MC analysis system by ![]() |