Back to home page

EIC code displayed by LXR

 
 

    


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

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