Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions DataFormats/CTPPSReco/interface/CTPPSDiamondLocalTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,33 @@

//----------------------------------------------------------------------------------------------------

class CTPPSDiamondLocalTrack : public CTPPSTimingLocalTrack {
public:
CTPPSDiamondLocalTrack();
CTPPSDiamondLocalTrack(
const math::XYZPoint& pos0, const math::XYZPoint& pos0_sigma, float t, float t_sigma, int oot_idx, int mult_hits);

bool containsHit(const CTPPSDiamondRecHit& recHit, float tolerance = 0.1) const;

//--- temporal set'ters

inline void setOOTIndex(int i) { ts_index_ = i; }
inline int ootIndex() const { return ts_index_; }

inline void setMultipleHits(int i) { mh_ = i; }
inline int multipleHits() const { return mh_; }

private:
/// Time slice index
int ts_index_;
/// Multiple hits counter
int mh_;
};

namespace io_v1 {
class CTPPSDiamondLocalTrack : public CTPPSTimingLocalTrack {
public:
CTPPSDiamondLocalTrack();
CTPPSDiamondLocalTrack(const math::XYZPoint& pos0,
const math::XYZPoint& pos0_sigma,
float t,
float t_sigma,
int oot_idx,
int mult_hits);

bool containsHit(const CTPPSDiamondRecHit& recHit, float tolerance = 0.1) const;

//--- temporal set'ters

inline void setOOTIndex(int i) { ts_index_ = i; }
inline int ootIndex() const { return ts_index_; }

inline void setMultipleHits(int i) { mh_ = i; }
inline int multipleHits() const { return mh_; }

private:
/// Time slice index
int ts_index_;
/// Multiple hits counter
int mh_;
};
} // namespace io_v1
using CTPPSDiamondLocalTrack = io_v1::CTPPSDiamondLocalTrack;
#endif
92 changes: 47 additions & 45 deletions DataFormats/CTPPSReco/interface/CTPPSDiamondRecHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,58 @@
#include "DataFormats/CTPPSReco/interface/CTPPSTimingRecHit.h"

/// Reconstructed hit in diamond detectors.
class CTPPSDiamondRecHit : public CTPPSTimingRecHit {
public:
CTPPSDiamondRecHit() : 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) {}
namespace io_v1 {
class CTPPSDiamondRecHit : public CTPPSTimingRecHit {
public:
CTPPSDiamondRecHit() : 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;
static constexpr int TIMESLICE_WITHOUT_LEADING = -10;

inline void setToT(float tot) { tot_ = tot; }
inline float toT() const { return tot_; }
inline void setToT(float tot) { tot_ = tot; }
inline float toT() const { return tot_; }

inline void setTPrecision(float tPrecision) { tPrecision_ = tPrecision; }
inline float tPrecision() const { return tPrecision_; }
inline void setTPrecision(float tPrecision) { tPrecision_ = tPrecision; }
inline float tPrecision() const { return tPrecision_; }

inline void setOOTIndex(int i) { tsIndex_ = i; }
inline int ootIndex() const { return tsIndex_; }
inline void setOOTIndex(int i) { tsIndex_ = i; }
inline int ootIndex() const { return tsIndex_; }

inline void setMultipleHits(bool mh) { mh_ = mh; }
inline bool multipleHits() const { return mh_; }
inline void setMultipleHits(bool mh) { mh_ = mh; }
inline bool multipleHits() const { return mh_; }

inline void setHPTDCErrorFlags(const HPTDCErrorFlags &err) { hptdcErr_ = err; }
inline HPTDCErrorFlags hptdcErrorFlags() const { return hptdcErr_; }

private:
/// Time over threshold
float tot_;
/// Expected timing precision
float tPrecision_;
/// Time slice index
int tsIndex_;
/// List of error flags encountered by the HPTDC
HPTDCErrorFlags hptdcErr_;
/// Multiple hits detected
bool mh_;
};
inline void setHPTDCErrorFlags(const HPTDCErrorFlags &err) { hptdcErr_ = err; }
inline HPTDCErrorFlags hptdcErrorFlags() const { return hptdcErr_; }

private:
/// Time over threshold
float tot_;
/// Expected timing precision
float tPrecision_;
/// Time slice index
int tsIndex_;
/// List of error flags encountered by the HPTDC
HPTDCErrorFlags hptdcErr_;
/// Multiple hits detected
bool mh_;
};
} // namespace io_v1
using CTPPSDiamondRecHit = io_v1::CTPPSDiamondRecHit;
#endif
Loading