CMS 3D CMS Logo

TrackDefinitions.h
Go to the documentation of this file.
1 #ifndef DataFormats_Track_interface_TrackDefinitions_h
2 #define DataFormats_Track_interface_TrackDefinitions_h
3 #include <string>
4 #include <algorithm>
5 #include <stdexcept>
6 
7 namespace pixelTrack {
8 
9  enum class Quality : uint8_t { bad = 0, edup, dup, loose, strict, tight, highPurity, notQuality };
10  constexpr uint32_t qualitySize{uint8_t(Quality::notQuality)};
11  constexpr std::string_view qualityName[qualitySize]{"bad", "edup", "dup", "loose", "strict", "tight", "highPurity"};
12  inline Quality qualityByName(std::string_view name) {
14  auto ret = static_cast<Quality>(qp);
15 
17  throw std::invalid_argument(std::string(name) + " is not a pixelTrack::Quality!");
18 
19  return ret;
20  }
21 
22 #ifdef GPU_SMALL_EVENTS
23  // kept for testing and debugging
24  constexpr uint32_t maxNumber() { return 2 * 1024; }
25 #else
26  // tested on MC events with 55-75 pileup events
27  constexpr uint32_t maxNumber() { return 32 * 1024; }
28 #endif
29 
30 } // namespace pixelTrack
31 
32 #endif
Quality qualityByName(std::string const &name)
ret
prodAgent to be discontinued
const std::string qualityName[qualitySize]
constexpr uint32_t maxNumber()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
constexpr uint32_t qualitySize