diff --git a/Detector/DetSegmentation/DetSegmentation/GridDriftChamber.h b/Detector/DetSegmentation/DetSegmentation/GridDriftChamber.h index ef39f69260ca98bfdf1c3e08335a8058f2a812cf..465388fef4aaa563dae9e45b1e0b5b646cbbb160 100644 --- a/Detector/DetSegmentation/DetSegmentation/GridDriftChamber.h +++ b/Detector/DetSegmentation/DetSegmentation/GridDriftChamber.h @@ -23,7 +23,7 @@ typedef struct Layer double eps; double offset; Layer(){}; - Layer(double x, double y, double z, double k):layerphi(x),R(y),eps(z),offset(k){}; + Layer(double x, double y, double z, double k):layerphi(x),R(y),eps(z),offset(k){} bool operator < (const Layer &a) const { return layerphi < a.layerphi; @@ -46,7 +46,7 @@ public: const VolumeID& aVolumeID) const; virtual double distanceTrackWire(const CellID& cID, const TVector3& hit_start/*, const TVector3& hit_end*/) const; - double phi(const CellID& cID) const; +// double phi(const CellID& cID) const; inline double cell_Size() const { return m_cellSize; } inline double epsilon0() const { return m_epsilon0; } inline double detectorLength() const { return m_detectorLength; } @@ -122,6 +122,7 @@ public: protected: + double phi(const CellID& cID) const; std::map<int,LAYER> layer_params; // <layer, {layerphi, R, eps, offset}> std::map<int, std::vector<std::pair<TVector3, TVector3> >> m_wiresPositions; // < layer, vec<WireMidpoint, WireDirection> > diff --git a/Detector/DetSegmentation/src/GridDriftChamber.cpp b/Detector/DetSegmentation/src/GridDriftChamber.cpp index 3b0032e0da268aad692270744821523b834c39d6..46d601beffd86599453ee9e2c7563308248c4f49 100644 --- a/Detector/DetSegmentation/src/GridDriftChamber.cpp +++ b/Detector/DetSegmentation/src/GridDriftChamber.cpp @@ -81,8 +81,8 @@ double GridDriftChamber::distanceTrackWire(const CellID& cID, const TVector3& hi double phi_start = phi(cID); double phi_end = phi_start + returnAlpha(); - TVector3 Wstart = 10*returnWirePosition(phi_start, -1); // Convert from cm to mm - TVector3 Wend = 10*returnWirePosition(phi_end, 1); // Convert from cm to mm + TVector3 Wstart = returnWirePosition(phi_start, -1); // The default centimeter unit in DD4hep + TVector3 Wend = returnWirePosition(phi_end, 1); // The default centimeter unit in DD4hep // TVector3 a = hit_end - hit_start; TVector3 b = Wend - Wstart;