CMS 3D CMS Logo

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

Public Member Functions

void beginRun (edm::Run const &iEvent, edm::EventSetup const &es) override
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 TICLSeedingRegionProducer (const edm::ParameterSet &)
 
 ~TICLSeedingRegionProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

int algoId_
 
std::unique_ptr< SeedingRegionAlgoBasemyAlgo_
 
std::string seedingId_
 

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 22 of file TICLSeedingRegionProducer.cc.

Constructor & Destructor Documentation

TICLSeedingRegionProducer::TICLSeedingRegionProducer ( const edm::ParameterSet ps)

Definition at line 39 of file TICLSeedingRegionProducer.cc.

References algoId_, and myAlgo_.

40  : algoId_(ps.getParameter<int>("algoId")) {
41  auto sumes = consumesCollector();
42 
43  switch (algoId_) {
44  case 1:
45  myAlgo_ = std::make_unique<SeedingRegionByTracks>(ps, sumes);
46  break;
47  case 2:
48  myAlgo_ = std::make_unique<SeedingRegionGlobal>(ps, sumes);
49  break;
50  default:
51  break;
52  }
53  produces<std::vector<TICLSeedingRegion>>();
54 }
T getParameter(std::string const &) const
std::unique_ptr< SeedingRegionAlgoBase > myAlgo_
TICLSeedingRegionProducer::~TICLSeedingRegionProducer ( )
inlineoverride

Definition at line 25 of file TICLSeedingRegionProducer.cc.

References fillDescriptions(), and iEvent.

25 {}

Member Function Documentation

void TICLSeedingRegionProducer::beginRun ( edm::Run const &  iEvent,
edm::EventSetup const &  es 
)
override

Definition at line 68 of file TICLSeedingRegionProducer.cc.

References myAlgo_.

68 { myAlgo_->initialize(es); }
std::unique_ptr< SeedingRegionAlgoBase > myAlgo_
void TICLSeedingRegionProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 56 of file TICLSeedingRegionProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

56  {
58  desc.add<int>("algo_verbosity", 0);
59  desc.add<edm::InputTag>("tracks", edm::InputTag("generalTracks"));
60  desc.add<std::string>("cutTk",
61  "1.48 < abs(eta) < 3.0 && pt > 2. && quality(\"highPurity\") && "
62  "hitPattern().numberOfLostHits(\"MISSING_OUTER_HITS\") < 10");
63  desc.add<std::string>("propagator", "PropagatorWithMaterial");
64  desc.add<int>("algoId", 1);
65  descriptions.add("ticlSeedingRegionProducer", desc);
66 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void TICLSeedingRegionProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 70 of file TICLSeedingRegionProducer.cc.

References eostools::move(), myAlgo_, edm::Event::put(), and mps_fire::result.

70  {
71  auto result = std::make_unique<std::vector<TICLSeedingRegion>>();
72  myAlgo_->makeRegions(evt, es, *result);
73 
74  evt.put(std::move(result));
75 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
std::unique_ptr< SeedingRegionAlgoBase > myAlgo_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

int TICLSeedingRegionProducer::algoId_
private

Definition at line 34 of file TICLSeedingRegionProducer.cc.

Referenced by TICLSeedingRegionProducer().

std::unique_ptr<SeedingRegionAlgoBase> TICLSeedingRegionProducer::myAlgo_
private

Definition at line 33 of file TICLSeedingRegionProducer.cc.

Referenced by beginRun(), produce(), and TICLSeedingRegionProducer().

std::string TICLSeedingRegionProducer::seedingId_
private

Definition at line 35 of file TICLSeedingRegionProducer.cc.