Skip to content
Snippets Groups Projects
Commit 6cf4e1db authored by Tamara Vazquez Schroeder's avatar Tamara Vazquez Schroeder
Browse files

Merge branch '21.0-AFPToF_pulseLength' into '21.0'

Add pulse length information to AFP time-of-flight

See merge request !6504

Former-commit-id: 97a75554d63fa9a5ee4952bae5e8fe0947db2a58
parents d2c06a9a 69974629
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment