Herwig++
2.7.0
|
00001 // -*- C++ -*- 00002 // 00003 // LEPFourJetsAnalysis.h is a part of Herwig++ - A multi-purpose Monte Carlo event generator 00004 // Copyright (C) 2002-2011 The Herwig Collaboration 00005 // 00006 // Herwig++ is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef HERWIG_LEPFourJetsAnalysis_H 00010 #define HERWIG_LEPFourJetsAnalysis_H 00011 // 00012 // This is the declaration of the LEPFourJetsAnalysis class. 00013 // 00014 00015 #include "ThePEG/Handlers/AnalysisHandler.h" 00016 #include "ThePEG/Repository/EventGenerator.h" 00017 #include "ThePEG/Vectors/Lorentz5Vector.h" 00018 #include "Herwig++/Utilities/Histogram.h" 00019 #include "ThePEG/Repository/CurrentGenerator.h" 00020 00021 namespace Herwig { 00022 00023 using namespace ThePEG; 00024 00032 class LEPFourJetsAnalysis: public AnalysisHandler { 00033 00034 public: 00035 00039 LEPFourJetsAnalysis () 00040 : _ca34(), _cchiBZ(), _cphiKSW(), _cthNR(), 00041 _charged(true) {} 00042 00043 public: 00044 00064 virtual void analyze(tEventPtr event, long ieve, int loop, int state); 00066 00067 public: 00068 00075 void persistentOutput(PersistentOStream & os) const; 00076 00082 void persistentInput(PersistentIStream & is, int version); 00084 00091 static void Init(); 00092 00093 00094 protected: 00095 00103 double cosChiBZ(vector<Lorentz5Momentum> p) { 00104 if (p.size() == 4) { 00105 ThreeVector<Energy2> v1 = p[0].vect().cross(p[1].vect()); 00106 ThreeVector<Energy2> v2 = p[2].vect().cross(p[3].vect()); 00107 return cos(v1.angle(v2)); 00108 } 00109 else return 123; 00110 } 00111 00115 double cosPhiKSW(vector<Lorentz5Momentum> p) { 00116 if (p.size() == 4) { 00117 ThreeVector<Energy2> v1 = p[0].vect().cross(p[3].vect()); 00118 ThreeVector<Energy2> v2 = p[1].vect().cross(p[2].vect()); 00119 double alpha1 = v1.angle(v2); 00120 v1 = p[0].vect().cross(p[2].vect()); 00121 v2 = p[1].vect().cross(p[3].vect()); 00122 double alpha2 = v1.angle(v2); 00123 return cos((alpha1+alpha2)/2.); 00124 } 00125 else return 123; 00126 } 00127 00131 double cosThetaNR(vector<Lorentz5Momentum> p) { 00132 if (p.size() == 4) { 00133 ThreeVector<Energy> v1 = p[0].vect() - p[1].vect(); 00134 ThreeVector<Energy> v2 = p[2].vect() - p[3].vect(); 00135 return cos(v1.angle(v2)); 00136 } 00137 else return 123; 00138 } 00139 00143 double cosAlpha34(std::vector<Lorentz5Momentum> p) { 00144 if (p.size() == 4) 00145 return cos(p[2].vect().angle(p[3].vect())); 00146 else 00147 return 123; 00148 } 00150 00151 protected: 00152 00159 virtual IBPtr clone() const { 00160 return new_ptr(*this); 00161 } 00162 00167 virtual IBPtr fullclone() const { 00168 return new_ptr(*this); 00169 } 00171 00172 protected: 00173 00180 virtual void doinitrun(); 00181 00186 virtual void dofinish(); 00188 00189 private: 00190 00195 static ClassDescription<LEPFourJetsAnalysis> initLEPFourJetsAnalysis; 00196 00201 LEPFourJetsAnalysis & operator=(const LEPFourJetsAnalysis &); 00202 00203 private: 00204 00208 HistogramPtr _ca34; 00209 00213 HistogramPtr _cchiBZ; 00214 00218 HistogramPtr _cphiKSW; 00219 00223 HistogramPtr _cthNR; 00224 00228 bool _charged; 00229 00230 }; 00231 00232 } 00233 00234 #include "ThePEG/Utilities/ClassTraits.h" 00235 00236 namespace ThePEG { 00237 00242 template <> 00243 struct BaseClassTrait<Herwig::LEPFourJetsAnalysis,1> { 00245 typedef AnalysisHandler NthBase; 00246 }; 00247 00250 template <> 00251 struct ClassTraits<Herwig::LEPFourJetsAnalysis> 00252 : public ClassTraitsBase<Herwig::LEPFourJetsAnalysis> { 00254 static string className() { return "Herwig::LEPFourJetsAnalysis"; } 00258 static string library() { return "libfastjet.so HwLEPJetAnalysis.so"; } 00259 }; 00260 00263 } 00264 00265 #endif /* HERWIG_LEPFourJetsAnalysis_H */