ATLAS Offline Software
Loading...
Searching...
No Matches
BeamHaloGeneratorSettings.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef BEAMHALOGENERATORSETTINGS_H
6#define BEAMHALOGENERATORSETTINGS_H
7
8#include <string>
9#include <vector>
10#include <map>
13
15
16};
17
23
26 public:
27
30 BeamHaloGeneratorSettings(const std::vector<std::string>& settings);
31
35 int parseSettings(void);
36
39 bool checkParticle(BeamHaloParticle *beamHaloParticle);
40
42 void printSettings(void);
43
44 private:
45
50
65
68 int parseLimitSetting(std::vector<std::string> *commandVector);
69
71 bool checkCylinder(BeamHaloParticle *beamHaloParticle);
72
74 bool checkSetting(int index, double value);
75
77 static const std::string m_limitNames[ENUM_LIMITS_SIZE];
78
80 std::vector<std::string> m_generatorSettings;
81
84 std::vector<long> m_allowedPdgIds;
85
87 std::vector<std::pair<float, float> > m_limits;
88
90 std::vector<std::pair<bool, bool> > m_limitsEnabled;
91
94
97};
98
99#endif
bool checkSetting(int index, double value)
A function to check if a particle is within a range.
void printSettings(void)
Print a summary of the current settings.
static const std::string m_limitNames[ENUM_LIMITS_SIZE]
The name of the limits.
int parseSettings(void)
A function to parse the settings using the vector of strings given to the constructor of this class.
bool checkParticle(BeamHaloParticle *beamHaloParticle)
Check if the supplied beam halo particle passes the generator settings.
enumShapeRequirements
An enum mapped to different shape requirements.
std::vector< long > m_allowedPdgIds
An allowed set of PDG ids where any empty vector implies all PDG ids are allowed.
int m_shapeRequirement
A variable to store the volume shape requirement.
bool checkCylinder(BeamHaloParticle *beamHaloParticle)
A function to check if a particle is within a cylinder.
std::vector< std::pair< float, float > > m_limits
Minimum and maximum limits.
std::vector< std::pair< bool, bool > > m_limitsEnabled
A vector of flags to signal if a limit should be used or not.
bool m_settingsParsed
A flag to check if the settings have been parsed or not.
std::vector< std::string > m_generatorSettings
A vector of strings to configure the generator settings.
BeamHaloGeneratorSettings(const std::vector< std::string > &settings)
Construct a class with a vector of string settings to filter particles.
int parseLimitSetting(std::vector< std::string > *commandVector)
A function to read the limit settings from the supplied vector of strings.
A class to describe a generic beam halo particle.
Definition index.py:1