SimTracker
Common
interface
SimHitInfoForLinks.h
Go to the documentation of this file.
1
#ifndef SimTracker_Common_SimHitInfoForLinks
2
#define SimTracker_Common_SimHitInfoForLinks
3
4
#include "
SimDataFormats/TrackingHit/interface/PSimHit.h
"
5
#include <vector>
6
7
// A stripped down version of PSimHit used to save memory.
8
// Contains only the information needed to be make DigiSimLinks.
9
// Include the simHit's index in the source collection, collection name suffix
10
// index.
11
12
class
SimHitInfoForLinks
{
13
public
:
14
explicit
SimHitInfoForLinks
(
PSimHit
const
*hitp,
size_t
hitindex,
unsigned
int
tofbin)
15
:
eventId_
(hitp->
eventId
()),
trackIds_
(1, hitp->
trackId
()),
hitIndex_
(hitindex),
tofBin_
(tofbin) {}
16
17
const
EncodedEventId
&
eventId
()
const
{
return
eventId_
; }
18
const
std::vector<unsigned int> &
trackIds
()
const
{
return
trackIds_
; }
19
std::vector<unsigned int> &
trackIds
() {
return
trackIds_
; }
// needed ATM in phase2 digitizer
20
unsigned
int
trackId
()
const
{
return
trackIds_
[0]; }
21
size_t
hitIndex
()
const
{
return
hitIndex_
; }
22
unsigned
int
tofBin
()
const
{
return
tofBin_
; }
23
24
private
:
25
EncodedEventId
eventId_
;
26
std::vector<unsigned int>
trackIds_
;
27
size_t
hitIndex_
;
28
unsigned
int
tofBin_
;
29
};
30
#endif
SimHitInfoForLinks::hitIndex
size_t hitIndex() const
Definition:
SimHitInfoForLinks.h:21
SimHitInfoForLinks::eventId
const EncodedEventId & eventId() const
Definition:
SimHitInfoForLinks.h:17
SimHitInfoForLinks::hitIndex_
size_t hitIndex_
Definition:
SimHitInfoForLinks.h:27
EncodedEventId
Definition:
EncodedEventId.h:11
SimHitInfoForLinks::trackIds_
std::vector< unsigned int > trackIds_
Definition:
SimHitInfoForLinks.h:26
PSimHit.h
SimHitInfoForLinks::trackIds
const std::vector< unsigned int > & trackIds() const
Definition:
SimHitInfoForLinks.h:18
SimHitInfoForLinks
Definition:
SimHitInfoForLinks.h:12
SimHitInfoForLinks::SimHitInfoForLinks
SimHitInfoForLinks(PSimHit const *hitp, size_t hitindex, unsigned int tofbin)
Definition:
SimHitInfoForLinks.h:14
SimHitInfoForLinks::trackId
unsigned int trackId() const
Definition:
SimHitInfoForLinks.h:20
SimHitInfoForLinks::tofBin
unsigned int tofBin() const
Definition:
SimHitInfoForLinks.h:22
SimHitInfoForLinks::tofBin_
unsigned int tofBin_
Definition:
SimHitInfoForLinks.h:28
SimHitInfoForLinks::eventId_
EncodedEventId eventId_
Definition:
SimHitInfoForLinks.h:25
SimHitInfoForLinks::trackIds
std::vector< unsigned int > & trackIds()
Definition:
SimHitInfoForLinks.h:19
PSimHit
Definition:
PSimHit.h:15
Generated for CMSSW Reference Manual by
1.8.16