68 for (
int i=0; i<
size; ++i) {
85 for (
int i=0; i<
size; ++i) {
87 if (fabs(dt)<delta/2.) {
110 int sizeInp = hitInp->
size();
111 for (
int i=0; i<sizeInp; ++i) {
126 return s_cabling->s2h_channel_id(
m_pmt_id);
130 return s_cabling->pmt2tt_id(
m_pmt_id);
134 return s_cabling->pmt2mt_id(
m_pmt_id);
143 std::cout << (std::string) (*
this) << std::endl;
146TileHit::operator std::string()
const
148 std::ostringstream text;
151 text <<
" Id = " + s_cabling->getTileID()->to_string(
m_pmt_id,-1);
158 const std::string &
label,
159 std::ostringstream & text)
163 std::vector<float>::const_iterator it1=val.begin();
164 std::vector<float>::const_iterator it2=val.end();
166 for ( ; it1!=it2; ++it1) text <<
" " << (*it1);
static const TileCablingService * getInstance()
get pointer to service instance
Identifier m_pmt_id
Logical ID of the pmt.
HWIdentifier pmt_HWID(void) const
Return pmt hardware ID (== channel ID)
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.
float time(int ind=0) const
Return time of ind-th sub-hit.
Identifier tt_ID(void) const
Return trigger tower ID.
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.
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.
std::vector< float > m_energy
Energy deposited in scint, as seen by pmt in sepatate time bins.
Identifier mt_ID(void) const
Return muon trigger ID.
int size(void) const
Return length of energy/time vectors.
double time(int ind=0) const
Return time of ind-th sub-hit.
double energy(int ind=0) const
Return energy of ind-th sub-hit.
int size(void) const
Return length of energy/time vectors.
std::string label(const std::string &format, int i)