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 
10 
12 
13 #include <string>
14 #include <vector>
15 namespace edm { class Event; class EventSetup; class ConsumesCollector;}
19 
21 
22 public:
23 
28 
29  ctfseeding::SeedingLayerSets layers(const edm::EventSetup& es); // only for backwards-compatibility
30 
31  bool check(const edm::EventSetup& es);
32  void updateEventSetup(const edm::EventSetup& es);
33 
34  typedef unsigned short LayerSetIndex;
35  unsigned short numberOfLayersInSet() const { return theNumberOfLayersInSet; }
36  const std::vector<LayerSetIndex>& layerSetIndices() const { return theLayerSetIndices; }
37 
38  unsigned short numberOfLayers() const { return theLayers.size(); }
39  const std::vector<std::string>& layerNames() const { return theLayerNames; }
40  const std::vector<const DetLayer *>& layerDets() const { return theLayerDets; }
41  void hits(const edm::Event& ev, const edm::EventSetup& es, std::vector<unsigned int> & indices, ctfseeding::SeedingLayer::Hits & hits) const;
42 
43  using SeedingLayerId = std::tuple<GeomDetEnumerators::SubDetector, ctfseeding::SeedingLayer::Side, int>;
44  static SeedingLayerId nameToEnumId(const std::string& name);
45  static std::vector<std::vector<std::string> > layerNamesInSets(const std::vector<std::string> & namesPSet) ;
46 
47 private:
48  edm::ParameterSet layerConfig(const std::string & nameLayer,const edm::ParameterSet& cfg) const;
49 
52 
53  struct LayerSpec {
54  LayerSpec(unsigned short index, const std::string& layerName, const edm::ParameterSet& cfgLayer, edm::ConsumesCollector& iC);
55  ~LayerSpec();
56  const unsigned short nameIndex;
60 
63  int idLayer;
64  std::shared_ptr<ctfseeding::HitExtractor> extractor;
65 
66  std::string print(const std::vector<std::string>& names) const;
67  };
68  unsigned short theNumberOfLayersInSet;
69  std::vector<LayerSetIndex> theLayerSetIndices; // indices to theLayers to form the layer sets
70  std::vector<std::string> theLayerNames;
71  std::vector<const DetLayer *> theLayerDets;
72  std::vector<const TransientTrackingRecHitBuilder *> theTTRHBuilders;
73  std::vector<LayerSpec> theLayers;
74 };
75 #endif
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
static const HistoName names[]
std::vector< LayerSpec > theLayers
edm::ESWatcher< TrackerRecoGeometryRecord > geometryWatcher_
std::vector< std::string > theLayerNames
std::vector< HitPointer > Hits
Definition: SeedingLayer.h:28
bool ev
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
const std::vector< std::string > & layerNames() const
std::vector< const TransientTrackingRecHitBuilder * > theTTRHBuilders
GeomDetEnumerators::SubDetector subdet
const std::vector< const DetLayer * > & layerDets() const
unsigned short numberOfLayersInSet() const
std::shared_ptr< ctfseeding::HitExtractor > extractor
edm::ESWatcher< TransientRecHitRecord > trhWatcher_
std::vector< LayerSetIndex > theLayerSetIndices
unsigned short numberOfLayers() const
HLT enums.
std::tuple< GeomDetEnumerators::SubDetector, ctfseeding::SeedingLayer::Side, int > SeedingLayerId
const std::vector< LayerSetIndex > & layerSetIndices() const
static void check(T const &p, std::string const &id, SelectedProducts const &iProducts)
std::vector< const DetLayer * > theLayerDets
ctfseeding::SeedingLayer::Side side
std::vector< std::vector< SeedingLayer > > SeedingLayerSets