Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:31

0001 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
0002 
0003 #ifndef EDM4EIC_MutableTrackParameters_H
0004 #define EDM4EIC_MutableTrackParameters_H
0005 
0006 #include "edm4eic/TrackParametersObj.h"
0007 // Make the immutable class available from its mutable version but not vice versa
0008 #include "edm4eic/TrackParameters.h"
0009 
0010 #include "edm4eic/Cov6f.h"
0011 #include "edm4hep/Vector2f.h"
0012 #include <cstdint>
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 
0023 
0024 namespace edm4eic {
0025 
0026 
0027 /** @class MutableTrackParameters
0028  *  ACTS Bound Track parameters
0029  *  @author: W. Armstrong, S. Joosten, J. Osborn
0030  */
0031 class MutableTrackParameters {
0032 
0033   friend class TrackParametersCollection;
0034   friend class TrackParametersMutableCollectionIterator;
0035   friend class TrackParameters;
0036 
0037 public:
0038   using object_type = TrackParameters;
0039   using collection_type = TrackParametersCollection;
0040 
0041   /// default constructor
0042   MutableTrackParameters();
0043 
0044   /// Constructor initializing all members
0045   MutableTrackParameters(std::int32_t type, std::uint64_t surface, edm4hep::Vector2f loc, float theta, float phi, float qOverP, float time, std::int32_t pdg, edm4eic::Cov6f covariance);
0046 
0047   /// copy constructor
0048   MutableTrackParameters(const MutableTrackParameters& other) = default;
0049 
0050   /// copy-assignment operator
0051   MutableTrackParameters& operator=(MutableTrackParameters other);
0052 
0053   /// create a mutable deep-copy of the object with identical relations
0054   /// if cloneRelations=false, the relations are not cloned and will be empty
0055   MutableTrackParameters clone(bool cloneRelations=true) const;
0056 
0057   /// destructor
0058   ~MutableTrackParameters() = default;
0059 
0060 
0061 public:
0062 
0063   /// Access the Type of track parameters (-1/seed, 0/head, ...)
0064   std::int32_t getType() const;
0065 
0066   /// Access the Surface for bound parameters (geometryID)
0067   std::uint64_t getSurface() const;
0068 
0069   /// Access the 2D location on surface
0070   const edm4hep::Vector2f& getLoc() const;
0071 
0072   /// Access the Track polar angle [rad]
0073   float getTheta() const;
0074 
0075   /// Access the Track azimuthal angle [rad]
0076   float getPhi() const;
0077 
0078   /// Access the [e/GeV]
0079   float getQOverP() const;
0080 
0081   /// Access the Track time [ns]
0082   float getTime() const;
0083 
0084   /// Access the pdg pid for these parameters
0085   std::int32_t getPdg() const;
0086 
0087   /// Access the Full covariance in basis [l0,l1,theta,phi,q/p,t]
0088   const edm4eic::Cov6f& getCovariance() const;
0089 
0090 
0091 
0092   /// Set the Type of track parameters (-1/seed, 0/head, ...)
0093   void setType(std::int32_t value);
0094   /// Get mutable reference to Type of track parameters (-1/seed, 0/head, ...)
0095   std::int32_t& getType();
0096   /// Get reference to Type of track parameters (-1/seed, 0/head, ...)
0097   [[deprecated("use getType instead")]]
0098   std::int32_t& type();
0099 
0100   /// Set the Surface for bound parameters (geometryID)
0101   void setSurface(std::uint64_t value);
0102   /// Get mutable reference to Surface for bound parameters (geometryID)
0103   std::uint64_t& getSurface();
0104   /// Get reference to Surface for bound parameters (geometryID)
0105   [[deprecated("use getSurface instead")]]
0106   std::uint64_t& surface();
0107 
0108   /// Set the 2D location on surface
0109   void setLoc(edm4hep::Vector2f value);
0110   /// Get mutable reference to 2D location on surface
0111   edm4hep::Vector2f& getLoc();
0112   /// Get reference to 2D location on surface
0113   [[deprecated("use getLoc instead")]]
0114   edm4hep::Vector2f& loc();
0115 
0116   /// Set the Track polar angle [rad]
0117   void setTheta(float value);
0118   /// Get mutable reference to Track polar angle [rad]
0119   float& getTheta();
0120   /// Get reference to Track polar angle [rad]
0121   [[deprecated("use getTheta instead")]]
0122   float& theta();
0123 
0124   /// Set the Track azimuthal angle [rad]
0125   void setPhi(float value);
0126   /// Get mutable reference to Track azimuthal angle [rad]
0127   float& getPhi();
0128   /// Get reference to Track azimuthal angle [rad]
0129   [[deprecated("use getPhi instead")]]
0130   float& phi();
0131 
0132   /// Set the [e/GeV]
0133   void setQOverP(float value);
0134   /// Get mutable reference to [e/GeV]
0135   float& getQOverP();
0136   /// Get reference to [e/GeV]
0137   [[deprecated("use getQOverP instead")]]
0138   float& qOverP();
0139 
0140   /// Set the Track time [ns]
0141   void setTime(float value);
0142   /// Get mutable reference to Track time [ns]
0143   float& getTime();
0144   /// Get reference to Track time [ns]
0145   [[deprecated("use getTime instead")]]
0146   float& time();
0147 
0148   /// Set the pdg pid for these parameters
0149   void setPdg(std::int32_t value);
0150   /// Get mutable reference to pdg pid for these parameters
0151   std::int32_t& getPdg();
0152   /// Get reference to pdg pid for these parameters
0153   [[deprecated("use getPdg instead")]]
0154   std::int32_t& pdg();
0155 
0156   /// Set the Full covariance in basis [l0,l1,theta,phi,q/p,t]
0157   void setCovariance(edm4eic::Cov6f value);
0158   /// Get mutable reference to Full covariance in basis [l0,l1,theta,phi,q/p,t]
0159   edm4eic::Cov6f& getCovariance();
0160   /// Get reference to Full covariance in basis [l0,l1,theta,phi,q/p,t]
0161   [[deprecated("use getCovariance instead")]]
0162   edm4eic::Cov6f& covariance();
0163 
0164 
0165 
0166 
0167 
0168 
0169   /// check whether the object is actually available
0170   bool isAvailable() const;
0171   /// disconnect from TrackParametersObj instance
0172   void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackParametersObj>{nullptr}; }
0173 
0174   bool operator==(const MutableTrackParameters& other) const { return m_obj == other.m_obj; }
0175   bool operator==(const TrackParameters& other) const;
0176 
0177   bool operator!=(const MutableTrackParameters& other) const { return !(*this == other); }
0178   bool operator!=(const TrackParameters& other) const { return !(*this == other); }
0179 
0180   // less comparison operator, so that objects can be e.g. stored in sets.
0181   bool operator<(const MutableTrackParameters& other) const { return m_obj < other.m_obj; }
0182 
0183   podio::ObjectID id() const { return getObjectID(); }
0184 
0185   const podio::ObjectID getObjectID() const;
0186 
0187   friend void swap(MutableTrackParameters& a, MutableTrackParameters& b) {
0188     using std::swap;
0189     swap(a.m_obj, b.m_obj); // swap out the internal pointers
0190   }
0191 
0192 private:
0193   /// constructor from existing TrackParametersObj
0194   explicit MutableTrackParameters(podio::utils::MaybeSharedPtr<TrackParametersObj> obj);
0195 
0196   podio::utils::MaybeSharedPtr<TrackParametersObj> m_obj{nullptr};
0197 };
0198 
0199 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0200 void to_json(nlohmann::json& j, const MutableTrackParameters& value);
0201 #endif
0202 
0203 
0204 } // namespace edm4eic
0205 
0206 
0207 #endif