Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/edm4eic/Trajectory.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_Trajectory_H
0004 #define EDM4EIC_Trajectory_H
0005 
0006 #include "edm4eic/TrajectoryObj.h"
0007 
0008 #include "edm4eic/Measurement2D.h"
0009 #include "edm4eic/TrackParameters.h"
0010 #include "podio/RelationRange.h"
0011 #include <cstdint>
0012 #include <vector>
0013 
0014 #include "podio/utilities/MaybeSharedPtr.h"
0015 #include "podio/detail/OrderKey.h"
0016 
0017 #include <ostream>
0018 #include <cstdint>
0019 
0020 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0021 #include "nlohmann/json_fwd.hpp"
0022 #endif
0023 
0024 // forward declarations
0025 namespace edm4eic {
0026 class TrajectoryCollection;
0027 class TrackSeed;
0028 class MutableTrackSeed;
0029 }
0030 
0031 
0032 namespace podio::detail {
0033 // Internal function used in less comparison operators of the datatypes and interface types
0034 OrderKey getOrderKey(const edm4eic::Trajectory& obj);
0035 };
0036 
0037 namespace edm4eic {
0038 
0039 class MutableTrajectory;
0040 class TrajectoryCollection;
0041 class TrajectoryCollectionData;
0042 
0043 /** @class Trajectory
0044  *  Raw trajectory from the tracking algorithm. What is called hit here is 2d measurement indeed.
0045  *  @author: S. Joosten, S. Li
0046  */
0047 class Trajectory {
0048 
0049   friend class MutableTrajectory;
0050   friend class TrajectoryCollection;
0051   friend class edm4eic::TrajectoryCollectionData;
0052   friend class TrajectoryCollectionIterator;
0053   friend podio::detail::OrderKey podio::detail::getOrderKey(const Trajectory & obj);
0054 
0055 public:
0056   using mutable_type = MutableTrajectory;
0057   using collection_type = TrajectoryCollection;
0058 
0059   /// default constructor
0060   Trajectory();
0061 
0062   /// Constructor initializing all members
0063   Trajectory(std::uint32_t type, std::uint32_t nStates, std::uint32_t nMeasurements, std::uint32_t nOutliers, std::uint32_t nHoles, std::uint32_t nSharedHits);
0064 
0065   /// copy constructor
0066   Trajectory(const Trajectory& other) = default;
0067 
0068   /// copy-assignment operator
0069   Trajectory& operator=(Trajectory other);
0070 
0071   /// create a mutable deep-copy of the object with identical relations
0072   /// if cloneRelations=false, the relations are not cloned and will be empty
0073   MutableTrajectory clone(bool cloneRelations=true) const;
0074 
0075   /// destructor
0076   ~Trajectory() = default;
0077 
0078   /// converting constructor from mutable object
0079   Trajectory(const MutableTrajectory& other);
0080 
0081   static Trajectory makeEmpty();
0082 
0083 public:
0084 
0085   static constexpr auto typeName = "edm4eic::Trajectory";
0086 
0087   /// Access the 0 (does not have good track fit), 1 (has good track fit)
0088   std::uint32_t getType() const;
0089 
0090   /// Access the Number of tracking steps
0091   std::uint32_t getNStates() const;
0092 
0093   /// Access the Number of hits used
0094   std::uint32_t getNMeasurements() const;
0095 
0096   /// Access the Number of hits not considered
0097   std::uint32_t getNOutliers() const;
0098 
0099   /// Access the Number of missing hits
0100   std::uint32_t getNHoles() const;
0101 
0102   /// Access the Number of shared hits with other trajectories
0103   std::uint32_t getNSharedHits() const;
0104 
0105 
0106   /// Access the Corresponding track seed
0107   const edm4eic::TrackSeed getSeed() const;
0108 
0109   std::size_t trackParameters_size() const;
0110   edm4eic::TrackParameters getTrackParameters(std::size_t) const;
0111   std::vector<edm4eic::TrackParameters>::const_iterator trackParameters_begin() const;
0112   std::vector<edm4eic::TrackParameters>::const_iterator trackParameters_end() const;
0113   podio::RelationRange<edm4eic::TrackParameters> getTrackParameters() const;
0114   std::size_t measurements_deprecated_size() const;
0115   edm4eic::Measurement2D getMeasurements_deprecated(std::size_t) const;
0116   std::vector<edm4eic::Measurement2D>::const_iterator measurements_deprecated_begin() const;
0117   std::vector<edm4eic::Measurement2D>::const_iterator measurements_deprecated_end() const;
0118   podio::RelationRange<edm4eic::Measurement2D> getMeasurements_deprecated() const;
0119   std::size_t outliers_deprecated_size() const;
0120   edm4eic::Measurement2D getOutliers_deprecated(std::size_t) const;
0121   std::vector<edm4eic::Measurement2D>::const_iterator outliers_deprecated_begin() const;
0122   std::vector<edm4eic::Measurement2D>::const_iterator outliers_deprecated_end() const;
0123   podio::RelationRange<edm4eic::Measurement2D> getOutliers_deprecated() const;
0124   std::size_t measurementChi2_size() const;
0125   float getMeasurementChi2(std::size_t) const;
0126   std::vector<float>::const_iterator measurementChi2_begin() const;
0127   std::vector<float>::const_iterator measurementChi2_end() const;
0128   podio::RelationRange<float> getMeasurementChi2() const;
0129   std::size_t outlierChi2_size() const;
0130   float getOutlierChi2(std::size_t) const;
0131   std::vector<float>::const_iterator outlierChi2_begin() const;
0132   std::vector<float>::const_iterator outlierChi2_end() const;
0133   podio::RelationRange<float> getOutlierChi2() const;
0134 
0135 
0136   /// check whether the object is actually available
0137   bool isAvailable() const;
0138   /// disconnect from TrajectoryObj instance
0139   void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrajectoryObj>{nullptr}; }
0140 
0141   bool operator==(const Trajectory& other) const { return m_obj == other.m_obj; }
0142   bool operator==(const MutableTrajectory& other) const;
0143 
0144   bool operator!=(const Trajectory& other) const { return !(*this == other); }
0145   bool operator!=(const MutableTrajectory& other) const { return !(*this == other); }
0146 
0147   // less comparison operator, so that objects can be e.g. stored in sets.
0148   bool operator<(const Trajectory& other) const { return podio::detail::getOrderKey(*this) < podio::detail::getOrderKey(other); }
0149 
0150   podio::ObjectID id() const { return getObjectID(); }
0151 
0152   const podio::ObjectID getObjectID() const;
0153 
0154   friend void swap(Trajectory& a, Trajectory& b) {
0155     using std::swap;
0156     swap(a.m_obj, b.m_obj); // swap out the internal pointers
0157   }
0158 
0159 private:
0160   /// constructor from existing TrajectoryObj
0161   explicit Trajectory(podio::utils::MaybeSharedPtr<TrajectoryObj> obj);
0162   Trajectory(TrajectoryObj* obj);
0163 
0164   podio::utils::MaybeSharedPtr<TrajectoryObj> m_obj{nullptr};
0165 };
0166 
0167 std::ostream& operator<<(std::ostream& o, const Trajectory& value);
0168 
0169 #if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
0170 void to_json(nlohmann::json& j, const Trajectory& value);
0171 #endif
0172 
0173 
0174 } // namespace edm4eic
0175 
0176 
0177 #endif