1 #ifndef __SimTracker_SiPhase2Digitizer_DigitizerUtility_h
2 #define __SimTracker_SiPhase2Digitizer_DigitizerUtility_h
12 namespace DigitizerUtility {
36 Amplitude(
float amp,
const PSimHit* hitp,
float frac = 0,
float tcor = 0,
size_t hitIndex = 0, uint32_t tofBin = 0)
40 _simInfoList.push_back({
frac, std::make_unique<SimHitInfo>(hitp, tcor, hitIndex, tofBin)});
47 operator float()
const {
return _amp; }
56 _simInfoList.push_back({ic.first, std::make_unique<SimHitInfo>(*ic.second)});
60 void set(
const float amplitude) {
66 std::vector<std::pair<float, std::unique_ptr<SimHitInfo> > >
_simInfoList;
77 float x()
const {
return _position.x(); }
78 float y()
const {
return _position.y(); }
79 float z()
const {
return _position.z(); }
80 float energy()
const {
return _energy; }
95 SignalPoint() : _pos(0, 0), _time(0), _amplitude(0), _sigma_x(1.), _sigma_y(1.), _hitp(nullptr) {}
97 SignalPoint(
float x,
float y,
float sigma_x,
float sigma_y,
float t,
float a = 1.0)
98 : _pos(x, y), _time(t), _amplitude(
a), _sigma_x(sigma_x), _sigma_y(sigma_y), _hitp(nullptr) {}
101 : _pos(x, y), _time(t), _amplitude(
a), _sigma_x(sigma_x), _sigma_y(sigma_y), _hitp(&hit) {}
104 float x()
const {
return _pos.x(); }
105 float y()
const {
return _pos.y(); }
108 float time()
const {
return _time; }
SimHitInfo(const PSimHit *hitp, float corrTime, size_t hitIndex, uint32_t tofBin)
SignalPoint(float x, float y, float sigma_x, float sigma_y, float t, const PSimHit &hit, float a=1.0)
EncodedEventId eventId() const
void set(const float amplitude)
std::vector< std::pair< float, std::unique_ptr< SimHitInfo > > > _simInfoList
SignalPoint(float x, float y, float sigma_x, float sigma_y, float t, float a=1.0)
EnergyDepositUnit(float energy, Local3DPoint position)
const std::vector< std::pair< float, std::unique_ptr< SimHitInfo > > > & simInfoList() const
Amplitude(float amp, const PSimHit *hitp, float frac=0, float tcor=0, size_t hitIndex=0, uint32_t tofBin=0)
SignalPoint & set_amplitude(float amp)
std::vector< std::pair< float, SimHitInfo * > > simInfoList
EnergyDepositUnit(float energy, float x, float y, float z)
uint32_t hitIndex() const
const LocalPoint & position() const
void migrate_position(const Local3DPoint &pos)
void operator+=(const Amplitude &other)
void operator+=(const float &)
static int position[264][3]