CMS 3D CMS Logo

SeedingLayerSetsBuilder.h
Go to the documentation of this file.
1 #ifndef TkSeedingLayers_SeedingLayerSetsBuilder_H
2 #define TkSeedingLayers_SeedingLayerSetsBuilder_H
3 
6 
16 #include <string>
17 #include <vector>
18 namespace edm {
19  class Event;
20  class EventSetup;
21  class ConsumesCollector;
22 } // namespace edm
23 namespace ctfseeding {
24  class HitExtractor;
25 }
29 class DetLayer;
30 class TrackerTopology;
31 class TrackerTopologyRcd;
34 
36 public:
37  using SeedingLayerId = std::tuple<GeomDetEnumerators::SubDetector, TrackerDetSide, int>;
38 
41  const edm::InputTag& fastsimHitTag); //FastSim specific constructor
45 
47 
48  unsigned short numberOfLayers() const { return theLayers.size(); }
49  unsigned short numberOfLayerSets() const {
51  }
52  std::vector<SeedingLayerId> layers() const; // please call at most once per job per client
55  }
56 
57  const std::vector<SeedingLayerSetsHits::LayerSetIndex>& layerSetIndices() const { return theLayerSetIndices; }
58 
59  std::unique_ptr<SeedingLayerSetsHits> hits(const edm::Event& ev, const edm::EventSetup& es);
60  //new function for FastSim only
61  std::unique_ptr<SeedingLayerSetsHits> makeSeedingLayerSetsHitsforFastSim(const edm::Event& ev,
62  const edm::EventSetup& es);
63 
65  static std::vector<std::vector<std::string> > layerNamesInSets(const std::vector<std::string>& namesPSet);
66 
67 private:
68  edm::ParameterSet layerConfig(const std::string& nameLayer, const edm::ParameterSet& cfg) const;
69  void updateEventSetup(const edm::EventSetup& es);
70 
76  struct LayerSpec {
77  LayerSpec(unsigned short index,
78  const std::string& layerName,
79  const edm::ParameterSet& cfgLayer,
81  ~LayerSpec() = default;
82  LayerSpec(const LayerSpec&) = delete;
83  LayerSpec& operator=(const LayerSpec&) = delete;
84  LayerSpec(LayerSpec&&) = default;
85  LayerSpec& operator=(LayerSpec&&) = delete;
86  const unsigned short nameIndex;
91 
94  int idLayer;
95  std::unique_ptr<ctfseeding::HitExtractor> extractor;
96 
97  std::string print(const std::vector<std::string>& names) const;
98  };
99  unsigned short theNumberOfLayersInSet;
100  std::vector<SeedingLayerSetsHits::LayerSetIndex> theLayerSetIndices; // indices to theLayers to form the layer sets
101  std::vector<std::string> theLayerNames;
102  std::vector<const DetLayer*> theLayerDets;
103  std::vector<const TransientTrackingRecHitBuilder*> theTTRHBuilders;
104  std::vector<LayerSpec> theLayers;
105 };
106 
107 #endif
std::vector< const DetLayer * > theLayerDets
std::string print(const std::vector< std::string > &names) const
SeedingLayerSetsBuilder(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC, const edm::InputTag &fastsimHitTag)
std::vector< LayerSpec > theLayers
edm::ESWatcher< TrackerRecoGeometryRecord > geometryWatcher_
LayerSpec(unsigned short index, const std::string &layerName, const edm::ParameterSet &cfgLayer, edm::ConsumesCollector &iC)
edm::EDGetTokenT< FastTrackerRecHitCollection > fastSimrecHitsToken_
std::vector< std::string > theLayerNames
std::unique_ptr< SeedingLayerSetsHits > makeSeedingLayerSetsHitsforFastSim(const edm::Event &ev, const edm::EventSetup &es)
TrackerDetSide
Definition: TrackerDetSide.h:4
std::unique_ptr< ctfseeding::HitExtractor > extractor
const std::string names[nVars_]
GeomDetEnumerators::SubDetector subdet
const std::vector< SeedingLayerSetsHits::LayerSetIndex > & layerSetIndices() const
std::tuple< GeomDetEnumerators::SubDetector, TrackerDetSide, int > SeedingLayerId
void updateEventSetup(const edm::EventSetup &es)
std::unique_ptr< SeedingLayerSetsHits > hits(const edm::Event &ev, const edm::EventSetup &es)
unsigned short numberOfLayerSets() const
std::vector< SeedingLayerSetsHits::LayerSetIndex > theLayerSetIndices
SeedingLayerSetsLooper seedingLayerSetsLooper() const
std::vector< const TransientTrackingRecHitBuilder * > theTTRHBuilders
edm::ESWatcher< TransientRecHitRecord > trhWatcher_
static SeedingLayerId nameToEnumId(const std::string &name)
const edm::ESGetToken< GeometricSearchTracker, TrackerRecoGeometryRecord > trackerToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
LayerSpec & operator=(const LayerSpec &)=delete
HLT enums.
edm::ParameterSet layerConfig(const std::string &nameLayer, const edm::ParameterSet &cfg) const
unsigned short numberOfLayers() const
static void fillDescriptions(edm::ParameterSetDescription &desc)
std::vector< SeedingLayerId > layers() const
static std::vector< std::vector< std::string > > layerNamesInSets(const std::vector< std::string > &namesPSet)
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > hitBuilderToken