herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
PartnerFinder.h
1// -*- C++ -*-
2//
3// PartnerFinder.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4// Copyright (C) 2002-2019 The Herwig Collaboration
5//
6// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef HERWIG_PartnerFinder_H
10#define HERWIG_PartnerFinder_H
11//
12// This is the declaration of the PartnerFinder class.
13//
14#include "Herwig/Shower/QTilde/ShowerConfig.h"
15#include "ThePEG/Interface/Interfaced.h"
16#include "PartnerFinder.fh"
17
18namespace Herwig {
19
20using namespace ThePEG;
21
25typedef pair<tShowerParticlePtr,tShowerParticlePtr> ShowerPPair;
26
46
47public:
48
53
77 virtual void setInitialEvolutionScales(const ShowerParticleVector &particles,
78 const bool isDecayCase,
80 const bool setPartners=true);
82protected:
83
90 virtual IBPtr clone() const {return new_ptr(*this);}
91
96 virtual IBPtr fullclone() const {return new_ptr(*this);}
98
99
100public:
101
109
115 void persistentInput(PersistentIStream & is, int version);
117
124 static void Init();
125
126protected:
127
136 const bool isDecayCase,
137 const bool setPartners=true);
138
143 const bool isDecayCase,
144 const bool setPartners=true);
145
150 const bool isDecayCase,
151 const bool setPartners=true);
153
159 vector< pair<ShowerPartnerType, tShowerParticlePtr> >
160 findQCDPartners(tShowerParticlePtr particle, const ShowerParticleVector &particles);
161
167 vector< pair<double, tShowerParticlePtr> >
168 findQEDPartners(tShowerParticlePtr particle, const ShowerParticleVector &particles,
169 const bool isDecayCase);
170
171public:
177 vector< pair<double, tShowerParticlePtr> >
178 findEWPartners(tShowerParticlePtr particle, const ShowerParticleVector &particles,
179 const bool isDecayCase);
180
193 pair<Energy,Energy> calculateInitialEvolutionScales(const ShowerPPair &,
194 const bool isDecayCase, int key=0);
195
199 pair<Energy,Energy> calculateFinalFinalScales(const Lorentz5Momentum & p1,
200 const Lorentz5Momentum & p2, int key=0);
201
205 pair<Energy,Energy> calculateInitialInitialScales(const Lorentz5Momentum& p1,
206 const Lorentz5Momentum& p2);
207
211 pair<Energy,Energy> calculateInitialFinalScales(const Lorentz5Momentum& pb, const Lorentz5Momentum& pc,
212 const bool isDecayCase);
213
214
216
217protected:
218
223 long id = abs(pd->id());
224 return ( id==ParticleID::Wplus || id ==ParticleID::Z0 || (id>=1 && id<=6 ) || (id>=11 && id<=16));
225 }
226
227private:
228
234
235private:
236
241
246
251
252};
253
254}
255
256#endif /* HERWIG_PartnerFinder_H */
This class is responsible of two related tasks:
Definition: PartnerFinder.h:45
pair< Energy, Energy > calculateInitialInitialScales(const Lorentz5Momentum &p1, const Lorentz5Momentum &p2)
Calculate the initial evolution scales given momenta.
virtual void setInitialEWEvolutionScales(const ShowerParticleVector &particles, const bool isDecayCase, const bool setPartners=true)
Set initial scales for a EW interaction.
virtual void setInitialQCDEvolutionScales(const ShowerParticleVector &particles, const bool isDecayCase, const bool setPartners=true)
Members to set the scales for different interactions.
virtual IBPtr clone() const
Make a simple clone of this object.
Definition: PartnerFinder.h:90
static void Init()
The standard Init function used to initialize the interfaces.
vector< pair< double, tShowerParticlePtr > > findQEDPartners(tShowerParticlePtr particle, const ShowerParticleVector &particles, const bool isDecayCase)
Find the QED partners.
bool weaklyInteracting(tcPDPtr pd)
Find weakling interacting particles.
int scaleChoice_
Choice of the scale.
virtual void setInitialQEDEvolutionScales(const ShowerParticleVector &particles, const bool isDecayCase, const bool setPartners=true)
Set initial scales for a QED interaction.
pair< Energy, Energy > calculateInitialFinalScales(const Lorentz5Momentum &pb, const Lorentz5Momentum &pc, const bool isDecayCase)
Calculate the initial evolution scales given momenta.
virtual void setInitialEvolutionScales(const ShowerParticleVector &particles, const bool isDecayCase, ShowerInteraction, const bool setPartners=true)
Given in input a collection of particles (ShowerParticle objects), each of these methods set the init...
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
int partnerMethod_
Method for choosing colour partner.
pair< Energy, Energy > calculateFinalFinalScales(const Lorentz5Momentum &p1, const Lorentz5Momentum &p2, int key=0)
Calculate the initial evolution scales given momenta.
vector< pair< double, tShowerParticlePtr > > findEWPartners(tShowerParticlePtr particle, const ShowerParticleVector &particles, const bool isDecayCase)
Find the EW partners.
pair< Energy, Energy > calculateInitialEvolutionScales(const ShowerPPair &, const bool isDecayCase, int key=0)
Given a pair of particles, supposedly partners w.r.t.
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition: PartnerFinder.h:96
int QEDPartner_
Choice for the QED radiation partner.
PartnerFinder()
The default constructor.
Definition: PartnerFinder.h:52
PartnerFinder & operator=(const PartnerFinder &)=delete
The assignment operator is private and must never be called.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
vector< pair< ShowerPartnerType, tShowerParticlePtr > > findQCDPartners(tShowerParticlePtr particle, const ShowerParticleVector &particles)
Find the QCD partners.
ShowerInteraction
Handy header file to be included in all Shower classes.
-*- C++ -*-
vector< ShowerParticlePtr > ShowerParticleVector
A Vector of ShowerParticle pointers.
Definition: ShowerConfig.h:54
pair< tShowerParticlePtr, tShowerParticlePtr > ShowerPPair
typedef of a pair of particle for calculating the evolution scales
Definition: PartnerFinder.h:25
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr