CMS 3D CMS Logo

TTTrackTruthPair.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TrackTrigger_TTrackTruthPair_h
2 #define DataFormats_L1TrackTrigger_TTrackTruthPair_h
3 
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>
13 public:
14  struct StatusFlags {
15  enum Status { IsGenuine = 0x1, IsLooselyGenuine = 0x2, IsCombinatoric = 0x4, IsUnknown = 0x8 };
16  };
17 
18 private:
21  char flags_;
22 
23 public:
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 
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
TTTypes.h
TTTrackTruthPair::trkPartRef_
edm::Ref< TrackingParticleCollection > trkPartRef_
Definition: TTTrackTruthPair.h:20
TTTrackTruthPair::StatusFlags::IsLooselyGenuine
Definition: TTTrackTruthPair.h:15
TTTrack
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:26
TTTrackTruthPair::StatusFlags
Definition: TTTrackTruthPair.h:14
TTTrackTruthPair::ttTrk
edm::Ref< std::vector< TTTrack< T > > > ttTrk() const
Definition: TTTrackTruthPair.h:30
TTTrackTruthPair::StatusFlags::IsGenuine
Definition: TTTrackTruthPair.h:15
edm::Ref
Definition: AssociativeIterator.h:58
TTTrackTruthPair::ttTrkRef_
edm::Ref< std::vector< TTTrack< T > > > ttTrkRef_
Definition: TTTrackTruthPair.h:19
TTTrackTruthPair::flags
int flags() const
Definition: TTTrackTruthPair.h:32
TTTrackTruthPair::TTTrackTruthPair
TTTrackTruthPair(const edm::Ref< std::vector< TTTrack< T > > > &ttTrkRef, const edm::Ref< TrackingParticleCollection > &trkPartRef, int flags)
Definition: TTTrackTruthPair.h:25
TTTrack.h
TTTrackTruthPair::TTTrackTruthPair
TTTrackTruthPair()
Definition: TTTrackTruthPair.h:24
TTTrackTruthPair::isGenuine
bool isGenuine() const
Definition: TTTrackTruthPair.h:33
TTTrackTruthPair::StatusFlags::Status
Status
Definition: TTTrackTruthPair.h:15
TTTrackTruthPair
Definition: TTTrackTruthPair.h:12
TTTrackTruthPair::isCombinatoric
bool isCombinatoric() const
Definition: TTTrackTruthPair.h:35
TTTrackTruthPair::trkPart
edm::Ref< TrackingParticleCollection > trkPart() const
Definition: TTTrackTruthPair.h:31
TrackingParticleFwd.h
TTTrackTruthPair::isLooselyGenuine
bool isLooselyGenuine() const
Definition: TTTrackTruthPair.h:34
TTTrackTruthPair::flags_
char flags_
Definition: TTTrackTruthPair.h:21
TTTrackTruthPair::isUnknown
bool isUnknown() const
Definition: TTTrackTruthPair.h:36
TTTrackTruthPair::StatusFlags::IsUnknown
Definition: TTTrackTruthPair.h:15
TTTrackTruthPair::StatusFlags::IsCombinatoric
Definition: TTTrackTruthPair.h:15