Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/edm4eic/MutableTrackParameters.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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