SimDataFormats
TrackerDigiSimLink
interface
PixelDigiSimLink.h
Go to the documentation of this file.
1
#ifndef TRACKINGOBJECTS_PIXELDIGISIMLINK_H
2
#define TRACKINGOBJECTS_PIXELDIGISIMLINK_H
3
4
#include "
SimDataFormats/EncodedEventId/interface/EncodedEventId.h
"
5
#include <cstdint>
6
7
//typedef std::pair<unsigned int ,unsigned int > PixelDigiSimLink;
8
class
PixelDigiSimLink
{
9
public
:
10
enum
{
LowTof
,
HighTof
};
11
12
PixelDigiSimLink
(
13
unsigned
int
ch,
unsigned
int
tkId,
unsigned
int
counter
,
unsigned
int
tofBin,
EncodedEventId
e
,
float
a
) {
14
chan
= ch;
15
simTkId
= tkId;
16
CFpos
= tofBin ==
LowTof
?
counter
& 0x7FFFFFFF : (
counter
& 0x7FFFFFFF) | 0x80000000;
17
fract
=
a
;
18
eId
=
e
;
19
};
20
PixelDigiSimLink
(
unsigned
int
ch,
unsigned
int
tkId,
EncodedEventId
e
,
float
a
) {
21
chan
= ch;
22
simTkId
= tkId;
23
CFpos
= 0;
24
fract
=
a
;
25
eId
=
e
;
26
};
27
PixelDigiSimLink
() :
eId
(0) {
28
chan
= 0;
29
simTkId
= 0;
30
CFpos
= 0;
31
fract
= 0;
32
};
33
~PixelDigiSimLink
(){};
34
unsigned
int
channel
()
const
{
return
chan
; };
35
unsigned
int
SimTrackId
()
const
{
return
simTkId
; };
36
unsigned
int
CFposition
()
const
{
return
CFpos
& 0x7FFFFFFF; }
37
unsigned
int
TofBin
()
const
{
return
(
CFpos
& 0x80000000) == 0 ?
LowTof
:
HighTof
; }
38
EncodedEventId
eventId
()
const
{
return
eId
; }
39
float
fraction
()
const
{
return
fract
; };
40
41
inline
bool
operator<
(
const
PixelDigiSimLink
&
other
)
const
{
return
fraction
() <
other
.fraction(); }
42
43
private
:
44
unsigned
int
chan
;
45
unsigned
int
simTkId
;
46
uint32_t
CFpos
;
// position of the PSimHit in the CrossingFrame vector
47
// for the subdetector collection; bit 31 set if from the HighTof collection
48
EncodedEventId
eId
;
49
float
fract
;
50
};
51
#endif
PixelDigiSimLink::PixelDigiSimLink
PixelDigiSimLink(unsigned int ch, unsigned int tkId, unsigned int counter, unsigned int tofBin, EncodedEventId e, float a)
Definition:
PixelDigiSimLink.h:12
PixelDigiSimLink::~PixelDigiSimLink
~PixelDigiSimLink()
Definition:
PixelDigiSimLink.h:33
counter
Definition:
counter.py:1
PixelDigiSimLink::fraction
float fraction() const
Definition:
PixelDigiSimLink.h:39
PixelDigiSimLink::HighTof
Definition:
PixelDigiSimLink.h:10
PixelDigiSimLink::CFpos
uint32_t CFpos
Definition:
PixelDigiSimLink.h:46
PixelDigiSimLink::eId
EncodedEventId eId
Definition:
PixelDigiSimLink.h:48
PixelDigiSimLink::LowTof
Definition:
PixelDigiSimLink.h:10
PixelDigiSimLink::TofBin
unsigned int TofBin() const
Definition:
PixelDigiSimLink.h:37
PixelDigiSimLink::simTkId
unsigned int simTkId
Definition:
PixelDigiSimLink.h:45
PixelDigiSimLink
Definition:
PixelDigiSimLink.h:8
EncodedEventId
Definition:
EncodedEventId.h:11
trackingPlots.other
other
Definition:
trackingPlots.py:1467
a
double a
Definition:
hdecay.h:119
PixelDigiSimLink::CFposition
unsigned int CFposition() const
Definition:
PixelDigiSimLink.h:36
PixelDigiSimLink::chan
unsigned int chan
Definition:
PixelDigiSimLink.h:44
PixelDigiSimLink::channel
unsigned int channel() const
Definition:
PixelDigiSimLink.h:34
PixelDigiSimLink::PixelDigiSimLink
PixelDigiSimLink()
Definition:
PixelDigiSimLink.h:27
PixelDigiSimLink::SimTrackId
unsigned int SimTrackId() const
Definition:
PixelDigiSimLink.h:35
PixelDigiSimLink::fract
float fract
Definition:
PixelDigiSimLink.h:49
PixelDigiSimLink::eventId
EncodedEventId eventId() const
Definition:
PixelDigiSimLink.h:38
PixelDigiSimLink::PixelDigiSimLink
PixelDigiSimLink(unsigned int ch, unsigned int tkId, EncodedEventId e, float a)
Definition:
PixelDigiSimLink.h:20
PixelDigiSimLink::operator<
bool operator<(const PixelDigiSimLink &other) const
Definition:
PixelDigiSimLink.h:41
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
EncodedEventId.h
Generated for CMSSW Reference Manual by
1.8.16