cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
PhotosFilter.cpp
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2019-2022 Laurent Forthomme
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#include <Photos/Log.h>
20
#include <Photos/Photos.h>
21
#include <Photos/PhotosEvent.h>
22
#include <Photos/PhotosHepMC3Event.h>
23
24
#include "
CepGen/Core/Exception.h
"
25
#include "
CepGen/Core/ParametersList.h
"
26
#include "
CepGen/Event/Event.h
"
27
#include "
CepGen/EventFilter/EventModifier.h
"
28
#include "
CepGen/Modules/EventModifierFactory.h
"
29
#include "
CepGen/Physics/PDG.h
"
30
#include "
CepGen/Utils/String.h
"
31
#include "
CepGenAddOns/HepMC3Wrapper/HepMC3EventInterface.h
"
32
33
using namespace
Photospp;
34
35
namespace
cepgen
{
36
namespace
hadr {
38
class
PhotosFilter
:
public
EventModifier
{
39
public
:
40
explicit
PhotosFilter
(
const
ParametersList
&);
41
~PhotosFilter
();
42
43
static
ParametersDescription
description
();
44
45
void
initialise
()
override
;
46
bool
run
(
Event
& ev,
double
& weight,
bool
fast)
override
;
47
};
48
49
PhotosFilter::PhotosFilter
(
const
ParametersList
& params) :
EventModifier
(params) {
50
if
(steer<bool>(
"debug"
))
51
Log::LogAll(
true
);
52
Photos::setMomentumConservationThreshold(1.e-10);
53
Photos::maxWtInterference(steer<double>(
"maxWtInterference"
));
54
Photos::setInfraredCutOff(steer<double>(
"infraredCutOff"
));
55
Photos::setInterference(steer<bool>(
"interference"
));
56
Photos::setDoubleBrem(steer<bool>(
"doubleBrem"
));
57
Photos::setQuatroBrem(steer<bool>(
"quatroBrem"
));
58
Photos::setCorrectionWtForW(steer<bool>(
"correctionWtForW"
));
59
Photos::setExponentiation(steer<bool>(
"exponentiation"
));
60
Photos::setPairEmission(steer<bool>(
"pairEmission"
));
61
Photos::setPhotonEmission(steer<bool>(
"photonEmission"
));
62
Photos::setMeCorrectionWtForScalar(steer<bool>(
"meCorrectionWtForScalar"
));
63
Photos::setMeCorrectionWtForW(steer<bool>(
"meCorrectionWtForW"
));
64
Photos::setMeCorrectionWtForZ(steer<bool>(
"meCorrectionWtForZ"
));
65
Photos::setTopProcessRadiation(steer<bool>(
"topProcessRadiation"
));
66
}
67
68
PhotosFilter::~PhotosFilter
() { Log::SummaryAtExit(); }
69
70
void
PhotosFilter::initialise
() {
71
Photos::setMomentumUnit(Photos::GEV);
72
Photos::setAlphaQED(
constants::ALPHA_EM
);
73
Photos::initialize();
74
}
75
76
bool
PhotosFilter::run
(
Event
& ev,
double
& weight,
bool
) {
77
weight = 1.;
78
79
HepMC3::CepGenEvent
hepmc_evt(ev);
80
PhotosHepMC3Event evt(&hepmc_evt);
81
//evt.dump();
82
evt.process();
83
hepmc_evt.
merge
(ev);
84
ev.
dump
();
85
86
return
true
;
87
}
88
89
ParametersDescription
PhotosFilter::description
() {
90
auto
desc =
EventModifier::description
();
91
desc.add<
bool
>(
"debug"
,
false
).setDescription(
"log all debugging information?"
);
92
desc.add<
double
>(
"maxWtInterference"
, 1.).setDescription(
"maximum interference weight"
);
93
desc.add<
double
>(
"infraredCutOff"
, 0.01)
94
.setDescription(
"minimal energy (in units of decaying particle mass) for photons to be explicitly generated"
);
95
desc.add<
bool
>(
"interference"
,
true
).setDescription(
"key for interference, matrix element weight"
);
96
desc.add<
bool
>(
"doubleBrem"
,
true
).setDescription(
"set double bremsstrahlung generation"
);
97
desc.add<
bool
>(
"quatroBrem"
,
false
).setDescription(
"set bremsstrahlung generation up to multiplicity of 4"
);
98
desc.add<
bool
>(
"correctionWtForW"
,
true
)
99
.setDescription(
"key for partial effects of matrix element (in leptonic W decays)"
);
100
desc.add<
bool
>(
"exponentiation"
,
true
).setDescription(
"set exponentiation mode"
);
101
desc.add<
bool
>(
"pairEmission"
,
false
).setDescription(
"set pair emission"
);
102
desc.add<
bool
>(
"photonEmission"
,
true
).setDescription(
"set photon emission"
);
103
desc.add<
bool
>(
"meCorrectionWtForScalar"
,
false
)
104
.setDescription(
"switch for complete effects of the matrix element (in scalar to two scalar decays)"
);
105
desc.add<
bool
>(
"meCorrectionWtForW"
,
false
)
106
.setDescription(
"switch for complete effects of matrix element (in leptonic W decays)"
);
107
desc.add<
bool
>(
"meCorrectionWtForZ"
,
false
)
108
.setDescription(
"switch for complete effects of matrix element (in leptonic Z decays)"
);
109
desc.add<
bool
>(
"topProcessRadiation"
,
true
)
110
.setDescription(
"set photon emission in top pair production in quark (gluon) pair annihilation"
);
111
return
desc;
112
}
113
}
// namespace hadr
114
}
// namespace cepgen
115
116
// register event modifier
117
typedef
cepgen::hadr::PhotosFilter
PhotosFilter
;
118
REGISTER_MODIFIER
(
"photos"
,
PhotosFilter
);
EventModifierFactory.h
REGISTER_MODIFIER
#define REGISTER_MODIFIER(name, obj)
Add a generic event modification module definition to the factory.
Definition
EventModifierFactory.h:25
EventModifier.h
Event.h
Exception.h
HepMC3EventInterface.h
PDG.h
ParametersList.h
PhotosFilter
cepgen::hadr::PhotosFilter PhotosFilter
Definition
PhotosFilter.cpp:117
String.h
HepMC3::CepGenEvent
Interfacing between CepGen and HepMC event definitions.
Definition
HepMC3EventInterface.h:35
HepMC3::CepGenEvent::merge
void merge(cepgen::Event &) const
Merge this event with another CepGen event record.
Definition
HepMC3EventInterface.cpp:198
cepgen::EventModifier
Class template to interface (external/internal) events modification algorithms.
Definition
EventModifier.h:29
cepgen::EventModifier::description
static ParametersDescription description()
Definition
EventModifier.cpp:42
cepgen::Event
Container for the information on the in- and outgoing particles' kinematics.
Definition
Event.h:28
cepgen::Event::dump
void dump() const
Dump all the known information on every Particle object contained in this Event container in the outp...
Definition
Event.cpp:423
cepgen::ParametersDescription
A description object for parameters collection.
Definition
ParametersDescription.h:26
cepgen::ParametersList
Definition
ParametersList.h:52
cepgen::hadr::PhotosFilter
Interface to the Photos decay routine.
Definition
PhotosFilter.cpp:38
cepgen::hadr::PhotosFilter::~PhotosFilter
~PhotosFilter()
Definition
PhotosFilter.cpp:68
cepgen::hadr::PhotosFilter::PhotosFilter
PhotosFilter(const ParametersList &)
Definition
PhotosFilter.cpp:49
cepgen::hadr::PhotosFilter::run
bool run(Event &ev, double &weight, bool fast) override
Modify an event.
Definition
PhotosFilter.cpp:76
cepgen::hadr::PhotosFilter::description
static ParametersDescription description()
Definition
PhotosFilter.cpp:89
cepgen::hadr::PhotosFilter::initialise
void initialise() override
Definition
PhotosFilter.cpp:70
cepgen::constants::ALPHA_EM
constexpr double ALPHA_EM
Electromagnetic coupling constant .
Definition
Constants.h:28
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGenAddOns
PhotosTauolaWrapper
PhotosFilter.cpp
Generated on Mon Jul 29 2024 for CepGen by
1.9.7