cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
EventBrowser.h
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 2019-2023 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_EventFilter_EventBrowser_h
20
#define CepGen_EventFilter_EventBrowser_h
21
22
#include <regex>
23
24
#include "
CepGen/Event/Particle.h
"
25
26
namespace
cepgen
{
27
class
Event;
28
namespace
utils {
34
class
EventBrowser
{
35
public
:
36
EventBrowser
() =
default
;
38
double
get
(
const
Event
& ev,
const
std::string& var)
const
;
39
40
private
:
42
double
variable(
const
Event
&,
const
Particle
&,
const
std::string&)
const
;
44
double
variable(
const
Event
&,
const
Particle
&,
const
Particle
&,
const
std::string&)
const
;
46
static
double
variable(
const
Event
&,
const
std::string&);
47
48
static
const
std::regex rgx_select_id_, rgx_select_id2_, rgx_select_role_, rgx_select_role2_;
49
static
constexpr
double
INVALID_OUTPUT = -999.;
50
51
//--- auxiliary helper maps
52
const
std::unordered_map<std::string, Particle::Role> role_str_ = {{
"ib1"
,
Particle::Role::IncomingBeam1
},
53
{
"ib2"
,
Particle::Role::IncomingBeam2
},
54
{
"ob1"
,
Particle::Role::OutgoingBeam1
},
55
{
"ob2"
,
Particle::Role::OutgoingBeam2
},
56
{
"pa1"
,
Particle::Role::Parton1
},
57
{
"pa2"
,
Particle::Role::Parton2
},
58
{
"cs"
,
Particle::Role::CentralSystem
},
59
{
"int"
,
Particle::Role::Intermediate
}};
60
typedef
double (Momentum::*pMethod)() const;
62
const
std::unordered_map<std::string, pMethod> m_mom_str_ = {
63
{
"px"
, &
Momentum::px
}, {
"py"
, &
Momentum::py
}, {
"pz"
, &
Momentum::pz
},
64
{
"pt"
, &
Momentum::pt
}, {
"pt2"
, &
Momentum::pt2
}, {
"eta"
, &
Momentum::eta
},
65
{
"phi"
, &
Momentum::phi
}, {
"m"
, &
Momentum::mass
}, {
"m2"
, &
Momentum::mass2
},
66
{
"mt"
, &
Momentum::massT
}, {
"mt2"
, &
Momentum::massT2
}, {
"e"
, &
Momentum::energy
},
67
{
"e2"
, &
Momentum::energy2
}, {
"et"
, &
Momentum::energyT
}, {
"et2"
, &
Momentum::energyT2
},
68
{
"p"
, &
Momentum::p
}, {
"p2"
, &
Momentum::p2
}, {
"th"
, &
Momentum::theta
},
69
{
"y"
, &
Momentum::rapidity
}, {
"beta"
, &
Momentum::beta
}, {
"gamma"
, &
Momentum::gamma
},
70
{
"gamma2"
, &
Momentum::gamma2
}};
71
typedef
double (Momentum::*pMethodOth)(const Momentum&) const;
72
const
std::unordered_map<std::string, pMethodOth> m_two_mom_str_ = {{
"deta"
, &
Momentum::deltaEta
},
73
{
"dphi"
, &
Momentum::deltaPhi
},
74
{
"dpt"
, &
Momentum::deltaPt
},
75
{
"dr"
, &
Momentum::deltaR
}};
76
};
77
}
// namespace utils
78
}
// namespace cepgen
79
80
#endif
Particle.h
cepgen::Event
Container for the information on the in- and outgoing particles' kinematics.
Definition
Event.h:28
cepgen::Momentum::pt2
double pt2() const
Squared transverse momentum (in GeV )
Definition
Momentum.cpp:234
cepgen::Momentum::pz
double pz() const
Longitudinal momentum (in GeV)
Definition
Momentum.h:120
cepgen::Momentum::deltaR
double deltaR(const Momentum &) const
Angular distance between two momenta.
Definition
Momentum.cpp:259
cepgen::Momentum::deltaEta
double deltaEta(const Momentum &) const
Pseudorapidity distance between two momenta.
Definition
Momentum.cpp:251
cepgen::Momentum::energyT2
double energyT2() const
Squared tranverse energy component (in GeV )
Definition
Momentum.cpp:213
cepgen::Momentum::rapidity
double rapidity() const
Rapidity.
Definition
Momentum.cpp:246
cepgen::Momentum::deltaPt
double deltaPt(const Momentum &) const
Transverse momentum distance between two momenta.
Definition
Momentum.cpp:257
cepgen::Momentum::gamma2
double gamma2() const
Squared gamma scalar value.
Definition
Momentum.cpp:280
cepgen::Momentum::deltaPhi
double deltaPhi(const Momentum &) const
Azimutal angle opening between two momenta.
Definition
Momentum.cpp:253
cepgen::Momentum::eta
double eta() const
Pseudo-rapidity.
Definition
Momentum.cpp:240
cepgen::Momentum::px
double px() const
Momentum along the -axis (in GeV)
Definition
Momentum.h:112
cepgen::Momentum::gamma
double gamma() const
Gamma scalar value.
Definition
Momentum.cpp:295
cepgen::Momentum::p2
double p2() const
Squared 3-momentum norm (in GeV )
Definition
Momentum.h:132
cepgen::Momentum::py
double py() const
Momentum along the -axis (in GeV)
Definition
Momentum.h:116
cepgen::Momentum::beta
double beta() const
Beta scalar value.
Definition
Momentum.cpp:265
cepgen::Momentum::massT2
double massT2() const
Squared transverse mass (in GeV )
Definition
Momentum.cpp:224
cepgen::Momentum::energy2
double energy2() const
Squared energy (in GeV )
Definition
Momentum.h:138
cepgen::Momentum::massT
double massT() const
Transverse mass (in GeV)
Definition
Momentum.cpp:226
cepgen::Momentum::pt
double pt() const
Transverse momentum (in GeV)
Definition
Momentum.cpp:232
cepgen::Momentum::phi
double phi() const
Azimuthal angle (angle in the transverse plane)
Definition
Momentum.cpp:230
cepgen::Momentum::p
double p() const
3-momentum norm (in GeV)
Definition
Momentum.h:130
cepgen::Momentum::mass
double mass() const
Mass (in GeV) as computed from its energy and momentum.
Definition
Momentum.cpp:222
cepgen::Momentum::energyT
double energyT() const
Tranverse energy component (in GeV)
Definition
Momentum.cpp:218
cepgen::Momentum::energy
double energy() const
Energy (in GeV)
Definition
Momentum.h:136
cepgen::Momentum::theta
double theta() const
Polar angle (angle with respect to the longitudinal direction)
Definition
Momentum.cpp:228
cepgen::Momentum::mass2
double mass2() const
Squared mass (in GeV ) as computed from its energy and momentum.
Definition
Momentum.cpp:220
cepgen::Particle
Kinematic information for one particle.
Definition
Particle.h:33
cepgen::Particle::IncomingBeam2
@ IncomingBeam2
incoming beam particle
Definition
Particle.h:53
cepgen::Particle::Parton2
@ Parton2
beam incoming parton
Definition
Particle.h:59
cepgen::Particle::OutgoingBeam1
@ OutgoingBeam1
outgoing beam state/particle
Definition
Particle.h:54
cepgen::Particle::IncomingBeam1
@ IncomingBeam1
incoming beam particle
Definition
Particle.h:52
cepgen::Particle::OutgoingBeam2
@ OutgoingBeam2
outgoing beam state/particle
Definition
Particle.h:55
cepgen::Particle::Parton1
@ Parton1
beam incoming parton
Definition
Particle.h:58
cepgen::Particle::CentralSystem
@ CentralSystem
Central particles system.
Definition
Particle.h:56
cepgen::Particle::Intermediate
@ Intermediate
Intermediate two-parton system.
Definition
Particle.h:57
cepgen::utils::EventBrowser
A user-friendly browser for the Event content.
Definition
EventBrowser.h:34
cepgen::utils::EventBrowser::EventBrowser
EventBrowser()=default
cepgen::utils::EventBrowser::get
double get(const Event &ev, const std::string &var) const
Get/compute a variable value.
Definition
EventBrowser.cpp:34
cepgen
Common namespace for this Monte Carlo generator.
Definition
CommandLineHandler.cpp:36
CepGen
EventFilter
EventBrowser.h
Generated on Mon Jul 29 2024 for CepGen by
1.9.7