Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Totem Timing RecHit Producer #23101

Merged
merged 32 commits into from
May 14, 2018
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
498a9ab
RecHit producer for Totem Timing detector
nminafra Apr 26, 2018
ca9d82d
clang-format applied to new files
nminafra Apr 26, 2018
5ff7b05
CFD for non saturated signals
nminafra Apr 29, 2018
ee5619c
First geometry attempt for totem timing in vertical RPs
nminafra Apr 16, 2018
03f1aac
First try to add distance to beam; new assembly chain for pot 120
forthommel Apr 26, 2018
2160a7a
Small fix in the y offset (to be checked)
forthommel Apr 26, 2018
0659c29
Added 020-021-121; need more rotations/mirrors
forthommel Apr 27, 2018
8c8c10e
Cleanup; first test of rotations
forthommel Apr 29, 2018
ce5af80
First refactoring of the geometry before further developments
forthommel Apr 29, 2018
c0cc5e5
More organized code
nminafra Apr 29, 2018
6232505
better test for RecoCTPPS/totemTiming
nminafra Apr 29, 2018
d053cc9
Setting the geographical ID for the vertical timing detectors
forthommel Apr 29, 2018
351adce
Small fixes in the geometry; added the geographical id to the TotemTi…
forthommel Apr 30, 2018
0b3fe30
added smoothing before time computation
nminafra Apr 29, 2018
47fd21b
Cleanup of the timing rechits
forthommel Apr 30, 2018
b9965bc
Less copy/paste, more copy numbers
forthommel Apr 30, 2018
0f45d61
Fixed some rotations for the 4 stations
forthommel Apr 30, 2018
1b027e7
General x-offset applied on all sensors parts
forthommel Apr 30, 2018
5a83b5f
Removed the now unused plane4
forthommel Apr 30, 2018
34258ae
CFD selected, other algorithm removed
nminafra Apr 30, 2018
6782d02
Test python
nminafra Apr 30, 2018
4b1dfdc
Added totemTimingLocalReconstruction to CTPPS reco sequence
nminafra Apr 30, 2018
3201302
Better ownership of constant
nminafra Apr 30, 2018
d43c251
Fixed channel order
nminafra Apr 30, 2018
c7c50e1
Subscribing TotemTimingRecHits to the CTPPS event content
nminafra May 1, 2018
b467c1f
Removed the totemTimingLocalReconstruction module from fastSim local …
forthommel May 2, 2018
99e768e
Applied @jan-kaspar's suggestion on nominal vertical pots' beam distance
forthommel May 2, 2018
b1f5c52
Removed size, left as comments for reference
nminafra May 10, 2018
e60105a
Removed explicit numbers
nminafra May 10, 2018
6d8659a
Implemented reviewers' comments
nminafra May 10, 2018
6452fa7
removed non exsisting file
nminafra May 10, 2018
b5f2af6
Merge pull request #23 from CTPPS/nminafra-patchToRecHits-1
nminafra May 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions Configuration/StandardSequences/python/Reconstruction_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@
###########################################
# no castor, zdc, Totem/CTPPS RP in FastSim
###########################################
_fastSim_localreco = localreco.copyAndExclude([castorreco,totemRPLocalReconstruction,ctppsDiamondLocalReconstruction,ctppsLocalTrackLiteProducer,ctppsPixelLocalReconstruction,trackerlocalreco])
_fastSim_localreco = localreco.copyAndExclude([
castorreco,
totemRPLocalReconstruction,totemTimingLocalReconstruction,ctppsDiamondLocalReconstruction,ctppsLocalTrackLiteProducer,ctppsPixelLocalReconstruction,
trackerlocalreco
])
fastSim.toReplaceWith(localreco, _fastSim_localreco)

#
Expand Down Expand Up @@ -109,7 +113,7 @@
globalreco = cms.Sequence(globalreco_tracking*
particleFlowCluster*
ecalClusters*
caloTowersRec*
caloTowersRec*
egammaGlobalReco*
jetGlobalReco*
muonGlobalReco*
Expand Down
93 changes: 33 additions & 60 deletions DataFormats/CTPPSReco/interface/CTPPSDiamondRecHit.h
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

58 changes: 58 additions & 0 deletions DataFormats/CTPPSReco/interface/CTPPSTimingRecHit.h
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

57 changes: 57 additions & 0 deletions DataFormats/CTPPSReco/interface/TotemTimingRecHit.h
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
24 changes: 22 additions & 2 deletions DataFormats/CTPPSReco/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "DataFormats/CTPPSReco/interface/TotemRPLocalTrack.h"

#include "DataFormats/CTPPSReco/interface/CTPPSDiamondRecHit.h"
#include "DataFormats/CTPPSReco/interface/TotemTimingRecHit.h"
#include "DataFormats/CTPPSReco/interface/CTPPSDiamondLocalTrack.h"
#include "DataFormats/CTPPSReco/interface/CTPPSPixelCluster.h"
#include "DataFormats/CTPPSReco/interface/CTPPSPixelRecHit.h"
Expand Down Expand Up @@ -51,8 +52,17 @@ namespace DataFormats_CTPPSReco {
std::vector<edm::DetSet<TotemRPLocalTrack::FittedRecHit> > v_ds_ft_frh;
std::vector<TotemRPLocalTrack::FittedRecHit> v_ft_frh;

//--- diamonds objects

//--- timing objects
CTPPSTimingRecHit ctdm_rh;
edm::Ptr<CTPPSTimingRecHit> ptr_ctdm_rh;
edm::Wrapper<CTPPSTimingRecHit> wrp_ctdm_rh;
std::vector<CTPPSTimingRecHit> vec_ctdm_rh;
std::vector<edm::DetSet<CTPPSTimingRecHit> > vec_ds_ctdm_rh;
edm::DetSet<CTPPSTimingRecHit> ds_ctdm_rh;
edm::DetSetVector<CTPPSTimingRecHit> dsv_ctdm_rh;
edm::Wrapper<edm::DetSetVector<CTPPSTimingRecHit> > wrp_dsv_ctdm_rh;
edm::Wrapper<std::vector<CTPPSTimingRecHit> > wrp_vec_ctdm_rh;

CTPPSDiamondRecHit ctd_rh;
edm::Ptr<CTPPSDiamondRecHit> ptr_ctd_rh;
edm::Wrapper<CTPPSDiamondRecHit> wrp_ctd_rh;
Expand All @@ -62,6 +72,16 @@ namespace DataFormats_CTPPSReco {
edm::DetSetVector<CTPPSDiamondRecHit> dsv_ctd_rh;
edm::Wrapper<edm::DetSetVector<CTPPSDiamondRecHit> > wrp_dsv_ctd_rh;
edm::Wrapper<std::vector<CTPPSDiamondRecHit> > wrp_vec_ctd_rh;

TotemTimingRecHit ttd_rh;
edm::Ptr<TotemTimingRecHit> ptr_ttd_rh;
edm::Wrapper<TotemTimingRecHit> wrp_ttd_rh;
std::vector<TotemTimingRecHit> vec_ttd_rh;
std::vector<edm::DetSet<TotemTimingRecHit> > vec_ds_ttd_rh;
edm::DetSet<TotemTimingRecHit> ds_ttd_rh;
edm::DetSetVector<TotemTimingRecHit> dsv_ttd_rh;
edm::Wrapper<edm::DetSetVector<TotemTimingRecHit> > wrp_dsv_ttd_rh;
edm::Wrapper<std::vector<TotemTimingRecHit> > wrp_vec_ttd_rh;

CTPPSDiamondLocalTrack ctd_lt;
edm::Ptr<CTPPSDiamondLocalTrack> ptr_ctd_lt;
Expand Down
34 changes: 30 additions & 4 deletions DataFormats/CTPPSReco/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,38 @@
<class name="std::vector<edm::DetSet<TotemRPLocalTrack::FittedRecHit> >"/>
<class name="std::vector<TotemRPLocalTrack::FittedRecHit>"/>

<!-- diamonds objects -->
<!-- timing objects -->

<class name="CTPPSDiamondRecHit" ClassVersion="5">
<class name="CTPPSTimingRecHit" ClassVersion="3">
<version ClassVersion="3" checksum="33948116"/>
</class>
<class name="edm::Ptr<CTPPSTimingRecHit>"/>
<class name="edm::Wrapper<CTPPSTimingRecHit>"/>
<class name="std::vector<CTPPSTimingRecHit>"/>
<class name="std::vector<edm::DetSet<CTPPSTimingRecHit> >"/>
<class name="edm::DetSet<CTPPSTimingRecHit>"/>
<class name="edm::DetSetVector<CTPPSTimingRecHit>"/>
<class name="edm::Wrapper<edm::DetSetVector<CTPPSTimingRecHit> >"/>
<class name="edm::Wrapper<std::vector<CTPPSTimingRecHit> >"/>


<class name="TotemTimingRecHit" ClassVersion="3">
<version ClassVersion="3" checksum="156399384"/>
</class>
<class name="edm::Ptr<TotemTimingRecHit>"/>
<class name="edm::Wrapper<TotemTimingRecHit>"/>
<class name="std::vector<TotemTimingRecHit>"/>
<class name="std::vector<edm::DetSet<TotemTimingRecHit> >"/>
<class name="edm::DetSet<TotemTimingRecHit>"/>
<class name="edm::DetSetVector<TotemTimingRecHit>"/>
<class name="edm::Wrapper<edm::DetSetVector<TotemTimingRecHit> >"/>
<class name="edm::Wrapper<std::vector<TotemTimingRecHit> >"/>

<class name="CTPPSDiamondRecHit" ClassVersion="6">
<version ClassVersion="3" checksum="2377257106"/>
<version ClassVersion="4" checksum="2150979176"/>
<version ClassVersion="5" checksum="2528095961"/>
<version ClassVersion="6" checksum="1515076457"/>
</class>
<class name="edm::Ptr<CTPPSDiamondRecHit>"/>
<class name="edm::Wrapper<CTPPSDiamondRecHit>"/>
Expand All @@ -59,6 +85,7 @@
<class name="edm::Wrapper<edm::DetSetVector<CTPPSDiamondRecHit> >"/>
<class name="edm::Wrapper<std::vector<CTPPSDiamondRecHit> >"/>


<class name="CTPPSDiamondLocalTrack" ClassVersion="4">
<version ClassVersion="3" checksum="2739193553"/>
<version ClassVersion="4" checksum="3974505177"/>
Expand Down Expand Up @@ -93,7 +120,7 @@
<class name="edm::Wrapper<edm::DetSetVector<CTPPSPixelRecHit> >"/>

<class name="CTPPSPixelLocalTrack" ClassVersion="3">
<version ClassVersion="3" checksum="4150373475"/>
<version ClassVersion="3" checksum="4150373475"/>
</class>
<class name="edm::DetSet<CTPPSPixelLocalTrack>"/>
<class name="std::vector<CTPPSPixelLocalTrack>"/>
Expand All @@ -115,4 +142,3 @@
<class name="edm::Wrapper<CTPPSLocalTrackLite>"/>
<class name="edm::Wrapper<std::vector<CTPPSLocalTrackLite>>"/>
</lcgdict>