// PropJoinCyl.h #ifndef PropJoinCyl_H #define PropJoinCyl_H // Propagates tracks from a starting surface to a cylinder and // then to the final surface. The radius of the intermediate // cylinder is calculated from two parameters rmin and rfac and // the starting radius r0: // if rfac*r0 < rmin, the r = rmin, otherwise r = rfac*r0. // // ObjStream example: // // [ myprop PropJoinCyl rmin=0.1 rfac=1.0 prop1=@propcz prop2=@propzc ] // #include "trfbase/PropDirected.h" #include "trfbase/PropagatorPtr.h" namespace trf { class PropJoinCyl : public PropDirected { public: // static methods // Return the type name. static TypeName get_type_name() { return "PropJoinCyl"; } // Return the creator. static ObjCreator get_creator(); // Return the type. static Type get_static_type() { return get_creator(); } private: // attributes // parameters to calculate radius double _rmin; double _rfac; // The propagators. PropagatorPtr _pprop1; PropagatorPtr _pprop2; private: // output stream void ostr(std::ostream& stream) const; public: // constructor from the two constituent propagators PropJoinCyl(double rmin, double rfac, const PropagatorPtr& pprop1, const PropagatorPtr& pprop2); // destructor ~PropJoinCyl(); // Clone. Propagator* new_propagator( ) const; // Return the type. Type get_type() const { return get_static_type(); } // Write the object data. ObjData write_data() const; // Return the attributes. double get_rmin() const { return _rmin; } double get_rfac() const { return _rfac; } const PropagatorPtr& get_prop1() const { return _pprop1; } const PropagatorPtr& get_prop2() const { return _pprop2; } // propagate a track without error in the specified direction PropStat vec_dir_prop(VTrack& trv, const Surface& srf, PropDir dir, TrackDerivative* pder =0) const; // propagate a track with error in the specified direction PropStat err_dir_prop(ETrack& trv, const Surface& srf, PropDir dir, TrackDerivative* pder =0) const; }; } // end namespace trf #endif