diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationTool.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationTool.h index cd78fef0deeb4e9d731cada1bfb4a52ac8f0bb45..3780657721fe779550295c9ba467bf8ab8653d8d 100644 --- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationTool.h +++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationTool.h @@ -91,8 +91,8 @@ public: */ bool driftRadiusFromTime( MdtCalibHit &hit, const MdtCalibrationSvcInput &inputData, bool resolFromRtrack=false ) const; - /** TDC bin size. 25/32 ns for all MDT/sMDT, except BMG=0.2ns */ - double tdcBinSize(const Identifier &id) const; + /** TDC bin size. 25/32 ns for all MDT/sMDT */ + double tdcBinSize() const; /** Convert the raw MDT times of two twin hits into a Twin position (coordinate along tube) It returns whether the conversion was successful. */ diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationTool.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationTool.cxx index acbedbb0f77b2bd1fc45ffc7c2d6641887ff1ac3..f5356178e6255c8e916f2aa7c97007b4ebfa024e 100644 --- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationTool.cxx +++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationTool.cxx @@ -71,8 +71,6 @@ public: double m_unphysicalHitRadiusUpperBound; double m_unphysicalHitRadiusLowerBound; double m_resTwin; - bool m_BMGpresent; - int m_BMGid; }; @@ -86,9 +84,7 @@ MdtCalibrationTool::Imp::Imp(std::string name) : m_doTMaxShift(false), m_unphysicalHitRadiusUpperBound(-1.), m_unphysicalHitRadiusLowerBound(-1.), - m_resTwin(-1.), - m_BMGpresent(false), - m_BMGid(-1) + m_resTwin(-1.) {} @@ -128,12 +124,6 @@ StatusCode MdtCalibrationTool::initialize() { ATH_CHECK(m_idHelperSvc.retrieve()); - // assign BMG identifier - m_imp->m_BMGpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG") != -1; - if(m_imp->m_BMGpresent){ - ATH_MSG_INFO("Processing configuration for layouts with BMG chambers."); - m_imp->m_BMGid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG"); - } // initialise MuonGeoModel access ATH_CHECK(detStore()->retrieve( m_imp->m_muonGeoManager )); @@ -291,7 +281,7 @@ bool MdtCalibrationTool::driftRadiusFromTime( MdtCalibHit &hit, hit.setTimeOfFlight( settings.doTof ? triggerTime : 0. ); // calculate drift time - double driftTime = hit.tdcCount() * tdcBinSize(id) - hit.timeOfFlight() + double driftTime = hit.tdcCount() * tdcBinSize() - hit.timeOfFlight() - hit.tubeT0() - hit.propagationTime(); hit.setDriftTime( driftTime ); @@ -381,7 +371,7 @@ bool MdtCalibrationTool::driftRadiusFromTime( MdtCalibHit &hit, // summary ATH_MSG_VERBOSE( "driftRadiusFromTime for tube " << m_idHelperSvc->mdtIdHelper().print_to_string(id) << (calibOk ? " OK" : "FAILED") ); - ATH_MSG_VERBOSE( " raw drift time " << hit.tdcCount() * tdcBinSize(id) + ATH_MSG_VERBOSE( " raw drift time " << hit.tdcCount() * tdcBinSize() << " TriggerOffset " << inputData.triggerOffset << endmsg << "Tof " << inputData.tof << " Propagation Delay " << hit.propagationTime() << " T0 " << hit.tubeT0() @@ -433,8 +423,8 @@ bool MdtCalibrationTool::twinPositionFromTwinHits( MdtCalibHit &hit, const MuonGM::MdtReadoutElement *geoSecond = secondHit.geometry(); // get 'raw' drifttimes of twin pair; we don't use timeofFlight or propagationTime cause they are irrelevant for twin coordinate - double driftTime = hit.tdcCount()*tdcBinSize(id) - hit.tubeT0(); - double driftTimeSecond = secondHit.tdcCount()*tdcBinSize(idSecond) - secondHit.tubeT0(); + double driftTime = hit.tdcCount()*tdcBinSize() - hit.tubeT0(); + double driftTimeSecond = secondHit.tdcCount()*tdcBinSize() - secondHit.tubeT0(); if(!geo) { ATH_MSG_WARNING( "Geometry not set for first hit" ); @@ -638,10 +628,7 @@ bool MdtCalibrationTool::twinPositionFromTwinHits( MdtCalibHit &hit, return true; } //end MdtCalibrationTool::twinPositionFromTwinHits -double MdtCalibrationTool::tdcBinSize(const Identifier &id) const { -//BMG which uses HPTDC instead of AMT, and has 0.2ns TDC ticksize - if( m_idHelperSvc->mdtIdHelper().stationName(id) == m_imp->m_BMGid && m_imp->m_BMGpresent) - return 0.1953125; // 25/128 +double MdtCalibrationTool::tdcBinSize() const { return 0.78125; //25/32; exact number: (1000.0/40.079)/32.0 } diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.h index 9241061bd259787ee730c2b7a849cbd986595c05..176df1337d2485168a32f0bdbb1affd7d0a4c337 100755 --- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.h +++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.h @@ -80,6 +80,12 @@ inline MdtDigit* Muon::MdtRDO_Decoder::getDigit(const MdtAmtHit* amtHit, uint16_ int tdcCounts = coarse*32+fine; +// If chamber uses HPTDC digitization chip adjust ADC/TDC ticksize (BMG, new BIS7 installed in LS2) + if( m_idHelperSvc->hasHPTDC(chanId) ) { + tdcCounts /= 4; + width /= 4; + } + MdtDigit* mdtDigit = new MdtDigit(chanId,tdcCounts,width,amtHit->isMasked()); return mdtDigit;