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 
32 public:
33  using SeedingLayerId = std::tuple<GeomDetEnumerators::SubDetector, TrackerDetSide, int>;
34 
35  SeedingLayerSetsBuilder() = default;
38  const edm::InputTag& fastsimHitTag); //FastSim specific constructor
42 
44 
45  unsigned short numberOfLayers() const { return theLayers.size(); }
46  unsigned short numberOfLayerSets() const {
48  }
49  std::vector<SeedingLayerId> layers() const; // please call at most once per job per client
52  }
53 
54  const std::vector<SeedingLayerSetsHits::LayerSetIndex>& layerSetIndices() const { return theLayerSetIndices; }
55 
56  std::unique_ptr<SeedingLayerSetsHits> hits(const edm::Event& ev, const edm::EventSetup& es);
57  //new function for FastSim only
58  std::unique_ptr<SeedingLayerSetsHits> makeSeedingLayerSetsHitsforFastSim(const edm::Event& ev,
59  const edm::EventSetup& es);
60 
62  static std::vector<std::vector<std::string> > layerNamesInSets(const std::vector<std::string>& namesPSet);
63 
64 private:
65  edm::ParameterSet layerConfig(const std::string& nameLayer, const edm::ParameterSet& cfg) const;
66  void updateEventSetup(const edm::EventSetup& es);
67 
71  struct LayerSpec {
72  LayerSpec(unsigned short index,
73  const std::string& layerName,
74  const edm::ParameterSet& cfgLayer,
76  ~LayerSpec() = default;
77  LayerSpec(const LayerSpec&) = delete;
78  LayerSpec& operator=(const LayerSpec&) = delete;
79  LayerSpec(LayerSpec&&) = default;
80  LayerSpec& operator=(LayerSpec&&) = delete;
81  const unsigned short nameIndex;
85 
88  int idLayer;
89  std::unique_ptr<ctfseeding::HitExtractor> extractor;
90 
91  std::string print(const std::vector<std::string>& names) const;
92  };
93  unsigned short theNumberOfLayersInSet;
94  std::vector<SeedingLayerSetsHits::LayerSetIndex> theLayerSetIndices; // indices to theLayers to form the layer sets
95  std::vector<std::string> theLayerNames;
96  std::vector<const DetLayer*> theLayerDets;
97  std::vector<const TransientTrackingRecHitBuilder*> theTTRHBuilders;
98  std::vector<LayerSpec> theLayers;
99 };
100 
101 #endif
SeedingLayerSetsLooper.h
GeomDetEnumerators::SubDetector
SubDetector
Definition: GeomDetEnumerators.h:10
SeedingLayerSetsBuilder::theLayers
std::vector< LayerSpec > theLayers
Definition: SeedingLayerSetsBuilder.h:98
SeedingLayerSetsBuilder::geometryWatcher_
edm::ESWatcher< TrackerRecoGeometryRecord > geometryWatcher_
Definition: SeedingLayerSetsBuilder.h:68
edm::ESWatcher< TrackerRecoGeometryRecord >
SeedingLayerSetsBuilder::theLayerDets
std::vector< const DetLayer * > theLayerDets
Definition: SeedingLayerSetsBuilder.h:96
DetLayer
Definition: DetLayer.h:21
SeedingLayerSetsBuilder::makeSeedingLayerSetsHitsforFastSim
std::unique_ptr< SeedingLayerSetsHits > makeSeedingLayerSetsHitsforFastSim(const edm::Event &ev, const edm::EventSetup &es)
Definition: SeedingLayerSetsBuilder.cc:379
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
SeedingLayerSetsBuilder::LayerSpec::side
TrackerDetSide side
Definition: SeedingLayerSetsBuilder.h:87
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
SeedingLayerSetsBuilder::~SeedingLayerSetsBuilder
~SeedingLayerSetsBuilder()
Definition: SeedingLayerSetsBuilder.cc:242
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:14
SeedingLayerSetsBuilder::LayerSpec::~LayerSpec
~LayerSpec()=default
SeedingLayerSetsBuilder::SeedingLayerSetsBuilder
SeedingLayerSetsBuilder()=default
SeedingLayerSetsBuilder::LayerSpec::LayerSpec
LayerSpec(unsigned short index, const std::string &layerName, const edm::ParameterSet &cfgLayer, edm::ConsumesCollector &iC)
Definition: SeedingLayerSetsBuilder.cc:101
SeedingLayerSetsBuilder::fastSimrecHitsToken_
edm::EDGetTokenT< FastTrackerRecHitCollection > fastSimrecHitsToken_
Definition: SeedingLayerSetsBuilder.h:70
SeedingLayerSetsBuilder::LayerSpec
Definition: SeedingLayerSetsBuilder.h:71
ctfseeding::HitExtractor
Definition: HitExtractor.h:23
SeedingLayerSetsBuilder::theLayerNames
std::vector< std::string > theLayerNames
Definition: SeedingLayerSetsBuilder.h:95
SeedingLayerSetsBuilder::layerSetIndices
const std::vector< SeedingLayerSetsHits::LayerSetIndex > & layerSetIndices() const
Definition: SeedingLayerSetsBuilder.h:54
SeedingLayerSetsBuilder::LayerSpec::subdet
GeomDetEnumerators::SubDetector subdet
Definition: SeedingLayerSetsBuilder.h:86
SeedingLayerSetsBuilder::hits
std::unique_ptr< SeedingLayerSetsHits > hits(const edm::Event &ev, const edm::EventSetup &es)
Definition: SeedingLayerSetsBuilder.cc:364
SeedingLayerSetsHits.h
SeedingLayerSetsBuilder::theLayerSetIndices
std::vector< SeedingLayerSetsHits::LayerSetIndex > theLayerSetIndices
Definition: SeedingLayerSetsBuilder.h:94
SeedingLayerSetsBuilder::LayerSpec::nameIndex
const unsigned short nameIndex
Definition: SeedingLayerSetsBuilder.h:81
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
SeedingLayerSetsBuilder::updateEventSetup
void updateEventSetup(const edm::EventSetup &es)
Definition: SeedingLayerSetsBuilder.cc:292
SeedingLayerSetsBuilder::seedingLayerSetsLooper
SeedingLayerSetsLooper seedingLayerSetsLooper() const
Definition: SeedingLayerSetsBuilder.h:50
TrackerDetSide
TrackerDetSide
Definition: TrackerDetSide.h:4
SeedingLayerSetsBuilder::SeedingLayerId
std::tuple< GeomDetEnumerators::SubDetector, TrackerDetSide, int > SeedingLayerId
Definition: SeedingLayerSetsBuilder.h:33
Event
ParameterSetDescription.h
EDGetToken.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
SeedingLayerSetsBuilder::LayerSpec::pixelHitProducer
std::string pixelHitProducer
Definition: SeedingLayerSetsBuilder.h:82
SeedingLayerSetsLooper
Definition: SeedingLayerSetsLooper.h:10
TrackerDetSide.h
edm::EventSetup
Definition: EventSetup.h:58
SeedingLayerSetsBuilder::trhWatcher_
edm::ESWatcher< TransientRecHitRecord > trhWatcher_
Definition: SeedingLayerSetsBuilder.h:69
FastTrackerRecHitCollection.h
SeedingLayerSetsBuilder::numberOfLayerSets
unsigned short numberOfLayerSets() const
Definition: SeedingLayerSetsBuilder.h:46
ctfseeding
Definition: SeedingLayerSetsBuilder.h:23
SeedingLayerSetsBuilder::nameToEnumId
static SeedingLayerId nameToEnumId(const std::string &name)
Definition: SeedingLayerSetsBuilder.cc:32
InputTag.h
looper.cfg
cfg
Definition: looper.py:297
SeedingLayerSetsBuilder::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: SeedingLayerSetsBuilder.cc:244
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
SeedingLayerSetsBuilder::LayerSpec::extractor
std::unique_ptr< ctfseeding::HitExtractor > extractor
Definition: SeedingLayerSetsBuilder.h:89
SeedingLayerSetsBuilder::theTTRHBuilders
std::vector< const TransientTrackingRecHitBuilder * > theTTRHBuilders
Definition: SeedingLayerSetsBuilder.h:97
SeedingLayerSetsBuilder::LayerSpec::idLayer
int idLayer
Definition: SeedingLayerSetsBuilder.h:88
SeedingLayerSetsBuilder::LayerSpec::usePixelHitProducer
bool usePixelHitProducer
Definition: SeedingLayerSetsBuilder.h:83
ESWatcher.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
SeedingLayerSetsBuilder
Definition: SeedingLayerSetsBuilder.h:31
SeedingLayerSetsBuilder::numberOfLayers
unsigned short numberOfLayers() const
Definition: SeedingLayerSetsBuilder.h:45
SeedingLayerSetsBuilder::LayerSpec::print
std::string print(const std::vector< std::string > &names) const
Definition: SeedingLayerSetsBuilder.cc:165
SeedingLayerSetsBuilder::LayerSpec::operator=
LayerSpec & operator=(const LayerSpec &)=delete
SeedingLayerSetsBuilder::layerNamesInSets
static std::vector< std::vector< std::string > > layerNamesInSets(const std::vector< std::string > &namesPSet)
Definition: SeedingLayerSetsBuilder.cc:275
SeedingLayerSetsBuilder::layers
std::vector< SeedingLayerId > layers() const
Definition: SeedingLayerSetsBuilder.cc:355
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
GeomDetEnumerators.h
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
FastTrackerRecHit.h
SeedingLayerSetsBuilder::LayerSpec::hitBuilder
const std::string hitBuilder
Definition: SeedingLayerSetsBuilder.h:84
EventSetup
ParameterSet.h
SeedingLayerSetsBuilder::layerConfig
edm::ParameterSet layerConfig(const std::string &nameLayer, const edm::ParameterSet &cfg) const
Definition: SeedingLayerSetsBuilder.cc:261
SeedingLayerSetsBuilder::theNumberOfLayersInSet
unsigned short theNumberOfLayersInSet
Definition: SeedingLayerSetsBuilder.h:93
edm::Event
Definition: Event.h:73
phase1PixelTopology::layerName
constexpr char const * layerName[numberOfLayers]
Definition: phase1PixelTopology.h:37
TransientTrackingRecHitBuilder
Definition: TransientTrackingRecHitBuilder.h:6
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45