CMS 3D CMS Logo

TTTrackTruthPair.h
Go to the documentation of this file.
1 #ifndef SimDataFormats_Associations_TTrackTruthPair_h
2 #define SimDataFormats_Associations_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:
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
edm::Ref< TrackingParticleCollection > trkPart() const
edm::Ref< std::vector< TTTrack< T > > > ttTrkRef_
TTTrackTruthPair(const edm::Ref< std::vector< TTTrack< T > > > &ttTrkRef, const edm::Ref< TrackingParticleCollection > &trkPartRef, int flags)
bool isUnknown() const
bool isGenuine() const
edm::Ref< std::vector< TTTrack< T > > > ttTrk() const
bool isCombinatoric() const
bool isLooselyGenuine() const
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
edm::Ref< TrackingParticleCollection > trkPartRef_