CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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>;
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
ctfseeding::SeedingLayerSets layers(const edm::EventSetup &es)
tuple cfg
Definition: looper.py:293
static const HistoName names[]
std::vector< LayerSpec > theLayers
edm::ESWatcher< TrackerRecoGeometryRecord > geometryWatcher_
LayerSpec(unsigned short index, const std::string &layerName, const edm::ParameterSet &cfgLayer, edm::ConsumesCollector &iC)
std::vector< std::string > theLayerNames
std::vector< HitPointer > Hits
Definition: SeedingLayer.h:28
bool ev
bool check(const edm::EventSetup &es)
const std::vector< std::string > & layerNames() const
Definition: Event.h:16
std::vector< const TransientTrackingRecHitBuilder * > theTTRHBuilders
GeomDetEnumerators::SubDetector subdet
const std::vector< const DetLayer * > & layerDets() const
unsigned short numberOfLayersInSet() const
void updateEventSetup(const edm::EventSetup &es)
std::shared_ptr< ctfseeding::HitExtractor > extractor
edm::ESWatcher< TransientRecHitRecord > trhWatcher_
std::vector< LayerSetIndex > theLayerSetIndices
static SeedingLayerId nameToEnumId(const std::string &name)
unsigned short numberOfLayers() const
std::string print(const std::vector< std::string > &names) const
void hits(const edm::Event &ev, const edm::EventSetup &es, std::vector< unsigned int > &indices, ctfseeding::SeedingLayer::Hits &hits) const
std::tuple< GeomDetEnumerators::SubDetector, ctfseeding::SeedingLayer::Side, int > SeedingLayerId
edm::ParameterSet layerConfig(const std::string &nameLayer, const edm::ParameterSet &cfg) const
const std::vector< LayerSetIndex > & layerSetIndices() const
std::vector< const DetLayer * > theLayerDets
ctfseeding::SeedingLayer::Side side
std::vector< std::vector< SeedingLayer > > SeedingLayerSets
static std::vector< std::vector< std::string > > layerNamesInSets(const std::vector< std::string > &namesPSet)