Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-06-03 08:33:23

0001 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
0002 
0003 #ifndef EDM4HEP_GeneratorEventParameters_H
0004 #define EDM4HEP_GeneratorEventParameters_H
0005 
0006 #include "edm4hep/GeneratorEventParametersObj.h"
0007 
0008 #include "edm4hep/MCParticle.h"
0009 #include "podio/RelationRange.h"
0010 #include <vector>
0011 
0012 #include "podio/detail/OrderKey.h"
0013 #include "podio/utilities/MaybeSharedPtr.h"
0014 
0015 #include <cstdint>
0016 #include <ostream>
0017 
0018 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0019 #include "nlohmann/json_fwd.hpp"
0020 #endif
0021 
0022 // forward declarations
0023 namespace edm4hep {
0024 class GeneratorEventParametersCollection;
0025 }
0026 
0027 namespace podio::detail {
0028 // Internal function used in less comparison operators of the datatypes and interface types
0029 OrderKey getOrderKey(const edm4hep::GeneratorEventParameters& obj);
0030 }; // namespace podio::detail
0031 
0032 namespace edm4hep {
0033 
0034 class MutableGeneratorEventParameters;
0035 class GeneratorEventParametersCollection;
0036 class GeneratorEventParametersCollectionData;
0037 
0038 /** @class GeneratorEventParameters
0039  *  Generator event parameters
0040  *  @author: EDM4hep authors
0041  */
0042 class GeneratorEventParameters {
0043 
0044   friend class MutableGeneratorEventParameters;
0045   friend class GeneratorEventParametersCollection;
0046   friend class edm4hep::GeneratorEventParametersCollectionData;
0047   friend class GeneratorEventParametersCollectionIterator;
0048   friend podio::detail::OrderKey podio::detail::getOrderKey(const GeneratorEventParameters& obj);
0049 
0050 public:
0051   using mutable_type = MutableGeneratorEventParameters;
0052   using collection_type = GeneratorEventParametersCollection;
0053 
0054   /// default constructor
0055   GeneratorEventParameters();
0056 
0057   /// Constructor initializing all members
0058   GeneratorEventParameters(double eventScale, double alphaQED, double alphaQCD, int signalProcessId, double sqrts);
0059 
0060   /// copy constructor
0061   GeneratorEventParameters(const GeneratorEventParameters& other) = default;
0062 
0063   /// copy-assignment operator
0064   GeneratorEventParameters& operator=(GeneratorEventParameters other);
0065 
0066   /// create a mutable deep-copy of the object with identical relations
0067   /// if cloneRelations=false, the relations are not cloned and will be empty
0068   MutableGeneratorEventParameters clone(bool cloneRelations = true) const;
0069 
0070   /// destructor
0071   ~GeneratorEventParameters() = default;
0072 
0073   /// converting constructor from mutable object
0074   GeneratorEventParameters(const MutableGeneratorEventParameters& other);
0075 
0076   static GeneratorEventParameters makeEmpty();
0077 
0078 public:
0079   static constexpr auto typeName = "edm4hep::GeneratorEventParameters";
0080 
0081   /// Access the event scale
0082   double getEventScale() const;
0083 
0084   /// Access the alpha_QED
0085   double getAlphaQED() const;
0086 
0087   /// Access the alpha_QCD
0088   double getAlphaQCD() const;
0089 
0090   /// Access the id of signal process
0091   int getSignalProcessId() const;
0092 
0093   /// Access the sqrt(s) [GeV]
0094   double getSqrts() const;
0095 
0096   std::size_t signalVertex_size() const;
0097   edm4hep::MCParticle getSignalVertex(std::size_t) const;
0098   std::vector<edm4hep::MCParticle>::const_iterator signalVertex_begin() const;
0099   std::vector<edm4hep::MCParticle>::const_iterator signalVertex_end() const;
0100   podio::RelationRange<edm4hep::MCParticle> getSignalVertex() const;
0101   std::size_t crossSections_size() const;
0102   double getCrossSections(std::size_t) const;
0103   std::vector<double>::const_iterator crossSections_begin() const;
0104   std::vector<double>::const_iterator crossSections_end() const;
0105   podio::RelationRange<double> getCrossSections() const;
0106   std::size_t crossSectionErrors_size() const;
0107   double getCrossSectionErrors(std::size_t) const;
0108   std::vector<double>::const_iterator crossSectionErrors_begin() const;
0109   std::vector<double>::const_iterator crossSectionErrors_end() const;
0110   podio::RelationRange<double> getCrossSectionErrors() const;
0111 
0112   /// check whether the object is actually available
0113   bool isAvailable() const;
0114   /// disconnect from GeneratorEventParametersObj instance
0115   void unlink() {
0116     m_obj = podio::utils::MaybeSharedPtr<GeneratorEventParametersObj>{nullptr};
0117   }
0118 
0119   bool operator==(const GeneratorEventParameters& other) const {
0120     return m_obj == other.m_obj;
0121   }
0122   bool operator==(const MutableGeneratorEventParameters& other) const;
0123 
0124   bool operator!=(const GeneratorEventParameters& other) const {
0125     return !(*this == other);
0126   }
0127   bool operator!=(const MutableGeneratorEventParameters& other) const {
0128     return !(*this == other);
0129   }
0130 
0131   // less comparison operator, so that objects can be e.g. stored in sets.
0132   bool operator<(const GeneratorEventParameters& other) const {
0133     return podio::detail::getOrderKey(*this) < podio::detail::getOrderKey(other);
0134   }
0135 
0136   podio::ObjectID id() const {
0137     return getObjectID();
0138   }
0139 
0140   const podio::ObjectID getObjectID() const;
0141 
0142   friend void swap(GeneratorEventParameters& a, GeneratorEventParameters& b) {
0143     using std::swap;
0144     swap(a.m_obj, b.m_obj); // swap out the internal pointers
0145   }
0146 
0147 private:
0148   /// constructor from existing GeneratorEventParametersObj
0149   explicit GeneratorEventParameters(podio::utils::MaybeSharedPtr<GeneratorEventParametersObj> obj);
0150   GeneratorEventParameters(GeneratorEventParametersObj* obj);
0151 
0152   podio::utils::MaybeSharedPtr<GeneratorEventParametersObj> m_obj{nullptr};
0153 };
0154 
0155 std::ostream& operator<<(std::ostream& o, const GeneratorEventParameters& value);
0156 
0157 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0158 void to_json(nlohmann::json& j, const GeneratorEventParameters& value);
0159 #endif
0160 
0161 } // namespace edm4hep
0162 
0163 #endif