SimDataFormats
Associations
interface
TTTrackTruthPair.h
Go to the documentation of this file.
1
#ifndef SimDataFormats_Associations_TTrackTruthPair_h
2
#define SimDataFormats_Associations_TTrackTruthPair_h
3
4
#include "
DataFormats/L1TrackTrigger/interface/TTTrack.h
"
5
#include "
DataFormats/L1TrackTrigger/interface/TTTypes.h
"
6
#include "
SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h
"
7
8
//The goal of this class is to allow easier access in FWLite where references can be hard to get
9
//By storing a reference to the track and the tracking particle as well as the flags, it makes it much easier
10
11
template
<
typename
T>
12
class
TTTrackTruthPair
{
13
public
:
14
struct
StatusFlags
{
15
enum
Status
{
IsGenuine
= 0x1,
IsLooselyGenuine
= 0x2,
IsCombinatoric
= 0x4,
IsUnknown
= 0x8 };
16
};
17
18
private
:
19
edm::Ref<std::vector<TTTrack<T>
> >
ttTrkRef_
;
20
edm::Ref<TrackingParticleCollection>
trkPartRef_
;
21
char
flags_
;
22
23
public
:
24
TTTrackTruthPair
() :
flags_
(0) {}
25
TTTrackTruthPair
(
const
edm::Ref
<
std::vector
<
TTTrack<T>
> >& ttTrkRef,
26
const
edm::Ref<TrackingParticleCollection>
& trkPartRef,
27
int
flags
)
28
:
ttTrkRef_
(ttTrkRef),
trkPartRef_
(trkPartRef),
flags_
(
flags
) {}
29
30
edm::Ref<std::vector<TTTrack<T>
> >
ttTrk
()
const
{
return
ttTrkRef_
; }
31
edm::Ref<TrackingParticleCollection>
trkPart
()
const
{
return
trkPartRef_
; }
32
int
flags
()
const
{
return
flags_
; }
33
bool
isGenuine
()
const
{
return
(
flags_
&
StatusFlags::IsGenuine
) != 0; }
34
bool
isLooselyGenuine
()
const
{
return
(
flags_
&
StatusFlags::IsLooselyGenuine
) != 0; }
35
bool
isCombinatoric
()
const
{
return
(
flags_
&
StatusFlags::IsCombinatoric
) != 0; }
36
bool
isUnknown
()
const
{
return
(
flags_
&
StatusFlags::IsUnknown
) != 0; }
37
};
38
39
#endif
TTTrackTruthPair::trkPart
edm::Ref< TrackingParticleCollection > trkPart() const
Definition:
TTTrackTruthPair.h:31
TTTrackTruthPair::StatusFlags::Status
Status
Definition:
TTTrackTruthPair.h:15
TTTrackTruthPair::ttTrkRef_
edm::Ref< std::vector< TTTrack< T > > > ttTrkRef_
Definition:
TTTrackTruthPair.h:19
TTTrackTruthPair::TTTrackTruthPair
TTTrackTruthPair(const edm::Ref< std::vector< TTTrack< T > > > &ttTrkRef, const edm::Ref< TrackingParticleCollection > &trkPartRef, int flags)
Definition:
TTTrackTruthPair.h:25
edm::Ref
Definition:
AssociativeIterator.h:58
TTTrackTruthPair::isUnknown
bool isUnknown() const
Definition:
TTTrackTruthPair.h:36
TTTrackTruthPair::StatusFlags::IsUnknown
Definition:
TTTrackTruthPair.h:15
TTTrackTruthPair::TTTrackTruthPair
TTTrackTruthPair()
Definition:
TTTrackTruthPair.h:24
TTTrackTruthPair::isGenuine
bool isGenuine() const
Definition:
TTTrackTruthPair.h:33
TTTrack.h
TTTypes.h
TTTrackTruthPair::StatusFlags::IsGenuine
Definition:
TTTrackTruthPair.h:15
TTTrackTruthPair::StatusFlags
Definition:
TTTrackTruthPair.h:14
TTTrackTruthPair::ttTrk
edm::Ref< std::vector< TTTrack< T > > > ttTrk() const
Definition:
TTTrackTruthPair.h:30
TTTrackTruthPair::isCombinatoric
bool isCombinatoric() const
Definition:
TTTrackTruthPair.h:35
TTTrackTruthPair
Definition:
TTTrackTruthPair.h:12
TTTrackTruthPair::isLooselyGenuine
bool isLooselyGenuine() const
Definition:
TTTrackTruthPair.h:34
TTTrackTruthPair::flags_
char flags_
Definition:
TTTrackTruthPair.h:21
TTTrackTruthPair::StatusFlags::IsCombinatoric
Definition:
TTTrackTruthPair.h:15
TTTrackTruthPair::flags
int flags() const
Definition:
TTTrackTruthPair.h:32
TTTrack
Class to store the L1 Track Trigger tracks.
Definition:
TTTrack.h:29
TTTrackTruthPair::trkPartRef_
edm::Ref< TrackingParticleCollection > trkPartRef_
Definition:
TTTrackTruthPair.h:20
trackerHitRTTI::vector
Definition:
trackerHitRTTI.h:21
TrackingParticleFwd.h
TTTrackTruthPair::StatusFlags::IsLooselyGenuine
Definition:
TTTrackTruthPair.h:15
Generated for CMSSW Reference Manual by
1.8.14