Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F7879399
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
32 KB
Subscribers
None
View Options
diff --git a/Contrib/VBFTest/ILC.in b/Contrib/VBFTest/ILC.in
new file mode 100644
--- /dev/null
+++ b/Contrib/VBFTest/ILC.in
@@ -0,0 +1,110 @@
+##################################################
+# Example generator based on ILC parameters
+# usage: Herwig++ read ILC.in
+#
+# Since most parameters are identical to LEP,
+# we use the default LEPGenerator and adapt only
+# for the differences
+##################################################
+
+###################################################
+# Change settings for the ee->Z->qq matrix element
+# to produce only top quarks
+#
+# 'set' lines like this can be omitted if the
+# default value is already okay.
+#
+# Any repository setting can be modified here
+###################################################
+cd /Herwig
+create Herwig::O2AlphaS AlphaS2
+set Model:QCD/RunningAlphaS AlphaS2
+set Model:EW/CKM:theta_12 0.22274457
+set Model:EW/CKM:theta_13 0.
+set Model:EW/CKM:theta_23 0.
+set Model:EW/CKM:delta 0.
+set Model:EW/Sin2ThetaW .2319
+create Herwig::AlphaEM AlphaEM2
+set Model:EW/RunningAlphaEM AlphaEM2
+cd /Herwig/MatrixElements
+create Herwig::MEee2HiggsVBF MEee2HiggsVBF
+insert SimpleEE:MatrixElements[0] MEee2HiggsVBF
+
+set MEee2HiggsVBF:Process ZZ
+set MEee2HiggsVBF:ShapeScheme OnShell
+
+set /Herwig/Particles/e+:PDF /Herwig/Partons/NoPDF
+set /Herwig/Particles/e-:PDF /Herwig/Partons/NoPDF
+set /Herwig/Particles/h0:NominalMass 115
+set /Herwig/Particles/Z0:NominalMass 91.188
+set /Herwig/Particles/W+:NominalMass 80.42
+set /Herwig/Particles/W-:NominalMass 80.42
+set /Herwig/Masses/HiggsMass:HiggsShape 0
+#set /Herwig/Generators/LEPGenerator:EventHandler:BeamB /Herwig/Particles/e-
+
+
+
+##################################################
+# Technical parameters for this run
+##################################################
+cd /Herwig/Generators
+set LEPGenerator:NumberOfEvents 100000000
+set LEPGenerator:RandomNumberGenerator:Seed 31122001
+set LEPGenerator:DebugLevel 1
+set LEPGenerator:PrintEvent 100
+set LEPGenerator:MaxErrors 10000
+set LEPGenerator:EventHandler:HadronizationHandler NULL
+set LEPGenerator:EventHandler:CascadeHandler NULL
+set LEPGenerator:EventHandler:DecayHandler NULL
+set /Herwig/Analysis/Basics:CheckQuark 0
+##################################################
+# ILC physics parameters (override defaults)
+##################################################
+set LEPGenerator:EventHandler:LuminosityFunction:Energy 500.0
+
+##################################################
+# Useful analysis handlers for HepMC related output
+##################################################
+# Schematic overview of an event (requires --with-hepmc to be set at configure time
+# and the graphviz program 'dot' to produce a plot)
+# insert LEPGenerator:AnalysisHandlers 0 /Herwig/Analysis/Plot
+# A HepMC dump file (requires --with-hepmc to be set at configure time)
+# insert LEPGenerator:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
+# set /Herwig/Analysis/HepMCFile:PrintEvent 100
+# set /Herwig/Analysis/HepMCFile:Format GenEvent
+# set /Herwig/Analysis/HepMCFile:Units GeV_mm
+
+create Herwig::QuickVBF /Herwig/Analysis/QuickVBF QuickVBF.so
+insert LEPGenerator:AnalysisHandlers 0 /Herwig/Analysis/QuickVBF
+
+##################################################
+# Save run for later usage with 'Herwig++ run'
+##################################################
+#saverun ILC LEPGenerator
+
+##################################################
+# uncomment this section for an example batch run
+# of two repeats with different parameters
+#
+# Note that a separate call of 'Herwig run'
+# is not required
+##################################################
+saverun ILC1 LEPGenerator
+set /Herwig/Particles/h0:NominalMass 300
+saverun ILC2 LEPGenerator
+set /Herwig/Particles/h0:NominalMass 115
+set /Herwig/Generators/LEPGenerator:EventHandler:LuminosityFunction:Energy 1000
+saverun ILC3 LEPGenerator
+set /Herwig/Particles/h0:NominalMass 300
+saverun ILC4 LEPGenerator
+set /Herwig/Particles/h0:NominalMass 115
+set /Herwig/Generators/LEPGenerator:EventHandler:LuminosityFunction:Energy 500
+set /Herwig/MatrixElements/MEee2HiggsVBF:Process WW
+saverun ILC5 LEPGenerator
+set /Herwig/Particles/h0:NominalMass 300
+saverun ILC6 LEPGenerator
+set /Herwig/Particles/h0:NominalMass 115
+set /Herwig/Generators/LEPGenerator:EventHandler:LuminosityFunction:Energy 1000
+saverun ILC7 LEPGenerator
+set /Herwig/Particles/h0:NominalMass 300
+saverun ILC8 LEPGenerator
diff --git a/Contrib/VBFTest/LHC.in b/Contrib/VBFTest/LHC.in
new file mode 100644
--- /dev/null
+++ b/Contrib/VBFTest/LHC.in
@@ -0,0 +1,130 @@
+##################################################
+# Example generator based on LHC parameters
+# usage: Herwig++ read LHC.in
+##################################################
+
+cd /Herwig
+create Herwig::O2AlphaS AlphaS2
+set Model:QCD/RunningAlphaS AlphaS2
+set Model:EW/CKM:theta_12 0.000001
+set Model:EW/CKM:theta_13 0.
+set Model:EW/CKM:theta_23 0.
+set Model:EW/CKM:delta 0.
+set Model:EW/Sin2ThetaW .2319
+create Herwig::AlphaEM AlphaEM2
+set Model:EW/RunningAlphaEM AlphaEM2
+
+set /Herwig/Particles/h0:NominalMass 115
+set /Herwig/Particles/Z0:NominalMass 91.188
+set /Herwig/Particles/W+:NominalMass 80.42
+set /Herwig/Particles/W-:NominalMass 80.42
+set /Herwig/Masses/HiggsMass:HiggsShape 0
+
+cd /Herwig/Partons
+setup MRST /usr/local/share/Herwig++/PDF/mrst/1998/lo05a.dat
+set MRST:Interpolation Linear
+
+##################################################
+# Technical parameters for this run
+##################################################
+cd /Herwig/Generators
+set LHCGenerator:NumberOfEvents 10000000
+set LHCGenerator:RandomNumberGenerator:Seed 31122001
+set LHCGenerator:DebugLevel 1
+set LHCGenerator:PrintEvent 10
+set LHCGenerator:MaxErrors 10000
+set LHCGenerator:EventHandler:CascadeHandler NULL
+set LHCGenerator:EventHandler:DecayHandler NULL
+set LHCGenerator:EventHandler:HadronizationHandler NULL
+set LHCGenerator:EventHandler:StatLevel Full
+
+##################################################
+# LHC physics parameters (override defaults here)
+##################################################
+set LHCGenerator:EventHandler:LuminosityFunction:Energy 2000.0
+set LHCGenerator:EventHandler:BeamB /Herwig/Particles/pbar-
+
+# Intrinsic pT tune extrapolated to LHC energy
+set /Herwig/Shower/Evolver:IntrinsicPtGaussian 5.7*GeV
+
+##################################################
+# Matrix Elements for hadron-hadron collisions
+# (by default only gamma/Z switched on)
+##################################################
+cd /Herwig/MatrixElements/
+create Herwig::MEPP2HiggsVBF MEPP2HiggsVBF
+set MEPP2HiggsVBF:MaxFlavour 5
+set MEPP2HiggsVBF:ShapeScheme OnShell
+set MEPP2HiggsVBF:Process ZZ
+
+insert SimpleQCD:MatrixElements[0] MEPP2HiggsVBF
+set /Herwig/Cuts/JetKtCut:MinKT 0.*GeV
+
+set /Herwig/ACDCSampler:Ntry 100000
+
+cd /Herwig/Generators
+
+##################################################
+# Useful analysis handlers for hadron-hadron physics
+##################################################
+# analysis of W/Z events
+# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/DrellYan
+# analysis of top-antitop events
+# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/TTbar
+# analysis of gamma+jet events
+# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/GammaJet
+# analysis of gamma-gamma events
+# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/GammaGamma
+# analysis of higgs-jet events
+# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/HiggsJet
+
+##################################################
+# Useful analysis handlers for HepMC related output
+##################################################
+# Schematic overview of an event (requires --with-hepmc to be set at configure time
+# and the graphviz program 'dot' to produce a plot)
+# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/Plot
+# A HepMC dump file (requires --with-hepmc to be set at configure time)
+# insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/HepMCFile
+# set /Herwig/Analysis/HepMCFile:PrintEvent 100
+# set /Herwig/Analysis/HepMCFile:Format GenEvent
+# set /Herwig/Analysis/HepMCFile:Units GeV_mm
+set /Herwig/Analysis/Basics:CheckQuark 0
+
+create Herwig::QuickVBFHadron /Herwig/Analysis/QuickVBFHadron QuickVBFHadron.so
+insert LHCGenerator:AnalysisHandlers 0 /Herwig/Analysis/QuickVBFHadron
+
+##################################################
+# Save run for later usage with 'Herwig++ run'
+##################################################
+#saverun LHC LHCGenerator
+
+##################################################
+# uncomment this section for an example batch run
+# of two repeats with different parameters
+#
+# Note that a separate call of 'Herwig run'
+# is not required in this case
+##################################################
+saverun LHC1 LHCGenerator
+set /Herwig/Particles/h0:NominalMass 300
+saverun LHC2 LHCGenerator
+set /Herwig/Particles/h0:NominalMass 115
+set /Herwig/Generators/LHCGenerator:EventHandler:LuminosityFunction:Energy 14000
+set /Herwig/Generators/LHCGenerator:EventHandler:BeamB /Herwig/Particles/p+
+saverun LHC3 LHCGenerator
+set /Herwig/Particles/h0:NominalMass 300
+saverun LHC4 LHCGenerator
+set /Herwig/Particles/h0:NominalMass 115
+set /Herwig/Generators/LHCGenerator:EventHandler:LuminosityFunction:Energy 2000
+set /Herwig/Generators/LHCGenerator:EventHandler:BeamB /Herwig/Particles/pbar-
+set /Herwig/MatrixElements/MEPP2HiggsVBF:Process WW
+saverun LHC5 LHCGenerator
+set /Herwig/Particles/h0:NominalMass 300
+saverun LHC6 LHCGenerator
+set /Herwig/Particles/h0:NominalMass 115
+set /Herwig/Generators/LHCGenerator:EventHandler:LuminosityFunction:Energy 14000
+set /Herwig/Generators/LHCGenerator:EventHandler:BeamB /Herwig/Particles/p+
+saverun LHC7 LHCGenerator
+set /Herwig/Particles/h0:NominalMass 300
+saverun LHC8 LHCGenerator
diff --git a/Contrib/VBFTest/QuickVBF.cc b/Contrib/VBFTest/QuickVBF.cc
new file mode 100644
--- /dev/null
+++ b/Contrib/VBFTest/QuickVBF.cc
@@ -0,0 +1,134 @@
+// -*- C++ -*-
+//
+// This is the implementation of the non-inlined, non-templated member
+// functions of the QuickVBF class.
+//
+
+#include "QuickVBF.h"
+#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/PDT/EnumParticles.h"
+#include "ThePEG/Repository/EventGenerator.h"
+#include "ThePEG/EventRecord/Particle.h"
+#include "ThePEG/EventRecord/Event.h"
+
+using namespace Herwig;
+
+void QuickVBF::analyze(tEventPtr event, long ieve, int loop, int state) {
+ AnalysisHandler::analyze(event, ieve, loop, state);
+ // Rotate to CMS, extract final state particles and call analyze(particles).
+ StepVector::const_iterator sit =event->primaryCollision()->steps().begin();
+ StepVector::const_iterator stest =event->primaryCollision()->steps().end();
+ StepVector::const_iterator send=sit;
+ ++send;
+ if(send==stest) --send;
+ ++send;
+ if(send==stest) --send;
+ ++send;
+ Lorentz5Momentum pz;
+ for(;sit!=send;++sit) {
+ ParticleSet part;
+ (**sit).selectFinalState(inserter(part));
+ ParticleSet::const_iterator iter = part.begin(), end = part.end();
+ for( ;iter!=end;++iter) {
+ if((**iter).id()==ParticleID::h0) {
+ *_mH += (**iter).momentum().m()/GeV;
+ *_cosH += (**iter).momentum().cosTheta();
+ *_phiH += (**iter).momentum().phi()+Constants::pi;
+ *_eH += (**iter).momentum().t()/GeV;
+ }
+ else if((**iter).id()==ParticleID::nu_e) {
+ *_cosnu += (**iter).momentum().cosTheta();
+ *_phinu += (**iter).momentum().phi()+Constants::pi;
+ *_enu += (**iter).momentum().t()/GeV;
+ }
+ else if((**iter).id()==ParticleID::nu_ebar) {
+ *_cosnub += (**iter).momentum().cosTheta();
+ *_phinub += (**iter).momentum().phi()+Constants::pi;
+ *_enub += (**iter).momentum().t()/GeV;
+ }
+ else if((**iter).id()==ParticleID::eminus) {
+ *_cosem += (**iter).momentum().cosTheta();
+ *_phiem += (**iter).momentum().phi()+Constants::pi;
+ *_eem += (**iter).momentum().t()/GeV;
+ }
+ else if((**iter).id()==ParticleID::eplus) {
+ *_cosep += (**iter).momentum().cosTheta();
+ *_phiep += (**iter).momentum().phi()+Constants::pi;
+ *_eep += (**iter).momentum().t()/GeV;
+ }
+ }
+ }
+}
+
+NoPIOClassDescription<QuickVBF> QuickVBF::initQuickVBF;
+// Definition of the static class description member.
+
+void QuickVBF::Init() {
+
+ static ClassDocumentation<QuickVBF> documentation
+ ("There is no documentation for the QuickVBF class");
+
+}
+
+void QuickVBF::doinitrun() {
+ AnalysisHandler::doinitrun();
+ if(getParticleData(ParticleID::h0)->mass()>200.*GeV)
+ _mH = new_ptr(Histogram(200., 400.,200));
+ else
+ _mH = new_ptr(Histogram(114., 116.0,200));
+ _cosH = new_ptr(Histogram( -1.0, 1.0,200));
+ _phiH = new_ptr(Histogram( 0.0,2.0*Constants::pi,200));
+ _eH = new_ptr(Histogram( 0.0,1000.,1000));
+ _cosnu = new_ptr(Histogram( -1.0, 1.0,200));
+ _phinu = new_ptr(Histogram( 0.0,2.0*Constants::pi,200));
+ _enu = new_ptr(Histogram( 0.0,1000.,1000));
+ _cosnub = new_ptr(Histogram( -1.0, 1.0,200));
+ _phinub = new_ptr(Histogram( 0.0,2.0*Constants::pi,200));
+ _enub = new_ptr(Histogram( 0.0,1000.,1000));
+ _cosem = new_ptr(Histogram( -1.0, 1.0,200));
+ _phiem = new_ptr(Histogram( 0.0,2.0*Constants::pi,200));
+ _eem = new_ptr(Histogram( 0.0,1000.,1000));
+ _cosep = new_ptr(Histogram( -1.0, 1.0,200));
+ _phiep = new_ptr(Histogram( 0.0,2.0*Constants::pi,200));
+ _eep = new_ptr(Histogram( 0.0,1000.,1000));
+}
+
+void QuickVBF::dofinish() {
+ AnalysisHandler::dofinish();
+ string fname = generator()->filename() + string("-") + name() + string(".top");
+ ofstream outfile(fname.c_str());
+ using namespace HistogramOptions;
+ string title,species;
+ title = "mass of H";
+ _mH->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "theta of H";
+ _cosH->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "Energy of H";
+ _eH->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "azimuth of H";
+ _phiH->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "theta of nu";
+ _cosnu->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "Energy of nu";
+ _enu->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "azimuth of nu";
+ _phinu->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "theta of nub";
+ _cosnub->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "Energy of nub";
+ _enub->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "azimuth of nub";
+ _phinub->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "theta of em";
+ _cosem->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "Energy of em";
+ _eem->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "azimuth of em";
+ _phiem->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "theta of ep ";
+ _cosep ->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "Energy of ep ";
+ _eep ->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "azimuth of ep ";
+ _phiep ->topdrawOutput(outfile,Frame,"BLACK",title);
+}
diff --git a/Contrib/VBFTest/QuickVBF.h b/Contrib/VBFTest/QuickVBF.h
new file mode 100644
--- /dev/null
+++ b/Contrib/VBFTest/QuickVBF.h
@@ -0,0 +1,152 @@
+// -*- C++ -*-
+#ifndef HERWIG_QuickVBF_H
+#define HERWIG_QuickVBF_H
+//
+// This is the declaration of the QuickVBF class.
+//
+
+#include "ThePEG/Handlers/AnalysisHandler.h"
+#include "Herwig++/Utilities/Histogram.h"
+
+namespace Herwig {
+
+using namespace ThePEG;
+
+/**
+ * Here is the documentation of the QuickVBF class.
+ *
+ * @see \ref QuickVBFInterfaces "The interfaces"
+ * defined for QuickVBF.
+ */
+class QuickVBF: public AnalysisHandler {
+
+public:
+
+ /** @name Virtual functions required by the AnalysisHandler class. */
+ //@{
+ /**
+ * Analyze a given Event. Note that a fully generated event
+ * may be presented several times, if it has been manipulated in
+ * between. The default version of this function will call transform
+ * to make a lorentz transformation of the whole event, then extract
+ * all final state particles and call analyze(tPVector) of this
+ * analysis object and those of all associated analysis objects. The
+ * default version will not, however, do anything on events which
+ * have not been fully generated, or have been manipulated in any
+ * way.
+ * @param event pointer to the Event to be analyzed.
+ * @param ieve the event number.
+ * @param loop the number of times this event has been presented.
+ * If negative the event is now fully generated.
+ * @param state a number different from zero if the event has been
+ * manipulated in some way since it was last presented.
+ */
+ virtual void analyze(tEventPtr event, long ieve, int loop, int state);
+
+public:
+
+ /**
+ * The standard Init function used to initialize the interfaces.
+ * Called exactly once for each class by the class description system
+ * before the main function starts or
+ * when this class is dynamically loaded.
+ */
+ static void Init();
+
+protected:
+
+ /** @name Clone Methods. */
+ //@{
+ /**
+ * Make a simple clone of this object.
+ * @return a pointer to the new object.
+ */
+ inline virtual IBPtr clone() const {return new_ptr(*this);}
+
+ /** Make a clone of this object, possibly modifying the cloned object
+ * to make it sane.
+ * @return a pointer to the new object.
+ */
+ inline virtual IBPtr fullclone() const {return new_ptr(*this);}
+ //@}
+
+
+protected:
+
+ /** @name Standard Interfaced functions. */
+ //@{
+ /**
+ * Initialize this object. Called in the run phase just before
+ * a run begins.
+ */
+ virtual void doinitrun();
+
+ /**
+ * Finalize this object. Called in the run phase just after a
+ * run has ended. Used eg. to write out statistics.
+ */
+ virtual void dofinish();
+ //@}
+
+private:
+
+ /**
+ * The static object used to initialize the description of this class.
+ * Indicates that this is an concrete class without persistent data.
+ */
+ static NoPIOClassDescription<QuickVBF> initQuickVBF;
+
+ /**
+ * The assignment operator is private and must never be called.
+ * In fact, it should not even be implemented.
+ */
+ QuickVBF & operator=(const QuickVBF &);
+
+private:
+
+ HistogramPtr _mH ,_cosH ,_eH ,_phiH ;
+ HistogramPtr _cosnu ,_enu ,_phinu ;
+ HistogramPtr _cosnub,_enub,_phinub;
+ HistogramPtr _cosem ,_eem ,_phiem ;
+ HistogramPtr _cosep ,_eep ,_phiep ;
+
+};
+
+}
+
+#include "ThePEG/Utilities/ClassTraits.h"
+
+namespace ThePEG {
+
+/** @cond TRAITSPECIALIZATIONS */
+
+/** This template specialization informs ThePEG about the
+ * base classes of QuickVBF. */
+template <>
+struct BaseClassTrait<Herwig::QuickVBF,1> {
+ /** Typedef of the first base class of QuickVBF. */
+ typedef AnalysisHandler NthBase;
+};
+
+/** This template specialization informs ThePEG about the name of
+ * the QuickVBF class and the shared object where it is defined. */
+template <>
+struct ClassTraits<Herwig::QuickVBF>
+ : public ClassTraitsBase<Herwig::QuickVBF> {
+ /** Return a platform-independent class name */
+ static string className() { return "Herwig::QuickVBF"; }
+ /**
+ * The name of a file containing the dynamic library where the class
+ * QuickVBF is implemented. It may also include several, space-separated,
+ * libraries if the class QuickVBF depends on other classes (base classes
+ * excepted). In this case the listed libraries will be dynamically
+ * linked in the order they are specified.
+ */
+ static string library() { return "QuickVBF.so"; }
+};
+
+/** @endcond */
+
+}
+
+#endif /* HERWIG_QuickVBF_H */
diff --git a/Contrib/VBFTest/QuickVBFHadron.cc b/Contrib/VBFTest/QuickVBFHadron.cc
new file mode 100644
--- /dev/null
+++ b/Contrib/VBFTest/QuickVBFHadron.cc
@@ -0,0 +1,241 @@
+// -*- C++ -*-
+//
+// This is the implementation of the non-inlined, non-templated member
+// functions of the QuickVBFHadron class.
+//
+
+#include "QuickVBFHadron.h"
+#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/PDT/EnumParticles.h"
+#include "ThePEG/Repository/EventGenerator.h"
+#include "ThePEG/EventRecord/Particle.h"
+#include "ThePEG/EventRecord/Event.h"
+
+#include "ThePEG/EventRecord/Collision.h"
+#include "ThePEG/EventRecord/Step.h"
+#include "ThePEG/EventRecord/SubProcess.h"
+#include "ThePEG/Handlers/XComb.h"
+#include "ThePEG/Handlers/EventHandler.h"
+#include "ThePEG/PDF/PartonExtractor.h"
+#include "ThePEG/PDF/PDF.h"
+
+using namespace Herwig;
+
+void QuickVBFHadron::analyze(tEventPtr event, long ieve, int loop, int state) {
+ AnalysisHandler::analyze(event, ieve, loop, state);
+ // Rotate to CMS, extract final state particles and call analyze(particles).
+ tPVector part = event->getFinalState();
+ Lorentz5Momentum pjj;
+ Energy2 mHsq(ZERO);
+ for(tPVector::const_iterator iter = part.begin(), end = part.end();
+ iter!=end;++iter) {
+ if((**iter).id()==ParticleID::h0) {
+ *_mH += (**iter).momentum().m()/GeV;
+ mHsq=(**iter).momentum().m2();
+ *_yH += (**iter).momentum().rapidity();
+ *_phiH += (**iter).momentum().phi()+Constants::pi;
+ *_pTH[0] += (**iter).momentum().perp()/GeV;
+ *_pTH[1] += (**iter).momentum().perp()/GeV;
+ }
+ else if((**iter).id()!=82) {
+ *_yjet += (**iter).momentum().rapidity();
+ *_phijet += (**iter).momentum().phi()+Constants::pi;
+ *_pTjet[0] += (**iter).momentum().perp()/GeV;
+ *_pTjet[1] += (**iter).momentum().perp()/GeV;
+ pjj+=(**iter).momentum();
+ }
+ }
+ *_mjj += pjj.m()/GeV;
+
+ if (!_doOnce) {
+ // Find the pdf information
+ tSubProPtr sub = event->primarySubProcess();
+ // get the event handler
+ tcEHPtr eh = dynamic_ptr_cast<tcEHPtr>(event->handler());
+ // get the pdfs
+ pair<PDF,PDF> pdfs;
+ pdfs.first = eh->pdf<PDF>(sub->incoming().first );
+ pdfs.second = eh->pdf<PDF>(sub->incoming().second);
+ // Make a semi-analytical prediction of the convolution over pdfs
+ const double num=1e7;
+ double allsum[14][14];
+ double allsqr[14][14];
+ for (int j=0; j<=13 ; ++j) {
+ for (int k=0; k<=13 ; ++k) {
+ allsum[j][k]=0;
+ allsqr[j][k]=0;
+ }
+ }
+ double zzsum=0;
+ double zzsqr=0;
+ double wwsum=0;
+ double wwsqr=0;
+ Energy2 scale=mHsq;
+ Energy2 s=event->primaryCollision()->m2();
+ cerr << "Starting semi-analytical calculation. Higgs mass/GeV=" <<
+ sqrt(mHsq)/GeV << ", sqrt(s)/GeV=" << sqrt(s)/GeV << "\n";
+ double tmin=mHsq/s;
+ double tlmin=log(tmin);
+ for (int i=0 ; i<int(num+0.5) ; ++i) {
+ double xxmin=exp(tlmin*UseRandom::rnd());
+ double xlmin=log(xxmin);
+ double x1=exp(xlmin*UseRandom::rnd());
+ double x2=xxmin/x1;
+ // out of laziness, just don't use the 0'th elements, to be like fortran
+ double disf[14][3];
+ for (int j=1 ; j<=13; ++j) {
+ for (int k=1 ; k<=2 ; ++k) {
+ disf[j][k]=0;
+ }
+ }
+ for (int j=1 ; j<=6 ; ++j) {
+ disf[j][1]=pdfs.first .xfx((tcPDPtr)getParticleData(j),scale,x1);
+ disf[j+6][1]=pdfs.first .xfx((tcPDPtr)getParticleData(-j),scale,x1);
+ }
+ disf[13][1]=pdfs.first .xfx((tcPDPtr)getParticleData(21),scale,x1);
+ for (int j=1 ; j<=6 ; ++j) {
+ disf[j][2]=pdfs.second.xfx((tcPDPtr)getParticleData(j),scale,x2);
+ disf[j+6][2]=pdfs.second.xfx((tcPDPtr)getParticleData(-j),scale,x2);
+ }
+ disf[13][2]=pdfs.second.xfx((tcPDPtr)getParticleData(21),scale,x2);
+ double w=tlmin*xlmin*
+ (disf[1][1]+disf[2][1]+disf[3][1]+disf[4][1]+
+ disf[7][1]+disf[8][1]+disf[9][1]+disf[10][1])*
+ (disf[1][2]+disf[2][2]+disf[3][2]+disf[4][2]+
+ disf[7][2]+disf[8][2]+disf[9][2]+disf[10][2]);
+ zzsum+=w;
+ zzsqr+=sqr(w);
+ w=tlmin*xlmin*
+ ((disf[1][1]+disf[3][1]+disf[8][1]+disf[10][1])*
+ (disf[2][2]+disf[4][2]+disf[7][2]+disf[9][2])+
+ (disf[2][1]+disf[4][1]+disf[7][1]+disf[9][1])*
+ (disf[1][2]+disf[3][2]+disf[8][2]+disf[10][2]));
+ // Extra factor because Hw++ test program sums over 4 Cabibbo possibilities
+ w*=4;
+ wwsum+=w;
+ wwsqr+=sqr(w);
+ for (int j=1; j<=13; ++j) {
+ for (int k=1; k<=13; ++k) {
+ w=tlmin*xlmin*disf[j][1]*disf[k][2];
+ allsum[j][k]+=w;
+ allsqr[j][k]+=sqr(w);
+ }
+ }
+ }
+ cerr << "Analytical result for ZZ=" << zzsum/num << "+-" << sqrt(zzsqr-sqr(zzsum)/num)/num << "\n";
+ cerr << "Analytical result for WW=" << wwsum/num << "+-" << sqrt(wwsqr-sqr(wwsum)/num)/num << "\n";
+ for (int j=1; j<=13; ++j) {
+ int idj=0;
+ if (j>=1&&j<=5) idj=j;
+ if (j>=7&&j<=11)idj=6-j;
+ if (idj!=0) {
+ for (int k=1; k<=13; ++k) {
+ int idk=0;
+ if (k>=1&&k<=5) idk=k;
+ if (k>=7&&k<=11)idk=6-k;
+ if (idk!=0 && allsum[j][k]>0) {
+ cerr << getParticleData(idj)->PDGName() << " " <<
+ getParticleData(idk)->PDGName() << "\t" <<
+ allsum[j][k]/num << "+-" << sqrt(allsqr[j][k]-sqr(allsum[j][k])/num)/num << "\n";
+ }
+ }
+ }
+ }
+ _doOnce=true;
+ }
+ /*
+ // ids of the partons going into the primary sub process
+ tSubProPtr sub = event->primarySubProcess();
+ int id1 = sub->incoming().first ->id();
+ int id2 = sub->incoming().second->id();
+ // get the event handler
+ tcEHPtr eh = dynamic_ptr_cast<tcEHPtr>(event->handler());
+ // get the values of x
+ double x1 = eh->lastX1();
+ double x2 = eh->lastX2();
+ // get the pdfs
+ pair<PDF,PDF> pdfs;
+ pdfs.first = eh->pdf<PDF>(sub->incoming().first );
+ pdfs.second = eh->pdf<PDF>(sub->incoming().second);
+ // get the scale
+ Energy2 scale = eh->lastScale();
+ // get the values of the pdfs
+ double pdf1 = pdfs.first .xfx(sub->incoming().first ->dataPtr(),scale,x1);
+ double pdf2 = pdfs.second.xfx(sub->incoming().second->dataPtr(),scale,x2);
+ // print them to cerr
+ if (x1<3e-4 || x2<3e-4) {
+ cerr << "The x values are:" << x1 << " " << x2 << "\n";
+ cerr << "The scale is:" << sqrt(scale)/GeV << " GeV \n";
+ cerr << "The parton ids are:" << id1 << " " << id2 << "\n";
+ cerr << "The pdfs are:" << pdf1 << " " << pdf2 << "\n\n";
+ }
+ for (int i=0;i<=100;++i) {
+ x1 = pow(10.0,4*(double(i)/100-1));
+ pdf1 = pdfs.first .xfx(sub->incoming().first ->dataPtr(),scale,x1);
+ cerr << x1 << " " << pdf1 << "\n";
+ }
+ */
+}
+
+bool QuickVBFHadron::_doOnce = false;
+
+IBPtr QuickVBFHadron::clone() const {
+ return new_ptr(*this);
+}
+
+IBPtr QuickVBFHadron::fullclone() const {
+ return new_ptr(*this);
+}
+
+NoPIOClassDescription<QuickVBFHadron> QuickVBFHadron::initQuickVBFHadron;
+// Definition of the static class description member.
+
+void QuickVBFHadron::Init() {
+
+ static ClassDocumentation<QuickVBFHadron> documentation
+ ("There is no documentation for the QuickVBFHadron class");
+
+}
+
+void QuickVBFHadron::dofinish() {
+ AnalysisHandler::dofinish();
+ string fname = generator()->filename() + string("-") + name() + string(".top");
+ ofstream outfile(fname.c_str());
+ using namespace HistogramOptions;
+ string title,species;
+ title = "mass of H";
+ _mH->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "rapidity of H";
+ _yH->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "pT of H";
+ _pTH[0]->topdrawOutput(outfile,Frame|Ylog,"BLACK",title);
+ _pTH[1]->topdrawOutput(outfile,Frame|Ylog,"BLACK",title);
+ title = "azimuth of H";
+ _phiH->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "rapidity of jet";
+ _yjet->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "pT of jet";
+ _pTjet[0]->topdrawOutput(outfile,Frame|Ylog,"BLACK",title);
+ _pTjet[1]->topdrawOutput(outfile,Frame|Ylog,"BLACK",title);
+ title = "azimuth of jet";
+ _phijet->topdrawOutput(outfile,Frame,"BLACK",title);
+ title = "mjj";
+ _mjj->topdrawOutput(outfile,Frame,"BLACK",title);
+}
+
+void QuickVBFHadron::doinitrun() {
+ AnalysisHandler::doinitrun();
+ if(getParticleData(ParticleID::h0)->mass()>200.*GeV)
+ _mH = new_ptr(Histogram(200., 400.,200));
+ else
+ _mH = new_ptr(Histogram(114., 116.0,200));
+ _yH = new_ptr(Histogram( -10.0, 10.0,200));
+ _phiH = new_ptr(Histogram( 0.0,2.0*Constants::pi,200));
+ _pTH[0] = new_ptr(Histogram( 0.0,1000.,1000));
+ _pTH[1] = new_ptr(Histogram( 0.0,1000.,100));
+ _yjet = new_ptr(Histogram( -10.0, 10.0,200));
+ _phijet = new_ptr(Histogram( 0.0,2.0*Constants::pi,200));
+ _pTjet[0] = new_ptr(Histogram( 0.0,1000.,1000));
+ _pTjet[1] = new_ptr(Histogram( 0.0,1000.,100));
+ _mjj = new_ptr(Histogram(0.0,200.,100));
+}
diff --git a/Contrib/VBFTest/QuickVBFHadron.h b/Contrib/VBFTest/QuickVBFHadron.h
new file mode 100644
--- /dev/null
+++ b/Contrib/VBFTest/QuickVBFHadron.h
@@ -0,0 +1,152 @@
+// -*- C++ -*-
+#ifndef HERWIG_QuickVBFHadron_H
+#define HERWIG_QuickVBFHadron_H
+//
+// This is the declaration of the QuickVBFHadron class.
+//
+
+#include "ThePEG/Handlers/AnalysisHandler.h"
+#include "Herwig++/Utilities/Histogram.h"
+
+namespace Herwig {
+
+using namespace ThePEG;
+
+/**
+ * Here is the documentation of the QuickVBFHadron class.
+ *
+ * @see \ref QuickVBFHadronInterfaces "The interfaces"
+ * defined for QuickVBFHadron.
+ */
+class QuickVBFHadron: public AnalysisHandler {
+
+public:
+
+ /** @name Virtual functions required by the AnalysisHandler class. */
+ //@{
+ /**
+ * Analyze a given Event. Note that a fully generated event
+ * may be presented several times, if it has been manipulated in
+ * between. The default version of this function will call transform
+ * to make a lorentz transformation of the whole event, then extract
+ * all final state particles and call analyze(tPVector) of this
+ * analysis object and those of all associated analysis objects. The
+ * default version will not, however, do anything on events which
+ * have not been fully generated, or have been manipulated in any
+ * way.
+ * @param event pointer to the Event to be analyzed.
+ * @param ieve the event number.
+ * @param loop the number of times this event has been presented.
+ * If negative the event is now fully generated.
+ * @param state a number different from zero if the event has been
+ * manipulated in some way since it was last presented.
+ */
+ virtual void analyze(tEventPtr event, long ieve, int loop, int state);
+ //@}
+
+public:
+
+ /**
+ * The standard Init function used to initialize the interfaces.
+ * Called exactly once for each class by the class description system
+ * before the main function starts or
+ * when this class is dynamically loaded.
+ */
+ static void Init();
+
+protected:
+
+ /** @name Clone Methods. */
+ //@{
+ /**
+ * Make a simple clone of this object.
+ * @return a pointer to the new object.
+ */
+ virtual IBPtr clone() const;
+
+ /** Make a clone of this object, possibly modifying the cloned object
+ * to make it sane.
+ * @return a pointer to the new object.
+ */
+ virtual IBPtr fullclone() const;
+ //@}
+
+protected:
+
+ /** @name Standard Interfaced functions. */
+ //@{
+ /**
+ * Initialize this object. Called in the run phase just before
+ * a run begins.
+ */
+ virtual void doinitrun();
+
+ /**
+ * Finalize this object. Called in the run phase just after a
+ * run has ended. Used eg. to write out statistics.
+ */
+ virtual void dofinish();
+ //@}
+
+private:
+
+ /**
+ * The static object used to initialize the description of this class.
+ * Indicates that this is an concrete class without persistent data.
+ */
+ static NoPIOClassDescription<QuickVBFHadron> initQuickVBFHadron;
+
+ /**
+ * The assignment operator is private and must never be called.
+ * In fact, it should not even be implemented.
+ */
+ QuickVBFHadron & operator=(const QuickVBFHadron &);
+
+private:
+
+ HistogramPtr _mH ,_yH ,_pTH[2] ,_phiH ;
+ HistogramPtr _yjet,_pTjet[2],_phijet;
+ HistogramPtr _mjj;
+
+ static bool _doOnce;
+
+};
+
+}
+
+#include "ThePEG/Utilities/ClassTraits.h"
+
+namespace ThePEG {
+
+/** @cond TRAITSPECIALIZATIONS */
+
+/** This template specialization informs ThePEG about the
+ * base classes of QuickVBFHadron. */
+template <>
+struct BaseClassTrait<Herwig::QuickVBFHadron,1> {
+ /** Typedef of the first base class of QuickVBFHadron. */
+ typedef AnalysisHandler NthBase;
+};
+
+/** This template specialization informs ThePEG about the name of
+ * the QuickVBFHadron class and the shared object where it is defined. */
+template <>
+struct ClassTraits<Herwig::QuickVBFHadron>
+ : public ClassTraitsBase<Herwig::QuickVBFHadron> {
+ /** Return a platform-independent class name */
+ static string className() { return "Herwig::QuickVBFHadron"; }
+ /**
+ * The name of a file containing the dynamic library where the class
+ * QuickVBFHadron is implemented. It may also include several, space-separated,
+ * libraries if the class QuickVBFHadron depends on other classes (base classes
+ * excepted). In this case the listed libraries will be dynamically
+ * linked in the order they are specified.
+ */
+ static string library() { return "QuickVBFHadron.so"; }
+};
+
+/** @endcond */
+
+}
+
+#endif /* HERWIG_QuickVBFHadron_H */
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Nov 19, 8:15 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3801727
Default Alt Text
(32 KB)
Attached To
rHERWIGHG herwighg
Event Timeline
Log In to Comment