20#ifndef TILESIMEVENT_TILEHIT_H
21#define TILESIMEVENT_TILEHIT_H
61 void scale(
float coeff);
97 inline float time (
int ind=0)
const {
return m_time[ind]; }
102 std::string
whoami (
void)
const {
return "TileHit"; }
104 void print (
void)
const;
107 operator std::string()
const;
111 const std::string &
label,
112 std::ostringstream & text);
void setTime(float t, int ind=0)
Set time of ind-th sub-hit in a hit.
Identifier m_pmt_id
Logical ID of the pmt.
void reserve(int len)
Reserve length of energy and time vectors in a hit.
HWIdentifier pmt_HWID(void) const
Return pmt hardware ID (== channel ID)
TileHit(const TileHit &)=default
static void print_to_stream(const std::vector< float > &val, const std::string &label, std::ostringstream &text)
Print contents of one vector to output stream.
int frag_ID(void) const
Return frag ID (like in BS file)
std::string whoami(void) const
Return name of this object.
void addEnergy(float e)
Add energy to the first sub-hit in a hit.
float time(int ind=0) const
Return time of ind-th sub-hit.
void resize(int len)
Resize energy and time vectors in a hit.
Identifier tt_ID(void) const
Return trigger tower ID.
TileHit & operator=(const TileHit &)=default
void scale(float coeff)
Scale energy of all sub-hits in a hit.
TileHit()
Default constructor needed for POOL.
void print(void) const
Dump contents of the hit to std::out.
std::vector< float > m_time
Time of the energy deposition relative to BC.
Identifier pmt_ID(void) const
Return logical ID of the pmt.
void setEnergy(float e, int ind=0)
Set energy of ind-th sub-hit in a hit.
float energy(int ind=0) const
Return energy of ind-th sub-hit.
Identifier identify(void) const
Return logical ID of the pmt.
int add(float energy, float time)
Add sub-hit to a given hit.
TileHit & operator=(TileHit &&)=default
std::vector< float > m_energy
Energy deposited in scint, as seen by pmt in sepatate time bins.
TileHit(TileHit &&)=default
Identifier mt_ID(void) const
Return muon trigger ID.
void setZero()
Resize energy/time vectors in a hit to one and set energy/time to zero.
~TileHit()
Default destructor.
int size(void) const
Return length of energy/time vectors.
std::string label(const std::string &format, int i)