diff --git a/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHit_v1.h b/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHit_v1.h index ba6dd59fca7729c91533c862a6e61fab37edbc1d..bbbbc3f7b01db0df38b6396ea8075b0315ef8241 100644 --- a/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHit_v1.h +++ b/Event/xAOD/xAODForward/xAODForward/versions/AFPToFHit_v1.h @@ -64,8 +64,10 @@ namespace xAOD { /// @brief Lenght of the signal pulse which is proportional to the signal /// amplitude /// - /// The returned value is roughly lenght of the signal above - /// threshold expressed in nanoseconds. + /// The returned value is lenght of the signal above + /// threshold expressed in nanoseconds. Available values should be + /// multiples of 0.521. Pulse lenght of 1 nanosecond corresponds + /// roughtly to signal of about 67 mV. float pulseLength() const; void setPulseLength(float pulseLength); diff --git a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/src/AFP_ByteStream2RawCnv.cxx b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/src/AFP_ByteStream2RawCnv.cxx index fa1a4566fcae1c235606f78a096c3de1a819c0f8..815d4b04cb162c065142d10b7962e2673106be4a 100644 --- a/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/src/AFP_ByteStream2RawCnv.cxx +++ b/ForwardDetectors/AFP/AFP_ByteStream2RawCnv/src/AFP_ByteStream2RawCnv.cxx @@ -159,6 +159,7 @@ StatusCode AFP_ByteStream2RawCnv::fillCollection(const OFFLINE_FRAGMENTS_NAMESPA ToFData.setHeader( m_wordReadout.getBits (23, 21) ); ToFData.setEdge( m_wordReadout.getBits (20, 20) ); ToFData.setChannel( m_wordReadout.getBits (19, 16) ); + ToFData.setPulseLength( m_wordReadout.getBits (15, 10) ); ToFData.setTime( m_wordReadout.getBits (9, 0) ); setDataHeader (&ToFData); diff --git a/ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.cxx b/ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.cxx index 165cfde9bc5845a5e82498de730023aef44e59c1..d846794909e065b11f53b78d720add315690bfdc 100644 --- a/ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.cxx +++ b/ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.cxx @@ -119,7 +119,7 @@ void AFP_Raw2DigiTool::newXAODHitToF (xAOD::AFPToFHitContainer* tofHitContainer, const uint32_t hitLink = data.link(); const unsigned int robID = collection.robId(); xAODToFHit->setTime(data.time()*s_timeConversionFactor); - xAODToFHit->setPulseLength(0); // currently there is no information in raw data about pulse length + xAODToFHit->setPulseLength(data.pulseLength()*s_pulseLengthFactor); xAODToFHit->setHptdcChannel(data.channel()); // set station ID diff --git a/ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.h b/ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.h index 5ed5aa478e5f3355a6ec553a07652f3e469ecf1f..9c6a8a4e35b29b93fcdf65e6820690ddcc23f9c7 100644 --- a/ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.h +++ b/ForwardDetectors/AFP/AFP_Raw2Digi/src/AFP_Raw2DigiTool.h @@ -52,6 +52,11 @@ protected: /// The value of the factor is 25/1024 nanoseconds static constexpr double s_timeConversionFactor = 25./1024.; + /// @brief Factor converting pulse length to time + /// + /// The value of the factor is 0.521 nanoseconds + static constexpr double s_pulseLengthFactor = 0.521; + /// @brief Function that transforms time-over-threshold to charge /// /// Transformation function can be set in steering cards diff --git a/ForwardDetectors/AFP/AFP_RawEv/AFP_RawEv/AFP_ToFRawData.h b/ForwardDetectors/AFP/AFP_RawEv/AFP_RawEv/AFP_ToFRawData.h index 043a403740f78aed1f30fb5108896a755303467f..597417720d0cd2e5bdf0be6202f9956cf1513786 100644 --- a/ForwardDetectors/AFP/AFP_RawEv/AFP_RawEv/AFP_ToFRawData.h +++ b/ForwardDetectors/AFP/AFP_RawEv/AFP_RawEv/AFP_ToFRawData.h @@ -32,6 +32,10 @@ public: uint32_t time() const {return m_time;} void setTime(const uint32_t time) {m_time = time;} + /// @copydoc AFP_ToFRawData::m_pulseLength + uint32_t pulseLength() const {return m_pulseLength;} + void setPulseLength(const uint32_t pulseLength) {m_pulseLength = pulseLength;} + private: /// @brief Value of 9-11 most significant bits /// @@ -61,5 +65,12 @@ private: /// In the following record: `xxxx xxxx xxxx xxxx xxxx xxtt tttt tttt` /// it means bits marked with `t`. Contains information about time. uint32_t m_time; + + /// @brief Value of 11-16 least significant bits + /// + /// In the following record: `xxxx xxxx xxxx xxxx LLLL LLxx xxxx xxxx` + /// it means bits marked with `L`. Contains information how long + /// signal from the bar was above threshold. + uint32_t m_pulseLength; }; #endif