Main Page
Namespaces
Classes
Package Documentation
src
SimGeneral
TrackingAnalysis
interface
EncodedTruthId.h
Go to the documentation of this file.
1
#ifndef TrackingAnalysis_EncodedTruthId_h
2
#define TrackingAnalysis_EncodedTruthId_h
3
4
#include "
SimDataFormats/EncodedEventId/interface/EncodedEventId.h
"
5
#include <iosfwd>
6
7
class
EncodedTruthId
:
public
EncodedEventId
{
8
friend
std::ostream &
operator<<
(std::ostream &os,
const
EncodedTruthId
&
id
);
9
10
public
:
11
// Constructors
12
EncodedTruthId
();
13
EncodedTruthId
(
EncodedEventId
eid
,
int
index
);
14
15
// Getters
16
int
index
()
const
{
return
index_
; }
17
18
// Operators
19
int
operator==
(
const
EncodedTruthId
&
id
)
const
{
20
if
(
EncodedEventId::operator
==(
id
)) {
21
return
index_
==
id
.index_;
22
}
else
{
23
return
EncodedEventId::operator==
(
id
);
24
}
25
}
26
27
int
operator!=
(
const
EncodedTruthId
&
id
)
const
{
return
!(
operator==
(
id
)); }
28
29
int
operator<
(
const
EncodedTruthId
&
id
)
const
{
30
if
(
EncodedEventId::operator
==(
id
)) {
31
return
index_
<
id
.index_;
32
}
else
{
33
return
(
EncodedEventId::operator
<(
id
));
34
}
35
}
36
37
private
:
38
int
index_
;
39
};
40
41
std::ostream &
operator<<
(std::ostream &os,
EncodedTruthId
&
id
);
42
43
#endif
EncodedTruthId::operator==
int operator==(const EncodedTruthId &id) const
Definition:
EncodedTruthId.h:19
EncodedTruthId::index_
int index_
Definition:
EncodedTruthId.h:38
EncodedTruthId::operator<<
friend std::ostream & operator<<(std::ostream &os, const EncodedTruthId &id)
EncodedTruthId::index
int index() const
Definition:
EncodedTruthId.h:16
EncodedTruthId
Definition:
EncodedTruthId.h:7
EncodedTruthId::operator<
int operator<(const EncodedTruthId &id) const
Definition:
EncodedTruthId.h:29
Utilities.operator
operator
Definition:
Utilities.py:24
EncodedTruthId::EncodedTruthId
EncodedTruthId()
Definition:
EncodedTruthId.cc:3
EncodedTruthId::operator!=
int operator!=(const EncodedTruthId &id) const
Definition:
EncodedTruthId.h:27
runTauDisplay.eid
eid
Definition:
runTauDisplay.py:298
EncodedEventId
Definition:
EncodedEventId.h:11
EncodedEventId.h
EncodedEventId::operator==
int operator==(const EncodedEventId &id) const
equality
Definition:
EncodedEventId.h:35
Generated for CMSSW Reference Manual by
1.8.11