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 #include <cstdint>
7 
8 namespace pixelTrack {
9 
10  enum class Quality : uint8_t { bad = 0, edup, dup, loose, strict, tight, highPurity, notQuality };
11  constexpr uint32_t qualitySize{uint8_t(Quality::notQuality)};
12  constexpr std::string_view qualityName[qualitySize]{"bad", "edup", "dup", "loose", "strict", "tight", "highPurity"};
13  inline Quality qualityByName(std::string_view name) {
15  auto ret = static_cast<Quality>(qp);
16 
18  throw std::invalid_argument(std::string(name) + " is not a pixelTrack::Quality!");
19 
20  return ret;
21  }
22 
23 #ifdef GPU_SMALL_EVENTS
24  // kept for testing and debugging
25  constexpr uint32_t maxNumber() { return 2 * 1024; }
26 #else
27  // tested on MC events with 55-75 pileup events
28  constexpr uint32_t maxNumber() { return 32 * 1024; }
29 #endif
30 
31 } // namespace pixelTrack
32 
33 #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