Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F11222465
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
36 KB
Subscribers
None
View Options
diff --git a/Shower/ShowerHandler.cc b/Shower/ShowerHandler.cc
--- a/Shower/ShowerHandler.cc
+++ b/Shower/ShowerHandler.cc
@@ -1,209 +1,207 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ShowerHandler class.
//
#include "ShowerHandler.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Handlers/XComb.h"
#include "ThePEG/Utilities/Timer.h"
#include "Evolver.h"
#include "Herwig++/Shower/Kinematics/ShowerParticle.h"
#include <cassert>
#ifdef ThePEG_TEMPLATES_IN_CC_FILE
// #include "ShowerHandler.tcc"
#endif
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ShowerTree.h"
using namespace Herwig;
void ShowerHandler::persistentOutput(PersistentOStream & os) const {
os << _evolver << _maxtry;
}
void ShowerHandler::persistentInput(PersistentIStream & is, int) {
is >> _evolver >> _maxtry;
}
ClassDescription<ShowerHandler> ShowerHandler::initShowerHandler;
// Definition of the static class description member.
void ShowerHandler::Init() {
static ClassDocumentation<ShowerHandler> documentation
("Main driver class for the showering.");
static Reference<ShowerHandler,Evolver>
interfaceEvolver("Evolver",
"A reference to the Evolver object",
&Herwig::ShowerHandler::_evolver,
false, false, true, false);
static Parameter<ShowerHandler,unsigned int> interfaceMaxTry
("MaxTry",
"The maximum number of attempts for the main showering loop",
&ShowerHandler::_maxtry, 10, 1, 100,
false, false, Interface::limited);
}
void ShowerHandler::fillEventRecord()
{
// create a new step
StepPtr pstep = eventHandler()->newStep();
if(_done.empty()) throw Exception() << "Must have some showers to insert in "
<< "ShowerHandler::fillEventRecord()"
<< Exception::runerror;
if(!_done[0]->isHard()) throw Exception() << "Must start filling with hard process"
<< " in ShowerHandler::fillEventRecord()"
<< Exception::runerror;
// insert the steps
for(unsigned int ix=0;ix<_done.size();++ix)
{
- // cerr << *eventHandler()->currentEvent() << endl;
_done[ix]->fillEventRecord(pstep,
_evolver->isISRadiationON(),
_evolver->isFSRadiationON());
}
- // cerr << *eventHandler()->currentEvent() << endl;
}
void ShowerHandler::findShoweringParticles()
{
Timer<1001> timer("ShowerHandler::findShoweringParticles");
// clear the storage
_hard=ShowerTreePtr();
_decay.clear();
_done.clear();
// temporary storage of the particles
set<PPtr> hardParticles;
// outgoing particles from the hard process
ParticleVector outgoing=eventHandler()->currentCollision()->
primarySubProcess()->outgoing();
set<PPtr> outgoingset(outgoing.begin(),outgoing.end());
// loop over the tagged particles
tParticleVector::const_iterator taggedP = tagged().begin();
for (;taggedP != tagged().end(); ++taggedP) {
// if a remnant don't consider
if(eventHandler()->currentCollision()->isRemnant(*taggedP))
continue;
// find the parent and if colourless s-channel resonance
bool isDecayProd=false;
tPPtr parent;
if(!(*taggedP)->parents().empty())
{
parent = (*taggedP)->parents()[0];
// check if from s channel decaying colourless particle
// (must be same as in findParent)
isDecayProd = !parent->dataPtr()->coloured() && parent->momentum().m2()>0.;
}
// add to list of outgoing hard particles if needed
if(outgoingset.find(*taggedP) != outgoingset.end())
{
if(isDecayProd) hardParticles.insert(findParent(parent));
else hardParticles.insert(*taggedP);
}
else
{throw Exception() << "Starting on decay not yet implemented in "
<< "ShowerHandler::findShoweringParticles()"
<< Exception::runerror;}
}
// there must be something to shower
if(hardParticles.empty())
throw Exception() << "No particles to shower in "
<< "ShowerHandler::fillShoweringParticles"
<< Exception::eventerror;
// create the hard process ShowerTree
ParticleVector out(hardParticles.begin(),hardParticles.end());
_hard=new_ptr(ShowerTree(eventHandler(),out,_evolver->showerVariables(),
_decay));
_hard->setParents();
}
void ShowerHandler::cascade()
{
Timer<1002> timer("ShowerHandler::cascade");
// should we be doing anything
if(!_evolver->showeringON()) return;
// start of the try block for the whole showering process
unsigned int countFailures=0;
ShowerTreePtr hard;
vector<ShowerTreePtr> decay;
while (countFailures<_maxtry) {
try
{
// set the gluon mass to be used in the reconstruction
_evolver->showerVariables()->setGluonMass(false);
// find the particles in the hard process and the decayed particles to shower
findShoweringParticles();
// check if a hard process or decay
bool isHard = _hard;
// find the stopping scale for the shower if multi-scale shower is on
Energy largestWidth = Energy();
if(_evolver->showerVariables()->isMultiScaleShowerON()&&!_decay.empty())
{
largestWidth=(*_decay.rbegin()).first;
if(largestWidth<
_evolver->showerVariables()->globalParameters()->hadronizationScale())
largestWidth = Energy();
}
// if a hard process perform the shower for the hard process
if(isHard)
{
_evolver->showerHardProcess(_hard);
_done.push_back(_hard);
}
// if no decaying particles to shower break out of the loop
if(_decay.empty()) break;
// if no hard process
if(!isHard)
throw Exception() << "Shower starting with a decay is not yet implemented"
<< Exception::runerror;
// shower the decay products
while(!_decay.empty())
{
multimap<Energy,ShowerTreePtr>::iterator dit=--_decay.end();
while(!dit->second->parent()->hasShowered() && dit!=_decay.begin())
--dit;
// get the particle and the width
ShowerTreePtr decayingTree = dit->second;
// Energy largestWidthDecayingSystem=(*_decay.rbegin()).first;
// remove it from the multimap
_decay.erase(dit);
// make sure the particle has been decayed
decayingTree->decay(_decay,eventHandler());
// now shower the decay
_evolver->showerDecay(decayingTree);
_done.push_back(decayingTree);
}
// suceeded break out of the loop
break;
}
catch (Veto)
{
throw Exception() << "Problem with throwing Veto in ShowerHandler at the moment"
<< Exception::eventerror;
++countFailures;
}
}
// if loop exited because of too many tries, throw event away
if (countFailures >= _maxtry) {
throw Exception() << "Too many tries for main while loop "
<< "in ShowerHandler::cascade()."
<< Exception::eventerror;
}
//enter the particles in the event record
fillEventRecord();
// remake the remnants (needs to be after the colours are sorted
// out in the insertion into the event record)
_evolver->makeRemnants(_hard);
}
diff --git a/Shower/ShowerVariables.cc b/Shower/ShowerVariables.cc
--- a/Shower/ShowerVariables.cc
+++ b/Shower/ShowerVariables.cc
@@ -1,203 +1,239 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the ShowerVariables class.
//
#include "ShowerVariables.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/ParVector.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/Switch.h"
#ifdef ThePEG_TEMPLATES_IN_CC_FILE
// #include "ShowerVariables.tcc"
#endif
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
const Energy ShowerVariables::HUGEMASS = 1.0e+20 * GeV; // more then the Plank scale!
ShowerVariables::ShowerVariables() :
_multiScaleShowerMode(1),
_cutoffQCDMassScale( 1.0*GeV ),
_cutoffQEDMassScale( 0.51*MeV ),
_cutoffEWKMassScale( 91.0*GeV ),
_kinCutoffScale( .75*GeV ),
_meCorrMode(1),
_qqgPSMode(0),
_stopShowerAtMassScale( Energy() ),
_vetoAbovePtScale( HUGEMASS ),
_vetoBelowPtScale( Energy() ),
_a(0.3), _b(2.3), _c(0.3*GeV),
_initialenhance(1.),_finalenhance(1.),
_decay_shower_partition(0),
_use_me_for_t2(false)
{
_inputparticlesDecayInShower.push_back( 6 ); // top
_inputparticlesDecayInShower.push_back( 1000001 ); // SUSY_d_L
_inputparticlesDecayInShower.push_back( 1000002 ); // SUSY_u_L
_inputparticlesDecayInShower.push_back( 1000003 ); // SUSY_s_L
_inputparticlesDecayInShower.push_back( 1000004 ); // SUSY_c_L
_inputparticlesDecayInShower.push_back( 1000005 ); // SUSY_b_1
_inputparticlesDecayInShower.push_back( 1000006 ); // SUSY_t_1
_inputparticlesDecayInShower.push_back( 1000011 ); // SUSY_e_Lminus
_inputparticlesDecayInShower.push_back( 1000012 ); // SUSY_nu_eL
_inputparticlesDecayInShower.push_back( 1000013 ); // SUSY_mu_Lminus
_inputparticlesDecayInShower.push_back( 1000014 ); // SUSY_nu_muL
_inputparticlesDecayInShower.push_back( 1000015 ); // SUSY_tau_1minus
_inputparticlesDecayInShower.push_back( 1000016 ); // SUSY_nu_tauL
_inputparticlesDecayInShower.push_back( 1000021 ); // SUSY_g
_inputparticlesDecayInShower.push_back( 1000022 ); // SUSY_chi_10
_inputparticlesDecayInShower.push_back( 1000023 ); // SUSY_chi_20
_inputparticlesDecayInShower.push_back( 1000024 ); // SUSY_chi_1plus
_inputparticlesDecayInShower.push_back( 1000025 ); // SUSY_chi_30
_inputparticlesDecayInShower.push_back( 1000035 ); // SUSY_chi_40
_inputparticlesDecayInShower.push_back( 1000037 ); // SUSY_chi_2plus
_inputparticlesDecayInShower.push_back( 1000039 ); // SUSY_gravitino
_inputparticlesDecayInShower.push_back( 2000001 ); // SUSY_d_R
_inputparticlesDecayInShower.push_back( 2000002 ); // SUSY_u_R
_inputparticlesDecayInShower.push_back( 2000003 ); // SUSY_s_R
_inputparticlesDecayInShower.push_back( 2000004 ); // SUSY_c_R
_inputparticlesDecayInShower.push_back( 2000005 ); // SUSY_b_2
_inputparticlesDecayInShower.push_back( 2000006 ); // SUSY_t_2
_inputparticlesDecayInShower.push_back( 2000011 ); // SUSY_e_Rminus
_inputparticlesDecayInShower.push_back( 2000012 ); // SUSY_nu_eR
_inputparticlesDecayInShower.push_back( 2000013 ); // SUSY_mu_Rminus
_inputparticlesDecayInShower.push_back( 2000014 ); // SUSY_nu_muR
_inputparticlesDecayInShower.push_back( 2000015 ); // SUSY_tau_2minus
_inputparticlesDecayInShower.push_back( 2000016 ); // SUSY_nu_tauR
}
void ShowerVariables::persistentOutput(PersistentOStream & os) const {
os << _multiScaleShowerMode
<< _cutoffQCDMassScale
<< _cutoffQEDMassScale
<< _cutoffEWKMassScale
<< _kinCutoffScale
<< _meCorrMode
<< _qqgPSMode
<< _inputparticlesDecayInShower
<< _particlesDecayInShower << _a << _b << _c
- << _globalParameters;
+ << _globalParameters
+ << _decay_shower_partition << _use_me_for_t2;
}
void ShowerVariables::persistentInput(PersistentIStream & is, int) {
is >> _multiScaleShowerMode
>> _cutoffQCDMassScale
>> _cutoffQEDMassScale
>> _cutoffEWKMassScale
>> _kinCutoffScale
>> _meCorrMode
>> _qqgPSMode
>> _inputparticlesDecayInShower
>> _particlesDecayInShower >> _a >> _b >> _c
- >> _globalParameters;
+ >> _globalParameters
+ >> _decay_shower_partition >> _use_me_for_t2;
}
ClassDescription<ShowerVariables> ShowerVariables::initShowerVariables;
// Definition of the static class description member.
void ShowerVariables::Init() {
static ClassDocumentation<ShowerVariables> documentation
("This class is responsible for keeping all of the constraints on the showering.");
static Switch<ShowerVariables, int> interfaceMultiScaleShowerMode
("OnOffMultiScaleShowerMode",
"Choice of the multi-scale shower mode",
&ShowerVariables::_multiScaleShowerMode, 1, false, false);
static SwitchOption interfaceMultiScaleShowerMode0
(interfaceMultiScaleShowerMode,"MultiScaleShower-OFF",
"multi-scale shower is OFF", 0);
static SwitchOption interfaceMultiScaleShowerMode1
(interfaceMultiScaleShowerMode,"MultiScaleShower-ON",
"multi-scale shower is ON", 1);
static Switch<ShowerVariables, int> ifaceMECorrMode
("MECorrMode",
"Choice of the ME Correction Mode",
&ShowerVariables::_meCorrMode, 1, false, false);
static SwitchOption off
(ifaceMECorrMode,"MEC-off","MECorrections off", 0);
static SwitchOption on
(ifaceMECorrMode,"MEC-on","hard+soft on", 1);
static SwitchOption hard
(ifaceMECorrMode,"MEC-hard","only hard on", 2);
static SwitchOption soft
(ifaceMECorrMode,"MEC-soft","only soft on", 3);
static Switch<ShowerVariables, int> ifaceqqgPSMode
("qqgPSMode",
"Choice of initial conditions, tested for qqg only",
&ShowerVariables::_qqgPSMode, 0, false, false);
static SwitchOption symm
(ifaceqqgPSMode,"PS-symm",
"most symmetric choice of initial conditions (default)", 0);
static SwitchOption asy
(ifaceqqgPSMode,"PS-asy",
"most asymmetric choice of initial conditions, quark larger Q0", 1);
static SwitchOption rnd
(ifaceqqgPSMode,"PS-rnd",
"asymmetric, large Q0 assigned randomly", 2);
static Parameter<ShowerVariables,Energy>
interfaceCutoffQCD ("CutoffQCDMassScale",
"low energy cutoff mass scale for QCD radiation (unit [GeV])",
&ShowerVariables::_cutoffQCDMassScale, GeV,
0.0*GeV, 0.0*GeV, 10.0*GeV,false,false,false);
static Parameter<ShowerVariables,Energy>
interfaceCutoffQED ("CutoffQEDMassScale",
"low energy cutoff mass scale for QED radiation (unit [GeV])",
&ShowerVariables::_cutoffQEDMassScale, GeV,
0.0005*GeV, 0.0*GeV, 10.0*GeV,false,false,false);
static Parameter<ShowerVariables,Energy>
interfaceCutoffEWK ("CutoffEWKMassScale",
"low energy cutoff mass scale for EWK radiation (unit [GeV])",
&ShowerVariables::_cutoffEWKMassScale, GeV,
91.0*GeV, 0.0*GeV, 1000.0*GeV,false,false,false);
static Parameter<ShowerVariables,Energy>
interfaceKinScale ("cutoffKinScale",
"kinematic cutoff scale for the parton shower phase"
" space (unit [GeV])",
&ShowerVariables::_kinCutoffScale, GeV,
0.75*GeV, 0.001*GeV, 10.0*GeV,false,false,false);
static Parameter<ShowerVariables,double> interfaceaParameter
("aParameter",
"The a parameter for the kinematic cut-off",
&ShowerVariables::_a, 0.3, -10.0, 10.0,
false, false, Interface::limited);
static Parameter<ShowerVariables,double> interfacebParameter
("bParameter",
"The b parameter for the kinematic cut-off",
&ShowerVariables::_b, 2.3, -10.0, 10.0,
false, false, Interface::limited);
static Parameter<ShowerVariables,Energy> interfacecParameter
("cParameter",
"The c parameter for the kinematic cut-off",
&ShowerVariables::_c, GeV, 0.3*GeV, 0.1*GeV, 10.0*GeV,
false, false, Interface::limited);
static Reference<ShowerVariables,GlobalParameters> interfaceGlobalParameters
("GlobalParameters",
"Pointer to the GlobalParameters object",
&ShowerVariables::_globalParameters, false, false, true, false, false);
static ParVector<ShowerVariables,long> interfaceDecayInShower
("DecayInShower",
"PDG codes of the particles to be decayed in the shower",
&ShowerVariables::_inputparticlesDecayInShower, -1, 0l, -10000000l, 10000000l,
false, false, Interface::limited);
+ static Switch<ShowerVariables,unsigned int> interfaceDecayShowerPartition
+ ("DecayShowerPartition",
+ "The choice of the limits on the evolution scale for the decay shower.",
+ &ShowerVariables::_decay_shower_partition, 0, false, false);
+ static SwitchOption interfaceDecayShowerPartitionSymmetric
+ (interfaceDecayShowerPartition,
+ "Symmetric",
+ "The symmetric choice",
+ 0);
+ static SwitchOption interfaceDecayShowerPartitionMaximal
+ (interfaceDecayShowerPartition,
+ "Maximal",
+ "Maximum radiation from the outgoing particle",
+ 1);
+ static SwitchOption interfaceDecayShowerPartitionSmooth
+ (interfaceDecayShowerPartition,
+ "Smooth",
+ "Smooth matching in the soft limit",
+ 2);
+
+ static Switch<ShowerVariables,bool> interfaceUseMEForT2
+ ("UseMEForT2",
+ "Use the matrix element correction, if available to fill the T2 region for the decay shower and don't fill using the shower",
+ &ShowerVariables::_use_me_for_t2, false, false, false);
+ static SwitchOption interfaceUseMEForT2Shower
+ (interfaceUseMEForT2,
+ "Shower",
+ "Use the shower to fill the region",
+ false);
+ static SwitchOption interfaceUseMEForT2ME
+ (interfaceUseMEForT2,
+ "ME",
+ "Use the Matrix element to fill the region",
+ true);
}
diff --git a/Shower/ShowerVariables.h b/Shower/ShowerVariables.h
--- a/Shower/ShowerVariables.h
+++ b/Shower/ShowerVariables.h
@@ -1,543 +1,532 @@
// -*- C++ -*-
#ifndef HERWIG_ShowerVariables_H
#define HERWIG_ShowerVariables_H
//
// This is the declaration of the ShowerVariables class.
//
#include "ThePEG/Interface/Interfaced.h"
#include "Herwig++/Utilities/GlobalParameters.h"
#include "ShowerConfig.h"
#include "Couplings/ShowerIndex.h"
#include "ShowerVariables.fh"
#include "ThePEG/PDF/BeamParticleData.h"
namespace Herwig {
using namespace ThePEG;
/** \ingroup Shower
*
* This class is responsible for keeping all the constraint information
* on the shower evolution. In particular, it has the scale value at
* which to stop the shower. Here "scale" can be either the mass scale or the
* \f$\tilde{q}\f$ (ordering variable) scale:
* this class is also responsible for the
* conversion between these two different scale definitions.
*
* Furthermore, this class can also have a veto for emission above a certain
* \f$p_T\f$ scale, or a veto for emission below a certain \f$p_T\f$ scale,
* where \f$p_T\f$ is the "resolution" variable.
*
* The ShowerHandler by default will decay all the unstable particles
* specified in the relevant interfacing during the shower however the
* treatment of the shower from these particles can be either using
* a multi-scale approach of not depending on the switch setting
*
* Finally, this class has also three parameters to set the low energy
* cutoff mass scales for respectively QCD, QED, EWK radiation.
* The class provides also set/access to the upper scale for all
* interaction types and events: it is supposed to be set, at
* initialization time, by some other class, to the center of mass
* energy of the beam-beam interaction, and used as upper scale value
* for the numerically evaluation of Sudakov form factors.
*
* @see ShowerIndex
*
* @see \ref ShowerVariablesInterfaces "The interfaces"
* defined for ShowerVariables.
*/
class ShowerVariables: public Interfaced {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
inline ShowerVariables();
//@}
public:
/**
* Access to the various switches
*/
//@{
/**
* Access the multi-scale showering mode switch: <em>0 (OFF), 1 (ON).</em>
* By choosing <em>0 (OFF)</em>, one gets a similar behaviour to
* Fortran Herwig, in which the showering is done in one go,
* from the starting scale to the cutoff.
* The default for Herwig++ is <em>1 (ON)</em>: multi-scale showering.
*/
inline int isMultiScaleShowerON() const;
/**
* It returns true if the particle with the specified id
* is in the list of those that should be decayed during the showering
* showering.
*/
inline bool decayInShower(const long id) const;
/**
* It returns the low energy cutoff <em>mass </em> scale for the
* interaction type specified in input.
*/
Energy cutoffMassScale(const ShowerIndex::InteractionType interaction) const;
/**
* It returns the low energy cutoff \f$\tilde{q}\f$ scale for the
* interaction type specified in input.
*/
Energy cutoffQScale(const ShowerIndex::InteractionType interaction) const;
/**
* Specifies the kinematic cutoff used in the parton shower phase space.
*/
inline Energy kinScale() const;
//@}
/**
* Conversion between the scales.
*/
//@{
/**
* Conversion between <em>mass</em> and \f$\tilde{q}\f$ scale.
*/
inline Energy convertMassScaleToQScale(const Energy inputMassScale) const;
/**
* Conversion between \f$\tilde{q}\f$ and <em>mass</em> scale.
*/
inline Energy convertQScaleToMassScale(const Energy inputQScale) const;
//@}
/**
* Access/set the PDF and beam particle for the current initial-state shower
*/
//@{
/**
* Get the PDF
*/
inline tcPDFPtr currentPDF() const;
/**
* Set the PDF
*/
inline void setCurrentPDF(tcPDFPtr);
/**
* Get the beam particle data
*/
inline Ptr<BeamParticleData>::const_pointer beamParticle() const;
/**
* Set the beam particle data
*/
inline void setBeamParticle(Ptr<BeamParticleData>::const_pointer);
//@}
/**
* Switches for matrix element corrections
*/
//@{
/**
* Any ME correction?
*/
inline bool MECOn() const;
/**
* Any hard ME correction?
*/
inline bool hardMEC() const;
/**
* Any soft ME correction?
*/
inline bool softMEC() const;
/**
* Assign asymmetric initial condition to parton shower, random or
* not? If not random, then quark gets larger initial scale.
*/
inline bool asyPS() const;
/**
* Asymmetric parton shower phase space, random choice for jet with
* large initial scale?
*/
inline bool rndPS() const;
//@}
/**
* The virtuality cut-off on the gluon \f$Q_g=\frac{\delta-am_q}{b}\f$
* @param scale The scale \f$\delta\f$
* @param mq The quark mass \f$m_q\f$.
*/
inline Energy kinematicCutOff(Energy scale, Energy mq) const;
/**
* Set/Get the gluon mass which should be used in the reconstruction
*/
//@{
/**
* Get the mass
*/
inline Energy gluonMass() const;
/**
* Set the mass
*/
inline void gluonMass(Energy);
//@}
/**
* Get the GlobalParameters
*/
inline GlobalParametersPtr globalParameters() const;
/**
* Set the gluon mass
* @param final If final is true gluon mass will be set to
* 0 or the effective mass depending on the choice of hadronisation model.
* otherwise if the multi-scale shower is on the mass will be set to zero
*/
inline void setGluonMass(bool final);
/**
* Enhancement factors for radiation needed to generate the soft matrix element
* correction.
*/
//@{
/**
* Access the enhancement factor for initial-state radiation
*/
inline double initialStateRadiationEnhancementFactor() const;
/**
* Access the enhancement factor for final-state radiation
*/
inline double finalStateRadiationEnhancementFactor() const;
/**
* Set the enhancement factor for initial-state radiation
*/
inline void initialStateRadiationEnhancementFactor(double);
/**
* Set the enhancement factor for final-state radiation
*/
inline void finalStateRadiationEnhancementFactor(double);
//@}
/**
* Access functions for the type of shower phase space partition.
* These set/return the whether the so-called 'symmetric'/'maximal'
* /'smooth' choice was used (see _decay_shower_partition below).
* Also we have a similar function which returns whether the T2
* region is to be populated by the ME correction or the shower from
* the decaying particle.
*/
//@{
/**
* Access the option which determines the type of phase space partitioning
* for the decay_shower.
*/
inline unsigned int decay_shower_partition() const;
/**
- * Access the option which determines the type of phase space partitioning
- * for the decay_shower.
- */
- inline void decay_shower_partition(unsigned int);
-
- /**
* Access the option denoting whether the T2 region of the decay phase
* space is populated by the shower (default, false) or the ME correction.
*/
inline bool use_me_for_t2();
- /**
- * Set the option denoting whether the T2 region of the decay phase
- * space is populated by the shower (default, false) or the ME correction.
- */
- inline void use_me_for_t2(bool);
-
//@}
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();
public:
/**
* Use to initialize some scales.
*/
static const Energy HUGEMASS;
protected:
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline 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.
*/
inline virtual IBPtr fullclone() const;
//@}
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.
*/
inline virtual void doinit() throw(InitException);
//@}
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<ShowerVariables> initShowerVariables;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
ShowerVariables & operator=(const ShowerVariables &);
private:
/**
* The switch for on/off multi-scale shower
*/
int _multiScaleShowerMode;
/**
* Low-energy cutoff mass scale for QCD radiation
*/
Energy _cutoffQCDMassScale;
/**
* Low-energy cutoff mass scale for QED radiation
*/
Energy _cutoffQEDMassScale;
/**
* Low-energy cutoff mass scale for EWK radiation
*/
Energy _cutoffEWKMassScale;
/**
* Kinematic cutoff used in the parton shower phase space.
*/
Energy _kinCutoffScale;
/**
* Matrix element correction switch
*/
int _meCorrMode;
/**
* Initial conditions for the shower
*/
int _qqgPSMode;
/**
* Mass cut-off for the shower
*/
Energy _stopShowerAtMassScale;
/**
* Veto emissions above this \f$p_T\f$ scale.
*/
Energy _vetoAbovePtScale;
/**
* Veto emissions below this \f$p_T\f$ scale.
*/
Energy _vetoBelowPtScale;
/**
* PDG codes of the particles which decay during showering
* this is fast storage for use during running
*/
set<long> _particlesDecayInShower;
/**
* PDG codes of the particles which decay during showering
* this is a vector that is interfaced so they can be changed
*/
vector<long> _inputparticlesDecayInShower;
//@{
/**
* The PDF being used for the current initial-state shower
*/
tcPDFPtr _pdf;
/**
* The beam particle data for the current initial-state shower
*/
Ptr<BeamParticleData>::const_pointer _beam;
//@}
/**
* Parameters for the \f$Q_g=\max(\frac{\delta-am_q}{b},c)\f$ kinematic cut-off
*/
//@{
/**
* The \f$a\f$ parameter
*/
double _a;
/**
* The \f$b\f$ parameter
*/
double _b;
/**
* The \f$c\f$ parameter
*/
Energy _c;
//@}
/**
* The gluon mass
*/
Energy _gluonMass;
/**
* The global variables
*/
GlobalParametersPtr _globalParameters;
/**
* Radiation enhancement factors for use with the veto algorithm
* if needed by the soft matrix element correction
*/
//@{
/**
* Enhancement factor for initial-state radiation
*/
double _initialenhance;
/**
* Enhancement factor for final-state radiation
*/
double _finalenhance;
//@}
/**
* The following variables relate to the decay shower and
* its associated ME corrections.
*/
/**
* Here we hold the option which determines the type of phase space
* partitioning to do for the decay shower. Depending on the value
* of the option PartnerFinder will set different bounds on the starting
* $\tilde{q}$ values for the showers of the decaying particle and its
* charged child. This is done according to the top decay colour
* connection calculation in JHEP12(2003)_045. The options act as follows:
* 0: This is the default 'symmetric' choice which more or less divides
* the phase space evenly between the parent and its charged child.
* 1: This 'maximal' choice maximises the phase space available for
* gluons emitted from the charged child.
* 2: This (experimental) 'smooth' choice does not suffer from
* a discontinuity at the boundary between the region populated by
* emissions from the charged child and the region populated by emissions
* from the parent. This does, however, mean that the phase space
* available for emissions from the charged child is fairly minimal.
*/
unsigned int _decay_shower_partition;
+
/**
* This flag determines whether the T2 region in the decay shower
* (JHEP12(2003)_045) is populated by the ME correction (true) or
* the shower from the decaying particle.
*/
bool _use_me_for_t2;
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of ShowerVariables. */
template <>
struct BaseClassTrait<Herwig::ShowerVariables,1> {
/** Typedef of the first base class of ShowerVariables. */
typedef Interfaced NthBase;
};
/** This template specialization informs ThePEG about the name of
* the ShowerVariables class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::ShowerVariables>
: public ClassTraitsBase<Herwig::ShowerVariables> {
/** Return a platform-independent class name */
static string className() { return "Herwig++::ShowerVariables"; }
/**
* The name of a file containing the dynamic library where the class
* ShowerVariables is implemented. It may also include several, space-separated,
* libraries if the class ShowerVariables 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 "HwNewShower.so"; }
};
/** @endcond */
}
#include "ShowerVariables.icc"
#ifndef ThePEG_TEMPLATES_IN_CC_FILE
// #include "ShowerVariables.tcc"
#endif
#endif /* HERWIG_ShowerVariables_H */
diff --git a/Shower/ShowerVariables.icc b/Shower/ShowerVariables.icc
--- a/Shower/ShowerVariables.icc
+++ b/Shower/ShowerVariables.icc
@@ -1,160 +1,154 @@
// -*- C++ -*-
//
// This is the implementation of the inlined member functions of
// the ShowerVariables class.
//
namespace Herwig {
inline IBPtr ShowerVariables::clone() const {
return new_ptr(*this);
}
inline IBPtr ShowerVariables::fullclone() const {
return new_ptr(*this);
}
inline int ShowerVariables::isMultiScaleShowerON() const {
return _multiScaleShowerMode;
}
inline Energy ShowerVariables::
cutoffMassScale(const ShowerIndex::InteractionType interaction) const {
Energy cutoff = Energy();
switch ( interaction ) {
case ShowerIndex::QCD : cutoff = _cutoffQCDMassScale; break;
case ShowerIndex::QED : cutoff = _cutoffQEDMassScale; break;
case ShowerIndex::EWK : cutoff = _cutoffEWKMassScale; break;
default: throw Exception() << "Invalid ShowerIndex in "
<< "ShowerVariables::cutoffMassScale()"
<< Exception::abortnow;
}
return cutoff;
}
inline Energy ShowerVariables::
cutoffQScale(const ShowerIndex::InteractionType interaction) const {
return convertMassScaleToQScale( cutoffMassScale( interaction ) );
}
inline void ShowerVariables::doinit() throw(InitException) {
Interfaced::doinit();
// copy particles to decay before showering from input vector to the
// set used in the simulation
_particlesDecayInShower.insert(_inputparticlesDecayInShower.begin(),
_inputparticlesDecayInShower.end());
}
inline bool ShowerVariables::decayInShower(const long id) const {
return ( _particlesDecayInShower.find( abs(id) ) !=
_particlesDecayInShower.end() );
}
inline Energy ShowerVariables::convertMassScaleToQScale(const Energy inputMassScale) const {
// ***LOOKHERE***: convert on the fly: Mass Scale -> Q Scale
return inputMassScale * 1.0; // To be changed
}
inline Energy ShowerVariables::convertQScaleToMassScale(const Energy inputQScale) const {
// ***LOOKHERE***: convert on the fly: Q scale -> Mass scale
return inputQScale * 1.0; // To be changed
}
inline Energy ShowerVariables::kinScale() const {
return _kinCutoffScale;
}
inline bool ShowerVariables::MECOn() const {
return _meCorrMode > 0;
}
inline bool ShowerVariables::hardMEC() const {
return (_meCorrMode == 1 || _meCorrMode == 2);
}
inline bool ShowerVariables::softMEC() const {
return (_meCorrMode == 1 || _meCorrMode > 2);
}
inline bool ShowerVariables::asyPS() const {
return (_qqgPSMode > 0);
}
inline bool ShowerVariables::rndPS() const {
return (_qqgPSMode == 2);
}
inline tcPDFPtr ShowerVariables::currentPDF() const {
return _pdf;
}
inline void ShowerVariables::setCurrentPDF(tcPDFPtr in) {
_pdf=in;
}
inline Ptr<BeamParticleData>::const_pointer
ShowerVariables::beamParticle() const {
return _beam;
}
inline void
ShowerVariables::setBeamParticle(Ptr<BeamParticleData>::const_pointer in) {
_beam=in;
}
inline Energy ShowerVariables::kinematicCutOff(Energy scale,Energy mq) const {
return max((scale -_a*mq)/_b,_c);
}
inline Energy ShowerVariables::gluonMass() const {return _gluonMass;}
inline void ShowerVariables::gluonMass(Energy in){_gluonMass=in;}
inline GlobalParametersPtr ShowerVariables::globalParameters() const
{return _globalParameters;}
inline void ShowerVariables::setGluonMass(bool final)
{
if(final)
{
if(_globalParameters->isThePEGStringFragmentationON())
_gluonMass=0.;
else
_gluonMass=_globalParameters->effectiveGluonMass();
}
else
{
// set the gluon mass to be used in the reconstruction
if(_globalParameters->isThePEGStringFragmentationON()||
isMultiScaleShowerON())
_gluonMass=0.;
else
_gluonMass=_globalParameters->effectiveGluonMass();
}
}
inline double ShowerVariables::initialStateRadiationEnhancementFactor() const
{return _initialenhance;}
inline double ShowerVariables::finalStateRadiationEnhancementFactor() const
{return _finalenhance;}
inline void ShowerVariables::initialStateRadiationEnhancementFactor(double in)
{_initialenhance=in;}
inline void ShowerVariables::finalStateRadiationEnhancementFactor(double in)
{_finalenhance=in;}
inline unsigned int ShowerVariables::decay_shower_partition() const
{return _decay_shower_partition;}
-inline void ShowerVariables::decay_shower_partition(unsigned int in)
-{_decay_shower_partition=in;}
-
inline bool ShowerVariables::use_me_for_t2()
{return _use_me_for_t2;}
-inline void ShowerVariables::use_me_for_t2(bool in)
-{_use_me_for_t2=in;}
-
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, May 14, 11:56 AM (1 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5111566
Default Alt Text
(36 KB)
Attached To
rHERWIGHG herwighg
Event Timeline
Log In to Comment