@@ -21,9 +21,25 @@ namespace KinKal {
2121 // construct from PCA and material
2222 StrawXing (PCA const & pca, StrawMaterial const & smat);
2323 virtual ~StrawXing () {}
24+ // copy constructor
25+ StrawXing (StrawXing const & rhs):
26+ ElementXing<KTRAJ>(rhs),
27+ axis_ (rhs.axis_),
28+ smat_ (rhs.smat_),
29+ tpca_ (
30+ rhs.closestApproach().particleTraj(),
31+ axis_,
32+ rhs.closestApproach().hint(),
33+ rhs.closestApproach().precision()
34+ ),
35+ toff_ (rhs.toff_),
36+ sxconfig_ (rhs.sxconfig_),
37+ varscale_ (rhs.varscale_),
38+ mxings_ (rhs.mxings_),
39+ fparams_ (rhs.fparams_){
40+ /* */
41+ }
2442 // clone op for reinstantiation
25- // ejc TODO does typeof(tpca_) == ClosestApproach<> need a deeper clone?
26- StrawXing (StrawXing const & rhs) = default ;
2743 std::shared_ptr< ElementXing<KTRAJ> > clone (CloneContext& context) const override {
2844 auto rv = std::make_shared< StrawXing<KTRAJ> >(*this );
2945 auto ca = rv->closestApproach ();
@@ -47,8 +63,7 @@ namespace KinKal {
4763 auto const & strawMaterial () const { return smat_; }
4864 auto const & config () const { return sxconfig_; }
4965 auto precision () const { return tpca_.precision (); }
50- // other accessors
51- void setClosestApproach (const CA& ca){ tpca_ = ca; }
66+
5267 private:
5368 SensorLine axis_; // straw axis, expressed as a timeline
5469 StrawMaterial const & smat_;
@@ -58,6 +73,9 @@ namespace KinKal {
5873 double varscale_; // variance scale
5974 std::vector<MaterialXing> mxings_;
6075 Parameters fparams_; // parameter change for forwards time
76+
77+ // modifiers to support cloning
78+ void setClosestApproach (const CA& ca){ tpca_ = ca; }
6179 };
6280
6381 template <class KTRAJ > StrawXing<KTRAJ>::StrawXing(PCA const & pca, StrawMaterial const & smat) :
0 commit comments