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_MutableTrackSeed_H
0004 #define EDM4EIC_MutableTrackSeed_H
0005 
0006 #include "edm4eic/TrackSeedObj.h"
0007 // Make the immutable class available from its mutable version but not vice versa
0008 #include "edm4eic/TrackSeed.h"
0009 
0010 #include "edm4eic/TrackerHit.h"
0011 #include "edm4hep/Vector3f.h"
0012 #include "podio/RelationRange.h"
0013 #include <vector>
0014 
0015 #include "podio/utilities/MaybeSharedPtr.h"
0016 
0017 #include <cstdint>
0018 
0019 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0020 #include "nlohmann/json_fwd.hpp"
0021 #endif
0022 
0023 // forward declarations
0024 namespace edm4eic {
0025 class TrackParameters;
0026 class MutableTrackParameters;
0027 }
0028 
0029 
0030 namespace edm4eic {
0031 
0032 
0033 /** @class MutableTrackSeed
0034  *  Seed info from the realistic seed finder
0035  *  @author: S. Li, B. Schmookler, J. Osborn
0036  */
0037 class MutableTrackSeed {
0038 
0039   friend class TrackSeedCollection;
0040   friend class TrackSeedMutableCollectionIterator;
0041   friend class TrackSeed;
0042 
0043 public:
0044   using object_type = TrackSeed;
0045   using collection_type = TrackSeedCollection;
0046 
0047   /// default constructor
0048   MutableTrackSeed();
0049 
0050   /// Constructor initializing all members
0051   MutableTrackSeed(edm4hep::Vector3f perigee);
0052 
0053   /// copy constructor
0054   MutableTrackSeed(const MutableTrackSeed& other) = default;
0055 
0056   /// copy-assignment operator
0057   MutableTrackSeed& operator=(MutableTrackSeed other);
0058 
0059   /// create a mutable deep-copy of the object with identical relations
0060   /// if cloneRelations=false, the relations are not cloned and will be empty
0061   MutableTrackSeed clone(bool cloneRelations=true) const;
0062 
0063   /// destructor
0064   ~MutableTrackSeed() = default;
0065 
0066 
0067 public:
0068 
0069   /// Access the Vector for the perigee (line surface)
0070   const edm4hep::Vector3f& getPerigee() const;
0071 
0072 
0073   /// Access the Initial track parameters
0074   const edm4eic::TrackParameters getParams() const;
0075 
0076   /// Set the Vector for the perigee (line surface)
0077   void setPerigee(edm4hep::Vector3f value);
0078   /// Get mutable reference to Vector for the perigee (line surface)
0079   edm4hep::Vector3f& getPerigee();
0080   /// Get reference to Vector for the perigee (line surface)
0081   [[deprecated("use getPerigee instead")]]
0082   edm4hep::Vector3f& perigee();
0083 
0084 
0085   /// Set the Initial track parameters
0086   void setParams(const edm4eic::TrackParameters& value);
0087 
0088   void addToHits(const edm4eic::TrackerHit&);
0089   std::size_t hits_size() const;
0090   edm4eic::TrackerHit getHits(std::size_t) const;
0091   std::vector<edm4eic::TrackerHit>::const_iterator hits_begin() const;
0092   std::vector<edm4eic::TrackerHit>::const_iterator hits_end() const;
0093   podio::RelationRange<edm4eic::TrackerHit> getHits() const;
0094 
0095 
0096 
0097   /// check whether the object is actually available
0098   bool isAvailable() const;
0099   /// disconnect from TrackSeedObj instance
0100   void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackSeedObj>{nullptr}; }
0101 
0102   bool operator==(const MutableTrackSeed& other) const { return m_obj == other.m_obj; }
0103   bool operator==(const TrackSeed& other) const;
0104 
0105   bool operator!=(const MutableTrackSeed& other) const { return !(*this == other); }
0106   bool operator!=(const TrackSeed& other) const { return !(*this == other); }
0107 
0108   // less comparison operator, so that objects can be e.g. stored in sets.
0109   bool operator<(const MutableTrackSeed& other) const { return m_obj < other.m_obj; }
0110 
0111   podio::ObjectID id() const { return getObjectID(); }
0112 
0113   const podio::ObjectID getObjectID() const;
0114 
0115   friend void swap(MutableTrackSeed& a, MutableTrackSeed& b) {
0116     using std::swap;
0117     swap(a.m_obj, b.m_obj); // swap out the internal pointers
0118   }
0119 
0120 private:
0121   /// constructor from existing TrackSeedObj
0122   explicit MutableTrackSeed(podio::utils::MaybeSharedPtr<TrackSeedObj> obj);
0123 
0124   podio::utils::MaybeSharedPtr<TrackSeedObj> m_obj{nullptr};
0125 };
0126 
0127 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0128 void to_json(nlohmann::json& j, const MutableTrackSeed& value);
0129 #endif
0130 
0131 
0132 } // namespace edm4eic
0133 
0134 
0135 #endif