File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Detectors/MUON/MCH/Simulation Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ class Response
7070 float inclandbfield (float thetawire, float betagamma, float bx) const ;
7171
7272 private:
73+ Station mStation {}; // /< Station type
7374 MathiesonOriginal mMathieson {}; // /< Mathieson function
7475 float mPitch = 0 .f; // /< anode-cathode pitch (cm)
7576 float mChargeSlope = 0 .f; // /< charge slope used in E to charge conversion
Original file line number Diff line number Diff line change 2626using namespace o2 ::mch;
2727
2828// _____________________________________________________________________
29- Response::Response (Station station)
29+ Response::Response (Station station) : mStation(station)
3030{
3131 if (station == Station::Type1) {
3232 mMathieson .setPitch (ResponseParam::Instance ().pitchSt1 );
@@ -68,9 +68,9 @@ float Response::etocharge(float edepos) const
6868// _____________________________________________________________________
6969float Response::getAnod (float x) const
7070{
71- int n = int (x / mPitch );
72- float wire = (x > 0 ) ? n + 0.5 : n - 0.5 ;
73- return wire * mPitch ;
71+ return ( mStation == Station::Type1)
72+ ? std::round (x / mPitch ) * mPitch
73+ : ( std::floor (x / mPitch ) + 0 . 5f ) * mPitch ;
7474}
7575
7676// _____________________________________________________________________
You can’t perform that action at this time.
0 commit comments