ATLAS Offline Software
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>
11 
12 class BeamHaloParticle;
13 
15 
16 };
17 
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 
51  enum enumLimits {
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
BeamHaloGeneratorSettings::ENUM_LIMITS_SIZE
@ ENUM_LIMITS_SIZE
Definition: BeamHaloGeneratorSettings.h:64
BeamHaloGeneratorSettings
A class to read a vector of strings defining particle filtering settings and provide a method for fil...
Definition: BeamHaloGeneratorSettings.h:25
BeamHaloGeneratorSettings::PY_LIMIT
@ PY_LIMIT
Definition: BeamHaloGeneratorSettings.h:53
BeamHaloParticle
A class to describe a generic beam halo particle.
Definition: BeamHaloParticle.h:22
BeamHaloGeneratorSettings::CYLINDER
@ CYLINDER
Definition: BeamHaloGeneratorSettings.h:49
BeamHaloGeneratorSettings::m_settingsParsed
bool m_settingsParsed
A flag to check if the settings have been parsed or not.
Definition: BeamHaloGeneratorSettings.h:96
BeamHaloGeneratorSettings::E_LIMIT
@ E_LIMIT
Definition: BeamHaloGeneratorSettings.h:55
BeamHaloGeneratorLimits
Definition: BeamHaloGeneratorSettings.h:14
BeamHaloGeneratorSettings::parseSettings
int parseSettings(void)
A function to parse the settings using the vector of strings given to the constructor of this class.
Definition: BeamHaloGeneratorSettings.cxx:43
index
Definition: index.py:1
athena.value
value
Definition: athena.py:124
BeamHaloGeneratorSettings::m_limitNames
static const std::string m_limitNames[ENUM_LIMITS_SIZE]
The name of the limits.
Definition: BeamHaloGeneratorSettings.h:77
BeamHaloGeneratorSettings::m_limitsEnabled
std::vector< std::pair< bool, bool > > m_limitsEnabled
A vector of flags to signal if a limit should be used or not.
Definition: BeamHaloGeneratorSettings.h:90
BeamHaloGeneratorSettings::checkSetting
bool checkSetting(int index, double value)
A function to check if a particle is within a range.
Definition: BeamHaloGeneratorSettings.cxx:236
BeamHaloGeneratorSettings::enumShapeRequirements
enumShapeRequirements
An enum mapped to different shape requirements.
Definition: BeamHaloGeneratorSettings.h:47
BeamHaloGeneratorSettings::printSettings
void printSettings(void)
Print a summary of the current settings.
Definition: BeamHaloGeneratorSettings.cxx:250
BeamHaloGeneratorSettings::m_limits
std::vector< std::pair< float, float > > m_limits
Minimum and maximum limits.
Definition: BeamHaloGeneratorSettings.h:87
BeamHaloGeneratorSettings::NONE
@ NONE
Definition: BeamHaloGeneratorSettings.h:48
BeamHaloGeneratorSettings::R_LIMIT
@ R_LIMIT
Definition: BeamHaloGeneratorSettings.h:62
BeamHaloGeneratorSettings::Y_LIMIT
@ Y_LIMIT
Definition: BeamHaloGeneratorSettings.h:57
BeamHaloGeneratorSettings::W_LIMIT
@ W_LIMIT
Definition: BeamHaloGeneratorSettings.h:63
BeamHaloGeneratorSettings::m_generatorSettings
std::vector< std::string > m_generatorSettings
A vector of strings to configure the generator settings.
Definition: BeamHaloGeneratorSettings.h:80
BeamHaloGeneratorSettings::enumLimits
enumLimits
Definition: BeamHaloGeneratorSettings.h:51
BeamHaloGeneratorSettings::parseLimitSetting
int parseLimitSetting(std::vector< std::string > *commandVector)
A function to read the limit settings from the supplied vector of strings.
Definition: BeamHaloGeneratorSettings.cxx:98
BeamHaloGeneratorSettings::m_allowedPdgIds
std::vector< long > m_allowedPdgIds
An allowed set of PDG ids where any empty vector implies all PDG ids are allowed.
Definition: BeamHaloGeneratorSettings.h:84
BeamHaloGeneratorSettings::PHI_LIMIT
@ PHI_LIMIT
Definition: BeamHaloGeneratorSettings.h:60
BeamHaloGeneratorSettings::checkCylinder
bool checkCylinder(BeamHaloParticle *beamHaloParticle)
A function to check if a particle is within a cylinder.
Definition: BeamHaloGeneratorSettings.cxx:187
BeamHaloGeneratorSettings::checkParticle
bool checkParticle(BeamHaloParticle *beamHaloParticle)
Check if the supplied beam halo particle passes the generator settings.
Definition: BeamHaloGeneratorSettings.cxx:139
BeamHaloGeneratorSettings::m_shapeRequirement
int m_shapeRequirement
A variable to store the volume shape requirement.
Definition: BeamHaloGeneratorSettings.h:93
BeamHaloGeneratorSettings::Z_LIMIT
@ Z_LIMIT
Definition: BeamHaloGeneratorSettings.h:58
BeamHaloGeneratorSettings::BeamHaloGeneratorSettings
BeamHaloGeneratorSettings(const std::vector< std::string > &settings)
Construct a class with a vector of string settings to filter particles.
Definition: BeamHaloGeneratorSettings.cxx:26
BeamHaloGeneratorSettings::ETA_LIMIT
@ ETA_LIMIT
Definition: BeamHaloGeneratorSettings.h:61
BeamHaloGeneratorSettings::PZ_LIMIT
@ PZ_LIMIT
Definition: BeamHaloGeneratorSettings.h:54
BeamHaloGeneratorSettings::PT_LIMIT
@ PT_LIMIT
Definition: BeamHaloGeneratorSettings.h:59
BeamHaloGeneratorSettings::X_LIMIT
@ X_LIMIT
Definition: BeamHaloGeneratorSettings.h:56
BeamHaloGeneratorSettings::PX_LIMIT
@ PX_LIMIT
Definition: BeamHaloGeneratorSettings.h:52