SimG4CMS
Calo
interface
CaloHitID.h
Go to the documentation of this file.
1
#ifndef SimG4CMS_CaloHitID_H
2
#define SimG4CMS_CaloHitID_H
3
// File: CaloHitID.h
5
// HitID class for storing unique identifier of a Calorimetric Hit
7
8
#include <cstdint>
9
#include <iostream>
10
11
class
CaloHitID
{
12
public
:
13
CaloHitID
(
14
uint32_t
unitID
,
double
timeSlice
,
int
trackID
, uint16_t
depth
= 0,
float
tSlice = 1,
bool
ignoreTkID =
false
);
15
CaloHitID
(
float
tSlice = 1,
bool
ignoreTkID =
false
);
16
CaloHitID
(
const
CaloHitID
&);
17
const
CaloHitID
&
operator=
(
const
CaloHitID
&);
18
virtual
~CaloHitID
();
19
20
uint32_t
unitID
()
const
{
return
theUnitID
; }
21
int
timeSliceID
()
const
{
return
theTimeSliceID
; }
22
double
timeSlice
()
const
{
return
theTimeSlice
; }
23
int
trackID
()
const
{
return
theTrackID
; }
24
uint16_t
depth
()
const
{
return
theDepth
; }
25
void
setID
(uint32_t
unitID
,
double
timeSlice
,
int
trackID
, uint16_t
depth
= 0);
26
void
reset
();
27
28
void
setTrackID
(
int
trackID
) {
theTrackID
=
trackID
; }
29
bool
hasFineTrackID
()
const
{
return
theFineTrackID
!= -1; }
30
void
setFineTrackID
(
int
fineTrackID
) {
theFineTrackID
=
fineTrackID
; }
31
int
fineTrackID
()
const
{
return
hasFineTrackID
() ?
theFineTrackID
:
theTrackID
; }
32
33
bool
operator==
(
const
CaloHitID
&)
const
;
34
bool
operator<
(
const
CaloHitID
&)
const
;
35
bool
operator>
(
const
CaloHitID
&)
const
;
36
37
private
:
38
uint32_t
theUnitID
;
39
double
theTimeSlice
;
40
int
theTrackID
;
41
int
theTimeSliceID
;
42
uint16_t
theDepth
;
43
float
timeSliceUnit
;
44
bool
ignoreTrackID
;
45
int
theFineTrackID
;
46
};
47
48
std::ostream&
operator<<
(std::ostream&,
const
CaloHitID
&);
49
#endif
CaloHitID::operator=
const CaloHitID & operator=(const CaloHitID &)
Definition:
CaloHitID.cc:27
CaloHitID::depth
uint16_t depth() const
Definition:
CaloHitID.h:24
CaloHitID::operator>
bool operator>(const CaloHitID &) const
Definition:
CaloHitID.cc:79
CaloHitID::theDepth
uint16_t theDepth
Definition:
CaloHitID.h:42
CaloHitID::operator<
bool operator<(const CaloHitID &) const
Definition:
CaloHitID.cc:65
CaloHitID::trackID
int trackID() const
Definition:
CaloHitID.h:23
operator<<
std::ostream & operator<<(std::ostream &, const CaloHitID &)
Definition:
CaloHitID.cc:93
CaloHitID::unitID
uint32_t unitID() const
Definition:
CaloHitID.h:20
CaloHitID::theFineTrackID
int theFineTrackID
Definition:
CaloHitID.h:45
CaloHitID::timeSliceUnit
float timeSliceUnit
Definition:
CaloHitID.h:43
CaloHitID::setTrackID
void setTrackID(int trackID)
Definition:
CaloHitID.h:28
CaloHitID::setID
void setID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0)
Definition:
CaloHitID.cc:41
CaloHitID::timeSlice
double timeSlice() const
Definition:
CaloHitID.h:22
CaloHitID::~CaloHitID
virtual ~CaloHitID()
Definition:
CaloHitID.cc:39
CaloHitID::theTimeSlice
double theTimeSlice
Definition:
CaloHitID.h:39
CaloHitID::theTrackID
int theTrackID
Definition:
CaloHitID.h:40
CaloHitID::theTimeSliceID
int theTimeSliceID
Definition:
CaloHitID.h:41
CaloHitID::ignoreTrackID
bool ignoreTrackID
Definition:
CaloHitID.h:44
CaloHitID::operator==
bool operator==(const CaloHitID &) const
Definition:
CaloHitID.cc:58
CaloHitID::timeSliceID
int timeSliceID() const
Definition:
CaloHitID.h:21
CaloHitID::reset
void reset()
Definition:
CaloHitID.cc:49
CaloHitID
Definition:
CaloHitID.h:11
CaloHitID::fineTrackID
int fineTrackID() const
Definition:
CaloHitID.h:31
CaloHitID::setFineTrackID
void setFineTrackID(int fineTrackID)
Definition:
CaloHitID.h:30
CaloHitID::hasFineTrackID
bool hasFineTrackID() const
Definition:
CaloHitID.h:29
CaloHitID::CaloHitID
CaloHitID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0, float tSlice=1, bool ignoreTkID=false)
Definition:
CaloHitID.cc:9
CaloHitID::theUnitID
uint32_t theUnitID
Definition:
CaloHitID.h:38
Generated for CMSSW Reference Manual by
1.8.16