cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
PartonsPhaseSpaceGenerator.h
Go to the documentation of this file.
1/*
2 * CepGen: a central exclusive processes event generator
3 * Copyright (C) 2023-2024 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#ifndef CepGen_Process_PartonsPhaseSpaceGenerator_h
20#define CepGen_Process_PartonsPhaseSpaceGenerator_h
21
22#include <memory>
23
25
26namespace cepgen {
27 class PartonFlux;
28 namespace proc {
29 class FactorisedProcess;
30 }
37 class PartonsPhaseSpaceGenerator : public SteeredObject<PartonsPhaseSpaceGenerator> {
38 public:
39 explicit PartonsPhaseSpaceGenerator(const ParametersList& params) : SteeredObject(params) {}
40
42 proc_ = process;
43 initialise();
44 }
45
46 virtual bool ktFactorised() const = 0;
47 virtual bool generatePartonKinematics() = 0;
48 virtual double fluxes() const = 0;
49
51 template <typename T = PartonFlux>
52 inline const T& positiveFlux() const {
53 return dynamic_cast<const T&>(*pos_flux_);
54 }
56 template <typename T = PartonFlux>
57 inline const T& negativeFlux() const {
58 return dynamic_cast<const T&>(*neg_flux_);
59 }
60
61 protected:
62 virtual void initialise() = 0;
63 inline proc::FactorisedProcess& process() { return *proc_; }
65 inline const proc::FactorisedProcess& process() const { return const_cast<const proc::FactorisedProcess&>(*proc_); }
66 std::unique_ptr<PartonFlux> pos_flux_{nullptr}, neg_flux_{nullptr};
67
68 private:
69 proc::FactorisedProcess* proc_{nullptr}; //NOT owning
70 };
71} // namespace cepgen
72
73#endif
A generic phase space integration wrapper.
PartonsPhaseSpaceGenerator(const ParametersList &params)
const T & positiveFlux() const
Retrieve a type-casted positive-z parton flux modelling.
virtual bool generatePartonKinematics()=0
Generate the 4-momentum of incoming partons.
void initialise(proc::FactorisedProcess *process)
virtual bool ktFactorised() const =0
Do incoming partons carry a primordial kT?
virtual double fluxes() const =0
Retrieve the event weight in the phase space.
proc::FactorisedProcess & process()
Consumer process object Const-qualified consumer process object.
const proc::FactorisedProcess & process() const
virtual void initialise()=0
Initialise the process and define the integration phase space.
const T & negativeFlux() const
Retrieve a type-casted negative-z parton flux modelling.
Base user-steerable object.
Generic parton emission-factorised process.
Common namespace for this Monte Carlo generator.