CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
PixelInactiveAreaTrackingRegionsSeedingLayersProducer Class Reference
Inheritance diagram for PixelInactiveAreaTrackingRegionsSeedingLayersProducer:
edm::stream::EDProducer<>

Public Member Functions

 PixelInactiveAreaTrackingRegionsSeedingLayersProducer (const edm::ParameterSet &iConfig)
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 ~PixelInactiveAreaTrackingRegionsSeedingLayersProducer () override=default
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

PixelInactiveAreaFinder inactiveAreaFinder_
 
VertexBeamspotOrigins origins_
 
SeedingLayerSetsBuilder seedingLayerSetsBuilder_
 
AreaSeededTrackingRegionsBuilder trackingRegionsBuilder_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 23 of file PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc.

Constructor & Destructor Documentation

PixelInactiveAreaTrackingRegionsSeedingLayersProducer::PixelInactiveAreaTrackingRegionsSeedingLayersProducer ( const edm::ParameterSet iConfig)

Definition at line 39 of file PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc.

39  :
40  seedingLayerSetsBuilder_(iConfig, consumesCollector()),
41  origins_(iConfig.getParameter<edm::ParameterSet>("RegionPSet"), consumesCollector()),
43  trackingRegionsBuilder_(iConfig.getParameter<edm::ParameterSet>("RegionPSet"), consumesCollector())
44 {
45  produces<SeedingLayerSetsHits>();
46  produces<TrackingRegionsSeedingLayerSets>();
47 }
T getParameter(std::string const &) const
std::vector< SeedingLayerId > layers() const
SeedingLayerSetsLooper seedingLayerSetsLooper() const
PixelInactiveAreaTrackingRegionsSeedingLayersProducer::~PixelInactiveAreaTrackingRegionsSeedingLayersProducer ( )
overridedefault

Member Function Documentation

void PixelInactiveAreaTrackingRegionsSeedingLayersProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 49 of file PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), VertexBeamspotOrigins::fillDescriptions(), SeedingLayerSetsBuilder::fillDescriptions(), PixelInactiveAreaFinder::fillDescriptions(), and AreaSeededTrackingRegionsBuilder::fillDescriptions().

49  {
51 
55  desc.add<edm::ParameterSetDescription>("RegionPSet", descRegion);
56 
59 
60  descriptions.add("pixelInactiveAreaTrackingRegionsAndSeedingLayers", desc);
61 }
static void fillDescriptions(edm::ParameterSetDescription &desc)
static void fillDescriptions(edm::ParameterSetDescription &desc, const std::string &defaultBeamSpot="offlineBeamSpot", const std::string &defaultVertex="firstStepPrimaryVertices", int defaultMaxVertices=-1)
static void fillDescriptions(edm::ParameterSetDescription &desc)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ParameterSetDescription &desc)
void PixelInactiveAreaTrackingRegionsSeedingLayersProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 63 of file PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc.

References PixelInactiveAreaFinder::InactiveAreas::areasAndLayerSets(), AreaSeededTrackingRegionsBuilder::beginEvent(), DEFINE_FWK_MODULE, SeedingLayerSetsBuilder::hits(), inactiveAreaFinder_, PixelInactiveAreaFinder::inactiveAreas(), LogTrace, eostools::move(), VertexBeamspotOrigins::origins(), origins_, edm::Event::put(), HiRegitMuonDetachedTripletStep_cff::seedingLayers, seedingLayerSetsBuilder_, and trackingRegionsBuilder_.

63  {
64  auto orphanHandle = iEvent.put(seedingLayerSetsBuilder_.hits(iEvent, iSetup));
65  const SeedingLayerSetsHits *seedingLayers = orphanHandle.product();
66 
67  auto regions = std::make_unique<TrackingRegionsSeedingLayerSets>(seedingLayers);
68 
69  const auto origins = origins_.origins(iEvent);
70  const auto builder = trackingRegionsBuilder_.beginEvent(iEvent);
71 
72  const auto allAreas = inactiveAreaFinder_.inactiveAreas(iEvent, iSetup);
73  for(const auto& origin: origins) {
74  auto areasLayerSets = allAreas.areasAndLayerSets(origin.first, origin.second); // point, half length in z
75  LogTrace("PixelInactiveAreaTrackingRegionsSeedingLayersProducer") << "Origin " << origin.first.x() << "," << origin.first.y() << "," << origin.first.z() << " z half lengh " << origin.second;
76  for(auto& areasLayerSet: areasLayerSets) {
77  auto region = builder.region(origin, areasLayerSet.first);
78  if(!region) continue;
79 #ifdef EDM_ML_DEBUG
80  auto etaPhiRegion = dynamic_cast<const RectangularEtaPhiTrackingRegion *>(region.get());
81  std::stringstream ss;
82  for(const auto& ind: areasLayerSet.second) {
83  ss << ind << ",";
84  }
85  LogTrace("PixelInactiveAreaTrackingRegionsSeedingLayersProducer") << " region eta,phi " << region->direction().eta() << "," << region->direction().phi() << " eta range " << etaPhiRegion->etaRange().min() << "," << etaPhiRegion->etaRange().max() << " phi range " << (region->direction().phi()-etaPhiRegion->phiMargin().left()) << "," << (region->direction().phi()+etaPhiRegion->phiMargin().right()) << " layer sets " << ss.str();
86 #endif
87 
88  regions->emplace_back(std::move(region), std::move(areasLayerSet.second));
89  }
90  }
91 
92  iEvent.put(std::move(regions));
93 }
Origins origins(const edm::Event &iEvent) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
std::vector< std::pair< VecArray2< Area >, std::vector< LayerSetIndex > > > areasAndLayerSets(const GlobalPoint &point, float zwidth) const
std::unique_ptr< SeedingLayerSetsHits > hits(const edm::Event &ev, const edm::EventSetup &es)
InactiveAreas inactiveAreas(const edm::Event &iEvent, const edm::EventSetup &iSetup)
#define LogTrace(id)
Builder beginEvent(const edm::Event &e) const
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

PixelInactiveAreaFinder PixelInactiveAreaTrackingRegionsSeedingLayersProducer::inactiveAreaFinder_
private

Definition at line 35 of file PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc.

Referenced by produce().

VertexBeamspotOrigins PixelInactiveAreaTrackingRegionsSeedingLayersProducer::origins_
private

Definition at line 34 of file PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc.

Referenced by produce().

SeedingLayerSetsBuilder PixelInactiveAreaTrackingRegionsSeedingLayersProducer::seedingLayerSetsBuilder_
private

Definition at line 33 of file PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc.

Referenced by produce().

AreaSeededTrackingRegionsBuilder PixelInactiveAreaTrackingRegionsSeedingLayersProducer::trackingRegionsBuilder_
private

Definition at line 36 of file PixelInactiveAreaTrackingRegionsSeedingLayersProducer.cc.

Referenced by produce().