Page MenuHomeHEPForge

No OneTemporary

diff --git a/Models/UED/UEDF1F1P0Vertex.cc b/Models/UED/UEDF1F1P0Vertex.cc
--- a/Models/UED/UEDF1F1P0Vertex.cc
+++ b/Models/UED/UEDF1F1P0Vertex.cc
@@ -1,115 +1,108 @@
// -*- C++ -*-
//
// UEDF1F1P0Vertex.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 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 UEDF1F1P0Vertex class.
//
#include "UEDF1F1P0Vertex.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/PDT/EnumParticles.h"
using namespace ThePEG::Helicity;
using namespace Herwig;
-UEDF1F1P0Vertex::UEDF1F1P0Vertex() : theCoupLast(0.0), theq2Last(ZERO),
- thefermLast(0), theLRLast(0.0),
- theCharges(3) {
+UEDF1F1P0Vertex::UEDF1F1P0Vertex() : coupLast_(0.0), q2Last_(ZERO),
+ fermLast_(0), LRLast_(0.0),
+ charges_(3) {
orderInGs(0);
orderInGem(1);
}
+void UEDF1F1P0Vertex::persistentOutput(PersistentOStream & os) const {
+ os << charges_;
+}
+
+void UEDF1F1P0Vertex::persistentInput(PersistentIStream & is, int) {
+ is >> charges_;
+}
+
void UEDF1F1P0Vertex::doinit() {
long photon = 22;
//quarks
for(long i = 1; i < 7; ++i) {
//left
addToList(-5100000 - i, 5100000 + i, photon);
//right
addToList(-6100000 - i, 6100000 + i, photon);
}
//leptons
for(long i = 11; i < 17; i += 2) {
//left
addToList(-5100000 - i, 5100000 + i, photon);
//right
addToList(-6100000 - i, 6100000 + i, photon);
}
FFVVertex::doinit();
tUEDBasePtr UEDBase =
dynamic_ptr_cast<tUEDBasePtr>(generator()->standardModel());
if(!UEDBase)
throw InitException() << "UEDF1F1P0Vertex::doinit() - The pointer to "
<< "the UEDBase object is null!"
<< Exception::runerror;
- theCharges[0] = UEDBase->ee();
- theCharges[1] = UEDBase->ed();
- theCharges[2] = UEDBase->eu();
+ charges_[0] = UEDBase->ee();
+ charges_[1] = UEDBase->ed();
+ charges_[2] = UEDBase->eu();
}
// The following static variable is needed for the type
// description system in ThePEG.
-DescribeNoPIOClass<UEDF1F1P0Vertex,FFVVertex>
+DescribeClass<UEDF1F1P0Vertex,FFVVertex>
describeHerwigUEDF1F1P0Vertex("Herwig::UEDF1F1P0Vertex", "HwUED.so");
void UEDF1F1P0Vertex::Init() {
static ClassDocumentation<UEDF1F1P0Vertex> documentation
("This class couples a pair of level-1 KK fermions to an SM "
"photon.");
}
-void UEDF1F1P0Vertex::setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
+void UEDF1F1P0Vertex::setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr ,
+#ifndef NDEBUG
tcPDPtr part3) {
- long iferm;
- if(part1->id() == ParticleID::gamma)
- iferm = abs(part2->id());
- else if(part2->id() == ParticleID::gamma)
- iferm = abs(part1->id());
- else if(part3->id() == ParticleID::gamma)
- iferm = abs(part1->id());
- else {
- throw HelicityLogicalError() << "UEDF1F1P0Vertex::setCoupling - There is no "
- << "photon in this vertex!"
- << Exception::warning;
- norm(0.0);
- return;
+#else
+ tcPDPtr ) {
+#endif
+ long iferm = abs(part1->id());
+ assert(part3->id()==ParticleID::gamma);
+ assert((iferm >= 5100001 && iferm <= 5100006) ||
+ (iferm >= 5100011 && iferm <= 5100016) ||
+ (iferm >= 6100001 && iferm <= 6100006) ||
+ (iferm >= 6100011 && iferm <= 6100016));
+ if(q2 != q2Last_ || coupLast_ == 0. ) {
+ q2Last_ = q2;
+ coupLast_ = -electroMagneticCoupling(q2);
}
- if((iferm >= 5100001 && iferm <= 5100006) ||
- (iferm >= 5100011 && iferm <= 5100016) ||
- (iferm >= 6100001 && iferm <= 6100006) ||
- (iferm >= 6100011 && iferm <= 6100016)) {
- if(q2 != theq2Last || theCoupLast == 0. ) {
- theq2Last = q2;
- theCoupLast = electroMagneticCoupling(q2);
- }
- norm(theCoupLast);
- if(iferm != thefermLast) {
- thefermLast = iferm;
- int smtype = (iferm > 6000000) ? iferm - 6100000 : iferm - 5100000;
- if(smtype >= 11)
- theLRLast = theCharges[0];
- else
- theLRLast = (smtype % 2 == 0) ? theCharges[2] : theCharges[1];
- }
- left(theLRLast);
- right(theLRLast);
+ norm(coupLast_);
+ if(iferm != fermLast_) {
+ fermLast_ = iferm;
+ int smtype = (iferm > 6000000) ? iferm - 6100000 : iferm - 5100000;
+ if(smtype >= 11)
+ LRLast_ = charges_[0];
+ else
+ LRLast_ = (smtype % 2 == 0) ? charges_[2] : charges_[1];
}
- else {
- throw HelicityLogicalError() << "UEDF1F1P0Vertex::setCoupling - There is an "
- << "unknown particle in this vertex " << iferm
- << Exception::warning;
- norm(0.0);
- }
+ left(LRLast_);
+ right(LRLast_);
}
diff --git a/Models/UED/UEDF1F1P0Vertex.h b/Models/UED/UEDF1F1P0Vertex.h
--- a/Models/UED/UEDF1F1P0Vertex.h
+++ b/Models/UED/UEDF1F1P0Vertex.h
@@ -1,121 +1,137 @@
// -*- C++ -*-
//
// UEDF1F1P0Vertex.h is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2017 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_UEDF1F1P0Vertex_H
#define HERWIG_UEDF1F1P0Vertex_H
//
// This is the declaration of the UEDF1F1P0Vertex class.
//
#include "ThePEG/Helicity/Vertex/Vector/FFVVertex.h"
#include "UEDBase.h"
namespace Herwig {
using namespace ThePEG;
/**
* This class implements the coupling of a pair of level-1 KK
* fermions to a standard Model photon.
*
* @see \ref UEDF1F1P0VertexInterfaces "The interfaces"
* defined for UEDF1F1P0Vertex.
*/
class UEDF1F1P0Vertex: public FFVVertex {
public:
/**
* The default constructor.
*/
UEDF1F1P0Vertex();
- /**
- * 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();
-
/** Calculate the coupling
*@param q2 The scale at which to evaluate the coupling
*@param part1 The first interacting particle
*@param part2 The second interacting particle
*@param part3 The third interacting particle
*/
virtual void setCoupling(Energy2 q2, tcPDPtr part1, tcPDPtr part2,
tcPDPtr part3);
+ /** @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 {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.
*/
virtual IBPtr fullclone() const {return new_ptr(*this);}
//@}
protected:
/** @name Standard Interfaced functions. */
//@{
/**
* Initialize this object after the setup phase before saving an
* EventGenerator to disk.
* @throws InitException if object could not be initialized properly.
*/
virtual void doinit();
//@}
private:
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
UEDF1F1P0Vertex & operator=(const UEDF1F1P0Vertex &);
private:
/**
* The value of the coupling when it was last evaluated .
*/
- Complex theCoupLast;
+ Complex coupLast_;
/**
* The scale at which the coupling was last evaluated.
*/
- Energy2 theq2Last;
+ Energy2 q2Last_;
/**
* The id of the last fermion that the vertex was evaluated for
*/
- long thefermLast;
+ long fermLast_;
/**
* The value of the left/right coupling when it was last evaluated.
*/
- Complex theLRLast;
+ Complex LRLast_;
/**
* The charges of the fermions
*/
- vector<double> theCharges;
+ vector<double> charges_;
};
}
#endif /* HERWIG_UEDF1F1P0Vertex_H */

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 3:07 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3804910
Default Alt Text
(8 KB)

Event Timeline