Skip to content

Commit a911276

Browse files
committed
Introduce pre-defined keys for MC event header info
A number of keys into the ME event header information mapping is defined. This is to ensure that code will use the same keys when ever information is set. Additional, non-predefined keys, are still possible. This makes it much more robust when we ask for specific MC information from the event header, such as - cross-section(s) - weight(s) - Heavy-ion "geometry" parameters - Npart in projectile and target - Ncoll in various views - Overall - Hard - wounded-nucleon on nucleon - nucleon on wounded-nucleon - wounded on wounded - Parton distribution function parameters This is crucial for building a HepMC event structure which can be passed on to say for example Rivet analyses.
1 parent 5798927 commit a911276

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

DataFormats/simulation/include/SimulationDataFormat/MCEventHeader.h

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,68 @@ namespace dataformats
2727

2828
class GeneratorHeader;
2929

30+
/** Common keys for information in MC event header */
31+
struct MCInfoKeys {
32+
/** @{
33+
@name HepMC3 heavy-ion fields */
34+
static constexpr const char* impactParameter = "Bimpact";
35+
static constexpr const char* nPart = "Npart";
36+
static constexpr const char* nPartProjectile = "Npart_proj";
37+
static constexpr const char* nPartTarget = "Npart_targ";
38+
static constexpr const char* nColl = "Ncoll";
39+
static constexpr const char* nCollHard = "Ncoll_hard";
40+
static constexpr const char* nCollNNWounded = "NColl_NNw";
41+
static constexpr const char* nCollNWoundedN = "NColl_NwN";
42+
static constexpr const char* nCollNWoundedNwounded = "NColl_NwNW";
43+
static constexpr const char* planeAngle = "eventPsi";
44+
static constexpr const char* sigmaInelNN = "sigmaInelNN";
45+
static constexpr const char* centrality = "centrality";
46+
static constexpr const char* nSpecProjectileProton = "Nspec_proj_p";
47+
static constexpr const char* nSpecProjectileNeutron = "Nspec_proj_n";
48+
static constexpr const char* nSpecTargetProton = "Nspec_targ_p";
49+
static constexpr const char* nSpecTargetNeutron = "Nspec_targ_n";
50+
/** @} */
51+
/** @{
52+
@name HepMC3 PDF information
53+
54+
In principle a header can have many of these. In that case,
55+
each set should be prefixed with "_<X>" where "<X>" is a
56+
serial number.
57+
*/
58+
static constexpr const char* pdfParton1Id = "pdf_parton_1_id";
59+
static constexpr const char* pdfParton2Id = "pdf_parton_2_id";
60+
static constexpr const char* pdfX1 = "pdf_x1";
61+
static constexpr const char* pdfX2 = "pdf_x2";
62+
static constexpr const char* pdfScale = "pdf_scale";
63+
static constexpr const char* pdfXF1 = "pdf_par_x1";
64+
static constexpr const char* pdfXF2 = "pdf_par_x2";
65+
static constexpr const char* pdfCode1 = "pdf_lhc_1_id";
66+
static constexpr const char* pdfCode2 = "pdf_lhc_2_id";
67+
/** @} */
68+
/** @{
69+
@name HepMC3 cross-section information
70+
71+
In principle we can have one cross section per weight. In that
72+
case, each should be post-fixed by "_<X>" where "<X>" is a
73+
serial number. These should then matcht possible names of
74+
weights.
75+
*/
76+
static constexpr const char* acceptedEvents = "accepted_events";
77+
static constexpr const char* attemptedEvents = "attempted_events";
78+
static constexpr const char* xSection = "cross_section";
79+
static constexpr const char* xSectionError = "cross_section_error";
80+
/** @} */
81+
/** @{
82+
@name Common fields */
83+
static constexpr const char* generator = "generator";
84+
static constexpr const char* generatorVersion = "version";
85+
static constexpr const char* processName = "processName";
86+
static constexpr const char* processCode = "processCode";
87+
static constexpr const char* weight = "weight";
88+
/** @} */
89+
90+
};
91+
3092
/*****************************************************************/
3193
/*****************************************************************/
3294

0 commit comments

Comments
 (0)