ATLAS Offline Software
Loading...
Searching...
No Matches
TileSimHit.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5//********************************************************************
6// Filename : TileHit.h
7// Author : Zhifang
8// Created : April, 2002
9//
10// DESCRIPTION:
11// A TileHit represents the total energy deposited in scintillator
12// which is visible by one PMT
13// Energy and time is kept as double
14//
15// HISTORY:
16// 04Jun09: Copied from TileHit class
17//
18// BUGS:
19//
20// *******************************************************************
21
22#ifndef TILESIMEVENT_TILESIMHIT_H
23#define TILESIMEVENT_TILESIMHIT_H
24
25#include "Identifier/Identifier.h"
26
27#include <string>
28#include <vector>
29
31{
32public:
33
36
38 TileSimHit(Identifier & id, double energy, double time, double deltaT);
39
42
44 int add (double energy, double time, double deltaT);
45
46 /* Inline access methods */
47
49 inline Identifier identify(void) const { return m_pmt_id; }
51 inline double energy (int ind=0) const { return m_energy[ind]; }
53 inline double time (int ind=0) const { return m_time[ind]; }
55 inline int size (void) const { return m_energy.size(); }
56
57private:
58
62 std::vector<double> m_energy; //
64 std::vector<double> m_time;
65};
66
67#endif //TILESIMEVENT_TILESIMHIT_H
68
~TileSimHit()
Default destructor.
Definition TileSimHit.h:41
TileSimHit()
Default constructor needed for POOL.
Definition TileSimHit.h:35
std::vector< double > m_energy
Energy deposited in scint, as seen by pmt in sepatate time bins.
Definition TileSimHit.h:62
double time(int ind=0) const
Return time of ind-th sub-hit.
Definition TileSimHit.h:53
Identifier m_pmt_id
Logical ID of the pmt.
Definition TileSimHit.h:60
double energy(int ind=0) const
Return energy of ind-th sub-hit.
Definition TileSimHit.h:51
int add(double energy, double time, double deltaT)
Add sub-hit to a given hit with time rounding to the center of nearest deltaT bin.
std::vector< double > m_time
Time of the energy deposition relative to BC.
Definition TileSimHit.h:64
int size(void) const
Return length of energy/time vectors.
Definition TileSimHit.h:55
Identifier identify(void) const
Return logical ID of the pmt.
Definition TileSimHit.h:49