cepgen
is hosted by
Hepforge
,
IPPP Durham
CepGen
1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
describe_particles.cc
Go to the documentation of this file.
1
/*
2
* CepGen: a central exclusive processes event generator
3
* Copyright (C) 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
#include "
CepGen/Core/Exception.h
"
20
#include "
CepGen/Generator.h
"
21
#include "
CepGen/Physics/PDG.h
"
22
#include "
CepGen/Utils/ArgumentsParser.h
"
23
#include "
CepGen/Utils/Test.h
"
24
#include "
CepGenAddOns/MadGraphWrapper/Utils.h
"
25
26
using namespace
std;
27
using namespace
std::string_literals;
28
29
int
main
(
int
argc,
char
* argv[]) {
30
cepgen::ArgumentsParser
(argc, argv).
parse
();
31
cepgen::initialise
();
32
33
for
(
const
auto
& part : vector<pair<cepgen::spdgid_t, string> >{
34
{11,
"e"
}, {12,
"ve"
}, {13,
"mu"
}, {14,
"vm"
}, {15,
"ta"
}, {16,
"vt"
}, {-11,
"e+"
}, {-12,
"ve~"
},
35
{-13,
"mu+"
}, {-14,
"vm~"
}, {-15,
"ta+"
}, {-16,
"vt~"
}, {22,
"a"
}, {23,
"z"
}, {-24,
"w-"
}, {24,
"w+"
},
36
{25,
"h"
}, {1,
"d"
}, {2,
"u"
}, {3,
"s"
}, {4,
"c"
}, {5,
"b"
}, {6,
"t"
}, {-1,
"d~"
},
37
{-2,
"u~"
}, {-3,
"s~"
}, {-4,
"c~"
}, {-5,
"b~"
}, {-6,
"t~"
}}) {
38
const
auto
mg_prop =
cepgen::mg5amc::describeParticle
(part.second,
"sm"
);
39
const
auto
cg_prop =
cepgen::PDG::get
()(part.first);
40
const
auto
name = part.second +
"/"
+
cepgen::PDG::get
().
name
(part.first);
41
CG_TEST_EQUAL
(mg_prop.pdgid, std::labs(part.first), name +
" PDG"
);
42
CG_TEST_EQUAL
(mg_prop.fermion, cg_prop.fermion, name +
" fermion/boson"
);
43
CG_TEST_EQUIV
(mg_prop.mass, cg_prop.mass, name +
" mass"
);
44
CG_TEST_EQUIV
(mg_prop.width, cg_prop.width, name +
" width"
);
45
CG_TEST_EQUAL
(mg_prop.charges, cg_prop.charges, name +
" charges"
);
46
}
47
48
CG_TEST_SUMMARY
;
49
}
ArgumentsParser.h
Exception.h
Generator.h
PDG.h
Test.h
CG_TEST_EQUIV
#define CG_TEST_EQUIV(var1, var2, name)
Definition
Test.h:61
CG_TEST_SUMMARY
#define CG_TEST_SUMMARY
Definition
Test.h:127
CG_TEST_EQUAL
#define CG_TEST_EQUAL(var1, var2, name)
Definition
Test.h:45
cepgen::ArgumentsParser
A generic command line arguments parser.
Definition
ArgumentsParser.h:31
cepgen::ArgumentsParser::parse
ArgumentsParser & parse()
Associate command-line arguments to parameters.
Definition
ArgumentsParser.cpp:106
cepgen::PDG::name
const std::string & name(spdgid_t) const
Accessor for particle properties.
Definition
PDG.cpp:81
cepgen::PDG::get
static PDG & get()
Retrieve a unique instance of this particles info collection.
Definition
PDG.cpp:41
Utils.h
cepgen::mg5amc::describeParticle
ParticleProperties describeParticle(const std::string &part_name, const std::string &model)
Unpack all particle properties from MadGraph.
Definition
Utils.cpp:68
cepgen::initialise
void initialise(bool safe_mode)
Definition
GlobalFunctions.cpp:91
main
int main()
Definition
pythia6_decay.cc:9
CepGenAddOns
MadGraphWrapper
test
describe_particles.cc
Generated on Mon Jul 29 2024 for CepGen by
1.9.7