CMS 3D CMS Logo

PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc
Go to the documentation of this file.
6 
9 
12 
14 
15 #include "VertexBeamspotOrigins.h"
18 
19 #include <vector>
20 #include <utility>
21 #include <memory>
22 
24 public:
27 
28  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
29 
30  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
31 
32 private:
37 };
38 
40  const edm::ParameterSet& iConfig)
41  : seedingLayerSetsBuilder_(iConfig, consumesCollector()),
42  origins_(iConfig.getParameter<edm::ParameterSet>("RegionPSet"), consumesCollector()),
43  inactiveAreaFinder_(iConfig,
44  seedingLayerSetsBuilder_.layers(),
45  seedingLayerSetsBuilder_.seedingLayerSetsLooper(),
46  consumesCollector()),
47  trackingRegionsBuilder_(iConfig.getParameter<edm::ParameterSet>("RegionPSet"), consumesCollector()) {
48  produces<SeedingLayerSetsHits>();
49  produces<TrackingRegionsSeedingLayerSets>();
50 }
51 
53  edm::ConfigurationDescriptions& descriptions) {
55 
59  desc.add<edm::ParameterSetDescription>("RegionPSet", descRegion);
60 
63 
64  descriptions.add("pixelInactiveAreaTrackingRegionsAndSeedingLayers", desc);
65 }
66 
68  auto orphanHandle = iEvent.put(seedingLayerSetsBuilder_.hits(iEvent, iSetup));
69  const SeedingLayerSetsHits* seedingLayers = orphanHandle.product();
70 
71  auto regions = std::make_unique<TrackingRegionsSeedingLayerSets>(seedingLayers);
72 
73  const auto origins = origins_.origins(iEvent);
74  const auto builder = trackingRegionsBuilder_.beginEvent(iEvent);
75 
76  const auto allAreas = inactiveAreaFinder_.inactiveAreas(iEvent, iSetup);
77  for (const auto& origin : origins) {
78  auto areasLayerSets = allAreas.areasAndLayerSets(origin.first, origin.second); // point, half length in z
79  LogTrace("PixelInactiveAreaTrackingRegionsSeedingLayersProducer")
80  << "Origin " << origin.first.x() << "," << origin.first.y() << "," << origin.first.z() << " z half lengh "
81  << origin.second;
82  for (auto& areasLayerSet : areasLayerSets) {
83  auto region = builder.region(origin, areasLayerSet.first);
84  if (!region)
85  continue;
86 #ifdef EDM_ML_DEBUG
87  auto etaPhiRegion = dynamic_cast<const RectangularEtaPhiTrackingRegion*>(region.get());
88  std::stringstream ss;
89  for (const auto& ind : areasLayerSet.second) {
90  ss << ind << ",";
91  }
92  LogTrace("PixelInactiveAreaTrackingRegionsSeedingLayersProducer")
93  << " region eta,phi " << region->direction().eta() << "," << region->direction().phi() << " eta range "
94  << etaPhiRegion->etaRange().min() << "," << etaPhiRegion->etaRange().max() << " phi range "
95  << (region->direction().phi() - etaPhiRegion->phiMargin().left()) << ","
96  << (region->direction().phi() + etaPhiRegion->phiMargin().right()) << " layer sets " << ss.str();
97 #endif
98 
99  regions->emplace_back(std::move(region), std::move(areasLayerSet.second));
100  }
101  }
102 
103  iEvent.put(std::move(regions));
104 }
105 
VertexBeamspotOrigins::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc, const std::string &defaultBeamSpot="offlineBeamSpot", const std::string &defaultVertex="firstStepPrimaryVertices", int defaultMaxVertices=-1)
Definition: VertexBeamspotOrigins.cc:38
HLT_FULL_cff.seedingLayers
seedingLayers
Definition: HLT_FULL_cff.py:9855
PixelInactiveAreaFinder.h
AreaSeededTrackingRegionsBuilder::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: AreaSeededTrackingRegionsBuilder.cc:36
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
PixelInactiveAreaTrackingRegionsSeedingLayersProducer::PixelInactiveAreaTrackingRegionsSeedingLayersProducer
PixelInactiveAreaTrackingRegionsSeedingLayersProducer(const edm::ParameterSet &iConfig)
Definition: PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc:39
EDProducer.h
VertexBeamspotOrigins.h
PixelInactiveAreaTrackingRegionsSeedingLayersProducer::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc:67
PixelInactiveAreaTrackingRegionsSeedingLayersProducer::trackingRegionsBuilder_
AreaSeededTrackingRegionsBuilder trackingRegionsBuilder_
Definition: PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc:36
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
PixelInactiveAreaFinder
Definition: PixelInactiveAreaFinder.h:21
MakerMacros.h
SeedingLayerSetsBuilder::hits
std::unique_ptr< SeedingLayerSetsHits > hits(const edm::Event &ev, const edm::EventSetup &es)
Definition: SeedingLayerSetsBuilder.cc:364
SeedingLayerSetsHits.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
AreaSeededTrackingRegionsBuilder.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
PixelInactiveAreaTrackingRegionsSeedingLayersProducer::seedingLayerSetsBuilder_
SeedingLayerSetsBuilder seedingLayerSetsBuilder_
Definition: PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc:33
PixelInactiveAreaFinder::inactiveAreas
InactiveAreas inactiveAreas(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: PixelInactiveAreaFinder.cc:554
SeedingLayerSetsBuilder.h
PixelInactiveAreaFinder::InactiveAreas::areasAndLayerSets
std::vector< std::pair< VecArray2< Area >, std::vector< LayerSetIndex > > > areasAndLayerSets(const GlobalPoint &point, float zwidth) const
Definition: PixelInactiveAreaFinder.cc:373
PixelInactiveAreaFinder::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: PixelInactiveAreaFinder.cc:541
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
PixelInactiveAreaTrackingRegionsSeedingLayersProducer
Definition: PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc:23
PixelInactiveAreaTrackingRegionsSeedingLayersProducer::origins_
VertexBeamspotOrigins origins_
Definition: PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc:34
TrackingRegionsSeedingLayerSets.h
PixelInactiveAreaTrackingRegionsSeedingLayersProducer::~PixelInactiveAreaTrackingRegionsSeedingLayersProducer
~PixelInactiveAreaTrackingRegionsSeedingLayersProducer() override=default
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
PixelInactiveAreaTrackingRegionsSeedingLayersProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc:52
ParameterSet
Definition: Functions.h:16
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88272
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
AreaSeededTrackingRegionsBuilder::beginEvent
Builder beginEvent(const edm::Event &e) const
Definition: AreaSeededTrackingRegionsBuilder.cc:50
SeedingLayerSetsBuilder::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: SeedingLayerSetsBuilder.cc:244
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
SeedingLayerSetsBuilder
Definition: SeedingLayerSetsBuilder.h:31
AreaSeededTrackingRegionsBuilder
Definition: AreaSeededTrackingRegionsBuilder.h:16
VertexBeamspotOrigins
Definition: VertexBeamspotOrigins.h:15
AlignmentPI::regions
regions
Definition: AlignmentPayloadInspectorHelper.h:76
ConsumesCollector.h
TrackingRegion.h
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
ParameterSet.h
OwnVector.h
edm::Event
Definition: Event.h:73
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
VertexBeamspotOrigins::origins
Origins origins(const edm::Event &iEvent) const
Definition: VertexBeamspotOrigins.cc:53
PixelInactiveAreaTrackingRegionsSeedingLayersProducer::inactiveAreaFinder_
PixelInactiveAreaFinder inactiveAreaFinder_
Definition: PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc:35