Page MenuHomeHEPForge

No OneTemporary

diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.cc b/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.cc
--- a/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.cc
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.cc
@@ -1,101 +1,174 @@
// -*- C++ -*-
//
// MatchboxTopMTScale.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2012 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the MatchboxTopMTScale class.
//
#include "MatchboxTopMTScale.h"
#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
-MatchboxTopMTScale::MatchboxTopMTScale() {}
+MatchboxTopMTScale::MatchboxTopMTScale() :
+ theShowerScaleMode(1) {}
MatchboxTopMTScale::~MatchboxTopMTScale() {}
IBPtr MatchboxTopMTScale::clone() const {
return new_ptr(*this);
}
IBPtr MatchboxTopMTScale::fullclone() const {
return new_ptr(*this);
}
Energy2 MatchboxTopMTScale::renormalizationScale() const {
size_t k = 2;
int top = -1;
int antitop = -1;
while ( (top == -1 || antitop == -1) && k < mePartonData().size() ){
if ( mePartonData()[k]->id() == 6 ) {
if ( top < 0 )
top = k;
else
assert(false);
} else if ( mePartonData()[k]->id() == -6 ) {
if ( antitop < 0 )
antitop = k;
else
assert(false);
}
k++;
}
if ( top < 2 || antitop < 2 ){
throw Exception() << "MatchboxTopMTScale: Could not find a top-antitop-pair in the final state!\n"
<< Exception::runerror;
}
// cerr << " sqrt(TopMTScale) = "
// << sqrt(meMomenta()[top].mt2()+meMomenta()[antitop].mt2())/GeV
// << "\n" << flush;
return 0.5*(meMomenta()[top].mt2()+meMomenta()[antitop].mt2());
}
Energy2 MatchboxTopMTScale::factorizationScale() const {
return(renormalizationScale());
}
+
+Energy2 MatchboxTopMTScale::showerScale() const {
+
+ if ( theShowerScaleMode == 1 )
+ return factorizationScale();
+
+ else {
+ assert(theShowerScaleMode == 2);
+ size_t k = 2;
+ int top = -1;
+ int antitop = -1;
+ int emission = -1;
+
+ if ( mePartonData().size() > 5 )
+ assert(false && "MatchboxTopMTScale.cc: mePartonData().size() > 5.\n");
+
+ while ( (top == -1 || antitop == -1 || emission == -1) && k < mePartonData().size() ){
+ if ( mePartonData()[k]->id() == 6 ) {
+ if ( top < 0 )
+ top = k;
+ else
+ assert(false);
+ } else if ( mePartonData()[k]->id() == -6 ) {
+ if ( antitop < 0 )
+ antitop = k;
+ else
+ assert(false);
+ }
+ else if ( abs(mePartonData()[k]->id()) < 6 || mePartonData()[k]->id() == 21 ) {
+ if ( emission < 0 )
+ emission = k;
+ else
+ assert(false && "More than one emission in MatchboxTopMTScale.\n");
+ }
+
+ k++;
+ }
+
+ if ( top < 2 || antitop < 2 ){
+ throw Exception() << "MatchboxTopMTScale: Could not find a top-antitop-pair in the final state!\n"
+ << Exception::runerror;
+ }
+
+
+ if ( mePartonData().size() > 4 && emission < 2 ){
+ throw Exception() << "MatchboxTopMTScale: Could not find an emission in a state where mePartonData().size() > 4.\n"
+ << Exception::runerror;
+ }
+
+ if ( emission < 2 )
+ return (1./2.)*(meMomenta()[top].mt2()+meMomenta()[antitop].mt2());
+
+ else
+ return (1./3.)*(meMomenta()[top].mt2()+meMomenta()[antitop].mt2() + meMomenta()[emission].mt2());
+ }
+}
+
+
// If needed, insert default implementations of virtual function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
-void MatchboxTopMTScale::persistentOutput(PersistentOStream &) const {}
+void MatchboxTopMTScale::persistentOutput(PersistentOStream & os) const {
+ os << theShowerScaleMode;
+}
-void MatchboxTopMTScale::persistentInput(PersistentIStream &, int) {}
+void MatchboxTopMTScale::persistentInput(PersistentIStream & is, int) {
+ is >> theShowerScaleMode;
+}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass<MatchboxTopMTScale,MatchboxScaleChoice>
describeHerwigMatchboxTopMTScale("Herwig::MatchboxTopMTScale", "HwMatchboxScales.so");
void MatchboxTopMTScale::Init() {
static ClassDocumentation<MatchboxTopMTScale> documentation
("MatchboxTopMTScale implements the quadratic sum of the transverse masses of the top and antitop quark as a scale choice.");
+ static Switch<MatchboxTopMTScale, unsigned int> interfaceShowerScaleMode
+ ("ShowerScaleMode",
+ "Choose the definition of the shower hard scale.",
+ &MatchboxTopMTScale::theShowerScaleMode, 1, false, false);
+ static SwitchOption FactorizationScale
+ (interfaceShowerScaleMode,"FactorizationScale","Use the factorization scale.", 1);
+ static SwitchOption MeanMT2
+ (interfaceShowerScaleMode,"MeanMT2","Use the mean squared transverse mass of the outgoing particles.", 2);
+
}
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.h b/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopMTScale.h
@@ -1,120 +1,130 @@
// -*- C++ -*-
//
// MatchboxTopMTScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2014 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxTopMTScale_H
#define Herwig_MatchboxTopMTScale_H
//
// This is the declaration of the MatchboxTopMTScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Daniel Rauch
*
* \brief MatchboxTopMTScale implements a scale choice related to the average
* of the transverse masses of a top and antitop quark.
*
*/
class MatchboxTopMTScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxTopMTScale();
/**
* The destructor.
*/
virtual ~MatchboxTopMTScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
+ /**
+ * Return the shower hard scale.
+ */
+ virtual Energy2 showerScale() const;
+
+
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* 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;
//@}
private:
+ /**
+ * Switch to choose the definition of the shower hard scale.
+ */
+ unsigned int theShowerScaleMode;
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
MatchboxTopMTScale & operator=(const MatchboxTopMTScale &);
};
}
#endif /* Herwig_MatchboxTopMTScale_H */
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.cc b/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.cc
--- a/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.cc
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.cc
@@ -1,101 +1,175 @@
// -*- C++ -*-
//
// MatchboxTopMassScale.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2014 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the MatchboxTopMassScale class.
//
#include "MatchboxTopMassScale.h"
#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Repository/UseRandom.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "Herwig/MatrixElement/Matchbox/Base/MatchboxMEBase.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
-MatchboxTopMassScale::MatchboxTopMassScale() {}
+MatchboxTopMassScale::MatchboxTopMassScale() :
+ theShowerScaleMode(1) {}
MatchboxTopMassScale::~MatchboxTopMassScale() {}
IBPtr MatchboxTopMassScale::clone() const {
return new_ptr(*this);
}
IBPtr MatchboxTopMassScale::fullclone() const {
return new_ptr(*this);
}
Energy2 MatchboxTopMassScale::renormalizationScale() const {
size_t k = 2;
int top = -1;
int antitop = -1;
while ( (top == -1 || antitop == -1) && k < mePartonData().size() ){
if ( mePartonData()[k]->id() == 6 ) {
if ( top < 0 )
top = k;
else
assert(false);
} else if ( mePartonData()[k]->id() == -6 ) {
if ( antitop < 0 )
antitop = k;
else
assert(false);
}
k++;
}
if ( top < 2 || antitop < 2 ){
throw Exception() << "MatchboxTopMassScale: Could not find a top-antitop-pair in the final state!\n"
<< Exception::runerror;
}
// cerr << " sqrt(TopMassScale) = "
// << sqrt((meMomenta()[top]+meMomenta()[antitop]).m2())/GeV
// << "\n" << flush;
return((meMomenta()[top]+meMomenta()[antitop]).m2());
}
Energy2 MatchboxTopMassScale::factorizationScale() const {
return(renormalizationScale());
}
+
+Energy2 MatchboxTopMassScale::showerScale() const {
+
+ if ( theShowerScaleMode == 1 )
+ return factorizationScale();
+
+ else {
+ assert(theShowerScaleMode == 2);
+ size_t k = 2;
+ int top = -1;
+ int antitop = -1;
+ int emission = -1;
+
+ if ( mePartonData().size() > 5 )
+ assert(false && "MatchboxTopMassScale.cc: mePartonData().size() > 5.\n");
+
+ while ( (top == -1 || antitop == -1 || emission == -1) && k < mePartonData().size() ){
+ if ( mePartonData()[k]->id() == 6 ) {
+ if ( top < 0 )
+ top = k;
+ else
+ assert(false);
+ } else if ( mePartonData()[k]->id() == -6 ) {
+ if ( antitop < 0 )
+ antitop = k;
+ else
+ assert(false);
+ }
+ else if ( abs(mePartonData()[k]->id()) < 6 || mePartonData()[k]->id() == 21 ) {
+ if ( emission < 0 )
+ emission = k;
+ else
+ assert(false && "More than one emission in MatchboxTopMassScale.\n");
+ }
+
+ k++;
+ }
+
+ if ( top < 2 || antitop < 2 ){
+ throw Exception() << "MatchboxTopMassScale: Could not find a top-antitop-pair in the final state!\n"
+ << Exception::runerror;
+ }
+
+
+ if ( mePartonData().size() > 4 && emission < 2 ){
+ throw Exception() << "MatchboxTopMassScale: Could not find an emission in a state where mePartonData().size() > 4.\n"
+ << Exception::runerror;
+ }
+
+ if ( emission < 2 )
+ return (1./2.)*(meMomenta()[top].mt2()+meMomenta()[antitop].mt2());
+
+ else
+ return (1./3.)*(meMomenta()[top].mt2()+meMomenta()[antitop].mt2() + meMomenta()[emission].mt2());
+ }
+}
+
+
+
// If needed, insert default implementations of virtual function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
-void MatchboxTopMassScale::persistentOutput(PersistentOStream &) const {}
+void MatchboxTopMassScale::persistentOutput(PersistentOStream & os) const {
+ os << theShowerScaleMode;
+}
-void MatchboxTopMassScale::persistentInput(PersistentIStream &, int) {}
+void MatchboxTopMassScale::persistentInput(PersistentIStream & is, int) {
+ is >> theShowerScaleMode;
+}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass<MatchboxTopMassScale,MatchboxScaleChoice>
describeHerwigMatchboxTopMassScale("Herwig::MatchboxTopMassScale", "HwMatchboxScales.so");
void MatchboxTopMassScale::Init() {
static ClassDocumentation<MatchboxTopMassScale> documentation
("MatchboxTopMassScale implements invariant mass of top-antitop pair as scale choice.");
+ static Switch<MatchboxTopMassScale, unsigned int> interfaceShowerScaleMode
+ ("ShowerScaleMode",
+ "Choose the definition of the shower hard scale.",
+ &MatchboxTopMassScale::theShowerScaleMode, 1, false, false);
+ static SwitchOption FactorizationScale
+ (interfaceShowerScaleMode,"FactorizationScale","Use the factorization scale.", 1);
+ static SwitchOption MeanMT2
+ (interfaceShowerScaleMode,"MeanMT2","Use the mean squared transverse mass of the outgoing particles.", 2);
+
}
diff --git a/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.h b/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.h
--- a/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.h
+++ b/MatrixElement/Matchbox/Scales/MatchboxTopMassScale.h
@@ -1,120 +1,130 @@
// -*- C++ -*-
//
// MatchboxTopMassScale.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2014 The Herwig Collaboration
//
// Herwig is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef Herwig_MatchboxTopMassScale_H
#define Herwig_MatchboxTopMassScale_H
//
// This is the declaration of the MatchboxTopMassScale class.
//
#include "Herwig/MatrixElement/Matchbox/Utility/MatchboxScaleChoice.h"
namespace Herwig {
using namespace ThePEG;
/**
* \ingroup Matchbox
* \author Daniel Rauch
*
* \brief MatchboxTopMassScale implements a scale choice related to the invariant mass
* of the top-antitop quark pair.
*
*/
class MatchboxTopMassScale: public MatchboxScaleChoice {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
MatchboxTopMassScale();
/**
* The destructor.
*/
virtual ~MatchboxTopMassScale();
//@}
public:
/**
* Return the renormalization scale.
*/
virtual Energy2 renormalizationScale() const;
/**
* Return the factorization scale.
*/
virtual Energy2 factorizationScale() const;
+ /**
+ * Return the shower hard scale.
+ */
+ virtual Energy2 showerScale() const;
+
+
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* 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;
//@}
private:
+ /**
+ * Switch to choose the definition of the shower hard scale.
+ */
+ unsigned int theShowerScaleMode;
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
MatchboxTopMassScale & operator=(const MatchboxTopMassScale &);
};
}
#endif /* Herwig_MatchboxTopMassScale_H */

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 2:45 PM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3798567
Default Alt Text
(18 KB)

Event Timeline