-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23101 from CTPPS/totemTiming_rechitProducer_PR
Totem Timing RecHit Producer
- Loading branch information
Showing
29 changed files
with
1,376 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,61 @@ | ||
/**************************************************************************** | ||
* | ||
* This is a part of CTPPS offline software. | ||
* Authors: | ||
* Laurent Forthomme (laurent.forthomme@cern.ch) | ||
* Nicola Minafra (nicola.minafra@cern.ch) | ||
* | ||
****************************************************************************/ | ||
* | ||
* This is a part of CTPPS offline software. | ||
* Authors: | ||
* Laurent Forthomme (laurent.forthomme@cern.ch) | ||
* Nicola Minafra (nicola.minafra@cern.ch) | ||
* | ||
****************************************************************************/ | ||
|
||
#ifndef DataFormats_CTPPSReco_CTPPSDiamondRecHit | ||
#define DataFormats_CTPPSReco_CTPPSDiamondRecHit | ||
|
||
#include "DataFormats/CTPPSDigi/interface/HPTDCErrorFlags.h" | ||
#include "DataFormats/CTPPSReco/interface/CTPPSTimingRecHit.h" | ||
|
||
/// Reconstructed hit in diamond detectors. | ||
class CTPPSDiamondRecHit | ||
class CTPPSDiamondRecHit : public CTPPSTimingRecHit | ||
{ | ||
public: | ||
CTPPSDiamondRecHit() : | ||
x_( 0. ), x_width_( 0. ), y_( 0. ), y_width_( 0. ), z_( 0. ), z_width_( 0. ), | ||
t_( 0. ), tot_( 0. ), t_precision_( 0. ), | ||
ts_index_( 0 ), hptdc_err_( 0 ), mh_( false ) | ||
{} | ||
CTPPSDiamondRecHit( float x, float x_width, float y, float y_width, float z, float z_width, float t, float tot, float t_precision, int oot_idx, const HPTDCErrorFlags& hptdc_err, const bool mh ) : | ||
x_( x ), x_width_( x_width ), y_( y ), y_width_( y_width ), z_( z ), z_width_( z_width ), | ||
t_( t ), tot_( tot ), t_precision_( t_precision ), | ||
ts_index_( oot_idx ), hptdc_err_( hptdc_err ), mh_( mh ) | ||
{} | ||
CTPPSTimingRecHit(), | ||
tot_( 0 ), tPrecision_( 0 ), tsIndex_( 0 ), hptdcErr_( 0 ), mh_( false ) {} | ||
CTPPSDiamondRecHit( float x, float xWidth, float y, float yWidth, float z, float zWidth, | ||
float t, float tot, float tPrecision, int ootIdx, | ||
const HPTDCErrorFlags &hptdcErr, const bool mh ) : | ||
CTPPSTimingRecHit( x, xWidth, y, yWidth, z, zWidth, t ), | ||
tot_( tot ), tPrecision_( tPrecision ), tsIndex_( ootIdx ), | ||
hptdcErr_( hptdcErr ), mh_( mh ) {} | ||
|
||
static constexpr int TIMESLICE_WITHOUT_LEADING = -10; | ||
|
||
inline void setX( const float& x ) { x_ = x; } | ||
inline float getX() const { return x_; } | ||
|
||
inline void setY( const float& y ) { y_ = y; } | ||
inline float getY() const { return y_; } | ||
|
||
inline void setZ( const float& z ) { z_ = z; } | ||
inline float getZ() const { return z_; } | ||
|
||
inline void setXWidth( const float& xwidth ) { x_width_ = xwidth; } | ||
inline float getXWidth() const { return x_width_; } | ||
|
||
inline void setYWidth( const float& ywidth ) { y_width_ = ywidth; } | ||
inline float getYWidth() const { return y_width_; } | ||
|
||
inline void setZWidth( const float& zwidth ) { z_width_ = zwidth; } | ||
inline float getZWidth() const { return z_width_; } | ||
|
||
inline void setT( const float& t ) { t_ = t; } | ||
inline float getT() const { return t_; } | ||
|
||
inline void setToT( const float& tot ) { tot_ = tot; } | ||
inline void setToT( float tot ) { tot_ = tot; } | ||
inline float getToT() const { return tot_; } | ||
|
||
inline void setTPrecision( const float& t_precision ) { t_precision_ = t_precision; } | ||
inline float getTPrecision() const { return t_precision_; } | ||
inline void setTPrecision( float tPrecision ) { tPrecision_ = tPrecision; } | ||
inline float getTPrecision() const { return tPrecision_; } | ||
|
||
inline void setOOTIndex( const int& i ) { ts_index_ = i; } | ||
inline int getOOTIndex() const { return ts_index_; } | ||
inline void setOOTIndex( int i ) { tsIndex_ = i; } | ||
inline int getOOTIndex() const { return tsIndex_; } | ||
|
||
inline void setMultipleHits( const bool mh ) { mh_ = mh; } | ||
inline void setMultipleHits( bool mh ) { mh_ = mh; } | ||
inline bool getMultipleHits() const { return mh_; } | ||
|
||
inline void setHPTDCErrorFlags( const HPTDCErrorFlags& err ) { hptdc_err_ = err; } | ||
inline HPTDCErrorFlags getHPTDCErrorFlags() const { return hptdc_err_; } | ||
inline void setHPTDCErrorFlags( const HPTDCErrorFlags &err ) { hptdcErr_ = err; } | ||
inline HPTDCErrorFlags getHPTDCErrorFlags() const { return hptdcErr_; } | ||
|
||
private: | ||
float x_, x_width_; | ||
float y_, y_width_; | ||
float z_, z_width_; | ||
float t_, tot_, t_precision_; | ||
/// Time over threshold | ||
float tot_; | ||
/// Expected timing precision | ||
float tPrecision_; | ||
/// Time slice index | ||
int ts_index_; | ||
HPTDCErrorFlags hptdc_err_; | ||
int tsIndex_; | ||
/// List of error flags encountered by the HPTDC | ||
HPTDCErrorFlags hptdcErr_; | ||
/// Multiple hits detected | ||
bool mh_; | ||
}; | ||
|
||
//---------------------------------------------------------------------------------------------------- | ||
|
||
inline bool operator<( const CTPPSDiamondRecHit& l, const CTPPSDiamondRecHit& r ) | ||
{ | ||
// only sort by leading edge time | ||
return ( l.getT() < r.getT() ); | ||
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/**************************************************************************** | ||
* | ||
* This is a part of CTPPS offline software. | ||
* Authors: | ||
* Laurent Forthomme (laurent.forthomme@cern.ch) | ||
* Nicola Minafra (nicola.minafra@cern.ch) | ||
* | ||
****************************************************************************/ | ||
|
||
#ifndef DataFormats_CTPPSReco_CTPPSTimingRecHit | ||
#define DataFormats_CTPPSReco_CTPPSTimingRecHit | ||
|
||
/// Reconstructed hit in timing detectors. | ||
class CTPPSTimingRecHit | ||
{ | ||
public: | ||
CTPPSTimingRecHit() : | ||
x_( 0. ), xWidth_( 0. ), y_( 0. ), yWidth_( 0. ), z_( 0. ), zWidth_( 0. ), t_( 0. ) {} | ||
CTPPSTimingRecHit( float x, float xWidth, float y, float yWidth, float z, float zWidth, float t ) : | ||
x_( x ), xWidth_( xWidth ), y_( y ), yWidth_( yWidth ), z_( z ), zWidth_( zWidth ), t_( t ) {} | ||
|
||
inline void setX( float x ) { x_ = x; } | ||
inline float getX() const { return x_; } | ||
|
||
inline void setY( float y ) { y_ = y; } | ||
inline float getY() const { return y_; } | ||
|
||
inline void setZ( float z ) { z_ = z; } | ||
inline float getZ() const { return z_; } | ||
|
||
inline void setXWidth( float xWidth ) { xWidth_ = xWidth; } | ||
inline float getXWidth() const { return xWidth_; } | ||
|
||
inline void setYWidth( float yWidth ) { yWidth_ = yWidth; } | ||
inline float getYWidth() const { return yWidth_; } | ||
|
||
inline void setZWidth( float zWidth ) { zWidth_ = zWidth; } | ||
inline float getZWidth() const { return zWidth_; } | ||
|
||
inline void setT( float t ) { t_ = t; } | ||
inline float getT() const { return t_; } | ||
|
||
protected: | ||
float x_, xWidth_; | ||
float y_, yWidth_; | ||
float z_, zWidth_; | ||
float t_; | ||
}; | ||
|
||
//---------------------------------------------------------------------------------------------------- | ||
|
||
inline bool operator<(const CTPPSTimingRecHit &l, const CTPPSTimingRecHit &r) { | ||
// only sort by leading edge time | ||
return (l.getT() < r.getT()); | ||
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/**************************************************************************** | ||
* | ||
* This is a part of CTPPS offline software. | ||
* Authors: | ||
* Laurent Forthomme (laurent.forthomme@cern.ch) | ||
* Nicola Minafra (nicola.minafra@cern.ch) | ||
* | ||
****************************************************************************/ | ||
|
||
#ifndef DataFormats_CTPPSReco_TotemTimingRecHit | ||
#define DataFormats_CTPPSReco_TotemTimingRecHit | ||
|
||
#include "DataFormats/CTPPSReco/interface/CTPPSTimingRecHit.h" | ||
|
||
/// Reconstructed hit in Totem UFSDetectors. | ||
/// \note t: time computed using algorithm getTimingAlgorithm() | ||
class TotemTimingRecHit : public CTPPSTimingRecHit | ||
{ | ||
public: | ||
enum TimingAlgorithm { NOT_SET, CFD, SMART, SIMPLE }; | ||
enum { NO_T_AVAILABLE = -100 }; | ||
|
||
TotemTimingRecHit() : | ||
CTPPSTimingRecHit(), | ||
sampicThresholdTime_( 0 ), tPrecision_( 0 ), amplitude_( 0 ), baselineRMS_( 0 ), | ||
mode_( NOT_SET ) {} | ||
|
||
TotemTimingRecHit( float x, float xWidth, float y, float yWidth, float z, float zWidth, | ||
float t, float sampicThresholdTime, float tPrecision, | ||
float amplitude, float baselineRMS, | ||
TimingAlgorithm mode ) : | ||
CTPPSTimingRecHit( x, xWidth, y, yWidth, z, zWidth, t ), | ||
sampicThresholdTime_( sampicThresholdTime ), tPrecision_( tPrecision ), | ||
amplitude_( amplitude ), baselineRMS_( baselineRMS ), mode_( mode ) {} | ||
|
||
inline void setSampicThresholdTime( float stt ) { sampicThresholdTime_ = stt; } | ||
inline float getSampicThresholdTime() const { return sampicThresholdTime_; } | ||
|
||
inline void setTPrecision( float tPrecision ) { tPrecision_ = tPrecision; } | ||
inline float getTPrecision() const { return tPrecision_; } | ||
|
||
inline void setAmplitude( float amplitude ) { amplitude_ = amplitude; } | ||
inline float getAmplitude() const { return amplitude_; } | ||
|
||
inline void setBaselineRMS( float brms ) { baselineRMS_ = brms; } | ||
inline float getBaselineRMS() const { return baselineRMS_; } | ||
|
||
inline TimingAlgorithm getTimingAlgorithm() const { return mode_; } | ||
|
||
private: | ||
float sampicThresholdTime_, tPrecision_; | ||
float amplitude_; | ||
float baselineRMS_; | ||
TimingAlgorithm mode_; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.