Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
0002 
0003 #ifndef EDM4HEP_MutableGeneratorEventParameters_H
0004 #define EDM4HEP_MutableGeneratorEventParameters_H
0005 
0006 #include "edm4hep/GeneratorEventParametersObj.h"
0007 // Make the immutable class available from its mutable version but not vice versa
0008 #include "edm4hep/GeneratorEventParameters.h"
0009 
0010 #include "edm4hep/MCParticle.h"
0011 #include "podio/RelationRange.h"
0012 #include <vector>
0013 
0014 #include "podio/utilities/MaybeSharedPtr.h"
0015 
0016 #include <cstdint>
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 edm4hep {
0028 
0029 /** @class MutableGeneratorEventParameters
0030  *  Generator event parameters
0031  *  @author: EDM4hep authors
0032  */
0033 class MutableGeneratorEventParameters {
0034 
0035   friend class GeneratorEventParametersCollection;
0036   friend class GeneratorEventParametersMutableCollectionIterator;
0037   friend class GeneratorEventParameters;
0038 
0039 public:
0040   using object_type = GeneratorEventParameters;
0041   using collection_type = GeneratorEventParametersCollection;
0042 
0043   /// default constructor
0044   MutableGeneratorEventParameters();
0045 
0046   /// Constructor initializing all members
0047   MutableGeneratorEventParameters(double eventScale, double alphaQED, double alphaQCD, int signalProcessId,
0048                                   double sqrts);
0049 
0050   /// copy constructor
0051   MutableGeneratorEventParameters(const MutableGeneratorEventParameters& other) = default;
0052 
0053   /// copy-assignment operator
0054   MutableGeneratorEventParameters& operator=(MutableGeneratorEventParameters other);
0055 
0056   /// create a mutable deep-copy of the object with identical relations
0057   /// if cloneRelations=false, the relations are not cloned and will be empty
0058   MutableGeneratorEventParameters clone(bool cloneRelations = true) const;
0059 
0060   /// destructor
0061   ~MutableGeneratorEventParameters() = default;
0062 
0063 public:
0064   /// Access the event scale
0065   double getEventScale() const;
0066 
0067   /// Access the alpha_QED
0068   double getAlphaQED() const;
0069 
0070   /// Access the alpha_QCD
0071   double getAlphaQCD() const;
0072 
0073   /// Access the id of signal process
0074   int getSignalProcessId() const;
0075 
0076   /// Access the sqrt(s) [GeV]
0077   double getSqrts() const;
0078 
0079   /// Set the event scale
0080   void setEventScale(double value);
0081   /// Get mutable reference to event scale
0082   double& getEventScale();
0083   /// Get reference to event scale
0084   [[deprecated("use getEventScale instead")]] double& eventScale();
0085 
0086   /// Set the alpha_QED
0087   void setAlphaQED(double value);
0088   /// Get mutable reference to alpha_QED
0089   double& getAlphaQED();
0090   /// Get reference to alpha_QED
0091   [[deprecated("use getAlphaQED instead")]] double& alphaQED();
0092 
0093   /// Set the alpha_QCD
0094   void setAlphaQCD(double value);
0095   /// Get mutable reference to alpha_QCD
0096   double& getAlphaQCD();
0097   /// Get reference to alpha_QCD
0098   [[deprecated("use getAlphaQCD instead")]] double& alphaQCD();
0099 
0100   /// Set the id of signal process
0101   void setSignalProcessId(int value);
0102   /// Get mutable reference to id of signal process
0103   int& getSignalProcessId();
0104   /// Get reference to id of signal process
0105   [[deprecated("use getSignalProcessId instead")]] int& signalProcessId();
0106 
0107   /// Set the sqrt(s) [GeV]
0108   void setSqrts(double value);
0109   /// Get mutable reference to sqrt(s) [GeV]
0110   double& getSqrts();
0111   /// Get reference to sqrt(s) [GeV]
0112   [[deprecated("use getSqrts instead")]] double& sqrts();
0113 
0114   void addToSignalVertex(const edm4hep::MCParticle&);
0115   std::size_t signalVertex_size() const;
0116   edm4hep::MCParticle getSignalVertex(std::size_t) const;
0117   std::vector<edm4hep::MCParticle>::const_iterator signalVertex_begin() const;
0118   std::vector<edm4hep::MCParticle>::const_iterator signalVertex_end() const;
0119   podio::RelationRange<edm4hep::MCParticle> getSignalVertex() const;
0120   void addToCrossSections(const double&);
0121   std::size_t crossSections_size() const;
0122   double getCrossSections(std::size_t) const;
0123   std::vector<double>::const_iterator crossSections_begin() const;
0124   std::vector<double>::const_iterator crossSections_end() const;
0125   podio::RelationRange<double> getCrossSections() const;
0126   void addToCrossSectionErrors(const double&);
0127   std::size_t crossSectionErrors_size() const;
0128   double getCrossSectionErrors(std::size_t) const;
0129   std::vector<double>::const_iterator crossSectionErrors_begin() const;
0130   std::vector<double>::const_iterator crossSectionErrors_end() const;
0131   podio::RelationRange<double> getCrossSectionErrors() const;
0132 
0133   /// check whether the object is actually available
0134   bool isAvailable() const;
0135   /// disconnect from GeneratorEventParametersObj instance
0136   void unlink() {
0137     m_obj = podio::utils::MaybeSharedPtr<GeneratorEventParametersObj>{nullptr};
0138   }
0139 
0140   bool operator==(const MutableGeneratorEventParameters& other) const {
0141     return m_obj == other.m_obj;
0142   }
0143   bool operator==(const GeneratorEventParameters& other) const;
0144 
0145   bool operator!=(const MutableGeneratorEventParameters& other) const {
0146     return !(*this == other);
0147   }
0148   bool operator!=(const GeneratorEventParameters& other) const {
0149     return !(*this == other);
0150   }
0151 
0152   // less comparison operator, so that objects can be e.g. stored in sets.
0153   bool operator<(const MutableGeneratorEventParameters& other) const {
0154     return podio::detail::getOrderKey(*this) < podio::detail::getOrderKey(other);
0155   }
0156 
0157   podio::ObjectID id() const {
0158     return getObjectID();
0159   }
0160 
0161   const podio::ObjectID getObjectID() const;
0162 
0163   friend void swap(MutableGeneratorEventParameters& a, MutableGeneratorEventParameters& b) {
0164     using std::swap;
0165     swap(a.m_obj, b.m_obj); // swap out the internal pointers
0166   }
0167 
0168 private:
0169   /// constructor from existing GeneratorEventParametersObj
0170   explicit MutableGeneratorEventParameters(podio::utils::MaybeSharedPtr<GeneratorEventParametersObj> obj);
0171 
0172   podio::utils::MaybeSharedPtr<GeneratorEventParametersObj> m_obj{nullptr};
0173 };
0174 
0175 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0176 void to_json(nlohmann::json& j, const MutableGeneratorEventParameters& value);
0177 #endif
0178 
0179 } // namespace edm4hep
0180 
0181 #endif